@eodash/eodash 5.0.0-alpha.2.17 → 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 (39) hide show
  1. package/core/client/App.vue +2 -0
  2. package/core/client/composables/EodashMap.js +93 -40
  3. package/core/client/eodash.js +8 -9
  4. package/core/client/plugins/index.js +2 -1
  5. package/core/client/utils/createLayers.js +7 -1
  6. package/core/client/utils/eodashSTAC.js +9 -0
  7. package/core/client/utils/helpers.js +16 -11
  8. package/core/client/vite-env.d.ts +1 -0
  9. package/dist/client/{DashboardLayout-BR1lU9ER.js → DashboardLayout-Dk6lzKZA.js} +2 -2
  10. package/dist/client/{DynamicWebComponent-7z8VFsrZ.js → DynamicWebComponent-BkMCGU7a.js} +1 -1
  11. package/dist/client/EodashDatePicker-D27wn0jP.js +276 -0
  12. package/dist/client/{EodashItemFilter-lNjVkidr.js → EodashItemFilter-DS1mOc2p.js} +1 -1
  13. package/dist/client/{EodashLayerControl-B0N8_XmX.js → EodashLayerControl-BqGA6jbV.js} +2247 -2198
  14. package/dist/client/{EodashMap-DFT2R2Rk.js → EodashMap-BnVrfBnA.js} +8671 -8650
  15. package/dist/client/{EodashMapBtns-CoGjVl8Y.js → EodashMapBtns-rv-U1nI_.js} +2 -2
  16. package/dist/client/{ExportState-Dwv37MRw.js → ExportState-C3Z1ET5c.js} +40 -40
  17. package/dist/client/{Footer-DuScuHSx.js → Footer-BBkNiqPm.js} +1 -1
  18. package/dist/client/{Header-C4Y0u0E5.js → Header-BQKHLO5P.js} +4 -4
  19. package/dist/client/{IframeWrapper-D1TfK4xH.js → IframeWrapper-BX4e2uxq.js} +1 -1
  20. package/dist/client/{MobileLayout-C-b8DIFO.js → MobileLayout-C2aqobN5.js} +6 -6
  21. package/dist/client/{PopUp-DBMZX3l3.js → PopUp-DG3zrW12.js} +15 -15
  22. package/dist/client/{VImg-bAMQHnMM.js → VImg-BLpHACcB.js} +2 -2
  23. package/dist/client/{VMain-Df5VMG9r.js → VMain-DOyRcpub.js} +2 -2
  24. package/dist/client/{VOverlay-D5GzAYRY.js → VOverlay-DAiInZQP.js} +32 -32
  25. package/dist/client/{WidgetsContainer-yZDmY6_u.js → WidgetsContainer-BqoX7R5Z.js} +3 -3
  26. package/dist/client/{asWebComponent-DhR2_xlP.js → asWebComponent-tNU8_fkz.js} +1210 -1184
  27. package/dist/client/eo-dash.js +1 -1
  28. package/dist/client/{forwardRefs-C0MQxvur.js → forwardRefs-BexjzXbg.js} +1 -1
  29. package/dist/client/{index-qNWeBhRh.js → index-F73os72i.js} +23 -23
  30. package/dist/client/{lerc-B4lXefGh-CsL-d8wY.js → lerc-B4lXefGh-DhdntrgS.js} +1 -1
  31. package/dist/client/{ssrBoot-Xmkz8T49.js → ssrBoot-C71RpKe4.js} +1 -1
  32. package/dist/client/style.css +1 -1
  33. package/dist/client/{transition-DRzZPWIN.js → transition-DNdd2Y-1.js} +1 -1
  34. package/dist/client/{webfontloader-CqD-lAx-.js → webfontloader-C7dpDL7m.js} +1 -1
  35. package/package.json +4 -5
  36. package/widgets/EodashDatePicker.vue +24 -12
  37. package/widgets/EodashLayerControl.vue +3 -1
  38. package/widgets/EodashMap.vue +43 -25
  39. package/dist/client/EodashDatePicker-o7ZOYIHL.js +0 -259
@@ -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
+ };
@@ -1,4 +1,4 @@
1
- import { r as Sa, aD as Ma, Z as Oa, $ as La, a6 as Ca, a9 as $o, aa as _o, d as ja } from "./asWebComponent-DhR2_xlP.js";
1
+ import { r as Sa, aD as Ma, Z as Oa, $ as La, a6 as Ca, a9 as $o, aa as _o, d as ja } from "./asWebComponent-tNU8_fkz.js";
2
2
  var Ra = Object.defineProperty, ss = (t) => {
3
3
  throw TypeError(t);
4
4
  }, Pa = (t, e, r) => e in t ? Ra(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, Un = (t, e, r) => Pa(t, typeof e != "symbol" ? e + "" : e, r), so = (t, e, r) => e.has(t) || ss("Cannot " + r), tt = (t, e, r) => (so(t, e, "read from private field"), r ? r.call(t) : e.get(t)), Ge = (t, e, r) => e.has(t) ? ss("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), Ai = (t, e, r, n) => (so(t, e, "write to private field"), e.set(t, r), r), le = (t, e, r) => (so(t, e, "access private method"), r);