@eodash/eodash 5.1.0 → 5.2.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 (65) hide show
  1. package/core/client/components/DashboardLayout.vue +1 -1
  2. package/core/client/components/EodashOverlay.vue +4 -5
  3. package/core/client/components/MobileLayout.vue +42 -21
  4. package/core/client/composables/index.js +1 -1
  5. package/core/client/eodashSTAC/EodashCollection.js +4 -15
  6. package/core/client/eodashSTAC/createLayers.js +30 -0
  7. package/core/client/eodashSTAC/helpers.js +23 -1
  8. package/dist/client/{DashboardLayout-ByVs1DrY.js → DashboardLayout-Dq9Kfe6O.js} +5 -5
  9. package/dist/client/{DynamicWebComponent-C3W7HSQm.js → DynamicWebComponent-DCBMXskE.js} +1 -1
  10. package/dist/client/{EodashDatePicker-BIAf1sMT.js → EodashDatePicker-DtngxU6s.js} +3 -3
  11. package/dist/client/{EodashItemFilter-DPznh8UB.js → EodashItemFilter-ClQebJQt.js} +1 -1
  12. package/dist/client/{EodashLayerControl-Bhxjw4V2.js → EodashLayerControl-BLBds28C.js} +2 -2
  13. package/dist/client/{EodashLayoutSwitcher-C5qTEffW.js → EodashLayoutSwitcher-DQ8SfVDd.js} +3 -3
  14. package/dist/client/EodashMapBtns-B89_YBDw.js +326 -0
  15. package/dist/client/{EodashStacInfo-CSvvF2jI.js → EodashStacInfo-Dt1nF06x.js} +1 -1
  16. package/dist/client/{EodashTools-Cv1SXQ5y.js → EodashTools-DV5ykmWc.js} +4 -4
  17. package/dist/client/{ExportState-D-iuwaad.js → ExportState-B6zZQUmE.js} +4 -5
  18. package/dist/client/{Footer-CyF0zRAk.js → Footer-DNhXs8k6.js} +1 -1
  19. package/dist/client/{Header-CgD8jDKU.js → Header-BjhN5JY4.js} +2 -3
  20. package/dist/client/MobileLayout-JelB6w1G.js +118 -0
  21. package/dist/client/{PopUp-BsYLvWch.js → PopUp-CgpvNr3o.js} +2 -3
  22. package/dist/client/{ProcessList-C2xsLU2_.js → ProcessList-vecpxThi.js} +17 -10
  23. package/dist/client/{VImg-OHe8YTs2.js → VImg-CETuikH2.js} +200 -5
  24. package/dist/client/{VMain-PryTLU4a.js → VMain-Ci9DyaGU.js} +1 -1
  25. package/dist/client/{VTooltip-DZ0fjpB3.js → VTooltip-J4ac48X7.js} +2 -3
  26. package/dist/client/{WidgetsContainer-B9LBadcC.js → WidgetsContainer-CCML4TyV.js} +1 -1
  27. package/dist/client/{asWebComponent-By_7_JjS.js → asWebComponent-ZyEzWOOf.js} +59 -160
  28. package/dist/client/{async-DkSu_u2K.js → async-B7jIrM53.js} +69 -5
  29. package/dist/client/eo-dash.js +1 -1
  30. package/dist/client/{VOverlay-yUn7p-Uf.js → forwardRefs-BQclvjMq.js} +272 -5
  31. package/dist/client/{handling-CgmFXkW6.js → handling-BS24aG1q.js} +20 -5
  32. package/dist/client/{helpers-Dy0Q13tP.js → helpers-wXK7Ywio.js} +24 -2
  33. package/dist/client/{index-skjhlH8u.js → index-4UCzZi8B.js} +5 -5
  34. package/dist/client/{index-Dqj4tbx2.js → index-9KR-G20t.js} +2 -2
  35. package/dist/client/{index-Ch_HchK3.js → index-B2XpdgR6.js} +191 -57
  36. package/dist/client/material-symbols-outlined.woff2 +0 -0
  37. package/dist/client/material-symbols-rounded.woff2 +0 -0
  38. package/dist/client/material-symbols-sharp.woff2 +0 -0
  39. package/dist/client/material-symbols-subset.woff2 +0 -0
  40. package/dist/client/templates.js +27 -37
  41. package/dist/client/{transition-C98Yn4Vo.js → transition-yBii4fu6.js} +1 -1
  42. package/dist/node/cli.js +1 -1
  43. package/dist/types/core/client/eodashSTAC/helpers.d.ts +5 -0
  44. package/dist/types/core/client/types.d.ts +1 -1
  45. package/dist/types/templates/compare.d.ts +0 -25
  46. package/dist/types/templates/expert.d.ts +16 -20
  47. package/dist/types/templates/light.d.ts +9 -0
  48. package/dist/types/widgets/{EodashMapBtns.vue.d.ts → EodashMap/EodashMapBtns.vue.d.ts} +4 -0
  49. package/dist/types/widgets/EodashMap/index.vue.d.ts +8 -0
  50. package/dist/types/widgets/EodashProcess/methods/async.d.ts +1 -0
  51. package/package.json +4 -2
  52. package/templates/compare.js +0 -20
  53. package/templates/expert.js +16 -15
  54. package/templates/light.js +10 -1
  55. package/widgets/EodashMap/EodashMapBtns.vue +269 -0
  56. package/widgets/EodashMap/index.vue +252 -37
  57. package/widgets/EodashProcess/ProcessList.vue +13 -1
  58. package/widgets/EodashProcess/methods/async.js +22 -1
  59. package/widgets/EodashProcess/methods/custom-endpoints/chart/veda-endpoint.js +19 -3
  60. package/widgets/EodashProcess/methods/utils.js +45 -1
  61. package/dist/client/EodashMapBtns-WoGq8MuV.js +0 -173
  62. package/dist/client/MobileLayout-EKQ_kpSh.js +0 -1226
  63. package/dist/client/forwardRefs-BXxrv98s.js +0 -272
  64. package/dist/client/index-BuhOHXKv.js +0 -199
  65. package/widgets/EodashMapBtns.vue +0 -155
