solid-ui 2.6.1-05fb7cc → 2.6.1-082c090

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 (115) hide show
  1. package/README.md +4 -4
  2. package/dist/acl/access-controller.js +38 -93
  3. package/dist/acl/access-controller.js.map +1 -1
  4. package/dist/acl/access-groups.d.ts +2 -2
  5. package/dist/acl/access-groups.d.ts.map +1 -1
  6. package/dist/acl/access-groups.js +62 -111
  7. package/dist/acl/access-groups.js.map +1 -1
  8. package/dist/acl/acl-control.js +22 -66
  9. package/dist/acl/acl-control.js.map +1 -1
  10. package/dist/acl/acl.js +53 -108
  11. package/dist/acl/acl.js.map +1 -1
  12. package/dist/acl/add-agent-buttons.js +29 -72
  13. package/dist/acl/add-agent-buttons.js.map +1 -1
  14. package/dist/acl/index.js +25 -28
  15. package/dist/acl/index.js.map +1 -1
  16. package/dist/acl/types.js +1 -2
  17. package/dist/acl/types.js.map +1 -1
  18. package/dist/chat/keys.js +36 -78
  19. package/dist/chat/keys.js.map +1 -1
  20. package/dist/chat/signature.js +15 -23
  21. package/dist/chat/signature.js.map +1 -1
  22. package/dist/create/create.js +15 -54
  23. package/dist/create/create.js.map +1 -1
  24. package/dist/create/index.js +3 -6
  25. package/dist/create/index.js.map +1 -1
  26. package/dist/create/types.js +1 -2
  27. package/dist/debug.d.ts.map +1 -1
  28. package/dist/debug.js +4 -14
  29. package/dist/debug.js.map +1 -1
  30. package/dist/footer/index.js +13 -18
  31. package/dist/footer/index.js.map +1 -1
  32. package/dist/header/empty-profile.js +1 -4
  33. package/dist/header/empty-profile.js.map +1 -1
  34. package/dist/header/index.js +54 -99
  35. package/dist/header/index.js.map +1 -1
  36. package/dist/iconBase.js +5 -8
  37. package/dist/iconBase.js.map +1 -1
  38. package/dist/index.d.ts +4 -6
  39. package/dist/index.d.ts.map +1 -1
  40. package/dist/index.js +40 -108
  41. package/dist/index.js.map +1 -1
  42. package/dist/log.d.ts.map +1 -1
  43. package/dist/log.js +19 -36
  44. package/dist/log.js.map +1 -1
  45. package/dist/login/login.js +92 -144
  46. package/dist/login/login.js.map +1 -1
  47. package/dist/matrix/index.js +3 -6
  48. package/dist/matrix/index.js.map +1 -1
  49. package/dist/matrix/matrix.js +5 -41
  50. package/dist/matrix/matrix.js.map +1 -1
  51. package/dist/matrix/types.js +1 -2
  52. package/dist/media/index.js +4 -7
  53. package/dist/media/index.js.map +1 -1
  54. package/dist/media/media-capture.js +13 -50
  55. package/dist/media/media-capture.js.map +1 -1
  56. package/dist/pad.js +80 -100
  57. package/dist/pad.js.map +1 -1
  58. package/dist/participation.d.ts.map +1 -1
  59. package/dist/participation.js +43 -87
  60. package/dist/participation.js.map +1 -1
  61. package/dist/solid-ui.esm.js +24 -42
  62. package/dist/solid-ui.esm.js.map +1 -1
  63. package/dist/solid-ui.esm.min.js +3 -3
  64. package/dist/solid-ui.esm.min.js.map +1 -1
  65. package/dist/solid-ui.js +23 -44
  66. package/dist/solid-ui.js.map +1 -1
  67. package/dist/solid-ui.min.js +8 -8
  68. package/dist/solid-ui.min.js.map +1 -1
  69. package/dist/tabs.js +18 -28
  70. package/dist/tabs.js.map +1 -1
  71. package/dist/utils/headerFooterHelpers.d.ts.map +1 -1
  72. package/dist/utils/headerFooterHelpers.js +19 -27
  73. package/dist/utils/headerFooterHelpers.js.map +1 -1
  74. package/dist/utils/keyHelpers/accessData.js +16 -60
  75. package/dist/utils/keyHelpers/accessData.js.map +1 -1
  76. package/dist/utils/keyHelpers/acl.js +11 -49
  77. package/dist/utils/keyHelpers/acl.js.map +1 -1
  78. package/dist/utils/keyHelpers/otherHelpers.js +6 -12
  79. package/dist/utils/keyHelpers/otherHelpers.js.map +1 -1
  80. package/dist/utils/label.js +22 -61
  81. package/dist/utils/label.js.map +1 -1
  82. package/dist/versionInfo.js +3 -5
  83. package/dist/versionInfo.js.map +1 -1
  84. package/dist/widgets/buttons/iconLinks.js +4 -9
  85. package/dist/widgets/buttons/iconLinks.js.map +1 -1
  86. package/dist/widgets/buttons.js +146 -221
  87. package/dist/widgets/buttons.js.map +1 -1
  88. package/dist/widgets/error.d.ts +12 -0
  89. package/dist/widgets/error.d.ts.map +1 -1
  90. package/dist/widgets/error.js +8 -15
  91. package/dist/widgets/error.js.map +1 -1
  92. package/dist/widgets/forms/autocomplete/autocompleteBar.js +21 -60
  93. package/dist/widgets/forms/autocomplete/autocompleteBar.js.map +1 -1
  94. package/dist/widgets/forms/autocomplete/autocompleteField.js +33 -69
  95. package/dist/widgets/forms/autocomplete/autocompleteField.js.map +1 -1
  96. package/dist/widgets/forms/autocomplete/autocompletePicker.js +22 -62
  97. package/dist/widgets/forms/autocomplete/autocompletePicker.js.map +1 -1
  98. package/dist/widgets/forms/autocomplete/language.js +21 -64
  99. package/dist/widgets/forms/autocomplete/language.js.map +1 -1
  100. package/dist/widgets/forms/autocomplete/publicData.js +81 -128
  101. package/dist/widgets/forms/autocomplete/publicData.js.map +1 -1
  102. package/dist/widgets/forms/basic.js +37 -46
  103. package/dist/widgets/forms/basic.js.map +1 -1
  104. package/dist/widgets/forms/comment.js +10 -16
  105. package/dist/widgets/forms/comment.js.map +1 -1
  106. package/dist/widgets/forms/fieldFunction.js +10 -15
  107. package/dist/widgets/forms/fieldFunction.js.map +1 -1
  108. package/dist/widgets/forms/fieldParams.js +21 -27
  109. package/dist/widgets/forms/fieldParams.js.map +1 -1
  110. package/dist/widgets/forms/formStyle.d.ts.map +1 -1
  111. package/dist/widgets/forms/formStyle.js +10 -17
  112. package/dist/widgets/forms/formStyle.js.map +1 -1
  113. package/dist/widgets/widgetHelpers.js +5 -11
  114. package/dist/widgets/widgetHelpers.js.map +1 -1
  115. package/package.json +7 -8
