@eodash/eodash 5.0.0-alpha.2.5 → 5.0.0-alpha.2.7

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 (83) hide show
  1. package/README.md +19 -5
  2. package/core/client/App.vue +6 -7
  3. package/core/client/SuspensedDashboard.ce.vue +58 -40
  4. package/core/client/asWebComponent.d.ts +10 -5
  5. package/core/client/asWebComponent.js +6 -6
  6. package/core/client/components/DashboardLayout.vue +35 -16
  7. package/core/client/components/DynamicWebComponent.vue +44 -44
  8. package/core/client/components/ErrorAlert.vue +19 -7
  9. package/core/client/components/Footer.vue +28 -14
  10. package/core/client/components/Header.vue +4 -4
  11. package/core/client/components/IframeWrapper.vue +3 -3
  12. package/core/client/components/Loading.vue +17 -18
  13. package/core/client/components/MobileLayout.vue +48 -26
  14. package/core/client/composables/DefineEodash.js +38 -29
  15. package/core/client/composables/DefineWidgets.js +101 -81
  16. package/core/client/composables/index.js +43 -29
  17. package/core/client/eodash.js +59 -41
  18. package/core/client/main.js +2 -2
  19. package/core/client/plugins/index.js +9 -10
  20. package/core/client/plugins/vuetify.js +9 -10
  21. package/core/client/render.js +4 -5
  22. package/core/client/store/Actions.js +8 -0
  23. package/core/client/store/States.js +8 -13
  24. package/core/client/store/index.js +14 -11
  25. package/core/client/store/stac.js +51 -37
  26. package/core/client/types.d.ts +173 -200
  27. package/core/client/utils/eodashSTAC.js +130 -49
  28. package/core/client/utils/helpers.js +18 -20
  29. package/core/client/utils/index.js +29 -10
  30. package/core/client/utils/keys.js +2 -2
  31. package/core/client/views/Dashboard.vue +53 -36
  32. package/core/client/vite-env.d.ts +19 -17
  33. package/dist/client/{DashboardLayout-BYROtP-7.js → DashboardLayout-Cbci3g7o.js} +9 -9
  34. package/dist/client/{DynamicWebComponent-BQhxFPM0.js → DynamicWebComponent-DzmQ3Fr3.js} +3 -3
  35. package/dist/client/EodashDatePicker-SP5bYISd.js +252 -0
  36. package/dist/client/{EodashItemFilter-DIBDAHcc.js → EodashItemFilter-B9Tf2TBw.js} +4 -6
  37. package/dist/client/{EodashMap-C6jJ2Lb_.js → EodashMap-D_znzmX7.js} +13131 -14490
  38. package/dist/client/EodashMapBtns-BOKugQ88.js +37 -0
  39. package/dist/client/ExportState-D7m9s4T8.js +558 -0
  40. package/dist/client/{Footer-BVIZms1S.js → Footer-C2uV1-zu.js} +12 -12
  41. package/dist/client/Header-C2ROtxo_.js +350 -0
  42. package/dist/client/{IframeWrapper-XKChM78a.js → IframeWrapper-Wwou4pwf.js} +1 -1
  43. package/dist/client/{MobileLayout-BlGcMQra.js → MobileLayout-DR27Ctiz.js} +45 -57
  44. package/dist/client/PopUp-bPGAY43o.js +300 -0
  45. package/dist/client/VImg-swqiqth2.js +291 -0
  46. package/dist/client/{VMain-C9XV5Lyg.js → VMain-Bu1bPjvK.js} +2 -2
  47. package/dist/client/VOverlay-D_MKJ4vQ.js +967 -0
  48. package/dist/client/{WidgetsContainer-BQXHnZpa.js → WidgetsContainer-CpxYT8YI.js} +10 -3
  49. package/dist/client/{asWebComponent-CbdGxelK.js → asWebComponent-DeaU3QoK.js} +6332 -6159
  50. package/dist/client/{basedecoder-Qm25PwVp-CHo5Pomv.js → basedecoder-DHcBySSe-BmCFNFnw.js} +5 -6
  51. package/dist/client/{decoder-HRvnjnEI-CHAYOWhz.js → decoder-CP4lv0Kb-nokx54iM.js} +1 -1
  52. package/dist/client/deflate-BXt-9JA_-CWfClgpK.js +10 -0
  53. package/dist/client/eo-dash.js +2 -2
  54. package/dist/client/eodashSTAC-CFQuZ_cI.js +2788 -0
  55. package/dist/client/{eox-itemfilter-DcQkRD2l.js → eox-itemfilter-TaBxgqq_.js} +1002 -974
  56. package/dist/client/{eox-map-C3DL31fp.js → eox-map-L7abwKTR.js} +5677 -5695
  57. package/dist/client/{forwardRefs-CyCJOFsz.js → forwardRefs-D0a135Tc.js} +43 -50
  58. package/dist/client/{index-CabQjjQg.js → index-CoqcWt6E.js} +4 -4
  59. package/dist/client/{jpeg-DNfUpLwy-Fjan-04T.js → jpeg-BAgeD1d3-oeHbFPUL.js} +5 -6
  60. package/dist/client/{lerc-_E46UbWQ-TxBH4OeK.js → lerc-DzVumYtB-B3rx9xzz.js} +5 -7
  61. package/dist/client/{lzw-BOMhmEDy-Dboc93VO.js → lzw-LAGDNbSC-DkP96qO9.js} +1 -1
  62. package/dist/client/{packbits-DaUD6MLm-Bu1PoTGa.js → packbits-BlDR4Kj5-C66n1-zr.js} +1 -1
  63. package/dist/client/{pako.esm-C3kYPGGQ-BMki8cQY.js → pako.esm-CB1uQYY0-DB0PYm1P.js} +6 -12
  64. package/dist/client/{raw-CcGKjn8q-DFOt-i8n.js → raw-CMGvRjfu-BRi6E4i1.js} +1 -1
  65. package/dist/client/{ssrBoot-DWJ-z4I-.js → ssrBoot-C-inWOiD.js} +1 -1
  66. package/dist/client/style.css +2 -2
  67. package/dist/client/{transition-BlLt41wg.js → transition-C8le0YwQ.js} +3 -3
  68. package/dist/client/{webfontloader-CyOFAuFB.js → webfontloader-qotgY98I.js} +56 -92
  69. package/dist/client/{webimage-D2c098k3-DLj1LQxB.js → webimage-BM_pbLN3-L2cGWK5l.js} +1 -1
  70. package/dist/node/cli.js +1 -1
  71. package/dist/node/types.d.ts +32 -38
  72. package/package.json +12 -12
  73. package/widgets/EodashDatePicker.vue +94 -43
  74. package/widgets/EodashItemFilter.vue +13 -10
  75. package/widgets/EodashMap.vue +87 -20
  76. package/widgets/EodashMapBtns.vue +34 -0
  77. package/widgets/ExportState.vue +112 -0
  78. package/widgets/PopUp.vue +40 -0
  79. package/widgets/WidgetsContainer.vue +45 -27
  80. package/dist/client/EodashDatePicker-CFltnt5d.js +0 -1194
  81. package/dist/client/Header-TsTL1d2R.js +0 -633
  82. package/dist/client/deflate-Be2Arps5-hDqMz3RA.js +0 -10
  83. package/dist/client/http-ZWiLaAeR.js +0 -1337
