solid-ui 2.4.28-e581c53c → 2.4.28-fda13292

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 (79) hide show
  1. package/dist/805.solid-ui.min.js +1 -1
  2. package/dist/805.solid-ui.min.js.map +1 -1
  3. package/dist/solid-ui.js +1402 -2163
  4. package/dist/solid-ui.js.map +1 -1
  5. package/dist/solid-ui.min.js +1 -1
  6. package/dist/solid-ui.min.js.map +1 -1
  7. package/dist/vendors-node_modules_jsonld_lib_jsonld_js.solid-ui.js +1955 -1955
  8. package/dist/vendors-node_modules_jsonld_lib_jsonld_js.solid-ui.js.map +1 -1
  9. package/lib/chat/bookmarks.js +7 -6
  10. package/lib/chat/bookmarks.js.map +1 -1
  11. package/lib/chat/chatLogic.js +65 -249
  12. package/lib/chat/chatLogic.js.map +1 -1
  13. package/lib/chat/dateFolder.js +126 -129
  14. package/lib/chat/dateFolder.js.map +1 -1
  15. package/lib/chat/infinite.js +423 -637
  16. package/lib/chat/infinite.js.map +1 -1
  17. package/lib/chat/message.js +193 -332
  18. package/lib/chat/message.js.map +1 -1
  19. package/lib/chat/messageTools.js +277 -463
  20. package/lib/chat/messageTools.js.map +1 -1
  21. package/lib/chat/thread.js +209 -299
  22. package/lib/chat/thread.js.map +1 -1
  23. package/lib/header/index.js +0 -5
  24. package/lib/header/index.js.map +1 -1
  25. package/lib/log.js +5 -5
  26. package/lib/log.js.map +1 -1
  27. package/lib/login/login.d.ts.map +1 -1
  28. package/lib/login/login.js +45 -83
  29. package/lib/login/login.js.map +1 -1
  30. package/lib/media/media-capture.d.ts +2 -2
  31. package/lib/media/media-capture.d.ts.map +1 -1
  32. package/lib/media/media-capture.js +11 -15
  33. package/lib/media/media-capture.js.map +1 -1
  34. package/lib/pad.d.ts +2 -2
  35. package/lib/pad.d.ts.map +1 -1
  36. package/lib/pad.js +15 -41
  37. package/lib/pad.js.map +1 -1
  38. package/lib/participation.d.ts +5 -5
  39. package/lib/participation.d.ts.map +1 -1
  40. package/lib/participation.js +24 -24
  41. package/lib/participation.js.map +1 -1
  42. package/lib/preferences.js +0 -4
  43. package/lib/preferences.js.map +1 -1
  44. package/lib/style.js +93 -85
  45. package/lib/style.js.map +1 -1
  46. package/lib/styleConstants.js +36 -0
  47. package/lib/styleConstants.js.map +1 -0
  48. package/lib/tabs.d.ts +0 -125
  49. package/lib/tabs.d.ts.map +1 -1
  50. package/lib/tabs.js +15 -8
  51. package/lib/tabs.js.map +1 -1
  52. package/lib/utils/headerFooterHelpers.js +0 -2
  53. package/lib/utils/headerFooterHelpers.js.map +1 -1
  54. package/lib/versionInfo.js +6 -6
  55. package/lib/versionInfo.js.map +1 -1
  56. package/lib/widgets/buttons.js +2 -0
  57. package/lib/widgets/buttons.js.map +1 -1
  58. package/lib/widgets/dragAndDrop.js +10 -18
  59. package/lib/widgets/dragAndDrop.js.map +1 -1
  60. package/lib/widgets/error.d.ts.map +1 -1
  61. package/lib/widgets/error.js +9 -2
  62. package/lib/widgets/error.js.map +1 -1
  63. package/lib/widgets/forms/autocomplete/autocompleteBar.js +1 -8
  64. package/lib/widgets/forms/autocomplete/autocompleteBar.js.map +1 -1
  65. package/lib/widgets/forms/autocomplete/autocompletePicker.d.ts.map +1 -1
  66. package/lib/widgets/forms/autocomplete/autocompletePicker.js +5 -9
  67. package/lib/widgets/forms/autocomplete/autocompletePicker.js.map +1 -1
  68. package/lib/widgets/forms/autocomplete/language.js +0 -5
  69. package/lib/widgets/forms/autocomplete/language.js.map +1 -1
  70. package/lib/widgets/forms/basic.d.ts.map +1 -1
  71. package/lib/widgets/forms/basic.js +5 -4
  72. package/lib/widgets/forms/basic.js.map +1 -1
  73. package/lib/widgets/forms/fieldParams.js +2 -2
  74. package/lib/widgets/forms/fieldParams.js.map +1 -1
  75. package/lib/widgets/forms.js +10 -12
  76. package/lib/widgets/forms.js.map +1 -1
  77. package/lib/widgets/peoplePicker.js +0 -11
  78. package/lib/widgets/peoplePicker.js.map +1 -1
  79. package/package.json +2 -3
