@eodash/eodash 5.4.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 (114) hide show
  1. package/core/client/App.vue +1 -1
  2. package/core/client/asWebComponent.js +1 -1
  3. package/core/client/composables/DefineWidgets.js +12 -2
  4. package/core/client/eodashSTAC/EodashCollection.js +12 -13
  5. package/core/client/eodashSTAC/createLayers.js +45 -18
  6. package/core/client/eodashSTAC/helpers.js +13 -5
  7. package/core/client/eodashSTAC/parquet.js +2 -1
  8. package/core/client/eodashSTAC/triggers.js +1 -2
  9. package/core/client/store/actions.js +17 -17
  10. package/core/client/store/states.js +26 -4
  11. package/core/client/types.ts +9 -0
  12. package/core/client/utils/index.js +18 -1
  13. package/dist/client/{DashboardLayout-CQOGHPW_.js → DashboardLayout-D_590Zle.js} +2 -2
  14. package/dist/client/{DynamicWebComponent-CoLO8FEf.js → DynamicWebComponent-67cfzL4o.js} +1 -1
  15. package/dist/client/EodashChart-BsW18Em1.js +144 -0
  16. package/dist/client/{EodashDatePicker-BZeQ6bcu.js → EodashDatePicker-BwyFIBlK.js} +10 -7
  17. package/dist/client/{EodashItemFilter-CmZkk7GK.js → EodashItemFilter-CgdrG-pX.js} +2 -2
  18. package/dist/client/{EodashLayerControl-D54fY-bX.js → EodashLayerControl-V98fahVJ.js} +2 -2
  19. package/dist/client/{EodashLayoutSwitcher-BCP3FvDb.js → EodashLayoutSwitcher-B4oI5PAx.js} +3 -3
  20. package/dist/client/EodashMapBtns-Ce2tFjJK.js +433 -0
  21. package/dist/client/{EodashStacInfo-BZbmT8vT.js → EodashStacInfo-Cb28jVEr.js} +11 -15
  22. package/dist/client/{EodashTimeSlider-DIcAJr6D.js → EodashTimeSlider-B5boxpCK.js} +2 -2
  23. package/dist/client/{EodashTools-Cz6X6hsF.js → EodashTools-RwiXxELa.js} +4 -4
  24. package/dist/client/{ExportState-DFVFAgKz.js → ExportState-Cp4ftu4f.js} +46 -21
  25. package/dist/client/{Footer-DLzQcjkI.js → Footer-xGfh2LUv.js} +1 -1
  26. package/dist/client/{Header-_D9Z-zFJ.js → Header-BggV8BVC.js} +127 -17
  27. package/dist/client/MobileLayout-BwXCBKFL.js +118 -0
  28. package/dist/client/{PopUp-DwI8V2gW.js → PopUp-C6x6Rpv0.js} +8 -59
  29. package/dist/client/{ProcessList-C9eAg2Sb.js → ProcessList-DDwo71cD.js} +9 -13
  30. package/dist/client/{VImg-COXTnCWE.js → VImg-DN23k6uX.js} +2 -2
  31. package/dist/client/{VMain-C74l1bv-.js → VMain-BT2ZxPLy.js} +1 -1
  32. package/dist/client/{VTooltip-BLS-cQ9N.js → VTooltip-CAkym6KY.js} +3 -4
  33. package/dist/client/{WidgetsContainer-D-VfMRxE.js → WidgetsContainer-CLYZgRgc.js} +1 -1
  34. package/dist/client/asWebComponent-C5YMrXyg.js +9206 -0
  35. package/dist/client/{async-D4G-FOIc.js → async-DHmiD7O-.js} +6 -8
  36. package/dist/client/eo-dash.js +1 -1
  37. package/dist/client/{forwardRefs-CRMFoNYN.js → forwardRefs-YqjFe8WZ.js} +196 -37
  38. package/dist/client/{handling-DTAhQuPh.js → handling-DRaAJMSG.js} +93 -53
  39. package/dist/client/{helpers-CsjKHAcK.js → helpers-Bi-qmnbZ.js} +188 -87
  40. package/dist/client/{index-BoCcZ0l4.js → index-BtY2y1sL.js} +15 -16
  41. package/dist/client/{index-DEmHaCL3.js → index-D4GBjamF.js} +5 -3
  42. package/dist/client/{index-BIcmbjr0.js → index-DYLTaaU8.js} +27 -14
  43. package/dist/client/{index-BHilH1qx.js → index-bSHJLUNu.js} +30 -73
  44. package/dist/client/templates.js +64 -5
  45. package/dist/client/{transition-6MJLK-_H.js → transition-C4YbXuIb.js} +1 -1
  46. package/dist/node/cli.js +1 -1
  47. package/dist/types/core/client/App.vue.d.ts +16 -6
  48. package/dist/types/core/client/asWebComponent.d.ts +2 -2
  49. package/dist/types/core/client/components/DashboardLayout.vue.d.ts +2 -1
  50. package/dist/types/core/client/components/DynamicWebComponent.vue.d.ts +36 -16
  51. package/dist/types/core/client/components/EodashOverlay.vue.d.ts +2 -1
  52. package/dist/types/core/client/components/ErrorAlert.vue.d.ts +9 -1
  53. package/dist/types/core/client/components/Footer.vue.d.ts +2 -1
  54. package/dist/types/core/client/components/Header.vue.d.ts +2 -1
  55. package/dist/types/core/client/components/IframeWrapper.vue.d.ts +12 -6
  56. package/dist/types/core/client/components/Loading.vue.d.ts +2 -1
  57. package/dist/types/core/client/components/MobileLayout.vue.d.ts +2 -1
  58. package/dist/types/core/client/eodashSTAC/helpers.d.ts +2 -0
  59. package/dist/types/core/client/store/actions.d.ts +1 -2
  60. package/dist/types/core/client/store/states.d.ts +22 -4
  61. package/dist/types/core/client/types.d.ts +6 -1
  62. package/dist/types/core/client/utils/index.d.ts +1 -0
  63. package/dist/types/core/client/views/Dashboard.vue.d.ts +20 -8
  64. package/dist/types/templates/compare.d.ts +20 -0
  65. package/dist/types/templates/expert.d.ts +30 -1
  66. package/dist/types/widgets/EodashChart.vue.d.ts +28 -0
  67. package/dist/types/widgets/EodashDatePicker.vue.d.ts +38 -9
  68. package/dist/types/widgets/EodashItemCatalog/index.vue.d.ts +88 -13
  69. package/dist/types/widgets/EodashItemCatalog/methods/map.d.ts +1 -1
  70. package/dist/types/widgets/EodashItemFilter.vue.d.ts +169 -26
  71. package/dist/types/widgets/EodashLayerControl.vue.d.ts +38 -10
  72. package/dist/types/widgets/EodashLayoutSwitcher.vue.d.ts +22 -7
  73. package/dist/types/widgets/EodashMap/EodashMapBtns.vue.d.ts +94 -21
  74. package/dist/types/widgets/EodashMap/index.vue.d.ts +646 -93
  75. package/dist/types/widgets/EodashMap/methods/btns.d.ts +14 -0
  76. package/dist/types/widgets/EodashProcess/ProcessList.vue.d.ts +24 -7
  77. package/dist/types/widgets/EodashProcess/index.vue.d.ts +26 -7
  78. package/dist/types/widgets/EodashProcess/methods/composables.d.ts +1 -2
  79. package/dist/types/widgets/EodashProcess/methods/handling.d.ts +9 -14
  80. package/dist/types/widgets/EodashProcess/methods/outputs.d.ts +2 -2
  81. package/dist/types/widgets/EodashProcess/methods/utils.d.ts +2 -2
  82. package/dist/types/widgets/EodashStacInfo.vue.d.ts +67 -18
  83. package/dist/types/widgets/EodashTimeSlider.vue.d.ts +14 -6
  84. package/dist/types/widgets/EodashTools.vue.d.ts +437 -47
  85. package/dist/types/widgets/ExportState.vue.d.ts +26 -8
  86. package/dist/types/widgets/PopUp.vue.d.ts +61 -11
  87. package/dist/types/widgets/WidgetsContainer.vue.d.ts +22 -6
  88. package/package.json +33 -34
  89. package/templates/baseConfig.js +14 -0
  90. package/templates/compare.js +30 -3
  91. package/templates/expert.js +20 -2
  92. package/templates/lite.js +1 -1
  93. package/widgets/EodashChart.vue +139 -0
  94. package/widgets/EodashDatePicker.vue +5 -2
  95. package/widgets/EodashItemCatalog/index.vue +2 -2
  96. package/widgets/EodashItemCatalog/methods/map.js +9 -10
  97. package/widgets/EodashMap/EodashMapBtns.vue +58 -93
  98. package/widgets/EodashMap/index.vue +10 -2
  99. package/widgets/EodashMap/methods/btns.js +155 -0
  100. package/widgets/EodashMap/methods/create-layers-config.js +3 -3
  101. package/widgets/EodashMap/methods/index.js +2 -1
  102. package/widgets/EodashProcess/ProcessList.vue +2 -3
  103. package/widgets/EodashProcess/index.vue +24 -63
  104. package/widgets/EodashProcess/methods/async.js +1 -1
  105. package/widgets/EodashProcess/methods/composables.js +1 -6
  106. package/widgets/EodashProcess/methods/custom-endpoints/chart/veda-endpoint.js +10 -6
  107. package/widgets/EodashProcess/methods/handling.js +42 -40
  108. package/widgets/EodashProcess/methods/outputs.js +44 -4
  109. package/widgets/EodashProcess/methods/utils.js +3 -5
  110. package/widgets/EodashStacInfo.vue +10 -23
  111. package/widgets/ExportState.vue +9 -15
  112. package/dist/client/EodashMapBtns-D-HulIl1.js +0 -306
  113. package/dist/client/MobileLayout-3Ko9XSfO.js +0 -118
  114. package/dist/client/asWebComponent-Bw03Jutr.js +0 -9090
