@pod-os/elements 0.24.2-rc.f1a6ca3.0 → 0.24.2-rc.fd22901.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 (111) hide show
  1. package/dist/cjs/elements.cjs.js +1 -1
  2. package/dist/cjs/ion-badge_8.cjs.entry.js +1 -1
  3. package/dist/cjs/{ion-card_32.cjs.entry.js → ion-card_34.cjs.entry.js} +47 -19
  4. package/dist/cjs/ion-card_34.cjs.entry.js.map +1 -0
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/pos-app-generic.cjs.entry.js +1 -1
  7. package/dist/cjs/pos-app-ldp-container.cjs.entry.js +1 -1
  8. package/dist/cjs/pos-app-rdf-document.cjs.entry.js +1 -1
  9. package/dist/collection/apps/pos-app-browser/pos-app-browser.css +13 -0
  10. package/dist/collection/apps/pos-app-browser/pos-app-browser.js +1 -1
  11. package/dist/collection/apps/pos-app-browser/pos-app-browser.js.map +1 -1
  12. package/dist/collection/apps/pos-app-dashboard/pos-app-dashboard.js +1 -1
  13. package/dist/collection/apps/pos-app-dashboard/pos-example-resources/pos-example-resources.js +1 -1
  14. package/dist/collection/apps/pos-app-dashboard/pos-getting-started/pos-getting-started.js +1 -1
  15. package/dist/collection/apps/pos-app-generic/pos-app-generic.js +1 -1
  16. package/dist/collection/apps/pos-app-ldp-container/pos-app-ldp-container.js +1 -1
  17. package/dist/collection/apps/pos-app-rdf-document/pos-app-rdf-document.js +1 -1
  18. package/dist/collection/apps/pos-app-settings/pos-app-settings.css +11 -0
  19. package/dist/collection/apps/pos-app-settings/pos-app-settings.js +19 -0
  20. package/dist/collection/apps/pos-app-settings/pos-app-settings.js.map +1 -0
  21. package/dist/collection/apps/pos-app-settings/pos-getting-started/pos-setting-offline-cache.css +28 -0
  22. package/dist/collection/apps/pos-app-settings/pos-getting-started/pos-setting-offline-cache.js +20 -0
  23. package/dist/collection/apps/pos-app-settings/pos-getting-started/pos-setting-offline-cache.js.map +1 -0
  24. package/dist/collection/collection-manifest.json +2 -0
  25. package/dist/collection/components/pos-add-new-thing/pos-add-new-thing.js +1 -1
  26. package/dist/collection/components/pos-app/pos-app.js +1 -1
  27. package/dist/collection/components/pos-dialog/pos-dialog.js +1 -1
  28. package/dist/collection/components/pos-error-toast/pos-error-toast.js +1 -1
  29. package/dist/collection/components/pos-internal-router/pos-internal-router.js +1 -1
  30. package/dist/collection/components/pos-internal-router/pos-internal-router.js.map +1 -1
  31. package/dist/collection/components/pos-literals/pos-literals.js +1 -1
  32. package/dist/collection/components/pos-login/pos-login.js +1 -1
  33. package/dist/collection/components/pos-login-form/pos-login-form.js +1 -1
  34. package/dist/collection/components/pos-navigation-bar/pos-navigation-bar.js +1 -1
  35. package/dist/collection/components/pos-new-thing-form/pos-new-thing-form.js +1 -1
  36. package/dist/collection/components/pos-rich-link/pos-rich-link.js +2 -2
  37. package/dist/collection/components/pos-router/pos-router.js +1 -1
  38. package/dist/collection/components/pos-select-term/pos-select-term.js +1 -1
  39. package/dist/components/index11.js +170 -172
  40. package/dist/components/index11.js.map +1 -1
  41. package/dist/components/index12.js +198 -0
  42. package/dist/components/index12.js.map +1 -0
  43. package/dist/components/ion-app.js +1 -1
  44. package/dist/components/pos-add-new-thing2.js +1 -1
  45. package/dist/components/pos-app-browser.js +74 -62
  46. package/dist/components/pos-app-browser.js.map +1 -1
  47. package/dist/components/pos-app-dashboard2.js +1 -1
  48. package/dist/components/pos-app-generic.js +1 -1
  49. package/dist/components/pos-app-ldp-container.js +1 -1
  50. package/dist/components/pos-app-rdf-document.js +1 -1
  51. package/dist/components/pos-app-settings.d.ts +11 -0
  52. package/dist/components/pos-app-settings.js +8 -0
  53. package/dist/components/pos-app-settings.js.map +1 -0
  54. package/dist/components/pos-app-settings2.js +39 -0
  55. package/dist/components/pos-app-settings2.js.map +1 -0
  56. package/dist/components/pos-app2.js +3 -26
  57. package/dist/components/pos-app2.js.map +1 -1
  58. package/dist/components/pos-dialog2.js +1 -1
  59. package/dist/components/pos-error-toast2.js +1 -1
  60. package/dist/components/pos-example-resources2.js +1 -1
  61. package/dist/components/pos-getting-started2.js +1 -1
  62. package/dist/components/pos-internal-router2.js +37 -25
  63. package/dist/components/pos-internal-router2.js.map +1 -1
  64. package/dist/components/pos-literals2.js +1 -1
  65. package/dist/components/pos-login-form2.js +1 -1
  66. package/dist/components/pos-login2.js +1 -1
  67. package/dist/components/pos-navigation-bar2.js +1 -1
  68. package/dist/components/pos-new-thing-form2.js +1 -1
  69. package/dist/components/pos-rich-link2.js +2 -2
  70. package/dist/components/pos-router2.js +1 -1
  71. package/dist/components/pos-select-term2.js +1 -1
  72. package/dist/components/pos-setting-offline-cache.d.ts +11 -0
  73. package/dist/components/pos-setting-offline-cache.js +8 -0
  74. package/dist/components/pos-setting-offline-cache.js.map +1 -0
  75. package/dist/components/pos-setting-offline-cache2.js +34 -0
  76. package/dist/components/pos-setting-offline-cache2.js.map +1 -0
  77. package/dist/components/session.js +2 -193
  78. package/dist/components/session.js.map +1 -1
  79. package/dist/components/settings.js +29 -0
  80. package/dist/components/settings.js.map +1 -0
  81. package/dist/elements/elements.esm.js +1 -1
  82. package/dist/elements/elements.esm.js.map +1 -1
  83. package/dist/elements/p-48f2cf16.entry.js +2 -0
  84. package/dist/elements/p-6e0e0f54.entry.js +2 -0
  85. package/dist/elements/p-8cea7540.entry.js +20 -0
  86. package/dist/elements/p-8cea7540.entry.js.map +1 -0
  87. package/dist/elements/{p-c0876b5d.entry.js → p-8eb66b39.entry.js} +2 -2
  88. package/dist/elements/p-b58b6be4.entry.js +2 -0
  89. package/dist/esm/elements.js +1 -1
  90. package/dist/esm/ion-badge_8.entry.js +1 -1
  91. package/dist/esm/{ion-card_32.entry.js → ion-card_34.entry.js} +46 -20
  92. package/dist/esm/ion-card_34.entry.js.map +1 -0
  93. package/dist/esm/loader.js +1 -1
  94. package/dist/esm/pos-app-generic.entry.js +1 -1
  95. package/dist/esm/pos-app-ldp-container.entry.js +1 -1
  96. package/dist/esm/pos-app-rdf-document.entry.js +1 -1
  97. package/dist/types/apps/pos-app-settings/pos-app-settings.d.ts +3 -0
  98. package/dist/types/apps/pos-app-settings/pos-getting-started/pos-setting-offline-cache.d.ts +3 -0
  99. package/dist/types/components.d.ts +26 -0
  100. package/package.json +1 -1
  101. package/dist/cjs/ion-card_32.cjs.entry.js.map +0 -1
  102. package/dist/elements/p-2417f72e.entry.js +0 -20
  103. package/dist/elements/p-2417f72e.entry.js.map +0 -1
  104. package/dist/elements/p-52678615.entry.js +0 -2
  105. package/dist/elements/p-a1fbbc32.entry.js +0 -2
  106. package/dist/elements/p-c7b331ce.entry.js +0 -2
  107. package/dist/esm/ion-card_32.entry.js.map +0 -1
  108. /package/dist/elements/{p-a1fbbc32.entry.js.map → p-48f2cf16.entry.js.map} +0 -0
  109. /package/dist/elements/{p-52678615.entry.js.map → p-6e0e0f54.entry.js.map} +0 -0
  110. /package/dist/elements/{p-c0876b5d.entry.js.map → p-8eb66b39.entry.js.map} +0 -0
  111. /package/dist/elements/{p-c7b331ce.entry.js.map → p-b58b6be4.entry.js.map} +0 -0
