solid-ui 2.4.28-e3ba3633 → 2.4.28-f42a6c93

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
@@ -7134,6 +7134,15 @@ function renderScopeHeadingRow(context, store, scope) {
7134
7134
  function registrationList(_x9, _x10) {
7135
7135
  return _registrationList.apply(this, arguments);
7136
7136
  } // registrationList
7137
+ /**
7138
+ * Bootstrapping identity
7139
+ * (Called by `loginStatusBox()`)
7140
+ *
7141
+ * @param dom
7142
+ * @param setUserCallback
7143
+ *
7144
+ * @returns
7145
+ */
7137
7146
  function _registrationList() {
7138
7147
  _registrationList = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9(context, options) {
7139
7148
  var dom, div, box, scopes, table, tbody, _iterator2, _step2, scope, headingRow, items, _iterator3, _step3, _loop;
@@ -7265,23 +7274,10 @@ function _registrationList() {
7265
7274
  }));
7266
7275
  return _registrationList.apply(this, arguments);
7267
7276
  }
7268
- function getDefaultSignInButtonStyle() {
7269
- return 'padding: 1em; border-radius:0.5em; font-size: 100%;';
7270
- }
7271
-
7272
- /**
7273
- * Bootstrapping identity
7274
- * (Called by `loginStatusBox()`)
7275
- *
7276
- * @param dom
7277
- * @param setUserCallback
7278
- *
7279
- * @returns
7280
- */
7281
7277
  function signInOrSignUpBox(dom, setUserCallback) {
7282
7278
  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
7283
7279
  options = options || {};
7284
- var signInButtonStyle = options.buttonStyle || getDefaultSignInButtonStyle();
7280
+ var signInButtonStyle = options.buttonStyle || style.signInAndUpButtonStyle;
7285
7281
  var box = dom.createElement('div');
7286
7282
  var magicClassName = 'SolidSignInOrSignUpBox';
7287
7283
  debug.log('widgets.signInOrSignUpBox');
@@ -7294,7 +7290,7 @@ function signInOrSignUpBox(dom, setUserCallback) {
7294
7290
  box.appendChild(signInPopUpButton);
7295
7291
  signInPopUpButton.setAttribute('type', 'button');
7296
7292
  signInPopUpButton.setAttribute('value', 'Log in');
7297
- signInPopUpButton.setAttribute('style', "".concat(signInButtonStyle, "background-color: #eef;").concat(style.headerBannerLoginInput));
7293
+ signInPopUpButton.setAttribute('style', "".concat(signInButtonStyle).concat(style.headerBannerLoginInput) + style.signUpBackground);
7298
7294
  _solidLogic.authSession.onLogin(function () {
7299
7295
  var me = _solidLogic.authn.currentUser();
7300
7296
  // const sessionInfo = authSession.info
@@ -7335,7 +7331,7 @@ function signInOrSignUpBox(dom, setUserCallback) {
7335
7331
  box.appendChild(signupButton);
7336
7332
  signupButton.setAttribute('type', 'button');
7337
7333
  signupButton.setAttribute('value', 'Sign Up for Solid');
7338
- signupButton.setAttribute('style', "".concat(signInButtonStyle, "background-color: #efe;").concat(style.headerBannerLoginInput));
7334
+ signupButton.setAttribute('style', "".concat(signInButtonStyle).concat(style.headerBannerLoginInput) + style.signInBackground);
7339
7335
  signupButton.addEventListener('click', function (_event) {
7340
7336
  var signupMgr = new _signup.Signup();
7341
7337
  signupMgr.signup().then(function (uri) {
@@ -7503,7 +7499,7 @@ function loginStatusBox(dom) {
7503
7499
  });
7504
7500
  }
7505
7501
  function logoutButton(me, options) {
7506
- var signInButtonStyle = options.buttonStyle || getDefaultSignInButtonStyle();
7502
+ var signInButtonStyle = options.buttonStyle || style.signInAndUpButtonStyle;
7507
7503
  var logoutLabel = 'WebID logout';
7508
7504
  if (me) {
7509
7505
  var nick = _solidLogic.solidLogicSingleton.store.any(me, ns.foaf('nick')) || _solidLogic.solidLogicSingleton.store.any(me, ns.foaf('name'));
@@ -7515,7 +7511,7 @@ function loginStatusBox(dom) {
7515
7511
  // signOutButton.className = 'WebIDCancelButton'
7516
7512
  signOutButton.setAttribute('type', 'button');
7517
7513
  signOutButton.setAttribute('value', logoutLabel);
7518
- signOutButton.setAttribute('style', "".concat(signInButtonStyle, "background-color: #eee;"));
7514
+ signOutButton.setAttribute('style', "".concat(signInButtonStyle));
7519
7515
  signOutButton.addEventListener('click', logoutButtonHandler, false);
7520
7516
  return signOutButton;
7521
7517
  }
@@ -9659,6 +9655,7 @@ var _widgets = __webpack_require__(/*! ./widgets */ "./lib/widgets/index.js");
9659
9655
  var _utils = __webpack_require__(/*! ./utils */ "./lib/utils/index.js");
9660
9656
  var _pad = __webpack_require__(/*! ./pad */ "./lib/pad.js");
9661
9657
  var style = _interopRequireWildcard(__webpack_require__(/*! ./style */ "./lib/style.js"));
9658
+ var _styleConstants = _interopRequireDefault(__webpack_require__(/*! ./styleConstants */ "./lib/styleConstants.js"));
9662
9659
  var _solidLogic = __webpack_require__(/*! solid-logic */ "./node_modules/solid-logic/lib/index.js");
9663
9660
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
9664
9661
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -9703,7 +9700,7 @@ function renderParticipants(dom, table, unused1, subject, unused2, options) {
9703
9700
  tr.textContent = '???'; // Don't crash - invalid part'n entry
9704
9701
  return tr;
9705
9702
  }
9706
- var bg = store.anyValue(parp, ns.ui('backgroundColor')) || 'white';
9703
+ var bg = store.anyValue(parp, ns.ui('backgroundColor')) || _styleConstants["default"].participationDefaultBackground;
9707
9704
  var block = dom.createElement('div');
9708
9705
  block.setAttribute('style', style.participantsBlock);
9709
9706
  block.style.backgroundColor = bg;
@@ -10264,9 +10261,11 @@ var style = {
10264
10261
  searchInputStyle: 'border: 0.1em solid #444; border-radius: 0.2em; width: 100%; font-size: 100%; padding: 0.1em 0.6em; margin 0.2em;',
10265
10262
  autocompleteRowStyle: 'border: 0.2em solid straw;',
10266
10263
  // Login buttons
10267
- signInButtonStyle: 'padding: 1em; border-radius:0.2em; font-size: 100%;',
10264
+ signInAndUpButtonStyle: 'padding: 1em; border-radius:0.2em; font-size: 100%;',
10268
10265
  // was 0.5em radius
10269
-
10266
+ headerBannerLoginInput: 'margin: 0.75em 0 0.75em 0.5em !important; padding: 0.5em !important;',
10267
+ signUpBackground: 'background-color: #eef;',
10268
+ signInBackground: 'background-color: #efe;',
10270
10269
  // Forms
10271
10270
  heading1Style: 'font-size: 180%; font-weight: bold; color: #888888; padding: 0.5em; margin: 0.7em 0.0m;',
10272
10271
  // originally was brown; now grey
@@ -10332,7 +10331,6 @@ var style = {
10332
10331
  headerBannerRightMenu: 'display: flex',
10333
10332
  headerBannerLogin: 'margin-left: auto',
10334
10333
  allChildrenVisible: 'display:true',
10335
- headerBannerLoginInput: 'margin: 0.75em 0 0.75em 0.5em !important; padding: 0.5em !important',
10336
10334
  headerBannerUserMenu: 'border-left: solid 1px #000000; margin-left: auto',
10337
10335
  headerBannerHelpMenu: 'border-left: solid 1px #000000; margin.left: auto',
10338
10336
  headerBannerIcon: 'background-size: 65px 60px !important; height: 60px !important; width: 65px !important',
@@ -10423,7 +10421,9 @@ var _default = {
10423
10421
  textInputBackgroundColorUneditable: '#fff',
10424
10422
  textInputColor: '#000',
10425
10423
  textInputColorPending: '#888',
10426
- defaultErrorBackgroundColor: '#fee'
10424
+ defaultErrorBackgroundColor: '#fee',
10425
+ participationDefaultBackground: 'white',
10426
+ basicMaxLength: '4096'
10427
10427
  };
10428
10428
  exports["default"] = _default;
10429
10429
  //# sourceMappingURL=styleConstants.js.map
@@ -13706,8 +13706,8 @@ Object.defineProperty(exports, "__esModule", ({
13706
13706
  }));
13707
13707
  exports.versionInfo = void 0;
13708
13708
  var versionInfo = {
13709
- buildTime: '2023-07-01T18:57:06Z',
13710
- commit: 'e3ba3633cc682051468264690205955f964e071c',
13709
+ buildTime: '2023-07-01T19:30:54Z',
13710
+ commit: 'f42a6c93dc3065624bec9cc0a7ae4e86802eb68e',
13711
13711
  npmInfo: {
13712
13712
  'solid-ui': '2.4.28',
13713
13713
  npm: '8.19.4',
@@ -19454,7 +19454,7 @@ function basicField(dom, container, already, subject, form, doc, callbackFunctio
19454
19454
  var size = kb.anyJS(form, ns.ui('size')) || _styleConstants["default"].textInputSize || 20;
19455
19455
  field.setAttribute('size', size);
19456
19456
  var maxLength = kb.any(form, ns.ui('maxLength'));
19457
- field.setAttribute('maxLength', maxLength ? '' + maxLength : '4096');
19457
+ field.setAttribute('maxLength', maxLength ? '' + maxLength : _styleConstants["default"].basicMaxLength);
19458
19458
  doc = doc || fieldStore(subject, property, doc);
19459
19459
  var obj = kb.any(subject, property, undefined, doc);
19460
19460
  if (!obj) {