@pod-os/elements 0.20.1-cc6dad2.0 → 0.20.1-facecbd.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 (44) hide show
  1. package/dist/cjs/ion-badge_10.cjs.entry.js +3 -3
  2. package/dist/cjs/ion-badge_10.cjs.entry.js.map +1 -1
  3. package/dist/cjs/pos-container-contents.cjs.entry.js +1 -1
  4. package/dist/cjs/pos-container-contents.cjs.entry.js.map +1 -1
  5. package/dist/cjs/pos-relations_2.cjs.entry.js +4 -4
  6. package/dist/cjs/pos-relations_2.cjs.entry.js.map +1 -1
  7. package/dist/collection/components/pos-container-contents/pos-container-contents.js +1 -1
  8. package/dist/collection/components/pos-container-contents/pos-container-contents.js.map +1 -1
  9. package/dist/collection/components/pos-literals/pos-literals.css +6 -0
  10. package/dist/collection/components/pos-literals/pos-literals.js +1 -1
  11. package/dist/collection/components/pos-literals/pos-literals.js.map +1 -1
  12. package/dist/collection/components/pos-predicate/pos-predicate.css +2 -0
  13. package/dist/collection/components/pos-relations/pos-relations.css +6 -0
  14. package/dist/collection/components/pos-relations/pos-relations.js +1 -1
  15. package/dist/collection/components/pos-relations/pos-relations.js.map +1 -1
  16. package/dist/collection/components/pos-reverse-relations/pos-reverse-relations.css +5 -0
  17. package/dist/collection/components/pos-reverse-relations/pos-reverse-relations.js +1 -1
  18. package/dist/collection/components/pos-reverse-relations/pos-reverse-relations.js.map +1 -1
  19. package/dist/components/pos-container-contents2.js +1 -1
  20. package/dist/components/pos-container-contents2.js.map +1 -1
  21. package/dist/components/pos-literals2.js +2 -2
  22. package/dist/components/pos-literals2.js.map +1 -1
  23. package/dist/components/pos-predicate2.js +1 -1
  24. package/dist/components/pos-predicate2.js.map +1 -1
  25. package/dist/components/pos-relations2.js +2 -2
  26. package/dist/components/pos-relations2.js.map +1 -1
  27. package/dist/components/pos-reverse-relations2.js +2 -2
  28. package/dist/components/pos-reverse-relations2.js.map +1 -1
  29. package/dist/elements/elements.esm.js +1 -1
  30. package/dist/elements/p-299b96db.entry.js +2 -0
  31. package/dist/elements/p-299b96db.entry.js.map +1 -0
  32. package/dist/elements/{p-4771bcef.entry.js → p-7dae9efe.entry.js} +2 -2
  33. package/dist/elements/{p-4771bcef.entry.js.map → p-7dae9efe.entry.js.map} +1 -1
  34. package/dist/elements/{p-20f8a265.entry.js → p-f8dd1bea.entry.js} +2 -2
  35. package/dist/elements/{p-20f8a265.entry.js.map → p-f8dd1bea.entry.js.map} +1 -1
  36. package/dist/esm/ion-badge_10.entry.js +3 -3
  37. package/dist/esm/ion-badge_10.entry.js.map +1 -1
  38. package/dist/esm/pos-container-contents.entry.js +1 -1
  39. package/dist/esm/pos-container-contents.entry.js.map +1 -1
  40. package/dist/esm/pos-relations_2.entry.js +4 -4
  41. package/dist/esm/pos-relations_2.entry.js.map +1 -1
  42. package/package.json +1 -1
  43. package/dist/elements/p-dbac8ce3.entry.js +0 -2
  44. package/dist/elements/p-dbac8ce3.entry.js.map +0 -1
@@ -24,7 +24,7 @@ const PosContainerContents = class {
24
24
  render() {
25
25
  if (this.loading)
26
26
  return null;
27
- const items = this.contents.map(it => (index.h("pos-resource", { lazy: true, uri: it.uri }, index.h("pos-container-item", { role: "listitem" }, index.h("ion-label", null, index.h("h3", null, it.name), index.h("p", null, it.uri))))));
27
+ const items = this.contents.map(it => (index.h("pos-resource", { lazy: true, uri: it.uri }, index.h("pos-container-item", { role: "listitem" }, index.h("ion-label", null, index.h("h3", null, it.name))))));
28
28
  return this.contents.length > 0 ? index.h("ion-list", null, items) : index.h("p", null, "The container is empty");
29
29
  }
30
30
  };
@@ -1 +1 @@
1
- {"file":"pos-container-contents.entry.cjs.js","mappings":";;;;;;;;MAQa,oBAAoB;;;;QAY/B,oBAAe,GAAG,CAAC,QAAe;YAChC,MAAM,GAAG,GAAG,QAAQ,CAAC,MAAM,CAACA,oBAAY,CAAC,CAAC;YAC1C,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;YACrB,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;SAC7E,CAAC;wBAfsC,EAAE;uBAEvB,IAAI;;IAKvB,iBAAiB;QACfC,+BAAiB,CAAC,IAAI,CAAC,CAAC;KACzB;IAQD,MAAM;QACJ,IAAI,IAAI,CAAC,OAAO;YAAE,OAAO,IAAI,CAAC;QAC9B,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,KAChCC,0BAAc,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC,GAAG,IACnCA,gCAAoB,IAAI,EAAC,UAAU,IACjCA,2BACEA,oBAAK,EAAE,CAAC,IAAI,CAAM,EAClBA,mBAAI,EAAE,CAAC,GAAG,CAAK,CACL,CACO,CACR,CAChB,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,GAAGA,0BAAW,KAAK,CAAY,GAAGA,4CAA6B,CAAC;KAChG;;;;;","names":["LdpContainer","subscribeResource","h"],"sources":["src/components/pos-container-contents/pos-container-contents.tsx"],"sourcesContent":["import { Thing, ContainerContent, LdpContainer } from '@pod-os/core';\nimport { Component, Event, EventEmitter, h, State } from '@stencil/core';\nimport { ResourceAware, subscribeResource } from '../events/ResourceAware';\n\n@Component({\n tag: 'pos-container-contents',\n shadow: true,\n})\nexport class PosContainerContents implements ResourceAware {\n @State() contents: ContainerContent[] = [];\n\n @State() loading = true;\n\n @Event({ eventName: 'pod-os:resource' })\n subscribeResource: EventEmitter;\n\n componentWillLoad() {\n subscribeResource(this);\n }\n\n receiveResource = (resource: Thing) => {\n const doc = resource.assume(LdpContainer);\n this.loading = false;\n this.contents = doc.contains().sort((a, b) => a.name.localeCompare(b.name));\n };\n\n render() {\n if (this.loading) return null;\n const items = this.contents.map(it => (\n <pos-resource lazy={true} uri={it.uri}>\n <pos-container-item role=\"listitem\">\n <ion-label>\n <h3>{it.name}</h3>\n <p>{it.uri}</p>\n </ion-label>\n </pos-container-item>\n </pos-resource>\n ));\n return this.contents.length > 0 ? <ion-list>{items}</ion-list> : <p>The container is empty</p>;\n }\n}\n"],"version":3}
1
+ {"file":"pos-container-contents.entry.cjs.js","mappings":";;;;;;;;MAQa,oBAAoB;;;;QAY/B,oBAAe,GAAG,CAAC,QAAe;YAChC,MAAM,GAAG,GAAG,QAAQ,CAAC,MAAM,CAACA,oBAAY,CAAC,CAAC;YAC1C,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;YACrB,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;SAC7E,CAAC;wBAfsC,EAAE;uBAEvB,IAAI;;IAKvB,iBAAiB;QACfC,+BAAiB,CAAC,IAAI,CAAC,CAAC;KACzB;IAQD,MAAM;QACJ,IAAI,IAAI,CAAC,OAAO;YAAE,OAAO,IAAI,CAAC;QAC9B,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,KAChCC,0BAAc,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC,GAAG,IACnCA,gCAAoB,IAAI,EAAC,UAAU,IACjCA,2BACEA,oBAAK,EAAE,CAAC,IAAI,CAAM,CACR,CACO,CACR,CAChB,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,GAAGA,0BAAW,KAAK,CAAY,GAAGA,4CAA6B,CAAC;KAChG;;;;;","names":["LdpContainer","subscribeResource","h"],"sources":["src/components/pos-container-contents/pos-container-contents.tsx"],"sourcesContent":["import { Thing, ContainerContent, LdpContainer } from '@pod-os/core';\nimport { Component, Event, EventEmitter, h, State } from '@stencil/core';\nimport { ResourceAware, subscribeResource } from '../events/ResourceAware';\n\n@Component({\n tag: 'pos-container-contents',\n shadow: true,\n})\nexport class PosContainerContents implements ResourceAware {\n @State() contents: ContainerContent[] = [];\n\n @State() loading = true;\n\n @Event({ eventName: 'pod-os:resource' })\n subscribeResource: EventEmitter;\n\n componentWillLoad() {\n subscribeResource(this);\n }\n\n receiveResource = (resource: Thing) => {\n const doc = resource.assume(LdpContainer);\n this.loading = false;\n this.contents = doc.contains().sort((a, b) => a.name.localeCompare(b.name));\n };\n\n render() {\n if (this.loading) return null;\n const items = this.contents.map(it => (\n <pos-resource lazy={true} uri={it.uri}>\n <pos-container-item role=\"listitem\">\n <ion-label>\n <h3>{it.name}</h3>\n </ion-label>\n </pos-container-item>\n </pos-resource>\n ));\n return this.contents.length > 0 ? <ion-list>{items}</ion-list> : <p>The container is empty</p>;\n }\n}\n"],"version":3}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-d7907358.js');
6
6
  const ResourceAware = require('./ResourceAware-7b6501ae.js');
7
7
 
8
- const posRelationsCss = ":host{--background-base-color:var(--color-grey-200);--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)}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)}pos-rich-link{--background-color:inherit}";
8
+ const posRelationsCss = ":host {\n --background-base-color: var(--color-grey-200);\n --background-color-even: hsl(from var(--background-base-color) h s calc(l + 7));\n --background-color-odd: hsl(from var(--background-base-color) h s calc(l + 10));\n --border-color: var(--background-base-color);\n}\n\ndd {\n padding: 0;\n margin: 0;\n}\n\ndl {\n display: flex;\n flex-direction: column;\n gap: var(--size-1);\n}\n\ndt {\n margin-bottom: var(--size-1);\n}\n\n.predicate-values:nth-child(odd) {\n background-color: var(--background-color-odd);\n}\n\n.predicate-values:nth-child(even) {\n background-color: var(--background-color-even);\n}\n\n.predicate-values {\n display: flex;\n flex-direction: column;\n border: var(--size-px) solid var(--border-color);\n padding: var(--size-2);\n gap: var(--size-1);\n\n .values {\n display: flex;\n flex-direction: column;\n gap: var(--size-3);\n }\n}\n\npos-rich-link {\n --background-color: inherit;\n}\n";
9
9
  const PosRelationsStyle0 = posRelationsCss;
10
10
 
11
11
  const PosRelations = class {
@@ -21,13 +21,13 @@ const PosRelations = class {
21
21
  ResourceAware.subscribeResource(this);
22
22
  }
23
23
  render() {
24
- const items = this.data.map(it => (index.h("div", { class: "predicate-values" }, index.h("dt", null, index.h("pos-predicate", { uri: it.predicate, label: it.label })), it.uris.map(uri => (index.h("dd", null, index.h("pos-rich-link", { uri: uri })))))));
24
+ const items = this.data.map(it => (index.h("div", { class: "predicate-values" }, index.h("dt", null, index.h("pos-predicate", { uri: it.predicate, label: it.label })), index.h("div", { class: "values" }, it.uris.map(uri => (index.h("dd", null, index.h("pos-rich-link", { uri: uri }))))))));
25
25
  return this.data.length > 0 ? index.h("dl", null, items) : null;
26
26
  }
27
27
  };
28
28
  PosRelations.style = PosRelationsStyle0;
29
29
 
