@eodash/eodash 5.0.0-rc.1.6 → 5.0.0-rc.2

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 (55) hide show
  1. package/core/client/composables/EodashMap.js +30 -25
  2. package/core/client/composables/index.js +8 -1
  3. package/core/client/eodash.js +14 -1
  4. package/core/client/eodashSTAC/EodashCollection.js +9 -5
  5. package/core/client/eodashSTAC/createLayers.js +1 -1
  6. package/core/client/eodashSTAC/helpers.js +10 -2
  7. package/core/client/eodashSTAC/triggers.js +52 -1
  8. package/core/client/store/stac.js +7 -2
  9. package/core/client/types.ts +3 -1
  10. package/core/client/utils/index.js +12 -0
  11. package/core/client/utils/states.js +16 -2
  12. package/core/client/views/Dashboard.vue +3 -1
  13. package/dist/client/{DashboardLayout-SZfMDUoR.js → DashboardLayout-VrJIbhe8.js} +2 -2
  14. package/dist/client/{DynamicWebComponent-I9gzMY0L.js → DynamicWebComponent-BCwpocDX.js} +1 -1
  15. package/dist/client/{EodashDatePicker-B9_u6TTm.js → EodashDatePicker-Bp5ec3BC.js} +60 -35
  16. package/dist/client/{EodashItemFilter-G7YsYO3B.js → EodashItemFilter-Cx0t-qeW.js} +1 -1
  17. package/dist/client/{EodashLayerControl-CJ94ul63.js → EodashLayerControl-DERx00In.js} +1 -1
  18. package/dist/client/{EodashLayoutSwitcher-DRKm8A8U.js → EodashLayoutSwitcher-DTS7otlk.js} +2 -2
  19. package/dist/client/{EodashMap-Dp44Ajbi.js → EodashMap-C-I6puhb.js} +50 -72
  20. package/dist/client/{EodashMapBtns-BlPFwhPc.js → EodashMapBtns-CWgtJiG4.js} +4 -4
  21. package/dist/client/{EodashProcess-BLmIgUGT.js → EodashProcess-DWrTIyHT.js} +32 -10
  22. package/dist/client/{EodashStacInfo-BIRcfcMo.js → EodashStacInfo-Dvsk97Mz.js} +1 -1
  23. package/dist/client/{EodashTools-PNfJ-Cw3.js → EodashTools-CdnjgTTl.js} +4 -4
  24. package/dist/client/{ExportState-5JyTshJH.js → ExportState-S4lcehm3.js} +4 -4
  25. package/dist/client/{Footer-CM9hgdQP.js → Footer-DlIEbXp-.js} +1 -1
  26. package/dist/client/{Header-BTq4DW1x.js → Header-CTiEXLi0.js} +3 -3
  27. package/dist/client/{MobileLayout-Atfoxf8d.js → MobileLayout-DRgyQYFz.js} +17 -7
  28. package/dist/client/{PopUp-Bmfn3N_4.js → PopUp-CzqV8BFZ.js} +3 -3
  29. package/dist/client/{VImg-CUF4S39i.js → VImg-Bn8bCvVM.js} +2 -2
  30. package/dist/client/{VMain-CQpXnzDR.js → VMain-2GOqWb6m.js} +1 -1
  31. package/dist/client/{VOverlay-DUnITwM1.js → VOverlay-BetC0LGI.js} +3 -3
  32. package/dist/client/{VTooltip-BYTlbKer.js → VTooltip-BWg0dxx5.js} +3 -3
  33. package/dist/client/{WidgetsContainer-BPbgxdb0.js → WidgetsContainer-Cv466WUW.js} +1 -1
  34. package/dist/client/{asWebComponent-DW1XzZkL.js → asWebComponent-CLUhauLl.js} +302 -154
  35. package/dist/client/eo-dash.css +1 -1
  36. package/dist/client/eo-dash.js +1 -1
  37. package/dist/client/{forwardRefs-gx1Fzngc.js → forwardRefs-CxSsJulB.js} +1 -1
  38. package/dist/client/{index-DvFppNyk.js → index-BMj56LY3.js} +1 -1
  39. package/dist/client/{transition-j2eWJYMg.js → transition-DidoPMgC.js} +1 -1
  40. package/dist/node/cli.js +2 -2
  41. package/dist/types/core/client/composables/EodashMap.d.ts +2 -2
  42. package/dist/types/core/client/composables/index.d.ts +1 -1
  43. package/dist/types/core/client/eodashSTAC/EodashCollection.d.ts +2 -0
  44. package/dist/types/core/client/eodashSTAC/helpers.d.ts +4 -2
  45. package/dist/types/core/client/eodashSTAC/triggers.d.ts +6 -0
  46. package/dist/types/core/client/types.d.ts +3 -1
  47. package/dist/types/core/client/utils/index.d.ts +1 -0
  48. package/dist/types/core/client/utils/states.d.ts +8 -1
  49. package/dist/types/widgets/EodashDatePicker.vue.d.ts +455 -0
  50. package/dist/types/widgets/EodashMap.vue.d.ts +2 -0
  51. package/dist/types/widgets/EodashProcess.vue.d.ts +1 -0
  52. package/package.json +19 -19
  53. package/widgets/EodashDatePicker.vue +51 -17
  54. package/widgets/EodashMap.vue +14 -2
  55. package/widgets/EodashProcess.vue +25 -11