@@ -19,7 +19,7 @@ const PosExampleResources = /*@__PURE__*/ proxyCustomElement(class PosExampleRes
19
19
  this.__attachShadow();
20
20
  }
21
21
  render() {
22
- return (h(Host, { key: '85fd8b16422fb57ad1414804d7cc2c86eee39d02' }, h("div", { key: 'd446af3cc59ce0b9d372a37650618686aa48b8fb' }, h("h2", { key: '3000fbd901554640126f7d6880d56d1bef9ed241' }, "Try these... \uD83D\uDCA1"), h("p", { key: 'c89defab8e6e2e7a617898f163ed7234249727d2' }, "No idea where to start? Try these example resources, and follow your nose \uD83D\uDC43"), h("div", { key: 'bc9ed67f429ea468c53b591390b7fba1674b0b7d', class: "links" }, h("pos-rich-link", { key: 'a5fd0f04c539c2654198a0d825fbb2da891e0d14', uri: "https://pod-os.solidcommunity.net/profile/card#me" }), h("pos-rich-link", { key: '0b8dc4abeecbb4cc0f2d8957aa6e43f6877d84d0', uri: "https://angelo.veltens.org/profile/card#me" }), h("pos-rich-link", { key: '628bd8639c706134274ee3c1cd14616664ba9552', uri: "https://angelo.veltens.org/public/bookmarks" }), h("pos-rich-link", { key: '91efe195ccc2567428ea978390a9845d22beda5e', uri: "https://solidos.solidcommunity.net/profile/card#me" })))));
22
+ return (h(Host, { key: 'b6a491caa9ea624cdba3cca92fcc9444a3c38290' }, h("div", { key: '458ceb259d7070d38eb13aea9f3b303f174a5c56' }, h("h2", { key: '1d571afb47c256f2ac873840c6fe8bc8408cc9a6' }, "Try these... \uD83D\uDCA1"), h("p", { key: '7de1dac7a92becb01ec7aab4cf96c45fa95f7de6' }, "No idea where to start? Try these example resources, and follow your nose \uD83D\uDC43"), h("div", { key: 'b94cc5571f5b7af0bcc660fc8812ca08ca2db482', class: "links" }, h("pos-rich-link", { key: 'e2c414d51b79e27667a42d04fa66e879a2ecf2a2', uri: "https://pod-os.solidcommunity.net/profile/card#me" }), h("pos-rich-link", { key: 'e54479349363d67d027612bbcdb2167f9ab6ec03', uri: "https://angelo.veltens.org/profile/card#me" }), h("pos-rich-link", { key: '1c743eafd11d46f6bdd31face3bf1083abd1e045', uri: "https://angelo.veltens.org/public/bookmarks" }), h("pos-rich-link", { key: '3e47cd67a0ab44a1921ec4f0e5e9f24404826494', uri: "https://solidos.solidcommunity.net/profile/card#me" })))));
23
23
  }
24
24
  static get style() { return PosExampleResourcesStyle0; }
25
25
  }, [1, "pos-example-resources"]);
@@ -10,7 +10,7 @@ const PosGettingStarted = /*@__PURE__*/ proxyCustomElement(class PosGettingStart
10
10
  this.__attachShadow();
11
11
  }
12
12
  render() {
13
- return (h(Host, { key: '2347ea586342456767e9aba2b30debbd86e0b37e' }, h("div", { key: '33da44a3cd289b08384b17933c16cef8063a87e2' }, h("h2", { key: '7b08c85b665db29d7d0ceaea5bce32b975180300' }, "Getting started \uD83D\uDE80"), h("p", { key: 'b582fad4e229353edfe5286a417ed544f8a08659' }, "\uD83D\uDD0E Enter a URL into the above navigation bar to browse through the web of data. "), h("p", { key: '95a42fe1be9e27e03e1bf1beb9a359720dbfef8a' }, "\uD83D\uDD10 Sign in to access private resources on your Solid Pod or those of your friends or coworkers.")), h("div", { key: 'be49077a2032e6208fbfc8c170ec2a4f2151d792' }, h("p", { key: '15ebacbf46ab241c0001aa6df011612e27b14657', class: "question" }, "New to Solid?"), h("p", { key: '41366fc5e73c5df8b07dc39236d781f9bdb16a2e' }, h("a", { key: '35d1572cf1db045759434e3783c02cac98954c91', href: "https://solidproject.org/for-developers#hosted-pod-services" }, "Get a Pod \u2192"))), h("div", { key: '2c4a4d8b7f2a0aded70c541f4b511b96150c4fd4' }, h("p", { key: '3a1f2bc0640b9c7a553063d4886d22eee41af0f9', class: "question" }, "Want to dig deeper into PodOS?"), h("p", { key: 'ec76e0f2dd6feff49ecac2d5bc51d27635412bcc' }, h("a", { key: '5c49f338c15f0e9941e3929f5a81baa6521bbb1a', href: "http://pod-os.org" }, "Learn more \u2192")))));
13
+ return (h(Host, { key: 'a31a64545a5960ce8e34f0c612d2755e465c1131' }, h("div", { key: '29ec2c449fd5334e47199dece7c01c2a71ab6d98' }, h("h2", { key: 'e680003831826c8cd4615de083f9f9c305513c29' }, "Getting started \uD83D\uDE80"), h("p", { key: '8e80305087bee4c8ec05ac7cb16096caf0c61ad0' }, "\uD83D\uDD0E Enter a URL into the above navigation bar to browse through the web of data. "), h("p", { key: '4d7ba95047694e636934cb7a03c291adb0678bb6' }, "\uD83D\uDD10 Sign in to access private resources on your Solid Pod or those of your friends or coworkers.")), h("div", { key: '167ac903fa88b9be6cf00f2f5bfea23d8dfd14c9' }, h("p", { key: 'a0b06f944e534b889502a96c935686a3b7f349d0', class: "question" }, "New to Solid?"), h("p", { key: '8c26c4d20d0fcdb075ad4c0ea5ff012d22dee081' }, h("a", { key: 'd9bc5b7bfd213012078729e25e42b4ea8b970573', href: "https://solidproject.org/for-developers#hosted-pod-services" }, "Get a Pod \u2192"))), h("div", { key: '223f171699e3acf5f1c5c4819621bddc49db41f1' }, h("p", { key: 'e83cfd2b01c5abaf30f0053ef261c68ae0919f0a', class: "question" }, "Want to dig deeper into PodOS?"), h("p", { key: '8ccdbd60a250850c4105e99545f09755109ced86' }, h("a", { key: 'f72a83533b846bd8e8e798b0dd71cfc585a8d104', href: "http://pod-os.org" }, "Learn more \u2192")))));
14
14
  }
15
15
  static get style() { return PosGettingStartedStyle0; }
16
16
  }, [1, "pos-getting-started"]);
@@ -1,16 +1,18 @@
1
1
  import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
