@eodash/eodash 5.0.0-alpha.2.5 → 5.0.0-alpha.2.6
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.
- package/README.md +19 -5
- package/core/client/App.vue +6 -7
- package/core/client/SuspensedDashboard.ce.vue +58 -40
- package/core/client/asWebComponent.d.ts +10 -5
- package/core/client/asWebComponent.js +6 -6
- package/core/client/components/DashboardLayout.vue +35 -16
- package/core/client/components/DynamicWebComponent.vue +44 -44
- package/core/client/components/ErrorAlert.vue +19 -7
- package/core/client/components/Footer.vue +28 -14
- package/core/client/components/Header.vue +4 -4
- package/core/client/components/IframeWrapper.vue +3 -3
- package/core/client/components/Loading.vue +17 -18
- package/core/client/components/MobileLayout.vue +48 -26
- package/core/client/composables/DefineEodash.js +38 -29
- package/core/client/composables/DefineWidgets.js +101 -81
- package/core/client/composables/index.js +32 -29
- package/core/client/eodash.js +44 -39
- package/core/client/main.js +2 -2
- package/core/client/plugins/index.js +9 -10
- package/core/client/plugins/vuetify.js +9 -10
- package/core/client/render.js +4 -5
- package/core/client/store/States.js +8 -13
- package/core/client/store/index.js +14 -11
- package/core/client/store/stac.js +51 -37
- package/core/client/types.d.ts +169 -201
- package/core/client/utils/eodashSTAC.js +130 -49
- package/core/client/utils/helpers.js +18 -20
- package/core/client/utils/index.js +17 -10
- package/core/client/utils/keys.js +2 -2
- package/core/client/views/Dashboard.vue +53 -36
- package/core/client/vite-env.d.ts +19 -17
- package/dist/client/{DashboardLayout-BYROtP-7.js → DashboardLayout-BuDcv6LM.js} +9 -9
- package/dist/client/{DynamicWebComponent-BQhxFPM0.js → DynamicWebComponent-BEP4rVce.js} +2 -2
- package/dist/client/EodashDatePicker-oFb1zt5E.js +1211 -0
- package/dist/client/{EodashItemFilter-DIBDAHcc.js → EodashItemFilter-BElmgrST.js} +4 -6
- package/dist/client/{EodashMap-C6jJ2Lb_.js → EodashMap-DXyOgcEd.js} +13131 -14490
- package/dist/client/{Footer-BVIZms1S.js → Footer-CoPx6UXQ.js} +3 -3
- package/dist/client/{Header-TsTL1d2R.js → Header-C-zX31Ys.js} +169 -167
- package/dist/client/{IframeWrapper-XKChM78a.js → IframeWrapper-2w2ye0zM.js} +1 -1
- package/dist/client/{MobileLayout-BlGcMQra.js → MobileLayout-C9OVcP12.js} +45 -57
- package/dist/client/{VMain-C9XV5Lyg.js → VMain-Dm43jd43.js} +2 -2
- package/dist/client/{WidgetsContainer-BQXHnZpa.js → WidgetsContainer-BS87sLqk.js} +10 -3
- package/dist/client/{asWebComponent-CbdGxelK.js → asWebComponent-CpQUVi2N.js} +5508 -5561
- package/dist/client/{basedecoder-Qm25PwVp-CHo5Pomv.js → basedecoder-DHcBySSe-BmCFNFnw.js} +5 -6
- package/dist/client/{decoder-HRvnjnEI-CHAYOWhz.js → decoder-CP4lv0Kb-BHrv68IA.js} +1 -1
- package/dist/client/deflate-BXt-9JA_-CWfClgpK.js +10 -0
- package/dist/client/eo-dash.js +3 -3
- package/dist/client/eodashSTAC-Q7kbX1Gy.js +2788 -0
- package/dist/client/{eox-itemfilter-DcQkRD2l.js → eox-itemfilter-TaBxgqq_.js} +1002 -974
- package/dist/client/{eox-map-C3DL31fp.js → eox-map-L7abwKTR.js} +5677 -5695
- package/dist/client/{forwardRefs-CyCJOFsz.js → forwardRefs-BVFQ82G4.js} +12 -21
- package/dist/client/{index-CabQjjQg.js → index-dOzyv_xR.js} +1 -1
- package/dist/client/{jpeg-DNfUpLwy-Fjan-04T.js → jpeg-BAgeD1d3-oeHbFPUL.js} +5 -6
- package/dist/client/{lerc-_E46UbWQ-TxBH4OeK.js → lerc-DzVumYtB-rm1Xco54.js} +5 -7
- package/dist/client/{lzw-BOMhmEDy-Dboc93VO.js → lzw-LAGDNbSC-DkP96qO9.js} +1 -1
- package/dist/client/{packbits-DaUD6MLm-Bu1PoTGa.js → packbits-BlDR4Kj5-C66n1-zr.js} +1 -1
- package/dist/client/{pako.esm-C3kYPGGQ-BMki8cQY.js → pako.esm-CB1uQYY0-DB0PYm1P.js} +6 -12
- package/dist/client/{raw-CcGKjn8q-DFOt-i8n.js → raw-CMGvRjfu-BRi6E4i1.js} +1 -1
- package/dist/client/{ssrBoot-DWJ-z4I-.js → ssrBoot-L9KejErM.js} +1 -1
- package/dist/client/style.css +2 -2
- package/dist/client/{transition-BlLt41wg.js → transition-DCePIwYR.js} +1 -1
- package/dist/client/{webfontloader-CyOFAuFB.js → webfontloader-qotgY98I.js} +56 -92
- package/dist/client/{webimage-D2c098k3-DLj1LQxB.js → webimage-BM_pbLN3-L2cGWK5l.js} +1 -1
- package/dist/node/cli.js +1 -1
- package/dist/node/types.d.ts +32 -38
- package/package.json +11 -11
- package/widgets/EodashDatePicker.vue +94 -43
- package/widgets/EodashItemFilter.vue +13 -10
- package/widgets/EodashMap.vue +87 -20
- package/widgets/WidgetsContainer.vue +45 -27
- package/dist/client/EodashDatePicker-CFltnt5d.js +0 -1194
- package/dist/client/deflate-Be2Arps5-hDqMz3RA.js +0 -10
- package/dist/client/http-ZWiLaAeR.js +0 -1337
|
@@ -6,8 +6,7 @@ var ot = { exports: {} };
|
|
|
6
6
|
return t.call.apply(t.bind, arguments);
|
|
7
7
|
}
|
|
8
8
|
function rt(t, n, e) {
|
|
9
|
-
if (!t)
|
|
10
|
-
throw Error();
|
|
9
|
+
if (!t) throw Error();
|
|
11
10
|
if (2 < arguments.length) {
|
|
12
11
|
var i = Array.prototype.slice.call(arguments, 2);
|
|
13
12
|
return function() {
|
|
@@ -30,9 +29,7 @@ var ot = { exports: {} };
|
|
|
30
29
|
}
|
|
31
30
|
var ft = !!window.FontFace;
|
|
32
31
|
function A(t, n, e, i) {
|
|
33
|
-
if (n = t.c.createElement(n), e)
|
|
34
|
-
for (var o in e)
|
|
35
|
-
e.hasOwnProperty(o) && (o == "style" ? n.style.cssText = e[o] : n.setAttribute(o, e[o]));
|
|
32
|
+
if (n = t.c.createElement(n), e) for (var o in e) e.hasOwnProperty(o) && (o == "style" ? n.style.cssText = e[o] : n.setAttribute(o, e[o]));
|
|
36
33
|
return i && n.appendChild(t.c.createTextNode(i)), n;
|
|
37
34
|
}
|
|
38
35
|
function I(t, n, e) {
|
|
@@ -44,27 +41,23 @@ var ot = { exports: {} };
|
|
|
44
41
|
function d(t, n, e) {
|
|
45
42
|
n = n || [], e = e || [];
|
|
46
43
|
for (var i = t.className.split(/\s+/), o = 0; o < n.length; o += 1) {
|
|
47
|
-
for (var s = !1, r = 0; r < i.length; r += 1)
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
44
|
+
for (var s = !1, r = 0; r < i.length; r += 1) if (n[o] === i[r]) {
|
|
45
|
+
s = !0;
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
52
48
|
s || i.push(n[o]);
|
|
53
49
|
}
|
|
54
50
|
for (n = [], o = 0; o < i.length; o += 1) {
|
|
55
|
-
for (s = !1, r = 0; r < e.length; r += 1)
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
51
|
+
for (s = !1, r = 0; r < e.length; r += 1) if (i[o] === e[r]) {
|
|
52
|
+
s = !0;
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
60
55
|
s || n.push(i[o]);
|
|
61
56
|
}
|
|
62
57
|
t.className = n.join(" ").replace(/\s+/g, " ").replace(/^\s+|\s+$/, "");
|
|
63
58
|
}
|
|
64
59
|
function P(t, n) {
|
|
65
|
-
for (var e = t.className.split(/\s+/), i = 0, o = e.length; i < o; i++)
|
|
66
|
-
if (e[i] == n)
|
|
67
|
-
return !0;
|
|
60
|
+
for (var e = t.className.split(/\s+/), i = 0, o = e.length; i < o; i++) if (e[i] == n) return !0;
|
|
68
61
|
return !1;
|
|
69
62
|
}
|
|
70
63
|
function ct(t) {
|
|
@@ -114,8 +107,7 @@ var ot = { exports: {} };
|
|
|
114
107
|
this.a = t || "-";
|
|
115
108
|
}
|
|
116
109
|
q.prototype.c = function(t) {
|
|
117
|
-
for (var n = [], e = 0; e < arguments.length; e++)
|
|
118
|
-
n.push(arguments[e].replace(/[\W_]+/g, "").toLowerCase());
|
|
110
|
+
for (var n = [], e = 0; e < arguments.length; e++) n.push(arguments[e].replace(/[\W_]+/g, "").toLowerCase());
|
|
119
111
|
return n.join(this.a);
|
|
120
112
|
};
|
|
121
113
|
function p(t, n) {
|
|
@@ -167,11 +159,10 @@ var ot = { exports: {} };
|
|
|
167
159
|
}
|
|
168
160
|
function vt(t, n, e) {
|
|
169
161
|
var i = [], o;
|
|
170
|
-
for (o in n)
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
}
|
|
162
|
+
for (o in n) if (n.hasOwnProperty(o)) {
|
|
163
|
+
var s = t.c[o];
|
|
164
|
+
s && i.push(s(n[o], e));
|
|
165
|
+
}
|
|
175
166
|
return i;
|
|
176
167
|
}
|
|
177
168
|
function _(t, n) {
|
|
@@ -220,9 +211,7 @@ var ot = { exports: {} };
|
|
|
220
211
|
this.f.serif = this.j.a.offsetWidth, this.f["sans-serif"] = this.m.a.offsetWidth, this.A = x(), V(this);
|
|
221
212
|
};
|
|
222
213
|
function U(t, n, e) {
|
|
223
|
-
for (var i in E)
|
|
224
|
-
if (E.hasOwnProperty(i) && n === t.f[E[i]] && e === t.f[E[i]])
|
|
225
|
-
return !0;
|
|
214
|
+
for (var i in E) if (E.hasOwnProperty(i) && n === t.f[E[i]] && e === t.f[E[i]]) return !0;
|
|
226
215
|
return !1;
|
|
227
216
|
}
|
|
228
217
|
function V(t) {
|
|
@@ -267,23 +256,19 @@ var ot = { exports: {} };
|
|
|
267
256
|
var s = --t.h == 0;
|
|
268
257
|
(t.f || t.g) && setTimeout(function() {
|
|
269
258
|
var r = o || null, a = i || null || {};
|
|
270
|
-
if (e.length === 0 && s)
|
|
271
|
-
M(n.a);
|
|
259
|
+
if (e.length === 0 && s) M(n.a);
|
|
272
260
|
else {
|
|
273
261
|
n.f += e.length, s && (n.j = s);
|
|
274
262
|
var f, c = [];
|
|
275
263
|
for (f = 0; f < e.length; f++) {
|
|
276
264
|
var h = e[f], u = a[h.c], g = n.a, y = h;
|
|
277
|
-
if (g.g && d(g.f, [g.a.c("wf", y.c, l(y).toString(), "loading")]), w(g, "fontloading", y), g = null, C === null)
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
} else
|
|
282
|
-
C = !1;
|
|
265
|
+
if (g.g && d(g.f, [g.a.c("wf", y.c, l(y).toString(), "loading")]), w(g, "fontloading", y), g = null, C === null) if (window.FontFace) {
|
|
266
|
+
var y = /Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent), Nt = /OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent) && /Apple/.exec(window.navigator.vendor);
|
|
267
|
+
C = y ? 42 < parseInt(y[1], 10) : !Nt;
|
|
268
|
+
} else C = !1;
|
|
283
269
|
C ? g = new G(v(n.g, n), v(n.h, n), n.c, h, n.s, u) : g = new K(v(n.g, n), v(n.h, n), n.c, h, n.s, r, u), c.push(g);
|
|
284
270
|
}
|
|
285
|
-
for (f = 0; f < c.length; f++)
|
|
286
|
-
c[f].start();
|
|
271
|
+
for (f = 0; f < c.length; f++) c[f].start();
|
|
287
272
|
}
|
|
288
273
|
}, 0);
|
|
289
274
|
}
|
|
@@ -291,10 +276,9 @@ var ot = { exports: {} };
|
|
|
291
276
|
var o = [], i = e.timeout;
|
|
292
277
|
pt(n);
|
|
293
278
|
var o = vt(t.a, e, t.c), s = new W(t.c, n, i);
|
|
294
|
-
for (t.h = o.length, n = 0, e = o.length; n < e; n++)
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
});
|
|
279
|
+
for (t.h = o.length, n = 0, e = o.length; n < e; n++) o[n].load(function(r, a, f) {
|
|
280
|
+
dt(t, s, r, a, f);
|
|
281
|
+
});
|
|
298
282
|
}
|
|
299
283
|
function Q(t, n) {
|
|
300
284
|
this.c = t, this.a = n;
|
|
@@ -303,16 +287,14 @@ var ot = { exports: {} };
|
|
|
303
287
|
function n() {
|
|
304
288
|
if (s["__mti_fntLst" + i]) {
|
|
305
289
|
var r = s["__mti_fntLst" + i](), a = [], f;
|
|
306
|
-
if (r)
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
}
|
|
290
|
+
if (r) for (var c = 0; c < r.length; c++) {
|
|
291
|
+
var h = r[c].fontfamily;
|
|
292
|
+
r[c].fontStyle != null && r[c].fontWeight != null ? (f = r[c].fontStyle + r[c].fontWeight, a.push(new p(h, f))) : a.push(new p(h));
|
|
293
|
+
}
|
|
311
294
|
t(a);
|
|
312
|
-
} else
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
}, 50);
|
|
295
|
+
} else setTimeout(function() {
|
|
296
|
+
n();
|
|
297
|
+
}, 50);
|
|
316
298
|
}
|
|
317
299
|
var e = this, i = e.a.projectId, o = e.a.version;
|
|
318
300
|
if (i) {
|
|
@@ -322,23 +304,17 @@ var ot = { exports: {} };
|
|
|
322
304
|
return e.a;
|
|
323
305
|
}, n());
|
|
324
306
|
}).id = "__MonotypeAPIScript__" + i;
|
|
325
|
-
} else
|
|
326
|
-
t([]);
|
|
307
|
+
} else t([]);
|
|
327
308
|
};
|
|
328
309
|
function Y(t, n) {
|
|
329
310
|
this.c = t, this.a = n;
|
|
330
311
|
}
|
|
331
312
|
Y.prototype.load = function(t) {
|
|
332
313
|
var n, e, i = this.a.urls || [], o = this.a.families || [], s = this.a.testStrings || {}, r = new k();
|
|
333
|
-
for (n = 0, e = i.length; n < e; n++)
|
|
334
|
-
B(this.c, i[n], D(r));
|
|
314
|
+
for (n = 0, e = i.length; n < e; n++) B(this.c, i[n], D(r));
|
|
335
315
|
var a = [];
|
|
336
|
-
for (n = 0, e = o.length; n < e; n++)
|
|
337
|
-
|
|
338
|
-
for (var f = i[1].split(","), c = 0; c < f.length; c += 1)
|
|
339
|
-
a.push(new p(i[0], f[c]));
|
|
340
|
-
else
|
|
341
|
-
a.push(new p(i[0]));
|
|
316
|
+
for (n = 0, e = o.length; n < e; n++) if (i = o[n].split(":"), i[1]) for (var f = i[1].split(","), c = 0; c < f.length; c += 1) a.push(new p(i[0], f[c]));
|
|
317
|
+
else a.push(new p(i[0]));
|
|
342
318
|
L(r, function() {
|
|
343
319
|
t(a, s);
|
|
344
320
|
});
|
|
@@ -356,12 +332,9 @@ var ot = { exports: {} };
|
|
|
356
332
|
}
|
|
357
333
|
}
|
|
358
334
|
function _t(t) {
|
|
359
|
-
if (t.a.length == 0)
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
return t.c;
|
|
363
|
-
for (var n = t.a.length, e = [], i = 0; i < n; i++)
|
|
364
|
-
e.push(t.a[i].replace(/ /g, "+"));
|
|
335
|
+
if (t.a.length == 0) throw Error("No fonts to load!");
|
|
336
|
+
if (t.c.indexOf("kit=") != -1) return t.c;
|
|
337
|
+
for (var n = t.a.length, e = [], i = 0; i < n; i++) e.push(t.a[i].replace(/ /g, "+"));
|
|
365
338
|
return n = t.c + "?family=" + e.join("%7C"), 0 < t.f.length && (n += "&subset=" + t.f.join(",")), 0 < t.g.length && (n += "&text=" + encodeURIComponent(t.g)), n;
|
|
366
339
|
}
|
|
367
340
|
function Tt(t) {
|
|
@@ -373,28 +346,22 @@ var ot = { exports: {} };
|
|
|
373
346
|
var i = t.f[e].split(":"), o = i[0].replace(/\+/g, " "), s = ["n4"];
|
|
374
347
|
if (2 <= i.length) {
|
|
375
348
|
var r, a = i[1];
|
|
376
|
-
if (r = [], a)
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
else
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
}
|
|
390
|
-
} else
|
|
391
|
-
h = "";
|
|
392
|
-
h && r.push(h);
|
|
393
|
-
}
|
|
349
|
+
if (r = [], a) for (var a = a.split(","), f = a.length, c = 0; c < f; c++) {
|
|
350
|
+
var h;
|
|
351
|
+
if (h = a[c], h.match(/^[\w-]+$/)) {
|
|
352
|
+
var u = Ct.exec(h.toLowerCase());
|
|
353
|
+
if (u == null) h = "";
|
|
354
|
+
else {
|
|
355
|
+
if (h = u[2], h = h == null || h == "" ? "n" : Et[h], u = u[1], u == null || u == "") u = "4";
|
|
356
|
+
else var g = St[u], u = g || (isNaN(u) ? "4" : u.substr(0, 1));
|
|
357
|
+
h = [h, u].join("");
|
|
358
|
+
}
|
|
359
|
+
} else h = "";
|
|
360
|
+
h && r.push(h);
|
|
361
|
+
}
|
|
394
362
|
0 < r.length && (s = r), i.length == 3 && (i = i[2], r = [], i = i ? i.split(",") : r, 0 < i.length && (i = Z[i[0]]) && (t.c[o] = i));
|
|
395
363
|
}
|
|
396
|
-
for (t.c[o] || (i = Z[o]) && (t.c[o] = i), i = 0; i < s.length; i += 1)
|
|
397
|
-
t.a.push(new p(o, s[i]));
|
|
364
|
+
for (t.c[o] || (i = Z[o]) && (t.c[o] = i), i = 0; i < s.length; i += 1) t.a.push(new p(o, s[i]));
|
|
398
365
|
}
|
|
399
366
|
}
|
|
400
367
|
function tt(t, n) {
|
|
@@ -415,13 +382,10 @@ var ot = { exports: {} };
|
|
|
415
382
|
nt.prototype.load = function(t) {
|
|
416
383
|
var n = this.a.id, e = this.c.o;
|
|
417
384
|
n ? b(this.c, (this.a.api || "https://use.typekit.net") + "/" + n + ".js", function(i) {
|
|
418
|
-
if (i)
|
|
419
|
-
t([]);
|
|
385
|
+
if (i) t([]);
|
|
420
386
|
else if (e.Typekit && e.Typekit.config && e.Typekit.config.fn) {
|
|
421
387
|
i = e.Typekit.config.fn;
|
|
422
|
-
for (var o = [], s = 0; s < i.length; s += 2)
|
|
423
|
-
for (var r = i[s], a = i[s + 1], f = 0; f < a.length; f++)
|
|
424
|
-
o.push(new p(r, a[f]));
|
|
388
|
+
for (var o = [], s = 0; s < i.length; s += 2) for (var r = i[s], a = i[s + 1], f = 0; f < a.length; f++) o.push(new p(r, a[f]));
|
|
425
389
|
try {
|
|
426
390
|
e.Typekit.load({ events: !1, classes: !1, async: !0 });
|
|
427
391
|
} catch {
|
package/dist/node/cli.js
CHANGED
|
@@ -17,4 +17,4 @@ ${i.lib?`<eo-dash style="height:100dvh;"/>
|
|
|
17
17
|
<script type="module" src="${t.resolve(`/@fs/${c}`,"core/client/render.js")}"><\/script>
|
|
18
18
|
`}
|
|
19
19
|
</body>
|
|
20
|
-
</html>`,D=C(
|
|
20
|
+
</html>`,D=C(({mode:e,command:n})=>({base:i.base??"",cacheDir:R,plugins:[O({customElement:!1,template:{transformAssetUrls:A,compilerOptions:{isCustomElement:a=>!a.includes("v-")&&a.includes("-")}}}),T({autoImport:!0}),e==="development"&&{name:"inject-html",configureServer:J}],customLogger:m,define:{"process.env":{}},resolve:{alias:{"@":t.join(c,"core/client"),"^":t.join(c,"widgets"),"user:config":g,"user:widgets":w},extensions:[".js",".json",".jsx",".mjs",".ts",".tsx",".vue"]},server:{warmup:{clientFiles:[t.join(c,"core/client/**")]},port:i.port??3e3,open:i.open,fs:{allow:[x(process.cwd())]},host:i.host},root:c,optimizeDeps:e==="development"?{include:["webfontloader","vuetify","vue","pinia","stac-js","urijs"],noDiscovery:!0}:{},publicDir:i.publicDir===!1?!1:L,build:{lib:i.lib&&n==="build"&&{entry:t.join(c,"core/client/asWebComponent.js"),fileName:"eo-dash",formats:["es"],name:"@eodash/eodash"},outDir:f,emptyOutDir:!0,rollupOptions:i.lib&&n==="build"?{input:t.join(c,"core/client/asWebComponent.js")}:void 0,target:"esnext"}}));async function J(e){e.watcher.add([g,l,t.join(w,"**/*.vue")]);let n="";const a=m.info;return m.info=(o,r)=>{if(o.includes("core")){const d=o.split("/")[0].split(" ");d.pop();const p=d.join(" ")+" "+n.replace(s,"");return a(p,r)}return a(o,r)},e.watcher.on("change",async o=>{n=o,o===l&&e.hot.send({type:"full-reload",path:o})}),()=>{e.middlewares.use(async(o,r,d)=>{if(o.originalUrl==="/@fs/config.js"||o.originalUrl==="/config.js"){r.statusCode=200,r.setHeader("Content-Type","text/javascript"),u(l)&&await W(l).then(p=>{r.write(p)}),r.end();return}if(o.url?.endsWith(".html")){r.statusCode=200,r.setHeader("Content-Type","text/html");const p=await e.transformIndexHtml(o.url,y,o.originalUrl);r.end(p);return}d()})}}const M=async()=>{const e=await k(await D({mode:"development",command:"serve"}));await e.listen(),e.printUrls(),e.bindCLIShortcuts({print:!0})},Y=async()=>{const e=async()=>{const n=await D({mode:"production",command:"build"});await F(n),u(l)&&await N(l,t.join(f,"config.js"),{recursive:!0}).catch(a=>{console.error(a)})};if(i.lib)await e();else{const n=t.join(c,"/index.html");await I(n,y).then(async()=>{await e(),await $(n).catch(()=>{console.error("failed to remove index.html")})})}};async function B(){(await S({root:s,base:i.base??"",preview:{port:isNaN(i.port)?8080:i.port,open:i.open,host:i.host},build:{outDir:f}})).printUrls()}const G=process.argv?.[2];(async()=>{switch(G){case"dev":await M();break;case"build":await Y();break;case"preview":await B();break;default:console.error("command not found");break}})();
|
package/dist/node/types.d.ts
CHANGED
|
@@ -1,53 +1,47 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Eodash CLI configuration
|
|
3
|
+
*
|
|
3
4
|
* @group CLI
|
|
4
5
|
*/
|
|
5
6
|
export interface EodashConfig {
|
|
6
7
|
dev?: {
|
|
7
|
-
/**
|
|
8
|
-
port?: string | number
|
|
9
|
-
host?: string | boolean
|
|
10
|
-
/**
|
|
11
|
-
open?: boolean
|
|
12
|
-
}
|
|
8
|
+
/** Serving port */
|
|
9
|
+
port?: string | number;
|
|
10
|
+
host?: string | boolean;
|
|
11
|
+
/** Open default browser when the server starts */
|
|
12
|
+
open?: boolean;
|
|
13
|
+
};
|
|
13
14
|
preview?: {
|
|
14
|
-
/**
|
|
15
|
-
port?: string | number
|
|
16
|
-
host?: string | boolean
|
|
17
|
-
/**
|
|
18
|
-
open?: boolean
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Base public path
|
|
22
|
-
*/
|
|
15
|
+
/** Serving port */
|
|
16
|
+
port?: string | number;
|
|
17
|
+
host?: string | boolean;
|
|
18
|
+
/** Open default browser when the server starts */
|
|
19
|
+
open?: boolean;
|
|
20
|
+
};
|
|
21
|
+
/** Base public path */
|
|
23
22
|
base?: string;
|
|
24
|
-
/**
|
|
25
|
-
* Build target folder path
|
|
26
|
-
*/
|
|
23
|
+
/** Build target folder path */
|
|
27
24
|
outDir?: string;
|
|
28
25
|
/**
|
|
29
|
-
* Path to statically served assets folder, can be set to `false`
|
|
30
|
-
*
|
|
31
|
-
**/
|
|
32
|
-
publicDir?: string | false;
|
|
33
|
-
/**
|
|
34
|
-
* Cache folder
|
|
35
|
-
*/
|
|
36
|
-
cacheDir?: string
|
|
37
|
-
/** Specifies main entry file, exporting `createEodash`*/
|
|
38
|
-
entryPoint?: string
|
|
39
|
-
/**
|
|
40
|
-
* File exporting eodash client runtime config
|
|
26
|
+
* Path to statically served assets folder, can be set to `false` to disable
|
|
27
|
+
* serving assets statically
|
|
41
28
|
*/
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
|
|
29
|
+
publicDir?: string | false;
|
|
30
|
+
/** Cache folder */
|
|
31
|
+
cacheDir?: string;
|
|
32
|
+
/** Specifies main entry file, exporting `createEodash` */
|
|
33
|
+
entryPoint?: string;
|
|
34
|
+
/** File exporting eodash client runtime config */
|
|
35
|
+
runtime?: string;
|
|
36
|
+
/** Set a custom path for importing user defined internal widgets */
|
|
37
|
+
widgets?: string;
|
|
38
|
+
/** Builds eodash as a web component library */
|
|
39
|
+
lib?: boolean;
|
|
47
40
|
}
|
|
48
41
|
/**
|
|
49
|
-
*
|
|
50
|
-
*
|
|
42
|
+
* Helper function that provides intellisense without the need for JSDOC for
|
|
43
|
+
* `eodash.config.js`:
|
|
44
|
+
*
|
|
51
45
|
* @group CLI
|
|
52
46
|
*/
|
|
53
|
-
export declare const defineConfig: (config: EodashConfig) => EodashConfig
|
|
47
|
+
export declare const defineConfig: (config: EodashConfig) => EodashConfig;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eodash/eodash",
|
|
3
|
-
"version": "5.0.0-alpha.2.
|
|
3
|
+
"version": "5.0.0-alpha.2.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./core/client/types.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"build:lib": "npx eodash build --entryPoint core/client/eodash.js --lib --outDir dist/client",
|
|
33
33
|
"build:cli": "rollup -c",
|
|
34
34
|
"check": "vue-tsc --noEmit --skipLibCheck && eslint .",
|
|
35
|
+
"format": "prettier . --write --ignore-unknown",
|
|
35
36
|
"preview": "npx eodash preview",
|
|
36
37
|
"lint": "eslint . --fix",
|
|
37
38
|
"cypress": "cypress open --component ",
|
|
@@ -45,9 +46,9 @@
|
|
|
45
46
|
"docs:generate": "typedoc --options typedoc.config.json"
|
|
46
47
|
},
|
|
47
48
|
"dependencies": {
|
|
48
|
-
"@eox/itemfilter": "^0.14.
|
|
49
|
+
"@eox/itemfilter": "^0.14.1",
|
|
49
50
|
"@eox/layout": "^0.1.0",
|
|
50
|
-
"@eox/map": "^1.
|
|
51
|
+
"@eox/map": "^1.9.1",
|
|
51
52
|
"@eox/stacinfo": "^0.3.0",
|
|
52
53
|
"@mdi/js": "^7.4.47",
|
|
53
54
|
"@vitejs/plugin-vue": "^5.0.0",
|
|
@@ -68,26 +69,25 @@
|
|
|
68
69
|
},
|
|
69
70
|
"devDependencies": {
|
|
70
71
|
"@babel/types": "^7.21.4",
|
|
72
|
+
"@eox/eslint-config": "^2.0.0",
|
|
71
73
|
"@pinia/testing": "^0.1.3",
|
|
72
74
|
"@types/node": "latest",
|
|
73
75
|
"@types/openlayers": "^4.6.23",
|
|
74
76
|
"@types/webfontloader": "^1.6.38",
|
|
75
|
-
"@vue/eslint-config-typescript": "^11.0.0",
|
|
76
77
|
"cypress": "^13.6.6",
|
|
77
|
-
"eslint": "^
|
|
78
|
-
"eslint-plugin-
|
|
79
|
-
"
|
|
78
|
+
"eslint": "^9.4.0",
|
|
79
|
+
"eslint-plugin-vue": "^9.26.0",
|
|
80
|
+
"prettier": "^3.3.2",
|
|
80
81
|
"terminate": "^2.6.1",
|
|
81
|
-
"typedoc": "^0.
|
|
82
|
-
"typedoc-plugin-markdown": "^4.
|
|
82
|
+
"typedoc": "^0.26.3",
|
|
83
|
+
"typedoc-plugin-markdown": "^4.1.0",
|
|
83
84
|
"typedoc-plugin-vue": "^1.1.0",
|
|
84
85
|
"typedoc-vitepress-theme": "^1.0.0-next.0",
|
|
85
86
|
"typescript": "^5.0.0",
|
|
86
87
|
"unplugin-fonts": "^1.0.3",
|
|
87
88
|
"vitepress": "^1.0.0",
|
|
88
89
|
"vitest": "^1.4.0",
|
|
89
|
-
"vue-
|
|
90
|
-
"vue-tsc": "^1.2.0"
|
|
90
|
+
"vue-tsc": "2.0.22"
|
|
91
91
|
},
|
|
92
92
|
"bin": {
|
|
93
93
|
"eodash": "./dist/node/cli.js"
|
|
@@ -1,44 +1,73 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<VCDatePicker v-model="currentDate" :masks="masks" :attributes="attributes">
|
|
3
3
|
<template #default="{ inputValue, inputEvents }">
|
|
4
|
-
<div
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
<div
|
|
5
|
+
class="flex rounded-lg border border-gray-300 dark:border-gray-600"
|
|
6
|
+
style="margin: 2px"
|
|
7
|
+
>
|
|
8
|
+
<input
|
|
9
|
+
:value="inputValue"
|
|
10
|
+
v-on="inputEvents"
|
|
11
|
+
style="margin: 1px"
|
|
12
|
+
class="flex-grow px-1 py-1 bg-white dark:bg-gray-700"
|
|
13
|
+
/>
|
|
7
14
|
</div>
|
|
8
15
|
</template>
|
|
9
16
|
</VCDatePicker>
|
|
10
|
-
<v-row align="center" justify="center" style="margin-top: 6px
|
|
11
|
-
<v-btn
|
|
17
|
+
<v-row align="center" justify="center" style="margin-top: 6px">
|
|
18
|
+
<v-btn
|
|
19
|
+
style="padding: 0px; margin-right: 4px"
|
|
20
|
+
density="compact"
|
|
21
|
+
v-tooltip:bottom="'Set date to oldest available dataset'"
|
|
22
|
+
@click="jumpDate(true)"
|
|
23
|
+
>
|
|
24
|
+
<v-icon :icon="[mdiRayEndArrow]" />
|
|
25
|
+
</v-btn>
|
|
26
|
+
<v-btn
|
|
27
|
+
style="padding: 0px; margin-left: 4px"
|
|
28
|
+
density="compact"
|
|
29
|
+
v-tooltip:bottom="'Set date to latest available dataset'"
|
|
30
|
+
@click="jumpDate(false)"
|
|
31
|
+
>
|
|
12
32
|
<v-icon :icon="[mdiRayStartArrow]" />
|
|
13
33
|
</v-btn>
|
|
14
34
|
</v-row>
|
|
15
35
|
</template>
|
|
16
36
|
|
|
17
37
|
<script setup>
|
|
18
|
-
import { DatePicker as VCDatePicker } from
|
|
19
|
-
import
|
|
38
|
+
import { DatePicker as VCDatePicker } from "v-calendar";
|
|
39
|
+
import "v-calendar/style.css";
|
|
20
40
|
import { computed, ref, onMounted, watch, inject } from "vue";
|
|
21
41
|
import { eodashKey } from "@/utils/keys";
|
|
22
42
|
import { toAbsolute } from "stac-js/src/http.js";
|
|
23
43
|
import { storeToRefs } from "pinia";
|
|
24
|
-
import { useSTAcStore } from
|
|
44
|
+
import { useSTAcStore } from "@/store/stac";
|
|
25
45
|
import { datetime } from "@/store/States";
|
|
26
|
-
import { mdiRayStartArrow } from
|
|
46
|
+
import { mdiRayStartArrow, mdiRayEndArrow } from "@mdi/js";
|
|
47
|
+
import { extractCollectionUrls } from "@/utils/eodashSTAC";
|
|
27
48
|
|
|
28
|
-
|
|
49
|
+
/**
|
|
50
|
+
* @param {boolean} reverse
|
|
51
|
+
*/
|
|
52
|
+
function jumpDate(reverse) {
|
|
29
53
|
if (attributes.value && attributes.value.length > 0) {
|
|
30
54
|
// We have potentially multiple collections we need to iterate (currently only one)
|
|
31
|
-
let latestDateMS =
|
|
55
|
+
let latestDateMS = reverse ? Infinity : -Infinity;
|
|
32
56
|
attributes.value.forEach((coll) => {
|
|
33
57
|
if (coll?.dates) {
|
|
34
58
|
coll.dates.forEach((d) => {
|
|
35
59
|
// TODO: we need to handle time ranges and other options here
|
|
36
|
-
if (d instanceof Date
|
|
37
|
-
|
|
60
|
+
if (d instanceof Date) {
|
|
61
|
+
if (
|
|
62
|
+
(!reverse && d.getTime() > latestDateMS) ||
|
|
63
|
+
(reverse && d.getTime() < latestDateMS)
|
|
64
|
+
) {
|
|
65
|
+
latestDateMS = d.getTime();
|
|
66
|
+
}
|
|
38
67
|
}
|
|
39
|
-
})
|
|
68
|
+
});
|
|
40
69
|
}
|
|
41
|
-
})
|
|
70
|
+
});
|
|
42
71
|
if (latestDateMS !== 0) {
|
|
43
72
|
currentDate.value = new Date(latestDateMS);
|
|
44
73
|
}
|
|
@@ -48,28 +77,35 @@ function jumpDate() {
|
|
|
48
77
|
const eodashConfig = /** @type {import("@/types").Eodash} */ inject(eodashKey);
|
|
49
78
|
|
|
50
79
|
const masks = ref({
|
|
51
|
-
input:
|
|
80
|
+
input: "YYYY-MM-DD",
|
|
52
81
|
});
|
|
53
82
|
|
|
54
83
|
/**
|
|
55
84
|
* Attributes displayed on datepicker
|
|
56
|
-
*
|
|
85
|
+
*
|
|
86
|
+
* @type {import("vue").Ref<
|
|
87
|
+
* (
|
|
88
|
+
* | import("v-calendar/dist/types/src/utils/attribute").AttributeConfig
|
|
89
|
+
* | undefined
|
|
90
|
+
* )[]
|
|
91
|
+
* >}
|
|
57
92
|
*/
|
|
58
93
|
const attributes = ref([]);
|
|
59
94
|
|
|
60
95
|
const currentDate = computed({
|
|
61
96
|
get() {
|
|
62
|
-
return new Date(datetime.value)
|
|
97
|
+
return datetime.value ? new Date(datetime.value) : new Date();
|
|
63
98
|
},
|
|
64
99
|
/** @param {Date | string} updatedDate */
|
|
65
100
|
set(updatedDate) {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
101
|
+
if (updatedDate instanceof Date && !isNaN(updatedDate.getTime())) {
|
|
102
|
+
datetime.value = new Date(
|
|
103
|
+
updatedDate.getTime() - updatedDate.getTimezoneOffset() * 60000,
|
|
104
|
+
).toISOString();
|
|
69
105
|
} else {
|
|
70
|
-
datetime.value = new Date().toISOString()
|
|
106
|
+
datetime.value = new Date().toISOString();
|
|
71
107
|
}
|
|
72
|
-
}
|
|
108
|
+
},
|
|
73
109
|
});
|
|
74
110
|
/** @type {import("@/types").WebComponentProps["onMounted"]} */
|
|
75
111
|
onMounted(() => {
|
|
@@ -80,31 +116,46 @@ onMounted(() => {
|
|
|
80
116
|
if (updatedStac) {
|
|
81
117
|
const parentCollUrl = toAbsolute(
|
|
82
118
|
`./${updatedStac.id}/collection.json`,
|
|
83
|
-
eodashConfig.stacEndpoint
|
|
119
|
+
eodashConfig.stacEndpoint,
|
|
84
120
|
);
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
parentCollUrl
|
|
121
|
+
const collectionUrls = extractCollectionUrls(
|
|
122
|
+
selectedStac.value,
|
|
123
|
+
parentCollUrl,
|
|
88
124
|
);
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
)
|
|
97
|
-
.map((/** @type {{ datetime: string; }} */ it) => new Date(it.datetime));
|
|
98
|
-
attributes.value = [
|
|
99
|
-
{
|
|
100
|
-
bar: true,
|
|
101
|
-
dates,
|
|
102
|
-
}
|
|
125
|
+
const wongPalette = [
|
|
126
|
+
"#009E73",
|
|
127
|
+
"#0072B2",
|
|
128
|
+
"#E69F00",
|
|
129
|
+
"#CC79A7",
|
|
130
|
+
"#56B4E9",
|
|
131
|
+
"#D55E00",
|
|
103
132
|
];
|
|
133
|
+
for (let idx = 0; idx < collectionUrls.length; idx++) {
|
|
134
|
+
const stacCollection = await (
|
|
135
|
+
await fetch(collectionUrls[idx])
|
|
136
|
+
).json();
|
|
137
|
+
const dates = stacCollection.links
|
|
138
|
+
.filter(
|
|
139
|
+
(/** @type {{ rel: string; datetime: string }} */ item) =>
|
|
140
|
+
item.rel === "item" && "datetime" in item,
|
|
141
|
+
)
|
|
142
|
+
.map(
|
|
143
|
+
(/** @type {{ datetime: string }} */ it) => new Date(it.datetime),
|
|
144
|
+
);
|
|
145
|
+
attributes.value = [
|
|
146
|
+
{
|
|
147
|
+
bar: {
|
|
148
|
+
style: {
|
|
149
|
+
backgroundColor: wongPalette[idx % wongPalette.length],
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
dates,
|
|
153
|
+
},
|
|
154
|
+
];
|
|
155
|
+
}
|
|
104
156
|
}
|
|
105
157
|
},
|
|
106
|
-
{ immediate: true }
|
|
158
|
+
{ immediate: true },
|
|
107
159
|
);
|
|
108
160
|
});
|
|
109
|
-
|
|
110
161
|
</script>
|