@@ -1,4 +1,5 @@
1
1
  declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {
2
+ container: HTMLDivElement;
2
3
  jsonformEl: unknown;
3
4
  }, HTMLDivElement>;
4
5
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eodash/eodash",
3
- "version": "5.0.0-rc.1.6",
3
+ "version": "5.0.0-rc.2",
4
4
  "type": "module",
5
5
  "types": "./dist/types/core/client/types.d.ts",
6
6
  "files": [
@@ -62,10 +62,10 @@
62
62
  "@eox/chart": "^0.3.1",
63
63
  "@eox/drawtools": "^0.13.3",
64
64
  "@eox/itemfilter": "^1.7.1",
65
- "@eox/jsonform": "0.11.3-dev.1734708668.0",
66
- "@eox/layercontrol": "^0.28.2-dev.1736966655.0",
65
+ "@eox/jsonform": "^0.12.2",
66
+ "@eox/layercontrol": "^0.29.0",
67
67
  "@eox/layout": "^0.3.0",
68
- "@eox/map": "^1.19.1",
68
+ "@eox/map": "^1.19.2",
69
69
  "@eox/stacinfo": "^0.6.1",
70
70
  "@eox/timecontrol": "^0.12.2",
71
71
  "@mdi/js": "^7.4.47",
@@ -76,45 +76,45 @@
76
76
  "axios-cache-interceptor": "^1.6.2",
77
77
  "color-legend-element": "^1.3.0",
78
78
  "commander": "^12.1.0",
79
- "core-js": "^3.39.0",
79
+ "core-js": "^3.40.0",
80
80
  "loglevel": "^1.9.2",
81
81
  "mustache": "^4.2.0",
82
- "pinia": "^2.3.0",
83
- "sass": "^1.83.0",
82
+ "pinia": "^2.3.1",
83
+ "sass": "^1.83.4",
84
84
  "stac-js": "^0.0.9",
85
85
  "stac-ts": "^1.0.4",
86
86
  "v-calendar": "3.0.0",
87
87
  "vega": "^5.30.0",
88
88
  "vega-embed": "^6.29.0",
89
89
  "vega-lite": "^5.23.0",
90
- "vite": "^6.0.5",
90
+ "vite": "^6.0.11",
91
91
  "vite-plugin-vuetify": "^2.0.4",
92
92
  "vue": "^3.5.0",
93
- "vuetify": "^3.7.6",
93
+ "vuetify": "^3.7.7",
94
94
  "webfontloader": "^1.6.28"
95
95
  },
