@eodash/eodash 5.0.0-alpha.2.16 → 5.0.0-alpha.2.18

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 (49) hide show
  1. package/core/client/App.vue +2 -0
  2. package/core/client/composables/EodashMap.js +207 -103
  3. package/core/client/composables/index.js +13 -2
  4. package/core/client/eodash.js +8 -3
  5. package/core/client/plugins/axios.js +8 -0
  6. package/core/client/plugins/index.js +2 -1
  7. package/core/client/store/Actions.js +2 -1
  8. package/core/client/store/States.js +4 -0
  9. package/core/client/store/stac.js +11 -8
  10. package/core/client/utils/createLayers.js +83 -46
  11. package/core/client/utils/eodashSTAC.js +69 -19
  12. package/core/client/utils/helpers.js +108 -35
  13. package/core/client/vite-env.d.ts +1 -0
  14. package/dist/client/{DashboardLayout-CCtyOil0.js → DashboardLayout-Dk6lzKZA.js} +2 -2
  15. package/dist/client/{DynamicWebComponent-But2r1Sj.js → DynamicWebComponent-BkMCGU7a.js} +2 -2
  16. package/dist/client/EodashDatePicker-D27wn0jP.js +276 -0
  17. package/dist/client/EodashItemFilter-DS1mOc2p.js +7651 -0
  18. package/dist/client/{EodashLayerControl-BhZL4pYM.js → EodashLayerControl-BqGA6jbV.js} +5604 -5428
  19. package/dist/client/{EodashMap-C5tOgVOv.js → EodashMap-BnVrfBnA.js} +9083 -9032
  20. package/dist/client/{EodashMapBtns-CdDfVQj0.js → EodashMapBtns-rv-U1nI_.js} +2 -2
  21. package/dist/client/{ExportState-CKCCN_VI.js → ExportState-C3Z1ET5c.js} +138 -131
  22. package/dist/client/{Footer-B9yVgyzx.js → Footer-BBkNiqPm.js} +63 -63
  23. package/dist/client/{Header-CPIlUEOq.js → Header-BQKHLO5P.js} +70 -70
  24. package/dist/client/{IframeWrapper-DRw1kHJm.js → IframeWrapper-BX4e2uxq.js} +1 -1
  25. package/dist/client/{MobileLayout-CPxVee5U.js → MobileLayout-C2aqobN5.js} +43 -41
  26. package/dist/client/{PopUp-Dca-gx9a.js → PopUp-DG3zrW12.js} +15 -15
  27. package/dist/client/{VImg-PHLA1nP1.js → VImg-BLpHACcB.js} +33 -31
  28. package/dist/client/VMain-DOyRcpub.js +38 -0
  29. package/dist/client/VOverlay-DAiInZQP.js +973 -0
  30. package/dist/client/{WidgetsContainer-jxk3kw-d.js → WidgetsContainer-BqoX7R5Z.js} +3 -3
  31. package/dist/client/{asWebComponent-3OsFQJVx.js → asWebComponent-tNU8_fkz.js} +10199 -9314
  32. package/dist/client/eo-dash.js +1 -1
  33. package/dist/client/{forwardRefs-BxZaq9ml.js → forwardRefs-BexjzXbg.js} +1 -1
  34. package/dist/client/{index-Vul961Xy.js → index-F73os72i.js} +23 -23
  35. package/dist/client/{lerc-B4lXefGh-BESXOHWk.js → lerc-B4lXefGh-DhdntrgS.js} +1 -1
  36. package/dist/client/{ssrBoot-BFMBrCqY.js → ssrBoot-C71RpKe4.js} +1 -1
  37. package/dist/client/style.css +2 -2
  38. package/dist/client/{transition-U5aFjJtV.js → transition-DNdd2Y-1.js} +1 -1
  39. package/dist/client/{webfontloader-D_JbBwHu.js → webfontloader-C7dpDL7m.js} +1 -1
  40. package/dist/node/cli.js +1 -1
  41. package/package.json +26 -24
  42. package/widgets/EodashDatePicker.vue +112 -88
  43. package/widgets/EodashLayerControl.vue +3 -1
  44. package/widgets/EodashMap.vue +62 -54
  45. package/widgets/ExportState.vue +4 -2
  46. package/dist/client/EodashDatePicker-jeYiWflv.js +0 -247
  47. package/dist/client/EodashItemFilter-BFlfWeE_.js +0 -10125
  48. package/dist/client/VMain-Ck81LJfb.js +0 -39
  49. package/dist/client/VOverlay-CL4hiJB8.js +0 -972
