@eodash/eodash 5.0.0-alpha.2.26 → 5.0.0-alpha.2.27

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 (108) hide show
  1. package/core/client/asWebComponent.js +2 -3
  2. package/core/client/components/DashboardLayout.vue +35 -13
  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 +39 -14
  9. package/core/client/composables/EodashProcess.js +574 -0
  10. package/core/client/composables/index.js +54 -11
  11. package/core/client/eodash.js +383 -125
  12. package/core/client/{utils/eodashSTAC.js → eodashSTAC/EodashCollection.js} +75 -41
  13. package/core/client/{utils → eodashSTAC}/createLayers.js +10 -8
  14. package/core/client/{utils → eodashSTAC}/helpers.js +47 -75
  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/keys.js +2 -0
  23. package/core/client/utils/states.js +8 -3
  24. package/core/client/views/Dashboard.vue +6 -4
  25. package/core/client/vite-env.d.ts +1 -16
  26. package/dist/client/{DashboardLayout-E_JzgCH5.js → DashboardLayout-232tRmjz.js} +23 -25
  27. package/dist/client/{DynamicWebComponent-C9pVUfT3.js → DynamicWebComponent-Cl4LqHU6.js} +1 -1
  28. package/dist/client/{EodashDatePicker-CjU8R2ia.js → EodashDatePicker-Pok6bZwU.js} +78 -165
  29. package/dist/client/EodashItemFilter-16eMMjTV.js +151 -0
  30. package/dist/client/{EodashLayerControl-mKfwru42.js → EodashLayerControl-De7IlCm_.js} +19 -11
  31. package/dist/client/EodashLayoutSwitcher-C-3-jjn5.js +52 -0
  32. package/dist/client/{EodashMap-BpwL82-w.js → EodashMap-CMvbfI6-.js} +116 -39
  33. package/dist/client/EodashMapBtns-BeknGDtc.js +107 -0
  34. package/dist/client/EodashProcess-BwKAa9Ee.js +1476 -0
  35. package/dist/client/EodashStacInfo-_BfonNUG.js +85 -0
  36. package/dist/client/EodashTools-PD3XPYuR.js +103 -0
  37. package/dist/client/{ExportState-ByVuIAQb.js → ExportState-DOrT7M15.js} +5 -5
  38. package/dist/client/{Footer-D691KLtK.js → Footer-CCigxYBo.js} +1 -1
  39. package/dist/client/{Header-B8UBQstf.js → Header-C2cdx4gb.js} +3 -3
  40. package/dist/client/{MobileLayout-6bHjYguI.js → MobileLayout-BdiFjHg7.js} +28 -31
  41. package/dist/client/{PopUp-CdFcnKMY.js → PopUp--_xn1Cms.js} +37 -9
  42. package/dist/client/{VImg-fKGJ7xyb.js → VImg-9xu2l99m.js} +2 -2
  43. package/dist/client/{VMain-Hf5R6yWY.js → VMain-BUs3kDTd.js} +1 -1
  44. package/dist/client/{VOverlay-ClFjEtlD.js → VOverlay-D89omJis.js} +3 -3
  45. package/dist/client/VTooltip-CDu3bErh.js +86 -0
  46. package/dist/client/{WidgetsContainer-XXYJfaPR.js → WidgetsContainer-aFG9yFT6.js} +1 -1
  47. package/dist/client/{asWebComponent-BsbKnhGV.js → asWebComponent-BRGyP_j5.js} +1495 -1142
  48. package/dist/client/{style.css → eo-dash.css} +2 -2
  49. package/dist/client/eo-dash.js +1 -1
  50. package/dist/client/{forwardRefs-I2EA3z3_.js → forwardRefs-CYrR6bMw.js} +1 -1
  51. package/dist/client/{index-B3dnMr8a.js → index-BZwk0V42.js} +1 -1
  52. package/dist/client/{transition-DJ9gfiuP.js → transition-DG9nRSW4.js} +1 -1
  53. package/dist/node/cli.js +3 -3
  54. package/package.json +56 -34
  55. package/widgets/EodashDatePicker.vue +68 -54
  56. package/widgets/EodashItemFilter.vue +60 -105
  57. package/widgets/EodashLayerControl.vue +19 -8
  58. package/widgets/EodashLayoutSwitcher.vue +36 -0
  59. package/widgets/EodashMap.vue +27 -28
  60. package/widgets/EodashMapBtns.vue +41 -4
  61. package/widgets/EodashProcess.vue +143 -0
  62. package/widgets/EodashStacInfo.vue +82 -0
  63. package/widgets/EodashTools.vue +83 -0
  64. package/widgets/ExportState.vue +3 -3
  65. package/widgets/PopUp.vue +24 -2
  66. package/core/client/asWebComponent.d.ts +0 -23
  67. package/core/client/types.d.ts +0 -279
  68. package/dist/client/EodashItemFilter-VGQasaBJ.js +0 -194
  69. package/dist/client/EodashMapBtns-GNNBdBW9.js +0 -66
  70. package/dist/types/core/client/App.vue.d.ts +0 -7
  71. package/dist/types/core/client/asWebComponent.d.ts +0 -9
  72. package/dist/types/core/client/components/DashboardLayout.vue.d.ts +0 -2
  73. package/dist/types/core/client/components/DynamicWebComponent.vue.d.ts +0 -18
  74. package/dist/types/core/client/components/ErrorAlert.vue.d.ts +0 -2
  75. package/dist/types/core/client/components/Footer.vue.d.ts +0 -2
  76. package/dist/types/core/client/components/Header.vue.d.ts +0 -2
  77. package/dist/types/core/client/components/IframeWrapper.vue.d.ts +0 -7
  78. package/dist/types/core/client/components/Loading.vue.d.ts +0 -2
  79. package/dist/types/core/client/components/MobileLayout.vue.d.ts +0 -2
  80. package/dist/types/core/client/composables/DefineEodash.d.ts +0 -2
  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 -29
  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 -11
  91. package/dist/types/core/client/store/States.d.ts +0 -21
  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 -33
  103. package/dist/types/widgets/EodashLayerControl.vue.d.ts +0 -7
  104. package/dist/types/widgets/EodashMap.vue.d.ts +0 -7
  105. package/dist/types/widgets/EodashMapBtns.vue.d.ts +0 -9
  106. package/dist/types/widgets/ExportState.vue.d.ts +0 -7
  107. package/dist/types/widgets/PopUp.vue.d.ts +0 -14
  108. 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";