96
96
  "devDependencies": {
97
- "@babel/types": "^7.26.3",
97
+ "@babel/types": "^7.26.5",
98
98
  "@eox/eslint-config": "^2.0.0",
99
99
  "@pinia/testing": "^0.1.7",
100
100
  "@types/mustache": "^4.2.5",
101
- "@types/node": "^22.10.2",
101
+ "@types/node": "^22.10.7",
102
102
  "@types/openlayers": "^4.6.23",
103
103
  "@types/webfontloader": "^1.6.38",
104
104
  "cypress": "^13.17.0",
105
- "eslint": "^9.17.0",
105
+ "eslint": "^9.18.0",
106
106
  "eslint-plugin-vue": "^9.32.0",
107
107
  "prettier": "^3.4.2",
108
- "rollup": "^4.28.1",
108
+ "rollup": "^4.31.0",
109
109
  "terminate": "^2.8.0",
110
110
  "tsc-alias": "^1.8.10",
111
- "typedoc": "^0.27.5",
112
- "typedoc-plugin-markdown": "^4.3.3",
111
+ "typedoc": "^0.27.6",
112
+ "typedoc-plugin-markdown": "^4.4.1",
113
113
  "typedoc-plugin-vue": "^1.3.0",
114
- "typedoc-vitepress-theme": "^1.1.1",
115
- "typescript": "^5.7.2",
114
+ "typedoc-vitepress-theme": "^1.1.2",
115
+ "typescript": "^5.7.3",
116
116
  "unplugin-fonts": "^1.3.1",
117
- "vitepress": "^1.5.0",
117
+ "vitepress": "^1.6.2",
118
118
  "vitest": "^1.6.0",
119
119
  "vue-tsc": "2.2.0"
120
120
  },
@@ -122,6 +122,6 @@
122
122
  "node": ">=20.15.1"
123
123
  },
124
124
  "bin": {
125
- "eodash": "dist/node/cli.js"
125
+ "eodash": "./dist/node/cli.js"
126
126
  }
127
127
  }
@@ -1,6 +1,7 @@
1
1
  <template>
2
2
  <div ref="rootRef" class="datePicker">
3
3
  <VCDatePicker
4
+ ref="datePicker"
4
5
  v-model.number="currentDate"
5
6
  :attributes="attributes"
6
7
  :masks="masks"
@@ -80,7 +81,8 @@
80
81
  >
81
82
  <input
82
83
  v-if="!hideInputField"
83
- :value="new Date(currentDate).toLocaleDateString()"
84
+ :value="maskedCurrentDate"
85
+ @change="onInputChange"
84
86
  class="flex-grow px-1 py-1 dark:bg-gray-700"
85
87
  style="
86
88
  margin: 1px;
@@ -112,16 +114,29 @@
112
114
  import { DatePicker as VCDatePicker } from "v-calendar";
113
115
  import { useDisplay } from "vuetify";
114
116
  import "v-calendar/style.css";
115
- import { watch, reactive, ref, customRef, toRef, onMounted } from "vue";
117
+ import {
118
+ watch,
119
+ reactive,
120
+ ref,
121
+ customRef,
122
+ toRef,
123
+ onMounted,
124
+ computed,
125
+ useTemplateRef,
126
+ } from "vue";
116
127
  import { useSTAcStore } from "@/store/stac";
117
128
  import { datetime } from "@/store/states";
118
129
  import { mdiRayStartArrow, mdiRayEndArrow } from "@mdi/js";
119
- import { eodashCollections } from "@/utils/states";
130
+ import { eodashCollections, collectionsPalette } from "@/utils/states";
120
131
  import log from "loglevel";
121
132
  import { makePanelTransparent } from "@/composables";
122
133
 
123
134
  const { lgAndDown } = useDisplay();
124
135
 
136
+ const rootEl = useTemplateRef("rootRef");
137
+
138
+ const datePickerEl = useTemplateRef("datePicker");
139
+
125
140
  // holds the number value of the datetime
