@eodash/eodash 5.2.0 → 5.3.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 (119) hide show
  1. package/core/client/components/DashboardLayout.vue +0 -1
  2. package/core/client/composables/index.js +53 -59
  3. package/core/client/eodashSTAC/EodashCollection.js +196 -94
  4. package/core/client/eodashSTAC/auth.js +86 -0
  5. package/core/client/eodashSTAC/createLayers.js +204 -4
  6. package/core/client/eodashSTAC/helpers.js +254 -62
  7. package/core/client/eodashSTAC/parquet.js +0 -13
  8. package/core/client/eodashSTAC/triggers.js +1 -1
  9. package/core/client/store/actions.js +14 -0
  10. package/core/client/store/stac.js +46 -8
  11. package/core/client/store/states.js +6 -0
  12. package/core/client/types.ts +206 -3
  13. package/core/client/utils/bands-editor/arithmetic.js +144 -0
  14. package/core/client/utils/bands-editor/colors.js +36 -0
  15. package/core/client/utils/bands-editor/dom.js +196 -0
  16. package/core/client/utils/bands-editor/exampleSchema.json +1320 -0
  17. package/core/client/utils/bands-editor/index.js +68 -0
  18. package/core/client/utils/bands-editor/rgb.js +102 -0
  19. package/core/client/utils/index.js +5 -2
  20. package/core/client/views/Dashboard.vue +1 -1
  21. package/core/client/vite-env.d.ts +122 -0
  22. package/dist/client/{DashboardLayout-Dq9Kfe6O.js → DashboardLayout-BAstYnhU.js} +4 -5
  23. package/dist/client/{DynamicWebComponent-DCBMXskE.js → DynamicWebComponent-7v4_DFqP.js} +1 -1
  24. package/dist/client/{EodashDatePicker-DtngxU6s.js → EodashDatePicker-IVHLv9UN.js} +20 -22
  25. package/dist/client/{EodashItemFilter-ClQebJQt.js → EodashItemFilter-BPMpnXjo.js} +46 -31
  26. package/dist/client/EodashLayerControl-CSnQh2tb.js +1517 -0
  27. package/dist/client/{EodashLayoutSwitcher-DQ8SfVDd.js → EodashLayoutSwitcher-CPpGM8Pb.js} +4 -4
  28. package/dist/client/EodashMapBtns-C_jyUJ2x.js +301 -0
  29. package/dist/client/{EodashStacInfo-Dt1nF06x.js → EodashStacInfo-DjuWc0Iz.js} +1 -1
  30. package/dist/client/EodashTimeSlider-CDh9Lf02.js +53 -0
  31. package/dist/client/{EodashTools-DV5ykmWc.js → EodashTools-DSvDUUlL.js} +10 -7
  32. package/dist/client/{ExportState-B6zZQUmE.js → ExportState-BhjxS0jG.js} +145 -120
  33. package/dist/client/{Footer-DNhXs8k6.js → Footer-C3PPcdjv.js} +1 -1
  34. package/dist/client/{Header-BjhN5JY4.js → Header-E5NbT7HE.js} +2 -2
  35. package/dist/client/MobileLayout-DY7OHr1k.js +118 -0
  36. package/dist/client/{PopUp-CgpvNr3o.js → PopUp-CSPXdqKI.js} +79 -43
  37. package/dist/client/{ProcessList-vecpxThi.js → ProcessList-C3HV7G0b.js} +5 -6
  38. package/dist/client/{VImg-CETuikH2.js → VImg-FoXcOnWF.js} +6 -3
  39. package/dist/client/{VMain-Ci9DyaGU.js → VMain-Ck2g1QOG.js} +1 -1
  40. package/dist/client/{VTooltip-J4ac48X7.js → VTooltip-F_1Zcvhp.js} +2 -2
  41. package/dist/client/{WidgetsContainer-CCML4TyV.js → WidgetsContainer-Cq9uZEuN.js} +1 -1
  42. package/dist/client/asWebComponent-DZeEbWG0.js +8895 -0
  43. package/dist/client/{async-B7jIrM53.js → async-Dk79llLt.js} +2 -2
  44. package/dist/client/easing-CH0-9wR8.js +35 -0
  45. package/dist/client/eo-dash.js +1 -1
  46. package/dist/client/{forwardRefs-BQclvjMq.js → forwardRefs-BbvoXHtj.js} +58 -45
  47. package/dist/client/{handling-BS24aG1q.js → handling-DxucYlYh.js} +12 -6
  48. package/dist/client/{helpers-wXK7Ywio.js → helpers-CI_7CUmn.js} +568 -281
  49. package/dist/client/index-BO5uGfUe.js +571 -0
  50. package/dist/client/{index-9KR-G20t.js → index-C13BiO9C.js} +2 -2
  51. package/dist/client/{index-4UCzZi8B.js → index-DcCcdbgR.js} +26 -13
  52. package/dist/client/{index-B2XpdgR6.js → index-KrGHjH-_.js} +63 -36
  53. package/dist/client/templates.js +82 -15
  54. package/dist/client/{transition-yBii4fu6.js → transition-Ctkv90El.js} +1 -1
  55. package/dist/node/cli.js +6 -6
  56. package/dist/types/core/client/eodashSTAC/EodashCollection.d.ts +24 -10
  57. package/dist/types/core/client/eodashSTAC/auth.d.ts +7 -0
  58. package/dist/types/core/client/eodashSTAC/createLayers.d.ts +15 -3
  59. package/dist/types/core/client/eodashSTAC/helpers.d.ts +47 -16
  60. package/dist/types/core/client/plugins/vuetify.d.ts +14 -14
  61. package/dist/types/core/client/store/actions.d.ts +2 -0
  62. package/dist/types/core/client/store/stac.d.ts +16 -7
  63. package/dist/types/core/client/store/states.d.ts +4 -0
  64. package/dist/types/core/client/types.d.ts +170 -2
  65. package/dist/types/core/client/utils/bands-editor/arithmetic.d.ts +8 -0
  66. package/dist/types/core/client/utils/bands-editor/colors.d.ts +15 -0
  67. package/dist/types/core/client/utils/bands-editor/dom.d.ts +42 -0
  68. package/dist/types/core/client/utils/bands-editor/index.d.ts +20 -0
  69. package/dist/types/core/client/utils/bands-editor/rgb.d.ts +15 -0
  70. package/dist/types/core/client/utils/index.d.ts +1 -1
  71. package/dist/types/templates/baseConfig.d.ts +87 -1
  72. package/dist/types/templates/expert.d.ts +6 -6
  73. package/dist/types/templates/explore.d.ts +67 -0
  74. package/dist/types/templates/index.d.ts +1 -1
  75. package/dist/types/templates/{light.d.ts → lite.d.ts} +5 -5
  76. package/dist/types/widgets/EodashItemCatalog/index.vue.d.ts +21 -0
  77. package/dist/types/widgets/EodashItemCatalog/methods/filters.d.ts +49 -0
  78. package/dist/types/widgets/EodashItemCatalog/methods/handlers.d.ts +4 -0
  79. package/dist/types/widgets/EodashItemCatalog/methods/map.d.ts +12 -0
  80. package/dist/types/widgets/EodashItemCatalog/types.d.ts +14 -0
  81. package/dist/types/widgets/EodashMap/EodashMapBtns.vue.d.ts +2 -0
  82. package/dist/types/widgets/EodashMap/index.vue.d.ts +108 -2
  83. package/dist/types/widgets/EodashMap/methods/create-layers-config.d.ts +1 -1
  84. package/dist/types/widgets/EodashMap/methods/index.d.ts +1 -1
  85. package/dist/types/widgets/EodashProcess/methods/custom-endpoints/layers/eoxhub-workspaces-endpoint.d.ts +1 -1
  86. package/dist/types/widgets/EodashTimeSlider.vue.d.ts +7 -0
  87. package/dist/types/widgets/EodashTools.vue.d.ts +10 -10
  88. package/dist/types/widgets/ExportState.vue.d.ts +2 -0
  89. package/package.json +28 -27
  90. package/templates/baseConfig.js +10 -5
  91. package/templates/compare.js +2 -2
  92. package/templates/expert.js +5 -5
  93. package/templates/explore.js +62 -0
  94. package/templates/index.js +1 -1
  95. package/templates/{light.js → lite.js} +1 -1
  96. package/widgets/EodashDatePicker.vue +15 -18
  97. package/widgets/EodashItemCatalog/index.vue +161 -0
  98. package/widgets/EodashItemCatalog/methods/filters.js +216 -0
  99. package/widgets/EodashItemCatalog/methods/handlers.js +50 -0
  100. package/widgets/EodashItemCatalog/methods/map.js +144 -0
  101. package/widgets/EodashItemCatalog/types.ts +15 -0
  102. package/widgets/EodashItemFilter.vue +35 -28
  103. package/widgets/EodashLayerControl.vue +10 -6
  104. package/widgets/EodashLayoutSwitcher.vue +1 -1
  105. package/widgets/EodashMap/EodashMapBtns.vue +18 -9
  106. package/widgets/EodashMap/index.vue +22 -12
  107. package/widgets/EodashMap/methods/create-layers-config.js +9 -6
  108. package/widgets/EodashMap/methods/index.js +27 -13
  109. package/widgets/EodashProcess/index.vue +17 -1
  110. package/widgets/EodashProcess/methods/custom-endpoints/chart/veda-endpoint.js +9 -3
  111. package/widgets/EodashProcess/methods/handling.js +2 -0
  112. package/widgets/EodashProcess/methods/outputs.js +1 -0
  113. package/widgets/EodashTimeSlider.vue +40 -0
  114. package/widgets/EodashTools.vue +7 -3
  115. package/widgets/ExportState.vue +53 -22
  116. package/dist/client/EodashLayerControl-BLBds28C.js +0 -154
  117. package/dist/client/EodashMapBtns-B89_YBDw.js +0 -326
  118. package/dist/client/MobileLayout-JelB6w1G.js +0 -118
  119. package/dist/client/asWebComponent-ZyEzWOOf.js +0 -19092
