@eodash/eodash 5.0.0-alpha.2 → 5.0.0-alpha.2.10
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/LICENSE +21 -0
- package/README.md +36 -3
- package/core/client/App.vue +26 -0
- package/core/client/SuspensedDashboard.ce.vue +105 -0
- package/core/client/asWebComponent.d.ts +23 -0
- package/core/client/asWebComponent.js +12 -0
- package/core/client/components/DashboardLayout.vue +77 -0
- package/core/client/components/DynamicWebComponent.vue +68 -0
- package/core/client/components/ErrorAlert.vue +36 -0
- package/core/{components → client/components}/Footer.vue +34 -15
- package/core/client/components/Header.vue +19 -0
- package/core/client/components/IframeWrapper.vue +11 -0
- package/core/client/components/Loading.vue +37 -0
- package/core/client/components/MobileLayout.vue +109 -0
- package/core/client/composables/DefineEodash.js +67 -0
- package/core/client/composables/DefineWidgets.js +161 -0
- package/core/client/composables/index.js +136 -0
- package/core/client/eodash.js +136 -0
- package/core/client/main.js +2 -0
- package/core/client/plugins/index.js +20 -0
- package/core/client/plugins/vuetify.js +35 -0
- package/core/client/render.js +12 -0
- package/core/client/store/Actions.js +62 -0
- package/core/client/store/States.js +21 -0
- package/core/client/store/index.js +20 -0
- package/core/client/store/stac.js +81 -0
- package/core/client/types.d.ts +287 -0
- package/core/client/utils/eodashSTAC.js +337 -0
- package/core/client/utils/helpers.js +172 -0
- package/core/client/utils/index.js +51 -0
- package/core/{utils → client/utils}/keys.js +2 -2
- package/core/client/views/Dashboard.vue +116 -0
- package/core/client/vite-env.d.ts +39 -0
- package/dist/client/DashboardLayout-C_3q8Y10.js +156 -0
- package/dist/{DynamicWebComponent-BDOQsEcj.js → client/DynamicWebComponent-IiTTLBt-.js} +11 -11
- package/dist/client/EodashDatePicker-DgC1lccp.js +252 -0
- package/dist/{eox-itemfilter-DcQkRD2l.js → client/EodashItemFilter-DoWZGe6r.js} +1515 -1381
- package/dist/client/EodashMap-C96D3LLv.js +114352 -0
- package/dist/client/EodashMapBtns-DDtzV94u.js +50 -0
- package/dist/client/ExportState-CduS2mFs.js +558 -0
- package/dist/client/Footer-DHQcutCv.js +115 -0
- package/dist/client/Header-DC0y7rLK.js +350 -0
- package/dist/{IframeWrapper-DYHQQRUh.js → client/IframeWrapper-BK-10FbS.js} +4 -4
- package/dist/client/MobileLayout-BpLoMY4i.js +945 -0
- package/dist/client/PopUp-CNMCWL0z.js +300 -0
- package/dist/client/VImg-DT7eb8V-.js +291 -0
- package/dist/client/VMain-OenWyy46.js +39 -0
- package/dist/client/VOverlay-x3UXpKhr.js +972 -0
- package/dist/{WidgetsContainer-D_PLP1qf.js → client/WidgetsContainer-qMUwtN0W.js} +26 -19
- package/dist/client/asWebComponent-DQrnLsI2.js +20404 -0
- package/dist/{basedecoder-Qm25PwVp-CHo5Pomv.js → client/basedecoder-DHcBySSe-BmCFNFnw.js} +5 -6
- package/dist/{decoder-kAoyGIq9-HAkjSTCt.js → client/decoder-Cth6J7EK-CtUoHA6r.js} +1 -1
- package/dist/client/deflate-BXt-9JA_-CWfClgpK.js +10 -0
- package/dist/client/eo-dash.js +6 -0
- package/dist/client/eox-jsonform-DCErgjhw.js +17515 -0
- package/dist/client/eox-layercontrol-D0Ht7Mag.js +21298 -0
- package/dist/client/eox-stacinfo-l7ALSV90.js +13969 -0
- package/dist/client/forwardRefs-CpNjL95t.js +185 -0
- package/dist/client/helpers-KCSgmfim.js +1417 -0
- package/dist/{index-8ch8xKfa.js → client/index-DopVrUzM.js} +21 -20
- package/dist/{jpeg-DNfUpLwy-Fjan-04T.js → client/jpeg-BAgeD1d3-oeHbFPUL.js} +5 -6
- package/dist/{lerc-C9VL9kri-DyVxBvsf.js → client/lerc-BgbQqdFI-D986ErVw.js} +37 -39
- package/dist/{lzw-BOMhmEDy-Dboc93VO.js → client/lzw-LAGDNbSC-DkP96qO9.js} +1 -1
- package/dist/{packbits-DaUD6MLm-Bu1PoTGa.js → client/packbits-BlDR4Kj5-C66n1-zr.js} +1 -1
- package/dist/{pako.esm-C3kYPGGQ-BMki8cQY.js → client/pako.esm-CB1uQYY0-DB0PYm1P.js} +6 -12
- package/dist/{raw-CcGKjn8q-DFOt-i8n.js → client/raw-CMGvRjfu-BRi6E4i1.js} +1 -1
- package/dist/{ssrBoot-Cm5pWM14.js → client/ssrBoot-DkjdOWvj.js} +1 -1
- package/dist/client/style.css +5 -0
- package/dist/client/transition-BtJHh7JK.js +34 -0
- package/dist/{webfontloader-CyOFAuFB.js → client/webfontloader-qotgY98I.js} +56 -92
- package/dist/{webimage-D2c098k3-DLj1LQxB.js → client/webimage-BM_pbLN3-L2cGWK5l.js} +1 -1
- package/dist/node/cli.js +20 -0
- package/dist/node/main.js +2 -0
- package/dist/node/types.d.ts +47 -0
- package/package.json +54 -51
- package/widgets/EodashDatePicker.vue +145 -40
- package/widgets/EodashItemFilter.vue +73 -38
- package/widgets/EodashMap.vue +210 -37
- package/widgets/EodashMapBtns.vue +50 -0
- package/widgets/ExportState.vue +112 -0
- package/widgets/PopUp.vue +40 -0
- package/widgets/WidgetsContainer.vue +47 -27
- package/bin/app.js +0 -22
- package/bin/cli.js +0 -62
- package/bin/main.js +0 -9
- package/bin/serverConfig.js +0 -165
- package/bin/types.d.ts +0 -52
- package/bin/utils.js +0 -103
- package/core/App.vue +0 -19
- package/core/SuspensedDashboard.ce.vue +0 -59
- package/core/asWebComponent.d.ts +0 -18
- package/core/asWebComponent.js +0 -12
- package/core/components/DashboardLayout.vue +0 -54
- package/core/components/DynamicWebComponent.vue +0 -68
- package/core/components/Header.vue +0 -14
- package/core/components/IframeWrapper.vue +0 -11
- package/core/components/Loading.vue +0 -27
- package/core/components/MobileLayout.vue +0 -49
- package/core/composables/DefineEodash.js +0 -57
- package/core/composables/DefineWidgets.js +0 -129
- package/core/composables/index.js +0 -219
- package/core/eodash.js +0 -100
- package/core/main.js +0 -2
- package/core/plugins/index.js +0 -18
- package/core/plugins/vuetify.js +0 -30
- package/core/render.js +0 -13
- package/core/store/Actions.js +0 -0
- package/core/store/States.js +0 -21
- package/core/store/index.js +0 -17
- package/core/store/stac.js +0 -63
- package/core/types.d.ts +0 -355
- package/core/utils/eodashSTAC.js +0 -164
- package/core/utils/helpers.js +0 -40
- package/core/utils/index.js +0 -28
- package/core/views/Dashboard.vue +0 -59
- package/core/vite-env.d.ts +0 -31
- package/dist/DashboardLayout-YLfAa8wH.js +0 -168
- package/dist/EodashDatePicker-DlehqSgz.js +0 -1645
- package/dist/EodashItemFilter-TSp7XRGy.js +0 -51
- package/dist/EodashMap-DInb9cfS.js +0 -53405
- package/dist/Footer-CIzHgJbK.js +0 -118
- package/dist/Header-C5PSB8Uc.js +0 -609
- package/dist/MobileLayout-DZmqrpub.js +0 -523
- package/dist/VBtn-CFPhsIX8.js +0 -1106
- package/dist/VMain-deI9jyIf.js +0 -35
- package/dist/asWebComponent-BKe6Spni.js +0 -11323
- package/dist/color-D72nEBIR.js +0 -115
- package/dist/deflate-Be2Arps5-hDqMz3RA.js +0 -10
- package/dist/dimensions-BZkmIizV.js +0 -53
- package/dist/eo-dash.js +0 -6
- package/dist/eox-map-BJ9SIixs.js +0 -36205
- package/dist/eox-stacinfo-B-YrT7Ug.js +0 -13698
- package/dist/forwardRefs-Bxeu9Obx.js +0 -142
- package/dist/index-DIt8GjSR.js +0 -65
- package/dist/style.css +0 -5
- /package/dist/{.gitkeep → client/.gitkeep} +0 -0
- /package/dist/{_commonjsHelpers-DaMA6jEr.js → client/_commonjsHelpers-DaMA6jEr.js} +0 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
|
2
|
+
|
|
3
|
+
declare module "*.vue" {
|
|
4
|
+
import type { DefineComponent } from "vue";
|
|
5
|
+
const component: DefineComponent<object, object, unknown>;
|
|
6
|
+
export default component;
|
|
7
|
+
}
|
|
8
|
+
declare interface Window {
|
|
9
|
+
eodashStore: import("@/types").EodashStore;
|
|
10
|
+
}
|
|
11
|
+
declare module "@eox/stacinfo" {
|
|
12
|
+
export const EOxStacInfo: CustomElementConstructor;
|
|
13
|
+
}
|
|
14
|
+
declare module "@eox/layercontrol" {
|
|
15
|
+
export const EOxLayerControl: CustomElementConstructor;
|
|
16
|
+
}
|
|
17
|
+
declare module "@eox/jsonform" {
|
|
18
|
+
export const EOxJSONForm: CustomElementConstructor;
|
|
19
|
+
}
|
|
20
|
+
declare module "@eox/map" {
|
|
21
|
+
export const EOxMap: CustomElementConstructor;
|
|
22
|
+
}
|
|
23
|
+
declare module "@eox/itemfilter" {
|
|
24
|
+
export const EOxItemFilter: CustomElementConstructor;
|
|
25
|
+
}
|
|
26
|
+
declare module "user:config" {
|
|
27
|
+
const eodash: import("@/types").Eodash | Promise<import("@/types").Eodash>;
|
|
28
|
+
export default eodash;
|
|
29
|
+
}
|
|
30
|
+
declare module "stac-js" {
|
|
31
|
+
export const Collection: {
|
|
32
|
+
new (data?: object): import("stac-ts").StacCollection;
|
|
33
|
+
};
|
|
34
|
+
export const Item: { new (data?: object): import("stac-ts").StacItem };
|
|
35
|
+
}
|
|
36
|
+
declare module "stac-js/src/http.js" {
|
|
37
|
+
const toAbsolute: (...args: string[]) => string;
|
|
38
|
+
export { toAbsolute };
|
|
39
|
+
}
|
|
@@ -0,0 +1,156 @@
|
|
|
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-DQrnLsI2.js";
|
|
2
|
+
import { V as k } from "./VMain-OenWyy46.js";
|
|
3
|
+
class A extends HTMLElement {
|
|
4
|
+
static get observedAttributes() {
|
|
5
|
+
return ["gap"];
|
|
6
|
+
}
|
|
7
|
+
constructor() {
|
|
8
|
+
super(), this.attachShadow({ mode: "open" }), this.render();
|
|
9
|
+
}
|
|
10
|
+
render() {
|
|
11
|
+
this.shadowRoot.innerHTML = `
|
|
12
|
+
<style>
|
|
13
|
+
:host {
|
|
14
|
+
display: grid;
|
|
15
|
+
padding: ${this.getAttribute("gap") || 0}px;
|
|
16
|
+
height: 100%;
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
gap: ${this.getAttribute("gap") || "0"}px;
|
|
19
|
+
grid-template-columns: repeat(12, 1fr);
|
|
20
|
+
grid-template-rows: repeat(12, 1fr);
|
|
21
|
+
}
|
|
22
|
+
</style>
|
|
23
|
+
<slot></slot>
|
|
24
|
+
`;
|
|
25
|
+
}
|
|
26
|
+
attributeChangedCallback(a, s, o) {
|
|
27
|
+
s !== o && (this[a] = o), this.render();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
class C extends HTMLElement {
|
|
31
|
+
static get observedAttributes() {
|
|
32
|
+
return ["x", "y", "w", "h"];
|
|
33
|
+
}
|
|
34
|
+
constructor() {
|
|
35
|
+
super(), this.attachShadow({ mode: "open" }), this.render();
|
|
36
|
+
}
|
|
37
|
+
render() {
|
|
38
|
+
this.shadowRoot.innerHTML = `
|
|
39
|
+
<style>
|
|
40
|
+
:host {
|
|
41
|
+
background: lightgrey;
|
|
42
|
+
border: 1px solid darkgrey;
|
|
43
|
+
border-radius: 4px;
|
|
44
|
+
padding: 4px 8px;
|
|
45
|
+
overflow: hidden;
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
grid-column: ${parseInt(this.getAttribute("x")) + 1} / span ${this.getAttribute("w")};
|
|
49
|
+
grid-row: ${parseInt(this.getAttribute("y")) + 1} / span ${this.getAttribute("h")};
|
|
50
|
+
}
|
|
51
|
+
</style>
|
|
52
|
+
<slot></slot>
|
|
53
|
+
`;
|
|
54
|
+
}
|
|
55
|
+
attributeChangedCallback(a, s, o) {
|
|
56
|
+
s !== o && (this[a] = o), this.render();
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
customElements.define("eox-layout", A);
|
|
60
|
+
customElements.define("eox-layout-item", C);
|
|
61
|
+
const L = ["gap"], $ = {
|
|
62
|
+
key: 0,
|
|
63
|
+
class: "bg-panel",
|
|
64
|
+
x: "0",
|
|
65
|
+
y: "0",
|
|
66
|
+
h: "12",
|
|
67
|
+
w: "12"
|
|
68
|
+
}, E = ["h", "w", "x", "y"], M = {
|
|
69
|
+
__name: "DashboardLayout",
|
|
70
|
+
setup(i) {
|
|
71
|
+
const a = (
|
|
72
|
+
/** @type {import("@/types").Eodash} */
|
|
73
|
+
m(x)
|
|
74
|
+
), [s] = d([a.template?.background]), o = d(a.template?.widgets);
|
|
75
|
+
return (T, B) => (t(), r(k, null, {
|
|
76
|
+
default: l(() => [
|
|
77
|
+
_("eox-layout", {
|
|
78
|
+
gap: n(a).template.gap ?? 2
|
|
79
|
+
}, [
|
|
80
|
+
n(s).component ? (t(), u("eox-layout-item", $, [
|
|
81
|
+
(t(), r(c, { suspensible: "" }, {
|
|
82
|
+
default: l(() => [
|
|
83
|
+
(t(), r(
|
|
84
|
+
p(n(s).component),
|
|
85
|
+
h({ id: "bg-widget" }, n(s).props),
|
|
86
|
+
null,
|
|
87
|
+
16
|
|
88
|
+
/* FULL_PROPS */
|
|
89
|
+
))
|
|
90
|
+
]),
|
|
91
|
+
_: 1
|
|
92
|
+
/* STABLE */
|
|
93
|
+
}))
|
|
94
|
+
])) : g("v-if", !0),
|
|
95
|
+
(t(!0), u(
|
|
96
|
+
f,
|
|
97
|
+
null,
|
|
98
|
+
v(n(o), (e, b) => (t(), r(
|
|
99
|
+
w,
|
|
100
|
+
{
|
|
101
|
+
key: b,
|
|
102
|
+
name: "fade"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
default: l(() => [
|
|
106
|
+
e.value.component ? (t(), u("eox-layout-item", {
|
|
107
|
+
key: e.value.id,
|
|
108
|
+
class: "panel bg-surface",
|
|
109
|
+
h: e.value.layout.h,
|
|
110
|
+
w: e.value.layout.w,
|
|
111
|
+
x: e.value.layout.x,
|
|
112
|
+
y: e.value.layout.y
|
|
113
|
+
}, [
|
|
114
|
+
(t(), r(
|
|
115
|
+
c,
|
|
116
|
+
{ suspensible: "" },
|
|
117
|
+
{
|
|
118
|
+
default: l(() => [
|
|
119
|
+
(t(), r(
|
|
120
|
+
p(e.value.component),
|
|
121
|
+
h({
|
|
122
|
+
key: e.value.id,
|
|
123
|
+
ref_for: !0
|
|
124
|
+
}, e.value.props),
|
|
125
|
+
null,
|
|
126
|
+
16
|
|
127
|
+
/* FULL_PROPS */
|
|
128
|
+
))
|
|
129
|
+
]),
|
|
130
|
+
_: 2
|
|
131
|
+
/* DYNAMIC */
|
|
132
|
+
},
|
|
133
|
+
1024
|
|
134
|
+
/* DYNAMIC_SLOTS */
|
|
135
|
+
))
|
|
136
|
+
], 8, E)) : g("v-if", !0)
|
|
137
|
+
]),
|
|
138
|
+
_: 2
|
|
139
|
+
/* DYNAMIC */
|
|
140
|
+
},
|
|
141
|
+
1024
|
|
142
|
+
/* DYNAMIC_SLOTS */
|
|
143
|
+
))),
|
|
144
|
+
128
|
|
145
|
+
/* KEYED_FRAGMENT */
|
|
146
|
+
))
|
|
147
|
+
], 8, L)
|
|
148
|
+
]),
|
|
149
|
+
_: 1
|
|
150
|
+
/* STABLE */
|
|
151
|
+
}));
|
|
152
|
+
}
|
|
153
|
+
}, V = /* @__PURE__ */ y(M, [["__scopeId", "data-v-a859692c"]]);
|
|
154
|
+
export {
|
|
155
|
+
V as default
|
|
156
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const h = { class: "d-flex flex-column fill-height overflow-auto" },
|
|
1
|
+
import { bC as i, aA as m, r as p, Z as d, aL as f, $ as c, a6 as g, a0 as y, d as _, a4 as k } from "./asWebComponent-DQrnLsI2.js";
|
|
2
|
+
const h = { class: "d-flex flex-column fill-height overflow-auto" }, N = {
|
|
3
3
|
__name: "DynamicWebComponent",
|
|
4
4
|
props: {
|
|
5
5
|
link: {
|
|
@@ -19,26 +19,26 @@ const h = { class: "d-flex flex-column fill-height overflow-auto" }, x = {
|
|
|
19
19
|
onUnmounted: Function
|
|
20
20
|
},
|
|
21
21
|
async setup(o) {
|
|
22
|
-
let t,
|
|
22
|
+
let t, a;
|
|
23
23
|
const e = (
|
|
24
|
-
/** @type {import("@/types").WebComponentProps}
|
|
24
|
+
/** @type {import("@/types").WebComponentProps} */
|
|
25
25
|
o
|
|
26
26
|
), u = async () => typeof e.link == "string" ? await import(
|
|
27
27
|
/* @vite-ignore */
|
|
28
28
|
e.link
|
|
29
|
-
) : await e.link(), l = customElements.get(e.tagName) ? null : ([t,
|
|
29
|
+
) : await e.link(), l = customElements.get(e.tagName) ? null : ([t, a] = i(() => u().catch((n) => {
|
|
30
30
|
console.error(n);
|
|
31
|
-
})), t = await t,
|
|
31
|
+
})), t = await t, a(), t);
|
|
32
32
|
if (!customElements.get(e.tagName) && e.constructorProp) {
|
|
33
33
|
const n = l[e.constructorProp];
|
|
34
34
|
customElements.define(e.tagName, n);
|
|
35
35
|
}
|
|
36
|
-
const
|
|
36
|
+
const s = m(), r = p(null);
|
|
37
37
|
return d(() => {
|
|
38
|
-
e.onMounted?.(r.value,
|
|
38
|
+
e.onMounted?.(r.value, s);
|
|
39
39
|
}), f(() => {
|
|
40
|
-
e.onUnmounted?.(r.value,
|
|
41
|
-
}), (n,
|
|
40
|
+
e.onUnmounted?.(r.value, s);
|
|
41
|
+
}), (n, w) => (c(), g("span", h, [
|
|
42
42
|
(c(), y(
|
|
43
43
|
k(o.tagName),
|
|
44
44
|
_(o.properties, {
|
|
@@ -53,5 +53,5 @@ const h = { class: "d-flex flex-column fill-height overflow-auto" }, x = {
|
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
55
|
export {
|
|
56
|
-
|
|
56
|
+
N as default
|
|
57
57
|
};
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import { p as B, o as $, g as j, y as _, av as I, c as v, r as V, d as w, a as M, b as p, aw as R, ax as O, T as U, ay as F, x as N, Z as Y, az as H, aA as z, w as G, $ as h, 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 } from "./asWebComponent-DQrnLsI2.js";
|
|
2
|
+
import { t as tt, e as et } from "./helpers-KCSgmfim.js";
|
|
3
|
+
import { m as at, V as E } from "./VOverlay-x3UXpKhr.js";
|
|
4
|
+
import { b as ot, f as nt } from "./forwardRefs-CpNjL95t.js";
|
|
5
|
+
const st = B({
|
|
6
|
+
id: String,
|
|
7
|
+
text: String,
|
|
8
|
+
...$(at({
|
|
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"), rt = j()({
|
|
23
|
+
name: "VTooltip",
|
|
24
|
+
props: st(),
|
|
25
|
+
emits: {
|
|
26
|
+
"update:modelValue": (t) => !0
|
|
27
|
+
},
|
|
28
|
+
setup(t, r) {
|
|
29
|
+
let {
|
|
30
|
+
slots: i
|
|
31
|
+
} = r;
|
|
32
|
+
const o = _(t, "modelValue"), {
|
|
33
|
+
scopeId: n
|
|
34
|
+
} = ot(), 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"), u = v(() => t.transition ? t.transition : o.value ? "scale-transition" : "fade-transition"), f = v(() => w({
|
|
35
|
+
"aria-describedby": e.value
|
|
36
|
+
}, t.activatorProps));
|
|
37
|
+
return M(() => {
|
|
38
|
+
const b = E.filterProps(t);
|
|
39
|
+
return p(E, w({
|
|
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: u.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, d = new Array(m), g = 0; g < m; g++)
|
|
59
|
+
d[g] = arguments[g];
|
|
60
|
+
return i.default?.(...d) ?? t.text;
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
}), nt({}, a);
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
function it(t, r) {
|
|
67
|
+
const i = typeof t == "string" ? R(t) : t, o = lt(i, r);
|
|
68
|
+
return {
|
|
69
|
+
mounted: o,
|
|
70
|
+
updated: o,
|
|
71
|
+
unmounted(n) {
|
|
72
|
+
O(null, n);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
function lt(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.$ ? ct(n, o.instance.$)?.provides : n.ctx?.provides) ?? o.instance.$.provides, u = F(t, w(l, a), s);
|
|
79
|
+
u.appContext = Object.assign(/* @__PURE__ */ Object.create(null), o.instance.$.appContext, {
|
|
80
|
+
provides: c
|
|
81
|
+
}), O(u, i);
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
function ct(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 = it(rt, (t) => ({
|
|
107
|
+
activator: "parent",
|
|
108
|
+
location: t.arg?.replace("-", " ") ?? "top",
|
|
109
|
+
text: typeof t.value == "boolean" ? void 0 : t.value
|
|
110
|
+
})), ut = {
|
|
111
|
+
class: "flex rounded-lg border border-gray-300 dark:border-gray-600",
|
|
112
|
+
style: { margin: "2px" }
|
|
113
|
+
}, dt = ["value"], gt = {
|
|
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
|
+
N(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 Y(() => {
|
|
143
|
+
const { selectedStac: e } = H(z());
|
|
144
|
+
G(
|
|
145
|
+
[e],
|
|
146
|
+
async ([a]) => {
|
|
147
|
+
if (a) {
|
|
148
|
+
const s = tt(
|
|
149
|
+
`./${a.id}/collection.json`,
|
|
150
|
+
i.stacEndpoint
|
|
151
|
+
), c = et(
|
|
152
|
+
e.value,
|
|
153
|
+
s
|
|
154
|
+
), u = [
|
|
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 (await fetch(c[f])).json()).links.filter(
|
|
164
|
+
(d) => d.rel === "item" && "datetime" in d
|
|
165
|
+
).map(
|
|
166
|
+
(d) => new Date(d.datetime)
|
|
167
|
+
);
|
|
168
|
+
n.value = [
|
|
169
|
+
{
|
|
170
|
+
bar: {
|
|
171
|
+
style: {
|
|
172
|
+
backgroundColor: u[f % u.length]
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
dates: m
|
|
176
|
+
}
|
|
177
|
+
];
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
{ immediate: !0 }
|
|
182
|
+
);
|
|
183
|
+
}), (e, a) => (h(), 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", ut, [
|
|
195
|
+
k("input", w({ 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, dt)
|
|
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((h(), 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((h(), 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
|
+
gt as default
|
|
252
|
+
};
|