solid-ui 2.4.28-6f763399 → 2.4.28-75c05c1d

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 (49) hide show
  1. package/dist/solid-ui.js +385 -405
  2. package/dist/solid-ui.js.map +1 -1
  3. package/dist/solid-ui.min.js +1 -1
  4. package/dist/solid-ui.min.js.map +1 -1
  5. package/lib/login/login.d.ts.map +1 -1
  6. package/lib/login/login.js +44 -59
  7. package/lib/login/login.js.map +1 -1
  8. package/lib/media/media-capture.d.ts +2 -2
  9. package/lib/media/media-capture.d.ts.map +1 -1
  10. package/lib/media/media-capture.js +11 -15
  11. package/lib/media/media-capture.js.map +1 -1
  12. package/lib/pad.d.ts +2 -2
  13. package/lib/pad.d.ts.map +1 -1
  14. package/lib/pad.js +15 -38
  15. package/lib/pad.js.map +1 -1
  16. package/lib/participation.d.ts +6 -6
  17. package/lib/participation.d.ts.map +1 -1
  18. package/lib/participation.js +24 -23
  19. package/lib/participation.js.map +1 -1
  20. package/lib/style.js +93 -85
  21. package/lib/style.js.map +1 -1
  22. package/lib/styleConstants.js +36 -0
  23. package/lib/styleConstants.js.map +1 -0
  24. package/lib/tabs.d.ts +0 -125
  25. package/lib/tabs.d.ts.map +1 -1
  26. package/lib/tabs.js +15 -8
  27. package/lib/tabs.js.map +1 -1
  28. package/lib/utils/keyHelpers/accessData.d.ts +0 -1
  29. package/lib/utils/keyHelpers/accessData.d.ts.map +1 -1
  30. package/lib/utils/keyHelpers/accessData.js +93 -135
  31. package/lib/utils/keyHelpers/accessData.js.map +1 -1
  32. package/lib/versionInfo.js +6 -6
  33. package/lib/versionInfo.js.map +1 -1
  34. package/lib/widgets/dragAndDrop.js +10 -18
  35. package/lib/widgets/dragAndDrop.js.map +1 -1
  36. package/lib/widgets/error.d.ts.map +1 -1
  37. package/lib/widgets/error.js +9 -2
  38. package/lib/widgets/error.js.map +1 -1
  39. package/lib/widgets/forms/autocomplete/autocompletePicker.d.ts.map +1 -1
  40. package/lib/widgets/forms/autocomplete/autocompletePicker.js +2 -1
  41. package/lib/widgets/forms/autocomplete/autocompletePicker.js.map +1 -1
  42. package/lib/widgets/forms/basic.d.ts.map +1 -1
  43. package/lib/widgets/forms/basic.js +5 -4
  44. package/lib/widgets/forms/basic.js.map +1 -1
  45. package/lib/widgets/forms/fieldParams.js +2 -2
  46. package/lib/widgets/forms/fieldParams.js.map +1 -1
  47. package/lib/widgets/forms.js +9 -8
  48. package/lib/widgets/forms.js.map +1 -1
  49. package/package.json +1 -1
package/dist/solid-ui.js CHANGED
@@ -6831,104 +6831,93 @@ function ensureLoadedPreferences(_x) {
6831
6831
  // used to be logInLoadProfile
6832
6832
  function _ensureLoadedPreferences() {
6833
6833
  _ensureLoadedPreferences = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(context) {
6834
- var statusArea, progressDisplay, complain, preferencesFile, m2;
6834
+ var progressDisplay, preferencesFile, m2;
6835
6835
  return _regenerator["default"].wrap(function _callee4$(_context4) {
6836
6836
  while (1) switch (_context4.prev = _context4.next) {
6837
6837
  case 0:
6838
- complain = function _complain(message) {
6839
- message = "ensureLoadedPreferences: ".concat(message);
6840
- if (statusArea) {
6841
- // statusArea.innerHTML = ''
6842
- statusArea.appendChild(widgets.errorMessageBlock(context.dom, message));
6843
- }
6844
- debug.log(message);
6845
- // reject(new Error(message))
6846
- };
6847
6838
  if (!context.preferencesFile) {
6848
- _context4.next = 3;
6839
+ _context4.next = 2;
6849
6840
  break;
6850
6841
  }
6851
6842
  return _context4.abrupt("return", Promise.resolve(context));
6852
- case 3:
6853
- // already done
6854
- statusArea = context.statusArea || context.div || null;
6855
- _context4.prev = 4;
6856
- _context4.next = 7;
6843
+ case 2:
6844
+ _context4.prev = 2;
6845
+ _context4.next = 5;
6857
6846
  return ensureLoadedProfile(context);
6858
- case 7:
6847
+ case 5:
6859
6848
  context = _context4.sent;
6860
- _context4.next = 10;
6849
+ _context4.next = 8;
6861
6850
  return loadPreferences(context.me);
6862
- case 10:
6851
+ case 8:
6863
6852
  preferencesFile = _context4.sent;
6864
6853
  if (progressDisplay) {
6865
6854
  progressDisplay.parentNode.removeChild(progressDisplay);
6866
6855
  }
6867
6856
  context.preferencesFile = preferencesFile;
6868
- _context4.next = 51;
6857
+ _context4.next = 49;
6869
6858
  break;
6870
- case 15:
6871
- _context4.prev = 15;
6872
- _context4.t0 = _context4["catch"](4);
6859
+ case 13:
6860
+ _context4.prev = 13;
6861
+ _context4.t0 = _context4["catch"](2);
6873
6862
  if (!(_context4.t0 instanceof _solidLogic.UnauthorizedError)) {
6874
- _context4.next = 22;
6863
+ _context4.next = 20;
6875
6864
  break;
6876
6865
  }
6877
6866
  m2 = 'Ooops - you are not authenticated (properly logged in) to for me to read your preference file. Try loggin out and logging in?';
6878
6867
  (0, _log.alert)(m2);
6879
- _context4.next = 51;
6868
+ _context4.next = 49;
6880
6869
  break;
6881
- case 22:
6870
+ case 20:
6882
6871
  if (!(_context4.t0 instanceof _solidLogic.CrossOriginForbiddenError)) {
6883
- _context4.next = 28;
6872
+ _context4.next = 26;
6884
6873
  break;
6885
6874
  }
6886
6875
  m2 = "Unauthorized: Assuming preference file blocked for origin ".concat(window.location.origin);
6887
6876
  context.preferencesFileError = m2;
6888
6877
  return _context4.abrupt("return", context);
6889
- case 28:
6878
+ case 26:
6890
6879
  if (!(_context4.t0 instanceof _solidLogic.SameOriginForbiddenError)) {
6891
- _context4.next = 34;
6880
+ _context4.next = 32;
6892
6881
  break;
6893
6882
  }
6894
6883
  m2 = 'You are not authorized to read your preference file. This may be because you are using an untrusted web app.';
6895
6884
  debug.warn(m2);
6896
6885
  return _context4.abrupt("return", context);
6897
- case 34:
6886
+ case 32:
6898
6887
  if (!(_context4.t0 instanceof _solidLogic.NotEditableError)) {
6899
- _context4.next = 40;
6888
+ _context4.next = 38;
6900
6889
  break;
6901
6890
  }
6902
6891
  m2 = 'You are not authorized to edit your preference file. This may be because you are using an untrusted web app.';
6903
6892
  debug.warn(m2);
6904
6893
  return _context4.abrupt("return", context);
6905
- case 40:
6894
+ case 38:
6906
6895
  if (!(_context4.t0 instanceof _solidLogic.WebOperationError)) {
6907
- _context4.next = 45;
6896
+ _context4.next = 43;
6908
6897
  break;
6909
6898
  }
6910
6899
  m2 = 'You are not authorized to edit your preference file. This may be because you are using an untrusted web app.';
6911
6900
  debug.warn(m2);
6912
- _context4.next = 51;
6901
+ _context4.next = 49;
6913
6902
  break;
6914
- case 45:
6903
+ case 43:
6915
6904
  if (!(_context4.t0 instanceof _solidLogic.FetchError)) {
6916
- _context4.next = 50;
6905
+ _context4.next = 48;
6917
6906
  break;
6918
6907
  }
6919
6908
  m2 = "Strange: Error ".concat(_context4.t0.status, " trying to read your preference file.").concat(_context4.t0.message);
6920
6909
  (0, _log.alert)(m2);
6921
- _context4.next = 51;
6910
+ _context4.next = 49;
6922
6911
  break;
6923
- case 50:
6912
+ case 48:
6924
6913
  throw new Error("(via loadPrefs) ".concat(_context4.t0));
6925
- case 51:
6914
+ case 49:
6926
6915
  return _context4.abrupt("return", context);
6927
- case 52:
6916
+ case 50:
6928
6917
  case "end":
6929
6918
  return _context4.stop();
6930
6919
  }
6931
- }, _callee4, null, [[4, 15]]);
6920
+ }, _callee4, null, [[2, 13]]);
6932
6921
  }));
6933
6922
  return _ensureLoadedPreferences.apply(this, arguments);
6934
6923
  }
@@ -7145,6 +7134,15 @@ function renderScopeHeadingRow(context, store, scope) {
7145
7134
  function registrationList(_x9, _x10) {
7146
7135
  return _registrationList.apply(this, arguments);
7147
7136
  } // registrationList
7137
+ /**
7138
+ * Bootstrapping identity
7139
+ * (Called by `loginStatusBox()`)
7140
+ *
7141
+ * @param dom
7142
+ * @param setUserCallback
7143
+ *
7144
+ * @returns
7145
+ */
7148
7146
  function _registrationList() {
7149
7147
  _registrationList = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9(context, options) {
7150
7148
  var dom, div, box, scopes, table, tbody, _iterator2, _step2, scope, headingRow, items, _iterator3, _step3, _loop;
@@ -7276,23 +7274,10 @@ function _registrationList() {
7276
7274
  }));
7277
7275
  return _registrationList.apply(this, arguments);
7278
7276
  }