@@ -1,10 +1,11 @@
1
- import { onMounted, onUnmounted, watch, ref, toRaw, computed, createElementBlock, openBlock, createElementVNode, unref, normalizeStyle } from 'vue';
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 { J as setMapProjFromCol, A as mapPosition, d as mapEl, H as mapCompareEl, x as datetime } from './helpers-Dy0Q13tP.js';
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';
5
5
  import { storeToRefs } from 'pinia';
6
- import { a3 as EodashCollection, Y as useSTAcStore, a4 as useEmitLayersUpdate, a5 as isFirstLoad, a6 as useOnLayersUpdate, a2 as layerControlFormValue, a1 as layerControlFormValueCompare, a0 as eodashCompareCollections, $ as eodashCollections } from './asWebComponent-By_7_JjS.js';
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';
7
7
  import log from 'loglevel';
8
+ import { i as inAndOut, E as EodashMapBtns } from './EodashMapBtns-B89_YBDw.js';
8
9
  import mustache from 'mustache';
9
10
 
10
11
  /**
@@ -389,26 +390,23 @@ const useUpdateTooltipProperties = (eodashCols, tooltipProperties) => {
389
390
  });
390
391
  };
391
392
 
392
- /**
393
- * @module ol/easing
394
- */
395
-
396
-
397
- /**
398
- * Start slow, speed up, and then slow down again.
399
- * @param {number} t Input between 0 and 1.
400
- * @return {number} Output between 0 and 1.
401
- * @api
402
- */
403
- function inAndOut(t) {
404
- return 3 * t * t - 2 * t * t * t;
405
- }
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}";
406
394
 
407
395
  const _hoisted_1 = [".enabled"];
408
- const _hoisted_2 = [".center", ".zoom", ".layers"];
396
+ const _hoisted_2 = [".center", ".zoom", ".layers", ".controls"];
409
397
  const _hoisted_3 = [".propertyTransform"];
