solid-ui 2.4.28-46a60cc6 → 2.4.28-58251370

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