@eodash/eodash 5.0.0-alpha.2.17 → 5.0.0-alpha.2.19
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/core/client/App.vue +2 -0
- package/core/client/composables/EodashMap.js +139 -100
- package/core/client/eodash.js +32 -12
- package/core/client/plugins/index.js +2 -1
- package/core/client/store/Actions.js +6 -0
- package/core/client/utils/createLayers.js +32 -11
- package/core/client/utils/eodashSTAC.js +22 -5
- package/core/client/utils/helpers.js +19 -14
- package/core/client/vite-env.d.ts +1 -0
- package/dist/client/{DashboardLayout-BR1lU9ER.js → DashboardLayout-CU4js3lr.js} +2 -2
- package/dist/client/{DynamicWebComponent-7z8VFsrZ.js → DynamicWebComponent-BsYZdIEB.js} +2 -2
- package/dist/client/EodashDatePicker-DZoH_gRX.js +276 -0
- package/dist/client/{EodashItemFilter-lNjVkidr.js → EodashItemFilter-CHBfsFSm.js} +1362 -1347
- package/dist/client/{EodashLayerControl-B0N8_XmX.js → EodashLayerControl-CuY-cAx8.js} +4773 -4593
- package/dist/client/{EodashMap-DFT2R2Rk.js → EodashMap-Ch43fWNv.js} +21032 -20669
- package/dist/client/{EodashMapBtns-CoGjVl8Y.js → EodashMapBtns-CFA2uti4.js} +2 -2
- package/dist/client/{ExportState-Dwv37MRw.js → ExportState-C6raDjTt.js} +68 -69
- package/dist/client/{Footer-DuScuHSx.js → Footer-D8T5ROhF.js} +1 -1
- package/dist/client/{Header-C4Y0u0E5.js → Header-B8B4Z5R9.js} +4 -4
- package/dist/client/{IframeWrapper-D1TfK4xH.js → IframeWrapper-BK2JxzSJ.js} +1 -1
- package/dist/client/{MobileLayout-C-b8DIFO.js → MobileLayout-aZaYvF8V.js} +51 -51
- package/dist/client/{PopUp-DBMZX3l3.js → PopUp-DdHXoNOP.js} +42 -42
- package/dist/client/{VImg-bAMQHnMM.js → VImg-yb8O1cb8.js} +2 -2
- package/dist/client/{VMain-Df5VMG9r.js → VMain-Dknnyxts.js} +2 -2
- package/dist/client/{VOverlay-D5GzAYRY.js → VOverlay-BCOn3hd6.js} +64 -64
- package/dist/client/{WidgetsContainer-yZDmY6_u.js → WidgetsContainer-BixUyr1e.js} +3 -3
- package/dist/client/{asWebComponent-DhR2_xlP.js → asWebComponent-CHqY8A1z.js} +7231 -7087
- package/dist/client/eo-dash.js +1 -1
- package/dist/client/{forwardRefs-C0MQxvur.js → forwardRefs-dcYA2XVU.js} +1 -1
- package/dist/client/{index-qNWeBhRh.js → index-BVuSHaVu.js} +23 -23
- package/dist/client/{lerc-B4lXefGh-CsL-d8wY.js → lerc-BPVtQnt3-08GHszVp.js} +1 -1
- package/dist/client/{ssrBoot-Xmkz8T49.js → ssrBoot-DU2S_nLc.js} +1 -1
- package/dist/client/style.css +1 -1
- package/dist/client/{transition-DRzZPWIN.js → transition-C_fi1aa6.js} +1 -1
- package/dist/client/{webfontloader-CqD-lAx-.js → webfontloader-Ofarvipf.js} +1 -1
- package/package.json +6 -7
- package/widgets/EodashDatePicker.vue +24 -12
- package/widgets/EodashLayerControl.vue +23 -4
- package/widgets/EodashMap.vue +43 -25
- package/dist/client/EodashDatePicker-o7ZOYIHL.js +0 -259
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.19",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./core/client/types.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -47,16 +47,15 @@
|
|
|
47
47
|
"docs:generate": "typedoc --options typedoc.config.json"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@eox/itemfilter": "^1.1.
|
|
50
|
+
"@eox/itemfilter": "^1.1.1",
|
|
51
51
|
"@eox/jsonform": "^0.8.2",
|
|
52
|
-
"@eox/layercontrol": "^0.
|
|
52
|
+
"@eox/layercontrol": "^0.21.0",
|
|
53
53
|
"@eox/layout": "^0.1.0",
|
|
54
|
-
"@eox/map": "^1.13.
|
|
54
|
+
"@eox/map": "^1.13.1",
|
|
55
55
|
"@eox/stacinfo": "^0.3.3",
|
|
56
|
-
"@eox/timecontrol": "^0.
|
|
56
|
+
"@eox/timecontrol": "^0.8.0",
|
|
57
57
|
"@mdi/js": "^7.4.47",
|
|
58
58
|
"@vitejs/plugin-vue": "^5.1.2",
|
|
59
|
-
"@vueuse/core": "^10.11.1",
|
|
60
59
|
"animated-details": "gist:2912bb049fa906671807415eb0e87188",
|
|
61
60
|
"axios": "^1.7.4",
|
|
62
61
|
"axios-cache-interceptor": "^1.5.3",
|
|
@@ -70,7 +69,7 @@
|
|
|
70
69
|
"v-calendar": "^3.1.2",
|
|
71
70
|
"vite": "^5.4.2",
|
|
72
71
|
"vite-plugin-vuetify": "^2.0.4",
|
|
73
|
-
"vue": "
|
|
72
|
+
"vue": "3.4.38",
|
|
74
73
|
"vuetify": "^3.7.0",
|
|
75
74
|
"webfontloader": "^1.6.28"
|
|
76
75
|
},
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
/>
|
|
18
18
|
</div>
|
|
19
19
|
</template>
|
|
20
|
+
<template #footer v-if="hintText">
|
|
21
|
+
<div class="w-full px-4 pb-3" style="font-size: 12px">
|
|
22
|
+
<span v-html="hintText" />
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
20
25
|
</VCDatePicker>
|
|
21
26
|
<v-row align="center" justify="center" style="margin-top: 6px">
|
|
22
27
|
<v-btn
|
|
@@ -37,6 +42,12 @@
|
|
|
37
42
|
</v-btn>
|
|
38
43
|
</v-row>
|
|
39
44
|
</template>
|
|
45
|
+
<style>
|
|
46
|
+
.vc-day-content {
|
|
47
|
+
color: #5e5e5e;
|
|
48
|
+
font-weight: normal;
|
|
49
|
+
}
|
|
50
|
+
</style>
|
|
40
51
|
|
|
41
52
|
<script setup>
|
|
42
53
|
import { DatePicker as VCDatePicker } from "v-calendar";
|
|
@@ -67,6 +78,13 @@ const masks = ref({
|
|
|
67
78
|
input: "YYYY-MM-DD",
|
|
68
79
|
});
|
|
69
80
|
|
|
81
|
+
defineProps({
|
|
82
|
+
hintText: {
|
|
83
|
+
type: String,
|
|
84
|
+
default: null,
|
|
85
|
+
},
|
|
86
|
+
});
|
|
87
|
+
|
|
70
88
|
/**
|
|
71
89
|
* Attributes displayed on datepicker
|
|
72
90
|
*
|
|
@@ -119,20 +137,14 @@ watch(
|
|
|
119
137
|
},
|
|
120
138
|
},
|
|
121
139
|
dates,
|
|
140
|
+
content: {
|
|
141
|
+
style: {
|
|
142
|
+
color: "#000000",
|
|
143
|
+
"font-weight": "bold",
|
|
144
|
+
},
|
|
145
|
+
},
|
|
122
146
|
});
|
|
123
147
|
}
|
|
124
|
-
// We try to set the current time selection
|
|
125
|
-
// to latest extent date
|
|
126
|
-
// @ts-expect-error it seems the temporal extent is not defined in type
|
|
127
|
-
const interval = updatedStac?.extent?.temporal?.interval;
|
|
128
|
-
if (interval && interval.length > 0 && interval[0].length > 1) {
|
|
129
|
-
const endInterval = new Date(interval[0][1]);
|
|
130
|
-
log.debug(
|
|
131
|
-
"Datepicker: found stac extent, setting time to latest value",
|
|
132
|
-
endInterval,
|
|
133
|
-
);
|
|
134
|
-
currentDate.value = endInterval?.getTime();
|
|
135
|
-
}
|
|
136
148
|
}
|
|
137
149
|
},
|
|
138
150
|
{ immediate: true },
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<span class="d-flex flex-column fill-height overflow-auto
|
|
2
|
+
<span class="d-flex flex-column fill-height overflow-auto">
|
|
3
3
|
<eox-layercontrol
|
|
4
|
-
v-if="
|
|
4
|
+
v-if="showControls"
|
|
5
5
|
:for="mapElement"
|
|
6
|
+
.tools="['datetime', 'info', 'config', 'opacity']"
|
|
6
7
|
@datetime:updated="debouncedHandleDateTime"
|
|
7
8
|
class="fill-height"
|
|
9
|
+
toolsAsList="true"
|
|
8
10
|
ref="eoxLayercontrol"
|
|
9
11
|
/>
|
|
10
12
|
</span>
|
|
@@ -14,10 +16,12 @@ import "@eox/layercontrol";
|
|
|
14
16
|
import "@eox/jsonform";
|
|
15
17
|
import "@eox/timecontrol";
|
|
16
18
|
|
|
17
|
-
import { ref } from "vue";
|
|
19
|
+
import { computed, ref } from "vue";
|
|
18
20
|
import { mapEl, mapCompareEl } from "@/store/States";
|
|
19
21
|
import { getColFromLayer } from "@/utils/helpers";
|
|
20
22
|
import { eodashCollections, eodashCompareCollections } from "@/utils/states";
|
|
23
|
+
import { storeToRefs } from "pinia";
|
|
24
|
+
import { useSTAcStore } from "@/store/stac";
|
|
21
25
|
|
|
22
26
|
const props = defineProps({
|
|
23
27
|
map: {
|
|
@@ -26,6 +30,17 @@ const props = defineProps({
|
|
|
26
30
|
},
|
|
27
31
|
});
|
|
28
32
|
|
|
33
|
+
const showControls = computed(() => {
|
|
34
|
+
const { selectedCompareStac, selectedStac } = storeToRefs(useSTAcStore());
|
|
35
|
+
if (props.map === "second") {
|
|
36
|
+
return mapCompareEl.value !== null && selectedCompareStac.value !== null;
|
|
37
|
+
}
|
|
38
|
+
if (mapEl.value !== null && selectedStac.value !== null) {
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
return false;
|
|
42
|
+
});
|
|
43
|
+
|
|
29
44
|
const eodashCols =
|
|
30
45
|
props.map === "second" ? eodashCompareCollections : eodashCollections;
|
|
31
46
|
const mapElement = props.map === "second" ? mapCompareEl : mapEl;
|
|
@@ -44,7 +59,11 @@ const handleDatetimeUpdate = async (evt) => {
|
|
|
44
59
|
|
|
45
60
|
if (ec) {
|
|
46
61
|
await ec.fetchCollection();
|
|
47
|
-
updatedLayers = await ec.updateLayerJson(
|
|
62
|
+
updatedLayers = await ec.updateLayerJson(
|
|
63
|
+
datetime,
|
|
64
|
+
layer.get("id"),
|
|
65
|
+
props.map,
|
|
66
|
+
);
|
|
48
67
|
}
|
|
49
68
|
/** @type {Record<String,any>[] | undefined} */
|
|
50
69
|
const dataLayers = updatedLayers?.find(
|
package/widgets/EodashMap.vue
CHANGED
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<eox-map-compare
|
|
3
3
|
class="fill-height fill-width overflow-none"
|
|
4
|
-
|
|
4
|
+
.enabled="showCompare"
|
|
5
5
|
>
|
|
6
6
|
<eox-map
|
|
7
7
|
class="fill-height fill-width overflow-none"
|
|
8
8
|
slot="first"
|
|
9
9
|
ref="eoxMap"
|
|
10
|
-
|
|
10
|
+
.config="eoxMapConfig"
|
|
11
11
|
id="main"
|
|
12
|
-
|
|
12
|
+
.layers="eoxMapLayers"
|
|
13
13
|
/>
|
|
14
14
|
<eox-map
|
|
15
15
|
class="fill-height fill-width overflow-none"
|
|
16
16
|
id="compare"
|
|
17
17
|
slot="second"
|
|
18
18
|
ref="compareMap"
|
|
19
|
-
|
|
19
|
+
.config="eoxCompareMapConfig"
|
|
20
|
+
.layers="eoxMapCompareLayers"
|
|
20
21
|
/>
|
|
21
22
|
</eox-map-compare>
|
|
22
23
|
</template>
|
|
23
24
|
<script setup>
|
|
24
|
-
import
|
|
25
|
+
import "@eox/map";
|
|
26
|
+
import "@eox/map/dist/eox-map-advanced-layers-and-sources.js";
|
|
27
|
+
import { computed, onMounted, ref } from "vue";
|
|
25
28
|
import { datetime, mapEl, mapPosition, mapCompareEl } from "@/store/States";
|
|
26
29
|
import { storeToRefs } from "pinia";
|
|
27
30
|
import { useSTAcStore } from "@/store/stac";
|
|
28
|
-
import "@eox/map";
|
|
29
|
-
import "@eox/map/dist/eox-map-advanced-layers-and-sources.js";
|
|
30
31
|
import { eodashCollections, eodashCompareCollections } from "@/utils/states";
|
|
31
32
|
import { useHandleMapMoveEnd, useInitMap } from "@/composables/EodashMap";
|
|
32
33
|
|
|
@@ -37,38 +38,48 @@ const props = defineProps({
|
|
|
37
38
|
},
|
|
38
39
|
});
|
|
39
40
|
|
|
41
|
+
/** @type {import("vue").Ref<Record<string,any>[]>} */
|
|
42
|
+
const eoxMapLayers = ref([
|
|
43
|
+
{
|
|
44
|
+
type: "Tile",
|
|
45
|
+
source: { type: "OSM" },
|
|
46
|
+
properties: {
|
|
47
|
+
id: "osm",
|
|
48
|
+
title: "Background",
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
]);
|
|
52
|
+
|
|
53
|
+
/** @type {import("vue").Ref<Record<string,any>[]>} */
|
|
54
|
+
const eoxMapCompareLayers = ref([
|
|
55
|
+
{
|
|
56
|
+
type: "Tile",
|
|
57
|
+
source: { type: "OSM" },
|
|
58
|
+
properties: {
|
|
59
|
+
id: "osm",
|
|
60
|
+
title: "Background",
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
]);
|
|
64
|
+
|
|
40
65
|
/** @type {import("vue").Ref<(HTMLElement & Record<string,any> & { map:import("ol").Map }) | null>} */
|
|
41
66
|
const eoxMap = ref(null);
|
|
42
67
|
/** @type {import("vue").Ref<(HTMLElement & Record<string,any> & { map:import("ol").Map }) | null>} */
|
|
43
68
|
const compareMap = ref(null);
|
|
44
69
|
|
|
45
|
-
const eoxMapConfig =
|
|
70
|
+
const eoxMapConfig = {
|
|
46
71
|
/** @type {(number|undefined)[] | undefined} */
|
|
47
72
|
center: [15, 48],
|
|
48
73
|
/** @type {number | undefined} */
|
|
49
74
|
zoom: 4,
|
|
50
|
-
|
|
51
|
-
layers: [
|
|
52
|
-
{
|
|
53
|
-
type: "Tile",
|
|
54
|
-
properties: {
|
|
55
|
-
id: "osm",
|
|
56
|
-
title: "Background",
|
|
57
|
-
},
|
|
58
|
-
source: {
|
|
59
|
-
type: "OSM",
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
],
|
|
63
|
-
});
|
|
75
|
+
};
|
|
64
76
|
|
|
65
|
-
const eoxCompareMapConfig =
|
|
77
|
+
const eoxCompareMapConfig = {
|
|
66
78
|
/** @type {(number|undefined)[] | undefined} */
|
|
67
79
|
center: [15, 48],
|
|
68
80
|
/** @type {number | undefined} */
|
|
69
81
|
zoom: 4,
|
|
70
|
-
|
|
71
|
-
});
|
|
82
|
+
};
|
|
72
83
|
|
|
73
84
|
// Check if selected indicator was already set in store
|
|
74
85
|
if (mapPosition && mapPosition.value && mapPosition.value.length === 3) {
|
|
@@ -88,9 +99,11 @@ onMounted(() => {
|
|
|
88
99
|
const { selectedCompareStac, selectedStac } = storeToRefs(useSTAcStore());
|
|
89
100
|
// assign map Element state to eox map
|
|
90
101
|
mapEl.value = eoxMap.value;
|
|
102
|
+
|
|
91
103
|
if (props.enableCompare) {
|
|
92
104
|
mapCompareEl.value = compareMap.value;
|
|
93
105
|
}
|
|
106
|
+
|
|
94
107
|
if (props.enableCompare) {
|
|
95
108
|
useInitMap(
|
|
96
109
|
compareMap,
|
|
@@ -98,14 +111,19 @@ onMounted(() => {
|
|
|
98
111
|
selectedCompareStac,
|
|
99
112
|
eodashCompareCollections,
|
|
100
113
|
datetime,
|
|
114
|
+
eoxMapCompareLayers,
|
|
115
|
+
eoxMap,
|
|
101
116
|
);
|
|
102
117
|
}
|
|
118
|
+
|
|
103
119
|
useInitMap(
|
|
104
120
|
eoxMap,
|
|
105
121
|
//@ts-expect-error todo selectedStac as collection
|
|
106
122
|
selectedStac,
|
|
107
123
|
eodashCollections,
|
|
108
124
|
datetime,
|
|
125
|
+
eoxMapLayers,
|
|
126
|
+
compareMap,
|
|
109
127
|
);
|
|
110
128
|
});
|
|
111
129
|
</script>
|
|
@@ -1,259 +0,0 @@
|
|
|
1
|
-
import { p as O, o as R, g as _, y as $, aw as F, c as m, r as B, d as w, a as j, b as g, ax as H, ay as M, T as Y, az as U, aA as G, aB as L, aC as N, aD as z, w as J, $ as k, a6 as K, a1 as y, a3 as D, aE as W, F as q, aF as C, aG as h, a9 as V, aH as Q, aI as X, t as S, a0 as T, M as P, aJ as Z, V as A, aK as ee, aL as x } from "./asWebComponent-DhR2_xlP.js";
|
|
2
|
-
import { m as te, V as E } from "./VOverlay-D5GzAYRY.js";
|
|
3
|
-
import { b as ae, f as ne } from "./forwardRefs-C0MQxvur.js";
|
|
4
|
-
const oe = O({
|
|
5
|
-
id: String,
|
|
6
|
-
text: String,
|
|
7
|
-
...R(te({
|
|
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"), re = _()({
|
|
22
|
-
name: "VTooltip",
|
|
23
|
-
props: oe(),
|
|
24
|
-
emits: {
|
|
25
|
-
"update:modelValue": (e) => !0
|
|
26
|
-
},
|
|
27
|
-
setup(e, s) {
|
|
28
|
-
let {
|
|
29
|
-
slots: i
|
|
30
|
-
} = s;
|
|
31
|
-
const t = $(e, "modelValue"), {
|
|
32
|
-
scopeId: u
|
|
33
|
-
} = ae(), c = F(), n = m(() => e.id || `v-tooltip-${c}`), a = B(), o = m(() => e.location.split(" ").length > 1 ? e.location : e.location + " center"), l = m(() => e.origin === "auto" || e.origin === "overlap" || e.origin.split(" ").length > 1 || e.location.split(" ").length > 1 ? e.origin : e.origin + " center"), r = m(() => e.transition ? e.transition : t.value ? "scale-transition" : "fade-transition"), b = m(() => w({
|
|
34
|
-
"aria-describedby": n.value
|
|
35
|
-
}, e.activatorProps));
|
|
36
|
-
return j(() => {
|
|
37
|
-
const v = E.filterProps(e);
|
|
38
|
-
return g(E, w({
|
|
39
|
-
ref: a,
|
|
40
|
-
class: ["v-tooltip", e.class],
|
|
41
|
-
style: e.style,
|
|
42
|
-
id: n.value
|
|
43
|
-
}, v, {
|
|
44
|
-
modelValue: t.value,
|
|
45
|
-
"onUpdate:modelValue": (d) => t.value = d,
|
|
46
|
-
transition: r.value,
|
|
47
|
-
absolute: !0,
|
|
48
|
-
location: o.value,
|
|
49
|
-
origin: l.value,
|
|
50
|
-
persistent: !0,
|
|
51
|
-
role: "tooltip",
|
|
52
|
-
activatorProps: b.value,
|
|
53
|
-
_disableGlobalStack: !0
|
|
54
|
-
}, u), {
|
|
55
|
-
activator: i.activator,
|
|
56
|
-
default: function() {
|
|
57
|
-
for (var d = arguments.length, f = new Array(d), p = 0; p < d; p++)
|
|
58
|
-
f[p] = arguments[p];
|
|
59
|
-
return i.default?.(...f) ?? e.text;
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
}), ne({}, a);
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
function se(e, s) {
|
|
66
|
-
const i = typeof e == "string" ? H(e) : e, t = ie(i, s);
|
|
67
|
-
return {
|
|
68
|
-
mounted: t,
|
|
69
|
-
updated: t,
|
|
70
|
-
unmounted(u) {
|
|
71
|
-
M(null, u);
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
function ie(e, s) {
|
|
76
|
-
return function(i, t, u) {
|
|
77
|
-
const c = typeof s == "function" ? s(t) : s, n = t.value?.text ?? t.value ?? c?.text, a = Y(t.value) ? t.value : {}, o = () => n ?? i.innerHTML, l = (u.ctx === t.instance.$ ? le(u, t.instance.$)?.provides : u.ctx?.provides) ?? t.instance.$.provides, r = U(e, w(c, a), o);
|
|
78
|
-
r.appContext = Object.assign(/* @__PURE__ */ Object.create(null), t.instance.$.appContext, {
|
|
79
|
-
provides: l
|
|
80
|
-
}), M(r, i);
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
function le(e, s) {
|
|
84
|
-
const i = /* @__PURE__ */ new Set(), t = (c) => {
|
|
85
|
-
for (const n of c) {
|
|
86
|
-
if (!n) continue;
|
|
87
|
-
if (n === e)
|
|
88
|
-
return !0;
|
|
89
|
-
i.add(n);
|
|
90
|
-
let a;
|
|
91
|
-
if (n.suspense ? a = t([n.ssContent]) : Array.isArray(n.children) ? a = t(n.children) : n.component?.vnode && (a = t([n.component?.subTree])), a)
|
|
92
|
-
return a;
|
|
93
|
-
i.delete(n);
|
|
94
|
-
}
|
|
95
|
-
return !1;
|
|
96
|
-
};
|
|
97
|
-
if (!t([s.subTree]))
|
|
98
|
-
throw new Error("Could not find original vnode");
|
|
99
|
-
const u = Array.from(i).reverse();
|
|
100
|
-
for (const c of u)
|
|
101
|
-
if (c.component)
|
|
102
|
-
return c.component;
|
|
103
|
-
return s;
|
|
104
|
-
}
|
|
105
|
-
const I = se(re, (e) => ({
|
|
106
|
-
activator: "parent",
|
|
107
|
-
location: e.arg?.replace("-", " ") ?? "top",
|
|
108
|
-
text: typeof e.value == "boolean" ? void 0 : e.value
|
|
109
|
-
})), ce = {
|
|
110
|
-
class: "flex rounded-lg border border-gray-300 dark:border-gray-600",
|
|
111
|
-
style: { margin: "2px" }
|
|
112
|
-
}, ue = ["value"], ge = {
|
|
113
|
-
__name: "EodashDatePicker",
|
|
114
|
-
setup(e) {
|
|
115
|
-
const s = G((n, a) => ({
|
|
116
|
-
get() {
|
|
117
|
-
return n(), new Date(C.value).getTime();
|
|
118
|
-
},
|
|
119
|
-
/** @param {number} num */
|
|
120
|
-
set(o) {
|
|
121
|
-
a(), h.debug("Datepicker setting currentDate", C.value), C.value = new Date(o).toISOString();
|
|
122
|
-
}
|
|
123
|
-
})), i = B({
|
|
124
|
-
input: "YYYY-MM-DD"
|
|
125
|
-
}), t = L([]), { selectedStac: u } = N(z());
|
|
126
|
-
J(
|
|
127
|
-
u,
|
|
128
|
-
async (n, a) => {
|
|
129
|
-
if (n && a?.id !== n.id) {
|
|
130
|
-
h.debug("Datepicker selected STAC change triggered");
|
|
131
|
-
const o = [
|
|
132
|
-
"#009E73",
|
|
133
|
-
"#0072B2",
|
|
134
|
-
"#E69F00",
|
|
135
|
-
"#CC79A7",
|
|
136
|
-
"#56B4E9",
|
|
137
|
-
"#D55E00"
|
|
138
|
-
];
|
|
139
|
-
t.splice(0, t.length);
|
|
140
|
-
for (let r = 0; r < x.length; r++) {
|
|
141
|
-
h.debug("Retrieving dates", x[r]), await x[r].fetchCollection();
|
|
142
|
-
const b = [
|
|
143
|
-
...new Set(
|
|
144
|
-
x[r].getItems()?.reduce(
|
|
145
|
-
(v, d) => {
|
|
146
|
-
const f = Date.parse(
|
|
147
|
-
/** @type {string} */
|
|
148
|
-
d.datetime
|
|
149
|
-
);
|
|
150
|
-
return f && v.push(new Date(f)), v;
|
|
151
|
-
},
|
|
152
|
-
/** @type {Date[]} */
|
|
153
|
-
[]
|
|
154
|
-
)
|
|
155
|
-
)
|
|
156
|
-
];
|
|
157
|
-
t.push({
|
|
158
|
-
key: "id-" + r.toString() + Math.random().toString(16).slice(2),
|
|
159
|
-
bar: {
|
|
160
|
-
style: {
|
|
161
|
-
backgroundColor: o[r % o.length]
|
|
162
|
-
}
|
|
163
|
-
},
|
|
164
|
-
dates: b
|
|
165
|
-
});
|
|
166
|
-
}
|
|
167
|
-
const l = n?.extent?.temporal?.interval;
|
|
168
|
-
if (l && l.length > 0 && l[0].length > 1) {
|
|
169
|
-
const r = new Date(l[0][1]);
|
|
170
|
-
h.debug(
|
|
171
|
-
"Datepicker: found stac extent, setting time to latest value",
|
|
172
|
-
r
|
|
173
|
-
), s.value = r?.getTime();
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
},
|
|
177
|
-
{ immediate: !0 }
|
|
178
|
-
);
|
|
179
|
-
function c(n) {
|
|
180
|
-
if (t.length) {
|
|
181
|
-
let a = n ? 1 / 0 : -1 / 0;
|
|
182
|
-
t.forEach((o) => {
|
|
183
|
-
o?.dates && o.dates.forEach((l) => {
|
|
184
|
-
l instanceof Date && (a = Math[n ? "min" : "max"](a, l.getTime()));
|
|
185
|
-
});
|
|
186
|
-
}), s.value = a === -1 / 0 ? Date.now() : a === 1 / 0 ? 0 : a;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
return (n, a) => (k(), K(
|
|
190
|
-
q,
|
|
191
|
-
null,
|
|
192
|
-
[
|
|
193
|
-
g(D(X), {
|
|
194
|
-
modelValue: s.value,
|
|
195
|
-
"onUpdate:modelValue": a[0] || (a[0] = (o) => s.value = o),
|
|
196
|
-
modelModifiers: { number: !0 },
|
|
197
|
-
masks: i.value,
|
|
198
|
-
attributes: t
|
|
199
|
-
}, {
|
|
200
|
-
default: y(({ inputValue: o, inputEvents: l }) => [
|
|
201
|
-
V("div", ce, [
|
|
202
|
-
V("input", w({ value: o }, Q(l, !0), {
|
|
203
|
-
style: { margin: "1px" },
|
|
204
|
-
class: "flex-grow px-1 py-1 bg-white dark:bg-gray-700"
|
|
205
|
-
}), null, 16, ue)
|
|
206
|
-
])
|
|
207
|
-
]),
|
|
208
|
-
_: 1
|
|
209
|
-
/* STABLE */
|
|
210
|
-
}, 8, ["modelValue", "masks", "attributes"]),
|
|
211
|
-
g(W, {
|
|
212
|
-
align: "center",
|
|
213
|
-
justify: "center",
|
|
214
|
-
style: { "margin-top": "6px" }
|
|
215
|
-
}, {
|
|
216
|
-
default: y(() => [
|
|
217
|
-
S((k(), T(A, {
|
|
218
|
-
style: { padding: "0px", "margin-right": "4px" },
|
|
219
|
-
density: "compact",
|
|
220
|
-
onClick: a[1] || (a[1] = (o) => c(!0))
|
|
221
|
-
}, {
|
|
222
|
-
default: y(() => [
|
|
223
|
-
g(P, {
|
|
224
|
-
icon: [D(Z)]
|
|
225
|
-
}, null, 8, ["icon"])
|
|
226
|
-
]),
|
|
227
|
-
_: 1
|
|
228
|
-
/* STABLE */
|
|
229
|
-
})), [
|
|
230
|
-
[I, "Set date to oldest available dataset", "bottom"]
|
|
231
|
-
]),
|
|
232
|
-
S((k(), T(A, {
|
|
233
|
-
style: { padding: "0px", "margin-left": "4px" },
|
|
234
|
-
density: "compact",
|
|
235
|
-
onClick: a[2] || (a[2] = (o) => c(!1))
|
|
236
|
-
}, {
|
|
237
|
-
default: y(() => [
|
|
238
|
-
g(P, {
|
|
239
|
-
icon: [D(ee)]
|
|
240
|
-
}, null, 8, ["icon"])
|
|
241
|
-
]),
|
|
242
|
-
_: 1
|
|
243
|
-
/* STABLE */
|
|
244
|
-
})), [
|
|
245
|
-
[I, "Set date to latest available dataset", "bottom"]
|
|
246
|
-
])
|
|
247
|
-
]),
|
|
248
|
-
_: 1
|
|
249
|
-
/* STABLE */
|
|
250
|
-
})
|
|
251
|
-
],
|
|
252
|
-
64
|
|
253
|
-
/* STABLE_FRAGMENT */
|
|
254
|
-
));
|
|
255
|
-
}
|
|
256
|
-
};
|
|
257
|
-
export {
|
|
258
|
-
ge as default
|
|
259
|
-
};
|