@@ -4,3 +4,5 @@
4
4
  * @see {@link "@/plugins/index.js"}
5
5
  */
6
6
  export const eodashKey = Symbol("eodash");
7
+ /** @type {import("@vueuse/core").EventBusKey<"layers:updated"|"time:updated">} */
8
+ export const eoxLayersKey = Symbol("eoxMapLayers");
@@ -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,24 +6,9 @@ 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
- declare module "@eox/stacinfo" {
13
- export const EOxStacInfo: CustomElementConstructor;
14
- }
15
- declare module "@eox/layercontrol" {
16
- export const EOxLayerControl: CustomElementConstructor;
17
- }
18
- declare module "@eox/jsonform" {
19
- export const EOxJSONForm: CustomElementConstructor;
20
- }
21
- declare module "@eox/map" {
22
- export const EOxMap: CustomElementConstructor;
23
- }
24
- declare module "@eox/itemfilter" {
25
- export const EOxItemFilter: CustomElementConstructor;
26
- }
27
12
  declare module "user:config" {
28
13
  const eodash: import("@/types").Eodash | Promise<import("@/types").Eodash>;
29
14
  export default eodash;
@@ -1,29 +1,17 @@
1
- import { inject, openBlock, createBlock, withCtx, createElementVNode, unref, createElementBlock, Suspense, resolveDynamicComponent, mergeProps, createCommentVNode, Fragment, renderList, Transition } from 'vue';
2
- import { _ as _export_sfc, F as eodashKey, G as useDefineWidgets } from './asWebComponent-BsbKnhGV.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-Hf5R6yWY.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 = {
8
- key: 0,
9
- class: "bg-panel bg-surface",
10
- x: "0",
11
- y: "0",
12
- h: "12",
13
- w: "12"
14
- };
15
- const _hoisted_3 = ["h", "w", "x", "y"];
7
+ const _hoisted_2 = ["id", "h", "w", "x", "y"];
16
8
 
17
9
 