410
398
  const _hoisted_4 = [".layers"];
411
399
  const _hoisted_5 = [".propertyTransform"];
400
+ const _hoisted_6 = {
401
+ key: 0,
402
+ id: "cursor-coordinates",
403
+ ref: "cursor-coords"
404
+ };
405
+ const _hoisted_7 = {
406
+ key: 1,
407
+ id: "scale-line",
408
+ ref: "scale-line"
409
+ };
412
410
 
413
411
 
414
412
  const _sfc_main = {
@@ -432,21 +430,121 @@ const _sfc_main = {
432
430
  type: Boolean,
433
431
  default: true,
434
432
  },
433
+ enableCursorCoordinates: {
434
+ type: Boolean,
435
+ default: true,
436
+ },
437
+ enableScaleLine: {
438
+ type: Boolean,
439
+ default: true,
440
+ },
441
+ btnsPosition: {
442
+ type: Object,
443
+ default: () => ({
444
+ x: "12/9/10",
445
+ y: 1,
446
+ gap: 16,
447
+ }),
448
+ },
449
+ btns: {
450
+ type: Object,
451
+ default: () => ({
452
+ enableExportMap: true,
453
+ enableChangeProjection: true,
454
+ enableCompareIndicators: true,
455
+ enableBackToPOIs: true,
456
+ enableSearch: true,
457
+ enableZoom: true,
458
+ }),
459
+ },
435
460
  },
