solid-ui 2.4.28-58251370 → 2.4.28-5e5291ce

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
@@ -8254,21 +8254,21 @@ var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime
8254
8254
  var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "./node_modules/@babel/runtime/helpers/asyncToGenerator.js"));
8255
8255
  var debug = _interopRequireWildcard(__webpack_require__(/*! ../debug */ "./lib/debug.js"));
8256
8256
  var _iconBase = __webpack_require__(/*! ../iconBase */ "./lib/iconBase.js");
8257
+ var style = _interopRequireWildcard(__webpack_require__(/*! ../style */ "./lib/style.js"));
8257
8258
  var widgets = _interopRequireWildcard(__webpack_require__(/*! ../widgets */ "./lib/widgets/index.js"));
8258
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); }
8259
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; }
8260
- /// /////////////////////////////////////////////
8261
8261
  //
8262
8262
  // Media input widget
8263
8263
  //
8264
8264
  //
8265
8265
  // Workflow:
8266
- // The HTML5 functionality (on mobille) is to prompt for either
8267
- // 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
8268
8268
  // (eg camera roll).
8269
8269
  //
8270
- // The solid alternative is to either take a phtoto
8271
- // 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.
8272
8272
  // (Especially latest taken ones)
8273
8273
  //
8274
8274
 
@@ -8277,10 +8277,6 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
8277
8277
  var cameraIcon = _iconBase.icons.iconBase + 'noun_Camera_1618446_000000.svg'; // Get it from github
8278
8278
  var retakeIcon = _iconBase.icons.iconBase + 'noun_479395.svg'; // Get it from github
8279
8279
 
8280
- var canvasWidth = '640';
8281
- var canvasHeight = '480';
8282
- var controlStyle = "border-radius: 0.5em; margin: 0.8em; width: ".concat(canvasWidth, "; height:").concat(canvasHeight, ";");
8283
- // const controlStyle = 'border-radius: 0.5em; margin: 0.8em; width: 320; height:240;'
8284
8280
  var contentType = 'image/png';
8285
8281
 
8286
8282
  /** A control to capture a picture using camera
@@ -8325,7 +8321,7 @@ function cameraCaptureControl(dom, store, getImageDoc, doneCallback) {
8325
8321
  player = main.appendChild(dom.createElement('video'));
8326
8322
  player.setAttribute('controls', '1');
8327
8323
  player.setAttribute('autoplay', '1');
8328
- player.setAttribute('style', controlStyle);
8324
+ player.setAttribute('style', style.controlStyle);
8329
8325
  if (!navigator.mediaDevices) {
8330
8326
  throw new Error('navigator.mediaDevices not available');
8331
8327
  }
@@ -8347,9 +8343,9 @@ function cameraCaptureControl(dom, store, getImageDoc, doneCallback) {
8347
8343
  function grabCanvas() {
8348
8344
  // Draw the video frame to the canvas.
8349
8345
  canvas = dom.createElement('canvas');
8350
- canvas.setAttribute('width', canvasWidth);
8351
- canvas.setAttribute('height', canvasHeight);
8352
- canvas.setAttribute('style', controlStyle);
8346
+ canvas.setAttribute('width', style.canvasWidth);
8347
+ canvas.setAttribute('height', style.canvasHeight);
8348
+ canvas.setAttribute('style', style.controlStyle);
8353
8349
  main.appendChild(canvas);
8354
8350
  var context = canvas.getContext('2d');
8355
8351
  context.drawImage(player, 0, 0, canvas.width, canvas.height);
@@ -8406,9 +8402,9 @@ function cameraCaptureControl(dom, store, getImageDoc, doneCallback) {
8406
8402
  * @param {IndexedForumla} store - The quadstore to store data in
8407
8403
  * @param {fuunction} getImageDoc - returns NN of the image file to be created
8408
8404
  * @param {function<Node>} doneCallback - called with the image taken
8409
- * @returns {DomElement} - A div element with the buton in it
8405
+ * @returns {DomElement} - A div element with the button in it
8410
8406
  *
8411
- * 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
8412
8408
  */
8413
8409
 
8414
8410
  function cameraButton(dom, store, getImageDoc, doneCallback) {
@@ -8846,10 +8842,10 @@ Object.defineProperty(exports, "recordParticipation", ({
8846
8842
  return _participation.recordParticipation;
8847
8843
  }
8848
8844
  }));