18
10
  const _sfc_main = {
19
11
  __name: 'DashboardLayout',
20
12
  setup(__props) {
21
13
 
22
- const eodash = /** @type {import("@/types").Eodash} */ (inject(eodashKey));
23
-
24
- const [bgWidget] = useDefineWidgets([eodash.template?.background]);
25
-
26
- const importedWidgets = useDefineWidgets(eodash.template?.widgets);
14
+ const { bgWidget, importedWidgets, gap } = useDefineTemplate();
27
15
 
28
16
  return (_ctx, _cache) => {
29
17
 
@@ -31,17 +19,26 @@ return (_ctx, _cache) => {
31
19
  return (openBlock(), createBlock(VMain, null, {
32
20
  default: withCtx(() => [
33
21
  createElementVNode("eox-layout", {
34
- gap: unref(eodash).template.gap ?? 2
22
+ gap: unref(gap),
23
+ style: normalizeStyle(`padding: ${unref(gap)}px`)
35
24
  }, [
36
- (unref(bgWidget).component)
37
- ? (openBlock(), createElementBlock("eox-layout-item", _hoisted_2, [
25
+ (unref(bgWidget)?.component)
26
+ ? (openBlock(), createElementBlock("eox-layout-item", {
27
+ key: 0,
28
+ class: "bg-panel bg-surface",
29
+ style: normalizeStyle(`margin: -${unref(gap) + 1}px;`),
30
+ x: "0",
31
+ y: "0",
32
+ h: "12",
33
+ w: "12"
34
+ }, [
38
35
  (openBlock(), createBlock(Suspense, { suspensible: "" }, {
39
36
  default: withCtx(() => [
40
- (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 */))
41
38
  ]),
42
39
  _: 1 /* STABLE */
43
40
  }))
44
- ]))
41
+ ], 4 /* STYLE */))
45
42
  : createCommentVNode("v-if", true),
46
43
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(importedWidgets), (importedWidget, idx) => {
47
44
  return (openBlock(), createBlock(Transition, {
@@ -51,6 +48,7 @@ return (_ctx, _cache) => {
51
48
  default: withCtx(() => [
52
49
  (importedWidget.value.component)
53
50
  ? (openBlock(), createElementBlock("eox-layout-item", {
51
+ id: importedWidget.value.id.toString(),
54
52
  key: importedWidget.value.id,
55
53
  class: "panel bg-surface",
56
54
  h: importedWidget.value.layout.h,
@@ -67,13 +65,13 @@ return (_ctx, _cache) => {
67
65
  ]),
68
66
  _: 2 /* DYNAMIC */
69
67
  }, 1024 /* DYNAMIC_SLOTS */))
70
- ], 8 /* PROPS */, _hoisted_3))
68
+ ], 8 /* PROPS */, _hoisted_2))
71
69
  : createCommentVNode("v-if", true)
72
70
  ]),
73
71
  _: 2 /* DYNAMIC */
74
72
  }, 1024 /* DYNAMIC_SLOTS */))
75
73
  }), 128 /* KEYED_FRAGMENT */))
76
- ], 8 /* PROPS */, _hoisted_1)
74
+ ], 12 /* STYLE, PROPS */, _hoisted_1)
77
75
  ]),
78
76
  _: 1 /* STABLE */
79
77
  }))
@@ -81,6 +79,6 @@ return (_ctx, _cache) => {
81
79
  }
82
80
 
83
81
  };
84
- const DashboardLayout = /*#__PURE__*/_export_sfc(_sfc_main, [['__scopeId',"data-v-6b134f31"]]);
82
+ const DashboardLayout = /*#__PURE__*/_export_sfc(_sfc_main, [['__scopeId',"data-v-ebeeb1d1"]]);
85
83
 
