solid-ui 2.4.22-9fa9e801 → 2.4.22-a07bb683

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/main.js CHANGED
@@ -7790,6 +7790,15 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
7790
7790
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
7791
7791
 
7792
7792
  var store = _solidLogic.solidLogicSingleton.store;
7793
+ var _solidLogicSingleton$ = _solidLogic.solidLogicSingleton.profile,
7794
+ loadPreferences = _solidLogicSingleton$.loadPreferences,
7795
+ loadProfile = _solidLogicSingleton$.loadProfile;
7796
+ var _solidLogicSingleton$2 = _solidLogic.solidLogicSingleton.typeIndex,
7797
+ getScopedAppInstances = _solidLogicSingleton$2.getScopedAppInstances,
7798
+ getRegistrations = _solidLogicSingleton$2.getRegistrations,
7799
+ loadAllTypeIndexes = _solidLogicSingleton$2.loadAllTypeIndexes,
7800
+ getScopedAppsFromIndex = _solidLogicSingleton$2.getScopedAppsFromIndex,
7801
+ deleteTypeIndexRegistration = _solidLogicSingleton$2.deleteTypeIndexRegistration;
7793
7802
  /**
7794
7803
  * Resolves with the logged in user's WebID
7795
7804
  *
@@ -7886,7 +7895,7 @@ function _ensureLoadedPreferences() {
7886
7895
  case 7:
7887
7896
  context = _context4.sent;
7888
7897
  _context4.next = 10;
7889
- return (0, _solidLogic.loadPreferences)(context.me);
7898
+ return loadPreferences(context.me);
7890
7899
 
7891
7900
  case 10:
7892
7901
  preferencesFile = _context4.sent;
@@ -8022,7 +8031,7 @@ function _ensureLoadedProfile() {
8022
8031
 
8023
8032
  case 8:
8024
8033
  _context5.next = 10;
8025
- return (0, _solidLogic.loadProfile)(logInContext.me);
8034
+ return loadProfile(logInContext.me);
8026
8035
 
8027
8036
  case 10:
8028
8037
  context.publicProfile = _context5.sent;
@@ -8069,7 +8078,7 @@ function _findAppInstances() {
8069
8078
  }
8070
8079
 
8071
8080
  _context6.next = 3;
8072
- return (0, _solidLogic.getScopedAppInstances)(theClass, context.me);
8081
+ return getScopedAppInstances(theClass, context.me);
8073
8082
 
8074
8083
  case 3:
8075
8084
  _context6.t0 = _context6.sent;
@@ -8138,7 +8147,7 @@ function _registrationControl() {
8138
8147
  };
8139
8148
 
8140
8149
  registrationStatements = function _registrationStatemen(index) {
8141
- var registrations = (0, _solidLogic.getRegistrations)(instance, theClass);
8150
+ var registrations = getRegistrations(instance, theClass);
8142
8151
  var reg = registrations.length ? registrations[0] : widgets.newThing(index);
8143
8152
  return [(0, _rdflib.st)(reg, ns.solid('instance'), instance, index), (0, _rdflib.st)(reg, ns.solid('forClass'), theClass, index)];
8144
8153
  };
@@ -8171,7 +8180,7 @@ function _registrationControl() {
8171
8180
  case 12:
8172
8181
  _context7.prev = 12;
8173
8182
  _context7.next = 15;
8174
- return (0, _solidLogic.loadAllTypeIndexes)(me);
8183
+ return loadAllTypeIndexes(me);
8175
8184
 
8176
8185
  case 15:
8177
8186
  scopes = _context7.sent;
@@ -8276,7 +8285,7 @@ function _registrationList() {
8276
8285
 
8277
8286
  case 8:
8278
8287
  _context9.next = 10;
8279
- return (0, _solidLogic.loadAllTypeIndexes)(store, context.me);
8288
+ return loadAllTypeIndexes(context.me);
8280
8289
 
8281
8290
  case 10:
8282
8291
  scopes = _context9.sent;
@@ -8303,7 +8312,7 @@ function _registrationList() {
8303
8312
  headingRow = renderScopeHeadingRow(context, store, scope);
8304
8313
  tbody.appendChild(headingRow);
8305
8314
  _context9.next = 24;
8306
- return (0, _solidLogic.getScopedAppsFromIndex)(scope, options.type || null);
8315
+ return getScopedAppsFromIndex(scope, options.type || null);
8307
8316
 
8308
8317
  case 24:
8309
8318
  items = _context9.sent;
@@ -8323,7 +8332,7 @@ function _registrationList() {
8323
8332
  switch (_context8.prev = _context8.next) {
8324
8333
  case 0:
8325
8334
  _context8.next = 2;
8326
- return (0, _solidLogic.deleteTypeIndexRegistration)(item);
8335
+ return deleteTypeIndexRegistration(item);
8327
8336
 
8328
8337
  case 2:
8329
8338
  tbody.removeChild(row);
@@ -13994,9 +14003,6 @@ function tabWidget(options) {
13994
14003
  ele.subject = item;
13995
14004
  var div = ele.appendChild(dom.createElement('button'));
13996
14005
  div.setAttribute('style', 'background: none; border: none; font: inherit; cursor: pointer');
13997
- var ellipsis = dom.createElement('button');
13998
- ellipsis.textContent = '...';
13999
- 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;');
14000
14006
 
14001
14007
  div.onclick = function () {
14002
14008
  resetTabStyle();
@@ -14013,27 +14019,33 @@ function tabWidget(options) {
14013
14019
  }
14014
14020
  };
14015
14021
 
14016
- ellipsis.onclick = function () {
14017
- resetTabStyle();
14018
- resetBodyStyle();
14019
- ele.setAttribute('style', selectedStyle);
14020
- if (!ele.bodyTR) return;
14021
- ele.bodyTR.setAttribute('style', shownStyle);
14022
- var bodyMain = getOrCreateContainerElement(ele);
14022
+ if (options.renderTabSettings && ele.subject) {
14023
+ var ellipsis = dom.createElement('button');
14024
+ ellipsis.textContent = '...';
14025
+ 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;');
14023
14026
 
14024
- if (options.renderTabSettings && ele.subject && bodyMain.asSettings !== true) {
14025
- bodyMain.innerHTML = 'loading settings ...' + item;
14026
- options.renderTabSettings(bodyMain, ele.subject);
14027
- bodyMain.asSettings = true;
14028
- }
14029
- };
14027
+ ellipsis.onclick = function () {
14028
+ resetTabStyle();
14029
+ resetBodyStyle();
14030
+ ele.setAttribute('style', selectedStyle);
14031
+ if (!ele.bodyTR) return;
14032
+ ele.bodyTR.setAttribute('style', shownStyle);
14033
+ var bodyMain = getOrCreateContainerElement(ele);
14034
+
14035
+ if (options.renderTabSettings && ele.subject && bodyMain.asSettings !== true) {
14036
+ bodyMain.innerHTML = 'loading settings ...' + item;
14037
+ options.renderTabSettings(bodyMain, ele.subject);
14038
+ bodyMain.asSettings = true;
14039
+ }
14040
+ };
14041
+
14042
+ ele.appendChild(ellipsis);
14043
+ }
14030
14044
 
14031
14045
  if (options.renderTab) {
14032
14046
  options.renderTab(div, item);
14033
- ele.appendChild(ellipsis);
14034
14047
  } else {
14035
14048
  div.innerHTML = (0, _utils.label)(item);
14036
- ele.appendChild(ellipsis);
14037
14049
  }
14038
14050
 
14039
14051
  return ele;
@@ -15219,12 +15231,12 @@ Object.defineProperty(exports, "__esModule", ({
15219
15231
  }));
15220
15232
  exports.versionInfo = void 0;
15221
15233
  var versionInfo = {
15222
- buildTime: '2022-07-04T11:51:02Z',
15223
- commit: '9fa9e801c7eb2c3eeff41227eb1c1eed7297eace',
15234
+ buildTime: '2022-08-22T15:14:37Z',
15235
+ commit: 'a07bb6833c1ef4b4fd73774ff7524083cabad75d',
15224
15236
  npmInfo: {
15225
15237
  'solid-ui': '2.4.22',
15226
15238
  npm: '8.13.2',
15227
- node: '14.19.3',
15239
+ node: '14.20.0',
15228
15240
  v8: '8.4.371.23-node.87',
15229
15241
  uv: '1.42.0',
15230
15242
  zlib: '1.2.11',
@@ -15233,8 +15245,8 @@ var versionInfo = {
15233
15245
  modules: '83',
15234
15246
  nghttp2: '1.42.0',
15235
15247
  napi: '8',
15236
- llhttp: '2.1.4',
15237
- openssl: '1.1.1o',
15248
+ llhttp: '2.1.5',
15249
+ openssl: '1.1.1q',
15238
15250
  cldr: '40.0',
15239
15251
  icu: '70.1',
15240
15252
  tz: '2021a3',
@@ -18229,7 +18241,7 @@ _fieldFunction.field[ns.ui('Choice').uri] = function (dom, container, already, s
18229
18241
  var possibleProperties;
18230
18242
  possible = kb.each(undefined, ns.rdf('type'), uiFrom, formDoc);
18231
18243
 
18232
- for (var x in kb.findMembersNT(uiFrom)) {
18244
+ for (var x in findMembersNT(kb, uiFrom, dataDoc)) {
18233
18245
  possible.push(kb.fromNT(x));
18234
18246
  } // Use rdfs
18235
18247
 
@@ -18279,6 +18291,7 @@ _fieldFunction.field[ns.ui('Choice').uri] = function (dom, container, already, s
18279
18291
 
18280
18292
  var multiSelect = kb.any(form, ui('multiselect')); // Optional
18281
18293
 
18294
+ if (multiSelect) opts.multiSelect = true;
18282
18295
  var selector;
18283
18296
 
18284
18297
  rhs.refresh = function () {
@@ -18315,7 +18328,31 @@ _fieldFunction.field[ns.ui('Choice').uri] = function (dom, container, already, s
18315
18328
  }
18316
18329
 
18317
18330
  if (event.action === 'ADD_OPTION') {
18318
- selectedOptions.push(event.value);
18331
+ var stringValue = event.value + '';
18332
+
18333
+ if (stringValue.includes('Create new')) {
18334
+ var newObject = newThing(dataDoc);
18335
+ var is = [];
18336
+ is.push($rdf.st(subject, property, kb.sym(newObject), dataDoc));
18337
+ if (uiFrom) is.push($rdf.st(newObject, ns.rdf('type'), kb.sym(uiFrom), dataDoc));
18338
+
18339
+ if (subForm) {
18340
+ addSubFormChoice(dom, rhs, {}, $rdf.sym(newObject), subForm, dataDoc, function (ok, body) {
18341
+ if (ok) {
18342
+ kb.updater.update([], is, function (uri, success, errorBody) {
18343
+ if (!success) rhs.appendChild((0, _error.errorMessageBlock)(dom, 'Error updating select: ' + errorBody));
18344
+ });
18345
+ selectedOptions.push(newObject);
18346
+ if (callbackFunction) callbackFunction(ok, {
18347
+ widget: 'select',
18348
+ event: 'new'
18349
+ });
18350
+ } else {
18351
+ rhs.appendChild((0, _error.errorMessageBlock)(dom, 'Error updating data in field of select: ' + body));
18352
+ }
18353
+ });
18354
+ }
18355
+ } else selectedOptions.push(event.value);
18319
18356
  }
18320
18357
 
18321
18358
  selector.update(selectedOptions);
@@ -19200,7 +19237,7 @@ function makeSelectForChoice(dom, container, kb, subject, predicate, inputPossib
19200
19237
  if (opt.selected && opt.AJAR_mint) {
19201
19238
  // not sure if this 'if' is used because I cannot find mintClass
19202
19239
  if (options.mintClass) {
19203
- var thisForm = promptForNew(dom, kb, subject, predicate, options.mintClass, null, dataDoc, function (ok, body) {
19240
+ var thisForm = promptForNew(dom, kb, subject, predicate, uiFrom, options.subForm, dataDoc, function (ok, body) {
19204
19241
  if (!ok) {
19205
19242
  callbackFunction(ok, body, {
19206
19243
  change: 'new'
@@ -19235,7 +19272,7 @@ function makeSelectForChoice(dom, container, kb, subject, predicate, inputPossib
19235
19272
 
19236
19273
  log.info('selectForOptions: data doc = ' + dataDoc);
19237
19274
 
19238
- if (select.currentURI && options.subForm) {
19275
+ if (select.currentURI && options.subForm && !options.multiSelect) {
19239
19276
  addSubFormChoice(dom, container, {}, $rdf.sym(select.currentURI), options.subForm, dataDoc, function (ok, body) {
19240
19277
  if (ok) {
19241
19278
  kb.updater.update([], is, function (uri, success, errorBody) {
@@ -19301,6 +19338,70 @@ function containsObject(obj, list) {
19301
19338
  }
19302
19339
 
19303
19340
  return false;
19341
+ } // This functions replaces the findMembersNT (thisClass) from rdflib until we fix: https://github.com/linkeddata/rdflib.js/issues/565
19342
+
19343
+ /**
19344
+ * For anything which has thisClass (or any subclass) as its type,
19345
+ * or is the object of something which has thisClass (or any subclass) as its range,
19346
+ * or subject of something which has thisClass (or any subclass) as its domain
19347
+ * We don't bother doing subproperty (yet?) as it doesn't seem to be used
19348
+ * much.
19349
+ * Get all the Classes of which we can RDFS-infer the subject is a member
19350
+ * @return a hash of URIs
19351
+ */
19352
+
19353
+
19354
+ function findMembersNT(store, thisClass, quad) {
19355
+ var len2;
19356
+ var len4;
19357
+ var m;
19358
+ var pred;
19359
+ var ref1;
19360
+ var ref2;
19361
+ var ref3;
19362
+ var ref4;
19363
+ var ref5;
19364
+ var st;
19365
+ var u;
19366
+ var seeds = {};
19367
+ seeds[thisClass.toNT()] = true;
19368
+ var members = {};
19369
+ var ref = store.transitiveClosure(seeds, store.rdfFactory.namedNode('http://www.w3.org/2000/01/rdf-schema#subClassOf'), true);
19370
+
19371
+ for (var t in ref) {
19372
+ ref1 = store.statementsMatching(null, store.rdfFactory.namedNode('http://www.w3.org/1999/02/22-rdf-syntax-ns#type'), store.fromNT(t), quad);
19373
+
19374
+ for (var i = 0, len = ref1.length; i < len; i++) {
19375
+ st = ref1[i];
19376
+ members[st.subject.toNT()] = st;
19377
+ }
19378
+
19379
+ ref2 = store.each(null, store.rdfFactory.namedNode('http://www.w3.org/2000/01/rdf-schema#domain'), store.fromNT(t), quad);
19380
+
19381
+ for (var l = 0, len1 = ref2.length; l < len1; l++) {
19382
+ pred = ref2[l];
19383
+ ref3 = store.statementsMatching(null, pred, null, quad);
19384
+
19385
+ for (m = 0, len2 = ref3.length; m < len2; m++) {
19386
+ st = ref3[m];
19387
+ members[st.subject.toNT()] = st;
19388
+ }
19389
+ }
19390
+
19391
+ ref4 = store.each(null, store.rdfFactory.namedNode('http://www.w3.org/2000/01/rdf-schema#range'), store.fromNT(t), quad);
19392
+
19393
+ for (var q = 0, len3 = ref4.length; q < len3; q++) {
19394
+ pred = ref4[q];
19395
+ ref5 = store.statementsMatching(null, pred, null, quad);
19396
+
19397
+ for (u = 0, len4 = ref5.length; u < len4; u++) {
19398
+ st = ref5[u];
19399
+ members[st.object.toNT()] = st;
19400
+ }
19401
+ }
19402
+ }
19403
+
19404
+ return members;
19304
19405
  }
