solid-ui 2.4.25 → 2.4.26-029ae1f9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +1778 -1134
- package/dist/main.js.map +1 -1
- package/lib/acl/access-controller.js.map +1 -1
- package/lib/acl/access-groups.js.map +1 -1
- package/lib/acl/acl-control.js.map +1 -1
- package/lib/acl/acl.js.map +1 -1
- package/lib/acl/add-agent-buttons.js.map +1 -1
- package/lib/acl/index.js.map +1 -1
- package/lib/acl/styles.js.map +1 -1
- package/lib/chat/bookmarks.js +6 -7
- package/lib/chat/bookmarks.js.map +1 -1
- package/lib/chat/chatLogic.js +227 -61
- package/lib/chat/chatLogic.js.map +1 -1
- package/lib/chat/dateFolder.js.map +1 -1
- package/lib/chat/infinite.js +585 -408
- package/lib/chat/infinite.js.map +1 -1
- package/lib/chat/message.js +286 -158
- package/lib/chat/message.js.map +1 -1
- package/lib/chat/messageTools.js +423 -271
- package/lib/chat/messageTools.js.map +1 -1
- package/lib/chat/thread.js +166 -144
- package/lib/chat/thread.js.map +1 -1
- package/lib/create/create.js.map +1 -1
- package/lib/create/index.js.map +1 -1
- package/lib/debug.js.map +1 -1
- package/lib/folders.js.map +1 -1
- package/lib/footer/index.js.map +1 -1
- package/lib/footer/styleMap.js.map +1 -1
- package/lib/header/empty-profile.js.map +1 -1
- package/lib/header/index.js.map +1 -1
- package/lib/header/styleMap.js.map +1 -1
- package/lib/iconBase.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/jss/index.js.map +1 -1
- package/lib/log.js +7 -7
- package/lib/log.js.map +1 -1
- package/lib/login/login.js.map +1 -1
- package/lib/matrix/index.js.map +1 -1
- package/lib/matrix/matrix.js.map +1 -1
- package/lib/media/index.js.map +1 -1
- package/lib/media/media-capture.js.map +1 -1
- package/lib/messageArea.js.map +1 -1
- package/lib/noun_Camera_1618446_000000.js.map +1 -1
- package/lib/ns.js.map +1 -1
- package/lib/pad.js.map +1 -1
- package/lib/participation.js.map +1 -1
- package/lib/preferences.js.map +1 -1
- package/lib/signup/config-default.js.map +1 -1
- package/lib/signup/signup.js.map +1 -1
- package/lib/stories/decorators.js.map +1 -1
- package/lib/style.js.map +1 -1
- package/lib/style_multiSelect.js.map +1 -1
- package/lib/table.js.map +1 -1
- package/lib/tabs.js.map +1 -1
- package/lib/utils/headerFooterHelpers.js.map +1 -1
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/label.js.map +1 -1
- package/lib/versionInfo.d.ts +2 -0
- package/lib/versionInfo.d.ts.map +1 -1
- package/lib/versionInfo.js +16 -14
- package/lib/versionInfo.js.map +1 -1
- package/lib/widgets/buttons/iconLinks.js.map +1 -1
- package/lib/widgets/buttons.js.map +1 -1
- package/lib/widgets/dragAndDrop.js.map +1 -1
- package/lib/widgets/error.js.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompleteBar.js.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompleteField.js.map +1 -1
- package/lib/widgets/forms/autocomplete/autocompletePicker.js.map +1 -1
- package/lib/widgets/forms/autocomplete/language.js.map +1 -1
- package/lib/widgets/forms/autocomplete/publicData.js.map +1 -1
- package/lib/widgets/forms/basic.js.map +1 -1
- package/lib/widgets/forms/comment.js.map +1 -1
- package/lib/widgets/forms/fieldFunction.js.map +1 -1
- package/lib/widgets/forms/fieldParams.js.map +1 -1
- package/lib/widgets/forms/formStyle.js.map +1 -1
- package/lib/widgets/forms.js.map +1 -1
- package/lib/widgets/index.js.map +1 -1
- package/lib/widgets/multiSelect.js.map +1 -1
- package/lib/widgets/peoplePicker.js.map +1 -1
- package/lib/widgets/widgetHelpers.js.map +1 -1
- package/package.json +20 -19
package/lib/chat/infinite.js
CHANGED
|
@@ -20,19 +20,9 @@ var _chatLogic = require("./chatLogic");
|
|
|
20
20
|
var _message = require("./message");
|
|
21
21
|
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); }
|
|
22
22
|
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; }
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
*/
|
|
27
|
-
// import { findBookmarkDocument } from './bookmarks'
|
|
28
|
-
// pull in first avoid cross-refs
|
|
29
|
-
|
|
30
|
-
// import * as style from '../style'
|
|
31
|
-
// import * as utils from '../utils'
|
|
32
|
-
|
|
33
|
-
// import * as pad from '../pad'
|
|
34
|
-
// import { DateFolder } from './dateFolder'
|
|
35
|
-
|
|
23
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
|
|
24
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
25
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
36
26
|
// const UI = { authn, icons, ns, media, pad, $rdf, store, style, utils, widgets }
|
|
37
27
|
|
|
38
28
|
function desktopNotification(str) {
|
|
@@ -60,34 +50,9 @@ function desktopNotification(str) {
|
|
|
60
50
|
/**
|
|
61
51
|
* Renders a chat message inside a `messageTable`
|
|
62
52
|
*/
|
|
63
|
-
function insertMessageIntoTable(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
// const message = messageRow.AJAR_subject
|
|
67
|
-
if (options.selectedMessage && options.selectedMessage.sameTerm(message)) {
|
|
68
|
-
messageRow.style.backgroundColor = 'yellow';
|
|
69
|
-
options.selectedElement = messageRow;
|
|
70
|
-
messageTable.selectedElement = messageRow;
|
|
71
|
-
}
|
|
72
|
-
var done = false;
|
|
73
|
-
for (var ele = messageTable.firstChild;; ele = ele.nextSibling) {
|
|
74
|
-
if (!ele) {
|
|
75
|
-
// empty
|
|
76
|
-
break;
|
|
77
|
-
}
|
|
78
|
-
var newestFirst = options.newestfirst === true;
|
|
79
|
-
var dateString = messageRow.AJAR_date;
|
|
80
|
-
if (dateString > ele.AJAR_date && newestFirst || dateString < ele.AJAR_date && !newestFirst) {
|
|
81
|
-
messageTable.insertBefore(messageRow, ele);
|
|
82
|
-
done = true;
|
|
83
|
-
break;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
if (!done) {
|
|
87
|
-
messageTable.appendChild(messageRow);
|
|
88
|
-
}
|
|
53
|
+
function insertMessageIntoTable(_x, _x2, _x3, _x4, _x5, _x6) {
|
|
54
|
+
return _insertMessageIntoTable.apply(this, arguments);
|
|
89
55
|
}
|
|
90
|
-
|
|
91
56
|
/**
|
|
92
57
|
* Common code for a chat (discussion area of messages about something)
|
|
93
58
|
* This version runs over a series of files for different time periods
|
|
@@ -110,20 +75,70 @@ function insertMessageIntoTable(channelObject, messageTable, message, fresh, opt
|
|
|
110
75
|
- inlineImageHeightEms: The height (in ems) of images expaned from their URIs in the chat.
|
|
111
76
|
|
|
112
77
|
*/
|
|
113
|
-
function
|
|
78
|
+
function _insertMessageIntoTable() {
|
|
79
|
+
_insertMessageIntoTable = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(channelObject, messageTable, message, fresh, options, userContext) {
|
|
80
|
+
var messageRow, done, ele, newestFirst, dateString;
|
|
81
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
82
|
+
while (1) switch (_context.prev = _context.next) {
|
|
83
|
+
case 0:
|
|
84
|
+
_context.next = 2;
|
|
85
|
+
return (0, _message.renderMessageRow)(channelObject, message, fresh, options, userContext);
|
|
86
|
+
case 2:
|
|
87
|
+
messageRow = _context.sent;
|
|
88
|
+
// const message = messageRow.AJAR_subject
|
|
89
|
+
if (options.selectedMessage && options.selectedMessage.sameTerm(message)) {
|
|
90
|
+
messageRow.style.backgroundColor = 'yellow';
|
|
91
|
+
options.selectedElement = messageRow;
|
|
92
|
+
messageTable.selectedElement = messageRow;
|
|
93
|
+
}
|
|
94
|
+
done = false;
|
|
95
|
+
ele = messageTable.firstChild;
|
|
96
|
+
case 6:
|
|
97
|
+
if (ele) {
|
|
98
|
+
_context.next = 8;
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
return _context.abrupt("break", 17);
|
|
102
|
+
case 8:
|
|
103
|
+
newestFirst = options.newestfirst === true;
|
|
104
|
+
dateString = messageRow.AJAR_date;
|
|
105
|
+
if (!(dateString > ele.AJAR_date && newestFirst || dateString < ele.AJAR_date && !newestFirst)) {
|
|
106
|
+
_context.next = 14;
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
messageTable.insertBefore(messageRow, ele);
|
|
110
|
+
done = true;
|
|
111
|
+
return _context.abrupt("break", 17);
|
|
112
|
+
case 14:
|
|
113
|
+
ele = ele.nextSibling;
|
|
114
|
+
_context.next = 6;
|
|
115
|
+
break;
|
|
116
|
+
case 17:
|
|
117
|
+
if (!done) {
|
|
118
|
+
messageTable.appendChild(messageRow);
|
|
119
|
+
}
|
|
120
|
+
case 18:
|
|
121
|
+
case "end":
|
|
122
|
+
return _context.stop();
|
|
123
|
+
}
|
|
124
|
+
}, _callee);
|
|
125
|
+
}));
|
|
126
|
+
return _insertMessageIntoTable.apply(this, arguments);
|
|
127
|
+
}
|
|
128
|
+
function infiniteMessageArea(_x7, _x8, _x9, _x10) {
|
|
114
129
|
return _infiniteMessageArea.apply(this, arguments);
|
|
115
130
|
}
|
|
116
131
|
function _infiniteMessageArea() {
|
|
117
|
-
_infiniteMessageArea = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function
|
|
118
|
-
var syncMessages, addMessage, insertPreviousMessages, _insertPreviousMessages, removePreviousMessages, createMessageTable, _createMessageTable, renderMessageTable, addNewChatDocumentIfNewDay, _addNewChatDocumentIfNewDay, appendCurrentMessages, _appendCurrentMessages, loadMoreWhereNeeded, _loadMoreWhereNeeded, loadInitialContent, _loadInitialContent, newestFirst, channelObject, dateFolder, div, statusArea, userContext, liveMessageTable, earliest, latest, lock;
|
|
119
|
-
return _regenerator["default"].wrap(function
|
|
120
|
-
while (1) switch (
|
|
132
|
+
_infiniteMessageArea = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee16(dom, wasStore, chatChannel, options) {
|
|
133
|
+
var syncMessages, _syncMessages, addMessage, _addMessage, insertPreviousMessages, _insertPreviousMessages, removePreviousMessages, createMessageTable, _createMessageTable, renderMessageTable, _renderMessageTable, addNewChatDocumentIfNewDay, _addNewChatDocumentIfNewDay, appendCurrentMessages, _appendCurrentMessages, loadMoreWhereNeeded, _loadMoreWhereNeeded, loadInitialContent, _loadInitialContent, newestFirst, channelObject, dateFolder, div, statusArea, userContext, liveMessageTable, earliest, latest, lock;
|
|
134
|
+
return _regenerator["default"].wrap(function _callee16$(_context16) {
|
|
135
|
+
while (1) switch (_context16.prev = _context16.next) {
|
|
121
136
|
case 0:
|
|
122
137
|
_loadInitialContent = function _loadInitialContent3() {
|
|
123
|
-
_loadInitialContent = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function
|
|
138
|
+
_loadInitialContent = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee15() {
|
|
124
139
|
var yank, fixScroll, live, selectedDocument, now, todayDocument, selectedMessageTable, selectedDate;
|
|
125
|
-
return _regenerator["default"].wrap(function
|
|
126
|
-
while (1) switch (
|
|
140
|
+
return _regenerator["default"].wrap(function _callee15$(_context15) {
|
|
141
|
+
while (1) switch (_context15.prev = _context15.next) {
|
|
127
142
|
case 0:
|
|
128
143
|
fixScroll = function _fixScroll() {
|
|
129
144
|
if (options.selectedElement) {
|
|
@@ -148,29 +163,29 @@ function _infiniteMessageArea() {
|
|
|
148
163
|
live = todayDocument.sameTerm(selectedDocument);
|
|
149
164
|
}
|
|
150
165
|
if (!(options.selectedMessage && !live)) {
|
|
151
|
-
|
|
166
|
+
_context15.next = 15;
|
|
152
167
|
break;
|
|
153
168
|
}
|
|
154
169
|
selectedDate = dateFolder.dateFromLeafDocument(selectedDocument);
|
|
155
|
-
|
|
170
|
+
_context15.next = 7;
|
|
156
171
|
return createMessageTable(selectedDate, live);
|
|
157
172
|
case 7:
|
|
158
|
-
selectedMessageTable =
|
|
173
|
+
selectedMessageTable = _context15.sent;
|
|
159
174
|
div.appendChild(selectedMessageTable);
|
|
160
175
|
earliest.messageTable = selectedMessageTable;
|
|
161
176
|
latest.messageTable = selectedMessageTable;
|
|
162
177
|
yank();
|
|
163
178
|
setTimeout(yank, 1000); // @@ kludge - restore position distubed by other cHANGES
|
|
164
|
-
|
|
179
|
+
_context15.next = 19;
|
|
165
180
|
break;
|
|
166
181
|
case 15:
|
|
167
|
-
|
|
182
|
+
_context15.next = 17;
|
|
168
183
|
return appendCurrentMessages();
|
|
169
184
|
case 17:
|
|
170
185
|
earliest.messageTable = liveMessageTable;
|
|
171
186
|
latest.messageTable = liveMessageTable;
|
|
172
187
|
case 19:
|
|
173
|
-
|
|
188
|
+
_context15.next = 21;
|
|
174
189
|
return loadMoreWhereNeeded(null, fixScroll);
|
|
175
190
|
case 21:
|
|
176
191
|
div.addEventListener('scroll', loadMoreWhereNeeded);
|
|
@@ -179,9 +194,9 @@ function _infiniteMessageArea() {
|
|
|
179
194
|
}
|
|
180
195
|
case 23:
|
|
181
196
|
case "end":
|
|
182
|
-
return
|
|
197
|
+
return _context15.stop();
|
|
183
198
|
}
|
|
184
|
-
},
|
|
199
|
+
}, _callee15);
|
|
185
200
|
}));
|
|
186
201
|
return _loadInitialContent.apply(this, arguments);
|
|
187
202
|
};
|
|
@@ -189,16 +204,16 @@ function _infiniteMessageArea() {
|
|
|
189
204
|
return _loadInitialContent.apply(this, arguments);
|
|
190
205
|
};
|
|
191
206
|
_loadMoreWhereNeeded = function _loadMoreWhereNeeded3() {
|
|
192
|
-
_loadMoreWhereNeeded = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function
|
|
207
|
+
_loadMoreWhereNeeded = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee14(event, fixScroll) {
|
|
193
208
|
var freeze, magicZone, done, scrollBottom, scrollTop;
|
|
194
|
-
return _regenerator["default"].wrap(function
|
|
195
|
-
while (1) switch (
|
|
209
|
+
return _regenerator["default"].wrap(function _callee14$(_context14) {
|
|
210
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
196
211
|
case 0:
|
|
197
212
|
if (!lock) {
|
|
198
|
-
|
|
213
|
+
_context14.next = 2;
|
|
199
214
|
break;
|
|
200
215
|
}
|
|
201
|
-
return
|
|
216
|
+
return _context14.abrupt("return");
|
|
202
217
|
case 2:
|
|
203
218
|
lock = true;
|
|
204
219
|
freeze = !fixScroll;
|
|
@@ -206,36 +221,36 @@ function _infiniteMessageArea() {
|
|
|
206
221
|
// const bottom = div.scrollHeight - top - div.clientHeight
|
|
207
222
|
case 5:
|
|
208
223
|
if (!(div.scrollTop < magicZone && earliest.messageTable && !earliest.messageTable.initial && earliest.messageTable.extendBackwards)) {
|
|
209
|
-
|
|
224
|
+
_context14.next = 21;
|
|
210
225
|
break;
|
|
211
226
|
}
|
|
212
227
|
if (!(div.scrollHeight === 0)) {
|
|
213
|
-
|
|
228
|
+
_context14.next = 10;
|
|
214
229
|
break;
|
|
215
230
|
}
|
|
216
|
-
//
|
|
231
|
+
// debug.log(' chat/loadMoreWhereNeeded: trying later...')
|
|
217
232
|
setTimeout(loadMoreWhereNeeded, 2000); // couple be less
|
|
218
233
|
lock = false;
|
|
219
|
-
return
|
|
234
|
+
return _context14.abrupt("return");
|
|
220
235
|
case 10:
|
|
221
|
-
//
|
|
236
|
+
// debug.log(' chat/loadMoreWhereNeeded: Going now')
|
|
222
237
|
scrollBottom = div.scrollHeight - div.scrollTop;
|
|
223
238
|
debug.log('infinite scroll: adding above: top ' + div.scrollTop);
|
|
224
|
-
|
|
239
|
+
_context14.next = 14;
|
|
225
240
|
return earliest.messageTable.extendBackwards();
|
|
226
241
|
case 14:
|
|
227
|
-
done =
|
|
242
|
+
done = _context14.sent;
|
|
228
243
|
if (freeze) {
|
|
229
244
|
div.scrollTop = div.scrollHeight - scrollBottom;
|
|
230
245
|
}
|
|
231
246
|
if (fixScroll) fixScroll();
|
|
232
247
|
if (!done) {
|
|
233
|
-
|
|
248
|
+
_context14.next = 19;
|
|
234
249
|
break;
|
|
235
250
|
}
|
|
236
|
-
return
|
|
251
|
+
return _context14.abrupt("break", 21);
|
|
237
252
|
case 19:
|
|
238
|
-
|
|
253
|
+
_context14.next = 5;
|
|
239
254
|
break;
|
|
240
255
|
case 21:
|
|
241
256
|
if (!(options.selectedMessage &&
|
|
@@ -245,15 +260,15 @@ function _infiniteMessageArea() {
|
|
|
245
260
|
latest.messageTable && !latest.messageTable["final"] &&
|
|
246
261
|
// there is more data to come
|
|
247
262
|
latest.messageTable.extendForwards)) {
|
|
248
|
-
|
|
263
|
+
_context14.next = 33;
|
|
249
264
|
break;
|
|
250
265
|
}
|
|
251
266
|
scrollTop = div.scrollTop;
|
|
252
267
|
debug.log('infinite scroll: adding below: bottom: ' + (div.scrollHeight - div.scrollTop - div.clientHeight));
|
|
253
|
-
|
|
268
|
+
_context14.next = 26;
|
|
254
269
|
return latest.messageTable.extendForwards();
|
|
255
270
|
case 26:
|
|
256
|
-
done =
|
|
271
|
+
done = _context14.sent;
|
|
257
272
|
// then add more data on the bottom
|
|
258
273
|
if (freeze) {
|
|
259
274
|
div.scrollTop = scrollTop; // while adding below keep same things in view
|
|
@@ -261,63 +276,66 @@ function _infiniteMessageArea() {
|
|
|
261
276
|
|
|
262
277
|
if (fixScroll) fixScroll();
|
|
263
278
|
if (!done) {
|
|
264
|
-
|
|
279
|
+
_context14.next = 31;
|
|
265
280
|
break;
|
|
266
281
|
}
|
|
267
|
-
return
|
|
282
|
+
return _context14.abrupt("break", 33);
|
|
268
283
|
case 31:
|
|
269
|
-
|
|
284
|
+
_context14.next = 21;
|
|
270
285
|
break;
|
|
271
286
|
case 33:
|
|
272
287
|
lock = false;
|
|
273
288
|
case 34:
|
|
274
289
|
case "end":
|
|
275
|
-
return
|
|
290
|
+
return _context14.stop();
|
|
276
291
|
}
|
|
277
|
-
},
|
|
292
|
+
}, _callee14);
|
|
278
293
|
}));
|
|
279
294
|
return _loadMoreWhereNeeded.apply(this, arguments);
|
|
280
295
|
};
|
|
281
|
-
loadMoreWhereNeeded = function _loadMoreWhereNeeded2(
|
|
296
|
+
loadMoreWhereNeeded = function _loadMoreWhereNeeded2(_x20, _x21) {
|
|
282
297
|
return _loadMoreWhereNeeded.apply(this, arguments);
|
|
283
298
|
};
|
|
284
299
|
_appendCurrentMessages = function _appendCurrentMessage2() {
|
|
285
|
-
_appendCurrentMessages = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function
|
|
300
|
+
_appendCurrentMessages = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee13() {
|
|
286
301
|
var now, chatDocument, messageTable;
|
|
287
|
-
return _regenerator["default"].wrap(function
|
|
288
|
-
while (1) switch (
|
|
302
|
+
return _regenerator["default"].wrap(function _callee13$(_context13) {
|
|
303
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
289
304
|
case 0:
|
|
290
305
|
now = new Date();
|
|
291
306
|
chatDocument = dateFolder.leafDocumentFromDate(now); /// ///////////////////////////////////////////////////////////
|
|
292
|
-
|
|
307
|
+
_context13.next = 4;
|
|
293
308
|
return createMessageTable(now, true);
|
|
294
309
|
case 4:
|
|
295
|
-
messageTable =
|
|
310
|
+
messageTable = _context13.sent;
|
|
296
311
|
div.appendChild(messageTable);
|
|
297
|
-
div.refresh = /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function
|
|
298
|
-
return _regenerator["default"].wrap(function
|
|
299
|
-
while (1) switch (
|
|
312
|
+
div.refresh = /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee12() {
|
|
313
|
+
return _regenerator["default"].wrap(function _callee12$(_context12) {
|
|
314
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
300
315
|
case 0:
|
|
301
|
-
|
|
316
|
+
_context12.next = 2;
|
|
302
317
|
return addNewChatDocumentIfNewDay(new Date());
|
|
303
318
|
case 2:
|
|
304
|
-
|
|
305
|
-
|
|
319
|
+
_context12.next = 4;
|
|
320
|
+
return syncMessages(chatChannel, messageTable);
|
|
306
321
|
case 4:
|
|
322
|
+
// @@ livemessagetable??
|
|
323
|
+
desktopNotification(chatChannel);
|
|
324
|
+
case 5:
|
|
307
325
|
case "end":
|
|
308
|
-
return
|
|
326
|
+
return _context12.stop();
|
|
309
327
|
}
|
|
310
|
-
},
|
|
328
|
+
}, _callee12);
|
|
311
329
|
})); // The short chat version the live update listening is done in the pane but we do it in the widget @@
|
|
312
330
|
_solidLogic.store.updater.addDownstreamChangeListener(chatDocument, div.refresh); // Live update
|
|
313
331
|
liveMessageTable = messageTable;
|
|
314
332
|
latest.messageTable = liveMessageTable;
|
|
315
|
-
return
|
|
333
|
+
return _context13.abrupt("return", messageTable);
|
|
316
334
|
case 11:
|
|
317
335
|
case "end":
|
|
318
|
-
return
|
|
336
|
+
return _context13.stop();
|
|
319
337
|
}
|
|
320
|
-
},
|
|
338
|
+
}, _callee13);
|
|
321
339
|
}));
|
|
322
340
|
return _appendCurrentMessages.apply(this, arguments);
|
|
323
341
|
};
|
|
@@ -325,15 +343,15 @@ function _infiniteMessageArea() {
|
|
|
325
343
|
return _appendCurrentMessages.apply(this, arguments);
|
|
326
344
|
};
|
|
327
345
|
_addNewChatDocumentIfNewDay = function _addNewChatDocumentIf2() {
|
|
328
|
-
_addNewChatDocumentIfNewDay = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function
|
|
346
|
+
_addNewChatDocumentIfNewDay = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee11() {
|
|
329
347
|
var newChatDocument, oldChatDocument, sts;
|
|
330
|
-
return _regenerator["default"].wrap(function
|
|
331
|
-
while (1) switch (
|
|
348
|
+
return _regenerator["default"].wrap(function _callee11$(_context11) {
|
|
349
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
332
350
|
case 0:
|
|
333
351
|
// @@ Remove listener from previous table as it is now static
|
|
334
352
|
newChatDocument = dateFolder.leafDocumentFromDate(new Date());
|
|
335
353
|
if (newChatDocument.sameTerm(latest.messageTable.chatDocument)) {
|
|
336
|
-
|
|
354
|
+
_context11.next = 7;
|
|
337
355
|
break;
|
|
338
356
|
}
|
|
339
357
|
// It is a new day
|
|
@@ -342,7 +360,7 @@ function _infiniteMessageArea() {
|
|
|
342
360
|
delete liveMessageTable.inputRow;
|
|
343
361
|
}
|
|
344
362
|
oldChatDocument = latest.messageTable.chatDocument;
|
|
345
|
-
|
|
363
|
+
_context11.next = 6;
|
|
346
364
|
return appendCurrentMessages();
|
|
347
365
|
case 6:
|
|
348
366
|
// Adding a link in the document will ping listeners to add the new block too
|
|
@@ -356,286 +374,350 @@ function _infiniteMessageArea() {
|
|
|
356
374
|
}
|
|
357
375
|
case 7:
|
|
358
376
|
case "end":
|
|
359
|
-
return
|
|
377
|
+
return _context11.stop();
|
|
360
378
|
}
|
|
361
|
-
},
|
|
379
|
+
}, _callee11);
|
|
362
380
|
}));
|
|
363
381
|
return _addNewChatDocumentIfNewDay.apply(this, arguments);
|
|
364
382
|
};
|
|
365
383
|
addNewChatDocumentIfNewDay = function _addNewChatDocumentIf() {
|
|
366
384
|
return _addNewChatDocumentIfNewDay.apply(this, arguments);
|
|
367
385
|
};
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
function getScrollbackIcon(sense) {
|
|
413
|
-
return sense ? 'noun_1369241.svg' : 'noun_1369237.svg';
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
function scrollBackbuttonHandler(_x8) {
|
|
417
|
-
return _scrollBackbuttonHandler.apply(this, arguments);
|
|
418
|
-
} /// ////////////// Scroll up adding more below
|
|
419
|
-
function _scrollBackbuttonHandler() {
|
|
420
|
-
_scrollBackbuttonHandler = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(_event) {
|
|
421
|
-
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
422
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
423
|
-
case 0:
|
|
424
|
-
if (!messageTable.extendedBack) {
|
|
425
|
-
_context2.next = 6;
|
|
426
|
-
break;
|
|
386
|
+
_renderMessageTable = function _renderMessageTable3() {
|
|
387
|
+
_renderMessageTable = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee10(date, live) {
|
|
388
|
+
var scrollBackbutton, scrollForwardButton, extendBackwards, _extendBackwards, setScrollBackbuttonIcon, scrollBackbuttonHandler, _scrollBackbuttonHandler, extendForwards, _extendForwards, setScrollForwardButtonIcon, scrollForwardButtonHandler, _scrollForwardButtonHandler, messageTable, chatDocument, tr, test, titleTR, scrollBackbuttonCell, dateCell, scrollForwardButtonCell, sts, _iterator2, _step2, st;
|
|
389
|
+
return _regenerator["default"].wrap(function _callee10$(_context10) {
|
|
390
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
391
|
+
case 0:
|
|
392
|
+
_scrollForwardButtonHandler = function _scrollForwardButtonH2() {
|
|
393
|
+
_scrollForwardButtonHandler = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9(_event) {
|
|
394
|
+
return _regenerator["default"].wrap(function _callee9$(_context9) {
|
|
395
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
396
|
+
case 0:
|
|
397
|
+
if (!messageTable.extendedForwards) {
|
|
398
|
+
_context9.next = 6;
|
|
399
|
+
break;
|
|
400
|
+
}
|
|
401
|
+
removePreviousMessages(false, messageTable);
|
|
402
|
+
messageTable.extendedForwards = false;
|
|
403
|
+
setScrollForwardButtonIcon();
|
|
404
|
+
_context9.next = 9;
|
|
405
|
+
break;
|
|
406
|
+
case 6:
|
|
407
|
+
_context9.next = 8;
|
|
408
|
+
return extendForwards();
|
|
409
|
+
case 8:
|
|
410
|
+
// async
|
|
411
|
+
latest.messageTable.scrollIntoView(newestFirst);
|
|
412
|
+
case 9:
|
|
413
|
+
case "end":
|
|
414
|
+
return _context9.stop();
|
|
415
|
+
}
|
|
416
|
+
}, _callee9);
|
|
417
|
+
}));
|
|
418
|
+
return _scrollForwardButtonHandler.apply(this, arguments);
|
|
419
|
+
};
|
|
420
|
+
scrollForwardButtonHandler = function _scrollForwardButtonH(_x23) {
|
|
421
|
+
return _scrollForwardButtonHandler.apply(this, arguments);
|
|
422
|
+
};
|
|
423
|
+
setScrollForwardButtonIcon = function _setScrollForwardButt() {
|
|
424
|
+
if (!scrollForwardButton) return;
|
|
425
|
+
var sense = messageTable.extendedForwards ? !newestFirst : newestFirst; // noun_T-Block_1114657_000000.svg
|
|
426
|
+
var scrollForwardIcon = messageTable["final"] ? 'noun_T-Block_1114657_000000.svg' : getScrollForwardButtonIcon(sense);
|
|
427
|
+
scrollForwardButton.firstChild.setAttribute('src', _iconBase.icons.iconBase + scrollForwardIcon);
|
|
428
|
+
function getScrollForwardButtonIcon(sense) {
|
|
429
|
+
return !sense ? 'noun_1369241.svg' : 'noun_1369237.svg';
|
|
427
430
|
}
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
431
|
+
};
|
|
432
|
+
_extendForwards = function _extendForwards3() {
|
|
433
|
+
_extendForwards = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8() {
|
|
434
|
+
var done;
|
|
435
|
+
return _regenerator["default"].wrap(function _callee8$(_context8) {
|
|
436
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
437
|
+
case 0:
|
|
438
|
+
_context8.next = 2;
|
|
439
|
+
return insertPreviousMessages(false);
|
|
440
|
+
case 2:
|
|
441
|
+
done = _context8.sent;
|
|
442
|
+
return _context8.abrupt("return", done);
|
|
443
|
+
case 4:
|
|
444
|
+
case "end":
|
|
445
|
+
return _context8.stop();
|
|
446
|
+
}
|
|
447
|
+
}, _callee8);
|
|
448
|
+
}));
|
|
449
|
+
return _extendForwards.apply(this, arguments);
|
|
450
|
+
};
|
|
451
|
+
extendForwards = function _extendForwards2() {
|
|
452
|
+
return _extendForwards.apply(this, arguments);
|
|
453
|
+
};
|
|
454
|
+
_scrollBackbuttonHandler = function _scrollBackbuttonHand2() {
|
|
455
|
+
_scrollBackbuttonHandler = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7(_event) {
|
|
456
|
+
return _regenerator["default"].wrap(function _callee7$(_context7) {
|
|
457
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
458
|
+
case 0:
|
|
459
|
+
if (!messageTable.extendedBack) {
|
|
460
|
+
_context7.next = 6;
|
|
461
|
+
break;
|
|
462
|
+
}
|
|
463
|
+
removePreviousMessages(true, messageTable);
|
|
464
|
+
messageTable.extendedBack = false;
|
|
465
|
+
setScrollBackbuttonIcon();
|
|
466
|
+
_context7.next = 8;
|
|
467
|
+
break;
|
|
468
|
+
case 6:
|
|
469
|
+
_context7.next = 8;
|
|
470
|
+
return extendBackwards();
|
|
471
|
+
case 8:
|
|
472
|
+
case "end":
|
|
473
|
+
return _context7.stop();
|
|
474
|
+
}
|
|
475
|
+
}, _callee7);
|
|
476
|
+
}));
|
|
477
|
+
return _scrollBackbuttonHandler.apply(this, arguments);
|
|
478
|
+
};
|
|
479
|
+
scrollBackbuttonHandler = function _scrollBackbuttonHand(_x22) {
|
|
480
|
+
return _scrollBackbuttonHandler.apply(this, arguments);
|
|
481
|
+
};
|
|
482
|
+
setScrollBackbuttonIcon = function _setScrollBackbuttonI() {
|
|
483
|
+
if (!scrollBackbutton) {
|
|
484
|
+
return;
|
|
463
485
|
}
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
}
|
|
470
|
-
}, _callee3);
|
|
471
|
-
}));
|
|
472
|
-
return _extendForwards.apply(this, arguments);
|
|
473
|
-
}
|
|
474
|
-
function setScrollForwardButtonIcon() {
|
|
475
|
-
var sense = messageTable.extendedForwards ? !newestFirst : newestFirst; // noun_T-Block_1114657_000000.svg
|
|
476
|
-
var scrollForwardIcon = messageTable["final"] ? 'noun_T-Block_1114657_000000.svg' : getScrollForwardButtonIcon(sense);
|
|
477
|
-
scrollForwardButton.firstChild.setAttribute('src', _iconBase.icons.iconBase + scrollForwardIcon);
|
|
478
|
-
function getScrollForwardButtonIcon(sense) {
|
|
479
|
-
return !sense ? 'noun_1369241.svg' : 'noun_1369237.svg';
|
|
480
|
-
}
|
|
481
|
-
}
|
|
482
|
-
function scrollForwardButtonHandler(_x9) {
|
|
483
|
-
return _scrollForwardButtonHandler.apply(this, arguments);
|
|
484
|
-
} /// ///////////////////////
|
|
485
|
-
/*
|
|
486
|
-
options = options || {}
|
|
487
|
-
options.authorDateOnLeft = true
|
|
488
|
-
const newestFirst = options.newestFirst === '1' || options.newestFirst === true // hack for now
|
|
489
|
-
const channelObject = new ChatChannel(chatChannel, options)
|
|
490
|
-
const dateFolder = channelObject.dateFolder
|
|
491
|
-
const div = dom.createElement('div')
|
|
492
|
-
const statusArea = div.appendChild(dom.createElement('div'))
|
|
493
|
-
const userContext = { dom, statusArea, div: statusArea } // logged on state, pointers to user's stuff
|
|
494
|
-
*/
|
|
495
|
-
function _scrollForwardButtonHandler() {
|
|
496
|
-
_scrollForwardButtonHandler = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(_event) {
|
|
497
|
-
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
498
|
-
while (1) switch (_context4.prev = _context4.next) {
|
|
499
|
-
case 0:
|
|
500
|
-
if (!messageTable.extendedForwards) {
|
|
501
|
-
_context4.next = 6;
|
|
502
|
-
break;
|
|
486
|
+
var sense = messageTable.extendedBack ? !newestFirst : newestFirst;
|
|
487
|
+
var scrollBackIcon = messageTable.initial ? 'noun_T-Block_1114655_000000.svg' : getScrollbackIcon(sense);
|
|
488
|
+
scrollBackbutton.firstChild.setAttribute('src', _iconBase.icons.iconBase + scrollBackIcon);
|
|
489
|
+
function getScrollbackIcon(sense) {
|
|
490
|
+
return sense ? 'noun_1369241.svg' : 'noun_1369237.svg';
|
|
503
491
|
}
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
492
|
+
};
|
|
493
|
+
_extendBackwards = function _extendBackwards3() {
|
|
494
|
+
_extendBackwards = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6() {
|
|
495
|
+
var done;
|
|
496
|
+
return _regenerator["default"].wrap(function _callee6$(_context6) {
|
|
497
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
498
|
+
case 0:
|
|
499
|
+
_context6.next = 2;
|
|
500
|
+
return insertPreviousMessages(true);
|
|
501
|
+
case 2:
|
|
502
|
+
done = _context6.sent;
|
|
503
|
+
if (done) {
|
|
504
|
+
if (scrollBackbutton) {
|
|
505
|
+
scrollBackbutton.firstChild.setAttribute('src', _iconBase.icons.iconBase + 'noun_T-Block_1114655_000000.svg'); // T
|
|
506
|
+
scrollBackbutton.disabled = true;
|
|
507
|
+
}
|
|
508
|
+
messageTable.initial = true;
|
|
509
|
+
} else {
|
|
510
|
+
messageTable.extendedBack = true;
|
|
511
|
+
}
|
|
512
|
+
setScrollBackbuttonIcon();
|
|
513
|
+
return _context6.abrupt("return", done);
|
|
514
|
+
case 6:
|
|
515
|
+
case "end":
|
|
516
|
+
return _context6.stop();
|
|
517
|
+
}
|
|
518
|
+
}, _callee6);
|
|
519
|
+
}));
|
|
520
|
+
return _extendBackwards.apply(this, arguments);
|
|
521
|
+
};
|
|
522
|
+
extendBackwards = function _extendBackwards2() {
|
|
523
|
+
return _extendBackwards.apply(this, arguments);
|
|
524
|
+
};
|
|
525
|
+
scrollBackbutton = null; // was let
|
|
526
|
+
scrollForwardButton = null; // was let
|
|
527
|
+
/// ///////////////// Scroll down adding more above
|
|
528
|
+
/// ///////////////////////
|
|
529
|
+
/*
|
|
530
|
+
options = options || {}
|
|
531
|
+
options.authorDateOnLeft = true
|
|
532
|
+
const newestFirst = options.newestFirst === '1' || options.newestFirst === true // hack for now
|
|
533
|
+
const channelObject = new ChatChannel(chatChannel, options)
|
|
534
|
+
const dateFolder = channelObject.dateFolder
|
|
535
|
+
const div = dom.createElement('div')
|
|
536
|
+
const statusArea = div.appendChild(dom.createElement('div'))
|
|
537
|
+
const userContext = { dom, statusArea, div: statusArea } // logged on state, pointers to user's stuff
|
|
538
|
+
*/
|
|
539
|
+
debug.log('Options for called message Area', options);
|
|
540
|
+
messageTable = dom.createElement('table');
|
|
541
|
+
messageTable.style.width = '100%'; // fill the pane div
|
|
542
|
+
messageTable.extendBackwards = extendBackwards; // Make function available to scroll stuff
|
|
543
|
+
messageTable.extendForwards = extendForwards; // Make function available to scroll stuff
|
|
542
544
|
|
|
543
|
-
|
|
544
|
-
|
|
545
|
+
messageTable.date = date;
|
|
546
|
+
chatDocument = dateFolder.leafDocumentFromDate(date);
|
|
547
|
+
messageTable.chatDocument = chatDocument;
|
|
548
|
+
messageTable.fresh = false;
|
|
549
|
+
messageTable.setAttribute('style', 'width: 100%;'); // fill that div!
|
|
550
|
+
if (live) {
|
|
551
|
+
messageTable["final"] = true;
|
|
552
|
+
liveMessageTable = messageTable;
|
|
553
|
+
latest.messageTable = messageTable;
|
|
554
|
+
tr = (0, _message.renderMessageEditor)(channelObject, messageTable, userContext, options);
|
|
555
|
+
if (newestFirst) {
|
|
556
|
+
messageTable.insertBefore(tr, messageTable.firstChild); // If newestFirst
|
|
557
|
+
} else {
|
|
558
|
+
messageTable.appendChild(tr); // not newestFirst
|
|
559
|
+
}
|
|
545
560
|
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
// @@ listen for swipe past end event not just button
|
|
549
|
-
if (options.infinite) {
|
|
550
|
-
var scrollBackbuttonTR = dom.createElement('tr');
|
|
551
|
-
var scrollBackbuttonCell = scrollBackbuttonTR.appendChild(dom.createElement('td'));
|
|
552
|
-
// up traingles: noun_1369237.svg
|
|
553
|
-
// down triangles: noun_1369241.svg
|
|
554
|
-
var scrollBackIcon = newestFirst ? 'noun_1369241.svg' : 'noun_1369237.svg'; // down and up arrows respoctively
|
|
555
|
-
scrollBackbutton = widgets.button(dom, _iconBase.icons.iconBase + scrollBackIcon, 'Previous messages ...');
|
|
556
|
-
scrollBackbuttonCell.style = 'width:3em; height:3em;';
|
|
557
|
-
scrollBackbutton.addEventListener('click', scrollBackbuttonHandler, false);
|
|
558
|
-
messageTable.extendedBack = false;
|
|
559
|
-
scrollBackbuttonCell.appendChild(scrollBackbutton);
|
|
560
|
-
setScrollBackbuttonIcon();
|
|
561
|
-
var dateCell = scrollBackbuttonTR.appendChild(dom.createElement('td'));
|
|
562
|
-
dateCell.style = 'text-align: center; vertical-align: middle; color: #888; font-style: italic;';
|
|
563
|
-
dateCell.textContent = widgets.shortDate(date.toISOString(), true); // no time, only date
|
|
561
|
+
messageTable.inputRow = tr;
|
|
562
|
+
}
|
|
564
563
|
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
564
|
+
/// ///// Infinite scroll
|
|
565
|
+
//
|
|
566
|
+
// @@ listen for swipe past end event not just button
|
|
567
|
+
test = true;
|
|
568
|
+
if (test) {
|
|
569
|
+
// ws options.infinite but need for non-infinite
|
|
570
|
+
titleTR = dom.createElement('tr');
|
|
571
|
+
scrollBackbuttonCell = titleTR.appendChild(dom.createElement('td')); // up traingles: noun_1369237.svg
|
|
572
|
+
// down triangles: noun_1369241.svg
|
|
573
|
+
/*
|
|
574
|
+
const scrollBackIcon = newestFirst
|
|
575
|
+
? 'noun_1369241.svg'
|
|
576
|
+
: 'noun_1369237.svg' // down and up arrows respoctively
|
|
577
|
+
scrollBackbutton = widgets.button(
|
|
578
|
+
dom,
|
|
579
|
+
icons.iconBase + scrollBackIcon,
|
|
580
|
+
'Previous messages ...'
|
|
581
|
+
)
|
|
582
|
+
scrollBackbuttonCell.style = 'width:3em; height:3em;'
|
|
583
|
+
scrollBackbutton.addEventListener('click', scrollBackbuttonHandler, false)
|
|
584
|
+
messageTable.extendedBack = false
|
|
585
|
+
scrollBackbuttonCell.appendChild(scrollBackbutton)
|
|
586
|
+
setScrollBackbuttonIcon()
|
|
587
|
+
*/
|
|
588
|
+
dateCell = titleTR.appendChild(dom.createElement('td'));
|
|
589
|
+
dateCell.style = 'text-align: center; vertical-align: middle; color: #888; font-style: italic;';
|
|
590
|
+
dateCell.textContent = widgets.shortDate(date.toISOString(), true); // no time, only date
|
|
582
591
|
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
592
|
+
// @@@@@@@@@@@ todo move this button to other end of message cell, o
|
|
593
|
+
scrollForwardButtonCell = titleTR.appendChild(dom.createElement('td'));
|
|
594
|
+
if (options.includeRemoveButton) {
|
|
595
|
+
scrollForwardButtonCell.appendChild(widgets.cancelButton(dom, function (_e) {
|
|
596
|
+
div.parentNode.removeChild(div);
|
|
597
|
+
}));
|
|
598
|
+
}
|
|
599
|
+
/*
|
|
600
|
+
const scrollForwardIcon = newestFirst
|
|
601
|
+
? 'noun_1369241.svg'
|
|
602
|
+
: 'noun_1369237.svg' // down and up arrows respoctively
|
|
603
|
+
scrollForwardButton = widgets.button(
|
|
604
|
+
dom,
|
|
605
|
+
icons.iconBase + scrollForwardIcon,
|
|
606
|
+
'Later messages ...'
|
|
607
|
+
)
|
|
608
|
+
scrollForwardButtonCell.appendChild(scrollForwardButton)
|
|
609
|
+
scrollForwardButtonCell.style = 'width:3em; height:3em;'
|
|
610
|
+
scrollForwardButton.addEventListener(
|
|
611
|
+
'click',
|
|
612
|
+
scrollForwardButtonHandler,
|
|
613
|
+
false
|
|
614
|
+
)
|
|
615
|
+
messageTable.extendedForward = false
|
|
616
|
+
setScrollForwardButtonIcon()
|
|
617
|
+
*/
|
|
618
|
+
messageTable.extendedForwards = false;
|
|
619
|
+
if (!newestFirst) {
|
|
620
|
+
// opposite end from the entry field
|
|
621
|
+
messageTable.insertBefore(titleTR, messageTable.firstChild); // If not newestFirst
|
|
622
|
+
} else {
|
|
623
|
+
messageTable.appendChild(titleTR); // newestFirst
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
sts = _solidLogic.store.statementsMatching(null, ns.wf('message'), null, chatDocument);
|
|
627
|
+
if (!live && sts.length === 0) {
|
|
628
|
+
// not todays
|
|
629
|
+
// no need buttomns at the moment
|
|
630
|
+
// messageTable.style.visibility = 'collapse' // Hide files with no messages
|
|
631
|
+
}
|
|
632
|
+
_iterator2 = _createForOfIteratorHelper(sts);
|
|
633
|
+
_context10.prev = 28;
|
|
634
|
+
_iterator2.s();
|
|
635
|
+
case 30:
|
|
636
|
+
if ((_step2 = _iterator2.n()).done) {
|
|
637
|
+
_context10.next = 36;
|
|
638
|
+
break;
|
|
639
|
+
}
|
|
640
|
+
st = _step2.value;
|
|
641
|
+
_context10.next = 34;
|
|
642
|
+
return addMessage(st.object, messageTable);
|
|
643
|
+
case 34:
|
|
644
|
+
_context10.next = 30;
|
|
645
|
+
break;
|
|
646
|
+
case 36:
|
|
647
|
+
_context10.next = 41;
|
|
648
|
+
break;
|
|
649
|
+
case 38:
|
|
650
|
+
_context10.prev = 38;
|
|
651
|
+
_context10.t0 = _context10["catch"](28);
|
|
652
|
+
_iterator2.e(_context10.t0);
|
|
653
|
+
case 41:
|
|
654
|
+
_context10.prev = 41;
|
|
655
|
+
_iterator2.f();
|
|
656
|
+
return _context10.finish(41);
|
|
657
|
+
case 44:
|
|
658
|
+
messageTable.fresh = true;
|
|
593
659
|
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
660
|
+
// loadMessageTable(messageTable, chatDocument)
|
|
661
|
+
messageTable.fresh = false;
|
|
662
|
+
return _context10.abrupt("return", messageTable);
|
|
663
|
+
case 47:
|
|
664
|
+
case "end":
|
|
665
|
+
return _context10.stop();
|
|
666
|
+
}
|
|
667
|
+
}, _callee10, null, [[28, 38, 41, 44]]);
|
|
668
|
+
}));
|
|
669
|
+
return _renderMessageTable.apply(this, arguments);
|
|
670
|
+
};
|
|
671
|
+
renderMessageTable = function _renderMessageTable2(_x18, _x19) {
|
|
672
|
+
return _renderMessageTable.apply(this, arguments);
|
|
597
673
|
};
|
|
598
674
|
_createMessageTable = function _createMessageTable3() {
|
|
599
|
-
_createMessageTable = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function
|
|
675
|
+
_createMessageTable = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(date, live) {
|
|
600
676
|
var chatDocument, messageTable, statusTR;
|
|
601
|
-
return _regenerator["default"].wrap(function
|
|
602
|
-
while (1) switch (
|
|
677
|
+
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
|
678
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
603
679
|
case 0:
|
|
604
680
|
debug.log(' createMessageTable for ' + date);
|
|
605
681
|
chatDocument = dateFolder.leafDocumentFromDate(date);
|
|
606
|
-
|
|
607
|
-
|
|
682
|
+
_context5.prev = 2;
|
|
683
|
+
_context5.next = 5;
|
|
608
684
|
return _solidLogic.store.fetcher.load(chatDocument);
|
|
609
685
|
case 5:
|
|
610
|
-
|
|
686
|
+
_context5.next = 21;
|
|
611
687
|
break;
|
|
612
688
|
case 7:
|
|
613
|
-
|
|
614
|
-
|
|
689
|
+
_context5.prev = 7;
|
|
690
|
+
_context5.t0 = _context5["catch"](2);
|
|
615
691
|
messageTable = dom.createElement('table');
|
|
616
692
|
statusTR = messageTable.appendChild(dom.createElement('tr')); // ### find status in exception
|
|
617
|
-
if (!(
|
|
618
|
-
|
|
693
|
+
if (!(_context5.t0.response && _context5.t0.response.status && _context5.t0.response.status === 404)) {
|
|
694
|
+
_context5.next = 18;
|
|
619
695
|
break;
|
|
620
696
|
}
|
|
621
697
|
debug.log('Error 404 for chat file ' + chatDocument);
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
698
|
+
_context5.next = 15;
|
|
699
|
+
return renderMessageTable(date, live);
|
|
700
|
+
case 15:
|
|
701
|
+
return _context5.abrupt("return", _context5.sent);
|
|
626
702
|
case 18:
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
return _context6.abrupt("return", renderMessageTable(date, live));
|
|
703
|
+
debug.log('*** Error NON 404 for chat file ' + chatDocument);
|
|
704
|
+
statusTR.appendChild(widgets.errorMessageBlock(dom, _context5.t0, 'pink'));
|
|
630
705
|
case 20:
|
|
706
|
+
return _context5.abrupt("return", statusTR);
|
|
707
|
+
case 21:
|
|
708
|
+
_context5.next = 23;
|
|
709
|
+
return renderMessageTable(date, live);
|
|
710
|
+
case 23:
|
|
711
|
+
return _context5.abrupt("return", _context5.sent);
|
|
712
|
+
case 24:
|
|
631
713
|
case "end":
|
|
632
|
-
return
|
|
714
|
+
return _context5.stop();
|
|
633
715
|
}
|
|
634
|
-
},
|
|
716
|
+
}, _callee5, null, [[2, 7]]);
|
|
635
717
|
}));
|
|
636
718
|
return _createMessageTable.apply(this, arguments);
|
|
637
719
|
};
|
|
638
|
-
createMessageTable = function _createMessageTable2(
|
|
720
|
+
createMessageTable = function _createMessageTable2(_x16, _x17) {
|
|
639
721
|
return _createMessageTable.apply(this, arguments);
|
|
640
722
|
};
|
|
641
723
|
removePreviousMessages = function _removePreviousMessag(backwards, messageTable) {
|
|
@@ -654,31 +736,31 @@ function _infiniteMessageArea() {
|
|
|
654
736
|
extr.messageTable = messageTable;
|
|
655
737
|
};
|
|
656
738
|
_insertPreviousMessages = function _insertPreviousMessag2() {
|
|
657
|
-
_insertPreviousMessages = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function
|
|
739
|
+
_insertPreviousMessages = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(backwards) {
|
|
658
740
|
var extremity, date, live, todayDoc, doc, newMessageTable;
|
|
659
|
-
return _regenerator["default"].wrap(function
|
|
660
|
-
while (1) switch (
|
|
741
|
+
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
742
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
661
743
|
case 0:
|
|
662
744
|
extremity = backwards ? earliest : latest;
|
|
663
745
|
date = extremity.messageTable.date; // day in mssecs
|
|
664
|
-
|
|
746
|
+
_context4.next = 4;
|
|
665
747
|
return dateFolder.loadPrevious(date, backwards);
|
|
666
748
|
case 4:
|
|
667
|
-
date =
|
|
749
|
+
date = _context4.sent;
|
|
668
750
|
// backwards
|
|
669
751
|
debug.log("insertPreviousMessages: from ".concat(backwards ? 'backwards' : 'forwards', " loadPrevious: ").concat(date));
|
|
670
752
|
if (!(!date && !backwards && !liveMessageTable)) {
|
|
671
|
-
|
|
753
|
+
_context4.next = 9;
|
|
672
754
|
break;
|
|
673
755
|
}
|
|
674
|
-
|
|
756
|
+
_context4.next = 9;
|
|
675
757
|
return appendCurrentMessages();
|
|
676
758
|
case 9:
|
|
677
759
|
if (date) {
|
|
678
|
-
|
|
760
|
+
_context4.next = 11;
|
|
679
761
|
break;
|
|
680
762
|
}
|
|
681
|
-
return
|
|
763
|
+
return _context4.abrupt("return", true);
|
|
682
764
|
case 11:
|
|
683
765
|
// done
|
|
684
766
|
live = false;
|
|
@@ -687,10 +769,10 @@ function _infiniteMessageArea() {
|
|
|
687
769
|
doc = dateFolder.leafDocumentFromDate(date);
|
|
688
770
|
live = doc.sameTerm(todayDoc); // Is this todays?
|
|
689
771
|
}
|
|
690
|
-
|
|
772
|
+
_context4.next = 15;
|
|
691
773
|
return createMessageTable(date, live);
|
|
692
774
|
case 15:
|
|
693
|
-
newMessageTable =
|
|
775
|
+
newMessageTable = _context4.sent;
|
|
694
776
|
extremity.messageTable = newMessageTable; // move pointer to earliest
|
|
695
777
|
if (backwards ? newestFirst : !newestFirst) {
|
|
696
778
|
// put on bottom or top
|
|
@@ -699,62 +781,158 @@ function _infiniteMessageArea() {
|
|
|
699
781
|
// put on top as we scroll back
|
|
700
782
|
div.insertBefore(newMessageTable, div.firstChild);
|
|
701
783
|
}
|
|
702
|
-
return
|
|
784
|
+
return _context4.abrupt("return", live);
|
|
703
785
|
case 19:
|
|
704
786
|
case "end":
|
|
705
|
-
return
|
|
787
|
+
return _context4.stop();
|
|
706
788
|
}
|
|
707
|
-
},
|
|
789
|
+
}, _callee4);
|
|
708
790
|
}));
|
|
709
791
|
return _insertPreviousMessages.apply(this, arguments);
|
|
710
792
|
};
|
|
711
|
-
insertPreviousMessages = function _insertPreviousMessag(
|
|
793
|
+
insertPreviousMessages = function _insertPreviousMessag(_x15) {
|
|
712
794
|
return _insertPreviousMessages.apply(this, arguments);
|
|
713
795
|
};
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
796
|
+
_addMessage = function _addMessage3() {
|
|
797
|
+
_addMessage = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(message, messageTable) {
|
|
798
|
+
var latest, thread, id;
|
|
799
|
+
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
800
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
801
|
+
case 0:
|
|
802
|
+
_context3.next = 2;
|
|
803
|
+
return (0, _chatLogic.mostRecentVersion)(message);
|
|
804
|
+
case 2:
|
|
805
|
+
latest = _context3.sent;
|
|
806
|
+
if (!((0, _chatLogic.isDeleted)(latest) && !options.showDeletedMessages)) {
|
|
807
|
+
_context3.next = 5;
|
|
808
|
+
break;
|
|
809
|
+
}
|
|
810
|
+
return _context3.abrupt("return");
|
|
811
|
+
case 5:
|
|
812
|
+
thread = _solidLogic.store.any(null, ns.sioc('has_member'), message, message.doc());
|
|
813
|
+
id = _solidLogic.store.any(message, ns.sioc('id'), null, message.doc());
|
|
814
|
+
if (id && !thread) {
|
|
815
|
+
thread = _solidLogic.store.any(null, ns.sioc('has_member'), id, message.doc());
|
|
816
|
+
}
|
|
817
|
+
if (!options.thread) {
|
|
818
|
+
_context3.next = 21;
|
|
819
|
+
break;
|
|
820
|
+
}
|
|
821
|
+
if (!_solidLogic.store.holds(message, ns.sioc('has_reply'), options.thread)) {
|
|
822
|
+
_context3.next = 13;
|
|
823
|
+
break;
|
|
824
|
+
}
|
|
825
|
+
// root of thread
|
|
826
|
+
debug.log(' addMessage: displaying root of thread ' + thread);
|
|
827
|
+
_context3.next = 19;
|
|
828
|
+
break;
|
|
829
|
+
case 13:
|
|
830
|
+
if (!(thread && thread.sameTerm(options.thread))) {
|
|
831
|
+
_context3.next = 17;
|
|
832
|
+
break;
|
|
833
|
+
}
|
|
834
|
+
debug.log(' addMessage: Displaying body of thread ' + message.uri.slice(-10));
|
|
835
|
+
_context3.next = 19;
|
|
836
|
+
break;
|
|
837
|
+
case 17:
|
|
838
|
+
debug.log(' addMessage: Suppress non-thread message in thread table ' + message.uri.slice(-10));
|
|
839
|
+
return _context3.abrupt("return");
|
|
840
|
+
case 19:
|
|
841
|
+
_context3.next = 27;
|
|
842
|
+
break;
|
|
843
|
+
case 21:
|
|
844
|
+
if (!thread) {
|
|
845
|
+
_context3.next = 26;
|
|
846
|
+
break;
|
|
847
|
+
}
|
|
848
|
+
debug.log(' addMessage: Suppress thread message in non-thread table ' + message.uri.slice(-10));
|
|
849
|
+
return _context3.abrupt("return");
|
|
850
|
+
case 26:
|
|
851
|
+
debug.log(' addMessage: Normal non-thread message in non-thread table ' + message.uri.slice(-10));
|
|
852
|
+
case 27:
|
|
853
|
+
_context3.next = 29;
|
|
854
|
+
return insertMessageIntoTable(channelObject, messageTable, message, messageTable.fresh, options, userContext);
|
|
855
|
+
case 29:
|
|
856
|
+
case "end":
|
|
857
|
+
return _context3.stop();
|
|
858
|
+
}
|
|
859
|
+
}, _callee3);
|
|
860
|
+
}));
|
|
861
|
+
return _addMessage.apply(this, arguments);
|
|
722
862
|
};
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
863
|
+
addMessage = function _addMessage2(_x13, _x14) {
|
|
864
|
+
return _addMessage.apply(this, arguments);
|
|
865
|
+
};
|
|
866
|
+
_syncMessages = function _syncMessages3() {
|
|
867
|
+
_syncMessages = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(chatChannel, messageTable) {
|
|
868
|
+
var displayed, ele, ele2, messages, stored, _iterator, _step, m;
|
|
869
|
+
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
870
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
871
|
+
case 0:
|
|
872
|
+
displayed = {};
|
|
873
|
+
for (ele = messageTable.firstChild; ele; ele = ele.nextSibling) {
|
|
874
|
+
if (ele.AJAR_subject) {
|
|
875
|
+
displayed[ele.AJAR_subject.uri] = true;
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
messages = _solidLogic.store.each(chatChannel, ns.wf('message'), null, messageTable.chatDocument);
|
|
879
|
+
stored = {};
|
|
880
|
+
_iterator = _createForOfIteratorHelper(messages);
|
|
881
|
+
_context2.prev = 5;
|
|
882
|
+
_iterator.s();
|
|
883
|
+
case 7:
|
|
884
|
+
if ((_step = _iterator.n()).done) {
|
|
885
|
+
_context2.next = 15;
|
|
886
|
+
break;
|
|
887
|
+
}
|
|
888
|
+
m = _step.value;
|
|
889
|
+
stored[m.uri] = true;
|
|
890
|
+
if (displayed[m.uri]) {
|
|
891
|
+
_context2.next = 13;
|
|
892
|
+
break;
|
|
893
|
+
}
|
|
894
|
+
_context2.next = 13;
|
|
895
|
+
return addMessage(m, messageTable);
|
|
896
|
+
case 13:
|
|
897
|
+
_context2.next = 7;
|
|
898
|
+
break;
|
|
899
|
+
case 15:
|
|
900
|
+
_context2.next = 20;
|
|
901
|
+
break;
|
|
902
|
+
case 17:
|
|
903
|
+
_context2.prev = 17;
|
|
904
|
+
_context2.t0 = _context2["catch"](5);
|
|
905
|
+
_iterator.e(_context2.t0);
|
|
906
|
+
case 20:
|
|
907
|
+
_context2.prev = 20;
|
|
908
|
+
_iterator.f();
|
|
909
|
+
return _context2.finish(20);
|
|
910
|
+
case 23:
|
|
911
|
+
// eslint-disable-next-line space-in-parens
|
|
912
|
+
for (ele = messageTable.firstChild; ele;) {
|
|
913
|
+
ele2 = ele.nextSibling;
|
|
914
|
+
if (ele.AJAR_subject && !stored[ele.AJAR_subject.uri]) {
|
|
915
|
+
messageTable.removeChild(ele);
|
|
916
|
+
}
|
|
917
|
+
ele = ele2;
|
|
918
|
+
}
|
|
919
|
+
for (ele = messageTable.firstChild; ele; ele = ele.nextSibling) {
|
|
920
|
+
if (ele.AJAR_subject) {
|
|
921
|
+
// Refresh thumbs up etc
|
|
922
|
+
widgets.refreshTree(ele); // Things inside may have changed too
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
case 25:
|
|
926
|
+
case "end":
|
|
927
|
+
return _context2.stop();
|
|
928
|
+
}
|
|
929
|
+
}, _callee2, null, [[5, 17, 20, 23]]);
|
|
930
|
+
}));
|
|
931
|
+
return _syncMessages.apply(this, arguments);
|
|
932
|
+
};
|
|
933
|
+
syncMessages = function _syncMessages2(_x11, _x12) {
|
|
934
|
+
return _syncMessages.apply(this, arguments);
|
|
756
935
|
};
|
|
757
|
-
|
|
758
936
|
// Body of main function
|
|
759
937
|
|
|
760
938
|
options = options || {};
|
|
@@ -770,7 +948,6 @@ function _infiniteMessageArea() {
|
|
|
770
948
|
statusArea: statusArea,
|
|
771
949
|
div: statusArea
|
|
772
950
|
}; // logged on state, pointers to user's stuff
|
|
773
|
-
// const messageTable = dom.createElement('table') // @@ check does this go in renderMessageTable
|
|
774
951
|
earliest = {
|
|
775
952
|
messageTable: null
|
|
776
953
|
}; // Stuff about each end of the loaded days
|
|
@@ -778,15 +955,15 @@ function _infiniteMessageArea() {
|
|
|
778
955
|
messageTable: null
|
|
779
956
|
};
|
|
780
957
|
lock = false;
|
|
781
|
-
|
|
958
|
+
_context16.next = 33;
|
|
782
959
|
return loadInitialContent();
|
|
783
|
-
case
|
|
784
|
-
return
|
|
785
|
-
case
|
|
960
|
+
case 33:
|
|
961
|
+
return _context16.abrupt("return", div);
|
|
962
|
+
case 34:
|
|
786
963
|
case "end":
|
|
787
|
-
return
|
|
964
|
+
return _context16.stop();
|
|
788
965
|
}
|
|
789
|
-
},
|
|
966
|
+
}, _callee16);
|
|
790
967
|
}));
|
|
791
968
|
return _infiniteMessageArea.apply(this, arguments);
|
|
792
969
|
}
|