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

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/README.md +1 -1
  2. package/core/client/composables/EodashMap.js +245 -0
  3. package/core/client/composables/index.js +2 -2
  4. package/core/client/eodash.js +1 -2
  5. package/core/client/store/Actions.js +30 -10
  6. package/core/client/store/States.js +4 -1
  7. package/core/client/store/stac.js +52 -2
  8. package/core/client/types.d.ts +6 -2
  9. package/core/client/utils/createLayers.js +146 -39
  10. package/core/client/utils/eodashSTAC.js +94 -19
  11. package/core/client/utils/helpers.js +189 -11
  12. package/core/client/utils/states.js +17 -0
  13. package/dist/client/{DashboardLayout-DQE4aB6e.js → DashboardLayout-CCtyOil0.js} +2 -2
  14. package/dist/client/{DynamicWebComponent-TrDsJuF8.js → DynamicWebComponent-But2r1Sj.js} +2 -2
  15. package/dist/client/EodashDatePicker-jeYiWflv.js +247 -0
  16. package/dist/client/{EodashItemFilter-Bp0lcvbI.js → EodashItemFilter-BFlfWeE_.js} +2028 -2024
  17. package/dist/client/EodashLayerControl-BhZL4pYM.js +24358 -0
  18. package/dist/client/{EodashMap--2y6XErO.js → EodashMap-C5tOgVOv.js} +22268 -24006
  19. package/dist/client/{EodashMapBtns-BSf3iUAb.js → EodashMapBtns-CdDfVQj0.js} +2 -2
  20. package/dist/client/{ExportState-BTONkMIz.js → ExportState-CKCCN_VI.js} +142 -136
  21. package/dist/client/{Footer-B7JDXdxT.js → Footer-B9yVgyzx.js} +67 -65
  22. package/dist/client/{Header-Dlumetq0.js → Header-CPIlUEOq.js} +4 -4
  23. package/dist/client/{IframeWrapper-DRjSqhFx.js → IframeWrapper-DRw1kHJm.js} +1 -1
  24. package/dist/client/{MobileLayout-9z2X_rmU.js → MobileLayout-CPxVee5U.js} +6 -6
  25. package/dist/client/{PopUp-CXbMBYGh.js → PopUp-Dca-gx9a.js} +5 -5
  26. package/dist/client/{VImg-Dgk5tryv.js → VImg-PHLA1nP1.js} +2 -2
  27. package/dist/client/{VMain-Ubv9jyyL.js → VMain-Ck81LJfb.js} +2 -2
  28. package/dist/client/{VOverlay-CqZC2CbA.js → VOverlay-CL4hiJB8.js} +92 -92
  29. package/dist/client/{WidgetsContainer-CHK_3dlD.js → WidgetsContainer-jxk3kw-d.js} +1 -1
  30. package/dist/client/asWebComponent-3OsFQJVx.js +23633 -0
  31. package/dist/client/eo-dash.js +1 -1
  32. package/dist/client/{forwardRefs-OX_5lLJW.js → forwardRefs-BxZaq9ml.js} +1 -1
  33. package/dist/client/{index-B_KfD-iF.js → index-Vul961Xy.js} +23 -23
  34. package/dist/client/{lerc-B4lXefGh-CplqAh1B.js → lerc-B4lXefGh-BESXOHWk.js} +1 -1
  35. package/dist/client/{ssrBoot-BZTPJZkq.js → ssrBoot-BFMBrCqY.js} +1 -1
  36. package/dist/client/style.css +2 -2
  37. package/dist/client/{transition-Dq8XIV_D.js → transition-U5aFjJtV.js} +1 -1
  38. package/dist/client/{webfontloader-qotgY98I.js → webfontloader-D_JbBwHu.js} +1 -1
  39. package/package.json +5 -3
  40. package/widgets/EodashDatePicker.vue +32 -40
  41. package/widgets/EodashItemFilter.vue +2 -0
  42. package/widgets/EodashLayerControl.vue +69 -2
  43. package/widgets/EodashMap.vue +35 -208
  44. package/widgets/ExportState.vue +8 -7
  45. package/dist/client/EodashDatePicker-CkA9rHp6.js +0 -252
  46. package/dist/client/EodashLayerControl-lfLYqyeU.js +0 -20963
  47. package/dist/client/_commonjsHelpers-DaMA6jEr.js +0 -8
  48. package/dist/client/asWebComponent-Ddg71BJk.js +0 -20451
  49. package/dist/client/helpers-BCawTwFg.js +0 -1390