@@ -7,6 +7,7 @@ declare module "*.vue" {
7
7
  }
8
8
  declare interface Window {
9
9
  eodashStore: import("@/types").EodashStore;
10
+ setEodashLoglevel: typeof import("loglevel").setLevel;
10
11
  }
11
12
  declare module "@eox/stacinfo" {
12
13
  export const EOxStacInfo: CustomElementConstructor;
@@ -1,5 +1,5 @@
1
- import { _ as y, x as m, W as x, X as d, $ as t, a0 as r, a1 as l, a9 as _, a3 as n, a6 as u, a2 as c, a4 as p, d as h, a5 as g, F as f, a7 as v, ab as w } from "./asWebComponent-3OsFQJVx.js";
2
- import { V as k } from "./VMain-Ck81LJfb.js";
1
+ import { _ as y, x as m, W as x, X as d, $ as t, a0 as r, a1 as l, a9 as _, a3 as n, a6 as u, a2 as c, a4 as p, d as h, a5 as g, F as f, a7 as v, ab as w } from "./asWebComponent-tNU8_fkz.js";
2
+ import { V as k } from "./VMain-DOyRcpub.js";
3
3
  class A extends HTMLElement {
4
4
  static get observedAttributes() {
5
5
  return ["gap"];
@@ -1,4 +1,4 @@
1
- import { bL as i, aC as m, r as p, Z as d, aO as f, $ as c, a6 as g, a0 as y, d as _, a4 as k } from "./asWebComponent-3OsFQJVx.js";
1
+ import { bM as i, aD as m, r as p, Z as d, aR as f, $ as c, a6 as g, a0 as y, d as _, a4 as k } from "./asWebComponent-tNU8_fkz.js";
2
2
  const h = { class: "d-flex flex-column fill-height overflow-auto" }, N = {
3
3
  __name: "DynamicWebComponent",
4
4
  props: {
@@ -38,7 +38,7 @@ const h = { class: "d-flex flex-column fill-height overflow-auto" }, N = {
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, x) => (c(), g("span", h, [
42
42
  (c(), y(
43
43
  k(o.tagName),
44
44
  _(o.properties, {
@@ -0,0 +1,276 @@
1
+ import { p as O, o as R, g as _, y as $, aw as F, c as f, r as I, d as x, a as H, b as p, ax as j, ay as B, T as L, az as Y, aA as U, aB as z, aC as G, aD as N, w as J, $ as b, a6 as K, aE as W, a1 as m, a3 as k, aF as q, F as Q, aG as C, aH as S, a9 as y, aI as X, aJ as Z, t as V, a0 as T, M as P, aK as tt, V as M, aL as et, aM as h } from "./asWebComponent-tNU8_fkz.js";
2
+ import { m as at, V as A } from "./VOverlay-DAiInZQP.js";
3
+ import { b as nt, f as ot } from "./forwardRefs-BexjzXbg.js";
4
+ const st = O({
5
+ id: String,
6
+ text: String,
7
+ ...R(at({
8
+ closeOnBack: !1,
9
+ location: "end",
10
+ locationStrategy: "connected",
11
+ eager: !0,
12
+ minWidth: 0,
13
+ offset: 10,
14
+ openOnClick: !1,
15
+ openOnHover: !0,
16
+ origin: "auto",
17
+ scrim: !1,
18
+ scrollStrategy: "reposition",
19
+ transition: !1
20
+ }), ["absolute", "persistent"])
21
+ }, "VTooltip"), rt = _()({
22
+ name: "VTooltip",
23
+ props: st(),
24
+ emits: {
25
+ "update:modelValue": (t) => !0
26
+ },
27
+ setup(t, r) {
28
+ let {
29
+ slots: i
30
+ } = r;
31
+ const e = $(t, "modelValue"), {
32
+ scopeId: c
33
+ } = nt(), l = F(), n = f(() => t.id || `v-tooltip-${l}`), a = I(), o = f(() => t.location.split(" ").length > 1 ? t.location : t.location + " center"), s = f(() => t.origin === "auto" || t.origin === "overlap" || t.origin.split(" ").length > 1 || t.location.split(" ").length > 1 ? t.origin : t.origin + " center"), u = f(() => t.transition ? t.transition : e.value ? "scale-transition" : "fade-transition"), g = f(() => x({
34
+ "aria-describedby": n.value
35
+ }, t.activatorProps));
36
+ return H(() => {
37
+ const w = A.filterProps(t);
38
+ return p(A, x({
39
+ ref: a,
40
+ class: ["v-tooltip", t.class],
41
+ style: t.style,
42
+ id: n.value
43
+ }, w, {
44
+ modelValue: e.value,
45
+ "onUpdate:modelValue": (d) => e.value = d,
46
+ transition: u.value,
47
+ absolute: !0,
48
+ location: o.value,
49
+ origin: s.value,
50
+ persistent: !0,
51
+ role: "tooltip",
52
+ activatorProps: g.value,
53
+ _disableGlobalStack: !0
54
+ }, c), {
55
+ activator: i.activator,
56
+ default: function() {
57
+ for (var d = arguments.length, D = new Array(d), v = 0; v < d; v++)
58
+ D[v] = arguments[v];
59
+ return i.default?.(...D) ?? t.text;
60
+ }
61
+ });
62
+ }), ot({}, a);
63
+ }
64
+ });
65
+ function it(t, r) {
66
+ const i = typeof t == "string" ? j(t) : t, e = lt(i, r);
67
+ return {
68
+ mounted: e,
69
+ updated: e,
70
+ unmounted(c) {
71
+ B(null, c);
72
+ }
73
+ };
74
+ }
75
+ function lt(t, r) {
76
+ return function(i, e, c) {
77
+ const l = typeof r == "function" ? r(e) : r, n = e.value?.text ?? e.value ?? l?.text, a = L(e.value) ? e.value : {}, o = () => n ?? i.innerHTML, s = (c.ctx === e.instance.$ ? ct(c, e.instance.$)?.provides : c.ctx?.provides) ?? e.instance.$.provides, u = Y(t, x(l, a), o);
78
+ u.appContext = Object.assign(/* @__PURE__ */ Object.create(null), e.instance.$.appContext, {
79
+ provides: s
80
+ }), B(u, i);
81
+ };
82
+ }
83
+ function ct(t, r) {
84
+ const i = /* @__PURE__ */ new Set(), e = (l) => {
85
+ for (const n of l) {
86
+ if (!n) continue;
87
+ if (n === t)
88
+ return !0;
89
+ i.add(n);
90
+ let a;
91
+ if (n.suspense ? a = e([n.ssContent]) : Array.isArray(n.children) ? a = e(n.children) : n.component?.vnode && (a = e([n.component?.subTree])), a)
92
+ return a;
93
+ i.delete(n);
94
+ }
95
+ return !1;
96
+ };
97
+ if (!e([r.subTree]))
98
+ throw new Error("Could not find original vnode");
99
+ const c = Array.from(i).reverse();
100
+ for (const l of c)
101
+ if (l.component)
102
+ return l.component;
103
+ return r;
104
+ }
105
+ const E = it(rt, (t) => ({
106
+ activator: "parent",
107
+ location: t.arg?.replace("-", " ") ?? "top",
108
+ text: typeof t.value == "boolean" ? void 0 : t.value
109
+ })), ut = {
110
+ class: "flex rounded-lg border border-gray-300 dark:border-gray-600",
111
+ style: { margin: "2px" }
112
+ }, dt = ["value"], ft = {
113
+ class: "w-full px-4 pb-3",
114
+ style: { "font-size": "12px" }
115
+ }, mt = ["innerHTML"], yt = {
116
+ __name: "EodashDatePicker",
117
+ props: {
118
+ hintText: {
119
+ type: String,
120
+ default: null
121
+ }
122
+ },
123
+ setup(t) {
124
+ const r = U((n, a) => ({
125
+ get() {
126
+ return n(), new Date(C.value).getTime();
127
+ },
128
+ /** @param {number} num */
129
+ set(o) {
130
+ a(), S.debug("Datepicker setting currentDate", C.value), C.value = new Date(o).toISOString();
131
+ }
132
+ })), i = I({
133
+ input: "YYYY-MM-DD"
134
+ }), e = z([]), { selectedStac: c } = G(N());
135
+ J(
136
+ c,
137
+ async (n, a) => {
138
+ if (n && a?.id !== n.id) {
139
+ S.debug("Datepicker selected STAC change triggered");
140
+ const o = [
141
+ "#009E73",
142
+ "#0072B2",
143
+ "#E69F00",
144
+ "#CC79A7",
145
+ "#56B4E9",
146
+ "#D55E00"
147
+ ];
148
+ e.splice(0, e.length);
149
+ for (let s = 0; s < h.length; s++) {
150
+ S.debug("Retrieving dates", h[s]), await h[s].fetchCollection();
151
+ const u = [
152
+ ...new Set(
153
+ h[s].getItems()?.reduce(
154
+ (g, w) => {
155
+ const d = Date.parse(
156
+ /** @type {string} */
157
+ w.datetime
158
+ );
159
+ return d && g.push(new Date(d)), g;
160
+ },
161
+ /** @type {Date[]} */
162
+ []
163
+ )
164
+ )
165
+ ];
166
+ e.push({
167
+ key: "id-" + s.toString() + Math.random().toString(16).slice(2),
168
+ bar: {
169
+ style: {
170
+ backgroundColor: o[s % o.length]
171
+ }
172
+ },
173
+ dates: u,
174
+ content: {
175
+ style: {
176
+ color: "#000000",
177
+ "font-weight": "bold"
178
+ }
179
+ }
180
+ });
181
+ }
182
+ }
183
+ },
184
+ { immediate: !0 }
185
+ );
186
+ function l(n) {
187
+ if (e.length) {
188
+ let a = n ? 1 / 0 : -1 / 0;
189
+ e.forEach((o) => {
190
+ o?.dates && o.dates.forEach((s) => {
191
+ s instanceof Date && (a = Math[n ? "min" : "max"](a, s.getTime()));
192
+ });
193
+ }), r.value = a === -1 / 0 ? Date.now() : a === 1 / 0 ? 0 : a;
194
+ }
195
+ }
196
+ return (n, a) => (b(), K(
197
+ Q,
198
+ null,
199
+ [
200
+ p(k(Z), {
201
+ modelValue: r.value,
202
+ "onUpdate:modelValue": a[0] || (a[0] = (o) => r.value = o),
203
+ modelModifiers: { number: !0 },
204
+ masks: i.value,
205
+ attributes: e
206
+ }, W({
207
+ default: m(({ inputValue: o, inputEvents: s }) => [
208
+ y("div", ut, [
209
+ y("input", x({ value: o }, X(s, !0), {
210
+ style: { margin: "1px" },
211
+ class: "flex-grow px-1 py-1 bg-white dark:bg-gray-700"
212
+ }), null, 16, dt)
213
+ ])
214
+ ]),
215
+ _: 2
216
+ /* DYNAMIC */
217
+ }, [
218
+ t.hintText ? {
219
+ name: "footer",
220
+ fn: m(() => [
221
+ y("div", ft, [
222
+ y("span", { innerHTML: t.hintText }, null, 8, mt)
223
+ ])
224
+ ]),
225
+ key: "0"
226
+ } : void 0
227
+ ]), 1032, ["modelValue", "masks", "attributes"]),
228
+ p(q, {
229
+ align: "center",
230
+ justify: "center",
231
+ style: { "margin-top": "6px" }
232
+ }, {
233
+ default: m(() => [
234
+ V((b(), T(M, {
235
+ style: { padding: "0px", "margin-right": "4px" },
236
+ density: "compact",
237
+ onClick: a[1] || (a[1] = (o) => l(!0))
238
+ }, {
239
+ default: m(() => [
240
+ p(P, {
241
+ icon: [k(tt)]
242
+ }, null, 8, ["icon"])
243
+ ]),
244
+ _: 1
245
+ /* STABLE */
246
+ })), [
247
+ [E, "Set date to oldest available dataset", "bottom"]
248
+ ]),
249
+ V((b(), T(M, {
250
+ style: { padding: "0px", "margin-left": "4px" },
251
+ density: "compact",
252
+ onClick: a[2] || (a[2] = (o) => l(!1))
253
+ }, {
254
+ default: m(() => [
255
+ p(P, {
256
+ icon: [k(et)]
257
+ }, null, 8, ["icon"])
258
+ ]),
259
+ _: 1
260
+ /* STABLE */
261
+ })), [
262
+ [E, "Set date to latest available dataset", "bottom"]
263
+ ])
264
+ ]),
265
+ _: 1
266
+ /* STABLE */
267
+ })
268
+ ],
269
+ 64
270
+ /* STABLE_FRAGMENT */
271
+ ));
272
+ }
273
+ };
274
+ export {
275
+ yt as default
276
+ };