solid-panes 3.5.28-alpha → 3.5.29-alpha

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.
Files changed (119) hide show
  1. package/README.md +0 -2
  2. package/lib/RDFXMLPane.js +6 -8
  3. package/lib/RDFXMLPane.js.map +1 -1
  4. package/lib/argument/argumentPane.js +10 -11
  5. package/lib/argument/argumentPane.js.map +1 -1
  6. package/lib/attach/attachPane.js +47 -85
  7. package/lib/attach/attachPane.js.map +1 -1
  8. package/lib/audio/audioPane.js +11 -36
  9. package/lib/audio/audioPane.js.map +1 -1
  10. package/lib/classInstancePane.js +11 -20
  11. package/lib/classInstancePane.js.map +1 -1
  12. package/lib/dashboard/basicPreferences.js +3 -53
  13. package/lib/dashboard/basicPreferences.js.map +1 -1
  14. package/lib/dashboard/dashboardPane.js +2 -18
  15. package/lib/dashboard/dashboardPane.js.map +1 -1
  16. package/lib/dashboard/homepage.js +1 -19
  17. package/lib/dashboard/homepage.js.map +1 -1
  18. package/lib/dataContentPane.js +15 -58
  19. package/lib/dataContentPane.js.map +1 -1
  20. package/lib/defaultPane.js +13 -21
  21. package/lib/defaultPane.js.map +1 -1
  22. package/lib/dokieli/dokieliPane.js +19 -28
  23. package/lib/dokieli/dokieliPane.js.map +1 -1
  24. package/lib/dokieli/new.js.map +1 -1
  25. package/lib/form/pane.js +26 -40
  26. package/lib/form/pane.js.map +1 -1
  27. package/lib/home/homePane.js +7 -23
  28. package/lib/home/homePane.js.map +1 -1
  29. package/lib/humanReadablePane.js +14 -28
  30. package/lib/humanReadablePane.js.map +1 -1
  31. package/lib/imagePane.js +9 -13
  32. package/lib/imagePane.js.map +1 -1
  33. package/lib/index.js +4 -18
  34. package/lib/index.js.map +1 -1
  35. package/lib/internal/internalPane.js +10 -41
  36. package/lib/internal/internalPane.js.map +1 -1
  37. package/lib/mainPage/footer.js +0 -4
  38. package/lib/mainPage/footer.js.map +1 -1
  39. package/lib/mainPage/header.js +2 -28
  40. package/lib/mainPage/header.js.map +1 -1
  41. package/lib/mainPage/index.js +1 -12
  42. package/lib/mainPage/index.js.map +1 -1
  43. package/lib/microblogPane/microblogPane.js +100 -237
  44. package/lib/microblogPane/microblogPane.js.map +1 -1
  45. package/lib/n3Pane.js +2 -7
  46. package/lib/n3Pane.js.map +1 -1
  47. package/lib/outline/context.js +0 -2
  48. package/lib/outline/context.js.map +1 -1
  49. package/lib/outline/licenseOptions.js +9 -25
  50. package/lib/outline/licenseOptions.js.map +1 -1
  51. package/lib/outline/manager.js +178 -580
  52. package/lib/outline/manager.js.map +1 -1
  53. package/lib/outline/manager.test.js +1 -11
  54. package/lib/outline/manager.test.js.map +1 -1
  55. package/lib/outline/outlineIcons.js +30 -25
  56. package/lib/outline/outlineIcons.js.map +1 -1
  57. package/lib/outline/propertyViews.js +0 -10
  58. package/lib/outline/propertyViews.js.map +1 -1
  59. package/lib/outline/propertyViews.test.js +1 -3
  60. package/lib/outline/propertyViews.test.js.map +1 -1
  61. package/lib/outline/queryByExample.js +24 -76
  62. package/lib/outline/queryByExample.js.map +1 -1
  63. package/lib/outline/userInput.js +214 -454
  64. package/lib/outline/userInput.js.map +1 -1
  65. package/lib/outline/viewAsImage.js +0 -6
  66. package/lib/outline/viewAsImage.js.map +1 -1
  67. package/lib/outline/viewAsMbox.js +3 -4
  68. package/lib/outline/viewAsMbox.js.map +1 -1
  69. package/lib/pad/padPane.js +45 -93
  70. package/lib/pad/padPane.js.map +1 -1
  71. package/lib/playlist/playlistPane.js +3 -20
  72. package/lib/playlist/playlistPane.js.map +1 -1
  73. package/lib/profile/editProfile.view.js +7 -24
  74. package/lib/profile/editProfile.view.js.map +1 -1
  75. package/lib/profile/profile.dom.js +0 -3
  76. package/lib/profile/profile.dom.js.map +1 -1
  77. package/lib/registerPanes.js +29 -27
  78. package/lib/registerPanes.js.map +1 -1
  79. package/lib/schedule/formsForSchedule.js.map +1 -1
  80. package/lib/schedule/schedulePane.js +62 -122
  81. package/lib/schedule/schedulePane.js.map +1 -1
  82. package/lib/sharing/sharingPane.js +2 -10
  83. package/lib/sharing/sharingPane.js.map +1 -1
  84. package/lib/slideshow/slideshowPane.js +9 -14
  85. package/lib/slideshow/slideshowPane.js.map +1 -1
  86. package/lib/socialPane.js +43 -124
  87. package/lib/socialPane.js.map +1 -1
  88. package/lib/tabbed/tabbedPane.js +1 -15
  89. package/lib/tabbed/tabbedPane.js.map +1 -1
  90. package/lib/tableViewPane.js +4 -7
  91. package/lib/tableViewPane.js.map +1 -1
  92. package/lib/test-import-export/common.js +2 -1
  93. package/lib/test-import-export/common.js.map +1 -1
  94. package/lib/test-import-export/edit-importer.js +7 -9
  95. package/lib/test-import-export/edit-importer.js.map +1 -1
  96. package/lib/transaction/pane.js +31 -90
  97. package/lib/transaction/pane.js.map +1 -1
  98. package/lib/transaction/period.js +20 -71
  99. package/lib/transaction/period.js.map +1 -1
  100. package/lib/trip/tripPane.js +30 -34
  101. package/lib/trip/tripPane.js.map +1 -1
  102. package/lib/trustedApplications/trustedApplications.dom.js +8 -34
  103. package/lib/trustedApplications/trustedApplications.dom.js.map +1 -1
  104. package/lib/trustedApplications/trustedApplications.test.js +3 -8
  105. package/lib/trustedApplications/trustedApplications.test.js.map +1 -1
  106. package/lib/trustedApplications/trustedApplications.utils.js +0 -10
  107. package/lib/trustedApplications/trustedApplications.utils.js.map +1 -1
  108. package/lib/trustedApplications/trustedApplications.view.js +1 -22
  109. package/lib/trustedApplications/trustedApplications.view.js.map +1 -1
  110. package/lib/ui/pane.js +22 -28
  111. package/lib/ui/pane.js.map +1 -1
  112. package/lib/versionInfo.d.ts +2 -0
  113. package/lib/versionInfo.d.ts.map +1 -1
  114. package/lib/versionInfo.js +18 -16
  115. package/lib/versionInfo.js.map +1 -1
  116. package/lib/video/videoPane.js +2 -5
  117. package/lib/video/videoPane.js.map +1 -1
  118. package/package.json +24 -24
  119. package/src/versionInfo.ts +18 -16
