@eodash/eodash 5.5.0 → 5.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/core/client/App.vue +1 -1
  2. package/core/client/eodashSTAC/EodashCollection.js +9 -10
  3. package/core/client/eodashSTAC/createLayers.js +1 -1
  4. package/core/client/eodashSTAC/helpers.js +1 -0
  5. package/dist/client/{DashboardLayout-CkSgvaFF.js → DashboardLayout-D_590Zle.js} +2 -2
  6. package/dist/client/{DynamicWebComponent-Ncsg6fb9.js → DynamicWebComponent-67cfzL4o.js} +1 -1
  7. package/dist/client/{EodashChart-5v7adDpG.js → EodashChart-BsW18Em1.js} +7 -7
  8. package/dist/client/{EodashDatePicker-RoQJe6ss.js → EodashDatePicker-BwyFIBlK.js} +10 -7
  9. package/dist/client/{EodashItemFilter-CCoVC5BE.js → EodashItemFilter-CgdrG-pX.js} +1 -1
  10. package/dist/client/{EodashLayerControl-weVj7aQA.js → EodashLayerControl-V98fahVJ.js} +2 -2
  11. package/dist/client/{EodashLayoutSwitcher-CL-Z9d5_.js → EodashLayoutSwitcher-B4oI5PAx.js} +3 -3
  12. package/dist/client/{EodashMapBtns-CXU8IuPO.js → EodashMapBtns-Ce2tFjJK.js} +6 -6
  13. package/dist/client/{EodashStacInfo-BbMnjf-n.js → EodashStacInfo-Cb28jVEr.js} +1 -1
  14. package/dist/client/{EodashTimeSlider-BZXnqfax.js → EodashTimeSlider-B5boxpCK.js} +2 -2
  15. package/dist/client/{EodashTools-DUJlkkgx.js → EodashTools-RwiXxELa.js} +4 -4
  16. package/dist/client/{ExportState-CT3FQOHW.js → ExportState-Cp4ftu4f.js} +4 -4
  17. package/dist/client/{Footer-D_iqP-1K.js → Footer-xGfh2LUv.js} +1 -1
  18. package/dist/client/{Header-Dzhnvsy-.js → Header-BggV8BVC.js} +2 -2
  19. package/dist/client/{MobileLayout-6Rg_PSO8.js → MobileLayout-BwXCBKFL.js} +2 -2
  20. package/dist/client/{PopUp-DPPv_GSA.js → PopUp-C6x6Rpv0.js} +2 -2
  21. package/dist/client/{ProcessList-BIN_Mb27.js → ProcessList-DDwo71cD.js} +4 -4
  22. package/dist/client/{VImg-DhbuvNrA.js → VImg-DN23k6uX.js} +2 -2
  23. package/dist/client/{VMain-CVabY_NY.js → VMain-BT2ZxPLy.js} +1 -1
  24. package/dist/client/{VTooltip-Cc6au3Sn.js → VTooltip-CAkym6KY.js} +2 -2
  25. package/dist/client/{WidgetsContainer-ChqTJS4h.js → WidgetsContainer-CLYZgRgc.js} +1 -1
  26. package/dist/client/{asWebComponent-DaIxULaA.js → asWebComponent-C5YMrXyg.js} +19 -20
  27. package/dist/client/{async-D6Lvv-fT.js → async-DHmiD7O-.js} +4 -6
  28. package/dist/client/eo-dash.js +1 -1
  29. package/dist/client/{forwardRefs--IccUBdR.js → forwardRefs-YqjFe8WZ.js} +2 -2
  30. package/dist/client/{handling-DSA67d6E.js → handling-DRaAJMSG.js} +23 -22
  31. package/dist/client/{helpers-BBSdbOmv.js → helpers-Bi-qmnbZ.js} +1 -0
  32. package/dist/client/{index-qsZhYR_6.js → index-BtY2y1sL.js} +3 -3
  33. package/dist/client/{index-6LlXNkke.js → index-D4GBjamF.js} +2 -2
  34. package/dist/client/{index-CQihL_c6.js → index-DYLTaaU8.js} +3 -3
  35. package/dist/client/{index-BS-8Y5FE.js → index-bSHJLUNu.js} +15 -11
  36. package/dist/client/templates.js +19 -6
  37. package/dist/client/{transition-DFr4cXu8.js → transition-C4YbXuIb.js} +1 -1
  38. package/dist/types/core/client/eodashSTAC/helpers.d.ts +1 -0
  39. package/dist/types/widgets/EodashProcess/methods/handling.d.ts +4 -3
  40. package/dist/types/widgets/EodashProcess/methods/utils.d.ts +2 -2
  41. package/package.json +3 -3
  42. package/templates/baseConfig.js +14 -1
  43. package/templates/compare.js +2 -2
  44. package/templates/expert.js +1 -1
  45. package/templates/lite.js +1 -1
  46. package/widgets/EodashChart.vue +3 -3
  47. package/widgets/EodashDatePicker.vue +5 -2
  48. package/widgets/EodashProcess/index.vue +7 -3
  49. package/widgets/EodashProcess/methods/composables.js +1 -1
  50. package/widgets/EodashProcess/methods/handling.js +20 -19
  51. package/widgets/EodashProcess/methods/utils.js +2 -4