86
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 { $ as useSTAcStore } from './asWebComponent-BsbKnhGV.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 datetime, $ as useSTAcStore, a0 as eodashCollections, a1 as VRow, V as VBtn, y as VIcon } from './asWebComponent-BsbKnhGV.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-ClFjEtlD.js';
8
- import { b as useScopeId, f as forwardRefs } from './forwardRefs-I2EA3z3_.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) {
@@ -124,7 +42,7 @@ function findComponentParent(vnode, root) {
124
42
  const walk = children => {
125
43
  for (const child of children) {
126
44
  if (!child) continue;
127
- if (child === vnode) {
45
+ if (child === vnode || child.el && vnode.el && child.el === vnode.el) {
128
46
  return true;
129
47
  }
130
48
  stack.add(child);
@@ -144,7 +62,8 @@ function findComponentParent(vnode, root) {
144
62
  return false;
145
63
  };
146
64
  if (!walk([root.subTree])) {
147
- throw new Error('Could not find original vnode');
65
+ consoleError('Could not find original vnode, component will not inherit provides');
66
+ return root;
148
67
  }
149
68
 
150
69
  // Return the first component parent
@@ -166,16 +85,12 @@ const Tooltip = useDirectiveComponent(VTooltip, binding => {
166
85
  };
167
86
  });
168
87
 
169
- const _hoisted_1 = {
88
+ const _hoisted_1 = { class: "d-flex flex-row align-center justify-center pb-1" };
89
+ const _hoisted_2 = {
170
90
  class: "flex rounded-lg border border-gray-300 dark:border-gray-600",
171
91
  style: {"margin":"2px"}
172
92
  };
173
- const _hoisted_2 = ["value"];
174
- const _hoisted_3 = {
175
- class: "w-full px-4 pb-3",
176
- style: {"font-size":"12px"}
177
- };
178
- const _hoisted_4 = ["innerHTML"];
93
+ const _hoisted_3 = ["value"];
179
94
 
180
95
  // holds the number value of the datetime
181
96
 
@@ -186,13 +101,17 @@ const _sfc_main = {
186
101
  type: String,
187
102
  default: null,
188
103
  },
104
+ hideArrows: {
105
+ type: Boolean,
106
+ default: false,
107
+ },
108
+ hideInputField: {
109
+ type: Boolean,
110
+ default: false,
111
+ },
189
112
  },
190
113
  setup(__props) {
191
114
 
192
- useCssVars(_ctx => ({
193
- "cd569fa8": (transform.value)
194
- }));
195
-
196
115
  const currentDate = customRef((track, trigger) => ({
197
116
  get() {
198
117
  track();
@@ -224,7 +143,10 @@ const masks = ref({
224
143
  */
225
144
  const attributes = reactive([]);
226
145
 
227
- const { selectedStac } = storeToRefs(useSTAcStore());
146
+ /** @type {import("vue").Ref<HTMLDivElement|null>} */
147
+ const rootRef = ref(null);
148
+
149
+ const selectedStac = toRef(useSTAcStore(), "selectedStac");
228
150
 
229
151
  watch(
230
152
  selectedStac,
@@ -303,88 +225,79 @@ function jumpDate(reverse) {
303
225
  }
304
226
  }
305
227
 
306
- // fixes calendar dispalcement on lib mode
307
- const transform = ref("");
308
- onMounted(() => {
309
- transform.value = document.querySelector("eo-dash")
310
- ? "translate3d(50px,-80px,0)"
311
- : "translate3d(0px,-80px,0)";
312
- });
228
+ makePanelTransparent(rootRef);
313
229
 
314
230
  return (_ctx, _cache) => {
315
231
 
316
232
 
317
-
318
233
 
319
234
 
320
- return (openBlock(), createElementBlock(Fragment, null, [
235
+ return (openBlock(), createElementBlock("div", {
236
+ ref_key: "rootRef",
237
+ ref: rootRef,
238
+ class: "datePicker"
239
+ }, [
321
240
  createVNode(unref(DatePicker), {
322
241
  modelValue: currentDate.value,
323
- "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((currentDate).value = $event)),
242
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = $event => ((currentDate).value = $event)),
324
243
  modelModifiers: { number: true },
244
+ attributes: attributes,
325
245
  masks: masks.value,
326
- attributes: attributes
327
- }, createSlots({
328
- default: withCtx(({ inputValue, inputEvents }) => [
246
+ expanded: "",
247
+ class: "bg-surface overflow-auto",
248
+ style: {"background-color":"transparent","max-width":"100%"}
249
+ }, {
250
+ footer: withCtx(() => [
329
251
  createElementVNode("div", _hoisted_1, [
330
- createElementVNode("input", mergeProps({ value: inputValue }, toHandlers(inputEvents, true), {
331
- style: {"margin":"1px"},
332
- class: "flex-grow px-1 py-1 bg-white dark:bg-gray-700"
333
- }), null, 16 /* FULL_PROPS */, _hoisted_2)
334
- ])
335
- ]),
336
- _: 2 /* DYNAMIC */
337
- }, [
338
- (__props.hintText)
339
- ? {
340
- name: "footer",
341
- fn: withCtx(() => [
342
- createElementVNode("div", _hoisted_3, [
343
- 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"]
344
267
  ])
345
- ]),
346
- key: "0"
347
- }
348
- : undefined
349
- ]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["modelValue", "masks", "attributes"]),
350
- createVNode(VRow, {
351
- align: "center",
352
- justify: "center",
353
- style: {"margin-top":"6px"}
354
- }, {
355
- default: withCtx(() => [
356
- withDirectives((openBlock(), createBlock(VBtn, {
357
- style: {"padding":"0px","margin-right":"4px"},
358
- density: "compact",
359
- onClick: _cache[1] || (_cache[1] = $event => (jumpDate(true)))
360
- }, {
361
- default: withCtx(() => [
362
- createVNode(VIcon, {
363
- icon: [unref(mdiRayEndArrow)]
364
- }, null, 8 /* PROPS */, ["icon"])
365
- ]),
366
- _: 1 /* STABLE */
367
- })), [
368
- [Tooltip, 'Set date to oldest available dataset', "bottom"]
369
- ]),
370
- withDirectives((openBlock(), createBlock(VBtn, {
371
- style: {"padding":"0px","margin-left":"4px"},
372
- density: "compact",
373
- onClick: _cache[2] || (_cache[2] = $event => (jumpDate(false)))
374
- }, {
375
- default: withCtx(() => [
376
- createVNode(VIcon, {
377
- icon: [unref(mdiRayStartArrow)]
378
- }, 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)
379
278
  ]),
380
- _: 1 /* STABLE */
381
- })), [
382
- [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)
383
296
  ])
384
297
  ]),
385
298
  _: 1 /* STABLE */
386
- })
387
- ], 64 /* STABLE_FRAGMENT */))
299
+ }, 8 /* PROPS */, ["modelValue", "attributes", "masks"])
300
+ ], 512 /* NEED_PATCH */))
388
301
  }
389
302
  }
390
303