19305
19406
  //# sourceMappingURL=forms.js.map
19306
19407
 
@@ -65584,8 +65685,8 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
65584
65685
  Object.defineProperty(exports, "__esModule", ({ value: true }));
65585
65686
  exports.createChatLogic = void 0;
65586
65687
  var rdflib_1 = __webpack_require__(/*! rdflib */ "./node_modules/rdflib/esm/index.js");
65587
- var utils_1 = __webpack_require__(/*! ../util/utils */ "./node_modules/solid-logic/lib/util/utils.js");
65588
65688
  var ns_1 = __webpack_require__(/*! ../util/ns */ "./node_modules/solid-logic/lib/util/ns.js");
65689
+ var utils_1 = __webpack_require__(/*! ../util/utils */ "./node_modules/solid-logic/lib/util/utils.js");
65589
65690
  var CHAT_LOCATION_IN_CONTAINER = "index.ttl#this";
65590
65691
  function createChatLogic(store, profileLogic) {
65591
65692
  var ns = ns_1.ns;
@@ -65766,24 +65867,25 @@ function createChatLogic(store, profileLogic) {
65766
65867
  });
65767
65868
  }
65768
65869
  function sendInvite(invitee, chatThing) {
65870
+ var _a;
65769
65871
  return __awaiter(this, void 0, void 0, function () {
65770
65872
  var inviteeInbox, inviteBody, inviteResponse, locationStr;
65771
- return __generator(this, function (_a) {
65772
- switch (_a.label) {
65873
+ return __generator(this, function (_b) {
65874
+ switch (_b.label) {
65773
65875
  case 0: return [4 /*yield*/, store.fetcher.load(invitee.doc())];
65774
65876
  case 1:
65775
- _a.sent();
65877
+ _b.sent();
65776
65878
  inviteeInbox = store.any(invitee, ns.ldp("inbox"), undefined, invitee.doc());
65777
65879
  if (!inviteeInbox) {
65778
65880
  throw new Error("Invitee inbox not found! ".concat(invitee.value));
65779
65881
  }
65780
65882
  inviteBody = "\n <> a <http://www.w3.org/ns/pim/meeting#LongChatInvite> ;\n ".concat(ns.rdf("seeAlso"), " <").concat(chatThing.value, "> .\n ");
65781
- return [4 /*yield*/, store.fetcher.webOperation("POST", inviteeInbox.value, {
65883
+ return [4 /*yield*/, ((_a = store.fetcher) === null || _a === void 0 ? void 0 : _a.webOperation("POST", inviteeInbox.value, {
65782
65884
  data: inviteBody,
65783
65885
  contentType: "text/turtle",
65784
- })];
65886
+ }))];
65785
65887
  case 2:
65786
- inviteResponse = _a.sent();
65888
+ inviteResponse = _b.sent();
65787
65889
  locationStr = inviteResponse === null || inviteResponse === void 0 ? void 0 : inviteResponse.headers.get("location");
65788
65890
  if (!locationStr) {
65789
65891
  throw new Error("Invite sending returned a ".concat(inviteResponse === null || inviteResponse === void 0 ? void 0 : inviteResponse.status));
@@ -65967,86 +66069,17 @@ exports.createInboxLogic = createInboxLogic;
65967
66069
  "use strict";
65968
66070
 
65969
66071
  Object.defineProperty(exports, "__esModule", ({ value: true }));
65970
- exports.createEmptyRdfDoc = exports.setSinglePeerAccess = exports.recursiveDelete = exports.markAsRead = exports.getNewMessages = exports.createInboxFor = exports.mintNew = exports.sendInvite = exports.getChat = exports.createChatThing = exports.findChat = exports.addToPrivateTypeIndex = exports.setAcl = exports.getScopedAppsFromIndex = exports.deleteTypeIndexRegistration = exports.suggestPrivateTypeIndex = exports.suggestPublicTypeIndex = exports.getAppInstances = exports.getScopedAppInstances = exports.loadAllTypeIndexes = exports.loadCommunityTypeIndexes = exports.loadTypeIndexesFor = exports.getRegistrations = exports.registerInTypeIndex = exports.genACLText = exports.setACLUserPublic = exports.findAclDocUrl = exports.chatLogic = exports.typeIndexLogic = exports.inboxLogic = exports.profileLogic = exports.containerLogic = exports.utilityLogic = exports.aclLogic = exports.authSession = exports.authn = exports.store = exports.WebOperationError = exports.NotEditableError = exports.FetchError = exports.NotFoundError = exports.SameOriginForbiddenError = exports.CrossOriginForbiddenError = exports.UnauthorizedError = exports.solidLogicSingleton = exports.SolidLogic = exports.getSuggestedIssuers = exports.appContext = exports.offlineTestID = exports.ACL_LINK = void 0;
65971
- exports.getContainerMembers = exports.getContainerElements = exports.createContainer = exports.isContainer = exports.silencedLoadPreferences = exports.loadProfile = exports.loadPreferences = exports.findStorage = exports.getMainInbox = exports.getPodRoot = exports.loadMe = exports.loadOrCreateIfNotExists = exports.followOrCreateLink = void 0;
66072
+ exports.authSession = exports.authn = exports.store = exports.solidLogicSingleton = exports.WebOperationError = exports.NotEditableError = exports.FetchError = exports.NotFoundError = exports.SameOriginForbiddenError = exports.CrossOriginForbiddenError = exports.UnauthorizedError = exports.getSuggestedIssuers = exports.appContext = exports.offlineTestID = exports.ACL_LINK = void 0;
65972
66073
  // Make these variables directly accessible as it is what you need most of the time
65973
66074
  // This also makes these variable globaly accesible in mashlib
65974
66075
  var solidLogicSingleton_1 = __webpack_require__(/*! ./logic/solidLogicSingleton */ "./node_modules/solid-logic/lib/logic/solidLogicSingleton.js");
66076
+ Object.defineProperty(exports, "solidLogicSingleton", ({ enumerable: true, get: function () { return solidLogicSingleton_1.solidLogicSingleton; } }));
65975
66077
  var authn = solidLogicSingleton_1.solidLogicSingleton.authn;
65976
66078
  exports.authn = authn;
65977
66079
  var authSession = solidLogicSingleton_1.solidLogicSingleton.authn.authSession;
65978
66080
  exports.authSession = authSession;
65979
66081
  var store = solidLogicSingleton_1.solidLogicSingleton.store;
65980
66082
  exports.store = store;
65981
- var aclLogic = solidLogicSingleton_1.solidLogicSingleton.aclLogic;
65982
- exports.aclLogic = aclLogic;
65983
- var utilityLogic = solidLogicSingleton_1.solidLogicSingleton.utilityLogic;
65984
- exports.utilityLogic = utilityLogic;
65985
- var containerLogic = solidLogicSingleton_1.solidLogicSingleton.containerLogic;
65986
- exports.containerLogic = containerLogic;
65987
- var profileLogic = solidLogicSingleton_1.solidLogicSingleton.profileLogic;
65988
- exports.profileLogic = profileLogic;
65989
- var inboxLogic = solidLogicSingleton_1.solidLogicSingleton.inboxLogic;
65990
- exports.inboxLogic = inboxLogic;
65991
- var typeIndexLogic = solidLogicSingleton_1.solidLogicSingleton.typeIndexLogic;
65992
- exports.typeIndexLogic = typeIndexLogic;
65993
- var chatLogic = solidLogicSingleton_1.solidLogicSingleton.chatLogic;
65994
- exports.chatLogic = chatLogic;
65995
- var findAclDocUrl = aclLogic.findAclDocUrl, setACLUserPublic = aclLogic.setACLUserPublic, genACLText = aclLogic.genACLText;
65996
- exports.findAclDocUrl = findAclDocUrl;
65997
- exports.setACLUserPublic = setACLUserPublic;
65998
- exports.genACLText = genACLText;
65999
- var registerInTypeIndex = typeIndexLogic.registerInTypeIndex, getRegistrations = typeIndexLogic.getRegistrations,
66000
- //NEW function for discovery
66001
- loadTypeIndexesFor = typeIndexLogic.loadTypeIndexesFor, loadCommunityTypeIndexes = typeIndexLogic.loadCommunityTypeIndexes, loadAllTypeIndexes = typeIndexLogic.loadAllTypeIndexes, getScopedAppInstances = typeIndexLogic.getScopedAppInstances, getAppInstances = typeIndexLogic.getAppInstances, suggestPublicTypeIndex = typeIndexLogic.suggestPublicTypeIndex, suggestPrivateTypeIndex = typeIndexLogic.suggestPrivateTypeIndex, deleteTypeIndexRegistration = typeIndexLogic.deleteTypeIndexRegistration, getScopedAppsFromIndex = typeIndexLogic.getScopedAppsFromIndex;
66002
- exports.registerInTypeIndex = registerInTypeIndex;
66003
- exports.getRegistrations = getRegistrations;
66004
- exports.loadTypeIndexesFor = loadTypeIndexesFor;
66005
- exports.loadCommunityTypeIndexes = loadCommunityTypeIndexes;
66006
- exports.loadAllTypeIndexes = loadAllTypeIndexes;
66007
- exports.getScopedAppInstances = getScopedAppInstances;
66008
- exports.getAppInstances = getAppInstances;
66009
- exports.suggestPublicTypeIndex = suggestPublicTypeIndex;
66010
- exports.suggestPrivateTypeIndex = suggestPrivateTypeIndex;
66011
- exports.deleteTypeIndexRegistration = deleteTypeIndexRegistration;
66012
- exports.getScopedAppsFromIndex = getScopedAppsFromIndex;
66013
- var setAcl = chatLogic.setAcl, addToPrivateTypeIndex = chatLogic.addToPrivateTypeIndex, findChat = chatLogic.findChat, createChatThing = chatLogic.createChatThing, getChat = chatLogic.getChat, sendInvite = chatLogic.sendInvite, mintNew = chatLogic.mintNew;
66014
- exports.setAcl = setAcl;
66015
- exports.addToPrivateTypeIndex = addToPrivateTypeIndex;
66016
- exports.findChat = findChat;
66017
- exports.createChatThing = createChatThing;
66018
- exports.getChat = getChat;
66019
- exports.sendInvite = sendInvite;
66020
- exports.mintNew = mintNew;
66021
- var createInboxFor = inboxLogic.createInboxFor, getNewMessages = inboxLogic.getNewMessages, markAsRead = inboxLogic.markAsRead;
66022
- exports.createInboxFor = createInboxFor;
66023
- exports.getNewMessages = getNewMessages;
66024
- exports.markAsRead = markAsRead;
66025
- var recursiveDelete = utilityLogic.recursiveDelete, setSinglePeerAccess = utilityLogic.setSinglePeerAccess, createEmptyRdfDoc = utilityLogic.createEmptyRdfDoc,
66026
- //NEW function for discovery
66027
- followOrCreateLink = utilityLogic.followOrCreateLink, loadOrCreateIfNotExists = utilityLogic.loadOrCreateIfNotExists;
66028
- exports.recursiveDelete = recursiveDelete;
66029
- exports.setSinglePeerAccess = setSinglePeerAccess;
66030
- exports.createEmptyRdfDoc = createEmptyRdfDoc;
66031
- exports.followOrCreateLink = followOrCreateLink;
66032
- exports.loadOrCreateIfNotExists = loadOrCreateIfNotExists;
66033
- var loadMe = profileLogic.loadMe, getPodRoot = profileLogic.getPodRoot, getMainInbox = profileLogic.getMainInbox, findStorage = profileLogic.findStorage,
66034
- //NEW content from discovery
66035
- loadPreferences = profileLogic.loadPreferences, loadProfile = profileLogic.loadProfile,
66036
- //NEW function for discovery
66037
- silencedLoadPreferences = profileLogic.silencedLoadPreferences;
66038
- exports.loadMe = loadMe;
66039
- exports.getPodRoot = getPodRoot;
66040
- exports.getMainInbox = getMainInbox;
66041
- exports.findStorage = findStorage;
66042
- exports.loadPreferences = loadPreferences;
66043
- exports.loadProfile = loadProfile;
66044
- exports.silencedLoadPreferences = silencedLoadPreferences;
66045
- var isContainer = containerLogic.isContainer, createContainer = containerLogic.createContainer, getContainerElements = containerLogic.getContainerElements, getContainerMembers = containerLogic.getContainerMembers;
66046
- exports.isContainer = isContainer;
66047
- exports.createContainer = createContainer;
66048
- exports.getContainerElements = getContainerElements;
66049
- exports.getContainerMembers = getContainerMembers;
66050
66083
  var aclLogic_1 = __webpack_require__(/*! ./acl/aclLogic */ "./node_modules/solid-logic/lib/acl/aclLogic.js");
66051
66084
  Object.defineProperty(exports, "ACL_LINK", ({ enumerable: true, get: function () { return aclLogic_1.ACL_LINK; } }));
66052
66085
  var authUtil_1 = __webpack_require__(/*! ./authn/authUtil */ "./node_modules/solid-logic/lib/authn/authUtil.js");
@@ -66054,11 +66087,6 @@ Object.defineProperty(exports, "offlineTestID", ({ enumerable: true, get: functi
66054
66087
  Object.defineProperty(exports, "appContext", ({ enumerable: true, get: function () { return authUtil_1.appContext; } }));
66055
66088
  var issuerLogic_1 = __webpack_require__(/*! ./issuer/issuerLogic */ "./node_modules/solid-logic/lib/issuer/issuerLogic.js");
66056
66089
  Object.defineProperty(exports, "getSuggestedIssuers", ({ enumerable: true, get: function () { return issuerLogic_1.getSuggestedIssuers; } }));
66057
- var SolidLogic_1 = __webpack_require__(/*! ./logic/SolidLogic */ "./node_modules/solid-logic/lib/logic/SolidLogic.js");
66058
- Object.defineProperty(exports, "SolidLogic", ({ enumerable: true, get: function () { return SolidLogic_1.SolidLogic; } }));
66059
- // solidLogicSingleton is exported entirely because it is used in solid-panes
66060
- var solidLogicSingleton_2 = __webpack_require__(/*! ./logic/solidLogicSingleton */ "./node_modules/solid-logic/lib/logic/solidLogicSingleton.js");
66061
- Object.defineProperty(exports, "solidLogicSingleton", ({ enumerable: true, get: function () { return solidLogicSingleton_2.solidLogicSingleton; } }));
66062
66090
  var CustomError_1 = __webpack_require__(/*! ./logic/CustomError */ "./node_modules/solid-logic/lib/logic/CustomError.js");
66063
66091
  Object.defineProperty(exports, "UnauthorizedError", ({ enumerable: true, get: function () { return CustomError_1.UnauthorizedError; } }));
66064
66092
  Object.defineProperty(exports, "CrossOriginForbiddenError", ({ enumerable: true, get: function () { return CustomError_1.CrossOriginForbiddenError; } }));
@@ -66233,9 +66261,9 @@ exports.FetchError = FetchError;
66233
66261
 
66234
66262
  /***/ }),
66235
66263
 
66236
- /***/ "./node_modules/solid-logic/lib/logic/SolidLogic.js":
66264
+ /***/ "./node_modules/solid-logic/lib/logic/solidLogic.js":
66237
66265
  /*!**********************************************************!*\
66238
- !*** ./node_modules/solid-logic/lib/logic/SolidLogic.js ***!
66266
+ !*** ./node_modules/solid-logic/lib/logic/solidLogic.js ***!
66239
66267
  \**********************************************************/
66240
66268
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
66241
66269
 
@@ -66265,7 +66293,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
66265
66293
  return result;
66266
66294
  };
66267
66295
  Object.defineProperty(exports, "__esModule", ({ value: true }));
66268
- exports.SolidLogic = void 0;
66296
+ exports.createSolidLogic = void 0;
66269
66297
  var rdf = __importStar(__webpack_require__(/*! rdflib */ "./node_modules/rdflib/esm/index.js"));
66270
66298
  var aclLogic_1 = __webpack_require__(/*! ../acl/aclLogic */ "./node_modules/solid-logic/lib/acl/aclLogic.js");
66271
66299
  var SolidAuthnLogic_1 = __webpack_require__(/*! ../authn/SolidAuthnLogic */ "./node_modules/solid-logic/lib/authn/SolidAuthnLogic.js");
@@ -66282,35 +66310,29 @@ var debug = __importStar(__webpack_require__(/*! ../util/debug */ "./node_module
66282
66310
  ** into a `ConnectedStore` or a `LiveStore`. A Fetcher object is
66283
66311
  ** available at store.fetcher, and `fetch` function at `store.fetcher._fetch`,
66284
66312
  */
66285
- var SolidLogic = /** @class */ (function () {
66286
- function SolidLogic(specialFetch, session) {
66287
- // would xpect to be able to do it this way: but get TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation status: 999
66288
- // this.store = new rdf.LiveStore({})
66289
- // this.store.fetcher._fetch = fetch
66290
- debug.log("SolidLogic: Unique instance created. There should only be one of these.");
66291
- this.store = rdf.graph(); // Make a Quad store
66292
- rdf.fetcher(this.store, { fetch: specialFetch.fetch }); // Attach a web I/O module, store.fetcher
66293
- this.store.updater = new rdf.UpdateManager(this.store); // Add real-time live updates store.updater
66294
- this.store.features = []; // disable automatic node merging on store load
66295
- this.authn = new SolidAuthnLogic_1.SolidAuthnLogic(session);
66296
- debug.log('SolidAuthnLogic initialized');
66297
- this.aclLogic = (0, aclLogic_1.createAclLogic)(this.store);
66298
- this.containerLogic = (0, containerLogic_1.createContainerLogic)(this.store);
66299
- this.utilityLogic = (0, utilityLogic_1.createUtilityLogic)(this.store, this.aclLogic, this.containerLogic);
66300
- this.profileLogic = (0, profileLogic_1.createProfileLogic)(this.store, this.authn, this.utilityLogic);
66301
- this.chatLogic = (0, chatLogic_1.createChatLogic)(this.store, this.profileLogic);
66302
- this.inboxLogic = (0, inboxLogic_1.createInboxLogic)(this.store, this.profileLogic, this.utilityLogic, this.containerLogic, this.aclLogic);
66303
- this.typeIndexLogic = (0, typeIndexLogic_1.createTypeIndexLogic)(this.store, this.authn, this.profileLogic, this.utilityLogic);
66304
- }
66305
- SolidLogic.prototype.load = function (doc) {
66306
- return this.store.fetcher.load(doc);
66307
- };
66313
+ function createSolidLogic(specialFetch, session) {
66314
+ debug.log("SolidLogic: Unique instance created. There should only be one of these.");
66315
+ var store = rdf.graph();
66316
+ rdf.fetcher(store, { fetch: specialFetch.fetch }); // Attach a web I/O module, store.fetcher
66317
+ store.updater = new rdf.UpdateManager(store); // Add real-time live updates store.updater
66318
+ store.features = []; // disable automatic node merging on store load
66319
+ var authn = new SolidAuthnLogic_1.SolidAuthnLogic(session);
66320
+ var acl = (0, aclLogic_1.createAclLogic)(store);
66321
+ var containerLogic = (0, containerLogic_1.createContainerLogic)(store);
66322
+ var utilityLogic = (0, utilityLogic_1.createUtilityLogic)(store, acl, containerLogic);
66323
+ var profile = (0, profileLogic_1.createProfileLogic)(store, authn, utilityLogic);
66324
+ var chat = (0, chatLogic_1.createChatLogic)(store, profile);
66325
+ var inbox = (0, inboxLogic_1.createInboxLogic)(store, profile, utilityLogic, containerLogic, acl);
66326
+ var typeIndex = (0, typeIndexLogic_1.createTypeIndexLogic)(store, authn, profile, utilityLogic);
66327
+ debug.log('SolidAuthnLogic initialized');
66328
+ function load(doc) {
66329
+ return store.fetcher.load(doc);
66330
+ }
66308
66331
  // @@@@ use the one in rdflib.js when it is available and delete this
66309
- SolidLogic.prototype.updatePromise = function (del, ins) {
66310
- var _this = this;
66332
+ function updatePromise(del, ins) {
66311
66333
  if (ins === void 0) { ins = []; }
66312
66334
  return new Promise(function (resolve, reject) {
66313
- _this.store.updater.update(del, ins, function (_uri, ok, errorBody) {
66335
+ store.updater.update(del, ins, function (_uri, ok, errorBody) {
66314
66336
  if (!ok) {
66315
66337
  reject(new Error(errorBody));
66316
66338
  }
@@ -66319,14 +66341,25 @@ var SolidLogic = /** @class */ (function () {
66319
66341
  }
66320
66342
  }); // callback
66321
66343
  }); // promise
66344
+ }
66345
+ function clearStore() {
66346
+ store.statements.slice().forEach(store.remove.bind(store));
66347
+ }
66348
+ return {
66349
+ store: store,
66350
+ authn: authn,
66351
+ acl: acl,
66352
+ inbox: inbox,
66353
+ chat: chat,
66354
+ profile: profile,
66355
+ typeIndex: typeIndex,
66356
+ load: load,
66357
+ updatePromise: updatePromise,
66358
+ clearStore: clearStore
66322
66359
  };
66323
- SolidLogic.prototype.clearStore = function () {
66324
- this.store.statements.slice().forEach(this.store.remove.bind(this.store));
66325
- };
66326
- return SolidLogic;
66327
- }());
66328
- exports.SolidLogic = SolidLogic;
66329
- //# sourceMappingURL=SolidLogic.js.map
66360
+ }
66361
+ exports.createSolidLogic = createSolidLogic;
66362
+ //# sourceMappingURL=solidLogic.js.map
66330
66363
 
66331
66364
  /***/ }),
66332
66365
 
@@ -66401,7 +66434,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
66401
66434
  exports.solidLogicSingleton = void 0;
66402
66435
  var debug = __importStar(__webpack_require__(/*! ../util/debug */ "./node_modules/solid-logic/lib/util/debug.js"));
66403
66436
  var authSession_1 = __webpack_require__(/*! ../authSession/authSession */ "./node_modules/solid-logic/lib/authSession/authSession.js");
66404
- var SolidLogic_1 = __webpack_require__(/*! ./SolidLogic */ "./node_modules/solid-logic/lib/logic/SolidLogic.js");
66437
+ var solidLogic_1 = __webpack_require__(/*! ./solidLogic */ "./node_modules/solid-logic/lib/logic/solidLogic.js");
66405
66438
  var _fetch = function (url, requestInit) { return __awaiter(void 0, void 0, void 0, function () {
66406
66439
  var omitCreds;
66407
66440
  return __generator(this, function (_a) {
@@ -66417,7 +66450,7 @@ var _fetch = function (url, requestInit) { return __awaiter(void 0, void 0, void
66417
66450
  });
66418
66451
  }); };
66419
66452
  //this const makes solidLogicSingleton global accessible in mashlib
66420
- var solidLogicSingleton = new SolidLogic_1.SolidLogic({ fetch: _fetch }, authSession_1.authSession);
66453
+ var solidLogicSingleton = (0, solidLogic_1.createSolidLogic)({ fetch: _fetch }, authSession_1.authSession);
66421
66454
  exports.solidLogicSingleton = solidLogicSingleton;
66422
66455
  debug.log('Unique quadstore initialized.');
66423
66456
  //# sourceMappingURL=solidLogicSingleton.js.map