package/lib/socialPane.js CHANGED
@@ -1,17 +1,11 @@
1
1
  "use strict";
2
2
 
3
3
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
4
  var UI = _interopRequireWildcard(require("solid-ui"));
6
-
7
5
  var _solidLogic = require("solid-logic");
8
-
9
6
  var $rdf = _interopRequireWildcard(require("rdflib"));
10
-
11
7
  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); }
12
-
13
8
  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; }
14
-
15
9
  /* Social Pane
16
10
  **
17
11
  ** This outline pane provides social network functions
@@ -21,26 +15,23 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
21
15
  ** - Read and write both user-private (address book) and public data clearly
22
16
  ** -- todo: use common code to get username and load profile and set 'me'
23
17
  */
18
+
24
19
  module.exports = {
25
20
  icon: UI.icons.originalIconBase + 'foaf/foafTiny.gif',
26
21
  name: 'social',
27
22
  label: function label(subject, context) {
28
23
  var kb = context.session.store;
29
24
  var types = kb.findTypeURIs(subject);
30
-
31
25
  if (types[UI.ns.foaf('Person').uri] || types[UI.ns.vcard('Individual').uri]) {
32
26
  return 'Friends';
33
27
  }
34
-
35
28
  return null;
36
29
  },
37
30
  render: function render(s, context) {
38
31
  var dom = context.dom;
39
-
40
32
  var common = function common(x, y) {
41
33
  // Find common members of two lists
42
34
  var both = [];
43
-
44
35
  for (var i = 0; i < x.length; i++) {
45
36
  for (var j = 0; j < y.length; j++) {
46
37
  if (y[j].sameTerm(x[i])) {
@@ -49,24 +40,20 @@ module.exports = {
49
40
  }
50
41
  }
51
42
  }
52
-
53
43
  return both;
54
44
  };
55
-
56
45
  var people = function people(n) {
57
46
  var res = ' ';
58
47
  res += n || 'no';
59
48
  if (n === 1) return res + ' person';
60
49
  return res + ' people';
61
50
  };
62
-
63
51
  var say = function say(str) {
64
52
  console.log(str);
65
53
  var p = dom.createElement('p');
66
54
  p.textContent = str;
67
55
  tips.appendChild(p);
68
56
  };
69
-
70
57
  var link = function link(contents, uri) {
71
58
  if (!uri) return contents;
72
59
  var a = dom.createElement('a');
@@ -74,11 +61,9 @@ module.exports = {
74
61
  a.appendChild(contents);
75
62
  return a;
76
63
  };
77
-
78
64
  var text = function text(str) {
79
65
  return dom.createTextNode(str);
80
66
  };
81
-
82
67
  var buildCheckboxForm = function buildCheckboxForm(lab, statement, state) {
83
68
  var f = dom.createElement('form');
84
69
  var input = dom.createElement('input');
@@ -87,30 +72,25 @@ module.exports = {
87
72
  tx.className = 'question';
88
73
  f.appendChild(tx);
89
74
  input.setAttribute('type', 'checkbox');
90
-
91
75
  var boxHandler = function boxHandler(_e) {
92
- tx.className = 'pendingedit'; // alert('Should be greyed out')
93
-
76
+ tx.className = 'pendingedit';
77
+ // alert('Should be greyed out')
94
78
  if (this.checked) {
95
79
  // Add link
96
80
  try {
97
81
  outliner.UserInput.sparqler.insert_statement(statement, function (uri, success, errorBody) {
98
82
  tx.className = 'question';
99
-
100
83
  if (!success) {
101
84
  UI.log.alert(null, 'Message', 'Error occurs while inserting ' + statement + '\n\n' + errorBody);
102
85
  input.checked = false; // rollback UI
103
-
104
86
  return;
105
87
  }
106
-
107
88
  kb.add(statement.subject, statement.predicate, statement.object, statement.why);
108
89
  });
109
90
  } catch (e) {
110
91
  UI.log.error('Data write fails:' + e);
111
92
  UI.log.alert('Data write fails:' + e);
112
93
  input.checked = false; // rollback UI
113
-
114
94
  tx.className = 'question';
115
95
  }
116
96
  } else {
@@ -118,7 +98,6 @@ module.exports = {
118
98
  try {
119
99
  outliner.UserInput.sparqler.delete_statement(statement, function (uri, success, errorBody) {
120
100
  tx.className = 'question';
121
-
122
101
  if (!success) {
123
102
  UI.log.alert('Error occurs while deleting ' + statement + '\n\n' + errorBody);
124
103
  this.checked = true; // Rollback UI
@@ -138,19 +117,20 @@ module.exports = {
138
117
  input.addEventListener('click', boxHandler, false);
139
118
  return f;
140
119
  };
141
-
142
120
  var oneFriend = function oneFriend(friend, _confirmed) {
143
121
  return UI.widgets.personTR(dom, UI.ns.foaf('knows'), friend, {});
144
- }; // ////////// Body of render():
122
+ };
145
123
 
124
+ // ////////// Body of render():
146
125
 
147
126
  var outliner = context.getOutliner(dom);
148
127
  var kb = context.session.store;
149
128
  var div = dom.createElement('div');
150
129
  div.setAttribute('class', 'socialPane');
151
130
  var foaf = UI.ns.foaf;
152
- var vcard = UI.ns.vcard; // extracted from tabbedtab.css 2017-03-21
131
+ var vcard = UI.ns.vcard;
153
132
 
133
+ // extracted from tabbedtab.css 2017-03-21
154
134
  var navBlockStyle = 'background-color: #eee; width: 25%; border: 0; padding: 0.5em; margin: 0;';
155
135
  var mainBlockStyle = 'background-color: #fff; color: #000; width: 46%; margin: 0; border-left: 1px solid #ccc; border-right: 1px solid #ccc; border-bottom: 1px solid #ccc; padding: 0;';
156
136
  var foafPicStyle = ' width: 100% ; border: none; margin: 0; padding: 0;';
@@ -164,56 +144,50 @@ module.exports = {
164
144
  var mainTable = middle.appendChild(dom.createElement('table'));
165
145
  mainTable.style.cssText = mainBlockStyle;
166
146
  var tips = right;
167
- tips.style.cssText = navBlockStyle; // Image top left
147
+ tips.style.cssText = navBlockStyle;
168
148
 
149
+ // Image top left
169
150
  var src = kb.any(s, foaf('img')) || kb.any(s, foaf('depiction'));
170
-
171
151
  if (src) {
172
152
  var img = dom.createElement('IMG');
173
153
  img.setAttribute('src', src.uri); // w640 h480
174
154
  // img.className = 'foafPic'
175
-
176
155
  img.style.cssText = foafPicStyle;
177
156
  tools.appendChild(img);
178
157
  }
179
-
180
158
  var name = kb.anyValue(s, foaf('name')) || '???';
181
159
  var h3 = dom.createElement('H3');
182
160
  h3.appendChild(dom.createTextNode(name));
183
-
184
161
  var me = _solidLogic.authn.currentUser();
162
+ var meUri = me ? me.uri : null;
185
163
 
186
- var meUri = me ? me.uri : null; // @@ Add: event handler to redraw the stuff below when me changes.
187
-
164
+ // @@ Add: event handler to redraw the stuff below when me changes.
188
165
  var loginOutButton = UI.login.loginStatusBox(dom, function (webIdUri) {
189
- me = kb.sym(webIdUri); // @@ To be written: redraw as a function the new me
166
+ me = kb.sym(webIdUri);
167
+ // @@ To be written: redraw as a function the new me
190
168
  // @@ refresh the sidebars
191
-
192
169
  UI.widgets.refreshTree(div); // this refreshes the middle at least
193
170
  });
171
+
194
172
  tips.appendChild(loginOutButton);
195
173
  var thisIsYou = me && kb.sameThings(me, s);
196
- var knows = foaf('knows'); // var givenName = kb.sym('http://www.w3.org/2000/10/swap/pim/contact#givenName')
197
-
174
+ var knows = foaf('knows');
175
+ // var givenName = kb.sym('http://www.w3.org/2000/10/swap/pim/contact#givenName')
198
176
  var familiar = kb.anyValue(s, foaf('givenname')) || kb.anyValue(s, foaf('firstName')) || kb.anyValue(s, foaf('nick')) || kb.anyValue(s, foaf('name')) || kb.anyValue(s, vcard('fn'));
199
- var friends = kb.each(s, knows); // Do I have a public profile document?
177
+ var friends = kb.each(s, knows);
200
178
 
179
+ // Do I have a public profile document?
201
180
  var profile = null; // This could be SPARQL { ?me foaf:primaryTopic [ a foaf:PersonalProfileDocument ] }
202
-
203
181
  var editable = false;
204
182
  var incoming;
205
183
  var outgoing;
206
-
207
184
  if (me) {
208
185
  // The definition of FAF personal profile document is ..
209
186
  var works = kb.each(undefined, foaf('primaryTopic'), me); // having me as primary topic
210
-
211
187
  var message = '';
212
-
213
188
  for (var i = 0; i < works.length; i++) {
214
189
  if (kb.whether(works[i], UI.ns.rdf('type'), foaf('PersonalProfileDocument'))) {
215
190
  editable = outliner.UserInput.sparqler.editable(works[i].uri, kb);
216
-
217
191
  if (!editable) {
218
192
  message += 'Your profile <' + UI.utils.escapeForXML(works[i].uri) + '> is not remotely editable.';
219
193
  } else {
@@ -222,20 +196,20 @@ module.exports = {
222
196
  }
223
197
  }
224
198
  }
225
-
226
199
  if (!profile) {
227
200
  say(message + "\nI couldn't find your editable personal profile document.");
228
201
  } else {
229
- say('Editing your profile ' + profile + '.'); // Do I have an EDITABLE profile?
230
-
202
+ say('Editing your profile ' + profile + '.');
203
+ // Do I have an EDITABLE profile?
231
204
  editable = outliner.UserInput.sparqler.editable(profile.uri, kb);
232
205
  }
233
-
234
- if (thisIsYou) {// This is about me
206
+ if (thisIsYou) {
207
+ // This is about me
235
208
  // pass... @@
236
209
  } else {
237
210
  // This is about someone else
238
211
  // My relationship with this person
212
+
239
213
  h3 = dom.createElement('h3');
240
214
  h3.appendChild(dom.createTextNode('You and ' + familiar));
241
215
  tools.appendChild(h3);
@@ -243,181 +217,138 @@ module.exports = {
243
217
  incoming = kb.whether(s, knows, cme);
244
218
  outgoing = false;
245
219
  var outgoingSt = kb.statementsMatching(cme, knows, s);
246
-
247
220
  if (outgoingSt.length) {
248
221
  outgoing = true;
249
222
  if (!profile) profile = outgoingSt[0].why;
250
223
  }
251
-
252
224
  var _tr = dom.createElement('tr');
253
-
254
225
  tools.appendChild(_tr);
255
-
256
226
  var youAndThem = function youAndThem() {
257
227
  _tr.appendChild(link(text('You'), meUri));
258
-
259
228
  _tr.appendChild(text(' and '));
260
-
261
229
  _tr.appendChild(link(text(familiar), s.uri));
262
230
  };
263
-
264
231
  if (!incoming) {
265
232
  if (!outgoing) {
266
233
  youAndThem();
267
-
268
234
  _tr.appendChild(text(' have not said you know each other.'));
269
235
  } else {
270
236
  _tr.appendChild(link(text('You'), meUri));
271
-
272
237
  _tr.appendChild(text(' know '));
273
-
274
238
  _tr.appendChild(link(text(familiar), s.uri));
275
-
276
239
  _tr.appendChild(text(' (unconfirmed)'));
277
240
  }
278
241
  } else {
279
242
  if (!outgoing) {
280
243
  _tr.appendChild(link(text(familiar), s.uri));
281
-
282
244
  _tr.appendChild(text(' knows '));
283
-
284
245
  _tr.appendChild(link(text('you'), meUri));
285
-
286
246
  _tr.appendChild(text(' (unconfirmed).')); // @@
287
-
288
-
289
247
  _tr.appendChild(text(' confirm you know '));
290
-
291
248
  _tr.appendChild(link(text(familiar), s.uri));
292
-
293
249
  _tr.appendChild(text('.'));
294
250
  } else {
295
251
  youAndThem();
296
-
297
252
  _tr.appendChild(text(' say you know each other.'));
298
253
  }
299
254
  }
300
-
301
255
  if (editable) {
302
256
  var f = buildCheckboxForm('You know ' + familiar, new UI.rdf.Statement(me, knows, s, profile), outgoing);
303
257
  tools.appendChild(f);
304
258
  } // editable
305
- // //////////////// Mutual friends
306
-
307
259
 
260
+ // //////////////// Mutual friends
308
261
  if (friends) {
309
262
  var myFriends = kb.each(me, foaf('knows'));
310
-
311
263
  if (myFriends.length) {
312
264
  var mutualFriends = common(friends, myFriends);
313
-
314
265
  var _tr3 = dom.createElement('tr');
315
-
316
266
  tools.appendChild(_tr3);
317
-
318
267
  _tr3.appendChild(dom.createTextNode('You' + (familiar ? ' and ' + familiar : '') + ' know' + people(mutualFriends.length) + ' found in common'));
319
-
320
268
  if (mutualFriends) {
321
269
  for (var _i = 0; _i < mutualFriends.length; _i++) {
322
270
  _tr3.appendChild(dom.createTextNode(', ' + UI.utils.label(mutualFriends[_i])));
323
271
  }
324
272
  }
325
273
  }
326
-
327
274
  var _tr2 = dom.createElement('tr');
328
-
329
275
  tools.appendChild(_tr2);
330
276
  } // friends
331
-
332
277
  } // About someone else
333
-
334
278
  } // me is defined
335
279
  // End of you and s
280
+
336
281
  // div.appendChild(dom.createTextNode(plural(friends.length, 'acquaintance') +'. '))
282
+
337
283
  // ///////////////////////////////////////////// Main block
338
284
  //
339
285
  // Should: Find the intersection and difference sets
340
- // List all x such that s knows x.
341
-
342
286
 
287
+ // List all x such that s knows x.
343
288
  UI.widgets.attachmentList(dom, s, mainTable, {
344
289
  doc: profile,
345
290
  modify: !!editable,
346
291
  predicate: foaf('knows'),
347
292
  noun: 'friend'
348
- }); // Figure out which are reciprocated:
293
+ });
294
+
295
+ // Figure out which are reciprocated:
349
296
  // @@ Does not look up profiles
350
297
  // Does distinguish reciprocated from unreciprocated friendships
351
298
  //
352
-
353
299
  function triageFriends(s) {
354
300
  outgoing = kb.each(s, foaf('knows'));
355
301
  incoming = kb.each(undefined, foaf('knows'), s); // @@ have to load the friends
356
-
357
302
  var confirmed = [];
358
303
  var unconfirmed = [];
359
304
  var requests = [];
360
-
361
305
  for (var _i2 = 0; _i2 < outgoing.length; _i2++) {
362
306
  var friend = outgoing[_i2];
363
307
  var found = false;
364
-
365
308
  for (var j = 0; j < incoming.length; j++) {
366
309
  if (incoming[j].sameTerm(friend)) {
367
310
  found = true;
368
311
  break;
369
312
  }
370
313
  }
371
-
372
314
  if (found) confirmed.push(friend);else unconfirmed.push(friend);
373
315
  } // outgoing
374
316
 
375
-
376
317
  for (var _i3 = 0; _i3 < incoming.length; _i3++) {
377
- var _friend = incoming[_i3]; // var lab = UI.utils.label(friend)
378
-
318
+ var _friend = incoming[_i3];
319
+ // var lab = UI.utils.label(friend)
379
320
  var _found = false;
380
-
381
321
  for (var _j = 0; _j < outgoing.length; _j++) {
382
322
  if (outgoing[_j].sameTerm(_friend)) {
383
323
  _found = true;
384
324
  break;
385
325
  }
386
326
  }
387
-
388
327
  if (!_found) requests.push(_friend);
389
328
  } // incoming
390
329
 
391
-
392
330
  var cases = [['Acquaintances', outgoing], ['Mentioned as acquaintances by: ', requests]];
393
-
394
331
  for (var _i4 = 0; _i4 < cases.length; _i4++) {
395
332
  var thisCase = cases[_i4];
396
333
  var _friends = thisCase[1];
397
334
  if (_friends.length === 0) continue; // Skip empty sections (sure?)
398
335
 
399
336
  var _h = dom.createElement('h3');
400
-
401
337
  _h.textContent = thisCase[0];
402
338
  var htr = dom.createElement('tr');
403
339
  htr.appendChild(_h);
404
340
  mainTable.appendChild(htr);
405
341
  var items = [];
406
-
407
342
  for (var j9 = 0; j9 < _friends.length; j9++) {
408
343
  items.push([UI.utils.label(_friends[j9]), _friends[j9]]);
409
344
  }
410
-
411
345
  items.sort();
412
346
  var last = null;
413
347
  var fr = void 0;
414
-
415
348
  for (var j7 = 0; j7 < items.length; j7++) {
416
349
  fr = items[j7][1];
417
350
  if (fr.sameTerm(last)) continue; // unique
418
-
419
351
  last = fr;
420
-
421
352
  if (UI.utils.label(fr) !== '...') {
422
353
  // This check is to avoid bnodes with no labels attached
423
354
  // appearing in the friends list with "..." - Oshani
@@ -426,28 +357,26 @@ module.exports = {
426
357
  }
427
358
  }
428
359
  }
429
-
430
360
  if ($rdf.keepThisCodeForLaterButDisableFerossConstantConditionPolice) {
431
361
  triageFriends(s);
432
- } // //////////////////////////////////// Basic info on left
433
-
362
+ }
363
+ // //////////////////////////////////// Basic info on left
434
364
 
435
365
  h3 = dom.createElement('h3');
436
366
  h3.appendChild(dom.createTextNode('Basic Information'));
437
- tools.appendChild(h3); // For each home page like thing make a label which will
367
+ tools.appendChild(h3);
368
+
369
+ // For each home page like thing make a label which will
438
370
  // make sense and add the domain (like "w3.org blog") if there are more than one of the same type
439
371
  //
440
-
441
372
  var preds = [UI.ns.foaf('homepage'), UI.ns.foaf('weblog'), UI.ns.foaf('workplaceHomepage'), UI.ns.foaf('schoolHomepage')];
442
-
443
373
  for (var i6 = 0; i6 < preds.length; i6++) {
444
374
  var pred = preds[i6];
445
375
  var sts = kb.statementsMatching(s, pred);
446
-
447
- if (sts.length === 0) {// if (editable) say("No home page set. Use the blue + icon at the bottom of the main view to add information.")
376
+ if (sts.length === 0) {
377
+ // if (editable) say("No home page set. Use the blue + icon at the bottom of the main view to add information.")
448
378
  } else {
449
379
  var uris = [];
450
-
451
380
  for (var j5 = 0; j5 < sts.length; j5++) {
452
381
  var st = sts[j5];
453
382
  if (st.object.uri) uris.push(st.object.uri); // Ignore if not symbol
@@ -456,18 +385,14 @@ module.exports = {
456
385
  uris.sort();
457
386
  var last2 = '';
458
387
  var lab2 = void 0;
459
-
460
388
  for (var k = 0; k < uris.length; k++) {
461
389
  var uri = uris[k];
462
390
  if (uri === last2) continue; // uniques only
463
-
464
391
  last2 = uri;
465
392
  var hostlabel = '';
466
393
  lab2 = UI.utils.label(pred);
467
-
468
394
  if (uris.length > 1) {
469
395
  var l = uri.indexOf('//');
470
-
471
396
  if (l > 0) {
472
397
  var r = uri.indexOf('/', l + 2);
473
398
  var r2 = uri.lastIndexOf('.', r);
@@ -475,39 +400,33 @@ module.exports = {
475
400
  hostlabel = uri.slice(l + 2, r);
476
401
  }
477
402
  }
478
-
479
403
  if (hostlabel) lab2 = hostlabel + ' ' + lab2; // disambiguate
480
-
481
404
  var t = dom.createTextNode(lab2);
482
405
  var a = dom.createElement('a');
483
406
  a.appendChild(t);
484
407
  a.setAttribute('href', uri);
485
- var d = dom.createElement('div'); // d.className = 'social_linkButton'
486
-
408
+ var d = dom.createElement('div');
409
+ // d.className = 'social_linkButton'
487
410
  d.style.cssText = 'width: 80%; background-color: #fff; border: solid 0.05em #ccc; margin-top: 0.1em; margin-bottom: 0.1em; padding: 0.1em; text-align: center;';
488
411
  d.appendChild(a);
489
412
  tools.appendChild(d);
490
413
  }
491
414
  }
492
415
  }
493
-
494
416
  var preds2 = [UI.ns.foaf('openid'), UI.ns.foaf('nick')];
495
-
496
417
  for (var i2 = 0; i2 < preds2.length; i2++) {
497
418
  var _pred2 = preds2[i2];
498
419
  var sts2 = kb.statementsMatching(s, _pred2);
499
-
500
- if (sts2.length === 0) {// if (editable) say("No home page set. Use the blue + icon at the bottom of the main view to add information.")
420
+ if (sts2.length === 0) {
421
+ // if (editable) say("No home page set. Use the blue + icon at the bottom of the main view to add information.")
501
422
  } else {
502
423
  outliner.appendPropertyTRs(tools, sts2, false, function (_pred) {
503
424
  return true;
504
425
  });
505
426
  }
506
427
  }
507
-
508
428
  return div;
509
429
  } // render()
510
-
511
430
  }; //
512
431
  // ends
513
432
  //# sourceMappingURL=socialPane.js.map