@@ -1,8 +1,8 @@
1
1
  import log from 'loglevel';
2
- import { s as separateEndpointLinks, c as createTiffLayerDefinition, p as pollProcessStatus, e as extractAsyncResults, u as updateJobsStatus, a as creatAsyncProcessLayerDefinitions, b as getBboxProperty, f as generateTimePairs, h as updateJsonformSchemaTarget, i as extractGeometries, j as applyProcessLayersToMap, g as getDrawToolsProperty } from './async-D4G-FOIc.js';
3
- import { d as axios, b as extractLayerConfig, I as compareIndicator, G as indicator, y as extractCollectionUrls, H as currentCompareUrl, B as currentUrl, z as generateLinksFromItems, o as getDatetimeProperty, C as datetime, J as comparePoi, q as getLayers, D as poi } from './helpers-CsjKHAcK.js';
2
+ import { s as separateEndpointLinks, c as createTiffLayerDefinition, p as pollProcessStatus, e as extractAsyncResults, u as updateJobsStatus, a as creatAsyncProcessLayerDefinitions, b as getBboxProperty, f as generateTimePairs, h as updateJsonformSchemaTarget, i as extractGeometries, j as applyProcessLayersToMap, g as getDrawToolsProperty } from './async-DHmiD7O-.js';
3
+ import { d as axios, b as extractLayerConfig, I as compareIndicator, G as indicator, y as extractCollectionUrls, H as currentCompareUrl, B as currentUrl, z as generateLinksFromItems, o as getDatetimeProperty, J as comparePoi, C as datetime, Z as compareChartData, _ as chartData, O as compareChartSpec, N as chartSpec, D as poi, w as getLayers } from './helpers-Bi-qmnbZ.js';
4
4
  import mustache from 'mustache';