7279
- function getDefaultSignInButtonStyle() {
7280
- return 'padding: 1em; border-radius:0.5em; font-size: 100%;';
7281
- }
7282
-
7283
- /**
7284
- * Bootstrapping identity
7285
- * (Called by `loginStatusBox()`)
7286
- *
7287
- * @param dom
7288
- * @param setUserCallback
7289
- *
7290
- * @returns
7291
- */
7292
7277
  function signInOrSignUpBox(dom, setUserCallback) {
7293
7278
  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
7294
7279
  options = options || {};
7295
- var signInButtonStyle = options.buttonStyle || getDefaultSignInButtonStyle();
7280
+ var signInButtonStyle = options.buttonStyle || style.signInAndUpButtonStyle;
7296
7281
  var box = dom.createElement('div');
7297
7282
  var magicClassName = 'SolidSignInOrSignUpBox';
7298
7283
  debug.log('widgets.signInOrSignUpBox');
@@ -7305,7 +7290,7 @@ function signInOrSignUpBox(dom, setUserCallback) {
7305
7290
  box.appendChild(signInPopUpButton);
7306
7291
  signInPopUpButton.setAttribute('type', 'button');
7307
7292
  signInPopUpButton.setAttribute('value', 'Log in');
7308
- signInPopUpButton.setAttribute('style', "".concat(signInButtonStyle, "background-color: #eef;").concat(style.headerBannerLoginInput));
7293
+ signInPopUpButton.setAttribute('style', "".concat(signInButtonStyle).concat(style.headerBannerLoginInput) + style.signUpBackground);
7309
7294
  _solidLogic.authSession.onLogin(function () {
7310
7295
  var me = _solidLogic.authn.currentUser();
7311
7296
  // const sessionInfo = authSession.info
@@ -7346,7 +7331,7 @@ function signInOrSignUpBox(dom, setUserCallback) {
7346
7331
  box.appendChild(signupButton);
7347
7332
  signupButton.setAttribute('type', 'button');
7348
7333
  signupButton.setAttribute('value', 'Sign Up for Solid');
7349
- signupButton.setAttribute('style', "".concat(signInButtonStyle, "background-color: #efe;").concat(style.headerBannerLoginInput));
7334
+ signupButton.setAttribute('style', "".concat(signInButtonStyle).concat(style.headerBannerLoginInput) + style.signInBackground);
7350
7335
  signupButton.addEventListener('click', function (_event) {
7351
7336
  var signupMgr = new _signup.Signup();
7352
7337
  signupMgr.signup().then(function (uri) {
@@ -7514,7 +7499,7 @@ function loginStatusBox(dom) {
7514
7499
  });
7515
7500
  }
7516
7501
  function logoutButton(me, options) {
7517
- var signInButtonStyle = options.buttonStyle || getDefaultSignInButtonStyle();
7502
+ var signInButtonStyle = options.buttonStyle || style.signInAndUpButtonStyle;
7518
7503
  var logoutLabel = 'WebID logout';
7519
7504
  if (me) {
7520
7505
  var nick = _solidLogic.solidLogicSingleton.store.any(me, ns.foaf('nick')) || _solidLogic.solidLogicSingleton.store.any(me, ns.foaf('name'));
@@ -7526,7 +7511,7 @@ function loginStatusBox(dom) {
7526
7511
  // signOutButton.className = 'WebIDCancelButton'
7527
7512
  signOutButton.setAttribute('type', 'button');
7528
7513
  signOutButton.setAttribute('value', logoutLabel);
7529
- signOutButton.setAttribute('style', "".concat(signInButtonStyle, "background-color: #eee;"));
7514
+ signOutButton.setAttribute('style', "".concat(signInButtonStyle));
7530
7515
  signOutButton.addEventListener('click', logoutButtonHandler, false);
7531
7516
  return signOutButton;
7532
7517
  }
@@ -8265,21 +8250,21 @@ var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime
8265
8250
  var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/asyncToGenerator.js"));
8266
8251
  var debug = _interopRequireWildcard(__webpack_require__(/*! ../debug */ "./lib/debug.js"));
8267
8252
  var _iconBase = __webpack_require__(/*! ../iconBase */ "./lib/iconBase.js");
8253
+ var style = _interopRequireWildcard(__webpack_require__(/*! ../style */ "./lib/style.js"));
8268
8254
  var widgets = _interopRequireWildcard(__webpack_require__(/*! ../widgets */ "./lib/widgets/index.js"));
8269
8255
  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); }
8270
8256
  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; }
8271
- /// /////////////////////////////////////////////
8272
8257
  //
8273
8258
  // Media input widget
8274
8259
  //
8275
8260
  //
8276
8261
  // Workflow:
8277
- // The HTML5 functionality (on mobille) is to prompt for either
8278
- // a realtime camera capture , OR a selection from images already ont the device
8262
+ // The HTML5 functionality (on mobile) is to prompt for either
8263
+ // a realtime camera capture, OR a selection from images already on the device
8279
8264
  // (eg camera roll).
8280
8265
  //
8281
- // The solid alternative is to either take a phtoto
8282
- // or access cemra roll (etc) OR to access solid cloud storage of favorite photo almbums.
8266
+ // The solid alternative is to either take a photo
8267
+ // or access camera roll (etc) OR to access solid cloud storage of favorite photo albums.
8283
8268
  // (Especially latest taken ones)
8284
8269
  //
8285
8270
 
@@ -8288,10 +8273,6 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
8288
8273
  var cameraIcon = _iconBase.icons.iconBase + 'noun_Camera_1618446_000000.svg'; // Get it from github
8289
8274
  var retakeIcon = _iconBase.icons.iconBase + 'noun_479395.svg'; // Get it from github
8290
8275
 
8291
- var canvasWidth = '640';
8292
- var canvasHeight = '480';
8293
- var controlStyle = "border-radius: 0.5em; margin: 0.8em; width: ".concat(canvasWidth, "; height:").concat(canvasHeight, ";");
8294
- // const controlStyle = 'border-radius: 0.5em; margin: 0.8em; width: 320; height:240;'
8295
8276
  var contentType = 'image/png';
8296
8277
 
8297
8278
  /** A control to capture a picture using camera
@@ -8336,7 +8317,7 @@ function cameraCaptureControl(dom, store, getImageDoc, doneCallback) {
8336
8317
  player = main.appendChild(dom.createElement('video'));
8337
8318
  player.setAttribute('controls', '1');
8338
8319
  player.setAttribute('autoplay', '1');
8339
- player.setAttribute('style', controlStyle);
8320
+ player.setAttribute('style', style.controlStyle);
8340
8321
  if (!navigator.mediaDevices) {
8341
8322
  throw new Error('navigator.mediaDevices not available');
8342
8323
  }
@@ -8358,9 +8339,9 @@ function cameraCaptureControl(dom, store, getImageDoc, doneCallback) {
8358
8339
  function grabCanvas() {
8359
8340
  // Draw the video frame to the canvas.
8360
8341
  canvas = dom.createElement('canvas');
8361
- canvas.setAttribute('width', canvasWidth);
8362
- canvas.setAttribute('height', canvasHeight);
8363
- canvas.setAttribute('style', controlStyle);
8342
+ canvas.setAttribute('width', style.canvasWidth);
8343
+ canvas.setAttribute('height', style.canvasHeight);
8344
+ canvas.setAttribute('style', style.controlStyle);
8364
8345
  main.appendChild(canvas);
8365
8346
  var context = canvas.getContext('2d');
8366
8347
  context.drawImage(player, 0, 0, canvas.width, canvas.height);
@@ -8417,9 +8398,9 @@ function cameraCaptureControl(dom, store, getImageDoc, doneCallback) {
8417
8398
  * @param {IndexedForumla} store - The quadstore to store data in
8418
8399
  * @param {fuunction} getImageDoc - returns NN of the image file to be created
8419
8400
  * @param {function<Node>} doneCallback - called with the image taken
8420
- * @returns {DomElement} - A div element with the buton in it
8401
+ * @returns {DomElement} - A div element with the button in it
8421
8402
  *
8422
- * This expacts the buttton to a large control when it is pressed
8403
+ * This expands the button to a large control when it is pressed
8423
8404
  */
8424
8405
 
8425
8406
  function cameraButton(dom, store, getImageDoc, doneCallback) {
@@ -8857,10 +8838,10 @@ Object.defineProperty(exports, "recordParticipation", ({
8857
8838
  return _participation.recordParticipation;
8858
8839
  }
8859
8840
  }));
8860
- Object.defineProperty(exports, "renderPartipants", ({
8841
+ Object.defineProperty(exports, "renderParticipants", ({
8861
8842
  enumerable: true,
8862
8843
  get: function get() {
8863
- return _participation.renderPartipants;
8844
+ return _participation.renderParticipants;
8864
8845
  }
8865
8846
  }));
8866
8847
  exports.xmlEncode = xmlEncode;
@@ -8878,6 +8859,7 @@ var _widgets = __webpack_require__(/*! ./widgets */ "./lib/widgets/index.js");
8878
8859
  var _utils = __webpack_require__(/*! ./utils */ "./lib/utils/index.js");
8879
8860
  var _debug = __webpack_require__(/*! ./debug */ "./lib/debug.js");
8880
8861
  var _solidLogic = __webpack_require__(/*! solid-logic */ "./node_modules/solid-logic/lib/index.js");
8862
+ var style = _interopRequireWildcard(__webpack_require__(/*! ./style */ "./lib/style.js"));
8881
8863
  var _participation = __webpack_require__(/*! ./participation */ "./lib/participation.js");
8882
8864
  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); }
8883
8865
  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; }
@@ -8942,7 +8924,7 @@ function lightColorHash(author) {
8942
8924
  /** notepad
8943
8925
  *
8944
8926
  * @param {HTMLDocument} dom - the web page of the browser
8945
- * @param {NamedNode} padDoc - the document into which the particpation should be shown
8927
+ * @param {NamedNode} padDoc - the document in which the participation should be shown
8946
8928
  * @param {NamedNode} subject - the thing in which participation is happening
8947
8929
  * @param {NamedNode} me - person who is logged into the pod
8948
8930
  * @param {notepadOptions} options - the options that can be passed in consist of statusArea, exists
@@ -8955,7 +8937,7 @@ function notepad(dom, padDoc, subject, me, options) {
8955
8937
  if (me && !me.uri) throw new Error('UI.pad.notepad: Invalid userid');
8956
8938
  var updater = store.updater;
8957
8939
  var PAD = (0, _rdflib.Namespace)('http://www.w3.org/ns/pim/pad#');
8958
- table.setAttribute('style', 'padding: 1em; overflow: auto; resize: horizontal; min-width: 40em;');
8940
+ table.setAttribute('style', style.notepadStyle);
8959
8941
  var upstreamStatus = null;
8960
8942
  var downstreamStatus = null;
8961
8943
  if (options.statusArea) {
@@ -8964,10 +8946,10 @@ function notepad(dom, padDoc, subject, me, options) {
8964
8946
  upstreamStatus = tr.appendChild(dom.createElement('td'));
8965
8947
  downstreamStatus = tr.appendChild(dom.createElement('td'));
8966
8948
  if (upstreamStatus) {
8967
- upstreamStatus.setAttribute('style', 'width:50%');
8949
+ upstreamStatus.setAttribute('style', style.upstreamStatus);
8968
8950
  }
8969
8951
  if (downstreamStatus) {
8970
- downstreamStatus.setAttribute('style', 'width:50%');
8952
+ downstreamStatus.setAttribute('style', style.downstreamStatus);
8971
8953
  }
8972
8954
  }
8973
8955
  /* @@ TODO want to look into this, it seems upstream should be a boolean and default to false ?
@@ -8990,9 +8972,9 @@ function notepad(dom, padDoc, subject, me, options) {
8990
8972
  var setPartStyle = function setPartStyle(part, colors, pending) {
8991
8973
  var chunk = part.subject;
8992
8974
  colors = colors || '';
8993
- var baseStyle = 'font-size: 100%; font-family: monospace; width: 100%; border: none; white-space: pre-wrap;';
8994
- var headingCore = 'font-family: sans-serif; font-weight: bold; border: none;';
8995
- var headingStyle = ['font-size: 110%; padding-top: 0.5em; padding-bottom: 0.5em; width: 100%;', 'font-size: 120%; padding-top: 1em; padding-bottom: 1em; width: 100%;', 'font-size: 150%; padding-top: 1em; padding-bottom: 1em; width: 100%;'];
8975
+ var baseStyle = style.baseStyle;
8976
+ var headingCore = style.headingCore;
8977
+ var headingStyle = style.headingStyle;
8996
8978
  var author = kb.any(chunk, ns.dc('author'));
8997
8979
  if (!colors && author) {
8998
8980
  // Hash the user webid for now -- later allow user selection!
@@ -9004,9 +8986,9 @@ function notepad(dom, padDoc, subject, me, options) {
9004
8986
  // and when the indent is stored as a Number itself, not in an object.
9005
8987
  var indent = kb.any(chunk, PAD('indent'));
9006
8988
  indent = indent ? indent.value : 0;
9007
- var style = indent >= 0 ? baseStyle + 'text-indent: ' + indent * 3 + 'em;' : headingCore + headingStyle[-1 - indent];
8989
+ var localStyle = indent >= 0 ? baseStyle + 'text-indent: ' + indent * 3 + 'em;' : headingCore + headingStyle[-1 - indent];
9008
8990
  // ? baseStyle + 'padding-left: ' + (indent * 3) + 'em;'
9009
- part.setAttribute('style', style + colors);
8991
+ part.setAttribute('style', localStyle + colors);
9010
8992
  };
9011
8993
  var removePart = function removePart(part) {
9012
8994
  var chunk = part.subject;
@@ -9086,28 +9068,6 @@ function notepad(dom, padDoc, subject, me, options) {
9086
9068
  });
9087
9069
  };
9088
9070
 
9089
- // Use this sort of code to split the line when return pressed in the middle @@
9090
- /*
9091
- function doGetCaretPosition doGetCaretPosition (oField) {
9092
- var iCaretPos = 0
9093
- // IE Support
9094
- if (document.selection) {
9095
- // Set focus on the element to avoid IE bug
9096
- oField.focus()
9097
- // To get cursor position, get empty selection range
9098
- var oSel = document.selection.createRange()
9099
- // Move selection start to 0 position
9100
- oSel.moveStart('character', -oField.value.length)
9101
- // The caret position is selection length
9102
- iCaretPos = oSel.text.length
9103
- // Firefox suppor
9104
- } else if (oField.selectionStart || oField.selectionStart === '0') {
9105
- iCaretPos = oField.selectionStart
9106
- }
9107
- // Return results
9108
- return (iCaretPos)
9109
- }
9110
- */
9111
9071
  var addListeners = function addListeners(part, chunk) {
9112
9072
  part.addEventListener('keydown', function (event) {
9113
9073
  if (!updater) {
@@ -9148,9 +9108,9 @@ function notepad(dom, padDoc, subject, me, options) {
9148
9108
  // contents need to be sent again
9149
9109
  part.state = 4; // delete me
9150
9110
  return;
9151
- case 3: // being deleted already
9111
+ case 3: // already being deleted
9152
9112
  case 4:
9153
- // already deleme state
9113
+ // already deleted state
9154
9114
  return;
9155
9115
  case undefined:
9156
9116
  case 0:
@@ -9451,8 +9411,6 @@ function notepad(dom, padDoc, subject, me, options) {
9451
9411
  }
9452
9412
  return;
9453
9413
  }
9454
- // var last = kb.the(undefined, PAD('previous'), subject)
9455
- // var chunk = first // = kb.the(subject, PAD('next'));
9456
9414
  var row;
9457
9415
 
9458
9416
  // First see which of the logical chunks have existing physical manifestations
@@ -9514,7 +9472,7 @@ function notepad(dom, padDoc, subject, me, options) {
9514
9472
  (0, _debug.log)(' reloaded OK');
9515
9473
  clearStatus();
9516
9474
  if (!consistencyCheck()) {
9517
- complain('CONSITENCY CHECK FAILED');
9475
+ complain('CONSISTENCY CHECK FAILED');
9518
9476
  } else {
9519
9477
  refreshTree(table);
9520
9478
  }
@@ -9681,7 +9639,7 @@ Object.defineProperty(exports, "__esModule", ({
9681
9639
  exports.manageParticipation = manageParticipation;
9682
9640
  exports.participationObject = participationObject;
9683
9641
  exports.recordParticipation = recordParticipation;
9684
- exports.renderPartipants = renderPartipants;
9642
+ exports.renderParticipants = renderParticipants;
9685
9643
  var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"));
9686
9644
  var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"));
9687
9645
  var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/assertThisInitialized.js"));
@@ -9696,6 +9654,8 @@ var ns = _interopRequireWildcard(__webpack_require__(/*! ./ns */ "./lib/ns.js"))
9696
9654
  var _widgets = __webpack_require__(/*! ./widgets */ "./lib/widgets/index.js");
9697
9655
  var _utils = __webpack_require__(/*! ./utils */ "./lib/utils/index.js");
9698
9656
  var _pad = __webpack_require__(/*! ./pad */ "./lib/pad.js");
9657
+ var style = _interopRequireWildcard(__webpack_require__(/*! ./style */ "./lib/style.js"));
9658
+ var _styleConstants = _interopRequireDefault(__webpack_require__(/*! ./styleConstants */ "./lib/styleConstants.js"));
9699
9659
  var _solidLogic = __webpack_require__(/*! solid-logic */ "./node_modules/solid-logic/lib/index.js");
9700
9660
  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); }
9701
9661
  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; }
@@ -9728,11 +9688,11 @@ var store = _solidLogic.solidLogicSingleton.store;
9728
9688
  * @param {NamedNode} unused1/document - the document to render (this argument is no longer used, but left in for backwards compatibility)
9729
9689
  * @param {NamedNode} subject - the thing in which the participation is happening
9730
9690
  * @param {NamedNode} unused2/me - user that is logged into the pod (this argument is no longer used, but left in for backwards compatibility)
9731
- * @param {ParticipationOptions} options - the options that can be passed in are deleteFunction, link, and draggable these are used by the personTR button
9691
+ * @param {ParticipationOptions} options - the options that can be passed in are deleteFunction, link, and draggable; these are used by the personTR button
9732
9692
  */
9733
- function renderPartipants(dom, table, unused1, subject, unused2, options) {
9734
- table.setAttribute('style', 'margin: 0.8em;');
9735
- var newRowForParticpation = function newRowForParticpation(parp) {
9693
+ function renderParticipants(dom, table, unused1, subject, unused2, options) {
9694
+ table.setAttribute('style', style.participantsStyle);
9695
+ var newRowForParticipation = function newRowForParticipation(parp) {
9736
9696
  var person = store.any(parp, ns.wf('participant'));
9737
9697
  var tr;
9738
9698
  if (!person) {
@@ -9740,13 +9700,14 @@ function renderPartipants(dom, table, unused1, subject, unused2, options) {
9740
9700
  tr.textContent = '???'; // Don't crash - invalid part'n entry
9741
9701
  return tr;
9742
9702
  }
9743
- var bg = store.anyValue(parp, ns.ui('backgroundColor')) || 'white';
9703
+ var bg = store.anyValue(parp, ns.ui('backgroundColor')) || _styleConstants["default"].participationDefaultBackground;
9744
9704
  var block = dom.createElement('div');
9745
- block.setAttribute('style', 'height: 1.5em; width: 1.5em; margin: 0.3em; border 0.01em solid #888; background-color: ' + bg);
9705
+ block.setAttribute('style', style.participantsBlock);
9706
+ block.style.backgroundColor = bg;
9746
9707
  tr = (0, _widgets.personTR)(dom, null, person, options);
9747
9708
  table.appendChild(tr);
9748
9709
  var td = dom.createElement('td');
9749
- td.setAttribute('style', 'vertical-align: middle;');
9710
+ td.setAttribute('style', style.personTableTD);
9750
9711
  td.appendChild(block);
9751
9712
  tr.insertBefore(td, tr.firstChild);
9752
9713
  return tr;
@@ -9760,16 +9721,16 @@ function renderPartipants(dom, table, unused1, subject, unused2, options) {
9760
9721
  var participations = parps.map(function (p) {
9761
9722
  return p[1];
9762
9723
  });
9763
- (0, _utils.syncTableToArray)(table, participations, newRowForParticpation);
9724
+ (0, _utils.syncTableToArray)(table, participations, newRowForParticipation);
9764
9725
  };
9765
9726
  table.refresh = syncTable;
9766
9727
  syncTable();
9767
9728
  return table;
9768
9729
  }
9769
9730
 
9770
- /** Record, or find old, Particpation object
9731
+ /** Record, or find old, Participation object
9771
9732
  *
9772
- * A particpaption object is a place to record things specifically about
9733
+ * A participation object is a place to record things specifically about
9773
9734
  * subject and the user, such as preferences, start of membership, etc
9774
9735
  * @param {NamedNode} subject - the thing in which the participation is happening
9775
9736
  * @param {NamedNode} document - where to record the data
@@ -9804,20 +9765,20 @@ function participationObject(subject, padDoc, me) {
9804
9765
  }
9805
9766
  candidates.sort(); // Pick the earliest
9806
9767
  // @@ Possibly, for extra credit, delete the others, if we have write access
9807
- debug.warn('Multiple particpation objects, picking earliest, in ' + padDoc);
9768
+ debug.warn('Multiple participation objects, picking earliest, in ' + padDoc);
9808
9769
  resolve(candidates[0][1]);
9809
9770
  // throw new Error('Multiple records of your participation')
9810
9771
  }
9811
9772
 
9812
9773
  if (parps.length) {
9813
9774
  // If I am not already recorded
9814
- resolve(parps[0]); // returns the particpation object
9775
+ resolve(parps[0]); // returns the participation object
9815
9776
  } else {
9816
9777
  var _participation2 = (0, _widgets.newThing)(padDoc);
9817
9778
  var ins = [(0, _rdflib.st)(subject, ns.wf('participation'), _participation2, padDoc), (0, _rdflib.st)(_participation2, ns.wf('participant'), me, padDoc), (0, _rdflib.st)(_participation2, ns.cal('dtstart'), new Date(), padDoc), (0, _rdflib.st)(_participation2, ns.ui('backgroundColor'), (0, _pad.lightColorHash)(me), padDoc)];
9818
9779
  store.updater.update([], ins, function (uri, ok, errorMessage) {
9819
9780
  if (!ok) {
9820
- reject(new Error('Error recording your partipation: ' + errorMessage));
9781
+ reject(new Error('Error recording your participation: ' + errorMessage));
9821
9782
  } else {
9822
9783
  resolve(_participation2);
9823
9784
  }
@@ -9830,7 +9791,7 @@ function participationObject(subject, padDoc, me) {
9830
9791
  /** Record my participation and display participants
9831
9792
  *
9832
9793
  * @param {NamedNode} subject - the thing in which participation is happening
9833
- * @param {NamedNode} padDoc - the document into which the particpation should be recorded
9794
+ * @param {NamedNode} padDoc - the document into which the participation should be recorded
9834
9795
  * @param {DOMNode} refreshable - a DOM element whose refresh() is to be called if the change works
9835
9796
  *
9836
9797
  */
@@ -9846,24 +9807,22 @@ function recordParticipation(subject, padDoc, refreshable) {
9846
9807
  }
9847
9808
  if (parps.length) {
9848
9809
  // If I am not already recorded
9849
- return parps[0]; // returns the particpation object
9810
+ return parps[0]; // returns the participation object
9850
9811
  } else {
9851
9812
  if (!store.updater.editable(padDoc)) {
9852
- debug.log('Not recording participation, as no write acesss as ' + me + ' to ' + padDoc);
9813
+ debug.log('Not recording participation, as no write access as ' + me + ' to ' + padDoc);
9853
9814
  return null;
9854
9815
  }
9855
9816
  var participation = (0, _widgets.newThing)(padDoc);
9856
9817
  var ins = [(0, _rdflib.st)(subject, ns.wf('participation'), participation, padDoc), (0, _rdflib.st)(participation, ns.wf('participant'), me, padDoc), (0, _rdflib.st)(participation, ns.cal('dtstart'), new Date(), padDoc), (0, _rdflib.st)(participation, ns.ui('backgroundColor'), (0, _pad.lightColorHash)(me), padDoc)];
9857
9818
  store.updater.update([], ins, function (uri, ok, errorMessage) {
9858
9819
  if (!ok) {
9859
- throw new Error('Error recording your partipation: ' + errorMessage);
9820
+ throw new Error('Error recording your participation: ' + errorMessage);
9860
9821
  }
9861
9822
  if (refreshable && refreshable.refresh) {
9862
9823
  refreshable.refresh();
9863
9824
  }
9864
- // UI.pad.renderPartipants(dom, table, padDoc, subject, me, options)
9865
9825
  });
9866
-
9867
9826
  return participation;
9868
9827
  }
9869
9828
  }
@@ -9872,7 +9831,7 @@ function recordParticipation(subject, padDoc, refreshable) {
9872
9831
  *
9873
9832
  * @param {Document} dom - the web page loaded into the browser
9874
9833
  * @param {HTMLDivElement} container - the container element where the participants should be displayed
9875
- * @param {NamedNode} document - the document into which the particpation should be shown
9834
+ * @param {NamedNode} document - the document into which the participation should be shown
9876
9835
  * @param {NamedNode} subject - the thing in which participation is happening
9877
9836
  * @param {NamedNode} me - the logged in user
9878
9837
  * @param {ParticipationOptions} options - the options that can be passed in are deleteFunction, link, and draggable these are used by the personTR button
@@ -9881,12 +9840,12 @@ function recordParticipation(subject, padDoc, refreshable) {
9881
9840
  function manageParticipation(dom, container, padDoc, subject, me, options) {
9882
9841
  var table = dom.createElement('table');
9883
9842
  container.appendChild(table);
9884
- renderPartipants(dom, table, padDoc, subject, me, options);
9843
+ renderParticipants(dom, table, padDoc, subject, me, options);
9885
9844
  var _participation;
9886
9845
  try {
9887
9846
  _participation = recordParticipation(subject, padDoc, table);
9888
9847
  } catch (e) {
9889
- container.appendChild((0, _widgets.errorMessageBlock)(dom, 'Error recording your partipation: ' + e)); // Clean up?
9848
+ container.appendChild((0, _widgets.errorMessageBlock)(dom, 'Error recording your participation: ' + e)); // Clean up?
9890
9849
  }
9891
9850
 
9892
9851
  return table;
@@ -10260,41 +10219,34 @@ Signup.prototype.signup = function signup(signupUrl) {
10260
10219
  /*!**********************!*\
10261
10220
  !*** ./lib/style.js ***!
10262
10221
  \**********************/
10263
- /***/ ((module, exports) => {
10222
+ /***/ ((module, exports, __webpack_require__) => {
10264
10223
 
10265
10224
  "use strict";
10266
10225
 
10267
10226
 
10227
+ var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");
10268
10228
  Object.defineProperty(exports, "__esModule", ({
10269
10229
  value: true
10270
10230
  }));
10271
10231
  exports.style = void 0;
10232
+ var _styleConstants = _interopRequireDefault(__webpack_require__(/*! ./styleConstants */ "./lib/styleConstants.js"));
10272
10233
  // Common readable consistent stylesheet
10273
10234
  // to avoid using style sheets which are document-global
10274
10235
  // and make programmable style toggling with selection, drag over, etc easier
10275
-
10276
10236
  // These must all end with semicolon so they can be appended to.
10277
10237
 
10278
- var formBorderColor = '#888888'; // Mid-grey
10279
- var lowProfileLinkColor = '#3B5998'; // Grey-blue, e.g., for field labels linking to ontology
10280
- var formFieldNameBoxWidth = '8em'; // The fixed amount to get form fields to line up
10281
- // The latter we put in when switching awy from using tables. Getting allignment between
10282
- // fields in different groups though is hard problem.
10283
-
10284
10238
  var style = {
10285
10239
  // styleModule
10286
10240
 
10287
10241
  checkboxStyle: 'color: black; font-size: 100%; padding-left: 0.5 em; padding-right: 0.5 em;',
10288
- checkboxInputStyle: 'font-size: 150%; height: 1.2em; width: 1.2em; background-color: #eef; border-radius:0.2em; margin: 0.1em',
10242
+ checkboxInputStyle: 'font-size: 150%; height: 1.2em; width: 1.2em; background-color: #eef; border-radius:0.2em; margin: 0.1em;',
10289
10243
  fieldLabelStyle: 'color: #3B5998; text-decoration: none;',
10290
- formSelectSTyle: 'background-color: #eef; padding: 0.5em; border: .05em solid #88c; border-radius:0.2em; font-size: 100%; margin:0.4em;',
10291
- textInputStyle: 'background-color: #eef; padding: 0.5em; border: .05em solid #88c; border-radius:0.2em; font-size: 100%; margin:0.4em;',
10244
+ formSelectStyle: 'background-color: #eef; padding: 0.5em; border: .05em solid #88c; border-radius:0.2em; font-size: 100%; margin:0.4em;',
10245
+ textInputStyle: 'background-color: #eef; padding: 0.5em; border: .05em solid #88c; border-radius:0.2em; font-size: 100%; margin:0.4em;',
10292
10246
  textInputStyleUneditable:
10293
10247
  // Color difference only
10294
- 'background-color: white; padding: 0.5em; border: .05em solid white; border-radius:0.2em; font-size: 100%; margin:0.4em;',
10295
- textInputSize: 20,
10296
- // Default text input size in characters roughly
10297
- buttonStyle: 'background-color: #fff; padding: 0.7em; border: .01em solid white; border-radius:0.2em; font-size: 100%; margin: 0.3em;',
10248
+ 'background-color: white; padding: 0.5em; border: .05em solid white; border-radius:0.2em; font-size: 100%; margin:0.4em;',
10249
+ buttonStyle: 'background-color: #fff; padding: 0.7em; border: .01em solid white; border-radius:0.2em; font-size: 100%; margin: 0.3em;',
10298
10250
  // 'background-color: #eef;
10299
10251
  commentStyle: 'padding: 0.7em; border: none; font-size: 100%; white-space: pre-wrap;',
10300
10252
  iconStyle: 'width: 3em; height: 3em; margin: 0.1em; border-radius: 1em;',
@@ -10302,20 +10254,18 @@ var style = {
10302
10254
  classIconStyle: 'width: 3em; height: 3em; margin: 0.1em; border-radius: 0.2em; border: 0.1em solid green; padding: 0.2em; background-color: #efe;',
10303
10255
  // combine with buttonStyle
10304
10256
  confirmPopupStyle: 'padding: 0.7em; border-radius: 0.2em; border: 0.1em solid orange; background-color: white; box-shadow: 0.5em 0.9em #888;',
10305
- tabBorderRadius: '0.2em',
10306
10257
  messageBodyStyle: 'white-space: pre-wrap; width: 99%; font-size:100%; border: 0.07em solid #eee; border-radius:0.2em; padding: .3em 0.5em; margin: 0.1em;',
10307
10258
  pendingeditModifier: 'color: #bbb;',
10308
- highlightColor: '#7C4DFF',
10309
- // Solid lavendar https://design.inrupt.com/atomic-core/?cat=Core
10310
-
10311
10259
  // Contacts
10312
10260
  personaBarStyle: 'width: 100%; height: 4em; background-color: #eee; vertical-align: middle;',
10313
10261
  searchInputStyle: 'border: 0.1em solid #444; border-radius: 0.2em; width: 100%; font-size: 100%; padding: 0.1em 0.6em; margin 0.2em;',
10314
10262
  autocompleteRowStyle: 'border: 0.2em solid straw;',
10315
10263
  // Login buttons
10316
- signInButtonStyle: 'padding: 1em; border-radius:0.2em; font-size: 100%;',
10264
+ signInAndUpButtonStyle: 'padding: 1em; border-radius:0.2em; font-size: 100%;',
10317
10265
  // was 0.5em radius
10318
-
10266
+ headerBannerLoginInput: 'margin: 0.75em 0 0.75em 0.5em !important; padding: 0.5em !important;',
10267
+ signUpBackground: 'background-color: #eef;',
10268
+ signInBackground: 'background-color: #efe;',
10319
10269
  // Forms
10320
10270
  heading1Style: 'font-size: 180%; font-weight: bold; color: #888888; padding: 0.5em; margin: 0.7em 0.0m;',
10321
10271
  // originally was brown; now grey
@@ -10326,87 +10276,104 @@ var style = {
10326
10276
  heading4Style: 'font-size: 110%; font-weight: bold; color: #888888; padding: 0.2em; margin: 0.7em 0.0em;',
10327
10277
  // Lowest level used by default in small things
10328
10278
 
10329
- formBorderColor: formBorderColor,
10330
- // originally was brown; now grey
10331
- formHeadingColor: '#888888',
10332
- // originally was brown; now grey
10333
10279
  formHeadingStyle: 'font-size: 110%; font-weight: bold; color: #888888; padding: 0.2em; margin: 0.7em 0.0em;',
10334
10280
  // originally was brown; now grey
10335
10281
  formTextInput: 'font-size: 100%; margin: 0.1em; padding: 0.1em;',
10336
10282
  // originally used this
10337
- formGroupStyle: ["padding-left: 0em; border: 0.0em solid ".concat(formBorderColor, "; border-radius: 0.2em;"), // weight 0
10338
- "padding-left: 2em; border: 0.05em solid ".concat(formBorderColor, "; border-radius: 0.2em;"), "padding-left: 2em; border: 0.1em solid ".concat(formBorderColor, "; border-radius: 0.2em;"), "padding-left: 2em; border: 0.2em solid ".concat(formBorderColor, "; border-radius: 0.2em;") // @@ pink
10283
+ formGroupStyle: ["padding-left: 0em; border: 0.0em solid ".concat(_styleConstants["default"].formBorderColor, "; border-radius: 0.2em;"), // weight 0
10284
+ "padding-left: 2em; border: 0.05em solid ".concat(_styleConstants["default"].formBorderColor, "; border-radius: 0.2em;"), "padding-left: 2em; border: 0.1em solid ".concat(_styleConstants["default"].formBorderColor, "; border-radius: 0.2em;"), "padding-left: 2em; border: 0.2em solid ".concat(_styleConstants["default"].formBorderColor, "; border-radius: 0.2em;") // @@ pink
10339
10285
  ],
10340
- formFieldLabelStyle: "'color: ".concat(lowProfileLinkColor, "; text-decoration: none;'"),
10341
- formFieldNameBoxWidth: formFieldNameBoxWidth,
10342
- formFieldNameBoxStyle: "padding: 0.3em; vertical-align: middle; width:".concat(formFieldNameBoxWidth, ";"),
10343
- textInputBackgroundColor: '#eef',
10344
- textInputBackgroundColorUneditable: '#fff',
10345
- textInputColor: '#000',
10346
- textInputColorPending: '#888',
10286
+ formFieldLabelStyle: "color: ".concat(_styleConstants["default"].lowProfileLinkColor, "; text-decoration: none;"),
10287
+ formFieldNameBoxStyle: "padding: 0.3em; vertical-align: middle; width:".concat(_styleConstants["default"].formFieldNameBoxWidth, ";"),
10347
10288
  multilineTextInputStyle: 'font-size:100%; white-space: pre-wrap; background-color: #eef;' + ' border: 0.07em solid gray; padding: 1em 0.5em; margin: 1em 1em;',
10348
10289
  // Buttons
10349
10290
  renderAsDivStyle: 'display: flex; align-items: center; justify-content: space-between; height: 2.5em; padding: 1em;',
10350
10291
  imageDivStyle: 'width:2.5em; padding:0.5em; height: 2.5em;',
10351
10292
  linkDivStyle: 'width:2em; padding:0.5em; height: 4em;',
10352
10293
  // ACL
10353
- aclControlBoxContainer: 'margin: 1em',
10354
- aclControlBoxHeader: 'font-size: 120%; margin: 0 0 1rem',
10355
- aclControlBoxStatus: 'display: none; margin: 1rem 0',
10356
- aclControlBoxStatusRevealed: 'display: block',
10357
- aclGroupContent: 'maxWidth: 650',
10358
- accessGroupList: 'display: grid; grid-template-columns: 1fr; margin: 1em; width: 100%',
10359
- accessGroupListItem: 'display: grid; grid-template-columns: 100px auto 30%',
10360
- defaultsController: 'display: flex',
10361
- defaultsControllerNotice: 'color: #888; flexGrow: 1; fontSize: 80%',
10362
- bigButton: 'background-color: white; border: 0.1em solid #888; border-radius: 0.3em; max-width: 50%; padding-bottom: 1em; padding-top: 1em',
10363
- group: 'color: #888',
10364
- group1: 'color: green',
10365
- group2: 'color: #cc0',
10366
- group3: 'color: orange',
10367
- group5: 'color: red',
10368
- group9: 'color: blue',
10369
- group13: 'color: purple',
10370
- trustedAppAddApplicationsTable: 'background-color: #eee',
10371
- trustedAppCancelButton: 'float: right',
10372
- trustedAppControllerI: 'border-color: orange; borderRadius: 1em; borderWidth: 0.1em',
10373
- temporaryStatusInit: 'background: green',
10374
- temporaryStatusEnd: 'background: transparent; transition: background 5s linear',
10294
+ aclControlBoxContainer: 'margin: 1em;',
10295
+ aclControlBoxHeader: 'font-size: 120%; margin: 0 0 1rem;',
10296
+ aclControlBoxStatus: 'display: none; margin: 1rem 0;',
10297
+ aclControlBoxStatusRevealed: 'display: block;',
10298
+ aclGroupContent: 'maxWidth: 650;',
10299
+ accessGroupList: 'display: grid; grid-template-columns: 1fr; margin: 1em; width: 100%;',
10300
+ accessGroupListItem: 'display: grid; grid-template-columns: 100px auto 30%;',
10301
+ defaultsController: 'display: flex;',
10302
+ defaultsControllerNotice: 'color: #888; flexGrow: 1; fontSize: 80%;',
10303
+ bigButton: 'background-color: white; border: 0.1em solid #888; border-radius: 0.3em; max-width: 50%; padding-bottom: 1em; padding-top: 1em;',
10304
+ group: 'color: #888;',
10305
+ group1: 'color: green;',
10306
+ group2: 'color: #cc0;',
10307
+ group3: 'color: orange;',
10308
+ group5: 'color: red;',
10309
+ group9: 'color: blue;',
10310
+ group13: 'color: purple;',
10311
+ trustedAppAddApplicationsTable: 'background-color: #eee;',
10312
+ trustedAppCancelButton: 'float: right;',
10313
+ trustedAppControllerI: 'border-color: orange; border-radius: 1em; border-width: 0.1em;',
10314
+ temporaryStatusInit: 'background: green;',
10315
+ temporaryStatusEnd: 'background: transparent; transition: background 5s linear;',
10375
10316
  // header
10376
- headerUserMenuLink: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%; text-decoration: none',
10377
- headerUserMenuLinkHover: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%; text-decoration: none; background-image: linear-gradient(to right, #7C4DFF 0%, #18A9E6 50%, #01C9EA 100%)',
10378
- headerUserMenuTrigger: 'background: none; border: 0; cursor: pointer; width: 60px; height: 60px',
10379
- headerUserMenuTriggerImg: 'border-radius: 50%; height: 56px; width: 28px !important',
10380
- headerUserMenuButton: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%',
10381
- headerUserMenuButtonHover: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%; background-image: linear-gradient(to right, #7C4DFF 0%, #18A9E6 50%, #01C9EA 100%)',
10382
- headerUserMenuList: 'list-style: none; margin: 0; padding: 0',
10383
- headerUserMenuListDisplay: 'list-style: none; margin: 0; padding: 0; display:true',
10384
- headerUserMenuNavigationMenu: 'background: white; border: solid 1px #000000; border-right: 0; position: absolute; right: 0; top: 60px; width: 200px; z-index: 1; display: true',
10385
- headerUserMenuNavigationMenuNotDisplayed: 'background: white; border: solid 1px #000000; border-right: 0; position: absolute; right: 0; top: 60px; width: 200px; z-index: 1; display: none',
10386
- headerUserMenuListItem: 'border-bottom: solid 1px #000000',
10387
- headerUserMenuPhoto: 'border-radius: 50%; background-position: center; background-repeat: no-repeat; background-size: cover; height: 50px; width: 50px',
10388
- headerBanner: 'box-shadow: 0px 1px 4px #000000; display: flex; justify-content: space-between; padding: 0 1.5em; margin-bottom: 4px',
10389
- headerBannerLink: 'display: block',
10390
- headerBannerRightMenu: 'display: flex',
10391
- headerBannerLogin: 'margin-left: auto',
10392
- allChildrenVisible: 'display:true',
10393
- headerBannerLoginInput: 'margin: 0.75em 0 0.75em 0.5em !important; padding: 0.5em !important',
10394
- headerBannerUserMenu: 'border-left: solid 1px #000000; margin-left: auto',
10395
- headerBannerHelpMenu: 'border-left: solid 1px #000000; margin.left: auto',
10396
- headerBannerIcon: 'background-size: 65px 60px !important; height: 60px !important; width: 65px !important',
10317
+ headerUserMenuLink: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%; text-decoration: none;',
10318
+ headerUserMenuLinkHover: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%; text-decoration: none; background-image: linear-gradient(to right, #7C4DFF 0%, #18A9E6 50%, #01C9EA 100%);',
10319
+ headerUserMenuTrigger: 'background: none; border: 0; cursor: pointer; width: 60px; height: 60px;',
10320
+ headerUserMenuTriggerImg: 'border-radius: 50%; height: 56px; width: 28px !important;',
10321
+ headerUserMenuButton: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%;',
10322
+ headerUserMenuButtonHover: 'background: none; border: 0; color: black; cursor: pointer; display: block; font-family: Arial; font-size: 1em; text-align: left; padding: 1em; width: 100%; background-image: linear-gradient(to right, #7C4DFF 0%, #18A9E6 50%, #01C9EA 100%);',
10323
+ headerUserMenuList: 'list-style: none; margin: 0; padding: 0;',
10324
+ headerUserMenuListDisplay: 'list-style: none; margin: 0; padding: 0; display:true;',
10325
+ headerUserMenuNavigationMenu: 'background: white; border: solid 1px #000000; border-right: 0; position: absolute; right: 0; top: 60px; width: 200px; z-index: 1; display: true;',
10326
+ headerUserMenuNavigationMenuNotDisplayed: 'background: white; border: solid 1px #000000; border-right: 0; position: absolute; right: 0; top: 60px; width: 200px; z-index: 1; display: none;',
10327
+ headerUserMenuListItem: 'border-bottom: solid 1px #000000;',
10328
+ headerUserMenuPhoto: 'border-radius: 50%; background-position: center; background-repeat: no-repeat; background-size: cover; height: 50px; width: 50px;',
10329
+ headerBanner: 'box-shadow: 0px 1px 4px #000000; display: flex; justify-content: space-between; padding: 0 1.5em; margin-bottom: 4px;',
10330
+ headerBannerLink: 'display: block;',
10331
+ headerBannerRightMenu: 'display: flex;',
10332
+ headerBannerLogin: 'margin-left: auto;',
10333
+ allChildrenVisible: 'display:true;',
10334
+ headerBannerUserMenu: 'border-left: solid 1px #000000; margin-left: auto;',
10335
+ headerBannerHelpMenu: 'border-left: solid 1px #000000; margin-left: auto;',
10336
+ headerBannerIcon: 'background-size: 65px 60px !important; height: 60px !important; width: 65px !important;',
10397
10337
  // may just be 65px round($icon-size * 352 / 322);
10398
10338
 
10399
10339
  // footer
10400
- footer: 'border-top: solid 1px $divider-color; font-size: 0.9em; padding: 0.5em 1.5em',
10340
+ footer: 'border-top: solid 1px $divider-color; font-size: 0.9em; padding: 0.5em 1.5em;',
10401
10341
  // buttons
10402
- primaryButton: 'background-color: #7c4dff; color: #ffffff; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em;text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none',
10403
- primaryButtonHover: 'background-color: #9f7dff; color: #ffffff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em;text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out',
10404
- primaryButtonNoBorder: 'background-color: #ffffff; color: #7c4dff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em;text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none',
10405
- primaryButtonNoBorderHover: 'background-color: #7c4dff; color: #ffffff; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out',
10406
- secondaryButton: 'background-color: #01c9ea; color: #ffffff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #01c9ea; border: 1px solid; cursor: pointer; font-size: .8em;text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none',
10407
- secondaryButtonHover: 'background-color: #37cde6; color: #ffffff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em;text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out',
10408
- secondaryButtonNoBorder: 'background-color: #ffffff; color: #01c9ea; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #01c9ea; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none',
10409
- secondaryButtonNoBorderHover: 'background-color: #01c9ea; color: #ffffff; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #01c9ea; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out'
10342
+ primaryButton: 'background-color: #7c4dff; color: #ffffff; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none;',
10343
+ primaryButtonHover: 'background-color: #9f7dff; color: #ffffff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out;',
10344
+ primaryButtonNoBorder: 'background-color: #ffffff; color: #7c4dff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none;',
10345
+ primaryButtonNoBorderHover: 'background-color: #7c4dff; color: #ffffff; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out;',
10346
+ secondaryButton: 'background-color: #01c9ea; color: #ffffff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #01c9ea; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none;',
10347
+ secondaryButtonHover: 'background-color: #37cde6; color: #ffffff; font-family: Raleway, Roboto, sans-serif;border-radius: 0.25em; border-color: #7c4dff; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out;',
10348
+ secondaryButtonNoBorder: 'background-color: #ffffff; color: #01c9ea; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #01c9ea; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none;',
10349
+ secondaryButtonNoBorderHover: 'background-color: #01c9ea; color: #ffffff; font-family: Raleway, Roboto, sans-serif; border-radius: 0.25em; border-color: #01c9ea; border: 1px solid; cursor: pointer; font-size: .8em; text-decoration: none; padding: 0.5em 4em; transition: 0.25s all ease-in-out; outline: none; transition: 0.25s all ease-in-out;',
10350
+ // media
10351
+ controlStyle: "border-radius: 0.5em; margin: 0.8em; width:".concat(_styleConstants["default"].mediaModuleCanvasWidth, "; height:").concat(_styleConstants["default"].mediaModuleCanvasHeight, ";"),
10352
+ // dragAndDrop
10353
+ dragEvent: 'background-color: #ccc; border: 0.25em dashed black; border-radius: 0.3em;',
10354
+ dropEvent: 'background-color: white; border: 0em solid black;',
10355
+ restoreStyle: 'background-color: white;',
10356
+ // errors
10357
+ errorCancelButton: 'width: 2em; height: 2em; align: right;',
10358
+ errorMessageBlockStyle: 'margin: 0.1em; padding: 0.5em; border: 0.05em solid gray; color:black;',
10359
+ // pad
10360
+ notepadStyle: 'padding: 1em; overflow: auto; resize: horizontal; min-width: 40em;',
10361
+ upstreamStatus: 'width: 50%;',
10362
+ downstreamStatus: 'width: 50%;',
10363
+ baseStyle: 'font-size: 100%; font-family: monospace; width: 100%; border: none; white-space: pre-wrap;',
10364
+ headingCore: 'font-family: sans-serif; font-weight: bold; border: none;',
10365
+ headingStyle: ['font-size: 110%; padding-top: 0.5em; padding-bottom: 0.5em; width: 100%;', 'font-size: 120%; padding-top: 1em; padding-bottom: 1em; width: 100%;', 'font-size: 150%; padding-top: 1em; padding-bottom: 1em; width: 100%;'],
10366
+ // participation
10367
+ participantsStyle: 'margin: 0.8em;',
10368
+ participantsBlock: 'height: 1.5em; width: 1.5em; margin: 0.3em; border 0.01em solid #888;',
10369
+ personTableTD: 'vertical-align: middle;',
10370
+ // tabs
10371
+ tabsNavElement: 'margin: 0;',
10372
+ tabsRootElement: 'display: flex; height: 100%; width: 100%;',
10373
+ tabsMainElement: 'margin: 0; width:100%; height: 100%;',
10374
+ tabContainer: 'list-style-type: none; display: flex; height: 100%; width: 100%; margin: 0; padding: 0;',
10375
+ makeNewSlot: 'background: none; border: none; font: inherit; cursor: pointer;',
10376
+ ellipsis: 'position: absolute; right: 0; bottom: 0; width: 20%; background: none; color: inherit; border: none; padding: 0; font: inherit; cursor: pointer; outline: inherit;'
10410
10377
  };
10411
10378
  exports.style = style;
10412
10379
  style.setStyle = function setStyle(ele, styleName) {
@@ -10417,6 +10384,52 @@ module.exports = style; // @@ No way to do this in ESM
10417
10384
 
10418
10385
  /***/ }),
10419
10386
 
10387
+ /***/ "./lib/styleConstants.js":
10388
+ /*!*******************************!*\
10389
+ !*** ./lib/styleConstants.js ***!
10390
+ \*******************************/
10391
+ /***/ ((__unused_webpack_module, exports) => {
10392
+
10393
+ "use strict";
10394
+
10395
+
10396
+ Object.defineProperty(exports, "__esModule", ({
10397
+ value: true
10398
+ }));
10399
+ exports["default"] = void 0;
10400
+ var _default = {
10401
+ highlightColor: '#7C4DFF',
10402
+ // Solid lavender https://design.inrupt.com/atomic-core/?cat=Core
10403
+
10404
+ formBorderColor: '#888888',
10405
+ // Mid-grey
10406
+ formHeadingColor: '#888888',
10407
+ // originally was brown; now grey
10408
+ lowProfileLinkColor: '#3B5998',
10409
+ // Grey-blue, e.g., for field labels linking to ontology
10410
+ formFieldNameBoxWidth: '8em',
10411
+ // The fixed amount to get form fields to line up
10412
+ // The latter we put in when switching awy from using tables. Getting alignment between
10413
+ // fields in different groups though is hard problem.
10414
+
10415
+ mediaModuleCanvasWidth: '640',
10416
+ mediaModuleCanvasHeight: '480',
10417
+ textInputSize: 20,
10418
+ // Default text input size in characters roughly
10419
+ tabBorderRadius: '0.2em',
10420
+ textInputBackgroundColor: '#eef',
10421
+ textInputBackgroundColorUneditable: '#fff',
10422
+ textInputColor: '#000',
10423
+ textInputColorPending: '#888',
10424
+ defaultErrorBackgroundColor: '#fee',
10425
+ participationDefaultBackground: 'white',
10426
+ basicMaxLength: '4096'
10427
+ };
10428
+ exports["default"] = _default;
10429
+ //# sourceMappingURL=styleConstants.js.map
10430
+
10431
+ /***/ }),
10432
+
10420
10433
  /***/ "./lib/style_multiSelect.js":
10421
10434
  /*!**********************************!*\
10422
10435
  !*** ./lib/style_multiSelect.js ***!
@@ -12088,6 +12101,7 @@ function renderTableViewPane(doc, options) {
12088
12101
 
12089
12102
 
12090
12103
  var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");
12104
+ var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "./node_modules/@babel/runtime/helpers/typeof.js");
12091
12105
  Object.defineProperty(exports, "__esModule", ({
12092
12106
  value: true
12093
12107
  }));
@@ -12104,7 +12118,10 @@ var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/ru
12104
12118
  var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js"));
12105
12119
  var _widgets = __webpack_require__(/*! ./widgets */ "./lib/widgets/index.js");
12106
12120
  var _utils = __webpack_require__(/*! ./utils */ "./lib/utils/index.js");
12121
+ var style = _interopRequireWildcard(__webpack_require__(/*! ./style */ "./lib/style.js"));
12107
12122
  var _solidLogic = __webpack_require__(/*! solid-logic */ "./node_modules/solid-logic/lib/index.js");
12123
+ 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); }
12124
+ 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; }
12108
12125
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
12109
12126
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
12110
12127
  /**
@@ -12287,11 +12304,12 @@ var TabElement = /*#__PURE__*/function (_HTMLElement3) {
12287
12304
  *
12288
12305
  * @param options
12289
12306
  */
12307
+ var tabsDefaultBackgroundColor = '#ddddcc';
12290
12308
  function tabWidget(options) {
12291
12309
  var subject = options.subject;
12292
12310
  var dom = options.dom || document;
12293
12311
  var orientation = parseInt(options.orientation || '0');
12294
- var backgroundColor = options.backgroundColor || '#ddddcc';
12312
+ var backgroundColor = options.backgroundColor || tabsDefaultBackgroundColor;
12295
12313
  var flipped = orientation & 2;
12296
12314
  var vertical = orientation & 1;
12297
12315
  var onClose = options.onClose;
@@ -12302,13 +12320,15 @@ function tabWidget(options) {
12302
12320
  var bodyMainStyle = "flex: 2; width: auto; height: 100%; border: 0.1em; border-style: solid; border-color: ".concat(selectedColor, "; padding: 1em;");
12303
12321
  var rootElement = dom.createElement('div'); // 20200117a
12304
12322
 
12305
- rootElement.setAttribute('style', 'display: flex; height: 100%; width: 100%; flex-direction: ' + (vertical ? 'row' : 'column') + (flipped ? '-reverse;' : ';'));
12323
+ rootElement.setAttribute('style', style.tabsRootElement);
12324
+ rootElement.style.flexDirection = (vertical ? 'row' : 'column') + (flipped ? '-reverse;' : ';');
12306
12325
  var navElement = rootElement.appendChild(dom.createElement('nav'));
12307
- navElement.setAttribute('style', 'margin: 0;');
12326
+ navElement.setAttribute('style', style.tabsNavElement);
12308
12327
  var mainElement = rootElement.appendChild(dom.createElement('main'));
12309
- mainElement.setAttribute('style', 'margin: 0; width:100%; height: 100%;'); // override tabbedtab.css
12328
+ mainElement.setAttribute('style', style.tabsMainElement); // override tabbedtab.css
12310
12329
  var tabContainer = navElement.appendChild(dom.createElement('ul'));
12311
- tabContainer.setAttribute('style', "\n list-style-type: none;\n display: flex;\n height: 100%;\n width: 100%;\n margin: 0;\n padding: 0;\n flex-direction: ".concat(vertical ? 'column' : 'row', "\n "));
12330
+ tabContainer.setAttribute('style', style.tabContainer);
12331
+ tabContainer.style.flexDirection = "".concat(vertical ? 'column' : 'row');
12312
12332
  var tabElement = 'li';
12313
12333
  var bodyContainer = mainElement;
12314
12334
  rootElement.tabContainer = tabContainer;
@@ -12328,7 +12348,7 @@ function tabWidget(options) {
12328
12348
  rootElement.refresh = orderedSync;
12329
12349
  orderedSync();
12330
12350
  if (!options.startEmpty && tabContainer.children.length && options.selectedTab) {
12331
- var selectedTab0 = Array.from(tabContainer.children) // Version left for compatability with ??
12351
+ var selectedTab0 = Array.from(tabContainer.children) // Version left for compatibility with ??
12332
12352
  .map(function (tab) {
12333
12353
  return tab.firstChild;
12334
12354
  }).find(function (tab) {
@@ -12382,7 +12402,7 @@ function tabWidget(options) {
12382
12402
  ele.setAttribute('style', unselectedStyle);
12383
12403
  ele.subject = item;
12384
12404
  var div = ele.appendChild(dom.createElement('button'));
12385
- div.setAttribute('style', 'background: none; border: none; font: inherit; cursor: pointer');
12405
+ div.setAttribute('style', style.makeNewSlot);
12386
12406
  div.onclick = function () {
12387
12407
  resetTabStyle();
12388
12408
  resetBodyStyle();
@@ -12399,7 +12419,7 @@ function tabWidget(options) {
12399
12419
  if (options.renderTabSettings && ele.subject) {
12400
12420
  var ellipsis = dom.createElement('button');
12401
12421
  ellipsis.textContent = '...';
12402
- ellipsis.setAttribute('style', 'position: absolute; right: 0; bottom: 0; width: 20%; background: none; color: inherit; border: none; padding: 0; font: inherit; cursor: pointer; outline: inherit;');
12422
+ ellipsis.setAttribute('style', style.ellipsis);
12403
12423
  ellipsis.onclick = function () {
12404
12424
  resetTabStyle();
12405
12425
  resetBodyStyle();
@@ -13272,7 +13292,7 @@ Object.defineProperty(exports, "__esModule", ({
13272
13292
  exports.getExistingPrivateKey = getExistingPrivateKey;
13273
13293
  exports.getExistingPublicKey = getExistingPublicKey;
13274
13294
  exports.getKeyIfExists = getKeyIfExists;
13275
- exports.pubKeyUrl = exports.privKeyUrl = exports.getPodRoot = void 0;
13295
+ exports.pubKeyUrl = exports.privKeyUrl = void 0;
13276
13296
  var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "./node_modules/@babel/runtime/regenerator/index.js"));
13277
13297
  var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/asyncToGenerator.js"));
13278
13298
  var debug = _interopRequireWildcard(__webpack_require__(/*! ../../debug */ "./lib/debug.js"));
@@ -13280,216 +13300,174 @@ var _solidLogic = __webpack_require__(/*! solid-logic */ "./node_modules/solid-l
13280
13300
  var ns = _interopRequireWildcard(__webpack_require__(/*! ../../ns */ "./lib/ns.js"));
13281
13301
  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); }
13282
13302
  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; }
13283
- var getPodRoot = /*#__PURE__*/function () {
13303
+ /* export const getPodRoot = async (webId: NamedNode) => {
13304
+ const webIdURL = new URL(webId.uri)
13305
+ // find storages in webId document
13306
+ await store.fetcher.load(webId.uri)
13307
+ const storages = store.each(webId, ns.space('storage'), null, webId.doc())
13308
+ var podRoot: NamedNode | undefined
13309
+ if (!storages?.length) {
13310
+ // find storage recursively in webId URL
13311
+ let path = webIdURL.pathname
13312
+ while (path.length) {
13313
+ path = path.substring(0, path.lastIndexOf('/'))
13314
+ podRoot = store.sym(webIdURL.origin + path + '/')
13315
+ const res = await store.fetcher.webOperation('HEAD', podRoot.uri)
13316
+ if (res.headers.get('link')?.includes(ns.space('Storage').value)) break
13317
+ if (!path) debug.warn(`Current user storage not found for\n${webId}`)
13318
+ }
13319
+ } else {
13320
+ // give preference to storage in webId root
13321
+ podRoot = storages.find((storage) => webIdURL.origin === new URL(storage.value).origin) as NamedNode
13322
+ if (!podRoot) podRoot = storages[0] as NamedNode
13323
+ }
13324
+
13325
+ return podRoot as NamedNode
13326
+ } */
13327
+
13328
+ var pubKeyUrl = /*#__PURE__*/function () {
13284
13329
  var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(webId) {
13285
- var webIdURL, storages, podRoot, path, _res$headers$get, res;
13330
+ var _store$any, _parentSettings;
13331
+ var parentSettings;
13286
13332
  return _regenerator["default"].wrap(function _callee$(_context) {
13287
13333
  while (1) switch (_context.prev = _context.next) {
13288
13334
  case 0:
13289
- webIdURL = new URL(webId.uri); // find storages in webId document
13290
- _context.next = 3;
13291
- return _solidLogic.store.fetcher.load(webId.uri);
13292
- case 3:
13293
- storages = _solidLogic.store.each(webId, ns.space('storage'), null, webId.doc());
13294
- if (storages !== null && storages !== void 0 && storages.length) {
13295
- _context.next = 19;
13296
- break;
13297
- }
13298
- // find storage recursively in webId URL
13299
- path = webIdURL.pathname;
13300
- case 6:
13301
- if (!path.length) {
13302
- _context.next = 17;
13335
+ parentSettings = (_store$any = _solidLogic.store.any(webId, ns.space('preferencesFile'), null, webId.doc())) === null || _store$any === void 0 ? void 0 : _store$any.value;
13336
+ parentSettings = (_parentSettings = parentSettings) === null || _parentSettings === void 0 ? void 0 : _parentSettings.split('/').slice(0, -2).join('/');
13337
+ if (parentSettings) {
13338
+ _context.next = 4;
13303
13339
  break;
13304
13340
  }
13305
- path = path.substring(0, path.lastIndexOf('/'));
13306
- podRoot = _solidLogic.store.sym(webIdURL.origin + path + '/');
13307
- _context.next = 11;
13308
- return _solidLogic.store.fetcher.webOperation('HEAD', podRoot.uri);
13309
- case 11:
13310
- res = _context.sent;
13311
- if (!((_res$headers$get = res.headers.get('link')) !== null && _res$headers$get !== void 0 && _res$headers$get.includes(ns.space('Storage').value))) {
13312
- _context.next = 14;
13313
- break;
13314
- }
13315
- return _context.abrupt("break", 17);
13316
- case 14:
13317
- if (!path) debug.warn("Current user storage not found for\n".concat(webId));
13318
- _context.next = 6;
13319
- break;
13320
- case 17:
13321
- _context.next = 21;
13322
- break;
13323
- case 19:
13324
- // give preference to storage in webId root
13325
- podRoot = storages.find(function (storage) {
13326
- return webIdURL.origin === new URL(storage.value).origin;
13327
- });
13328
- if (!podRoot) podRoot = storages[0];
13329
- case 21:
13330
- return _context.abrupt("return", podRoot);
13331
- case 22:
13341
+ throw new Error("prefererencesFile is expected to exist in ".concat(webId.doc));
13342
+ case 4:
13343
+ return _context.abrupt("return", "".concat(parentSettings, "/profile/keys/publicKey.ttl"));
13344
+ case 5:
13332
13345
  case "end":
13333
13346
  return _context.stop();
13334
13347
  }
13335
13348
  }, _callee);
13336
13349
  }));
13337
- return function getPodRoot(_x) {
13350
+ return function pubKeyUrl(_x) {
13338
13351
  return _ref.apply(this, arguments);
13339
13352
  };
13340
13353
  }();
13341
- exports.getPodRoot = getPodRoot;
13342
- var pubKeyUrl = /*#__PURE__*/function () {
13343
- var _ref2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(webId) {
13344
- return _regenerator["default"].wrap(function _callee2$(_context2) {
13345
- while (1) switch (_context2.prev = _context2.next) {
13346
- case 0:
13347
- _context2.prev = 0;
13348
- _context2.next = 3;
13349
- return getPodRoot(webId);
13350
- case 3:
13351
- _context2.t0 = _context2.sent.value;
13352
- return _context2.abrupt("return", _context2.t0 + 'profile/keys/publicKey.ttl');
13353
- case 7:
13354
- _context2.prev = 7;
13355
- _context2.t1 = _context2["catch"](0);
13356
- throw new Error(_context2.t1);
13357
- case 10:
13358
- case "end":
13359
- return _context2.stop();
13360
- }
13361
- }, _callee2, null, [[0, 7]]);
13362
- }));
13363
- return function pubKeyUrl(_x2) {
13364
- return _ref2.apply(this, arguments);
13365
- };
13366
- }();
13367
13354
  exports.pubKeyUrl = pubKeyUrl;
13368
- function getExistingPublicKey(_x3, _x4) {
13355
+ function getExistingPublicKey(_x2, _x3) {
13369
13356
  return _getExistingPublicKey.apply(this, arguments);
13370
13357
  }
13371
13358
  function _getExistingPublicKey() {
13372
- _getExistingPublicKey = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(webId, publicKeyUrl) {
13373
- return _regenerator["default"].wrap(function _callee4$(_context4) {
13374
- while (1) switch (_context4.prev = _context4.next) {
13359
+ _getExistingPublicKey = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(webId, publicKeyUrl) {
13360
+ return _regenerator["default"].wrap(function _callee3$(_context3) {
13361
+ while (1) switch (_context3.prev = _context3.next) {
13375
13362
  case 0:
13376
- _context4.next = 2;
13363
+ _context3.next = 2;
13377
13364
  return getKeyIfExists(webId, publicKeyUrl, 'publicKey');
13378
13365
  case 2:
13379
- return _context4.abrupt("return", _context4.sent);
13366
+ return _context3.abrupt("return", _context3.sent);
13380
13367
  case 3:
13381
13368
  case "end":
13382
- return _context4.stop();
13369
+ return _context3.stop();
13383
13370
  }
13384
- }, _callee4);
13371
+ }, _callee3);
13385
13372
  }));
13386
13373
  return _getExistingPublicKey.apply(this, arguments);
13387
13374
  }
13388
13375
  var privKeyUrl = /*#__PURE__*/function () {
13389
- var _ref3 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(webId) {
13390
- var _store$any, _settings;
13391
- var settings, _settings2, podRoot;
13392
- return _regenerator["default"].wrap(function _callee3$(_context3) {
13393
- while (1) switch (_context3.prev = _context3.next) {
13376
+ var _ref2 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(webId) {
13377
+ var _store$any2, _settings;
13378
+ var settings;
13379
+ return _regenerator["default"].wrap(function _callee2$(_context2) {
13380
+ while (1) switch (_context2.prev = _context2.next) {
13394
13381
  case 0:
13395
- settings = (_store$any = _solidLogic.store.any(webId, ns.space('preferencesFile'), null, webId.doc())) === null || _store$any === void 0 ? void 0 : _store$any.value;
13382
+ settings = (_store$any2 = _solidLogic.store.any(webId, ns.space('preferencesFile'), null, webId.doc())) === null || _store$any2 === void 0 ? void 0 : _store$any2.value;
13396
13383
  settings = (_settings = settings) === null || _settings === void 0 ? void 0 : _settings.split('/').slice(0, -1).join('/');
13397
- _context3.prev = 2;
13398
- _context3.next = 5;
13399
- return getPodRoot(webId);
13400
- case 5:
13401
- podRoot = _context3.sent;
13402
- if ((_settings2 = settings) !== null && _settings2 !== void 0 && _settings2.startsWith(podRoot.value)) {
13403
- _context3.next = 8;
13384
+ if (settings) {
13385
+ _context2.next = 4;
13404
13386
  break;
13405
13387
  }
13406
- throw new Error("/settings/ is expected to be in ".concat(podRoot.value));
13407
- case 8:
13408
- return _context3.abrupt("return", "".concat(settings, "/keys/privateKey.ttl"));
13409
- case 11:
13410
- _context3.prev = 11;
13411
- _context3.t0 = _context3["catch"](2);
13412
- throw new Error(_context3.t0);
13413
- case 14:
13388
+ throw new Error("prefererencesFile is expected to exist in ".concat(webId.doc));
13389
+ case 4:
13390
+ return _context2.abrupt("return", "".concat(settings, "/keys/privateKey.ttl"));
13391
+ case 5:
13414
13392
  case "end":
13415
- return _context3.stop();
13393
+ return _context2.stop();
13416
13394
  }
13417
- }, _callee3, null, [[2, 11]]);
13395
+ }, _callee2);
13418
13396
  }));
13419
- return function privKeyUrl(_x5) {
13420
- return _ref3.apply(this, arguments);
13397
+ return function privKeyUrl(_x4) {
13398
+ return _ref2.apply(this, arguments);
13421
13399
  };
13422
13400
  }();
13423
13401
  exports.privKeyUrl = privKeyUrl;
13424
- function getExistingPrivateKey(_x6, _x7) {
13402
+ function getExistingPrivateKey(_x5, _x6) {
13425
13403
  return _getExistingPrivateKey.apply(this, arguments);
13426
13404
  }
13427
13405
  function _getExistingPrivateKey() {
13428
- _getExistingPrivateKey = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(webId, privateKeyUrl) {
13429
- return _regenerator["default"].wrap(function _callee5$(_context5) {
13430
- while (1) switch (_context5.prev = _context5.next) {
13406
+ _getExistingPrivateKey = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(webId, privateKeyUrl) {
13407
+ return _regenerator["default"].wrap(function _callee4$(_context4) {
13408
+ while (1) switch (_context4.prev = _context4.next) {
13431
13409
  case 0:
13432
- _context5.next = 2;
13410
+ _context4.next = 2;
13433
13411
  return getKeyIfExists(webId, privateKeyUrl, 'privateKey');
13434
13412
  case 2:
13435
- return _context5.abrupt("return", _context5.sent);
13413
+ return _context4.abrupt("return", _context4.sent);
13436
13414
  case 3:
13437
13415
  case "end":
13438
- return _context5.stop();
13416
+ return _context4.stop();
13439
13417
  }
13440
- }, _callee5);
13418
+ }, _callee4);
13441
13419
  }));
13442
13420
  return _getExistingPrivateKey.apply(this, arguments);
13443
13421
  }
13444
- function getKeyIfExists(_x8, _x9, _x10) {
13422
+ function getKeyIfExists(_x7, _x8, _x9) {
13445
13423
  return _getKeyIfExists.apply(this, arguments);
13446
13424
  }
13447
13425
  function _getKeyIfExists() {
13448
- _getKeyIfExists = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6(webId, keyUrl, keyType) {
13426
+ _getKeyIfExists = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5(webId, keyUrl, keyType) {
13449
13427
  var key;
13450
- return _regenerator["default"].wrap(function _callee6$(_context6) {
13451
- while (1) switch (_context6.prev = _context6.next) {
13428
+ return _regenerator["default"].wrap(function _callee5$(_context5) {
13429
+ while (1) switch (_context5.prev = _context5.next) {
13452
13430
  case 0:
13453
- _context6.prev = 0;
13454
- _context6.next = 3;
13431
+ _context5.prev = 0;
13432
+ _context5.next = 3;
13455
13433
  return _solidLogic.store.fetcher.load(keyUrl);
13456
13434
  case 3:
13457
13435
  key = _solidLogic.store.any(webId, ns.solid(keyType)); // store.sym(CERT + keyType))
13458
- return _context6.abrupt("return", key === null || key === void 0 ? void 0 : key.value);
13436
+ return _context5.abrupt("return", key === null || key === void 0 ? void 0 : key.value);
13459
13437
  case 7:
13460
- _context6.prev = 7;
13461
- _context6.t0 = _context6["catch"](0);
13462
- if (!(_context6.t0.response.status === 404)) {
13463
- _context6.next = 24;
13438
+ _context5.prev = 7;
13439
+ _context5.t0 = _context5["catch"](0);
13440
+ if (!(_context5.t0.response.status === 404)) {
13441
+ _context5.next = 24;
13464
13442
  break;
13465
13443
  }
13466
13444
  debug.log('createIfNotExists: doc does NOT exist, will create... ' + keyUrl);
13467
- _context6.prev = 11;
13468
- _context6.next = 14;
13445
+ _context5.prev = 11;
13446
+ _context5.next = 14;
13469
13447
  return _solidLogic.store.fetcher.webOperation('PUT', keyUrl, {
13470
13448
  data: '',
13471
13449
  contentType: 'text/turtle'
13472
13450
  });
13473
13451
  case 14:
13474
- _context6.next = 20;
13452
+ _context5.next = 20;
13475
13453
  break;
13476
13454
  case 16:
13477
- _context6.prev = 16;
13478
- _context6.t1 = _context6["catch"](11);
13479
- debug.log('createIfNotExists doc FAILED: ' + keyUrl + ': ' + _context6.t1);
13480
- throw _context6.t1;
13455
+ _context5.prev = 16;
13456
+ _context5.t1 = _context5["catch"](11);
13457
+ debug.log('createIfNotExists doc FAILED: ' + keyUrl + ': ' + _context5.t1);
13458
+ throw _context5.t1;
13481
13459
  case 20:
13482
13460
  delete _solidLogic.store.fetcher.requested[keyUrl]; // delete cached 404 error
13483
13461
  // debug.log('createIfNotExists doc created ok ' + doc)
13484
- return _context6.abrupt("return", undefined);
13462
+ return _context5.abrupt("return", undefined);
13485
13463
  case 24:
13486
- debug.log('createIfNotExists doc FAILED: ' + keyUrl + ': ' + _context6.t0);
13487
- throw _context6.t0;
13464
+ debug.log('createIfNotExists doc FAILED: ' + keyUrl + ': ' + _context5.t0);
13465
+ throw _context5.t0;
13488
13466
  case 26:
13489
13467
  case "end":
13490
- return _context6.stop();
13468
+ return _context5.stop();
13491
13469
  }
13492
- }, _callee6, null, [[0, 7], [11, 16]]);
13470
+ }, _callee5, null, [[0, 7], [11, 16]]);
13493
13471
  }));
13494
13472
  return _getKeyIfExists.apply(this, arguments);
13495
13473
  }
@@ -13728,22 +13706,22 @@ Object.defineProperty(exports, "__esModule", ({
13728
13706
  }));
13729
13707
  exports.versionInfo = void 0;
13730
13708
  var versionInfo = {
13731
- buildTime: '2023-05-25T09:43:51Z',
13732
- commit: '6f763399cd83ecfe031ae11f0f50b71da1ff3bd5',
13709
+ buildTime: '2023-08-16T08:00:14Z',
13710
+ commit: '75c05c1d830611799317b095311e66247d5b2a91',
13733
13711
  npmInfo: {
13734
13712
  'solid-ui': '2.4.28',
13735
13713
  npm: '8.19.4',
13736
- node: '16.20.0',
13714
+ node: '16.20.1',
13737
13715
  v8: '9.4.146.26-node.26',
13738
13716
  uv: '1.43.0',
13739
13717
  zlib: '1.2.11',
13740
13718
  brotli: '1.0.9',
13741
- ares: '1.19.0',
13719
+ ares: '1.19.1',
13742
13720
  modules: '93',
13743
13721
  nghttp2: '1.47.0',
13744
13722
  napi: '8',
13745
- llhttp: '6.0.10',
13746
- openssl: '1.1.1t+quic',
13723
+ llhttp: '6.0.11',
13724
+ openssl: '1.1.1u+quic',
13747
13725
  cldr: '41.0',
13748
13726
  icu: '71.1',
13749
13727
  tz: '2022f',
@@ -15168,16 +15146,17 @@ exports.makeDropTarget = makeDropTarget;
15168
15146
  exports.uploadFiles = uploadFiles;
15169
15147
  var debug = _interopRequireWildcard(__webpack_require__(/*! ../debug */ "./lib/debug.js"));
15170
15148
  var mime = _interopRequireWildcard(__webpack_require__(/*! mime-types */ "./node_modules/mime-types/index.js"));
15149
+ var style = _interopRequireWildcard(__webpack_require__(/*! ../style */ "./lib/style.js"));
15171
15150
  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); }
15172
15151
  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; }
15173
15152
  /* Drag and drop common functionality
15174
15153
  *
15175
15154
  * It is easy to make something draggable, or to make it a drag target!
15176
- * Just call the functions below. In a solid world, any part of the UI which
15177
- * represent one thing which has a UR, should be made draggable using makeDraggable
15155
+ * Just call the functions below. In a solid world, any part of the UI which
15156
+ * represent one thing which has a URI, should be made draggable using makeDraggable
15178
15157
  * Any list of things should typically allow you to drag new members of the list
15179
15158
  * onto it.
15180
- * The file upload function uploadFiles is provided as often of someone drags a file from the computer
15159
+ * The file upload function uploadFiles is provided as often as someone drags a file from the computer
15181
15160
  * desktop, you may want to upload it into the pod.
15182
15161
  */
15183
15162
 
@@ -15185,22 +15164,16 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
15185
15164
 
15186
15165
  function makeDropTarget(ele, droppedURIHandler, droppedFileHandler) {
15187
15166
  var dragoverListener = function dragoverListener(e) {
15188
- e.preventDefault(); // Neeed else drop does not work [sic]
15167
+ e.preventDefault(); // Need else drop does not work [sic]
15189
15168
  e.dataTransfer.dropEffect = 'copy';
15190
15169
  };
15191
15170
  var dragenterListener = function dragenterListener(e) {
15192
15171
  debug.log('dragenter event dropEffect: ' + e.dataTransfer.dropEffect);
15193
- if (this.style) {
15172
+ if (this.localStyle) {
15194
15173
  // necessary not sure when
15195
15174
  if (!this.savedStyle) {
15196
- this.savedStyle = {};
15197
- this.savedStyle.border = this.style.border;
15198
- this.savedStyle.backgroundColor = this.style.backgroundColor;
15199
- this.savedStyle.borderRadius = this.style.borderRadius;
15175
+ this.savedStyle = style.dragEvent;
15200
15176
  }
15201
- this.style.backgroundColor = '#ccc';
15202
- this.style.border = '0.25em dashed black';
15203
- this.style.borderRadius = '0.3em';
15204
15177
  }
15205
15178
  e.dataTransfer.dropEffect = 'link';
15206
15179
  debug.log('dragenter event dropEffect 2: ' + e.dataTransfer.dropEffect);
@@ -15208,12 +15181,9 @@ function makeDropTarget(ele, droppedURIHandler, droppedFileHandler) {
15208
15181
  var dragleaveListener = function dragleaveListener(e) {
15209
15182
  debug.log('dragleave event dropEffect: ' + e.dataTransfer.dropEffect);
15210
15183
  if (this.savedStyle) {
15211
- this.style.border = this.savedStyle.border;
15212
- this.style.backgroundColor = this.savedStyle.backgroundColor;
15213
- this.style.borderRadius = this.savedStyle.borderRadius;
15184
+ this.localStyle = this.savedStyle;
15214
15185
  } else {
15215
- this.style.backgroundColor = 'white';
15216
- this.style.border = '0em solid black';
15186
+ this.localStyle = style.dropEvent;
15217
15187
  }
15218
15188
  };
15219
15189
  var dropListener = function dropListener(e) {
@@ -15252,7 +15222,7 @@ function makeDropTarget(ele, droppedURIHandler, droppedFileHandler) {
15252
15222
  if (uris) {
15253
15223
  droppedURIHandler(uris);
15254
15224
  }
15255
- this.style.backgroundColor = 'white'; // restore style
15225
+ this.localStyle = style.restoreStyle; // restore style
15256
15226
  return false;
15257
15227
  }; // dropListener
15258
15228
 
@@ -15373,11 +15343,17 @@ function uploadFiles(fetcher, files, fileBase, imageBase, successHandler) {
15373
15343
  "use strict";
15374
15344
 
15375
15345
 
15346
+ var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");
15347
+ var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "./node_modules/@babel/runtime/helpers/typeof.js");
15376
15348
  Object.defineProperty(exports, "__esModule", ({
15377
15349
  value: true
15378
15350
  }));
15379
15351
  exports.errorMessageBlock = errorMessageBlock;
15380
15352
  var _widgets = __webpack_require__(/*! ../widgets */ "./lib/widgets/index.js");
15353
+ var style = _interopRequireWildcard(__webpack_require__(/*! ../style */ "./lib/style.js"));
15354
+ var _styleConstants = _interopRequireDefault(__webpack_require__(/*! ../styleConstants */ "./lib/styleConstants.js"));
15355
+ 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); }
15356
+ 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; }
15381
15357
  /**
15382
15358
  * Create an error message block
15383
15359
  * @param dom The DOM on which dom.createElement will be called
@@ -15406,8 +15382,9 @@ function errorMessageBlock(dom, err, backgroundColor, err2) {
15406
15382
  }
15407
15383
  div.appendChild((0, _widgets.cancelButton)(dom, function () {
15408
15384
  if (div.parentNode) div.parentNode.removeChild(div);
15409
- })).style = 'width: 2em; height: 2em; align: right;';
15410
- div.setAttribute('style', 'margin: 0.1em; padding: 0.5em; border: 0.05em solid gray; background-color: ' + (backgroundColor || '#fee') + '; color:black;');
15385
+ })).style = style.errorCancelButton;
15386
+ div.setAttribute('style', style.errorMessageBlockStyle);
15387
+ div.style.backgroundColor = backgroundColor || _styleConstants["default"].defaultErrorBackgroundColor;
15411
15388
  return div;
15412
15389
  }
15413
15390
  //# sourceMappingURL=error.js.map
@@ -15504,6 +15481,7 @@ var _error = __webpack_require__(/*! ./error */ "./lib/widgets/error.js");
15504
15481
  var _basic = __webpack_require__(/*! ./forms/basic */ "./lib/widgets/forms/basic.js");
15505
15482
  var _autocompleteField = __webpack_require__(/*! ./forms/autocomplete/autocompleteField */ "./lib/widgets/forms/autocomplete/autocompleteField.js");
15506
15483
  var style = _interopRequireWildcard(__webpack_require__(/*! ../style */ "./lib/style.js"));
15484
+ var _styleConstants = _interopRequireDefault(__webpack_require__(/*! ../styleConstants */ "./lib/styleConstants.js"));
15507
15485
  var _iconBase = __webpack_require__(/*! ../iconBase */ "./lib/iconBase.js");
15508
15486
  var log = _interopRequireWildcard(__webpack_require__(/*! ../log */ "./lib/log.js"));
15509
15487
  var ns = _interopRequireWildcard(__webpack_require__(/*! ../ns */ "./lib/ns.js"));
@@ -16189,7 +16167,7 @@ _fieldFunction.field[ns.ui('MultiLineTextField').uri] = function (dom, container
16189
16167
  box.style.display = 'flex';
16190
16168
  box.style.flexDirection = 'row';
16191
16169
  var left = box.appendChild(dom.createElement('div'));
16192
- left.style.width = style.formFieldNameBoxWidth;
16170
+ left.style.width = _styleConstants["default"].formFieldNameBoxWidth;
16193
16171
  var right = box.appendChild(dom.createElement('div'));
16194
16172
  left.appendChild((0, _basic.fieldLabel)(dom, property, form));
16195
16173
  dataDoc = (0, _basic.fieldStore)(subject, property, dataDoc);
@@ -16616,7 +16594,7 @@ function promptForNew(dom, kb, subject, predicate, theClass, form, dataDoc, call
16616
16594
  }
16617
16595
 
16618
16596
  log.debug('form is ' + form);
16619
- box.setAttribute('style', "border: 0.05em solid ".concat(style.formBorderColor, "; color: ").concat(style.formBorderColor)); // @@color?
16597
+ box.setAttribute('style', "border: 0.05em solid ".concat(_styleConstants["default"].formBorderColor, "; color: ").concat(_styleConstants["default"].formBorderColor)); // @@color?
16620
16598
  box.innerHTML = '<h3>New ' + utils.label(theClass) + '</h3>';
16621
16599
  var formFunction = (0, _fieldFunction.fieldFunction)(dom, form);
16622
16600
  var object = newThing(dataDoc);
@@ -16677,12 +16655,12 @@ function makeDescription(dom, kb, subject, predicate, dataDoc, callbackFunction)
16677
16655
  submit.disabled = true;
16678
16656
  submit.setAttribute('style', 'visibility: hidden; float: right;'); // Keep UI clean
16679
16657
  field.disabled = true;
16680
- field.style.color = style.textInputColorPending; // setAttribute('style', style + 'color: gray;') // pending
16658
+ field.style.color = _styleConstants["default"].textInputColorPending;
16681
16659
  var ds = kb.statementsMatching(subject, predicate, null, dataDoc);
16682
16660
  var is = $rdf.st(subject, predicate, field.value, dataDoc);
16683
16661
  kb.updater.update(ds, is, function (uri, ok, body) {
16684
16662
  if (ok) {
16685
- field.style.color = style.textInputColor;
16663
+ field.style.color = _styleConstants["default"].textInputColor;
16686
16664
  field.disabled = false;
16687
16665
  } else {
16688
16666
  group.appendChild((0, _error.errorMessageBlock)(dom, 'Error (while saving change to ' + dataDoc.uri + '): ' + body));
@@ -16711,7 +16689,7 @@ function makeDescription(dom, kb, subject, predicate, dataDoc, callbackFunction)
16711
16689
  field.addEventListener('change', saveChange, true);
16712
16690
  } else {
16713
16691
  field.disabled = true; // @@ change color too
16714
- field.style.backgroundColor = style.textInputBackgroundColorUneditable;
16692
+ field.style.backgroundColor = _styleConstants["default"].textInputBackgroundColorUneditable;
16715
16693
  }
16716
16694
  return group;
16717
16695
  }
@@ -16836,7 +16814,7 @@ function makeSelectForClassifierOptions(dom, kb, subject, predicate, possible, o
16836
16814
  });
16837
16815
  };
16838
16816
  var select = dom.createElement('select');
16839
- select.setAttribute('style', style.formSelectSTyle);
16817
+ select.setAttribute('style', style.formSelectStyle);
16840
16818
  if (options.multiple) select.setAttribute('multiple', 'true');
16841
16819
  select.currentURI = null;
16842
16820
  select.refresh = function () {
@@ -16979,7 +16957,7 @@ function makeSelectForOptions(dom, kb, subject, predicate, possible, options, da
16979
16957
  });
16980
16958
  };
16981
16959
  var select = dom.createElement('select');
16982
- select.setAttribute('style', style.formSelectSTyle);
16960
+ select.setAttribute('style', style.formSelectStyle);
16983
16961
  select.currentURI = null;
16984
16962
  select.refresh = function () {
16985
16963
  actual = getActual(); // refresh
@@ -17265,7 +17243,7 @@ function makeSelectForChoice(dom, container, kb, subject, predicate, inputPossib
17265
17243
  select.refresh();
17266
17244
  };
17267
17245
  var select = dom.createElement('select');
17268
- select.setAttribute('style', style.formSelectSTyle);
17246
+ select.setAttribute('style', style.formSelectStyle);
17269
17247
  select.setAttribute('id', 'formSelect');
17270
17248
  select.currentURI = null;
17271
17249
  for (var uri in optionsFromClassUIfrom) {
@@ -18050,6 +18028,7 @@ var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime
18050
18028
  var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/asyncToGenerator.js"));
18051
18029
  var debug = _interopRequireWildcard(__webpack_require__(/*! ../../../debug */ "./lib/debug.js"));
18052
18030
  var style = _interopRequireWildcard(__webpack_require__(/*! ../../../style */ "./lib/style.js"));
18031
+ var _styleConstants = _interopRequireDefault(__webpack_require__(/*! ../../../styleConstants */ "./lib/styleConstants.js"));
18053
18032
  var widgets = _interopRequireWildcard(__webpack_require__(/*! ../../../widgets */ "./lib/widgets/index.js"));
18054
18033
  var _solidLogic = __webpack_require__(/*! solid-logic */ "./node_modules/solid-logic/lib/index.js");
18055
18034
  var _publicData = __webpack_require__(/*! ./publicData */ "./lib/widgets/forms/autocomplete/publicData.js");
@@ -18447,7 +18426,7 @@ function _renderAutoComplete() {
18447
18426
  searchInput = cell.appendChild(dom.createElement('input'));
18448
18427
  searchInput.setAttribute('type', 'text');
18449
18428
  initialize();
18450
- size = acOptions.size || style.textInputSize || 20;
18429
+ size = acOptions.size || _styleConstants["default"].textInputSize || 20;
18451
18430
  searchInput.setAttribute('size', size);
18452
18431
  searchInput.setAttribute('data-testid', 'autocomplete-input');
18453
18432
  searchInputStyle = style.textInputStyle ||
@@ -19338,6 +19317,7 @@ function _getDbpediaDetails() {
19338
19317
  "use strict";
19339
19318
 
19340
19319
 
19320
+ var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");
19341
19321
  var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "./node_modules/@babel/runtime/helpers/typeof.js");
19342
19322
  Object.defineProperty(exports, "__esModule", ({
19343
19323
  value: true
@@ -19350,6 +19330,7 @@ var _rdflib = __webpack_require__(/*! rdflib */ "./node_modules/rdflib/esm/index
19350
19330
  var _solidLogic = __webpack_require__(/*! solid-logic */ "./node_modules/solid-logic/lib/index.js");
19351
19331
  var ns = _interopRequireWildcard(__webpack_require__(/*! ../../ns */ "./lib/ns.js"));
19352
19332
  var _style = __webpack_require__(/*! ../../style */ "./lib/style.js");
19333
+ var _styleConstants = _interopRequireDefault(__webpack_require__(/*! ../../styleConstants */ "./lib/styleConstants.js"));
19353
19334
  var _utils = __webpack_require__(/*! ../../utils */ "./lib/utils/index.js");
19354
19335
  var _error = __webpack_require__(/*! ../error */ "./lib/widgets/error.js");
19355
19336
  var _fieldFunction = __webpack_require__(/*! ./fieldFunction */ "./lib/widgets/forms/fieldFunction.js");
@@ -19365,7 +19346,7 @@ function renderNameValuePair(dom, kb, box, form, label) {
19365
19346
  box.style.display = 'flex';
19366
19347
  box.style.flexDirection = 'row';
19367
19348
  var lhs = box.appendChild(dom.createElement('div'));
19368
- lhs.style.width = _style.formFieldNameBoxWidth;
19349
+ lhs.style.width = _styleConstants["default"].formFieldNameBoxWidth;
19369
19350
  var rhs = box.appendChild(dom.createElement('div'));
19370
19351
  lhs.setAttribute('class', 'formFieldName');
19371
19352
  lhs.setAttribute('style', _style.formFieldNameBoxStyle);
@@ -19470,10 +19451,10 @@ function basicField(dom, container, already, subject, form, doc, callbackFunctio
19470
19451
  field.style = style;
19471
19452
  rhs.appendChild(field);
19472
19453
  field.setAttribute('type', params.type ? params.type : 'text');
19473
- var size = kb.anyJS(form, ns.ui('size')) || _style.textInputSize || 20;
19454
+ var size = kb.anyJS(form, ns.ui('size')) || _styleConstants["default"].textInputSize || 20;
19474
19455
  field.setAttribute('size', size);
19475
19456
  var maxLength = kb.any(form, ns.ui('maxLength'));
19476
- field.setAttribute('maxLength', maxLength ? '' + maxLength : '4096');
19457
+ field.setAttribute('maxLength', maxLength ? '' + maxLength : _styleConstants["default"].basicMaxLength);
19477
19458
  doc = doc || fieldStore(subject, property, doc);
19478
19459
  var obj = kb.any(subject, property, undefined, doc);
19479
19460
  if (!obj) {
@@ -19495,7 +19476,6 @@ function basicField(dom, container, already, subject, form, doc, callbackFunctio
19495
19476
  field.readOnly = true // was: disabled. readOnly is better
19496
19477
  ;
19497
19478
  field.style = _style.textInputStyleUneditable + paramStyle;
19498
- // backgroundColor = textInputBackgroundColorUneditable
19499
19479
  if (suppressEmptyUneditable && field.value === '') {
19500
19480
  box.style.display = 'none'; // clutter
19501
19481
  }
@@ -19736,10 +19716,10 @@ var fieldParams = (_fieldParams = {}, (0, _defineProperty2["default"])(_fieldPar
19736
19716
  style: _style.formGroupStyle
19737
19717
  }), (0, _defineProperty2["default"])(_fieldParams, ns.ui('Comment').uri, {
19738
19718
  element: 'p',
19739
- style: _style.commentStyle // was `padding: 0.1em 1.5em; color: ${formHeadingColor}; white-space: pre-wrap;`
19719
+ style: _style.commentStyle
19740
19720
  }), (0, _defineProperty2["default"])(_fieldParams, ns.ui('Heading').uri, {
19741
19721
  element: 'h3',
19742
- style: _style.formHeadingStyle // was: `font-size: 110%; font-weight: bold; color: ${formHeadingColor}; padding: 0.2em;`
19722
+ style: _style.formHeadingStyle
19743
19723
  }), _fieldParams);
19744
19724
  exports.fieldParams = fieldParams;
19745
19725
  //# sourceMappingURL=fieldParams.js.map