@@ -1,12 +1,13 @@
1
1
  import { onMounted, onUnmounted, watch, computed, useTemplateRef, ref, toRaw, createElementBlock, openBlock, createElementVNode, createCommentVNode, unref, normalizeStyle, createVNode } from 'vue';
2
2
  import '@eox/map';
3
3
  import '@eox/map/src/plugins/advancedLayersAndSources';
4
- import { K as setMapProjFromCol, B as mapPosition, d as mapEl, I as mapCompareEl, C as indicator, D as compareIndicator, y as datetime } from './helpers-wXK7Ywio.js';
4
+ import { O as setMapProjFromCol, D as mapPosition, L as sanitizeBbox, h as mapEl, M as mapCompareEl, E as indicator, G as compareIndicator, A as datetime } from './helpers-CI_7CUmn.js';
5
5
  import { storeToRefs } from 'pinia';
6
- import { M as EodashCollection, E as useSTAcStore, N as useEmitLayersUpdate, O as isFirstLoad, P as useOnLayersUpdate, _ as _export_sfc, D as useDisplay, L as layerControlFormValue, K as layerControlFormValueCompare, J as eodashCompareCollections, I as eodashCollections } from './asWebComponent-ZyEzWOOf.js';
6
+ import { O as EodashCollection, E as useSTAcStore, P as useEmitLayersUpdate, Q as isFirstLoad, K as useOnLayersUpdate, _ as _export_sfc, D as useDisplay, N as layerControlFormValue, M as layerControlFormValueCompare, J as eodashCompareCollections, I as eodashCollections } from './asWebComponent-DZeEbWG0.js';
7
7
  import log from 'loglevel';
8
- import { i as inAndOut, E as EodashMapBtns } from './EodashMapBtns-B89_YBDw.js';
8
+ import { i as inAndOut } from './easing-CH0-9wR8.js';
9
9
  import mustache from 'mustache';
10
+ import EodashMapBtns from './EodashMapBtns-C_jyUJ2x.js';
10
11
 
11
12
  /**
12
13
  * Creates full layer configuration from indicator and time information
@@ -16,19 +17,19 @@ import mustache from 'mustache';
16
17
  * | null
17
18
  * } selectedIndicator
18
19
  * @param {EodashCollection[]} eodashCols
19
- * @param {string} [updatedTime]
20
+ * @param {string | import("stac-ts").StacItem | null} [timeOrItem] - time as a string, or a stac item
20
21
  */
21
22
 