8849
- Object.defineProperty(exports, "renderPartipants", ({
8845
+ Object.defineProperty(exports, "renderParticipants", ({
8850
8846
  enumerable: true,
8851
8847
  get: function get() {
8852
- return _participation.renderPartipants;
8848
+ return _participation.renderParticipants;
8853
8849
  }
8854
8850
  }));
8855
8851
  exports.xmlEncode = xmlEncode;
@@ -8867,6 +8863,7 @@ var _widgets = __webpack_require__(/*! ./widgets */ "./lib/widgets/index.js");
8867
8863
  var _utils = __webpack_require__(/*! ./utils */ "./lib/utils/index.js");
8868
8864
  var _debug = __webpack_require__(/*! ./debug */ "./lib/debug.js");
8869
8865
  var _solidLogic = __webpack_require__(/*! solid-logic */ "./node_modules/solid-logic/lib/index.js");
8866
+ var style = _interopRequireWildcard(__webpack_require__(/*! ./style */ "./lib/style.js"));
8870
8867
  var _participation = __webpack_require__(/*! ./participation */ "./lib/participation.js");
8871
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); }
8872
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; }
@@ -8931,7 +8928,7 @@ function lightColorHash(author) {
8931
8928
  /** notepad
8932
8929
  *
8933
8930
  * @param {HTMLDocument} dom - the web page of the browser
8934
- * @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
8935
8932
  * @param {NamedNode} subject - the thing in which participation is happening
8936
8933
  * @param {NamedNode} me - person who is logged into the pod
8937
8934
  * @param {notepadOptions} options - the options that can be passed in consist of statusArea, exists
@@ -8944,7 +8941,7 @@ function notepad(dom, padDoc, subject, me, options) {
8944
8941
  if (me && !me.uri) throw new Error('UI.pad.notepad: Invalid userid');
8945
8942
  var updater = store.updater;
8946
8943
  var PAD = (0, _rdflib.Namespace)('http://www.w3.org/ns/pim/pad#');
8947
- table.setAttribute('style', 'padding: 1em; overflow: auto; resize: horizontal; min-width: 40em;');
8944
+ table.setAttribute('style', style.notepadStyle);
8948
8945
  var upstreamStatus = null;
8949
8946
  var downstreamStatus = null;
8950
8947
  if (options.statusArea) {
@@ -8953,10 +8950,10 @@ function notepad(dom, padDoc, subject, me, options) {
8953
8950
  upstreamStatus = tr.appendChild(dom.createElement('td'));
8954
8951
  downstreamStatus = tr.appendChild(dom.createElement('td'));
8955
8952
  if (upstreamStatus) {
8956
- upstreamStatus.setAttribute('style', 'width:50%');
8953
+ upstreamStatus.setAttribute('style', style.upstreamStatus);
8957
8954
  }
8958
8955
  if (downstreamStatus) {
8959
- downstreamStatus.setAttribute('style', 'width:50%');
8956
+ downstreamStatus.setAttribute('style', style.downstreamStatus);
8960
8957
  }
8961
8958
  }
8962
8959
  /* @@ TODO want to look into this, it seems upstream should be a boolean and default to false ?
@@ -8979,9 +8976,9 @@ function notepad(dom, padDoc, subject, me, options) {
8979
8976
  var setPartStyle = function setPartStyle(part, colors, pending) {
8980
8977
  var chunk = part.subject;
8981
8978
  colors = colors || '';
8982
- var baseStyle = 'font-size: 100%; font-family: monospace; width: 100%; border: none; white-space: pre-wrap;';
8983
- var headingCore = 'font-family: sans-serif; font-weight: bold; border: none;';
8984
- 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;
8985
8982
  var author = kb.any(chunk, ns.dc('author'));
8986
8983
  if (!colors && author) {
8987
8984
  // Hash the user webid for now -- later allow user selection!
@@ -8993,9 +8990,9 @@ function notepad(dom, padDoc, subject, me, options) {
8993
8990
  // and when the indent is stored as a Number itself, not in an object.
8994
8991
  var indent = kb.any(chunk, PAD('indent'));
8995
8992
  indent = indent ? indent.value : 0;
8996
- 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];
8997
8994
  // ? baseStyle + 'padding-left: ' + (indent * 3) + 'em;'
8998
- part.setAttribute('style', style + colors);
8995
+ part.setAttribute('style', localStyle + colors);
8999
8996
  };
9000
8997
  var removePart = function removePart(part) {
9001
8998
  var chunk = part.subject;
@@ -9075,28 +9072,6 @@ function notepad(dom, padDoc, subject, me, options) {
9075
9072
  });
9076
9073
  };
9077
9074
 
9078
- // Use this sort of code to split the line when return pressed in the middle @@
9079
- /*
9080
- function doGetCaretPosition doGetCaretPosition (oField) {
9081
- var iCaretPos = 0
9082
- // IE Support
9083
- if (document.selection) {
9084
- // Set focus on the element to avoid IE bug
9085
- oField.focus()
9086
- // To get cursor position, get empty selection range
9087
- var oSel = document.selection.createRange()
9088
- // Move selection start to 0 position
9089
- oSel.moveStart('character', -oField.value.length)
9090
- // The caret position is selection length
9091
- iCaretPos = oSel.text.length
9092
- // Firefox suppor
9093
- } else if (oField.selectionStart || oField.selectionStart === '0') {
9094
- iCaretPos = oField.selectionStart
9095
- }
9096
- // Return results
9097
- return (iCaretPos)
9098
- }
9099
- */
9100
9075
  var addListeners = function addListeners(part, chunk) {
9101
9076
  part.addEventListener('keydown', function (event) {
9102
9077
  if (!updater) {
@@ -9139,7 +9114,7 @@ function notepad(dom, padDoc, subject, me, options) {
9139
9114
  return;
9140
9115
  case 3: // being deleted already
9141
9116
  case 4:
9142
- // already deleme state
9117
+ // already deleted state
9143
9118
  return;
9144
9119
  case undefined:
9145
9120
  case 0:
@@ -9440,8 +9415,6 @@ function notepad(dom, padDoc, subject, me, options) {
9440
9415
  }
9441
9416
  return;
9442
9417
  }
9443
- // var last = kb.the(undefined, PAD('previous'), subject)
9444
- // var chunk = first // = kb.the(subject, PAD('next'));
9445
9418
  var row;
9446
9419
 
9447
9420
  // First see which of the logical chunks have existing physical manifestations
@@ -9503,7 +9476,7 @@ function notepad(dom, padDoc, subject, me, options) {
9503
9476
  (0, _debug.log)(' reloaded OK');
9504
9477
  clearStatus();
9505
9478
  if (!consistencyCheck()) {
9506
- complain('CONSITENCY CHECK FAILED');
9479
+ complain('CONSISTENCY CHECK FAILED');
9507
9480
  } else {
9508
9481
  refreshTree(table);
9509
9482
  }
@@ -9670,7 +9643,7 @@ Object.defineProperty(exports, "__esModule", ({
9670
9643
  exports.manageParticipation = manageParticipation;
9671
9644
  exports.participationObject = participationObject;
9672
9645
  exports.recordParticipation = recordParticipation;
9673
- exports.renderPartipants = renderPartipants;
9646
+ exports.renderParticipants = renderParticipants;
9674
9647
  var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js"));
9675
9648
  var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js"));
9676
9649
  var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/assertThisInitialized.js"));
@@ -9685,6 +9658,7 @@ var ns = _interopRequireWildcard(__webpack_require__(/*! ./ns */ "./lib/ns.js"))
9685
9658
  var _widgets = __webpack_require__(/*! ./widgets */ "./lib/widgets/index.js");
9686
9659
  var _utils = __webpack_require__(/*! ./utils */ "./lib/utils/index.js");
9687
9660
  var _pad = __webpack_require__(/*! ./pad */ "./lib/pad.js");
9661
+ var style = _interopRequireWildcard(__webpack_require__(/*! ./style */ "./lib/style.js"));
9688
9662
  var _solidLogic = __webpack_require__(/*! solid-logic */ "./node_modules/solid-logic/lib/index.js");
9689
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); }
9690
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; }
@@ -9719,9 +9693,9 @@ var store = _solidLogic.solidLogicSingleton.store;
9719
9693
  * @param {NamedNode} unused2/me - user that is logged into the pod (this argument is no longer used, but left in for backwards compatibility)
9720
9694
  * @param {ParticipationOptions} options - the options that can be passed in are deleteFunction, link, and draggable these are used by the personTR button
9721
9695
  */
9722
- function renderPartipants(dom, table, unused1, subject, unused2, options) {
9723
- table.setAttribute('style', 'margin: 0.8em;');
9724
- 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) {
9725
9699
  var person = store.any(parp, ns.wf('participant'));
9726
9700
  var tr;
9727
9701
  if (!person) {
@@ -9731,11 +9705,12 @@ function renderPartipants(dom, table, unused1, subject, unused2, options) {
9731
9705
  }
9732
9706
  var bg = store.anyValue(parp, ns.ui('backgroundColor')) || 'white';
9733
9707
  var block = dom.createElement('div');
9734
- 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;
9735
9710
  tr = (0, _widgets.personTR)(dom, null, person, options);
9736
9711
  table.appendChild(tr);
9737
9712
  var td = dom.createElement('td');
9738
- td.setAttribute('style', 'vertical-align: middle;');
9713
+ td.setAttribute('style', style.personTableTD);
9739
9714
  td.appendChild(block);
9740
9715
  tr.insertBefore(td, tr.firstChild);
9741
9716
  return tr;
@@ -9749,16 +9724,16 @@ function renderPartipants(dom, table, unused1, subject, unused2, options) {
9749
9724
  var participations = parps.map(function (p) {
9750
9725
  return p[1];
9751
9726
  });
9752
- (0, _utils.syncTableToArray)(table, participations, newRowForParticpation);
9727
+ (0, _utils.syncTableToArray)(table, participations, newRowForParticipation);
9753
9728
  };
9754
9729
  table.refresh = syncTable;
9755
9730
  syncTable();
9756
9731
  return table;
9757
9732
  }
9758
9733
 
9759
- /** Record, or find old, Particpation object
9734
+ /** Record, or find old, Participation object
9760
9735
  *
9761
- * A particpaption object is a place to record things specifically about
9736
+ * A participation object is a place to record things specifically about
9762
9737
  * subject and the user, such as preferences, start of membership, etc
9763
9738
  * @param {NamedNode} subject - the thing in which the participation is happening
9764
9739
  * @param {NamedNode} document - where to record the data
@@ -9793,20 +9768,20 @@ function participationObject(subject, padDoc, me) {
9793
9768
  }
9794
9769
  candidates.sort(); // Pick the earliest
9795
9770
  // @@ Possibly, for extra credit, delete the others, if we have write access
9796
- debug.warn('Multiple particpation objects, picking earliest, in ' + padDoc);
9771
+ debug.warn('Multiple participation objects, picking earliest, in ' + padDoc);
9797
9772
  resolve(candidates[0][1]);
9798
9773
  // throw new Error('Multiple records of your participation')
9799
9774
  }
9800
9775
 
9801
9776
  if (parps.length) {
9802
9777
  // If I am not already recorded
9803
- resolve(parps[0]); // returns the particpation object
9778
+ resolve(parps[0]); // returns the participation object
9804
9779
  } else {
9805
9780
  var _participation2 = (0, _widgets.newThing)(padDoc);
9806
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)];
9807
9782
  store.updater.update([], ins, function (uri, ok, errorMessage) {
9808
9783
  if (!ok) {
9809
- reject(new Error('Error recording your partipation: ' + errorMessage));
9784
+ reject(new Error('Error recording your participation: ' + errorMessage));
9810
9785
  } else {
9811
9786
  resolve(_participation2);
9812
9787
  }
@@ -9819,7 +9794,7 @@ function participationObject(subject, padDoc, me) {
9819
9794
  /** Record my participation and display participants
9820
9795
  *
9821
9796
  * @param {NamedNode} subject - the thing in which participation is happening
9822
- * @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
9823
9798
  * @param {DOMNode} refreshable - a DOM element whose refresh() is to be called if the change works
9824
9799
  *
9825
9800
  */
@@ -9835,24 +9810,22 @@ function recordParticipation(subject, padDoc, refreshable) {
9835
9810
  }
9836
9811
  if (parps.length) {
9837
9812
  // If I am not already recorded
9838
- return parps[0]; // returns the particpation object
9813
+ return parps[0]; // returns the participation object
9839
9814
  } else {
9840
9815
  if (!store.updater.editable(padDoc)) {
9841
- 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);
9842
9817
  return null;
9843
9818
  }
9844
9819
  var participation = (0, _widgets.newThing)(padDoc);
9845
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)];
9846
9821
  store.updater.update([], ins, function (uri, ok, errorMessage) {
9847
9822
  if (!ok) {
9848
- throw new Error('Error recording your partipation: ' + errorMessage);
9823
+ throw new Error('Error recording your participation: ' + errorMessage);
9849
9824
  }
9850
9825
  if (refreshable && refreshable.refresh) {
9851
9826
  refreshable.refresh();
9852
9827
  }
9853
- // UI.pad.renderPartipants(dom, table, padDoc, subject, me, options)
9854
9828
  });
9855
-
9856
9829
  return participation;
9857
9830
  }
9858
9831
  }
@@ -9861,7 +9834,7 @@ function recordParticipation(subject, padDoc, refreshable) {
9861
9834
  *
9862
9835
  * @param {Document} dom - the web page loaded into the browser
9863
9836
  * @param {HTMLDivElement} container - the container element where the participants should be displayed
9864
- * @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
9865
9838
  * @param {NamedNode} subject - the thing in which participation is happening
9866
9839
  * @param {NamedNode} me - the logged in user
9867
9840
  * @param {ParticipationOptions} options - the options that can be passed in are deleteFunction, link, and draggable these are used by the personTR button
@@ -9870,12 +9843,12 @@ function recordParticipation(subject, padDoc, refreshable) {
9870
9843
  function manageParticipation(dom, container, padDoc, subject, me, options) {
9871
9844
  var table = dom.createElement('table');
9872
9845
  container.appendChild(table);
9873
- renderPartipants(dom, table, padDoc, subject, me, options);
9846
+ renderParticipants(dom, table, padDoc, subject, me, options);
9874
9847
  var _participation;
9875
9848
  try {
9876
9849
  _participation = recordParticipation(subject, padDoc, table);
9877
9850
  } catch (e) {
9878
- 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?
9879
9852
  }
9880
9853
 
9881
9854
  return table;
@@ -10270,6 +10243,8 @@ var formFieldNameBoxWidth = '8em'; // The fixed amount to get form fields to lin
10270
10243
  // The latter we put in when switching awy from using tables. Getting allignment between
10271
10244
  // fields in different groups though is hard problem.
10272
10245
 
10246
+ var mediaModuleCanvasWidth = '640';
10247
+ var mediaModuleCanvasHeight = '480';
10273
10248
  var style = {
10274
10249
  // styleModule
10275
10250
 
@@ -10395,7 +10370,35 @@ var style = {
10395
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',
10396
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',
10397
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',
10398
- 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;'
10399
10402
  };
10400
10403
  exports.style = style;
10401
10404
  style.setStyle = function setStyle(ele, styleName) {
@@ -12077,6 +12080,7 @@ function renderTableViewPane(doc, options) {
12077
12080
 
12078
12081
 
12079
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");
12080
12084
  Object.defineProperty(exports, "__esModule", ({
12081
12085
  value: true
12082
12086
  }));
@@ -12093,7 +12097,10 @@ var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/ru
12093
12097
  var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/defineProperty.js"));
12094
12098
  var _widgets = __webpack_require__(/*! ./widgets */ "./lib/widgets/index.js");
12095
12099
  var _utils = __webpack_require__(/*! ./utils */ "./lib/utils/index.js");
12100
+ var style = _interopRequireWildcard(__webpack_require__(/*! ./style */ "./lib/style.js"));
12096
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; }
12097
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); }; }
12098
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; } }
12099
12106
  /**
@@ -12276,11 +12283,12 @@ var TabElement = /*#__PURE__*/function (_HTMLElement3) {
12276
12283
  *
12277
12284
  * @param options
12278
12285
  */
12286
+ var tabsDefaultBackgroundColor = '#ddddcc';
12279
12287
  function tabWidget(options) {
12280
12288
  var subject = options.subject;
12281
12289
  var dom = options.dom || document;
12282
12290
  var orientation = parseInt(options.orientation || '0');
12283
- var backgroundColor = options.backgroundColor || '#ddddcc';
12291
+ var backgroundColor = options.backgroundColor || tabsDefaultBackgroundColor;
12284
12292
  var flipped = orientation & 2;
12285
12293
  var vertical = orientation & 1;
12286
12294
  var onClose = options.onClose;
@@ -12291,13 +12299,15 @@ function tabWidget(options) {
12291
12299
  var bodyMainStyle = "flex: 2; width: auto; height: 100%; border: 0.1em; border-style: solid; border-color: ".concat(selectedColor, "; padding: 1em;");
12292
12300
  var rootElement = dom.createElement('div'); // 20200117a
12293
12301
 
12294
- 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;' : ';');
12295
12304
  var navElement = rootElement.appendChild(dom.createElement('nav'));
12296
- navElement.setAttribute('style', 'margin: 0;');
12305
+ navElement.setAttribute('style', style.tabsNavElement);
12297
12306
  var mainElement = rootElement.appendChild(dom.createElement('main'));
12298
- mainElement.setAttribute('style', 'margin: 0; width:100%; height: 100%;'); // override tabbedtab.css
12307
+ mainElement.setAttribute('style', style.tabsMainElement); // override tabbedtab.css
12299
12308
  var tabContainer = navElement.appendChild(dom.createElement('ul'));
12300
- 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');
12301
12311
  var tabElement = 'li';
12302
12312
  var bodyContainer = mainElement;
12303
12313
  rootElement.tabContainer = tabContainer;
@@ -12317,7 +12327,7 @@ function tabWidget(options) {
12317
12327
  rootElement.refresh = orderedSync;
12318
12328
  orderedSync();
12319
12329
  if (!options.startEmpty && tabContainer.children.length && options.selectedTab) {
12320
- var selectedTab0 = Array.from(tabContainer.children) // Version left for compatability with ??
12330
+ var selectedTab0 = Array.from(tabContainer.children) // Version left for compatibility with ??
12321
12331
  .map(function (tab) {
12322
12332
  return tab.firstChild;
12323
12333
  }).find(function (tab) {
@@ -12371,7 +12381,7 @@ function tabWidget(options) {
12371
12381
  ele.setAttribute('style', unselectedStyle);
12372
12382
  ele.subject = item;
12373
12383
  var div = ele.appendChild(dom.createElement('button'));
12374
- div.setAttribute('style', 'background: none; border: none; font: inherit; cursor: pointer');
12384
+ div.setAttribute('style', style.makeNewSlot);
12375
12385
  div.onclick = function () {
12376
12386
  resetTabStyle();
12377
12387
  resetBodyStyle();
@@ -12388,7 +12398,7 @@ function tabWidget(options) {
12388
12398
  if (options.renderTabSettings && ele.subject) {
12389
12399
  var ellipsis = dom.createElement('button');
12390
12400
  ellipsis.textContent = '...';
12391
- 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);
12392
12402
  ellipsis.onclick = function () {
12393
12403
  resetTabStyle();
12394
12404
  resetBodyStyle();
@@ -13675,8 +13685,8 @@ Object.defineProperty(exports, "__esModule", ({
13675
13685
  }));
13676
13686
  exports.versionInfo = void 0;
13677
13687
  var versionInfo = {
13678
- buildTime: '2023-07-01T17:57:13Z',
13679
- commit: '58251370efbbbb63f7c57f60a640dd2db4d944e4',
13688
+ buildTime: '2023-07-01T18:16:59Z',
13689
+ commit: '5e5291ce5d8f440c658bc2f4c87c329af1dbee4b',
13680
13690
  npmInfo: {
13681
13691
  'solid-ui': '2.4.28',
13682
13692
  npm: '8.19.4',
@@ -15115,16 +15125,17 @@ exports.makeDropTarget = makeDropTarget;
15115
15125
  exports.uploadFiles = uploadFiles;
15116
15126
  var debug = _interopRequireWildcard(__webpack_require__(/*! ../debug */ "./lib/debug.js"));
15117
15127
  var mime = _interopRequireWildcard(__webpack_require__(/*! mime-types */ "./node_modules/mime-types/index.js"));
15128
+ var style = _interopRequireWildcard(__webpack_require__(/*! ../style */ "./lib/style.js"));
15118
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); }
15119
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; }
15120
15131
  /* Drag and drop common functionality
15121
15132
  *
15122
15133
  * It is easy to make something draggable, or to make it a drag target!
15123
- * Just call the functions below. In a solid world, any part of the UI which
15124
- * 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
15125
15136
  * Any list of things should typically allow you to drag new members of the list
15126
15137
  * onto it.
15127
- * 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
15128
15139
  * desktop, you may want to upload it into the pod.
15129
15140
  */
15130
15141
 
@@ -15132,22 +15143,16 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
15132
15143
 
15133
15144
  function makeDropTarget(ele, droppedURIHandler, droppedFileHandler) {
15134
15145
  var dragoverListener = function dragoverListener(e) {
15135
- e.preventDefault(); // Neeed else drop does not work [sic]
15146
+ e.preventDefault(); // Need else drop does not work [sic]
15136
15147
  e.dataTransfer.dropEffect = 'copy';
15137
15148
  };
15138
15149
  var dragenterListener = function dragenterListener(e) {
15139
15150
  debug.log('dragenter event dropEffect: ' + e.dataTransfer.dropEffect);
15140
- if (this.style) {
15151
+ if (this.localStyle) {
15141
15152
  // necessary not sure when
15142
15153
  if (!this.savedStyle) {
15143
- this.savedStyle = {};
15144
- this.savedStyle.border = this.style.border;
15145
- this.savedStyle.backgroundColor = this.style.backgroundColor;
15146
- this.savedStyle.borderRadius = this.style.borderRadius;
15154
+ this.savedStyle = style.dragEvent;
15147
15155
  }
15148
- this.style.backgroundColor = '#ccc';
15149
- this.style.border = '0.25em dashed black';
15150
- this.style.borderRadius = '0.3em';
15151
15156
  }
15152
15157
  e.dataTransfer.dropEffect = 'link';
15153
15158
  debug.log('dragenter event dropEffect 2: ' + e.dataTransfer.dropEffect);
@@ -15155,12 +15160,9 @@ function makeDropTarget(ele, droppedURIHandler, droppedFileHandler) {
15155
15160
  var dragleaveListener = function dragleaveListener(e) {
15156
15161
  debug.log('dragleave event dropEffect: ' + e.dataTransfer.dropEffect);
15157
15162
  if (this.savedStyle) {
15158
- this.style.border = this.savedStyle.border;
15159
- this.style.backgroundColor = this.savedStyle.backgroundColor;
15160
- this.style.borderRadius = this.savedStyle.borderRadius;
15163
+ this.localStyle = this.savedStyle;
15161
15164
  } else {
15162
- this.style.backgroundColor = 'white';
15163
- this.style.border = '0em solid black';
15165
+ this.localStyle = style.dropEvent;
15164
15166
  }
15165
15167
  };
15166
15168
  var dropListener = function dropListener(e) {
@@ -15199,7 +15201,7 @@ function makeDropTarget(ele, droppedURIHandler, droppedFileHandler) {
15199
15201
  if (uris) {
15200
15202
  droppedURIHandler(uris);
15201
15203
  }
15202
- this.style.backgroundColor = 'white'; // restore style
15204
+ this.localStyle = style.restoreStyle; // restore style
15203
15205
  return false;
15204
15206
  }; // dropListener
15205
15207
 
@@ -15320,11 +15322,15 @@ function uploadFiles(fetcher, files, fileBase, imageBase, successHandler) {
15320
15322
  "use strict";
15321
15323
 
15322
15324
 
15325
+ var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "./node_modules/@babel/runtime/helpers/typeof.js");
15323
15326
  Object.defineProperty(exports, "__esModule", ({
15324
15327
  value: true
15325
15328
  }));
15326
15329
  exports.errorMessageBlock = errorMessageBlock;
15327
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; }
15328
15334
  /**
15329
15335
  * Create an error message block
15330
15336
  * @param dom The DOM on which dom.createElement will be called
@@ -15353,8 +15359,9 @@ function errorMessageBlock(dom, err, backgroundColor, err2) {
15353
15359
  }
15354
15360
  div.appendChild((0, _widgets.cancelButton)(dom, function () {
15355
15361
  if (div.parentNode) div.parentNode.removeChild(div);
15356
- })).style = 'width: 2em; height: 2em; align: right;';
15357
- 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;
15358
15365
  return div;
15359
15366
  }
15360
15367
  //# sourceMappingURL=error.js.map