@pod-os/elements 0.37.0 → 0.38.0-rc.4b2b787.0

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.
Files changed (52) hide show
  1. package/dist/cjs/elements.cjs.js +1 -1
  2. package/dist/cjs/{index-OR1wNkjG.js → index-CmQJab4P.js} +70 -19
  3. package/dist/cjs/{jsonld-V2RB47OZ-B82QNsYZ.js → jsonld-V2RB47OZ-BpANcb5R.js} +1 -1
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/pos-add-literal-value_3.cjs.entry.js +1 -1
  6. package/dist/cjs/pos-add-new-thing_32.cjs.entry.js +2 -2
  7. package/dist/cjs/pos-container-contents.cjs.entry.js +3 -3
  8. package/dist/cjs/pos-list.cjs.entry.js +1 -1
  9. package/dist/cjs/pos-markdown-document.cjs.entry.js +2 -2
  10. package/dist/cjs/pos-subjects.cjs.entry.js +1 -1
  11. package/dist/cjs/pos-switch.cjs.entry.js +41 -7
  12. package/dist/collection/components/pos-app/pos-app.js +1 -1
  13. package/dist/collection/components/pos-container-contents/pos-container-contents.js +2 -2
  14. package/dist/collection/components/pos-list/pos-list.js +1 -1
  15. package/dist/collection/components/pos-markdown-document/pos-markdown-document.js +2 -2
  16. package/dist/collection/components/pos-switch/pos-case/pos-case.js +38 -0
  17. package/dist/collection/components/pos-switch/pos-switch.js +44 -8
  18. package/dist/components/index2.js +2 -2
  19. package/dist/components/pos-app2.js +1 -1
  20. package/dist/components/pos-case.js +1 -1
  21. package/dist/components/pos-container-contents2.js +1 -1
  22. package/dist/components/pos-list.js +1 -1
  23. package/dist/components/pos-markdown-document2.js +1 -1
  24. package/dist/components/pos-switch.js +1 -1
  25. package/dist/elements/elements.esm.js +1 -1
  26. package/dist/elements/p-07f69d8c.entry.js +1 -0
  27. package/dist/elements/{p-dc4c38c8.entry.js → p-59e18120.entry.js} +1 -1
  28. package/dist/elements/{p-c7032012.entry.js → p-935e8df7.entry.js} +1 -1
  29. package/dist/elements/{p-ab4eba43.entry.js → p-9899cefb.entry.js} +2 -2
  30. package/dist/elements/{p-8e76e9dc.entry.js → p-9ac2654c.entry.js} +1 -1
  31. package/dist/elements/{p-a1dd6b42.entry.js → p-9dbe8f72.entry.js} +1 -1
  32. package/dist/elements/{p-BLUiM5OK.js → p-DUt7ij35.js} +1 -1
  33. package/dist/elements/p-Dzr3lPEW.js +67 -0
  34. package/dist/elements/p-cfa86eeb.entry.js +1 -0
  35. package/dist/esm/elements.js +1 -1
  36. package/dist/esm/{index-CXK32bJz.js → index-DymdXook.js} +70 -19
  37. package/dist/esm/{jsonld-V2RB47OZ-BbN7F0s8.js → jsonld-V2RB47OZ-CtbtC7fM.js} +1 -1
  38. package/dist/esm/loader.js +1 -1
  39. package/dist/esm/pos-add-literal-value_3.entry.js +1 -1
  40. package/dist/esm/pos-add-new-thing_32.entry.js +2 -2
  41. package/dist/esm/pos-container-contents.entry.js +3 -3
  42. package/dist/esm/pos-list.entry.js +1 -1
  43. package/dist/esm/pos-markdown-document.entry.js +2 -2
  44. package/dist/esm/pos-subjects.entry.js +1 -1
  45. package/dist/esm/pos-switch.entry.js +41 -7
  46. package/dist/types/components/pos-switch/pos-case/pos-case.d.ts +8 -0
  47. package/dist/types/components/pos-switch/pos-switch.d.ts +7 -3
  48. package/dist/types/components.d.ts +18 -0
  49. package/package.json +2 -2
  50. package/dist/elements/p-3a890f5f.entry.js +0 -1
  51. package/dist/elements/p-53610ccd.entry.js +0 -1
  52. package/dist/elements/p-DHl0QGLf.js +0 -67