22
23
  const createLayersConfig = async (
23
24
  selectedIndicator,
24
25
  eodashCols,
25
- updatedTime,
26
+ timeOrItem,
26
27
  ) => {
27
28
  log.debug(
28
29
  "Creating layers config",
29
30
  selectedIndicator,
30
31
  eodashCols,
31
- updatedTime,
32
+ timeOrItem,
32
33
  );
33
34
  const layersCollection = [];
34
35
  const dataLayers = {
@@ -42,11 +43,14 @@ const createLayersConfig = async (
42
43
  };
43
44
 
44
45
  for (const ec of eodashCols) {
46
+ /** @type {Record<string,any>[]} */
45
47
  let layers;
46
- if (updatedTime) {
47
- layers = await ec.createLayersJson(new Date(updatedTime));
48
+ if (timeOrItem) {
49
+ const dateOrItem =
50
+ typeof timeOrItem === "string" ? new Date(timeOrItem) : timeOrItem;
51
+ layers = await ec.createLayersJson(dateOrItem);
48
52
  } else {
49
- layers = await ec.createLayersJson();
53
+ layers = await ec.createLayersJson(undefined);
50
54
  }
51
55
  // Add expand to all analysis layers
52
56
  layers.forEach((dl) => {
@@ -209,6 +213,7 @@ const useHandleMapMoveEnd = (mapElement, mapPosition) => {
209
213
  * @param {import("vue").Ref<Record<string,any>[]>} mapLayers
210
214
  * @param {import("vue").Ref<import("@eox/map").EOxMap| null>} partnerMap
211
215
  * @param {boolean} zoomToExtent
216
+ * @param {import("vue").Ref<import("stac-ts").StacItem | import("stac-ts").StacLink | null>} [selectedItem]
212
217
  */
213
218
  const useInitMap = (
214
219
  mapElement,
@@ -218,6 +223,7 @@ const useInitMap = (
218
223
  mapLayers,
219
224
  partnerMap,
220
225
  zoomToExtent,
226
+ selectedItem,
221
227
  ) => {
222
228
  log.debug(
223
229
  "InitMap",
@@ -226,10 +232,22 @@ const useInitMap = (
226
232
  eodashCols.values,
227
233
  datetime.value,
228
234
  );
229
-
235
+ // watch selectedItem if provided
236
+ const watching = selectedItem
237
+ ? [selectedIndicator, datetime, selectedItem]
238
+ : [selectedIndicator, datetime];
230
239
  const stopIndicatorWatcher = watch(
231
- [selectedIndicator, datetime],
232
- async ([updatedStac, updatedTime], [previousStac, previousTime]) => {
240
+ watching,
241
+ async (updated, previous) => {
242
+ const [updatedStac, updatedTime, updatedItem] =
243
+ /** @type {[import("stac-ts").StacCollection, string, import("stac-ts").StacItem | null]} */ (
244
+ selectedItem ? updated : [updated[0], updated[1], null]
245
+ );
246
+ const [previousStac, previousTime, previousItem] =
247
+ /** @type {[import("stac-ts").StacCollection, string, import("stac-ts").StacItem]} */ (
248
+ selectedItem ? previous : [previous[0], previous[1], null]
249
+ );
250
+
233
251
  if (updatedStac) {
234
252
  log.debug(
235
253
  "Selected Indicator watch triggered",
@@ -249,7 +267,9 @@ const useInitMap = (
249
267
  let layersCollection = [];
250
268
 
251
269
  const onlyTimeChanged =
252
- updatedStac?.id === previousStac?.id && updatedTime !== previousTime;
270
+ updatedStac?.id === previousStac?.id &&
271
+ (updatedTime !== previousTime ||
272
+ (updatedItem && updatedItem?.id !== previousItem?.id));
253
273
 
254
274
  const { selectedCompareStac } = storeToRefs(useSTAcStore());
255
275
  if (mapElement?.value?.id === "main") {
@@ -266,12 +286,12 @@ const useInitMap = (
266
286
  }
267
287
  }
268
288
 
269
- // We re-crate the configuration if time changed
289
+ // We re-create the configuration if time changed
270
290
  if (onlyTimeChanged) {
271
291
  layersCollection = await createLayersConfig(
272
292
  updatedStac,
273
293
  eodashCols,
274
- updatedTime,
294
+ updatedItem ?? updatedTime,
275
295
  );
276
296
  log.debug(
277
297
  "Assigned layers after changing time only",
@@ -293,7 +313,7 @@ const useInitMap = (
293
313
  layersCollection = await createLayersConfig(
294
314
  updatedStac,
295
315
  eodashCols,
296
- datetime.value,
316
+ selectedItem ? updatedItem : updatedTime,
297
317
  );
298
318
 
299
319
  // We try to set the current time selection to latest extent date
@@ -308,6 +328,7 @@ const useInitMap = (
308
328
  );
309
329
  }
310
330
  if (
331
+ !updatedItem &&
311
332
  endInterval !== null &&
312
333
  endInterval.toISOString() !== datetime.value &&
313
334
  !isFirstLoad.value
@@ -319,6 +340,7 @@ const useInitMap = (
319
340
  // Try to move map view to extent only when main
320
341
  // indicator and map changes
321
342
  if (
343
+ !updatedItem &&
322
344
  mapElement?.value?.id === "main" &&
323
345
  updatedStac.extent?.spatial.bbox &&
324
346
  !(
@@ -329,12 +351,7 @@ const useInitMap = (
329
351
  ) {
330
352
  // Sanitize extent,
331
353
  const b = updatedStac.extent?.spatial.bbox[0];
332
- const sanitizedExtent = [
333
- b?.[0] > -180 ? b?.[0] : -180,
334
- b?.[1] > -90 ? b?.[1] : -90,
335
- b?.[2] < 180 ? b?.[2] : 180,
336
- b?.[3] < 90 ? b?.[3] : 90,
337
- ];
354
+ const sanitizedExtent = sanitizeBbox([...b]);
338
355
 
339
356
  const reprojExtent = mapElement.value?.transformExtent(
340
357
  sanitizedExtent,
@@ -390,7 +407,7 @@ const useUpdateTooltipProperties = (eodashCols, tooltipProperties) => {
390
407
  });
391
408
  };
392
409
 
393
- const _style_0 = "#cursor-coordinates[data-v-8d648956]{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-8d648956]{display:none}}#scale-line[data-v-8d648956]{position:fixed;left:24px;bottom:28px;color:#fff}@media (max-width: 959px){#scale-line[data-v-8d648956]{bottom:102px}}[data-v-8d648956] .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-8d648956] .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-8d648956]{position:fixed;top:0;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-8d648956]>*{pointer-events:auto}";
410
+ const _style_0 = "#cursor-coordinates[data-v-9484a41e]{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-9484a41e]{display:none}}#scale-line[data-v-9484a41e]{position:fixed;left:24px;bottom:28px;color:#fff}@media (max-width: 959px){#scale-line[data-v-9484a41e]{bottom:102px}}[data-v-9484a41e] .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-9484a41e] .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-9484a41e]{position:fixed;top:0;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-9484a41e]>*{pointer-events:auto}";
394
411
 
395
412
  const _hoisted_1 = [".enabled"];
396
413
  const _hoisted_2 = [".center", ".zoom", ".layers", ".controls"];
@@ -447,6 +464,18 @@ const _sfc_main = {
447
464
  }),
448
465
  },
449
466
  btns: {
467
+ /** @type {import("vue").PropType<{
468
+ * enableExportMap?: boolean;
469
+ * enableChangeProjection?: boolean;
470
+ * enableBackToPOIs?: boolean;
471
+ * enableSearch?: boolean;
472
+ * enableZoom?: boolean;
473
+ * enableCompareIndicators?: boolean | {
474
+ * compareTemplate?:string;
475
+ * fallbackTemplate?:string;
476
+ * itemFilterConfig?:InstanceType<import("../EodashItemFilter.vue").default>["$props"]
477
+ * };
478
+ * }> }*/
450
479
  type: Object,
451
480
  default: () => ({
452
481
  enableExportMap: true,
@@ -588,7 +617,8 @@ const showCompare = computed(() =>
588
617
  useHandleMapMoveEnd(eoxMap, mapPosition);
589
618
 
590
619
  onMounted(() => {
591
- const { selectedCompareStac, selectedStac } = storeToRefs(useSTAcStore());
620
+ const { selectedCompareStac, selectedStac, selectedItem } =
621
+ storeToRefs(useSTAcStore());
592
622
  // assign map Element state to eox map
593
623
  mapEl.value = eoxMap.value;
594
624
 
@@ -618,6 +648,7 @@ onMounted(() => {
618
648
  eoxMapLayers,
619
649
  compareMap,
620
650
  props.zoomToExtent,
651
+ selectedItem,
621
652
  );
622
653
  });
623
654
 
@@ -717,26 +748,22 @@ return (_ctx, _cache) => {
717
748
  class: "map-buttons-container",
718
749
  style: normalizeStyle(`margin: ${__props.btnsPosition.gap}px 0 ${__props.btnsPosition.gap}px 0`)
719
750
  }, [
751
+ createCommentVNode(" prettier-ignore "),
720
752
  createVNode(EodashMapBtns, {
721
753
  style: normalizeStyle({
722
- gridColumn: unref(indicator) || unref(compareIndicator) ? responsiveX.value : '12',
754
+ gridColumn: (unref(indicator) || unref(compareIndicator)) ? responsiveX.value : '12',
723
755
  gridRow: responsiveY.value,
724
756
  }),
725
757
  exportMap: (unref(indicator) || unref(compareIndicator)) ? btnsProps.value.exportMap : false,
726
- changeProjection:
727
- (unref(indicator) || unref(compareIndicator)) ? btnsProps.value.changeProjection : false
758
+ changeProjection: (unref(indicator) || unref(compareIndicator)) ? btnsProps.value.changeProjection : false
728
759
  ,
729
- compareIndicators:
730
- (unref(indicator) || unref(compareIndicator)) ? btnsProps.value.compareIndicators : false
760
+ compareIndicators: (unref(indicator) || unref(compareIndicator)) ? btnsProps.value.compareIndicators : false
731
761
  ,
732
- backToPOIs:
733
- (unref(indicator) || unref(compareIndicator)) ? btnsProps.value.backToPOIs : false
762
+ backToPOIs: (unref(indicator) || unref(compareIndicator)) ? btnsProps.value.backToPOIs : false
734
763
  ,
735
- enableSearch:
736
- (unref(indicator) || unref(compareIndicator)) ? btnsProps.value.enableSearch : false
764
+ enableSearch: (unref(indicator) || unref(compareIndicator)) ? btnsProps.value.enableSearch : false
737
765
  ,
738
- enableZoom:
739
- (unref(indicator) || unref(compareIndicator)) ? btnsProps.value.enableZoom : false
766
+ enableZoom: (unref(indicator) || unref(compareIndicator)) ? btnsProps.value.enableZoom : false
740
767
 
741
768
  }, null, 8 /* PROPS */, ["style", "exportMap", "changeProjection", "compareIndicators", "backToPOIs", "enableSearch", "enableZoom"])
742
769
  ], 4 /* STYLE */)
@@ -745,6 +772,6 @@ return (_ctx, _cache) => {
745
772
  }
746
773
 
747
774
  };
748
- const index = /*#__PURE__*/_export_sfc(_sfc_main, [['styles',[_style_0]],['__scopeId',"data-v-8d648956"]]);
775
+ const index = /*#__PURE__*/_export_sfc(_sfc_main, [['styles',[_style_0]],['__scopeId',"data-v-9484a41e"]]);
749
776
 
750
777
  export { index as default };
@@ -1,5 +1,5 @@
1
1
  import { mdiViewDashboardVariant, mdiViewDashboard } from '@mdi/js';
2
- import { H as includesProcess } from './helpers-wXK7Ywio.js';
2
+ import { K as includesProcess } from './helpers-CI_7CUmn.js';
3
3
 
4
4
  /**
5
5
  * Special values that tell deepmerge to perform a certain action.
@@ -375,7 +375,7 @@ function mergeOthersInto(mut_target, values, utils, meta) {
375
375
  }
376
376
 
377
377
  /** @type {import("@/types").Template} */
378
- const light = {
378
+ const lite = {
379
379
  gap: 16,
380
380
  loading: {
381
381
  id: Symbol(),
@@ -416,7 +416,7 @@ const light = {
416
416
  id: "tools-light",
417
417
  type: "internal",
418
418
  title: "Tools",
419
- layout: { x: 0, y: 0, w: "3/3/2", h: 1 },
419
+ layout: { x: 0, y: 0, w: "3/3/2", h: 2 },
420
420
  widget: {
421
421
  name: "EodashTools",
422
422
  properties: {
@@ -515,7 +515,7 @@ const light = {
515
515
  /** @type {import("@/types").Template} */
516
516
  const expert = {
517
517
  loading: {
518
- id: Symbol(),
518
+ id: "loading",
519
519
  type: "web-component",
520
520
  widget: {
521
521
  // https://uiball.com/ldrs/
@@ -550,8 +550,8 @@ const expert = {
550
550
  btnsPosition: {
551
551
  x: "12/9/9",
552
552
  y: 1,
553
- gap: 16
554
- }
553
+ gap: 16,
554
+ },
555
555
  },
556
556
  },
557
557
  },
@@ -560,11 +560,11 @@ const expert = {
560
560
  id: "Tools",
561
561
  type: "internal",
562
562
  title: "Tools",
563
- layout: { x: 0, y: 0, w: "3/3/2", h: 1 },
563
+ layout: { x: 0, y: 0, w: "3/3/2", h: 2 },
564
564
  widget: {
565
565
  name: "EodashTools",
566
566
  properties: {
567
- layoutTarget: "light",
567
+ layoutTarget: "lite",
568
568
  layoutIcon: mdiViewDashboard,
569
569
  itemFilterConfig: {
570
570
  resultType: "cards",
@@ -667,7 +667,7 @@ const compare = {
667
667
  id: "Tools",
668
668
  type: "internal",
669
669
  title: "Tools",
670
- layout: { x: 0, y: 0, w: "3/3/2", h: 1 },
670
+ layout: { x: 0, y: 0, w: "3/3/2", h: 2 },
671
671
  widget: {
672
672
  name: "EodashTools",
673
673
  properties: {
@@ -687,7 +687,7 @@ const compare = {
687
687
  id: "CompareTools",
688
688
  type: "internal",
689
689
  title: "Tools",
690
- layout: { x: "9/9/10", y: 0, w: "3/3/2", h: 1 },
690
+ layout: { x: "9/9/10", y: 0, w: "3/3/2", h: 2 },
691
691
  widget: {
692
692
  name: "EodashTools",
693
693
  properties: {
@@ -775,14 +775,80 @@ const compare = {
775
775
  ],
776
776
  };
777
777
 
778
+ // import { includesProcess } from "@/store/actions";
779
+ /** @type {import("@/types").Template} */
780
+ const explore = {
781
+ gap: 16,
782
+ loading: {
783
+ id: "loading",
784
+ type: "web-component",
785
+ widget: {
786
+ // https://uiball.com/ldrs/
787
+ link: "https://cdn.jsdelivr.net/npm/ldrs/dist/auto/mirage.js",
788
+ tagName: "l-mirage",
789
+ properties: {
790
+ class: "align-self-center justify-self-center",
791
+ size: "120",
792
+ speed: "2.5",
793
+ color: "#004170",
794
+ },
795
+ },
796
+ },
797
+ background: {
798
+ id: "background-map",
799
+ type: "internal",
800
+ widget: {
801
+ name: "EodashMap",
802
+ properties: {
803
+ enableCompare: true,
804
+ btns: {
805
+ enableZoom: true,
806
+ enableExportMap: true,
807
+ enableChangeProjection: true,
808
+ enableCompareIndicators: {
809
+ fallbackTemplate: "explore",
810
+ itemFilterConfig: {
811
+ imageProperty: "assets.thumbnail.href",
812
+ },
813
+ },
814
+ enableSearch: true,
815
+ },
816
+ },
817
+ },
818
+ },
819
+ widgets: [
820
+ {
821
+ id: "Layercontrol",
822
+ type: "internal",
823
+ title: "Layers",
824
+ layout: { x: "9/9/10", y: 0, w: "3/3/2", h: 12 },
825
+ widget: {
826
+ name: "EodashLayerControl",
827
+ },
828
+ },
829
+ {
830
+ id: "ItemCatalog",
831
+ title: "Catalog",
832
+ type: "internal",
833
+ layout: { x: 0, y: 0, w: "3/3/2", h: 12 },
834
+ widget: {
835
+ name: "EodashItemCatalog",
836
+ },
837
+ },
838
+ ],
839
+ };
840
+
778
841
  /** @type {import("@/types").Eodash} */
779
842
  const baseConfig = {
780
843
  id: "demo",
781
844
  options: {
782
845
  // useSubCode: true,
783
846
  },
784
- stacEndpoint:
785
- "https://esa-eodashboards.github.io/eodashboard-catalog/trilateral/catalog.json",
847
+ stacEndpoint: {
848
+ endpoint:
849
+ "https://esa-eodashboards.github.io/eodashboard-catalog/trilateral/catalog.json",
850
+ api: false,
851
+ },
786
852
  brand: {
787
853
  noLayout: true,
788
854
  name: "Demo",
@@ -822,14 +888,15 @@ const baseConfig = {
822
888
  footerText: "Demo configuration of eodash client",
823
889
  },
824
890
  templates: {
825
- light,
891
+ lite,
826
892
  expert,
827
893
  compare,
894
+ explore,
828
895
  },
829
896
  };
830
897
 
831
898
  /**
832
- * @param {Partial<import("@/types").Eodash>} config
899
+ * @param {import("vega-lite").DeepPartial<import("@/types").Eodash>} config
833
900
  */
834
901
  const getBaseConfig = (config) => {
835
902
  const merged = /** @type {import("@/types").Eodash} */ ({});
@@ -837,4 +904,4 @@ const getBaseConfig = (config) => {
837
904
  return merged;
838
905
  };
839
906
 
840
- export { compare, getBaseConfig as default, expert, getBaseConfig, light };
907
+ export { compare, getBaseConfig as default, expert, getBaseConfig, lite };
@@ -1,5 +1,5 @@
1
1
  import { mergeProps, h, TransitionGroup, Transition } from 'vue';
2
- import { p as propsFactory, X as isObject, aD as onlyDefinedProps } from './asWebComponent-ZyEzWOOf.js';
2
+ import { p as propsFactory, Y as isObject, aG as onlyDefinedProps } from './asWebComponent-DZeEbWG0.js';
3
3
 
4
4
  // Utilities
5
5
  const makeTransitionProps = propsFactory({
package/dist/node/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import{createLogger as F,defineConfig as C,searchForWorkspaceRoot as W,mergeConfig as U,preview as A,createServer as O,build as L}from"vite";import{readFileSync as P,existsSync as v}from"fs";import s from"path";import{Command as $}from"commander";import{fileURLToPath as H}from"url";import{readFile as I,writeFile as T,rm as R,cp as V}from"fs/promises";import J from"@vitejs/plugin-vue";import M,{transformAssetUrls as B}from"vite-plugin-vuetify";import{config as G}from"dotenv";const y=new $("eodash"),u=x(),c=x(process.cwd());JSON.parse(P(s.join(c,"package.json"),"utf-8"));const S=JSON.parse(P(s.join(u,"package.json"),"utf-8"))??{},Y=["commander","vite","@vitejs/plugin-vue","vite-plugin-vuetify","axios","dotenv"],z=Object.keys(S?.dependencies).filter(e=>!Y.includes(e));y.version(S.version,"-v, --version","output the current version"),y.allowExcessArguments().option("--publicDir <path>","path to statically served assets folder").option("--no-publicDir","stop serving static assets").option("--outDir <path>","minified output folder").option("-e, --entryPoint <path>","file exporting `createEodash`").option("-w, --widgets <path>","folder that contains vue components as internal widgets").option("--cacheDir <path>","cache folder").option("-r, --runtime <path>","file exporting eodash client runtime config").option("-b, --base <path>","base public path").option("-p, --port <port>","serving port").option("-o, --open","open default browser when the server starts").option("-c, --config <path>","path to eodash server and build configuration file").option("--host [IP address]","specify which IP addresses the server should listen on").option("-l, --lib","builds eodash as a web component library").option("--no-lib","builds eodash as an SPA").option("--no-host","do not expose server to the network").parse(process.argv);const i=await X(y.opts(),process.argv?.[2]),K=i.publicDir?s.resolve(c,i.publicDir):s.join(c,"./public"),b=s.join(c,"/src"),f=i.runtime?s.resolve(c,i.runtime):s.join(b,"./runtime.js"),m=i.entryPoint==="false"?!1:i.entryPoint?s.resolve(c,i.entryPoint):s.join(b,"/main.js"),D=i.widgets?s.resolve(c,i.widgets):s.join(b,"widgets"),E=s.join(c,"/.eodash"),w=i.outDir?s.resolve(c,i.outDir):s.join(E,"/dist"),Q=i.cacheDir?s.resolve(c,i.cacheDir):s.join(E,"cache"),j=F(void 0,{prefix:"[eodash]"});async function X(e,n){let r=e.config?s.resolve(c,e.config):s.join(c,"eodash.config.js"),t={};return v(r)?t=await import(r).then(o=>o.default instanceof Function?o.default():o.default).catch(o=>{console.error(o)}):r=null,{base:e.base??t?.base,port:Number(e.port??t?.[n]?.port),host:e.host??t?.[n]?.host,open:e.open??t?.[n]?.open,cacheDir:e.cacheDir??t?.cacheDir,entryPoint:e.entryPoint??t?.entryPoint,outDir:e.outDir??t?.outDir,publicDir:e.publicDir??t?.publicDir,runtime:e.runtime??t?.runtime,widgets:e.widgets??t?.widgets,lib:e.lib??t?.lib,vite:t.vite}}function x(e=import.meta.dirname??s.dirname(H(import.meta.url))){if(e?.split("/").length)return v(s.resolve(e,"package.json"))?e:x(s.resolve(e,".."));throw new Error("no package root found from "+e)}const k=`
2
+ import{createLogger as F,defineConfig as C,searchForWorkspaceRoot as W,mergeConfig as O,preview as U,createServer as A,build as L}from"vite";import{readFileSync as P,existsSync as v}from"fs";import t from"path";import{Command as $}from"commander";import{fileURLToPath as H}from"url";import{readFile as I,writeFile as T,rm as R,cp as V}from"fs/promises";import J from"@vitejs/plugin-vue";import M,{transformAssetUrls as B}from"vite-plugin-vuetify";import{config as G}from"dotenv";const y=new $("eodash"),c=x(),l=x(process.cwd());JSON.parse(P(t.join(l,"package.json"),"utf-8"));const S=JSON.parse(P(t.join(c,"package.json"),"utf-8"))??{},Y=["commander","vite","@vitejs/plugin-vue","vite-plugin-vuetify","axios","dotenv"],z=Object.keys(S?.dependencies).filter(e=>!Y.includes(e));y.version(S.version,"-v, --version","output the current version"),y.allowExcessArguments().option("--publicDir <path>","path to statically served assets folder").option("--no-publicDir","stop serving static assets").option("--outDir <path>","minified output folder").option("-e, --entryPoint <path>","file exporting `createEodash`").option("-w, --widgets <path>","folder that contains vue components as internal widgets").option("--cacheDir <path>","cache folder").option("-r, --runtime <path>","file exporting eodash client runtime config").option("-b, --base <path>","base public path").option("-p, --port <port>","serving port").option("-o, --open","open default browser when the server starts").option("-c, --config <path>","path to eodash server and build configuration file").option("--host [IP address]","specify which IP addresses the server should listen on").option("-l, --lib","builds eodash as a web component library").option("--no-lib","builds eodash as an SPA").option("--no-host","do not expose server to the network").parse(process.argv);const s=await X(y.opts(),process.argv?.[2]),K=s.publicDir?t.resolve(l,s.publicDir):t.join(l,"./public"),b=t.join(l,"/src"),f=s.runtime?t.resolve(l,s.runtime):t.join(b,"./runtime.js"),m=s.entryPoint==="false"?!1:s.entryPoint?t.resolve(l,s.entryPoint):t.join(b,"/main.js"),D=s.widgets?t.resolve(l,s.widgets):t.join(b,"widgets"),E=t.join(l,"/.eodash"),w=s.outDir?t.resolve(l,s.outDir):t.join(E,"/dist"),Q=s.cacheDir?t.resolve(l,s.cacheDir):t.join(E,"cache"),j=F(void 0,{prefix:"[eodash]"});async function X(e,n){let r=e.config?t.resolve(l,e.config):t.join(l,"eodash.config.js"),o={};return v(r)?o=await import(r).then(i=>i.default instanceof Function?i.default():i.default).catch(i=>{console.error(i)}):r=null,{base:e.base??o?.base,port:Number(e.port??o?.[n]?.port),host:e.host??o?.[n]?.host,open:e.open??o?.[n]?.open,cacheDir:e.cacheDir??o?.cacheDir,entryPoint:e.entryPoint??o?.entryPoint,outDir:e.outDir??o?.outDir,publicDir:e.publicDir??o?.publicDir,runtime:e.runtime??o?.runtime,widgets:e.widgets??o?.widgets,lib:e.lib??o?.lib,vite:o.vite}}function x(e=import.meta.dirname??t.dirname(H(import.meta.url))){if(e?.split("/").length)return v(t.resolve(e,"package.json"))?e:x(t.resolve(e,".."));throw new Error("no package root found from "+e)}const k=`
3
3
  <!DOCTYPE html>
4
4
  <html lang="en" style="overflow: hidden">
5
5
 
@@ -20,11 +20,11 @@ import{createLogger as F,defineConfig as C,searchForWorkspaceRoot as W,mergeConf
20
20
  </head>
21
21
 
22
22
  <body>
23
- ${i.lib?`<eo-dash style="height:100%;"/>
24
- <script type="module" src="${s.resolve(`/@fs/${u}`,"core/client/asWebComponent.js")}"><\/script>
23
+ ${s.lib?`<eo-dash style="height:100%;"/>
24
+ <script type="module" src="${t.resolve(`/@fs/${c}`,"core/client/asWebComponent.js")}"><\/script>
25
25
  `:` <div id="app" style="height:100%;" />
26
- <script type="module" src="${s.resolve(`/@fs/${u}`,"core/client/render.js")}"><\/script>
26
+ <script type="module" src="${t.resolve(`/@fs/${c}`,"core/client/render.js")}"><\/script>
27
27
  `}
28
28
  </body>
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(t,o){if(this.environment.mode!=="build")return;if(s.basename(o)===n){let l=t;return/defineCustomElement\s*\([^{]*\{[\s\S]*?styles\s*:/.test(t)||(l=t.replace(/(defineCustomElement\s*\(\s*[^,{]*,?\s*\{)/,`$1
30
- styles: ${r},`)),{code:l,map:null}}},generateBundle(t,o){let a="",l=[];const p=[];for(const d in o){const h=o[d];if(h.type==="chunk"&&h.code.includes(r)){a=d;break}}for(const d in o){const h=o[d];if(q(d)&&h.type==="asset"){let g=h.source.toString();g=g.replaceAll(":root",":host"),l.push(g),p.push(d)}}o[a].code=o[a].code.replace(r,JSON.stringify(l)),p.forEach(d=>{delete o[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:i.base??"",cacheDir:Q,plugins:[J({features:{customElement:n==="build"&&i.lib},template:{transformAssetUrls:B,compilerOptions:{isCustomElement:t=>!t.includes("v-")&&t.includes("-")}}}),M({autoImport:!0}),e==="development"&&{name:"inject-html",configureServer:ee},i.lib&&Z()],customLogger:j,define:{__userConfigExist__:!!m,...n==="build"&&i.lib?{"process.env":"import.meta.env"}:{"process.env":{},...te(r)}},envPrefix:r,resolve:{alias:{"@":s.join(u,"core/client"),"^":s.join(u,"widgets"),"user:widgets":D,...m&&{"user:config":m}},extensions:[".js",".json",".jsx",".mjs",".ts",".tsx",".vue"]},server:{allowedHosts:!0,warmup:{clientFiles:[s.join(u,"core/client/**"),m]},port:i.port??3e3,open:i.open,fs:{allow:[W(process.cwd())]},host:i.host},root:u,...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"],noDiscovery:!0}},publicDir:i.publicDir===!1?!1:K,build:{outDir:w,emptyOutDir:!0,target:"esnext",cssMinify:!0,...i.lib&&n==="build"&&{minify:!1,lib:{entry:s.join(u,"core/client/asWebComponent.js"),fileName:(t,o)=>o==="asWebComponent"?"eo-dash.js":"templates.js",cssFileName:"eo-dash",formats:["es"],name:"@eodash/eodash"},rollupOptions:{input:{asWebComponent:s.join(u,"core/client/asWebComponent.js"),templates:s.join(u,"templates/index.js")},external:t=>{const o=t.includes("vuetify")||t.endsWith(".css")||t.endsWith("styles"),a=z.some(p=>t.startsWith(p));return!o&&a||t==="user:config"&&!m},treeshake:{moduleSideEffects:!0,preset:"smallest"}}}}}}),N=C(async e=>i.vite?U(await _(e),i.vite):_(e));async function ee(e){const n=[f,s.join(D,"**/*.vue")];m&&n.push(m),e.watcher.add(n);let r="";const t=j.info;return j.info=(o,a)=>{if(o.includes("core")){const l=o.split("/")[0].split(" ");l.pop();const p=l.join(" ")+" "+r.replace(c,"");return t(p,a)}return t(o,a)},e.watcher.on("change",async o=>{r=o,o===f&&e.ws.send({type:"full-reload",path:o})}),()=>{e.middlewares.use(async(o,a,l)=>{if(o.originalUrl==="/@fs/config.js"||o.originalUrl==="/config.js"){a.statusCode=200,a.setHeader("Content-Type","text/javascript"),v(f)&&await I(f).then(p=>{a.write(p)}),a.end();return}if(o.url?.endsWith(".html")){a.statusCode=200,a.setHeader("Content-Type","text/html");const p=await e.transformIndexHtml(o.url,k,o.originalUrl);a.end(p);return}l()})}}function te(e){G({quiet:!0});const n={};for(const r in process.env)e.some(t=>r.startsWith(t))&&(n["process.env."+r]=`"${process.env[r]}"`);return n}const oe=async()=>{const e=await O(await N({mode:"development",command:"serve"}));await e.listen(),e.printUrls(),e.bindCLIShortcuts({print:!0})},se=async()=>{const e=async()=>{const n=await N({mode:"production",command:"build"});await L(n),v(f)&&await V(f,s.join(w,"config.js"),{recursive:!0}).catch(r=>{console.error(r)})};if(i.lib)await e();else{const n=s.join(u,"/index.html");await T(n,k).then(async()=>{await e(),await R(n).catch(()=>{console.error("failed to remove index.html")})})}};async function ie(){(await A({root:c,base:i.base??"",preview:{port:isNaN(i.port)?8080:i.port,open:i.open,host:i.host},build:{outDir:w}})).printUrls()}const ne=process.argv?.[2];(async()=>{switch(ne){case"dev":await oe();break;case"build":await se();break;case"preview":await ie();break;default:console.error("command not found");break}})();
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}})();
@@ -10,7 +10,7 @@ export class EodashCollection {
10
10
  source: {
11
11
  type: string;
12
12
  url: string;
13
- format: string;
13
+ projection: string;
14
14
  attributions: unknown;
15
15
  };
16
16
  properties: {
@@ -28,7 +28,10 @@ export class EodashCollection {
28
28
  source: {
29
29
  type: string;
30
30
  url: string | undefined;
31
- format: string;
31
+ format: {
32
+ type: string;
33
+ dataProjection: string | undefined;
34
+ };
32
35
  attributions: {}[];
33
36
  };
34
37
  properties: {
@@ -93,8 +96,15 @@ export class EodashCollection {
93
96
  })[];
94
97
  interactions: import("@eox/map/src/types").EOxInteraction[];
95
98
  } | null;
96
- /** @param {string} collectionUrl */
97
- constructor(collectionUrl: string);
99
+ /**
100
+ * @param {string} collectionUrl
101
+ * @param {boolean} isAPI
102
+ * @param {string | null} rasterEndpoint
103
+ */
104
+ constructor(collectionUrl: string, isAPI?: boolean, rasterEndpoint?: string | null);
105
+ isAPI: boolean;
106
+ /** @type {string | null} */
107
+ rasterEndpoint: string | null;
98
108
  /**
99
109
  * @type {import("stac-ts").StacLink
100
110
  * | import("stac-ts").StacItem
@@ -106,10 +116,10 @@ export class EodashCollection {
106
116
  get collectionStac(): import("stac-ts").StacCollection | undefined;
107
117
  /**
108
118
  * @async
109
- * @param {import('stac-ts').StacLink | Date} [linkOrDate]
110
- * @returns
119
+ * @param {import("stac-ts").StacItem | import('stac-ts').StacLink | Date } [itemOrDate]
120
+ * @returns {Promise<Record<string,any>[]>} layers
111
121
  */
112
- createLayersJson: (linkOrDate?: import("stac-ts").StacLink | Date) => Promise<Record<string, any>[]>;
122
+ createLayersJson: (itemOrDate?: import("stac-ts").StacItem | import("stac-ts").StacLink | Date) => Promise<Record<string, any>[]>;
113
123
  /**
114
124
  * @param {import("stac-ts").StacItem} item
115
125
  * @param {string} itemUrl
@@ -122,16 +132,20 @@ export class EodashCollection {
122
132
  fetchCollection(): Promise<import("stac-ts").StacCollection>;
123
133
  /**
124
134
  * Returns all item links sorted by datetime ascendingly
135
+ * @param {boolean} [fields=false] if true, fetch items from API with only properties
136
+ * @param {boolean} [first] - if true, returns the first page of items only (for API collections)
137
+ * @returns {Promise<import("stac-ts").StacLink[] | import("stac-ts").StacItem[] | undefined>}
125
138
  */
126
- getItems(): import("stac-ts").StacLink[] | undefined;
127
- getDates(): Date[] | undefined;
139
+ getItems(fields?: boolean, first?: boolean): Promise<import("stac-ts").StacLink[] | import("stac-ts").StacItem[] | undefined>;
140
+ getDates(): Promise<Date[]>;
128
141
  getExtent(): Promise<import("stac-ts").Extents | undefined>;
129
142
  /**
130
143
  * Get closest Item Link from a certain date,
131
144
  * get the latest if no date provided
132
145
  * @param {Date} [date]
146
+ * @return {Promise<import("stac-ts").StacItem | import("stac-ts").StacLink | undefined>} item
133
147
  **/
134
- getItem(date?: Date): import("stac-ts").StacLink | undefined;
148
+ getItem(date?: Date): Promise<import("stac-ts").StacItem | import("stac-ts").StacLink | undefined>;
135
149
  getToolTipProperties(): Promise<{
136
150
  id: string;
137
151
  title?: string;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Generic handler for possible authentications schemes as defined in STAC authentication extension.
3
+ * @param {import("../types").StacAuthItem } item
4
+ * @param {import("../types").StacAuthLink | import("../types").StacAuthAsset} linkOrAsset
5
+ * @returns {string}
6
+ */
7
+ export function handleAuthenticationOfLink(item: import("../types").StacAuthItem, linkOrAsset: import("../types").StacAuthLink | import("../types").StacAuthAsset): string;
@@ -15,7 +15,7 @@ export function createLayersFromAssets(collectionId: string, title: string, asse
15
15
  source: {
16
16
  type: string;
17
17
  url: string;
18
- format: string;
18
+ projection: string;
19
19
  attributions: unknown;
20
20
  };
21
21
  properties: {
@@ -33,7 +33,10 @@ export function createLayersFromAssets(collectionId: string, title: string, asse
33
33
  source: {
34
34
  type: string;
35
35
  url: string | undefined;
36
- format: string;
36
+ format: {
37
+ type: string;
38
+ dataProjection: string | undefined;
39
+ };
37
40
  attributions: {}[];
38
41
  };
39
42
  properties: {
@@ -63,4 +66,13 @@ export function createLayersFromAssets(collectionId: string, title: string, asse
63
66
  };
64
67
  style: import("../types").EodashStyleJson | undefined;
65
68
  })[]>;
66
- export function createLayersFromLinks(collectionId: string, title: string, item: import("stac-ts").StacItem, layerDatetime?: Record<string, any>, extraProperties?: object | null): Promise<Record<string, any>[]>;
69
+ /**
70
+ * Implementation of a function that creates a layer from the render extention
71
+ * @param {import("stac-ts").StacCollection | undefined | null} collection
72
+ * @param {import("stac-ts").StacItem | undefined | null} item
73
+ * @param {string} rasterURL
74
+ * @param {Record<string, any>} [extraProperties]
75
+ * @returns {import("@eox/map/src/layers").EOxLayerType<"Tile","XYZ">[]}
76
+ */
77
+ export function createLayerFromRender(rasterURL: string, collection: import("stac-ts").StacCollection | undefined | null, item: import("stac-ts").StacItem | undefined | null, extraProperties?: Record<string, any>): import("@eox/map/src/layers").EOxLayerType<"Tile", "XYZ">[];
78
+ export function createLayersFromLinks(collectionId: string, title: string, item: import("stac-ts").StacItem, itemUrl: string, layerDatetime?: Record<string, any>, extraProperties?: object | null): Promise<Record<string, any>[]>;