5
- import { Q as isFirstLoad, E as useSTAcStore, S as readParquetItems, T as useGetSubCodeId } from './asWebComponent-Bw03Jutr.js';
5
+ import { Q as isFirstLoad, E as useSTAcStore, T as readParquetItems, U as useGetSubCodeId } from './asWebComponent-C5YMrXyg.js';
6
6
  import { toAbsolute } from 'stac-js/src/http.js';
7
7
 
8
8
  ////// --- CHARTS --- //////
@@ -17,7 +17,7 @@ import { toAbsolute } from 'stac-js/src/http.js';
17
17
  * @param {Record<string,any>} options.jsonformSchema
18
18
  * @param {import("vue").Ref<import("../types").AsyncJob[]>} options.jobs
19
19
  * @param {boolean} [options.enableCompare=false] - Whether to enable compare mode
20
- * @returns {Promise<[import("@eox/chart").EOxChart["spec"] | null,Record<string,any>|null]>}
20
+ * @returns {Promise<[import("vega-embed").VisualizationSpec | null,Record<string,any>|null]>}
21
21
  **/
22
22
  async function processCharts({
23
23
  links,
@@ -61,10 +61,48 @@ async function processCharts({
61
61
  if (data && data.length) {
62
62
  //@ts-expect-error we assume data to exist in spec
63
63
  spec.data.values = data;
64
- return [spec, dataValues];
64
+ return [structuredClone(spec), structuredClone(dataValues)];
65
65
  }
66
-
67
66
  const dataLinks = standardLinks.filter((link) => link.rel === "service");
67
+
68
+ // We count if there are at least two application/json links, if yes,
69
+ // we download the data and assign them to specific data ids in the spec
70
+ const jsonLinks = dataLinks.filter(
71
+ (link) => link.type === "application/json",
72
+ );
73
+ if (jsonLinks.length >= 2) {
74
+ for (const link of jsonLinks ?? []) {
75
+ let linkType = link.type;
76
+ switch (linkType) {
77
+ case undefined:
78
+ continue;
79
+ case "application/json":
80
+ dataValues[/** @type {string} */ (link.id)] = await axios
81
+ .get(
82
+ mustache.render(link.href, {
83
+ ...(jsonformValue ?? {}),
84
+ }),
85
+ )
86
+ .then((resp) => resp.data);
87
+ // assign to spec datasets, assuming spec.data is InlineData
88
+ // Always assign values as an object with string keys
89
+ if (spec.data) {
90
+ /** @type {import("vega-lite/build/src/data").InlineData} */
91
+ (spec.data).values = {
92
+ ...(spec.data &&
93
+ "values" in spec.data &&
94
+ typeof spec.data.values === "object"
95
+ ? spec.data.values
96
+ : {}),
97
+ [/** @type {string} */ (link.id)]:
98
+ dataValues[/** @type {string} */ (link.id)],
99
+ };
100
+ }
101
+ break;
102
+ }
103
+ }
104
+ return [spec, dataValues];
105
+ }
68
106
  try {
69
107
  checkForData: for (const link of dataLinks ?? []) {
70
108
  switch (link.type) {
@@ -91,7 +129,7 @@ async function processCharts({
91
129
  } catch (e) {
92
130
  console.error("[eodash] Error while injecting Vega data", e);
93
131
  }
94
- return [spec, dataValues];
132
+ return [structuredClone(spec), structuredClone(dataValues)];
95
133
  }
96
134
 
97
135
  /**
@@ -797,7 +835,9 @@ async function handleVedaEndpoint({
797
835
  enableCompare = false,
798
836
  }) {
799
837
  const vedaLink = links.find(
800
- (link) => link.rel === "service" && (link.endpoint === "veda" || link.endpoint === "veda_stac"),
838
+ (link) =>
839
+ link.rel === "service" &&
840
+ (link.endpoint === "veda" || link.endpoint === "veda_stac"),
801
841
  );
802
842
  if (!vedaLink) {
803
843
  return;
@@ -895,12 +935,14 @@ async function fetchVedaCOGsConfig(selectedStac, absoluteUrl, vedaLink) {
895
935
  const itemLinks = collection.links.filter((link) => link.rel == "item");
896
936
  configs.push(
897
937
  ...itemLinks.map((link) => {
898
- const endpoint = /** @type {string} */ (vedaLink.endpoint === "veda_stac" ? link.id : link["cog_href"]);
938
+ const endpoint = /** @type {string} */ (
939
+ vedaLink.endpoint === "veda_stac" ? link.id : link["cog_href"]
940
+ );
899
941
  return {
900
- endpoint,
901
- datetime: /** @type string **/ (link[datetimeProperty]),
902
- }
903
- })
942
+ endpoint,
943
+ datetime: /** @type string **/ (link[datetimeProperty]),
944
+ };
945
+ }),
904
946
  );
905
947
  }
