@pod-os/elements 0.37.0-rc.a3affe7.0 → 0.37.0-rc.dba0210.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.
- package/dist/cjs/elements.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/pos-case.cjs.entry.js +24 -0
- package/dist/cjs/pos-switch.cjs.entry.js +64 -0
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/pos-switch/pos-case/pos-case.js +88 -0
- package/dist/collection/components/pos-switch/pos-switch.js +89 -0
- package/dist/components/pos-case.d.ts +11 -0
- package/dist/components/pos-case.js +1 -0
- package/dist/components/pos-switch.d.ts +11 -0
- package/dist/components/pos-switch.js +1 -0
- package/dist/elements/elements.esm.js +1 -1
- package/dist/elements/{p-0e7413e6.entry.js → p-01cca2f2.entry.js} +1 -1
- package/dist/elements/{p-9ad80b52.entry.js → p-13976aa1.entry.js} +1 -1
- package/dist/elements/{p-a9a18aa8.entry.js → p-14b27181.entry.js} +1 -1
- package/dist/elements/p-1a6f9788.entry.js +1 -0
- package/dist/elements/p-264ddd4b.entry.js +1 -0
- package/dist/elements/{p-b5d64c6f.entry.js → p-26f9dd67.entry.js} +1 -1
- package/dist/elements/{p-fe628201.entry.js → p-3b2dd0b0.entry.js} +1 -1
- package/dist/elements/{p-b363349c.entry.js → p-4d495115.entry.js} +1 -1
- package/dist/elements/{p-637a38d9.entry.js → p-61984b97.entry.js} +1 -1
- package/dist/elements/{p-a20b72d8.entry.js → p-6d32b1b9.entry.js} +1 -1
- package/dist/elements/{p-3e18b5dd.entry.js → p-74bbaea1.entry.js} +1 -1
- package/dist/elements/p-85052eb1.entry.js +1 -0
- package/dist/elements/{p-dff14248.entry.js → p-8e44ba0d.entry.js} +1 -1
- package/dist/elements/{p-52a612ed.entry.js → p-91354eb8.entry.js} +1 -1
- package/dist/elements/{p-9b74c400.entry.js → p-930c2b34.entry.js} +1 -1
- package/dist/elements/{p-BkAnMOpW.js → p-DFjHkJRO.js} +3 -3
- package/dist/elements/{p-VMHzF3uY.js → p-DMWc6mBG.js} +1 -1
- package/dist/elements/{p-CrxYqX8r.js → p-DXbsIXSw.js} +7 -7
- package/dist/elements/{p-8q-RA2Uq.js → p-Dpe4DEvs.js} +3 -3
- package/dist/elements/p-Z7wimzYh.js +11 -0
- package/dist/elements/{p-0a087865.entry.js → p-aa541ea5.entry.js} +1 -1
- package/dist/elements/{p-c8ee910c.entry.js → p-bbf585d2.entry.js} +1 -1
- package/dist/elements/{p-701f2c84.entry.js → p-cd252587.entry.js} +10 -10
- package/dist/elements/{p-6561f1b7.entry.js → p-f36c0084.entry.js} +1 -1
- package/dist/esm/{chunk.URTPIBTY-CNA3-SLq.js → chunk.URTPIBTY-CU2XVqAs.js} +2 -2
- package/dist/esm/{chunk.XQ2OKYYA-CXNlpYUG.js → chunk.XQ2OKYYA-Teif1jss.js} +3 -3
- package/dist/esm/{chunk.ZGGPD2XJ-BjT6fS1o.js → chunk.ZGGPD2XJ-6SSKfwli.js} +1 -1
- package/dist/esm/{class-map-CUYFUkXU.js → class-map-_-hYvl90.js} +1 -1
- package/dist/esm/elements.js +3 -3
- package/dist/esm/{index-VMHzF3uY.js → index-DMWc6mBG.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/pos-add-literal-value_3.entry.js +4 -4
- package/dist/esm/pos-add-new-thing_31.entry.js +5 -5
- package/dist/esm/pos-app-document-viewer.entry.js +1 -1
- package/dist/esm/pos-app-generic.entry.js +1 -1
- package/dist/esm/pos-app-image-viewer.entry.js +1 -1
- package/dist/esm/pos-app-ldp-container.entry.js +1 -1
- package/dist/esm/pos-app-rdf-document.entry.js +1 -1
- package/dist/esm/pos-attachments.entry.js +1 -1
- package/dist/esm/pos-case.entry.js +22 -0
- package/dist/esm/pos-container-contents.entry.js +1 -1
- package/dist/esm/pos-container-item_3.entry.js +4 -4
- package/dist/esm/pos-document.entry.js +4 -4
- package/dist/esm/pos-list.entry.js +1 -1
- package/dist/esm/pos-markdown-document.entry.js +2 -2
- package/dist/esm/pos-relations_2.entry.js +1 -1
- package/dist/esm/pos-subjects.entry.js +1 -1
- package/dist/esm/pos-switch.entry.js +62 -0
- package/dist/esm/pos-tool-attachments.entry.js +1 -1
- package/dist/esm/pos-value.entry.js +1 -1
- package/dist/types/components/pos-switch/pos-case/pos-case.d.ts +22 -0
- package/dist/types/components/pos-switch/pos-switch.d.ts +19 -0
- package/dist/types/components.d.ts +102 -0
- package/package.json +2 -2
- package/dist/elements/p-8ggjG2YF.js +0 -11
- package/dist/elements/p-ac17ed6a.entry.js +0 -1
package/dist/cjs/elements.cjs.js
CHANGED
|
@@ -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-add-new-thing_31.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"],[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-
|
|
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_31.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"],[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;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -5,7 +5,7 @@ var index = require('./index-DCpu_nnH.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-add-new-thing_31.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"],[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-
|
|
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_31.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"],[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;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-DCpu_nnH.js');
|
|
4
|
+
|
|
5
|
+
const PosCase = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
index.registerInstance(this, hostRef);
|
|
8
|
+
this.error = null;
|
|
9
|
+
}
|
|
10
|
+
componentWillLoad() {
|
|
11
|
+
const templateElement = this.host.querySelector('template');
|
|
12
|
+
if (templateElement == null) {
|
|
13
|
+
this.error = 'No template element found';
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
render() {
|
|
17
|
+
if (this.error)
|
|
18
|
+
return this.error;
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
get host() { return index.getElement(this); }
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
exports.pos_case = PosCase;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-DCpu_nnH.js');
|
|
4
|
+
var ResourceAware = require('./ResourceAware-uqh9ZRDt.js');
|
|
5
|
+
|
|
6
|
+
const PosSwitch = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
index.registerInstance(this, hostRef);
|
|
9
|
+
this.subscribeResource = index.createEvent(this, "pod-os:resource", 7);
|
|
10
|
+
this.error = null;
|
|
11
|
+
this.receiveResource = (resource) => {
|
|
12
|
+
this.resource = resource;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
componentWillLoad() {
|
|
16
|
+
ResourceAware.subscribeResource(this);
|
|
17
|
+
const caseElements = this.host.querySelectorAll('pos-case');
|
|
18
|
+
if (caseElements.length == 0) {
|
|
19
|
+
this.error = 'No pos-case elements found';
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
this.caseElements = caseElements;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
test(caseElement) {
|
|
26
|
+
let state = null;
|
|
27
|
+
if (caseElement.getAttribute('if-typeof') !== null) {
|
|
28
|
+
state = this.resource
|
|
29
|
+
.types()
|
|
30
|
+
.map(x => x.uri)
|
|
31
|
+
.includes(caseElement.getAttribute('if-typeof'));
|
|
32
|
+
}
|
|
33
|
+
if (caseElement.getAttribute('not') != null) {
|
|
34
|
+
state = !state;
|
|
35
|
+
}
|
|
36
|
+
return state;
|
|
37
|
+
}
|
|
38
|
+
render() {
|
|
39
|
+
if (this.error) {
|
|
40
|
+
return this.error;
|
|
41
|
+
}
|
|
42
|
+
if (!this.resource) {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
let state = null;
|
|
46
|
+
let activeElements = [];
|
|
47
|
+
this.caseElements.forEach(el => {
|
|
48
|
+
const elemState = this.test(el);
|
|
49
|
+
const includeCondition = state !== true || el.getAttribute('else') === null;
|
|
50
|
+
if (elemState && includeCondition) {
|
|
51
|
+
state = elemState;
|
|
52
|
+
activeElements.push(el);
|
|
53
|
+
}
|
|
54
|
+
if (elemState === null && includeCondition) {
|
|
55
|
+
activeElements.push(el);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
const activeElementsContent = activeElements.map(el => el.querySelector('template').innerHTML).join('\n');
|
|
59
|
+
return index.h(index.Host, { innerHTML: activeElementsContent });
|
|
60
|
+
}
|
|
61
|
+
get host() { return index.getElement(this); }
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
exports.pos_switch = PosSwitch;
|
|
@@ -44,6 +44,8 @@
|
|
|
44
44
|
"components/pos-router/pos-router.js",
|
|
45
45
|
"components/pos-select-term/pos-select-term.js",
|
|
46
46
|
"components/pos-subjects/pos-subjects.js",
|
|
47
|
+
"components/pos-switch/pos-switch.js",
|
|
48
|
+
"components/pos-switch/pos-case/pos-case.js",
|
|
47
49
|
"components/pos-tool-select/pos-tool-select.js",
|
|
48
50
|
"components/pos-type-badges/pos-type-badges.js",
|
|
49
51
|
"components/pos-type-index-entries/pos-type-index-entries.js",
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defines a template to use if the specified condition is met - to be used with [pos-switch](https://pod-os.org/reference/elements/components/pos-switch/).
|
|
3
|
+
* See [storybook](https://pod-os.github.io/PodOS/storybook/?path=/story/basics--pos-switch) for an example.
|
|
4
|
+
*/
|
|
5
|
+
export class PosCase {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.error = null;
|
|
8
|
+
}
|
|
9
|
+
componentWillLoad() {
|
|
10
|
+
const templateElement = this.host.querySelector('template');
|
|
11
|
+
if (templateElement == null) {
|
|
12
|
+
this.error = 'No template element found';
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
if (this.error)
|
|
17
|
+
return this.error;
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
static get is() { return "pos-case"; }
|
|
21
|
+
static get properties() {
|
|
22
|
+
return {
|
|
23
|
+
"ifTypeof": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"mutable": false,
|
|
26
|
+
"complexType": {
|
|
27
|
+
"original": "string",
|
|
28
|
+
"resolved": "string",
|
|
29
|
+
"references": {}
|
|
30
|
+
},
|
|
31
|
+
"required": false,
|
|
32
|
+
"optional": true,
|
|
33
|
+
"docs": {
|
|
34
|
+
"tags": [],
|
|
35
|
+
"text": "Test if the resource is of the specified type"
|
|
36
|
+
},
|
|
37
|
+
"getter": false,
|
|
38
|
+
"setter": false,
|
|
39
|
+
"reflect": false,
|
|
40
|
+
"attribute": "if-typeof"
|
|
41
|
+
},
|
|
42
|
+
"not": {
|
|
43
|
+
"type": "boolean",
|
|
44
|
+
"mutable": false,
|
|
45
|
+
"complexType": {
|
|
46
|
+
"original": "boolean",
|
|
47
|
+
"resolved": "boolean",
|
|
48
|
+
"references": {}
|
|
49
|
+
},
|
|
50
|
+
"required": false,
|
|
51
|
+
"optional": true,
|
|
52
|
+
"docs": {
|
|
53
|
+
"tags": [],
|
|
54
|
+
"text": "Negates the result of the test"
|
|
55
|
+
},
|
|
56
|
+
"getter": false,
|
|
57
|
+
"setter": false,
|
|
58
|
+
"reflect": false,
|
|
59
|
+
"attribute": "not"
|
|
60
|
+
},
|
|
61
|
+
"else": {
|
|
62
|
+
"type": "boolean",
|
|
63
|
+
"mutable": false,
|
|
64
|
+
"complexType": {
|
|
65
|
+
"original": "boolean",
|
|
66
|
+
"resolved": "boolean",
|
|
67
|
+
"references": {}
|
|
68
|
+
},
|
|
69
|
+
"required": false,
|
|
70
|
+
"optional": true,
|
|
71
|
+
"docs": {
|
|
72
|
+
"tags": [],
|
|
73
|
+
"text": "The test only evaluates to true if tests for preceding cases have failed"
|
|
74
|
+
},
|
|
75
|
+
"getter": false,
|
|
76
|
+
"setter": false,
|
|
77
|
+
"reflect": false,
|
|
78
|
+
"attribute": "else"
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
static get states() {
|
|
83
|
+
return {
|
|
84
|
+
"error": {}
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
static get elementRef() { return "host"; }
|
|
88
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
import { subscribeResource } from "../events/ResourceAware";
|
|
3
|
+
/**
|
|
4
|
+
* Selects a child template to render based on properties of the subject resource, usually defined by an ancestor `pos-resource` element.
|
|
5
|
+
* See [storybook](https://pod-os.github.io/PodOS/storybook/?path=/story/basics--pos-switch) for an example.
|
|
6
|
+
* See [pos-case](https://pod-os.org/reference/elements/components/pos-switch/pos-case/) for available filter conditions.
|
|
7
|
+
*/
|
|
8
|
+
export class PosSwitch {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.error = null;
|
|
11
|
+
this.receiveResource = (resource) => {
|
|
12
|
+
this.resource = resource;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
componentWillLoad() {
|
|
16
|
+
subscribeResource(this);
|
|
17
|
+
const caseElements = this.host.querySelectorAll('pos-case');
|
|
18
|
+
if (caseElements.length == 0) {
|
|
19
|
+
this.error = 'No pos-case elements found';
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
this.caseElements = caseElements;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
test(caseElement) {
|
|
26
|
+
let state = null;
|
|
27
|
+
if (caseElement.getAttribute('if-typeof') !== null) {
|
|
28
|
+
state = this.resource
|
|
29
|
+
.types()
|
|
30
|
+
.map(x => x.uri)
|
|
31
|
+
.includes(caseElement.getAttribute('if-typeof'));
|
|
32
|
+
}
|
|
33
|
+
if (caseElement.getAttribute('not') != null) {
|
|
34
|
+
state = !state;
|
|
35
|
+
}
|
|
36
|
+
return state;
|
|
37
|
+
}
|
|
38
|
+
render() {
|
|
39
|
+
if (this.error) {
|
|
40
|
+
return this.error;
|
|
41
|
+
}
|
|
42
|
+
if (!this.resource) {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
let state = null;
|
|
46
|
+
let activeElements = [];
|
|
47
|
+
this.caseElements.forEach(el => {
|
|
48
|
+
const elemState = this.test(el);
|
|
49
|
+
const includeCondition = state !== true || el.getAttribute('else') === null;
|
|
50
|
+
if (elemState && includeCondition) {
|
|
51
|
+
state = elemState;
|
|
52
|
+
activeElements.push(el);
|
|
53
|
+
}
|
|
54
|
+
if (elemState === null && includeCondition) {
|
|
55
|
+
activeElements.push(el);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
const activeElementsContent = activeElements.map(el => el.querySelector('template').innerHTML).join('\n');
|
|
59
|
+
return h(Host, { innerHTML: activeElementsContent });
|
|
60
|
+
}
|
|
61
|
+
static get is() { return "pos-switch"; }
|
|
62
|
+
static get states() {
|
|
63
|
+
return {
|
|
64
|
+
"error": {},
|
|
65
|
+
"resource": {},
|
|
66
|
+
"caseElements": {},
|
|
67
|
+
"templateString": {}
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
static get events() {
|
|
71
|
+
return [{
|
|
72
|
+
"method": "subscribeResource",
|
|
73
|
+
"name": "pod-os:resource",
|
|
74
|
+
"bubbles": true,
|
|
75
|
+
"cancelable": true,
|
|
76
|
+
"composed": true,
|
|
77
|
+
"docs": {
|
|
78
|
+
"tags": [],
|
|
79
|
+
"text": ""
|
|
80
|
+
},
|
|
81
|
+
"complexType": {
|
|
82
|
+
"original": "any",
|
|
83
|
+
"resolved": "any",
|
|
84
|
+
"references": {}
|
|
85
|
+
}
|
|
86
|
+
}];
|
|
87
|
+
}
|
|
88
|
+
static get elementRef() { return "host"; }
|
|
89
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface PosCase extends Components.PosCase, HTMLElement {}
|
|
4
|
+
export const PosCase: {
|
|
5
|
+
prototype: PosCase;
|
|
6
|
+
new (): PosCase;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{proxyCustomElement as e,HTMLElement as t,transformTag as s}from"@stencil/core/internal/client";const n=e(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.error=null}componentWillLoad(){null==this.host.querySelector("template")&&(this.error="No template element found")}render(){return this.error?this.error:null}get host(){return this}},[0,"pos-case",{ifTypeof:[1,"if-typeof"],not:[4],else:[4],error:[32]}]),o=n,l=function(){"undefined"!=typeof customElements&&["pos-case"].forEach((e=>{"pos-case"===e&&(customElements.get(s(e))||customElements.define(s(e),n))}))};export{o as PosCase,l as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface PosSwitch extends Components.PosSwitch, HTMLElement {}
|
|
4
|
+
export const PosSwitch: {
|
|
5
|
+
prototype: PosSwitch;
|
|
6
|
+
new (): PosSwitch;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{proxyCustomElement as t,HTMLElement as s,createEvent as e,h as n,Host as o,transformTag as i}from"@stencil/core/internal/client";import{s as r}from"./ResourceAware.js";const l=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.subscribeResource=e(this,"pod-os:resource",7),this.error=null,this.receiveResource=t=>{this.resource=t}}componentWillLoad(){r(this);const t=this.host.querySelectorAll("pos-case");0==t.length?this.error="No pos-case elements found":this.caseElements=t}test(t){let s=null;return null!==t.getAttribute("if-typeof")&&(s=this.resource.types().map((t=>t.uri)).includes(t.getAttribute("if-typeof"))),null!=t.getAttribute("not")&&(s=!s),s}render(){if(this.error)return this.error;if(!this.resource)return null;let t=null,s=[];this.caseElements.forEach((e=>{const n=this.test(e),o=!0!==t||null===e.getAttribute("else");n&&o&&(t=n,s.push(e)),null===n&&o&&s.push(e)}));const e=s.map((t=>t.querySelector("template").innerHTML)).join("\n");return n(o,{innerHTML:e})}get host(){return this}},[0,"pos-switch",{error:[32],resource:[32],caseElements:[32],templateString:[32]}]),c=l,u=function(){"undefined"!=typeof customElements&&["pos-switch"].forEach((t=>{"pos-switch"===t&&(customElements.get(i(t))||customElements.define(i(t),l))}))};export{c as PosSwitch,u as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,B as o,d as r,w as t,N as a,
|
|
1
|
+
import{p as e,B as o,d as r,w as t,N as a,e as i,g as n,b as p}from"./p-DMWc6mBG.js";export{s as setNonce}from"./p-DMWc6mBG.js";var d=e=>{const o=e.cloneNode;e.cloneNode=function(e){if("TEMPLATE"===this.nodeName)return o.call(this,e);const s=o.call(this,!1),r=this.childNodes;if(e)for(let e=0;e<r.length;e++)2!==r[e].nodeType&&s.appendChild(r[e].cloneNode(!0));return s}};(()=>{o.isDev&&!o.isTesting&&r("Running in development mode."),o.cloneNodeFix&&d(i.prototype);const s=o.scriptDataOpts?t.document&&Array.from(t.document.querySelectorAll("script")).find((e=>new RegExp(`/${a}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===a)):null,n=import.meta.url,p=o.scriptDataOpts&&(s||{})["data-opts"]||{};return""!==n&&(p.resourcesUrl=new URL(".",n).href),e(p)})().then((async e=>(await n(),p([["p-14b27181",[[1,"pos-app-generic"]]],["p-6d32b1b9",[[1,"pos-app-ldp-container"]]],["p-74bbaea1",[[1,"pos-app-rdf-document"]]],["p-f36c0084",[[1,"pos-app-image-viewer",{resource:[32]}]]],["p-aa541ea5",[[1,"pos-tool-attachments",{os:[32],resource:[32]}]]],["p-01cca2f2",[[1,"pos-app-document-viewer",{resource:[32]}]]],["p-bbf585d2",[[0,"pos-list",{rel:[1],ifTypeof:[1,"if-typeof"],fetch:[4],error:[32],os:[32],resource:[32],items:[32],templateString:[32]}]]],["p-1a6f9788",[[0,"pos-case",{ifTypeof:[1,"if-typeof"],not:[4],else:[4],error:[32]}]]],["p-85052eb1",[[0,"pos-switch",{error:[32],resource:[32],caseElements:[32],templateString:[32]}]]],["p-91354eb8",[[1,"pos-value",{predicate:[1],resource:[32]}]]],["p-4d495115",[[1,"pos-attachments",{resource:[32],attachments:[32],addToList:[64]}]]],["p-930c2b34",[[1,"pos-container-contents",{container:[32],contents:[32],loading:[32],createNewItem:[32]},[[0,"keydown","handleKeyDown"]]]]],["p-26f9dd67",[[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}]}]]],["p-cd252587",[[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"],[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}]}]]],["p-3b2dd0b0",[[1,"pos-relations",{data:[32]}],[1,"pos-reverse-relations",{data:[32]}]]],["p-8e44ba0d",[[1,"pos-subjects",{data:[32]}]]],["p-61984b97",[[1,"pos-markdown-document",{file:[16],saveStatus:[1,"save-status"],editable:[4],markdown:[32],isModified:[32],isEditing:[32],startEditing:[64],stopEditing:[64]}]]],["p-13976aa1",[[257,"pos-container-item",{resource:[32]}],[1,"pos-container-toolbar"],[1,"pos-create-new-container-item",{type:[1],container:[16],os:[32],name:[32]}]]],["p-264ddd4b",[[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}]}]]]],e))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,c as i,h as
|
|
1
|
+
import{r as s,c as i,h as r,H as e}from"./p-DMWc6mBG.js";import{s as o}from"./p-BW_CkW1K.js";const a=class{constructor(r){s(this,r),this.subscribeResource=i(this,"pod-os:resource",7),this.receiveResource=s=>{this.resource=s}}componentWillLoad(){o(this)}render(){return this.resource?r(e,null,r("section",null,r("pos-document",{src:this.resource.uri}))):null}};a.style=":host{--gap-size:var(--size-1);display:flex;flex-direction:column;gap:var(--gap-size);margin:var(--gap-size)}section{display:flex;flex-direction:column;gap:var(--gap-size)}@media (min-width: 640px){:host{--gap-size:var(--size-4);flex-direction:row;flex-wrap:wrap;section{&:first-of-type{flex:1}}section:not(:first-of-type){flex:0 0 30%}}}article{padding:var(--size-2);display:flex;flex-direction:column;gap:var(--size-2);outline:var(--pos-border-solid);border-radius:var(--radius-sm);box-shadow:var(--shadow-md);background-color:var(--pos-card-background);header{display:flex;flex-direction:column;gap:var(--size-2);h1{margin:0}}}";export{a as pos_app_document_viewer}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as t,h as s,
|
|
1
|
+
import{r as e,c as t,h as s,H as o,a}from"./p-DMWc6mBG.js";import{s as i}from"./p-BW_CkW1K.js";import"./p-DXbsIXSw.js";import"./p-DFjHkJRO.js";import{u as r}from"./p-D0uCfr1-.js";import"./p-Z7wimzYh.js";function n(e,t){return e.some((e=>e.uri===t))}const l=class{constructor(s){e(this,s),this.linkEmitter=t(this,"pod-os:link",7),this.subscribeResource=t(this,"pod-os:resource",7),this.receiveResource=e=>{this.resource=e}}componentWillLoad(){i(this)}render(){if(!this.resource)return null;const e=n(t=this.resource.types(),"http://www.w3.org/ns/ldp#Container")?"folder2":n(t,"http://www.w3.org/ns/ldp#Resource")?"file-earmark":"question-diamond";var t;return s("a",{href:this.resource.uri,onClick:e=>{e.preventDefault(),this.linkEmitter.emit(this.resource.uri)}},s("sl-icon",{name:e,slot:"start"}),s("slot",null))}};l.style=":host{display:flex}a{display:flex;text-decoration:none;padding:var(--size-4);width:var(--size-full);gap:var(--size-2);color:var(--pos-normal-text-color);background-color:var(--pos-background-color);&:hover{background-color:var(--pos-border-color)}}";const c=class{constructor(s){e(this,s),this.createNewFile=t(this,"pod-os:create-new-file",7),this.createNewFolder=t(this,"pod-os:create-new-folder",7)}render(){return s(o,{key:"e1d54dfcda6e524c222eb31f8fa799504e6279ba",role:"toolbar","aria-label":"Container actions"},s("sl-tooltip",{key:"44807305749f92f1fd124e55034bdd3332dfde64",content:"Create new file"},s("button",{key:"9e14fab58d54e2ebb3ca8252e02aa78b2cdcba77","aria-label":"Create new file",onClick:()=>this.createNewFile.emit()},s("sl-icon",{key:"f54684a26fb30d40a59d12c89f369748b901b084",name:"file-earmark-plus"}))),s("sl-tooltip",{key:"b97b05975037478df3af44b1ba5f83e69b4b2013",content:"Create new folder"},s("button",{key:"d1b7187b016554afe9924fd71cff4154b4966888","aria-label":"Create new folder",onClick:()=>this.createNewFolder.emit()},s("sl-icon",{key:"8b19ce8ab8ab968516a22621367282f5e8c6e583",name:"folder-plus"}))))}};c.style=":host{display:flex;gap:var(--size-1);padding-bottom:var(--size-1);button{padding:var(--size-2);aspect-ratio:1/1;display:flex}}";const d=class{constructor(s){e(this,s),this.linkEmitter=t(this,"pod-os:link",7),this.errorEmitter=t(this,"pod-os:error",7),this.handleInput=e=>{this.name=e.target.value}}async componentWillLoad(){this.os=await r(this.el)}componentDidLoad(){this.input.focus()}render(){const e=`Enter ${this.type} name`;return s("form",{key:"0144661eaae4e4cace6098477b6e3d5a88dee2e5",onSubmit:e=>this.submit(e)},s("sl-icon",{key:"c48b373fae21914fd379d8e98b83a1d9f97ecc9e",name:this.getIcon()}),s("input",{key:"da220ae7d719a4213e84bb156ebba719f596a069",type:"text",value:this.name,onInput:e=>this.handleInput(e),placeholder:e,ref:e=>this.input=e}))}getIcon(){return"file"===this.type?"file-earmark-plus":"folder-plus"}async submit(e){e.preventDefault();let t=await this.createNew();t.isOk()?this.linkEmitter.emit(t.value.url):this.errorEmitter.emit(t.error)}async createNew(){return"file"===this.type?this.os.files().createNewFile(this.container,this.name):this.os.files().createNewFolder(this.container,this.name)}get el(){return a(this)}};d.style=":host{form{display:flex;align-items:center;gap:var(--size-2);padding:var(--size-4);background-color:var(--pos-background-color)}}";export{l as pos_container_item,c as pos_container_toolbar,d as pos_create_new_container_item}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as a,
|
|
1
|
+
import{r as e,h as a,H as d}from"./p-DMWc6mBG.js";const c=class{constructor(a){e(this,a)}render(){return a(d,{key:"8e29bb7745cec5493c102c2262b14291eb9fb62a"},a("section",{key:"2da95db7a410290cb89f7d3bebaae29c35e05785"},a("article",{key:"00d74d2f184cc32711f05c4729d85b324157aefd","aria-labelledby":"thing-title"},a("header",{key:"6e5e770f2dfe63cad9ecfb1a4bfa00d6a3c8f367"},a("pos-picture",{key:"8b96bdc83505c8e0a9ca27dfb4dcd9f9a750cac2",blurredBackground:!0}),a("h1",{key:"1190b2d13425f69220b364c0be60622eab32a58b",id:"thing-title"},a("pos-label",{key:"3d326707131bd2aa78efce0a1f7d30a9579c382a"})),a("pos-type-badges",{key:"142231486b4eafdd64592f38ccf021f5877dff1a"})),a("main",{key:"bdc3cbb8d7d6b81c3ca46d1568be1a7b421e50c1"},a("pos-description",{key:"1f7751b5b1f27b48c0729189c417945b1df5e657"})))),a("section",{key:"23b415a0f702c122bd736d7f3cd094adf2fca6c0"},a("pos-literals",{key:"f8518f73b5a189fb8b68997ca000aaeb0f5b47a4"})),a("section",{key:"c118b3e4dea9c007cbccfe4972a9c68d02d8451e"},a("pos-relations",{key:"6e06c6dbf7f537bb945c9b35fdd59993518c2eb5"}),a("pos-reverse-relations",{key:"d20aba82f29d87ee3b22dcb71d92ea4f8318f544"})))}};c.style=":host{--gap-size:var(--size-1);display:flex;flex-direction:column;gap:var(--gap-size);margin:var(--gap-size)}article{outline:var(--pos-border-solid);border-radius:var(--radius-sm);box-shadow:var(--shadow-md);background-color:var(--pos-card-background);header{display:flex;flex-direction:column;pos-picture{--object-fit:contain;--width:100%;--height:auto;--max-height:300px;border-radius:var(--radius-sm) var(--radius-sm) 0 0;--border-radius:var(--radius-sm) var(--radius-sm) 0 0}h1,pos-type-badges{margin:var(--size-2)}}main{padding:var(--size-2);pos-description{color:var(--pos-secondary-text-color);font-weight:var(--weight-light)}}}@media (min-width: 640px){:host{flex-direction:row;flex-wrap:wrap;section:first-of-type{flex:0 0 25%}section:not(:first-of-type){flex:1}}}";export{c as pos_app_generic}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,a as s}from"./p-DMWc6mBG.js";const e=class{constructor(s){t(this,s),this.error=null}componentWillLoad(){null==this.host.querySelector("template")&&(this.error="No template element found")}render(){return this.error?this.error:null}get host(){return s(this)}};export{e as pos_case}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,c as o,h as t,H as e}from"./p-DMWc6mBG.js";import{l}from"./p-LoCE14bN.js";import{s as i}from"./p-jlzl8vRd.js";import{s as r}from"./p-BW_CkW1K.js";import"./p-DXbsIXSw.js";import"./p-DFjHkJRO.js";import"./p-Z7wimzYh.js";const a=class{constructor(t){s(this,t),this.subscribePodOs=o(this,"pod-os:init",7),this.subscribeResource=o(this,"pod-os:resource",7),this.addedLiteralValue=o(this,"pod-os:added-literal-value",7),this.error=o(this,"pod-os:error",7),this.receiveResource=s=>{this.resource=s},this.receivePodOs=async s=>{this.os=s}}setName(){}componentWillLoad(){r(this),i(this)}async save(){try{await this.os.addPropertyValue(this.resource,this.selectedTermUri,this.currentValue);const s={predicate:this.selectedTermUri,label:l(this.selectedTermUri),values:[this.currentValue]};this.addedLiteralValue.emit(s),this.currentValue=""}catch(s){this.error.emit(s)}}onTermSelected(s){this.selectedTermUri=s.detail.uri,this.valueInput.focus()}render(){var s;if(null===(s=this.resource)||void 0===s?void 0:s.editable)return t(e,null,t("sl-icon",{name:"plus-circle"}),t("pos-select-term",{placeholder:"Add literal","onPod-os:term-selected":s=>this.onTermSelected(s)}),t("input",{ref:s=>this.valueInput=s,value:this.currentValue,placeholder:"",onInput:s=>this.currentValue=s.target.value,onChange:()=>this.save()}))}static get watchers(){return{os:[{setName:0}]}}};a.style=":host{display:flex;align-items:center;gap:0.2rem}input{padding:var(--size-2);background-color:transparent;color:var(--pos-normal-text-color);border:none}input:focus{outline:2px solid var(--pos-primary-color);background-color:var(--pos-input-background-color);transition:outline 0.1s,\\n background-color 0.1s}";const n=class{constructor(t){s(this,t),this.subscribeResource=o(this,"pod-os:resource",7),this.data=[],this.receiveResource=s=>{this.data=s.literals()}}componentWillLoad(){r(this)}literalValueAdded(s){const o=this.data.find((o=>o.predicate===s.predicate));this.data=o?this.data.map((t=>t.predicate===o.predicate?{predicate:o.predicate,label:o.label,values:[...o.values,...s.values]}:t)):[...this.data,s]}render(){return t(e,{key:"79a29288f727943c57b62ffc4f3090ecf236f693"},this.data.length>0?t("dl",null,this.data.map((s=>t("div",{class:"predicate-values"},t("dt",null,t("pos-predicate",{uri:s.predicate,label:s.label})),t("div",{class:"values"},s.values.map((s=>t("dd",null,s)))))))):null,t("pos-add-literal-value",{key:"68d1936aca1dff7ff11493266aaf8e3c4d6d67e6","onPod-os:added-literal-value":s=>this.literalValueAdded(s.detail)}))}};n.style=":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)}dd{padding:0;margin:0}dl{padding:0;margin:0;display:flex;flex-direction:column;gap:var(--size-1)}dt{margin-bottom:var(--size-1)}.predicate-values:nth-child(odd){background-color:var(--background-color-odd)}.predicate-values:nth-child(even){background-color:var(--background-color-even)}.predicate-values{display:flex;flex-direction:column;border:var(--size-px) solid var(--border-color);padding:var(--size-2);gap:var(--size-1);.values{display:flex;flex-direction:column;gap:var(--size-2)}}";const c=class{constructor(t){s(this,t),this.subscribeResource=o(this,"pod-os:resource",7),this.data=[],this.typeLabels=[],this.isExpanded=!1,this.receiveResource=s=>{this.data=s.types(),this.typeLabels=[...new Set(s.types().map((s=>s.label)))]}}componentWillLoad(){r(this)}toggleDetails(){this.isExpanded=!this.isExpanded}render(){return 0==this.data.length?null:this.isExpanded?t("div",{class:"types expanded"},t("sl-tooltip",{content:"Collapse types"},t("button",{class:"toggle",onClick:()=>this.toggleDetails()},t("sl-icon",{name:"arrows-collapse"}))),t("ul",null,this.data.map((s=>t("li",null,s.uri))))):t(e,null,t("div",{class:"types"},t("ul",null,this.typeLabels.map((s=>t("li",null,s)))),t("sl-tooltip",{content:"Expand types"},t("button",{class:"toggle",onClick:()=>this.toggleDetails()},t("sl-icon",{name:"arrows-expand"})))))}};c.style=".types{display:flex;gap:var(--size-1)}.expanded{flex-direction:column;justify-content:flex-start;align-items:flex-start;ul{flex-direction:column}}button.toggle{display:flex;cursor:pointer;justify-content:center;align-items:center;aspect-ratio:1 / 1}ul{margin:0;padding:0;display:flex;flex-direction:row;font-size:var(--size-3);gap:var(--size-2);li{cursor:default;display:inline-flex;align-items:center;padding:var(--size-1);border-radius:var(--radius-sm);background-color:var(--pos-subtle-text-color);color:var(--pos-background-color);list-style:none}}";export{a as pos_add_literal_value,n as pos_literals,c as pos_type_badges}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as s}from"./p-
|
|
1
|
+
import{r as t,c as e,h as s}from"./p-DMWc6mBG.js";import{s as i,B as o}from"./p-Dpe4DEvs.js";import"./p-DXbsIXSw.js";import"./p-Z7wimzYh.js";const h=class{constructor(s){t(this,s),this.initializeOsEmitter=e(this,"pod-os:init",7),this.resourceLoadedEmitter=e(this,"pod-os:resource-loaded",7),this.errorEmitter=e(this,"pod-os:error",7),this.saveStatus="idle",this.loading=!0,this.isEditable=!1,this.setOs=async t=>{this.os=t}}componentWillLoad(){i.onChange("isLoggedIn",(()=>this.fetchBlob())),this.initializeOsEmitter.emit(this.setOs)}async handleDocumentModified(t){const{file:e,newContent:s}=t.detail;try{this.saveStatus="saving";const t=await this.os.files().putFile(e,s);if(t.ok)this.saveStatus="idle";else{this.saveStatus="failed";const e=new Error(`Failed to save file: ${t.status} ${t.statusText}`);this.errorEmitter.emit(e)}}catch(t){this.saveStatus="failed",this.errorEmitter.emit(t)}}async fetchBlob(){try{this.loading=!0;const t=await this.os.files().fetchFile(this.src),e=this.os.store.get(this.src);this.isEditable=null==e?void 0:e.editable,this.resourceLoadedEmitter.emit(this.src),t.blob()?(this.file=t,this.error=null):this.brokenFile=t}catch(t){this.error=t}finally{this.loading=!1}}render(){return this.loading?s(r,null):this.error?s("div",{class:"error"},this.error.message):this.brokenFile?s(o,{file:this.brokenFile}):"text/markdown"===this.file.blob().type?s("pos-markdown-document",{editable:this.isEditable,saveStatus:this.saveStatus,file:this.file}):s("iframe",{src:URL.createObjectURL(this.file.blob())})}static get watchers(){return{os:[{fetchBlob:0}],src:[{fetchBlob:0}]}}};function r(){return s("div",{class:"skeleton"},s("sl-skeleton",{effect:"sheen"}),s("sl-skeleton",{effect:"sheen"}),s("sl-skeleton",{effect:"sheen"}),s("sl-skeleton",{effect:"sheen"}),s("sl-skeleton",{effect:"sheen"}),s("sl-skeleton",{effect:"sheen"}))}h.style="iframe{background-color:var(--pos-background-color);width:100%;height:100vh}.error{display:flex;opacity:0.8;background:repeating-linear-gradient(-45deg, rgba(150, 0, 0, 0.1), rgba(150, 0, 0, 0.1) 10px, #fff 5px, #fff 25px);flex-direction:column;border:1px solid red;color:black;align-items:center;justify-content:center;word-break:break-all;padding:1rem;box-sizing:border-box}.error{color:#282828;font-size:calc(var(--width) / 2)}a{text-decoration:none;width:var(--width);height:var(--height)}.code{font-weight:bold;font-size:calc(var(--width) / 8)}.text{font-size:calc(var(--width) / 20)}.skeleton{display:flex;gap:var(--size-2);flex-direction:column;sl-skeleton{&:nth-child(2){width:95%}&:nth-child(4){width:90%}&:last-child{width:50%}}}";export{h as pos_document}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,c as r,h as a}from"./p-
|
|
1
|
+
import{r as o,c as r,h as a}from"./p-DMWc6mBG.js";import{s as l}from"./p-BW_CkW1K.js";const c=class{constructor(a){o(this,a),this.subscribeResource=r(this,"pod-os:resource",7),this.data=[],this.receiveResource=o=>{this.data=o.relations()}}componentWillLoad(){l(this)}render(){const o=this.data.map((o=>a("div",{class:"predicate-values"},a("dt",null,a("pos-predicate",{uri:o.predicate,label:o.label})),a("div",{class:"values"},o.uris.map((o=>a("dd",null,a("pos-rich-link",{uri:o}))))))));return this.data.length>0?a("dl",null,o):null}};c.style=":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)}dd{padding:0;margin:0}dl{display:flex;flex-direction:column;gap:var(--size-1);padding:0;margin:0}dt{margin-bottom:var(--size-1)}.predicate-values:nth-child(odd){background-color:var(--background-color-odd)}.predicate-values:nth-child(even){background-color:var(--background-color-even)}.predicate-values{display:flex;flex-direction:column;border:var(--size-px) solid var(--border-color);padding:var(--size-2);gap:var(--size-1);.values{display:flex;flex-direction:column;gap:var(--size-3)}}pos-rich-link{--background-color:inherit}";const s=class{constructor(a){o(this,a),this.subscribeResource=r(this,"pod-os:resource",7),this.data=[],this.receiveResource=o=>{this.data=o.reverseRelations()}}componentWillLoad(){l(this)}render(){const o=this.data.map((o=>a("div",{class:"predicate-values"},a("dt",null,a("pos-predicate",{uri:o.predicate,label:`is ${o.label} of`})),a("div",{class:"values"},o.uris.map((o=>a("dd",null,a("pos-rich-link",{uri:o}))))))));return this.data.length>0?a("dl",null,o):null}};s.style=":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)}dd{padding:0;margin:0}dl{display:flex;flex-direction:column;gap:var(--size-1);padding:0;margin:0}dt{margin-bottom:var(--size-1)}.predicate-values:nth-child(odd){background-color:var(--background-color-odd)}.predicate-values:nth-child(even){background-color:var(--background-color-even)}.predicate-values{display:flex;flex-direction:column;border:var(--size-px) solid var(--border-color);padding:var(--size-2);gap:var(--size-1);.values{display:flex;flex-direction:column;gap:var(--size-3)}}pos-rich-link{--background-color:inherit}";export{c as pos_relations,s as pos_reverse_relations}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,h as r,
|
|
1
|
+
import{r as o,h as r,H as a,a as s}from"./p-DMWc6mBG.js";import{u as c}from"./p-yVO4JQ9P.js";const n=class{constructor(r){o(this,r)}async addToList(o){this.attachments=[...this.attachments,Object.assign(Object.assign({},o),{newlyAdded:!0})]}async componentWillLoad(){this.resource=await c(this.el),this.attachments=this.resource.attachments()}render(){return 0===this.attachments.length?r(a,null,"No attachments found."):r("ul",null,this.attachments.map((o=>r("li",{class:{new:o.newlyAdded}},r("pos-rich-link",{uri:o.uri})))))}get el(){return s(this)}};n.style=":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{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:var(--size-1);li{padding:var(--size-1);&:nth-child(even){background-color:var(--background-color-even)}&:nth-child(odd){background-color:var(--background-color-odd)}&.new{animation:newItemBounce 0.8s ease-out,\\n highlightFlash 2.5s ease-in-out}}}}@keyframes newItemBounce{0%{transform:scale(0.95);opacity:0}60%{transform:scale(1.02)}100%{transform:scale(1);opacity:1}}@keyframes highlightFlash{0%{box-shadow:0 0 20px var(--pos-primary-color)}100%{box-shadow:0 0 0 transparent}}";export{n as pos_attachments}
|