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