436
461
  setup(__props) {
437
462
 
438
463
  const props = __props;
439
464
 
465
+ // Responsive positioning logic
466
+ const { width } = useDisplay();
467
+
468
+ /**
469
+ * Parse responsive string values (e.g., "1/5/10") into values for different screen sizes
470
+ * Breakpoints: [0, 960, 1920] based on properties passed to eox-layout in DashboardLayout.vue
471
+ * @param {string | number} value
472
+ * @returns {number}
473
+ */
474
+ const parseResponsiveValue = (value) => {
475
+ if (typeof value === "number") {
476
+ return value;
477
+ }
478
+ if (typeof value === "string") {
479
+ const parts = value.split("/");
480
+ const currentWidth = width.value;
481
+
482
+ if (currentWidth < 960) {
483
+ return parseInt(parts[0]) || 1;
484
+ } else if (currentWidth < 1920) {
485
+ return parseInt(parts[1] || parts[0]) || 1;
486
+ } else {
487
+ return parseInt(parts[2] || parts[1] || parts[0]) || 1;
488
+ }
489
+ }
490
+ return 1;
491
+ };
492
+
493
+ const responsiveX = computed(() => parseResponsiveValue(props.btnsPosition.x));
494
+ const responsiveY = computed(() => parseResponsiveValue(props.btnsPosition.y));
495
+ const btnsProps = computed(() => ({
496
+ exportMap: props.btns.enableExportMap ?? true,
497
+ changeProjection: props.btns.enableChangeProjection ?? true,
498
+ compareIndicators: props.btns.enableCompareIndicators ?? true,
499
+ backToPOIs: props.btns.enableBackToPOIs ?? true,
500
+ enableSearch: props.btns.enableSearch ?? true,
501
+ enableZoom: props.btns.enableZoom ?? true,
502
+ }));
503
+
504
+ // Prepare containers for scale line and cursor coordinates
505
+ const scaleLineRef = useTemplateRef("scale-line");
506
+ const cursorCoordsRef = useTemplateRef("cursor-coords");
507
+
440
508
  /** @type {import("vue").Ref<Exclude<import("@/types").EodashStyleJson["tooltip"], undefined>>} */
441
509
  const tooltipProperties = ref([]);
442
510
  /** @type {import("vue").Ref<Exclude<import("@/types").EodashStyleJson["tooltip"], undefined>>} */
443
511
  const compareTooltipProperties = ref([]);
444
- /** @type {import("@eox/map").EOxMap["controls"]} */
445
- const controls = {
446
- Attribution: {
447
- collapsible: true,
448
- },
449
- };
512
+ /** @type {import("vue").ComputedRef<{
513
+ Attribution: { collapsible: boolean };
514
+ ScaleLine?: { target: HTMLElement };
515
+ MousePosition?: { projection: string; coordinateFormat: (c: [number, number]) => string; target: HTMLElement };
516
+ }>} */
517
+ const controls = computed(() => {
518
+ /** @type {{
519
+ Attribution: { collapsible: boolean };
520
+ ScaleLine?: { target: HTMLElement };
521
+ MousePosition?: { projection: string; coordinateFormat: (c: [number, number]) => string; target: HTMLElement };
522
+ }} */
523
+ const controlsObj = {
524
+ Attribution: {
525
+ collapsible: true,
526
+ },
527
+ };
528
+
529
+ if (props.enableScaleLine && scaleLineRef.value) {
530
+ controlsObj.ScaleLine = {
531
+ target: scaleLineRef.value,
532
+ };
533
+ }
534
+
535
+ if (props.enableCursorCoordinates && cursorCoordsRef.value) {
536
+ controlsObj.MousePosition = {
537
+ projection: "EPSG:4326",
538
+ coordinateFormat: (/** @type {[number, number]} */ c) => {
539
+ return `${c[1].toFixed(3)} °N, ${c[0].toFixed(3)} °E`;
540
+ },
541
+ target: cursorCoordsRef.value,
542
+ };
543
+ }
544
+
545
+ return controlsObj;
546
+ });
547
+
450
548
  const initialCenter = toRaw(props.center);
451
549
  const initialZoom = toRaw(mapPosition.value?.[2] ?? props.zoom);
452
550
  /** @type {import("vue").Ref<Record<string,any>[]>} */
@@ -573,44 +671,80 @@ const tooltipPropertyTransform = (map) => {
573
671
  };
574
672
 
575
673
  return (_ctx, _cache) => {
576
- return (openBlock(), createElementBlock("eox-map-compare", {
577
- class: "fill-height fill-width overflow-none",
578
- ".enabled": showCompare.value
579
- }, [
580
- createElementVNode("eox-map", {
674
+ return (openBlock(), createElementBlock("span", null, [
675
+ createElementVNode("eox-map-compare", {
581
676
  class: "fill-height fill-width overflow-none",
582
- slot: "first",
583
- ref_key: "eoxMap",
584
- ref: eoxMap,
585
- id: "main",
586
- ".animationOptions": animationOptions,
587
- ".center": unref(initialCenter),
588
- ".zoom": unref(initialZoom),
589
- ".layers": eoxMapLayers.value,
590
- ".controls": controls
677
+ ".enabled": showCompare.value
591
678
  }, [
592
- createElementVNode("eox-map-tooltip", {
593
- style: normalizeStyle(mainTooltipStyles.value),
594
- ".propertyTransform": tooltipPropertyTransform('main')
595
- }, null, 44 /* STYLE, PROPS, NEED_HYDRATION */, _hoisted_3)
596
- ], 40 /* PROPS, NEED_HYDRATION */, _hoisted_2),
597
- createElementVNode("eox-map", {
598
- class: "fill-height fill-width overflow-none",
599
- id: "compare",
600
- slot: "second",
601
- ref_key: "compareMap",
602
- ref: compareMap,
603
- ".layers": eoxMapCompareLayers.value
679
+ createElementVNode("eox-map", {
680
+ class: "fill-height fill-width overflow-none",
681
+ slot: "first",
682
+ ref_key: "eoxMap",
683
+ ref: eoxMap,
684
+ id: "main",
685
+ ".animationOptions": animationOptions,
686
+ ".center": unref(initialCenter),
687
+ ".zoom": unref(initialZoom),
688
+ ".layers": eoxMapLayers.value,
689
+ ".controls": controls.value
690
+ }, [
691
+ createElementVNode("eox-map-tooltip", {
692
+ style: normalizeStyle(mainTooltipStyles.value),
693
+ ".propertyTransform": tooltipPropertyTransform('main')
694
+ }, null, 44 /* STYLE, PROPS, NEED_HYDRATION */, _hoisted_3)
695
+ ], 40 /* PROPS, NEED_HYDRATION */, _hoisted_2),
696
+ createElementVNode("eox-map", {
697
+ class: "fill-height fill-width overflow-none",
698
+ id: "compare",
699
+ slot: "second",
700
+ ref_key: "compareMap",
701
+ ref: compareMap,
702
+ ".layers": eoxMapCompareLayers.value
703
+ }, [
704
+ createElementVNode("eox-map-tooltip", {
705
+ style: normalizeStyle(compareTooltipStyles.value),
706
+ ".propertyTransform": tooltipPropertyTransform('compare')
707
+ }, null, 44 /* STYLE, PROPS, NEED_HYDRATION */, _hoisted_5)
708
+ ], 40 /* PROPS, NEED_HYDRATION */, _hoisted_4)
709
+ ], 40 /* PROPS, NEED_HYDRATION */, _hoisted_1),
710
+ (__props.enableCursorCoordinates)
711
+ ? (openBlock(), createElementBlock("div", _hoisted_6, null, 512 /* NEED_PATCH */))
712
+ : createCommentVNode("v-if", true),
713
+ (__props.enableScaleLine)
714
+ ? (openBlock(), createElementBlock("span", _hoisted_7, null, 512 /* NEED_PATCH */))
715
+ : createCommentVNode("v-if", true),
716
+ createElementVNode("div", {
717
+ class: "map-buttons-container",
718
+ style: normalizeStyle(`margin: ${__props.btnsPosition.gap}px 0 ${__props.btnsPosition.gap}px 0`)
604
719
  }, [
605
- createElementVNode("eox-map-tooltip", {
606
- style: normalizeStyle(compareTooltipStyles.value),
607
- ".propertyTransform": tooltipPropertyTransform('compare')
608
- }, null, 44 /* STYLE, PROPS, NEED_HYDRATION */, _hoisted_5)
609
- ], 40 /* PROPS, NEED_HYDRATION */, _hoisted_4)
610
- ], 40 /* PROPS, NEED_HYDRATION */, _hoisted_1))
720
+ createVNode(EodashMapBtns, {
721
+ style: normalizeStyle({
722
+ gridColumn: unref(indicator) || unref(compareIndicator) ? responsiveX.value : '12',
723
+ gridRow: responsiveY.value,
724
+ }),
725
+ exportMap: (unref(indicator) || unref(compareIndicator)) ? btnsProps.value.exportMap : false,
726
+ changeProjection:
727
+ (unref(indicator) || unref(compareIndicator)) ? btnsProps.value.changeProjection : false
728
+ ,
729
+ compareIndicators:
730
+ (unref(indicator) || unref(compareIndicator)) ? btnsProps.value.compareIndicators : false
731
+ ,
732
+ backToPOIs:
733
+ (unref(indicator) || unref(compareIndicator)) ? btnsProps.value.backToPOIs : false
734
+ ,
735
+ enableSearch:
736
+ (unref(indicator) || unref(compareIndicator)) ? btnsProps.value.enableSearch : false
737
+ ,
738
+ enableZoom:
739
+ (unref(indicator) || unref(compareIndicator)) ? btnsProps.value.enableZoom : false
740
+
741
+ }, null, 8 /* PROPS */, ["style", "exportMap", "changeProjection", "compareIndicators", "backToPOIs", "enableSearch", "enableZoom"])
742
+ ], 4 /* STYLE */)
743
+ ]))
611
744
  }
612
745
  }