@@ -34,30 +34,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
34
34
  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; }
35
35
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
36
36
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
37
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } /* eslint-disable camelcase */ /**
38
- * Signing in, signing up, profile and preferences reloading
39
- * Type index management
40
- *
41
- * Many functions in this module take a context object which
42
- * holds various RDF symbols, add to it, and return a promise of it.
43
- *
44
- * * `me` RDF symbol for the user's WebID
45
- * * `publicProfile` The user's public profile, iff loaded
46
- * * `preferencesFile` The user's personal preference file, iff loaded
47
- * * `index.public` The user's public type index file
48
- * * `index.private` The user's private type index file
49
- *
50
- * Not RDF symbols:
51
- * * `noun` A string in english for the type of thing -- like "address book"
52
- * * `instance` An array of nodes which are existing instances
53
- * * `containers` An array of nodes of containers of instances
54
- * * `div` A DOM element where UI can be displayed
55
- * * `statusArea` A DOM element (opt) progress stuff can be displayed, or error messages
56
- * *
57
- * * Vocabulary: "load" loads a file if it exists;
58
- * * 'Ensure" CREATES the file if it does not exist (if it can) and then loads it.
59
- * @packageDocumentation
60
- */ // eslint-disable-next-line camelcase
37
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
61
38
  var store = _solidLogic.solidLogicSingleton.store;
62
39
  var _solidLogicSingleton$ = _solidLogic.solidLogicSingleton.profile,
63
40
  loadPreferences = _solidLogicSingleton$.loadPreferences,
