solid-ui 2.4.28-bb8b5144 → 2.4.28-cdaefc01

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/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
  }
@@ -8265,21 +8254,21 @@ var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime
8265
8254
  var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/asyncToGenerator.js"));
8266
8255
  var debug = _interopRequireWildcard(__webpack_require__(/*! ../debug */ "./lib/debug.js"));
8267
8256
  var _iconBase = __webpack_require__(/*! ../iconBase */ "./lib/iconBase.js");
8257
+ var style = _interopRequireWildcard(__webpack_require__(/*! ../style */ "./lib/style.js"));
8268
8258
  var widgets = _interopRequireWildcard(__webpack_require__(/*! ../widgets */ "./lib/widgets/index.js"));
8269
8259
  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
8260
  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
8261
  //
8273
8262
  // Media input widget
8274
8263
  //
8275
8264
  //
8276
8265
  // 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
8266
+ // The HTML5 functionality (on mobile) is to prompt for either
8267
+ // a realtime camera capture, OR a selection from images already not the device
8279
8268
  // (eg camera roll).
8280
8269
  //
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.
8270
+ // The solid alternative is to either take a photo
8271
+ // or access camera roll (etc) OR to access solid cloud storage of favorite photo albums.
8283
8272
  // (Especially latest taken ones)
8284
8273
  //
8285
8274
 
@@ -8288,10 +8277,6 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
8288
8277
  var cameraIcon = _iconBase.icons.iconBase + 'noun_Camera_1618446_000000.svg'; // Get it from github
8289
8278
  var retakeIcon = _iconBase.icons.iconBase + 'noun_479395.svg'; // Get it from github
8290
8279
 
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
8280
  var contentType = 'image/png';
8296
8281
 
8297
8282
  /** A control to capture a picture using camera
@@ -8336,7 +8321,7 @@ function cameraCaptureControl(dom, store, getImageDoc, doneCallback) {
8336
8321
  player = main.appendChild(dom.createElement('video'));
8337
8322
  player.setAttribute('controls', '1');
8338
8323
  player.setAttribute('autoplay', '1');
8339
- player.setAttribute('style', controlStyle);
8324
+ player.setAttribute('style', style.controlStyle);
8340
8325
  if (!navigator.mediaDevices) {
8341
8326
  throw new Error('navigator.mediaDevices not available');
8342
8327
  }
@@ -8358,9 +8343,9 @@ function cameraCaptureControl(dom, store, getImageDoc, doneCallback) {
8358
8343
  function grabCanvas() {
8359
8344
  // Draw the video frame to the canvas.
8360
8345
  canvas = dom.createElement('canvas');
8361
- canvas.setAttribute('width', canvasWidth);
8362
- canvas.setAttribute('height', canvasHeight);
8363
- canvas.setAttribute('style', controlStyle);
8346
+ canvas.setAttribute('width', style.canvasWidth);
8347
+ canvas.setAttribute('height', style.canvasHeight);
8348
+ canvas.setAttribute('style', style.controlStyle);
8364
8349
  main.appendChild(canvas);
8365
8350
  var context = canvas.getContext('2d');
8366
8351
  context.drawImage(player, 0, 0, canvas.width, canvas.height);
@@ -8417,9 +8402,9 @@ function cameraCaptureControl(dom, store, getImageDoc, doneCallback) {
8417
8402
  * @param {IndexedForumla} store - The quadstore to store data in
8418
8403
  * @param {fuunction} getImageDoc - returns NN of the image file to be created
8419
8404
  * @param {function<Node>} doneCallback - called with the image taken
8420
- * @returns {DomElement} - A div element with the buton in it
8405
+ * @returns {DomElement} - A div element with the button in it
8421
8406
  *
8422
- * This expacts the buttton to a large control when it is pressed
8407
+ * This expects the button to a large control when it is pressed
8423
8408
  */
8424
8409
 
8425
8410
  function cameraButton(dom, store, getImageDoc, doneCallback) {
@@ -8857,10 +8842,10 @@ Object.defineProperty(exports, "recordParticipation", ({
8857
8842
  return _participation.recordParticipation;
8858
8843
  }
8859
8844
  }));