613
746
 
614
747
  };
748
+ const index = /*#__PURE__*/_export_sfc(_sfc_main, [['styles',[_style_0]],['__scopeId',"data-v-8d648956"]]);
615
749
 
616
- export { _sfc_main as default };
750
+ export { index as default };
@@ -1,5 +1,5 @@
1
1
  import { mdiViewDashboardVariant, mdiViewDashboard } from '@mdi/js';
2
- import { G as includesProcess } from './helpers-Dy0Q13tP.js';
2
+ import { H as includesProcess } from './helpers-wXK7Ywio.js';
3
3
 
4
4
  /**
5
5
  * Special values that tell deepmerge to perform a certain action.
@@ -393,12 +393,21 @@ const light = {
393
393
  },
394
394
  },
395
395
  background: {
396
- id: "background-map",
396
+ id: "lite-map",
397
397
  type: "internal",
398
398
  widget: {
399
399
  name: "EodashMap",
400
400
  properties: {
401
401
  enableCompare: true,
402
+ enableCursorCoordinates: false,
403
+ enableScaleLine: false,
404
+ btns: {
405
+ enableExportMap: false,
406
+ enableChangeProjection: false,
407
+ enableCompareIndicators: false,
408
+ enableBackToPOIs: false,
409
+ enableSearch: true,
410
+ },
402
411
  },
403
412
  },
404
413
  },
@@ -527,6 +536,22 @@ const expert = {
527
536
  name: "EodashMap",
528
537
  properties: {
529
538
  enableCompare: true,
539
+ zoomToExtent: true,
540
+ btns: {
541
+ enableZoom: true,
542
+ enableExportMap: true,
543
+ enableChangeProjection: true,
544
+ enableCompareIndicators: {
545
+ fallbackTemplate: "expert",
546
+ },
547
+ enableBackToPOIs: true,
548
+ enableSearch: true,
549
+ },
550
+ btnsPosition: {
551
+ x: "12/9/9",
552
+ y: 1,
553
+ gap: 16
554
+ }
530
555
  },
531
556
  },
532
557
  },
@@ -594,21 +619,6 @@ const expert = {
594
619
  : null;
595
620
  },
596
621
  },
597
- {
598
- defineWidget: (selected) => {
599
- return selected
600
- ? {
601
- id: "Buttons",
602
- layout: { x: "8/8/9", y: 0, w: 1, h: 2 },
603
- title: "Buttons",
604
- type: "internal",
605
- widget: {
606
- name: "EodashMapBtns",
607
- },
608
- }
609
- : null;
610
- },
611
- },
612
622
  {
613
623
  defineWidget: (selectedSTAC) =>
614
624
  includesProcess(selectedSTAC) && {
@@ -742,26 +752,6 @@ const compare = {
742
752
  },
743
753
  },
744
754
  },
745
- {
746
- defineWidget: (selected) => {
747
- return selected
748
- ? {
749
- id: "Buttons",
750
- layout: { x: "8/8/9", y: 0, w: 1, h: 2 },
751
- title: "Buttons",
752
- type: "internal",
753
- widget: {
754
- name: "EodashMapBtns",
755
- properties: {
756
- compareIndicators: {
757
- fallbackTemplate: "expert",
758
- },
759
- },
760
- },
761
- }
762
- : null;
763
- },
764
- },
765
755
  {
766
756
  defineWidget: (selectedSTAC) => {
767
757
  return selectedSTAC
@@ -1,5 +1,5 @@
1
1
  import { mergeProps, h, TransitionGroup, Transition } from 'vue';
2
- import { p as propsFactory, E as isObject, aL as onlyDefinedProps } from './asWebComponent-By_7_JjS.js';
2
+ import { p as propsFactory, X as isObject, aD as onlyDefinedProps } from './asWebComponent-ZyEzWOOf.js';
3
3
 
4
4
  // Utilities
5
5
  const makeTransitionProps = propsFactory({
package/dist/node/cli.js CHANGED
@@ -27,4 +27,4 @@ ${i.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(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"],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}})();
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}})();
@@ -67,6 +67,11 @@ export function revokeCollectionBlobUrls(collection: import("../eodashSTAC/Eodas
67
67
  * @param {import("stac-ts").StacLink[]} [links]
68
68
  */