30
- const posReverseRelationsCss = ":host{--background-base-color:var(--color-grey-200);--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)}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)}pos-rich-link{--background-color:inherit}";
30
+ const posReverseRelationsCss = ":host {\n --background-base-color: var(--color-grey-200);\n --background-color-even: hsl(from var(--background-base-color) h s calc(l + 7));\n --background-color-odd: hsl(from var(--background-base-color) h s calc(l + 10));\n --border-color: var(--background-base-color);\n}\n\ndd {\n padding: 0;\n margin: 0;\n}\n\ndl {\n display: flex;\n flex-direction: column;\n gap: var(--size-1);\n}\n\ndt {\n margin-bottom: var(--size-1);\n}\n\n.predicate-values:nth-child(odd) {\n background-color: var(--background-color-odd);\n}\n\n.predicate-values:nth-child(even) {\n background-color: var(--background-color-even);\n}\n\n.predicate-values {\n display: flex;\n flex-direction: column;\n border: var(--size-px) solid var(--border-color);\n padding: var(--size-2);\n gap: var(--size-1);\n .values {\n display: flex;\n flex-direction: column;\n gap: var(--size-3);\n }\n}\n\npos-rich-link {\n --background-color: inherit;\n}\n";
31
31
  const PosReverseRelationsStyle0 = posReverseRelationsCss;
32
32
 
33
33
  const PosReverseRelations = class {
@@ -43,7 +43,7 @@ const PosReverseRelations = class {
43
43
  ResourceAware.subscribeResource(this);
44
44
  }
45
45
  render() {
46
- const items = this.data.map(it => (index.h("div", { class: "predicate-values" }, index.h("dt", null, index.h("pos-predicate", { uri: it.predicate, label: `is ${it.label} of` })), it.uris.map(uri => (index.h("dd", null, index.h("pos-rich-link", { uri: uri })))))));
46
+ const items = this.data.map(it => (index.h("div", { class: "predicate-values" }, index.h("dt", null, index.h("pos-predicate", { uri: it.predicate, label: `is ${it.label} of` })), index.h("div", { class: "values" }, it.uris.map(uri => (index.h("dd", null, index.h("pos-rich-link", { uri: uri }))))))));
47
47
  return this.data.length > 0 ? index.h("dl", null, items) : null;
48
48
  }
49
49
  };
@@ -1 +1 @@
1
- {"file":"pos-relations.pos-reverse-relations.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,eAAe,GAAG,isBAAisB,CAAC;AAC1tB,2BAAe,eAAe;;MCQjB,YAAY;;;;QAUvB,oBAAe,GAAG,CAAC,QAAe;YAChC,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,SAAS,EAAE,CAAC;SAClC,CAAC;oBAX0B,EAAE;;IAK9B,iBAAiB;QACfA,+BAAiB,CAAC,IAAI,CAAC,CAAC;KACzB;IAMD,MAAM;QACJ,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,KAC5BC,iBAAK,KAAK,EAAC,kBAAkB,IAC3BA,oBACEA,2BAAe,GAAG,EAAE,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,GAAI,CAClD,EACJ,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,KACdA,oBACEA,2BAAe,GAAG,EAAE,GAAG,GAAI,CACxB,CACN,CAAC,CACE,CACP,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,GAAGA,oBAAK,KAAK,CAAM,GAAG,IAAI,CAAC;KACvD;;;;ACrCH,MAAM,sBAAsB,GAAG,isBAAisB,CAAC;AACjuB,kCAAe,sBAAsB;;MCQxB,mBAAmB;;;;QAS9B,oBAAe,GAAG,CAAC,QAAe;YAChC,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,gBAAgB,EAAE,CAAC;SACzC,CAAC;oBAV0B,EAAE;;IAI9B,iBAAiB;QACfD,+BAAiB,CAAC,IAAI,CAAC,CAAC;KACzB;IAMD,MAAM;QACJ,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,KAC5BC,iBAAK,KAAK,EAAC,kBAAkB,IAC3BA,oBACEA,2BAAe,GAAG,EAAE,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,KAAK,KAAK,GAAI,CAC7D,EACJ,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,KACdA,oBACEA,2BAAe,GAAG,EAAE,GAAG,GAAI,CACxB,CACN,CAAC,CACE,CACP,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,GAAGA,oBAAK,KAAK,CAAM,GAAG,IAAI,CAAC;KACvD;;;;;;;","names":["subscribeResource","h"],"sources":["src/components/pos-relations/pos-relations.css?tag=pos-relations&encapsulation=shadow","src/components/pos-relations/pos-relations.tsx","src/components/pos-reverse-relations/pos-reverse-relations.css?tag=pos-reverse-relations&encapsulation=shadow","src/components/pos-reverse-relations/pos-reverse-relations.tsx"],"sourcesContent":[":host {\n --background-base-color: var(--color-grey-200);\n --background-color-even: hsl(from var(--background-base-color) h s calc(l + 7));\n --background-color-odd: hsl(from var(--background-base-color) h s calc(l + 10));\n --border-color: var(--background-base-color);\n}\n\ndd {\n padding: 0;\n margin: 0;\n}\n\ndl {\n display: flex;\n flex-direction: column;\n gap: var(--size-1);\n}\n\ndt {\n margin-bottom: var(--size-1);\n}\n\n.predicate-values:nth-child(odd) {\n background-color: var(--background-color-odd);\n}\n\n.predicate-values:nth-child(even) {\n background-color: var(--background-color-even);\n}\n\n.predicate-values {\n display: flex;\n flex-direction: column;\n border: var(--size-px) solid var(--border-color);\n padding: var(--size-2);\n gap: var(--size-1);\n}\n\npos-rich-link {\n --background-color: inherit;\n}\n","import { Relation, Thing } from '@pod-os/core';\nimport { Component, Event, EventEmitter, h, State } from '@stencil/core';\nimport { ResourceAware, subscribeResource } from '../events/ResourceAware';\n\n@Component({\n tag: 'pos-relations',\n shadow: true,\n styleUrl: 'pos-relations.css',\n})\nexport class PosRelations implements ResourceAware {\n @State() data: Relation[] = [];\n\n @Event({ eventName: 'pod-os:resource' })\n subscribeResource: EventEmitter;\n\n componentWillLoad() {\n subscribeResource(this);\n }\n\n receiveResource = (resource: Thing) => {\n this.data = resource.relations();\n };\n\n render() {\n const items = this.data.map(it => (\n <div class=\"predicate-values\">\n <dt>\n <pos-predicate uri={it.predicate} label={it.label} />\n </dt>\n {it.uris.map(uri => (\n <dd>\n <pos-rich-link uri={uri} />\n </dd>\n ))}\n </div>\n ));\n return this.data.length > 0 ? <dl>{items}</dl> : null;\n }\n}\n",":host {\n --background-base-color: var(--color-grey-200);\n --background-color-even: hsl(from var(--background-base-color) h s calc(l + 7));\n --background-color-odd: hsl(from var(--background-base-color) h s calc(l + 10));\n --border-color: var(--background-base-color);\n}\n\ndd {\n padding: 0;\n margin: 0;\n}\n\ndl {\n display: flex;\n flex-direction: column;\n gap: var(--size-1);\n}\n\ndt {\n margin-bottom: var(--size-1);\n}\n\n.predicate-values:nth-child(odd) {\n background-color: var(--background-color-odd);\n}\n\n.predicate-values:nth-child(even) {\n background-color: var(--background-color-even);\n}\n\n.predicate-values {\n display: flex;\n flex-direction: column;\n border: var(--size-px) solid var(--border-color);\n padding: var(--size-2);\n gap: var(--size-1);\n}\n\npos-rich-link {\n --background-color: inherit;\n}\n","import { Relation, Thing } from '@pod-os/core';\nimport { Component, h, Event, EventEmitter, State } from '@stencil/core';\nimport { ResourceAware, subscribeResource } from '../events/ResourceAware';\n\n@Component({\n tag: 'pos-reverse-relations',\n shadow: true,\n styleUrl: 'pos-reverse-relations.css',\n})\nexport class PosReverseRelations implements ResourceAware {\n @State() data: Relation[] = [];\n\n @Event({ eventName: 'pod-os:resource' }) subscribeResource: EventEmitter;\n\n componentWillLoad() {\n subscribeResource(this);\n }\n\n receiveResource = (resource: Thing) => {\n this.data = resource.reverseRelations();\n };\n\n render() {\n const items = this.data.map(it => (\n <div class=\"predicate-values\">\n <dt>\n <pos-predicate uri={it.predicate} label={`is ${it.label} of`} />\n </dt>\n {it.uris.map(uri => (\n <dd>\n <pos-rich-link uri={uri} />\n </dd>\n ))}\n </div>\n ));\n return this.data.length > 0 ? <dl>{items}</dl> : null;\n }\n}\n"],"version":3}
1
+ {"file":"pos-relations.pos-reverse-relations.entry.cjs.js","mappings":";;;;;;;AAAA,MAAM,eAAe,GAAG,u7BAAu7B,CAAC;AACh9B,2BAAe,eAAe;;MCQjB,YAAY;;;;QAUvB,oBAAe,GAAG,CAAC,QAAe;YAChC,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,SAAS,EAAE,CAAC;SAClC,CAAC;oBAX0B,EAAE;;IAK9B,iBAAiB;QACfA,+BAAiB,CAAC,IAAI,CAAC,CAAC;KACzB;IAMD,MAAM;QACJ,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,KAC5BC,iBAAK,KAAK,EAAC,kBAAkB,IAC3BA,oBACEA,2BAAe,GAAG,EAAE,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,GAAI,CAClD,EACLA,iBAAK,KAAK,EAAC,QAAQ,IAChB,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,KACdA,oBACEA,2BAAe,GAAG,EAAE,GAAG,GAAI,CACxB,CACN,CAAC,CACE,CACF,CACP,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,GAAGA,oBAAK,KAAK,CAAM,GAAG,IAAI,CAAC;KACvD;;;;ACvCH,MAAM,sBAAsB,GAAG,q7BAAq7B,CAAC;AACr9B,kCAAe,sBAAsB;;MCQxB,mBAAmB;;;;QAS9B,oBAAe,GAAG,CAAC,QAAe;YAChC,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,gBAAgB,EAAE,CAAC;SACzC,CAAC;oBAV0B,EAAE;;IAI9B,iBAAiB;QACfD,+BAAiB,CAAC,IAAI,CAAC,CAAC;KACzB;IAMD,MAAM;QACJ,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,KAC5BC,iBAAK,KAAK,EAAC,kBAAkB,IAC3BA,oBACEA,2BAAe,GAAG,EAAE,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,KAAK,KAAK,GAAI,CAC7D,EACLA,iBAAK,KAAK,EAAC,QAAQ,IAChB,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,KACdA,oBACEA,2BAAe,GAAG,EAAE,GAAG,GAAI,CACxB,CACN,CAAC,CACE,CACF,CACP,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,GAAGA,oBAAK,KAAK,CAAM,GAAG,IAAI,CAAC;KACvD;;;;;;;","names":["subscribeResource","h"],"sources":["src/components/pos-relations/pos-relations.css?tag=pos-relations&encapsulation=shadow","src/components/pos-relations/pos-relations.tsx","src/components/pos-reverse-relations/pos-reverse-relations.css?tag=pos-reverse-relations&encapsulation=shadow","src/components/pos-reverse-relations/pos-reverse-relations.tsx"],"sourcesContent":[":host {\n --background-base-color: var(--color-grey-200);\n --background-color-even: hsl(from var(--background-base-color) h s calc(l + 7));\n --background-color-odd: hsl(from var(--background-base-color) h s calc(l + 10));\n --border-color: var(--background-base-color);\n}\n\ndd {\n padding: 0;\n margin: 0;\n}\n\ndl {\n display: flex;\n flex-direction: column;\n gap: var(--size-1);\n}\n\ndt {\n margin-bottom: var(--size-1);\n}\n\n.predicate-values:nth-child(odd) {\n background-color: var(--background-color-odd);\n}\n\n.predicate-values:nth-child(even) {\n background-color: var(--background-color-even);\n}\n\n.predicate-values {\n display: flex;\n flex-direction: column;\n border: var(--size-px) solid var(--border-color);\n padding: var(--size-2);\n gap: var(--size-1);\n\n .values {\n display: flex;\n flex-direction: column;\n gap: var(--size-3);\n }\n}\n\npos-rich-link {\n --background-color: inherit;\n}\n","import { Relation, Thing } from '@pod-os/core';\nimport { Component, Event, EventEmitter, h, State } from '@stencil/core';\nimport { ResourceAware, subscribeResource } from '../events/ResourceAware';\n\n@Component({\n tag: 'pos-relations',\n shadow: true,\n styleUrl: 'pos-relations.css',\n})\nexport class PosRelations implements ResourceAware {\n @State() data: Relation[] = [];\n\n @Event({ eventName: 'pod-os:resource' })\n subscribeResource: EventEmitter;\n\n componentWillLoad() {\n subscribeResource(this);\n }\n\n receiveResource = (resource: Thing) => {\n this.data = resource.relations();\n };\n\n render() {\n const items = this.data.map(it => (\n <div class=\"predicate-values\">\n <dt>\n <pos-predicate uri={it.predicate} label={it.label} />\n </dt>\n <div class=\"values\">\n {it.uris.map(uri => (\n <dd>\n <pos-rich-link uri={uri} />\n </dd>\n ))}\n </div>\n </div>\n ));\n return this.data.length > 0 ? <dl>{items}</dl> : null;\n }\n}\n",":host {\n --background-base-color: var(--color-grey-200);\n --background-color-even: hsl(from var(--background-base-color) h s calc(l + 7));\n --background-color-odd: hsl(from var(--background-base-color) h s calc(l + 10));\n --border-color: var(--background-base-color);\n}\n\ndd {\n padding: 0;\n margin: 0;\n}\n\ndl {\n display: flex;\n flex-direction: column;\n gap: var(--size-1);\n}\n\ndt {\n margin-bottom: var(--size-1);\n}\n\n.predicate-values:nth-child(odd) {\n background-color: var(--background-color-odd);\n}\n\n.predicate-values:nth-child(even) {\n background-color: var(--background-color-even);\n}\n\n.predicate-values {\n display: flex;\n flex-direction: column;\n border: var(--size-px) solid var(--border-color);\n padding: var(--size-2);\n gap: var(--size-1);\n .values {\n display: flex;\n flex-direction: column;\n gap: var(--size-3);\n }\n}\n\npos-rich-link {\n --background-color: inherit;\n}\n","import { Relation, Thing } from '@pod-os/core';\nimport { Component, h, Event, EventEmitter, State } from '@stencil/core';\nimport { ResourceAware, subscribeResource } from '../events/ResourceAware';\n\n@Component({\n tag: 'pos-reverse-relations',\n shadow: true,\n styleUrl: 'pos-reverse-relations.css',\n})\nexport class PosReverseRelations implements ResourceAware {\n @State() data: Relation[] = [];\n\n @Event({ eventName: 'pod-os:resource' }) subscribeResource: EventEmitter;\n\n componentWillLoad() {\n subscribeResource(this);\n }\n\n receiveResource = (resource: Thing) => {\n this.data = resource.reverseRelations();\n };\n\n render() {\n const items = this.data.map(it => (\n <div class=\"predicate-values\">\n <dt>\n <pos-predicate uri={it.predicate} label={`is ${it.label} of`} />\n </dt>\n <div class=\"values\">\n {it.uris.map(uri => (\n <dd>\n <pos-rich-link uri={uri} />\n </dd>\n ))}\n </div>\n </div>\n ));\n return this.data.length > 0 ? <dl>{items}</dl> : null;\n }\n}\n"],"version":3}
@@ -17,7 +17,7 @@ export class PosContainerContents {
17
17
  render() {
18
18
  if (this.loading)
19
19
  return null;
20
- const items = this.contents.map(it => (h("pos-resource", { lazy: true, uri: it.uri }, h("pos-container-item", { role: "listitem" }, h("ion-label", null, h("h3", null, it.name), h("p", null, it.uri))))));
20
+ const items = this.contents.map(it => (h("pos-resource", { lazy: true, uri: it.uri }, h("pos-container-item", { role: "listitem" }, h("ion-label", null, h("h3", null, it.name))))));
21
21
  return this.contents.length > 0 ? h("ion-list", null, items) : h("p", null, "The container is empty");
22
22
  }
23
23
  static get is() { return "pos-container-contents"; }
@@ -1 +1 @@
1
- {"version":3,"file":"pos-container-contents.js","sourceRoot":"","sources":["../../../../src/components/pos-container-contents/pos-container-contents.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA2B,YAAY,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,CAAC,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EAAiB,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAM3E,MAAM,OAAO,oBAAoB;;QAY/B,oBAAe,GAAG,CAAC,QAAe,EAAE,EAAE;YACpC,MAAM,GAAG,GAAG,QAAQ,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;YAC1C,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;YACrB,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QAC9E,CAAC,CAAC;wBAfsC,EAAE;uBAEvB,IAAI;;IAKvB,iBAAiB;QACf,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAQD,MAAM;QACJ,IAAI,IAAI,CAAC,OAAO;YAAE,OAAO,IAAI,CAAC;QAC9B,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CACpC,oBAAc,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC,GAAG;YACnC,0BAAoB,IAAI,EAAC,UAAU;gBACjC;oBACE,cAAK,EAAE,CAAC,IAAI,CAAM;oBAClB,aAAI,EAAE,CAAC,GAAG,CAAK,CACL,CACO,CACR,CAChB,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,oBAAW,KAAK,CAAY,CAAC,CAAC,CAAC,sCAA6B,CAAC;IACjG,CAAC;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Thing, ContainerContent, LdpContainer } from '@pod-os/core';\nimport { Component, Event, EventEmitter, h, State } from '@stencil/core';\nimport { ResourceAware, subscribeResource } from '../events/ResourceAware';\n\n@Component({\n tag: 'pos-container-contents',\n shadow: true,\n})\nexport class PosContainerContents implements ResourceAware {\n @State() contents: ContainerContent[] = [];\n\n @State() loading = true;\n\n @Event({ eventName: 'pod-os:resource' })\n subscribeResource: EventEmitter;\n\n componentWillLoad() {\n subscribeResource(this);\n }\n\n receiveResource = (resource: Thing) => {\n const doc = resource.assume(LdpContainer);\n this.loading = false;\n this.contents = doc.contains().sort((a, b) => a.name.localeCompare(b.name));\n };\n\n render() {\n if (this.loading) return null;\n const items = this.contents.map(it => (\n <pos-resource lazy={true} uri={it.uri}>\n <pos-container-item role=\"listitem\">\n <ion-label>\n <h3>{it.name}</h3>\n <p>{it.uri}</p>\n </ion-label>\n </pos-container-item>\n </pos-resource>\n ));\n return this.contents.length > 0 ? <ion-list>{items}</ion-list> : <p>The container is empty</p>;\n }\n}\n"]}
1
+ {"version":3,"file":"pos-container-contents.js","sourceRoot":"","sources":["../../../../src/components/pos-container-contents/pos-container-contents.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA2B,YAAY,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,CAAC,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EAAiB,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAM3E,MAAM,OAAO,oBAAoB;;QAY/B,oBAAe,GAAG,CAAC,QAAe,EAAE,EAAE;YACpC,MAAM,GAAG,GAAG,QAAQ,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;YAC1C,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;YACrB,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QAC9E,CAAC,CAAC;wBAfsC,EAAE;uBAEvB,IAAI;;IAKvB,iBAAiB;QACf,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAQD,MAAM;QACJ,IAAI,IAAI,CAAC,OAAO;YAAE,OAAO,IAAI,CAAC;QAC9B,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CACpC,oBAAc,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC,GAAG;YACnC,0BAAoB,IAAI,EAAC,UAAU;gBACjC;oBACE,cAAK,EAAE,CAAC,IAAI,CAAM,CACR,CACO,CACR,CAChB,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,oBAAW,KAAK,CAAY,CAAC,CAAC,CAAC,sCAA6B,CAAC;IACjG,CAAC;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Thing, ContainerContent, LdpContainer } from '@pod-os/core';\nimport { Component, Event, EventEmitter, h, State } from '@stencil/core';\nimport { ResourceAware, subscribeResource } from '../events/ResourceAware';\n\n@Component({\n tag: 'pos-container-contents',\n shadow: true,\n})\nexport class PosContainerContents implements ResourceAware {\n @State() contents: ContainerContent[] = [];\n\n @State() loading = true;\n\n @Event({ eventName: 'pod-os:resource' })\n subscribeResource: EventEmitter;\n\n componentWillLoad() {\n subscribeResource(this);\n }\n\n receiveResource = (resource: Thing) => {\n const doc = resource.assume(LdpContainer);\n this.loading = false;\n this.contents = doc.contains().sort((a, b) => a.name.localeCompare(b.name));\n };\n\n render() {\n if (this.loading) return null;\n const items = this.contents.map(it => (\n <pos-resource lazy={true} uri={it.uri}>\n <pos-container-item role=\"listitem\">\n <ion-label>\n <h3>{it.name}</h3>\n </ion-label>\n </pos-container-item>\n </pos-resource>\n ));\n return this.contents.length > 0 ? <ion-list>{items}</ion-list> : <p>The container is empty</p>;\n }\n}\n"]}
@@ -34,4 +34,10 @@ dt {
34
34
  border: var(--size-px) solid var(--border-color);
35
35
  padding: var(--size-2);
36
36
  gap: var(--size-1);
37
+
38
+ .values {
39
+ display: flex;
40
+ flex-direction: column;
41
+ gap: var(--size-2);
42
+ }
37
43
  }
@@ -28,7 +28,7 @@ export class PosLiterals {
28
28
  }
29
29
  }