@@ -123,104 +100,93 @@ function ensureLoadedPreferences(_x) {
123
100
  // used to be logInLoadProfile
124
101
  function _ensureLoadedPreferences() {
125
102
  _ensureLoadedPreferences = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(context) {
126
- var statusArea, progressDisplay, complain, preferencesFile, m2;
103
+ var progressDisplay, preferencesFile, m2;
127
104
  return _regenerator["default"].wrap(function _callee4$(_context4) {
128
105
  while (1) switch (_context4.prev = _context4.next) {
129
106
  case 0:
130
- complain = function _complain(message) {
131
- message = "ensureLoadedPreferences: ".concat(message);
132
- if (statusArea) {
133
- // statusArea.innerHTML = ''
134
- statusArea.appendChild(widgets.errorMessageBlock(context.dom, message));
135
- }
136
- debug.log(message);
137
- // reject(new Error(message))
138
- };
139
107
  if (!context.preferencesFile) {
140
- _context4.next = 3;
108
+ _context4.next = 2;
141
109
  break;
142
110
  }
143
111
  return _context4.abrupt("return", Promise.resolve(context));
144
- case 3:
145
- // already done
146
- statusArea = context.statusArea || context.div || null;
147
- _context4.prev = 4;
148
- _context4.next = 7;
112
+ case 2:
113
+ _context4.prev = 2;
114
+ _context4.next = 5;
149
115
  return ensureLoadedProfile(context);
150
- case 7:
116
+ case 5:
151
117
  context = _context4.sent;
152
- _context4.next = 10;
118
+ _context4.next = 8;
153
119
  return loadPreferences(context.me);
154
- case 10:
120
+ case 8:
155
121
  preferencesFile = _context4.sent;
156
122
  if (progressDisplay) {
157
123
  progressDisplay.parentNode.removeChild(progressDisplay);
158
124
  }
159
125
  context.preferencesFile = preferencesFile;
160
- _context4.next = 51;
126
+ _context4.next = 49;
161
127
  break;
162
- case 15:
163
- _context4.prev = 15;
164
- _context4.t0 = _context4["catch"](4);
128
+ case 13:
129
+ _context4.prev = 13;
130
+ _context4.t0 = _context4["catch"](2);
165
131
  if (!(_context4.t0 instanceof _solidLogic.UnauthorizedError)) {
166
- _context4.next = 22;
132
+ _context4.next = 20;
167
133
  break;
168
134
  }
169
135
  m2 = 'Ooops - you are not authenticated (properly logged in) to for me to read your preference file. Try loggin out and logging in?';
170
136
  (0, _log.alert)(m2);
171
- _context4.next = 51;
137
+ _context4.next = 49;
172
138
  break;
173
- case 22:
139
+ case 20:
174
140
  if (!(_context4.t0 instanceof _solidLogic.CrossOriginForbiddenError)) {
175
- _context4.next = 28;
141
+ _context4.next = 26;
176
142
  break;
177
143
  }
178
144
  m2 = "Unauthorized: Assuming preference file blocked for origin ".concat(window.location.origin);
179
145
  context.preferencesFileError = m2;
180
146
  return _context4.abrupt("return", context);
181
- case 28:
147
+ case 26:
182
148
  if (!(_context4.t0 instanceof _solidLogic.SameOriginForbiddenError)) {
183
- _context4.next = 34;
149
+ _context4.next = 32;
184
150
  break;
185
151
  }
186
152
  m2 = 'You are not authorized to read your preference file. This may be because you are using an untrusted web app.';
187
153
  debug.warn(m2);
188
154
  return _context4.abrupt("return", context);
189
- case 34:
155
+ case 32:
190
156
  if (!(_context4.t0 instanceof _solidLogic.NotEditableError)) {
191
- _context4.next = 40;
157
+ _context4.next = 38;
192
158
  break;
193
159
  }
194
160
  m2 = 'You are not authorized to edit your preference file. This may be because you are using an untrusted web app.';
195
161
  debug.warn(m2);
196
162
  return _context4.abrupt("return", context);
197
- case 40:
163
+ case 38:
198
164
  if (!(_context4.t0 instanceof _solidLogic.WebOperationError)) {
199
- _context4.next = 45;
165
+ _context4.next = 43;
200
166
  break;
201
167
  }
202
168
  m2 = 'You are not authorized to edit your preference file. This may be because you are using an untrusted web app.';
203
169
  debug.warn(m2);
204
- _context4.next = 51;
170
+ _context4.next = 49;
205
171
  break;
206
- case 45:
172
+ case 43:
207
173
  if (!(_context4.t0 instanceof _solidLogic.FetchError)) {
208
- _context4.next = 50;
174
+ _context4.next = 48;
209
175
  break;
210
176
  }
211
177
  m2 = "Strange: Error ".concat(_context4.t0.status, " trying to read your preference file.").concat(_context4.t0.message);
212
178
  (0, _log.alert)(m2);
213
- _context4.next = 51;
179
+ _context4.next = 49;
214
180
  break;
215
- case 50:
181
+ case 48:
216
182
  throw new Error("(via loadPrefs) ".concat(_context4.t0));
217
- case 51:
183
+ case 49:
218
184
  return _context4.abrupt("return", context);
219
- case 52:
185
+ case 50:
220
186
  case "end":
221
187
  return _context4.stop();
222
188
  }
223
- }, _callee4, null, [[4, 15]]);
189
+ }, _callee4, null, [[2, 13]]);
224
190
  }));
225
191
  return _ensureLoadedPreferences.apply(this, arguments);
226
192
  }
