@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
@@ -1,9 +1,9 @@
1
- import { computed, ref, openBlock, createElementBlock, unref, createCommentVNode } from 'vue';
1
+ import { computed, ref, openBlock, createElementBlock, mergeProps, unref, createCommentVNode } from 'vue';
2
2
  import '@eox/layercontrol';
3
3
  import '@eox/jsonform';
4
4
  import '@eox/timecontrol';
5
5
  import 'color-legend-element';
6
- import { a0 as useSTAcStore, a3 as mapCompareEl, a4 as mapEl, a5 as eodashCompareCollections, a1 as eodashCollections, a6 as getColFromLayer } from './asWebComponent-DUUoR7MZ.js';
6
+ import { $ as useSTAcStore, a2 as mapCompareEl, a3 as mapEl, a4 as eodashCompareCollections, a0 as eodashCollections, a5 as getColFromLayer } from './asWebComponent-BRGyP_j5.js';
7
7
  import { storeToRefs } from 'pinia';
8
8
 
9
9
  const _hoisted_1 = { class: "d-flex flex-column fill-height overflow-auto" };
@@ -17,13 +17,24 @@ const _sfc_main = {
17
17
  type: String,
18
18
  default: "first",
19
19
  },
20
+ tools: {
21
+ type: Array,
22
+ default: () => ["datetime", "info", "config", "legend", "opacity"],
23
+ },
24
+ cssVars: {
25
+ type: Object,
26
+ },
20
27
  },