package/dist/solid-ui.js CHANGED
@@ -416,22 +416,18 @@ module.exports = vocab
416
416
  /* harmony export */ });
417
417
  function log() {
418
418
  var _console;
419
- // eslint-disable-next-line no-console
420
419
  (_console = console).log.apply(_console, arguments);
421
420
  }
422
421
  function warn() {
423
422
  var _console2;
424
- // eslint-disable-next-line no-console
425
423
  (_console2 = console).warn.apply(_console2, arguments);
426
424
  }
427
425
  function error() {
428
426
  var _console3;
429
- // eslint-disable-next-line no-console
430
427
  (_console3 = console).error.apply(_console3, arguments);
431
428
  }
432
429
  function trace() {
433
430
  var _console4;
434
- // eslint-disable-next-line no-console
435
431
  (_console4 = console).trace.apply(_console4, arguments);
436
432
  }
437
433
 
@@ -1055,7 +1051,6 @@ __webpack_require__.r(__webpack_exports__);
1055
1051
  __webpack_require__.d(__webpack_exports__, {
1056
1052
  acl: () => (/* reexport */ acl),
1057
1053
  aclControl: () => (/* reexport */ aclControl),
1058
- authn: () => (/* reexport */ external_SolidLogic_.authn),
1059
1054
  create: () => (/* reexport */ create),
1060
1055
  createTypes: () => (/* reexport */ types_namespaceObject),
1061
1056
  dom: () => (/* binding */ src_dom),
@@ -1073,8 +1068,6 @@ __webpack_require__.d(__webpack_exports__, {
1073
1068
  pad: () => (/* reexport */ pad_namespaceObject),
1074
1069
  participation: () => (/* reexport */ participation_namespaceObject),
1075
1070
  preferences: () => (/* reexport */ preferences_namespaceObject),
1076
- rdf: () => (/* reexport */ external_$rdf_),
1077
- store: () => (/* reexport */ external_SolidLogic_.store),
1078
1071
  style: () => (/* reexport */ style),
1079
1072
  table: () => (/* reexport */ renderTableViewPane),
1080
1073
  tabs: () => (/* reexport */ tabs_namespaceObject),
@@ -1335,11 +1328,11 @@ __webpack_require__.d(tabs_namespaceObject, {
1335
1328
  var types_namespaceObject = {};
1336
1329
  __webpack_require__.r(types_namespaceObject);
1337
1330
 
1338
- // EXTERNAL MODULE: external "$rdf"
1339
- var external_$rdf_ = __webpack_require__(264);
1340
1331
  // EXTERNAL MODULE: ./node_modules/solid-namespace/index.js
1341
1332
  var solid_namespace = __webpack_require__(386);
1342
1333
  var solid_namespace_default = /*#__PURE__*/__webpack_require__.n(solid_namespace);
1334
+ // EXTERNAL MODULE: external "$rdf"
1335
+ var external_$rdf_ = __webpack_require__(264);
1343
1336
  ;// ./src/ns.js
1344
1337
  // Namespaces we commonly use and have common prefixes for around Solid
1345
1338
 
@@ -1438,7 +1431,6 @@ function log(str) {
1438
1431
  logArea.appendChild(addendum);
1439
1432
  }
1440
1433
  } else if (typeof console !== 'undefined') {
1441
- // eslint-disable-next-line no-console
1442
1434
  console.log(str);
1443
1435
  }
1444
1436
  }
@@ -1631,7 +1623,7 @@ function label_label(thing) {
1631
1623
  // Also encoded character in what was filenames like @ [] {}
1632
1624
  try {
1633
1625
  s = s.split('/').map(decodeURIComponent).join('/'); // If it is properly encoded
1634
- } catch (e) {
1626
+ } catch (_e) {
1635
1627
  // try individual decoding of ASCII code points
1636
1628
  for (var i = s.length - 3; i > 0; i--) {
1637
1629
  var hex = '0123456789abcefABCDEF'; // The while upacks multiple layers of encoding
@@ -3138,7 +3130,7 @@ function predParentOf(node) {
3138
3130
  * Meanwhile the stack is dumped to the console for the developer, so you actually know
3139
3131
  * where it happened!
3140
3132
  */
3141
- /* eslint-disable no-console */
3133
+
3142
3134
 
3143
3135
 
3144
3136
 
@@ -4543,8 +4535,6 @@ function _defineProperty(e, r, t) {
4543
4535
  }
4544
4536
 
4545
4537
  ;// ./src/signup/config-default.js
4546
-
4547
-
4548
4538
  /**
4549
4539
  * Provides a simple configuration object for Solid web client and other
4550
4540
  * modules.
@@ -4767,9 +4757,6 @@ function fieldFunction(dom, fieldInQuestion) {
4767
4757
 
4768
4758
 
4769
4759
  var STYLE_URI_PREFIX = 'https://www.w3.org/ns/css#';
4770
-
4771
- /* eslint-disable no-console */
4772
-
4773
4760
  function setFieldStyle(ele, field) {
4774
4761
  var classUri = mostSpecificClassURI(field);
4775
4762
  var params = fieldParams[classUri] || {};
@@ -4789,7 +4776,7 @@ function setFieldStyle(ele, field) {
4789
4776
  var cssAttribute = st.predicate.uri.slice(STYLE_URI_PREFIX.length);
4790
4777
  try {
4791
4778
  ele.style[cssAttribute] = st.object.value;
4792
- } catch (err) {
4779
+ } catch (_err) {
4793
4780
  console.warn("setFieldStyle: Error setting element style ".concat(cssAttribute, " to \"").concat(st.object.value, "\""));
4794
4781
  console.warn("setFieldStyle: ... Element tagName was \"".concat(ele.tagName || '???', "\""));
4795
4782
  }
@@ -5047,7 +5034,7 @@ function basicField(dom, container, already, subject, form, doc, callbackFunctio
5047
5034
  * including filtering resut by natural language etc
5048
5035
  * See https://solidos.solidcommunity.net/public/2021/01%20Building%20Solid%20Apps%20which%20use%20Public%20Data.html
5049
5036
  */
5050
- /* eslint-disable no-console */
5037
+
5051
5038
 
5052
5039
  // import * as logic from '../index'
5053
5040
  // import { authn } from '../../../authn/index'
@@ -10245,7 +10232,7 @@ function loginStatusBox(dom) {
10245
10232
  me = null;
10246
10233
  try {
10247
10234
  log_alert(message);
10248
- } catch (e) {
10235
+ } catch (_e) {
10249
10236
  window.alert(message);
10250
10237
  }
10251
10238
  box.refresh();
@@ -11185,13 +11172,13 @@ var AccessGroups = /*#__PURE__*/function () {
11185
11172
  // @@ was LiveStore but does not need to be connected to web
11186
11173
 
11187
11174
  function AccessGroups(doc, aclDoc, controller, store) {
11188
- var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
11175
+ var _options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
11189
11176
  classCallCheck_classCallCheck(this, AccessGroups);
11190
11177
  this.doc = doc;
11191
11178
  this.aclDoc = aclDoc;
11192
11179
  this.controller = controller;
11193
- this.options = options;
11194
- this.defaults = options.defaults || false;
11180
+ this._options = _options;
11181
+ this.defaults = this._options.defaults || false;
11195
11182
  this._store = store;
11196
11183
  this.aclMap = readACL(doc, aclDoc, store, this.defaults);
11197
11184
  this.byCombo = ACLbyCombination(this.aclMap);
@@ -13105,8 +13092,8 @@ var PeoplePicker = /*#__PURE__*/function () {
13105
13092
  return resolve({
13106
13093
  book: book
13107
13094
  });
13108
- })["catch"](function (err) {
13109
- return reject(new Error('Could not load address book ' + err));
13095
+ })["catch"](function (errr) {
13096
+ return reject(new Error('Could not load address book ' + errr));
13110
13097
  });
13111
13098
  });
13112
13099
  });
@@ -19250,16 +19237,16 @@ function participationObject(subject, padDoc, me) {
19250
19237
  // If I am not already recorded
19251
19238
  resolve(parps[0]); // returns the participation object
19252
19239
  } else {
19253
- var _participation2 = newThing(padDoc);
19254
- var ins = [(0,external_$rdf_.st)(subject, src_ns.wf('participation'), _participation2, padDoc), (0,external_$rdf_.st)(_participation2, src_ns.wf('participant'), me, padDoc), (0,external_$rdf_.st)(_participation2, src_ns.cal('dtstart'), new Date(), padDoc), (0,external_$rdf_.st)(_participation2, src_ns.ui('backgroundColor'), lightColorHash(me), padDoc)];
19240
+ var _participation = newThing(padDoc);
19241
+ var ins = [(0,external_$rdf_.st)(subject, src_ns.wf('participation'), _participation, padDoc), (0,external_$rdf_.st)(_participation, src_ns.wf('participant'), me, padDoc), (0,external_$rdf_.st)(_participation, src_ns.cal('dtstart'), new Date(), padDoc), (0,external_$rdf_.st)(_participation, src_ns.ui('backgroundColor'), lightColorHash(me), padDoc)];
19255
19242
  participation_store.updater.update([], ins, function (uri, ok, errorMessage) {
19256
19243
  if (!ok) {
19257
19244
  reject(new Error('Error recording your participation: ' + errorMessage));
19258
19245
  } else {
19259
- resolve(_participation2);
19246
+ resolve(_participation);
19260
19247
  }
19261
19248
  });
19262
- resolve(_participation2);
19249
+ resolve(_participation);
19263
19250
  }
19264
19251
  });
19265
19252
  }
@@ -19317,9 +19304,8 @@ function manageParticipation(dom, container, padDoc, subject, me, options) {
19317
19304
  var table = dom.createElement('table');
19318
19305
  container.appendChild(table);
19319
19306
  renderParticipants(dom, table, padDoc, subject, me, options);
19320
- var _participation;
19321
19307
  try {
19322
- _participation = recordParticipation(subject, padDoc, table);
19308
+ recordParticipation(subject, padDoc, table);
19323
19309
  } catch (e) {
19324
19310
  container.appendChild(errorMessageBlock(dom, 'Error recording your participation: ' + e)); // Clean up?
19325
19311
  }
@@ -20104,13 +20090,11 @@ var bookmarks_UI = {
20104
20090
  ns: src_ns,
20105
20091
  media: media,
20106
20092
  pad: pad_namespaceObject,
20107
- rdf: external_$rdf_,
20108
20093
  style: style,
20109
20094
  utils: utils_namespaceObject,
20110
20095
  widgets: widgets_namespaceObject
20111
20096
  };
20112
- var bookmarks_$rdf = bookmarks_UI.rdf;
20113
- var BOOK = bookmarks_$rdf.Namespace('http://www.w3.org/2002/01/bookmark#');
20097
+ var BOOK = external_$rdf_.Namespace('http://www.w3.org/2002/01/bookmark#');
20114
20098
  var BOOKMARK_ICON = 'noun_45961.svg';
20115
20099
  var label = label_label;
20116
20100
  var dom = window.document || null;
@@ -20167,7 +20151,7 @@ function _findBookmarkDocument() {
20167
20151
  break;
20168
20152
  }
20169
20153
  // publicProfile or preferencesFile
20170
- newBookmarkFile = bookmarks_$rdf.sym(userContext.publicProfile.dir().uri + fileTail);
20154
+ newBookmarkFile = external_$rdf_.sym(userContext.publicProfile.dir().uri + fileTail);
20171
20155
  _context.prev = 3;
20172
20156
  src_debug/* log */.Rm('Creating new bookmark file ' + newBookmarkFile);
20173
20157
  _context.next = 4;
@@ -20232,7 +20216,7 @@ function _addBookmark() {
20232
20216
  title = label(author) + ': ' + external_SolidLogic_.store.anyValue(target, src_ns.sioc('content')).slice(0, 80); // @@ add chat title too?
20233
20217
  bookmarkDoc = context.bookmarkDocument;
20234
20218
  bookmark = bookmarks_UI.widgets.newThing(bookmarkDoc, title);
20235
- ins = [bookmarks_$rdf.st(bookmarkDoc, bookmarks_UI.ns.dct('references'), bookmark, bookmarkDoc), bookmarks_$rdf.st(bookmark, bookmarks_UI.ns.rdf('type'), BOOK('Bookmark'), bookmarkDoc), bookmarks_$rdf.st(bookmark, bookmarks_UI.ns.dct('created'), new Date(), bookmarkDoc), bookmarks_$rdf.st(bookmark, BOOK('recalls'), target, bookmarkDoc), bookmarks_$rdf.st(bookmark, bookmarks_UI.ns.foaf('maker'), me, bookmarkDoc), bookmarks_$rdf.st(bookmark, bookmarks_UI.ns.dct('title'), title, bookmarkDoc)];
20219
+ ins = [external_$rdf_.st(bookmarkDoc, bookmarks_UI.ns.dct('references'), bookmark, bookmarkDoc), external_$rdf_.st(bookmark, bookmarks_UI.ns.rdf('type'), BOOK('Bookmark'), bookmarkDoc), external_$rdf_.st(bookmark, bookmarks_UI.ns.dct('created'), new Date(), bookmarkDoc), external_$rdf_.st(bookmark, BOOK('recalls'), target, bookmarkDoc), external_$rdf_.st(bookmark, bookmarks_UI.ns.foaf('maker'), me, bookmarkDoc), external_$rdf_.st(bookmark, bookmarks_UI.ns.dct('title'), title, bookmarkDoc)];
20236
20220
  _context2.prev = 2;
20237
20221
  _context2.next = 3;
20238
20222
  return updatePromise([], ins);
@@ -25527,17 +25511,16 @@ https://github.com/solidos/solid
25527
25511
 
25528
25512
  /**
25529
25513
  * Provides a Solid client helper object (which exposes various static modules).
25530
- * @module solidUi.js
25531
- * @main solidUi.js
25514
+ * @module UI.js
25515
+ * @main UI.js
25532
25516
  */
25533
25517
 
25534
25518
  /**
25535
- * @class SolidUi
25519
+ * @class UI
25536
25520
  * @static
25537
25521
  */
25538
25522
 
25539
25523
  // REMOVE @ts-ignore as you migrate files to TypeScript
25540
- // pull in first avoid cross-refs
25541
25524
  // @ts-ignore
25542
25525
 
25543
25526
 
@@ -25570,16 +25553,12 @@ https://github.com/solidos/solid
25570
25553
 
25571
25554
 
25572
25555
 
25573
-
25574
25556
  var src_dom = window ? window.document : null; // Idea that UI.dom can be adapted in non-browser environments
25575
25557
 
25576
25558
  if (typeof window !== 'undefined') {
25577
25559
  ;
25578
25560
  window.UI = {
25579
- authn: external_SolidLogic_.authn,
25580
- store: external_SolidLogic_.store,
25581
25561
  ns: src_ns,
25582
- rdf: external_$rdf_,
25583
25562
  acl: acl,
25584
25563
  aclControl: aclControl,
25585
25564
  create: create,