30
30
  render() {
31
- return (h(Host, { key: '61baacde23f28d7b2e3c95652aedf62c90446c3f' }, this.data.length > 0 ? (h("dl", null, this.data.map(it => (h("div", { class: "predicate-values" }, h("dt", null, h("pos-predicate", { uri: it.predicate, label: it.label })), it.values.map(value => (h("dd", null, value)))))))) : null, h("pos-add-literal-value", { key: '6c9b922012d19f6b7d4518c717261e5654dbc53a', "onPod-os:added-literal-value": event => this.literalValueAdded(event.detail) })));
31
+ return (h(Host, { key: '61baacde23f28d7b2e3c95652aedf62c90446c3f' }, this.data.length > 0 ? (h("dl", null, this.data.map(it => (h("div", { class: "predicate-values" }, h("dt", null, h("pos-predicate", { uri: it.predicate, label: it.label })), h("div", { class: "values" }, it.values.map(value => (h("dd", null, value))))))))) : null, h("pos-add-literal-value", { key: 'a8cca657602f883de5776b9f0012c9f8de41840d', "onPod-os:added-literal-value": event => this.literalValueAdded(event.detail) })));
32
32
  }
33
33
  static get is() { return "pos-literals"; }
34
34
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"pos-literals.js","sourceRoot":"","sources":["../../../../src/components/pos-literals/pos-literals.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAiB,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAO3E,MAAM,OAAO,WAAW;;QAUtB,oBAAe,GAAG,CAAC,QAAe,EAAE,EAAE;YACpC,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,QAAQ,EAAE,CAAC;QAClC,CAAC,CAAC;oBAXyB,EAAE;;IAK7B,iBAAiB;QACf,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAMD,iBAAiB,CAAC,UAAmB;QACnC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,KAAK,UAAU,CAAC,SAAS,CAAC,CAAC;QAE7E,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,IAAI,CAAC,IAAI,GAAG,CAAC,GAAG,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QACzC,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE;gBAC7B,OAAO,EAAE,CAAC,SAAS,KAAK,QAAQ,CAAC,SAAS;oBACxC,CAAC,CAAC;wBACE,SAAS,EAAE,QAAQ,CAAC,SAAS;wBAC7B,KAAK,EAAE,QAAQ,CAAC,KAAK;wBACrB,MAAM,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,GAAG,UAAU,CAAC,MAAM,CAAC;qBACnD;oBACH,CAAC,CAAC,EAAE,CAAC;YACT,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACF,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CACtB,cACG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CACnB,WAAK,KAAK,EAAC,kBAAkB;gBAC3B;oBACE,qBAAe,GAAG,EAAE,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,GAAI,CAClD;gBACJ,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CACtB,cAAK,KAAK,CAAM,CACjB,CAAC,CACE,CACP,CAAC,CACC,CACN,CAAC,CAAC,CAAC,IAAI;YACR,8GAAqD,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,GAAI,CACjG,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Literal, Thing } from '@pod-os/core';\nimport { Component, Event, EventEmitter, h, Host, State } from '@stencil/core';\nimport { ResourceAware, subscribeResource } from '../events/ResourceAware';\n\n@Component({\n tag: 'pos-literals',\n styleUrl: './pos-literals.css',\n shadow: true,\n})\nexport class PosLiterals implements ResourceAware {\n @State() data: Literal[] = [];\n\n @Event({ eventName: 'pod-os:resource' })\n subscribeResource: EventEmitter;\n\n componentWillLoad() {\n subscribeResource(this);\n }\n\n receiveResource = (resource: Thing) => {\n this.data = resource.literals();\n };\n\n literalValueAdded(newLiteral: Literal) {\n const existing = this.data.find(it => it.predicate === newLiteral.predicate);\n\n if (!existing) {\n this.data = [...this.data, newLiteral];\n } else {\n this.data = this.data.map(it => {\n return it.predicate === existing.predicate\n ? {\n predicate: existing.predicate,\n label: existing.label,\n values: [...existing.values, ...newLiteral.values],\n }\n : it;\n });\n }\n }\n\n render() {\n return (\n <Host>\n {this.data.length > 0 ? (\n <dl>\n {this.data.map(it => (\n <div class=\"predicate-values\">\n <dt>\n <pos-predicate uri={it.predicate} label={it.label} />\n </dt>\n {it.values.map(value => (\n <dd>{value}</dd>\n ))}\n </div>\n ))}\n </dl>\n ) : null}\n <pos-add-literal-value onPod-os:added-literal-value={event => this.literalValueAdded(event.detail)} />\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"pos-literals.js","sourceRoot":"","sources":["../../../../src/components/pos-literals/pos-literals.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAiB,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAO3E,MAAM,OAAO,WAAW;;QAUtB,oBAAe,GAAG,CAAC,QAAe,EAAE,EAAE;YACpC,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,QAAQ,EAAE,CAAC;QAClC,CAAC,CAAC;oBAXyB,EAAE;;IAK7B,iBAAiB;QACf,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAMD,iBAAiB,CAAC,UAAmB;QACnC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,KAAK,UAAU,CAAC,SAAS,CAAC,CAAC;QAE7E,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,IAAI,CAAC,IAAI,GAAG,CAAC,GAAG,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;QACzC,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE;gBAC7B,OAAO,EAAE,CAAC,SAAS,KAAK,QAAQ,CAAC,SAAS;oBACxC,CAAC,CAAC;wBACE,SAAS,EAAE,QAAQ,CAAC,SAAS;wBAC7B,KAAK,EAAE,QAAQ,CAAC,KAAK;wBACrB,MAAM,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,GAAG,UAAU,CAAC,MAAM,CAAC;qBACnD;oBACH,CAAC,CAAC,EAAE,CAAC;YACT,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACF,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CACtB,cACG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CACnB,WAAK,KAAK,EAAC,kBAAkB;gBAC3B;oBACE,qBAAe,GAAG,EAAE,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,GAAI,CAClD;gBACL,WAAK,KAAK,EAAC,QAAQ,IAChB,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CACtB,cAAK,KAAK,CAAM,CACjB,CAAC,CACE,CACF,CACP,CAAC,CACC,CACN,CAAC,CAAC,CAAC,IAAI;YACR,8GAAqD,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,GAAI,CACjG,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Literal, Thing } from '@pod-os/core';\nimport { Component, Event, EventEmitter, h, Host, State } from '@stencil/core';\nimport { ResourceAware, subscribeResource } from '../events/ResourceAware';\n\n@Component({\n tag: 'pos-literals',\n styleUrl: './pos-literals.css',\n shadow: true,\n})\nexport class PosLiterals implements ResourceAware {\n @State() data: Literal[] = [];\n\n @Event({ eventName: 'pod-os:resource' })\n subscribeResource: EventEmitter;\n\n componentWillLoad() {\n subscribeResource(this);\n }\n\n receiveResource = (resource: Thing) => {\n this.data = resource.literals();\n };\n\n literalValueAdded(newLiteral: Literal) {\n const existing = this.data.find(it => it.predicate === newLiteral.predicate);\n\n if (!existing) {\n this.data = [...this.data, newLiteral];\n } else {\n this.data = this.data.map(it => {\n return it.predicate === existing.predicate\n ? {\n predicate: existing.predicate,\n label: existing.label,\n values: [...existing.values, ...newLiteral.values],\n }\n : it;\n });\n }\n }\n\n render() {\n return (\n <Host>\n {this.data.length > 0 ? (\n <dl>\n {this.data.map(it => (\n <div class=\"predicate-values\">\n <dt>\n <pos-predicate uri={it.predicate} label={it.label} />\n </dt>\n <div class=\"values\">\n {it.values.map(value => (\n <dd>{value}</dd>\n ))}\n </div>\n </div>\n ))}\n </dl>\n ) : null}\n <pos-add-literal-value onPod-os:added-literal-value={event => this.literalValueAdded(event.detail)} />\n </Host>\n );\n }\n}\n"]}
@@ -5,6 +5,7 @@
5
5
 
6
6
  button {
7
7
  line-height: var(--scale-0);
8
+ font-family: inherit;
8
9
  margin: 0;
9
10
  padding: 0;
10
11
  display: flex;
@@ -19,6 +20,7 @@ a {
19
20
  font-weight: var(--weight-light);
20
21
  line-height: var(--scale-0);
21
22
  font-size: var(--scale-0);
23
+ font-family: inherit;
22
24
  }
23
25
 
24
26
  .container {
@@ -34,6 +34,12 @@ dt {
34
34
  border: var(--size-px) solid var(--border-color);
35
35
  padding: var(--size-2);
36
36
  gap: var(--size-1);
37
+
38
+ .values {
39
+ display: flex;
40
+ flex-direction: column;
41
+ gap: var(--size-3);
42
+ }
37
43
  }
38
44
 
39
45
  pos-rich-link {
@@ -11,7 +11,7 @@ export class PosRelations {
11
11
  subscribeResource(this);
12
12
  }
13
13
  render() {
14
- const items = this.data.map(it => (h("div", { class: "predicate-values" }, h("dt", null, h("pos-predicate", { uri: it.predicate, label: it.label })), it.uris.map(uri => (h("dd", null, h("pos-rich-link", { uri: uri })))))));
14
+ const items = this.data.map(it => (h("div", { class: "predicate-values" }, h("dt", null, h("pos-predicate", { uri: it.predicate, label: it.label })), h("div", { class: "values" }, it.uris.map(uri => (h("dd", null, h("pos-rich-link", { uri: uri }))))))));
15
15
  return this.data.length > 0 ? h("dl", null, items) : null;
16
16
  }
17
17
  static get is() { return "pos-relations"; }
@@ -1 +1 @@
1
- {"version":3,"file":"pos-relations.js","sourceRoot":"","sources":["../../../../src/components/pos-relations/pos-relations.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,CAAC,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EAAiB,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAO3E,MAAM,OAAO,YAAY;;QAUvB,oBAAe,GAAG,CAAC,QAAe,EAAE,EAAE;YACpC,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,SAAS,EAAE,CAAC;QACnC,CAAC,CAAC;oBAX0B,EAAE;;IAK9B,iBAAiB;QACf,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAMD,MAAM;QACJ,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAChC,WAAK,KAAK,EAAC,kBAAkB;YAC3B;gBACE,qBAAe,GAAG,EAAE,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,GAAI,CAClD;YACJ,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAClB;gBACE,qBAAe,GAAG,EAAE,GAAG,GAAI,CACxB,CACN,CAAC,CACE,CACP,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,cAAK,KAAK,CAAM,CAAC,CAAC,CAAC,IAAI,CAAC;IACxD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Relation, Thing } from '@pod-os/core';\nimport { Component, Event, EventEmitter, h, State } from '@stencil/core';\nimport { ResourceAware, subscribeResource } from '../events/ResourceAware';\n\n@Component({\n tag: 'pos-relations',\n shadow: true,\n styleUrl: 'pos-relations.css',\n})\nexport class PosRelations implements ResourceAware {\n @State() data: Relation[] = [];\n\n @Event({ eventName: 'pod-os:resource' })\n subscribeResource: EventEmitter;\n\n componentWillLoad() {\n subscribeResource(this);\n }\n\n receiveResource = (resource: Thing) => {\n this.data = resource.relations();\n };\n\n render() {\n const items = this.data.map(it => (\n <div class=\"predicate-values\">\n <dt>\n <pos-predicate uri={it.predicate} label={it.label} />\n </dt>\n {it.uris.map(uri => (\n <dd>\n <pos-rich-link uri={uri} />\n </dd>\n ))}\n </div>\n ));\n return this.data.length > 0 ? <dl>{items}</dl> : null;\n }\n}\n"]}
1
+ {"version":3,"file":"pos-relations.js","sourceRoot":"","sources":["../../../../src/components/pos-relations/pos-relations.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,CAAC,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EAAiB,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAO3E,MAAM,OAAO,YAAY;;QAUvB,oBAAe,GAAG,CAAC,QAAe,EAAE,EAAE;YACpC,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,SAAS,EAAE,CAAC;QACnC,CAAC,CAAC;oBAX0B,EAAE;;IAK9B,iBAAiB;QACf,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAMD,MAAM;QACJ,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAChC,WAAK,KAAK,EAAC,kBAAkB;YAC3B;gBACE,qBAAe,GAAG,EAAE,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,GAAI,CAClD;YACL,WAAK,KAAK,EAAC,QAAQ,IAChB,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAClB;gBACE,qBAAe,GAAG,EAAE,GAAG,GAAI,CACxB,CACN,CAAC,CACE,CACF,CACP,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,cAAK,KAAK,CAAM,CAAC,CAAC,CAAC,IAAI,CAAC;IACxD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Relation, Thing } from '@pod-os/core';\nimport { Component, Event, EventEmitter, h, State } from '@stencil/core';\nimport { ResourceAware, subscribeResource } from '../events/ResourceAware';\n\n@Component({\n tag: 'pos-relations',\n shadow: true,\n styleUrl: 'pos-relations.css',\n})\nexport class PosRelations implements ResourceAware {\n @State() data: Relation[] = [];\n\n @Event({ eventName: 'pod-os:resource' })\n subscribeResource: EventEmitter;\n\n componentWillLoad() {\n subscribeResource(this);\n }\n\n receiveResource = (resource: Thing) => {\n this.data = resource.relations();\n };\n\n render() {\n const items = this.data.map(it => (\n <div class=\"predicate-values\">\n <dt>\n <pos-predicate uri={it.predicate} label={it.label} />\n </dt>\n <div class=\"values\">\n {it.uris.map(uri => (\n <dd>\n <pos-rich-link uri={uri} />\n </dd>\n ))}\n </div>\n </div>\n ));\n return this.data.length > 0 ? <dl>{items}</dl> : null;\n }\n}\n"]}
@@ -34,6 +34,11 @@ dt {
34
34
  border: var(--size-px) solid var(--border-color);
35
35
  padding: var(--size-2);
36
36
  gap: var(--size-1);
37
+ .values {
38
+ display: flex;
39
+ flex-direction: column;
40
+ gap: var(--size-3);
41
+ }
37
42
  }
38
43
 
39
44
  pos-rich-link {
@@ -11,7 +11,7 @@ export class PosReverseRelations {
11
11
  subscribeResource(this);
12
12
  }
13
13
  render() {
14
- const items = this.data.map(it => (h("div", { class: "predicate-values" }, h("dt", null, h("pos-predicate", { uri: it.predicate, label: `is ${it.label} of` })), it.uris.map(uri => (h("dd", null, h("pos-rich-link", { uri: uri })))))));
14
+ const items = this.data.map(it => (h("div", { class: "predicate-values" }, h("dt", null, h("pos-predicate", { uri: it.predicate, label: `is ${it.label} of` })), h("div", { class: "values" }, it.uris.map(uri => (h("dd", null, h("pos-rich-link", { uri: uri }))))))));
15
15
  return this.data.length > 0 ? h("dl", null, items) : null;
16
16
  }
17
17
  static get is() { return "pos-reverse-relations"; }
@@ -1 +1 @@
1
- {"version":3,"file":"pos-reverse-relations.js","sourceRoot":"","sources":["../../../../src/components/pos-reverse-relations/pos-reverse-relations.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,KAAK,EAAgB,KAAK,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EAAiB,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAO3E,MAAM,OAAO,mBAAmB;;QAS9B,oBAAe,GAAG,CAAC,QAAe,EAAE,EAAE;YACpC,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,gBAAgB,EAAE,CAAC;QAC1C,CAAC,CAAC;oBAV0B,EAAE;;IAI9B,iBAAiB;QACf,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAMD,MAAM;QACJ,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAChC,WAAK,KAAK,EAAC,kBAAkB;YAC3B;gBACE,qBAAe,GAAG,EAAE,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,KAAK,KAAK,GAAI,CAC7D;YACJ,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAClB;gBACE,qBAAe,GAAG,EAAE,GAAG,GAAI,CACxB,CACN,CAAC,CACE,CACP,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,cAAK,KAAK,CAAM,CAAC,CAAC,CAAC,IAAI,CAAC;IACxD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Relation, Thing } from '@pod-os/core';\nimport { Component, h, Event, EventEmitter, State } from '@stencil/core';\nimport { ResourceAware, subscribeResource } from '../events/ResourceAware';\n\n@Component({\n tag: 'pos-reverse-relations',\n shadow: true,\n styleUrl: 'pos-reverse-relations.css',\n})\nexport class PosReverseRelations implements ResourceAware {\n @State() data: Relation[] = [];\n\n @Event({ eventName: 'pod-os:resource' }) subscribeResource: EventEmitter;\n\n componentWillLoad() {\n subscribeResource(this);\n }\n\n receiveResource = (resource: Thing) => {\n this.data = resource.reverseRelations();\n };\n\n render() {\n const items = this.data.map(it => (\n <div class=\"predicate-values\">\n <dt>\n <pos-predicate uri={it.predicate} label={`is ${it.label} of`} />\n </dt>\n {it.uris.map(uri => (\n <dd>\n <pos-rich-link uri={uri} />\n </dd>\n ))}\n </div>\n ));\n return this.data.length > 0 ? <dl>{items}</dl> : null;\n }\n}\n"]}
1
+ {"version":3,"file":"pos-reverse-relations.js","sourceRoot":"","sources":["../../../../src/components/pos-reverse-relations/pos-reverse-relations.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,KAAK,EAAgB,KAAK,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EAAiB,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAO3E,MAAM,OAAO,mBAAmB;;QAS9B,oBAAe,GAAG,CAAC,QAAe,EAAE,EAAE;YACpC,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,gBAAgB,EAAE,CAAC;QAC1C,CAAC,CAAC;oBAV0B,EAAE;;IAI9B,iBAAiB;QACf,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAMD,MAAM;QACJ,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAChC,WAAK,KAAK,EAAC,kBAAkB;YAC3B;gBACE,qBAAe,GAAG,EAAE,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,KAAK,KAAK,GAAI,CAC7D;YACL,WAAK,KAAK,EAAC,QAAQ,IAChB,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAClB;gBACE,qBAAe,GAAG,EAAE,GAAG,GAAI,CACxB,CACN,CAAC,CACE,CACF,CACP,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,cAAK,KAAK,CAAM,CAAC,CAAC,CAAC,IAAI,CAAC;IACxD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Relation, Thing } from '@pod-os/core';\nimport { Component, h, Event, EventEmitter, State } from '@stencil/core';\nimport { ResourceAware, subscribeResource } from '../events/ResourceAware';\n\n@Component({\n tag: 'pos-reverse-relations',\n shadow: true,\n styleUrl: 'pos-reverse-relations.css',\n})\nexport class PosReverseRelations implements ResourceAware {\n @State() data: Relation[] = [];\n\n @Event({ eventName: 'pod-os:resource' }) subscribeResource: EventEmitter;\n\n componentWillLoad() {\n subscribeResource(this);\n }\n\n receiveResource = (resource: Thing) => {\n this.data = resource.reverseRelations();\n };\n\n render() {\n const items = this.data.map(it => (\n <div class=\"predicate-values\">\n <dt>\n <pos-predicate uri={it.predicate} label={`is ${it.label} of`} />\n </dt>\n <div class=\"values\">\n {it.uris.map(uri => (\n <dd>\n <pos-rich-link uri={uri} />\n </dd>\n ))}\n </div>\n </div>\n ));\n return this.data.length > 0 ? <dl>{items}</dl> : null;\n }\n}\n"]}
@@ -34,7 +34,7 @@ const PosContainerContents = /*@__PURE__*/ proxyCustomElement(class PosContainer
34
34
  render() {
35
35
  if (this.loading)
36
36
  return null;
37
- const items = this.contents.map(it => (h("pos-resource", { lazy: true, uri: it.uri }, h("pos-container-item", { role: "listitem" }, h("ion-label", null, h("h3", null, it.name), h("p", null, it.uri))))));
37
+ const items = this.contents.map(it => (h("pos-resource", { lazy: true, uri: it.uri }, h("pos-container-item", { role: "listitem" }, h("ion-label", null, h("h3", null, it.name))))));
38
38
  return this.contents.length > 0 ? h("ion-list", null, items) : h("p", null, "The container is empty");
39
39
  }
40
40
  }, [1, "pos-container-contents", {
@@ -1 +1 @@
1
- {"file":"pos-container-contents2.js","mappings":";;;;;;;;;;;;;;;;MAQa,oBAAoB;;;;;;QAY/B,oBAAe,GAAG,CAAC,QAAe;YAChC,MAAM,GAAG,GAAG,QAAQ,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;YAC1C,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;YACrB,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;SAC7E,CAAC;wBAfsC,EAAE;uBAEvB,IAAI;;IAKvB,iBAAiB;QACf,iBAAiB,CAAC,IAAI,CAAC,CAAC;KACzB;IAQD,MAAM;QACJ,IAAI,IAAI,CAAC,OAAO;YAAE,OAAO,IAAI,CAAC;QAC9B,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,KAChC,oBAAc,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC,GAAG,IACnC,0BAAoB,IAAI,EAAC,UAAU,IACjC,qBACE,cAAK,EAAE,CAAC,IAAI,CAAM,EAClB,aAAI,EAAE,CAAC,GAAG,CAAK,CACL,CACO,CACR,CAChB,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,GAAG,oBAAW,KAAK,CAAY,GAAG,sCAA6B,CAAC;KAChG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/pos-container-contents/pos-container-contents.tsx"],"sourcesContent":["import { Thing, ContainerContent, LdpContainer } from '@pod-os/core';\nimport { Component, Event, EventEmitter, h, State } from '@stencil/core';\nimport { ResourceAware, subscribeResource } from '../events/ResourceAware';\n\n@Component({\n tag: 'pos-container-contents',\n shadow: true,\n})\nexport class PosContainerContents implements ResourceAware {\n @State() contents: ContainerContent[] = [];\n\n @State() loading = true;\n\n @Event({ eventName: 'pod-os:resource' })\n subscribeResource: EventEmitter;\n\n componentWillLoad() {\n subscribeResource(this);\n }\n\n receiveResource = (resource: Thing) => {\n const doc = resource.assume(LdpContainer);\n this.loading = false;\n this.contents = doc.contains().sort((a, b) => a.name.localeCompare(b.name));\n };\n\n render() {\n if (this.loading) return null;\n const items = this.contents.map(it => (\n <pos-resource lazy={true} uri={it.uri}>\n <pos-container-item role=\"listitem\">\n <ion-label>\n <h3>{it.name}</h3>\n <p>{it.uri}</p>\n </ion-label>\n </pos-container-item>\n </pos-resource>\n ));\n return this.contents.length > 0 ? <ion-list>{items}</ion-list> : <p>The container is empty</p>;\n }\n}\n"],"version":3}
1
+ {"file":"pos-container-contents2.js","mappings":";;;;;;;;;;;;;;;;MAQa,oBAAoB;;;;;;QAY/B,oBAAe,GAAG,CAAC,QAAe;YAChC,MAAM,GAAG,GAAG,QAAQ,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;YAC1C,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;YACrB,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;SAC7E,CAAC;wBAfsC,EAAE;uBAEvB,IAAI;;IAKvB,iBAAiB;QACf,iBAAiB,CAAC,IAAI,CAAC,CAAC;KACzB;IAQD,MAAM;QACJ,IAAI,IAAI,CAAC,OAAO;YAAE,OAAO,IAAI,CAAC;QAC9B,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,KAChC,oBAAc,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC,GAAG,IACnC,0BAAoB,IAAI,EAAC,UAAU,IACjC,qBACE,cAAK,EAAE,CAAC,IAAI,CAAM,CACR,CACO,CACR,CAChB,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,GAAG,oBAAW,KAAK,CAAY,GAAG,sCAA6B,CAAC;KAChG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/pos-container-contents/pos-container-contents.tsx"],"sourcesContent":["import { Thing, ContainerContent, LdpContainer } from '@pod-os/core';\nimport { Component, Event, EventEmitter, h, State } from '@stencil/core';\nimport { ResourceAware, subscribeResource } from '../events/ResourceAware';\n\n@Component({\n tag: 'pos-container-contents',\n shadow: true,\n})\nexport class PosContainerContents implements ResourceAware {\n @State() contents: ContainerContent[] = [];\n\n @State() loading = true;\n\n @Event({ eventName: 'pod-os:resource' })\n subscribeResource: EventEmitter;\n\n componentWillLoad() {\n subscribeResource(this);\n }\n\n receiveResource = (resource: Thing) => {\n const doc = resource.assume(LdpContainer);\n this.loading = false;\n this.contents = doc.contains().sort((a, b) => a.name.localeCompare(b.name));\n };\n\n render() {\n if (this.loading) return null;\n const items = this.contents.map(it => (\n <pos-resource lazy={true} uri={it.uri}>\n <pos-container-item role=\"listitem\">\n <ion-label>\n <h3>{it.name}</h3>\n </ion-label>\n </pos-container-item>\n </pos-resource>\n ));\n return this.contents.length > 0 ? <ion-list>{items}</ion-list> : <p>The container is empty</p>;\n }\n}\n"],"version":3}
@@ -6,7 +6,7 @@ import { d as defineCustomElement$3 } from './pos-add-literal-value2.js';
6
6
  import { d as defineCustomElement$2 } from './pos-predicate2.js';
7
7
  import { d as defineCustomElement$1 } from './pos-select-term2.js';
8
8
 
9
- const posLiteralsCss = ":host{--background-base-color:var(--color-grey-200);--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)}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)}";
9
+ const posLiteralsCss = ":host {\n --background-base-color: var(--color-grey-200);\n --background-color-even: hsl(from var(--background-base-color) h s calc(l + 7));\n --background-color-odd: hsl(from var(--background-base-color) h s calc(l + 10));\n --border-color: var(--background-base-color);\n}\n\ndd {\n padding: 0;\n margin: 0;\n}\n\ndl {\n display: flex;\n flex-direction: column;\n gap: var(--size-1);\n}\n\ndt {\n margin-bottom: var(--size-1);\n}\n\n.predicate-values:nth-child(odd) {\n background-color: var(--background-color-odd);\n}\n\n.predicate-values:nth-child(even) {\n background-color: var(--background-color-even);\n}\n\n.predicate-values {\n display: flex;\n flex-direction: column;\n border: var(--size-px) solid var(--border-color);\n padding: var(--size-2);\n gap: var(--size-1);\n\n .values {\n display: flex;\n flex-direction: column;\n gap: var(--size-2);\n }\n}\n";
10
10
  const PosLiteralsStyle0 = posLiteralsCss;
11
11
 
12
12
  const PosLiterals = /*@__PURE__*/ proxyCustomElement(class PosLiterals extends HTMLElement {
@@ -41,7 +41,7 @@ const PosLiterals = /*@__PURE__*/ proxyCustomElement(class PosLiterals extends H
41
41
  }
42
42
  }
43
43
  render() {
44
- return (h(Host, { key: '61baacde23f28d7b2e3c95652aedf62c90446c3f' }, this.data.length > 0 ? (h("dl", null, this.data.map(it => (h("div", { class: "predicate-values" }, h("dt", null, h("pos-predicate", { uri: it.predicate, label: it.label })), it.values.map(value => (h("dd", null, value)))))))) : null, h("pos-add-literal-value", { key: '6c9b922012d19f6b7d4518c717261e5654dbc53a', "onPod-os:added-literal-value": event => this.literalValueAdded(event.detail) })));
44
+ return (h(Host, { key: '61baacde23f28d7b2e3c95652aedf62c90446c3f' }, this.data.length > 0 ? (h("dl", null, this.data.map(it => (h("div", { class: "predicate-values" }, h("dt", null, h("pos-predicate", { uri: it.predicate, label: it.label })), h("div", { class: "values" }, it.values.map(value => (h("dd", null, value))))))))) : null, h("pos-add-literal-value", { key: 'a8cca657602f883de5776b9f0012c9f8de41840d', "onPod-os:added-literal-value": event => this.literalValueAdded(event.detail) })));
45
45
  }
46
46
  static get style() { return PosLiteralsStyle0; }
47
47
  }, [1, "pos-literals", {
@@ -1 +1 @@
1
- {"file":"pos-literals2.js","mappings":";;;;;;;;AAAA,MAAM,cAAc,GAAG,wpBAAwpB,CAAC;AAChrB,0BAAe,cAAc;;MCQhB,WAAW;;;;;;QAUtB,oBAAe,GAAG,CAAC,QAAe;YAChC,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,QAAQ,EAAE,CAAC;SACjC,CAAC;oBAXyB,EAAE;;IAK7B,iBAAiB;QACf,iBAAiB,CAAC,IAAI,CAAC,CAAC;KACzB;IAMD,iBAAiB,CAAC,UAAmB;QACnC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,SAAS,KAAK,UAAU,CAAC,SAAS,CAAC,CAAC;QAE7E,IAAI,CAAC,QAAQ,EAAE;YACb,IAAI,CAAC,IAAI,GAAG,CAAC,GAAG,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;SACxC;aAAM;YACL,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;gBAC1B,OAAO,EAAE,CAAC,SAAS,KAAK,QAAQ,CAAC,SAAS;sBACtC;wBACE,SAAS,EAAE,QAAQ,CAAC,SAAS;wBAC7B,KAAK,EAAE,QAAQ,CAAC,KAAK;wBACrB,MAAM,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,GAAG,UAAU,CAAC,MAAM,CAAC;qBACnD;sBACD,EAAE,CAAC;aACR,CAAC,CAAC;SACJ;KACF;IAED,MAAM;QACJ,QACE,EAAC,IAAI,uDACF,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,IACnB,cACG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,KACf,WAAK,KAAK,EAAC,kBAAkB,IAC3B,cACE,qBAAe,GAAG,EAAE,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,GAAI,CAClD,EACJ,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,KAClB,cAAK,KAAK,CAAM,CACjB,CAAC,CACE,CACP,CAAC,CACC,IACH,IAAI,EACR,8GAAqD,KAAK,IAAI,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,GAAI,CACjG,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/pos-literals/pos-literals.css?tag=pos-literals&encapsulation=shadow","src/components/pos-literals/pos-literals.tsx"],"sourcesContent":[":host {\n --background-base-color: var(--color-grey-200);\n --background-color-even: hsl(from var(--background-base-color) h s calc(l + 7));\n --background-color-odd: hsl(from var(--background-base-color) h s calc(l + 10));\n --border-color: var(--background-base-color);\n}\n\ndd {\n padding: 0;\n margin: 0;\n}\n\ndl {\n display: flex;\n flex-direction: column;\n gap: var(--size-1);\n}\n\ndt {\n margin-bottom: var(--size-1);\n}\n\n.predicate-values:nth-child(odd) {\n background-color: var(--background-color-odd);\n}\n\n.predicate-values:nth-child(even) {\n background-color: var(--background-color-even);\n}\n\n.predicate-values {\n display: flex;\n flex-direction: column;\n border: var(--size-px) solid var(--border-color);\n padding: var(--size-2);\n gap: var(--size-1);\n}\n","import { Literal, Thing } from '@pod-os/core';\nimport { Component, Event, EventEmitter, h, Host, State } from '@stencil/core';\nimport { ResourceAware, subscribeResource } from '../events/ResourceAware';\n\n@Component({\n tag: 'pos-literals',\n styleUrl: './pos-literals.css',\n shadow: true,\n})\nexport class PosLiterals implements ResourceAware {\n @State() data: Literal[] = [];\n\n @Event({ eventName: 'pod-os:resource' })\n subscribeResource: EventEmitter;\n\n componentWillLoad() {\n subscribeResource(this);\n }\n\n receiveResource = (resource: Thing) => {\n this.data = resource.literals();\n };\n\n literalValueAdded(newLiteral: Literal) {\n const existing = this.data.find(it => it.predicate === newLiteral.predicate);\n\n if (!existing) {\n this.data = [...this.data, newLiteral];\n } else {\n this.data = this.data.map(it => {\n return it.predicate === existing.predicate\n ? {\n predicate: existing.predicate,\n label: existing.label,\n values: [...existing.values, ...newLiteral.values],\n }\n : it;\n });\n }\n }\n\n render() {\n return (\n <Host>\n {this.data.length > 0 ? (\n <dl>\n {this.data.map(it => (\n <div class=\"predicate-values\">\n <dt>\n <pos-predicate uri={it.predicate} label={it.label} />\n </dt>\n {it.values.map(value => (\n <dd>{value}</dd>\n ))}\n </div>\n ))}\n </dl>\n ) : null}\n <pos-add-literal-value onPod-os:added-literal-value={event => this.literalValueAdded(event.detail)} />\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"pos-literals2.js","mappings":";;;;;;;;AAAA,MAAM,cAAc,GAAG,i4BAAi4B,CAAC;AACz5B,0BAAe,cAAc;;MCQhB,WAAW;;;;;;QAUtB,oBAAe,GAAG,CAAC,QAAe;YAChC,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,QAAQ,EAAE,CAAC;SACjC,CAAC;oBAXyB,EAAE;;IAK7B,iBAAiB;QACf,iBAAiB,CAAC,IAAI,CAAC,CAAC;KACzB;IAMD,iBAAiB,CAAC,UAAmB;QACnC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,SAAS,KAAK,UAAU,CAAC,SAAS,CAAC,CAAC;QAE7E,IAAI,CAAC,QAAQ,EAAE;YACb,IAAI,CAAC,IAAI,GAAG,CAAC,GAAG,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;SACxC;aAAM;YACL,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;gBAC1B,OAAO,EAAE,CAAC,SAAS,KAAK,QAAQ,CAAC,SAAS;sBACtC;wBACE,SAAS,EAAE,QAAQ,CAAC,SAAS;wBAC7B,KAAK,EAAE,QAAQ,CAAC,KAAK;wBACrB,MAAM,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,GAAG,UAAU,CAAC,MAAM,CAAC;qBACnD;sBACD,EAAE,CAAC;aACR,CAAC,CAAC;SACJ;KACF;IAED,MAAM;QACJ,QACE,EAAC,IAAI,uDACF,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,IACnB,cACG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,KACf,WAAK,KAAK,EAAC,kBAAkB,IAC3B,cACE,qBAAe,GAAG,EAAE,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,GAAI,CAClD,EACL,WAAK,KAAK,EAAC,QAAQ,IAChB,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,KAClB,cAAK,KAAK,CAAM,CACjB,CAAC,CACE,CACF,CACP,CAAC,CACC,IACH,IAAI,EACR,8GAAqD,KAAK,IAAI,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,GAAI,CACjG,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/pos-literals/pos-literals.css?tag=pos-literals&encapsulation=shadow","src/components/pos-literals/pos-literals.tsx"],"sourcesContent":[":host {\n --background-base-color: var(--color-grey-200);\n --background-color-even: hsl(from var(--background-base-color) h s calc(l + 7));\n --background-color-odd: hsl(from var(--background-base-color) h s calc(l + 10));\n --border-color: var(--background-base-color);\n}\n\ndd {\n padding: 0;\n margin: 0;\n}\n\ndl {\n display: flex;\n flex-direction: column;\n gap: var(--size-1);\n}\n\ndt {\n margin-bottom: var(--size-1);\n}\n\n.predicate-values:nth-child(odd) {\n background-color: var(--background-color-odd);\n}\n\n.predicate-values:nth-child(even) {\n background-color: var(--background-color-even);\n}\n\n.predicate-values {\n display: flex;\n flex-direction: column;\n border: var(--size-px) solid var(--border-color);\n padding: var(--size-2);\n gap: var(--size-1);\n\n .values {\n display: flex;\n flex-direction: column;\n gap: var(--size-2);\n }\n}\n","import { Literal, Thing } from '@pod-os/core';\nimport { Component, Event, EventEmitter, h, Host, State } from '@stencil/core';\nimport { ResourceAware, subscribeResource } from '../events/ResourceAware';\n\n@Component({\n tag: 'pos-literals',\n styleUrl: './pos-literals.css',\n shadow: true,\n})\nexport class PosLiterals implements ResourceAware {\n @State() data: Literal[] = [];\n\n @Event({ eventName: 'pod-os:resource' })\n subscribeResource: EventEmitter;\n\n componentWillLoad() {\n subscribeResource(this);\n }\n\n receiveResource = (resource: Thing) => {\n this.data = resource.literals();\n };\n\n literalValueAdded(newLiteral: Literal) {\n const existing = this.data.find(it => it.predicate === newLiteral.predicate);\n\n if (!existing) {\n this.data = [...this.data, newLiteral];\n } else {\n this.data = this.data.map(it => {\n return it.predicate === existing.predicate\n ? {\n predicate: existing.predicate,\n label: existing.label,\n values: [...existing.values, ...newLiteral.values],\n }\n : it;\n });\n }\n }\n\n render() {\n return (\n <Host>\n {this.data.length > 0 ? (\n <dl>\n {this.data.map(it => (\n <div class=\"predicate-values\">\n <dt>\n <pos-predicate uri={it.predicate} label={it.label} />\n </dt>\n <div class=\"values\">\n {it.values.map(value => (\n <dd>{value}</dd>\n ))}\n </div>\n </div>\n ))}\n </dl>\n ) : null}\n <pos-add-literal-value onPod-os:added-literal-value={event => this.literalValueAdded(event.detail)} />\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,7 +1,7 @@
1
1
  import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
2
  import { d as defineCustomElement$1 } from './icon.js';
3
3
 
4
- const posPredicateCss = ":host{--text-color:var(--pos-primary-color);font-family:var(--font-sans)}button{line-height:var(--scale-0);margin:0;padding:0;display:flex;background:none;border:none;cursor:pointer}button,a{color:var(--text-color);font-weight:var(--weight-light);line-height:var(--scale-0);font-size:var(--scale-0)}.container{display:flex;gap:var(--size-1);flex-direction:row;align-items:center;line-height:var(--scale-0)}";
4
+ const posPredicateCss = ":host{--text-color:var(--pos-primary-color);font-family:var(--font-sans)}button{line-height:var(--scale-0);font-family:inherit;margin:0;padding:0;display:flex;background:none;border:none;cursor:pointer}button,a{color:var(--text-color);font-weight:var(--weight-light);line-height:var(--scale-0);font-size:var(--scale-0);font-family:inherit}.container{display:flex;gap:var(--size-1);flex-direction:row;align-items:center;line-height:var(--scale-0)}";
5
5
  const PosPredicateStyle0 = posPredicateCss;
6
6
 
7
7
  const PosPredicate = /*@__PURE__*/ proxyCustomElement(class PosPredicate extends HTMLElement {
@@ -1 +1 @@
1
- {"file":"pos-predicate2.js","mappings":";;;AAAA,MAAM,eAAe,GAAG,wZAAwZ,CAAC;AACjb,2BAAe,eAAe;;MCMjB,YAAY;;;;;;;wBAQH,KAAK;;IAEzB,MAAM;QACJ,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,QACE,WAAK,KAAK,EAAC,WAAW,IACpB,SAAG,IAAI,EAAE,IAAI,CAAC,GAAG,IAAG,IAAI,CAAC,GAAG,CAAK,EACjC,4BAAoB,mBAAmB,IAAI,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,IACzF,gBAAU,IAAI,EAAC,6BAA6B,GAAY,CACjD,CACL,EACN;SACH;aAAM;YACL,QACE,cAAQ,OAAO,EAAE,OAAO,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,GAAG,IAC3D,IAAI,CAAC,KAAK,CACJ,EACT;SACH;KACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/pos-predicate/pos-predicate.css?tag=pos-predicate&encapsulation=shadow","src/components/pos-predicate/pos-predicate.tsx"],"sourcesContent":[":host {\n --text-color: var(--pos-primary-color);\n font-family: var(--font-sans);\n}\n\nbutton {\n line-height: var(--scale-0);\n margin: 0;\n padding: 0;\n display: flex;\n background: none;\n border: none;\n cursor: pointer;\n}\n\nbutton,\na {\n color: var(--text-color);\n font-weight: var(--weight-light);\n line-height: var(--scale-0);\n font-size: var(--scale-0);\n}\n\n.container {\n display: flex;\n gap: var(--size-1);\n flex-direction: row;\n align-items: center;\n line-height: var(--scale-0);\n}\n","import { Component, h, Prop, State } from '@stencil/core';\n\n@Component({\n tag: 'pos-predicate',\n shadow: true,\n styleUrl: './pos-predicate.css',\n})\nexport class PosPredicate {\n @Prop()\n uri: string;\n\n @Prop()\n label: string;\n\n @State()\n expanded: boolean = false;\n\n render() {\n if (this.expanded) {\n return (\n <div class=\"container\">\n <a href={this.uri}>{this.uri}</a>\n <button aria-label={`collapse URI to ${this.label}`} onClick={() => (this.expanded = false)}>\n <ion-icon name=\"chevron-back-circle-outline\"></ion-icon>\n </button>\n </div>\n );\n } else {\n return (\n <button onClick={() => (this.expanded = true)} title={this.uri}>\n {this.label}\n </button>\n );\n }\n }\n}\n"],"version":3}
1
+ {"file":"pos-predicate2.js","mappings":";;;AAAA,MAAM,eAAe,GAAG,gcAAgc,CAAC;AACzd,2BAAe,eAAe;;MCMjB,YAAY;;;;;;;wBAQH,KAAK;;IAEzB,MAAM;QACJ,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,QACE,WAAK,KAAK,EAAC,WAAW,IACpB,SAAG,IAAI,EAAE,IAAI,CAAC,GAAG,IAAG,IAAI,CAAC,GAAG,CAAK,EACjC,4BAAoB,mBAAmB,IAAI,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,IACzF,gBAAU,IAAI,EAAC,6BAA6B,GAAY,CACjD,CACL,EACN;SACH;aAAM;YACL,QACE,cAAQ,OAAO,EAAE,OAAO,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,GAAG,IAC3D,IAAI,CAAC,KAAK,CACJ,EACT;SACH;KACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/pos-predicate/pos-predicate.css?tag=pos-predicate&encapsulation=shadow","src/components/pos-predicate/pos-predicate.tsx"],"sourcesContent":[":host {\n --text-color: var(--pos-primary-color);\n font-family: var(--font-sans);\n}\n\nbutton {\n line-height: var(--scale-0);\n font-family: inherit;\n margin: 0;\n padding: 0;\n display: flex;\n background: none;\n border: none;\n cursor: pointer;\n}\n\nbutton,\na {\n color: var(--text-color);\n font-weight: var(--weight-light);\n line-height: var(--scale-0);\n font-size: var(--scale-0);\n font-family: inherit;\n}\n\n.container {\n display: flex;\n gap: var(--size-1);\n flex-direction: row;\n align-items: center;\n line-height: var(--scale-0);\n}\n","import { Component, h, Prop, State } from '@stencil/core';\n\n@Component({\n tag: 'pos-predicate',\n shadow: true,\n styleUrl: './pos-predicate.css',\n})\nexport class PosPredicate {\n @Prop()\n uri: string;\n\n @Prop()\n label: string;\n\n @State()\n expanded: boolean = false;\n\n render() {\n if (this.expanded) {\n return (\n <div class=\"container\">\n <a href={this.uri}>{this.uri}</a>\n <button aria-label={`collapse URI to ${this.label}`} onClick={() => (this.expanded = false)}>\n <ion-icon name=\"chevron-back-circle-outline\"></ion-icon>\n </button>\n </div>\n );\n } else {\n return (\n <button onClick={() => (this.expanded = true)} title={this.uri}>\n {this.label}\n </button>\n );\n }\n }\n}\n"],"version":3}
@@ -12,7 +12,7 @@ import { d as defineCustomElement$3 } from './pos-predicate2.js';
12
12
  import { d as defineCustomElement$2 } from './pos-resource2.js';
13
13
  import { d as defineCustomElement$1 } from './pos-rich-link2.js';
14
14
 
15
- const posRelationsCss = ":host{--background-base-color:var(--color-grey-200);--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)}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)}pos-rich-link{--background-color:inherit}";
15
+ const posRelationsCss = ":host {\n --background-base-color: var(--color-grey-200);\n --background-color-even: hsl(from var(--background-base-color) h s calc(l + 7));\n --background-color-odd: hsl(from var(--background-base-color) h s calc(l + 10));\n --border-color: var(--background-base-color);\n}\n\ndd {\n padding: 0;\n margin: 0;\n}\n\ndl {\n display: flex;\n flex-direction: column;\n gap: var(--size-1);\n}\n\ndt {\n margin-bottom: var(--size-1);\n}\n\n.predicate-values:nth-child(odd) {\n background-color: var(--background-color-odd);\n}\n\n.predicate-values:nth-child(even) {\n background-color: var(--background-color-even);\n}\n\n.predicate-values {\n display: flex;\n flex-direction: column;\n border: var(--size-px) solid var(--border-color);\n padding: var(--size-2);\n gap: var(--size-1);\n\n .values {\n display: flex;\n flex-direction: column;\n gap: var(--size-3);\n }\n}\n\npos-rich-link {\n --background-color: inherit;\n}\n";
16
16
  const PosRelationsStyle0 = posRelationsCss;
17
17
 
18
18
  const PosRelations = /*@__PURE__*/ proxyCustomElement(class PosRelations extends HTMLElement {
@@ -30,7 +30,7 @@ const PosRelations = /*@__PURE__*/ proxyCustomElement(class PosRelations extends
30
30
  subscribeResource(this);
31
31
  }
32
32
  render() {
33
- const items = this.data.map(it => (h("div", { class: "predicate-values" }, h("dt", null, h("pos-predicate", { uri: it.predicate, label: it.label })), it.uris.map(uri => (h("dd", null, h("pos-rich-link", { uri: uri })))))));
33
+ const items = this.data.map(it => (h("div", { class: "predicate-values" }, h("dt", null, h("pos-predicate", { uri: it.predicate, label: it.label })), h("div", { class: "values" }, it.uris.map(uri => (h("dd", null, h("pos-rich-link", { uri: uri }))))))));
34
34
  return this.data.length > 0 ? h("dl", null, items) : null;
35
35
  }
36
36
  static get style() { return PosRelationsStyle0; }
@@ -1 +1 @@
1
- {"file":"pos-relations2.js","mappings":";;;;;;;;;;;;;;AAAA,MAAM,eAAe,GAAG,isBAAisB,CAAC;AAC1tB,2BAAe,eAAe;;MCQjB,YAAY;;;;;;QAUvB,oBAAe,GAAG,CAAC,QAAe;YAChC,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,SAAS,EAAE,CAAC;SAClC,CAAC;oBAX0B,EAAE;;IAK9B,iBAAiB;QACf,iBAAiB,CAAC,IAAI,CAAC,CAAC;KACzB;IAMD,MAAM;QACJ,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,KAC5B,WAAK,KAAK,EAAC,kBAAkB,IAC3B,cACE,qBAAe,GAAG,EAAE,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,GAAI,CAClD,EACJ,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,KACd,cACE,qBAAe,GAAG,EAAE,GAAG,GAAI,CACxB,CACN,CAAC,CACE,CACP,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,GAAG,cAAK,KAAK,CAAM,GAAG,IAAI,CAAC;KACvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/pos-relations/pos-relations.css?tag=pos-relations&encapsulation=shadow","src/components/pos-relations/pos-relations.tsx"],"sourcesContent":[":host {\n --background-base-color: var(--color-grey-200);\n --background-color-even: hsl(from var(--background-base-color) h s calc(l + 7));\n --background-color-odd: hsl(from var(--background-base-color) h s calc(l + 10));\n --border-color: var(--background-base-color);\n}\n\ndd {\n padding: 0;\n margin: 0;\n}\n\ndl {\n display: flex;\n flex-direction: column;\n gap: var(--size-1);\n}\n\ndt {\n margin-bottom: var(--size-1);\n}\n\n.predicate-values:nth-child(odd) {\n background-color: var(--background-color-odd);\n}\n\n.predicate-values:nth-child(even) {\n background-color: var(--background-color-even);\n}\n\n.predicate-values {\n display: flex;\n flex-direction: column;\n border: var(--size-px) solid var(--border-color);\n padding: var(--size-2);\n gap: var(--size-1);\n}\n\npos-rich-link {\n --background-color: inherit;\n}\n","import { Relation, Thing } from '@pod-os/core';\nimport { Component, Event, EventEmitter, h, State } from '@stencil/core';\nimport { ResourceAware, subscribeResource } from '../events/ResourceAware';\n\n@Component({\n tag: 'pos-relations',\n shadow: true,\n styleUrl: 'pos-relations.css',\n})\nexport class PosRelations implements ResourceAware {\n @State() data: Relation[] = [];\n\n @Event({ eventName: 'pod-os:resource' })\n subscribeResource: EventEmitter;\n\n componentWillLoad() {\n subscribeResource(this);\n }\n\n receiveResource = (resource: Thing) => {\n this.data = resource.relations();\n };\n\n render() {\n const items = this.data.map(it => (\n <div class=\"predicate-values\">\n <dt>\n <pos-predicate uri={it.predicate} label={it.label} />\n </dt>\n {it.uris.map(uri => (\n <dd>\n <pos-rich-link uri={uri} />\n </dd>\n ))}\n </div>\n ));\n return this.data.length > 0 ? <dl>{items}</dl> : null;\n }\n}\n"],"version":3}
1
+ {"file":"pos-relations2.js","mappings":";;;;;;;;;;;;;;AAAA,MAAM,eAAe,GAAG,u7BAAu7B,CAAC;AACh9B,2BAAe,eAAe;;MCQjB,YAAY;;;;;;QAUvB,oBAAe,GAAG,CAAC,QAAe;YAChC,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,SAAS,EAAE,CAAC;SAClC,CAAC;oBAX0B,EAAE;;IAK9B,iBAAiB;QACf,iBAAiB,CAAC,IAAI,CAAC,CAAC;KACzB;IAMD,MAAM;QACJ,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,KAC5B,WAAK,KAAK,EAAC,kBAAkB,IAC3B,cACE,qBAAe,GAAG,EAAE,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,GAAI,CAClD,EACL,WAAK,KAAK,EAAC,QAAQ,IAChB,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,KACd,cACE,qBAAe,GAAG,EAAE,GAAG,GAAI,CACxB,CACN,CAAC,CACE,CACF,CACP,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,GAAG,cAAK,KAAK,CAAM,GAAG,IAAI,CAAC;KACvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/pos-relations/pos-relations.css?tag=pos-relations&encapsulation=shadow","src/components/pos-relations/pos-relations.tsx"],"sourcesContent":[":host {\n --background-base-color: var(--color-grey-200);\n --background-color-even: hsl(from var(--background-base-color) h s calc(l + 7));\n --background-color-odd: hsl(from var(--background-base-color) h s calc(l + 10));\n --border-color: var(--background-base-color);\n}\n\ndd {\n padding: 0;\n margin: 0;\n}\n\ndl {\n display: flex;\n flex-direction: column;\n gap: var(--size-1);\n}\n\ndt {\n margin-bottom: var(--size-1);\n}\n\n.predicate-values:nth-child(odd) {\n background-color: var(--background-color-odd);\n}\n\n.predicate-values:nth-child(even) {\n background-color: var(--background-color-even);\n}\n\n.predicate-values {\n display: flex;\n flex-direction: column;\n border: var(--size-px) solid var(--border-color);\n padding: var(--size-2);\n gap: var(--size-1);\n\n .values {\n display: flex;\n flex-direction: column;\n gap: var(--size-3);\n }\n}\n\npos-rich-link {\n --background-color: inherit;\n}\n","import { Relation, Thing } from '@pod-os/core';\nimport { Component, Event, EventEmitter, h, State } from '@stencil/core';\nimport { ResourceAware, subscribeResource } from '../events/ResourceAware';\n\n@Component({\n tag: 'pos-relations',\n shadow: true,\n styleUrl: 'pos-relations.css',\n})\nexport class PosRelations implements ResourceAware {\n @State() data: Relation[] = [];\n\n @Event({ eventName: 'pod-os:resource' })\n subscribeResource: EventEmitter;\n\n componentWillLoad() {\n subscribeResource(this);\n }\n\n receiveResource = (resource: Thing) => {\n this.data = resource.relations();\n };\n\n render() {\n const items = this.data.map(it => (\n <div class=\"predicate-values\">\n <dt>\n <pos-predicate uri={it.predicate} label={it.label} />\n </dt>\n <div class=\"values\">\n {it.uris.map(uri => (\n <dd>\n <pos-rich-link uri={uri} />\n </dd>\n ))}\n </div>\n </div>\n ));\n return this.data.length > 0 ? <dl>{items}</dl> : null;\n }\n}\n"],"version":3}
@@ -12,7 +12,7 @@ import { d as defineCustomElement$3 } from './pos-predicate2.js';
12
12
  import { d as defineCustomElement$2 } from './pos-resource2.js';
13
13
  import { d as defineCustomElement$1 } from './pos-rich-link2.js';
14
14
 
15
- const posReverseRelationsCss = ":host{--background-base-color:var(--color-grey-200);--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)}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)}pos-rich-link{--background-color:inherit}";
15
+ const posReverseRelationsCss = ":host {\n --background-base-color: var(--color-grey-200);\n --background-color-even: hsl(from var(--background-base-color) h s calc(l + 7));\n --background-color-odd: hsl(from var(--background-base-color) h s calc(l + 10));\n --border-color: var(--background-base-color);\n}\n\ndd {\n padding: 0;\n margin: 0;\n}\n\ndl {\n display: flex;\n flex-direction: column;\n gap: var(--size-1);\n}\n\ndt {\n margin-bottom: var(--size-1);\n}\n\n.predicate-values:nth-child(odd) {\n background-color: var(--background-color-odd);\n}\n\n.predicate-values:nth-child(even) {\n background-color: var(--background-color-even);\n}\n\n.predicate-values {\n display: flex;\n flex-direction: column;\n border: var(--size-px) solid var(--border-color);\n padding: var(--size-2);\n gap: var(--size-1);\n .values {\n display: flex;\n flex-direction: column;\n gap: var(--size-3);\n }\n}\n\npos-rich-link {\n --background-color: inherit;\n}\n";
16
16
  const PosReverseRelationsStyle0 = posReverseRelationsCss;
17
17
 
18
18
  const PosReverseRelations = /*@__PURE__*/ proxyCustomElement(class PosReverseRelations extends HTMLElement {
@@ -30,7 +30,7 @@ const PosReverseRelations = /*@__PURE__*/ proxyCustomElement(class PosReverseRel
30
30
  subscribeResource(this);
31
31
  }
32
32
  render() {
33
- const items = this.data.map(it => (h("div", { class: "predicate-values" }, h("dt", null, h("pos-predicate", { uri: it.predicate, label: `is ${it.label} of` })), it.uris.map(uri => (h("dd", null, h("pos-rich-link", { uri: uri })))))));
33
+ const items = this.data.map(it => (h("div", { class: "predicate-values" }, h("dt", null, h("pos-predicate", { uri: it.predicate, label: `is ${it.label} of` })), h("div", { class: "values" }, it.uris.map(uri => (h("dd", null, h("pos-rich-link", { uri: uri }))))))));
34
34
  return this.data.length > 0 ? h("dl", null, items) : null;
35
35
  }
36
36
  static get style() { return PosReverseRelationsStyle0; }
@@ -1 +1 @@
1
- {"file":"pos-reverse-relations2.js","mappings":";;;;;;;;;;;;;;AAAA,MAAM,sBAAsB,GAAG,isBAAisB,CAAC;AACjuB,kCAAe,sBAAsB;;MCQxB,mBAAmB;;;;;;QAS9B,oBAAe,GAAG,CAAC,QAAe;YAChC,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,gBAAgB,EAAE,CAAC;SACzC,CAAC;oBAV0B,EAAE;;IAI9B,iBAAiB;QACf,iBAAiB,CAAC,IAAI,CAAC,CAAC;KACzB;IAMD,MAAM;QACJ,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,KAC5B,WAAK,KAAK,EAAC,kBAAkB,IAC3B,cACE,qBAAe,GAAG,EAAE,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,KAAK,KAAK,GAAI,CAC7D,EACJ,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,KACd,cACE,qBAAe,GAAG,EAAE,GAAG,GAAI,CACxB,CACN,CAAC,CACE,CACP,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,GAAG,cAAK,KAAK,CAAM,GAAG,IAAI,CAAC;KACvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/pos-reverse-relations/pos-reverse-relations.css?tag=pos-reverse-relations&encapsulation=shadow","src/components/pos-reverse-relations/pos-reverse-relations.tsx"],"sourcesContent":[":host {\n --background-base-color: var(--color-grey-200);\n --background-color-even: hsl(from var(--background-base-color) h s calc(l + 7));\n --background-color-odd: hsl(from var(--background-base-color) h s calc(l + 10));\n --border-color: var(--background-base-color);\n}\n\ndd {\n padding: 0;\n margin: 0;\n}\n\ndl {\n display: flex;\n flex-direction: column;\n gap: var(--size-1);\n}\n\ndt {\n margin-bottom: var(--size-1);\n}\n\n.predicate-values:nth-child(odd) {\n background-color: var(--background-color-odd);\n}\n\n.predicate-values:nth-child(even) {\n background-color: var(--background-color-even);\n}\n\n.predicate-values {\n display: flex;\n flex-direction: column;\n border: var(--size-px) solid var(--border-color);\n padding: var(--size-2);\n gap: var(--size-1);\n}\n\npos-rich-link {\n --background-color: inherit;\n}\n","import { Relation, Thing } from '@pod-os/core';\nimport { Component, h, Event, EventEmitter, State } from '@stencil/core';\nimport { ResourceAware, subscribeResource } from '../events/ResourceAware';\n\n@Component({\n tag: 'pos-reverse-relations',\n shadow: true,\n styleUrl: 'pos-reverse-relations.css',\n})\nexport class PosReverseRelations implements ResourceAware {\n @State() data: Relation[] = [];\n\n @Event({ eventName: 'pod-os:resource' }) subscribeResource: EventEmitter;\n\n componentWillLoad() {\n subscribeResource(this);\n }\n\n receiveResource = (resource: Thing) => {\n this.data = resource.reverseRelations();\n };\n\n render() {\n const items = this.data.map(it => (\n <div class=\"predicate-values\">\n <dt>\n <pos-predicate uri={it.predicate} label={`is ${it.label} of`} />\n </dt>\n {it.uris.map(uri => (\n <dd>\n <pos-rich-link uri={uri} />\n </dd>\n ))}\n </div>\n ));\n return this.data.length > 0 ? <dl>{items}</dl> : null;\n }\n}\n"],"version":3}
1
+ {"file":"pos-reverse-relations2.js","mappings":";;;;;;;;;;;;;;AAAA,MAAM,sBAAsB,GAAG,q7BAAq7B,CAAC;AACr9B,kCAAe,sBAAsB;;MCQxB,mBAAmB;;;;;;QAS9B,oBAAe,GAAG,CAAC,QAAe;YAChC,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,gBAAgB,EAAE,CAAC;SACzC,CAAC;oBAV0B,EAAE;;IAI9B,iBAAiB;QACf,iBAAiB,CAAC,IAAI,CAAC,CAAC;KACzB;IAMD,MAAM;QACJ,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,KAC5B,WAAK,KAAK,EAAC,kBAAkB,IAC3B,cACE,qBAAe,GAAG,EAAE,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,KAAK,KAAK,GAAI,CAC7D,EACL,WAAK,KAAK,EAAC,QAAQ,IAChB,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,KACd,cACE,qBAAe,GAAG,EAAE,GAAG,GAAI,CACxB,CACN,CAAC,CACE,CACF,CACP,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,GAAG,cAAK,KAAK,CAAM,GAAG,IAAI,CAAC;KACvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/pos-reverse-relations/pos-reverse-relations.css?tag=pos-reverse-relations&encapsulation=shadow","src/components/pos-reverse-relations/pos-reverse-relations.tsx"],"sourcesContent":[":host {\n --background-base-color: var(--color-grey-200);\n --background-color-even: hsl(from var(--background-base-color) h s calc(l + 7));\n --background-color-odd: hsl(from var(--background-base-color) h s calc(l + 10));\n --border-color: var(--background-base-color);\n}\n\ndd {\n padding: 0;\n margin: 0;\n}\n\ndl {\n display: flex;\n flex-direction: column;\n gap: var(--size-1);\n}\n\ndt {\n margin-bottom: var(--size-1);\n}\n\n.predicate-values:nth-child(odd) {\n background-color: var(--background-color-odd);\n}\n\n.predicate-values:nth-child(even) {\n background-color: var(--background-color-even);\n}\n\n.predicate-values {\n display: flex;\n flex-direction: column;\n border: var(--size-px) solid var(--border-color);\n padding: var(--size-2);\n gap: var(--size-1);\n .values {\n display: flex;\n flex-direction: column;\n gap: var(--size-3);\n }\n}\n\npos-rich-link {\n --background-color: inherit;\n}\n","import { Relation, Thing } from '@pod-os/core';\nimport { Component, h, Event, EventEmitter, State } from '@stencil/core';\nimport { ResourceAware, subscribeResource } from '../events/ResourceAware';\n\n@Component({\n tag: 'pos-reverse-relations',\n shadow: true,\n styleUrl: 'pos-reverse-relations.css',\n})\nexport class PosReverseRelations implements ResourceAware {\n @State() data: Relation[] = [];\n\n @Event({ eventName: 'pod-os:resource' }) subscribeResource: EventEmitter;\n\n componentWillLoad() {\n subscribeResource(this);\n }\n\n receiveResource = (resource: Thing) => {\n this.data = resource.reverseRelations();\n };\n\n render() {\n const items = this.data.map(it => (\n <div class=\"predicate-values\">\n <dt>\n <pos-predicate uri={it.predicate} label={`is ${it.label} of`} />\n </dt>\n <div class=\"values\">\n {it.uris.map(uri => (\n <dd>\n <pos-rich-link uri={uri} />\n </dd>\n ))}\n </div>\n </div>\n ));\n return this.data.length > 0 ? <dl>{items}</dl> : null;\n }\n}\n"],"version":3}