21
28
  setup(__props) {
22
29
 
23
30
  const props = __props;
24
31
 
25
- const { selectedCompareStac, selectedStac } = storeToRefs(useSTAcStore());
32
+ const config = {
33
+ tools: props.tools,
34
+ style: props.cssVars,
35
+ };
26
36
 
37
+ const { selectedCompareStac, selectedStac } = storeToRefs(useSTAcStore());
27
38
  const showControls = computed(() => {
28
39
  if (props.map === "second") {
29
40
  return mapCompareEl.value !== null && selectedCompareStac.value !== null;
@@ -90,16 +101,15 @@ const debouncedHandleDateTime = (evt) => {
90
101
  return (_ctx, _cache) => {
91
102
  return (openBlock(), createElementBlock("span", _hoisted_1, [
92
103
  (showControls.value)
93
- ? (openBlock(), createElementBlock("eox-layercontrol", {
94
- key: 0,
104
+ ? (openBlock(), createElementBlock("eox-layercontrol", mergeProps({ key: 0 }, config, {
95
105
  for: unref(mapElement),
96
- ".tools": ['datetime', 'info', 'config', 'legend', 'opacity'],
97
106
  "onDatetime:updated": debouncedHandleDateTime,
98
107
  class: "fill-height",
99
108
  toolsAsList: "true",
109
+ style: {"--eox-background-color":"transparent"},
100
110
  ref_key: "eoxLayercontrol",
101
111
  ref: eoxLayercontrol
102
- }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_2))
112
+ }), null, 16 /* FULL_PROPS */, _hoisted_2))
103
113
  : createCommentVNode("v-if", true)
104
114
  ]))
105
115
  }
@@ -0,0 +1,52 @@
1
+ import { ref, openBlock, createElementBlock, createVNode, withCtx, mergeProps } from 'vue';
2
+ import { a1 as makePanelTransparent, y as VIcon, ak as activeTemplate } from './asWebComponent-BRGyP_j5.js';
3
+ import { mdiViewDashboard } from '@mdi/js';
4
+ import { V as VTooltip } from './VTooltip-CDu3bErh.js';
5
+
6
+ const _sfc_main = {
7
+ __name: 'EodashLayoutSwitcher',
8
+ props: {
9
+ target: {
10
+ type: String,
11
+ default: "main",
12
+ },
13
+ // mdi/js icon
14
+ icon: {
15
+ type: String,
16
+ default: mdiViewDashboard,
17
+ },
18
+ },
19
+ setup(__props) {
20
+
21
+
22
+
23
+ /** @type {import("vue").Ref<HTMLDivElement|null>} */
24
+ const rootRef = ref(null);
25
+ makePanelTransparent(rootRef);
26
+
27
+ return (_ctx, _cache) => {
28
+
29
+
30
+
31
+ return (openBlock(), createElementBlock("div", {
32
+ ref_key: "rootRef",
33
+ ref: rootRef
34
+ }, [
35
+ createVNode(VTooltip, {
36
+ text: `Switch to ${__props.target} mode`
37
+ }, {
38
+ activator: withCtx(({ props }) => [
39
+ createVNode(VIcon, mergeProps(props, {
40
+ onClick: _cache[0] || (_cache[0] = $event => (activeTemplate.value = __props.target)),
41
+ icon: [__props.icon]
42
+ }), null, 16 /* FULL_PROPS */, ["icon"])
43
+ ]),
44
+ _: 1 /* STABLE */
45
+ }, 8 /* PROPS */, ["text"])
46
+ ], 512 /* NEED_PATCH */))
47
+ }
48
+ }
49
+
50
+ };
51
+
52
+ export { _sfc_main as default };
@@ -1,11 +1,51 @@
1
- import { onMounted, onUnmounted, watch, nextTick, ref, computed, openBlock, createElementBlock, createElementVNode } from 'vue';
1
+ import { onMounted, onUnmounted, watch, nextTick, toRaw, ref, computed, openBlock, createElementBlock, createElementVNode, unref } from 'vue';
2
2
  import '@eox/map';
3
3
  import '@eox/map/src/plugins/advancedLayersAndSources';
4
- import { a7 as eoxLayersKey, a0 as useSTAcStore, a8 as setMapProjFromCol, a9 as EodashCollection, aa as mapPosition, a4 as mapEl, a3 as mapCompareEl, $ as datetime, a5 as eodashCompareCollections, a1 as eodashCollections } from './asWebComponent-DUUoR7MZ.js';
4
+ import { a6 as registerProjection, a7 as getProjectionCode, a8 as availableMapProjection, a9 as changeMapProjection, aa as eoxLayersKey, $ as useSTAcStore, ab as posIsSetFromUrl, ac as EodashCollection, ad as mapPosition, a3 as mapEl, a2 as mapCompareEl, Z as datetime, a4 as eodashCompareCollections, a0 as eodashCollections } from './asWebComponent-BRGyP_j5.js';
5
5
  import { storeToRefs } from 'pinia';
6
6
  import log from 'loglevel';
7
7
  import { useEventBus } from '@vueuse/core';
8
8
 
9
+ /*
10
+ * eodashSTAC helpers that utilizes the app states or actions
11
+ */
12
+
13
+ /**
14
+ * checks if there's a projection on the Collection and
15
+ * updates {@link availableMapProjection}
16
+ * @param {import('stac-ts').StacCollection} [STAcCollection]
17
+ */
18
+ const setMapProjFromCol = async (STAcCollection) => {
19
+ // if a projection exists on the collection level
20
+ log.debug("Checking for available map projection in indicator");
21
+ const projection =
22
+ /** @type {number | string | {name: string, def: string} | undefined} */
23
+ (
24
+ STAcCollection?.["eodash:mapProjection"] ||
25
+ STAcCollection?.["proj:epsg"] ||
26
+ STAcCollection?.["eodash:proj4_def"]
27
+ );
28
+ if (projection) {
29
+ log.debug("Projection found", projection);
30
+ await registerProjection(projection);
31
+ const projectionCode = getProjectionCode(projection);
32
+ if (availableMapProjection.value !== projectionCode) {
33
+ log.debug(
34
+ "Changing map projection",
35
+ availableMapProjection.value,
36
+ projectionCode,
37
+ );
38
+ await changeMapProjection(projection);
39
+ }
40
+ // set it for `EodashMapBtns`
41
+ availableMapProjection.value = /** @type {string} */ (projectionCode);
42
+ } else {
43
+ // reset to default projection
44
+ log.debug("Resetting projection to default EPSG:3857");
45
+ await changeMapProjection((availableMapProjection.value = ""));
46
+ }
47
+ };
48
+
9
49
  /**
10
50
  * Holder for previous compare map view as it is overwritten by sync
11
51
  * @type { {map:import("ol").View } | null} mapElement
@@ -13,7 +53,7 @@ import { useEventBus } from '@vueuse/core';
13
53
  let viewHolder = null;
14
54
 
15
55
  /**
16
- * Description placeholder
56
+ * Handles updating {@link mapPosition} on movement on the map
17
57
  *
18
58
  * @param {import("vue").Ref<HTMLElement & Record<string,any> & {map:import("ol").Map } | null>} mapElement
19
59
  * @param {import("vue").Ref<(number | undefined)[]>} mapPosition
@@ -33,6 +73,9 @@ const useHandleMapMoveEnd = (mapElement, mapPosition) => {
33
73
  !Number.isNaN(z)
34
74
  ) {
35
75
  mapPosition.value = [lonlat[0], lonlat[1], z];
76
+ if (posIsSetFromUrl.value) {
77
+ posIsSetFromUrl.value = false;
78
+ }
36
79
  }
37
80
  };
38
81
 
@@ -74,7 +117,7 @@ const createLayersConfig = async (
74
117
  type: "Group",
75
118
  properties: {
76
119
  id: "AnalysisGroup",
77
- title: "Analysis Layers",
120
+ title: "Data Layers",
78
121
  layerControlExpand: true,
79
122
  },
80
123
  layers: /** @type {Record<string,any>[]}*/ ([]),
@@ -99,7 +142,10 @@ const createLayersConfig = async (
99
142
  const indicatorLayers =
100
143
  //@ts-expect-error indicator is collection
101
144
  await EodashCollection.getIndicatorLayers(selectedIndicator);
102
-
145
+ const geodbLayer = EodashCollection.getGeoDBLayer(eodashCols);
146
+ if (geodbLayer) {
147
+ dataLayers.layers.push(geodbLayer);
148
+ }
103
149
  const baseLayers = {
104
150
  type: "Group",
105
151
  properties: {
@@ -194,7 +240,7 @@ const createLayersConfig = async (
194
240
  };
195
241
 
196
242
  /**
197
- * Description placeholder
243
+ * Initializes the map and updates it based on changes in the selected indicator and datetime,
198
244
  *
199
245
  * @param {import("vue").Ref<HTMLElement & Record<string,any> | null>} mapElement
200
246
  * @param {import("vue").Ref<import("stac-ts").StacCollection | null>} selectedIndicator
@@ -306,15 +352,16 @@ const useInitMap = (
306
352
  // indicator and map changes
307
353
  if (
308
354
  mapElement?.value?.id === "main" &&
309
- updatedStac.extent?.spatial.bbox
355
+ updatedStac.extent?.spatial.bbox &&
356
+ !posIsSetFromUrl.value
310
357
  ) {
311
358
  // Sanitize extent,
312
359
  const b = updatedStac.extent?.spatial.bbox[0];
313
360
  const sanitizedExtent = [
314
- b[0] > -180 ? b[0] : -180,
315
- b[1] > -90 ? b[1] : -90,
316
- b[2] < 180 ? b[2] : 180,
317
- b[3] < 90 ? b[3] : 90,
361
+ b?.[0] > -180 ? b?.[0] : -180,
362
+ b?.[1] > -90 ? b?.[1] : -90,
363
+ b?.[2] < 180 ? b?.[2] : 180,
364
+ b?.[3] < 90 ? b?.[3] : 90,
318
365
  ];
319
366
 
320
367
  const reprojExtent = mapElement.value?.transformExtent(
@@ -322,9 +369,12 @@ const useInitMap = (
322
369
  "EPSG:4326",
323
370
  mapElement.value?.map?.getView().getProjection(),
324
371
  );
325
- /** @type {any} */
372
+ /** @type {import("@eox/map").EOxMap} */
326
373
  (mapElement.value).zoomExtent = reprojExtent;
327
374
  }
375
+ if (posIsSetFromUrl.value) {
376
+ posIsSetFromUrl.value = false;
377
+ }
328
378
 
329
379
  log.debug(
330
380
  "Assigned layers",
@@ -348,11 +398,25 @@ const useInitMap = (
348
398
  });
349
399
  };
350
400
 
401
+ /**
402
+ * @module ol/easing
403
+ */
404
+
405
+
406
+ /**
407
+ * Start slow, speed up, and then slow down again.
408
+ * @param {number} t Input between 0 and 1.
409
+ * @return {number} Output between 0 and 1.
410
+ * @api
411
+ */
412
+ function inAndOut(t) {
413
+ return 3 * t * t - 2 * t * t * t;
414
+ }
415
+
351
416
  const _hoisted_1 = [".enabled"];
352
- const _hoisted_2 = [".layers"];
417
+ const _hoisted_2 = [".center", ".zoom", ".layers"];
353
418
  const _hoisted_3 = [".layers"];
354
419
 
355
-
356
420
  const _sfc_main = {
357
421
  __name: 'EodashMap',
358
422
  props: {
@@ -360,11 +424,26 @@ const _sfc_main = {
360
424
  type: Boolean,
361
425
  default: false,
362
426
  },
427
+ /** @type {import("vue").PropType<[number,number]>} */
428
+ center: {
429
+ //@ts-expect-error todo
430
+ type: Array,
431
+ default: () => [15, 48],
432
+ },
433
+ zoom: {
434
+ type: Number,
435
+ default: 4,
436
+ },
363
437
  },
364
438
  setup(__props) {
365
439
 
366
440
  const props = __props;
367
441
 
442
+ const initialCenter = toRaw([
443
+ mapPosition.value?.[0] ?? props.center?.[0],
444
+ mapPosition.value?.[1] ?? props.center?.[1],
445
+ ]);
446
+ const initialZoom = toRaw(mapPosition.value?.[2] ?? props.zoom);
368
447
  /** @type {import("vue").Ref<Record<string,any>[]>} */
369
448
  const eoxMapLayers = ref([
370
449
  {
@@ -389,32 +468,15 @@ const eoxMapCompareLayers = ref([
389
468
  },
390
469
  ]);
391
470
 
471
+ const animationOptions = {
472
+ duration: 1200,
473
+ easing: inAndOut,
474
+ };
475
+
392
476
  /** @type {import("vue").Ref<(HTMLElement & Record<string,any> & { map:import("ol").Map }) | null>} */
393
477
  const eoxMap = ref(null);
394
478
  /** @type {import("vue").Ref<(HTMLElement & Record<string,any> & { map:import("ol").Map }) | null>} */
395
479
  const compareMap = ref(null);
396
-
397
- const eoxMapConfig = {
398
- /** @type {(number|undefined)[] | undefined} */
399
- center: [15, 48],
400
- /** @type {number | undefined} */
401
- zoom: 4,
402
- };
403
-
404
- const eoxCompareMapConfig = {
405
- /** @type {(number|undefined)[] | undefined} */
406
- center: [15, 48],
407
- /** @type {number | undefined} */
408
- zoom: 4,
409
- };
410
-
411
- // Check if selected indicator was already set in store
412
- if (mapPosition && mapPosition.value && mapPosition.value.length === 3) {
413
- // TODO: do further checks for invalid values?
414
- // TODO: can we expect the values to be in a specific projection
415
- eoxMapConfig.center = [mapPosition.value?.[0], mapPosition.value[1]];
416
- eoxMapConfig.zoom = mapPosition.value[2];
417
- }
418
480
  const { selectedCompareStac } = storeToRefs(useSTAcStore());
419
481
  const showCompare = computed(() =>
420
482
  props.enableCompare && !!selectedCompareStac.value ? "" : "first",
@@ -464,8 +526,10 @@ return (_ctx, _cache) => {
464
526
  slot: "first",
465
527
  ref_key: "eoxMap",
466
528
  ref: eoxMap,
467
- ".config": eoxMapConfig,
468
529
  id: "main",
530
+ ".animationOptions": animationOptions,
531
+ ".center": unref(initialCenter),
532
+ ".zoom": unref(initialZoom),
469
533
  ".layers": eoxMapLayers.value
470
534
  }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_2),
471
535
  createElementVNode("eox-map", {
@@ -474,7 +538,6 @@ return (_ctx, _cache) => {
474
538
  slot: "second",
475
539
  ref_key: "compareMap",
476
540
  ref: compareMap,
477
- ".config": eoxCompareMapConfig,
478
541
  ".layers": eoxMapCompareLayers.value
479
542
  }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_3)
480
543
  ], 40 /* PROPS, NEED_HYDRATION */, _hoisted_1))
@@ -0,0 +1,107 @@
1
+ import { computed, ref, openBlock, createElementBlock, createBlock, unref, createCommentVNode, createVNode, withCtx } from 'vue';
2
+ import { _ as _export_sfc, t as useDisplay, a1 as makePanelTransparent, V as VBtn, a8 as availableMapProjection, a9 as changeMapProjection, ae as setActiveTemplate } from './asWebComponent-BRGyP_j5.js';
3
+ import { mdiMapPlus, mdiEarthBox, mdiCompare } from '@mdi/js';
4
+ import ExportState from './ExportState-DOrT7M15.js';
5
+ import _sfc_main$1 from './PopUp--_xn1Cms.js';
6
+ import _sfc_main$2 from './EodashItemFilter-16eMMjTV.js';
7
+
8
+ const _sfc_main = {
9
+ __name: 'EodashMapBtns',
10
+ props: {
11
+ exportMap: {
12
+ type: Boolean,
13
+ default: true,
14
+ },
15
+ changeProjection: {
16
+ type: Boolean,
17
+ default: true,
18
+ },
19
+ compareIndicators: {
20
+ type: Boolean,
21
+ default: true,
22
+ },
23
+ },
24
+ setup(__props) {
25
+
26
+
27
+ const { smAndDown } = useDisplay();
28
+ const popupWidth = computed(() => (smAndDown ? "70%" : "500px"));
29
+ const popupHeight = computed(() => (smAndDown ? "90%" : "500px"));
30
+
31
+ const showMapState = ref(false);
32
+ const showCompareIndicators = ref(false);
33
+
34
+ /** @type {import("vue").Ref<HTMLDivElement|null>} */
35
+ const rootRef = ref(null);
36
+
37
+ const onSelectCompareIndicator = () => {
38
+ setActiveTemplate("compare");
39
+ showCompareIndicators.value = !showCompareIndicators.value;
40
+ };
41
+
42
+ makePanelTransparent(rootRef);
43
+
44
+ return (_ctx, _cache) => {
45
+
46
+
47
+ return (openBlock(), createElementBlock("div", {
48
+ ref_key: "rootRef",
49
+ ref: rootRef,
50
+ class: "d-flex flex-column align-end justify-end my-3 pa-2"
51
+ }, [
52
+ (__props.exportMap)
53
+ ? (openBlock(), createBlock(VBtn, {
54
+ key: 0,
55
+ class: "map-btn",
56
+ icon: [unref(mdiMapPlus)],
57
+ onClick: _cache[0] || (_cache[0] = $event => (showMapState.value = !showMapState.value))
58
+ }, null, 8 /* PROPS */, ["icon"]))
59
+ : createCommentVNode("v-if", true),
60
+ (__props.exportMap)
61
+ ? (openBlock(), createBlock(ExportState, {
62
+ key: 1,
63
+ modelValue: showMapState.value,
64
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => ((showMapState).value = $event))
65
+ }, null, 8 /* PROPS */, ["modelValue"]))
66
+ : createCommentVNode("v-if", true),
67
+ (__props.changeProjection && !!unref(availableMapProjection))
68
+ ? (openBlock(), createBlock(VBtn, {
69
+ key: 2,
70
+ class: "map-btn",
71
+ icon: [unref(mdiEarthBox)],
72
+ onClick: _cache[2] || (_cache[2] = $event => (unref(changeMapProjection)(unref(availableMapProjection))))
73
+ }, null, 8 /* PROPS */, ["icon"]))
74
+ : createCommentVNode("v-if", true),
75
+ (__props.compareIndicators)
76
+ ? (openBlock(), createBlock(VBtn, {
77
+ key: 3,
78
+ class: "map-btn",
79
+ icon: [unref(mdiCompare)],
80
+ onClick: _cache[3] || (_cache[3] = $event => (showCompareIndicators.value = !showCompareIndicators.value))
81
+ }, null, 8 /* PROPS */, ["icon"]))
82
+ : createCommentVNode("v-if", true),
83
+ createVNode(_sfc_main$1, {
84
+ modelValue: showCompareIndicators.value,
85
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = $event => ((showCompareIndicators).value = $event)),
86
+ maxWidth: popupWidth.value,
87
+ maxHeight: popupHeight.value
88
+ }, {
89
+ default: withCtx(() => [
90
+ createVNode(_sfc_main$2, {
91
+ enableCompare: true,
92
+ "filters-title": "",
93
+ "results-title": "Select an indicator to compare",
94
+ "filter-properties": [],
95
+ onSelect: onSelectCompareIndicator
96
+ })
97
+ ]),
98
+ _: 1 /* STABLE */
99
+ }, 8 /* PROPS */, ["modelValue", "maxWidth", "maxHeight"])
100
+ ], 512 /* NEED_PATCH */))
101
+ }
102
+ }
103
+
104
+ };
105
+ const EodashMapBtns = /*#__PURE__*/_export_sfc(_sfc_main, [['__scopeId',"data-v-37c140ec"]]);
106
+
107
+ export { EodashMapBtns as default };
@@ -2,7 +2,7 @@ import { watch, onMounted, nextTick, ref, openBlock, createElementBlock, createC
2
2
  import '@eox/chart';
3
3
  import '@eox/drawtools';
4
4
  import '@eox/jsonform';
5
- import { ae as axios, af as getLayers, a4 as mapEl, ag as extractLayerConfig, a7 as eoxLayersKey, a0 as useSTAcStore, ah as useOnLayersUpdate, V as VBtn } from './asWebComponent-DUUoR7MZ.js';
5
+ import { af as axios, ag as getLayers, a3 as mapEl, ah as extractLayerConfig, aa as eoxLayersKey, $ as useSTAcStore, ai as useOnLayersUpdate, V as VBtn } from './asWebComponent-BRGyP_j5.js';
6
6
  import { storeToRefs } from 'pinia';
7
7
  import { useEventBus } from '@vueuse/core';
8
8
  import { isMulti } from '@eox/jsonform/src/custom-inputs/spatial/utils';
@@ -845,23 +845,19 @@ async function pollProcessStatus({
845
845
  * @param {import("vue").Ref<boolean>} autoExec
846
846
  * @param {import("vue").Ref<import("@eox/jsonform").EOxJSONForm | null>} jsonformEl
847
847
  * @param {import("vue").Ref<Record<string,any> | null>} jsonformSchema
848
- * @param {import("vue").Ref<boolean>} isProcessed
849
848
  * @param {() => Promise<void>} startProcess
850
849
  **/
851
850
  function useAutoExec(
852
851
  autoExec,
853
852
  jsonformEl,
854
853
  jsonformSchema,
855
- isProcessed,
856
854
  startProcess,
857
855
  ) {
858
856
  /**
859
857
  * @param {CustomEvent} _e
860
858
  **/
861
859
  const onJsonFormChange = async (_e) => {
862
- if (!isProcessed.value) {
863
- await startProcess();
864
- }
860
+ await startProcess();
865
861
  };
866
862
 
867
863
  const addEventListener = async () => {
@@ -1146,10 +1142,10 @@ async function getChartValues(links, jsonformValue, specUrl) {
1146
1142
  const spec = await axios.get(specUrl).then((resp) => {
1147
1143
  return resp.data;
1148
1144
  });
1149
- //@ts-expect-error NamedData
1150
- const dataName = spec?.data?.name;
1145
+ // //@ts-expect-error NamedData
1146
+ // const dataName = spec?.data?.name;
1151
1147
  const dataLinks = links.filter(
1152
- (link) => link.rel === "service" && dataName && link.id === dataName,
1148
+ (link) => link.rel === "service", // && dataName && link.id === dataName,
1153
1149
  );
1154
1150
 
1155
1151
  /** @type {Record<string,any>} */
@@ -1224,6 +1220,9 @@ async function handleProcesses({
1224
1220
  { ...(jsonformValue ?? {}) },
1225
1221
  specUrl,
1226
1222
  );
1223
+ if (chartSpec.value && !("background" in chartSpec.value)) {
1224
+ chartSpec.value["background"] = "transparent";
1225
+ }
1227
1226
  const geotiffLayer = await processGeoTiff(
1228
1227
  serviceLinks,
1229
1228
  jsonformValue,
@@ -1430,7 +1429,7 @@ const startProcess = async () => {
1430
1429
  });
1431
1430
  isProcessed.value = true;
1432
1431
  };
1433
- useAutoExec(autoExec, jsonformEl, jsonformSchema, isProcessed, startProcess);
1432
+ useAutoExec(autoExec, jsonformEl, jsonformSchema, startProcess);
1434
1433
 
1435
1434
  return (_ctx, _cache) => {
1436
1435
 
@@ -0,0 +1,85 @@
1
+ import { openBlock, createElementBlock, createElementVNode, unref } from 'vue';
2
+ import '@eox/stacinfo';
3
+ import { aj as currentUrl } from './asWebComponent-BRGyP_j5.js';
4
+
5
+ const _hoisted_1 = { class: "flex-grow-1 fill-height overflow-auto" };
6
+ const _hoisted_2 = [".for", ".allowHtml", ".body", ".featured", ".footer", ".styleOverride", ".header", ".subheader", ".tags"];
7
+
8
+
9
+ const _sfc_main = {
10
+ __name: 'EodashStacInfo',
11
+ props: {
12
+ allowHtml: {
13
+ type: Boolean,
14
+ default: true,
15
+ },
16
+
17
+ styleOverride: {
18
+ type: String,
19
+ default: `
20
+ .single-property {columns: 1!important;}
21
+ h1 {margin:0px!important;font-size:16px!important;}
22
+ header h1:after {
23
+ content:' ';
24
+ display:block;
25
+ border:1px solid #d0d0d0;
26
+ }
27
+ h2 {font-size:15px}
28
+ h3 {font-size:14px}
29
+ summary {cursor: pointer;}
30
+ #properties li > .value { font-weight: normal !important;}
31
+ main {padding-bottom: 10px;}
32
+ .footer-container {line-height:1;}
33
+ .footer-container button {margin-top: -10px;}
34
+ .footer-container small {font-size:10px;line-height:1;}`,
35
+ },
36
+ header: {
37
+ type: Array,
38
+ default: () => ["title"],
39
+ },
40
+ tags: {
41
+ type: Array,
42
+ default: () => ["themes"],
43
+ },
44
+ subheader: {
45
+ type: Array,
46
+ default: () => [],
47
+ },
48
+ body: {
49
+ type: Array,
50
+ default: () => ["satellite", "sensor", "agency", "extent"],
51
+ },
52
+ featured: {
53
+ type: Array,
54
+ default: () => ["description", "providers", "assets", "links"],
55
+ },
56
+ footer: {
57
+ type: Array,
58
+ default: () => ["sci:citation"],
59
+ },
60
+ },
61
+ setup(__props) {
62
+
63
+
64
+
65
+ return (_ctx, _cache) => {
66
+ return (openBlock(), createElementBlock("div", _hoisted_1, [
67
+ createElementVNode("eox-stacinfo", {
68
+ ".for": unref(currentUrl),
69
+ ".allowHtml": __props.allowHtml,
70
+ ".body": __props.body,
71
+ ".featured": __props.featured,
72
+ ".footer": __props.footer,
73
+ ".styleOverride": __props.styleOverride,
74
+ ".header": __props.header,
75
+ ".subheader": __props.subheader,
76
+ ".tags": __props.tags,
77
+ style: {"--color-primary-lighter":"none"}
78
+ }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_2)
79
+ ]))
80
+ }
81
+ }
82
+
83
+ };
84
+
85
+ export { _sfc_main as default };