906
948
 
@@ -965,7 +1007,6 @@ function createCustomChartEndpointsHandler(callbacks) {
965
1007
  * @param {import("vue").Ref<import("stac-ts").StacCollection | null>} params.selectedStac
966
1008
  * @param {import("vue").Ref<import("@eox/jsonform").EOxJSONForm | null>} params.jsonformEl
967
1009
  * @param {import("vue").Ref<Record<string,any> | null>} params.jsonformSchema
968
- * @param {import("vue").Ref<import("@eox/chart").EOxChart["spec"] | null>} params.chartSpec
969
1010
  * @param {import("vue").Ref<any[]>} params.processResults
970
1011
  * @param {import("vue").Ref<boolean>} params.isProcessed
971
1012
  * @param {import("vue").Ref<boolean>} params.loading
@@ -976,7 +1017,6 @@ async function initProcess({
976
1017
  selectedStac,
977
1018
  jsonformEl,
978
1019
  jsonformSchema,
979
- chartSpec,
980
1020
  isProcessed,
981
1021
  processResults,
982
1022
  loading,
@@ -999,25 +1039,27 @@ async function initProcess({
999
1039
  resetProcess({
1000
1040
  loading,
1001
1041
  isProcessed,
1002
- chartSpec,
1003
1042
  jsonformSchema,
1004
1043
  isPolling,
1005
1044
  processResults,
1045
+ enableCompare,
1006
1046
  });
1007
1047
 
1008
1048
  await jsonformEl.value?.editor.destroy();
1009
1049
  if (updatedJsonform) {
1010
1050
  // make sure correct target layer id is used in jsonform
1011
- if (updatedJsonform.properties?.feature?.options?.drawtools?.layerId) {
1012
- await updateJsonformIdentifier({
1013
- jsonformSchema,
1014
- newLayers: await getLayers(),
1015
- });
1016
- }
1051
+ let newJsonForm = null;
1052
+ newJsonForm = await updateJsonformIdentifier({
1053
+ jsonformSchema: updatedJsonform,
1054
+ newLayers: getLayers(),
1055
+ });
1017
1056
  if (enableCompare) {
1018
- updatedJsonform = updateJsonformSchemaTarget(updatedJsonform);
1057
+ newJsonForm = updateJsonformSchemaTarget(newJsonForm);
1019
1058
  }
1020
- jsonformSchema.value = updatedJsonform;
1059
+ // trigger jsonform update in next tick
1060
+ jsonformSchema.value = null;
1061
+ await new Promise((resolve) => setTimeout(resolve, 0));
1062
+ jsonformSchema.value = newJsonForm;
1021
1063
  }
1022
1064
  }
1023
1065
 
@@ -1027,11 +1069,12 @@ async function initProcess({
1027
1069
  * @export
1028
1070
  * @async
1029
1071
  * @param {Object} params
1030
- * @param {import("vue").Ref<Record<string,any> | null>} params.jsonformSchema params.jsonformSchema
1072
+ * @param {Record<string,any> | null} params.jsonformSchema params.jsonformSchema
1031
1073
  * @param {Record<string, any>[] | undefined} params.newLayers params.newLayers
1074
+ * @returns {Promise<Record<string,any> | null | undefined>} updated jsonform schema
1032
1075
  */
1033
1076
  async function updateJsonformIdentifier({ jsonformSchema, newLayers }) {
1034
- const form = jsonformSchema.value;
1077
+ const form = jsonformSchema;
1035
1078
  if (!form) {
1036
1079
  return;
1037
1080
  }
@@ -1063,9 +1106,8 @@ async function updateJsonformIdentifier({ jsonformSchema, newLayers }) {
1063
1106
  return;
1064
1107
  }
1065
1108
  for (const layer of layersArray) {
1066
- if (layer.layers) {
1067
- // @ts-expect-error TODO payload coming from time update events is not an object with layers property
1068
- traverseLayers(layer);
1109
+ if (layer.type === "Group" && Array.isArray(layer.layers)) {
1110
+ traverseLayers(layer.layers);
1069
1111
  } else {
1070
1112
  if (layer.properties?.id?.startsWith(layerId)) {
1071
1113
  matchedLayerId = layer.properties.id;
@@ -1077,16 +1119,15 @@ async function updateJsonformIdentifier({ jsonformSchema, newLayers }) {
1077
1119
  traverseLayers(layers);
1078
1120
  if (matchedLayerId) {
1079
1121
  form.properties.feature.options.drawtools.layerId = matchedLayerId;
1080
- // trigger jsonform update in next tick
1081
- jsonformSchema.value = null;
1082
- await new Promise((resolve) => setTimeout(resolve, 0));
1083
- jsonformSchema.value = form;
1122
+ return form;
1084
1123
  } else {
1085
- throw new Error(
1124
+ console.warn(
1086
1125
  `Could not find matching layer for processing form with id: ${layerId}`,
1087
1126
  );
1127
+ return null;
1088
1128
  }
1089
1129
  }
1130
+ return form;
1090
1131
  }
1091
1132
 
1092
1133
  /**
@@ -1096,8 +1137,6 @@ async function updateJsonformIdentifier({ jsonformSchema, newLayers }) {
1096
1137
  * @param {import("vue").Ref<import("stac-ts").StacCollection | null>} params.selectedStac
1097
1138
  * @param {import("vue").Ref<import("@eox/jsonform").EOxJSONForm | null>} params.jsonformEl
1098
1139
  * @param {import("vue").Ref<Record<string,any>|null>} params.jsonformSchema
1099
- * @param {import("vue").Ref<import("@eox/chart").EOxChart["spec"] | null>} params.chartSpec
1100
- * @param {import("vue").Ref<Record<string, any> | null>} params.chartData
1101
1140
  * @param {import("vue").Ref<boolean>} params.isPolling
1102
1141
  * @param {import("vue").Ref<any[]>} params.processResults
1103
1142
  * @param {import("@eox/map").EOxMap | null} params.mapElement
@@ -1108,8 +1147,6 @@ async function handleProcesses({
1108
1147
  selectedStac,
1109
1148
  jsonformEl,
1110
1149
  jsonformSchema,
1111
- chartSpec,
1112
- chartData,
1113
1150
  isPolling,
1114
1151
  processResults,
1115
1152
  mapElement,
@@ -1118,6 +1155,7 @@ async function handleProcesses({
1118
1155
  if (!jsonformEl.value || !jsonformSchema.value || !selectedStac.value) {
1119
1156
  return;
1120
1157
  }
1158
+ const enableCompare = mapElement?.id === "compare";
1121
1159
 
1122
1160
  log.debug("Processing...");
1123
1161
  loading.value = true;
@@ -1139,12 +1177,14 @@ async function handleProcesses({
1139
1177
  selectedStac.value?.["eodash:vegadefinition"]
1140
1178
  );
1141
1179
  const layerId = selectedStac.value?.id ?? "";
1142
-
1143
- [chartSpec.value, chartData.value] = await processCharts({
1180
+ const usedChartSpec = enableCompare ? compareChartSpec : chartSpec;
1181
+ const usedChartData = enableCompare ? compareChartData : chartData;
1182
+ let tempChartSpec = null;
1183
+ [tempChartSpec, usedChartData.value] = await processCharts({
1144
1184
  links: serviceLinks,
1145
1185
  jsonformValue: { ...(jsonformValue ?? {}) },
1146
1186
  jsonformSchema: jsonformSchema.value,
1147
- enableCompare: mapElement?.id === "compare",
1187
+ enableCompare,
1148
1188
  selectedStac: selectedStac.value,
1149
1189
  specUrl,
1150
1190
  isPolling,
@@ -1152,19 +1192,19 @@ async function handleProcesses({
1152
1192
  customEndpointsHandler: handleChartCustomEndpoints,
1153
1193
  });
1154
1194
 
1155
- if (Object.keys(chartData.value ?? {}).length) {
1156
- processResults.value.push(chartData.value);
1195
+ if (Object.keys(usedChartData.value ?? {}).length) {
1196
+ processResults.value.push(usedChartData.value);
1157
1197
  }
1158
1198
 
1159
1199
  //@ts-expect-error we assume that the spec data is of type InlineData
1160
- if (chartSpec.value?.data?.values?.length) {
1200
+ if (Object.keys(tempChartSpec?.data?.values ?? {}).length) {
1161
1201
  //@ts-expect-error we assume that the spec data is of type InlineData
1162
- processResults.value.push(chartSpec.value?.data.values);
1202
+ processResults.value.push(tempChartSpec?.data.values);
1163
1203
  }
1164
-
1165
- if (chartSpec.value && !("background" in chartSpec.value)) {
1166
- chartSpec.value["background"] = "transparent";
1204
+ if (tempChartSpec && !("background" in tempChartSpec)) {
1205
+ tempChartSpec["background"] = "transparent";
1167
1206
  }
1207
+ usedChartSpec.value = tempChartSpec;
1168
1208
 
1169
1209
  await processSTAC(
1170
1210
  serviceLinks,
@@ -1215,23 +1255,24 @@ async function handleProcesses({
1215
1255
  * @param {Object} params
1216
1256
  * @param {import("vue").Ref<boolean>} params.loading
1217
1257
  * @param {import("vue").Ref<boolean>} params.isProcessed
1218
- * @param {import("vue").Ref<import("@eox/chart").EOxChart["spec"] | null>} params.chartSpec
1219
1258
  * @param {import("vue").Ref<boolean>} params.isPolling
1220
1259
  * @param {import("vue").Ref<any[]>} params.processResults
1221
1260
  * @param {import("vue").Ref<Record<string,any>|null>} params.jsonformSchema
1261
+ * @param {boolean} params.enableCompare
1222
1262
  */
1223
1263
  function resetProcess({
1224
1264
  loading,
1225
1265
  isProcessed,
1226
- chartSpec,
1227
1266
  jsonformSchema,
1228
1267
  processResults,
1229
1268
  isPolling,
1269
+ enableCompare,
1230
1270
  }) {
1231
1271
  loading.value = false;
1232
1272
  isProcessed.value = false;
1233
1273
  isPolling.value = false;
1234
- chartSpec.value = null;
1274
+ const usedChartSpec = enableCompare ? compareChartSpec : chartSpec;
1275
+ usedChartSpec.value = null;
1235
1276
  processResults.value = [];
1236
1277
  jsonformSchema.value = null;
1237
1278
  }
@@ -1250,8 +1291,7 @@ const onChartClick = (evt) => {
1250
1291
  const chartSpec = evt.target?.spec;
1251
1292
  if (
1252
1293
  !chartSpec ||
1253
- !evt.detail?.item?.datum ||
1254
- !evt.detail?.item?.datum.datum
1294
+ (!evt.detail?.item?.datum && !evt.detail?.item?.datum.datum)
1255
1295
  ) {
1256
1296
  return;
1257
1297
  }