solid-ui 2.4.21-f8053087 → 2.4.22-05274f4a
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/README.md +8 -8
- package/dist/main.js +262 -209
- package/dist/main.js.map +1 -1
- package/lib/acl/access-controller.js +2 -2
- package/lib/acl/access-controller.js.map +1 -1
- package/lib/acl/access-groups.d.ts +1 -1
- package/lib/acl/access-groups.js +1 -1
- package/lib/acl/access-groups.js.map +1 -1
- package/lib/acl/acl-control.d.ts +2 -2
- package/lib/acl/acl-control.js +5 -5
- package/lib/acl/acl-control.js.map +1 -1
- package/lib/acl/acl.d.ts +1 -1
- package/lib/acl/acl.js +1 -1
- package/lib/acl/acl.js.map +1 -1
- package/lib/acl/add-agent-buttons.d.ts +1 -1
- package/lib/acl/add-agent-buttons.js +1 -1
- package/lib/acl/add-agent-buttons.js.map +1 -1
- package/lib/acl/styles.d.ts +1 -1
- package/lib/acl/styles.js +1 -1
- package/lib/acl/styles.js.map +1 -1
- package/lib/chat/infinite.js.map +1 -1
- package/lib/iconBase.d.ts.map +1 -1
- package/lib/iconBase.js +2 -2
- package/lib/iconBase.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/jss/index.d.ts +2 -2
- package/lib/jss/index.js +2 -2
- package/lib/jss/index.js.map +1 -1
- package/lib/login/login.d.ts +57 -57
- package/lib/login/login.d.ts.map +1 -1
- package/lib/login/login.js +74 -72
- package/lib/login/login.js.map +1 -1
- package/lib/participation.js +1 -1
- package/lib/participation.js.map +1 -1
- package/lib/tabs.d.ts +1 -1
- package/lib/tabs.d.ts.map +1 -1
- package/lib/tabs.js +5 -3
- package/lib/tabs.js.map +1 -1
- package/lib/utils/headerFooterHelpers.js +24 -19
- package/lib/utils/headerFooterHelpers.js.map +1 -1
- package/lib/versionInfo.js +5 -5
- package/lib/versionInfo.js.map +1 -1
- package/lib/widgets/forms/autocomplete/language.js.map +1 -1
- package/lib/widgets/forms/autocomplete/publicData.js +1 -1
- package/lib/widgets/forms/autocomplete/publicData.js.map +1 -1
- package/lib/widgets/forms.js +85 -66
- package/lib/widgets/forms.js.map +1 -1
- package/package.json +8 -7
package/dist/main.js
CHANGED
|
@@ -219,7 +219,7 @@ var AccessController = /*#__PURE__*/function () {
|
|
|
219
219
|
value: function renderTemporaryStatus(message) {
|
|
220
220
|
var _this5 = this;
|
|
221
221
|
|
|
222
|
-
// @@ TODO Introduce better system for error notification to user https://github.com/
|
|
222
|
+
// @@ TODO Introduce better system for error notification to user https://github.com/solidos/mashlib/issues/87
|
|
223
223
|
this.statusElement.classList.add(this.classes.aclControlBoxStatusRevealed);
|
|
224
224
|
this.statusElement.innerText = message;
|
|
225
225
|
this.statusElement.classList.add(this.classes.temporaryStatusInit);
|
|
@@ -233,7 +233,7 @@ var AccessController = /*#__PURE__*/function () {
|
|
|
233
233
|
}, {
|
|
234
234
|
key: "renderStatus",
|
|
235
235
|
value: function renderStatus(message) {
|
|
236
|
-
// @@ TODO Introduce better system for error notification to user https://github.com/
|
|
236
|
+
// @@ TODO Introduce better system for error notification to user https://github.com/solidos/mashlib/issues/87
|
|
237
237
|
this.statusElement.classList.toggle(this.classes.aclControlBoxStatusRevealed, !!message);
|
|
238
238
|
this.statusElement.innerText = message;
|
|
239
239
|
}
|
|
@@ -555,7 +555,7 @@ var EXPLANATION = {
|
|
|
555
555
|
|
|
556
556
|
/**
|
|
557
557
|
* Renders the table of Owners, Editors, Posters, Submitters, Viewers
|
|
558
|
-
* for https://github.com/
|
|
558
|
+
* for https://github.com/solidos/userguide/blob/main/views/sharing/userguide.md
|
|
559
559
|
*/
|
|
560
560
|
var AccessGroups = /*#__PURE__*/function () {
|
|
561
561
|
// @@ was LiveStore but does not need to be connected to web
|
|
@@ -1058,7 +1058,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
1058
1058
|
|
|
1059
1059
|
/**
|
|
1060
1060
|
* Functions for rendering the ACL User Interface.
|
|
1061
|
-
* See https://github.com/
|
|
1061
|
+
* See https://github.com/solidos/userguide/blob/main/views/sharing/userguide.md#view
|
|
1062
1062
|
* for a screenshot.
|
|
1063
1063
|
* @packageDocumentation
|
|
1064
1064
|
*/
|
|
@@ -1155,7 +1155,7 @@ function shortNameForFolder(x) {
|
|
|
1155
1155
|
if (slash >= 0) {
|
|
1156
1156
|
str = str.slice(slash + 1);
|
|
1157
1157
|
} // Return the folder's filename, or '/' if nothing found
|
|
1158
|
-
// (but see https://github.com/
|
|
1158
|
+
// (but see https://github.com/solidos/solid-ui/issues/196
|
|
1159
1159
|
// regarding whether this happens at the domain root or
|
|
1160
1160
|
// not)
|
|
1161
1161
|
|
|
@@ -1168,7 +1168,7 @@ function shortNameForFolder(x) {
|
|
|
1168
1168
|
* Presumably the '5' is a version number of some sort,
|
|
1169
1169
|
* but all we know is it was already called ACLControlBox5
|
|
1170
1170
|
* when it was introduced into solid-ui in
|
|
1171
|
-
* https://github.com/
|
|
1171
|
+
* https://github.com/solidos/solid-ui/commit/948b874bd93e7bf5160e6e224821b888f07d15f3#diff-4192a29f38a0ababd563b36b47eba5bbR54
|
|
1172
1172
|
*/
|
|
1173
1173
|
|
|
1174
1174
|
|
|
@@ -1285,13 +1285,13 @@ function getDirectory(doc) {
|
|
|
1285
1285
|
function isStorage(doc, aclDoc, store) {
|
|
1286
1286
|
// @@ TODO: The methods used for targetIsStorage are HACKs - it should not be relied upon, and work is
|
|
1287
1287
|
// @@ underway to standardize a behavior that does not rely upon this hack
|
|
1288
|
-
// @@ hopefully fixed as part of https://github.com/
|
|
1288
|
+
// @@ hopefully fixed as part of https://github.com/solidos/data-interoperability-panel/issues/10
|
|
1289
1289
|
return store.holds(doc, ns.rdf('type'), ns.space('Storage'), aclDoc);
|
|
1290
1290
|
}
|
|
1291
1291
|
|
|
1292
1292
|
function hasProtectedAcl(targetDoc) {
|
|
1293
1293
|
// @@ TODO: This is hacky way of knowing whether or not a certain ACL file can be removed
|
|
1294
|
-
// Hopefully we'll find a better, standardized solution to this - https://github.com/
|
|
1294
|
+
// Hopefully we'll find a better, standardized solution to this - https://github.com/solidos/specification/issues/37
|
|
1295
1295
|
return targetDoc.uri === targetDoc.site().uri;
|
|
1296
1296
|
}
|
|
1297
1297
|
/** @internal */
|
|
@@ -1360,7 +1360,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
1360
1360
|
|
|
1361
1361
|
/**
|
|
1362
1362
|
* Non-UI functions for access control.
|
|
1363
|
-
* See https://github.com/
|
|
1363
|
+
* See https://github.com/solidos/web-access-control-spec
|
|
1364
1364
|
* for the spec that defines how ACL documents work.
|
|
1365
1365
|
* @packageDocumentation
|
|
1366
1366
|
*/
|
|
@@ -1962,7 +1962,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
1962
1962
|
|
|
1963
1963
|
/**
|
|
1964
1964
|
* Renders the Sharing pane's "+" button and the menus behind it,
|
|
1965
|
-
* see https://github.com/
|
|
1965
|
+
* see https://github.com/solidos/userguide/blob/main/views/sharing/userguide.md#add
|
|
1966
1966
|
*/
|
|
1967
1967
|
var AddAgentButtons = /*#__PURE__*/function () {
|
|
1968
1968
|
function AddAgentButtons(groupList) {
|
|
@@ -2531,7 +2531,7 @@ exports.styles = void 0;
|
|
|
2531
2531
|
|
|
2532
2532
|
/**
|
|
2533
2533
|
* Contains CSS styles for the Sharing pane,
|
|
2534
|
-
* see https://github.com/
|
|
2534
|
+
* see https://github.com/solidos/userguide/blob/main/views/sharing/userguide.md
|
|
2535
2535
|
* @packageDocumentation
|
|
2536
2536
|
*/
|
|
2537
2537
|
var styles = {
|
|
@@ -7102,11 +7102,11 @@ var _debug = __webpack_require__(/*! ./debug */ "./lib/debug.js");
|
|
|
7102
7102
|
*
|
|
7103
7103
|
* You can also use it if you want to just run a mashlib whhich takes its
|
|
7104
7104
|
* icons seved by other than github.
|
|
7105
|
-
*/
|
|
7105
|
+
*/
|
|
7106
7106
|
|
|
7107
7107
|
/* eslint-disable multiline-ternary */
|
|
7108
7108
|
// Do not export. lways us this module to find the icons, as it varies
|
|
7109
|
-
var iconsOnGithub = 'https://
|
|
7109
|
+
var iconsOnGithub = 'https://solidos.github.io/solid-ui/src';
|
|
7110
7110
|
var icons = module.scriptURI // Firefox extension
|
|
7111
7111
|
? {
|
|
7112
7112
|
iconBase: module.scriptURI.slice(0, module.scriptURI.lastIndexOf('/')) + '/icons/',
|
|
@@ -7162,7 +7162,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
7162
7162
|
SOFTWARE.
|
|
7163
7163
|
|
|
7164
7164
|
If you would like to know more about the solid Solid project, please see
|
|
7165
|
-
https://github.com/
|
|
7165
|
+
https://github.com/solidos/solid
|
|
7166
7166
|
*/
|
|
7167
7167
|
|
|
7168
7168
|
/**
|
|
@@ -7436,7 +7436,7 @@ var stylesheetsMap = new Map();
|
|
|
7436
7436
|
/**
|
|
7437
7437
|
* returns a StyleSheet object.
|
|
7438
7438
|
* See https://cssinjs.org/ for more info about JSS.
|
|
7439
|
-
* (despite the name, see https://github.com/
|
|
7439
|
+
* (despite the name, see https://github.com/solidos/solid-ui/issues/199)
|
|
7440
7440
|
*/
|
|
7441
7441
|
|
|
7442
7442
|
function getClasses(insertionPoint, styles) {
|
|
@@ -7446,7 +7446,7 @@ function getClasses(insertionPoint, styles) {
|
|
|
7446
7446
|
/**
|
|
7447
7447
|
* returns a JSS object.
|
|
7448
7448
|
* See https://cssinjs.org/ for more info about JSS.
|
|
7449
|
-
* (despite the name, see https://github.com/
|
|
7449
|
+
* (despite the name, see https://github.com/solidos/solid-ui/issues/199)
|
|
7450
7450
|
*/
|
|
7451
7451
|
|
|
7452
7452
|
|
|
@@ -7783,6 +7783,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
7783
7783
|
|
|
7784
7784
|
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; }
|
|
7785
7785
|
|
|
7786
|
+
/* eslint-disable camelcase */
|
|
7787
|
+
|
|
7786
7788
|
/**
|
|
7787
7789
|
* Signing in, signing up, profile and preferences reloading
|
|
7788
7790
|
* Type index management
|
|
@@ -7809,10 +7811,10 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
7809
7811
|
*/
|
|
7810
7812
|
|
|
7811
7813
|
/**
|
|
7812
|
-
|
|
7813
|
-
|
|
7814
|
-
|
|
7815
|
-
|
|
7814
|
+
* Resolves with the logged in user's WebID
|
|
7815
|
+
*
|
|
7816
|
+
* @param context
|
|
7817
|
+
*/
|
|
7816
7818
|
// used to be logIn
|
|
7817
7819
|
function ensureLoggedIn(context) {
|
|
7818
7820
|
var me = _solidLogic.authn.currentUser();
|
|
@@ -8006,11 +8008,11 @@ function ensureLoadedProfile(_x3) {
|
|
|
8006
8008
|
return _ensureLoadedProfile.apply(this, arguments);
|
|
8007
8009
|
}
|
|
8008
8010
|
/**
|
|
8009
|
-
|
|
8010
|
-
|
|
8011
|
-
|
|
8012
|
-
|
|
8013
|
-
|
|
8011
|
+
* Returns promise of context with arrays of symbols
|
|
8012
|
+
*
|
|
8013
|
+
* 2016-12-11 change to include forClass arc a la
|
|
8014
|
+
* https://github.com/solid/solid/blob/main/proposals/data-discovery.md
|
|
8015
|
+
*/
|
|
8014
8016
|
|
|
8015
8017
|
|
|
8016
8018
|
function _ensureLoadedProfile() {
|
|
@@ -8078,8 +8080,8 @@ function findAppInstances(_x4, _x5, _x6) {
|
|
|
8078
8080
|
return _findAppInstances.apply(this, arguments);
|
|
8079
8081
|
}
|
|
8080
8082
|
/**
|
|
8081
|
-
|
|
8082
|
-
|
|
8083
|
+
* UI to control registration of instance
|
|
8084
|
+
*/
|
|
8083
8085
|
|
|
8084
8086
|
|
|
8085
8087
|
function _findAppInstances() {
|
|
@@ -8228,8 +8230,8 @@ function registrationControl(_x7, _x8, _x9) {
|
|
|
8228
8230
|
return _registrationControl.apply(this, arguments);
|
|
8229
8231
|
}
|
|
8230
8232
|
/**
|
|
8231
|
-
|
|
8232
|
-
|
|
8233
|
+
* UI to List at all registered things
|
|
8234
|
+
*/
|
|
8233
8235
|
|
|
8234
8236
|
|
|
8235
8237
|
function _registrationControl() {
|
|
@@ -8455,14 +8457,14 @@ function getDefaultSignInButtonStyle() {
|
|
|
8455
8457
|
return 'padding: 1em; border-radius:0.5em; font-size: 100%;';
|
|
8456
8458
|
}
|
|
8457
8459
|
/**
|
|
8458
|
-
|
|
8459
|
-
|
|
8460
|
-
|
|
8461
|
-
|
|
8462
|
-
|
|
8463
|
-
|
|
8464
|
-
|
|
8465
|
-
|
|
8460
|
+
* Bootstrapping identity
|
|
8461
|
+
* (Called by `loginStatusBox()`)
|
|
8462
|
+
*
|
|
8463
|
+
* @param dom
|
|
8464
|
+
* @param setUserCallback
|
|
8465
|
+
*
|
|
8466
|
+
* @returns
|
|
8467
|
+
*/
|
|
8466
8468
|
|
|
8467
8469
|
|
|
8468
8470
|
function signInOrSignUpBox(dom, setUserCallback) {
|
|
@@ -8540,8 +8542,8 @@ function signInOrSignUpBox(dom, setUserCallback) {
|
|
|
8540
8542
|
|
|
8541
8543
|
function renderSignInPopup(dom) {
|
|
8542
8544
|
/**
|
|
8543
|
-
|
|
8544
|
-
|
|
8545
|
+
* Issuer Menu
|
|
8546
|
+
*/
|
|
8545
8547
|
var issuerPopup = dom.createElement('div');
|
|
8546
8548
|
issuerPopup.setAttribute('style', 'position: fixed; top: 0; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; align-items: center;');
|
|
8547
8549
|
dom.body.appendChild(issuerPopup);
|
|
@@ -8555,7 +8557,7 @@ function renderSignInPopup(dom) {
|
|
|
8555
8557
|
issuerPopupBoxLabel.setAttribute('style', 'margin-right: 5px; font-weight: 800');
|
|
8556
8558
|
issuerPopupBoxLabel.innerText = 'Select an identity provider';
|
|
8557
8559
|
var issuerPopupBoxCloseButton = dom.createElement('button');
|
|
8558
|
-
issuerPopupBoxCloseButton.innerHTML = '<img src="https://
|
|
8560
|
+
issuerPopupBoxCloseButton.innerHTML = '<img src="https://solidos.github.io/solid-ui/src/icons/noun_1180156.svg" style="width: 2em; height: 2em;" title="Cancel">';
|
|
8559
8561
|
issuerPopupBoxCloseButton.setAttribute('style', 'background-color: transparent; border: none;');
|
|
8560
8562
|
issuerPopupBoxCloseButton.addEventListener('click', function () {
|
|
8561
8563
|
issuerPopup.remove();
|
|
@@ -8608,8 +8610,8 @@ function renderSignInPopup(dom) {
|
|
|
8608
8610
|
};
|
|
8609
8611
|
}();
|
|
8610
8612
|
/**
|
|
8611
|
-
|
|
8612
|
-
|
|
8613
|
+
* Text-based idp selection
|
|
8614
|
+
*/
|
|
8613
8615
|
|
|
8614
8616
|
|
|
8615
8617
|
var issuerTextContainer = dom.createElement('div');
|
|
@@ -8636,8 +8638,8 @@ function renderSignInPopup(dom) {
|
|
|
8636
8638
|
issuerTextContainer.appendChild(issuerTextInputContainer);
|
|
8637
8639
|
issuerPopupBox.appendChild(issuerTextContainer);
|
|
8638
8640
|
/**
|
|
8639
|
-
|
|
8640
|
-
|
|
8641
|
+
* Button-based idp selection
|
|
8642
|
+
*/
|
|
8641
8643
|
|
|
8642
8644
|
var issuerButtonContainer = dom.createElement('div');
|
|
8643
8645
|
issuerButtonContainer.setAttribute('style', "\n display: flex;\n flex-direction: column;\n padding-top: 10px;\n ");
|
|
@@ -8657,15 +8659,15 @@ function renderSignInPopup(dom) {
|
|
|
8657
8659
|
issuerPopupBox.appendChild(issuerButtonContainer);
|
|
8658
8660
|
}
|
|
8659
8661
|
/**
|
|
8660
|
-
|
|
8661
|
-
|
|
8662
|
-
|
|
8663
|
-
|
|
8664
|
-
|
|
8665
|
-
|
|
8666
|
-
|
|
8667
|
-
|
|
8668
|
-
|
|
8662
|
+
* Login status box
|
|
8663
|
+
*
|
|
8664
|
+
* A big sign-up/sign in box or a logout box depending on the state
|
|
8665
|
+
*
|
|
8666
|
+
* @param dom
|
|
8667
|
+
* @param listener
|
|
8668
|
+
*
|
|
8669
|
+
* @returns
|
|
8670
|
+
*/
|
|
8669
8671
|
|
|
8670
8672
|
|
|
8671
8673
|
function loginStatusBox(dom) {
|
|
@@ -8826,28 +8828,28 @@ _solidLogic.authSession.onLogout( /*#__PURE__*/(0, _asyncToGenerator2["default"]
|
|
|
8826
8828
|
}, _callee2, null, [[2, 17]]);
|
|
8827
8829
|
})));
|
|
8828
8830
|
/**
|
|
8829
|
-
|
|
8830
|
-
|
|
8831
|
-
|
|
8831
|
+
* Workspace selection etc
|
|
8832
|
+
* See https://github.com/solidos/userguide/issues/16
|
|
8833
|
+
*/
|
|
8832
8834
|
|
|
8833
8835
|
/**
|
|
8834
|
-
|
|
8835
|
-
|
|
8836
|
-
|
|
8837
|
-
|
|
8838
|
-
|
|
8839
|
-
|
|
8840
|
-
|
|
8841
|
-
|
|
8842
|
-
|
|
8843
|
-
|
|
8844
|
-
|
|
8845
|
-
|
|
8846
|
-
|
|
8847
|
-
|
|
8848
|
-
|
|
8849
|
-
|
|
8850
|
-
|
|
8836
|
+
* Returns a UI object which, if it selects a workspace,
|
|
8837
|
+
* will callback(workspace, newBase).
|
|
8838
|
+
* See https://github.com/solidos/userguide/issues/16 for more info on workspaces.
|
|
8839
|
+
*
|
|
8840
|
+
* If necessary, will get an account, preference file, etc. In sequence:
|
|
8841
|
+
*
|
|
8842
|
+
* - If not logged in, log in.
|
|
8843
|
+
* - Load preference file
|
|
8844
|
+
* - Prompt user for workspaces
|
|
8845
|
+
* - Allows the user to just type in a URI by hand
|
|
8846
|
+
*
|
|
8847
|
+
* Calls back with the workspace and the base URI
|
|
8848
|
+
*
|
|
8849
|
+
* @param dom
|
|
8850
|
+
* @param appDetails
|
|
8851
|
+
* @param callbackWS
|
|
8852
|
+
*/
|
|
8851
8853
|
|
|
8852
8854
|
|
|
8853
8855
|
function selectWorkspace(dom, appDetails, callbackWS) {
|
|
@@ -9110,21 +9112,21 @@ function selectWorkspace(dom, appDetails, callbackWS) {
|
|
|
9110
9112
|
} // selectWorkspace
|
|
9111
9113
|
|
|
9112
9114
|
/**
|
|
9113
|
-
|
|
9114
|
-
|
|
9115
|
-
|
|
9116
|
-
|
|
9117
|
-
|
|
9118
|
-
|
|
9119
|
-
|
|
9120
|
-
|
|
9121
|
-
|
|
9122
|
-
|
|
9123
|
-
|
|
9124
|
-
|
|
9125
|
-
|
|
9126
|
-
|
|
9127
|
-
|
|
9115
|
+
* Creates a new instance of an app.
|
|
9116
|
+
*
|
|
9117
|
+
* An instance of an app could be e.g. an issue tracker for a given project,
|
|
9118
|
+
* or a chess game, or calendar, or a health/fitness record for a person.
|
|
9119
|
+
*
|
|
9120
|
+
* Note that this use of the term 'app' refers more to entries in the user's
|
|
9121
|
+
* type index than to actual software applications that use the personal data
|
|
9122
|
+
* to which these entries point.
|
|
9123
|
+
*
|
|
9124
|
+
* @param dom
|
|
9125
|
+
* @param appDetails
|
|
9126
|
+
* @param callback
|
|
9127
|
+
*
|
|
9128
|
+
* @returns A div with a button in it for making a new app instance
|
|
9129
|
+
*/
|
|
9128
9130
|
|
|
9129
9131
|
|
|
9130
9132
|
function newAppInstance(dom, appDetails, callback) {
|
|
@@ -11405,7 +11407,7 @@ function participationObject(subject, padDoc, me) {
|
|
|
11405
11407
|
});
|
|
11406
11408
|
|
|
11407
11409
|
if (parps.length > 1) {
|
|
11408
|
-
// This can happen. https://github.com/
|
|
11410
|
+
// This can happen. https://github.com/solidos/chat-pane/issues/71
|
|
11409
11411
|
var candidates = [];
|
|
11410
11412
|
|
|
11411
11413
|
var _iterator = _createForOfIteratorHelper(parps),
|
|
@@ -13750,7 +13752,7 @@ var TabElement = /*#__PURE__*/function (_HTMLElement3) {
|
|
|
13750
13752
|
/**
|
|
13751
13753
|
* Use this widget to generate tabs from triples set in the global store.
|
|
13752
13754
|
*
|
|
13753
|
-
* [Here you can see examples of the tabs](https://
|
|
13755
|
+
* [Here you can see examples of the tabs](https://solidos.github.io/solid-ui/examples/tabs/).
|
|
13754
13756
|
*
|
|
13755
13757
|
* It assumes that items to use for tabs will be in a collection by default,
|
|
13756
13758
|
* e.g.:
|
|
@@ -13930,7 +13932,9 @@ function tabWidget(options) {
|
|
|
13930
13932
|
var selectedTabURI = options.selectedTab.uri;
|
|
13931
13933
|
var selectedTab1 = Array.from(tabContainer.children) // @ts-ignore
|
|
13932
13934
|
.find(function (tab) {
|
|
13933
|
-
return tab.subject &&
|
|
13935
|
+
return tab.subject && // @ts-ignore
|
|
13936
|
+
tab.subject.uri && // @ts-ignore
|
|
13937
|
+
tab.subject.uri === selectedTabURI;
|
|
13934
13938
|
});
|
|
13935
13939
|
var tab = selectedTab1 || selectedTab0 || tabContainer.children[0];
|
|
13936
13940
|
var clickMe = tab.firstChild; // @ts-ignore
|
|
@@ -13945,7 +13949,7 @@ function tabWidget(options) {
|
|
|
13945
13949
|
function addCancelButton(tabContainer) {
|
|
13946
13950
|
if (tabContainer.dataset.onCloseSet) {
|
|
13947
13951
|
// @@ TODO: this is only here to make the browser tests work
|
|
13948
|
-
// Discussion at https://github.com/
|
|
13952
|
+
// Discussion at https://github.com/solidos/solid-ui/pull/110#issuecomment-527080663
|
|
13949
13953
|
var existingCancelButton = tabContainer.querySelector('.unstyled');
|
|
13950
13954
|
tabContainer.removeChild(existingCancelButton);
|
|
13951
13955
|
}
|
|
@@ -14281,63 +14285,68 @@ function _getPodOwner() {
|
|
|
14281
14285
|
podOwner = store.any(pod, _.ns.solid('owner'), null, pod) || store.any(null, _.ns.space('storage'), pod, pod);
|
|
14282
14286
|
|
|
14283
14287
|
if (!podOwner) {
|
|
14284
|
-
_context.next =
|
|
14288
|
+
_context.next = 31;
|
|
14285
14289
|
break;
|
|
14286
14290
|
}
|
|
14287
14291
|
|
|
14288
14292
|
_context.prev = 18;
|
|
14289
|
-
|
|
14290
|
-
|
|
14293
|
+
_context.next = 21;
|
|
14294
|
+
return store.fetcher.load(podOwner.doc());
|
|
14295
|
+
|
|
14296
|
+
case 21:
|
|
14297
|
+
_context.next = 27;
|
|
14291
14298
|
break;
|
|
14292
14299
|
|
|
14293
|
-
case
|
|
14294
|
-
_context.prev =
|
|
14300
|
+
case 23:
|
|
14301
|
+
_context.prev = 23;
|
|
14295
14302
|
_context.t1 = _context["catch"](18);
|
|
14296
14303
|
console.warn('Unable to load profile of pod owner ' + podOwner);
|
|
14297
14304
|
return _context.abrupt("return", null);
|
|
14298
14305
|
|
|
14299
|
-
case
|
|
14306
|
+
case 27:
|
|
14300
14307
|
if (!store.holds(podOwner, _.ns.space('storage'), pod, podOwner.doc())) {
|
|
14301
14308
|
console.warn("Pod owner ".concat(podOwner, " does NOT list pod ").concat(pod, " as their storage"));
|
|
14302
14309
|
}
|
|
14303
14310
|
|
|
14304
14311
|
return _context.abrupt("return", podOwner);
|
|
14305
14312
|
|
|
14306
|
-
case
|
|
14313
|
+
case 31:
|
|
14307
14314
|
// pod owner not declared in pod
|
|
14308
14315
|
// @@ TODO: This is given the structure that NSS provides
|
|
14309
14316
|
// This is a massive guess. For old pods which don't have owner link
|
|
14310
14317
|
guess = (0, _rdflib.sym)("".concat(pod.uri, "profile/card#me"));
|
|
14311
|
-
_context.prev =
|
|
14312
|
-
|
|
14313
|
-
store.fetcher.load(guess);
|
|
14314
|
-
_context.next = 39;
|
|
14315
|
-
break;
|
|
14318
|
+
_context.prev = 32;
|
|
14319
|
+
_context.next = 35;
|
|
14320
|
+
return store.fetcher.load(guess);
|
|
14316
14321
|
|
|
14317
14322
|
case 35:
|
|
14318
|
-
_context.
|
|
14319
|
-
|
|
14323
|
+
_context.next = 41;
|
|
14324
|
+
break;
|
|
14325
|
+
|
|
14326
|
+
case 37:
|
|
14327
|
+
_context.prev = 37;
|
|
14328
|
+
_context.t2 = _context["catch"](32);
|
|
14320
14329
|
console.error('Ooops. Guessed wrong pod owner webid {$guess} : can\'t load it.');
|
|
14321
14330
|
return _context.abrupt("return", null);
|
|
14322
14331
|
|
|
14323
|
-
case
|
|
14332
|
+
case 41:
|
|
14324
14333
|
if (!store.holds(guess, _.ns.space('storage'), pod, guess.doc())) {
|
|
14325
|
-
_context.next =
|
|
14334
|
+
_context.next = 44;
|
|
14326
14335
|
break;
|
|
14327
14336
|
}
|
|
14328
14337
|
|
|
14329
14338
|
console.warn('Using guessed pod owner webid but it links back.');
|
|
14330
14339
|
return _context.abrupt("return", guess);
|
|
14331
14340
|
|
|
14332
|
-
case
|
|
14341
|
+
case 44:
|
|
14333
14342
|
return _context.abrupt("return", null);
|
|
14334
14343
|
|
|
14335
|
-
case
|
|
14344
|
+
case 45:
|
|
14336
14345
|
case "end":
|
|
14337
14346
|
return _context.stop();
|
|
14338
14347
|
}
|
|
14339
14348
|
}
|
|
14340
|
-
}, _callee, null, [[0, 9], [18,
|
|
14349
|
+
}, _callee, null, [[0, 9], [18, 23], [32, 37]]);
|
|
14341
14350
|
}));
|
|
14342
14351
|
return _getPodOwner.apply(this, arguments);
|
|
14343
14352
|
}
|
|
@@ -15183,10 +15192,10 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
15183
15192
|
}));
|
|
15184
15193
|
exports.versionInfo = void 0;
|
|
15185
15194
|
var versionInfo = {
|
|
15186
|
-
buildTime: '2022-
|
|
15187
|
-
commit: '
|
|
15195
|
+
buildTime: '2022-05-06T18:28:58Z',
|
|
15196
|
+
commit: '05274f4aa368ff053f08d19a9c2d89d8bdd46eb1',
|
|
15188
15197
|
npmInfo: {
|
|
15189
|
-
'solid-ui': '2.4.
|
|
15198
|
+
'solid-ui': '2.4.22',
|
|
15190
15199
|
npm: '6.14.16',
|
|
15191
15200
|
ares: '1.18.1',
|
|
15192
15201
|
brotli: '1.0.9',
|
|
@@ -15196,8 +15205,8 @@ var versionInfo = {
|
|
|
15196
15205
|
modules: '83',
|
|
15197
15206
|
napi: '8',
|
|
15198
15207
|
nghttp2: '1.42.0',
|
|
15199
|
-
node: '14.19.
|
|
15200
|
-
openssl: '1.1.
|
|
15208
|
+
node: '14.19.1',
|
|
15209
|
+
openssl: '1.1.1n',
|
|
15201
15210
|
tz: '2021a3',
|
|
15202
15211
|
unicode: '14.0',
|
|
15203
15212
|
uv: '1.42.0',
|
|
@@ -18111,6 +18120,14 @@ _fieldFunction.field[ns.ui('Classifier').uri] = function (dom, container, alread
|
|
|
18111
18120
|
**
|
|
18112
18121
|
** Not nested. Generates a link to something from a given class.
|
|
18113
18122
|
** Optional subform for the thing selected.
|
|
18123
|
+
** Generates a subForm based on a ui:use form
|
|
18124
|
+
** Will look like:
|
|
18125
|
+
** <div id=dropDownDiv>
|
|
18126
|
+
** <div id=labelOfDropDown>
|
|
18127
|
+
** <div id=selectDiv>
|
|
18128
|
+
** <select id=dropDownSelect>
|
|
18129
|
+
** <option> ....
|
|
18130
|
+
** <subForm>
|
|
18114
18131
|
** Alternative implementatons caould be:
|
|
18115
18132
|
** -- pop-up menu (as here)
|
|
18116
18133
|
** -- radio buttons
|
|
@@ -18141,38 +18158,39 @@ _fieldFunction.field[ns.ui('Choice').uri] = function (dom, container, already, s
|
|
|
18141
18158
|
}
|
|
18142
18159
|
|
|
18143
18160
|
lhs.appendChild((0, _basic.fieldLabel)(dom, property, form));
|
|
18144
|
-
var from = kb.any(form, ui('from'));
|
|
18145
|
-
|
|
18146
|
-
if (!from) {
|
|
18147
|
-
return (0, _error.errorMessageBlock)(dom, "No 'from' for Choice: " + form);
|
|
18148
|
-
}
|
|
18149
|
-
|
|
18150
18161
|
var subForm = kb.any(form, ui('use')); // Optional
|
|
18151
18162
|
|
|
18152
18163
|
var follow = kb.anyJS(form, ui('follow'), null, formDoc); // data doc moves to new subject?
|
|
18153
18164
|
|
|
18154
18165
|
var possible = [];
|
|
18155
18166
|
var possibleProperties;
|
|
18156
|
-
var
|
|
18167
|
+
var firstSelectOptionText = '* Select from ' + utils.label(subject, true) + ' *';
|
|
18157
18168
|
var opts = {
|
|
18158
18169
|
form: form,
|
|
18170
|
+
subForm: subForm,
|
|
18159
18171
|
multiple: multiple,
|
|
18160
|
-
|
|
18172
|
+
firstSelectOptionText: firstSelectOptionText,
|
|
18161
18173
|
disambiguate: false
|
|
18162
18174
|
};
|
|
18163
|
-
|
|
18175
|
+
var uiFrom = kb.any(form, ui('from'));
|
|
18176
|
+
|
|
18177
|
+
if (!uiFrom) {
|
|
18178
|
+
return (0, _error.errorMessageBlock)(dom, "No 'from' for Choice: " + form);
|
|
18179
|
+
}
|
|
18164
18180
|
|
|
18165
|
-
|
|
18181
|
+
possible = kb.each(undefined, ns.rdf('type'), uiFrom, formDoc);
|
|
18182
|
+
|
|
18183
|
+
for (var x in kb.findMembersNT(uiFrom)) {
|
|
18166
18184
|
possible.push(kb.fromNT(x));
|
|
18167
18185
|
} // Use rdfs
|
|
18168
18186
|
|
|
18169
18187
|
|
|
18170
|
-
if (
|
|
18188
|
+
if (uiFrom.sameTerm(ns.rdfs('Class'))) {
|
|
18171
18189
|
for (p in buttons.allClassURIs()) {
|
|
18172
18190
|
possible.push(kb.sym(p));
|
|
18173
18191
|
} // log.debug("%%% Choice field: possible.length 2 = "+possible.length)
|
|
18174
18192
|
|
|
18175
|
-
} else if (
|
|
18193
|
+
} else if (uiFrom.sameTerm(ns.rdf('Property'))) {
|
|
18176
18194
|
possibleProperties = buttons.propertyTriage(kb);
|
|
18177
18195
|
|
|
18178
18196
|
for (p in possibleProperties.op) {
|
|
@@ -18184,7 +18202,7 @@ _fieldFunction.field[ns.ui('Choice').uri] = function (dom, container, already, s
|
|
|
18184
18202
|
}
|
|
18185
18203
|
|
|
18186
18204
|
opts.disambiguate = true; // This is a big class, and the labels won't be enough.
|
|
18187
|
-
} else if (
|
|
18205
|
+
} else if (uiFrom.sameTerm(ns.owl('ObjectProperty'))) {
|
|
18188
18206
|
possibleProperties = buttons.propertyTriage(kb);
|
|
18189
18207
|
|
|
18190
18208
|
for (p in possibleProperties.op) {
|
|
@@ -18192,7 +18210,7 @@ _fieldFunction.field[ns.ui('Choice').uri] = function (dom, container, already, s
|
|
|
18192
18210
|
}
|
|
18193
18211
|
|
|
18194
18212
|
opts.disambiguate = true;
|
|
18195
|
-
} else if (
|
|
18213
|
+
} else if (uiFrom.sameTerm(ns.owl('DatatypeProperty'))) {
|
|
18196
18214
|
possibleProperties = buttons.propertyTriage(kb);
|
|
18197
18215
|
|
|
18198
18216
|
for (p in possibleProperties.dp) {
|
|
@@ -18202,26 +18220,45 @@ _fieldFunction.field[ns.ui('Choice').uri] = function (dom, container, already, s
|
|
|
18202
18220
|
opts.disambiguate = true;
|
|
18203
18221
|
}
|
|
18204
18222
|
|
|
18205
|
-
var
|
|
18223
|
+
var sortedPossible = sortByLabel(possible); // TODO: this checks for any occurance regardles if it is set to true or false
|
|
18206
18224
|
|
|
18207
|
-
|
|
18208
|
-
|
|
18209
|
-
(0, _fieldFunction.fieldFunction)(dom, subForm)(dom, rhs, already, object, subForm, follow ? object.doc() : dataDoc, callbackFunction);
|
|
18225
|
+
if (kb.any(form, ui('canMintNew'))) {
|
|
18226
|
+
opts.mint = '* Create new *'; // @@ could be better
|
|
18210
18227
|
}
|
|
18211
18228
|
|
|
18212
|
-
var
|
|
18229
|
+
var selector = makeSelectForOptions(dom, kb, subject, property, sortedPossible, uiFrom, opts, dataDoc, callbackFunction);
|
|
18230
|
+
rhs.appendChild(selector);
|
|
18231
|
+
var object;
|
|
18213
18232
|
|
|
18214
|
-
if (
|
|
18215
|
-
|
|
18233
|
+
if (selector.currentURI) {
|
|
18234
|
+
object = $rdf.sym(selector.currentURI);
|
|
18235
|
+
} else {
|
|
18236
|
+
object = kb.any(subject, property);
|
|
18237
|
+
}
|
|
18216
18238
|
|
|
18217
|
-
|
|
18239
|
+
if (object && subForm) {
|
|
18240
|
+
removeNextSiblingsAfterElement(selector);
|
|
18241
|
+
addSubFormChoice(dom, rhs, already, object, subForm, follow ? object.doc() : dataDoc, callbackFunction);
|
|
18218
18242
|
}
|
|
18219
18243
|
|
|
18220
|
-
var selector = makeSelectForOptions(dom, kb, subject, property, possible2, opts, dataDoc, callbackFunction);
|
|
18221
|
-
rhs.appendChild(selector);
|
|
18222
|
-
if (object && subForm) addSubForm();
|
|
18223
18244
|
return box;
|
|
18224
|
-
};
|
|
18245
|
+
};
|
|
18246
|
+
/**
|
|
18247
|
+
* Removes all sibling elements after specified
|
|
18248
|
+
* @param {HTMLElement} currentElement
|
|
18249
|
+
* @private
|
|
18250
|
+
*/
|
|
18251
|
+
|
|
18252
|
+
|
|
18253
|
+
function removeNextSiblingsAfterElement(currentElement) {
|
|
18254
|
+
while (currentElement.nextElementSibling) {
|
|
18255
|
+
currentElement.nextElementSibling.remove();
|
|
18256
|
+
}
|
|
18257
|
+
}
|
|
18258
|
+
|
|
18259
|
+
function addSubFormChoice(dom, selectDiv, already, subject, subForm, dataDoc, callbackFunction) {
|
|
18260
|
+
(0, _fieldFunction.fieldFunction)(dom, subForm)(dom, selectDiv, already, subject, subForm, dataDoc, callbackFunction);
|
|
18261
|
+
} // Documentation - non-interactive fields
|
|
18225
18262
|
//
|
|
18226
18263
|
|
|
18227
18264
|
|
|
@@ -18560,7 +18597,7 @@ function makeDescription(dom, kb, subject, predicate, dataDoc, callbackFunction)
|
|
|
18560
18597
|
// @param predicate - a term, the predicate of the statement(s) being edited
|
|
18561
18598
|
// @param possible - a list of terms, the possible value the object can take
|
|
18562
18599
|
// @param options.multiple - Boolean - Whether more than one at a time is allowed
|
|
18563
|
-
// @param options.
|
|
18600
|
+
// @param options.firstSelectOptionText - a string to be displayed as the
|
|
18564
18601
|
// option for none selected (for non multiple)
|
|
18565
18602
|
// @param options.mint - User may create thing if this sent to the prompt string eg "New foo"
|
|
18566
18603
|
// @param options.subForm - If mint, then the form to be used for minting the new thing
|
|
@@ -18569,7 +18606,7 @@ function makeDescription(dom, kb, subject, predicate, dataDoc, callbackFunction)
|
|
|
18569
18606
|
*/
|
|
18570
18607
|
|
|
18571
18608
|
|
|
18572
|
-
function makeSelectForOptions(dom, kb, subject, predicate, possible, options, dataDoc, callbackFunction) {
|
|
18609
|
+
function makeSelectForOptions(dom, kb, subject, predicate, possible, uiFrom, options, dataDoc, callbackFunction) {
|
|
18573
18610
|
log.debug('Select list length now ' + possible.length);
|
|
18574
18611
|
var n = 0;
|
|
18575
18612
|
var uris = {}; // Count them
|
|
@@ -18600,7 +18637,9 @@ function makeSelectForOptions(dom, kb, subject, predicate, possible, options, da
|
|
|
18600
18637
|
actual = kb.findTypeURIs(subject);
|
|
18601
18638
|
} else {
|
|
18602
18639
|
kb.each(subject, predicate, null, dataDoc).forEach(function (x) {
|
|
18603
|
-
|
|
18640
|
+
if (x.uri) {
|
|
18641
|
+
actual[x.uri] = true;
|
|
18642
|
+
}
|
|
18604
18643
|
});
|
|
18605
18644
|
}
|
|
18606
18645
|
|
|
@@ -18610,8 +18649,6 @@ function makeSelectForOptions(dom, kb, subject, predicate, possible, options, da
|
|
|
18610
18649
|
actual = getActual();
|
|
18611
18650
|
|
|
18612
18651
|
var onChange = function onChange(_e) {
|
|
18613
|
-
select.disabled = true; // until data written back - gives user feedback too
|
|
18614
|
-
|
|
18615
18652
|
var ds = [];
|
|
18616
18653
|
var is = [];
|
|
18617
18654
|
|
|
@@ -18627,6 +18664,7 @@ function makeSelectForOptions(dom, kb, subject, predicate, possible, options, da
|
|
|
18627
18664
|
var opt = select.options[_i];
|
|
18628
18665
|
|
|
18629
18666
|
if (opt.selected && opt.AJAR_mint) {
|
|
18667
|
+
// not sure if this if is used because I cannot find mintClass
|
|
18630
18668
|
if (options.mintClass) {
|
|
18631
18669
|
var thisForm = promptForNew(dom, kb, subject, predicate, options.mintClass, null, dataDoc, function (ok, body) {
|
|
18632
18670
|
if (!ok) {
|
|
@@ -18641,11 +18679,14 @@ function makeSelectForOptions(dom, kb, subject, predicate, possible, options, da
|
|
|
18641
18679
|
newObject = newThing(dataDoc);
|
|
18642
18680
|
}
|
|
18643
18681
|
|
|
18644
|
-
is.push($rdf.st(subject, predicate, newObject, dataDoc));
|
|
18682
|
+
is.push($rdf.st(subject, predicate, kb.sym(newObject), dataDoc));
|
|
18683
|
+
if (uiFrom) is.push($rdf.st(newObject, ns.rdf('type'), kb.sym(uiFrom), dataDoc)); // not sure if this if is used because I cannot find mintStatementsFun
|
|
18645
18684
|
|
|
18646
18685
|
if (options.mintStatementsFun) {
|
|
18647
18686
|
is = is.concat(options.mintStatementsFun(newObject));
|
|
18648
18687
|
}
|
|
18688
|
+
|
|
18689
|
+
select.currentURI = newObject;
|
|
18649
18690
|
}
|
|
18650
18691
|
|
|
18651
18692
|
if (!opt.AJAR_uri) continue; // a prompt or mint
|
|
@@ -18653,11 +18694,7 @@ function makeSelectForOptions(dom, kb, subject, predicate, possible, options, da
|
|
|
18653
18694
|
if (opt.selected && !(opt.AJAR_uri in actual)) {
|
|
18654
18695
|
// new class
|
|
18655
18696
|
is.push($rdf.st(subject, predicate, kb.sym(opt.AJAR_uri), dataDoc));
|
|
18656
|
-
|
|
18657
|
-
|
|
18658
|
-
if (!opt.selected && opt.AJAR_uri in actual) {
|
|
18659
|
-
// old class
|
|
18660
|
-
removeValue(kb.sym(opt.AJAR_uri));
|
|
18697
|
+
select.currentURI = opt.AJAR_uri;
|
|
18661
18698
|
}
|
|
18662
18699
|
|
|
18663
18700
|
if (opt.selected) select.currentURI = opt.AJAR_uri;
|
|
@@ -18677,32 +18714,21 @@ function makeSelectForOptions(dom, kb, subject, predicate, possible, options, da
|
|
|
18677
18714
|
sel = sel.superSelect;
|
|
18678
18715
|
}
|
|
18679
18716
|
|
|
18680
|
-
|
|
18681
|
-
callbackFunction(ok, {
|
|
18682
|
-
widget: 'select',
|
|
18683
|
-
event: 'new'
|
|
18684
|
-
});
|
|
18685
|
-
}
|
|
18686
|
-
|
|
18687
|
-
log.info('selectForOptions: data doc = ' + dataDoc);
|
|
18688
|
-
kb.updater.update(ds, is, function (uri, ok, body) {
|
|
18689
|
-
actual = getActual(); // refresh
|
|
18717
|
+
log.info('selectForOptions: data doc = ' + dataDoc); // refresh subForm
|
|
18690
18718
|
|
|
18719
|
+
removeNextSiblingsAfterElement(select);
|
|
18720
|
+
addSubFormChoice(dom, select.parentNode, {}, $rdf.sym(select.currentURI), options.subForm, dataDoc, function (ok, body) {
|
|
18691
18721
|
if (ok) {
|
|
18692
|
-
|
|
18722
|
+
kb.updater.update(ds, is, function (uri, success, errorBody) {
|
|
18723
|
+
actual = getActual(); // refresh
|
|
18693
18724
|
|
|
18694
|
-
|
|
18695
|
-
|
|
18696
|
-
|
|
18697
|
-
|
|
18698
|
-
|
|
18699
|
-
|
|
18700
|
-
}
|
|
18701
|
-
|
|
18702
|
-
if (callbackFunction) callbackFunction(ok, {
|
|
18703
|
-
widget: 'select',
|
|
18704
|
-
event: 'change'
|
|
18705
|
-
});
|
|
18725
|
+
if (!success) return select.parentNode.appendChild((0, _error.errorMessageBlock)(dom, 'Error updating data in select: ' + errorBody));
|
|
18726
|
+
if (callbackFunction) callbackFunction(success, {
|
|
18727
|
+
widget: 'select',
|
|
18728
|
+
event: 'new'
|
|
18729
|
+
});
|
|
18730
|
+
});
|
|
18731
|
+
} else return select.parentNode.appendChild((0, _error.errorMessageBlock)(dom, 'Error updating data in field of select: ' + body));
|
|
18706
18732
|
});
|
|
18707
18733
|
};
|
|
18708
18734
|
|
|
@@ -18759,11 +18785,14 @@ function makeSelectForOptions(dom, kb, subject, predicate, possible, options, da
|
|
|
18759
18785
|
select.insertBefore(mint, select.firstChild);
|
|
18760
18786
|
}
|
|
18761
18787
|
|
|
18762
|
-
if (select.currentURI
|
|
18788
|
+
if (!select.currentURI && !options.multiple) {
|
|
18763
18789
|
var prompt = dom.createElement('option');
|
|
18764
|
-
prompt.appendChild(dom.createTextNode(options.
|
|
18765
|
-
select.insertBefore(prompt, select.firstChild);
|
|
18790
|
+
prompt.appendChild(dom.createTextNode(options.firstSelectOptionText));
|
|
18766
18791
|
prompt.selected = true;
|
|
18792
|
+
prompt.disabled = true;
|
|
18793
|
+
prompt.value = true;
|
|
18794
|
+
prompt.hidden = true;
|
|
18795
|
+
select.insertBefore(prompt, select.firstChild);
|
|
18767
18796
|
}
|
|
18768
18797
|
|
|
18769
18798
|
if (editable) {
|
|
@@ -18801,9 +18830,8 @@ function makeSelectForCategory(dom, kb, subject, category, dataDoc, callbackFunc
|
|
|
18801
18830
|
return (0, _error.errorMessageBlock)(dom, "Can't do " + (multiple ? 'multiple ' : '') + 'selector with only 1 subclass of category: ' + category + ':' + subs[1]);
|
|
18802
18831
|
}
|
|
18803
18832
|
|
|
18804
|
-
return makeSelectForOptions(dom, kb, subject, ns.rdf('type'), subs, {
|
|
18805
|
-
multiple: multiple
|
|
18806
|
-
nullPrompt: '--classify--'
|
|
18833
|
+
return makeSelectForOptions(dom, kb, subject, ns.rdf('type'), subs, null, {
|
|
18834
|
+
multiple: multiple
|
|
18807
18835
|
}, dataDoc, callbackFunction);
|
|
18808
18836
|
}
|
|
18809
18837
|
/** Make SELECT element to select subclasses recurively
|
|
@@ -20767,7 +20795,7 @@ function queryESCODataByName(_x, _x2, _x3) {
|
|
|
20767
20795
|
*
|
|
20768
20796
|
* Wikidata bug: https://phabricator.wikimedia.org/T283962
|
|
20769
20797
|
* This will not be needed whn that WDQS bug fixed.
|
|
20770
|
-
* This is aptured in https://github.com/
|
|
20798
|
+
* This is aptured in https://github.com/solidos/solid-ui/issues/403
|
|
20771
20799
|
*/
|
|
20772
20800
|
|
|
20773
20801
|
|
|
@@ -25740,6 +25768,31 @@ function freeze(object, oc) {
|
|
|
25740
25768
|
return oc && typeof oc.freeze === 'function' ? oc.freeze(object) : object
|
|
25741
25769
|
}
|
|
25742
25770
|
|
|
25771
|
+
/**
|
|
25772
|
+
* Since we can not rely on `Object.assign` we provide a simplified version
|
|
25773
|
+
* that is sufficient for our needs.
|
|
25774
|
+
*
|
|
25775
|
+
* @param {Object} target
|
|
25776
|
+
* @param {Object | null | undefined} source
|
|
25777
|
+
*
|
|
25778
|
+
* @returns {Object} target
|
|
25779
|
+
* @throws TypeError if target is not an object
|
|
25780
|
+
*
|
|
25781
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
|
|
25782
|
+
* @see https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.assign
|
|
25783
|
+
*/
|
|
25784
|
+
function assign(target, source) {
|
|
25785
|
+
if (target === null || typeof target !== 'object') {
|
|
25786
|
+
throw new TypeError('target is not an object')
|
|
25787
|
+
}
|
|
25788
|
+
for (var key in source) {
|
|
25789
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
25790
|
+
target[key] = source[key]
|
|
25791
|
+
}
|
|
25792
|
+
}
|
|
25793
|
+
return target
|
|
25794
|
+
}
|
|
25795
|
+
|
|
25743
25796
|
/**
|
|
25744
25797
|
* All mime types that are allowed as input to `DOMParser.parseFromString`
|
|
25745
25798
|
*
|
|
@@ -25857,6 +25910,7 @@ var NAMESPACE = freeze({
|
|
|
25857
25910
|
XMLNS: 'http://www.w3.org/2000/xmlns/',
|
|
25858
25911
|
})
|
|
25859
25912
|
|
|
25913
|
+
exports.assign = assign;
|
|
25860
25914
|
exports.freeze = freeze;
|
|
25861
25915
|
exports.MIME_TYPE = MIME_TYPE;
|
|
25862
25916
|
exports.NAMESPACE = NAMESPACE;
|
|
@@ -27391,9 +27445,10 @@ function needNamespaceDefine(node, isHTML, visibleNamespaces) {
|
|
|
27391
27445
|
* are serialized as their entity references, so they will be preserved.
|
|
27392
27446
|
* (In contrast to whitespace literals in the input which are normalized to spaces)
|
|
27393
27447
|
* @see https://www.w3.org/TR/xml11/#AVNormalize
|
|
27448
|
+
* @see https://w3c.github.io/DOM-Parsing/#serializing-an-element-s-attributes
|
|
27394
27449
|
*/
|
|
27395
27450
|
function addSerializedAttribute(buf, qualifiedName, value) {
|
|
27396
|
-
buf.push(' ', qualifiedName, '="', value.replace(/[
|
|
27451
|
+
buf.push(' ', qualifiedName, '="', value.replace(/[<>&"\t\n\r]/g, _xmlEncoder), '"')
|
|
27397
27452
|
}
|
|
27398
27453
|
|
|
27399
27454
|
function serializeToString(node,buf,isHTML,nodeFilter,visibleNamespaces){
|
|
@@ -27538,10 +27593,10 @@ function serializeToString(node,buf,isHTML,nodeFilter,visibleNamespaces){
|
|
|
27538
27593
|
* and does not include the CDATA-section-close delimiter, `]]>`.
|
|
27539
27594
|
*
|
|
27540
27595
|
* @see https://www.w3.org/TR/xml/#NT-CharData
|
|
27596
|
+
* @see https://w3c.github.io/DOM-Parsing/#xml-serializing-a-text-node
|
|
27541
27597
|
*/
|
|
27542
27598
|
return buf.push(node.data
|
|
27543
|
-
.replace(/[
|
|
27544
|
-
.replace(/]]>/g, ']]>')
|
|
27599
|
+
.replace(/[<&>]/g,_xmlEncoder)
|
|
27545
27600
|
);
|
|
27546
27601
|
case CDATA_SECTION_NODE:
|
|
27547
27602
|
return buf.push( '<![CDATA[',node.data,']]>');
|
|
@@ -65797,7 +65852,7 @@ function offlineTestID() {
|
|
|
65797
65852
|
return (0, rdflib_1.sym)($SolidTestEnvironment.username);
|
|
65798
65853
|
}
|
|
65799
65854
|
// hack that makes SolidOS work in offline mode by adding the webId directly in html
|
|
65800
|
-
// example usage: https://github.com/
|
|
65855
|
+
// example usage: https://github.com/solidos/mashlib/blob/29b8b53c46bf02e0e219f0bacd51b0e9951001dd/test/contact/local.html#L37
|
|
65801
65856
|
if (typeof document !== 'undefined' &&
|
|
65802
65857
|
document.location &&
|
|
65803
65858
|
('' + document.location).slice(0, 16) === 'http://localhost') {
|
|
@@ -66951,7 +67006,7 @@ var _fetch = function (url, requestInit) { return __awaiter(void 0, void 0, void
|
|
|
66951
67006
|
var omitCreds;
|
|
66952
67007
|
return __generator(this, function (_a) {
|
|
66953
67008
|
omitCreds = requestInit && requestInit.credentials && requestInit.credentials == 'omit';
|
|
66954
|
-
if (authSession_1.authSession.info.webId && !omitCreds) { // see https://github.com/
|
|
67009
|
+
if (authSession_1.authSession.info.webId && !omitCreds) { // see https://github.com/solidos/solidos/issues/114
|
|
66955
67010
|
// In fact ftech should respect crentials omit itself
|
|
66956
67011
|
return [2 /*return*/, authSession_1.authSession.fetch(url, requestInit)];
|
|
66957
67012
|
}
|
|
@@ -67182,7 +67237,7 @@ function ensureLoadedPreferences(context) {
|
|
|
67182
67237
|
* Resolves with the same context, outputting
|
|
67183
67238
|
* output: index.public, index.private
|
|
67184
67239
|
* @@ This is a very bizare function
|
|
67185
|
-
* @see https://github.com/
|
|
67240
|
+
* @see https://github.com/solidos/solid/blob/main/proposals/data-discovery.md#discoverability
|
|
67186
67241
|
*/
|
|
67187
67242
|
function loadIndex(context, isPublic) {
|
|
67188
67243
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -67245,7 +67300,7 @@ function loadTypeIndexes(context) {
|
|
|
67245
67300
|
exports.loadTypeIndexes = loadTypeIndexes;
|
|
67246
67301
|
/**
|
|
67247
67302
|
* Resolves with the same context, outputting
|
|
67248
|
-
* @see https://github.com/
|
|
67303
|
+
* @see https://github.com/solidos/solid/blob/main/proposals/data-discovery.md#discoverability
|
|
67249
67304
|
*/
|
|
67250
67305
|
function ensureTypeIndexes(context, agent) {
|
|
67251
67306
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -67273,7 +67328,7 @@ exports.ensureTypeIndexes = ensureTypeIndexes;
|
|
|
67273
67328
|
* Many reasons for failing including script not having permission etc
|
|
67274
67329
|
*
|
|
67275
67330
|
* Adds its output to the context
|
|
67276
|
-
* @see https://github.com/
|
|
67331
|
+
* @see https://github.com/solidos/solid/blob/main/proposals/data-discovery.md#discoverability
|
|
67277
67332
|
*/
|
|
67278
67333
|
function ensureOneTypeIndex(context, isPublic, agent) {
|
|
67279
67334
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -67426,7 +67481,7 @@ function registerInTypeIndex(context, instance, theClass, isPublic, agent // Def
|
|
|
67426
67481
|
index = indexes[0];
|
|
67427
67482
|
registration = (0, uri_1.newThing)(index);
|
|
67428
67483
|
ins = [
|
|
67429
|
-
// See https://github.com/
|
|
67484
|
+
// See https://github.com/solidos/solid/blob/main/proposals/data-discovery.md
|
|
67430
67485
|
(0, rdflib_1.st)(registration, exports.ns.rdf('type'), exports.ns.solid('TypeRegistration'), index),
|
|
67431
67486
|
(0, rdflib_1.st)(registration, exports.ns.solid('forClass'), theClass, index),
|
|
67432
67487
|
(0, rdflib_1.st)(registration, exports.ns.solid('instance'), instance, index)
|
|
@@ -67530,7 +67585,7 @@ var UtilityLogic = /** @class */ (function () {
|
|
|
67530
67585
|
});
|
|
67531
67586
|
});
|
|
67532
67587
|
};
|
|
67533
|
-
// Copied from https://github.com/
|
|
67588
|
+
// Copied from https://github.com/solidos/web-access-control-tests/blob/v3.0.0/test/surface/delete.test.ts#L5
|
|
67534
67589
|
UtilityLogic.prototype.setSinglePeerAccess = function (options) {
|
|
67535
67590
|
return __awaiter(this, void 0, void 0, function () {
|
|
67536
67591
|
var str, aclDocUrl;
|
|
@@ -67618,7 +67673,7 @@ var UtilityLogic = /** @class */ (function () {
|
|
|
67618
67673
|
headers: {
|
|
67619
67674
|
"Content-Type": "text/turtle",
|
|
67620
67675
|
"If-None-Match": "*",
|
|
67621
|
-
Link: '<http://www.w3.org/ns/ldp#BasicContainer>; rel="type"', // See https://github.com/
|
|
67676
|
+
Link: '<http://www.w3.org/ns/ldp#BasicContainer>; rel="type"', // See https://github.com/solidos/node-solid-server/issues/1465
|
|
67622
67677
|
},
|
|
67623
67678
|
body: " ", // work around https://github.com/michielbdejong/community-server/issues/4#issuecomment-776222863
|
|
67624
67679
|
})];
|
|
@@ -76864,8 +76919,9 @@ class LocalJWKSet {
|
|
|
76864
76919
|
}
|
|
76865
76920
|
async getKey(protectedHeader, token) {
|
|
76866
76921
|
const { alg, kid } = { ...protectedHeader, ...token.header };
|
|
76922
|
+
const kty = getKtyFromAlg(alg);
|
|
76867
76923
|
const candidates = this._jwks.keys.filter((jwk) => {
|
|
76868
|
-
let candidate =
|
|
76924
|
+
let candidate = kty === jwk.kty;
|
|
76869
76925
|
if (candidate && typeof kid === 'string') {
|
|
76870
76926
|
candidate = kid === jwk.kid;
|
|
76871
76927
|
}
|
|
@@ -78082,21 +78138,15 @@ function lengthAndInput(input) {
|
|
|
78082
78138
|
}
|
|
78083
78139
|
async function concatKdf(secret, bits, value) {
|
|
78084
78140
|
const iterations = Math.ceil((bits >> 3) / 32);
|
|
78085
|
-
|
|
78086
|
-
for (let iter =
|
|
78141
|
+
const res = new Uint8Array(iterations * 32);
|
|
78142
|
+
for (let iter = 0; iter < iterations; iter++) {
|
|
78087
78143
|
const buf = new Uint8Array(4 + secret.length + value.length);
|
|
78088
|
-
buf.set(uint32be(iter));
|
|
78144
|
+
buf.set(uint32be(iter + 1));
|
|
78089
78145
|
buf.set(secret, 4);
|
|
78090
78146
|
buf.set(value, 4 + secret.length);
|
|
78091
|
-
|
|
78092
|
-
res = await (0,_runtime_digest_js__WEBPACK_IMPORTED_MODULE_0__["default"])('sha256', buf);
|
|
78093
|
-
}
|
|
78094
|
-
else {
|
|
78095
|
-
res = concat(res, await (0,_runtime_digest_js__WEBPACK_IMPORTED_MODULE_0__["default"])('sha256', buf));
|
|
78096
|
-
}
|
|
78147
|
+
res.set(await (0,_runtime_digest_js__WEBPACK_IMPORTED_MODULE_0__["default"])('sha256', buf), iter * 32);
|
|
78097
78148
|
}
|
|
78098
|
-
|
|
78099
|
-
return res;
|
|
78149
|
+
return res.slice(0, bits >> 3);
|
|
78100
78150
|
}
|
|
78101
78151
|
|
|
78102
78152
|
|
|
@@ -79311,9 +79361,12 @@ const encode = (input) => {
|
|
|
79311
79361
|
return encodeBase64(input).replace(/=/g, '').replace(/\+/g, '-').replace(/\//g, '_');
|
|
79312
79362
|
};
|
|
79313
79363
|
const decodeBase64 = (encoded) => {
|
|
79314
|
-
|
|
79315
|
-
|
|
79316
|
-
|
|
79364
|
+
const binary = atob(encoded);
|
|
79365
|
+
const bytes = new Uint8Array(binary.length);
|
|
79366
|
+
for (let i = 0; i < binary.length; i++) {
|
|
79367
|
+
bytes[i] = binary.charCodeAt(i);
|
|
79368
|
+
}
|
|
79369
|
+
return bytes;
|
|
79317
79370
|
};
|
|
79318
79371
|
const decode = (input) => {
|
|
79319
79372
|
let encoded = input;
|