126
141
  const currentDate = customRef((track, trigger) => ({
127
142
  get() {
@@ -132,7 +147,13 @@ const currentDate = customRef((track, trigger) => ({
132
147
  set(num) {
133
148
  trigger();
134
149
  log.debug("Datepicker setting currentDate", datetime.value);
135
- datetime.value = new Date(num).toISOString();
150
+ const date = new Date(num);
151
+ datetime.value = date.toISOString();
152
+ //@ts-expect-error supports move method https://vcalendar.io/datepicker/basics.html#basics
153
+ datePickerEl.value?.move({
154
+ month: date.getMonth() + 1,
155
+ year: date.getFullYear(),
156
+ });
136
157
  },
137
158
  }));
138
159
 
@@ -140,6 +161,28 @@ const masks = ref({
140
161
  input: "YYYY-MM-DD",
141
162
  });
142
163
 
164
+ /** @param {Date} date */
165
+ const formatDate = (date) => {
166
+ const years = date.getFullYear();
167
+ const month = date.getMonth() + 1;
168
+ const day = date.getDate();
169
+ return `${years}-${month < 10 ? "0" + month : month}-${
170
+ day < 10 ? "0" + day : day
171
+ }`;
172
+ };
173
+ /**
174
+ *
175
+ * @param e {Event}
176
+ */
177
+ const onInputChange = (e) => {
178
+ currentDate.value = new Date(
179
+ /** @type {HTMLInputElement} */ (e.target)?.value,
180
+ ).getTime();
181
+ };
182
+ const maskedCurrentDate = computed(() =>
183
+ formatDate(new Date(currentDate.value)),
184
+ );
185
+
143
186
  defineProps({
144
187
  hintText: {
145
188
  type: String,
@@ -171,9 +214,6 @@ defineProps({
171
214
  */
172
215
  const attributes = reactive([]);
173
216
 
174
- /** @type {import("vue").Ref<HTMLDivElement|null>} */
175
- const rootRef = ref(null);
176
-
177
217
  const selectedStac = toRef(useSTAcStore(), "selectedStac");
178
218
 
179
219
  watch(
@@ -181,20 +221,13 @@ watch(
181
221
  async (updatedStac, previousStac) => {
182
222
  if (updatedStac && previousStac?.id !== updatedStac.id) {
183
223
  log.debug("Datepicker selected STAC change triggered");
184
- const wongPalette = [
185
- "#009E73",
186
- "#0072B2",
187
- "#E69F00",
188
- "#CC79A7",
189
- "#56B4E9",
190
- "#D55E00",
191
- ];
192
224
  // remove old values
193
225
  attributes.splice(0, attributes.length);
194
226
 
195
227
  for (let idx = 0; idx < eodashCollections.length; idx++) {
196
228
  log.debug("Retrieving dates", eodashCollections[idx]);
197
229
  await eodashCollections[idx].fetchCollection();
230
+
198
231
  const dates = [
199
232
  ...new Set(
200
233
  eodashCollections[idx].getItems()?.reduce((valid, it) => {
@@ -210,7 +243,8 @@ watch(
210
243
  key: "id-" + idx.toString() + Math.random().toString(16).slice(2),
211
244
  dot: {
212
245
  style: {
213
- backgroundColor: wongPalette[idx % wongPalette.length],
246
+ backgroundColor:
247
+ collectionsPalette[idx % collectionsPalette.length],
214
248
  },
215
249
  },
216
250
  dates,
@@ -261,7 +295,7 @@ onMounted(() => {
261
295
  : "translate3d(0px,-80px,0)";
262
296
  });
263
297
 
264
- makePanelTransparent(rootRef);
298
+ makePanelTransparent(rootEl);
265
299
  </script>
266
300
  <style>
267
301
  @media (min-width: 960px) {
@@ -14,7 +14,7 @@
14
14
  .layers="eoxMapLayers"
15
15
  >
16
16
  <eox-map-tooltip
17
- v-show="tooltipProperties?.length"
17
+ :style="tooltipStyles"
18
18
  .propertyTransform="tooltipPropertyTransform"
19
19
  />
20
20
  </eox-map>
@@ -62,8 +62,13 @@ const props = defineProps({
62
62
  type: Number,
63
63
  default: 4,
64
64
  },
65
+ zoomToExtent: {
66
+ type: Boolean,
67
+ default: true,
68
+ },
65
69
  });
66
- /** @type {import("vue").Ref<import("@/types").EodashStyleJson["tooltip"]>} */
70
+
71
+ /** @type {import("vue").Ref<Exclude<import("@/types").EodashStyleJson["tooltip"], undefined>>} */
67
72
  const tooltipProperties = ref([]);
68
73
 
69
74
  const initialCenter = toRaw([
@@ -129,6 +134,7 @@ onMounted(() => {
129
134
  datetime,
130
135
  eoxMapCompareLayers,
131
136
  eoxMap,
137
+ false,
132
138
  );
133
139
  }
134
140
 
@@ -140,9 +146,15 @@ onMounted(() => {
140
146
  datetime,
141
147
  eoxMapLayers,
142
148
  compareMap,
149
+ props.zoomToExtent,
143
150
  );
144
151
  });
152
+
145
153
  useUpdateTooltipProperties(eodashCollections, tooltipProperties);
154
+
155
+ const tooltipStyles = computed(() => ({
156
+ visibility: tooltipProperties.value.length ? "visible" : "hidden",
157
+ }));
146
158
  /**
147
159
  * @param {{key:string; value:string}} param
148
160
  * @returns {{key:string; value?:string} | undefined}
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="process-container">
2
+ <div ref="container" class="process-container">
3
3
  <eox-jsonform
4
4
  v-if="jsonformSchema"
5
5
  ref="jsonformEl"
@@ -10,6 +10,7 @@
10
10
  v-if="isProcessed && chartSpec"
11
11
  .spec="toRaw(chartSpec)"
12
12
  .dataValues="toRaw(chartData)"
13
+ :style="chartStyles"
13
14
  />
14
15
  <v-container>
15
16
  <span>
@@ -38,7 +39,7 @@ import "@eox/chart";
38
39
  import "@eox/drawtools";
39
40
  import "@eox/jsonform";
40
41
 
41
- import { onMounted, ref, toRaw } from "vue";
42
+ import { computed, onMounted, ref, toRaw, useTemplateRef } from "vue";
42
43
  import { useSTAcStore } from "@/store/stac";
43
44
  import { storeToRefs } from "pinia";
44
45
  import { mapEl } from "@/store/states";
@@ -66,6 +67,9 @@ const jsonformSchema = ref(null);
66
67
 
67
68
  /** @type {import("vue").Ref<import("@eox/jsonform").EOxJSONForm | null>} */
68
69
  const jsonformEl = ref(null);
70
+
71
+ const containerEl = useTemplateRef("container");
72
+
69
73
  const loading = ref(false);
70
74
 
71
75
  const autoExec = ref(false);
@@ -135,8 +139,8 @@ onMounted(async () => {
135
139
  }
136
140
  });
137
141
 
138
- useOnLayersUpdate(
139
- async () =>
142
+ useOnLayersUpdate(async (evt, _payload) => {
143
+ if (evt === "layers:updated") {
140
144
  await initProcess({
141
145
  //@ts-expect-error TODO
142
146
  selectedStac,
@@ -147,8 +151,9 @@ useOnLayersUpdate(
147
151
  processResults,
148
152
  loading,
149
153
  isPolling,
150
- }),
151
- );
154
+ });
155
+ }
156
+ });
152
157
 
153
158
  const startProcess = async () => {
154
159
  const errors = jsonformEl.value?.editor.validate();
@@ -172,13 +177,22 @@ const startProcess = async () => {
172
177
  isProcessed.value = true;
173
178
  };
174
179
  useAutoExec(autoExec, jsonformEl, jsonformSchema, startProcess);
180
+
181
+ const chartStyles = computed(() => {
182
+ /** @type {Record<string,string> }*/
183
+ const styles = {};
184
+ if (!chartSpec.value?.["height"]) {
185
+ styles["height"] =
186
+ Math.max(
187
+ (containerEl.value?.offsetHeight ?? 0) -
188
+ (jsonformEl.value?.offsetHeight ?? 0),
189
+ 200,
190
+ ) + "px";
191
+ }
192
+ return styles;
193
+ });
175
194
  </script>
176
195
  <style>
177
- .chart {
178
- height: 400px;
179
- width: 100%;
180
- }
181
-
182
196
  .process-container {
183
197
  height: 100%;
184
198
  overflow-y: auto;