@eodash/eodash 5.0.0-alpha.2.14 → 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 +147 -40
  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-ulCTLwXv.js → DashboardLayout-CCtyOil0.js} +2 -2
  14. package/dist/client/{DynamicWebComponent-CZJjeckP.js → DynamicWebComponent-But2r1Sj.js} +2 -2
  15. package/dist/client/EodashDatePicker-jeYiWflv.js +247 -0
  16. package/dist/client/{EodashItemFilter-9hK-3-7Y.js → EodashItemFilter-BFlfWeE_.js} +2028 -2024
  17. package/dist/client/EodashLayerControl-BhZL4pYM.js +24358 -0
  18. package/dist/client/{EodashMap-jqF-NaSp.js → EodashMap-C5tOgVOv.js} +22268 -24006
  19. package/dist/client/{EodashMapBtns-F7rE6A-2.js → EodashMapBtns-CdDfVQj0.js} +2 -2
  20. package/dist/client/{ExportState-CHU5c0uO.js → ExportState-CKCCN_VI.js} +142 -136
  21. package/dist/client/{Footer-DjkwaDHV.js → Footer-B9yVgyzx.js} +67 -65
  22. package/dist/client/{Header-V8pZw2HR.js → Header-CPIlUEOq.js} +4 -4
  23. package/dist/client/{IframeWrapper-C8EZZnHk.js → IframeWrapper-DRw1kHJm.js} +1 -1
  24. package/dist/client/{MobileLayout-zOO_ZJVe.js → MobileLayout-CPxVee5U.js} +6 -6
  25. package/dist/client/{PopUp-BNnXTHYD.js → PopUp-Dca-gx9a.js} +5 -5
  26. package/dist/client/{VImg-Cj6-XkWV.js → VImg-PHLA1nP1.js} +2 -2
  27. package/dist/client/{VMain-BXL9EwGV.js → VMain-Ck81LJfb.js} +2 -2
  28. package/dist/client/{VOverlay-C9MeDzGb.js → VOverlay-CL4hiJB8.js} +92 -92
  29. package/dist/client/{WidgetsContainer-Cw4LFyGR.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-DF-jCteQ.js → forwardRefs-BxZaq9ml.js} +1 -1
  33. package/dist/client/{index-BfF7LPVL.js → index-Vul961Xy.js} +23 -23
  34. package/dist/client/{lerc-B4lXefGh-WUagmXWl.js → lerc-B4lXefGh-BESXOHWk.js} +1 -1
  35. package/dist/client/{ssrBoot-DNvPtEea.js → ssrBoot-BFMBrCqY.js} +1 -1
  36. package/dist/client/style.css +2 -2
  37. package/dist/client/{transition-Dc2dpya2.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 -7
  43. package/widgets/EodashMap.vue +35 -208
  44. package/widgets/ExportState.vue +8 -7
  45. package/dist/client/EodashDatePicker-BClSZg9g.js +0 -252
  46. package/dist/client/EodashLayerControl-p5FdBiiJ.js +0 -20969
  47. package/dist/client/_commonjsHelpers-DaMA6jEr.js +0 -8
  48. package/dist/client/asWebComponent-GN3G-Gdj.js +0 -20451
  49. package/dist/client/helpers-XtsCspQr.js +0 -1390
@@ -1,252 +0,0 @@
1
- import { p as B, o as $, g as _, y as j, av as I, c as v, r as V, d as h, a as M, b as p, aw as R, ax as O, T as U, ay as F, x as H, Z as N, az as Y, aA as z, w as G, $ as w, 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, aH as tt } from "./asWebComponent-GN3G-Gdj.js";
2
- import { t as et, e as at } from "./helpers-XtsCspQr.js";
3
- import { m as ot, V as E } from "./VOverlay-C9MeDzGb.js";
4
- import { b as nt, f as st } from "./forwardRefs-DF-jCteQ.js";
5
- const rt = B({
6
- id: String,
7
- text: String,
8
- ...$(ot({
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"), it = _()({
23
- name: "VTooltip",
24
- props: rt(),
25
- emits: {
26
- "update:modelValue": (t) => !0
27
- },
28
- setup(t, r) {
29
- let {
30
- slots: i
31
- } = r;
32
- const o = j(t, "modelValue"), {
33
- scopeId: n
34
- } = nt(), 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"), d = v(() => t.transition ? t.transition : o.value ? "scale-transition" : "fade-transition"), f = v(() => h({
35
- "aria-describedby": e.value
36
- }, t.activatorProps));
37
- return M(() => {
38
- const b = E.filterProps(t);
39
- return p(E, h({
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: d.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, u = new Array(m), g = 0; g < m; g++)
59
- u[g] = arguments[g];
60
- return i.default?.(...u) ?? t.text;
61
- }
62
- });
63
- }), st({}, a);
64
- }
65
- });
66
- function lt(t, r) {
67
- const i = typeof t == "string" ? R(t) : t, o = ct(i, r);
68
- return {
69
- mounted: o,
70
- updated: o,
71
- unmounted(n) {
72
- O(null, n);
73
- }
74
- };
75
- }
76
- function ct(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.$ ? ut(n, o.instance.$)?.provides : n.ctx?.provides) ?? o.instance.$.provides, d = F(t, h(l, a), s);
79
- d.appContext = Object.assign(/* @__PURE__ */ Object.create(null), o.instance.$.appContext, {
80
- provides: c
81
- }), O(d, i);
82
- };
83
- }
84
- function ut(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 = lt(it, (t) => ({
107
- activator: "parent",
108
- location: t.arg?.replace("-", " ") ?? "top",
109
- text: typeof t.value == "boolean" ? void 0 : t.value
110
- })), dt = {
111
- class: "flex rounded-lg border border-gray-300 dark:border-gray-600",
112
- style: { margin: "2px" }
113
- }, ft = ["value"], yt = {
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
- H(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 N(() => {
143
- const { selectedStac: e } = Y(z());
144
- G(
145
- [e],
146
- async ([a]) => {
147
- if (a) {
148
- const s = et(
149
- `./${a.id}/collection.json`,
150
- i.stacEndpoint
151
- ), c = at(
152
- e.value,
153
- s
154
- ), d = [
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 tt.get(c[f]).then((u) => u.data)).links.filter(
164
- (u) => u.rel === "item" && "datetime" in u
165
- ).map(
166
- (u) => new Date(u.datetime)
167
- );
168
- n.value = [
169
- {
170
- bar: {
171
- style: {
172
- backgroundColor: d[f % d.length]
173
- }
174
- },
175
- dates: m
176
- }
177
- ];
178
- }
179
- }
180
- },
181
- { immediate: !0 }
182
- );
183
- }), (e, a) => (w(), 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", dt, [
195
- k("input", h({ 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, ft)
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((w(), 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((w(), 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
- yt as default
252
- };