@@ -1,4 +1,4 @@
1
- import { b6 as i, aZ as m, r as p, Z as d, b7 as f, $ as c, a6 as g, a0 as y, d as _, a4 as k } from "./asWebComponent-CbdGxelK.js";
1
+ import { bx as i, aA as m, r as p, Z as d, by as f, $ as c, a6 as g, a0 as y, d as _, a4 as k } from "./asWebComponent-DeaU3QoK.js";
2
2
  const h = { class: "d-flex flex-column fill-height overflow-auto" }, C = {
3
3
  __name: "DynamicWebComponent",
4
4
  props: {
@@ -21,7 +21,7 @@ const h = { class: "d-flex flex-column fill-height overflow-auto" }, C = {
21
21
  async setup(o) {
22
22
  let t, a;
23
23
  const e = (
24
- /** @type {import("@/types").WebComponentProps} */
24
+ /** @type {import("@/types").WebComponentProps} */
25
25
  o
26
26
  ), u = async () => typeof e.link == "string" ? await import(
27
27
  /* @vite-ignore */
@@ -38,7 +38,7 @@ const h = { class: "d-flex flex-column fill-height overflow-auto" }, C = {
38
38
  e.onMounted?.(r.value, s);
39
39
  }), f(() => {
40
40
  e.onUnmounted?.(r.value, s);
41
- }), (n, w) => (c(), g("span", h, [
41
+ }), (n, b) => (c(), g("span", h, [
42
42
  (c(), y(
43
43
  k(o.tagName),
44
44
  _(o.properties, {
@@ -0,0 +1,252 @@
1
+ import { p as B, o as $, g as j, y as _, av as I, c as v, r as V, d as w, a as M, b as p, aw as R, ax as O, T as U, ay as F, x as N, Z as Y, az as H, aA as z, w as G, $ as h, a6 as W, a1 as y, a3 as C, aB as K, F as L, W as Z, a9 as k, aC as q, aD as J, t as S, a0 as T, M as D, aE as Q, V as P, aF as X, aG as x } from "./asWebComponent-DeaU3QoK.js";
2
+ import { t as tt, e as et } from "./eodashSTAC-CFQuZ_cI.js";
3
+ import { m as at, V as E } from "./VOverlay-D_MKJ4vQ.js";
4
+ import { b as ot, f as nt } from "./forwardRefs-D0a135Tc.js";
5
+ const st = B({
6
+ id: String,
7
+ text: String,
8
+ ...$(at({
9
+ closeOnBack: !1,
10
+ location: "end",
11
+ locationStrategy: "connected",
12
+ eager: !0,
13
+ minWidth: 0,
14
+ offset: 10,
15
+ openOnClick: !1,
16
+ openOnHover: !0,
17
+ origin: "auto",
18
+ scrim: !1,
19
+ scrollStrategy: "reposition",
20
+ transition: !1
21
+ }), ["absolute", "persistent"])
22
+ }, "VTooltip"), rt = j()({
23
+ name: "VTooltip",
24
+ props: st(),
25
+ emits: {
26
+ "update:modelValue": (t) => !0
27
+ },
28
+ setup(t, r) {
29
+ let {
30
+ slots: i
31
+ } = r;
32
+ const o = _(t, "modelValue"), {
33
+ scopeId: n
34
+ } = ot(), l = I(), e = v(() => t.id || `v-tooltip-${l}`), a = V(), s = v(() => t.location.split(" ").length > 1 ? t.location : t.location + " center"), c = v(() => t.origin === "auto" || t.origin === "overlap" || t.origin.split(" ").length > 1 || t.location.split(" ").length > 1 ? t.origin : t.origin + " center"), u = v(() => t.transition ? t.transition : o.value ? "scale-transition" : "fade-transition"), f = v(() => w({
35
+ "aria-describedby": e.value
36
+ }, t.activatorProps));
37
+ return M(() => {
38
+ const b = E.filterProps(t);
39
+ return p(E, w({
40
+ ref: a,
41
+ class: ["v-tooltip", t.class],
42
+ style: t.style,
43
+ id: e.value
44
+ }, b, {
45
+ modelValue: o.value,
46
+ "onUpdate:modelValue": (m) => o.value = m,
47
+ transition: u.value,
48
+ absolute: !0,
49
+ location: s.value,
50
+ origin: c.value,
51
+ persistent: !0,
52
+ role: "tooltip",
53
+ activatorProps: f.value,
54
+ _disableGlobalStack: !0
55
+ }, n), {
56
+ activator: i.activator,
57
+ default: function() {
58
+ for (var m = arguments.length, d = new Array(m), g = 0; g < m; g++)
59
+ d[g] = arguments[g];
60
+ return i.default?.(...d) ?? t.text;
61
+ }
62
+ });
63
+ }), nt({}, a);
64
+ }
65
+ });
66
+ function it(t, r) {
67
+ const i = typeof t == "string" ? R(t) : t, o = lt(i, r);
68
+ return {
69
+ mounted: o,
70
+ updated: o,
71
+ unmounted(n) {
72
+ O(null, n);
73
+ }
74
+ };
75
+ }
76
+ function lt(t, r) {
77
+ return function(i, o, n) {
78
+ const l = typeof r == "function" ? r(o) : r, e = o.value?.text ?? o.value ?? l?.text, a = U(o.value) ? o.value : {}, s = () => e ?? i.innerHTML, c = (n.ctx === o.instance.$ ? ct(n, o.instance.$)?.provides : n.ctx?.provides) ?? o.instance.$.provides, u = F(t, w(l, a), s);
79
+ u.appContext = Object.assign(/* @__PURE__ */ Object.create(null), o.instance.$.appContext, {
80
+ provides: c
81
+ }), O(u, i);
82
+ };
83
+ }
84
+ function ct(t, r) {
85
+ const i = /* @__PURE__ */ new Set(), o = (l) => {
86
+ for (const e of l) {
87
+ if (!e) continue;
88
+ if (e === t)
89
+ return !0;
90
+ i.add(e);
91
+ let a;
92
+ if (e.suspense ? a = o([e.ssContent]) : Array.isArray(e.children) ? a = o(e.children) : e.component?.vnode && (a = o([e.component?.subTree])), a)
93
+ return a;
94
+ i.delete(e);
95
+ }
96
+ return !1;
97
+ };
98
+ if (!o([r.subTree]))
99
+ throw new Error("Could not find original vnode");
100
+ const n = Array.from(i).reverse();
101
+ for (const l of n)
102
+ if (l.component)
103
+ return l.component;
104
+ return r;
105
+ }
106
+ const A = it(rt, (t) => ({
107
+ activator: "parent",
108
+ location: t.arg?.replace("-", " ") ?? "top",
109
+ text: typeof t.value == "boolean" ? void 0 : t.value
110
+ })), ut = {
111
+ class: "flex rounded-lg border border-gray-300 dark:border-gray-600",
112
+ style: { margin: "2px" }
113
+ }, dt = ["value"], gt = {
114
+ __name: "EodashDatePicker",
115
+ setup(t) {
116
+ function r(e) {
117
+ if (n.value && n.value.length > 0) {
118
+ let a = e ? 1 / 0 : -1 / 0;
119
+ n.value.forEach((s) => {
120
+ s?.dates && s.dates.forEach((c) => {
121
+ c instanceof Date && (!e && c.getTime() > a || e && c.getTime() < a) && (a = c.getTime());
122
+ });
123
+ }), a !== 0 && (l.value = new Date(a));
124
+ }
125
+ }
126
+ const i = (
127
+ /** @type {import("@/types").Eodash} */
128
+ N(Z)
129
+ ), o = V({
130
+ input: "YYYY-MM-DD"
131
+ }), n = V([]), l = v({
132
+ get() {
133
+ return x.value ? new Date(x.value) : /* @__PURE__ */ new Date();
134
+ },
135
+ /** @param {Date | string} updatedDate */
136
+ set(e) {
137
+ e instanceof Date && !isNaN(e.getTime()) ? x.value = new Date(
138
+ e.getTime() - e.getTimezoneOffset() * 6e4
139
+ ).toISOString() : x.value = (/* @__PURE__ */ new Date()).toISOString();
140
+ }
141
+ });
142
+ return Y(() => {
143
+ const { selectedStac: e } = H(z());
144
+ G(
145
+ [e],
146
+ async ([a]) => {
147
+ if (a) {
148
+ const s = tt(
149
+ `./${a.id}/collection.json`,
150
+ i.stacEndpoint
151
+ ), c = et(
152
+ e.value,
153
+ s
154
+ ), u = [
155
+ "#009E73",
156
+ "#0072B2",
157
+ "#E69F00",
158
+ "#CC79A7",
159
+ "#56B4E9",
160
+ "#D55E00"
161
+ ];
162
+ for (let f = 0; f < c.length; f++) {
163
+ const m = (await (await fetch(c[f])).json()).links.filter(
164
+ (d) => d.rel === "item" && "datetime" in d
165
+ ).map(
166
+ (d) => new Date(d.datetime)
167
+ );
168
+ n.value = [
169
+ {
170
+ bar: {
171
+ style: {
172
+ backgroundColor: u[f % u.length]
173
+ }
174
+ },
175
+ dates: m
176
+ }
177
+ ];
178
+ }
179
+ }
180
+ },
181
+ { immediate: !0 }
182
+ );
183
+ }), (e, a) => (h(), W(
184
+ L,
185
+ null,
186
+ [
187
+ p(C(J), {
188
+ modelValue: l.value,
189
+ "onUpdate:modelValue": a[0] || (a[0] = (s) => l.value = s),
190
+ masks: o.value,
191
+ attributes: n.value
192
+ }, {
193
+ default: y(({ inputValue: s, inputEvents: c }) => [
194
+ k("div", ut, [
195
+ k("input", w({ value: s }, q(c, !0), {
196
+ style: { margin: "1px" },
197
+ class: "flex-grow px-1 py-1 bg-white dark:bg-gray-700"
198
+ }), null, 16, dt)
199
+ ])
200
+ ]),
201
+ _: 1
202
+ /* STABLE */
203
+ }, 8, ["modelValue", "masks", "attributes"]),
204
+ p(K, {
205
+ align: "center",
206
+ justify: "center",
207
+ style: { "margin-top": "6px" }
208
+ }, {
209
+ default: y(() => [
210
+ S((h(), T(P, {
211
+ style: { padding: "0px", "margin-right": "4px" },
212
+ density: "compact",
213
+ onClick: a[1] || (a[1] = (s) => r(!0))
214
+ }, {
215
+ default: y(() => [
216
+ p(D, {
217
+ icon: [C(Q)]
218
+ }, null, 8, ["icon"])
219
+ ]),
220
+ _: 1
221
+ /* STABLE */
222
+ })), [
223
+ [A, "Set date to oldest available dataset", "bottom"]
224
+ ]),
225
+ S((h(), T(P, {
226
+ style: { padding: "0px", "margin-left": "4px" },
227
+ density: "compact",
228
+ onClick: a[2] || (a[2] = (s) => r(!1))
229
+ }, {
230
+ default: y(() => [
231
+ p(D, {
232
+ icon: [C(X)]
233
+ }, null, 8, ["icon"])
234
+ ]),
235
+ _: 1
236
+ /* STABLE */
237
+ })), [
238
+ [A, "Set date to latest available dataset", "bottom"]
239
+ ])
240
+ ]),
241
+ _: 1
242
+ /* STABLE */
243
+ })
244
+ ],
245
+ 64
246
+ /* STABLE_FRAGMENT */
247
+ ));
248
+ }
249
+ };
250
+ export {
251
+ gt as default
252
+ };
@@ -1,9 +1,9 @@
1
- import { $ as p, a0 as c } from "./asWebComponent-CbdGxelK.js";
2
- import m from "./DynamicWebComponent-BQhxFPM0.js";
1
+ import { $ as p, a0 as c } from "./asWebComponent-DeaU3QoK.js";
2
+ import m from "./DynamicWebComponent-DzmQ3Fr3.js";
3
3
  const f = {
4
4
  __name: "EodashItemFilter",
5
5
  setup(d) {
6
- const r = () => import("./eox-itemfilter-DcQkRD2l.js"), o = {
6
+ const r = () => import("./eox-itemfilter-TaBxgqq_.js"), o = {
7
7
  config: {
8
8
  titleProperty: "title",
9
9
  filterProperties: [
@@ -45,9 +45,7 @@ const f = {
45
45
  n.setAttribute("slot", "resultstitle"), t.appendChild(n), t.apply(
46
46
  // Only list child elements in list
47
47
  i.stac?.filter((e) => e.rel === "child")
48
- ), t.config.onSelect = /**
49
- * @param {Item} item
50
- * */
48
+ ), t.config.onSelect = /** @param {Item} item */
51
49
  async (e) => {
52
50
  console.log(e), await i.loadSelectedSTAC(e.href);
53
51
  };