8860
- Object.defineProperty(exports, "renderPartipants", ({
8845
+ Object.defineProperty(exports, "renderParticipants", ({
8861
8846
  enumerable: true,
8862
8847
  get: function get() {
8863
- return _participation.renderPartipants;
8848
+ return _participation.renderParticipants;
8864
8849
  }
8865
8850
  }));
8866
8851
  exports.xmlEncode = xmlEncode;
@@ -8878,6 +8863,7 @@ var _widgets = __webpack_require__(/*! ./widgets */ "./lib/widgets/index.js");
8878
8863
  var _utils = __webpack_require__(/*! ./utils */ "./lib/utils/index.js");
8879
8864
  var _debug = __webpack_require__(/*! ./debug */ "./lib/debug.js");
8880
8865
  var _solidLogic = __webpack_require__(/*! solid-logic */ "./node_modules/solid-logic/lib/index.js");
8866
+ var style = _interopRequireWildcard(__webpack_require__(/*! ./style */ "./lib/style.js"));
8881
8867
  var _participation = __webpack_require__(/*! ./participation */ "./lib/participation.js");
8882
8868
  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
8869
  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 +8928,7 @@ function lightColorHash(author) {
8942
8928
  /** notepad
8943
8929
  *
8944
8930
  * @param {HTMLDocument} dom - the web page of the browser
8945
- * @param {NamedNode} padDoc - the document into which the particpation should be shown
8931
+ * @param {NamedNode} padDoc - the document into which the participation should be shown
8946
8932
  * @param {NamedNode} subject - the thing in which participation is happening
8947
8933
  * @param {NamedNode} me - person who is logged into the pod
8948
8934
  * @param {notepadOptions} options - the options that can be passed in consist of statusArea, exists
@@ -8955,7 +8941,7 @@ function notepad(dom, padDoc, subject, me, options) {
8955
8941
  if (me && !me.uri) throw new Error('UI.pad.notepad: Invalid userid');
8956
8942
  var updater = store.updater;
8957
8943
  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;');
8944
+ table.setAttribute('style', style.notepadStyle);
8959
8945
  var upstreamStatus = null;
8960
8946
  var downstreamStatus = null;
8961
8947
  if (options.statusArea) {
@@ -8964,10 +8950,10 @@ function notepad(dom, padDoc, subject, me, options) {
8964
8950
  upstreamStatus = tr.appendChild(dom.createElement('td'));
8965
8951
  downstreamStatus = tr.appendChild(dom.createElement('td'));
8966
8952
  if (upstreamStatus) {
8967
- upstreamStatus.setAttribute('style', 'width:50%');
8953
+ upstreamStatus.setAttribute('style', style.upstreamStatus);
8968
8954
  }
8969
8955
  if (downstreamStatus) {
8970
- downstreamStatus.setAttribute('style', 'width:50%');
8956
+ downstreamStatus.setAttribute('style', style.downstreamStatus);
8971
8957
  }
8972
8958
  }
8973
8959
  /* @@ TODO want to look into this, it seems upstream should be a boolean and default to false ?
@@ -8990,9 +8976,9 @@ function notepad(dom, padDoc, subject, me, options) {
8990
8976
  var setPartStyle = function setPartStyle(part, colors, pending) {
8991
8977
  var chunk = part.subject;
8992
8978
  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%;'];
8979
+ var baseStyle = style.baseStyle;
8980
+ var headingCore = style.headingCore;
8981
+ var headingStyle = style.headingStyle;
8996
8982
  var author = kb.any(chunk, ns.dc('author'));
8997
8983
  if (!colors && author) {
8998
8984
  // Hash the user webid for now -- later allow user selection!
@@ -9004,9 +8990,9 @@ function notepad(dom, padDoc, subject, me, options) {
9004
8990
  // and when the indent is stored as a Number itself, not in an object.
9005
8991
  var indent = kb.any(chunk, PAD('indent'));
9006
8992
  indent = indent ? indent.value : 0;
9007
- var style = indent >= 0 ? baseStyle + 'text-indent: ' + indent * 3 + 'em;' : headingCore + headingStyle[-1 - indent];
8993
+ var localStyle = indent >= 0 ? baseStyle + 'text-indent: ' + indent * 3 + 'em;' : headingCore + headingStyle[-1 - indent];
9008
8994
  // ? baseStyle + 'padding-left: ' + (indent * 3) + 'em;'
9009
- part.setAttribute('style', style + colors);
8995
+ part.setAttribute('style', localStyle + colors);
9010
8996
  };
9011
8997
  var removePart = function removePart(part) {
9012
8998
  var chunk = part.subject;
@@ -9086,28 +9072,6 @@ function notepad(dom, padDoc, subject, me, options) {
9086
9072
  });
9087
9073
  };
9088
9074
 
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
9075
  var addListeners = function addListeners(part, chunk) {
9112
9076
  part.addEventListener('keydown', function (event) {
9113
9077
  if (!updater) {
@@ -9150,7 +9114,7 @@ function notepad(dom, padDoc, subject, me, options) {
9150
9114
  return;
9151
9115
  case 3: // being deleted already
9152
9116
  case 4:
9153
- // already deleme state
9117
+ // already deleted state
9154
9118
  return;
9155
9119
  case undefined:
9156
9120
  case 0:
@@ -9451,8 +9415,6 @@ function notepad(dom, padDoc, subject, me, options) {
9451
9415
  }
9452
9416
  return;
9453
9417
  }
9454
- // var last = kb.the(undefined, PAD('previous'), subject)
9455
- // var chunk = first // = kb.the(subject, PAD('next'));
9456
9418
  var row;
9457
9419
 
9458
9420
  // First see which of the logical chunks have existing physical manifestations
@@ -9514,7 +9476,7 @@ function notepad(dom, padDoc, subject, me, options) {
9514
9476
  (0, _debug.log)(' reloaded OK');
9515
9477
  clearStatus();
9516
9478
  if (!consistencyCheck()) {
9517
- complain('CONSITENCY CHECK FAILED');
9479
+ complain('CONSISTENCY CHECK FAILED');
9518
9480
  } else {
9519
9481
  refreshTree(table);
9520
9482
  }
@@ -9681,7 +9643,7 @@ Object.defineProperty(exports, "__esModule", ({
9681
9643
  exports.manageParticipation = manageParticipation;
9682
9644
  exports.participationObject = participationObject;
9683
9645
  exports.recordParticipation = recordParticipation;
9684
- exports.renderPartipants = renderPartipants;
9646
+ exports.renderParticipants = renderParticipants;
9685
9647
  var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"));
9686
9648
  var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"));
9687
9649
  var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/assertThisInitialized.js"));
@@ -9696,6 +9658,7 @@ var ns = _interopRequireWildcard(__webpack_require__(/*! ./ns */ "./lib/ns.js"))
9696
9658
  var _widgets = __webpack_require__(/*! ./widgets */ "./lib/widgets/index.js");
9697
9659
  var _utils = __webpack_require__(/*! ./utils */ "./lib/utils/index.js");
9698
9660
  var _pad = __webpack_require__(/*! ./pad */ "./lib/pad.js");
9661
+ var style = _interopRequireWildcard(__webpack_require__(/*! ./style */ "./lib/style.js"));
9699
9662
  var _solidLogic = __webpack_require__(/*! solid-logic */ "./node_modules/solid-logic/lib/index.js");
9700
9663
  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
9664
  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; }
@@ -9730,9 +9693,9 @@ var store = _solidLogic.solidLogicSingleton.store;
9730
9693
  * @param {NamedNode} unused2/me - user that is logged into the pod (this argument is no longer used, but left in for backwards compatibility)
9731
9694
  * @param {ParticipationOptions} options - the options that can be passed in are deleteFunction, link, and draggable these are used by the personTR button
9732
9695
  */
9733
- function renderPartipants(dom, table, unused1, subject, unused2, options) {
9734
- table.setAttribute('style', 'margin: 0.8em;');
9735
- var newRowForParticpation = function newRowForParticpation(parp) {
9696
+ function renderParticipants(dom, table, unused1, subject, unused2, options) {
9697
+ table.setAttribute('style', style.participantsStyle);
9698
+ var newRowForParticipation = function newRowForParticipation(parp) {
9736
9699
  var person = store.any(parp, ns.wf('participant'));
9737
9700
  var tr;
9738
9701
  if (!person) {
@@ -9742,11 +9705,12 @@ function renderPartipants(dom, table, unused1, subject, unused2, options) {
9742
9705
  }
9743
9706
  var bg = store.anyValue(parp, ns.ui('backgroundColor')) || 'white';
9744
9707
  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);
9708
+ block.setAttribute('style', style.participantsBlock);
9709
+ block.style.backgroundColor = bg;
9746
9710
  tr = (0, _widgets.personTR)(dom, null, person, options);
9747
9711
  table.appendChild(tr);
9748
9712
  var td = dom.createElement('td');
9749
- td.setAttribute('style', 'vertical-align: middle;');
9713
+ td.setAttribute('style', style.personTableTD);
9750
9714
  td.appendChild(block);
9751
9715
  tr.insertBefore(td, tr.firstChild);
9752
9716
  return tr;
@@ -9760,16 +9724,16 @@ function renderPartipants(dom, table, unused1, subject, unused2, options) {
9760
9724
  var participations = parps.map(function (p) {
9761
9725
  return p[1];
9762
9726
  });
9763
- (0, _utils.syncTableToArray)(table, participations, newRowForParticpation);
9727
+ (0, _utils.syncTableToArray)(table, participations, newRowForParticipation);
9764
9728
  };
9765
9729
  table.refresh = syncTable;
9766
9730
  syncTable();
9767
9731
  return table;
9768
9732
  }
9769
9733
 
9770
- /** Record, or find old, Particpation object
9734
+ /** Record, or find old, Participation object
9771
9735
  *
9772
- * A particpaption object is a place to record things specifically about
9736
+ * A participation object is a place to record things specifically about
9773
9737
  * subject and the user, such as preferences, start of membership, etc
9774
9738
  * @param {NamedNode} subject - the thing in which the participation is happening
9775
9739
  * @param {NamedNode} document - where to record the data
@@ -9804,20 +9768,20 @@ function participationObject(subject, padDoc, me) {
9804
9768
  }
9805
9769
  candidates.sort(); // Pick the earliest
9806
9770
  // @@ Possibly, for extra credit, delete the others, if we have write access
9807
- debug.warn('Multiple particpation objects, picking earliest, in ' + padDoc);
9771
+ debug.warn('Multiple participation objects, picking earliest, in ' + padDoc);
9808
9772
  resolve(candidates[0][1]);
9809
9773
  // throw new Error('Multiple records of your participation')
9810
9774
  }
9811
9775
 
9812
9776
  if (parps.length) {
9813
9777
  // If I am not already recorded
9814
- resolve(parps[0]); // returns the particpation object
9778
+ resolve(parps[0]); // returns the participation object
9815
9779
  } else {
9816
9780
  var _participation2 = (0, _widgets.newThing)(padDoc);
9817
9781
  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
9782
  store.updater.update([], ins, function (uri, ok, errorMessage) {
9819
9783
  if (!ok) {
9820
- reject(new Error('Error recording your partipation: ' + errorMessage));
9784
+ reject(new Error('Error recording your participation: ' + errorMessage));
9821
9785
  } else {
9822
9786
  resolve(_participation2);
9823
9787
  }
@@ -9830,7 +9794,7 @@ function participationObject(subject, padDoc, me) {
9830
9794
  /** Record my participation and display participants
9831
9795
  *
9832
9796
  * @param {NamedNode} subject - the thing in which participation is happening
9833
- * @param {NamedNode} padDoc - the document into which the particpation should be recorded
9797
+ * @param {NamedNode} padDoc - the document into which the participation should be recorded
9834
9798
  * @param {DOMNode} refreshable - a DOM element whose refresh() is to be called if the change works
9835
9799
  *
9836
9800
  */
@@ -9846,24 +9810,22 @@ function recordParticipation(subject, padDoc, refreshable) {
9846
9810
  }
9847
9811
  if (parps.length) {
9848
9812
  // If I am not already recorded
9849
- return parps[0]; // returns the particpation object
9813
+ return parps[0]; // returns the participation object
9850
9814
  } else {
9851
9815
  if (!store.updater.editable(padDoc)) {
9852
- debug.log('Not recording participation, as no write acesss as ' + me + ' to ' + padDoc);
9816
+ debug.log('Not recording participation, as no write access as ' + me + ' to ' + padDoc);
9853
9817
  return null;
9854
9818
  }
9855
9819
  var participation = (0, _widgets.newThing)(padDoc);
9856
9820
  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
9821
  store.updater.update([], ins, function (uri, ok, errorMessage) {
9858
9822
  if (!ok) {
9859
- throw new Error('Error recording your partipation: ' + errorMessage);
9823
+ throw new Error('Error recording your participation: ' + errorMessage);
9860
9824
  }
9861
9825
  if (refreshable && refreshable.refresh) {
9862
9826
  refreshable.refresh();
9863
9827
  }
9864
- // UI.pad.renderPartipants(dom, table, padDoc, subject, me, options)
9865
9828
  });
9866
-
9867
9829
  return participation;
9868
9830
  }
9869
9831
  }
@@ -9872,7 +9834,7 @@ function recordParticipation(subject, padDoc, refreshable) {
9872
9834
  *
9873
9835
  * @param {Document} dom - the web page loaded into the browser
9874
9836
  * @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
9837
+ * @param {NamedNode} document - the document into which the participation should be shown
9876
9838
  * @param {NamedNode} subject - the thing in which participation is happening
9877
9839
  * @param {NamedNode} me - the logged in user
9878
9840
  * @param {ParticipationOptions} options - the options that can be passed in are deleteFunction, link, and draggable these are used by the personTR button
@@ -9881,12 +9843,12 @@ function recordParticipation(subject, padDoc, refreshable) {
9881
9843
  function manageParticipation(dom, container, padDoc, subject, me, options) {
9882
9844
  var table = dom.createElement('table');
9883
9845
  container.appendChild(table);
9884
- renderPartipants(dom, table, padDoc, subject, me, options);
9846
+ renderParticipants(dom, table, padDoc, subject, me, options);
9885
9847
  var _participation;
9886
9848
  try {
9887
9849
  _participation = recordParticipation(subject, padDoc, table);
9888
9850
  } catch (e) {
9889
- container.appendChild((0, _widgets.errorMessageBlock)(dom, 'Error recording your partipation: ' + e)); // Clean up?
9851
+ container.appendChild((0, _widgets.errorMessageBlock)(dom, 'Error recording your participation: ' + e)); // Clean up?
9890
9852
  }
9891
9853
 
9892
9854
  return table;
@@ -10281,6 +10243,8 @@ var formFieldNameBoxWidth = '8em'; // The fixed amount to get form fields to lin
10281
10243
  // The latter we put in when switching awy from using tables. Getting allignment between
10282
10244
  // fields in different groups though is hard problem.
10283
10245
 
10246
+ var mediaModuleCanvasWidth = '640';
10247
+ var mediaModuleCanvasHeight = '480';
10284
10248
  var style = {
10285
10249
  // styleModule
10286
10250
 
@@ -10406,7 +10370,35 @@ var style = {
10406
10370
  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
10371
  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
10372
  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'
10373
+ 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',
10374
+ // media
10375
+ controlStyle: "border-radius: 0.5em; margin: 0.8em; width:".concat(mediaModuleCanvasWidth, "; height:").concat(mediaModuleCanvasHeight, ";"),
10376
+ // dragAndDrop
10377
+ dragEvent: 'background-color: #ccc; border: 0.25em dashed black; border-radius: 0.3em;',
10378
+ dropEvent: 'background-color: white; border: 0em solid black;',
10379
+ restoreStyle: 'background-color: white;',
10380
+ // errors
10381
+ errorCancelButton: 'width: 2em; height: 2em; align: right;',
10382
+ errorMessageBlock: 'margin: 0.1em; padding: 0.5em; border: 0.05em solid gray; color:black;',
10383
+ defaultErrorBackgroundColor: '#fee',
10384
+ // pad
10385
+ notepadStyle: 'padding: 1em; overflow: auto; resize: horizontal; min-width: 40em;',
10386
+ upstreamStatus: 'width:50%',
10387
+ downstreamStatus: 'width:50%',
10388
+ baseStyle: 'font-size: 100%; font-family: monospace; width: 100%; border: none; white-space: pre-wrap;',
10389
+ headingCore: 'font-family: sans-serif; font-weight: bold; border: none;',
10390
+ 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%;'],
10391
+ // participation
10392
+ participantsStyle: 'margin: 0.8em;',
10393
+ participantsBlock: 'height: 1.5em; width: 1.5em; margin: 0.3em; border 0.01em solid #888;',
10394
+ personTableTD: 'vertical-align: middle;',
10395
+ // tabs
10396
+ tabsNavElement: 'margin: 0;',
10397
+ tabsRootElement: 'display: flex; height: 100%; width: 100%;',
10398
+ tabsMainElement: 'margin: 0; width:100%; height: 100%;',
10399
+ tabContainer: 'list-style-type: none; display: flex; height: 100%; width: 100%; margin: 0; padding: 0;',
10400
+ makeNewSlot: 'background: none; border: none; font: inherit; cursor: pointer',
10401
+ ellipsis: 'position: absolute; right: 0; bottom: 0; width: 20%; background: none; color: inherit; border: none; padding: 0; font: inherit; cursor: pointer; outline: inherit;'
10410
10402
  };
10411
10403
  exports.style = style;
10412
10404
  style.setStyle = function setStyle(ele, styleName) {
@@ -12088,6 +12080,7 @@ function renderTableViewPane(doc, options) {
12088
12080
 
12089
12081
 
12090
12082
  var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "./node_modules/@babel/runtime/helpers/interopRequireDefault.js");
12083
+ var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "./node_modules/@babel/runtime/helpers/typeof.js");
12091
12084
  Object.defineProperty(exports, "__esModule", ({
12092
12085
  value: true
12093
12086
  }));
@@ -12104,7 +12097,10 @@ var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/ru
12104
12097
  var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js"));
12105
12098
  var _widgets = __webpack_require__(/*! ./widgets */ "./lib/widgets/index.js");
12106
12099
  var _utils = __webpack_require__(/*! ./utils */ "./lib/utils/index.js");
12100
+ var style = _interopRequireWildcard(__webpack_require__(/*! ./style */ "./lib/style.js"));
12107
12101
  var _solidLogic = __webpack_require__(/*! solid-logic */ "./node_modules/solid-logic/lib/index.js");
12102
+ 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); }
12103
+ 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
12104
  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
12105
  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
12106
  /**
@@ -12287,11 +12283,12 @@ var TabElement = /*#__PURE__*/function (_HTMLElement3) {
12287
12283
  *
12288
12284
  * @param options
12289
12285
  */
12286
+ var tabsDefaultBackgroundColor = '#ddddcc';
12290
12287
  function tabWidget(options) {
12291
12288
  var subject = options.subject;
12292
12289
  var dom = options.dom || document;
12293
12290
  var orientation = parseInt(options.orientation || '0');
12294
- var backgroundColor = options.backgroundColor || '#ddddcc';
12291
+ var backgroundColor = options.backgroundColor || tabsDefaultBackgroundColor;
12295
12292
  var flipped = orientation & 2;
12296
12293
  var vertical = orientation & 1;
12297
12294
  var onClose = options.onClose;
@@ -12302,13 +12299,15 @@ function tabWidget(options) {
12302
12299
  var bodyMainStyle = "flex: 2; width: auto; height: 100%; border: 0.1em; border-style: solid; border-color: ".concat(selectedColor, "; padding: 1em;");
12303
12300
  var rootElement = dom.createElement('div'); // 20200117a
12304
12301
 
12305
- rootElement.setAttribute('style', 'display: flex; height: 100%; width: 100%; flex-direction: ' + (vertical ? 'row' : 'column') + (flipped ? '-reverse;' : ';'));
12302
+ rootElement.setAttribute('style', style.tabsRootElement);
12303
+ rootElement.style.flexDirection = (vertical ? 'row' : 'column') + (flipped ? '-reverse;' : ';');
12306
12304
  var navElement = rootElement.appendChild(dom.createElement('nav'));
12307
- navElement.setAttribute('style', 'margin: 0;');
12305
+ navElement.setAttribute('style', style.tabsNavElement);
12308
12306
  var mainElement = rootElement.appendChild(dom.createElement('main'));
12309
- mainElement.setAttribute('style', 'margin: 0; width:100%; height: 100%;'); // override tabbedtab.css
12307
+ mainElement.setAttribute('style', style.tabsMainElement); // override tabbedtab.css
12310
12308
  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 "));
12309
+ tabContainer.setAttribute('style', style.tabContainer);
12310
+ tabContainer.style.flexDirection = "".concat(vertical ? 'column' : 'row');
12312
12311
  var tabElement = 'li';
12313
12312
  var bodyContainer = mainElement;
12314
12313
  rootElement.tabContainer = tabContainer;
@@ -12328,7 +12327,7 @@ function tabWidget(options) {
12328
12327
  rootElement.refresh = orderedSync;
12329
12328
  orderedSync();
12330
12329
  if (!options.startEmpty && tabContainer.children.length && options.selectedTab) {
12331
- var selectedTab0 = Array.from(tabContainer.children) // Version left for compatability with ??
12330
+ var selectedTab0 = Array.from(tabContainer.children) // Version left for compatibility with ??
12332
12331
  .map(function (tab) {
12333
12332
  return tab.firstChild;
12334
12333
  }).find(function (tab) {
@@ -12382,7 +12381,7 @@ function tabWidget(options) {
12382
12381
  ele.setAttribute('style', unselectedStyle);
12383
12382
  ele.subject = item;
12384
12383
  var div = ele.appendChild(dom.createElement('button'));
12385
- div.setAttribute('style', 'background: none; border: none; font: inherit; cursor: pointer');
12384
+ div.setAttribute('style', style.makeNewSlot);
12386
12385
  div.onclick = function () {
12387
12386
  resetTabStyle();
12388
12387
  resetBodyStyle();
@@ -12399,7 +12398,7 @@ function tabWidget(options) {
12399
12398
  if (options.renderTabSettings && ele.subject) {
12400
12399
  var ellipsis = dom.createElement('button');
12401
12400
  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;');
12401
+ ellipsis.setAttribute('style', style.ellipsis);
12403
12402
  ellipsis.onclick = function () {
12404
12403
  resetTabStyle();
12405
12404
  resetBodyStyle();
@@ -13686,22 +13685,22 @@ Object.defineProperty(exports, "__esModule", ({
13686
13685
  }));
13687
13686
  exports.versionInfo = void 0;
13688
13687
  var versionInfo = {
13689
- buildTime: '2023-05-25T19:39:41Z',
13690
- commit: 'bb8b5144f6b4f40d43f5625b45383d9272d8db1d',
13688
+ buildTime: '2023-07-01T18:17:29Z',
13689
+ commit: 'cdaefc011d313e905fbee9c4d8f1c8cfea739122',
13691
13690
  npmInfo: {
13692
13691
  'solid-ui': '2.4.28',
13693
13692
  npm: '8.19.4',
13694
- node: '16.20.0',
13693
+ node: '16.20.1',
13695
13694
  v8: '9.4.146.26-node.26',
13696
13695
  uv: '1.43.0',
13697
13696
  zlib: '1.2.11',
13698
13697
  brotli: '1.0.9',
13699
- ares: '1.19.0',
13698
+ ares: '1.19.1',
13700
13699
  modules: '93',
13701
13700
  nghttp2: '1.47.0',
13702
13701
  napi: '8',
13703
- llhttp: '6.0.10',
13704
- openssl: '1.1.1t+quic',
13702
+ llhttp: '6.0.11',
13703
+ openssl: '1.1.1u+quic',
13705
13704
  cldr: '41.0',
13706
13705
  icu: '71.1',
13707
13706
  tz: '2022f',
@@ -15126,16 +15125,17 @@ exports.makeDropTarget = makeDropTarget;
15126
15125
  exports.uploadFiles = uploadFiles;
15127
15126
  var debug = _interopRequireWildcard(__webpack_require__(/*! ../debug */ "./lib/debug.js"));
15128
15127
  var mime = _interopRequireWildcard(__webpack_require__(/*! mime-types */ "./node_modules/mime-types/index.js"));
15128
+ var style = _interopRequireWildcard(__webpack_require__(/*! ../style */ "./lib/style.js"));
15129
15129
  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); }
15130
15130
  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; }
15131
15131
  /* Drag and drop common functionality
15132
15132
  *
15133
15133
  * It is easy to make something draggable, or to make it a drag target!
15134
- * Just call the functions below. In a solid world, any part of the UI which
15135
- * represent one thing which has a UR, should be made draggable using makeDraggable
15134
+ * Just call the functions below. In a solid world, any part of the UI which
15135
+ * represent one thing which has a URI, should be made draggable using makeDraggable
15136
15136
  * Any list of things should typically allow you to drag new members of the list
15137
15137
  * onto it.
15138
- * The file upload function uploadFiles is provided as often of someone drags a file from the computer
15138
+ * The file upload function uploadFiles is provided as often as someone drags a file from the computer
15139
15139
  * desktop, you may want to upload it into the pod.
15140
15140
  */
15141
15141
 
@@ -15143,22 +15143,16 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
15143
15143
 
15144
15144
  function makeDropTarget(ele, droppedURIHandler, droppedFileHandler) {
15145
15145
  var dragoverListener = function dragoverListener(e) {
15146
- e.preventDefault(); // Neeed else drop does not work [sic]
15146
+ e.preventDefault(); // Need else drop does not work [sic]
15147
15147
  e.dataTransfer.dropEffect = 'copy';
15148
15148
  };
15149
15149
  var dragenterListener = function dragenterListener(e) {
15150
15150
  debug.log('dragenter event dropEffect: ' + e.dataTransfer.dropEffect);
15151
- if (this.style) {
15151
+ if (this.localStyle) {
15152
15152
  // necessary not sure when
15153
15153
  if (!this.savedStyle) {
15154
- this.savedStyle = {};
15155
- this.savedStyle.border = this.style.border;
15156
- this.savedStyle.backgroundColor = this.style.backgroundColor;
15157
- this.savedStyle.borderRadius = this.style.borderRadius;
15154
+ this.savedStyle = style.dragEvent;
15158
15155
  }
15159
- this.style.backgroundColor = '#ccc';
15160
- this.style.border = '0.25em dashed black';
15161
- this.style.borderRadius = '0.3em';
15162
15156
  }
15163
15157
  e.dataTransfer.dropEffect = 'link';
15164
15158
  debug.log('dragenter event dropEffect 2: ' + e.dataTransfer.dropEffect);
@@ -15166,12 +15160,9 @@ function makeDropTarget(ele, droppedURIHandler, droppedFileHandler) {
15166
15160
  var dragleaveListener = function dragleaveListener(e) {
15167
15161
  debug.log('dragleave event dropEffect: ' + e.dataTransfer.dropEffect);
15168
15162
  if (this.savedStyle) {
15169
- this.style.border = this.savedStyle.border;
15170
- this.style.backgroundColor = this.savedStyle.backgroundColor;
15171
- this.style.borderRadius = this.savedStyle.borderRadius;
15163
+ this.localStyle = this.savedStyle;
15172
15164
  } else {
15173
- this.style.backgroundColor = 'white';
15174
- this.style.border = '0em solid black';
15165
+ this.localStyle = style.dropEvent;
15175
15166
  }
15176
15167
  };
15177
15168
  var dropListener = function dropListener(e) {
@@ -15210,7 +15201,7 @@ function makeDropTarget(ele, droppedURIHandler, droppedFileHandler) {
15210
15201
  if (uris) {
15211
15202
  droppedURIHandler(uris);
15212
15203
  }
15213
- this.style.backgroundColor = 'white'; // restore style
15204
+ this.localStyle = style.restoreStyle; // restore style
15214
15205
  return false;
15215
15206
  }; // dropListener
15216
15207
 
@@ -15331,11 +15322,15 @@ function uploadFiles(fetcher, files, fileBase, imageBase, successHandler) {
15331
15322
  "use strict";
15332
15323
 
15333
15324
 
15325
+ var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "./node_modules/@babel/runtime/helpers/typeof.js");
15334
15326
  Object.defineProperty(exports, "__esModule", ({
15335
15327
  value: true
15336
15328
  }));
15337
15329
  exports.errorMessageBlock = errorMessageBlock;
15338
15330
  var _widgets = __webpack_require__(/*! ../widgets */ "./lib/widgets/index.js");
15331
+ var style = _interopRequireWildcard(__webpack_require__(/*! ../style */ "./lib/style.js"));
15332
+ 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); }
15333
+ 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; }
15339
15334
  /**
15340
15335
  * Create an error message block
15341
15336
  * @param dom The DOM on which dom.createElement will be called
@@ -15364,8 +15359,9 @@ function errorMessageBlock(dom, err, backgroundColor, err2) {
15364
15359
  }
15365
15360
  div.appendChild((0, _widgets.cancelButton)(dom, function () {
15366
15361
  if (div.parentNode) div.parentNode.removeChild(div);
15367
- })).style = 'width: 2em; height: 2em; align: right;';
15368
- div.setAttribute('style', 'margin: 0.1em; padding: 0.5em; border: 0.05em solid gray; background-color: ' + (backgroundColor || '#fee') + '; color:black;');
15362
+ })).style = style.errorCancelButton;
15363
+ div.setAttribute('style', style.errorMessageBlock);
15364
+ div.style.backgroundColor = backgroundColor || style.defaultErrorBackgroundColor;
15369
15365
  return div;
15370
15366
  }
15371
15367
  //# sourceMappingURL=error.js.map