@@ -0,0 +1,17 @@
1
+ import { shallowReactive } from "vue";
2
+
3
+ /**
4
+ * Array of eodash STAC Collections extracted from the current selected indicator.
5
+ * Updated in {@link file://./../store/stac.js `loadSelectedSTAC`} widget
6
+ * @type {import('./eodashSTAC').EodashCollection[]}
7
+ * @private
8
+ */
9
+ export const eodashCollections = shallowReactive([]);
10
+
11
+ /**
12
+ * Array of eodash STAC Collections extracted from the current selected COMPARE indicator.
13
+ * Updated in {@link file://./../store/stac.js ` loadSelectedCompareSTAC`} widget
14
+ * @type {import('./eodashSTAC').EodashCollection[]}
15
+ * @private
16
+ */
17
+ export const eodashCompareCollections = shallowReactive([]);
@@ -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-Ddg71BJk.js";
2
- import { V as k } from "./VMain-Ubv9jyyL.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-3OsFQJVx.js";
2
+ import { V as k } from "./VMain-Ck81LJfb.js";
3
3
  class A extends HTMLElement {
4
4
  static get observedAttributes() {
5
5
  return ["gap"];
@@ -1,4 +1,4 @@
1
- import { bF as i, aA as m, r as p, Z as d, aM as f, $ as c, a6 as g, a0 as y, d as _, a4 as k } from "./asWebComponent-Ddg71BJk.js";
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";
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, x) => (c(), g("span", h, [
41
+ }), (n, w) => (c(), g("span", h, [
42
42
  (c(), y(
43
43
  k(o.tagName),
44
44
  _(o.properties, {
@@ -0,0 +1,247 @@
1
+ import { p as I, o as M, g as _, y as $, aw as R, c as d, r as O, d as y, a as j, b as f, ax as F, ay as A, T as H, az as N, aA as Y, Z as U, aB as z, aC as G, w as J, $ as x, a6 as L, a1 as g, a3 as w, aD as W, F as Z, a9 as V, aE as q, aF as K, t as k, a0 as C, M as b, aG as Q, V as D, aH as X, aI as p, aJ as T } from "./asWebComponent-3OsFQJVx.js";
2
+ import { m as tt, V as P } from "./VOverlay-CL4hiJB8.js";
3
+ import { b as et, f as at } from "./forwardRefs-BxZaq9ml.js";
4
+ const ot = I({
5
+ id: String,
6
+ text: String,
7
+ ...M(tt({
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"), nt = _()({
22
+ name: "VTooltip",
23
+ props: ot(),
24
+ emits: {
25
+ "update:modelValue": (t) => !0
26
+ },
27
+ setup(t, i) {
28
+ let {
29
+ slots: l
30
+ } = i;
31
+ const a = $(t, "modelValue"), {
32
+ scopeId: r
33
+ } = et(), n = R(), e = d(() => t.id || `v-tooltip-${n}`), o = O(), s = d(() => t.location.split(" ").length > 1 ? t.location : t.location + " center"), c = d(() => t.origin === "auto" || t.origin === "overlap" || t.origin.split(" ").length > 1 || t.location.split(" ").length > 1 ? t.origin : t.origin + " center"), u = d(() => t.transition ? t.transition : a.value ? "scale-transition" : "fade-transition"), h = d(() => y({
34
+ "aria-describedby": e.value
35
+ }, t.activatorProps));
36
+ return j(() => {
37
+ const B = P.filterProps(t);
38
+ return f(P, y({
39
+ ref: o,
40
+ class: ["v-tooltip", t.class],
41
+ style: t.style,
42
+ id: e.value
43
+ }, B, {
44
+ modelValue: a.value,
45
+ "onUpdate:modelValue": (m) => a.value = m,
46
+ transition: u.value,
47
+ absolute: !0,
48
+ location: s.value,
49
+ origin: c.value,
50
+ persistent: !0,
51
+ role: "tooltip",
52
+ activatorProps: h.value,
53
+ _disableGlobalStack: !0
54
+ }, r), {
55
+ activator: l.activator,
56
+ default: function() {
57
+ for (var m = arguments.length, S = new Array(m), v = 0; v < m; v++)
58
+ S[v] = arguments[v];
59
+ return l.default?.(...S) ?? t.text;
60
+ }
61
+ });
62
+ }), at({}, o);
63
+ }
64
+ });
65
+ function st(t, i) {
66
+ const l = typeof t == "string" ? F(t) : t, a = rt(l, i);
67
+ return {
68
+ mounted: a,
69
+ updated: a,
70
+ unmounted(r) {
71
+ A(null, r);
72
+ }
73
+ };
74
+ }
75
+ function rt(t, i) {
76
+ return function(l, a, r) {
77
+ const n = typeof i == "function" ? i(a) : i, e = a.value?.text ?? a.value ?? n?.text, o = H(a.value) ? a.value : {}, s = () => e ?? l.innerHTML, c = (r.ctx === a.instance.$ ? it(r, a.instance.$)?.provides : r.ctx?.provides) ?? a.instance.$.provides, u = N(t, y(n, o), s);
78
+ u.appContext = Object.assign(/* @__PURE__ */ Object.create(null), a.instance.$.appContext, {
79
+ provides: c
80
+ }), A(u, l);
81
+ };
82
+ }
83
+ function it(t, i) {
84
+ const l = /* @__PURE__ */ new Set(), a = (n) => {
85
+ for (const e of n) {
86
+ if (!e) continue;
87
+ if (e === t)
88
+ return !0;
89
+ l.add(e);
90
+ let o;
91
+ if (e.suspense ? o = a([e.ssContent]) : Array.isArray(e.children) ? o = a(e.children) : e.component?.vnode && (o = a([e.component?.subTree])), o)
92
+ return o;
93
+ l.delete(e);
94
+ }
95
+ return !1;
96
+ };
97
+ if (!a([i.subTree]))
98
+ throw new Error("Could not find original vnode");
99
+ const r = Array.from(l).reverse();
100
+ for (const n of r)
101
+ if (n.component)
102
+ return n.component;
103
+ return i;
104
+ }
105
+ const E = st(nt, (t) => ({
106
+ activator: "parent",
107
+ location: t.arg?.replace("-", " ") ?? "top",
108
+ text: typeof t.value == "boolean" ? void 0 : t.value
109
+ })), lt = {
110
+ class: "flex rounded-lg border border-gray-300 dark:border-gray-600",
111
+ style: { margin: "2px" }
112
+ }, ct = ["value"], mt = {
113
+ __name: "EodashDatePicker",
114
+ setup(t) {
115
+ function i(n) {
116
+ if (a.length) {
117
+ let e = n ? 1 / 0 : -1 / 0;
118
+ a.forEach((o) => {
119
+ o?.dates && o.dates.forEach((s) => {
120
+ s instanceof Date && (!n && s.getTime() > e || n && s.getTime() < e) && (e = s.getTime());
121
+ });
122
+ }), e !== 0 && (r.value = new Date(e));
123
+ }
124
+ }
125
+ const l = O({
126
+ input: "YYYY-MM-DD"
127
+ }), a = Y([]), r = d({
128
+ get() {
129
+ return p.value ? new Date(p.value) : /* @__PURE__ */ new Date();
130
+ },
131
+ /** @param {Date | string} updatedDate */
132
+ set(n) {
133
+ n instanceof Date && !isNaN(n.getTime()) ? p.value = new Date(
134
+ n.getTime() - n.getTimezoneOffset() * 6e4
135
+ ).toISOString() : p.value = (/* @__PURE__ */ new Date()).toISOString();
136
+ }
137
+ });
138
+ return U(() => {
139
+ const { selectedStac: n } = z(G());
140
+ J(
141
+ [n],
142
+ async ([e]) => {
143
+ if (e) {
144
+ const o = [
145
+ "#009E73",
146
+ "#0072B2",
147
+ "#E69F00",
148
+ "#CC79A7",
149
+ "#56B4E9",
150
+ "#D55E00"
151
+ ];
152
+ a.length = 0;
153
+ for (let c = 0; c < T.length; c++) {
154
+ const u = [
155
+ ...new Set(
156
+ T[c].getItems()?.map((h) => new Date(
157
+ /** @type {string} */
158
+ h.datetime
159
+ ))
160
+ )
161
+ ];
162
+ a.push({
163
+ key: "id-" + c.toString() + Math.random().toString(16).slice(2),
164
+ bar: {
165
+ style: {
166
+ backgroundColor: o[c % o.length]
167
+ }
168
+ },
169
+ dates: u
170
+ });
171
+ }
172
+ const s = e?.extent?.temporal?.interval;
173
+ s && s.length > 0 && s[0].length > 1 && (r.value = new Date(s[0][1]));
174
+ }
175
+ },
176
+ { immediate: !0 }
177
+ );
178
+ }), (n, e) => (x(), L(
179
+ Z,
180
+ null,
181
+ [
182
+ f(w(K), {
183
+ modelValue: r.value,
184
+ "onUpdate:modelValue": e[0] || (e[0] = (o) => r.value = o),
185
+ masks: l.value,
186
+ attributes: a
187
+ }, {
188
+ default: g(({ inputValue: o, inputEvents: s }) => [
189
+ V("div", lt, [
190
+ V("input", y({ value: o }, q(s, !0), {
191
+ style: { margin: "1px" },
192
+ class: "flex-grow px-1 py-1 bg-white dark:bg-gray-700"
193
+ }), null, 16, ct)
194
+ ])
195
+ ]),
196
+ _: 1
197
+ /* STABLE */
198
+ }, 8, ["modelValue", "masks", "attributes"]),
199
+ f(W, {
200
+ align: "center",
201
+ justify: "center",
202
+ style: { "margin-top": "6px" }
203
+ }, {
204
+ default: g(() => [
205
+ k((x(), C(D, {
206
+ style: { padding: "0px", "margin-right": "4px" },
207
+ density: "compact",
208
+ onClick: e[1] || (e[1] = (o) => i(!0))
209
+ }, {
210
+ default: g(() => [
211
+ f(b, {
212
+ icon: [w(Q)]
213
+ }, null, 8, ["icon"])
214
+ ]),
215
+ _: 1
216
+ /* STABLE */
217
+ })), [
218
+ [E, "Set date to oldest available dataset", "bottom"]
219
+ ]),
220
+ k((x(), C(D, {
221
+ style: { padding: "0px", "margin-left": "4px" },
222
+ density: "compact",
223
+ onClick: e[2] || (e[2] = (o) => i(!1))
224
+ }, {
225
+ default: g(() => [
226
+ f(b, {
227
+ icon: [w(X)]
228
+ }, null, 8, ["icon"])
229
+ ]),
230
+ _: 1
231
+ /* STABLE */
232
+ })), [
233
+ [E, "Set date to latest available dataset", "bottom"]
234
+ ])
235
+ ]),
236
+ _: 1
237
+ /* STABLE */
238
+ })
239
+ ],
240
+ 64
241
+ /* STABLE_FRAGMENT */
242
+ ));
243
+ }
244
+ };
245
+ export {
246
+ mt as default
247
+ };