@pod-os/elements 0.21.1-5f6551f.0 → 0.21.1-aba77d3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/elements.cjs.js +1 -1
- package/dist/cjs/ion-badge_8.cjs.entry.js +372 -0
- package/dist/cjs/ion-badge_8.cjs.entry.js.map +1 -0
- package/dist/cjs/ion-card_30.cjs.entry.js +21 -17
- package/dist/cjs/ion-card_30.cjs.entry.js.map +1 -1
- package/dist/cjs/{ion-badge_10.cjs.entry.js → ion-input_2.cjs.entry.js} +3 -365
- package/dist/{elements/p-daeeb478.entry.js.map → cjs/ion-input_2.cjs.entry.js.map} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/pos-app-generic.cjs.entry.js +5 -1
- package/dist/cjs/pos-app-generic.cjs.entry.js.map +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-relations_2.cjs.entry.js +2 -2
- package/dist/cjs/pos-relations_2.cjs.entry.js.map +1 -1
- package/dist/collection/apps/pos-app-generic/pos-app-generic.css +56 -0
- package/dist/collection/apps/pos-app-generic/pos-app-generic.js +13 -2
- package/dist/collection/apps/pos-app-generic/pos-app-generic.js.map +1 -1
- package/dist/collection/apps/pos-app-ldp-container/pos-app-ldp-container.js +1 -1
- package/dist/collection/apps/pos-app-rdf-document/pos-app-rdf-document.js +1 -1
- package/dist/collection/components/pos-add-new-thing/pos-add-new-thing.js +1 -1
- package/dist/collection/components/pos-app/pos-app.js +1 -1
- package/dist/collection/components/pos-dialog/pos-dialog.js +1 -1
- package/dist/collection/components/pos-error-toast/pos-error-toast.js +1 -1
- package/dist/collection/components/pos-image/pos-image.css +9 -1
- package/dist/collection/components/pos-image/pos-image.js +25 -2
- package/dist/collection/components/pos-image/pos-image.js.map +1 -1
- package/dist/collection/components/pos-internal-router/pos-internal-router.js +1 -1
- package/dist/collection/components/pos-literals/pos-literals.css +2 -0
- package/dist/collection/components/pos-literals/pos-literals.js +1 -1
- package/dist/collection/components/pos-login/pos-login.js +1 -1
- package/dist/collection/components/pos-login-form/pos-login-form.js +1 -1
- package/dist/collection/components/pos-navigation-bar/pos-navigation-bar.js +1 -1
- package/dist/collection/components/pos-new-thing-form/pos-new-thing-form.js +1 -1
- package/dist/collection/components/pos-picture/pos-picture.css +2 -0
- package/dist/collection/components/pos-picture/pos-picture.js +26 -1
- package/dist/collection/components/pos-picture/pos-picture.js.map +1 -1
- package/dist/collection/components/pos-relations/pos-relations.css +2 -0
- package/dist/collection/components/pos-reverse-relations/pos-reverse-relations.css +2 -0
- package/dist/collection/components/pos-rich-link/pos-rich-link.js +2 -2
- package/dist/collection/components/pos-router/pos-router.js +1 -1
- package/dist/collection/components/pos-select-term/pos-select-term.js +1 -1
- package/dist/collection/components/pos-type-badges/pos-type-badges.css +1 -2
- package/dist/components/pos-add-new-thing2.js +1 -1
- package/dist/components/pos-app-generic.js +24 -43
- package/dist/components/pos-app-generic.js.map +1 -1
- package/dist/components/pos-app-ldp-container.js +1 -1
- package/dist/components/pos-app-rdf-document.js +1 -1
- package/dist/components/pos-app2.js +1 -1
- package/dist/components/pos-dialog2.js +1 -1
- package/dist/components/pos-error-toast2.js +1 -1
- package/dist/components/pos-image2.js +7 -3
- package/dist/components/pos-image2.js.map +1 -1
- package/dist/components/pos-internal-router2.js +1 -1
- package/dist/components/pos-literals2.js +2 -2
- package/dist/components/pos-literals2.js.map +1 -1
- package/dist/components/pos-login-form2.js +1 -1
- package/dist/components/pos-login2.js +1 -1
- package/dist/components/pos-navigation-bar2.js +1 -1
- package/dist/components/pos-new-thing-form2.js +1 -1
- package/dist/components/pos-picture2.js +4 -2
- package/dist/components/pos-picture2.js.map +1 -1
- package/dist/components/pos-relations2.js +1 -1
- package/dist/components/pos-relations2.js.map +1 -1
- package/dist/components/pos-reverse-relations2.js +1 -1
- package/dist/components/pos-reverse-relations2.js.map +1 -1
- package/dist/components/pos-rich-link2.js +2 -2
- package/dist/components/pos-router2.js +1 -1
- package/dist/components/pos-select-term2.js +1 -1
- package/dist/components/pos-type-badges2.js +1 -1
- package/dist/components/pos-type-badges2.js.map +1 -1
- package/dist/elements/elements.css +1 -1
- package/dist/elements/elements.esm.js +1 -1
- package/dist/elements/elements.esm.js.map +1 -1
- package/dist/elements/{p-149b01b1.entry.js → p-01d3e98c.entry.js} +2 -2
- package/dist/elements/p-01d3e98c.entry.js.map +1 -0
- package/dist/elements/p-1a93174c.entry.js +2 -0
- package/dist/elements/p-1a93174c.entry.js.map +1 -0
- package/dist/elements/p-5be76399.entry.js +2 -0
- package/dist/elements/p-5be76399.entry.js.map +1 -0
- package/dist/elements/p-7e022e77.entry.js +2 -0
- package/dist/elements/p-a6130a4a.entry.js +2 -0
- package/dist/elements/p-d2ee3af1.entry.js +5 -0
- package/dist/elements/p-d2ee3af1.entry.js.map +1 -0
- package/dist/elements/p-e0863294.entry.js +2 -0
- package/dist/elements/p-e0863294.entry.js.map +1 -0
- package/dist/esm/elements.js +1 -1
- package/dist/esm/ion-badge_8.entry.js +361 -0
- package/dist/esm/ion-badge_8.entry.js.map +1 -0
- package/dist/esm/ion-card_30.entry.js +21 -17
- package/dist/esm/ion-card_30.entry.js.map +1 -1
- package/dist/esm/{ion-badge_10.entry.js → ion-input_2.entry.js} +5 -359
- package/dist/esm/ion-input_2.entry.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/pos-app-generic.entry.js +6 -2
- package/dist/esm/pos-app-generic.entry.js.map +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-relations_2.entry.js +2 -2
- package/dist/esm/pos-relations_2.entry.js.map +1 -1
- package/dist/types/components/pos-image/pos-image.d.ts +4 -0
- package/dist/types/components/pos-picture/pos-picture.d.ts +4 -0
- package/dist/types/components.d.ts +16 -0
- package/package.json +1 -1
- package/dist/cjs/ion-badge_10.cjs.entry.js.map +0 -1
- package/dist/elements/p-149b01b1.entry.js.map +0 -1
- package/dist/elements/p-60ef30b3.entry.js +0 -2
- package/dist/elements/p-8dd3cd29.entry.js +0 -2
- package/dist/elements/p-9e8f6bf8.entry.js +0 -2
- package/dist/elements/p-9e8f6bf8.entry.js.map +0 -1
- package/dist/elements/p-daeeb478.entry.js +0 -5
- package/dist/elements/p-ffa2ddf3.entry.js +0 -2
- package/dist/elements/p-ffa2ddf3.entry.js.map +0 -1
- package/dist/esm/ion-badge_10.entry.js.map +0 -1
- /package/dist/elements/{p-8dd3cd29.entry.js.map → p-7e022e77.entry.js.map} +0 -0
- /package/dist/elements/{p-60ef30b3.entry.js.map → p-a6130a4a.entry.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pos-image.js","sourceRoot":"","sources":["../../../../src/components/pos-image/pos-image.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"pos-image.js","sourceRoot":"","sources":["../../../../src/components/pos-image/pos-image.tsx"],"names":[],"mappings":"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","sourcesContent":["import { BrokenFile as BrokenFileData, PodOS } from '@pod-os/core';\nimport { BrokenFile } from '../broken-file/BrokenFile';\nimport { Component, Event, EventEmitter, h, Host, Prop, State, Watch } from '@stencil/core';\nimport session from '../../store/session';\n\n/**\n * Tries fetch an image with the solid authentication, and can visualize http errors like 403 or 404 if this fails.\n * Falls back to classic <img src=\"...\"> on network errors like CORS.\n * Renders a normal link if even this fails.\n */\n@Component({\n tag: 'pos-image',\n styleUrl: 'pos-image.css',\n shadow: true,\n})\nexport class PosImage {\n @Prop() src: string;\n\n @Prop() alt: string;\n\n /**\n * Use a blurred version of the image as its own background, if the image is scaled down to fit into the container.\n */\n @Prop() blurredBackground: boolean = false;\n\n @State() os: PodOS;\n\n @State()\n private dataUri: string;\n\n @State()\n private brokenFile: BrokenFileData;\n\n @State()\n private networkError: Error;\n\n @State()\n private imageError: Event;\n\n @State()\n private loading: boolean = true;\n\n @Event({ eventName: 'pod-os:init' }) initializeOsEmitter: EventEmitter;\n\n /**\n * Indicates that the resource given in `src` property has been loaded.\n */\n @Event({ eventName: 'pod-os:resource-loaded' }) resourceLoadedEmitter: EventEmitter<string>;\n\n componentWillLoad() {\n session.onChange('isLoggedIn', () => this.fetchBlob());\n this.initializeOsEmitter.emit(this.setOs);\n }\n\n setOs = async (os: PodOS) => {\n this.os = os;\n };\n\n @Watch('os')\n @Watch('src')\n async fetchBlob() {\n try {\n this.loading = true;\n this.imageError = null;\n this.networkError = null;\n this.brokenFile = null;\n const file = await this.os.fetchFile(this.src);\n this.resourceLoadedEmitter.emit(this.src);\n if (file.blob()) {\n this.dataUri = URL.createObjectURL(file.blob());\n } else {\n this.brokenFile = file as BrokenFileData;\n }\n } catch (err) {\n this.networkError = err;\n } finally {\n this.loading = false;\n }\n }\n\n onImageError(err: Event) {\n this.networkError = null;\n this.imageError = err;\n }\n\n render() {\n if (this.loading) {\n return <ion-skeleton-text animated={true}></ion-skeleton-text>;\n }\n if (this.networkError) {\n // probably a CORS error\n return <img alt={this.alt} src={this.src} onError={err => this.onImageError(err)} />;\n }\n if (this.brokenFile) {\n // fetching worked, but HTTP response was not ok\n return <BrokenFile file={this.brokenFile} />;\n }\n if (this.imageError) {\n // if even the loading via classic <img src=\"...\"> failed, render a link\n return (\n <div class=\"error\">\n <a href={this.src}>{this.src}</a>\n </div>\n );\n }\n\n return (\n <Host\n style={{\n backgroundImage: this.blurredBackground ? `url('${this.dataUri}')` : null,\n }}\n >\n <img src={this.dataUri} alt={this.alt} />\n </Host>\n );\n }\n}\n"]}
|
|
@@ -4,7 +4,7 @@ export class PosInternalRouter {
|
|
|
4
4
|
this.uri = 'pod-os:dashboard';
|
|
5
5
|
}
|
|
6
6
|
render() {
|
|
7
|
-
return h("pos-app-dashboard", { key: '
|
|
7
|
+
return h("pos-app-dashboard", { key: '44741d470c91f1faa732c5932788aa58b56805d4' });
|
|
8
8
|
}
|
|
9
9
|
static get is() { return "pos-internal-router"; }
|
|
10
10
|
static get properties() {
|
|
@@ -28,7 +28,7 @@ export class PosLiterals {
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
render() {
|
|
31
|
-
return (h(Host, { key: '
|
|
31
|
+
return (h(Host, { key: '35b12479d51638dc1e4de983f4901ddcea39e8df' }, 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: '76f9434f813162456c3c75728db363d708e2617f', "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"; }
|
|
@@ -21,7 +21,7 @@ export class PosLogin {
|
|
|
21
21
|
this.dialog.showModal();
|
|
22
22
|
}
|
|
23
23
|
render() {
|
|
24
|
-
return (h(Host, { key: '
|
|
24
|
+
return (h(Host, { key: 'ca905c70af384613b128154be4bb68d2956c309e' }, h("div", { key: '1f18fe1812658ab7855da328337ef5a9f6145f15', class: "container" }, session.state.isLoggedIn ? (h("pos-resource", { uri: session.state.webId }, h("span", { class: "user-data" }, h("pos-picture", null), h("pos-label", null)))) : (''), !session.state.isLoggedIn && (h("button", { key: '09264faa5a12b18a805bb13cf92a9a0b190bd498', id: "login", onClick: () => this.openDialog() }, "Login")), session.state.isLoggedIn && (h("button", { key: '334759c36b3df14e59d1bf7a4ae8dd2b03e52c3a', id: "logout", onClick: () => this.logout() }, "Logout"))), h("pos-dialog", { key: 'e82f36add5bcd044406996639b22e20b54c39101', ref: el => (this.dialog = el) }, h("span", { key: 'e4ea7b9181981e28222f3dffe6ca1cd1fd18cc79', slot: "title" }, "Sign in to your Pod"), h("pos-login-form", { key: '5d99a85a1561178a3091ab5f6a23a856c1a373ad', "onPod-os:idp-url-selected": ev => this.login(ev), slot: "content" }))));
|
|
25
25
|
}
|
|
26
26
|
static get is() { return "pos-login"; }
|
|
27
27
|
static get encapsulation() { return "shadow"; }
|
|
@@ -8,7 +8,7 @@ export class PosLoginForm {
|
|
|
8
8
|
this.canSubmit = Boolean(this.idpUrl);
|
|
9
9
|
}
|
|
10
10
|
render() {
|
|
11
|
-
return (h("form", { key: '
|
|
11
|
+
return (h("form", { key: 'fc3dd44c9d9b1b1d793a7527d8a178d819475ee2', method: "dialog", onSubmit: () => this.handleSubmit() }, h("label", { key: '9cbac18a27fa549063c9aa5fce9a9a8bae15bdb1', htmlFor: "idpUrl" }, "Please enter your Identity Provider"), h("input", { key: 'e211e1210b6259f481562a70d3ca1843137d0c87', id: "idpUrl", type: "url", value: this.idpUrl, required: true, onInput: e => this.handleChange(e), list: "suggestedIssuers", placeholder: "Type to search..." }), h("datalist", { key: '070952f3ad16c312992fac7be5e497d92819fbb8', id: "suggestedIssuers" }, h("option", { key: 'd561a03770b7cf496322966f71f6e81c54ab25b0', value: "https://solidcommunity.net" }, "solidcommunity.net"), h("option", { key: '3ecf96f60823fd848344fc77871f4bad3645e19c', value: "https://solidweb.org" }, "solidweb.org"), h("option", { key: '7c0c4ea6a4d975f9d7dd298e3b38fd8faa41dd2b', value: "https://solidweb.me" }, "solidweb.me"), h("option", { key: '21138fe500353ff7624c20226f92c55f5a553551', value: "https://inrupt.net" }, "inrupt.net"), h("option", { key: '6b7edede2e1d51aeab5c6fb6f0e7fd4be72db3c5', value: "https://login.inrupt.com" }, "Inrupt PodSpaces"), h("option", { key: 'c9cea1f3d258a58b0ca260c25111cd6cd6b6bf30', value: "https://trinpod.us" }, "trinpod.us"), h("option", { key: '953f68426bdf806c18cbb78fd7de36ee8dae06db', value: "https://use.id" }, "use.id"), h("option", { key: '58b3b5e9b3e145e2f2000028d0edd8263d2a6495', value: "https://solid.redpencil.io" }, "redpencil.io"), h("option", { key: '2461aaa1b32e07635d67805a362b2f22bf28a8a7', value: "https://datapod.grant.io" }, "Data Pod (grant.io)"), h("option", { key: '6ac6645ccd9f3f2234b3f44349f28f34c9f1d33d', value: "https://teamid.live" }, "teamid.live")), h("input", { key: '451b150089145ca6846253067e6e6d393b333d9c', id: "login", type: "submit", value: "Login", disabled: !this.canSubmit })));
|
|
12
12
|
}
|
|
13
13
|
handleChange(event) {
|
|
14
14
|
this.validate();
|
|
@@ -67,7 +67,7 @@ export class PosNavigationBar {
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
render() {
|
|
70
|
-
return (h("form", { key: '
|
|
70
|
+
return (h("form", { key: 'a8f6b83f1cf9ec1f11b33ec7431341a7b386cc7d', onSubmit: e => this.onSubmit(e) }, h("ion-searchbar", { key: '2709e144cd8edd34ba45d3dbdfd356df05f93c36', enterkeyhint: "search", placeholder: "Search or enter URI", value: this.uri, debounce: 300, onIonChange: e => this.onChange(e), onIonInput: e => this.onChange(e) }), this.suggestions.length > 0 ? (h("div", { class: "suggestions" }, h("ol", null, this.suggestions.map((it, index) => (h("li", { class: index === this.selectedIndex ? 'selected' : '' }, h("pos-rich-link", { uri: it.ref }))))))) : null));
|
|
71
71
|
}
|
|
72
72
|
static get is() { return "pos-navigation-bar"; }
|
|
73
73
|
static get encapsulation() { return "shadow"; }
|
|
@@ -19,7 +19,7 @@ export class PosNewThingForm {
|
|
|
19
19
|
subscribePodOs(this);
|
|
20
20
|
}
|
|
21
21
|
render() {
|
|
22
|
-
return (h("form", { key: '
|
|
22
|
+
return (h("form", { key: '7ac7302d96ebf9f7d746bfb69c17d3b313141b13', method: "dialog", onSubmit: e => this.handleSubmit(e) }, h("label", { key: 'a5a5e460537d8ad7e099cf4f61675853abc9b64e', htmlFor: "type" }, "Type"), h("pos-select-term", { key: '7dc2d253ceed94825352e6a42e2f53e04ee362d9', id: "type", placeholder: "", value: this.selectedTypeUri, "onPod-os:term-selected": e => this.onTermSelected(e) }), h("label", { key: 'f7d8613857e5c8d6bd3b7060b5fb0c832ee2a62a', htmlFor: "name" }, "Name"), h("input", { key: '74c773c31e4c0102b40ca9e34942ccc63f1e4480', id: "name", type: "text", value: this.name, onInput: e => this.handleChange(e) }), this.newUri ? (h("div", { id: "new-uri", title: "This will be the URI of the new thing" }, this.newUri)) : null, h("input", { key: '7c99806729314cc7a70268375fb3da5d22c156b1', id: "create", type: "submit", value: "Create", disabled: !this.canSubmit })));
|
|
23
23
|
}
|
|
24
24
|
handleChange(event) {
|
|
25
25
|
this.name = event.target.value;
|
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
* @prop --width: Width of the picture
|
|
4
4
|
* @prop --height: Height of the picture
|
|
5
5
|
* @prop --border-radius: Border radius of the picture
|
|
6
|
+
* @prop --object-fit: CSS object-fit of the picture
|
|
6
7
|
*/
|
|
7
8
|
--width: 300px;
|
|
8
9
|
--height: 300px;
|
|
9
10
|
--border-radius: var(--border-radius, 0);
|
|
11
|
+
--object-fit: var(--object-fit, cover);
|
|
10
12
|
}
|
|
@@ -5,6 +5,7 @@ export class PosPicture {
|
|
|
5
5
|
this.receiveResource = (resource) => {
|
|
6
6
|
this.resource = resource;
|
|
7
7
|
};
|
|
8
|
+
this.blurredBackground = false;
|
|
8
9
|
this.resource = undefined;
|
|
9
10
|
}
|
|
10
11
|
componentWillLoad() {
|
|
@@ -14,7 +15,7 @@ export class PosPicture {
|
|
|
14
15
|
const pic = this.resource ? this.resource.picture() : null;
|
|
15
16
|
if (!pic)
|
|
16
17
|
return null;
|
|
17
|
-
return h("pos-image", { src: pic.url, alt: this.resource.label() });
|
|
18
|
+
return h("pos-image", { blurredBackground: this.blurredBackground, src: pic.url, alt: this.resource.label() });
|
|
18
19
|
}
|
|
19
20
|
static get is() { return "pos-picture"; }
|
|
20
21
|
static get encapsulation() { return "shadow"; }
|
|
@@ -28,6 +29,30 @@ export class PosPicture {
|
|
|
28
29
|
"$": ["pos-picture.css"]
|
|
29
30
|
};
|
|
30
31
|
}
|
|
32
|
+
static get properties() {
|
|
33
|
+
return {
|
|
34
|
+
"blurredBackground": {
|
|
35
|
+
"type": "boolean",
|
|
36
|
+
"mutable": false,
|
|
37
|
+
"complexType": {
|
|
38
|
+
"original": "boolean",
|
|
39
|
+
"resolved": "boolean",
|
|
40
|
+
"references": {}
|
|
41
|
+
},
|
|
42
|
+
"required": false,
|
|
43
|
+
"optional": false,
|
|
44
|
+
"docs": {
|
|
45
|
+
"tags": [],
|
|
46
|
+
"text": "Use a blurred version of the image as its own background, if the image is scaled down to fit into the container."
|
|
47
|
+
},
|
|
48
|
+
"getter": false,
|
|
49
|
+
"setter": false,
|
|
50
|
+
"attribute": "blurred-background",
|
|
51
|
+
"reflect": false,
|
|
52
|
+
"defaultValue": "false"
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
}
|
|
31
56
|
static get states() {
|
|
32
57
|
return {
|
|
33
58
|
"resource": {}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pos-picture.js","sourceRoot":"","sources":["../../../../src/components/pos-picture/pos-picture.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"pos-picture.js","sourceRoot":"","sources":["../../../../src/components/pos-picture/pos-picture.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAE/E,OAAO,EAAiB,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAO3E,MAAM,OAAO,UAAU;;QAcrB,oBAAe,GAAG,CAAC,QAAe,EAAE,EAAE;YACpC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAC3B,CAAC,CAAC;iCAZmC,KAAK;;;IAM1C,iBAAiB;QACf,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IAMD,MAAM;QACJ,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;QAC3D,IAAI,CAAC,GAAG;YAAE,OAAO,IAAI,CAAC;QACtB,OAAO,iBAAW,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAc,CAAC;IACtH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Event, EventEmitter, State, h, Prop } from '@stencil/core';\nimport { Thing } from '@pod-os/core';\nimport { ResourceAware, subscribeResource } from '../events/ResourceAware';\n\n@Component({\n tag: 'pos-picture',\n shadow: true,\n styleUrl: 'pos-picture.css',\n})\nexport class PosPicture implements ResourceAware {\n /**\n * Use a blurred version of the image as its own background, if the image is scaled down to fit into the container.\n */\n @Prop() blurredBackground: boolean = false;\n\n @State() resource: Thing;\n\n @Event({ eventName: 'pod-os:resource' }) subscribeResource: EventEmitter;\n\n componentWillLoad() {\n subscribeResource(this);\n }\n\n receiveResource = (resource: Thing) => {\n this.resource = resource;\n };\n\n render() {\n const pic = this.resource ? this.resource.picture() : null;\n if (!pic) return null;\n return <pos-image blurredBackground={this.blurredBackground} src={pic.url} alt={this.resource.label()}></pos-image>;\n }\n}\n"]}
|
|
@@ -4,10 +4,10 @@ export class PosRichLink {
|
|
|
4
4
|
this.uri = undefined;
|
|
5
5
|
}
|
|
6
6
|
render() {
|
|
7
|
-
return (h("pos-resource", { key: '
|
|
7
|
+
return (h("pos-resource", { key: 'f9ee2a2e6403733db429593ccc0900efa39efc9f', lazy: true, uri: this.uri }, h("p", { key: '8d8d575619fb66ee28a357c0a1fbcd7e25fd23c3', class: "content" }, h("a", { key: '3c517a107acbbd56865172f90a226f77bcfd052c', href: this.uri, onClick: e => {
|
|
8
8
|
e.preventDefault();
|
|
9
9
|
this.linkEmitter.emit(this.uri);
|
|
10
|
-
} }, h("pos-label", { key: '
|
|
10
|
+
} }, h("pos-label", { key: '5e9282156f1906e911b045acb032357ca2d83e43' })), h("span", { key: '535ce92376dd686021f597215ecdd3be62e7e1d3', class: "url" }, new URL(this.uri).host), h("pos-description", { key: 'c5e58b6ced46ffb76fa61c2a917f157dfbaac58f' }))));
|
|
11
11
|
}
|
|
12
12
|
static get is() { return "pos-rich-link"; }
|
|
13
13
|
static get encapsulation() { return "shadow"; }
|
|
@@ -33,7 +33,7 @@ export class PosRouter {
|
|
|
33
33
|
this.routeChanged.emit(this.uri);
|
|
34
34
|
}
|
|
35
35
|
render() {
|
|
36
|
-
return h("slot", { key: '
|
|
36
|
+
return h("slot", { key: '972cd1041f376ae50b45691f2ad3ae7f676ff0df' });
|
|
37
37
|
}
|
|
38
38
|
static get is() { return "pos-router"; }
|
|
39
39
|
static get originalStyleUrls() {
|
|
@@ -20,7 +20,7 @@ export class PosSelectTerm {
|
|
|
20
20
|
this.termSelected.emit({ uri: event.target.value });
|
|
21
21
|
}
|
|
22
22
|
render() {
|
|
23
|
-
return (h(Host, { key: '
|
|
23
|
+
return (h(Host, { key: '7f8d32e361855f6427b2345f706f363b75a58e57' }, h("input", { key: 'fb979749ed3fedc072a44ab7ef21196ea60bea3b', part: "input", list: "terms", placeholder: this.placeholder, value: this.value, onChange: ev => this.handleChange(ev) }), h("datalist", { key: '6a318290e9229aeb83ea827a7a42ca0519609e89', part: "terms", id: "terms" }, this.terms.map(term => (h("option", { value: term.uri }, term.shorthand))))));
|
|
24
24
|
}
|
|
25
25
|
static get is() { return "pos-select-term"; }
|
|
26
26
|
static get encapsulation() { return "shadow"; }
|
|
@@ -18,7 +18,7 @@ const PosAddNewThing = /*@__PURE__*/ proxyCustomElement(class PosAddNewThing ext
|
|
|
18
18
|
this.dialog.showModal();
|
|
19
19
|
}
|
|
20
20
|
render() {
|
|
21
|
-
return (h(Host, { key: '
|
|
21
|
+
return (h(Host, { key: '35b8629fc9ac9d9e759009f329dc9437307649c3' }, h("button", { key: 'b6c0b1d06fbed05a079c1e4cb684f227fd40d098', id: "new", title: "Add a new thing", onClick: () => this.openDialog() }, h("ion-icon", { key: '2dfbcff7480dfc7397a5810ca7a33b9e583a77ee', name: "add-circle-outline" })), h("pos-dialog", { key: 'a61bf93754ca323fbc23137956a00c39be81cad9', ref: el => (this.dialog = el) }, h("span", { key: 'a4095e3c9ddd26e18ce002a05ef65d8895894589', slot: "title" }, "Add a new thing"), h("pos-new-thing-form", { key: '136cfbbab823f5abc313642e1dc04f67d5d81777', slot: "content", referenceUri: this.referenceUri }))));
|
|
22
22
|
}
|
|
23
23
|
static get style() { return PosAddNewThingStyle0; }
|
|
24
24
|
}, [1, "pos-add-new-thing", {
|
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { d as defineCustomElement$
|
|
3
|
-
import { d as defineCustomElement$
|
|
4
|
-
import { d as defineCustomElement$
|
|
5
|
-
import { d as defineCustomElement$
|
|
6
|
-
import { d as defineCustomElement$
|
|
7
|
-
import { d as defineCustomElement$
|
|
8
|
-
import { d as defineCustomElement$
|
|
9
|
-
import { d as defineCustomElement$
|
|
10
|
-
import { d as defineCustomElement$j } from './input.js';
|
|
11
|
-
import { d as defineCustomElement$i } from './progress-bar.js';
|
|
12
|
-
import { d as defineCustomElement$h } from './ripple-effect.js';
|
|
13
|
-
import { d as defineCustomElement$g } from './row.js';
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$n } from './badge.js';
|
|
3
|
+
import { d as defineCustomElement$m } from './card.js';
|
|
4
|
+
import { d as defineCustomElement$l } from './card-content.js';
|
|
5
|
+
import { d as defineCustomElement$k } from './card-header.js';
|
|
6
|
+
import { d as defineCustomElement$j } from './icon.js';
|
|
7
|
+
import { d as defineCustomElement$i } from './input.js';
|
|
8
|
+
import { d as defineCustomElement$h } from './progress-bar.js';
|
|
9
|
+
import { d as defineCustomElement$g } from './ripple-effect.js';
|
|
14
10
|
import { d as defineCustomElement$f } from './skeleton-text.js';
|
|
15
11
|
import { d as defineCustomElement$e } from './pos-add-literal-value2.js';
|
|
16
12
|
import { d as defineCustomElement$d } from './pos-description2.js';
|
|
@@ -26,20 +22,25 @@ import { d as defineCustomElement$4 } from './pos-rich-link2.js';
|
|
|
26
22
|
import { d as defineCustomElement$3 } from './pos-select-term2.js';
|
|
27
23
|
import { d as defineCustomElement$2 } from './pos-type-badges2.js';
|
|
28
24
|
|
|
25
|
+
const posAppGenericCss = ":host {\n --gap-size: var(--size-1);\n display: flex;\n flex-direction: column;\n gap: var(--gap-size);\n margin: var(--gap-size);\n}\n\n.card {\n outline: var(--pos-border-solid);\n border-radius: var(--radius-sm);\n box-shadow: var(--shadow-md);\n\n header {\n display: flex;\n flex-direction: column;\n\n pos-picture {\n --object-fit: contain;\n --width: 100%;\n --height: auto;\n --max-height: 300px;\n border-radius: var(--radius-sm) var(--radius-sm) 0 0;\n --border-radius: var(--radius-sm) var(--radius-sm) 0 0;\n }\n\n h1,\n pos-type-badges {\n margin: var(--size-2);\n }\n }\n\n main {\n padding: var(--size-2);\n\n pos-description {\n color: var(--color-grey-800);\n font-weight: var(--weight-light);\n }\n }\n}\n\n@media (min-width: 640px) {\n :host {\n flex-direction: row;\n flex-wrap: wrap;\n\n section:first-of-type {\n flex: 0 0 25%;\n }\n\n section:not(:first-of-type) {\n flex: 1;\n }\n }\n}\n";
|
|
26
|
+
const PosAppGenericStyle0 = posAppGenericCss;
|
|
27
|
+
|
|
29
28
|
const PosAppGeneric$1 = /*@__PURE__*/ proxyCustomElement(class PosAppGeneric extends HTMLElement {
|
|
30
29
|
constructor() {
|
|
31
30
|
super();
|
|
32
31
|
this.__registerHost();
|
|
32
|
+
this.__attachShadow();
|
|
33
33
|
}
|
|
34
34
|
render() {
|
|
35
|
-
return (h(
|
|
35
|
+
return (h(Host, { key: '8e29bb7745cec5493c102c2262b14291eb9fb62a' }, h("section", { key: '2da95db7a410290cb89f7d3bebaae29c35e05785' }, h("div", { key: '653b61788b1d17adc08620702c72db496578d075', class: "card" }, h("header", { key: '4231d891aac87ba7c4f4bebaa89a23a96784f9c1' }, h("pos-picture", { key: '04a382eec4b3c3d87ae616375162a6da8d52144e', blurredBackground: true }), h("h1", { key: '54e7aafcc30bf3df9353e82c218e56fd66d6c9ef' }, h("pos-label", { key: '8df7a754d5aca177fb1e12c45ca25fa69d933a43' })), h("pos-type-badges", { key: '43b4d9464325b084d23349cc62e0a1615c2d3a15' })), h("main", { key: 'dd3da38812b1cb40a749e914fc72cd83253220b6' }, h("pos-description", { key: '9366c219761578f4381d868ca6d94e660645ec9e' })))), h("section", { key: '4d905102110d50ca60a3e2d87c18a32e01fb7ca1' }, h("pos-literals", { key: 'c0829b4921ba110966a483a00beba4df56a0df6d' })), h("section", { key: '893ffdaffdcec188361d3ffb8afbaf6c1f55ea5b' }, h("pos-relations", { key: '23f5bd14481721439bec06eb5449a9743f87143d' }), h("pos-reverse-relations", { key: '928122999484f392c70ba3cdf7b0b2a7f67f599a' }))));
|
|
36
36
|
}
|
|
37
|
-
|
|
37
|
+
static get style() { return PosAppGenericStyle0; }
|
|
38
|
+
}, [1, "pos-app-generic"]);
|
|
38
39
|
function defineCustomElement$1() {
|
|
39
40
|
if (typeof customElements === "undefined") {
|
|
40
41
|
return;
|
|
41
42
|
}
|
|
42
|
-
const components = ["pos-app-generic", "ion-badge", "ion-card", "ion-card-content", "ion-card-header", "ion-
|
|
43
|
+
const components = ["pos-app-generic", "ion-badge", "ion-card", "ion-card-content", "ion-card-header", "ion-icon", "ion-input", "ion-progress-bar", "ion-ripple-effect", "ion-skeleton-text", "pos-add-literal-value", "pos-description", "pos-image", "pos-label", "pos-literals", "pos-picture", "pos-predicate", "pos-relations", "pos-resource", "pos-reverse-relations", "pos-rich-link", "pos-select-term", "pos-type-badges"];
|
|
43
44
|
components.forEach(tagName => { switch (tagName) {
|
|
44
45
|
case "pos-app-generic":
|
|
45
46
|
if (!customElements.get(tagName)) {
|
|
@@ -47,61 +48,41 @@ function defineCustomElement$1() {
|
|
|
47
48
|
}
|
|
48
49
|
break;
|
|
49
50
|
case "ion-badge":
|
|
50
|
-
if (!customElements.get(tagName)) {
|
|
51
|
-
defineCustomElement$r();
|
|
52
|
-
}
|
|
53
|
-
break;
|
|
54
|
-
case "ion-card":
|
|
55
|
-
if (!customElements.get(tagName)) {
|
|
56
|
-
defineCustomElement$q();
|
|
57
|
-
}
|
|
58
|
-
break;
|
|
59
|
-
case "ion-card-content":
|
|
60
|
-
if (!customElements.get(tagName)) {
|
|
61
|
-
defineCustomElement$p();
|
|
62
|
-
}
|
|
63
|
-
break;
|
|
64
|
-
case "ion-card-header":
|
|
65
|
-
if (!customElements.get(tagName)) {
|
|
66
|
-
defineCustomElement$o();
|
|
67
|
-
}
|
|
68
|
-
break;
|
|
69
|
-
case "ion-card-title":
|
|
70
51
|
if (!customElements.get(tagName)) {
|
|
71
52
|
defineCustomElement$n();
|
|
72
53
|
}
|
|
73
54
|
break;
|
|
74
|
-
case "ion-
|
|
55
|
+
case "ion-card":
|
|
75
56
|
if (!customElements.get(tagName)) {
|
|
76
57
|
defineCustomElement$m();
|
|
77
58
|
}
|
|
78
59
|
break;
|
|
79
|
-
case "ion-
|
|
60
|
+
case "ion-card-content":
|
|
80
61
|
if (!customElements.get(tagName)) {
|
|
81
62
|
defineCustomElement$l();
|
|
82
63
|
}
|
|
83
64
|
break;
|
|
84
|
-
case "ion-
|
|
65
|
+
case "ion-card-header":
|
|
85
66
|
if (!customElements.get(tagName)) {
|
|
86
67
|
defineCustomElement$k();
|
|
87
68
|
}
|
|
88
69
|
break;
|
|
89
|
-
case "ion-
|
|
70
|
+
case "ion-icon":
|
|
90
71
|
if (!customElements.get(tagName)) {
|
|
91
72
|
defineCustomElement$j();
|
|
92
73
|
}
|
|
93
74
|
break;
|
|
94
|
-
case "ion-
|
|
75
|
+
case "ion-input":
|
|
95
76
|
if (!customElements.get(tagName)) {
|
|
96
77
|
defineCustomElement$i();
|
|
97
78
|
}
|
|
98
79
|
break;
|
|
99
|
-
case "ion-
|
|
80
|
+
case "ion-progress-bar":
|
|
100
81
|
if (!customElements.get(tagName)) {
|
|
101
82
|
defineCustomElement$h();
|
|
102
83
|
}
|
|
103
84
|
break;
|
|
104
|
-
case "ion-
|
|
85
|
+
case "ion-ripple-effect":
|
|
105
86
|
if (!customElements.get(tagName)) {
|
|
106
87
|
defineCustomElement$g();
|
|
107
88
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"pos-app-generic.js","mappings":"
|
|
1
|
+
{"file":"pos-app-generic.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,gBAAgB,GAAG,sgCAAsgC,CAAC;AAChiC,4BAAe,gBAAgB;;MCMlBA,eAAa;;;;;;IACxB,MAAM;QACJ,QACE,EAAC,IAAI,uDACH,kEACE,4DAAK,KAAK,EAAC,MAAM,IACf,iEACE,oEAAa,iBAAiB,EAAE,IAAI,GAAI,EACxC,6DACE,mEAAa,CACV,EACL,yEAAmB,CACZ,EACT,+DACE,yEAAmB,CACd,CACH,CACE,EACV,kEACE,sEAAgB,CACR,EACV,kEACE,uEAAiB,EACjB,+EAAyB,CACjB,CACL,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["PosAppGeneric"],"sources":["src/apps/pos-app-generic/pos-app-generic.css?tag=pos-app-generic&encapsulation=shadow","src/apps/pos-app-generic/pos-app-generic.tsx"],"sourcesContent":[":host {\n --gap-size: var(--size-1);\n display: flex;\n flex-direction: column;\n gap: var(--gap-size);\n margin: var(--gap-size);\n}\n\n.card {\n outline: var(--pos-border-solid);\n border-radius: var(--radius-sm);\n box-shadow: var(--shadow-md);\n\n header {\n display: flex;\n flex-direction: column;\n\n pos-picture {\n --object-fit: contain;\n --width: 100%;\n --height: auto;\n --max-height: 300px;\n border-radius: var(--radius-sm) var(--radius-sm) 0 0;\n --border-radius: var(--radius-sm) var(--radius-sm) 0 0;\n }\n\n h1,\n pos-type-badges {\n margin: var(--size-2);\n }\n }\n\n main {\n padding: var(--size-2);\n\n pos-description {\n color: var(--color-grey-800);\n font-weight: var(--weight-light);\n }\n }\n}\n\n@media (min-width: 640px) {\n :host {\n flex-direction: row;\n flex-wrap: wrap;\n\n section:first-of-type {\n flex: 0 0 25%;\n }\n\n section:not(:first-of-type) {\n flex: 1;\n }\n }\n}\n","import { Component, h, Host } from '@stencil/core';\n\n@Component({\n tag: 'pos-app-generic',\n styleUrls: ['./pos-app-generic.css'],\n shadow: true,\n})\nexport class PosAppGeneric {\n render() {\n return (\n <Host>\n <section>\n <div class=\"card\">\n <header>\n <pos-picture blurredBackground={true} />\n <h1>\n <pos-label />\n </h1>\n <pos-type-badges />\n </header>\n <main>\n <pos-description />\n </main>\n </div>\n </section>\n <section>\n <pos-literals />\n </section>\n <section>\n <pos-relations />\n <pos-reverse-relations />\n </section>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -34,7 +34,7 @@ const PosAppLdpContainer$1 = /*@__PURE__*/ proxyCustomElement(class PosAppLdpCon
|
|
|
34
34
|
this.__registerHost();
|
|
35
35
|
}
|
|
36
36
|
render() {
|
|
37
|
-
return (h("ion-grid", { key: '
|
|
37
|
+
return (h("ion-grid", { key: '25d3c6836ab626ce1fc2c9ca5b01b963b1068943' }, h("ion-row", { key: 'e040e5f41cba292ee7eaa77b7a7886f9d1d8ca99' }, h("ion-col", { key: 'c16769e7747bd035a4b13545c452ca11766b7054', size: "12", "size-sm": true }, h("pos-container-contents", { key: '9a28b62c6c824e069176a9dab781a6edd6582a81' }), h("details", { key: '288eaceb2e30282f9018c6bf6759586df637cfaf' }, h("summary", { key: '554f9bd02907d914ac0074c31e31b8800aeb7722' }, "All subjects"), h("pos-subjects", { key: '9bd7980dd958296a4006e5b2ce02d70759c4418c' }))), h("ion-col", { key: 'ef03fe6c49255c65b195fe900742d54cb323d4b1', size: "12", "size-sm": true }, h("ion-card", { key: 'fadc374858fe564b20504196b70b2946af3d7402' }, h("ion-card-header", { key: '2283119004b8a38b1adc2b8f1cb56309a9923aea' }, h("ion-card-title", { key: '634152799d6abddb5a9ca8bfb70104998c2888f5' }, h("pos-label", { key: '3677ba9818ac14cb8478eca888431cf225fd9d2e' })), h("pos-type-badges", { key: '45d803cc33ca2642f7b677df6ca387f10019baa1' }), h("pos-literals", { key: '2a9ffea31fb034b3ed876eeb528a00b0a0d8577a' })))))));
|
|
38
38
|
}
|
|
39
39
|
}, [0, "pos-app-ldp-container"]);
|
|
40
40
|
function defineCustomElement$1() {
|
|
@@ -28,7 +28,7 @@ const PosAppRdfDocument$1 = /*@__PURE__*/ proxyCustomElement(class PosAppRdfDocu
|
|
|
28
28
|
this.__registerHost();
|
|
29
29
|
}
|
|
30
30
|
render() {
|
|
31
|
-
return (h("ion-grid", { key: '
|
|
31
|
+
return (h("ion-grid", { key: '491c329c7b6083129acc0b04d6097d7361b2c2d4' }, h("ion-row", { key: '88dbc219423b1ff94e6a5c6f67e74e6b496eaca8' }, h("ion-col", { key: 'e3329294ca16e707c9ac0f4ede51e801f11524d2', size: "12", "size-sm": true }, h("pos-subjects", { key: '45af152a3cce35a2be01bef1b5ac3072e9bddcd8' })), h("ion-col", { key: 'd376dbf8d4a3d8113dd018a3d3d1d84b9027339d', size: "12", "size-sm": true }, h("ion-card", { key: '958ad15df45ca16960faca66a98e6938faafaf0d' }, h("ion-card-header", { key: '8f0d87ecc1ef413d767b00c906ba36af212a3e25' }, h("ion-card-title", { key: 'a7010a87e619c0d2200b5f0076a6096405821d8a' }, h("pos-label", { key: '462dd3461b1fd5658ae9c0f497f7e5164ff30621' })), h("pos-type-badges", { key: '4b7f8b9e4204a9310e186f10ca3b57d5b245ac5f' }), h("pos-literals", { key: 'cdb9f3b2b088e2852f9116dae10c425e3329c9a4' })))))));
|
|
32
32
|
}
|
|
33
33
|
}, [0, "pos-app-rdf-document"]);
|
|
34
34
|
function defineCustomElement$1() {
|
|
@@ -971,7 +971,7 @@ const PosApp = /*@__PURE__*/ proxyCustomElement(class PosApp extends HTMLElement
|
|
|
971
971
|
}
|
|
972
972
|
}
|
|
973
973
|
render() {
|
|
974
|
-
return h("slot", { key: '
|
|
974
|
+
return h("slot", { key: '32436fcf8726f4c6b3079f402c296bd3c6cafd04' });
|
|
975
975
|
}
|
|
976
976
|
}, [4, "pos-app", {
|
|
977
977
|
"restorePreviousSession": [4, "restore-previous-session"],
|
|
@@ -16,7 +16,7 @@ const PosDialog = /*@__PURE__*/ proxyCustomElement(class PosDialog extends HTMLE
|
|
|
16
16
|
this.dialog.close();
|
|
17
17
|
}
|
|
18
18
|
render() {
|
|
19
|
-
return (h(Host, { key: '
|
|
19
|
+
return (h(Host, { key: 'c225a4ac0e04d0a71fdb0b98c6b2ec8619f465b2' }, h("dialog", { key: 'ca442886d0651fce3b9b565dba18a6bda30750cd', ref: el => (this.dialog = el) }, h("header", { key: '5589443a2551bb8ed14870bacdbaaf0b93b0cfe2' }, h("slot", { key: 'abad20ea1a223ad2229bebcca6c7f3fe09ee4d05', name: "title" }), h("button", { key: '2da0f8dfc03a15c90dc099ee824369564ac12d72', tabindex: -1, id: "close", title: "Close", onClick: () => this.close() }, h("ion-icon", { key: 'bab7a9b15ebbec354e84aab7a84ca34a01e62600', name: "close-outline" }))), h("slot", { key: '51978d27aef2308e0b66374087543705f0ac391c', name: "content" }))));
|
|
20
20
|
}
|
|
21
21
|
static get style() { return PosDialogStyle0; }
|
|
22
22
|
}, [4, "pos-dialog", {
|
|
@@ -32,7 +32,7 @@ const PosErrorToast = /*@__PURE__*/ proxyCustomElement(class PosErrorToast exten
|
|
|
32
32
|
await toast.present();
|
|
33
33
|
}
|
|
34
34
|
render() {
|
|
35
|
-
return h("slot", { key: '
|
|
35
|
+
return h("slot", { key: '1abf0983dd843eb8b3342ec1fda0e25d02a2df5a' });
|
|
36
36
|
}
|
|
37
37
|
}, [1, "pos-error-toast", undefined, [[8, "unhandledrejection", "unhandledRejection"], [0, "pod-os:error", "catchError"]]]);
|
|
38
38
|
function defineCustomElement() {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { B as BrokenFile } from './BrokenFile.js';
|
|
3
3
|
import { s as store } from './session.js';
|
|
4
4
|
import { d as defineCustomElement$2 } from './icon.js';
|
|
5
5
|
import { d as defineCustomElement$1 } from './skeleton-text.js';
|
|
6
6
|
|
|
7
|
-
const posImageCss = ":host{
|
|
7
|
+
const posImageCss = ":host{display:flex;background-size:cover;background-repeat:no-repeat;background-position:center;border-radius:inherit}img,ion-skeleton-text,div.error{border-radius:var(--border-radius);width:var(--width);height:var(--height);max-width:var(--max-width);max-height:var(--max-height);object-fit:var(--object-fit)}img{backdrop-filter:var(--blur-xl)}.error{display:flex;opacity:0.8;background:repeating-linear-gradient(-45deg, rgba(150, 0, 0, 0.1), rgba(150, 0, 0, 0.1) 10px, #fff 5px, #fff 25px);flex-direction:column;border:1px solid red;color:black;align-items:center;justify-content:center;word-break:break-all;padding:1rem;box-sizing:border-box}.error ion-icon{color:#282828;--ionicon-stroke-width:calc(var(--width) / 5);font-size:calc(var(--width) / 2)}a.error{text-decoration:none;width:var(--width);height:var(--height)}.code{font-weight:bold;font-size:calc(var(--width) / 8)}.text{font-size:calc(var(--width) / 20)}";
|
|
8
8
|
const PosImageStyle0 = posImageCss;
|
|
9
9
|
|
|
10
10
|
const PosImage = /*@__PURE__*/ proxyCustomElement(class PosImage extends HTMLElement {
|
|
@@ -19,6 +19,7 @@ const PosImage = /*@__PURE__*/ proxyCustomElement(class PosImage extends HTMLEle
|
|
|
19
19
|
};
|
|
20
20
|
this.src = undefined;
|
|
21
21
|
this.alt = undefined;
|
|
22
|
+
this.blurredBackground = false;
|
|
22
23
|
this.os = undefined;
|
|
23
24
|
this.dataUri = undefined;
|
|
24
25
|
this.brokenFile = undefined;
|
|
@@ -72,7 +73,9 @@ const PosImage = /*@__PURE__*/ proxyCustomElement(class PosImage extends HTMLEle
|
|
|
72
73
|
// if even the loading via classic <img src="..."> failed, render a link
|
|
73
74
|
return (h("div", { class: "error" }, h("a", { href: this.src }, this.src)));
|
|
74
75
|
}
|
|
75
|
-
return h(
|
|
76
|
+
return (h(Host, { style: {
|
|
77
|
+
backgroundImage: this.blurredBackground ? `url('${this.dataUri}')` : null,
|
|
78
|
+
} }, h("img", { src: this.dataUri, alt: this.alt })));
|
|
76
79
|
}
|
|
77
80
|
static get watchers() { return {
|
|
78
81
|
"os": ["fetchBlob"],
|
|
@@ -82,6 +85,7 @@ const PosImage = /*@__PURE__*/ proxyCustomElement(class PosImage extends HTMLEle
|
|
|
82
85
|
}, [1, "pos-image", {
|
|
83
86
|
"src": [1],
|
|
84
87
|
"alt": [1],
|
|
88
|
+
"blurredBackground": [4, "blurred-background"],
|
|
85
89
|
"os": [32],
|
|
86
90
|
"dataUri": [32],
|
|
87
91
|
"brokenFile": [32],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"pos-image2.js","mappings":";;;;;;AAAA,MAAM,WAAW,GAAG,
|
|
1
|
+
{"file":"pos-image2.js","mappings":";;;;;;AAAA,MAAM,WAAW,GAAG,y5BAAy5B,CAAC;AAC96B,uBAAe,WAAW;;MCcb,QAAQ;;;;;;;QAuCnB,UAAK,GAAG,OAAO,EAAS;YACtB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;SACd,CAAC;;;iCAjCmC,KAAK;;;;;;uBAiBf,IAAI;;IAS/B,iBAAiB;QACfA,KAAO,CAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;QACvD,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KAC3C;IAQD,MAAM,SAAS;QACb,IAAI;YACF,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;YACpB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;YACvB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;YACzB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;YACvB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAC/C,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAC1C,IAAI,IAAI,CAAC,IAAI,EAAE,EAAE;gBACf,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;aACjD;iBAAM;gBACL,IAAI,CAAC,UAAU,GAAG,IAAsB,CAAC;aAC1C;SACF;QAAC,OAAO,GAAG,EAAE;YACZ,IAAI,CAAC,YAAY,GAAG,GAAG,CAAC;SACzB;gBAAS;YACR,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;SACtB;KACF;IAED,YAAY,CAAC,GAAU;QACrB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;QACzB,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC;KACvB;IAED,MAAM;QACJ,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,OAAO,yBAAmB,QAAQ,EAAE,IAAI,GAAsB,CAAC;SAChE;QACD,IAAI,IAAI,CAAC,YAAY,EAAE;;YAErB,OAAO,WAAK,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,GAAI,CAAC;SACtF;QACD,IAAI,IAAI,CAAC,UAAU,EAAE;;YAEnB,OAAO,EAAC,UAAU,IAAC,IAAI,EAAE,IAAI,CAAC,UAAU,GAAI,CAAC;SAC9C;QACD,IAAI,IAAI,CAAC,UAAU,EAAE;;YAEnB,QACE,WAAK,KAAK,EAAC,OAAO,IAChB,SAAG,IAAI,EAAE,IAAI,CAAC,GAAG,IAAG,IAAI,CAAC,GAAG,CAAK,CAC7B,EACN;SACH;QAED,QACE,EAAC,IAAI,IACH,KAAK,EAAE;gBACL,eAAe,EAAE,IAAI,CAAC,iBAAiB,GAAG,QAAQ,IAAI,CAAC,OAAO,IAAI,GAAG,IAAI;aAC1E,IAED,WAAK,GAAG,EAAE,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,GAAI,CACpC,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["session"],"sources":["src/components/pos-image/pos-image.css?tag=pos-image&encapsulation=shadow","src/components/pos-image/pos-image.tsx"],"sourcesContent":[":host {\n /**\n * @prop --width: Width of the image\n * @prop --height: Height of the image\n * @prop --border-radius: Border radius of the image\n * @prop --max-width: Maximum width of the image\n * @prop --max-height: Maximum height of the image\n * @prop --object-fit: CSS object-fit of the image\n */\n display: flex;\n background-size: cover;\n background-repeat: no-repeat;\n background-position: center;\n border-radius: inherit;\n}\n\nimg,\nion-skeleton-text,\ndiv.error {\n border-radius: var(--border-radius);\n width: var(--width);\n height: var(--height);\n max-width: var(--max-width);\n max-height: var(--max-height);\n object-fit: var(--object-fit);\n}\n\nimg {\n backdrop-filter: var(--blur-xl);\n}\n\n.error {\n display: flex;\n opacity: 0.8;\n background: repeating-linear-gradient(-45deg, rgba(150, 0, 0, 0.1), rgba(150, 0, 0, 0.1) 10px, #fff 5px, #fff 25px);\n flex-direction: column;\n border: 1px solid red;\n color: black;\n align-items: center;\n justify-content: center;\n word-break: break-all;\n padding: 1rem;\n box-sizing: border-box;\n}\n\n.error ion-icon {\n color: #282828;\n --ionicon-stroke-width: calc(var(--width) / 5);\n font-size: calc(var(--width) / 2);\n}\n\na.error {\n text-decoration: none;\n width: var(--width);\n height: var(--height);\n}\n\n.code {\n font-weight: bold;\n font-size: calc(var(--width) / 8);\n}\n\n.text {\n font-size: calc(var(--width) / 20);\n}\n","import { BrokenFile as BrokenFileData, PodOS } from '@pod-os/core';\nimport { BrokenFile } from '../broken-file/BrokenFile';\nimport { Component, Event, EventEmitter, h, Host, Prop, State, Watch } from '@stencil/core';\nimport session from '../../store/session';\n\n/**\n * Tries fetch an image with the solid authentication, and can visualize http errors like 403 or 404 if this fails.\n * Falls back to classic <img src=\"...\"> on network errors like CORS.\n * Renders a normal link if even this fails.\n */\n@Component({\n tag: 'pos-image',\n styleUrl: 'pos-image.css',\n shadow: true,\n})\nexport class PosImage {\n @Prop() src: string;\n\n @Prop() alt: string;\n\n /**\n * Use a blurred version of the image as its own background, if the image is scaled down to fit into the container.\n */\n @Prop() blurredBackground: boolean = false;\n\n @State() os: PodOS;\n\n @State()\n private dataUri: string;\n\n @State()\n private brokenFile: BrokenFileData;\n\n @State()\n private networkError: Error;\n\n @State()\n private imageError: Event;\n\n @State()\n private loading: boolean = true;\n\n @Event({ eventName: 'pod-os:init' }) initializeOsEmitter: EventEmitter;\n\n /**\n * Indicates that the resource given in `src` property has been loaded.\n */\n @Event({ eventName: 'pod-os:resource-loaded' }) resourceLoadedEmitter: EventEmitter<string>;\n\n componentWillLoad() {\n session.onChange('isLoggedIn', () => this.fetchBlob());\n this.initializeOsEmitter.emit(this.setOs);\n }\n\n setOs = async (os: PodOS) => {\n this.os = os;\n };\n\n @Watch('os')\n @Watch('src')\n async fetchBlob() {\n try {\n this.loading = true;\n this.imageError = null;\n this.networkError = null;\n this.brokenFile = null;\n const file = await this.os.fetchFile(this.src);\n this.resourceLoadedEmitter.emit(this.src);\n if (file.blob()) {\n this.dataUri = URL.createObjectURL(file.blob());\n } else {\n this.brokenFile = file as BrokenFileData;\n }\n } catch (err) {\n this.networkError = err;\n } finally {\n this.loading = false;\n }\n }\n\n onImageError(err: Event) {\n this.networkError = null;\n this.imageError = err;\n }\n\n render() {\n if (this.loading) {\n return <ion-skeleton-text animated={true}></ion-skeleton-text>;\n }\n if (this.networkError) {\n // probably a CORS error\n return <img alt={this.alt} src={this.src} onError={err => this.onImageError(err)} />;\n }\n if (this.brokenFile) {\n // fetching worked, but HTTP response was not ok\n return <BrokenFile file={this.brokenFile} />;\n }\n if (this.imageError) {\n // if even the loading via classic <img src=\"...\"> failed, render a link\n return (\n <div class=\"error\">\n <a href={this.src}>{this.src}</a>\n </div>\n );\n }\n\n return (\n <Host\n style={{\n backgroundImage: this.blurredBackground ? `url('${this.dataUri}')` : null,\n }}\n >\n <img src={this.dataUri} alt={this.alt} />\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -19,7 +19,7 @@ const PosInternalRouter = /*@__PURE__*/ proxyCustomElement(class PosInternalRout
|
|
|
19
19
|
this.uri = 'pod-os:dashboard';
|
|
20
20
|
}
|
|
21
21
|
render() {
|
|
22
|
-
return h("pos-app-dashboard", { key: '
|
|
22
|
+
return h("pos-app-dashboard", { key: '44741d470c91f1faa732c5932788aa58b56805d4' });
|
|
23
23
|
}
|
|
24
24
|
}, [0, "pos-internal-router", {
|
|
25
25
|
"uri": [1]
|
|
@@ -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 {\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";
|
|
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 padding: 0;\n margin: 0;\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: '
|
|
44
|
+
return (h(Host, { key: '35b12479d51638dc1e4de983f4901ddcea39e8df' }, 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: '76f9434f813162456c3c75728db363d708e2617f', "onPod-os:added-literal-value": event => this.literalValueAdded(event.detail) })));
|
|
45
45
|
}
|
|
46
46
|
static get style() { return PosLiteralsStyle0; }
|
|
47
47
|
}, [1, "pos-literals", {
|