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/thread.js
CHANGED
|
@@ -53,7 +53,8 @@ function thread(dom, kb, subject, messageStore, options) {
|
|
|
53
53
|
|
|
54
54
|
var div = dom.createElement('div');
|
|
55
55
|
// eslint-disable-next-line prefer-const
|
|
56
|
-
var messageTable;
|
|
56
|
+
var messageTable; // Shared by initial build and addMessageFromBindings
|
|
57
|
+
|
|
57
58
|
var me;
|
|
58
59
|
var updater = _solidLogic.store.updater;
|
|
59
60
|
var anchor = function anchor(text, term) {
|
|
@@ -100,51 +101,34 @@ function thread(dom, kb, subject, messageStore, options) {
|
|
|
100
101
|
form.appendChild(rhs);
|
|
101
102
|
form.AJAR_date = '9999-01-01T00:00:00Z'; // ISO format for field sort
|
|
102
103
|
|
|
103
|
-
var sendMessage =
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
} else {
|
|
124
|
-
var bindings = {
|
|
125
|
-
'?msg': message,
|
|
126
|
-
'?content': _solidLogic.store.literal(field.value),
|
|
127
|
-
'?date': dateStamp,
|
|
128
|
-
'?creator': me
|
|
129
|
-
};
|
|
130
|
-
renderMessage(bindings, false); // not green
|
|
104
|
+
var sendMessage = function sendMessage() {
|
|
105
|
+
// titlefield.setAttribute('class','pendingedit')
|
|
106
|
+
// titlefield.disabled = true
|
|
107
|
+
field.setAttribute('class', 'pendingedit');
|
|
108
|
+
field.disabled = true;
|
|
109
|
+
var _appendMsg = appendMsg(field.value),
|
|
110
|
+
message = _appendMsg.message,
|
|
111
|
+
dateStamp = _appendMsg.dateStamp,
|
|
112
|
+
sts = _appendMsg.sts;
|
|
113
|
+
var sendComplete = function sendComplete(uri, success, body) {
|
|
114
|
+
if (!success) {
|
|
115
|
+
form.appendChild(UI.widgets.errorMessageBlock(dom, 'Error writing message: ' + body));
|
|
116
|
+
} else {
|
|
117
|
+
var bindings = {
|
|
118
|
+
'?msg': message,
|
|
119
|
+
'?content': _solidLogic.store.literal(field.value),
|
|
120
|
+
'?date': dateStamp,
|
|
121
|
+
'?creator': me
|
|
122
|
+
};
|
|
123
|
+
renderMessage(bindings, false); // not green
|
|
131
124
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
};
|
|
137
|
-
updater.update([], sts, sendComplete);
|
|
138
|
-
case 10:
|
|
139
|
-
case "end":
|
|
140
|
-
return _context.stop();
|
|
141
|
-
}
|
|
142
|
-
}, _callee);
|
|
143
|
-
}));
|
|
144
|
-
return function sendMessage() {
|
|
145
|
-
return _ref.apply(this, arguments);
|
|
125
|
+
field.value = ''; // clear from out for reuse
|
|
126
|
+
field.setAttribute('class', '');
|
|
127
|
+
field.disabled = false;
|
|
128
|
+
}
|
|
146
129
|
};
|
|
147
|
-
|
|
130
|
+
updater.update([], sts, sendComplete);
|
|
131
|
+
};
|
|
148
132
|
form.appendChild(dom.createElement('br'));
|
|
149
133
|
var field, sendButton;
|
|
150
134
|
var turnOnInput = function turnOnInput() {
|
|
@@ -155,31 +139,15 @@ function thread(dom, kb, subject, messageStore, options) {
|
|
|
155
139
|
field.rows = 3;
|
|
156
140
|
// field.cols = 40
|
|
157
141
|
field.setAttribute('style', messageBodyStyle + 'background-color: #eef;');
|
|
158
|
-
field.addEventListener('keyup',
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
if (e.altKey) {
|
|
168
|
-
_context2.next = 4;
|
|
169
|
-
break;
|
|
170
|
-
}
|
|
171
|
-
_context2.next = 4;
|
|
172
|
-
return sendMessage();
|
|
173
|
-
case 4:
|
|
174
|
-
case "end":
|
|
175
|
-
return _context2.stop();
|
|
176
|
-
}
|
|
177
|
-
}, _callee2);
|
|
178
|
-
}));
|
|
179
|
-
return function (_x) {
|
|
180
|
-
return _ref2.apply(this, arguments);
|
|
181
|
-
};
|
|
182
|
-
}(), false);
|
|
142
|
+
field.addEventListener('keyup', function (e) {
|
|
143
|
+
// User preference?
|
|
144
|
+
if (e.keyCode === 13) {
|
|
145
|
+
if (!e.altKey) {
|
|
146
|
+
// Alt-Enter just adds a new line
|
|
147
|
+
sendMessage();
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}, false);
|
|
183
151
|
rhs.innerHTML = '';
|
|
184
152
|
sendButton = UI.widgets.button(dom, UI.icons.iconBase + 'noun_383448.svg', 'Send');
|
|
185
153
|
sendButton.setAttribute('style', UI.style.buttonStyle + 'float: right;');
|
|
@@ -196,64 +164,94 @@ function thread(dom, kb, subject, messageStore, options) {
|
|
|
196
164
|
});
|
|
197
165
|
return form;
|
|
198
166
|
};
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
167
|
+
|
|
168
|
+
/* const sendMessage = function (oldMsg, options) { // alain
|
|
169
|
+
// titlefield.setAttribute('class','pendingedit')
|
|
170
|
+
// titlefield.disabled = true
|
|
171
|
+
field.setAttribute('class', 'pendingedit')
|
|
172
|
+
field.disabled = true
|
|
173
|
+
const sts = []
|
|
174
|
+
const now = new Date()
|
|
175
|
+
const timestamp = '' + now.getTime()
|
|
176
|
+
const dateStamp = $rdf.term(now)
|
|
177
|
+
// http://www.w3schools.com/jsref/jsref_obj_date.asp
|
|
178
|
+
const message = store.sym(messageStore.uri + '#' + 'Msg' + timestamp)
|
|
179
|
+
if (options === 'edit' || options === 'delete') {
|
|
180
|
+
sts.push(
|
|
181
|
+
new $rdf.Statement(mostRecentVersion(oldMsg), DCT('isReplacedBy'), message, messageStore)
|
|
182
|
+
)
|
|
183
|
+
} else {
|
|
184
|
+
sts.push(
|
|
185
|
+
new $rdf.Statement(subject, ns.wf('message'), message, messageStore)
|
|
186
|
+
)
|
|
187
|
+
}
|
|
188
|
+
// sts.push(new $rdf.Statement(message, ns.dc('title'), store.literal(titlefield.value), messageStore))
|
|
189
|
+
const msgBody = options !== 'delete' ? field.value : `message deleted\nby ${nick(me)}`
|
|
190
|
+
sts.push(
|
|
191
|
+
new $rdf.Statement(
|
|
192
|
+
message,
|
|
193
|
+
ns.sioc('content'),
|
|
194
|
+
store.literal(msgBody),
|
|
195
|
+
messageStore
|
|
196
|
+
)
|
|
197
|
+
)
|
|
198
|
+
sts.push(
|
|
199
|
+
new $rdf.Statement(message, DCT('created'), dateStamp, messageStore)
|
|
200
|
+
)
|
|
201
|
+
if (me) {
|
|
202
|
+
sts.push(
|
|
203
|
+
new $rdf.Statement(message, ns.foaf('maker'), me, messageStore)
|
|
204
|
+
)
|
|
205
|
+
}
|
|
206
|
+
const sendComplete = function (uri, success, body) {
|
|
207
|
+
if (!success) {
|
|
208
|
+
form.appendChild(
|
|
209
|
+
UI.widgets.errorMessageBlock(dom, 'Error writing message: ' + body)
|
|
210
|
+
)
|
|
211
|
+
} else {
|
|
212
|
+
const bindings = {
|
|
213
|
+
'?msg': message,
|
|
214
|
+
'?content': store.literal(field.value),
|
|
215
|
+
'?date': dateStamp,
|
|
216
|
+
'?creator': me
|
|
217
|
+
}
|
|
218
|
+
renderMessage(bindings, false) // not green
|
|
219
|
+
field.value = '' // clear from out for reuse
|
|
220
|
+
field.setAttribute('class', '')
|
|
221
|
+
field.disabled = false
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
updater.update([], sts, sendComplete)
|
|
225
|
+
} */
|
|
226
|
+
|
|
227
|
+
var appendMsg = function appendMsg(fieldValue) {
|
|
228
|
+
var oldMsg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
229
|
+
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
|
230
|
+
// alain
|
|
231
|
+
var sts = [];
|
|
232
|
+
var now = new Date();
|
|
233
|
+
var timestamp = '' + now.getTime();
|
|
234
|
+
var dateStamp = $rdf.term(now);
|
|
235
|
+
// http://www.w3schools.com/jsref/jsref_obj_date.asp
|
|
236
|
+
var message = _solidLogic.store.sym(messageStore.uri + '#' + 'Msg' + timestamp);
|
|
237
|
+
if (options === 'edit' || options === 'delete') {
|
|
238
|
+
sts.push(new $rdf.Statement(mostRecentVersion(oldMsg), DCT('isReplacedBy'), message, messageStore));
|
|
239
|
+
} else {
|
|
240
|
+
sts.push(new $rdf.Statement(subject, ns.wf('message'), message, messageStore));
|
|
241
|
+
}
|
|
242
|
+
// sts.push(new $rdf.Statement(message, ns.dc('title'), store.literal(titlefield.value), messageStore))
|
|
243
|
+
var msgBody = options !== 'delete' ? fieldValue : "message deleted\nby ".concat(nick(me));
|
|
244
|
+
sts.push(new $rdf.Statement(message, ns.sioc('content'), _solidLogic.store.literal(msgBody), messageStore));
|
|
245
|
+
sts.push(new $rdf.Statement(message, DCT('created'), dateStamp, messageStore));
|
|
246
|
+
if (me) {
|
|
247
|
+
sts.push(new $rdf.Statement(message, ns.foaf('maker'), me, messageStore));
|
|
248
|
+
}
|
|
249
|
+
return {
|
|
250
|
+
message: message,
|
|
251
|
+
dateStamp: dateStamp,
|
|
252
|
+
sts: sts
|
|
255
253
|
};
|
|
256
|
-
}
|
|
254
|
+
};
|
|
257
255
|
function nick(person) {
|
|
258
256
|
var s = _solidLogic.store.any(person, UI.ns.foaf('nick'));
|
|
259
257
|
if (s) return '' + s.value;
|
|
@@ -308,15 +306,15 @@ function thread(dom, kb, subject, messageStore, options) {
|
|
|
308
306
|
return msg;
|
|
309
307
|
};
|
|
310
308
|
var _deleteMessage = /*#__PURE__*/function () {
|
|
311
|
-
var
|
|
309
|
+
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(message) {
|
|
312
310
|
var deletions;
|
|
313
|
-
return _regenerator["default"].wrap(function
|
|
314
|
-
while (1) switch (
|
|
311
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
312
|
+
while (1) switch (_context.prev = _context.next) {
|
|
315
313
|
case 0:
|
|
316
|
-
|
|
314
|
+
_context.next = 2;
|
|
317
315
|
return _solidLogic.store.connectedStatements(message, messageStore);
|
|
318
316
|
case 2:
|
|
319
|
-
deletions =
|
|
317
|
+
deletions = _context.sent;
|
|
320
318
|
updater.update(deletions, [], function (uri, ok, body) {
|
|
321
319
|
if (!ok) {
|
|
322
320
|
announce.error('Cant delete messages:' + body);
|
|
@@ -326,12 +324,12 @@ function thread(dom, kb, subject, messageStore, options) {
|
|
|
326
324
|
});
|
|
327
325
|
case 4:
|
|
328
326
|
case "end":
|
|
329
|
-
return
|
|
327
|
+
return _context.stop();
|
|
330
328
|
}
|
|
331
|
-
},
|
|
329
|
+
}, _callee);
|
|
332
330
|
}));
|
|
333
|
-
return function _deleteMessage(
|
|
334
|
-
return
|
|
331
|
+
return function _deleteMessage(_x) {
|
|
332
|
+
return _ref.apply(this, arguments);
|
|
335
333
|
};
|
|
336
334
|
}();
|
|
337
335
|
var addMessage = function addMessage(message) {
|
|
@@ -396,37 +394,17 @@ function thread(dom, kb, subject, messageStore, options) {
|
|
|
396
394
|
}, false);
|
|
397
395
|
var sureButton = dom.createElement('button');
|
|
398
396
|
sureButton.textContent = 'Delete message';
|
|
399
|
-
td3.appendChild(sureButton).addEventListener('click',
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
_context5.next = 8;
|
|
411
|
-
break;
|
|
412
|
-
}
|
|
413
|
-
_context5.next = 5;
|
|
414
|
-
return appendMsg();
|
|
415
|
-
case 5:
|
|
416
|
-
_yield$appendMsg2 = _context5.sent;
|
|
417
|
-
sts = _yield$appendMsg2.sts;
|
|
418
|
-
// alain
|
|
419
|
-
updater.update([], sts);
|
|
420
|
-
case 8:
|
|
421
|
-
case "end":
|
|
422
|
-
return _context5.stop();
|
|
423
|
-
}
|
|
424
|
-
}, _callee5);
|
|
425
|
-
}));
|
|
426
|
-
return function (_x4) {
|
|
427
|
-
return _ref5.apply(this, arguments);
|
|
428
|
-
};
|
|
429
|
-
}(), false);
|
|
397
|
+
td3.appendChild(sureButton).addEventListener('click', function (_event) {
|
|
398
|
+
// alain test for delete or edit depending on me = maker
|
|
399
|
+
td3.removeChild(sureButton);
|
|
400
|
+
td3.removeChild(cancelButton);
|
|
401
|
+
// deleteMessage(message) // alain or sendMessage(message, 'delete' or 'edit') //alain
|
|
402
|
+
if (me.value === _solidLogic.store.any(message, ns.foaf('maker')).value) {
|
|
403
|
+
var _appendMsg2 = appendMsg(),
|
|
404
|
+
sts = _appendMsg2.sts; // alain
|
|
405
|
+
updater.update([], sts);
|
|
406
|
+
}
|
|
407
|
+
}, false);
|
|
430
408
|
}, false);
|
|
431
409
|
};
|
|
432
410
|
|
package/lib/chat/thread.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thread.js","names":["_iconBase","require","_solidLogic","_index","ns","_interopRequireWildcard","login","pad","$rdf","style","utils","widgets","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","UI","icons","media","thread","dom","kb","subject","messageStore","options","store","doc","WF","Namespace","DCT","newestFirst","messageBodyStyle","div","createElement","messageTable","me","updater","anchor","text","term","a","uri","setAttribute","addEventListener","openHrefInOutlineMode","textContent","mention","message","pre","appendChild","createTextNode","announce","log","warn","error","newMessageForm","form","lhs","middle","rhs","AJAR_date","sendMessage","_ref","_asyncToGenerator2","_regenerator","mark","_callee","_yield$appendMsg","dateStamp","sts","sendComplete","wrap","_callee$","_context","prev","next","field","disabled","appendMsg","value","sent","success","body","errorMessageBlock","bindings","literal","renderMessage","update","stop","apply","arguments","sendButton","turnOnInput","creatorAndDate","innerHTML","rows","_ref2","_callee2","e","_callee2$","_context2","keyCode","altKey","_x","button","iconBase","buttonStyle","context","ensureLoggedIn","then","_ref3","fieldValue","oldMsg","length","undefined","_callee3","now","timestamp","msgBody","_callee3$","_context3","Date","getTime","sym","t0","t1","Statement","mostRecentVersion","t2","t3","t4","t5","t6","push","wf","concat","nick","sioc","foaf","abrupt","_x2","person","s","any","label","td1","creator","date","nickAnchor","fetcher","nowOrWhenFetched","_ok","_body","syncMessages","about","displayed","ele","ele2","firstChild","nextSibling","AJAR_subject","messages","each","stored","forEach","m","addMessage","removeChild","msg","statementsMatching","_deleteMessage","_ref4","_callee4","deletions","_callee4$","_context4","connectedStatements","ok","_x3","fresh","content","dateString","tr","done","insertBefore","shortDate","td2","td3","delButton","_event","cancelButton","sureButton","_ref5","_callee5","_yield$appendMsg2","_callee5$","_context5","_x4","query","Query","v","vs","x","vars","variable","pat","add","dct","doneQuery","refresh"],"sources":["../../src/chat/thread.js"],"sourcesContent":["/**\n * Contains the [[thread]] function\n * @packageDocumentation\n */\n\nimport { icons } from '../iconBase'\nimport { store } from 'solid-logic'\nimport { media } from '../media/index'\nimport * as ns from '../ns'\nimport * as login from '../login/login'\nimport * as pad from '../pad'\nimport * as $rdf from 'rdflib' // pull in first avoid cross-refs\nimport * as style from '../style'\nimport * as utils from '../utils'\nimport * as widgets from '../widgets'\n\nconst UI = { icons, ns, media, pad, style, utils, widgets }\n\n/**\n * HTML component for a chat thread\n */\nexport function thread (dom, kb, subject, messageStore, options) {\n kb = kb || store\n messageStore = messageStore.doc() // No hash\n const ns = UI.ns\n const WF = $rdf.Namespace('http://www.w3.org/2005/01/wf/flow#')\n const DCT = $rdf.Namespace('http://purl.org/dc/terms/')\n\n options = options || {}\n\n const newestFirst = !!options.newestFirst\n\n const messageBodyStyle =\n 'white-space: pre-wrap; width: 90%; font-size:100%; border: 0.07em solid #eee; padding: .2em 0.5em; margin: 0.1em 1em 0.1em 1em;'\n // 'font-size: 100%; margin: 0.1em 1em 0.1em 1em; background-color: white; white-space: pre-wrap; padding: 0.1em;'\n\n const div = dom.createElement('div')\n // eslint-disable-next-line prefer-const\n let messageTable\n\n let me\n\n const updater = store.updater\n\n const anchor = function (text, term) {\n // If there is no link return an element anyway\n const a = dom.createElement('a')\n if (term && term.uri) {\n a.setAttribute('href', term.uri)\n a.addEventListener('click', UI.widgets.openHrefInOutlineMode, true)\n a.setAttribute('style', 'color: #3B5998; text-decoration: none; ') // font-weight: bold\n }\n a.textContent = text\n return a\n }\n\n const mention = function mention (message, style) {\n const pre = dom.createElement('pre')\n pre.setAttribute('style', style || 'color: grey')\n div.appendChild(pre)\n pre.appendChild(dom.createTextNode(message))\n return pre\n }\n\n const announce = {\n log: function (message) {\n mention(message, 'color: #111;')\n },\n warn: function (message) {\n mention(message, 'color: #880;')\n },\n error: function (message) {\n mention(message, 'color: #800;')\n }\n }\n\n /**\n * Form for a new message\n */\n const newMessageForm = function () {\n const form = dom.createElement('tr')\n const lhs = dom.createElement('td')\n const middle = dom.createElement('td')\n const rhs = dom.createElement('td')\n form.appendChild(lhs)\n form.appendChild(middle)\n form.appendChild(rhs)\n form.AJAR_date = '9999-01-01T00:00:00Z' // ISO format for field sort\n\n const sendMessage = async function () {\n // titlefield.setAttribute('class','pendingedit')\n // titlefield.disabled = true\n field.setAttribute('class', 'pendingedit')\n field.disabled = true\n const { message, dateStamp, sts } = await appendMsg(field.value)\n\n const sendComplete = function (uri, success, body) {\n if (!success) {\n form.appendChild(\n UI.widgets.errorMessageBlock(dom, 'Error writing message: ' + body)\n )\n } else {\n const bindings = {\n '?msg': message,\n '?content': store.literal(field.value),\n '?date': dateStamp,\n '?creator': me\n }\n renderMessage(bindings, false) // not green\n\n field.value = '' // clear from out for reuse\n field.setAttribute('class', '')\n field.disabled = false\n }\n }\n updater.update([], sts, sendComplete)\n }\n form.appendChild(dom.createElement('br'))\n\n let field, sendButton\n const turnOnInput = function () {\n creatorAndDate(lhs, me, '', null)\n\n field = dom.createElement('textarea')\n middle.innerHTML = ''\n middle.appendChild(field)\n field.rows = 3\n // field.cols = 40\n field.setAttribute('style', messageBodyStyle + 'background-color: #eef;')\n\n field.addEventListener(\n 'keyup',\n async function (e) {\n // User preference?\n if (e.keyCode === 13) {\n if (!e.altKey) {\n // Alt-Enter just adds a new line\n await sendMessage()\n }\n }\n },\n false\n )\n\n rhs.innerHTML = ''\n sendButton = UI.widgets.button(\n dom,\n UI.icons.iconBase + 'noun_383448.svg',\n 'Send'\n )\n sendButton.setAttribute('style', UI.style.buttonStyle + 'float: right;')\n sendButton.addEventListener('click', sendMessage, false)\n rhs.appendChild(sendButton)\n }\n\n const context = { div: middle, dom }\n login.ensureLoggedIn(context).then(context => {\n me = context.me\n turnOnInput()\n })\n\n return form\n }\n\n const appendMsg = async function (fieldValue, oldMsg = {}, options = '') { // alain\n const sts = []\n const now = new Date()\n const timestamp = '' + now.getTime()\n const dateStamp = $rdf.term(now)\n // http://www.w3schools.com/jsref/jsref_obj_date.asp\n const message = store.sym(messageStore.uri + '#' + 'Msg' + timestamp)\n\n if (options === 'edit' || options === 'delete') {\n sts.push(\n new $rdf.Statement(await mostRecentVersion(oldMsg), DCT('isReplacedBy'), message, messageStore)\n )\n } else {\n sts.push(\n new $rdf.Statement(subject, ns.wf('message'), message, messageStore)\n )\n }\n // sts.push(new $rdf.Statement(message, ns.dc('title'), store.literal(titlefield.value), messageStore))\n const msgBody = options !== 'delete' ? fieldValue : `message deleted\\nby ${nick(me)}`\n sts.push(\n new $rdf.Statement(\n message,\n ns.sioc('content'),\n store.literal(msgBody),\n messageStore\n )\n )\n sts.push(\n new $rdf.Statement(message, DCT('created'), dateStamp, messageStore)\n )\n if (me) {\n sts.push(\n new $rdf.Statement(message, ns.foaf('maker'), me, messageStore)\n )\n }\n return { message, dateStamp, sts }\n }\n\n function nick (person) {\n const s = store.any(person, UI.ns.foaf('nick'))\n if (s) return '' + s.value\n return '' + utils.label(person)\n }\n\n function creatorAndDate (td1, creator, date, message) {\n const nickAnchor = td1.appendChild(anchor(nick(creator), creator))\n if (creator.uri) {\n store.fetcher.nowOrWhenFetched(creator.doc(), undefined, function (\n _ok,\n _body\n ) {\n nickAnchor.textContent = nick(creator)\n })\n }\n td1.appendChild(dom.createElement('br'))\n td1.appendChild(anchor(date, message))\n }\n\n // ///////////////////////////////////////////////////////////////////////\n\n function syncMessages (about, messageTable) {\n const displayed = {}\n let ele, ele2\n for (ele = messageTable.firstChild; ele; ele = ele.nextSibling) {\n if (ele.AJAR_subject) {\n displayed[ele.AJAR_subject.uri] = true\n }\n }\n const messages = store.each(about, ns.wf('message'))\n const stored = {}\n messages.forEach(function (m) {\n stored[m.uri] = true\n if (!displayed[m.uri]) {\n addMessage(m)\n }\n })\n\n // eslint-disable-next-line space-in-parens\n for (ele = messageTable.firstChild; ele; ) {\n ele2 = ele.nextSibling\n if (ele.AJAR_subject && !stored[ele.AJAR_subject.uri]) {\n messageTable.removeChild(ele)\n }\n ele = ele2\n }\n }\n\n const mostRecentVersion = function (message) {\n let msg = message\n // const listMsg = []\n while (msg) {\n // listMsg.push(msg)\n msg = store.statementsMatching(message, DCT('isReplacedBy'))\n }\n return msg\n }\n\n const _deleteMessage = async function (message) { // alain: must delete message and all linked with isReplacedBy\n // alain: check that me is not the author and ask for confirmation.\n const deletions = await store.connectedStatements(message, messageStore)\n updater.update(deletions, [], function (uri, ok, body) {\n if (!ok) {\n announce.error('Cant delete messages:' + body)\n } else {\n syncMessages(subject, messageTable)\n }\n })\n }\n\n const addMessage = function (message) {\n const bindings = {\n '?msg': message,\n '?creator': store.any(message, ns.foaf('maker')),\n '?date': store.any(message, DCT('created')),\n '?content': store.any(message, ns.sioc('content'))\n }\n renderMessage(bindings, true) // fresh from elsewhere\n }\n\n const renderMessage = function (bindings, fresh) {\n const creator = bindings['?creator']\n const message = bindings['?msg']\n const date = bindings['?date']\n const content = bindings['?content']\n\n const dateString = date.value\n const tr = dom.createElement('tr')\n tr.AJAR_date = dateString\n tr.AJAR_subject = message\n\n let done = false\n for (let ele = messageTable.firstChild; ; ele = ele.nextSibling) {\n if (!ele) {\n // empty\n break\n }\n if (\n (dateString > ele.AJAR_date && newestFirst) ||\n (dateString < ele.AJAR_date && !newestFirst)\n ) {\n messageTable.insertBefore(tr, ele)\n done = true\n break\n }\n }\n if (!done) {\n messageTable.appendChild(tr)\n }\n\n const td1 = dom.createElement('td')\n tr.appendChild(td1)\n creatorAndDate(td1, creator, UI.widgets.shortDate(dateString), message)\n\n const td2 = dom.createElement('td')\n tr.appendChild(td2)\n const pre = dom.createElement('p')\n pre.setAttribute(\n 'style',\n messageBodyStyle +\n (fresh ? 'background-color: #e8ffe8;' : 'background-color: #white;')\n )\n td2.appendChild(pre)\n pre.textContent = content.value\n\n const td3 = dom.createElement('td')\n tr.appendChild(td3)\n\n const delButton = dom.createElement('button')\n td3.appendChild(delButton)\n delButton.textContent = '-'\n\n tr.setAttribute('class', 'hoverControl') // See tabbedtab.css (sigh global CSS)\n delButton.setAttribute('class', 'hoverControlHide')\n delButton.setAttribute('style', 'color: red;')\n delButton.addEventListener(\n 'click',\n function (_event) {\n td3.removeChild(delButton) // Ask -- are you sure?\n const cancelButton = dom.createElement('button')\n cancelButton.textContent = 'cancel'\n td3.appendChild(cancelButton).addEventListener(\n 'click',\n function (_event) {\n td3.removeChild(sureButton)\n td3.removeChild(cancelButton)\n td3.appendChild(delButton)\n },\n false\n )\n const sureButton = dom.createElement('button')\n sureButton.textContent = 'Delete message'\n td3.appendChild(sureButton).addEventListener(\n 'click',\n async function (_event) { // alain test for delete or edit depending on me = maker\n td3.removeChild(sureButton)\n td3.removeChild(cancelButton)\n // deleteMessage(message) // alain or sendMessage(message, 'delete' or 'edit') //alain\n if (me.value === store.any(message, ns.foaf('maker')).value) {\n const { sts } = await appendMsg() // alain\n updater.update([], sts)\n }\n },\n false\n )\n },\n false\n )\n }\n\n // Messages with date, author etc\n\n messageTable = dom.createElement('table')\n messageTable.fresh = false\n div.appendChild(messageTable)\n messageTable.setAttribute('style', 'width: 100%;') // fill that div!\n\n const tr = newMessageForm()\n if (newestFirst) {\n messageTable.insertBefore(tr, messageTable.firstChild) // If newestFirst\n } else {\n messageTable.appendChild(tr) // not newestFirst\n }\n\n let query\n // Do this with a live query to pull in messages from web\n if (options.query) {\n query = options.query\n } else {\n query = new $rdf.Query('Messages')\n const v = {} // semicolon needed\n const vs = ['msg', 'date', 'creator', 'content']\n vs.forEach(function (x) {\n query.vars.push((v[x] = $rdf.variable(x)))\n })\n query.pat.add(subject, WF('message'), v.msg)\n query.pat.add(v.msg, ns.dct('created'), v.date)\n query.pat.add(v.msg, ns.foaf('maker'), v.creator)\n query.pat.add(v.msg, ns.sioc('content'), v.content)\n }\n\n function doneQuery () {\n messageTable.fresh = true // any new are fresh and so will be greenish\n }\n store.query(query, renderMessage, undefined, doneQuery)\n div.refresh = function () {\n syncMessages(subject, messageTable)\n }\n // syncMessages(subject, messageTable) // no the query will do this async\n return div\n}\n"],"mappings":";;;;;;;;;;AAKA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,EAAA,GAAAC,uBAAA,CAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAD,uBAAA,CAAAJ,OAAA;AACA,IAAAM,GAAA,GAAAF,uBAAA,CAAAJ,OAAA;AACA,IAAAO,IAAA,GAAAH,uBAAA,CAAAJ,OAAA;AACA,IAAAQ,KAAA,GAAAJ,uBAAA,CAAAJ,OAAA;AACA,IAAAS,KAAA,GAAAL,uBAAA,CAAAJ,OAAA;AACA,IAAAU,OAAA,GAAAN,uBAAA,CAAAJ,OAAA;AAAqC,SAAAW,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAR,wBAAAY,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,aAAAE,OAAA,CAAAF,GAAA,yBAAAA,GAAA,uCAAAA,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,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E,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,CAAC;IAChDA,EAAE,CAACrC,OAAO,CAAC,UAAUsC,CAAC,EAAE;MACtBJ,KAAK,CAACK,IAAI,CAACtE,IAAI,CAAEmE,CAAC,CAACE,CAAC,CAAC,GAAGpN,IAAI,CAACsN,QAAQ,CAACF,CAAC,CAAC,CAAE;IAC5C,CAAC,CAAC;IACFJ,KAAK,CAACO,GAAG,CAACC,GAAG,CAACxL,OAAO,EAAEK,EAAE,CAAC,SAAS,CAAC,EAAE6K,CAAC,CAAChC,GAAG,CAAC;IAC5C8B,KAAK,CAACO,GAAG,CAACC,GAAG,CAACN,CAAC,CAAChC,GAAG,EAAEtL,EAAE,CAAC6N,GAAG,CAAC,SAAS,CAAC,EAAEP,CAAC,CAACrD,IAAI,CAAC;IAC/CmD,KAAK,CAACO,GAAG,CAACC,GAAG,CAACN,CAAC,CAAChC,GAAG,EAAEtL,EAAE,CAACwJ,IAAI,CAAC,OAAO,CAAC,EAAE8D,CAAC,CAACtD,OAAO,CAAC;IACjDoD,KAAK,CAACO,GAAG,CAACC,GAAG,CAACN,CAAC,CAAChC,GAAG,EAAEtL,EAAE,CAACuJ,IAAI,CAAC,SAAS,CAAC,EAAE+D,CAAC,CAACpB,OAAO,CAAC;EACrD;EAEA,SAAS4B,SAASA,CAAA,EAAI;IACpB9K,YAAY,CAACiJ,KAAK,GAAG,IAAI,EAAC;EAC5B;;EACA1J,iBAAK,CAAC6K,KAAK,CAACA,KAAK,EAAEhH,aAAa,EAAE4B,SAAS,EAAE8F,SAAS,CAAC;EACvDhL,GAAG,CAACiL,OAAO,GAAG,YAAY;IACxBxD,YAAY,CAACnI,OAAO,EAAEY,YAAY,CAAC;EACrC,CAAC;EACD;EACA,OAAOF,GAAG;AACZ"}
|
|
1
|
+
{"version":3,"file":"thread.js","names":["_iconBase","require","_solidLogic","_index","ns","_interopRequireWildcard","login","pad","$rdf","style","utils","widgets","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","UI","icons","media","thread","dom","kb","subject","messageStore","options","store","doc","WF","Namespace","DCT","newestFirst","messageBodyStyle","div","createElement","messageTable","me","updater","anchor","text","term","a","uri","setAttribute","addEventListener","openHrefInOutlineMode","textContent","mention","message","pre","appendChild","createTextNode","announce","log","warn","error","newMessageForm","form","lhs","middle","rhs","AJAR_date","sendMessage","field","disabled","_appendMsg","appendMsg","value","dateStamp","sts","sendComplete","success","body","errorMessageBlock","bindings","literal","renderMessage","update","sendButton","turnOnInput","creatorAndDate","innerHTML","rows","e","keyCode","altKey","button","iconBase","buttonStyle","context","ensureLoggedIn","then","fieldValue","oldMsg","arguments","length","undefined","now","Date","timestamp","getTime","sym","push","Statement","mostRecentVersion","wf","msgBody","concat","nick","sioc","foaf","person","s","any","label","td1","creator","date","nickAnchor","fetcher","nowOrWhenFetched","_ok","_body","syncMessages","about","displayed","ele","ele2","firstChild","nextSibling","AJAR_subject","messages","each","stored","forEach","m","addMessage","removeChild","msg","statementsMatching","_deleteMessage","_ref","_asyncToGenerator2","_regenerator","mark","_callee","deletions","wrap","_callee$","_context","prev","next","connectedStatements","sent","ok","stop","_x","apply","fresh","content","dateString","tr","done","insertBefore","shortDate","td2","td3","delButton","_event","cancelButton","sureButton","_appendMsg2","query","Query","v","vs","x","vars","variable","pat","add","dct","doneQuery","refresh"],"sources":["../../src/chat/thread.js"],"sourcesContent":["/**\n * Contains the [[thread]] function\n * @packageDocumentation\n */\n\nimport { icons } from '../iconBase'\nimport { store } from 'solid-logic'\nimport { media } from '../media/index'\nimport * as ns from '../ns'\nimport * as login from '../login/login'\nimport * as pad from '../pad'\nimport * as $rdf from 'rdflib' // pull in first avoid cross-refs\nimport * as style from '../style'\nimport * as utils from '../utils'\nimport * as widgets from '../widgets'\n\nconst UI = { icons, ns, media, pad, style, utils, widgets }\n\n/**\n * HTML component for a chat thread\n */\nexport function thread (dom, kb, subject, messageStore, options) {\n kb = kb || store\n messageStore = messageStore.doc() // No hash\n const ns = UI.ns\n const WF = $rdf.Namespace('http://www.w3.org/2005/01/wf/flow#')\n const DCT = $rdf.Namespace('http://purl.org/dc/terms/')\n\n options = options || {}\n\n const newestFirst = !!options.newestFirst\n\n const messageBodyStyle =\n 'white-space: pre-wrap; width: 90%; font-size:100%; border: 0.07em solid #eee; padding: .2em 0.5em; margin: 0.1em 1em 0.1em 1em;'\n // 'font-size: 100%; margin: 0.1em 1em 0.1em 1em; background-color: white; white-space: pre-wrap; padding: 0.1em;'\n\n const div = dom.createElement('div')\n // eslint-disable-next-line prefer-const\n let messageTable // Shared by initial build and addMessageFromBindings\n\n let me\n\n const updater = store.updater\n\n const anchor = function (text, term) {\n // If there is no link return an element anyway\n const a = dom.createElement('a')\n if (term && term.uri) {\n a.setAttribute('href', term.uri)\n a.addEventListener('click', UI.widgets.openHrefInOutlineMode, true)\n a.setAttribute('style', 'color: #3B5998; text-decoration: none; ') // font-weight: bold\n }\n a.textContent = text\n return a\n }\n\n const mention = function mention (message, style) {\n const pre = dom.createElement('pre')\n pre.setAttribute('style', style || 'color: grey')\n div.appendChild(pre)\n pre.appendChild(dom.createTextNode(message))\n return pre\n }\n\n const announce = {\n log: function (message) {\n mention(message, 'color: #111;')\n },\n warn: function (message) {\n mention(message, 'color: #880;')\n },\n error: function (message) {\n mention(message, 'color: #800;')\n }\n }\n\n /**\n * Form for a new message\n */\n const newMessageForm = function () {\n const form = dom.createElement('tr')\n const lhs = dom.createElement('td')\n const middle = dom.createElement('td')\n const rhs = dom.createElement('td')\n form.appendChild(lhs)\n form.appendChild(middle)\n form.appendChild(rhs)\n form.AJAR_date = '9999-01-01T00:00:00Z' // ISO format for field sort\n\n const sendMessage = function () {\n // titlefield.setAttribute('class','pendingedit')\n // titlefield.disabled = true\n field.setAttribute('class', 'pendingedit')\n field.disabled = true\n const { message, dateStamp, sts } = appendMsg(field.value)\n\n const sendComplete = function (uri, success, body) {\n if (!success) {\n form.appendChild(\n UI.widgets.errorMessageBlock(dom, 'Error writing message: ' + body)\n )\n } else {\n const bindings = {\n '?msg': message,\n '?content': store.literal(field.value),\n '?date': dateStamp,\n '?creator': me\n }\n renderMessage(bindings, false) // not green\n\n field.value = '' // clear from out for reuse\n field.setAttribute('class', '')\n field.disabled = false\n }\n }\n updater.update([], sts, sendComplete)\n }\n form.appendChild(dom.createElement('br'))\n\n let field, sendButton\n const turnOnInput = function () {\n creatorAndDate(lhs, me, '', null)\n\n field = dom.createElement('textarea')\n middle.innerHTML = ''\n middle.appendChild(field)\n field.rows = 3\n // field.cols = 40\n field.setAttribute('style', messageBodyStyle + 'background-color: #eef;')\n\n field.addEventListener(\n 'keyup',\n function (e) {\n // User preference?\n if (e.keyCode === 13) {\n if (!e.altKey) {\n // Alt-Enter just adds a new line\n sendMessage()\n }\n }\n },\n false\n )\n\n rhs.innerHTML = ''\n sendButton = UI.widgets.button(\n dom,\n UI.icons.iconBase + 'noun_383448.svg',\n 'Send'\n )\n sendButton.setAttribute('style', UI.style.buttonStyle + 'float: right;')\n sendButton.addEventListener('click', sendMessage, false)\n rhs.appendChild(sendButton)\n }\n\n const context = { div: middle, dom }\n login.ensureLoggedIn(context).then(context => {\n me = context.me\n turnOnInput()\n })\n\n return form\n }\n\n /* const sendMessage = function (oldMsg, options) { // alain\n // titlefield.setAttribute('class','pendingedit')\n // titlefield.disabled = true\n field.setAttribute('class', 'pendingedit')\n field.disabled = true\n const sts = []\n const now = new Date()\n const timestamp = '' + now.getTime()\n const dateStamp = $rdf.term(now)\n // http://www.w3schools.com/jsref/jsref_obj_date.asp\n const message = store.sym(messageStore.uri + '#' + 'Msg' + timestamp)\n\n if (options === 'edit' || options === 'delete') {\n sts.push(\n new $rdf.Statement(mostRecentVersion(oldMsg), DCT('isReplacedBy'), message, messageStore)\n )\n } else {\n sts.push(\n new $rdf.Statement(subject, ns.wf('message'), message, messageStore)\n )\n }\n // sts.push(new $rdf.Statement(message, ns.dc('title'), store.literal(titlefield.value), messageStore))\n const msgBody = options !== 'delete' ? field.value : `message deleted\\nby ${nick(me)}`\n sts.push(\n new $rdf.Statement(\n message,\n ns.sioc('content'),\n store.literal(msgBody),\n messageStore\n )\n )\n sts.push(\n new $rdf.Statement(message, DCT('created'), dateStamp, messageStore)\n )\n if (me) {\n sts.push(\n new $rdf.Statement(message, ns.foaf('maker'), me, messageStore)\n )\n }\n\n const sendComplete = function (uri, success, body) {\n if (!success) {\n form.appendChild(\n UI.widgets.errorMessageBlock(dom, 'Error writing message: ' + body)\n )\n } else {\n const bindings = {\n '?msg': message,\n '?content': store.literal(field.value),\n '?date': dateStamp,\n '?creator': me\n }\n renderMessage(bindings, false) // not green\n\n field.value = '' // clear from out for reuse\n field.setAttribute('class', '')\n field.disabled = false\n }\n }\n updater.update([], sts, sendComplete)\n } */\n\n const appendMsg = function (fieldValue, oldMsg = {}, options = '') { // alain\n const sts = []\n const now = new Date()\n const timestamp = '' + now.getTime()\n const dateStamp = $rdf.term(now)\n // http://www.w3schools.com/jsref/jsref_obj_date.asp\n const message = store.sym(messageStore.uri + '#' + 'Msg' + timestamp)\n\n if (options === 'edit' || options === 'delete') {\n sts.push(\n new $rdf.Statement(mostRecentVersion(oldMsg), DCT('isReplacedBy'), message, messageStore)\n )\n } else {\n sts.push(\n new $rdf.Statement(subject, ns.wf('message'), message, messageStore)\n )\n }\n // sts.push(new $rdf.Statement(message, ns.dc('title'), store.literal(titlefield.value), messageStore))\n const msgBody = options !== 'delete' ? fieldValue : `message deleted\\nby ${nick(me)}`\n sts.push(\n new $rdf.Statement(\n message,\n ns.sioc('content'),\n store.literal(msgBody),\n messageStore\n )\n )\n sts.push(\n new $rdf.Statement(message, DCT('created'), dateStamp, messageStore)\n )\n if (me) {\n sts.push(\n new $rdf.Statement(message, ns.foaf('maker'), me, messageStore)\n )\n }\n return { message, dateStamp, sts }\n }\n\n function nick (person) {\n const s = store.any(person, UI.ns.foaf('nick'))\n if (s) return '' + s.value\n return '' + utils.label(person)\n }\n\n function creatorAndDate (td1, creator, date, message) {\n const nickAnchor = td1.appendChild(anchor(nick(creator), creator))\n if (creator.uri) {\n store.fetcher.nowOrWhenFetched(creator.doc(), undefined, function (\n _ok,\n _body\n ) {\n nickAnchor.textContent = nick(creator)\n })\n }\n td1.appendChild(dom.createElement('br'))\n td1.appendChild(anchor(date, message))\n }\n\n // ///////////////////////////////////////////////////////////////////////\n\n function syncMessages (about, messageTable) {\n const displayed = {}\n let ele, ele2\n for (ele = messageTable.firstChild; ele; ele = ele.nextSibling) {\n if (ele.AJAR_subject) {\n displayed[ele.AJAR_subject.uri] = true\n }\n }\n const messages = store.each(about, ns.wf('message'))\n const stored = {}\n messages.forEach(function (m) {\n stored[m.uri] = true\n if (!displayed[m.uri]) {\n addMessage(m)\n }\n })\n\n // eslint-disable-next-line space-in-parens\n for (ele = messageTable.firstChild; ele; ) {\n ele2 = ele.nextSibling\n if (ele.AJAR_subject && !stored[ele.AJAR_subject.uri]) {\n messageTable.removeChild(ele)\n }\n ele = ele2\n }\n }\n\n const mostRecentVersion = function (message) {\n let msg = message\n // const listMsg = []\n while (msg) {\n // listMsg.push(msg)\n msg = store.statementsMatching(message, DCT('isReplacedBy'))\n }\n return msg\n }\n\n const _deleteMessage = async function (message) { // alain: must delete message and all linked with isReplacedBy\n // alain: check that me is not the author and ask for confirmation.\n const deletions = await store.connectedStatements(message, messageStore)\n updater.update(deletions, [], function (uri, ok, body) {\n if (!ok) {\n announce.error('Cant delete messages:' + body)\n } else {\n syncMessages(subject, messageTable)\n }\n })\n }\n\n const addMessage = function (message) {\n const bindings = {\n '?msg': message,\n '?creator': store.any(message, ns.foaf('maker')),\n '?date': store.any(message, DCT('created')),\n '?content': store.any(message, ns.sioc('content'))\n }\n renderMessage(bindings, true) // fresh from elsewhere\n }\n\n const renderMessage = function (bindings, fresh) {\n const creator = bindings['?creator']\n const message = bindings['?msg']\n const date = bindings['?date']\n const content = bindings['?content']\n\n const dateString = date.value\n const tr = dom.createElement('tr')\n tr.AJAR_date = dateString\n tr.AJAR_subject = message\n\n let done = false\n for (let ele = messageTable.firstChild; ; ele = ele.nextSibling) {\n if (!ele) {\n // empty\n break\n }\n if (\n (dateString > ele.AJAR_date && newestFirst) ||\n (dateString < ele.AJAR_date && !newestFirst)\n ) {\n messageTable.insertBefore(tr, ele)\n done = true\n break\n }\n }\n if (!done) {\n messageTable.appendChild(tr)\n }\n\n const td1 = dom.createElement('td')\n tr.appendChild(td1)\n creatorAndDate(td1, creator, UI.widgets.shortDate(dateString), message)\n\n const td2 = dom.createElement('td')\n tr.appendChild(td2)\n const pre = dom.createElement('p')\n pre.setAttribute(\n 'style',\n messageBodyStyle +\n (fresh ? 'background-color: #e8ffe8;' : 'background-color: #white;')\n )\n td2.appendChild(pre)\n pre.textContent = content.value\n\n const td3 = dom.createElement('td')\n tr.appendChild(td3)\n\n const delButton = dom.createElement('button')\n td3.appendChild(delButton)\n delButton.textContent = '-'\n\n tr.setAttribute('class', 'hoverControl') // See tabbedtab.css (sigh global CSS)\n delButton.setAttribute('class', 'hoverControlHide')\n delButton.setAttribute('style', 'color: red;')\n delButton.addEventListener(\n 'click',\n function (_event) {\n td3.removeChild(delButton) // Ask -- are you sure?\n const cancelButton = dom.createElement('button')\n cancelButton.textContent = 'cancel'\n td3.appendChild(cancelButton).addEventListener(\n 'click',\n function (_event) {\n td3.removeChild(sureButton)\n td3.removeChild(cancelButton)\n td3.appendChild(delButton)\n },\n false\n )\n const sureButton = dom.createElement('button')\n sureButton.textContent = 'Delete message'\n td3.appendChild(sureButton).addEventListener(\n 'click',\n function (_event) { // alain test for delete or edit depending on me = maker\n td3.removeChild(sureButton)\n td3.removeChild(cancelButton)\n // deleteMessage(message) // alain or sendMessage(message, 'delete' or 'edit') //alain\n if (me.value === store.any(message, ns.foaf('maker')).value) {\n const { sts } = appendMsg() // alain\n updater.update([], sts)\n }\n },\n false\n )\n },\n false\n )\n }\n\n // Messages with date, author etc\n\n messageTable = dom.createElement('table')\n messageTable.fresh = false\n div.appendChild(messageTable)\n messageTable.setAttribute('style', 'width: 100%;') // fill that div!\n\n const tr = newMessageForm()\n if (newestFirst) {\n messageTable.insertBefore(tr, messageTable.firstChild) // If newestFirst\n } else {\n messageTable.appendChild(tr) // not newestFirst\n }\n\n let query\n // Do this with a live query to pull in messages from web\n if (options.query) {\n query = options.query\n } else {\n query = new $rdf.Query('Messages')\n const v = {} // semicolon needed\n const vs = ['msg', 'date', 'creator', 'content']\n vs.forEach(function (x) {\n query.vars.push((v[x] = $rdf.variable(x)))\n })\n query.pat.add(subject, WF('message'), v.msg)\n query.pat.add(v.msg, ns.dct('created'), v.date)\n query.pat.add(v.msg, ns.foaf('maker'), v.creator)\n query.pat.add(v.msg, ns.sioc('content'), v.content)\n }\n\n function doneQuery () {\n messageTable.fresh = true // any new are fresh and so will be greenish\n }\n store.query(query, renderMessage, undefined, doneQuery)\n div.refresh = function () {\n syncMessages(subject, messageTable)\n }\n // syncMessages(subject, messageTable) // no the query will do this async\n return div\n}\n"],"mappings":";;;;;;;;;;AAKA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,EAAA,GAAAC,uBAAA,CAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAD,uBAAA,CAAAJ,OAAA;AACA,IAAAM,GAAA,GAAAF,uBAAA,CAAAJ,OAAA;AACA,IAAAO,IAAA,GAAAH,uBAAA,CAAAJ,OAAA;AACA,IAAAQ,KAAA,GAAAJ,uBAAA,CAAAJ,OAAA;AACA,IAAAS,KAAA,GAAAL,uBAAA,CAAAJ,OAAA;AACA,IAAAU,OAAA,GAAAN,uBAAA,CAAAJ,OAAA;AAAqC,SAAAW,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,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,OAAO,EAAEK,EAAE,CAAC,SAAS,CAAC,EAAEkJ,CAAC,CAACpC,GAAG,CAAC;IAC5CkC,KAAK,CAACO,GAAG,CAACC,GAAG,CAACN,CAAC,CAACpC,GAAG,EAAEvJ,EAAE,CAACkM,GAAG,CAAC,SAAS,CAAC,EAAEP,CAAC,CAACzD,IAAI,CAAC;IAC/CuD,KAAK,CAACO,GAAG,CAACC,GAAG,CAACN,CAAC,CAACpC,GAAG,EAAEvJ,EAAE,CAAC2H,IAAI,CAAC,OAAO,CAAC,EAAEgE,CAAC,CAAC1D,OAAO,CAAC;IACjDwD,KAAK,CAACO,GAAG,CAACC,GAAG,CAACN,CAAC,CAACpC,GAAG,EAAEvJ,EAAE,CAAC0H,IAAI,CAAC,SAAS,CAAC,EAAEiE,CAAC,CAACf,OAAO,CAAC;EACrD;EAEA,SAASuB,SAASA,CAAA,EAAI;IACpBnJ,YAAY,CAAC2H,KAAK,GAAG,IAAI,EAAC;EAC5B;;EACApI,iBAAK,CAACkJ,KAAK,CAACA,KAAK,EAAEhG,aAAa,EAAEoB,SAAS,EAAEsF,SAAS,CAAC;EACvDrJ,GAAG,CAACsJ,OAAO,GAAG,YAAY;IACxB5D,YAAY,CAACpG,OAAO,EAAEY,YAAY,CAAC;EACrC,CAAC;EACD;EACA,OAAOF,GAAG;AACZ"}
|
package/lib/preferences.js
CHANGED
|
@@ -59,10 +59,6 @@ function recordSharedPreferences(subject, context) {
|
|
|
59
59
|
return new Promise(function (resolve, reject) {
|
|
60
60
|
var sharedPreferences = kb.any(subject, ns.ui('sharedPreferences'));
|
|
61
61
|
if (!sharedPreferences) {
|
|
62
|
-
if (!kb.updater.editable(subject.doc())) {
|
|
63
|
-
debug.log(" Cant make shared preferences, may not change ".concat(subject.doc));
|
|
64
|
-
resolve(context);
|
|
65
|
-
}
|
|
66
62
|
var sp = $rdf.sym(subject.doc().uri + '#SharedPreferences');
|
|
67
63
|
var ins = [$rdf.st(subject, ns.ui('sharedPreferences'), sp, subject.doc())];
|
|
68
64
|
debug.log('Creating shared preferences ' + sp);
|