@eodash/eodash 5.0.0-processing → 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.
Files changed (111) hide show
  1. package/core/client/asWebComponent.js +2 -3
  2. package/core/client/components/DashboardLayout.vue +35 -17
  3. package/core/client/components/Loading.vue +6 -9
  4. package/core/client/components/MobileLayout.vue +16 -14
  5. package/core/client/composables/DefineEodash.js +13 -3
  6. package/core/client/composables/DefineTemplate.js +67 -0
  7. package/core/client/composables/DefineWidgets.js +3 -2
  8. package/core/client/composables/EodashMap.js +23 -12
  9. package/core/client/composables/EodashProcess.js +10 -11
  10. package/core/client/composables/index.js +35 -10
  11. package/core/client/eodash.js +381 -139
  12. package/core/client/{utils/eodashSTAC.js → eodashSTAC/EodashCollection.js} +75 -42
  13. package/core/client/{utils → eodashSTAC}/createLayers.js +10 -8
  14. package/core/client/{utils → eodashSTAC}/helpers.js +45 -68
  15. package/core/client/eodashSTAC/triggers.js +43 -0
  16. package/core/client/plugins/vuetify.js +2 -1
  17. package/core/client/store/{Actions.js → actions.js} +16 -2
  18. package/core/client/store/index.js +4 -18
  19. package/core/client/store/stac.js +4 -4
  20. package/core/client/store/{States.js → states.js} +2 -0
  21. package/{dist/types/core/client/types.d.ts → core/client/types.ts} +47 -8
  22. package/core/client/utils/states.js +8 -3
  23. package/core/client/views/Dashboard.vue +6 -4
  24. package/core/client/vite-env.d.ts +1 -1
  25. package/dist/client/{DashboardLayout-CVMJ4l8M.js → DashboardLayout-232tRmjz.js} +12 -15
  26. package/dist/client/{DynamicWebComponent-Cv8n457T.js → DynamicWebComponent-Cl4LqHU6.js} +1 -1
  27. package/dist/client/{EodashDatePicker-VVkiPmpc.js → EodashDatePicker-Pok6bZwU.js} +75 -163
  28. package/dist/client/EodashItemFilter-16eMMjTV.js +151 -0
  29. package/dist/client/{EodashLayerControl-53WghA8G.js → EodashLayerControl-De7IlCm_.js} +17 -7
  30. package/dist/client/EodashLayoutSwitcher-C-3-jjn5.js +52 -0
  31. package/dist/client/{EodashMap-CQnOePpy.js → EodashMap-CMvbfI6-.js} +101 -38
  32. package/dist/client/EodashMapBtns-BeknGDtc.js +107 -0
  33. package/dist/client/{EodashProcess-cF0unIy8.js → EodashProcess-BwKAa9Ee.js} +9 -10
  34. package/dist/client/EodashStacInfo-_BfonNUG.js +85 -0
  35. package/dist/client/EodashTools-PD3XPYuR.js +103 -0
  36. package/dist/client/{ExportState-BT8MLAW7.js → ExportState-DOrT7M15.js} +5 -5
  37. package/dist/client/{Footer-C6GUG84G.js → Footer-CCigxYBo.js} +1 -1
  38. package/dist/client/{Header-D2dtCWp8.js → Header-C2cdx4gb.js} +3 -3
  39. package/dist/client/{MobileLayout-BAo8Wr8T.js → MobileLayout-BdiFjHg7.js} +28 -31
  40. package/dist/client/{PopUp-Bm01q7Ko.js → PopUp--_xn1Cms.js} +29 -8
  41. package/dist/client/{VImg-B8AbetCE.js → VImg-9xu2l99m.js} +2 -2
  42. package/dist/client/{VMain-DnGlQUyr.js → VMain-BUs3kDTd.js} +1 -1
  43. package/dist/client/{VOverlay-B8Qj7LRG.js → VOverlay-D89omJis.js} +3 -3
  44. package/dist/client/VTooltip-CDu3bErh.js +86 -0
  45. package/dist/client/{WidgetsContainer-CwXRRLS1.js → WidgetsContainer-aFG9yFT6.js} +1 -1
  46. package/dist/client/{asWebComponent-DUUoR7MZ.js → asWebComponent-BRGyP_j5.js} +1374 -1052
  47. package/dist/client/{style.css → eo-dash.css} +1 -1
  48. package/dist/client/eo-dash.js +1 -1
  49. package/dist/client/{forwardRefs-CZJhEAKW.js → forwardRefs-CYrR6bMw.js} +1 -1
  50. package/dist/client/{index-DlIO7sJ3.js → index-BZwk0V42.js} +1 -1
  51. package/dist/client/{transition-BiR8wMn1.js → transition-DG9nRSW4.js} +1 -1
  52. package/dist/node/cli.js +2 -2
  53. package/package.json +47 -33
  54. package/widgets/EodashDatePicker.vue +68 -54
  55. package/widgets/EodashItemFilter.vue +60 -105
  56. package/widgets/EodashLayerControl.vue +17 -4
  57. package/widgets/EodashLayoutSwitcher.vue +36 -0
  58. package/widgets/EodashMap.vue +26 -27
  59. package/widgets/EodashMapBtns.vue +41 -4
  60. package/widgets/EodashProcess.vue +4 -12
  61. package/widgets/EodashStacInfo.vue +82 -0
  62. package/widgets/EodashTools.vue +83 -0
  63. package/widgets/ExportState.vue +3 -3
  64. package/widgets/PopUp.vue +24 -2
  65. package/core/client/asWebComponent.d.ts +0 -23
  66. package/core/client/types.d.ts +0 -279
  67. package/dist/client/EodashItemFilter-CugWNQ86.js +0 -194
  68. package/dist/client/EodashMapBtns-uaRwFtfB.js +0 -66
  69. package/dist/types/core/client/App.vue.d.ts +0 -7
  70. package/dist/types/core/client/asWebComponent.d.ts +0 -9
  71. package/dist/types/core/client/components/DashboardLayout.vue.d.ts +0 -2
  72. package/dist/types/core/client/components/DynamicWebComponent.vue.d.ts +0 -18
  73. package/dist/types/core/client/components/ErrorAlert.vue.d.ts +0 -2
  74. package/dist/types/core/client/components/Footer.vue.d.ts +0 -2
  75. package/dist/types/core/client/components/Header.vue.d.ts +0 -2
  76. package/dist/types/core/client/components/IframeWrapper.vue.d.ts +0 -7
  77. package/dist/types/core/client/components/Loading.vue.d.ts +0 -2
  78. package/dist/types/core/client/components/MobileLayout.vue.d.ts +0 -2
  79. package/dist/types/core/client/composables/DefineEodash.d.ts +0 -2
  80. package/dist/types/core/client/composables/DefineTemplate.d.ts +0 -15
  81. package/dist/types/core/client/composables/DefineWidgets.d.ts +0 -14
  82. package/dist/types/core/client/composables/EodashMap.d.ts +0 -5
  83. package/dist/types/core/client/composables/index.d.ts +0 -30
  84. package/dist/types/core/client/eodash.d.ts +0 -8
  85. package/dist/types/core/client/main.d.ts +0 -2
  86. package/dist/types/core/client/plugins/axios.d.ts +0 -2
  87. package/dist/types/core/client/plugins/index.d.ts +0 -3
  88. package/dist/types/core/client/plugins/vuetify.d.ts +0 -82
  89. package/dist/types/core/client/render.d.ts +0 -1
  90. package/dist/types/core/client/store/Actions.d.ts +0 -12
  91. package/dist/types/core/client/store/States.d.ts +0 -22
  92. package/dist/types/core/client/store/index.d.ts +0 -2
  93. package/dist/types/core/client/store/stac.d.ts +0 -25
  94. package/dist/types/core/client/utils/createLayers.d.ts +0 -45
  95. package/dist/types/core/client/utils/eodashSTAC.d.ts +0 -82
  96. package/dist/types/core/client/utils/helpers.d.ts +0 -84
  97. package/dist/types/core/client/utils/index.d.ts +0 -2
  98. package/dist/types/core/client/utils/keys.d.ts +0 -6
  99. package/dist/types/core/client/utils/states.d.ts +0 -14
  100. package/dist/types/core/client/views/Dashboard.vue.d.ts +0 -9
  101. package/dist/types/widgets/EodashDatePicker.vue.d.ts +0 -7
  102. package/dist/types/widgets/EodashItemFilter.vue.d.ts +0 -42
  103. package/dist/types/widgets/EodashLayerControl.vue.d.ts +0 -11
  104. package/dist/types/widgets/EodashLayoutSwitcher.vue.d.ts +0 -9
  105. package/dist/types/widgets/EodashMap.vue.d.ts +0 -7
  106. package/dist/types/widgets/EodashMapBtns.vue.d.ts +0 -11
  107. package/dist/types/widgets/EodashStacInfo.vue.d.ts +0 -21
  108. package/dist/types/widgets/EodashTools.vue.d.ts +0 -15
  109. package/dist/types/widgets/ExportState.vue.d.ts +0 -7
  110. package/dist/types/widgets/PopUp.vue.d.ts +0 -22
  111. 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 Template<T extends ExecutionTime = "compiletime"> {
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 = `${"https://" | "http://"}${string}/catalog.json`;
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 interface Eodash<T extends ExecutionTime = "compiletime"> {
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
- /** Template configuration */
232
- template: Template<T>;
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 `EPSG` code */
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
- export { createEodash, store } from "./main.js";
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
- * @type {import('./eodashSTAC').EodashCollection[]}
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
- * @type {import('./eodashSTAC').EodashCollection[]}
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 = smAndDown.value
52
- ? defineAsyncComponent(() => import(`@/components/MobileLayout.vue`))
53
- : defineAsyncComponent(() => import(`@/components/DashboardLayout.vue`));
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("@/types").EodashStore;
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 { inject, openBlock, createBlock, withCtx, createElementVNode, unref, normalizeStyle, createElementBlock, Suspense, resolveDynamicComponent, mergeProps, createCommentVNode, Fragment, renderList, Transition } from 'vue';
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 { V as VMain } from './VMain-DnGlQUyr.js';
3
+ import { _ as _export_sfc, F as useDefineTemplate } from './asWebComponent-BRGyP_j5.js';
4
+ import { V as VMain } from './VMain-BUs3kDTd.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 eodash = /** @type {import("@/types").Eodash} */ (inject(eodashKey));
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(eodash).template.gap ?? 16,
27
- style: normalizeStyle(`padding: ${unref(eodash).template.gap || 16}px`)
22
+ gap: unref(gap),
23
+ style: normalizeStyle(`padding: ${unref(gap)}px`)
28
24
  }, [
29
- (unref(bgWidget).component)
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(eodash).template.gap ?? 16}px;`),
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).component), mergeProps({ id: "bg-widget" }, unref(bgWidget).props), null, 16 /* FULL_PROPS */))
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-c4bc74b1"]]);
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 { a0 as useSTAcStore } from './asWebComponent-DUUoR7MZ.js';
2
+ import { $ as useSTAcStore } from './asWebComponent-BRGyP_j5.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 { computed, ref, mergeProps, createVNode, resolveComponent, render, h, useCssVars, customRef, reactive, watch, onMounted, openBlock, createElementBlock, Fragment, unref, createSlots, withCtx, createElementVNode, toHandlers, withDirectives, createBlock } from 'vue';
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 { storeToRefs } from 'pinia';
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-BRGyP_j5.js';
5
4
  import { mdiRayEndArrow, mdiRayStartArrow } from '@mdi/js';
6
5
  import log from 'loglevel';
7
- import { m as makeVOverlayProps, V as VOverlay } from './VOverlay-B8Qj7LRG.js';
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-CDu3bErh.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 _hoisted_2 = ["value"];
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
- const { selectedStac } = storeToRefs(useSTAcStore());
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
- // fixes calendar dispalcement on lib mode
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(Fragment, null, [
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[0] || (_cache[0] = $event => ((currentDate).value = $event)),
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
- attributes: attributes
328
- }, createSlots({
329
- default: withCtx(({ inputValue, inputEvents }) => [
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
- createElementVNode("input", mergeProps({ value: inputValue }, toHandlers(inputEvents, true), {
332
- style: {"margin":"1px"},
333
- class: "flex-grow px-1 py-1 bg-white dark:bg-gray-700"
334
- }), null, 16 /* FULL_PROPS */, _hoisted_2)
335
- ])
336
- ]),
337
- _: 2 /* DYNAMIC */
338
- }, [
339
- (__props.hintText)
340
- ? {
341
- name: "footer",
342
- fn: withCtx(() => [
343
- createElementVNode("div", _hoisted_3, [
344
- createElementVNode("span", { innerHTML: __props.hintText }, null, 8 /* PROPS */, _hoisted_4)
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
- key: "0"
348
- }
349
- : undefined
350
- ]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["modelValue", "masks", "attributes"]),
351
- createVNode(VRow, {
352
- align: "center",
353
- justify: "center",
354
- style: {"margin-top":"6px"}
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
- _: 1 /* STABLE */
382
- })), [
383
- [Tooltip, 'Set date to latest available dataset', "bottom"]
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
- ], 64 /* STABLE_FRAGMENT */))
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-BRGyP_j5.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 };