69
69
  export function getDatetimeProperty(links?: import("stac-ts").StacLink[]): string | undefined;
70
+ /**
71
+ * @param {import ("stac-ts").StacCollection | undefined | null} collection
72
+ * @returns {object}
73
+ */
74
+ export function extractLayerLegend(collection: import("stac-ts").StacCollection | undefined | null): object;
70
75
  export function extractRoles(properties: Record<string, any>, linkOrAsset: import("stac-ts").StacLink | import("stac-ts").StacAsset): Record<string, any>;
71
76
  export function fetchStyle(item: import("stac-ts").StacItem, itemUrl: string): Promise<{
72
77
  "fill-color"?: import("ol/style/flat.js").ColorExpression | undefined;
@@ -116,7 +116,7 @@ export interface TEodashProcess {
116
116
  /** @group Widgets */
117
117
  export interface TEodashMapBtns {
118
118
  name: "EodashMapBtns";
119
- properties?: InstanceType<typeof import("../../widgets/EodashMapBtns.vue").default>["$props"];
119
+ properties?: InstanceType<typeof import("^/EodashMapBtns.vue").default>["$props"];
120
120
  }
121
121
  /** @group Widgets */
122
122
  export interface TEodashTools {
@@ -156,31 +156,6 @@ declare const _default: {
156
156
  title?: undefined;
157
157
  layout?: undefined;
158
158
  widget?: undefined;
159
- } | {
160
- defineWidget: (selected: import("stac-ts").StacCollection | null) => {
161
- id: string;
162
- layout: {
163
- x: string;
164
- y: number;
165
- w: number;
166
- h: number;
167
- };
168
- title: string;
169
- type: "internal";
170
- widget: {
171
- name: "EodashMapBtns";
172
- properties: {
173
- compareIndicators: {
174
- fallbackTemplate: string;
175
- };
176
- };
177
- };
178
- } | null;
179
- id?: undefined;
180
- type?: undefined;
181
- title?: undefined;
182
- layout?: undefined;
183
- widget?: undefined;
184
159
  } | {
185
160
  defineWidget: (selectedSTAC: import("stac-ts").StacCollection | null) => {
186
161
  id: string;
@@ -20,6 +20,22 @@ declare const _default: {
20
20
  name: "EodashMap";
21
21
  properties: {
22
22
  enableCompare: true;
23
+ zoomToExtent: true;
24
+ btns: {
25
+ enableZoom: boolean;
26
+ enableExportMap: boolean;
27
+ enableChangeProjection: boolean;
28
+ enableCompareIndicators: {
29
+ fallbackTemplate: string;
30
+ };
31
+ enableBackToPOIs: boolean;
32
+ enableSearch: boolean;
33
+ };
34
+ btnsPosition: {
35
+ x: string;
36
+ y: number;
37
+ gap: number;
38
+ };
23
39
  };
24
40
  };
25
41
  };
@@ -106,26 +122,6 @@ declare const _default: {
106
122
  title?: undefined;
107
123
  layout?: undefined;
108
124
  widget?: undefined;
109
- } | {
110
- defineWidget: (selected: import("stac-ts").StacCollection | null) => {
111
- id: string;
112
- layout: {
113
- x: string;
114
- y: number;
115
- w: number;
116
- h: number;
117
- };
118
- title: string;
119
- type: "internal";
120
- widget: {
121
- name: "EodashMapBtns";
122
- };
123
- } | null;
124
- id?: undefined;
125
- type?: undefined;
126
- title?: undefined;
127
- layout?: undefined;
128
- widget?: undefined;
129
125
  } | {
130
126
  defineWidget: (selectedSTAC: import("stac-ts").StacCollection | null) => false | {
131
127
  id: string;
@@ -21,6 +21,15 @@ declare const _default: {
21
21
  name: "EodashMap";
22
22
  properties: {
23
23
  enableCompare: true;
24
+ enableCursorCoordinates: false;
25
+ enableScaleLine: false;
26
+ btns: {
27
+ enableExportMap: boolean;
28
+ enableChangeProjection: boolean;
29
+ enableCompareIndicators: boolean;
30
+ enableBackToPOIs: boolean;
31
+ enableSearch: boolean;
32
+ };
24
33
  };
25
34
  };
26
35
  };
@@ -6,6 +6,8 @@ declare const _default: import("vue").DefineComponent<{}, {
6
6
  changeProjection: boolean;
7
7
  exportMap: boolean;
8
8
  backToPOIs: boolean;
9
+ enableSearch: boolean;
10
+ enableZoom: boolean;
9
11
  $props: {
10
12
  compareIndicators?: boolean | {
11
13
  compareTemplate?: string;
@@ -14,6 +16,8 @@ declare const _default: import("vue").DefineComponent<{}, {
14
16
  changeProjection?: boolean | undefined;
15
17
  exportMap?: boolean | undefined;
16
18
  backToPOIs?: boolean | undefined;
19
+ enableSearch?: boolean | undefined;
20
+ enableZoom?: boolean | undefined;
17
21
  };
18
22
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
19
23
  export default _default;
@@ -2,11 +2,19 @@ declare const _default: import("vue").DefineComponent<{}, {
2
2
  enableCompare: boolean;
3
3
  zoom: number;
4
4
  zoomToExtent: boolean;
5
+ enableCursorCoordinates: boolean;
6
+ enableScaleLine: boolean;
7
+ btnsPosition: Record<string, any>;
8
+ btns: Record<string, any>;
5
9
  center?: [number, number] | undefined;
6
10
  $props: {
7
11
  readonly enableCompare?: boolean | undefined;
8
12
  readonly zoom?: number | undefined;
9
13
  readonly zoomToExtent?: boolean | undefined;
14
+ readonly enableCursorCoordinates?: boolean | undefined;
15
+ readonly enableScaleLine?: boolean | undefined;
16
+ readonly btnsPosition?: Record<string, any> | undefined;
17
+ readonly btns?: Record<string, any> | undefined;
10
18
  readonly center?: [number, number] | undefined;
11
19
  };
12
20
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -43,3 +43,4 @@ export function loadPreviousProcess({ selectedStac, results, jobId, mapElement,
43
43
  export function deleteJob(jobs: import("vue").Ref<import("../types").AsyncJob[]>, jobObject: import("../types").AsyncJob, indicator: string): Promise<void>;
44
44
  export function downloadPreviousResults(jobObject: import("../types").AsyncJob, selectedStac: import("stac-ts").StacCollection | null): Promise<void>;
45
45
  export function loadProcess(jobObject: import("../types").AsyncJob, selectedStac: import("stac-ts").StacCollection | null, mapElement: import("@eox/map").EOxMap | null): Promise<void>;
46
+ export function getJobStatusUrl(jobID: string, indicator: string): string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eodash/eodash",
3
- "version": "5.1.0",
3
+ "version": "5.2.0",
4
4
  "type": "module",
5
5
  "types": "./dist/types/core/client/types.d.ts",
6
6
  "files": [
@@ -67,13 +67,14 @@
67
67
  "dependencies": {
68
68
  "@eox/chart": "^1.0.1",
69
69
  "@eox/drawtools": "^1.1.2",
70
+ "@eox/geosearch": "^1.1.0",
70
71
  "@eox/itemfilter": "^1.10.3",
71
72
  "@eox/jsonform": "^1.3.2",
72
73
  "@eox/layercontrol": "^1.1.2",
73
74
  "@eox/layout": "^1.0.0",
74
75
  "@eox/map": "^1.24.2",
75
76
  "@eox/stacinfo": "^1.0.1",
76
- "@eox/timecontrol": "^1.0.1",
77
+ "@eox/timecontrol": "^1.0.2",
77
78
  "@eox/ui": "^0.4.0",
78
79
  "@mdi/js": "^7.4.47",
79
80
  "@vitejs/plugin-vue": "^5.2.4",
@@ -89,6 +90,7 @@
89
90
  "loglevel": "^1.9.2",
90
91
  "mustache": "^4.2.0",
91
92
  "pinia": "^3.0.3",
93
+ "proj4": "^2.19.10",
92
94
  "sass": "^1.89.2",
93
95
  "stac-js": "^0.1.6",
94
96
  "stac-ts": "^1.0.4",