@eodash/eodash 5.0.0-processing → 5.0.0-rc.1
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/asWebComponent.js +2 -3
- package/core/client/components/DashboardLayout.vue +35 -17
- package/core/client/components/Loading.vue +6 -9
- package/core/client/components/MobileLayout.vue +16 -14
- package/core/client/composables/DefineEodash.js +13 -3
- package/core/client/composables/DefineTemplate.js +67 -0
- package/core/client/composables/DefineWidgets.js +3 -2
- package/core/client/composables/EodashMap.js +23 -12
- package/core/client/composables/EodashProcess.js +10 -11
- package/core/client/composables/index.js +35 -10
- package/core/client/eodash.js +381 -139
- package/core/client/{utils/eodashSTAC.js → eodashSTAC/EodashCollection.js} +75 -42
- package/core/client/{utils → eodashSTAC}/createLayers.js +10 -8
- package/core/client/{utils → eodashSTAC}/helpers.js +45 -68
- package/core/client/eodashSTAC/triggers.js +43 -0
- package/core/client/plugins/vuetify.js +2 -1
- package/core/client/store/{Actions.js → actions.js} +16 -2
- package/core/client/store/index.js +4 -18
- package/core/client/store/stac.js +4 -4
- package/core/client/store/{States.js → states.js} +2 -0
- package/{dist/types/core/client/types.d.ts → core/client/types.ts} +47 -8
- package/core/client/utils/states.js +8 -3
- package/core/client/views/Dashboard.vue +6 -4
- package/core/client/vite-env.d.ts +1 -1
- package/dist/client/{DashboardLayout-CVMJ4l8M.js → DashboardLayout-FS5inBIm.js} +12 -15
- package/dist/client/{DynamicWebComponent-Cv8n457T.js → DynamicWebComponent-CBSgT677.js} +1 -1
- package/dist/client/{EodashDatePicker-VVkiPmpc.js → EodashDatePicker-BGSS2ZYK.js} +75 -163
- package/dist/client/EodashItemFilter-CFNKjm_Z.js +151 -0
- package/dist/client/{EodashLayerControl-53WghA8G.js → EodashLayerControl-CzffoPUs.js} +17 -7
- package/dist/client/EodashLayoutSwitcher-DM0zDhvI.js +52 -0
- package/dist/client/{EodashMap-CQnOePpy.js → EodashMap-BdFZ657e.js} +101 -38
- package/dist/client/EodashMapBtns-rC_IPD-Z.js +107 -0
- package/dist/client/EodashProcess-SLsTISKV.js +714 -0
- package/dist/client/EodashStacInfo-DFD0gtWm.js +85 -0
- package/dist/client/EodashTools-ImohD2ys.js +103 -0
- package/dist/client/{ExportState-BT8MLAW7.js → ExportState-LNZAovzM.js} +13 -13
- package/dist/client/{Footer-C6GUG84G.js → Footer-c19dV1ZR.js} +1 -1
- package/dist/client/{Header-D2dtCWp8.js → Header-CcvXFqqt.js} +3 -3
- package/dist/client/{MobileLayout-BAo8Wr8T.js → MobileLayout-OM6Wc-vj.js} +28 -31
- package/dist/client/{PopUp-Bm01q7Ko.js → PopUp-B0_c0207.js} +29 -8
- package/dist/client/{VImg-B8AbetCE.js → VImg-BpDhCbL0.js} +2 -2
- package/dist/client/{VMain-DnGlQUyr.js → VMain-DC05bDwX.js} +1 -1
- package/dist/client/{VOverlay-B8Qj7LRG.js → VOverlay-C7EUyVe_.js} +3 -3
- package/dist/client/VTooltip-C78suika.js +86 -0
- package/dist/client/{WidgetsContainer-CwXRRLS1.js → WidgetsContainer-sD1vDnhF.js} +1 -1
- package/dist/client/{asWebComponent-DUUoR7MZ.js → asWebComponent-D8bMMCEr.js} +1374 -1052
- package/dist/client/{style.css → eo-dash.css} +1 -1
- package/dist/client/eo-dash.js +1 -1
- package/dist/client/{forwardRefs-CZJhEAKW.js → forwardRefs-yw6tFXER.js} +1 -1
- package/dist/client/{index-DlIO7sJ3.js → index-CpK_Yaom.js} +1 -1
- package/dist/client/{transition-BiR8wMn1.js → transition-B2YwqAYJ.js} +1 -1
- package/dist/node/cli.js +2 -2
- package/package.json +48 -37
- package/widgets/EodashDatePicker.vue +68 -54
- package/widgets/EodashItemFilter.vue +60 -105
- package/widgets/EodashLayerControl.vue +17 -4
- package/widgets/EodashLayoutSwitcher.vue +36 -0
- package/widgets/EodashMap.vue +26 -27
- package/widgets/EodashMapBtns.vue +41 -4
- package/widgets/EodashProcess.vue +4 -12
- package/widgets/EodashStacInfo.vue +82 -0
- package/widgets/EodashTools.vue +83 -0
- package/widgets/ExportState.vue +12 -12
- package/widgets/PopUp.vue +24 -2
- package/core/client/asWebComponent.d.ts +0 -23
- package/core/client/types.d.ts +0 -279
- package/dist/client/EodashItemFilter-CugWNQ86.js +0 -194
- package/dist/client/EodashMapBtns-uaRwFtfB.js +0 -66
- package/dist/client/EodashProcess-cF0unIy8.js +0 -1477
- package/dist/types/core/client/App.vue.d.ts +0 -7
- package/dist/types/core/client/asWebComponent.d.ts +0 -9
- package/dist/types/core/client/components/DashboardLayout.vue.d.ts +0 -2
- package/dist/types/core/client/components/DynamicWebComponent.vue.d.ts +0 -18
- package/dist/types/core/client/components/ErrorAlert.vue.d.ts +0 -2
- package/dist/types/core/client/components/Footer.vue.d.ts +0 -2
- package/dist/types/core/client/components/Header.vue.d.ts +0 -2
- package/dist/types/core/client/components/IframeWrapper.vue.d.ts +0 -7
- package/dist/types/core/client/components/Loading.vue.d.ts +0 -2
- package/dist/types/core/client/components/MobileLayout.vue.d.ts +0 -2
- package/dist/types/core/client/composables/DefineEodash.d.ts +0 -2
- package/dist/types/core/client/composables/DefineTemplate.d.ts +0 -15
- package/dist/types/core/client/composables/DefineWidgets.d.ts +0 -14
- package/dist/types/core/client/composables/EodashMap.d.ts +0 -5
- package/dist/types/core/client/composables/index.d.ts +0 -30
- package/dist/types/core/client/eodash.d.ts +0 -8
- package/dist/types/core/client/main.d.ts +0 -2
- package/dist/types/core/client/plugins/axios.d.ts +0 -2
- package/dist/types/core/client/plugins/index.d.ts +0 -3
- package/dist/types/core/client/plugins/vuetify.d.ts +0 -82
- package/dist/types/core/client/render.d.ts +0 -1
- package/dist/types/core/client/store/Actions.d.ts +0 -12
- package/dist/types/core/client/store/States.d.ts +0 -22
- package/dist/types/core/client/store/index.d.ts +0 -2
- package/dist/types/core/client/store/stac.d.ts +0 -25
- package/dist/types/core/client/utils/createLayers.d.ts +0 -45
- package/dist/types/core/client/utils/eodashSTAC.d.ts +0 -82
- package/dist/types/core/client/utils/helpers.d.ts +0 -84
- package/dist/types/core/client/utils/index.d.ts +0 -2
- package/dist/types/core/client/utils/keys.d.ts +0 -6
- package/dist/types/core/client/utils/states.d.ts +0 -14
- package/dist/types/core/client/views/Dashboard.vue.d.ts +0 -9
- package/dist/types/widgets/EodashDatePicker.vue.d.ts +0 -7
- package/dist/types/widgets/EodashItemFilter.vue.d.ts +0 -42
- package/dist/types/widgets/EodashLayerControl.vue.d.ts +0 -11
- package/dist/types/widgets/EodashLayoutSwitcher.vue.d.ts +0 -9
- package/dist/types/widgets/EodashMap.vue.d.ts +0 -7
- package/dist/types/widgets/EodashMapBtns.vue.d.ts +0 -11
- package/dist/types/widgets/EodashStacInfo.vue.d.ts +0 -21
- package/dist/types/widgets/EodashTools.vue.d.ts +0 -15
- package/dist/types/widgets/ExportState.vue.d.ts +0 -7
- package/dist/types/widgets/PopUp.vue.d.ts +0 -22
- package/dist/types/widgets/WidgetsContainer.vue.d.ts +0 -7
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div ref="rootRef">
|
|
3
|
+
<v-tooltip :text="`Switch to ${target} mode`">
|
|
4
|
+
<template v-slot:activator="{ props }">
|
|
5
|
+
<v-icon
|
|
6
|
+
v-bind="props"
|
|
7
|
+
@click="activeTemplate = target"
|
|
8
|
+
:icon="[icon]"
|
|
9
|
+
></v-icon>
|
|
10
|
+
</template>
|
|
11
|
+
</v-tooltip>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script setup>
|
|
16
|
+
import { activeTemplate } from "@/store/states";
|
|
17
|
+
import { mdiViewDashboard } from "@mdi/js";
|
|
18
|
+
import { makePanelTransparent } from "@/composables";
|
|
19
|
+
import { ref } from "vue";
|
|
20
|
+
|
|
21
|
+
defineProps({
|
|
22
|
+
target: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: "main",
|
|
25
|
+
},
|
|
26
|
+
// mdi/js icon
|
|
27
|
+
icon: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: mdiViewDashboard,
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
/** @type {import("vue").Ref<HTMLDivElement|null>} */
|
|
34
|
+
const rootRef = ref(null);
|
|
35
|
+
makePanelTransparent(rootRef);
|
|
36
|
+
</script>
|
package/widgets/EodashMap.vue
CHANGED
|
@@ -7,8 +7,10 @@
|
|
|
7
7
|
class="fill-height fill-width overflow-none"
|
|
8
8
|
slot="first"
|
|
9
9
|
ref="eoxMap"
|
|
10
|
-
.config="eoxMapConfig"
|
|
11
10
|
id="main"
|
|
11
|
+
.animationOptions="animationOptions"
|
|
12
|
+
.center="initialCenter"
|
|
13
|
+
.zoom="initialZoom"
|
|
12
14
|
.layers="eoxMapLayers"
|
|
13
15
|
/>
|
|
14
16
|
<eox-map
|
|
@@ -16,7 +18,6 @@
|
|
|
16
18
|
id="compare"
|
|
17
19
|
slot="second"
|
|
18
20
|
ref="compareMap"
|
|
19
|
-
.config="eoxCompareMapConfig"
|
|
20
21
|
.layers="eoxMapCompareLayers"
|
|
21
22
|
/>
|
|
22
23
|
</eox-map-compare>
|
|
@@ -24,20 +25,35 @@
|
|
|
24
25
|
<script setup>
|
|
25
26
|
import "@eox/map";
|
|
26
27
|
import "@eox/map/src/plugins/advancedLayersAndSources";
|
|
27
|
-
import { computed, onMounted, ref } from "vue";
|
|
28
|
-
import { datetime, mapEl, mapPosition, mapCompareEl } from "@/store/
|
|
28
|
+
import { computed, onMounted, ref, toRaw } from "vue";
|
|
29
|
+
import { datetime, mapEl, mapPosition, mapCompareEl } from "@/store/states";
|
|
29
30
|
import { storeToRefs } from "pinia";
|
|
30
31
|
import { useSTAcStore } from "@/store/stac";
|
|
31
32
|
import { eodashCollections, eodashCompareCollections } from "@/utils/states";
|
|
32
33
|
import { useHandleMapMoveEnd, useInitMap } from "@/composables/EodashMap";
|
|
33
|
-
|
|
34
|
+
import { inAndOut } from "ol/easing.js";
|
|
34
35
|
const props = defineProps({
|
|
35
36
|
enableCompare: {
|
|
36
37
|
type: Boolean,
|
|
37
38
|
default: false,
|
|
38
39
|
},
|
|
40
|
+
/** @type {import("vue").PropType<[number,number]>} */
|
|
41
|
+
center: {
|
|
42
|
+
//@ts-expect-error todo
|
|
43
|
+
type: Array,
|
|
44
|
+
default: () => [15, 48],
|
|
45
|
+
},
|
|
46
|
+
zoom: {
|
|
47
|
+
type: Number,
|
|
48
|
+
default: 4,
|
|
49
|
+
},
|
|
39
50
|
});
|
|
40
51
|
|
|
52
|
+
const initialCenter = toRaw([
|
|
53
|
+
mapPosition.value?.[0] ?? props.center?.[0],
|
|
54
|
+
mapPosition.value?.[1] ?? props.center?.[1],
|
|
55
|
+
]);
|
|
56
|
+
const initialZoom = toRaw(mapPosition.value?.[2] ?? props.zoom);
|
|
41
57
|
/** @type {import("vue").Ref<Record<string,any>[]>} */
|
|
42
58
|
const eoxMapLayers = ref([
|
|
43
59
|
{
|
|
@@ -62,32 +78,15 @@ const eoxMapCompareLayers = ref([
|
|
|
62
78
|
},
|
|
63
79
|
]);
|
|
64
80
|
|
|
81
|
+
const animationOptions = {
|
|
82
|
+
duration: 1200,
|
|
83
|
+
easing: inAndOut,
|
|
84
|
+
};
|
|
85
|
+
|
|
65
86
|
/** @type {import("vue").Ref<(HTMLElement & Record<string,any> & { map:import("ol").Map }) | null>} */
|
|
66
87
|
const eoxMap = ref(null);
|
|
67
88
|
/** @type {import("vue").Ref<(HTMLElement & Record<string,any> & { map:import("ol").Map }) | null>} */
|
|
68
89
|
const compareMap = ref(null);
|
|
69
|
-
|
|
70
|
-
const eoxMapConfig = {
|
|
71
|
-
/** @type {(number|undefined)[] | undefined} */
|
|
72
|
-
center: [15, 48],
|
|
73
|
-
/** @type {number | undefined} */
|
|
74
|
-
zoom: 4,
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
const eoxCompareMapConfig = {
|
|
78
|
-
/** @type {(number|undefined)[] | undefined} */
|
|
79
|
-
center: [15, 48],
|
|
80
|
-
/** @type {number | undefined} */
|
|
81
|
-
zoom: 4,
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
// Check if selected indicator was already set in store
|
|
85
|
-
if (mapPosition && mapPosition.value && mapPosition.value.length === 3) {
|
|
86
|
-
// TODO: do further checks for invalid values?
|
|
87
|
-
// TODO: can we expect the values to be in a specific projection
|
|
88
|
-
eoxMapConfig.center = [mapPosition.value?.[0], mapPosition.value[1]];
|
|
89
|
-
eoxMapConfig.zoom = mapPosition.value[2];
|
|
90
|
-
}
|
|
91
90
|
const { selectedCompareStac } = storeToRefs(useSTAcStore());
|
|
92
91
|
const showCompare = computed(() =>
|
|
93
92
|
props.enableCompare && !!selectedCompareStac.value ? "" : "first",
|
|
@@ -7,21 +7,44 @@
|
|
|
7
7
|
@click="showMapState = !showMapState"
|
|
8
8
|
/>
|
|
9
9
|
<ExportState v-if="exportMap" v-model="showMapState" />
|
|
10
|
+
|
|
10
11
|
<v-btn
|
|
11
12
|
class="map-btn"
|
|
12
13
|
:icon="[mdiEarthBox]"
|
|
13
14
|
v-if="changeProjection && !!availableMapProjection"
|
|
14
15
|
@click="changeMapProjection(availableMapProjection)"
|
|
15
16
|
/>
|
|
17
|
+
<v-btn
|
|
18
|
+
class="map-btn"
|
|
19
|
+
:icon="[mdiCompare]"
|
|
20
|
+
v-if="compareIndicators"
|
|
21
|
+
@click="showCompareIndicators = !showCompareIndicators"
|
|
22
|
+
/>
|
|
23
|
+
<PopUp
|
|
24
|
+
v-model="showCompareIndicators"
|
|
25
|
+
:maxWidth="popupWidth"
|
|
26
|
+
:maxHeight="popupHeight"
|
|
27
|
+
>
|
|
28
|
+
<EodashItemFilter
|
|
29
|
+
:enableCompare="true"
|
|
30
|
+
filters-title=""
|
|
31
|
+
results-title="Select an indicator to compare"
|
|
32
|
+
:filter-properties="[]"
|
|
33
|
+
@select="onSelectCompareIndicator"
|
|
34
|
+
/>
|
|
35
|
+
</PopUp>
|
|
16
36
|
</div>
|
|
17
37
|
</template>
|
|
18
38
|
<script setup>
|
|
19
39
|
import { makePanelTransparent } from "@/composables";
|
|
20
|
-
import { changeMapProjection } from "@/store/
|
|
21
|
-
import { availableMapProjection } from "@/store/
|
|
22
|
-
import { mdiEarthBox, mdiMapPlus } from "@mdi/js";
|
|
40
|
+
import { changeMapProjection, setActiveTemplate } from "@/store/actions";
|
|
41
|
+
import { availableMapProjection } from "@/store/states";
|
|
42
|
+
import { mdiCompare, mdiEarthBox, mdiMapPlus } from "@mdi/js";
|
|
23
43
|
import ExportState from "^/ExportState.vue";
|
|
24
|
-
import { ref } from "vue";
|
|
44
|
+
import { computed, ref } from "vue";
|
|
45
|
+
import PopUp from "./PopUp.vue";
|
|
46
|
+
import EodashItemFilter from "./EodashItemFilter.vue";
|
|
47
|
+
import { useDisplay } from "vuetify/lib/framework.mjs";
|
|
25
48
|
|
|
26
49
|
defineProps({
|
|
27
50
|
exportMap: {
|
|
@@ -32,12 +55,26 @@ defineProps({
|
|
|
32
55
|
type: Boolean,
|
|
33
56
|
default: true,
|
|
34
57
|
},
|
|
58
|
+
compareIndicators: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: true,
|
|
61
|
+
},
|
|
35
62
|
});
|
|
63
|
+
const { smAndDown } = useDisplay();
|
|
64
|
+
const popupWidth = computed(() => (smAndDown ? "70%" : "500px"));
|
|
65
|
+
const popupHeight = computed(() => (smAndDown ? "90%" : "500px"));
|
|
36
66
|
|
|
37
67
|
const showMapState = ref(false);
|
|
68
|
+
const showCompareIndicators = ref(false);
|
|
38
69
|
|
|
39
70
|
/** @type {import("vue").Ref<HTMLDivElement|null>} */
|
|
40
71
|
const rootRef = ref(null);
|
|
72
|
+
|
|
73
|
+
const onSelectCompareIndicator = () => {
|
|
74
|
+
setActiveTemplate("compare");
|
|
75
|
+
showCompareIndicators.value = !showCompareIndicators.value;
|
|
76
|
+
};
|
|
77
|
+
|
|
41
78
|
makePanelTransparent(rootRef);
|
|
42
79
|
</script>
|
|
43
80
|
<style scoped>
|
|
@@ -32,7 +32,7 @@ import "@eox/jsonform";
|
|
|
32
32
|
import { onMounted, ref, toRaw } from "vue";
|
|
33
33
|
import { useSTAcStore } from "@/store/stac";
|
|
34
34
|
import { storeToRefs } from "pinia";
|
|
35
|
-
import { mapEl } from "@/store/
|
|
35
|
+
import { mapEl } from "@/store/states";
|
|
36
36
|
import { useOnLayersUpdate } from "@/composables";
|
|
37
37
|
import { useEventBus } from "@vueuse/core";
|
|
38
38
|
import { eoxLayersKey } from "@/utils/keys";
|
|
@@ -125,7 +125,7 @@ const startProcess = async () => {
|
|
|
125
125
|
});
|
|
126
126
|
isProcessed.value = true;
|
|
127
127
|
};
|
|
128
|
-
useAutoExec(autoExec, jsonformEl, jsonformSchema,
|
|
128
|
+
useAutoExec(autoExec, jsonformEl, jsonformSchema, startProcess);
|
|
129
129
|
</script>
|
|
130
130
|
<style>
|
|
131
131
|
.chart {
|
|
@@ -137,15 +137,7 @@ useAutoExec(autoExec, jsonformEl, jsonformSchema, isProcessed, startProcess);
|
|
|
137
137
|
height: 100%;
|
|
138
138
|
overflow-y: auto;
|
|
139
139
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
.slide-leave-active {
|
|
143
|
-
transition: all 0.2s;
|
|
144
|
-
max-height: 30px;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.slide-enter,
|
|
148
|
-
.slide-leave-to {
|
|
149
|
-
max-height: 0px;
|
|
140
|
+
eox-chart {
|
|
141
|
+
--background-color: transparent;
|
|
150
142
|
}
|
|
151
143
|
</style>
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex-grow-1 fill-height overflow-auto">
|
|
3
|
+
<eox-stacinfo
|
|
4
|
+
.for="currentUrl"
|
|
5
|
+
.allowHtml="allowHtml"
|
|
6
|
+
.body="body"
|
|
7
|
+
.featured="featured"
|
|
8
|
+
.footer="footer"
|
|
9
|
+
.styleOverride="styleOverride"
|
|
10
|
+
.header="header"
|
|
11
|
+
.subheader="subheader"
|
|
12
|
+
.tags="tags"
|
|
13
|
+
style="--color-primary-lighter: none"
|
|
14
|
+
>
|
|
15
|
+
</eox-stacinfo>
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script setup>
|
|
20
|
+
import "@eox/stacinfo";
|
|
21
|
+
import { currentUrl } from "@/store/states";
|
|
22
|
+
|
|
23
|
+
const {
|
|
24
|
+
allowHtml,
|
|
25
|
+
featured,
|
|
26
|
+
footer,
|
|
27
|
+
header,
|
|
28
|
+
body,
|
|
29
|
+
styleOverride,
|
|
30
|
+
subheader,
|
|
31
|
+
tags,
|
|
32
|
+
} = defineProps({
|
|
33
|
+
allowHtml: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: true,
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
styleOverride: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: `
|
|
41
|
+
.single-property {columns: 1!important;}
|
|
42
|
+
h1 {margin:0px!important;font-size:16px!important;}
|
|
43
|
+
header h1:after {
|
|
44
|
+
content:' ';
|
|
45
|
+
display:block;
|
|
46
|
+
border:1px solid #d0d0d0;
|
|
47
|
+
}
|
|
48
|
+
h2 {font-size:15px}
|
|
49
|
+
h3 {font-size:14px}
|
|
50
|
+
summary {cursor: pointer;}
|
|
51
|
+
#properties li > .value { font-weight: normal !important;}
|
|
52
|
+
main {padding-bottom: 10px;}
|
|
53
|
+
.footer-container {line-height:1;}
|
|
54
|
+
.footer-container button {margin-top: -10px;}
|
|
55
|
+
.footer-container small {font-size:10px;line-height:1;}`,
|
|
56
|
+
},
|
|
57
|
+
header: {
|
|
58
|
+
type: Array,
|
|
59
|
+
default: () => ["title"],
|
|
60
|
+
},
|
|
61
|
+
tags: {
|
|
62
|
+
type: Array,
|
|
63
|
+
default: () => ["themes"],
|
|
64
|
+
},
|
|
65
|
+
subheader: {
|
|
66
|
+
type: Array,
|
|
67
|
+
default: () => [],
|
|
68
|
+
},
|
|
69
|
+
body: {
|
|
70
|
+
type: Array,
|
|
71
|
+
default: () => ["satellite", "sensor", "agency", "extent"],
|
|
72
|
+
},
|
|
73
|
+
featured: {
|
|
74
|
+
type: Array,
|
|
75
|
+
default: () => ["description", "providers", "assets", "links"],
|
|
76
|
+
},
|
|
77
|
+
footer: {
|
|
78
|
+
type: Array,
|
|
79
|
+
default: () => ["sci:citation"],
|
|
80
|
+
},
|
|
81
|
+
});
|
|
82
|
+
</script>
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
ref="rootEl"
|
|
4
|
+
class="d-flex flex-column fill-height overflow-auto bg-primary"
|
|
5
|
+
>
|
|
6
|
+
<div class="d-flex flex-row justify-space-between pa-4 align-center">
|
|
7
|
+
<v-btn
|
|
8
|
+
v-if="props.showIndicatorsBtn"
|
|
9
|
+
color="secondary"
|
|
10
|
+
class="text-none py-2 px-4"
|
|
11
|
+
:append-icon="[mdiPlus]"
|
|
12
|
+
:text="indicatorBtnText"
|
|
13
|
+
@click="dialog = !dialog"
|
|
14
|
+
>
|
|
15
|
+
</v-btn>
|
|
16
|
+
<EodashLayoutSwitcher
|
|
17
|
+
v-if="props.showLayoutSwitcher"
|
|
18
|
+
:target="layoutTarget"
|
|
19
|
+
:icon="layoutIcon"
|
|
20
|
+
/>
|
|
21
|
+
</div>
|
|
22
|
+
<PopUp
|
|
23
|
+
v-model="dialog"
|
|
24
|
+
:maxWidth="popupWidth"
|
|
25
|
+
:width="popupWidth"
|
|
26
|
+
:max-height="popupHeight"
|
|
27
|
+
:height="popupHeight"
|
|
28
|
+
>
|
|
29
|
+
<EodashItemFilter
|
|
30
|
+
class="pa-4"
|
|
31
|
+
results-title=""
|
|
32
|
+
v-bind="props.itemFilterConfig"
|
|
33
|
+
@select="dialog = !dialog"
|
|
34
|
+
/>
|
|
35
|
+
</PopUp>
|
|
36
|
+
</div>
|
|
37
|
+
</template>
|
|
38
|
+
|
|
39
|
+
<script setup>
|
|
40
|
+
import PopUp from "^/PopUp.vue";
|
|
41
|
+
import EodashItemFilter from "^/EodashItemFilter.vue";
|
|
42
|
+
import EodashLayoutSwitcher from "^/EodashLayoutSwitcher.vue";
|
|
43
|
+
import { mdiPlus, mdiViewDashboard } from "@mdi/js";
|
|
44
|
+
import { computed, ref } from "vue";
|
|
45
|
+
import { makePanelTransparent } from "@/composables";
|
|
46
|
+
import { useDisplay } from "vuetify/lib/framework.mjs";
|
|
47
|
+
|
|
48
|
+
const dialog = ref(false);
|
|
49
|
+
|
|
50
|
+
const { smAndDown } = useDisplay();
|
|
51
|
+
const popupWidth = computed(() => (smAndDown.value ? "80%" : "1500px"));
|
|
52
|
+
const popupHeight = computed(() => (smAndDown.value ? "90%" : "800px"));
|
|
53
|
+
|
|
54
|
+
const props = defineProps({
|
|
55
|
+
showIndicatorsBtn: {
|
|
56
|
+
type: Boolean,
|
|
57
|
+
default: true,
|
|
58
|
+
},
|
|
59
|
+
showLayoutSwitcher: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
default: true,
|
|
62
|
+
},
|
|
63
|
+
layoutTarget: {
|
|
64
|
+
type: String,
|
|
65
|
+
default: "light",
|
|
66
|
+
},
|
|
67
|
+
// mdi/js icon
|
|
68
|
+
layoutIcon: {
|
|
69
|
+
type: String,
|
|
70
|
+
default: mdiViewDashboard,
|
|
71
|
+
},
|
|
72
|
+
indicatorBtnText: {
|
|
73
|
+
type: String,
|
|
74
|
+
default: "Select indicator",
|
|
75
|
+
},
|
|
76
|
+
itemFilterConfig: {
|
|
77
|
+
type: Object,
|
|
78
|
+
default: () => {},
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
const rootEl = ref(null);
|
|
82
|
+
makePanelTransparent(rootEl);
|
|
83
|
+
</script>
|
package/widgets/ExportState.vue
CHANGED
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
import { mdiClipboardCheckOutline, mdiContentCopy } from "@mdi/js";
|
|
53
53
|
import PopUp from "./PopUp.vue";
|
|
54
54
|
import { copyToClipBoard } from "@/utils";
|
|
55
|
-
import {
|
|
56
|
-
import { getLayers as getLayerAction } from "@/store/
|
|
57
|
-
import { mapPosition } from "@/store/
|
|
58
|
-
import { removeUnneededProperties } from "@/
|
|
55
|
+
import { ref } from "vue";
|
|
56
|
+
import { getLayers as getLayerAction } from "@/store/actions";
|
|
57
|
+
import { mapPosition, availableMapProjection } from "@/store/states";
|
|
58
|
+
import { removeUnneededProperties } from "@/eodashSTAC/helpers";
|
|
59
59
|
|
|
60
60
|
const dialog = defineModel({ type: Boolean, required: true, default: false });
|
|
61
61
|
|
|
@@ -71,7 +71,7 @@ const copySuccess = ref(false);
|
|
|
71
71
|
const copyBtns = [
|
|
72
72
|
{
|
|
73
73
|
id: Symbol(),
|
|
74
|
-
copyFn: async () => await copyToClipBoard(
|
|
74
|
+
copyFn: async () => await copyToClipBoard(getMapEntryCode(), copySuccess),
|
|
75
75
|
copyAs: "simple map",
|
|
76
76
|
},
|
|
77
77
|
{
|
|
@@ -82,28 +82,28 @@ const copyBtns = [
|
|
|
82
82
|
},
|
|
83
83
|
{
|
|
84
84
|
id: Symbol(),
|
|
85
|
-
copyFn: async () => await copyToClipBoard(
|
|
85
|
+
copyFn: async () => await copyToClipBoard(getMapStepCode(), copySuccess),
|
|
86
86
|
copyAs: "map tour section",
|
|
87
87
|
},
|
|
88
88
|
];
|
|
89
89
|
|
|
90
|
-
const
|
|
90
|
+
const getMapStepCode = () => {
|
|
91
91
|
const [x, y, z] = mapPosition.value;
|
|
92
92
|
const preTag = "### <!" + "--{ layers=";
|
|
93
|
-
const endTag = `zoom="${z}" center=[${[x, y]}] animationOptions={duration:500}}-->
|
|
93
|
+
const endTag = `zoom="${z}" center=[${[x, y]}] projection="${availableMapProjection.value}" animationOptions={duration:500}}-->
|
|
94
94
|
#### Tour step title
|
|
95
95
|
Text describing the current step of the tour and why it is interesting what the map shows currently
|
|
96
96
|
`;
|
|
97
97
|
return `${preTag}'${JSON.stringify(removeUnneededProperties(props.getLayers()))}' ${endTag}`;
|
|
98
|
-
}
|
|
99
|
-
const
|
|
98
|
+
};
|
|
99
|
+
const getMapEntryCode = () => {
|
|
100
100
|
const [x, y, z] = mapPosition.value;
|
|
101
101
|
const preTag =
|
|
102
102
|
"## Map Example <!" +
|
|
103
103
|
'--{as="eox-map" style="width: 100%; height: 500px;" layers=';
|
|
104
|
-
const endTag = `zoom="${z}" center=[${[x, y]}] }-->`;
|
|
104
|
+
const endTag = `zoom="${z}" center=[${[x, y]}] projection="${availableMapProjection.value}" }-->`;
|
|
105
105
|
return `${preTag}'${JSON.stringify(removeUnneededProperties(props.getLayers()))}' ${endTag}`;
|
|
106
|
-
}
|
|
106
|
+
};
|
|
107
107
|
</script>
|
|
108
108
|
<style scoped>
|
|
109
109
|
.code-block {
|
package/widgets/PopUp.vue
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<span>
|
|
3
3
|
<v-dialog
|
|
4
|
-
|
|
5
|
-
max-height="500px"
|
|
4
|
+
v-bind="config"
|
|
6
5
|
absolute
|
|
7
6
|
scrollable
|
|
8
7
|
scroll-strategy="block"
|
|
@@ -34,7 +33,30 @@ const props = defineProps({
|
|
|
34
33
|
type: Object,
|
|
35
34
|
default: undefined,
|
|
36
35
|
},
|
|
36
|
+
maxWidth: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: "500px",
|
|
39
|
+
},
|
|
40
|
+
maxHeight: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: "500px",
|
|
43
|
+
},
|
|
44
|
+
width: {
|
|
45
|
+
type: String,
|
|
46
|
+
default: "500px",
|
|
47
|
+
},
|
|
48
|
+
height: {
|
|
49
|
+
type: String,
|
|
50
|
+
default: "500px",
|
|
51
|
+
},
|
|
37
52
|
});
|
|
38
53
|
|
|
54
|
+
const config = {
|
|
55
|
+
maxWidth: props.maxWidth,
|
|
56
|
+
maxHeight: props.maxHeight,
|
|
57
|
+
width: props.width,
|
|
58
|
+
height: props.height,
|
|
59
|
+
};
|
|
60
|
+
|
|
39
61
|
const [definedWidget] = useDefineWidgets([props?.widget]);
|
|
40
62
|
</script>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/** @group WebComponent */
|
|
2
|
-
type EodashConstructor = import("vue").VueElementConstructor<
|
|
3
|
-
import("vue").ExtractPropTypes<{ config: string }>
|
|
4
|
-
>;
|
|
5
|
-
/**
|
|
6
|
-
* Eodash Web Component constructor
|
|
7
|
-
*
|
|
8
|
-
* @group WebComponent
|
|
9
|
-
*/
|
|
10
|
-
export declare const Eodash: EodashConstructor;
|
|
11
|
-
/**
|
|
12
|
-
* Registers `eo-dash` as Custom Element in the window
|
|
13
|
-
*
|
|
14
|
-
* @group WebComponent
|
|
15
|
-
*/
|
|
16
|
-
export declare function register(): void;
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Eodash store @see EodashStore
|
|
20
|
-
*
|
|
21
|
-
* @group WebComponent
|
|
22
|
-
*/
|
|
23
|
-
export declare const store: import("./types").EodashStore;
|