@@ -104,7 +104,7 @@ export default {
104
104
  ? {
105
105
  id: "expert-datepicker",
106
106
  type: "internal",
107
- layout: { x: 4, y: 7, w: 4, h: 5 },
107
+ layout: { x: 4, y: 3, w: 4, h: 9 },
108
108
  title: "Date",
109
109
  widget: {
110
110
  name: "EodashDatePicker",
package/templates/lite.js CHANGED
@@ -122,7 +122,7 @@ export default {
122
122
  ? {
123
123
  id: "light-datepicker",
124
124
  type: "internal",
125
- layout: { x: 4, y: 7, w: 4, h: 5 },
125
+ layout: { x: 4, y: 3, w: 4, h: 9 },
126
126
  title: "Date",
127
127
  widget: {
128
128
  name: "EodashDatePicker",
@@ -12,7 +12,7 @@
12
12
  </svg>
13
13
  </button>
14
14
  <eox-chart
15
- class="pt-0"
15
+ class="pa-2"
16
16
  v-if="usedChartData && usedChartSpec"
17
17
  .spec="toRaw(usedChartSpec)"
18
18
  :key="chartRenderKey"
@@ -131,8 +131,8 @@ function toggleLayout() {
131
131
 
132
132
  .chart-toggle {
133
133
  position: absolute;
134
- top: 38px;
135
- right: 12px;
134
+ top: 18px;
135
+ right: 46px;
136
136
  z-index: 2;
137
137
  cursor: pointer;
138
138
  }
@@ -310,9 +310,12 @@ function jumpDate(reverse) {
310
310
  // fixes calendar dispalcement on lib mode
311
311
  const transform = ref("");
312
312
  onMounted(() => {
313
+ // keeping the reactive translate just in case,
314
+ // but seems like static css would work as well
315
+ // because the visual is same both in lib and in app mode
313
316
  transform.value = document.querySelector("eo-dash")
314
- ? "translate3d(50px,-80px,0)"
315
- : "translate3d(0px,-80px,0)";
317
+ ? "translate3d(30px,-50px,0)"
318
+ : "translate3d(30px,-50px,0)";
316
319
  });
317
320
 
318
321
  useTransparentPanel(rootEl);
@@ -13,22 +13,26 @@
13
13
  :enable-compare="enableCompare"
14
14
  >
15
15
  </EodashChart>
16
- <div class="mt-2 text-right">
16
+ <div class="text-right">
17
17
  <v-btn
18
18
  v-if="showExecBtn"
19
19
  :loading="loading"
20
- style="margin-right: 20px"
20
+ style="margin-right: 8px"
21
21
  :append-icon="[mdiCogPlayOutline]"
22
22
  @click="startProcess"
23
- color="primary"
23
+ density="comfortable"
24
+ size="small"
24
25
  >
25
26
  Execute
26
27
  </v-btn>
27
28
  <v-btn
28
29
  v-if="processResults.length && isProcessed && !isAsync"
29
30
  color="primary"
31
+ style="margin-right: 8px"
30
32
  :append-icon="[mdiDownloadCircleOutline]"
31
33
  @click="downloadResults"
34
+ size="small"
35
+ density="comfortable"
32
36
  >
33
37
  Download
34
38
  </v-btn>
@@ -70,7 +70,7 @@ export const useInitProcess = ({
70
70
  evt == "compareTime:updated"
71
71
  ) {
72
72
  await updateJsonformIdentifier({
73
- jsonformSchema,
73
+ jsonformSchema: jsonformSchema.value,
74
74
  // @ts-expect-error TODO payload coming from time update events is not an object with layers property
75
75
  newLayers: _payload,
76
76
  });
@@ -75,16 +75,18 @@ export async function initProcess({
75
75
  await jsonformEl.value?.editor.destroy();
76
76
  if (updatedJsonform) {
77
77
  // make sure correct target layer id is used in jsonform
78
- if (updatedJsonform.properties?.feature?.options?.drawtools?.layerId) {
79
- await updateJsonformIdentifier({
80
- jsonformSchema,
81
- newLayers: await getLayers(),
82
- });
83
- }
78
+ let newJsonForm = null;
79
+ newJsonForm = await updateJsonformIdentifier({
80
+ jsonformSchema: updatedJsonform,
81
+ newLayers: getLayers(),
82
+ });
84
83
  if (enableCompare) {
85
- updatedJsonform = updateJsonformSchemaTarget(updatedJsonform);
84
+ newJsonForm = updateJsonformSchemaTarget(newJsonForm);
86
85
  }
87
- jsonformSchema.value = updatedJsonform;
86
+ // trigger jsonform update in next tick
87
+ jsonformSchema.value = null;
88
+ await new Promise((resolve) => setTimeout(resolve, 0));
89
+ jsonformSchema.value = newJsonForm;
88
90
  }
89
91
  }
90
92
 
@@ -94,11 +96,12 @@ export async function initProcess({
94
96
  * @export
95
97
  * @async
96
98
  * @param {Object} params
97
- * @param {import("vue").Ref<Record<string,any> | null>} params.jsonformSchema params.jsonformSchema
99
+ * @param {Record<string,any> | null} params.jsonformSchema params.jsonformSchema
98
100
  * @param {Record<string, any>[] | undefined} params.newLayers params.newLayers
101
+ * @returns {Promise<Record<string,any> | null | undefined>} updated jsonform schema
99
102
  */
100
103
  export async function updateJsonformIdentifier({ jsonformSchema, newLayers }) {
101
- const form = jsonformSchema.value;
104
+ const form = jsonformSchema;
102
105
  if (!form) {
103
106
  return;
104
107
  }
@@ -130,9 +133,8 @@ export async function updateJsonformIdentifier({ jsonformSchema, newLayers }) {
130
133
  return;
131
134
  }
132
135
  for (const layer of layersArray) {
133
- if (layer.layers) {
134
- // @ts-expect-error TODO payload coming from time update events is not an object with layers property
135
- traverseLayers(layer);
136
+ if (layer.type === "Group" && Array.isArray(layer.layers)) {
137
+ traverseLayers(layer.layers);
136
138
  } else {
137
139
  if (layer.properties?.id?.startsWith(layerId)) {
138
140
  matchedLayerId = layer.properties.id;
@@ -144,16 +146,15 @@ export async function updateJsonformIdentifier({ jsonformSchema, newLayers }) {
144
146
  traverseLayers(layers);
145
147
  if (matchedLayerId) {
146
148
  form.properties.feature.options.drawtools.layerId = matchedLayerId;
147
- // trigger jsonform update in next tick
148
- jsonformSchema.value = null;
149
- await new Promise((resolve) => setTimeout(resolve, 0));
150
- jsonformSchema.value = form;
149
+ return form;
151
150
  } else {
152
- throw new Error(
151
+ console.warn(
153
152
  `Could not find matching layer for processing form with id: ${layerId}`,
154
153
  );
154
+ return null;
155
155
  }
156
156
  }
157
+ return form;
157
158
  }
158
159
 
159
160
  /**
@@ -223,7 +224,7 @@ export async function handleProcesses({
223
224
  }
224
225
 
225
226
  //@ts-expect-error we assume that the spec data is of type InlineData
226
- if (tempChartSpec.data?.values?.length) {
227
+ if (Object.keys(tempChartSpec?.data?.values ?? {}).length) {
227
228
  //@ts-expect-error we assume that the spec data is of type InlineData
228
229
  processResults.value.push(tempChartSpec?.data.values);
229
230
  }
@@ -564,7 +564,7 @@ export const applyProcessLayersToMap = (mapElement, processLayers) => {
564
564
  };
565
565
  /**
566
566
  * Updates the jsonform schema to target the compare map
567
- * @param {import("json-schema").JSONSchema7 | null | undefined} jsonformSchema
567
+ * @param {Record<string,any> | null | undefined} jsonformSchema
568
568
  */
569
569
  export function updateJsonformSchemaTarget(jsonformSchema) {
570
570
  if (!jsonformSchema) {
@@ -574,7 +574,5 @@ export function updateJsonformSchemaTarget(jsonformSchema) {
574
574
  "eox-map#main",
575
575
  "eox-map#compare",
576
576
  );
577
- return /** @type {import("json-schema").JSONSchema7} */ (
578
- JSON.parse(stringified)
579
- );
577
+ return JSON.parse(stringified);
580
578
  }