2
- import { d as defineCustomElement$c } from './card.js';
3
- import { d as defineCustomElement$b } from './card-content.js';
4
- import { d as defineCustomElement$a } from './card-header.js';
5
- import { d as defineCustomElement$9 } from './progress-bar.js';
6
- import { d as defineCustomElement$8 } from './ripple-effect.js';
7
- import { d as defineCustomElement$7 } from './pos-app-dashboard2.js';
8
- import { d as defineCustomElement$6 } from './pos-description2.js';
9
- import { d as defineCustomElement$5 } from './pos-example-resources2.js';
10
- import { d as defineCustomElement$4 } from './pos-getting-started2.js';
11
- import { d as defineCustomElement$3 } from './pos-label2.js';
12
- import { d as defineCustomElement$2 } from './pos-resource2.js';
13
- import { d as defineCustomElement$1 } from './pos-rich-link2.js';
2
+ import { d as defineCustomElement$e } from './card.js';
3
+ import { d as defineCustomElement$d } from './card-content.js';
4
+ import { d as defineCustomElement$c } from './card-header.js';
5
+ import { d as defineCustomElement$b } from './progress-bar.js';
6
+ import { d as defineCustomElement$a } from './ripple-effect.js';
7
+ import { d as defineCustomElement$9 } from './pos-app-dashboard2.js';
8
+ import { d as defineCustomElement$8 } from './pos-app-settings2.js';
9
+ import { d as defineCustomElement$7 } from './pos-description2.js';
10
+ import { d as defineCustomElement$6 } from './pos-example-resources2.js';
11
+ import { d as defineCustomElement$5 } from './pos-getting-started2.js';
12
+ import { d as defineCustomElement$4 } from './pos-label2.js';
13
+ import { d as defineCustomElement$3 } from './pos-resource2.js';
14
+ import { d as defineCustomElement$2 } from './pos-rich-link2.js';
15
+ import { d as defineCustomElement$1 } from './pos-setting-offline-cache2.js';
14
16
 
