@pod-os/elements 0.41.0-rc.fcadbb6.0 → 0.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{chunk.URTPIBTY-CyUQzrtC.js → chunk.URTPIBTY-C9cOc4B-.js} +2 -2
- package/dist/cjs/{chunk.XQ2OKYYA-Dfzydh50.js → chunk.XQ2OKYYA-CTZvRtz3.js} +3 -3
- package/dist/cjs/{chunk.ZGGPD2XJ-BhNheC5q.js → chunk.ZGGPD2XJ-BvGHEYp6.js} +1 -1
- package/dist/cjs/{class-map-DFvbJjpM.js → class-map-C9P5WsLw.js} +1 -1
- package/dist/cjs/elements.cjs.js +2 -2
- package/dist/cjs/{index-BP03J2RA.js → index-BPvAwpRj.js} +137 -33
- package/dist/cjs/{index-CFcC3IGM.js → index-CjKppELa.js} +2 -2
- package/dist/cjs/{jsonld-V2RB47OZ-B6QDxKa1.js → jsonld-V2RB47OZ-C8WVLsWC.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/pos-add-literal-value_3.cjs.entry.js +5 -5
- package/dist/cjs/pos-add-new-thing_32.cjs.entry.js +27 -10
- package/dist/cjs/pos-add-relation.cjs.entry.js +3 -3
- package/dist/cjs/pos-app-document-viewer.cjs.entry.js +1 -1
- package/dist/cjs/pos-app-generic.cjs.entry.js +1 -1
- package/dist/cjs/pos-app-image-viewer.cjs.entry.js +1 -1
- package/dist/cjs/pos-app-ldp-container.cjs.entry.js +1 -1
- package/dist/cjs/pos-app-rdf-document.cjs.entry.js +1 -1
- package/dist/cjs/pos-attachments.cjs.entry.js +1 -1
- package/dist/cjs/pos-case.cjs.entry.js +1 -1
- package/dist/cjs/pos-container-contents.cjs.entry.js +2 -2
- package/dist/cjs/pos-container-item_3.cjs.entry.js +4 -4
- package/dist/cjs/pos-document.cjs.entry.js +4 -4
- package/dist/cjs/pos-list.cjs.entry.js +1 -1
- package/dist/cjs/pos-markdown-document.cjs.entry.js +412 -122
- package/dist/cjs/pos-relations_2.cjs.entry.js +1 -1
- package/dist/cjs/pos-subjects.cjs.entry.js +2 -2
- package/dist/cjs/pos-switch.cjs.entry.js +1 -1
- package/dist/cjs/pos-tool-attachments.cjs.entry.js +1 -1
- package/dist/cjs/pos-value.cjs.entry.js +22 -2
- package/dist/collection/components/pos-description/pos-description.js +18 -3
- package/dist/collection/components/pos-label/pos-label.js +15 -4
- package/dist/collection/components/pos-value/pos-value.js +27 -4
- package/dist/components/index2.js +2 -2
- package/dist/components/pos-description2.js +1 -1
- package/dist/components/pos-label2.js +1 -1
- package/dist/components/pos-markdown-document2.js +1 -1
- package/dist/components/pos-value.js +1 -1
- package/dist/custom-elements.json +5 -3
- package/dist/elements/elements.esm.js +1 -1
- package/dist/elements/{p-33783890.entry.js → p-1b8c9b61.entry.js} +1 -1
- package/dist/elements/p-1bcdde10.entry.js +1 -0
- package/dist/elements/{p-2f122da6.entry.js → p-1e98efdc.entry.js} +1 -1
- package/dist/elements/{p-3ef3a9a9.entry.js → p-380d72c2.entry.js} +1 -1
- package/dist/elements/{p-31370224.entry.js → p-440a8508.entry.js} +1 -1
- package/dist/elements/{p-aca646a4.entry.js → p-4d349a89.entry.js} +1 -1
- package/dist/elements/{p-a234b3fe.entry.js → p-52443feb.entry.js} +1 -1
- package/dist/elements/{p-513f7548.entry.js → p-641e64fd.entry.js} +1 -1
- package/dist/elements/{p-DqO-cIHe.js → p-7TsXf0Xj.js} +1 -1
- package/dist/elements/{p-a78df72b.entry.js → p-941b9b51.entry.js} +1 -1
- package/dist/elements/{p-5506bf9a.entry.js → p-9b5c45b6.entry.js} +1 -1
- package/dist/elements/{p-DPNKR_cm.js → p-BKLehMby.js} +5 -5
- package/dist/elements/p-BzjgviTt.js +67 -0
- package/dist/elements/{p-DO6v4X9H.js → p-C-Ke6Sdx.js} +3 -3
- package/dist/elements/{p-spEUIGXI.js → p-CsdCh9hf.js} +1 -1
- package/dist/elements/{p-Bz2zblgU.js → p-KLP10Ef6.js} +7 -7
- package/dist/elements/{p-d31c55b9.entry.js → p-a62af5eb.entry.js} +1 -1
- package/dist/elements/{p-1e0bd264.entry.js → p-b30e9b9c.entry.js} +9 -9
- package/dist/elements/{p-5f8df3c2.entry.js → p-c1cb97ef.entry.js} +1 -1
- package/dist/elements/p-c60dc303.entry.js +1 -0
- package/dist/elements/{p-c4034954.entry.js → p-c697bb3c.entry.js} +1 -1
- package/dist/elements/{p-0febf76e.entry.js → p-c83d76f9.entry.js} +1 -1
- package/dist/elements/{p-4fa32d10.entry.js → p-ccfbad21.entry.js} +1 -1
- package/dist/elements/{p-e4eae182.entry.js → p-eadbef6c.entry.js} +1 -1
- package/dist/elements/p-f26842e5.entry.js +1 -0
- package/dist/elements/{p-17d63fec.entry.js → p-f57e26b7.entry.js} +1 -1
- package/dist/elements/{p-DpbuT47x.js → p-jSCnU8fW.js} +1 -1
- package/dist/esm/{chunk.URTPIBTY-DGDKVdvN.js → chunk.URTPIBTY-CndE5cVS.js} +2 -2
- package/dist/esm/{chunk.XQ2OKYYA-DY8d9BRU.js → chunk.XQ2OKYYA-BBXcL00i.js} +3 -3
- package/dist/esm/{chunk.ZGGPD2XJ-CLV8PNGL.js → chunk.ZGGPD2XJ-DGIJXk11.js} +1 -1
- package/dist/esm/{class-map-CtuZET5H.js → class-map-BaV3g1im.js} +1 -1
- package/dist/esm/elements.js +3 -3
- package/dist/esm/{index-CMbRpNym.js → index-CmKOSDim.js} +137 -33
- package/dist/esm/{index-spEUIGXI.js → index-CsdCh9hf.js} +1 -1
- package/dist/esm/{jsonld-V2RB47OZ-zn531VHn.js → jsonld-V2RB47OZ-CIDz9zb9.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/pos-add-literal-value_3.entry.js +5 -5
- package/dist/esm/pos-add-new-thing_32.entry.js +27 -10
- package/dist/esm/pos-add-relation.entry.js +3 -3
- package/dist/esm/pos-app-document-viewer.entry.js +1 -1
- package/dist/esm/pos-app-generic.entry.js +1 -1
- package/dist/esm/pos-app-image-viewer.entry.js +1 -1
- package/dist/esm/pos-app-ldp-container.entry.js +1 -1
- package/dist/esm/pos-app-rdf-document.entry.js +1 -1
- package/dist/esm/pos-attachments.entry.js +1 -1
- package/dist/esm/pos-case.entry.js +1 -1
- package/dist/esm/pos-container-contents.entry.js +2 -2
- package/dist/esm/pos-container-item_3.entry.js +4 -4
- package/dist/esm/pos-document.entry.js +4 -4
- package/dist/esm/pos-list.entry.js +1 -1
- package/dist/esm/pos-markdown-document.entry.js +412 -122
- package/dist/esm/pos-relations_2.entry.js +1 -1
- package/dist/esm/pos-subjects.entry.js +2 -2
- package/dist/esm/pos-switch.entry.js +1 -1
- package/dist/esm/pos-tool-attachments.entry.js +1 -1
- package/dist/esm/pos-value.entry.js +22 -2
- package/dist/types/components/pos-description/pos-description.d.ts +9 -2
- package/dist/types/components/pos-label/pos-label.d.ts +6 -2
- package/dist/types/components/pos-value/pos-value.d.ts +7 -2
- package/dist/types/components.d.ts +32 -8
- package/package.json +7 -7
- package/dist/elements/p-624503dd.entry.js +0 -1
- package/dist/elements/p-d6e9d178.entry.js +0 -1
- package/dist/elements/p-f9c10964.entry.js +0 -1
- package/dist/elements/p-sVi8GCz5.js +0 -67
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-CjKppELa.js');
|
|
4
4
|
var ResourceAware = require('./ResourceAware-uqh9ZRDt.js');
|
|
5
5
|
|
|
6
6
|
const posRelationsCss = () => `:host{--background-base-color:color-mix(in srgb, var(--pos-background-color), var(--color-grey-800) 10%);--background-color-even:hsl(from var(--background-base-color) h s calc(l + 7));--background-color-odd:hsl(from var(--background-base-color) h s calc(l + 10));--border-color:var(--background-base-color)}dd{padding:0;margin:0}dl{display:flex;flex-direction:column;gap:var(--size-1);padding:0;margin:0}dt{margin-bottom:var(--size-1)}.predicate-values:nth-child(odd){background-color:var(--background-color-odd)}.predicate-values:nth-child(even){background-color:var(--background-color-even)}.predicate-values{display:flex;flex-direction:column;border:var(--size-px) solid var(--border-color);padding:var(--size-2);gap:var(--size-1);.values{display:flex;flex-direction:column;gap:var(--size-3)}}pos-rich-link{--background-color:inherit}`;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var index$1 = require('./index-
|
|
3
|
+
var index = require('./index-CjKppELa.js');
|
|
4
|
+
var index$1 = require('./index-BPvAwpRj.js');
|
|
5
5
|
var ResourceAware = require('./ResourceAware-uqh9ZRDt.js');
|
|
6
6
|
|
|
7
7
|
const posSubjectsCss = () => `:host{--background-base-color:color-mix(in srgb, var(--pos-background-color), var(--color-grey-800) 10%);--background-color-even:hsl(from var(--background-base-color) h s calc(l + 7));--background-color-odd:hsl(from var(--background-base-color) h s calc(l + 10));--border-color:var(--background-base-color)}ul{display:flex;flex-direction:column;gap:var(--size-2);margin:0;padding:0;li{border:var(--size-px) solid var(--border-color);padding:var(--size-4);list-style-type:none;&:nth-child(even){background-color:var(--background-color-even)}&:nth-child(odd){background-color:var(--background-color-odd)}}}`;
|
|
@@ -1,22 +1,42 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-CjKppELa.js');
|
|
4
4
|
var ResourceAware = require('./ResourceAware-uqh9ZRDt.js');
|
|
5
|
+
var index$1 = require('./index-DlHQ3blV.js');
|
|
5
6
|
|
|
6
7
|
const PosValue = class {
|
|
7
8
|
constructor(hostRef) {
|
|
8
9
|
index.registerInstance(this, hostRef);
|
|
9
10
|
this.subscribeResource = index.createEvent(this, "pod-os:resource", 7);
|
|
11
|
+
this.disconnected$ = new index$1.cjsExports.Subject();
|
|
10
12
|
this.receiveResource = (resource) => {
|
|
11
13
|
this.resource = resource;
|
|
14
|
+
this.observeAnyValue();
|
|
12
15
|
};
|
|
13
16
|
}
|
|
14
17
|
componentWillLoad() {
|
|
15
18
|
ResourceAware.subscribeResource(this);
|
|
16
19
|
}
|
|
20
|
+
observeAnyValue() {
|
|
21
|
+
this.disconnected$.next();
|
|
22
|
+
this.resource
|
|
23
|
+
.observeAnyValue(this.predicate)
|
|
24
|
+
.pipe(index$1.cjsExports.takeUntil(this.disconnected$))
|
|
25
|
+
.subscribe(value => (this.value = value));
|
|
26
|
+
}
|
|
17
27
|
render() {
|
|
18
|
-
|
|
28
|
+
var _a;
|
|
29
|
+
return (_a = this.value) !== null && _a !== void 0 ? _a : null;
|
|
30
|
+
}
|
|
31
|
+
disconnectedCallback() {
|
|
32
|
+
this.disconnected$.next();
|
|
33
|
+
this.disconnected$.complete();
|
|
19
34
|
}
|
|
35
|
+
static get watchers() { return {
|
|
36
|
+
"predicate": [{
|
|
37
|
+
"observeAnyValue": 0
|
|
38
|
+
}]
|
|
39
|
+
}; }
|
|
20
40
|
};
|
|
21
41
|
|
|
22
42
|
exports.pos_value = PosValue;
|
|
@@ -1,21 +1,36 @@
|
|
|
1
1
|
import { subscribeResource } from "../events/ResourceAware";
|
|
2
|
+
import { Subject, takeUntil } from "rxjs";
|
|
3
|
+
/**
|
|
4
|
+
* Displays a description of the resource, as provided by [Thing.description()](https://pod-os.org/reference/core/classes/thing/#description).
|
|
5
|
+
*
|
|
6
|
+
* Re-renders when data in the store changes using [Thing.observeDescription()](https://pod-os.org/reference/core/classes/thing/#observeDescription).
|
|
7
|
+
*/
|
|
2
8
|
export class PosDescription {
|
|
3
9
|
constructor() {
|
|
10
|
+
this.disconnected$ = new Subject();
|
|
4
11
|
this.receiveResource = (resource) => {
|
|
5
|
-
this.
|
|
12
|
+
this.disconnected$.next();
|
|
13
|
+
resource
|
|
14
|
+
.observeDescription()
|
|
15
|
+
.pipe(takeUntil(this.disconnected$))
|
|
16
|
+
.subscribe(description => (this.description = description));
|
|
6
17
|
};
|
|
7
18
|
}
|
|
8
19
|
componentWillLoad() {
|
|
9
20
|
subscribeResource(this);
|
|
10
21
|
}
|
|
11
22
|
render() {
|
|
12
|
-
return this.
|
|
23
|
+
return this.description ? this.description : null;
|
|
24
|
+
}
|
|
25
|
+
disconnectedCallback() {
|
|
26
|
+
this.disconnected$.next();
|
|
27
|
+
this.disconnected$.complete();
|
|
13
28
|
}
|
|
14
29
|
static get is() { return "pos-description"; }
|
|
15
30
|
static get encapsulation() { return "shadow"; }
|
|
16
31
|
static get states() {
|
|
17
32
|
return {
|
|
18
|
-
"
|
|
33
|
+
"description": {}
|
|
19
34
|
};
|
|
20
35
|
}
|
|
21
36
|
static get events() {
|
|
@@ -1,24 +1,35 @@
|
|
|
1
1
|
import { subscribeResource } from "../events/ResourceAware";
|
|
2
|
+
import { Subject, takeUntil } from "rxjs";
|
|
2
3
|
/**
|
|
3
|
-
* Displays a human-readable label of the resource, provided by [Thing.label()](https://pod-os.org/reference/core/classes/thing/#label)
|
|
4
|
+
* Displays a human-readable label of the resource, as provided by [Thing.label()](https://pod-os.org/reference/core/classes/thing/#label).
|
|
5
|
+
*
|
|
6
|
+
* Re-renders when data in the store changes using [Thing.observeLabel()](https://pod-os.org/reference/core/classes/thing/#observeLabel).
|
|
4
7
|
*/
|
|
5
8
|
export class PosLabel {
|
|
6
9
|
constructor() {
|
|
10
|
+
this.disconnected$ = new Subject();
|
|
7
11
|
this.receiveResource = (resource) => {
|
|
8
|
-
|
|
12
|
+
resource
|
|
13
|
+
.observeLabel()
|
|
14
|
+
.pipe(takeUntil(this.disconnected$))
|
|
15
|
+
.subscribe(label => (this.label = label));
|
|
9
16
|
};
|
|
10
17
|
}
|
|
11
18
|
componentWillLoad() {
|
|
12
19
|
subscribeResource(this);
|
|
13
20
|
}
|
|
14
21
|
render() {
|
|
15
|
-
return this.
|
|
22
|
+
return this.label ? this.label : null;
|
|
23
|
+
}
|
|
24
|
+
disconnectedCallback() {
|
|
25
|
+
this.disconnected$.next();
|
|
26
|
+
this.disconnected$.complete();
|
|
16
27
|
}
|
|
17
28
|
static get is() { return "pos-label"; }
|
|
18
29
|
static get encapsulation() { return "shadow"; }
|
|
19
30
|
static get states() {
|
|
20
31
|
return {
|
|
21
|
-
"
|
|
32
|
+
"label": {}
|
|
22
33
|
};
|
|
23
34
|
}
|
|
24
35
|
static get events() {
|
|
@@ -1,19 +1,35 @@
|
|
|
1
1
|
import { subscribeResource } from "../events/ResourceAware";
|
|
2
|
+
import { Subject, takeUntil } from "rxjs";
|
|
2
3
|
/**
|
|
3
4
|
* Shows a single value linked to the resource using the given predicate.
|
|
4
|
-
* The value is determined by [Thing.
|
|
5
|
+
* The value is determined by [Thing.observeAnyValue()](https://pod-os.org/reference/core/classes/thing/#observeanyvalue)
|
|
6
|
+
* and re-renders when data in the store changes
|
|
5
7
|
*/
|
|
6
8
|
export class PosValue {
|
|
7
9
|
constructor() {
|
|
10
|
+
this.disconnected$ = new Subject();
|
|
8
11
|
this.receiveResource = (resource) => {
|
|
9
12
|
this.resource = resource;
|
|
13
|
+
this.observeAnyValue();
|
|
10
14
|
};
|
|
11
15
|
}
|
|
12
16
|
componentWillLoad() {
|
|
13
17
|
subscribeResource(this);
|
|
14
18
|
}
|
|
19
|
+
observeAnyValue() {
|
|
20
|
+
this.disconnected$.next();
|
|
21
|
+
this.resource
|
|
22
|
+
.observeAnyValue(this.predicate)
|
|
23
|
+
.pipe(takeUntil(this.disconnected$))
|
|
24
|
+
.subscribe(value => (this.value = value));
|
|
25
|
+
}
|
|
15
26
|
render() {
|
|
16
|
-
|
|
27
|
+
var _a;
|
|
28
|
+
return (_a = this.value) !== null && _a !== void 0 ? _a : null;
|
|
29
|
+
}
|
|
30
|
+
disconnectedCallback() {
|
|
31
|
+
this.disconnected$.next();
|
|
32
|
+
this.disconnected$.complete();
|
|
17
33
|
}
|
|
18
34
|
static get is() { return "pos-value"; }
|
|
19
35
|
static get encapsulation() { return "shadow"; }
|
|
@@ -35,14 +51,15 @@ export class PosValue {
|
|
|
35
51
|
},
|
|
36
52
|
"getter": false,
|
|
37
53
|
"setter": false,
|
|
38
|
-
"reflect":
|
|
54
|
+
"reflect": true,
|
|
39
55
|
"attribute": "predicate"
|
|
40
56
|
}
|
|
41
57
|
};
|
|
42
58
|
}
|
|
43
59
|
static get states() {
|
|
44
60
|
return {
|
|
45
|
-
"resource": {}
|
|
61
|
+
"resource": {},
|
|
62
|
+
"value": {}
|
|
46
63
|
};
|
|
47
64
|
}
|
|
48
65
|
static get events() {
|
|
@@ -63,4 +80,10 @@ export class PosValue {
|
|
|
63
80
|
}
|
|
64
81
|
}];
|
|
65
82
|
}
|
|
83
|
+
static get watchers() {
|
|
84
|
+
return [{
|
|
85
|
+
"propName": "predicate",
|
|
86
|
+
"methodName": "observeAnyValue"
|
|
87
|
+
}];
|
|
88
|
+
}
|
|
66
89
|
}
|