@pod-os/elements 0.38.0 → 0.39.0-rc.dc9b993.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.
@@ -2,6 +2,14 @@ import { h } from "@stencil/core";
2
2
  import { subscribeResource } from "../events/ResourceAware";
3
3
  import { subscribePodOs } from "../events/PodOsAware";
4
4
  import { Subject, takeUntil } from "rxjs";
5
+ /**
6
+ * Renders a template for each resource in a list. The list is either defined by a relation from the parent resource
7
+ * or by a class for which instances will be listed.
8
+ *
9
+ * `pos-list` must contain a `<template>` as a single child component. This template will be used to render each resource
10
+ * in the list. All PodOS elements within this template will receive the listed resource as their context, e.g. a `pos-label`
11
+ * will then render the label of each list item.
12
+ */
5
13
  export class PosList {
6
14
  constructor() {
7
15
  /**
@@ -1,6 +1,14 @@
1
1
  import { PodOS, Thing } from '@pod-os/core';
2
2
  import { ResourceAware, ResourceEventEmitter } from '../events/ResourceAware';
3
3
  import { PodOsAware, PodOsEventEmitter } from '../events/PodOsAware';
4
+ /**
5
+ * Renders a template for each resource in a list. The list is either defined by a relation from the parent resource
6
+ * or by a class for which instances will be listed.
7
+ *
8
+ * `pos-list` must contain a `<template>` as a single child component. This template will be used to render each resource
9
+ * in the list. All PodOS elements within this template will receive the listed resource as their context, e.g. a `pos-label`
10
+ * will then render the label of each list item.
11
+ */
4
12
  export declare class PosList implements PodOsAware, ResourceAware {
5
13
  /**
6
14
  * URI of the predicate to follow
@@ -138,6 +138,13 @@ export namespace Components {
138
138
  */
139
139
  interface PosLabel {
140
140
  }
141
+ /**
142
+ * Renders a template for each resource in a list. The list is either defined by a relation from the parent resource
143
+ * or by a class for which instances will be listed.
144
+ * `pos-list` must contain a `<template>` as a single child component. This template will be used to render each resource
145
+ * in the list. All PodOS elements within this template will receive the listed resource as their context, e.g. a `pos-label`
146
+ * will then render the label of each list item.
147
+ */
141
148
  interface PosList {
142
149
  /**
143
150
  * Whether listed resources should be fetched before being displayed
@@ -825,6 +832,13 @@ declare global {
825
832
  "pod-os:resource": any;
826
833
  "pod-os:init": any;
827
834
  }
835
+ /**
836
+ * Renders a template for each resource in a list. The list is either defined by a relation from the parent resource
837
+ * or by a class for which instances will be listed.
838
+ * `pos-list` must contain a `<template>` as a single child component. This template will be used to render each resource
839
+ * in the list. All PodOS elements within this template will receive the listed resource as their context, e.g. a `pos-label`
840
+ * will then render the label of each list item.
841
+ */
828
842
  interface HTMLPosListElement extends Components.PosList, HTMLStencilElement {
829
843
  addEventListener<K extends keyof HTMLPosListElementEventMap>(type: K, listener: (this: HTMLPosListElement, ev: PosListCustomEvent<HTMLPosListElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
830
844
  addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
@@ -1518,6 +1532,13 @@ declare namespace LocalJSX {
1518
1532
  interface PosLabel {
1519
1533
  "onPod-os:resource"?: (event: PosLabelCustomEvent<any>) => void;
1520
1534
  }
1535
+ /**
1536
+ * Renders a template for each resource in a list. The list is either defined by a relation from the parent resource
1537
+ * or by a class for which instances will be listed.
1538
+ * `pos-list` must contain a `<template>` as a single child component. This template will be used to render each resource
1539
+ * in the list. All PodOS elements within this template will receive the listed resource as their context, e.g. a `pos-label`
1540
+ * will then render the label of each list item.
1541
+ */
1521
1542
  interface PosList {
1522
1543
  /**
1523
1544
  * Whether listed resources should be fetched before being displayed
@@ -1963,6 +1984,13 @@ declare module "@stencil/core" {
1963
1984
  * Displays a human-readable label of the resource, provided by [Thing.label()](https://pod-os.org/reference/core/classes/thing/#label)
1964
1985
  */
1965
1986
  "pos-label": LocalJSX.IntrinsicElements["pos-label"] & JSXBase.HTMLAttributes<HTMLPosLabelElement>;
1987
+ /**
1988
+ * Renders a template for each resource in a list. The list is either defined by a relation from the parent resource
1989
+ * or by a class for which instances will be listed.
1990
+ * `pos-list` must contain a `<template>` as a single child component. This template will be used to render each resource
1991
+ * in the list. All PodOS elements within this template will receive the listed resource as their context, e.g. a `pos-label`
1992
+ * will then render the label of each list item.
1993
+ */
1966
1994
  "pos-list": LocalJSX.IntrinsicElements["pos-list"] & JSXBase.HTMLAttributes<HTMLPosListElement>;
1967
1995
  "pos-literals": LocalJSX.IntrinsicElements["pos-literals"] & JSXBase.HTMLAttributes<HTMLPosLiteralsElement>;
1968
1996
  "pos-login": LocalJSX.IntrinsicElements["pos-login"] & JSXBase.HTMLAttributes<HTMLPosLoginElement>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pod-os/elements",
3
- "version": "0.38.0",
3
+ "version": "0.39.0-rc.dc9b993.0",
4
4
  "description": "Custom elements for usage with Solid Pods",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -21,7 +21,7 @@
21
21
  "generate": "stencil generate"
22
22
  },
23
23
  "dependencies": {
24
- "@pod-os/core": "^0.27.0",
24
+ "@pod-os/core": "v0.28.0-rc.dc9b993.0",
25
25
  "@shoelace-style/shoelace": "^2.20.1",
26
26
  "@stencil/core": "^4.43.2",
27
27
  "@stencil/store": "^2.2.2",