15
17
  const PosInternalRouter = /*@__PURE__*/ proxyCustomElement(class PosInternalRouter extends HTMLElement {
16
18
  constructor() {
@@ -19,7 +21,7 @@ const PosInternalRouter = /*@__PURE__*/ proxyCustomElement(class PosInternalRout
19
21
  this.uri = 'pod-os:dashboard';
20
22
  }
21
23
  render() {
22
- return h("pos-app-dashboard", { key: '86499010a528a423abf1e090e3d150e23b35fe94' });
24
+ return this.uri === 'pod-os:settings' ? (h("pos-app-settings", null)) : (h("pos-app-dashboard", null));
23
25
  }
24
26
  }, [0, "pos-internal-router", {
25
27
  "uri": [1]
@@ -28,7 +30,7 @@ function defineCustomElement() {
28
30
  if (typeof customElements === "undefined") {
29
31
  return;
30
32
  }
31
- const components = ["pos-internal-router", "ion-card", "ion-card-content", "ion-card-header", "ion-progress-bar", "ion-ripple-effect", "pos-app-dashboard", "pos-description", "pos-example-resources", "pos-getting-started", "pos-label", "pos-resource", "pos-rich-link"];
33
+ const components = ["pos-internal-router", "ion-card", "ion-card-content", "ion-card-header", "ion-progress-bar", "ion-ripple-effect", "pos-app-dashboard", "pos-app-settings", "pos-description", "pos-example-resources", "pos-getting-started", "pos-label", "pos-resource", "pos-rich-link", "pos-setting-offline-cache"];
32
34
  components.forEach(tagName => { switch (tagName) {
33
35
  case "pos-internal-router":
34
36
  if (!customElements.get(tagName)) {
@@ -37,60 +39,70 @@ function defineCustomElement() {
37
39
  break;
38
40
  case "ion-card":
39
41
  if (!customElements.get(tagName)) {
40
- defineCustomElement$c();
42
+ defineCustomElement$e();
41
43
  }
42
44
  break;
43
45
  case "ion-card-content":
44
46
  if (!customElements.get(tagName)) {
45
- defineCustomElement$b();
47
+ defineCustomElement$d();
46
48
  }
47
49
  break;
48
50
  case "ion-card-header":
49
51
  if (!customElements.get(tagName)) {
50
- defineCustomElement$a();
52
+ defineCustomElement$c();
51
53
  }
52
54
  break;
53
55
  case "ion-progress-bar":
54
56
  if (!customElements.get(tagName)) {
55
- defineCustomElement$9();
57
+ defineCustomElement$b();
56
58
  }
57
59
  break;
58
60
  case "ion-ripple-effect":
59
61
  if (!customElements.get(tagName)) {
60
- defineCustomElement$8();
62
+ defineCustomElement$a();
61
63
  }
62
64
  break;
63
65
  case "pos-app-dashboard":
64
66
  if (!customElements.get(tagName)) {
65
- defineCustomElement$7();
67
+ defineCustomElement$9();
68
+ }
69
+ break;
70
+ case "pos-app-settings":
71
+ if (!customElements.get(tagName)) {
72
+ defineCustomElement$8();
66
73
  }
67
74
  break;
68
75
  case "pos-description":
69
76
  if (!customElements.get(tagName)) {
70
- defineCustomElement$6();
77
+ defineCustomElement$7();
71
78
  }
72
79
  break;
73
80
  case "pos-example-resources":
74
81
  if (!customElements.get(tagName)) {
75
- defineCustomElement$5();
82
+ defineCustomElement$6();
76
83
  }
77
84
  break;
78
85
  case "pos-getting-started":
79
86
  if (!customElements.get(tagName)) {
80
- defineCustomElement$4();
87
+ defineCustomElement$5();
81
88
  }
82
89
  break;
83
90
  case "pos-label":
84
91
  if (!customElements.get(tagName)) {
85
- defineCustomElement$3();
92
+ defineCustomElement$4();
86
93
  }
87
94
  break;
88
95
  case "pos-resource":
89
96
  if (!customElements.get(tagName)) {
90
- defineCustomElement$2();
97
+ defineCustomElement$3();
91
98
  }
92
99
  break;
93
100
  case "pos-rich-link":
101
+ if (!customElements.get(tagName)) {
102
+ defineCustomElement$2();
103
+ }
104
+ break;
105
+ case "pos-setting-offline-cache":
94
106
  if (!customElements.get(tagName)) {
95
107
  defineCustomElement$1();
96
108
  }
@@ -1 +1 @@
1
- {"file":"pos-internal-router2.js","mappings":";;;;;;;;;;;;;;MAKa,iBAAiB;IAH9B;;;QAKE,QAAG,GAAW,kBAAkB,CAAC;KAKlC;IAHC,MAAM;QACJ,OAAO,2EAAuC,CAAC;KAChD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/pos-internal-router/pos-internal-router.tsx"],"sourcesContent":["import { Component, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'pos-internal-router',\n})\nexport class PosInternalRouter {\n @Prop()\n uri: string = 'pod-os:dashboard';\n\n render() {\n return <pos-app-dashboard></pos-app-dashboard>;\n }\n}\n"],"version":3}
1
+ {"file":"pos-internal-router2.js","mappings":";;;;;;;;;;;;;;;;MAKa,iBAAiB;IAH9B;;;QAKE,QAAG,GAAW,kBAAkB,CAAC;KASlC;IAPC,MAAM;QACJ,OAAO,IAAI,CAAC,GAAG,KAAK,iBAAiB,IACnC,2BAAqC,KAErC,4BAAuC,CACxC,CAAC;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/pos-internal-router/pos-internal-router.tsx"],"sourcesContent":["import { Component, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'pos-internal-router',\n})\nexport class PosInternalRouter {\n @Prop()\n uri: string = 'pod-os:dashboard';\n\n render() {\n return this.uri === 'pod-os:settings' ? (\n <pos-app-settings></pos-app-settings>\n ) : (\n <pos-app-dashboard></pos-app-dashboard>\n );\n }\n}\n"],"version":3}
@@ -41,7 +41,7 @@ const PosLiterals = /*@__PURE__*/ proxyCustomElement(class PosLiterals extends H
41
41
  }
42
42
  }
43
43
  render() {
44
- return (h(Host, { key: '5a5066794f50e5b0ff620d9d2a118446b3c422ec' }, 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: '5184bd3009f2da1ad51564bca223da3b4c7394a7', "onPod-os:added-literal-value": event => this.literalValueAdded(event.detail) })));
44
+ return (h(Host, { key: 'fbfc96a94c8a225a94cbf8d230b9ec36b935523b' }, 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: 'f0b7dda5edb7d590301a8c04a6309a774c074ccb', "onPod-os:added-literal-value": event => this.literalValueAdded(event.detail) })));
45
45
  }
46
46
  static get style() { return PosLiteralsStyle0; }
47
47
  }, [1, "pos-literals", {
@@ -16,7 +16,7 @@ const PosLoginForm = /*@__PURE__*/ proxyCustomElement(class PosLoginForm extends
16
16
  this.canSubmit = Boolean(this.idpUrl);
17
17
  }
18
18
  render() {
19
- return (h("form", { key: 'b56f530a3c5b58f1913157a91e65381814e60b51', method: "dialog", onSubmit: () => this.handleSubmit() }, h("label", { key: 'e514bf155967eca4316704ecdffde8128954b3b6', htmlFor: "idpUrl" }, "Please enter your Identity Provider"), h("input", { key: '935033a8a131a6b4a8a63985c3871042c73f37a8', id: "idpUrl", type: "url", value: this.idpUrl, required: true, onInput: e => this.handleChange(e), list: "suggestedIssuers", placeholder: "Type to search..." }), h("datalist", { key: '00465f2bfb2da0595ff28a3ed5d20fd47aef0a54', id: "suggestedIssuers" }, h("option", { key: '5bca11f46eb8fa75ddb80d5551c70236399cb3b3', value: "https://solidcommunity.net" }, "solidcommunity.net"), h("option", { key: 'a981f345eb6cec1c7e4f31c2daa114bf60b565ec', value: "https://solidweb.org" }, "solidweb.org"), h("option", { key: '14dd36e212caee188306106b51f69d53443f1b18', value: "https://solidweb.me" }, "solidweb.me"), h("option", { key: '8ecbbb6bfa67e0f79f73a5aa82371e2d911cb8a9', value: "https://inrupt.net" }, "inrupt.net"), h("option", { key: '3e3031f2900661298db252f43e032513d50cf248', value: "https://login.inrupt.com" }, "Inrupt PodSpaces"), h("option", { key: '3ad3d160d9617c3b736ab7ff6bf85722893cc5f2', value: "https://trinpod.us" }, "trinpod.us"), h("option", { key: 'b4bd09594ece8c1cde23aa0686634212efecff48', value: "https://use.id" }, "use.id"), h("option", { key: '17f67470776f2d9fbcd182e9217183750f533407', value: "https://solid.redpencil.io" }, "redpencil.io"), h("option", { key: '445ac6fc71cd4a0fa4ed457220baa15563746342', value: "https://datapod.grant.io" }, "Data Pod (grant.io)"), h("option", { key: '624b7940eaa4de8ccf98b5b3095fe347d8f4ee3f', value: "https://teamid.live" }, "teamid.live")), h("input", { key: 'a37444b340c55d475b00af6cfd5cde5559cd1244', id: "login", type: "submit", value: "Login", disabled: !this.canSubmit })));
19
+ return (h("form", { key: 'ad94a827203fead2cc5976e65d5dd11b76929a37', method: "dialog", onSubmit: () => this.handleSubmit() }, h("label", { key: '042115e98ac3dc97aa941b9a086a930c532bab19', htmlFor: "idpUrl" }, "Please enter your Identity Provider"), h("input", { key: '45a4621d9a21a5b21ec82f81025b2be68d5505ae', id: "idpUrl", type: "url", value: this.idpUrl, required: true, onInput: e => this.handleChange(e), list: "suggestedIssuers", placeholder: "Type to search..." }), h("datalist", { key: '1f4dd4962470e796d1a175ea2ec2d03663390a0d', id: "suggestedIssuers" }, h("option", { key: 'f00f189f9f7babbda5c109a57d380d4d44d68f79', value: "https://solidcommunity.net" }, "solidcommunity.net"), h("option", { key: 'a0a1e4171ef87cd219cb8f0c68b68d0901d3fa55', value: "https://solidweb.org" }, "solidweb.org"), h("option", { key: '4361294b71ba9b7b123dd5d1deb2692b2edfa59e', value: "https://solidweb.me" }, "solidweb.me"), h("option", { key: '0fcee23d732415ef206d8c9a4d18c31f2bcd8eca', value: "https://inrupt.net" }, "inrupt.net"), h("option", { key: '267b177e9765e09ee2aa592c8a4d4c152ad7fb0b', value: "https://login.inrupt.com" }, "Inrupt PodSpaces"), h("option", { key: '302a4d517fedeafb146d9f8a3938383c57e24f7e', value: "https://trinpod.us" }, "trinpod.us"), h("option", { key: '83fd1b92688b24f575d3ee17a9cb394c8ab16eab', value: "https://use.id" }, "use.id"), h("option", { key: '007f814795f747d9b74f7b16db986502a9b746af', value: "https://solid.redpencil.io" }, "redpencil.io"), h("option", { key: '5477d60737d194bce4c50f24a75930427b6dc9bb', value: "https://datapod.grant.io" }, "Data Pod (grant.io)"), h("option", { key: 'e289736fcc31902f783efae443f17dfda532ba9f', value: "https://teamid.live" }, "teamid.live")), h("input", { key: '69a61d727a4e2c88a7f3594b98cca42f934b649a', id: "login", type: "submit", value: "Login", disabled: !this.canSubmit })));
20
20
  }
21
21
  handleChange(event) {
22
22
  this.validate();
@@ -41,7 +41,7 @@ const PosLogin = /*@__PURE__*/ proxyCustomElement(class PosLogin extends HTMLEle
41
41
  this.dialog.showModal();
42
42
  }
43
43
  render() {
44
- return (h(Host, { key: 'f34f5e3aeb266eacf4dd810a1490b844f9d22e93' }, h("div", { key: 'acade2f70e5f85d318965da083f6390bb822f59d', class: "container" }, store.state.isLoggedIn ? (h("pos-resource", { uri: store.state.webId }, h("span", { class: "user-data" }, h("pos-picture", null), h("pos-label", null)))) : (''), !store.state.isLoggedIn && (h("button", { key: 'f3e4f0c45947dc609a3bfedc1788b9fdb34b6221', id: "login", onClick: () => this.openDialog() }, "Login")), store.state.isLoggedIn && (h("button", { key: '95884aaab84823da0640c4388f8515d6f198611b', id: "logout", onClick: () => this.logout() }, "Logout"))), h("pos-dialog", { key: 'b24462de3c20d965258809d00462727554eb0793', ref: el => (this.dialog = el) }, h("span", { key: '665c1e2826eb613e1ea6dbf52119cb1db3d282d7', slot: "title" }, "Sign in to your Pod"), h("pos-login-form", { key: 'd4440c6e20c04b435df0ecb166bfd1ca2d1e4cdb', "onPod-os:idp-url-selected": ev => this.login(ev), slot: "content" }))));
44
+ return (h(Host, { key: '246bea632b952b0a004e1237697a86bd0ebfeea4' }, h("div", { key: 'cdcb1905deb0d27f79adc4ed1eeae0adb47b37f6', class: "container" }, store.state.isLoggedIn ? (h("pos-resource", { uri: store.state.webId }, h("span", { class: "user-data" }, h("pos-picture", null), h("pos-label", null)))) : (''), !store.state.isLoggedIn && (h("button", { key: 'dc3a1072af920e9495a2e003c1e2edf8d282de29', id: "login", onClick: () => this.openDialog() }, "Login")), store.state.isLoggedIn && (h("button", { key: 'ca04ffb1126cd26d1c80060673c036048b403c82', id: "logout", onClick: () => this.logout() }, "Logout"))), h("pos-dialog", { key: 'f832ac8272a695e1bcf826d5aa5d62843bfb4de5', ref: el => (this.dialog = el) }, h("span", { key: 'd2dd84554a068af4a044cba963aa4417b8232d93', slot: "title" }, "Sign in to your Pod"), h("pos-login-form", { key: '98b542c2ddc6828fe99857632ee90a0dae6fdf96', "onPod-os:idp-url-selected": ev => this.login(ev), slot: "content" }))));
45
45
  }
46
46
  static get style() { return PosLoginStyle0; }
47
47
  }, [1, "pos-login", {
@@ -93,7 +93,7 @@ const PosNavigationBar = /*@__PURE__*/ proxyCustomElement(class PosNavigationBar
93
93
  }
94
94
  }
95
95
  render() {
96
- return (h("form", { key: 'dd9594ba41b59dc9e2e5bfd7b85c445d717d7ce8', onSubmit: e => this.onSubmit(e) }, this.searchIndex && this.uri ? h("pos-make-findable", { uri: this.uri }) : '', h("div", { key: '294992804e0d26ae2c65b84ffc5622eab3856eed', class: "bar" }, h("ion-searchbar", { key: 'e769533ee3520ad74284500d329275b630cb50f5', 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)));
96
+ return (h("form", { key: 'dadf35124fd0908c3623ef2e358f1e751a0b7242', onSubmit: e => this.onSubmit(e) }, this.searchIndex && this.uri ? h("pos-make-findable", { uri: this.uri }) : '', h("div", { key: '64d85b0b51298e2d1b3d6ff32f36db3f80fa1796', class: "bar" }, h("ion-searchbar", { key: 'cd51737238ab42315ace5bebdcc0b4c561b02c38', 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)));
97
97
  }
98
98
  static get style() { return PosNavigationBarStyle0; }
99
99
  }, [1, "pos-navigation-bar", {
@@ -25,7 +25,7 @@ const PosNewThingForm = /*@__PURE__*/ proxyCustomElement(class PosNewThingForm e
25
25
  subscribePodOs(this);
26
26
  }
27
27
  render() {
28
- return (h("form", { key: '1aaa58b08585024ca77bd0362bd6d73a970e6136', method: "dialog", onSubmit: e => this.handleSubmit(e) }, h("label", { key: 'c52a11b994de6535592ac7de5d6a568d6ce3ef7b', htmlFor: "type" }, "Type"), h("pos-select-term", { key: '24b5fc2409a720b8e5144acd8c27b3eebcef65f6', id: "type", placeholder: "", value: this.selectedTypeUri, "onPod-os:term-selected": e => this.onTermSelected(e) }), h("label", { key: '4705a74f5ec8e467d0109022224a57bc7393a5dc', htmlFor: "name" }, "Name"), h("input", { key: 'e25bf94434c5e0d6b7b4e9fb7a77b07b69aa54c7', 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: '83800ff48dbf5732cbfadadd48f64853e8551e26', id: "create", type: "submit", value: "Create", disabled: !this.canSubmit })));
28
+ return (h("form", { key: 'd231729bb8d01ffa9e1f88d9488fa92041f33460', method: "dialog", onSubmit: e => this.handleSubmit(e) }, h("label", { key: '739f893b508ffe8baa0b575594af48f6f690425c', htmlFor: "type" }, "Type"), h("pos-select-term", { key: '9973af04355cf8dec838a4217f711e4c8669dab4', id: "type", placeholder: "", value: this.selectedTypeUri, "onPod-os:term-selected": e => this.onTermSelected(e) }), h("label", { key: '4fac8ecca95c2e16c98c35ae92ea9b7f6bd6a94a', htmlFor: "name" }, "Name"), h("input", { key: 'c922c03e656d194c3235fb374ef90fce205f7ee7', 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: 'fb39eb6c09e67315326f13e184aab93a4ed786c6', id: "create", type: "submit", value: "Create", disabled: !this.canSubmit })));
29
29
  }
30
30
  handleChange(event) {
31
31
  this.name = event.target.value;
@@ -19,10 +19,10 @@ const PosRichLink = /*@__PURE__*/ proxyCustomElement(class PosRichLink extends H
19
19
  this.linkEmitter = createEvent(this, "pod-os:link", 7);
20
20
  }
21
21
  render() {
22
- return (h("pos-resource", { key: 'e1c942a2aa1e8a9526476bd6fa93233d718354ca', lazy: true, uri: this.uri }, h("p", { key: 'a5f2705c0a834401d2c146b1ad4e072a065d3316', class: "content" }, h("a", { key: 'e2a370b8517b895644d997473362d9e5d555311a', href: this.uri, onClick: e => {
22
+ return (h("pos-resource", { key: 'e9f1c8b7ca9ded161eebf1b4886b21ec2a23e042', lazy: true, uri: this.uri }, h("p", { key: '022cebbb522c3a04f1f6b83e9aeb8ad890642bdd', class: "content" }, h("a", { key: '105415deeb645e99e36d34f1750da0fa444c6ba8', href: this.uri, onClick: e => {
23
23
  e.preventDefault();
24
24
  this.linkEmitter.emit(this.uri);
25
- } }, h("pos-label", { key: '90700f8e23139c8d428dafb45eb710dd1be38d9a' })), h("span", { key: '52f81ea9bf53547b16a8fac42f46bf34ec55f5d7', class: "url" }, new URL(this.uri).host), h("pos-description", { key: 'e561304fdd9536953927fd78c6031b76e185baf4' }))));
25
+ } }, h("pos-label", { key: '4530f9511b81d37229f7c4f57915da035002bdfb' })), h("span", { key: '341e91a6167d36881d2bb5e96365aa7f2f7f2f9b', class: "url" }, new URL(this.uri).host), h("pos-description", { key: 'c8e3875a219a76fa401a558d9c4eaa6813206a19' }))));
26
26
  }
27
27
  static get style() { return PosRichLinkStyle0; }
28
28
  }, [1, "pos-rich-link", {
@@ -327,7 +327,7 @@ const PosRouter = /*@__PURE__*/ proxyCustomElement(class PosRouter extends HTMLE
327
327
  this.routeChanged.emit(this.uri);
328
328
  }
329
329
  render() {
330
- return h("slot", { key: '6b6bf8d8863e43bd7d9e2fa96f86fe652222dc44' });
330
+ return h("slot", { key: '4c9986b609d72550130ca76675dee260ca1cf373' });
331
331
  }
332
332
  static get style() { return PosRouterStyle0; }
333
333
  }, [4, "pos-router", {
@@ -28,7 +28,7 @@ const PosSelectTerm = /*@__PURE__*/ proxyCustomElement(class PosSelectTerm exten
28
28
  this.termSelected.emit({ uri: event.target.value });
29
29
  }
30
30
  render() {
31
- return (h(Host, { key: 'dbbd52d9a0af6ee27608862d21eabface70747a7' }, h("input", { key: '76bcc73080c020b71cd40d9a0ee987ff063a6719', part: "input", list: "terms", placeholder: this.placeholder, value: this.value, onChange: ev => this.handleChange(ev) }), h("datalist", { key: '6d0b698633f07413e389d7fe72e05b8130013c83', part: "terms", id: "terms" }, this.terms.map(term => (h("option", { value: term.uri }, term.shorthand))))));
31
+ return (h(Host, { key: '0c84c241534e981ac22797ca058622c79aa2c661' }, h("input", { key: '0dd0c1d3ed228a3e2c333e440eb5044e99110252', part: "input", list: "terms", placeholder: this.placeholder, value: this.value, onChange: ev => this.handleChange(ev) }), h("datalist", { key: 'b792a879f92d1b95b094cef9cab81738205a503b', part: "terms", id: "terms" }, this.terms.map(term => (h("option", { value: term.uri }, term.shorthand))))));
32
32
  }
33
33
  static get delegatesFocus() { return true; }
34
34
  static get watchers() { return {
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface PosSettingOfflineCache extends Components.PosSettingOfflineCache, HTMLElement {}
4
+ export const PosSettingOfflineCache: {
5
+ prototype: PosSettingOfflineCache;
6
+ new (): PosSettingOfflineCache;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,8 @@
1
+ import { P as PosSettingOfflineCache$1, d as defineCustomElement$1 } from './pos-setting-offline-cache2.js';
2
+
3
+ const PosSettingOfflineCache = PosSettingOfflineCache$1;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { PosSettingOfflineCache, defineCustomElement };
7
+
8
+ //# sourceMappingURL=pos-setting-offline-cache.js.map
@@ -0,0 +1 @@
1
+ {"file":"pos-setting-offline-cache.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -0,0 +1,34 @@
1
+ import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
+ import { l as localSettings } from './settings.js';
3
+
4
+ const posSettingOfflineCacheCss = ":host{border:var(--size-px) solid var(--color-grey-100);border-radius:var(--radius-lg);box-shadow:var(--shadow-md);padding:var(--size-8);max-width:var(--size-96);background:var(--color-white)}svg{width:var(--size-8)}h2{display:flex;align-items:center}p{padding:var(--size-2)}.info{background-color:var(--color-blue-200)}.warn{background-color:var(--color-yellow-200)}";
5
+ const PosSettingOfflineCacheStyle0 = posSettingOfflineCacheCss;
6
+
7
+ const PosSettingOfflineCache = /*@__PURE__*/ proxyCustomElement(class PosSettingOfflineCache extends HTMLElement {
8
+ constructor() {
9
+ super();
10
+ this.__registerHost();
11
+ this.__attachShadow();
12
+ }
13
+ render() {
14
+ return (h(Host, { key: 'a98de97ba1e0930b485a4a3610102deb02d927a7' }, h("div", { key: '5cf196a71b95fdfed7e5d990b272e12d2b9dd3ff' }, h("h2", { key: '99ddd9827f3ccc5a5277cc64e3952a3f5170f7bc' }, h("svg", { key: 'd9ce3722957428524cc9b264265320119f2e5c88', xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor" }, h("path", { key: '8e4e7af37df231e3141ba30b17a02517737cbe85', "stroke-linecap": "round", "stroke-linejoin": "round", d: "M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125" })), "Cache Settings"), h("p", { key: '7175929cd9327bc705db305294afa362cb2f648c', class: "info" }, "\u2139 Enable offline cache to be able to access previously loaded data while offline."), h("p", { key: '784fd9141b339165fdab6a98c084430299ff7ed5', class: "warn" }, "\u26A0 Private data may be stored on this device. Only enable it, if you trust this device."), h("label", { key: 'dac2cddf6b6c374d1a2ef3c4d9bad63a9cb7b8d9' }, h("input", { key: 'e39adb18d03ce622a85dd48a28c6d3c0dc2ce7f4', type: "checkbox", checked: localSettings.state.offlineCache, onChange: ev => (localSettings.state.offlineCache = ev.target.checked) }), "Enable offline cache"))));
15
+ }
16
+ static get style() { return PosSettingOfflineCacheStyle0; }
17
+ }, [1, "pos-setting-offline-cache"]);
18
+ function defineCustomElement() {
19
+ if (typeof customElements === "undefined") {
20
+ return;
21
+ }
22
+ const components = ["pos-setting-offline-cache"];
23
+ components.forEach(tagName => { switch (tagName) {
24
+ case "pos-setting-offline-cache":
25
+ if (!customElements.get(tagName)) {
26
+ customElements.define(tagName, PosSettingOfflineCache);
27
+ }
28
+ break;
29
+ } });
30
+ }
31
+
32
+ export { PosSettingOfflineCache as P, defineCustomElement as d };
33
+
34
+ //# sourceMappingURL=pos-setting-offline-cache2.js.map
@@ -0,0 +1 @@
1
+ {"file":"pos-setting-offline-cache2.js","mappings":";;;AAAA,MAAM,yBAAyB,GAAG,iXAAiX,CAAC;AACpZ,qCAAe,yBAAyB;;MCO3B,sBAAsB;;;;;;IACjC,MAAM;QACJ,QACE,EAAC,IAAI,uDACH,8DACE,6DACE,4DACE,KAAK,EAAC,4BAA4B,EAClC,IAAI,EAAC,MAAM,EACX,OAAO,EAAC,WAAW,kBACN,KAAK,EAClB,MAAM,EAAC,cAAc,IAErB,+EACiB,OAAO,qBACN,OAAO,EACvB,CAAC,EAAC,uWAAuW,GACzW,CACE,mBAEH,EACL,0DAAG,KAAK,EAAC,MAAM,6FAAsF,EACrG,0DAAG,KAAK,EAAC,MAAM,kGAA2F,EAC1G,gEACE,8DACE,IAAI,EAAC,UAAU,EACf,OAAO,EAAE,aAAa,CAAC,KAAK,CAAC,YAAY,EACzC,QAAQ,EAAE,EAAE,KAAK,aAAa,CAAC,KAAK,CAAC,YAAY,GAAI,EAAE,CAAC,MAA2B,CAAC,OAAO,CAAC,GACrF,yBAEH,CACJ,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/apps/pos-app-settings/pos-getting-started/pos-setting-offline-cache.css?tag=pos-setting-offline-cache&encapsulation=shadow","src/apps/pos-app-settings/pos-getting-started/pos-setting-offline-cache.tsx"],"sourcesContent":[":host {\n border: var(--size-px) solid var(--color-grey-100);\n border-radius: var(--radius-lg);\n box-shadow: var(--shadow-md);\n padding: var(--size-8);\n max-width: var(--size-96);\n background: var(--color-white);\n}\n\nsvg {\n width: var(--size-8);\n}\n\nh2 {\n display: flex;\n align-items: center;\n}\n\np {\n padding: var(--size-2);\n}\n\n.info {\n background-color: var(--color-blue-200);\n}\n.warn {\n background-color: var(--color-yellow-200);\n}\n","import { Component, h, Host } from '@stencil/core';\nimport { localSettings } from '../../../store/settings';\n\n@Component({\n tag: 'pos-setting-offline-cache',\n styleUrl: 'pos-setting-offline-cache.css',\n shadow: true,\n})\nexport class PosSettingOfflineCache {\n render() {\n return (\n <Host>\n <div>\n <h2>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke-width=\"1.5\"\n stroke=\"currentColor\"\n >\n <path\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n d=\"M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125\"\n />\n </svg>\n Cache Settings\n </h2>\n <p class=\"info\">ℹ Enable offline cache to be able to access previously loaded data while offline.</p>\n <p class=\"warn\">⚠ Private data may be stored on this device. Only enable it, if you trust this device.</p>\n <label>\n <input\n type=\"checkbox\"\n checked={localSettings.state.offlineCache}\n onChange={ev => (localSettings.state.offlineCache = (ev.target as HTMLInputElement).checked)}\n ></input>\n Enable offline cache\n </label>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,195 +1,4 @@
1
- import { getRenderingRef, forceUpdate } from '@stencil/core/internal/client';
2
-
3
- const appendToMap = (map, propName, value) => {
4
- const items = map.get(propName);
5
- if (!items) {
6
- map.set(propName, [value]);
7
- }
8
- else if (!items.includes(value)) {
9
- items.push(value);
10
- }
11
- };
12
- const debounce = (fn, ms) => {
13
- let timeoutId;
14
- return (...args) => {
15
- if (timeoutId) {
16
- clearTimeout(timeoutId);
17
- }
18
- timeoutId = setTimeout(() => {
19
- timeoutId = 0;
20
- fn(...args);
21
- }, ms);
22
- };
23
- };
24
-
25
- /**
26
- * Check if a possible element isConnected.
27
- * The property might not be there, so we check for it.
28
- *
29
- * We want it to return true if isConnected is not a property,
30
- * otherwise we would remove these elements and would not update.
31
- *
32
- * Better leak in Edge than to be useless.
33
- */
34
- const isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;
35
- const cleanupElements = debounce((map) => {
36
- for (let key of map.keys()) {
37
- map.set(key, map.get(key).filter(isConnected));
38
- }
39
- }, 2000);
40
- const stencilSubscription = () => {
41
- if (typeof getRenderingRef !== 'function') {
42
- // If we are not in a stencil project, we do nothing.
43
- // This function is not really exported by @stencil/core.
44
- return {};
45
- }
46
- const elmsToUpdate = new Map();
47
- return {
48
- dispose: () => elmsToUpdate.clear(),
49
- get: (propName) => {
50
- const elm = getRenderingRef();
51
- if (elm) {
52
- appendToMap(elmsToUpdate, propName, elm);
53
- }
54
- },
55
- set: (propName) => {
56
- const elements = elmsToUpdate.get(propName);
57
- if (elements) {
58
- elmsToUpdate.set(propName, elements.filter(forceUpdate));
59
- }
60
- cleanupElements(elmsToUpdate);
61
- },
62
- reset: () => {
63
- elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));
64
- cleanupElements(elmsToUpdate);
65
- },
66
- };
67
- };
68
-
69
- const unwrap = (val) => (typeof val === 'function' ? val() : val);
70
- const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {
71
- const unwrappedState = unwrap(defaultState);
72
- let states = new Map(Object.entries(unwrappedState !== null && unwrappedState !== void 0 ? unwrappedState : {}));
73
- const handlers = {
74
- dispose: [],
75
- get: [],
76
- set: [],
77
- reset: [],
78
- };
79
- const reset = () => {
80
- var _a;
81
- // When resetting the state, the default state may be a function - unwrap it to invoke it.
82
- // otherwise, the state won't be properly reset
83
- states = new Map(Object.entries((_a = unwrap(defaultState)) !== null && _a !== void 0 ? _a : {}));
84
- handlers.reset.forEach((cb) => cb());
85
- };
86
- const dispose = () => {
87
- // Call first dispose as resetting the state would
88
- // cause less updates ;)
89
- handlers.dispose.forEach((cb) => cb());
90
- reset();
91
- };
92
- const get = (propName) => {
93
- handlers.get.forEach((cb) => cb(propName));
94
- return states.get(propName);
95
- };
96
- const set = (propName, value) => {
97
- const oldValue = states.get(propName);
98
- if (shouldUpdate(value, oldValue, propName)) {
99
- states.set(propName, value);
100
- handlers.set.forEach((cb) => cb(propName, value, oldValue));
101
- }
102
- };
103
- const state = (typeof Proxy === 'undefined'
104
- ? {}
105
- : new Proxy(unwrappedState, {
106
- get(_, propName) {
107
- return get(propName);
108
- },
109
- ownKeys(_) {
110
- return Array.from(states.keys());
111
- },
112
- getOwnPropertyDescriptor() {
113
- return {
114
- enumerable: true,
115
- configurable: true,
116
- };
117
- },
118
- has(_, propName) {
119
- return states.has(propName);
120
- },
121
- set(_, propName, value) {
122
- set(propName, value);
123
- return true;
124
- },
125
- }));
126
- const on = (eventName, callback) => {
127
- handlers[eventName].push(callback);
128
- return () => {
129
- removeFromArray(handlers[eventName], callback);
130
- };
131
- };
132
- const onChange = (propName, cb) => {
133
- const unSet = on('set', (key, newValue) => {
134
- if (key === propName) {
135
- cb(newValue);
136
- }
137
- });
138
- // We need to unwrap the defaultState because it might be a function.
139
- // Otherwise we might not be sending the right reset value.
140
- const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));
141
- return () => {
142
- unSet();
143
- unReset();
144
- };
145
- };
146
- const use = (...subscriptions) => {
147
- const unsubs = subscriptions.reduce((unsubs, subscription) => {
148
- if (subscription.set) {
149
- unsubs.push(on('set', subscription.set));
150
- }
151
- if (subscription.get) {
152
- unsubs.push(on('get', subscription.get));
153
- }
154
- if (subscription.reset) {
155
- unsubs.push(on('reset', subscription.reset));
156
- }
157
- if (subscription.dispose) {
158
- unsubs.push(on('dispose', subscription.dispose));
159
- }
160
- return unsubs;
161
- }, []);
162
- return () => unsubs.forEach((unsub) => unsub());
163
- };
164
- const forceUpdate = (key) => {
165
- const oldValue = states.get(key);
166
- handlers.set.forEach((cb) => cb(key, oldValue, oldValue));
167
- };
168
- return {
169
- state,
170
- get,
171
- set,
172
- on,
173
- onChange,
174
- use,
175
- dispose,
176
- reset,
177
- forceUpdate,
178
- };
179
- };
180
- const removeFromArray = (array, item) => {
181
- const index = array.indexOf(item);
182
- if (index >= 0) {
183
- array[index] = array[array.length - 1];
184
- array.length--;
185
- }
186
- };
187
-
188
- const createStore = (defaultState, shouldUpdate) => {
189
- const map = createObservableMap(defaultState, shouldUpdate);
190
- map.use(stencilSubscription());
191
- return map;
192
- };
1
+ import { c as createStore } from './index11.js';
193
2
 
194
3
  const store = createStore({
195
4
  isLoggedIn: false,
@@ -197,6 +6,6 @@ const store = createStore({
197
6
  profile: null
198
7
  });
199
8
 
200
- export { createStore as c, store as s };
9
+ export { store as s };
201
10
 
202
11
  //# sourceMappingURL=session.js.map
@@ -1 +1 @@
1
- {"file":"session.js","mappings":";;AAEA,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,KAAK;AAC9C,IAAI,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACpC,IAAI,IAAI,CAAC,KAAK,EAAE;AAChB,QAAQ,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;AACnC,KAAK;AACL,SAAS,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;AACrC,QAAQ,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC1B,KAAK;AACL,CAAC,CAAC;AACF,MAAM,QAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,KAAK;AAC7B,IAAI,IAAI,SAAS,CAAC;AAClB,IAAI,OAAO,CAAC,GAAG,IAAI,KAAK;AACxB,QAAQ,IAAI,SAAS,EAAE;AACvB,YAAY,YAAY,CAAC,SAAS,CAAC,CAAC;AACpC,SAAS;AACT,QAAQ,SAAS,GAAG,UAAU,CAAC,MAAM;AACrC,YAAY,SAAS,GAAG,CAAC,CAAC;AAC1B,YAAY,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC;AACxB,SAAS,EAAE,EAAE,CAAC,CAAC;AACf,KAAK,CAAC;AACN,CAAC,CAAC;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,WAAW,GAAG,CAAC,YAAY,KAAK,EAAE,aAAa,IAAI,YAAY,CAAC,IAAI,YAAY,CAAC,WAAW,CAAC;AACnG,MAAM,eAAe,GAAG,QAAQ,CAAC,CAAC,GAAG,KAAK;AAC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F,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,IAAI,KAAK;AACzC,IAAI,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AACtC,IAAI,IAAI,KAAK,IAAI,CAAC,EAAE;AACpB,QAAQ,KAAK,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAC/C,QAAQ,KAAK,CAAC,MAAM,EAAE,CAAC;AACvB,KAAK;AACL,CAAC,CAAC;AACF;AACK,MAAC,WAAW,GAAG,CAAC,YAAY,EAAE,YAAY,KAAK;AACpD,IAAI,MAAM,GAAG,GAAG,mBAAmB,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;AAChE,IAAI,GAAG,CAAC,GAAG,CAAC,mBAAmB,EAAE,CAAC,CAAC;AACnC,IAAI,OAAO,GAAG,CAAC;AACf;;MC5LM,KAAK,GAAG,WAAW,CAAC;IACxB,UAAU,EAAE,KAAK;IACjB,KAAK,EAAE,EAAE;IACT,OAAO,EAAE,IAAoB;CAC9B;;;;","names":[],"sources":["../node_modules/@stencil/store/dist/index.mjs","src/store/session.ts"],"sourcesContent":["import { getRenderingRef, forceUpdate } from '@stencil/core';\n\nconst appendToMap = (map, propName, value) => {\n const items = map.get(propName);\n if (!items) {\n map.set(propName, [value]);\n }\n else if (!items.includes(value)) {\n items.push(value);\n }\n};\nconst debounce = (fn, ms) => {\n let timeoutId;\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n timeoutId = 0;\n fn(...args);\n }, ms);\n };\n};\n\n/**\n * Check if a possible element isConnected.\n * The property might not be there, so we check for it.\n *\n * We want it to return true if isConnected is not a property,\n * otherwise we would remove these elements and would not update.\n *\n * Better leak in Edge than to be useless.\n */\nconst isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;\nconst cleanupElements = debounce((map) => {\n for (let key of map.keys()) {\n map.set(key, map.get(key).filter(isConnected));\n }\n}, 2000);\nconst stencilSubscription = () => {\n if (typeof getRenderingRef !== 'function') {\n // If we are not in a stencil project, we do nothing.\n // This function is not really exported by @stencil/core.\n return {};\n }\n const elmsToUpdate = new Map();\n return {\n dispose: () => elmsToUpdate.clear(),\n get: (propName) => {\n const elm = getRenderingRef();\n if (elm) {\n appendToMap(elmsToUpdate, propName, elm);\n }\n },\n set: (propName) => {\n const elements = elmsToUpdate.get(propName);\n if (elements) {\n elmsToUpdate.set(propName, elements.filter(forceUpdate));\n }\n cleanupElements(elmsToUpdate);\n },\n reset: () => {\n elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));\n cleanupElements(elmsToUpdate);\n },\n };\n};\n\nconst unwrap = (val) => (typeof val === 'function' ? val() : val);\nconst createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {\n const unwrappedState = unwrap(defaultState);\n let states = new Map(Object.entries(unwrappedState !== null && unwrappedState !== void 0 ? unwrappedState : {}));\n const handlers = {\n dispose: [],\n get: [],\n set: [],\n reset: [],\n };\n const reset = () => {\n var _a;\n // When resetting the state, the default state may be a function - unwrap it to invoke it.\n // otherwise, the state won't be properly reset\n states = new Map(Object.entries((_a = unwrap(defaultState)) !== null && _a !== void 0 ? _a : {}));\n handlers.reset.forEach((cb) => cb());\n };\n const dispose = () => {\n // Call first dispose as resetting the state would\n // cause less updates ;)\n handlers.dispose.forEach((cb) => cb());\n reset();\n };\n const get = (propName) => {\n handlers.get.forEach((cb) => cb(propName));\n return states.get(propName);\n };\n const set = (propName, value) => {\n const oldValue = states.get(propName);\n if (shouldUpdate(value, oldValue, propName)) {\n states.set(propName, value);\n handlers.set.forEach((cb) => cb(propName, value, oldValue));\n }\n };\n const state = (typeof Proxy === 'undefined'\n ? {}\n : new Proxy(unwrappedState, {\n get(_, propName) {\n return get(propName);\n },\n ownKeys(_) {\n return Array.from(states.keys());\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n has(_, propName) {\n return states.has(propName);\n },\n set(_, propName, value) {\n set(propName, value);\n return true;\n },\n }));\n const on = (eventName, callback) => {\n handlers[eventName].push(callback);\n return () => {\n removeFromArray(handlers[eventName], callback);\n };\n };\n const onChange = (propName, cb) => {\n const unSet = on('set', (key, newValue) => {\n if (key === propName) {\n cb(newValue);\n }\n });\n // We need to unwrap the defaultState because it might be a function.\n // Otherwise we might not be sending the right reset value.\n const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));\n return () => {\n unSet();\n unReset();\n };\n };\n const use = (...subscriptions) => {\n const unsubs = subscriptions.reduce((unsubs, subscription) => {\n if (subscription.set) {\n unsubs.push(on('set', subscription.set));\n }\n if (subscription.get) {\n unsubs.push(on('get', subscription.get));\n }\n if (subscription.reset) {\n unsubs.push(on('reset', subscription.reset));\n }\n if (subscription.dispose) {\n unsubs.push(on('dispose', subscription.dispose));\n }\n return unsubs;\n }, []);\n return () => unsubs.forEach((unsub) => unsub());\n };\n const forceUpdate = (key) => {\n const oldValue = states.get(key);\n handlers.set.forEach((cb) => cb(key, oldValue, oldValue));\n };\n return {\n state,\n get,\n set,\n on,\n onChange,\n use,\n dispose,\n reset,\n forceUpdate,\n };\n};\nconst removeFromArray = (array, item) => {\n const index = array.indexOf(item);\n if (index >= 0) {\n array[index] = array[array.length - 1];\n array.length--;\n }\n};\n\nconst createStore = (defaultState, shouldUpdate) => {\n const map = createObservableMap(defaultState, shouldUpdate);\n map.use(stencilSubscription());\n return map;\n};\n\nexport { createObservableMap, createStore };\n","import { WebIdProfile } from '@pod-os/core';\nimport { createStore } from '@stencil/store';\n\nconst store = createStore({\n isLoggedIn: false,\n webId: '',\n profile: null as WebIdProfile\n});\n\nexport default store;\n"],"version":3}
1
+ {"file":"session.js","mappings":";;MAGM,KAAK,GAAG,WAAW,CAAC;IACxB,UAAU,EAAE,KAAK;IACjB,KAAK,EAAE,EAAE;IACT,OAAO,EAAE,IAAoB;CAC9B;;;;","names":[],"sources":["src/store/session.ts"],"sourcesContent":["import { WebIdProfile } from '@pod-os/core';\nimport { createStore } from '@stencil/store';\n\nconst store = createStore({\n isLoggedIn: false,\n webId: '',\n profile: null as WebIdProfile\n});\n\nexport default store;\n"],"version":3}
@@ -0,0 +1,29 @@
1
+ import { c as createStore } from './index11.js';
2
+
3
+ const storedSettings = localStorage.getItem('settings');
4
+ const initialSettings = storedSettings
5
+ ? JSON.parse(storedSettings)
6
+ : {
7
+ offlineCache: false,
8
+ };
9
+ const localSettings = createStore(initialSettings);
10
+ persistChanges();
11
+ syncChangesAcrossTabs();
12
+ function persistChanges() {
13
+ localSettings.on('set', () => {
14
+ const snapshot = JSON.stringify(localSettings.state);
15
+ localStorage.setItem('settings', snapshot);
16
+ });
17
+ }
18
+ function syncChangesAcrossTabs() {
19
+ window.addEventListener('storage', event => {
20
+ if (event.key === 'settings' && event.newValue) {
21
+ const newSettings = JSON.parse(event.newValue);
22
+ localSettings.state.offlineCache = newSettings.offlineCache;
23
+ }
24
+ });
25
+ }
26
+
27
+ export { localSettings as l };
28
+
29
+ //# sourceMappingURL=settings.js.map
@@ -0,0 +1 @@
1
+ {"file":"settings.js","mappings":";;AAMA,MAAM,cAAc,GAAG,YAAY,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AACxD,MAAM,eAAe,GAAG,cAAc;MAClC,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC;MAC1B;QACE,YAAY,EAAE,KAAK;KACpB,CAAC;MAEO,aAAa,GAAG,WAAW,CAAgB,eAAe,EAAE;AAEzE,cAAc,EAAE,CAAC;AACjB,qBAAqB,EAAE,CAAC;AAExB,SAAS,cAAc;IACrB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE;QACtB,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QACrD,YAAY,CAAC,OAAO,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;KAC5C,CAAC,CAAC;AACL,CAAC;AACD,SAAS,qBAAqB;IAC5B,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,KAAK;QACtC,IAAI,KAAK,CAAC,GAAG,KAAK,UAAU,IAAI,KAAK,CAAC,QAAQ,EAAE;YAC9C,MAAM,WAAW,GAAkB,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;YAC9D,aAAa,CAAC,KAAK,CAAC,YAAY,GAAG,WAAW,CAAC,YAAY,CAAC;SAC7D;KACF,CAAC,CAAC;AACL;;;;","names":[],"sources":["src/store/settings.ts"],"sourcesContent":["import { createStore } from '@stencil/store';\n\nexport interface LocalSettings {\n offlineCache: boolean;\n}\n\nconst storedSettings = localStorage.getItem('settings');\nconst initialSettings = storedSettings\n ? JSON.parse(storedSettings)\n : {\n offlineCache: false,\n };\n\nexport const localSettings = createStore<LocalSettings>(initialSettings);\n\npersistChanges();\nsyncChangesAcrossTabs();\n\nfunction persistChanges() {\n localSettings.on('set', () => {\n const snapshot = JSON.stringify(localSettings.state);\n localStorage.setItem('settings', snapshot);\n });\n}\nfunction syncChangesAcrossTabs() {\n window.addEventListener('storage', event => {\n if (event.key === 'settings' && event.newValue) {\n const newSettings: LocalSettings = JSON.parse(event.newValue);\n localSettings.state.offlineCache = newSettings.offlineCache;\n }\n });\n}\n"],"version":3}