@eodash/eodash 5.0.0-alpha.2.9 → 5.0.0-rc
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 +1 -1
- package/core/client/App.vue +13 -1
- package/core/client/asWebComponent.js +13 -4
- package/core/client/components/DashboardLayout.vue +36 -14
- package/core/client/components/Loading.vue +6 -9
- package/core/client/components/MobileLayout.vue +16 -14
- package/core/client/composables/DefineEodash.js +14 -4
- package/core/client/composables/DefineTemplate.js +67 -0
- package/core/client/composables/DefineWidgets.js +3 -2
- package/core/client/composables/EodashMap.js +360 -0
- package/core/client/composables/EodashProcess.js +574 -0
- package/core/client/composables/index.js +136 -28
- package/core/client/eodash.js +395 -80
- package/core/client/eodashSTAC/EodashCollection.js +432 -0
- package/core/client/eodashSTAC/createLayers.js +315 -0
- package/core/client/eodashSTAC/helpers.js +375 -0
- package/core/client/eodashSTAC/triggers.js +43 -0
- package/core/client/plugins/axios.js +8 -0
- package/core/client/plugins/index.js +2 -1
- package/core/client/plugins/vuetify.js +2 -1
- package/core/client/store/actions.js +79 -0
- package/core/client/store/index.js +4 -18
- package/core/client/store/stac.js +99 -9
- package/core/client/store/states.js +37 -0
- package/core/client/{types.d.ts → types.ts} +66 -20
- package/core/client/utils/keys.js +2 -0
- package/core/client/utils/states.js +22 -0
- package/core/client/views/Dashboard.vue +22 -49
- package/core/client/vite-env.d.ts +2 -10
- package/dist/client/DashboardLayout-232tRmjz.js +84 -0
- package/dist/client/DynamicWebComponent-Cl4LqHU6.js +88 -0
- package/dist/client/EodashDatePicker-Pok6bZwU.js +306 -0
- package/dist/client/EodashItemFilter-16eMMjTV.js +151 -0
- package/dist/client/EodashLayerControl-De7IlCm_.js +120 -0
- package/dist/client/EodashLayoutSwitcher-C-3-jjn5.js +52 -0
- package/dist/client/EodashMap-CMvbfI6-.js +549 -0
- package/dist/client/EodashMapBtns-BeknGDtc.js +107 -0
- package/dist/client/EodashProcess-BwKAa9Ee.js +1476 -0
- package/dist/client/EodashStacInfo-_BfonNUG.js +85 -0
- package/dist/client/EodashTools-PD3XPYuR.js +103 -0
- package/dist/client/ExportState-DOrT7M15.js +644 -0
- package/dist/client/Footer-CCigxYBo.js +141 -0
- package/dist/client/Header-C2cdx4gb.js +437 -0
- package/dist/client/IframeWrapper-BgM9aU8f.js +28 -0
- package/dist/client/MobileLayout-BdiFjHg7.js +1207 -0
- package/dist/client/PopUp--_xn1Cms.js +410 -0
- package/dist/client/VImg-9xu2l99m.js +384 -0
- package/dist/client/VMain-BUs3kDTd.js +43 -0
- package/dist/client/VOverlay-D89omJis.js +1453 -0
- package/dist/client/VTooltip-CDu3bErh.js +86 -0
- package/dist/client/WidgetsContainer-aFG9yFT6.js +83 -0
- package/dist/client/asWebComponent-BRGyP_j5.js +11943 -0
- package/dist/client/{style.css → eo-dash.css} +2 -2
- package/dist/client/eo-dash.js +2 -6
- package/dist/client/forwardRefs-CYrR6bMw.js +245 -0
- package/dist/client/index-BZwk0V42.js +199 -0
- package/dist/client/ssrBoot-BP7SYRyC.js +22 -0
- package/dist/client/transition-DG9nRSW4.js +37 -0
- package/dist/node/cli.js +4 -4
- package/dist/node/types.d.ts +2 -0
- package/package.json +73 -38
- package/widgets/EodashDatePicker.vue +176 -134
- package/widgets/EodashItemFilter.vue +79 -38
- package/widgets/EodashLayerControl.vue +111 -0
- package/widgets/EodashLayoutSwitcher.vue +36 -0
- package/widgets/EodashMap.vue +108 -133
- package/widgets/EodashMapBtns.vue +62 -8
- package/widgets/EodashProcess.vue +143 -0
- package/widgets/EodashStacInfo.vue +82 -0
- package/widgets/EodashTools.vue +83 -0
- package/widgets/ExportState.vue +17 -13
- package/widgets/PopUp.vue +24 -2
- package/core/client/SuspensedDashboard.ce.vue +0 -105
- package/core/client/asWebComponent.d.ts +0 -23
- package/core/client/store/Actions.js +0 -14
- package/core/client/store/States.js +0 -16
- package/core/client/utils/eodashSTAC.js +0 -249
- package/core/client/utils/helpers.js +0 -38
- package/dist/client/DashboardLayout-D0ZF6V2S.js +0 -156
- package/dist/client/DynamicWebComponent-CPsMSBHi.js +0 -57
- package/dist/client/EodashDatePicker-CBQP7u2X.js +0 -252
- package/dist/client/EodashItemFilter-DL2ScI-5.js +0 -7671
- package/dist/client/EodashMap-CkKoQlmR.js +0 -86917
- package/dist/client/EodashMapBtns-yuO2QmiR.js +0 -36
- package/dist/client/ExportState-CCzOhppU.js +0 -558
- package/dist/client/Footer-BPAND0yG.js +0 -115
- package/dist/client/Header-DLhebNvG.js +0 -350
- package/dist/client/IframeWrapper-1GEMHlsW.js +0 -19
- package/dist/client/MobileLayout-mGkOYRhu.js +0 -945
- package/dist/client/PopUp-1d2bBFjw.js +0 -300
- package/dist/client/VImg-DxHcztfM.js +0 -291
- package/dist/client/VMain-BLX5vRRn.js +0 -39
- package/dist/client/VOverlay-CvrYEmLu.js +0 -967
- package/dist/client/WidgetsContainer-CmYjvGm7.js +0 -129
- package/dist/client/_commonjsHelpers-DaMA6jEr.js +0 -8
- package/dist/client/asWebComponent-B91uK0U7.js +0 -20361
- package/dist/client/basedecoder-DHcBySSe-BmCFNFnw.js +0 -88
- package/dist/client/decoder-CP4lv0Kb-B6yqkcfC.js +0 -10
- package/dist/client/deflate-BXt-9JA_-CWfClgpK.js +0 -10
- package/dist/client/eodashSTAC-DBjqe_Ho.js +0 -2788
- package/dist/client/eox-stacinfo-l7ALSV90.js +0 -13969
- package/dist/client/forwardRefs-BJJiadQP.js +0 -185
- package/dist/client/index-Q-bHLjxx.js +0 -153
- package/dist/client/jpeg-BAgeD1d3-oeHbFPUL.js +0 -514
- package/dist/client/lerc-DzVumYtB-P-KXC0TO.js +0 -1027
- package/dist/client/lzw-LAGDNbSC-DkP96qO9.js +0 -84
- package/dist/client/packbits-BlDR4Kj5-C66n1-zr.js +0 -24
- package/dist/client/pako.esm-CB1uQYY0-DB0PYm1P.js +0 -1081
- package/dist/client/raw-CMGvRjfu-BRi6E4i1.js +0 -9
- package/dist/client/ssrBoot-yo11mybw.js +0 -17
- package/dist/client/transition-CSJhuYGK.js +0 -34
- package/dist/client/webfontloader-qotgY98I.js +0 -435
- package/dist/client/webimage-BM_pbLN3-L2cGWK5l.js +0 -19
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { computed, ref, openBlock, createElementBlock, mergeProps, unref, createCommentVNode } from 'vue';
|
|
2
|
+
import '@eox/layercontrol';
|
|
3
|
+
import '@eox/jsonform';
|
|
4
|
+
import '@eox/timecontrol';
|
|
5
|
+
import 'color-legend-element';
|
|
6
|
+
import { $ as useSTAcStore, a2 as mapCompareEl, a3 as mapEl, a4 as eodashCompareCollections, a0 as eodashCollections, a5 as getColFromLayer } from './asWebComponent-BRGyP_j5.js';
|
|
7
|
+
import { storeToRefs } from 'pinia';
|
|
8
|
+
|
|
9
|
+
const _hoisted_1 = { class: "d-flex flex-column fill-height overflow-auto" };
|
|
10
|
+
const _hoisted_2 = ["for"];
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
const _sfc_main = {
|
|
14
|
+
__name: 'EodashLayerControl',
|
|
15
|
+
props: {
|
|
16
|
+
map: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: "first",
|
|
19
|
+
},
|
|
20
|
+
tools: {
|
|
21
|
+
type: Array,
|
|
22
|
+
default: () => ["datetime", "info", "config", "legend", "opacity"],
|
|
23
|
+
},
|
|
24
|
+
cssVars: {
|
|
25
|
+
type: Object,
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
setup(__props) {
|
|
29
|
+
|
|
30
|
+
const props = __props;
|
|
31
|
+
|
|
32
|
+
const config = {
|
|
33
|
+
tools: props.tools,
|
|
34
|
+
style: props.cssVars,
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const { selectedCompareStac, selectedStac } = storeToRefs(useSTAcStore());
|
|
38
|
+
const showControls = computed(() => {
|
|
39
|
+
if (props.map === "second") {
|
|
40
|
+
return mapCompareEl.value !== null && selectedCompareStac.value !== null;
|
|
41
|
+
}
|
|
42
|
+
return mapEl.value !== null && selectedStac.value !== null;
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
const eodashCols =
|
|
46
|
+
props.map === "second" ? eodashCompareCollections : eodashCollections;
|
|
47
|
+
const mapElement = props.map === "second" ? mapCompareEl : mapEl;
|
|
48
|
+
|
|
49
|
+
/** @type { import("vue").Ref<HTMLElement & Record<string,any> | null>} */
|
|
50
|
+
const eoxLayercontrol = ref(null);
|
|
51
|
+
|
|
52
|
+
/** @param {CustomEvent<{layer:import('ol/layer').Layer; datetime:string;}>} evt */
|
|
53
|
+
const handleDatetimeUpdate = async (evt) => {
|
|
54
|
+
const { layer, datetime } = evt.detail;
|
|
55
|
+
|
|
56
|
+
const ec = await getColFromLayer(eodashCols, layer);
|
|
57
|
+
|
|
58
|
+
/** @type {Record<string,any>[] | undefined} */
|
|
59
|
+
let updatedLayers = [];
|
|
60
|
+
|
|
61
|
+
if (ec) {
|
|
62
|
+
await ec.fetchCollection();
|
|
63
|
+
updatedLayers = await ec.updateLayerJson(
|
|
64
|
+
datetime,
|
|
65
|
+
layer.get("id"),
|
|
66
|
+
props.map,
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
/** @type {Record<String,any>[] | undefined} */
|
|
70
|
+
const dataLayers = updatedLayers?.find(
|
|
71
|
+
(l) => l?.properties?.id === "AnalysisGroup",
|
|
72
|
+
)?.layers;
|
|
73
|
+
|
|
74
|
+
if (dataLayers?.length) {
|
|
75
|
+
// Add expand to all analysis layers
|
|
76
|
+
dataLayers?.forEach((dl) => {
|
|
77
|
+
dl.properties.layerControlExpand = true;
|
|
78
|
+
dl.properties.layerControlToolsExpand = true;
|
|
79
|
+
});
|
|
80
|
+
// assign layers to the map
|
|
81
|
+
/** @type {HTMLElement & Record<string,any>} */
|
|
82
|
+
(mapElement.value).layers = updatedLayers;
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
// ----- debounce logic
|
|
87
|
+
/** @type {NodeJS.Timeout | undefined} */
|
|
88
|
+
let timeout;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* @param {CustomEvent<{layer:import('ol/layer').Layer; datetime:string;}>} evt
|
|
92
|
+
**/
|
|
93
|
+
const debouncedHandleDateTime = (evt) => {
|
|
94
|
+
clearTimeout(timeout);
|
|
95
|
+
timeout = setTimeout(() => {
|
|
96
|
+
handleDatetimeUpdate(evt);
|
|
97
|
+
}, 500);
|
|
98
|
+
};
|
|
99
|
+
// ------
|
|
100
|
+
|
|
101
|
+
return (_ctx, _cache) => {
|
|
102
|
+
return (openBlock(), createElementBlock("span", _hoisted_1, [
|
|
103
|
+
(showControls.value)
|
|
104
|
+
? (openBlock(), createElementBlock("eox-layercontrol", mergeProps({ key: 0 }, config, {
|
|
105
|
+
for: unref(mapElement),
|
|
106
|
+
"onDatetime:updated": debouncedHandleDateTime,
|
|
107
|
+
class: "fill-height",
|
|
108
|
+
toolsAsList: "true",
|
|
109
|
+
style: {"--eox-background-color":"transparent"},
|
|
110
|
+
ref_key: "eoxLayercontrol",
|
|
111
|
+
ref: eoxLayercontrol
|
|
112
|
+
}), null, 16 /* FULL_PROPS */, _hoisted_2))
|
|
113
|
+
: createCommentVNode("v-if", true)
|
|
114
|
+
]))
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { ref, openBlock, createElementBlock, createVNode, withCtx, mergeProps } from 'vue';
|
|
2
|
+
import { a1 as makePanelTransparent, y as VIcon, ak as activeTemplate } from './asWebComponent-BRGyP_j5.js';
|
|
3
|
+
import { mdiViewDashboard } from '@mdi/js';
|
|
4
|
+
import { V as VTooltip } from './VTooltip-CDu3bErh.js';
|
|
5
|
+
|
|
6
|
+
const _sfc_main = {
|
|
7
|
+
__name: 'EodashLayoutSwitcher',
|
|
8
|
+
props: {
|
|
9
|
+
target: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: "main",
|
|
12
|
+
},
|
|
13
|
+
// mdi/js icon
|
|
14
|
+
icon: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: mdiViewDashboard,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
setup(__props) {
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
/** @type {import("vue").Ref<HTMLDivElement|null>} */
|
|
24
|
+
const rootRef = ref(null);
|
|
25
|
+
makePanelTransparent(rootRef);
|
|
26
|
+
|
|
27
|
+
return (_ctx, _cache) => {
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
return (openBlock(), createElementBlock("div", {
|
|
32
|
+
ref_key: "rootRef",
|
|
33
|
+
ref: rootRef
|
|
34
|
+
}, [
|
|
35
|
+
createVNode(VTooltip, {
|
|
36
|
+
text: `Switch to ${__props.target} mode`
|
|
37
|
+
}, {
|
|
38
|
+
activator: withCtx(({ props }) => [
|
|
39
|
+
createVNode(VIcon, mergeProps(props, {
|
|
40
|
+
onClick: _cache[0] || (_cache[0] = $event => (activeTemplate.value = __props.target)),
|
|
41
|
+
icon: [__props.icon]
|
|
42
|
+
}), null, 16 /* FULL_PROPS */, ["icon"])
|
|
43
|
+
]),
|
|
44
|
+
_: 1 /* STABLE */
|
|
45
|
+
}, 8 /* PROPS */, ["text"])
|
|
46
|
+
], 512 /* NEED_PATCH */))
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export { _sfc_main as default };
|