@@ -437,6 +403,15 @@ function renderScopeHeadingRow(context, store, scope) {
437
403
  function registrationList(_x9, _x10) {
438
404
  return _registrationList.apply(this, arguments);
439
405
  } // registrationList
406
+ /**
407
+ * Bootstrapping identity
408
+ * (Called by `loginStatusBox()`)
409
+ *
410
+ * @param dom
411
+ * @param setUserCallback
412
+ *
413
+ * @returns
414
+ */
440
415
  function _registrationList() {
441
416
  _registrationList = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9(context, options) {
442
417
  var dom, div, box, scopes, table, tbody, _iterator2, _step2, scope, headingRow, items, _iterator3, _step3, _loop;
@@ -568,23 +543,10 @@ function _registrationList() {
568
543
  }));
569
544
  return _registrationList.apply(this, arguments);
570
545
  }
571
- function getDefaultSignInButtonStyle() {
572
- return 'padding: 1em; border-radius:0.5em; font-size: 100%;';
573
- }
574
-
575
- /**
576
- * Bootstrapping identity
577
- * (Called by `loginStatusBox()`)
578
- *
579
- * @param dom
580
- * @param setUserCallback
581
- *
582
- * @returns
583
- */
584
546
  function signInOrSignUpBox(dom, setUserCallback) {
585
547
  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
586
548
  options = options || {};
587
- var signInButtonStyle = options.buttonStyle || getDefaultSignInButtonStyle();
549
+ var signInButtonStyle = options.buttonStyle || style.signInAndUpButtonStyle;
588
550
  var box = dom.createElement('div');
589
551
  var magicClassName = 'SolidSignInOrSignUpBox';
590
552
  debug.log('widgets.signInOrSignUpBox');
@@ -597,7 +559,7 @@ function signInOrSignUpBox(dom, setUserCallback) {
597
559
  box.appendChild(signInPopUpButton);
598
560
  signInPopUpButton.setAttribute('type', 'button');
599
561
  signInPopUpButton.setAttribute('value', 'Log in');
600
- signInPopUpButton.setAttribute('style', "".concat(signInButtonStyle, "background-color: #eef;").concat(style.headerBannerLoginInput));
562
+ signInPopUpButton.setAttribute('style', "".concat(signInButtonStyle).concat(style.headerBannerLoginInput) + style.signUpBackground);
601
563
  _solidLogic.authSession.onLogin(function () {
602
564
  var me = _solidLogic.authn.currentUser();
603
565
  // const sessionInfo = authSession.info
@@ -638,7 +600,7 @@ function signInOrSignUpBox(dom, setUserCallback) {
638
600
  box.appendChild(signupButton);
639
601
  signupButton.setAttribute('type', 'button');
640
602
  signupButton.setAttribute('value', 'Sign Up for Solid');
641
- signupButton.setAttribute('style', "".concat(signInButtonStyle, "background-color: #efe;").concat(style.headerBannerLoginInput));
603
+ signupButton.setAttribute('style', "".concat(signInButtonStyle).concat(style.headerBannerLoginInput) + style.signInBackground);
642
604
  signupButton.addEventListener('click', function (_event) {
643
605
  var signupMgr = new _signup.Signup();
644
606
  signupMgr.signup().then(function (uri) {
@@ -806,7 +768,7 @@ function loginStatusBox(dom) {
806
768
  });
807
769
  }
808
770
  function logoutButton(me, options) {
809
- var signInButtonStyle = options.buttonStyle || getDefaultSignInButtonStyle();
771
+ var signInButtonStyle = options.buttonStyle || style.signInAndUpButtonStyle;
810
772
  var logoutLabel = 'WebID logout';
811
773
  if (me) {
812
774
  var nick = _solidLogic.solidLogicSingleton.store.any(me, ns.foaf('nick')) || _solidLogic.solidLogicSingleton.store.any(me, ns.foaf('name'));
@@ -818,7 +780,7 @@ function loginStatusBox(dom) {
818
780
  // signOutButton.className = 'WebIDCancelButton'
819
781
  signOutButton.setAttribute('type', 'button');
820
782
  signOutButton.setAttribute('value', logoutLabel);
821
- signOutButton.setAttribute('style', "".concat(signInButtonStyle, "background-color: #eee;"));
783
+ signOutButton.setAttribute('style', "".concat(signInButtonStyle));
822
784
  signOutButton.addEventListener('click', logoutButtonHandler, false);
823
785
  return signOutButton;
824
786
  }