@@ -45,7 +45,7 @@ var patchCloneNodeFix = (HTMLElementPrototype) => {
45
45
 
46
46
  patchBrowser().then(async (options) => {
47
47
  await index.globalScripts();
48
- return index.bootstrapLazy([["pos-app-generic.cjs",[[1,"pos-app-generic"]]],["pos-app-ldp-container.cjs",[[1,"pos-app-ldp-container"]]],["pos-app-rdf-document.cjs",[[1,"pos-app-rdf-document"]]],["pos-app-image-viewer.cjs",[[1,"pos-app-image-viewer",{"resource":[32]}]]],["pos-tool-attachments.cjs",[[1,"pos-tool-attachments",{"os":[32],"resource":[32]}]]],["pos-app-document-viewer.cjs",[[1,"pos-app-document-viewer",{"resource":[32]}]]],["pos-list.cjs",[[0,"pos-list",{"rel":[1],"ifTypeof":[1,"if-typeof"],"fetch":[4],"error":[32],"os":[32],"resource":[32],"items":[32],"templateString":[32]}]]],["pos-case.cjs",[[0,"pos-case",{"ifTypeof":[1,"if-typeof"],"not":[4],"else":[4],"error":[32]}]]],["pos-switch.cjs",[[0,"pos-switch",{"error":[32],"resource":[32],"caseElements":[32],"templateString":[32]}]]],["pos-value.cjs",[[1,"pos-value",{"predicate":[1],"resource":[32]}]]],["pos-attachments.cjs",[[1,"pos-attachments",{"resource":[32],"attachments":[32],"addToList":[64]}]]],["pos-container-contents.cjs",[[1,"pos-container-contents",{"container":[32],"contents":[32],"loading":[32],"createNewItem":[32]},[[0,"keydown","handleKeyDown"]]]]],["pos-document.cjs",[[1,"pos-document",{"src":[1],"alt":[1],"os":[32],"file":[32],"brokenFile":[32],"error":[32],"saveStatus":[32],"loading":[32],"isEditable":[32]},[[0,"pod-os:document-modified","handleDocumentModified"]],{"os":[{"fetchBlob":0}],"src":[{"fetchBlob":0}]}]]],["pos-add-new-thing_32.cjs",[[0,"pos-app-browser",{"restorePreviousSession":[4,"restore-previous-session"],"mode":[1],"uri":[32]}],[0,"pos-internal-router",{"uri":[1]}],[257,"pos-login",{"os":[32],"customLoggedInComponent":[32]},[[4,"pod-os:logout","logout"],[4,"pod-os:login","onLogin"]]],[1,"pos-navigation",{"uri":[1],"os":[32],"inputValue":[32],"searchIndex":[32],"suggestions":[32],"selectedIndex":[32],"resource":[32]},[[0,"pod-os:search:index-created","buildSearchIndex"],[0,"pod-os:search:index-updated","rebuildSearchIndex"],[0,"pod-os:navigate","openNavigationDialog"],[4,"click","closeDialog"],[0,"pod-os:link","clearSuggestions"],[0,"click","onClickSelf"],[0,"keydown","handleKeyDown"]],{"uri":[{"updateResource":0}],"os":[{"updateResource":0}]}],[1,"pos-user-menu",{"webId":[1,"web-id"]},[[0,"sl-select","onSelect"]]],[1,"pos-add-new-thing",{"referenceUri":[1,"reference-uri"]}],[1,"pos-type-router",{"initialTool":[32],"availableTools":[32],"oldTool":[32],"currentTool":[32],"transitioning":[32]},[[0,"pod-os:tool-selected","handleToolSelected"]]],[257,"pos-app",{"restorePreviousSession":[4,"restore-previous-session"],"os":[32],"unsubscribeSettings":[32],"loading":[32]},[[0,"pod-os:init","initializeOs"],[0,"pod-os:module","loadModule"]]],[257,"pos-error-toast",{"title":[32],"message":[32]},[[8,"unhandledrejection","unhandledRejection"],[0,"pod-os:error","catchError"]]],[260,"pos-router",{"mode":[1],"uri":[32]},[[0,"pod-os:link","linkClicked"],[8,"pod-os:session-restored","sessionRestored"]]],[1,"pos-app-dashboard"],[1,"pos-navigation-bar",{"current":[16],"searchIndexReady":[4,"search-index-ready"]},[[4,"keydown","activate"]]],[1,"pos-app-settings"],[17,"pos-new-thing-form",{"referenceUri":[1,"reference-uri"],"os":[32],"newUri":[32],"name":[32],"selectedTypeUri":[32],"canSubmit":[32]},null,{"name":[{"validate":0}],"selectedTypeUri":[{"validate":0}]}],[17,"pos-login-form",{"idpUrl":[32],"canSubmit":[32]},null,{"idpUrl":[{"validate":0}]}],[1,"pos-tool-select",{"selected":[16],"tools":[16]}],[1,"pos-type-index-entries",{"uri":[1],"entries":[32]}],[1,"pos-example-resources"],[1,"pos-make-findable",{"uri":[1],"os":[32],"thing":[32],"indexes":[32],"unsubscribeSessionChange":[32],"showOptions":[32],"isIndexed":[32]},[[0,"sl-select","onSelect"]],{"uri":[{"updateUri":0}]}],[260,"pos-dialog",{"showModal":[64],"close":[64]}],[1,"pos-getting-started"],[1,"pos-setting-offline-cache"],[1,"pos-share",{"uri":[1],"apps":[32],"os":[32]},[[4,"pod-os:resource-loaded","resourceLoaded"],[0,"sl-select","onSelect"]],{"uri":[{"updateApps":0}]}],[257,"pos-picture",{"blurredBackground":[4,"blurred-background"],"noUpload":[4,"no-upload"],"resource":[32],"os":[32],"isUploading":[32]}],[1,"pos-image",{"src":[1],"alt":[1],"blurredBackground":[4,"blurred-background"],"os":[32],"dataUri":[32],"brokenFile":[32],"networkError":[32],"imageError":[32],"loading":[32]},null,{"os":[{"fetchBlob":0}],"src":[{"fetchBlob":0}]}],[1,"pos-upload",{"accept":[16],"uploader":[16]}],[17,"pos-select-term",{"placeholder":[1],"value":[1],"os":[32],"terms":[32]},null,{"os":[{"setTerms":0}]}],[1,"pos-predicate",{"uri":[1],"label":[1],"expanded":[32]}],[257,"pos-rich-link",{"uri":[1],"rel":[1],"rev":[1],"link":[32],"followPredicate":[32],"error":[32],"showCustomContent":[32]}],[1,"pos-description",{"resource":[32]}],[1,"pos-label",{"resource":[32]}],[257,"pos-resource",{"uri":[1],"lazy":[4],"os":[32],"resource":[32],"consumers":[32],"error":[32],"loading":[32],"fetch":[64]},[[0,"pod-os:resource","provideResource"]],{"os":[{"loadResource":0}],"uri":[{"loadResource":0}]}]]],["pos-relations_2.cjs",[[1,"pos-relations",{"data":[32]}],[1,"pos-reverse-relations",{"data":[32]}]]],["pos-subjects.cjs",[[1,"pos-subjects",{"data":[32]}]]],["pos-markdown-document.cjs",[[1,"pos-markdown-document",{"file":[16],"saveStatus":[1,"save-status"],"editable":[4],"markdown":[32],"isModified":[32],"isEditing":[32],"startEditing":[64],"stopEditing":[64]}]]],["pos-container-item_3.cjs",[[257,"pos-container-item",{"resource":[32]}],[1,"pos-container-toolbar"],[1,"pos-create-new-container-item",{"type":[1],"container":[16],"os":[32],"name":[32]}]]],["pos-add-literal-value_3.cjs",[[1,"pos-literals",{"data":[32]}],[1,"pos-type-badges",{"data":[32],"typeLabels":[32],"isExpanded":[32]}],[1,"pos-add-literal-value",{"os":[32],"resource":[32],"currentValue":[32],"selectedTermUri":[32]},null,{"os":[{"setName":0}]}]]]], options);
48
+ return index.bootstrapLazy([["pos-app-generic.cjs",[[1,"pos-app-generic"]]],["pos-app-ldp-container.cjs",[[1,"pos-app-ldp-container"]]],["pos-app-rdf-document.cjs",[[1,"pos-app-rdf-document"]]],["pos-app-image-viewer.cjs",[[1,"pos-app-image-viewer",{"resource":[32]}]]],["pos-tool-attachments.cjs",[[1,"pos-tool-attachments",{"os":[32],"resource":[32]}]]],["pos-app-document-viewer.cjs",[[1,"pos-app-document-viewer",{"resource":[32]}]]],["pos-list.cjs",[[0,"pos-list",{"rel":[1],"ifTypeof":[1,"if-typeof"],"fetch":[4],"error":[32],"os":[32],"resource":[32],"items":[32],"templateString":[32]}]]],["pos-case.cjs",[[0,"pos-case",{"ifTypeof":[1,"if-typeof"],"ifProperty":[1,"if-property"],"ifRev":[1,"if-rev"],"not":[4],"else":[4],"error":[32]}]]],["pos-switch.cjs",[[0,"pos-switch",{"error":[32],"resource":[32],"caseElements":[32],"types":[32],"relations":[32],"reverseRelations":[32]}]]],["pos-value.cjs",[[1,"pos-value",{"predicate":[1],"resource":[32]}]]],["pos-attachments.cjs",[[1,"pos-attachments",{"resource":[32],"attachments":[32],"addToList":[64]}]]],["pos-container-contents.cjs",[[1,"pos-container-contents",{"container":[32],"contents":[32],"loading":[32],"createNewItem":[32]},[[0,"keydown","handleKeyDown"]]]]],["pos-document.cjs",[[1,"pos-document",{"src":[1],"alt":[1],"os":[32],"file":[32],"brokenFile":[32],"error":[32],"saveStatus":[32],"loading":[32],"isEditable":[32]},[[0,"pod-os:document-modified","handleDocumentModified"]],{"os":[{"fetchBlob":0}],"src":[{"fetchBlob":0}]}]]],["pos-add-new-thing_32.cjs",[[0,"pos-app-browser",{"restorePreviousSession":[4,"restore-previous-session"],"mode":[1],"uri":[32]}],[0,"pos-internal-router",{"uri":[1]}],[257,"pos-login",{"os":[32],"customLoggedInComponent":[32]},[[4,"pod-os:logout","logout"],[4,"pod-os:login","onLogin"]]],[1,"pos-navigation",{"uri":[1],"os":[32],"inputValue":[32],"searchIndex":[32],"suggestions":[32],"selectedIndex":[32],"resource":[32]},[[0,"pod-os:search:index-created","buildSearchIndex"],[0,"pod-os:search:index-updated","rebuildSearchIndex"],[0,"pod-os:navigate","openNavigationDialog"],[4,"click","closeDialog"],[0,"pod-os:link","clearSuggestions"],[0,"click","onClickSelf"],[0,"keydown","handleKeyDown"]],{"uri":[{"updateResource":0}],"os":[{"updateResource":0}]}],[1,"pos-user-menu",{"webId":[1,"web-id"]},[[0,"sl-select","onSelect"]]],[1,"pos-add-new-thing",{"referenceUri":[1,"reference-uri"]}],[1,"pos-type-router",{"initialTool":[32],"availableTools":[32],"oldTool":[32],"currentTool":[32],"transitioning":[32]},[[0,"pod-os:tool-selected","handleToolSelected"]]],[257,"pos-app",{"restorePreviousSession":[4,"restore-previous-session"],"os":[32],"unsubscribeSettings":[32],"loading":[32]},[[0,"pod-os:init","initializeOs"],[0,"pod-os:module","loadModule"]]],[257,"pos-error-toast",{"title":[32],"message":[32]},[[8,"unhandledrejection","unhandledRejection"],[0,"pod-os:error","catchError"]]],[260,"pos-router",{"mode":[1],"uri":[32]},[[0,"pod-os:link","linkClicked"],[8,"pod-os:session-restored","sessionRestored"]]],[1,"pos-app-dashboard"],[1,"pos-navigation-bar",{"current":[16],"searchIndexReady":[4,"search-index-ready"]},[[4,"keydown","activate"]]],[1,"pos-app-settings"],[17,"pos-new-thing-form",{"referenceUri":[1,"reference-uri"],"os":[32],"newUri":[32],"name":[32],"selectedTypeUri":[32],"canSubmit":[32]},null,{"name":[{"validate":0}],"selectedTypeUri":[{"validate":0}]}],[17,"pos-login-form",{"idpUrl":[32],"canSubmit":[32]},null,{"idpUrl":[{"validate":0}]}],[1,"pos-tool-select",{"selected":[16],"tools":[16]}],[1,"pos-type-index-entries",{"uri":[1],"entries":[32]}],[1,"pos-example-resources"],[1,"pos-make-findable",{"uri":[1],"os":[32],"thing":[32],"indexes":[32],"unsubscribeSessionChange":[32],"showOptions":[32],"isIndexed":[32]},[[0,"sl-select","onSelect"]],{"uri":[{"updateUri":0}]}],[260,"pos-dialog",{"showModal":[64],"close":[64]}],[1,"pos-getting-started"],[1,"pos-setting-offline-cache"],[1,"pos-share",{"uri":[1],"apps":[32],"os":[32]},[[4,"pod-os:resource-loaded","resourceLoaded"],[0,"sl-select","onSelect"]],{"uri":[{"updateApps":0}]}],[257,"pos-picture",{"blurredBackground":[4,"blurred-background"],"noUpload":[4,"no-upload"],"resource":[32],"os":[32],"isUploading":[32]}],[1,"pos-image",{"src":[1],"alt":[1],"blurredBackground":[4,"blurred-background"],"os":[32],"dataUri":[32],"brokenFile":[32],"networkError":[32],"imageError":[32],"loading":[32]},null,{"os":[{"fetchBlob":0}],"src":[{"fetchBlob":0}]}],[1,"pos-upload",{"accept":[16],"uploader":[16]}],[17,"pos-select-term",{"placeholder":[1],"value":[1],"os":[32],"terms":[32]},null,{"os":[{"setTerms":0}]}],[1,"pos-predicate",{"uri":[1],"label":[1],"expanded":[32]}],[257,"pos-rich-link",{"uri":[1],"rel":[1],"rev":[1],"link":[32],"followPredicate":[32],"error":[32],"showCustomContent":[32]}],[1,"pos-description",{"resource":[32]}],[1,"pos-label",{"resource":[32]}],[257,"pos-resource",{"uri":[1],"lazy":[4],"os":[32],"resource":[32],"consumers":[32],"error":[32],"loading":[32],"fetch":[64]},[[0,"pod-os:resource","provideResource"]],{"os":[{"loadResource":0}],"uri":[{"loadResource":0}]}]]],["pos-relations_2.cjs",[[1,"pos-relations",{"data":[32]}],[1,"pos-reverse-relations",{"data":[32]}]]],["pos-subjects.cjs",[[1,"pos-subjects",{"data":[32]}]]],["pos-markdown-document.cjs",[[1,"pos-markdown-document",{"file":[16],"saveStatus":[1,"save-status"],"editable":[4],"markdown":[32],"isModified":[32],"isEditing":[32],"startEditing":[64],"stopEditing":[64]}]]],["pos-container-item_3.cjs",[[257,"pos-container-item",{"resource":[32]}],[1,"pos-container-toolbar"],[1,"pos-create-new-container-item",{"type":[1],"container":[16],"os":[32],"name":[32]}]]],["pos-add-literal-value_3.cjs",[[1,"pos-literals",{"data":[32]}],[1,"pos-type-badges",{"data":[32],"typeLabels":[32],"isExpanded":[32]}],[1,"pos-add-literal-value",{"os":[32],"resource":[32],"currentValue":[32],"selectedTermUri":[32]},null,{"os":[{"setName":0}]}]]]], options);
49
49
  });
50
50
 
51
51
  exports.setNonce = index.setNonce;
@@ -14299,18 +14299,18 @@ function pipeFromArray(fns) {
14299
14299
 
14300
14300
  // ../node_modules/rxjs/dist/esm5/internal/Observable.js
14301
14301
  var Observable = (function() {
14302
- function Observable4(subscribe) {
14302
+ function Observable5(subscribe) {
14303
14303
  if (subscribe) {
14304
14304
  this._subscribe = subscribe;
14305
14305
  }
14306
14306
  }
14307
- Observable4.prototype.lift = function(operator2) {
14308
- var observable2 = new Observable4();
14307
+ Observable5.prototype.lift = function(operator2) {
14308
+ var observable2 = new Observable5();
14309
14309
  observable2.source = this;
14310
14310
  observable2.operator = operator2;
14311
14311
  return observable2;
14312
14312
  };
14313
- Observable4.prototype.subscribe = function(observerOrNext, error4, complete2) {
14313
+ Observable5.prototype.subscribe = function(observerOrNext, error4, complete2) {
14314
14314
  var _this = this;
14315
14315
  var subscriber3 = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error4, complete2);
14316
14316
  errorContext(function() {
@@ -14319,14 +14319,14 @@ var Observable = (function() {
14319
14319
  });
14320
14320
  return subscriber3;
14321
14321
  };
14322
- Observable4.prototype._trySubscribe = function(sink) {
14322
+ Observable5.prototype._trySubscribe = function(sink) {
14323
14323
  try {
14324
14324
  return this._subscribe(sink);
14325
14325
  } catch (err2) {
14326
14326
  sink.error(err2);
14327
14327
  }
14328
14328
  };
14329
- Observable4.prototype.forEach = function(next4, promiseCtor) {
14329
+ Observable5.prototype.forEach = function(next4, promiseCtor) {
14330
14330
  var _this = this;
14331
14331
  promiseCtor = getPromiseCtor(promiseCtor);
14332
14332
  return new promiseCtor(function(resolve, reject) {
@@ -14345,21 +14345,21 @@ var Observable = (function() {
14345
14345
  _this.subscribe(subscriber3);
14346
14346
  });
14347
14347
  };
14348
- Observable4.prototype._subscribe = function(subscriber3) {
14348
+ Observable5.prototype._subscribe = function(subscriber3) {
14349
14349
  var _a;
14350
14350
  return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber3);
14351
14351
  };
14352
- Observable4.prototype[observable] = function() {
14352
+ Observable5.prototype[observable] = function() {
14353
14353
  return this;
14354
14354
  };
14355
- Observable4.prototype.pipe = function() {
14355
+ Observable5.prototype.pipe = function() {
14356
14356
  var operations = [];
14357
14357
  for (var _i = 0; _i < arguments.length; _i++) {
14358
14358
  operations[_i] = arguments[_i];
14359
14359
  }
14360
14360
  return pipeFromArray(operations)(this);
14361
14361
  };
14362
- Observable4.prototype.toPromise = function(promiseCtor) {
14362
+ Observable5.prototype.toPromise = function(promiseCtor) {
14363
14363
  var _this = this;
14364
14364
  promiseCtor = getPromiseCtor(promiseCtor);
14365
14365
  return new promiseCtor(function(resolve, reject) {
@@ -14373,10 +14373,10 @@ var Observable = (function() {
14373
14373
  });
14374
14374
  });
14375
14375
  };
14376
- Observable4.create = function(subscribe) {
14377
- return new Observable4(subscribe);
14376
+ Observable5.create = function(subscribe) {
14377
+ return new Observable5(subscribe);
14378
14378
  };
14379
- return Observable4;
14379
+ return Observable5;
14380
14380
  })();
14381
14381
  function getPromiseCtor(promiseCtor) {
14382
14382
  var _a;
@@ -22140,7 +22140,7 @@ function listToCollection(kb, obj) {
22140
22140
  }
22141
22141
  async function jsonldParser(str, kb, base2) {
22142
22142
  const baseString = base2 && Object.prototype.hasOwnProperty.call(base2, "termType") ? base2.value : base2;
22143
- const jsonld = await Promise.resolve().then(function () { return require('./jsonld-V2RB47OZ-B82QNsYZ.js'); });
22143
+ const jsonld = await Promise.resolve().then(function () { return require('./jsonld-V2RB47OZ-BpANcb5R.js'); });
22144
22144
  const flattened = await jsonld.default.flatten(JSON.parse(str), null, {
22145
22145
  base: baseString
22146
22146
  });
@@ -27634,6 +27634,7 @@ var flow = Namespace("http://www.w3.org/2005/01/wf/flow#");
27634
27634
  // src/thing/accumulateSubjects.ts
27635
27635
  var accumulateSubjects = (accumulator, current3) => {
27636
27636
  const existing = accumulator[current3.predicate.uri];
27637
+ if (existing && existing.includes(current3.subject.value)) return accumulator;
27637
27638
  return {
27638
27639
  ...accumulator,
27639
27640
  [current3.predicate.uri]: existing ? [...existing, current3.subject.value] : [current3.subject.value]
@@ -27643,6 +27644,7 @@ var accumulateSubjects = (accumulator, current3) => {
27643
27644
  // src/thing/accumulateValues.ts
27644
27645
  var accumulateValues = (accumulator, current3) => {
27645
27646
  const existing = accumulator[current3.predicate.uri];
27647
+ if (existing && existing.includes(current3.object.value)) return accumulator;
27646
27648
  return {
27647
27649
  ...accumulator,
27648
27650
  [current3.predicate.uri]: existing ? [...existing, current3.object.value] : [current3.object.value]
@@ -27736,7 +27738,7 @@ var Thing = class {
27736
27738
  }));
27737
27739
  }
27738
27740
  /**
27739
- * Returns all the links from this thing to other resources
27741
+ * Returns all the unique links from this thing to other resources. This only includes named nodes and excludes rdf:type relations.
27740
27742
  */
27741
27743
  relations(predicate4) {
27742
27744
  const statements = this.store.statementsMatching(
@@ -27751,7 +27753,25 @@ var Thing = class {
27751
27753
  }));
27752
27754
  }
27753
27755
  /**
27754
- * Returns all the links from other resources to this thing
27756
+ * Observe changes in links from this thing to other resources
27757
+ */
27758
+ observeRelations(predicate4) {
27759
+ return merge(this.store.additions$, this.store.removals$).pipe(
27760
+ // Note: we assume that cost of filtering by the optional predicate is not worthwhile
27761
+ filter((quad3) => quad3.subject.value === this.uri),
27762
+ debounceTime(250),
27763
+ map(() => this.relations(predicate4)),
27764
+ startWith(this.relations(predicate4)),
27765
+ // Note: label is constructed from predicate and is therefore irrelevant to the comparison
27766
+ distinctUntilChanged(
27767
+ (prev2, curr) => prev2.length === curr.length && prev2.every(
27768
+ (rel2, i) => rel2.predicate === curr[i].predicate && rel2.uris.length === curr[i].uris.length
27769
+ )
27770
+ )
27771
+ );
27772
+ }
27773
+ /**
27774
+ * Returns all the unique links from other resources to this thing
27755
27775
  */
27756
27776
  reverseRelations(predicate4) {
27757
27777
  const statements = this.store.statementsMatching(
@@ -27766,6 +27786,24 @@ var Thing = class {
27766
27786
  uris: values2[predicate5]
27767
27787
  }));
27768
27788
  }
27789
+ /**
27790
+ * Observe changes in links from other resources to this thing
27791
+ */
27792
+ observeReverseRelations(predicate4) {
27793
+ return merge(this.store.additions$, this.store.removals$).pipe(
27794
+ // Note: we assume that cost of filtering by the optional predicate is not worthwhile
27795
+ filter((quad3) => quad3.object.value === this.uri),
27796
+ debounceTime(250),
27797
+ map(() => this.reverseRelations(predicate4)),
27798
+ startWith(this.reverseRelations(predicate4)),
27799
+ // Note: label is constructed from predicate and is therefore irrelevant to the comparison
27800
+ distinctUntilChanged(
27801
+ (prev2, curr) => prev2.length === curr.length && prev2.every(
27802
+ (rel2, i) => rel2.predicate === curr[i].predicate && rel2.uris.length === curr[i].uris.length
27803
+ )
27804
+ )
27805
+ );
27806
+ }
27769
27807
  /**
27770
27808
  * Returns any value linked from this thing via one of the given predicates
27771
27809
  * @param predicateUris
@@ -27853,6 +27891,19 @@ var Thing = class {
27853
27891
  label: labelForType(uri6)
27854
27892
  }));
27855
27893
  }
27894
+ /**
27895
+ * Observe changes to the list of RDF types for this thing
27896
+ */
27897
+ observeTypes() {
27898
+ return merge(this.store.additions$, this.store.removals$).pipe(
27899
+ filter(
27900
+ (quad3) => quad3.subject.value === this.uri && quad3.predicate.value === "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" || quad3.predicate.value === "http://www.w3.org/2000/01/rdf-schema#subClassOf"
27901
+ ),
27902
+ map(() => this.types()),
27903
+ startWith(this.types()),
27904
+ distinctUntilChanged((prev2, curr) => prev2.length === curr.length)
27905
+ );
27906
+ }
27856
27907
  /**
27857
27908
  * Returns all attachments linked to this thing
27858
27909
  */
@@ -27919,7 +27970,7 @@ var LdpContainer = class extends Thing {
27919
27970
  observeContains() {
27920
27971
  return merge(this.store.additions$, this.store.removals$).pipe(
27921
27972
  filter(
27922
- (quad3) => quad3.graph.value == this.uri && quad3.predicate.value == "http://www.w3.org/ns/ldp#contains"
27973
+ (quad3) => quad3.graph.value === this.uri && quad3.predicate.value === "http://www.w3.org/ns/ldp#contains"
27923
27974
  ),
27924
27975
  debounceTime(250),
27925
27976
  map(() => this.contains()),
@@ -28569,7 +28620,7 @@ var Store = class {
28569
28620
  ),
28570
28621
  map(() => this.findMembers(classUri)),
28571
28622
  startWith(this.findMembers(classUri)),
28572
- distinctUntilChanged((prev2, curr) => prev2.length == curr.length)
28623
+ distinctUntilChanged((prev2, curr) => prev2.length === curr.length)
28573
28624
  );
28574
28625
  }
28575
28626
  /**
@@ -28656,7 +28707,7 @@ var Store = class {
28656
28707
  graph3,
28657
28708
  justOne
28658
28709
  );
28659
- if (statements.length == 0) return null;
28710
+ if (statements.length === 0) return null;
28660
28711
  if (!subject8) {
28661
28712
  return statements[0].subject;
28662
28713
  } else if (!predicate4) {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-OR1wNkjG.js');
3
+ var index = require('./index-CmQJab4P.js');
4
4
 
5
5
  // ../node_modules/rdf-canonize/lib/IdentifierIssuer.js
6
6
  var require_IdentifierIssuer = index.__commonJS({
@@ -5,7 +5,7 @@ var index = require('./index-Be_lnf0w.js');
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;
7
7
  await index.globalScripts();
8
- return index.bootstrapLazy([["pos-app-generic.cjs",[[1,"pos-app-generic"]]],["pos-app-ldp-container.cjs",[[1,"pos-app-ldp-container"]]],["pos-app-rdf-document.cjs",[[1,"pos-app-rdf-document"]]],["pos-app-image-viewer.cjs",[[1,"pos-app-image-viewer",{"resource":[32]}]]],["pos-tool-attachments.cjs",[[1,"pos-tool-attachments",{"os":[32],"resource":[32]}]]],["pos-app-document-viewer.cjs",[[1,"pos-app-document-viewer",{"resource":[32]}]]],["pos-list.cjs",[[0,"pos-list",{"rel":[1],"ifTypeof":[1,"if-typeof"],"fetch":[4],"error":[32],"os":[32],"resource":[32],"items":[32],"templateString":[32]}]]],["pos-case.cjs",[[0,"pos-case",{"ifTypeof":[1,"if-typeof"],"not":[4],"else":[4],"error":[32]}]]],["pos-switch.cjs",[[0,"pos-switch",{"error":[32],"resource":[32],"caseElements":[32],"templateString":[32]}]]],["pos-value.cjs",[[1,"pos-value",{"predicate":[1],"resource":[32]}]]],["pos-attachments.cjs",[[1,"pos-attachments",{"resource":[32],"attachments":[32],"addToList":[64]}]]],["pos-container-contents.cjs",[[1,"pos-container-contents",{"container":[32],"contents":[32],"loading":[32],"createNewItem":[32]},[[0,"keydown","handleKeyDown"]]]]],["pos-document.cjs",[[1,"pos-document",{"src":[1],"alt":[1],"os":[32],"file":[32],"brokenFile":[32],"error":[32],"saveStatus":[32],"loading":[32],"isEditable":[32]},[[0,"pod-os:document-modified","handleDocumentModified"]],{"os":[{"fetchBlob":0}],"src":[{"fetchBlob":0}]}]]],["pos-add-new-thing_32.cjs",[[0,"pos-app-browser",{"restorePreviousSession":[4,"restore-previous-session"],"mode":[1],"uri":[32]}],[0,"pos-internal-router",{"uri":[1]}],[257,"pos-login",{"os":[32],"customLoggedInComponent":[32]},[[4,"pod-os:logout","logout"],[4,"pod-os:login","onLogin"]]],[1,"pos-navigation",{"uri":[1],"os":[32],"inputValue":[32],"searchIndex":[32],"suggestions":[32],"selectedIndex":[32],"resource":[32]},[[0,"pod-os:search:index-created","buildSearchIndex"],[0,"pod-os:search:index-updated","rebuildSearchIndex"],[0,"pod-os:navigate","openNavigationDialog"],[4,"click","closeDialog"],[0,"pod-os:link","clearSuggestions"],[0,"click","onClickSelf"],[0,"keydown","handleKeyDown"]],{"uri":[{"updateResource":0}],"os":[{"updateResource":0}]}],[1,"pos-user-menu",{"webId":[1,"web-id"]},[[0,"sl-select","onSelect"]]],[1,"pos-add-new-thing",{"referenceUri":[1,"reference-uri"]}],[1,"pos-type-router",{"initialTool":[32],"availableTools":[32],"oldTool":[32],"currentTool":[32],"transitioning":[32]},[[0,"pod-os:tool-selected","handleToolSelected"]]],[257,"pos-app",{"restorePreviousSession":[4,"restore-previous-session"],"os":[32],"unsubscribeSettings":[32],"loading":[32]},[[0,"pod-os:init","initializeOs"],[0,"pod-os:module","loadModule"]]],[257,"pos-error-toast",{"title":[32],"message":[32]},[[8,"unhandledrejection","unhandledRejection"],[0,"pod-os:error","catchError"]]],[260,"pos-router",{"mode":[1],"uri":[32]},[[0,"pod-os:link","linkClicked"],[8,"pod-os:session-restored","sessionRestored"]]],[1,"pos-app-dashboard"],[1,"pos-navigation-bar",{"current":[16],"searchIndexReady":[4,"search-index-ready"]},[[4,"keydown","activate"]]],[1,"pos-app-settings"],[17,"pos-new-thing-form",{"referenceUri":[1,"reference-uri"],"os":[32],"newUri":[32],"name":[32],"selectedTypeUri":[32],"canSubmit":[32]},null,{"name":[{"validate":0}],"selectedTypeUri":[{"validate":0}]}],[17,"pos-login-form",{"idpUrl":[32],"canSubmit":[32]},null,{"idpUrl":[{"validate":0}]}],[1,"pos-tool-select",{"selected":[16],"tools":[16]}],[1,"pos-type-index-entries",{"uri":[1],"entries":[32]}],[1,"pos-example-resources"],[1,"pos-make-findable",{"uri":[1],"os":[32],"thing":[32],"indexes":[32],"unsubscribeSessionChange":[32],"showOptions":[32],"isIndexed":[32]},[[0,"sl-select","onSelect"]],{"uri":[{"updateUri":0}]}],[260,"pos-dialog",{"showModal":[64],"close":[64]}],[1,"pos-getting-started"],[1,"pos-setting-offline-cache"],[1,"pos-share",{"uri":[1],"apps":[32],"os":[32]},[[4,"pod-os:resource-loaded","resourceLoaded"],[0,"sl-select","onSelect"]],{"uri":[{"updateApps":0}]}],[257,"pos-picture",{"blurredBackground":[4,"blurred-background"],"noUpload":[4,"no-upload"],"resource":[32],"os":[32],"isUploading":[32]}],[1,"pos-image",{"src":[1],"alt":[1],"blurredBackground":[4,"blurred-background"],"os":[32],"dataUri":[32],"brokenFile":[32],"networkError":[32],"imageError":[32],"loading":[32]},null,{"os":[{"fetchBlob":0}],"src":[{"fetchBlob":0}]}],[1,"pos-upload",{"accept":[16],"uploader":[16]}],[17,"pos-select-term",{"placeholder":[1],"value":[1],"os":[32],"terms":[32]},null,{"os":[{"setTerms":0}]}],[1,"pos-predicate",{"uri":[1],"label":[1],"expanded":[32]}],[257,"pos-rich-link",{"uri":[1],"rel":[1],"rev":[1],"link":[32],"followPredicate":[32],"error":[32],"showCustomContent":[32]}],[1,"pos-description",{"resource":[32]}],[1,"pos-label",{"resource":[32]}],[257,"pos-resource",{"uri":[1],"lazy":[4],"os":[32],"resource":[32],"consumers":[32],"error":[32],"loading":[32],"fetch":[64]},[[0,"pod-os:resource","provideResource"]],{"os":[{"loadResource":0}],"uri":[{"loadResource":0}]}]]],["pos-relations_2.cjs",[[1,"pos-relations",{"data":[32]}],[1,"pos-reverse-relations",{"data":[32]}]]],["pos-subjects.cjs",[[1,"pos-subjects",{"data":[32]}]]],["pos-markdown-document.cjs",[[1,"pos-markdown-document",{"file":[16],"saveStatus":[1,"save-status"],"editable":[4],"markdown":[32],"isModified":[32],"isEditing":[32],"startEditing":[64],"stopEditing":[64]}]]],["pos-container-item_3.cjs",[[257,"pos-container-item",{"resource":[32]}],[1,"pos-container-toolbar"],[1,"pos-create-new-container-item",{"type":[1],"container":[16],"os":[32],"name":[32]}]]],["pos-add-literal-value_3.cjs",[[1,"pos-literals",{"data":[32]}],[1,"pos-type-badges",{"data":[32],"typeLabels":[32],"isExpanded":[32]}],[1,"pos-add-literal-value",{"os":[32],"resource":[32],"currentValue":[32],"selectedTermUri":[32]},null,{"os":[{"setName":0}]}]]]], options);
8
+ return index.bootstrapLazy([["pos-app-generic.cjs",[[1,"pos-app-generic"]]],["pos-app-ldp-container.cjs",[[1,"pos-app-ldp-container"]]],["pos-app-rdf-document.cjs",[[1,"pos-app-rdf-document"]]],["pos-app-image-viewer.cjs",[[1,"pos-app-image-viewer",{"resource":[32]}]]],["pos-tool-attachments.cjs",[[1,"pos-tool-attachments",{"os":[32],"resource":[32]}]]],["pos-app-document-viewer.cjs",[[1,"pos-app-document-viewer",{"resource":[32]}]]],["pos-list.cjs",[[0,"pos-list",{"rel":[1],"ifTypeof":[1,"if-typeof"],"fetch":[4],"error":[32],"os":[32],"resource":[32],"items":[32],"templateString":[32]}]]],["pos-case.cjs",[[0,"pos-case",{"ifTypeof":[1,"if-typeof"],"ifProperty":[1,"if-property"],"ifRev":[1,"if-rev"],"not":[4],"else":[4],"error":[32]}]]],["pos-switch.cjs",[[0,"pos-switch",{"error":[32],"resource":[32],"caseElements":[32],"types":[32],"relations":[32],"reverseRelations":[32]}]]],["pos-value.cjs",[[1,"pos-value",{"predicate":[1],"resource":[32]}]]],["pos-attachments.cjs",[[1,"pos-attachments",{"resource":[32],"attachments":[32],"addToList":[64]}]]],["pos-container-contents.cjs",[[1,"pos-container-contents",{"container":[32],"contents":[32],"loading":[32],"createNewItem":[32]},[[0,"keydown","handleKeyDown"]]]]],["pos-document.cjs",[[1,"pos-document",{"src":[1],"alt":[1],"os":[32],"file":[32],"brokenFile":[32],"error":[32],"saveStatus":[32],"loading":[32],"isEditable":[32]},[[0,"pod-os:document-modified","handleDocumentModified"]],{"os":[{"fetchBlob":0}],"src":[{"fetchBlob":0}]}]]],["pos-add-new-thing_32.cjs",[[0,"pos-app-browser",{"restorePreviousSession":[4,"restore-previous-session"],"mode":[1],"uri":[32]}],[0,"pos-internal-router",{"uri":[1]}],[257,"pos-login",{"os":[32],"customLoggedInComponent":[32]},[[4,"pod-os:logout","logout"],[4,"pod-os:login","onLogin"]]],[1,"pos-navigation",{"uri":[1],"os":[32],"inputValue":[32],"searchIndex":[32],"suggestions":[32],"selectedIndex":[32],"resource":[32]},[[0,"pod-os:search:index-created","buildSearchIndex"],[0,"pod-os:search:index-updated","rebuildSearchIndex"],[0,"pod-os:navigate","openNavigationDialog"],[4,"click","closeDialog"],[0,"pod-os:link","clearSuggestions"],[0,"click","onClickSelf"],[0,"keydown","handleKeyDown"]],{"uri":[{"updateResource":0}],"os":[{"updateResource":0}]}],[1,"pos-user-menu",{"webId":[1,"web-id"]},[[0,"sl-select","onSelect"]]],[1,"pos-add-new-thing",{"referenceUri":[1,"reference-uri"]}],[1,"pos-type-router",{"initialTool":[32],"availableTools":[32],"oldTool":[32],"currentTool":[32],"transitioning":[32]},[[0,"pod-os:tool-selected","handleToolSelected"]]],[257,"pos-app",{"restorePreviousSession":[4,"restore-previous-session"],"os":[32],"unsubscribeSettings":[32],"loading":[32]},[[0,"pod-os:init","initializeOs"],[0,"pod-os:module","loadModule"]]],[257,"pos-error-toast",{"title":[32],"message":[32]},[[8,"unhandledrejection","unhandledRejection"],[0,"pod-os:error","catchError"]]],[260,"pos-router",{"mode":[1],"uri":[32]},[[0,"pod-os:link","linkClicked"],[8,"pod-os:session-restored","sessionRestored"]]],[1,"pos-app-dashboard"],[1,"pos-navigation-bar",{"current":[16],"searchIndexReady":[4,"search-index-ready"]},[[4,"keydown","activate"]]],[1,"pos-app-settings"],[17,"pos-new-thing-form",{"referenceUri":[1,"reference-uri"],"os":[32],"newUri":[32],"name":[32],"selectedTypeUri":[32],"canSubmit":[32]},null,{"name":[{"validate":0}],"selectedTypeUri":[{"validate":0}]}],[17,"pos-login-form",{"idpUrl":[32],"canSubmit":[32]},null,{"idpUrl":[{"validate":0}]}],[1,"pos-tool-select",{"selected":[16],"tools":[16]}],[1,"pos-type-index-entries",{"uri":[1],"entries":[32]}],[1,"pos-example-resources"],[1,"pos-make-findable",{"uri":[1],"os":[32],"thing":[32],"indexes":[32],"unsubscribeSessionChange":[32],"showOptions":[32],"isIndexed":[32]},[[0,"sl-select","onSelect"]],{"uri":[{"updateUri":0}]}],[260,"pos-dialog",{"showModal":[64],"close":[64]}],[1,"pos-getting-started"],[1,"pos-setting-offline-cache"],[1,"pos-share",{"uri":[1],"apps":[32],"os":[32]},[[4,"pod-os:resource-loaded","resourceLoaded"],[0,"sl-select","onSelect"]],{"uri":[{"updateApps":0}]}],[257,"pos-picture",{"blurredBackground":[4,"blurred-background"],"noUpload":[4,"no-upload"],"resource":[32],"os":[32],"isUploading":[32]}],[1,"pos-image",{"src":[1],"alt":[1],"blurredBackground":[4,"blurred-background"],"os":[32],"dataUri":[32],"brokenFile":[32],"networkError":[32],"imageError":[32],"loading":[32]},null,{"os":[{"fetchBlob":0}],"src":[{"fetchBlob":0}]}],[1,"pos-upload",{"accept":[16],"uploader":[16]}],[17,"pos-select-term",{"placeholder":[1],"value":[1],"os":[32],"terms":[32]},null,{"os":[{"setTerms":0}]}],[1,"pos-predicate",{"uri":[1],"label":[1],"expanded":[32]}],[257,"pos-rich-link",{"uri":[1],"rel":[1],"rev":[1],"link":[32],"followPredicate":[32],"error":[32],"showCustomContent":[32]}],[1,"pos-description",{"resource":[32]}],[1,"pos-label",{"resource":[32]}],[257,"pos-resource",{"uri":[1],"lazy":[4],"os":[32],"resource":[32],"consumers":[32],"error":[32],"loading":[32],"fetch":[64]},[[0,"pod-os:resource","provideResource"]],{"os":[{"loadResource":0}],"uri":[{"loadResource":0}]}]]],["pos-relations_2.cjs",[[1,"pos-relations",{"data":[32]}],[1,"pos-reverse-relations",{"data":[32]}]]],["pos-subjects.cjs",[[1,"pos-subjects",{"data":[32]}]]],["pos-markdown-document.cjs",[[1,"pos-markdown-document",{"file":[16],"saveStatus":[1,"save-status"],"editable":[4],"markdown":[32],"isModified":[32],"isEditing":[32],"startEditing":[64],"stopEditing":[64]}]]],["pos-container-item_3.cjs",[[257,"pos-container-item",{"resource":[32]}],[1,"pos-container-toolbar"],[1,"pos-create-new-container-item",{"type":[1],"container":[16],"os":[32],"name":[32]}]]],["pos-add-literal-value_3.cjs",[[1,"pos-literals",{"data":[32]}],[1,"pos-type-badges",{"data":[32],"typeLabels":[32],"isExpanded":[32]}],[1,"pos-add-literal-value",{"os":[32],"resource":[32],"currentValue":[32],"selectedTermUri":[32]},null,{"os":[{"setName":0}]}]]]], options);
9
9
  };
10
10
 
11
11
  exports.setNonce = index.setNonce;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-Be_lnf0w.js');
4
- var index$1 = require('./index-OR1wNkjG.js');
4
+ var index$1 = require('./index-CmQJab4P.js');
5
5
  var PodOsAware = require('./PodOsAware-_Lsp4KsV.js');
6
6
  var ResourceAware = require('./ResourceAware-uqh9ZRDt.js');
7
7
  require('./chunk.ZGGPD2XJ-Cj6xUx2M.js');
@@ -3,7 +3,7 @@
3
3
  var index = require('./index-Be_lnf0w.js');
4
4
  var chunk_ZGGPD2XJ = require('./chunk.ZGGPD2XJ-Cj6xUx2M.js');
5
5
  var chunk_XQ2OKYYA = require('./chunk.XQ2OKYYA-D224sdKt.js');
6
- var index$1 = require('./index-OR1wNkjG.js');
6
+ var index$1 = require('./index-CmQJab4P.js');
7
7
  var index$2 = require('./index-DlHQ3blV.js');
8
8
  var chunk_URTPIBTY = require('./chunk.URTPIBTY-DcQsb_nW.js');
9
9
  var classMap = require('./class-map-Nx8L8ElN.js');
@@ -3078,7 +3078,7 @@ const PosApp = class {
3078
3078
  disconnectedCallback() {
3079
3079
  this.unsubscribeSettings();
3080
3080
  this.disconnected$.next();
3081
- this.disconnected$.unsubscribe();
3081
+ this.disconnected$.complete();
3082
3082
  }
3083
3083
  async initializeOs(event) {
3084
3084
  event.stopPropagation();
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-Be_lnf0w.js');
4
- var index$2 = require('./index-OR1wNkjG.js');
4
+ var index$2 = require('./index-CmQJab4P.js');
5
5
  var ResourceAware = require('./ResourceAware-uqh9ZRDt.js');
6
6
  var index$1 = require('./index-DlHQ3blV.js');
7
7
 
@@ -21,7 +21,7 @@ const PosContainerContents = class {
21
21
  this.container
22
22
  .observeContains()
23
23
  .pipe(index$1.cjsExports.takeUntil(this.disconnected$))
24
- .subscribe(contains => (this.contents = contains.sort((a, b) => a.name.localeCompare(b.name))));
24
+ .subscribe(contains => (this.contents = contains.toSorted((a, b) => a.name.localeCompare(b.name))));
25
25
  };
26
26
  }
27
27
  onCreateNewFile() {
@@ -49,7 +49,7 @@ const PosContainerContents = class {
49
49
  }
50
50
  disconnectedCallback() {
51
51
  this.disconnected$.next();
52
- this.disconnected$.unsubscribe();
52
+ this.disconnected$.complete();
53
53
  }
54
54
  };
55
55
  PosContainerContents.style = posContainerContentsCss();
@@ -50,7 +50,7 @@ const PosList = class {
50
50
  }
51
51
  disconnectedCallback() {
52
52
  this.disconnected$.next();
53
- this.disconnected$.unsubscribe();
53
+ this.disconnected$.complete();
54
54
  }
55
55
  get host() { return index.getElement(this); }
56
56
  };
@@ -26938,7 +26938,7 @@ const PosMarkdownDocument = class {
26938
26938
  }
26939
26939
  disconnectedCallback() {
26940
26940
  this.disconnected$.next();
26941
- this.disconnected$.unsubscribe();
26941
+ this.disconnected$.complete();
26942
26942
  }
26943
26943
  /**
26944
26944
  * Switch to editing mode
@@ -26955,7 +26955,7 @@ const PosMarkdownDocument = class {
26955
26955
  this.isEditing = false;
26956
26956
  }
26957
26957
  render() {
26958
- return (index$1.h("article", { key: 'c5a2e904d1be9feb545a6ae077ba36e956653e2e' }, this.editable ? (index$1.h("header", null, this.isEditing ? this.getStatus() : null, this.isEditing ? (index$1.h("button", { onClick: () => this.stopEditing() }, index$1.h("sl-icon", { name: "eye" }), "View")) : (index$1.h("button", { onClick: () => this.startEditing() }, index$1.h("sl-icon", { name: "pencil-square" }), "Edit")))) : null, index$1.h("div", { key: '5ddc1a2ff1a07bbeb4290a26614a3b82dd090492', class: "content", ref: el => (this.editorEl = el) })));
26958
+ return (index$1.h("article", { key: '5ea4a46927219fe07df4cb79d9a43bc8fae9d1cd' }, this.editable ? (index$1.h("header", null, this.isEditing ? this.getStatus() : null, this.isEditing ? (index$1.h("button", { onClick: () => this.stopEditing() }, index$1.h("sl-icon", { name: "eye" }), "View")) : (index$1.h("button", { onClick: () => this.startEditing() }, index$1.h("sl-icon", { name: "pencil-square" }), "Edit")))) : null, index$1.h("div", { key: 'fb013b33f02fd5c756238fe9ce8a9799111e02b7', class: "content", ref: el => (this.editorEl = el) })));
26959
26959
  }
26960
26960
  getStatus() {
26961
26961
  if (this.isModified) {
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-Be_lnf0w.js');
4
- var index$1 = require('./index-OR1wNkjG.js');
4
+ var index$1 = require('./index-CmQJab4P.js');
5
5
  var ResourceAware = require('./ResourceAware-uqh9ZRDt.js');
6
6
 
7
7
  const posSubjectsCss = () => `:host{--background-base-color:color-mix(in srgb, var(--pos-background-color), var(--color-grey-800) 10%);--background-color-even:hsl(from var(--background-base-color) h s calc(l + 7));--background-color-odd:hsl(from var(--background-base-color) h s calc(l + 10));--border-color:var(--background-base-color)}ul{display:flex;flex-direction:column;gap:var(--size-2);margin:0;padding:0;li{border:var(--size-px) solid var(--border-color);padding:var(--size-4);list-style-type:none;&:nth-child(even){background-color:var(--background-color-even)}&:nth-child(odd){background-color:var(--background-color-odd)}}}`;
@@ -2,33 +2,63 @@
2
2
 
3
3
  var index = require('./index-Be_lnf0w.js');
4
4
  var ResourceAware = require('./ResourceAware-uqh9ZRDt.js');
5
+ var index$1 = require('./index-DlHQ3blV.js');
5
6
 
6
7
  const PosSwitch = class {
7
8
  constructor(hostRef) {
8
9
  index.registerInstance(this, hostRef);
9
10
  this.subscribeResource = index.createEvent(this, "pod-os:resource", 7);
10
11
  this.error = null;
12
+ this.disconnected$ = new index$1.cjsExports.Subject();
11
13
  this.receiveResource = (resource) => {
12
- this.resource = resource;
14
+ // reset any existing resource
15
+ this.disconnected$.next();
16
+ this.resource = undefined;
17
+ let observables = [];
18
+ if (this.caseElements.some(caseElement => caseElement.hasAttribute('if-typeof'))) {
19
+ const observeTypes = resource.observeTypes().pipe(index$1.cjsExports.takeUntil(this.disconnected$));
20
+ observeTypes.subscribe(types => {
21
+ this.types = types;
22
+ });
23
+ observables.push(observeTypes);
24
+ }
25
+ if (this.caseElements.some(caseElement => caseElement.hasAttribute('if-property'))) {
26
+ const observeRelations = resource.observeRelations().pipe(index$1.cjsExports.takeUntil(this.disconnected$));
27
+ observeRelations.subscribe(relations => {
28
+ this.relations = relations;
29
+ });
30
+ observables.push(observeRelations);
31
+ }
32
+ if (this.caseElements.some(caseElement => caseElement.hasAttribute('if-rev'))) {
33
+ const observeReverseRelations = resource.observeReverseRelations().pipe(index$1.cjsExports.takeUntil(this.disconnected$));
34
+ observeReverseRelations.subscribe(reverseRelations => {
35
+ this.reverseRelations = reverseRelations;
36
+ });
37
+ observables.push(observeReverseRelations);
38
+ }
39
+ index$1.cjsExports.firstValueFrom(index$1.cjsExports.combineLatest(observables)).then(() => (this.resource = resource));
13
40
  };
14
41
  }
15
42
  componentWillLoad() {
16
- ResourceAware.subscribeResource(this);
17
43
  const caseElements = this.host.querySelectorAll('pos-case');
18
44
  if (caseElements.length == 0) {
19
45
  this.error = 'No pos-case elements found';
20
46
  }
21
47
  else {
22
- this.caseElements = caseElements;
48
+ this.caseElements = Array.from(caseElements);
49
+ ResourceAware.subscribeResource(this);
23
50
  }
24
51
  }
25
52
  test(caseElement) {
26
53
  let state = null;
27
54
  if (caseElement.getAttribute('if-typeof') !== null) {
28
- state = this.resource
29
- .types()
30
- .map(x => x.uri)
31
- .includes(caseElement.getAttribute('if-typeof'));
55
+ state = this.types.map(x => x.uri).includes(caseElement.getAttribute('if-typeof'));
56
+ }
57
+ if (caseElement.getAttribute('if-property') !== null) {
58
+ state = this.relations.map(x => x.predicate).includes(caseElement.getAttribute('if-property'));
59
+ }
60
+ if (caseElement.getAttribute('if-rev') !== null) {
61
+ state = this.reverseRelations.map(x => x.predicate).includes(caseElement.getAttribute('if-rev'));
32
62
  }
33
63
  if (caseElement.getAttribute('not') != null) {
34
64
  state = !state;
@@ -58,6 +88,10 @@ const PosSwitch = class {
58
88
  const activeElementsContent = activeElements.map(el => el.querySelector('template').innerHTML).join('\n');
59
89
  return index.h(index.Host, { innerHTML: activeElementsContent });
60
90
  }
91
+ disconnectedCallback() {
92
+ this.disconnected$.next();
93
+ this.disconnected$.complete();
94
+ }
61
95
  get host() { return index.getElement(this); }
62
96
  };
63
97
 
@@ -46,7 +46,7 @@ export class PosApp {
46
46
  disconnectedCallback() {
47
47
  this.unsubscribeSettings();
48
48
  this.disconnected$.next();
49
- this.disconnected$.unsubscribe();
49
+ this.disconnected$.complete();
50
50
  }
51
51
  async initializeOs(event) {
52
52
  event.stopPropagation();
@@ -14,7 +14,7 @@ export class PosContainerContents {
14
14
  this.container
15
15
  .observeContains()
16
16
  .pipe(takeUntil(this.disconnected$))
17
- .subscribe(contains => (this.contents = contains.sort((a, b) => a.name.localeCompare(b.name))));
17
+ .subscribe(contains => (this.contents = contains.toSorted((a, b) => a.name.localeCompare(b.name))));
18
18
  };
19
19
  }
20
20
  onCreateNewFile() {
@@ -42,7 +42,7 @@ export class PosContainerContents {
42
42
  }
43
43
  disconnectedCallback() {
44
44
  this.disconnected$.next();
45
- this.disconnected$.unsubscribe();
45
+ this.disconnected$.complete();
46
46
  }
47
47
  static get is() { return "pos-container-contents"; }
48
48
  static get encapsulation() { return "shadow"; }
@@ -44,7 +44,7 @@ export class PosList {
44
44
  }
45
45
  disconnectedCallback() {
46
46
  this.disconnected$.next();
47
- this.disconnected$.unsubscribe();
47
+ this.disconnected$.complete();
48
48
  }
49
49
  static get is() { return "pos-list"; }
50
50
  static get properties() {
@@ -37,7 +37,7 @@ export class PosMarkdownDocument {
37
37
  }
38
38
  disconnectedCallback() {
39
39
  this.disconnected$.next();
40
- this.disconnected$.unsubscribe();
40
+ this.disconnected$.complete();
41
41
  }
42
42
  /**
43
43
  * Switch to editing mode
@@ -54,7 +54,7 @@ export class PosMarkdownDocument {
54
54
  this.isEditing = false;
55
55
  }
56
56
  render() {
57
- return (h("article", { key: 'c5a2e904d1be9feb545a6ae077ba36e956653e2e' }, this.editable ? (h("header", null, this.isEditing ? this.getStatus() : null, this.isEditing ? (h("button", { onClick: () => this.stopEditing() }, h("sl-icon", { name: "eye" }), "View")) : (h("button", { onClick: () => this.startEditing() }, h("sl-icon", { name: "pencil-square" }), "Edit")))) : null, h("div", { key: '5ddc1a2ff1a07bbeb4290a26614a3b82dd090492', class: "content", ref: el => (this.editorEl = el) })));
57
+ return (h("article", { key: '5ea4a46927219fe07df4cb79d9a43bc8fae9d1cd' }, this.editable ? (h("header", null, this.isEditing ? this.getStatus() : null, this.isEditing ? (h("button", { onClick: () => this.stopEditing() }, h("sl-icon", { name: "eye" }), "View")) : (h("button", { onClick: () => this.startEditing() }, h("sl-icon", { name: "pencil-square" }), "Edit")))) : null, h("div", { key: 'fb013b33f02fd5c756238fe9ce8a9799111e02b7', class: "content", ref: el => (this.editorEl = el) })));
58
58
  }
59
59
  getStatus() {
60
60
  if (this.isModified) {
@@ -39,6 +39,44 @@ export class PosCase {
39
39
  "reflect": false,
40
40
  "attribute": "if-typeof"
41
41
  },
42
+ "ifProperty": {
43
+ "type": "string",
44
+ "mutable": false,
45
+ "complexType": {
46
+ "original": "string",
47
+ "resolved": "string",
48
+ "references": {}
49
+ },
50
+ "required": false,
51
+ "optional": true,
52
+ "docs": {
53
+ "tags": [],
54
+ "text": "Test if the resource has the specified property (forward link)"
55
+ },
56
+ "getter": false,
57
+ "setter": false,
58
+ "reflect": false,
59
+ "attribute": "if-property"
60
+ },
61
+ "ifRev": {
62
+ "type": "string",
63
+ "mutable": false,
64
+ "complexType": {
65
+ "original": "string",
66
+ "resolved": "string",
67
+ "references": {}
68
+ },
69
+ "required": false,
70
+ "optional": true,
71
+ "docs": {
72
+ "tags": [],
73
+ "text": "Test if the resource is the subject of the specified property (backward link)"
74
+ },
75
+ "getter": false,
76
+ "setter": false,
77
+ "reflect": false,
78
+ "attribute": "if-rev"
79
+ },
42
80
  "not": {
43
81
  "type": "boolean",
44
82
  "mutable": false,