@pod-os/elements 0.41.0 → 0.42.0-rc.0f398fa.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/{index-BPvAwpRj.js → index-D23j2vy6.js} +4028 -1835
- package/dist/cjs/{jsonld-V2RB47OZ-C8WVLsWC.js → jsonld-V2RB47OZ-DhXaPpBX.js} +1 -1
- package/dist/cjs/pos-add-literal-value_3.cjs.entry.js +1 -1
- package/dist/cjs/pos-add-new-thing_32.cjs.entry.js +1 -1
- package/dist/cjs/pos-add-relation.cjs.entry.js +1 -1
- package/dist/cjs/pos-container-contents.cjs.entry.js +1 -1
- package/dist/cjs/pos-subjects.cjs.entry.js +1 -1
- package/dist/components/index2.js +2 -2
- package/dist/elements/elements.esm.js +1 -1
- package/dist/elements/{p-b30e9b9c.entry.js → p-3f8a986d.entry.js} +1 -1
- package/dist/elements/{p-9b5c45b6.entry.js → p-77174022.entry.js} +1 -1
- package/dist/elements/p-Ca1wp41j.js +67 -0
- package/dist/elements/{p-7TsXf0Xj.js → p-Dkc-VPQo.js} +1 -1
- package/dist/elements/{p-a62af5eb.entry.js → p-ab0ba8f9.entry.js} +1 -1
- package/dist/elements/p-cfda419f.entry.js +1 -0
- package/dist/elements/{p-380d72c2.entry.js → p-db1b0365.entry.js} +1 -1
- package/dist/esm/{index-CmKOSDim.js → index-Bp4TGvR_.js} +4028 -1835
- package/dist/esm/{jsonld-V2RB47OZ-CIDz9zb9.js → jsonld-V2RB47OZ-DlcK_QRh.js} +1 -1
- package/dist/esm/pos-add-literal-value_3.entry.js +1 -1
- package/dist/esm/pos-add-new-thing_32.entry.js +1 -1
- package/dist/esm/pos-add-relation.entry.js +1 -1
- package/dist/esm/pos-container-contents.entry.js +1 -1
- package/dist/esm/pos-subjects.entry.js +1 -1
- package/package.json +2 -2
- package/dist/elements/p-BzjgviTt.js +0 -67
- package/dist/elements/p-c60dc303.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as e,H as i}from"./p-CsdCh9hf.js";import{L as n}from"./p-
|
|
1
|
+
import{r as t,c as s,h as e,H as i}from"./p-CsdCh9hf.js";import{L as n}from"./p-Ca1wp41j.js";import{s as o}from"./p-BW_CkW1K.js";import{c as r}from"./p-vFMstSdt.js";const l=class{constructor(e){t(this,e),this.subscribeResource=s(this,"pod-os:resource",7),this.contents=[],this.loading=!0,this.createNewItem=null,this.disconnected$=new r.Subject,this.receiveResource=t=>{this.container=t.assume(n),this.loading=!1,this.container.observeContains().pipe(r.takeUntil(this.disconnected$)).subscribe((t=>this.contents=t.toSorted(((t,s)=>t.name.localeCompare(s.name)))))}}onCreateNewFile(){this.createNewItem="file"}onCreateNewFolder(){this.createNewItem="folder"}componentWillLoad(){o(this)}handleKeyDown(t){"Escape"===t.key&&(this.createNewItem=null)}render(){if(this.loading)return null;const t=this.contents.map((t=>e("li",{key:t.uri},e("pos-resource",{lazy:!0,uri:t.uri},e("pos-container-item",null,t.name)))));return null!==this.createNewItem&&t.unshift(e("li",{key:"new-item"},e("pos-create-new-container-item",{type:this.createNewItem,container:this.container}))),e(i,null,e("pos-container-toolbar",{"onPod-os:create-new-file":()=>this.onCreateNewFile(),"onPod-os:create-new-folder":()=>this.onCreateNewFolder()}),t.length>0?e("ul",{"aria-label":"Container contents"},t):e("p",null,"The container is empty"))}disconnectedCallback(){this.disconnected$.next(),this.disconnected$.complete()}};l.style="ul{list-style:none;padding:0;margin:0}li{padding:0;margin:0}";export{l as pos_container_contents}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,c as t,h as o,H as r,a as i}from"./p-CsdCh9hf.js";import{u as a}from"./p-yVO4JQ9P.js";import"./p-KLP10Ef6.js";import{l as e}from"./p-Ca1wp41j.js";import{u as n}from"./p-D0uCfr1-.js";const l=class{constructor(o){s(this,o),this.addedRelation=t(this,"pod-os:added-relation",7),this.error=t(this,"pod-os:error",7)}async componentWillLoad(){this.os=await n(this.el),this.resource=await a(this.el)}onTermSelected(s){this.valueInput.focus(),this.selectedTermUri=s.detail.uri}async save(){try{await this.os.addRelation(this.resource,this.selectedTermUri,this.currentValue);const s={predicate:this.selectedTermUri,label:e(this.selectedTermUri),uris:[this.currentValue]};this.addedRelation.emit(s),this.currentValue=""}catch(s){this.error.emit(s)}}render(){if(this.resource.editable)return o(r,null,o("sl-icon",{name:"plus-circle"}),o("pos-select-term",{placeholder:"Add relation","onPod-os:term-selected":s=>this.onTermSelected(s)}),o("input",{ref:s=>this.valueInput=s,type:"url","aria-label":"URI",placeholder:"",value:this.currentValue,onInput:s=>this.currentValue=s.target.value,onChange:()=>this.save()}))}get el(){return i(this)}};l.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, background-color 0.1s}";export{l as pos_add_relation}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,c as r,h as s}from"./p-CsdCh9hf.js";import{R as c}from"./p-
|
|
1
|
+
import{r as o,c as r,h as s}from"./p-CsdCh9hf.js";import{R as c}from"./p-Ca1wp41j.js";import{s as l}from"./p-BW_CkW1K.js";const a=class{constructor(s){o(this,s),this.subscribeResource=r(this,"pod-os:resource",7),this.data=[],this.receiveResource=o=>{const r=o.assume(c);this.data=r.subjects()}}componentWillLoad(){l(this)}render(){const o=this.data.map((o=>s("li",null,s("pos-rich-link",{uri:o.uri}))));return this.data.length>0?s("ul",null,o):null}};a.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{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)}}}";export{a as pos_subjects}
|