@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
|
@@ -170,7 +170,7 @@ export type BackgroundWidget<T extends ExecutionTime = "compiletime"> =
|
|
|
170
170
|
*
|
|
171
171
|
* @group Eodash
|
|
172
172
|
*/
|
|
173
|
-
export interface
|
|
173
|
+
export interface SingleTemplate<T extends ExecutionTime = "compiletime"> {
|
|
174
174
|
/** Gap between widgets */
|
|
175
175
|
gap?: number;
|
|
176
176
|
/** Loading widget */
|
|
@@ -184,8 +184,13 @@ export interface Template<T extends ExecutionTime = "compiletime"> {
|
|
|
184
184
|
widgets: Widget<T>[];
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
+
export type MultiTemplates<T extends ExecutionTime = "compiletime"> = Record<
|
|
188
|
+
string,
|
|
189
|
+
SingleTemplate<T>
|
|
190
|
+
>;
|
|
191
|
+
|
|
187
192
|
/** @ignore */
|
|
188
|
-
export type StacEndpoint = `${
|
|
193
|
+
export type StacEndpoint = `${string}/catalog.json`;
|
|
189
194
|
|
|
190
195
|
/** @group Eodash */
|
|
191
196
|
type ExecutionTime = "runtime" | "compiletime";
|
|
@@ -195,7 +200,7 @@ type ExecutionTime = "runtime" | "compiletime";
|
|
|
195
200
|
*
|
|
196
201
|
* @group Eodash
|
|
197
202
|
*/
|
|
198
|
-
export
|
|
203
|
+
export type Eodash<T extends ExecutionTime = "compiletime"> = {
|
|
199
204
|
/** Instance ID. */
|
|
200
205
|
id?: string;
|
|
201
206
|
/** Root STAC catalog endpoint */
|
|
@@ -228,9 +233,16 @@ export interface Eodash<T extends ExecutionTime = "compiletime"> {
|
|
|
228
233
|
/** Text applied to the footer. */
|
|
229
234
|
footerText?: string;
|
|
230
235
|
};
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
236
|
+
} & (
|
|
237
|
+
| {
|
|
238
|
+
/** Template configuration */
|
|
239
|
+
template: SingleTemplate<T>;
|
|
240
|
+
}
|
|
241
|
+
| {
|
|
242
|
+
/** Multiple templates configuration */
|
|
243
|
+
templates: MultiTemplates<T>;
|
|
244
|
+
}
|
|
245
|
+
);
|
|
234
246
|
/////////
|
|
235
247
|
|
|
236
248
|
/// eodash store types
|
|
@@ -264,7 +276,7 @@ export interface EodashStore {
|
|
|
264
276
|
code?: number | string | { name: string; def: string },
|
|
265
277
|
) => Promise<void>;
|
|
266
278
|
|
|
267
|
-
/** Change `eox-map` projection from an
|
|
279
|
+
/** Change `eox-map` projection from an EPSG code or a registered projection code */
|
|
268
280
|
changeMapProjection: (
|
|
269
281
|
code?: number | string | { name: string; def: string },
|
|
270
282
|
) => Promise<void>;
|
|
@@ -276,4 +288,31 @@ export interface EodashStore {
|
|
|
276
288
|
};
|
|
277
289
|
}
|
|
278
290
|
///////
|
|
279
|
-
|
|
291
|
+
|
|
292
|
+
/** @group WebComponent */
|
|
293
|
+
type EodashConstructor = import("vue").VueElementConstructor<
|
|
294
|
+
import("vue").ExtractPropTypes<{ config: string }>
|
|
295
|
+
>;
|
|
296
|
+
/**
|
|
297
|
+
* Eodash Web Component constructor
|
|
298
|
+
*
|
|
299
|
+
* @group WebComponent
|
|
300
|
+
*/
|
|
301
|
+
export declare const Eodash: EodashConstructor;
|
|
302
|
+
/**
|
|
303
|
+
* Registers `eo-dash` as Custom Element in the window
|
|
304
|
+
*
|
|
305
|
+
* @group WebComponent
|
|
306
|
+
*/
|
|
307
|
+
export declare function register(): void;
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* Eodash store @see EodashStore
|
|
311
|
+
*
|
|
312
|
+
* @group WebComponent
|
|
313
|
+
*/
|
|
314
|
+
export declare const store: typeof import("@/store").default;
|
|
315
|
+
|
|
316
|
+
/////
|
|
317
|
+
|
|
318
|
+
export * from "./main.js";
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { shallowReactive } from "vue";
|
|
1
|
+
import { ref, shallowReactive } from "vue";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Array of eodash STAC Collections extracted from the current selected indicator.
|
|
5
5
|
* Updated in {@link file://./../store/stac.js `loadSelectedSTAC`} widget
|
|
6
|
-
*
|
|
6
|
+
*
|
|
7
|
+
* @type {import('../eodashSTAC/EodashCollection').EodashCollection[]}
|
|
7
8
|
* @private
|
|
8
9
|
*/
|
|
9
10
|
export const eodashCollections = shallowReactive([]);
|
|
@@ -11,7 +12,11 @@ export const eodashCollections = shallowReactive([]);
|
|
|
11
12
|
/**
|
|
12
13
|
* Array of eodash STAC Collections extracted from the current selected COMPARE indicator.
|
|
13
14
|
* Updated in {@link file://./../store/stac.js ` loadSelectedCompareSTAC`} widget
|
|
14
|
-
*
|
|
15
|
+
*
|
|
16
|
+
* @type {import('../eodashSTAC/EodashCollection').EodashCollection[]}
|
|
15
17
|
* @private
|
|
16
18
|
*/
|
|
17
19
|
export const eodashCompareCollections = shallowReactive([]);
|
|
20
|
+
|
|
21
|
+
/** whether the map postion was set in URL params on first load */
|
|
22
|
+
export const posIsSetFromUrl = ref(false);
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
import { useEodashRuntime } from "@/composables/DefineEodash";
|
|
17
17
|
import { useURLSearchParametersSync, useUpdateTheme } from "@/composables";
|
|
18
18
|
import { useSTAcStore } from "@/store/stac";
|
|
19
|
-
import { defineAsyncComponent, onErrorCaptured, ref } from "vue";
|
|
19
|
+
import { computed, defineAsyncComponent, onErrorCaptured, ref } from "vue";
|
|
20
20
|
import { useDisplay } from "vuetify/lib/framework.mjs";
|
|
21
21
|
import { loadFont } from "@/utils";
|
|
22
22
|
import Loading from "@/components/Loading.vue";
|
|
@@ -48,9 +48,11 @@ const { loadSTAC } = useSTAcStore();
|
|
|
48
48
|
await loadSTAC();
|
|
49
49
|
|
|
50
50
|
const { smAndDown } = useDisplay();
|
|
51
|
-
const TemplateComponent =
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
const TemplateComponent = computed(() =>
|
|
52
|
+
smAndDown.value
|
|
53
|
+
? defineAsyncComponent(() => import(`@/components/MobileLayout.vue`))
|
|
54
|
+
: defineAsyncComponent(() => import(`@/components/DashboardLayout.vue`)),
|
|
55
|
+
);
|
|
54
56
|
|
|
55
57
|
const HeaderComponent = defineAsyncComponent(
|
|
56
58
|
() => import(`@/components/Header.vue`),
|
|
@@ -6,7 +6,7 @@ declare module "*.vue" {
|
|
|
6
6
|
export default component;
|
|
7
7
|
}
|
|
8
8
|
declare interface Window {
|
|
9
|
-
eodashStore: import("@/
|
|
9
|
+
eodashStore: typeof import("@/store").default;
|
|
10
10
|
setEodashLoglevel: typeof import("loglevel").setLevel;
|
|
11
11
|
}
|
|
12
12
|
declare module "user:config" {
|
|
@@ -1,21 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _ as _export_sfc, F as eodashKey, G as useDefineWidgets } from './asWebComponent-DUUoR7MZ.js';
|
|
1
|
+
import { openBlock, createBlock, withCtx, createElementVNode, unref, normalizeStyle, createElementBlock, Suspense, resolveDynamicComponent, mergeProps, createCommentVNode, Fragment, renderList, Transition } from 'vue';
|
|
3
2
|
import '@eox/layout';
|
|
4
|
-
import {
|
|
3
|
+
import { _ as _export_sfc, F as useDefineTemplate } from './asWebComponent-D8bMMCEr.js';
|
|
4
|
+
import { V as VMain } from './VMain-DC05bDwX.js';
|
|
5
5
|
|
|
6
6
|
const _hoisted_1 = ["gap"];
|
|
7
|
-
const _hoisted_2 = ["h", "w", "x", "y"];
|
|
7
|
+
const _hoisted_2 = ["id", "h", "w", "x", "y"];
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
const _sfc_main = {
|
|
11
11
|
__name: 'DashboardLayout',
|
|
12
12
|
setup(__props) {
|
|
13
13
|
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
const [bgWidget] = useDefineWidgets([eodash.template?.background]);
|
|
17
|
-
|
|
18
|
-
const importedWidgets = useDefineWidgets(eodash.template?.widgets);
|
|
14
|
+
const { bgWidget, importedWidgets, gap } = useDefineTemplate();
|
|
19
15
|
|
|
20
16
|
return (_ctx, _cache) => {
|
|
21
17
|
|
|
@@ -23,14 +19,14 @@ return (_ctx, _cache) => {
|
|
|
23
19
|
return (openBlock(), createBlock(VMain, null, {
|
|
24
20
|
default: withCtx(() => [
|
|
25
21
|
createElementVNode("eox-layout", {
|
|
26
|
-
gap: unref(
|
|
27
|
-
style: normalizeStyle(`padding: ${unref(
|
|
22
|
+
gap: unref(gap),
|
|
23
|
+
style: normalizeStyle(`padding: ${unref(gap)}px`)
|
|
28
24
|
}, [
|
|
29
|
-
(unref(bgWidget)
|
|
25
|
+
(unref(bgWidget)?.component)
|
|
30
26
|
? (openBlock(), createElementBlock("eox-layout-item", {
|
|
31
27
|
key: 0,
|
|
32
28
|
class: "bg-panel bg-surface",
|
|
33
|
-
style: normalizeStyle(`margin: -${unref(
|
|
29
|
+
style: normalizeStyle(`margin: -${unref(gap) + 1}px;`),
|
|
34
30
|
x: "0",
|
|
35
31
|
y: "0",
|
|
36
32
|
h: "12",
|
|
@@ -38,7 +34,7 @@ return (_ctx, _cache) => {
|
|
|
38
34
|
}, [
|
|
39
35
|
(openBlock(), createBlock(Suspense, { suspensible: "" }, {
|
|
40
36
|
default: withCtx(() => [
|
|
41
|
-
(openBlock(), createBlock(resolveDynamicComponent(unref(bgWidget)
|
|
37
|
+
(openBlock(), createBlock(resolveDynamicComponent(unref(bgWidget)?.component), mergeProps({ id: "bg-widget" }, unref(bgWidget)?.props), null, 16 /* FULL_PROPS */))
|
|
42
38
|
]),
|
|
43
39
|
_: 1 /* STABLE */
|
|
44
40
|
}))
|
|
@@ -52,6 +48,7 @@ return (_ctx, _cache) => {
|
|
|
52
48
|
default: withCtx(() => [
|
|
53
49
|
(importedWidget.value.component)
|
|
54
50
|
? (openBlock(), createElementBlock("eox-layout-item", {
|
|
51
|
+
id: importedWidget.value.id.toString(),
|
|
55
52
|
key: importedWidget.value.id,
|
|
56
53
|
class: "panel bg-surface",
|
|
57
54
|
h: importedWidget.value.layout.h,
|
|
@@ -82,6 +79,6 @@ return (_ctx, _cache) => {
|
|
|
82
79
|
}
|
|
83
80
|
|
|
84
81
|
};
|
|
85
|
-
const DashboardLayout = /*#__PURE__*/_export_sfc(_sfc_main, [['__scopeId',"data-v-
|
|
82
|
+
const DashboardLayout = /*#__PURE__*/_export_sfc(_sfc_main, [['__scopeId',"data-v-ebeeb1d1"]]);
|
|
86
83
|
|
|
87
84
|
export { DashboardLayout as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { withAsyncContext, ref, onMounted, onUnmounted, openBlock, createElementBlock, createBlock, resolveDynamicComponent, mergeProps } from 'vue';
|
|
2
|
-
import {
|
|
2
|
+
import { $ as useSTAcStore } from './asWebComponent-D8bMMCEr.js';
|
|
3
3
|
|
|
4
4
|
const _hoisted_1 = { class: "d-flex flex-column fill-height overflow-auto" };
|
|
5
5
|
|
|
@@ -1,91 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { resolveComponent, render, h, mergeProps, customRef, ref, reactive, toRef, watch, openBlock, createElementBlock, createVNode, unref, withCtx, createElementVNode, withDirectives, createBlock, createCommentVNode } from 'vue';
|
|
2
2
|
import { DatePicker } from 'v-calendar';
|
|
3
|
-
import {
|
|
4
|
-
import { p as propsFactory, o as omit, g as genericComponent, j as useProxiedModel, Y as getUid, a as useRender, E as isObject, Z as consoleError, $ as datetime, a0 as useSTAcStore, a1 as eodashCollections, a2 as VRow, V as VBtn, y as VIcon } from './asWebComponent-DUUoR7MZ.js';
|
|
3
|
+
import { E as isObject, Y as consoleError, Z as datetime, $ as useSTAcStore, a0 as eodashCollections, a1 as makePanelTransparent, V as VBtn, y as VIcon } from './asWebComponent-D8bMMCEr.js';
|
|
5
4
|
import { mdiRayEndArrow, mdiRayStartArrow } from '@mdi/js';
|
|
6
5
|
import log from 'loglevel';
|
|
7
|
-
import {
|
|
8
|
-
import { b as useScopeId, f as forwardRefs } from './forwardRefs-CZJhEAKW.js';
|
|
9
|
-
|
|
10
|
-
const makeVTooltipProps = propsFactory({
|
|
11
|
-
id: String,
|
|
12
|
-
text: String,
|
|
13
|
-
...omit(makeVOverlayProps({
|
|
14
|
-
closeOnBack: false,
|
|
15
|
-
location: 'end',
|
|
16
|
-
locationStrategy: 'connected',
|
|
17
|
-
eager: true,
|
|
18
|
-
minWidth: 0,
|
|
19
|
-
offset: 10,
|
|
20
|
-
openOnClick: false,
|
|
21
|
-
openOnHover: true,
|
|
22
|
-
origin: 'auto',
|
|
23
|
-
scrim: false,
|
|
24
|
-
scrollStrategy: 'reposition',
|
|
25
|
-
transition: false
|
|
26
|
-
}), ['absolute', 'persistent'])
|
|
27
|
-
}, 'VTooltip');
|
|
28
|
-
const VTooltip = genericComponent()({
|
|
29
|
-
name: 'VTooltip',
|
|
30
|
-
props: makeVTooltipProps(),
|
|
31
|
-
emits: {
|
|
32
|
-
'update:modelValue': value => true
|
|
33
|
-
},
|
|
34
|
-
setup(props, _ref) {
|
|
35
|
-
let {
|
|
36
|
-
slots
|
|
37
|
-
} = _ref;
|
|
38
|
-
const isActive = useProxiedModel(props, 'modelValue');
|
|
39
|
-
const {
|
|
40
|
-
scopeId
|
|
41
|
-
} = useScopeId();
|
|
42
|
-
const uid = getUid();
|
|
43
|
-
const id = computed(() => props.id || `v-tooltip-${uid}`);
|
|
44
|
-
const overlay = ref();
|
|
45
|
-
const location = computed(() => {
|
|
46
|
-
return props.location.split(' ').length > 1 ? props.location : props.location + ' center';
|
|
47
|
-
});
|
|
48
|
-
const origin = computed(() => {
|
|
49
|
-
return props.origin === 'auto' || props.origin === 'overlap' || props.origin.split(' ').length > 1 || props.location.split(' ').length > 1 ? props.origin : props.origin + ' center';
|
|
50
|
-
});
|
|
51
|
-
const transition = computed(() => {
|
|
52
|
-
if (props.transition) return props.transition;
|
|
53
|
-
return isActive.value ? 'scale-transition' : 'fade-transition';
|
|
54
|
-
});
|
|
55
|
-
const activatorProps = computed(() => mergeProps({
|
|
56
|
-
'aria-describedby': id.value
|
|
57
|
-
}, props.activatorProps));
|
|
58
|
-
useRender(() => {
|
|
59
|
-
const overlayProps = VOverlay.filterProps(props);
|
|
60
|
-
return createVNode(VOverlay, mergeProps({
|
|
61
|
-
"ref": overlay,
|
|
62
|
-
"class": ['v-tooltip', props.class],
|
|
63
|
-
"style": props.style,
|
|
64
|
-
"id": id.value
|
|
65
|
-
}, overlayProps, {
|
|
66
|
-
"modelValue": isActive.value,
|
|
67
|
-
"onUpdate:modelValue": $event => isActive.value = $event,
|
|
68
|
-
"transition": transition.value,
|
|
69
|
-
"absolute": true,
|
|
70
|
-
"location": location.value,
|
|
71
|
-
"origin": origin.value,
|
|
72
|
-
"persistent": true,
|
|
73
|
-
"role": "tooltip",
|
|
74
|
-
"activatorProps": activatorProps.value,
|
|
75
|
-
"_disableGlobalStack": true
|
|
76
|
-
}, scopeId), {
|
|
77
|
-
activator: slots.activator,
|
|
78
|
-
default: function () {
|
|
79
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
80
|
-
args[_key] = arguments[_key];
|
|
81
|
-
}
|
|
82
|
-
return slots.default?.(...args) ?? props.text;
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
});
|
|
86
|
-
return forwardRefs({}, overlay);
|
|
87
|
-
}
|
|
88
|
-
});
|
|
6
|
+
import { V as VTooltip } from './VTooltip-C78suika.js';
|
|
89
7
|
|
|
90
8
|
// Utilities
|
|
91
9
|
function useDirectiveComponent(component, props) {
|
|
@@ -167,16 +85,12 @@ const Tooltip = useDirectiveComponent(VTooltip, binding => {
|
|
|
167
85
|
};
|
|
168
86
|
});
|
|
169
87
|
|
|
170
|
-
const _hoisted_1 = {
|
|
88
|
+
const _hoisted_1 = { class: "d-flex flex-row align-center justify-center pb-1" };
|
|
89
|
+
const _hoisted_2 = {
|
|
171
90
|
class: "flex rounded-lg border border-gray-300 dark:border-gray-600",
|
|
172
91
|
style: {"margin":"2px"}
|
|
173
92
|
};
|
|
174
|
-
const
|
|
175
|
-
const _hoisted_3 = {
|
|
176
|
-
class: "w-full px-4 pb-3",
|
|
177
|
-
style: {"font-size":"12px"}
|
|
178
|
-
};
|
|
179
|
-
const _hoisted_4 = ["innerHTML"];
|
|
93
|
+
const _hoisted_3 = ["value"];
|
|
180
94
|
|
|
181
95
|
// holds the number value of the datetime
|
|
182
96
|
|
|
@@ -187,13 +101,17 @@ const _sfc_main = {
|
|
|
187
101
|
type: String,
|
|
188
102
|
default: null,
|
|
189
103
|
},
|
|
104
|
+
hideArrows: {
|
|
105
|
+
type: Boolean,
|
|
106
|
+
default: false,
|
|
107
|
+
},
|
|
108
|
+
hideInputField: {
|
|
109
|
+
type: Boolean,
|
|
110
|
+
default: false,
|
|
111
|
+
},
|
|
190
112
|
},
|
|
191
113
|
setup(__props) {
|
|
192
114
|
|
|
193
|
-
useCssVars(_ctx => ({
|
|
194
|
-
"cd569fa8": (transform.value)
|
|
195
|
-
}));
|
|
196
|
-
|
|
197
115
|
const currentDate = customRef((track, trigger) => ({
|
|
198
116
|
get() {
|
|
199
117
|
track();
|
|
@@ -225,7 +143,10 @@ const masks = ref({
|
|
|
225
143
|
*/
|
|
226
144
|
const attributes = reactive([]);
|
|
227
145
|
|
|
228
|
-
|
|
146
|
+
/** @type {import("vue").Ref<HTMLDivElement|null>} */
|
|
147
|
+
const rootRef = ref(null);
|
|
148
|
+
|
|
149
|
+
const selectedStac = toRef(useSTAcStore(), "selectedStac");
|
|
229
150
|
|
|
230
151
|
watch(
|
|
231
152
|
selectedStac,
|
|
@@ -304,88 +225,79 @@ function jumpDate(reverse) {
|
|
|
304
225
|
}
|
|
305
226
|
}
|
|
306
227
|
|
|
307
|
-
|
|
308
|
-
const transform = ref("");
|
|
309
|
-
onMounted(() => {
|
|
310
|
-
transform.value = document.querySelector("eo-dash")
|
|
311
|
-
? "translate3d(50px,-80px,0)"
|
|
312
|
-
: "translate3d(0px,-80px,0)";
|
|
313
|
-
});
|
|
228
|
+
makePanelTransparent(rootRef);
|
|
314
229
|
|
|
315
230
|
return (_ctx, _cache) => {
|
|
316
231
|
|
|
317
232
|
|
|
318
|
-
|
|
319
233
|
|
|
320
234
|
|
|
321
|
-
return (openBlock(), createElementBlock(
|
|
235
|
+
return (openBlock(), createElementBlock("div", {
|
|
236
|
+
ref_key: "rootRef",
|
|
237
|
+
ref: rootRef,
|
|
238
|
+
class: "datePicker"
|
|
239
|
+
}, [
|
|
322
240
|
createVNode(unref(DatePicker), {
|
|
323
241
|
modelValue: currentDate.value,
|
|
324
|
-
"onUpdate:modelValue": _cache[
|
|
242
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = $event => ((currentDate).value = $event)),
|
|
325
243
|
modelModifiers: { number: true },
|
|
244
|
+
attributes: attributes,
|
|
326
245
|
masks: masks.value,
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
246
|
+
expanded: "",
|
|
247
|
+
class: "bg-surface overflow-auto",
|
|
248
|
+
style: {"background-color":"transparent","max-width":"100%"}
|
|
249
|
+
}, {
|
|
250
|
+
footer: withCtx(() => [
|
|
330
251
|
createElementVNode("div", _hoisted_1, [
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
252
|
+
(!__props.hideArrows)
|
|
253
|
+
? withDirectives((openBlock(), createBlock(VBtn, {
|
|
254
|
+
key: 0,
|
|
255
|
+
density: "compact",
|
|
256
|
+
variant: "text",
|
|
257
|
+
onClick: _cache[0] || (_cache[0] = $event => (jumpDate(true)))
|
|
258
|
+
}, {
|
|
259
|
+
default: withCtx(() => [
|
|
260
|
+
createVNode(VIcon, {
|
|
261
|
+
icon: [unref(mdiRayEndArrow)]
|
|
262
|
+
}, null, 8 /* PROPS */, ["icon"])
|
|
263
|
+
]),
|
|
264
|
+
_: 1 /* STABLE */
|
|
265
|
+
})), [
|
|
266
|
+
[Tooltip, 'Set date to oldest available dataset', "bottom"]
|
|
345
267
|
])
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
default: withCtx(() => [
|
|
357
|
-
withDirectives((openBlock(), createBlock(VBtn, {
|
|
358
|
-
style: {"padding":"0px","margin-right":"4px"},
|
|
359
|
-
density: "compact",
|
|
360
|
-
onClick: _cache[1] || (_cache[1] = $event => (jumpDate(true)))
|
|
361
|
-
}, {
|
|
362
|
-
default: withCtx(() => [
|
|
363
|
-
createVNode(VIcon, {
|
|
364
|
-
icon: [unref(mdiRayEndArrow)]
|
|
365
|
-
}, null, 8 /* PROPS */, ["icon"])
|
|
366
|
-
]),
|
|
367
|
-
_: 1 /* STABLE */
|
|
368
|
-
})), [
|
|
369
|
-
[Tooltip, 'Set date to oldest available dataset', "bottom"]
|
|
370
|
-
]),
|
|
371
|
-
withDirectives((openBlock(), createBlock(VBtn, {
|
|
372
|
-
style: {"padding":"0px","margin-left":"4px"},
|
|
373
|
-
density: "compact",
|
|
374
|
-
onClick: _cache[2] || (_cache[2] = $event => (jumpDate(false)))
|
|
375
|
-
}, {
|
|
376
|
-
default: withCtx(() => [
|
|
377
|
-
createVNode(VIcon, {
|
|
378
|
-
icon: [unref(mdiRayStartArrow)]
|
|
379
|
-
}, null, 8 /* PROPS */, ["icon"])
|
|
268
|
+
: createCommentVNode("v-if", true),
|
|
269
|
+
createElementVNode("div", _hoisted_2, [
|
|
270
|
+
(!__props.hideInputField)
|
|
271
|
+
? (openBlock(), createElementBlock("input", {
|
|
272
|
+
key: 0,
|
|
273
|
+
value: new Date(currentDate.value).toLocaleDateString(),
|
|
274
|
+
style: {"margin":"1px"},
|
|
275
|
+
class: "flex-grow px-1 py-1 dark:bg-gray-700"
|
|
276
|
+
}, null, 8 /* PROPS */, _hoisted_3))
|
|
277
|
+
: createCommentVNode("v-if", true)
|
|
380
278
|
]),
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
279
|
+
(!__props.hideArrows)
|
|
280
|
+
? withDirectives((openBlock(), createBlock(VBtn, {
|
|
281
|
+
key: 1,
|
|
282
|
+
density: "compact",
|
|
283
|
+
variant: "text",
|
|
284
|
+
onClick: _cache[1] || (_cache[1] = $event => (jumpDate(false)))
|
|
285
|
+
}, {
|
|
286
|
+
default: withCtx(() => [
|
|
287
|
+
createVNode(VIcon, {
|
|
288
|
+
icon: [unref(mdiRayStartArrow)]
|
|
289
|
+
}, null, 8 /* PROPS */, ["icon"])
|
|
290
|
+
]),
|
|
291
|
+
_: 1 /* STABLE */
|
|
292
|
+
})), [
|
|
293
|
+
[Tooltip, 'Set date to latest available dataset', "bottom"]
|
|
294
|
+
])
|
|
295
|
+
: createCommentVNode("v-if", true)
|
|
384
296
|
])
|
|
385
297
|
]),
|
|
386
298
|
_: 1 /* STABLE */
|
|
387
|
-
})
|
|
388
|
-
],
|
|
299
|
+
}, 8 /* PROPS */, ["modelValue", "attributes", "masks"])
|
|
300
|
+
], 512 /* NEED_PATCH */))
|
|
389
301
|
}
|
|
390
302
|
}
|
|
391
303
|
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { computed, ref, openBlock, createElementBlock, mergeProps, unref, createElementVNode, toDisplayString } from 'vue';
|
|
2
|
+
import { t as useDisplay, $ as useSTAcStore } from './asWebComponent-D8bMMCEr.js';
|
|
3
|
+
import '@eox/itemfilter';
|
|
4
|
+
|
|
5
|
+
const _hoisted_1 = [".items"];
|
|
6
|
+
const _hoisted_2 = {
|
|
7
|
+
slot: "filterstitle",
|
|
8
|
+
style: {"margin":"14px 8px"}
|
|
9
|
+
};
|
|
10
|
+
const _hoisted_3 = {
|
|
11
|
+
slot: "resultstitle",
|
|
12
|
+
style: {"margin":"14px 8px"}
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
const _sfc_main = {
|
|
17
|
+
__name: 'EodashItemFilter',
|
|
18
|
+
props: {
|
|
19
|
+
enableCompare: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: false,
|
|
22
|
+
},
|
|
23
|
+
filtersTitle: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: "Indicators",
|
|
26
|
+
},
|
|
27
|
+
resultsTitle: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: "Results",
|
|
30
|
+
},
|
|
31
|
+
titleProperty: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: "title",
|
|
34
|
+
},
|
|
35
|
+
aggregateResults: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: undefined,
|
|
38
|
+
},
|
|
39
|
+
imageProperty: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: "",
|
|
42
|
+
},
|
|
43
|
+
subTitleProperty: {
|
|
44
|
+
type: String,
|
|
45
|
+
default: "",
|
|
46
|
+
},
|
|
47
|
+
resultType: {
|
|
48
|
+
type: String,
|
|
49
|
+
default: "",
|
|
50
|
+
},
|
|
51
|
+
cssVars: {
|
|
52
|
+
type: [String, Object],
|
|
53
|
+
default: "",
|
|
54
|
+
},
|
|
55
|
+
enableHighlighting: { type: Boolean, default: true },
|
|
56
|
+
expandMultipleFilters: { type: Boolean, default: true },
|
|
57
|
+
expandMultipleResults: { type: Boolean, default: true },
|
|
58
|
+
filterProperties: {
|
|
59
|
+
/** @type {import("vue").PropType<{
|
|
60
|
+
* keys:string[];
|
|
61
|
+
* title:string;
|
|
62
|
+
* type:string;
|
|
63
|
+
* expanded?:boolean
|
|
64
|
+
* }[]> }*/
|
|
65
|
+
type: Array,
|
|
66
|
+
default: () => [
|
|
67
|
+
{
|
|
68
|
+
keys: ["title", "themes", "description"],
|
|
69
|
+
title: "Search",
|
|
70
|
+
type: "text",
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
key: "themes",
|
|
74
|
+
title: "Theme Filter",
|
|
75
|
+
type: "multiselect",
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
emits: ["select"],
|
|
81
|
+
setup(__props, { emit: __emit }) {
|
|
82
|
+
|
|
83
|
+
const emit = __emit;
|
|
84
|
+
|
|
85
|
+
const props = __props;
|
|
86
|
+
/**
|
|
87
|
+
* @param {import("stac-ts").StacLink} item
|
|
88
|
+
*/
|
|
89
|
+
const selectIndicator = async (item) => {
|
|
90
|
+
if (item) {
|
|
91
|
+
// Reset compare stac to empty
|
|
92
|
+
store.resetSelectedCompareSTAC();
|
|
93
|
+
await store.loadSelectedSTAC(item.href);
|
|
94
|
+
emit("select", item);
|
|
95
|
+
} else {
|
|
96
|
+
store.selectedStac = null;
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* @param {import("stac-ts").StacLink} item
|
|
101
|
+
*/
|
|
102
|
+
const selectCompareIndicator = (item) => {
|
|
103
|
+
if (item) {
|
|
104
|
+
store.loadSelectedCompareSTAC(item.href);
|
|
105
|
+
emit("select", item);
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
/** @param {any} evt*/
|
|
109
|
+
const onSelect = async (evt) => {
|
|
110
|
+
const item = /** @type {import('stac-ts').StacLink} */ evt.detail;
|
|
111
|
+
if (props.enableCompare) {
|
|
112
|
+
selectCompareIndicator(item);
|
|
113
|
+
} else {
|
|
114
|
+
selectIndicator(item);
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
const { smAndDown } = useDisplay();
|
|
118
|
+
const config = computed(() => ({
|
|
119
|
+
titleProperty: props.titleProperty,
|
|
120
|
+
enableHighlighting: props.enableHighlighting,
|
|
121
|
+
expandMultipleFilters: props.expandMultipleFilters,
|
|
122
|
+
expandMultipleResults: props.expandMultipleResults,
|
|
123
|
+
subTitleProperty: props.subTitleProperty,
|
|
124
|
+
resultType: props.resultType,
|
|
125
|
+
imageProperty: props.imageProperty,
|
|
126
|
+
aggregateResults: props.aggregateResults,
|
|
127
|
+
style: props.cssVars,
|
|
128
|
+
filterProperties: smAndDown.value ? "" : props.filterProperties,
|
|
129
|
+
}));
|
|
130
|
+
/** @type {import("vue").Ref<HTMLElement & Record<string,any> | null>} */
|
|
131
|
+
const eoxItemFilter = ref(null);
|
|
132
|
+
|
|
133
|
+
const store = useSTAcStore();
|
|
134
|
+
|
|
135
|
+
return (_ctx, _cache) => {
|
|
136
|
+
return (openBlock(), createElementBlock("eox-itemfilter", mergeProps({ class: "fill-height" }, config.value, {
|
|
137
|
+
ref_key: "eoxItemFilter",
|
|
138
|
+
ref: eoxItemFilter,
|
|
139
|
+
style: {"overflow":"auto","--background-color":"none"},
|
|
140
|
+
onSelect: onSelect,
|
|
141
|
+
".items": unref(store).stac?.filter((item) => item.rel === "child")
|
|
142
|
+
}), [
|
|
143
|
+
createElementVNode("h4", _hoisted_2, toDisplayString(__props.filtersTitle), 1 /* TEXT */),
|
|
144
|
+
createElementVNode("h4", _hoisted_3, toDisplayString(__props.resultsTitle), 1 /* TEXT */)
|
|
145
|
+
], 48 /* FULL_PROPS, NEED_HYDRATION */, _hoisted_1))
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
export { _sfc_main as default };
|