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.
- package/dist/longChatPane.js +2387 -7783
- package/dist/longChatPane.js.map +1 -1
- package/dist/main.js +2461 -8037
- package/dist/main.js.map +1 -1
- package/dist/shortChatPane.js +2387 -7783
- package/dist/shortChatPane.js.map +1 -1
- package/lib/create.js +7 -79
- package/lib/create.js.map +1 -1
- package/lib/longChatPane.js +27 -98
- package/lib/longChatPane.js.map +1 -1
- package/lib/main.js +0 -3
- package/lib/main.js.map +1 -1
- package/lib/shortChatPane.js +6 -23
- package/lib/shortChatPane.js.map +1 -1
- package/package.json +11 -11
package/lib/longChatPane.js
CHANGED
|
@@ -1,38 +1,29 @@
|
|
|
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.longChatPane = void 0;
|
|
9
|
-
|
|
10
8
|
var _solidLogic = require("solid-logic");
|
|
11
|
-
|
|
12
9
|
var UI = _interopRequireWildcard(require("solid-ui"));
|
|
13
|
-
|
|
14
10
|
var $rdf = _interopRequireWildcard(require("rdflib"));
|
|
15
|
-
|
|
16
11
|
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); }
|
|
17
|
-
|
|
18
12
|
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; }
|
|
19
|
-
|
|
20
|
-
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
21
|
-
|
|
13
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
22
14
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
23
|
-
|
|
24
15
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
25
|
-
|
|
26
16
|
var ns = UI.ns;
|
|
27
17
|
var mainClass = ns.meeting('LongChat'); // @@ something from SIOC?
|
|
28
18
|
|
|
29
|
-
var CHAT_LOCATION_IN_CONTAINER = 'index.ttl#this';
|
|
30
|
-
|
|
31
|
-
var SPANNER_ICON = 'noun_344563.svg'; // resize: horizontal; min-width: 20em;
|
|
19
|
+
var CHAT_LOCATION_IN_CONTAINER = 'index.ttl#this';
|
|
32
20
|
|
|
21
|
+
// const menuIcon = 'noun_897914.svg'
|
|
22
|
+
var SPANNER_ICON = 'noun_344563.svg';
|
|
23
|
+
// resize: horizontal; min-width: 20em;
|
|
33
24
|
var SIDEBAR_COMPONENT_STYLE = UI.style.sidebarComponentStyle || ' padding: 0.5em; width: 100%;';
|
|
34
|
-
var SIDEBAR_STYLE = UI.style.sidebarStyle || 'overflow-x: auto; overflow-y: auto; border-radius: 1em; border: 0.1em solid white;';
|
|
35
|
-
|
|
25
|
+
var SIDEBAR_STYLE = UI.style.sidebarStyle || 'overflow-x: auto; overflow-y: auto; border-radius: 1em; border: 0.1em solid white;';
|
|
26
|
+
// was purple border
|
|
36
27
|
var longChatPane = {
|
|
37
28
|
CHAT_LOCATION_IN_CONTAINER: CHAT_LOCATION_IN_CONTAINER,
|
|
38
29
|
// noun_704.svg Canoe noun_346319.svg = 1 Chat noun_1689339.svg = three chat
|
|
@@ -40,38 +31,31 @@ var longChatPane = {
|
|
|
40
31
|
name: 'long chat',
|
|
41
32
|
label: function label(subject, context) {
|
|
42
33
|
var kb = context.session.store;
|
|
43
|
-
|
|
44
34
|
if (kb.holds(subject, ns.rdf('type'), ns.meeting('LongChat'))) {
|
|
45
35
|
// subject is the object
|
|
46
36
|
return 'Chat channnel';
|
|
47
37
|
} // Looks like a message -- might not havre any class declared
|
|
48
|
-
|
|
49
|
-
|
|
50
38
|
if (kb.any(subject, ns.sioc('content')) && kb.any(subject, ns.dct('created'))) {
|
|
51
39
|
return 'message';
|
|
52
40
|
}
|
|
53
|
-
|
|
54
41
|
return null; // Suppress pane otherwise
|
|
55
42
|
},
|
|
43
|
+
|
|
56
44
|
mintClass: mainClass,
|
|
57
45
|
mintNew: function mintNew(context, newPaneOptions) {
|
|
58
46
|
var kb = context.session.store;
|
|
59
47
|
var updater = kb.updater;
|
|
60
|
-
|
|
61
48
|
if (newPaneOptions.me && !newPaneOptions.me.uri) {
|
|
62
49
|
throw new Error('chat mintNew: Invalid userid ' + newPaneOptions.me);
|
|
63
50
|
}
|
|
64
|
-
|
|
65
51
|
var newInstance = newPaneOptions.newInstance = newPaneOptions.newInstance || kb.sym(newPaneOptions.newBase + CHAT_LOCATION_IN_CONTAINER);
|
|
66
52
|
var newChatDoc = newInstance.doc();
|
|
67
53
|
kb.add(newInstance, ns.rdf('type'), ns.meeting('LongChat'), newChatDoc);
|
|
68
54
|
kb.add(newInstance, ns.dc('title'), 'Chat channel', newChatDoc);
|
|
69
55
|
kb.add(newInstance, ns.dc('created'), new Date(), newChatDoc);
|
|
70
|
-
|
|
71
56
|
if (newPaneOptions.me) {
|
|
72
57
|
kb.add(newInstance, ns.dc('author'), newPaneOptions.me, newChatDoc);
|
|
73
58
|
}
|
|
74
|
-
|
|
75
59
|
return new Promise(function (resolve, reject) {
|
|
76
60
|
updater.put(newChatDoc, kb.statementsMatching(undefined, undefined, undefined, newChatDoc), 'text/turtle', function (uri2, ok, message) {
|
|
77
61
|
if (ok) {
|
|
@@ -85,6 +69,7 @@ var longChatPane = {
|
|
|
85
69
|
render: function render(subject, context, paneOptions) {
|
|
86
70
|
var dom = context.dom;
|
|
87
71
|
var kb = context.session.store;
|
|
72
|
+
|
|
88
73
|
/* Preferences
|
|
89
74
|
**
|
|
90
75
|
** Things like whether to color text by author webid, to expand image URLs inline,
|
|
@@ -94,11 +79,9 @@ var longChatPane = {
|
|
|
94
79
|
** for everyone to be seeing the same thing.
|
|
95
80
|
*/
|
|
96
81
|
// const DCT = $rdf.Namespace('http://purl.org/dc/terms/')
|
|
97
|
-
|
|
98
82
|
var 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";
|
|
99
83
|
var preferencesForm = kb.sym('https://solid.github.io/solid-panes/longCharPane/preferencesForm.ttl#this');
|
|
100
84
|
var preferencesFormDoc = preferencesForm.doc();
|
|
101
|
-
|
|
102
85
|
if (!kb.holds(undefined, undefined, undefined, preferencesFormDoc)) {
|
|
103
86
|
// If not loaded already
|
|
104
87
|
$rdf.parse(preferencesFormText, kb, preferencesFormDoc.uri, 'text/turtle'); // Load form directly
|
|
@@ -106,15 +89,14 @@ var longChatPane = {
|
|
|
106
89
|
|
|
107
90
|
var preferenceProperties = kb.statementsMatching(null, ns.ui.property, null, preferencesFormDoc).map(function (st) {
|
|
108
91
|
return st.object;
|
|
109
|
-
});
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
// Preferences Menu
|
|
110
95
|
//
|
|
111
96
|
// Build a menu a the side (@@ reactive: on top?)
|
|
112
|
-
|
|
113
97
|
function renderPreferencesSidebar(_x) {
|
|
114
98
|
return _renderPreferencesSidebar.apply(this, arguments);
|
|
115
99
|
} // @@ Split out into solid-ui
|
|
116
|
-
|
|
117
|
-
|
|
118
100
|
function _renderPreferencesSidebar() {
|
|
119
101
|
_renderPreferencesSidebar = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(context) {
|
|
120
102
|
var dom, noun, preferencesArea, menuTable, registrationArea, statusArea, me;
|
|
@@ -125,22 +107,19 @@ var longChatPane = {
|
|
|
125
107
|
// const noun = 'chat room'
|
|
126
108
|
dom = context.dom, noun = context.noun;
|
|
127
109
|
preferencesArea = dom.createElement('div');
|
|
128
|
-
preferencesArea.appendChild(panelCloseButton(preferencesArea));
|
|
129
|
-
|
|
110
|
+
preferencesArea.appendChild(panelCloseButton(preferencesArea));
|
|
111
|
+
// @@ style below fix .. just make it onviious while testing
|
|
130
112
|
preferencesArea.style = SIDEBAR_COMPONENT_STYLE;
|
|
131
113
|
preferencesArea.style.minWidth = '25em'; // bit bigger
|
|
132
|
-
|
|
133
114
|
preferencesArea.style.maxHeight = triptychHeight;
|
|
134
115
|
menuTable = preferencesArea.appendChild(dom.createElement('table'));
|
|
135
116
|
registrationArea = menuTable.appendChild(dom.createElement('tr'));
|
|
136
117
|
statusArea = menuTable.appendChild(dom.createElement('tr'));
|
|
137
118
|
me = _solidLogic.authn.currentUser();
|
|
138
|
-
|
|
139
119
|
if (!me) {
|
|
140
120
|
_context.next = 15;
|
|
141
121
|
break;
|
|
142
122
|
}
|
|
143
|
-
|
|
144
123
|
_context.next = 13;
|
|
145
124
|
return UI.login.registrationControl({
|
|
146
125
|
noun: noun,
|
|
@@ -149,7 +128,6 @@ var longChatPane = {
|
|
|
149
128
|
dom: dom,
|
|
150
129
|
div: registrationArea
|
|
151
130
|
}, chatChannel, mainClass);
|
|
152
|
-
|
|
153
131
|
case 13:
|
|
154
132
|
console.log('Registration control finsished.');
|
|
155
133
|
preferencesArea.appendChild(UI.preferences.renderPreferencesForm(chatChannel, mainClass, preferencesForm, {
|
|
@@ -160,10 +138,8 @@ var longChatPane = {
|
|
|
160
138
|
dom: dom,
|
|
161
139
|
kb: kb
|
|
162
140
|
}));
|
|
163
|
-
|
|
164
141
|
case 15:
|
|
165
142
|
return _context.abrupt("return", preferencesArea);
|
|
166
|
-
|
|
167
143
|
case 16:
|
|
168
144
|
case "end":
|
|
169
145
|
return _context.stop();
|
|
@@ -173,30 +149,23 @@ var longChatPane = {
|
|
|
173
149
|
}));
|
|
174
150
|
return _renderPreferencesSidebar.apply(this, arguments);
|
|
175
151
|
}
|
|
176
|
-
|
|
177
152
|
function panelCloseButton(panel) {
|
|
178
153
|
function removePanel() {
|
|
179
154
|
panel.parentNode.removeChild(panel);
|
|
180
155
|
}
|
|
181
|
-
|
|
182
156
|
var button = UI.widgets.button(context.dom, UI.icons.iconBase + 'noun_1180156.svg', 'close', removePanel);
|
|
183
157
|
button.style["float"] = 'right';
|
|
184
158
|
button.style.margin = '0.7em';
|
|
185
159
|
delete button.style.backgroundColor; // do not want white
|
|
186
|
-
|
|
187
160
|
return button;
|
|
188
161
|
}
|
|
189
|
-
|
|
190
162
|
function preferencesButtonPressed(_x2) {
|
|
191
163
|
return _preferencesButtonPressed.apply(this, arguments);
|
|
192
164
|
} // preferencesButtonPressed
|
|
193
165
|
// All my chats
|
|
194
166
|
//
|
|
195
|
-
|
|
196
167
|
/* Build a other chats list drawer the side
|
|
197
168
|
*/
|
|
198
|
-
|
|
199
|
-
|
|
200
169
|
function _preferencesButtonPressed() {
|
|
201
170
|
_preferencesButtonPressed = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_event) {
|
|
202
171
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
@@ -207,16 +176,13 @@ var longChatPane = {
|
|
|
207
176
|
_context2.next = 4;
|
|
208
177
|
break;
|
|
209
178
|
}
|
|
210
|
-
|
|
211
179
|
_context2.next = 3;
|
|
212
180
|
return renderPreferencesSidebar({
|
|
213
181
|
dom: dom,
|
|
214
182
|
noun: 'chat room'
|
|
215
183
|
});
|
|
216
|
-
|
|
217
184
|
case 3:
|
|
218
185
|
preferencesArea = _context2.sent;
|
|
219
|
-
|
|
220
186
|
case 4:
|
|
221
187
|
if (paneRight.contains(preferencesArea)) {
|
|
222
188
|
// Close menu (hide or delete??)
|
|
@@ -225,7 +191,6 @@ var longChatPane = {
|
|
|
225
191
|
} else {
|
|
226
192
|
paneRight.appendChild(preferencesArea);
|
|
227
193
|
}
|
|
228
|
-
|
|
229
194
|
case 5:
|
|
230
195
|
case "end":
|
|
231
196
|
return _context2.stop();
|
|
@@ -235,12 +200,9 @@ var longChatPane = {
|
|
|
235
200
|
}));
|
|
236
201
|
return _preferencesButtonPressed.apply(this, arguments);
|
|
237
202
|
}
|
|
238
|
-
|
|
239
203
|
function renderCreationControl(refreshTarget, noun) {
|
|
240
204
|
var creationDiv = dom.createElement('div');
|
|
241
|
-
|
|
242
205
|
var me = _solidLogic.authn.currentUser();
|
|
243
|
-
|
|
244
206
|
var creationContext = {
|
|
245
207
|
// folder: subject,
|
|
246
208
|
div: creationDiv,
|
|
@@ -253,14 +215,11 @@ var longChatPane = {
|
|
|
253
215
|
var chatPane = context.session.paneRegistry.byName('chat');
|
|
254
216
|
var relevantPanes = [chatPane];
|
|
255
217
|
UI.create.newThingUI(creationContext, context, relevantPanes); // Have to pass panes down newUI
|
|
256
|
-
|
|
257
218
|
return creationDiv;
|
|
258
219
|
}
|
|
259
|
-
|
|
260
220
|
function renderInstances(_x3, _x4) {
|
|
261
221
|
return _renderInstances.apply(this, arguments);
|
|
262
222
|
}
|
|
263
|
-
|
|
264
223
|
function _renderInstances() {
|
|
265
224
|
_renderInstances = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(theClass, noun) {
|
|
266
225
|
var instancesDiv, context;
|
|
@@ -280,11 +239,9 @@ var longChatPane = {
|
|
|
280
239
|
"private": true,
|
|
281
240
|
type: theClass
|
|
282
241
|
});
|
|
283
|
-
|
|
284
242
|
case 4:
|
|
285
243
|
instancesDiv.appendChild(renderCreationControl(instancesDiv, noun));
|
|
286
244
|
return _context3.abrupt("return", instancesDiv);
|
|
287
|
-
|
|
288
245
|
case 6:
|
|
289
246
|
case "end":
|
|
290
247
|
return _context3.stop();
|
|
@@ -294,19 +251,14 @@ var longChatPane = {
|
|
|
294
251
|
}));
|
|
295
252
|
return _renderInstances.apply(this, arguments);
|
|
296
253
|
}
|
|
297
|
-
|
|
298
254
|
var otherChatsArea = null;
|
|
299
|
-
|
|
300
255
|
function otherChatsHandler(_x5) {
|
|
301
256
|
return _otherChatsHandler.apply(this, arguments);
|
|
302
257
|
} // otherChatsHandler
|
|
303
258
|
// People in the chat
|
|
304
259
|
//
|
|
305
|
-
|
|
306
260
|
/* Build a participants list drawer the side
|
|
307
261
|
*/
|
|
308
|
-
|
|
309
|
-
|
|
310
262
|
function _otherChatsHandler() {
|
|
311
263
|
_otherChatsHandler = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(_event) {
|
|
312
264
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
@@ -317,7 +269,6 @@ var longChatPane = {
|
|
|
317
269
|
_context4.next = 10;
|
|
318
270
|
break;
|
|
319
271
|
}
|
|
320
|
-
|
|
321
272
|
// Lazy build when needed
|
|
322
273
|
// Expand
|
|
323
274
|
otherChatsArea = dom.createElement('div');
|
|
@@ -327,12 +278,9 @@ var longChatPane = {
|
|
|
327
278
|
_context4.t0 = otherChatsArea;
|
|
328
279
|
_context4.next = 8;
|
|
329
280
|
return renderInstances(ns.meeting('LongChat'), 'chat');
|
|
330
|
-
|
|
331
281
|
case 8:
|
|
332
282
|
_context4.t1 = _context4.sent;
|
|
333
|
-
|
|
334
283
|
_context4.t0.appendChild.call(_context4.t0, _context4.t1);
|
|
335
|
-
|
|
336
284
|
case 10:
|
|
337
285
|
// Toggle visibility with button clicks
|
|
338
286
|
if (paneLeft.contains(otherChatsArea)) {
|
|
@@ -340,7 +288,6 @@ var longChatPane = {
|
|
|
340
288
|
} else {
|
|
341
289
|
paneLeft.appendChild(otherChatsArea);
|
|
342
290
|
}
|
|
343
|
-
|
|
344
291
|
case 11:
|
|
345
292
|
case "end":
|
|
346
293
|
return _context4.stop();
|
|
@@ -350,25 +297,22 @@ var longChatPane = {
|
|
|
350
297
|
}));
|
|
351
298
|
return _otherChatsHandler.apply(this, arguments);
|
|
352
299
|
}
|
|
353
|
-
|
|
354
300
|
var participantsArea;
|
|
355
|
-
|
|
356
301
|
function participantsHandler(_event) {
|
|
357
302
|
if (!participantsArea) {
|
|
358
303
|
// Expand
|
|
359
304
|
participantsArea = dom.createElement('div');
|
|
360
305
|
participantsArea.style = SIDEBAR_COMPONENT_STYLE;
|
|
361
306
|
participantsArea.style.maxHeight = triptychHeight;
|
|
362
|
-
participantsArea.appendChild(panelCloseButton(participantsArea));
|
|
307
|
+
participantsArea.appendChild(panelCloseButton(participantsArea));
|
|
363
308
|
|
|
309
|
+
// Record my participation and display participants
|
|
364
310
|
var me = _solidLogic.authn.currentUser();
|
|
365
|
-
|
|
366
311
|
if (!me) alert('Should be logeed in for partipants panel');
|
|
367
312
|
UI.pad.manageParticipation(dom, participantsArea, chatChannel.doc(), chatChannel, me, {});
|
|
368
|
-
}
|
|
313
|
+
}
|
|
314
|
+
// Toggle appearance in sidebar with clicks
|
|
369
315
|
// Note also it can remove itself using the X button
|
|
370
|
-
|
|
371
|
-
|
|
372
316
|
if (paneLeft.contains(participantsArea)) {
|
|
373
317
|
// Close participants (hide or delete??)
|
|
374
318
|
participantsArea.parentNode.removeChild(participantsArea);
|
|
@@ -378,28 +322,26 @@ var longChatPane = {
|
|
|
378
322
|
}
|
|
379
323
|
} // participantsHandler
|
|
380
324
|
|
|
381
|
-
|
|
382
325
|
var chatChannel = subject;
|
|
383
326
|
var selectedMessage = null;
|
|
384
|
-
|
|
385
327
|
if (kb.holds(subject, ns.rdf('type'), ns.meeting('LongChat'))) {
|
|
386
328
|
// subject is the chatChannel
|
|
387
|
-
console.log('Chat channnel');
|
|
329
|
+
console.log('Chat channnel');
|
|
330
|
+
|
|
331
|
+
// Looks like a message -- might not havre any class declared
|
|
388
332
|
} else if (kb.any(subject, ns.sioc('content')) && kb.any(subject, ns.dct('created'))) {
|
|
389
333
|
console.log('message');
|
|
390
334
|
selectedMessage = subject;
|
|
391
335
|
chatChannel = kb.any(null, ns.wf('message'), selectedMessage);
|
|
392
336
|
if (!chatChannel) throw new Error('Message has no link to chatChannel');
|
|
393
337
|
}
|
|
338
|
+
var div = dom.createElement('div');
|
|
394
339
|
|
|
395
|
-
|
|
340
|
+
// Three large columns for particpant, chat, Preferences. formula below just as a note
|
|
396
341
|
// const windowHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight
|
|
397
|
-
|
|
398
342
|
var triptychHeight = '20cm'; // @@ need to be able to set to window!
|
|
399
|
-
|
|
400
343
|
var triptych = div.appendChild(dom.createElement('table'));
|
|
401
344
|
triptych.style.maxHeight = '12"'; // Screen max
|
|
402
|
-
|
|
403
345
|
var paneRow = triptych.appendChild(dom.createElement('tr'));
|
|
404
346
|
var paneLeft = paneRow.appendChild(dom.createElement('td'));
|
|
405
347
|
var paneMiddle = paneRow.appendChild(dom.createElement('td'));
|
|
@@ -411,23 +353,21 @@ var longChatPane = {
|
|
|
411
353
|
paneRight.style.paddingLeft = '1em';
|
|
412
354
|
paneBottom.appendChild(dom.createElement('td'));
|
|
413
355
|
var buttonCell = paneBottom.appendChild(dom.createElement('td'));
|
|
414
|
-
paneBottom.appendChild(dom.createElement('td'));
|
|
356
|
+
paneBottom.appendChild(dom.createElement('td'));
|
|
415
357
|
|
|
358
|
+
// Button to bring up participants drawer on left
|
|
416
359
|
var participantsIcon = 'noun_339237.svg';
|
|
417
360
|
var participantsButton = UI.widgets.button(dom, UI.icons.iconBase + participantsIcon, 'participants ...'); // wider var
|
|
418
|
-
|
|
419
361
|
buttonCell.appendChild(participantsButton);
|
|
420
|
-
participantsButton.addEventListener('click', participantsHandler);
|
|
362
|
+
participantsButton.addEventListener('click', participantsHandler);
|
|
421
363
|
|
|
364
|
+
// Button to bring up otherChats drawer on left
|
|
422
365
|
var otherChatsIcon = 'noun_1689339.svg'; // long chat icon -- not ideal for a set of chats @@
|
|
423
|
-
|
|
424
366
|
var otherChatsButton = UI.widgets.button(dom, UI.icons.iconBase + otherChatsIcon, 'List of other chats ...'); // wider var
|
|
425
|
-
|
|
426
367
|
buttonCell.appendChild(otherChatsButton);
|
|
427
368
|
otherChatsButton.addEventListener('click', otherChatsHandler);
|
|
428
369
|
var preferencesArea = null;
|
|
429
370
|
var menuButton = UI.widgets.button(dom, UI.icons.iconBase + SPANNER_ICON, 'Setting ...'); // wider var
|
|
430
|
-
|
|
431
371
|
buttonCell.appendChild(menuButton);
|
|
432
372
|
menuButton.style["float"] = 'right';
|
|
433
373
|
menuButton.addEventListener('click', preferencesButtonPressed);
|
|
@@ -441,11 +381,9 @@ var longChatPane = {
|
|
|
441
381
|
dom: dom
|
|
442
382
|
};
|
|
443
383
|
participantsHandlerContext.me = _solidLogic.authn.currentUser(); // If already logged on
|
|
444
|
-
|
|
445
384
|
function buildPane() {
|
|
446
385
|
return _buildPane.apply(this, arguments);
|
|
447
386
|
}
|
|
448
|
-
|
|
449
387
|
function _buildPane() {
|
|
450
388
|
_buildPane = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
|
|
451
389
|
var prefMap, propuri, chatControl;
|
|
@@ -456,41 +394,33 @@ var longChatPane = {
|
|
|
456
394
|
_context5.prev = 0;
|
|
457
395
|
_context5.next = 3;
|
|
458
396
|
return UI.preferences.getPreferencesForClass(chatChannel, mainClass, preferenceProperties, participantsHandlerContext);
|
|
459
|
-
|
|
460
397
|
case 3:
|
|
461
398
|
prefMap = _context5.sent;
|
|
462
399
|
_context5.next = 9;
|
|
463
400
|
break;
|
|
464
|
-
|
|
465
401
|
case 6:
|
|
466
402
|
_context5.prev = 6;
|
|
467
403
|
_context5.t0 = _context5["catch"](0);
|
|
468
404
|
UI.widgets.complain(participantsHandlerContext, _context5.t0);
|
|
469
|
-
|
|
470
405
|
case 9:
|
|
471
406
|
for (propuri in prefMap) {
|
|
472
407
|
options[propuri.split('#')[1]] = prefMap[propuri];
|
|
473
408
|
}
|
|
474
|
-
|
|
475
409
|
if (selectedMessage) {
|
|
476
410
|
options.selectedMessage = selectedMessage;
|
|
477
411
|
}
|
|
478
|
-
|
|
479
412
|
if (paneOptions.solo) {
|
|
480
413
|
// This is the top pane, title, scrollbar etc are ours
|
|
481
414
|
options.solo = true;
|
|
482
415
|
}
|
|
483
|
-
|
|
484
416
|
_context5.next = 14;
|
|
485
417
|
return UI.infiniteMessageArea(dom, kb, chatChannel, options);
|
|
486
|
-
|
|
487
418
|
case 14:
|
|
488
419
|
chatControl = _context5.sent;
|
|
489
420
|
chatControl.style.resize = 'both';
|
|
490
421
|
chatControl.style.overflow = 'auto';
|
|
491
422
|
chatControl.style.maxHeight = triptychHeight;
|
|
492
423
|
paneMiddle.appendChild(chatControl);
|
|
493
|
-
|
|
494
424
|
case 19:
|
|
495
425
|
case "end":
|
|
496
426
|
return _context5.stop();
|
|
@@ -500,7 +430,6 @@ var longChatPane = {
|
|
|
500
430
|
}));
|
|
501
431
|
return _buildPane.apply(this, arguments);
|
|
502
432
|
}
|
|
503
|
-
|
|
504
433
|
buildPane().then(console.log('async - chat pane built'));
|
|
505
434
|
return div;
|
|
506
435
|
}
|