@eodash/eodash 5.3.3 → 5.5.0

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 (115) hide show
  1. package/core/client/asWebComponent.js +1 -1
  2. package/core/client/composables/DefineEodash.js +3 -1
  3. package/core/client/composables/DefineWidgets.js +12 -2
  4. package/core/client/eodashSTAC/EodashCollection.js +20 -37
  5. package/core/client/eodashSTAC/createLayers.js +306 -136
  6. package/core/client/eodashSTAC/helpers.js +60 -40
  7. package/core/client/eodashSTAC/parquet.js +2 -0
  8. package/core/client/eodashSTAC/triggers.js +5 -5
  9. package/core/client/store/actions.js +17 -17
  10. package/core/client/store/states.js +26 -4
  11. package/core/client/types.ts +12 -1
  12. package/core/client/utils/index.js +18 -1
  13. package/dist/client/{DashboardLayout-Cp8Rv3Ef.js → DashboardLayout-CkSgvaFF.js} +2 -2
  14. package/dist/client/{DynamicWebComponent-CBsxC82P.js → DynamicWebComponent-Ncsg6fb9.js} +1 -1
  15. package/dist/client/EodashChart-5v7adDpG.js +144 -0
  16. package/dist/client/{EodashDatePicker-Dewym-cx.js → EodashDatePicker-RoQJe6ss.js} +4 -4
  17. package/dist/client/{EodashItemFilter-CAsZpOoQ.js → EodashItemFilter-CCoVC5BE.js} +2 -2
  18. package/dist/client/{EodashLayerControl-fn-rt8Ac.js → EodashLayerControl-weVj7aQA.js} +2 -2
  19. package/dist/client/{EodashLayoutSwitcher-B9XqQXCS.js → EodashLayoutSwitcher-CL-Z9d5_.js} +3 -3
  20. package/dist/client/EodashMapBtns-CXU8IuPO.js +433 -0
  21. package/dist/client/{EodashStacInfo-lxBKoav9.js → EodashStacInfo-BbMnjf-n.js} +11 -15
  22. package/dist/client/{EodashTimeSlider-DI97QkNT.js → EodashTimeSlider-BZXnqfax.js} +2 -2
  23. package/dist/client/{EodashTools-D5ShUT1g.js → EodashTools-DUJlkkgx.js} +4 -4
  24. package/dist/client/{ExportState-ruNyRS2E.js → ExportState-CT3FQOHW.js} +46 -21
  25. package/dist/client/{Footer-IQNyfd78.js → Footer-D_iqP-1K.js} +1 -1
  26. package/dist/client/{Header-BBdi_-Lp.js → Header-Dzhnvsy-.js} +127 -17
  27. package/dist/client/MobileLayout-6Rg_PSO8.js +118 -0
  28. package/dist/client/{PopUp-DRgOmD7-.js → PopUp-DPPv_GSA.js} +8 -59
  29. package/dist/client/{ProcessList-DxyCFQdz.js → ProcessList-BIN_Mb27.js} +9 -13
  30. package/dist/client/{VImg-hwmwzSwG.js → VImg-DhbuvNrA.js} +2 -2
  31. package/dist/client/{VMain-vk4-rkw-.js → VMain-CVabY_NY.js} +1 -1
  32. package/dist/client/{VTooltip-BYUZeia1.js → VTooltip-Cc6au3Sn.js} +3 -4
  33. package/dist/client/{WidgetsContainer-DXD_8rqh.js → WidgetsContainer-ChqTJS4h.js} +1 -1
  34. package/dist/client/asWebComponent-DaIxULaA.js +9207 -0
  35. package/dist/client/{async-D1MvO_Z_.js → async-D6Lvv-fT.js} +15 -5
  36. package/dist/client/eo-dash.js +1 -1
  37. package/dist/client/{forwardRefs-DM-E2MfG.js → forwardRefs--IccUBdR.js} +196 -37
  38. package/dist/client/{handling-CbgeKrqT.js → handling-DSA67d6E.js} +160 -37
  39. package/dist/client/{helpers-CtUlAW0N.js → helpers-BBSdbOmv.js} +239 -126
  40. package/dist/client/{index-DBo0F4Fv.js → index-6LlXNkke.js} +5 -3
  41. package/dist/client/{index-BJvLt3Xf.js → index-BS-8Y5FE.js} +34 -77
  42. package/dist/client/{index-BkW06-Lg.js → index-CQihL_c6.js} +55 -15
  43. package/dist/client/{index-BxDh5v-H.js → index-qsZhYR_6.js} +15 -16
  44. package/dist/client/templates.js +52 -2
  45. package/dist/client/{transition-BdzATvPB.js → transition-DFr4cXu8.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/composables/DefineEodash.d.ts +1 -1
  59. package/dist/types/core/client/eodashSTAC/EodashCollection.d.ts +27 -11
  60. package/dist/types/core/client/eodashSTAC/createLayers.d.ts +30 -23
  61. package/dist/types/core/client/eodashSTAC/helpers.d.ts +11 -4
  62. package/dist/types/core/client/store/actions.d.ts +1 -2
  63. package/dist/types/core/client/store/states.d.ts +22 -4
  64. package/dist/types/core/client/types.d.ts +7 -2
  65. package/dist/types/core/client/utils/index.d.ts +1 -0
  66. package/dist/types/core/client/views/Dashboard.vue.d.ts +20 -8
  67. package/dist/types/templates/compare.d.ts +20 -0
  68. package/dist/types/templates/expert.d.ts +30 -1
  69. package/dist/types/widgets/EodashChart.vue.d.ts +28 -0
  70. package/dist/types/widgets/EodashDatePicker.vue.d.ts +38 -9
  71. package/dist/types/widgets/EodashItemCatalog/index.vue.d.ts +88 -13
  72. package/dist/types/widgets/EodashItemCatalog/methods/map.d.ts +1 -1
  73. package/dist/types/widgets/EodashItemFilter.vue.d.ts +169 -26
  74. package/dist/types/widgets/EodashLayerControl.vue.d.ts +38 -10
  75. package/dist/types/widgets/EodashLayoutSwitcher.vue.d.ts +22 -7
  76. package/dist/types/widgets/EodashMap/EodashMapBtns.vue.d.ts +94 -19
  77. package/dist/types/widgets/EodashMap/index.vue.d.ts +647 -92
  78. package/dist/types/widgets/EodashMap/methods/btns.d.ts +14 -0
  79. package/dist/types/widgets/EodashProcess/ProcessList.vue.d.ts +24 -7
  80. package/dist/types/widgets/EodashProcess/index.vue.d.ts +26 -7
  81. package/dist/types/widgets/EodashProcess/methods/composables.d.ts +1 -2
  82. package/dist/types/widgets/EodashProcess/methods/handling.d.ts +18 -11
  83. package/dist/types/widgets/EodashProcess/methods/outputs.d.ts +2 -2
  84. package/dist/types/widgets/EodashProcess/methods/utils.d.ts +1 -0
  85. package/dist/types/widgets/EodashStacInfo.vue.d.ts +67 -18
  86. package/dist/types/widgets/EodashTimeSlider.vue.d.ts +14 -6
  87. package/dist/types/widgets/EodashTools.vue.d.ts +437 -47
  88. package/dist/types/widgets/ExportState.vue.d.ts +26 -8
  89. package/dist/types/widgets/PopUp.vue.d.ts +61 -11
  90. package/dist/types/widgets/WidgetsContainer.vue.d.ts +22 -6
  91. package/package.json +33 -34
  92. package/templates/baseConfig.js +2 -1
  93. package/templates/compare.js +28 -1
  94. package/templates/expert.js +23 -1
  95. package/widgets/EodashChart.vue +139 -0
  96. package/widgets/EodashItemCatalog/index.vue +2 -2
  97. package/widgets/EodashItemCatalog/methods/map.js +9 -10
  98. package/widgets/EodashMap/EodashMapBtns.vue +73 -93
  99. package/widgets/EodashMap/index.vue +14 -2
  100. package/widgets/EodashMap/methods/btns.js +155 -0
  101. package/widgets/EodashMap/methods/create-layers-config.js +26 -3
  102. package/widgets/EodashMap/methods/index.js +2 -1
  103. package/widgets/EodashProcess/ProcessList.vue +2 -3
  104. package/widgets/EodashProcess/index.vue +19 -70
  105. package/widgets/EodashProcess/methods/async.js +1 -1
  106. package/widgets/EodashProcess/methods/composables.js +13 -6
  107. package/widgets/EodashProcess/methods/custom-endpoints/chart/veda-endpoint.js +20 -7
  108. package/widgets/EodashProcess/methods/handling.js +100 -22
  109. package/widgets/EodashProcess/methods/outputs.js +44 -4
  110. package/widgets/EodashProcess/methods/utils.js +11 -1
  111. package/widgets/EodashStacInfo.vue +10 -23
  112. package/widgets/ExportState.vue +9 -15
  113. package/dist/client/EodashMapBtns-nFY6MIAX.js +0 -301
  114. package/dist/client/MobileLayout-BfBeF-JF.js +0 -118
  115. package/dist/client/asWebComponent-DdguWGDI.js +0 -8967
@@ -1,14 +1,15 @@
1
- import { onMounted, watch, nextTick, ref, useTemplateRef, computed, createElementBlock, openBlock, createVNode, createCommentVNode, createElementVNode, unref, normalizeStyle, toRaw, createBlock, withCtx, createTextVNode } from 'vue';
1
+ import { onMounted, watch, nextTick, ref, useTemplateRef, computed, createElementBlock, openBlock, createVNode, createCommentVNode, createBlock, createElementVNode, unref, withCtx, createTextVNode } from 'vue';
2
2
  import '@eox/chart';
3
3
  import '@eox/drawtools';
4
4
  import '@eox/jsonform';
5
- import { R as eoxLayersKey, K as useOnLayersUpdate, _ as _export_sfc, E as useSTAcStore, G as VBtn } from './asWebComponent-DdguWGDI.js';
5
+ import { R as eoxLayersKey, K as useOnLayersUpdate, _ as _export_sfc, E as useSTAcStore, G as VBtn } from './asWebComponent-DaIxULaA.js';
6
6
  import { storeToRefs } from 'pinia';
7
- import { P as ProcessList, c as compareJobs, j as jobs } from './ProcessList-DxyCFQdz.js';
8
- import { i as initProcess, o as onChartClick, h as handleProcesses } from './handling-CbgeKrqT.js';
7
+ import { P as ProcessList, c as compareJobs, j as jobs } from './ProcessList-BIN_Mb27.js';
8
+ import EodashChart from './EodashChart-5v7adDpG.js';
9
+ import { i as initProcess, u as updateJsonformIdentifier, h as handleProcesses } from './handling-DSA67d6E.js';
9
10
  import { useEventBus } from '@vueuse/core';
10
- import { u as updateJobsStatus, d as download } from './async-D1MvO_Z_.js';
11
- import { H as compareIndicator, F as indicator, N as mapCompareEl, h as mapEl, T as compareChartEl, U as chartEl } from './helpers-CtUlAW0N.js';
11
+ import { u as updateJobsStatus, d as download, g as getDrawToolsProperty } from './async-D6Lvv-fT.js';
12
+ import { I as compareIndicator, G as indicator, S as mapCompareEl, j as mapEl, M as areChartsSeparateLayout, O as compareChartSpec, N as chartSpec } from './helpers-BBSdbOmv.js';
12
13
  import { mdiCogPlayOutline, mdiDownloadCircleOutline } from '@mdi/js';
13
14
 
14
15
  /**
@@ -20,7 +21,6 @@ import { mdiCogPlayOutline, mdiDownloadCircleOutline } from '@mdi/js';
20
21
  * @param {import("vue").Ref<import("stac-ts").StacCollection | null>} params.selectedStac
21
22
  * @param {import("vue").Ref<import("@eox/jsonform").EOxJSONForm | null>} params.jsonformEl
22
23
  * @param {import("vue").Ref<Record<string,any> | null>} params.jsonformSchema
23
- * @param {import("vue").Ref<import("@eox/chart").EOxChart["spec"] | null>} params.chartSpec
24
24
  * @param {import("vue").Ref<any[]>} params.processResults
25
25
  * @param {import("vue").Ref<boolean>} params.isProcessed
26
26
  * @param {import("vue").Ref<boolean>} params.loading
@@ -31,7 +31,6 @@ const useInitProcess = ({
31
31
  selectedStac,
32
32
  jsonformEl,
33
33
  jsonformSchema,
34
- chartSpec,
35
34
  isProcessed,
36
35
  processResults,
37
36
  loading,
@@ -48,7 +47,6 @@ const useInitProcess = ({
48
47
  selectedStac,
49
48
  jsonformEl,
50
49
  jsonformSchema,
51
- chartSpec,
52
50
  isProcessed,
53
51
  processResults,
54
52
  loading,
@@ -61,7 +59,6 @@ const useInitProcess = ({
61
59
  selectedStac,
62
60
  jsonformEl,
63
61
  jsonformSchema,
64
- chartSpec,
65
62
  isProcessed,
66
63
  loading,
67
64
  processResults,
@@ -74,6 +71,18 @@ const useInitProcess = ({
74
71
  const evtKey =
75
72
  mapElement?.id === "compare" ? "compareLayers:updated" : "layers:updated";
76
73
  useOnLayersUpdate(async (evt, _payload) => {
74
+ if (
75
+ evt == "layertime:updated" ||
76
+ evt == "compareLayertime:updated" ||
77
+ evt == "time:updated" ||
78
+ evt == "compareTime:updated"
79
+ ) {
80
+ await updateJsonformIdentifier({
81
+ jsonformSchema,
82
+ // @ts-expect-error TODO payload coming from time update events is not an object with layers property
83
+ newLayers: _payload,
84
+ });
85
+ }
77
86
  if (evt !== evtKey) {
78
87
  return;
79
88
  }
@@ -82,7 +91,6 @@ const useInitProcess = ({
82
91
  selectedStac,
83
92
  jsonformEl,
84
93
  jsonformSchema,
85
- chartSpec,
86
94
  isProcessed,
87
95
  processResults,
88
96
  loading,
@@ -142,15 +150,14 @@ function useAutoExec(
142
150
  });
143
151
  }
144
152
 
145
- const _style_0 = "eox-chart{--background-color: transparent;padding-top:1em}eox-jsonform{padding:.7em;min-height:0px}";
153
+ const _style_0 = "eox-jsonform{padding:.7em;min-height:0px}";
146
154
 
147
155
  const _hoisted_1 = {
148
156
  ref: "container",
149
- class: "pb-4"
157
+ class: "py-1"
150
158
  };
151
159
  const _hoisted_2 = [".schema"];
152
- const _hoisted_3 = [".spec", ".dataValues", ".opt"];
153
- const _hoisted_4 = { class: "mt-4 text-right" };
160
+ const _hoisted_3 = { class: "mt-2 text-right" };
154
161
 
155
162
 
156
163
  const _sfc_main = {
@@ -170,11 +177,7 @@ const _sfc_main = {
170
177
  setup(__props) {
171
178
 
172
179
 
173
- /** @type {import("vue").Ref<import("vega").Spec|null>} */
174
- const chartSpec = ref(null);
175
180
 
176
- /** @type {import("vue").Ref<Record<string,any>|null>} */
177
- const chartData = ref(null);
178
181
  const isProcessed = ref(false);
179
182
 
180
183
  /** @type {import("vue").Ref<Record<string,any>|null>} */
@@ -184,16 +187,12 @@ const jsonformEl =
184
187
  /** @type {Readonly<import("vue").ShallowRef<import("@eox/jsonform").EOxJSONForm | null>>} */ (
185
188
  useTemplateRef("jsonformEl")
186
189
  );
187
- const chartElRef =
188
- /** @type {Readonly<import("vue").ShallowRef<import("@eox/chart").EOxChart | null>>} */ (
189
- useTemplateRef("chartElRef")
190
- );
190
+
191
191
  const isAsync = computed(
192
192
  () =>
193
193
  selectedStac.value?.links.filter((l) => l.endpoint === "eoxhub_workspaces")
194
194
  .length,
195
195
  );
196
- const containerEl = useTemplateRef("container");
197
196
 
198
197
  const loading = ref(false);
199
198
 
@@ -204,10 +203,7 @@ const isPolling = ref(false);
204
203
  const processResults = ref([]);
205
204
 
206
205
  const showExecBtn = computed(
207
- () =>
208
- !autoExec.value &&
209
- (!!jsonformSchema.value || !!chartSpec.value) &&
210
- !!jsonformEl.value,
206
+ () => !autoExec.value && !!jsonformSchema.value && !!jsonformEl.value,
211
207
  );
212
208
  const { selectedStac, selectedCompareStac } = storeToRefs(useSTAcStore());
213
209
  const currentSelectedStac = __props.enableCompare ? selectedCompareStac : selectedStac;
@@ -224,7 +220,6 @@ useInitProcess({
224
220
  mapElement: mapElement.value,
225
221
  jsonformEl,
226
222
  jsonformSchema,
227
- chartSpec,
228
223
  isProcessed,
229
224
  processResults,
230
225
  loading,
@@ -250,14 +245,6 @@ const downloadResults = () => {
250
245
  };
251
246
 
252
247
  const startProcess = async () => {
253
- /** @param {*} jsonformSchema */
254
- const getDrawToolsProperty = (jsonformSchema) => {
255
- for (const property in jsonformSchema.properties) {
256
- if (jsonformSchema.properties[property]?.options?.drawtools) {
257
- return property;
258
- }
259
- }
260
- };
261
248
  const drawToolsProperty = getDrawToolsProperty(jsonformSchema.value);
262
249
  const propertyIsEmpty =
263
250
  drawToolsProperty &&
@@ -268,7 +255,8 @@ const startProcess = async () => {
268
255
 
269
256
  if (propertyIsEmpty) {
270
257
  isProcessed.value = false;
271
- chartSpec.value = null;
258
+ const usedChartSpec = __props.enableCompare ? compareChartSpec : chartSpec;
259
+ usedChartSpec.value = null;
272
260
  return;
273
261
  }
274
262
  const errors = jsonformEl.value?.editor.validate();
@@ -284,8 +272,6 @@ const startProcess = async () => {
284
272
  selectedStac: currentSelectedStac,
285
273
  jsonformEl,
286
274
  jsonformSchema,
287
- chartSpec,
288
- chartData,
289
275
  loading,
290
276
  isPolling,
291
277
  processResults,
@@ -297,29 +283,6 @@ const startProcess = async () => {
297
283
  };
298
284
  useAutoExec(autoExec, jsonformEl, jsonformSchema, startProcess);
299
285
 
300
- const chartStyles = computed(() => {
301
- /** @type {Record<string,string>} */
302
- const styles = {};
303
- if (!chartSpec.value?.["height"]) {
304
- styles["height"] =
305
- Math.max(
306
- (containerEl.value?.offsetHeight ?? 0) -
307
- (jsonformEl.value?.offsetHeight ?? 0),
308
- 200,
309
- ) + "px";
310
- }
311
- return styles;
312
- });
313
-
314
- // Assign chart element to global state based on compare mode
315
- watch(chartElRef, (newVal) => {
316
- if (__props.enableCompare) {
317
- compareChartEl.value = newVal;
318
- } else {
319
- chartEl.value = newVal;
320
- }
321
- });
322
-
323
286
  return (_ctx, _cache) => {
324
287
 
325
288
 
@@ -336,20 +299,14 @@ return (_ctx, _cache) => {
336
299
  ".schema": jsonformSchema.value
337
300
  }, null, 40 /* PROPS, NEED_HYDRATION */, _hoisted_2))
338
301
  : createCommentVNode("v-if", true),
339
- (isProcessed.value && chartSpec.value)
340
- ? (openBlock(), createElementBlock("eox-chart", {
302
+ (!unref(areChartsSeparateLayout))
303
+ ? (openBlock(), createBlock(EodashChart, {
341
304
  key: 1,
342
- ref_key: "chartElRef",
343
- ref: chartElRef,
344
- class: "chart",
345
- ".spec": toRaw(chartSpec.value),
346
- ".dataValues": toRaw(chartData.value),
347
- "onClick:item": _cache[0] || (_cache[0] = (...args) => (unref(onChartClick) && unref(onChartClick)(...args))),
348
- style: normalizeStyle(chartStyles.value),
349
- ".opt": __props.vegaEmbedOptions
350
- }, null, 44 /* STYLE, PROPS, NEED_HYDRATION */, _hoisted_3))
305
+ "vega-embed-options": __props.vegaEmbedOptions,
306
+ "enable-compare": __props.enableCompare
307
+ }, null, 8 /* PROPS */, ["vega-embed-options", "enable-compare"]))
351
308
  : createCommentVNode("v-if", true),
352
- createElementVNode("div", _hoisted_4, [
309
+ createElementVNode("div", _hoisted_3, [
353
310
  (showExecBtn.value)
354
311
  ? (openBlock(), createBlock(VBtn, {
355
312
  key: 0,
@@ -359,7 +316,7 @@ return (_ctx, _cache) => {
359
316
  onClick: startProcess,
360
317
  color: "primary"
361
318
  }, {
362
- default: withCtx(() => [...(_cache[1] || (_cache[1] = [
319
+ default: withCtx(() => [...(_cache[0] || (_cache[0] = [
363
320
  createTextVNode(" Execute ", -1 /* CACHED */)
364
321
  ]))]),
365
322
  _: 1 /* STABLE */
@@ -372,7 +329,7 @@ return (_ctx, _cache) => {
372
329
  "append-icon": [unref(mdiDownloadCircleOutline)],
373
330
  onClick: downloadResults
374
331
  }, {
375
- default: withCtx(() => [...(_cache[2] || (_cache[2] = [
332
+ default: withCtx(() => [...(_cache[1] || (_cache[1] = [
376
333
  createTextVNode(" Download ", -1 /* CACHED */)
377
334
  ]))]),
378
335
  _: 1 /* STABLE */
@@ -1,13 +1,13 @@
1
- import { onMounted, onUnmounted, watch, computed, useTemplateRef, ref, toRaw, createElementBlock, openBlock, createElementVNode, createCommentVNode, unref, normalizeStyle, createVNode } from 'vue';
2
- import '@eox/map';
1
+ import { onMounted, onUnmounted, watch, computed, withAsyncContext, useTemplateRef, ref, toRaw, createElementBlock, openBlock, createElementVNode, createCommentVNode, unref, normalizeStyle, createVNode } from 'vue';
2
+ import { transformExtent } from '@eox/map';
3
3
  import '@eox/map/src/plugins/advancedLayersAndSources';
4
- import { P as setMapProjFromCol, E as mapPosition, M as sanitizeBbox, h as mapEl, N as mapCompareEl, F as indicator, H as compareIndicator, C as poi, B as datetime } from './helpers-CtUlAW0N.js';
4
+ import { U as setMapProjFromCol, F as mapPosition, R as sanitizeBbox, j as mapEl, S as mapCompareEl, G as indicator, I as compareIndicator, D as poi, V as isGlobe, C as datetime } from './helpers-BBSdbOmv.js';
5
5
  import { storeToRefs } from 'pinia';
6
- import { O as EodashCollection, E as useSTAcStore, P as useEmitLayersUpdate, Q as isFirstLoad, K as useOnLayersUpdate, _ as _export_sfc, D as useDisplay, a as useLayout, N as layerControlFormValue, M as layerControlFormValueCompare, J as eodashCompareCollections, I as eodashCollections } from './asWebComponent-DdguWGDI.js';
6
+ import { O as EodashCollection, E as useSTAcStore, P as useEmitLayersUpdate, Q as isFirstLoad, K as useOnLayersUpdate, _ as _export_sfc, D as useDisplay, a as useLayout, N as layerControlFormValue, M as layerControlFormValueCompare, J as eodashCompareCollections, I as eodashCollections } from './asWebComponent-DaIxULaA.js';
7
7
  import log from 'loglevel';
8
8
  import { i as inAndOut } from './easing-CH0-9wR8.js';
9
9
  import mustache from 'mustache';
10
- import EodashMapBtns from './EodashMapBtns-nFY6MIAX.js';
10
+ import EodashMapBtns from './EodashMapBtns-CXU8IuPO.js';
11
11
 
12
12
  /**
13
13
  * Creates full layer configuration from indicator and time information
@@ -60,6 +60,29 @@ const createLayersConfig = async (
60
60
  dataLayers.layers.push(...layers);
61
61
  }
62
62
 
63
+ /* check for roles in indicator links to assign visibility property for the data layers */
64
+ if (selectedIndicator?.links) {
65
+ const visibilityLinks = selectedIndicator.links.filter(
66
+ (link) =>
67
+ Array.isArray(link.roles) &&
68
+ (link.roles.includes("disable") || link.roles.includes("hidden")),
69
+ );
70
+ if (visibilityLinks.length > 0) {
71
+ visibilityLinks.forEach((vl) => {
72
+ const targetLayerId = vl.id;
73
+ const targetLayer = dataLayers.layers.find(
74
+ (dl) => dl.properties.id.split(";:;")[0] === targetLayerId,
75
+ );
76
+ if (targetLayer) {
77
+ if (Array.isArray(vl.roles) && vl.roles.includes("disable")) {
78
+ targetLayer.properties.visible = false;
79
+ } else if (Array.isArray(vl.roles) && vl.roles.includes("hidden")) {
80
+ targetLayer.properties.layerControlHide = true;
81
+ }
82
+ }
83
+ });
84
+ }
85
+ }
63
86
  layersCollection.push(dataLayers);
64
87
  const indicatorLayers =
65
88
  //@ts-expect-error indicator is collection
@@ -67,7 +90,7 @@ const createLayersConfig = async (
67
90
  const observationPointsLayer =
68
91
  EodashCollection.getObservationPointsLayer(eodashCols);
69
92
  if (observationPointsLayer) {
70
- dataLayers.layers.unshift(observationPointsLayer);
93
+ dataLayers.layers.push(observationPointsLayer);
71
94
  }
72
95
  const baseLayers = {
73
96
  type: "Group",
@@ -138,7 +161,7 @@ const createLayersConfig = async (
138
161
  }
139
162
 
140
163
  if (baseLayers.layers.length) {
141
- layersCollection.push(baseLayers);
164
+ layersCollection.unshift(baseLayers);
142
165
  }
143
166
 
144
167
  const overlayLayers = {
@@ -156,7 +179,7 @@ const createLayersConfig = async (
156
179
 
157
180
  if (indicatorOverlays.length) {
158
181
  overlayLayers.layers.push(...indicatorOverlays);
159
- layersCollection.unshift(overlayLayers);
182
+ layersCollection.push(overlayLayers);
160
183
  }
161
184
 
162
185
  return layersCollection;
@@ -355,7 +378,7 @@ const useInitMap = (
355
378
  const b = updatedStac.extent?.spatial.bbox[0];
356
379
  const sanitizedExtent = sanitizeBbox([...b]);
357
380
 
358
- const reprojExtent = mapElement.value?.transformExtent(
381
+ const reprojExtent = transformExtent(
359
382
  sanitizedExtent,
360
383
  "EPSG:4326",
361
384
  mapElement.value?.map?.getView().getProjection(),
@@ -409,7 +432,7 @@ const useUpdateTooltipProperties = (eodashCols, tooltipProperties) => {
409
432
  });
410
433
  };
411
434
 
412
- const _style_0 = "#cursor-coordinates[data-v-76f918a2]{position:fixed;left:24px;bottom:54px;color:#000000e6;font-size:11px;font-family:var(--eox-body-font-family);background:#fffe;border-radius:4px;border:none;padding:0 3px;max-height:24px}@media (max-width: 959px){#cursor-coordinates[data-v-76f918a2]{display:none}}#scale-line[data-v-76f918a2]{position:fixed;left:24px;bottom:28px;color:#fff}@media (max-width: 959px){#scale-line[data-v-76f918a2]{bottom:102px}}[data-v-76f918a2] .ol-scale-line{background:#fffe!important;border-radius:4px!important;border:none!important;padding:0 3px 3px!important;font-size:10px!important;font-family:var(--eox-body-font-family);max-height:20px}[data-v-76f918a2] .ol-scale-line-inner{display:flex;justify-content:center;border:1px solid rgba(0,0,0,.5)!important;border-top:none!important;color:#333!important;font-weight:500!important;transform:translateY(1px)}.map-buttons-container[data-v-76f918a2]{position:fixed;left:0;width:100%;height:100%;display:grid;grid-template-columns:repeat(12,1fr);grid-template-rows:repeat(12,1fr);pointer-events:none;z-index:1}.map-buttons-container[data-v-76f918a2]>*{pointer-events:auto}";
435
+ const _style_0 = "#cursor-coordinates[data-v-965b3ae7]{position:fixed;left:24px;bottom:54px;color:#000000e6;font-size:10px;font-family:var(--eox-body-font-family);background:#fffe;border-radius:4px;border:none;padding:0 3px;max-height:24px}@media(max-width:959px){#cursor-coordinates[data-v-965b3ae7]{display:none}}#scale-line[data-v-965b3ae7]{position:fixed;left:24px;bottom:28px;color:#fff}@media(max-width:959px){#scale-line[data-v-965b3ae7]{bottom:102px}}[data-v-965b3ae7] .ol-scale-line{background:#fffe!important;border-radius:4px!important;border:none!important;padding:0 3px 3px!important;font-size:10px!important;font-family:var(--eox-body-font-family);max-height:20px}[data-v-965b3ae7] .ol-scale-line-inner{display:flex;justify-content:center;border:1px solid rgba(0,0,0,.5)!important;border-top:none!important;color:#333!important;font-weight:500!important;transform:translateY(1px)}.map-buttons-container[data-v-965b3ae7]{position:fixed;left:0;width:100%;height:100%;display:grid;grid-template-columns:repeat(12,1fr);grid-template-rows:repeat(12,1fr);pointer-events:none;z-index:1}.map-buttons-container[data-v-965b3ae7]>*{pointer-events:auto}";
413
436
 
414
437
  const _hoisted_1 = [".enabled"];
415
438
  const _hoisted_2 = [".center", ".zoom", ".layers", ".controls"];
@@ -471,7 +494,9 @@ const _sfc_main = {
471
494
  * enableChangeProjection?: boolean;
472
495
  * enableBackToPOIs?: boolean;
473
496
  * enableSearch?: boolean;
497
+ * searchParams?: object;
474
498
  * enableZoom?: boolean;
499
+ * enableGlobe?: boolean;
475
500
  * enableCompareIndicators?: boolean | {
476
501
  * compareTemplate?:string;
477
502
  * fallbackTemplate?:string;
@@ -486,10 +511,14 @@ const _sfc_main = {
486
511
  enableBackToPOIs: true,
487
512
  enableSearch: true,
488
513
  enableZoom: true,
514
+ enableGlobe: true,
515
+ searchParams: {},
489
516
  }),
490
517
  },
491
518
  },
492
- setup(__props) {
519
+ async setup(__props) {
520
+
521
+ let __temp, __restore;
493
522
 
494
523
  const props = __props;
495
524
 
@@ -530,8 +559,17 @@ const btnsProps = computed(() => ({
530
559
  backToPOIs: props.btns.enableBackToPOIs ?? true,
531
560
  enableSearch: props.btns.enableSearch ?? true,
532
561
  enableZoom: props.btns.enableZoom ?? true,
562
+ enableGlobe: props.btns.enableGlobe ?? true,
563
+ searchParams: props.btns.searchParams,
533
564
  }));
534
565
 
566
+ if (btnsProps.value.enableGlobe) {
567
+ (
568
+ ([__temp,__restore] = withAsyncContext(() => import('@eox/map/src/plugins/globe'))),
569
+ await __temp,
570
+ __restore()
571
+ );
572
+ }
535
573
  // Prepare containers for scale line and cursor coordinates
536
574
  const scaleLineRef = useTemplateRef("scale-line");
537
575
  const cursorCoordsRef = useTemplateRef("cursor-coords");
@@ -763,7 +801,7 @@ return (_ctx, _cache) => {
763
801
  createCommentVNode(" prettier-ignore "),
764
802
  createVNode(EodashMapBtns, {
765
803
  style: normalizeStyle({
766
- gridColumn: (unref(indicator) || unref(compareIndicator) || unref(poi)) ? responsiveX.value : '12',
804
+ gridColumn: (unref(indicator) || unref(compareIndicator) || unref(poi)) && !unref(isGlobe) ? responsiveX.value : '12',
767
805
  gridRow: responsiveY.value,
768
806
  }),
769
807
  exportMap: (unref(indicator) || unref(compareIndicator) || unref(poi)) ? btnsProps.value.exportMap : false,
@@ -776,14 +814,16 @@ return (_ctx, _cache) => {
776
814
  enableSearch: (unref(indicator) || unref(compareIndicator) || unref(poi)) ? btnsProps.value.enableSearch : false
777
815
  ,
778
816
  enableZoom: (unref(indicator) || unref(compareIndicator) || unref(poi)) ? btnsProps.value.enableZoom : false
779
-
780
- }, null, 8 /* PROPS */, ["style", "exportMap", "changeProjection", "compareIndicators", "backToPOIs", "enableSearch", "enableZoom"])
817
+ ,
818
+ enableGlobe: (unref(indicator) || unref(compareIndicator) || unref(poi)) ? btnsProps.value.enableGlobe : false,
819
+ searchParams: btnsProps.value.searchParams
820
+ }, null, 8 /* PROPS */, ["style", "exportMap", "changeProjection", "compareIndicators", "backToPOIs", "enableSearch", "enableZoom", "enableGlobe", "searchParams"])
781
821
  ], 4 /* STYLE */)
782
822
  ]))
783
823
  }
784
824
  }
785
825
 
786
826
  };
787
- const index = /*#__PURE__*/_export_sfc(_sfc_main, [['styles',[_style_0]],['__scopeId',"data-v-76f918a2"]]);
827
+ const index = /*#__PURE__*/_export_sfc(_sfc_main, [['styles',[_style_0]],['__scopeId',"data-v-965b3ae7"]]);
788
828
 
789
829
  export { index as default };
@@ -1,9 +1,9 @@
1
1
  import { onMounted, onUnmounted, withAsyncContext, useTemplateRef, ref, createElementBlock, openBlock, createVNode, createElementVNode, withCtx, unref, toDisplayString } from 'vue';
2
- import { E as useSTAcStore, K as useOnLayersUpdate, _ as _export_sfc, L as VRow } from './asWebComponent-DdguWGDI.js';
3
- import { F as indicator, h as mapEl, M as sanitizeBbox, j as axios } from './helpers-CtUlAW0N.js';
2
+ import { E as useSTAcStore, K as useOnLayersUpdate, _ as _export_sfc, L as VRow } from './asWebComponent-DaIxULaA.js';
3
+ import { G as indicator, j as mapEl, R as sanitizeBbox, d as axios } from './helpers-BBSdbOmv.js';
4
4
  import { i as inAndOut } from './easing-CH0-9wR8.js';
5
5
  import { mdiViewDashboard } from '@mdi/js';
6
- import _sfc_main$1 from './EodashLayoutSwitcher-B9XqQXCS.js';
6
+ import _sfc_main$1 from './EodashLayoutSwitcher-CL-Z9d5_.js';
7
7
 
8
8
  /**
9
9
  *
@@ -239,7 +239,7 @@ function renderItemsFeatures(features) {
239
239
  },
240
240
  layers: [],
241
241
  };
242
- mapEl.value.layers = [analysisLayers, ...mapEl.value.layers.reverse()];
242
+ mapEl.value.layers = [...mapEl.value.layers, analysisLayers];
243
243
  }
244
244
 
245
245
  const stacItemsLayer = {
@@ -284,8 +284,8 @@ function renderItemsFeatures(features) {
284
284
  return;
285
285
  } else {
286
286
  //@ts-expect-error todo
287
- analysisLayers.layers.unshift(stacItemsLayer);
288
- mapEl.value.layers = [...mapEl.value.layers].reverse();
287
+ analysisLayers.layers.push(stacItemsLayer);
288
+ mapEl.value.layers = [...mapEl.value.layers];
289
289
  }
290
290
  }
291
291
 
@@ -317,21 +317,20 @@ const useSearchOnMapMove = (itemFilter, bboxFilter) => {
317
317
  * @param {import("vue").Ref<import("@/types").GeoJsonFeature[]>} currentItems
318
318
  */
319
319
  const useRenderItemsFeatures = (currentItems) => {
320
- const renderOnUpdate = () =>
321
- useOnLayersUpdate(() => {
322
- // consider cases where this is not needed
323
- renderItemsFeatures(currentItems.value);
324
- });
325
320
  onMounted(() => {
326
321
  renderItemsFeatures(currentItems.value);
327
- renderOnUpdate();
322
+ });
323
+
324
+ useOnLayersUpdate(() => {
325
+ // consider cases where this is not needed
326
+ renderItemsFeatures(currentItems.value);
328
327
  });
329
328
  };
330
329
  /**
331
330
  *
332
331
  * @param {import("vue").Ref<any>} itemfilterEl
333
332
  */
334
- function useRenderOnFeatureHover(itemfilterEl) {
333
+ function useHighlightOnFeatureHover(itemfilterEl) {
335
334
  /**
336
335
  *
337
336
  * @param {CustomEvent} evt
@@ -406,7 +405,7 @@ const onMouseLeaveResult = () => {
406
405
  mapEl.value?.selectInteractions["stac-items"]?.highlightById([]);
407
406
  };
408
407
 
409
- const _style_0 = "eox-itemfilter[data-v-64c66d83]{flex-basis:20%;height:100%;overflow:hidden!important;padding:1rem;--eox-itemfilter-results-color: var(--v-theme-surface) !important}.title[data-v-64c66d83]{padding:1em;margin:.2em}";
408
+ const _style_0 = "eox-itemfilter[data-v-4d4f6477]{flex-basis:20%;height:100%;overflow:hidden!important;padding:1rem;--eox-itemfilter-results-color: var(--v-theme-surface) !important}.title[data-v-4d4f6477]{padding:1em;margin:.2em}";
410
409
 
411
410
  const _hoisted_1 = [".imageProperty", ".subTitleProperty", ".filterProperties", ".items", "externalFilter"];
412
411
  const _hoisted_2 = {
@@ -525,7 +524,7 @@ useRenderItemsFeatures(currentItems);
525
524
  // Search on map move logic
526
525
  useSearchOnMapMove(itemfilterEl, props.bboxFilter);
527
526
 
528
- useRenderOnFeatureHover(itemfilterEl);
527
+ useHighlightOnFeatureHover(itemfilterEl);
529
528
 
530
529
  onUnmounted(() => {
531
530
  store.selectedItem = null;
@@ -566,6 +565,6 @@ return (_ctx, _cache) => {
566
565
  }
567
566
 
568
567
  };
569
- const index = /*#__PURE__*/_export_sfc(_sfc_main, [['styles',[_style_0]],['__scopeId',"data-v-64c66d83"]]);
568
+ const index = /*#__PURE__*/_export_sfc(_sfc_main, [['styles',[_style_0]],['__scopeId',"data-v-4d4f6477"]]);
570
569
 
571
570
  export { index as default };
@@ -1,5 +1,5 @@
1
1
  import { mdiViewDashboardVariant, mdiViewDashboard } from '@mdi/js';
2
- import { L as includesProcess } from './helpers-CtUlAW0N.js';
2
+ import { P as includesProcess, Q as shouldShowChartWidget } from './helpers-BBSdbOmv.js';
3
3
 
4
4
  /**
5
5
  * Special values that tell deepmerge to perform a certain action.
@@ -546,6 +546,11 @@ const expert = {
546
546
  },
547
547
  enableBackToPOIs: true,
548
548
  enableSearch: true,
549
+ enableGlobe: true,
550
+ // searchParams: {
551
+ // countrycode: "gb,ie,fr"
552
+ // bounds: "-84.26514,41.58998,-77.54150,46.14246"
553
+ // },
549
554
  },
550
555
  btnsPosition: {
551
556
  x: "12/9/9",
@@ -582,6 +587,11 @@ const expert = {
582
587
  layout: { x: 0, y: 1, w: "3/3/2", h: 11 },
583
588
  widget: {
584
589
  name: "EodashLayerControl",
590
+ properties: {
591
+ cssVars: {
592
+ "--list-padding": "1rem",
593
+ },
594
+ },
585
595
  },
586
596
  },
587
597
  {
@@ -631,6 +641,18 @@ const expert = {
631
641
  },
632
642
  },
633
643
  },
644
+ {
645
+ defineWidget: () =>
646
+ shouldShowChartWidget() && {
647
+ id: "ProcessResultChart",
648
+ type: "internal",
649
+ title: "Chart",
650
+ layout: { x: 0, y: 0, w: 12, h: 8 },
651
+ widget: {
652
+ name: "EodashChart",
653
+ },
654
+ },
655
+ },
634
656
  ],
635
657
  };
636
658
 
@@ -752,6 +774,33 @@ const compare = {
752
774
  },
753
775
  },
754
776
  },
777
+ {
778
+ defineWidget: () =>
779
+ shouldShowChartWidget() && {
780
+ id: "ProcessResultChart",
781
+ type: "internal",
782
+ title: "Chart",
783
+ layout: { x: 0, y: 0, w: 6, h: 8 },
784
+ widget: {
785
+ name: "EodashChart",
786
+ },
787
+ },
788
+ },
789
+ {
790
+ defineWidget: () =>
791
+ shouldShowChartWidget(true) && {
792
+ id: "ProcessResultChartCompare",
793
+ type: "internal",
794
+ title: "Compare Chart",
795
+ layout: { x: 6, y: 0, w: 6, h: 8 },
796
+ widget: {
797
+ name: "EodashChart",
798
+ properties: {
799
+ enableCompare: true,
800
+ },
801
+ },
802
+ },
803
+ },
755
804
  {
756
805
  defineWidget: (selectedSTAC) => {
757
806
  return selectedSTAC
@@ -847,7 +896,8 @@ const baseConfig = {
847
896
  stacEndpoint: {
848
897
  endpoint:
849
898
  "https://esa-eodashboards.github.io/eodashboard-catalog/trilateral/catalog.json",
850
- api: false,
899
+ // "https://api.explorer.eopf.copernicus.eu/stac",
900
+ // api: true,
851
901
  },
852
902
  brand: {
853
903
  noLayout: true,
@@ -1,5 +1,5 @@
1
1
  import { mergeProps, h, TransitionGroup, Transition } from 'vue';
2
- import { p as propsFactory, Y as isObject, aG as onlyDefinedProps } from './asWebComponent-DdguWGDI.js';
2
+ import { p as propsFactory, Z as isObject, aH as onlyDefinedProps } from './asWebComponent-DaIxULaA.js';
3
3
 
4
4
  // Utilities
5
5
  const makeTransitionProps = propsFactory({
package/dist/node/cli.js CHANGED
@@ -27,4 +27,4 @@ ${s.lib?`<eo-dash style="height:100%;"/>
27
27
  `}
28
28
  </body>
29
29
  </html>`;function Z(e={customElementFileName:"asWebComponent.js",stylePlaceHolder:"__VUE_CE_STYLES__"}){const{customElementFileName:n,stylePlaceHolder:r}=e;return{name:"vite-plugin-vue-custom-element-style-injector",enforce:"post",async transform(o,i){if(this.environment.mode!=="build")return;if(t.basename(i)===n){let p=o;return/defineCustomElement\s*\([^{]*\{[\s\S]*?styles\s*:/.test(o)||(p=o.replace(/(defineCustomElement\s*\(\s*[^,{]*,?\s*\{)/,`$1
30
- styles: ${r},`)),{code:p,map:null}}},generateBundle(o,i){let a="",p=[];const u=[];for(const d in i){const h=i[d];if(h.type==="chunk"&&h.code.includes(r)){a=d;break}}for(const d in i){const h=i[d];if(q(d)&&h.type==="asset"){let g=h.source.toString();g=g.replaceAll(":root",":host"),p.push(g),u.push(d)}}i[a].code=i[a].code.replace(r,JSON.stringify(p)),u.forEach(d=>{delete i[d]})}}}function q(e){return/\.(css|less|sass|scss|styl|stylus|pcss|postcss|sss)(?:$|\?)/.test(e)}const _=C(async({mode:e,command:n})=>{const r=["VITE_","EODASH_"];return{base:s.base??"",cacheDir:Q,plugins:[J({features:{customElement:n==="build"&&s.lib},template:{transformAssetUrls:B,compilerOptions:{isCustomElement:o=>!o.includes("v-")&&o.includes("-")}}}),M({autoImport:!0}),e==="development"&&{name:"inject-html",configureServer:ee},s.lib&&Z()],customLogger:j,define:{__userConfigExist__:!!m,...n==="build"&&s.lib?{"process.env":"import.meta.env"}:{"process.env":{},...te(r)}},envPrefix:r,resolve:{alias:{"@":t.join(c,"core/client"),"^":t.join(c,"widgets"),"user:widgets":D,...m&&{"user:config":m}},extensions:[".js",".json",".jsx",".mjs",".ts",".tsx",".vue"]},server:{allowedHosts:!0,warmup:{clientFiles:[t.join(c,"core/client/**"),m]},port:s.port??3e3,open:s.open,fs:{allow:[W(process.cwd())]},host:s.host},root:c,...e==="development"&&{optimizeDeps:{include:["webfontloader","vuetify","vue","pinia","stac-js","urijs","loglevel","vega","vega-lite","vega-embed","@eox/map","@eox/map/src/plugins/advancedLayersAndSources","@eox/layercontrol","@eox/drawtools","@eox/chart","@eox/jsonform","@eox/layout","@eox/itemfilter","@eox/timecontrol","@eox/stacinfo","color-legend-element","@eox/map","@eox/map/src/plugins/advancedLayersAndSources","@eox/layercontrol","@eox/timecontrol","@eox/jsonform","@eox/layout","@eox/itemfilter","@eox/stacinfo","@eox/elements-utils","@eox/geosearch","@eox/timeslider"],noDiscovery:!0}},publicDir:s.publicDir===!1?!1:K,build:{outDir:w,emptyOutDir:!0,target:"esnext",cssMinify:!0,...!s.lib&&n==="build"&&{manifest:!0,rollupOptions:{input:{main:t.join(c,"index.html"),templates:t.join(c,"templates/index.js")}}},...s.lib&&n==="build"&&{minify:!1,lib:{entry:t.join(c,"core/client/asWebComponent.js"),fileName:(o,i)=>i==="asWebComponent"?"eo-dash.js":"templates.js",cssFileName:"eo-dash",formats:["es"],name:"@eodash/eodash"},rollupOptions:{input:{asWebComponent:t.join(c,"core/client/asWebComponent.js"),templates:t.join(c,"templates/index.js")},external:o=>{const i=o.includes("vuetify")||o.endsWith(".css")||o.endsWith("styles"),a=z.some(u=>o.startsWith(u));return!i&&a||o==="user:config"&&!m},treeshake:{moduleSideEffects:!0,preset:"smallest"}}}}}}),N=C(async e=>s.vite?O(await _(e),s.vite):_(e));async function ee(e){const n=[f,t.join(D,"**/*.vue")];m&&n.push(m),e.watcher.add(n);let r="";const o=j.info;return j.info=(i,a)=>{if(i.includes("core")){const p=i.split("/")[0].split(" ");p.pop();const u=p.join(" ")+" "+r.replace(l,"");return o(u,a)}return o(i,a)},e.watcher.on("change",async i=>{r=i,i===f&&e.ws.send({type:"full-reload",path:i})}),()=>{e.middlewares.use(async(i,a,p)=>{if(i.originalUrl==="/@fs/config.js"||i.originalUrl==="/config.js"){a.statusCode=200,a.setHeader("Content-Type","text/javascript"),v(f)&&await I(f).then(u=>{a.write(u)}),a.end();return}if(i.url?.endsWith(".html")){a.statusCode=200,a.setHeader("Content-Type","text/html");const u=await e.transformIndexHtml(i.url,k,i.originalUrl);a.end(u);return}p()})}}function te(e){G({quiet:!0});const n={};for(const r in process.env)e.some(o=>r.startsWith(o))&&(n["process.env."+r]=`"${process.env[r]}"`);return n}const oe=async()=>{const e=await A(await N({mode:"development",command:"serve"}));await e.listen(),e.printUrls(),e.bindCLIShortcuts({print:!0})},ie=async()=>{const e=async()=>{const n=await N({mode:"production",command:"build"});await L(n),v(f)&&await V(f,t.join(w,"config.js"),{recursive:!0}).catch(r=>{console.error(r)})};if(s.lib)await e();else{const n=t.join(c,"/index.html");await T(n,k).then(async()=>{await e(),await R(n).catch(()=>{console.error("failed to remove index.html")})})}};async function se(){(await U({root:l,base:s.base??"",preview:{port:isNaN(s.port)?8080:s.port,open:s.open,host:s.host},build:{outDir:w}})).printUrls()}const ne=process.argv?.[2];(async()=>{switch(ne){case"dev":await oe();break;case"build":await ie();break;case"preview":await se();break;default:console.error("command not found");break}})();
30
+ styles: ${r},`)),{code:p,map:null}}},generateBundle(o,i){let a="",p=[];const u=[];for(const d in i){const h=i[d];if(h.type==="chunk"&&h.code.includes(r)){a=d;break}}for(const d in i){const h=i[d];if(q(d)&&h.type==="asset"){let g=h.source.toString();g=g.replaceAll(":root",":host"),p.push(g),u.push(d)}}i[a].code=i[a].code.replace(r,JSON.stringify(p)),u.forEach(d=>{delete i[d]})}}}function q(e){return/\.(css|less|sass|scss|styl|stylus|pcss|postcss|sss)(?:$|\?)/.test(e)}const _=C(async({mode:e,command:n})=>{const r=["VITE_","EODASH_"];return{base:s.base??"",cacheDir:Q,plugins:[J({features:{customElement:n==="build"&&s.lib},template:{transformAssetUrls:B,compilerOptions:{isCustomElement:o=>!o.includes("v-")&&o.includes("-")}}}),M({autoImport:!0}),e==="development"&&{name:"inject-html",configureServer:ee},s.lib&&Z()],customLogger:j,define:{__userConfigExist__:!!m,...n==="build"&&s.lib?{"process.env":"import.meta.env"}:{"process.env":{},...te(r)}},envPrefix:r,resolve:{alias:{"@":t.join(c,"core/client"),"^":t.join(c,"widgets"),"user:widgets":D,...m&&{"user:config":m}},extensions:[".js",".json",".jsx",".mjs",".ts",".tsx",".vue"]},server:{allowedHosts:!0,warmup:{clientFiles:[t.join(c,"core/client/**"),m]},port:s.port??3e3,open:s.open,fs:{allow:[W(process.cwd())]},host:s.host},root:c,...e==="development"&&{optimizeDeps:{include:["webfontloader","vuetify","vue","pinia","stac-js","urijs","loglevel","vega","vega-lite","vega-embed","@eox/map","@eox/map/src/plugins/advancedLayersAndSources","@eox/layercontrol","@eox/drawtools","@eox/chart","@eox/jsonform","@eox/layout","@eox/itemfilter","@eox/timecontrol","@eox/stacinfo","color-legend-element","@eox/map","@eox/map/src/plugins/advancedLayersAndSources","@eox/map/src/plugins/globe","@eox/layercontrol","@eox/timecontrol","@eox/jsonform","@eox/layout","@eox/itemfilter","@eox/stacinfo","@eox/elements-utils","@eox/geosearch","@eox/timeslider"],noDiscovery:!0}},publicDir:s.publicDir===!1?!1:K,build:{outDir:w,emptyOutDir:!0,target:"esnext",cssMinify:!0,...!s.lib&&n==="build"&&{manifest:!0,rollupOptions:{input:{main:t.join(c,"index.html"),templates:t.join(c,"templates/index.js")}}},...s.lib&&n==="build"&&{minify:!1,lib:{entry:t.join(c,"core/client/asWebComponent.js"),fileName:(o,i)=>i==="asWebComponent"?"eo-dash.js":"templates.js",cssFileName:"eo-dash",formats:["es"],name:"@eodash/eodash"},rollupOptions:{input:{asWebComponent:t.join(c,"core/client/asWebComponent.js"),templates:t.join(c,"templates/index.js")},external:o=>{const i=o.includes("vuetify")||o.endsWith(".css")||o.endsWith("styles"),a=z.some(u=>o.startsWith(u));return!i&&a||o==="user:config"&&!m},treeshake:{moduleSideEffects:!0,preset:"smallest"}}}}}}),N=C(async e=>s.vite?O(await _(e),s.vite):_(e));async function ee(e){const n=[f,t.join(D,"**/*.vue")];m&&n.push(m),e.watcher.add(n);let r="";const o=j.info;return j.info=(i,a)=>{if(i.includes("core")){const p=i.split("/")[0].split(" ");p.pop();const u=p.join(" ")+" "+r.replace(l,"");return o(u,a)}return o(i,a)},e.watcher.on("change",async i=>{r=i,i===f&&e.ws.send({type:"full-reload",path:i})}),()=>{e.middlewares.use(async(i,a,p)=>{if(i.originalUrl==="/@fs/config.js"||i.originalUrl==="/config.js"){a.statusCode=200,a.setHeader("Content-Type","text/javascript"),v(f)&&await I(f).then(u=>{a.write(u)}),a.end();return}if(i.url?.endsWith(".html")){a.statusCode=200,a.setHeader("Content-Type","text/html");const u=await e.transformIndexHtml(i.url,k,i.originalUrl);a.end(u);return}p()})}}function te(e){G({quiet:!0});const n={};for(const r in process.env)e.some(o=>r.startsWith(o))&&(n["process.env."+r]=`"${process.env[r]}"`);return n}const oe=async()=>{const e=await A(await N({mode:"development",command:"serve"}));await e.listen(),e.printUrls(),e.bindCLIShortcuts({print:!0})},ie=async()=>{const e=async()=>{const n=await N({mode:"production",command:"build"});await L(n),v(f)&&await V(f,t.join(w,"config.js"),{recursive:!0}).catch(r=>{console.error(r)})};if(s.lib)await e();else{const n=t.join(c,"/index.html");await T(n,k).then(async()=>{await e(),await R(n).catch(()=>{console.error("failed to remove index.html")})})}};async function se(){(await U({root:l,base:s.base??"",preview:{port:isNaN(s.port)?8080:s.port,open:s.open,host:s.host},build:{outDir:w}})).printUrls()}const ne=process.argv?.[2];(async()=>{switch(ne){case"dev":await oe();break;case"build":await ie();break;case"preview":await se();break;default:console.error("command not found");break}})();
@@ -1,7 +1,17 @@
1
- declare const _default: import("vue").DefineComponent<{}, {
2
- config?: string | Function | undefined;
3
- $props: {
4
- readonly config?: string | Function | undefined;
5
- };
6
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
1
+ declare const _default: typeof __VLS_export;
7
2
  export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ config: {
5
+ type: (StringConstructor | FunctionConstructor)[];
6
+ required: false;
7
+ default: undefined;
8
+ };
9
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
10
+ config: {
11
+ type: (StringConstructor | FunctionConstructor)[];
12
+ required: false;
13
+ default: undefined;
14
+ };
15
+ }>> & Readonly<{}>, {
16
+ config: string | Function;
17
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;