@eodash/eodash 5.0.0-alpha.2.26 → 5.0.0-alpha.2.27

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 (108) hide show
  1. package/core/client/asWebComponent.js +2 -3
  2. package/core/client/components/DashboardLayout.vue +35 -13
  3. package/core/client/components/Loading.vue +6 -9
  4. package/core/client/components/MobileLayout.vue +16 -14
  5. package/core/client/composables/DefineEodash.js +13 -3
  6. package/core/client/composables/DefineTemplate.js +67 -0
  7. package/core/client/composables/DefineWidgets.js +3 -2
  8. package/core/client/composables/EodashMap.js +39 -14
  9. package/core/client/composables/EodashProcess.js +574 -0
  10. package/core/client/composables/index.js +54 -11
  11. package/core/client/eodash.js +383 -125
  12. package/core/client/{utils/eodashSTAC.js → eodashSTAC/EodashCollection.js} +75 -41
  13. package/core/client/{utils → eodashSTAC}/createLayers.js +10 -8
  14. package/core/client/{utils → eodashSTAC}/helpers.js +47 -75
  15. package/core/client/eodashSTAC/triggers.js +43 -0
  16. package/core/client/plugins/vuetify.js +2 -1
  17. package/core/client/store/{Actions.js → actions.js} +16 -2
  18. package/core/client/store/index.js +4 -18
  19. package/core/client/store/stac.js +4 -4
  20. package/core/client/store/{States.js → states.js} +2 -0
  21. package/{dist/types/core/client/types.d.ts → core/client/types.ts} +47 -8
  22. package/core/client/utils/keys.js +2 -0
  23. package/core/client/utils/states.js +8 -3
  24. package/core/client/views/Dashboard.vue +6 -4
  25. package/core/client/vite-env.d.ts +1 -16
  26. package/dist/client/{DashboardLayout-E_JzgCH5.js → DashboardLayout-232tRmjz.js} +23 -25
  27. package/dist/client/{DynamicWebComponent-C9pVUfT3.js → DynamicWebComponent-Cl4LqHU6.js} +1 -1
  28. package/dist/client/{EodashDatePicker-CjU8R2ia.js → EodashDatePicker-Pok6bZwU.js} +78 -165
  29. package/dist/client/EodashItemFilter-16eMMjTV.js +151 -0
  30. package/dist/client/{EodashLayerControl-mKfwru42.js → EodashLayerControl-De7IlCm_.js} +19 -11
  31. package/dist/client/EodashLayoutSwitcher-C-3-jjn5.js +52 -0
  32. package/dist/client/{EodashMap-BpwL82-w.js → EodashMap-CMvbfI6-.js} +116 -39
  33. package/dist/client/EodashMapBtns-BeknGDtc.js +107 -0
  34. package/dist/client/EodashProcess-BwKAa9Ee.js +1476 -0
  35. package/dist/client/EodashStacInfo-_BfonNUG.js +85 -0
  36. package/dist/client/EodashTools-PD3XPYuR.js +103 -0
  37. package/dist/client/{ExportState-ByVuIAQb.js → ExportState-DOrT7M15.js} +5 -5
  38. package/dist/client/{Footer-D691KLtK.js → Footer-CCigxYBo.js} +1 -1
  39. package/dist/client/{Header-B8UBQstf.js → Header-C2cdx4gb.js} +3 -3
  40. package/dist/client/{MobileLayout-6bHjYguI.js → MobileLayout-BdiFjHg7.js} +28 -31
  41. package/dist/client/{PopUp-CdFcnKMY.js → PopUp--_xn1Cms.js} +37 -9
  42. package/dist/client/{VImg-fKGJ7xyb.js → VImg-9xu2l99m.js} +2 -2
  43. package/dist/client/{VMain-Hf5R6yWY.js → VMain-BUs3kDTd.js} +1 -1
  44. package/dist/client/{VOverlay-ClFjEtlD.js → VOverlay-D89omJis.js} +3 -3
  45. package/dist/client/VTooltip-CDu3bErh.js +86 -0
  46. package/dist/client/{WidgetsContainer-XXYJfaPR.js → WidgetsContainer-aFG9yFT6.js} +1 -1
  47. package/dist/client/{asWebComponent-BsbKnhGV.js → asWebComponent-BRGyP_j5.js} +1495 -1142
  48. package/dist/client/{style.css → eo-dash.css} +2 -2
  49. package/dist/client/eo-dash.js +1 -1
  50. package/dist/client/{forwardRefs-I2EA3z3_.js → forwardRefs-CYrR6bMw.js} +1 -1
  51. package/dist/client/{index-B3dnMr8a.js → index-BZwk0V42.js} +1 -1
  52. package/dist/client/{transition-DJ9gfiuP.js → transition-DG9nRSW4.js} +1 -1
  53. package/dist/node/cli.js +3 -3
  54. package/package.json +56 -34
  55. package/widgets/EodashDatePicker.vue +68 -54
  56. package/widgets/EodashItemFilter.vue +60 -105
  57. package/widgets/EodashLayerControl.vue +19 -8
  58. package/widgets/EodashLayoutSwitcher.vue +36 -0
  59. package/widgets/EodashMap.vue +27 -28
  60. package/widgets/EodashMapBtns.vue +41 -4
  61. package/widgets/EodashProcess.vue +143 -0
  62. package/widgets/EodashStacInfo.vue +82 -0
  63. package/widgets/EodashTools.vue +83 -0
  64. package/widgets/ExportState.vue +3 -3
  65. package/widgets/PopUp.vue +24 -2
  66. package/core/client/asWebComponent.d.ts +0 -23
  67. package/core/client/types.d.ts +0 -279
  68. package/dist/client/EodashItemFilter-VGQasaBJ.js +0 -194
  69. package/dist/client/EodashMapBtns-GNNBdBW9.js +0 -66
  70. package/dist/types/core/client/App.vue.d.ts +0 -7
  71. package/dist/types/core/client/asWebComponent.d.ts +0 -9
  72. package/dist/types/core/client/components/DashboardLayout.vue.d.ts +0 -2
  73. package/dist/types/core/client/components/DynamicWebComponent.vue.d.ts +0 -18
  74. package/dist/types/core/client/components/ErrorAlert.vue.d.ts +0 -2
  75. package/dist/types/core/client/components/Footer.vue.d.ts +0 -2
  76. package/dist/types/core/client/components/Header.vue.d.ts +0 -2
  77. package/dist/types/core/client/components/IframeWrapper.vue.d.ts +0 -7
  78. package/dist/types/core/client/components/Loading.vue.d.ts +0 -2
  79. package/dist/types/core/client/components/MobileLayout.vue.d.ts +0 -2
  80. package/dist/types/core/client/composables/DefineEodash.d.ts +0 -2
  81. package/dist/types/core/client/composables/DefineWidgets.d.ts +0 -14
  82. package/dist/types/core/client/composables/EodashMap.d.ts +0 -5
  83. package/dist/types/core/client/composables/index.d.ts +0 -29
  84. package/dist/types/core/client/eodash.d.ts +0 -8
  85. package/dist/types/core/client/main.d.ts +0 -2
  86. package/dist/types/core/client/plugins/axios.d.ts +0 -2
  87. package/dist/types/core/client/plugins/index.d.ts +0 -3
  88. package/dist/types/core/client/plugins/vuetify.d.ts +0 -82
  89. package/dist/types/core/client/render.d.ts +0 -1
  90. package/dist/types/core/client/store/Actions.d.ts +0 -11
  91. package/dist/types/core/client/store/States.d.ts +0 -21
  92. package/dist/types/core/client/store/index.d.ts +0 -2
  93. package/dist/types/core/client/store/stac.d.ts +0 -25
  94. package/dist/types/core/client/utils/createLayers.d.ts +0 -45
  95. package/dist/types/core/client/utils/eodashSTAC.d.ts +0 -82
  96. package/dist/types/core/client/utils/helpers.d.ts +0 -84
  97. package/dist/types/core/client/utils/index.d.ts +0 -2
  98. package/dist/types/core/client/utils/keys.d.ts +0 -6
  99. package/dist/types/core/client/utils/states.d.ts +0 -14
  100. package/dist/types/core/client/views/Dashboard.vue.d.ts +0 -9
  101. package/dist/types/widgets/EodashDatePicker.vue.d.ts +0 -7
  102. package/dist/types/widgets/EodashItemFilter.vue.d.ts +0 -33
  103. package/dist/types/widgets/EodashLayerControl.vue.d.ts +0 -7
  104. package/dist/types/widgets/EodashMap.vue.d.ts +0 -7
  105. package/dist/types/widgets/EodashMapBtns.vue.d.ts +0 -9
  106. package/dist/types/widgets/ExportState.vue.d.ts +0 -7
  107. package/dist/types/widgets/PopUp.vue.d.ts +0 -14
  108. package/dist/types/widgets/WidgetsContainer.vue.d.ts +0 -7
@@ -0,0 +1,36 @@
1
+ <template>
2
+ <div ref="rootRef">
3
+ <v-tooltip :text="`Switch to ${target} mode`">
4
+ <template v-slot:activator="{ props }">
5
+ <v-icon
6
+ v-bind="props"
7
+ @click="activeTemplate = target"
8
+ :icon="[icon]"
9
+ ></v-icon>
10
+ </template>
11
+ </v-tooltip>
12
+ </div>
13
+ </template>
14
+
15
+ <script setup>
16
+ import { activeTemplate } from "@/store/states";
17
+ import { mdiViewDashboard } from "@mdi/js";
18
+ import { makePanelTransparent } from "@/composables";
19
+ import { ref } from "vue";
20
+
21
+ defineProps({
22
+ target: {
23
+ type: String,
24
+ default: "main",
25
+ },
26
+ // mdi/js icon
27
+ icon: {
28
+ type: String,
29
+ default: mdiViewDashboard,
30
+ },
31
+ });
32
+
33
+ /** @type {import("vue").Ref<HTMLDivElement|null>} */
34
+ const rootRef = ref(null);
35
+ makePanelTransparent(rootRef);
36
+ </script>
@@ -7,8 +7,10 @@
7
7
  class="fill-height fill-width overflow-none"
8
8
  slot="first"
9
9
  ref="eoxMap"
10
- .config="eoxMapConfig"
11
10
  id="main"
11
+ .animationOptions="animationOptions"
12
+ .center="initialCenter"
13
+ .zoom="initialZoom"
12
14
  .layers="eoxMapLayers"
13
15
  />
14
16
  <eox-map
@@ -16,28 +18,42 @@
16
18
  id="compare"
17
19
  slot="second"
18
20
  ref="compareMap"
19
- .config="eoxCompareMapConfig"
20
21
  .layers="eoxMapCompareLayers"
21
22
  />
22
23
  </eox-map-compare>
23
24
  </template>
24
25
  <script setup>
25
26
  import "@eox/map";
26
- import "@eox/map/dist/eox-map-advanced-layers-and-sources.js";
27
- import { computed, onMounted, ref } from "vue";
28
- import { datetime, mapEl, mapPosition, mapCompareEl } from "@/store/States";
27
+ import "@eox/map/src/plugins/advancedLayersAndSources";
28
+ import { computed, onMounted, ref, toRaw } from "vue";
29
+ import { datetime, mapEl, mapPosition, mapCompareEl } from "@/store/states";
29
30
  import { storeToRefs } from "pinia";
30
31
  import { useSTAcStore } from "@/store/stac";
31
32
  import { eodashCollections, eodashCompareCollections } from "@/utils/states";
32
33
  import { useHandleMapMoveEnd, useInitMap } from "@/composables/EodashMap";
33
-
34
+ import { inAndOut } from "ol/easing.js";
34
35
  const props = defineProps({
35
36
  enableCompare: {
36
37
  type: Boolean,
37
38
  default: false,
38
39
  },
40
+ /** @type {import("vue").PropType<[number,number]>} */
41
+ center: {
42
+ //@ts-expect-error todo
43
+ type: Array,
44
+ default: () => [15, 48],
45
+ },
46
+ zoom: {
47
+ type: Number,
48
+ default: 4,
49
+ },
39
50
  });
40
51
 
52
+ const initialCenter = toRaw([
53
+ mapPosition.value?.[0] ?? props.center?.[0],
54
+ mapPosition.value?.[1] ?? props.center?.[1],
55
+ ]);
56
+ const initialZoom = toRaw(mapPosition.value?.[2] ?? props.zoom);
41
57
  /** @type {import("vue").Ref<Record<string,any>[]>} */
42
58
  const eoxMapLayers = ref([
43
59
  {
@@ -62,32 +78,15 @@ const eoxMapCompareLayers = ref([
62
78
  },
63
79
  ]);
64
80
 
81
+ const animationOptions = {
82
+ duration: 1200,
83
+ easing: inAndOut,
84
+ };
85
+
65
86
  /** @type {import("vue").Ref<(HTMLElement & Record<string,any> & { map:import("ol").Map }) | null>} */
66
87
  const eoxMap = ref(null);
67
88
  /** @type {import("vue").Ref<(HTMLElement & Record<string,any> & { map:import("ol").Map }) | null>} */
68
89
  const compareMap = ref(null);
69
-
70
- const eoxMapConfig = {
71
- /** @type {(number|undefined)[] | undefined} */
72
- center: [15, 48],
73
- /** @type {number | undefined} */
74
- zoom: 4,
75
- };
76
-
77
- const eoxCompareMapConfig = {
78
- /** @type {(number|undefined)[] | undefined} */
79
- center: [15, 48],
80
- /** @type {number | undefined} */
81
- zoom: 4,
82
- };
83
-
84
- // Check if selected indicator was already set in store
85
- if (mapPosition && mapPosition.value && mapPosition.value.length === 3) {
86
- // TODO: do further checks for invalid values?
87
- // TODO: can we expect the values to be in a specific projection
88
- eoxMapConfig.center = [mapPosition.value?.[0], mapPosition.value[1]];
89
- eoxMapConfig.zoom = mapPosition.value[2];
90
- }
91
90
  const { selectedCompareStac } = storeToRefs(useSTAcStore());
92
91
  const showCompare = computed(() =>
93
92
  props.enableCompare && !!selectedCompareStac.value ? "" : "first",
@@ -7,21 +7,44 @@
7
7
  @click="showMapState = !showMapState"
8
8
  />
9
9
  <ExportState v-if="exportMap" v-model="showMapState" />
10
+
10
11
  <v-btn
11
12
  class="map-btn"
12
13
  :icon="[mdiEarthBox]"
13
14
  v-if="changeProjection && !!availableMapProjection"
14
15
  @click="changeMapProjection(availableMapProjection)"
15
16
  />
17
+ <v-btn
18
+ class="map-btn"
19
+ :icon="[mdiCompare]"
20
+ v-if="compareIndicators"
21
+ @click="showCompareIndicators = !showCompareIndicators"
22
+ />
23
+ <PopUp
24
+ v-model="showCompareIndicators"
25
+ :maxWidth="popupWidth"
26
+ :maxHeight="popupHeight"
27
+ >
28
+ <EodashItemFilter
29
+ :enableCompare="true"
30
+ filters-title=""
31
+ results-title="Select an indicator to compare"
32
+ :filter-properties="[]"
33
+ @select="onSelectCompareIndicator"
34
+ />
35
+ </PopUp>
16
36
  </div>
17
37
  </template>
18
38
  <script setup>
19
39
  import { makePanelTransparent } from "@/composables";
20
- import { changeMapProjection } from "@/store/Actions";
21
- import { availableMapProjection } from "@/store/States";
22
- import { mdiEarthBox, mdiMapPlus } from "@mdi/js";
40
+ import { changeMapProjection, setActiveTemplate } from "@/store/actions";
41
+ import { availableMapProjection } from "@/store/states";
42
+ import { mdiCompare, mdiEarthBox, mdiMapPlus } from "@mdi/js";
23
43
  import ExportState from "^/ExportState.vue";
24
- import { ref } from "vue";
44
+ import { computed, ref } from "vue";
45
+ import PopUp from "./PopUp.vue";
46
+ import EodashItemFilter from "./EodashItemFilter.vue";
47
+ import { useDisplay } from "vuetify/lib/framework.mjs";
25
48
 
26
49
  defineProps({
27
50
  exportMap: {
@@ -32,12 +55,26 @@ defineProps({
32
55
  type: Boolean,
33
56
  default: true,
34
57
  },
58
+ compareIndicators: {
59
+ type: Boolean,
60
+ default: true,
61
+ },
35
62
  });
63
+ const { smAndDown } = useDisplay();
64
+ const popupWidth = computed(() => (smAndDown ? "70%" : "500px"));
65
+ const popupHeight = computed(() => (smAndDown ? "90%" : "500px"));
36
66
 
37
67
  const showMapState = ref(false);
68
+ const showCompareIndicators = ref(false);
38
69
 
39
70
  /** @type {import("vue").Ref<HTMLDivElement|null>} */
40
71
  const rootRef = ref(null);
72
+
73
+ const onSelectCompareIndicator = () => {
74
+ setActiveTemplate("compare");
75
+ showCompareIndicators.value = !showCompareIndicators.value;
76
+ };
77
+
41
78
  makePanelTransparent(rootRef);
42
79
  </script>
43
80
  <style scoped>
@@ -0,0 +1,143 @@
1
+ <template>
2
+ <div class="process-container">
3
+ <eox-jsonform
4
+ v-if="jsonformSchema"
5
+ ref="jsonformEl"
6
+ .schema="jsonformSchema"
7
+ ></eox-jsonform>
8
+ <eox-chart
9
+ class="chart"
10
+ v-if="isProcessed && chartSpec"
11
+ .spec="toRaw(chartSpec)"
12
+ .dataValues="toRaw(chartData)"
13
+ />
14
+ <span>
15
+ <v-btn
16
+ v-if="!autoExec"
17
+ :loading="loading"
18
+ style="float: right; margin-right: 20px"
19
+ @click="startProcess"
20
+ color="primary"
21
+ >
22
+ Execute
23
+ </v-btn>
24
+ </span>
25
+ </div>
26
+ </template>
27
+ <script setup>
28
+ import "@eox/chart";
29
+ import "@eox/drawtools";
30
+ import "@eox/jsonform";
31
+
32
+ import { onMounted, ref, toRaw } from "vue";
33
+ import { useSTAcStore } from "@/store/stac";
34
+ import { storeToRefs } from "pinia";
35
+ import { mapEl } from "@/store/states";
36
+ import { useOnLayersUpdate } from "@/composables";
37
+ import { useEventBus } from "@vueuse/core";
38
+ import { eoxLayersKey } from "@/utils/keys";
39
+ import {
40
+ handleProcesses,
41
+ initProcess,
42
+ useAutoExec,
43
+ } from "@/composables/EodashProcess";
44
+
45
+ const layersEvents = useEventBus(eoxLayersKey);
46
+ const { selectedStac } = storeToRefs(useSTAcStore());
47
+
48
+ /** @type {import("vue").Ref<import("vega").Spec|null>} */
49
+ const chartSpec = ref(null);
50
+
51
+ /** @type {import("vue").Ref<Record<string,any>|null>} */
52
+ const chartData = ref(null);
53
+ const isProcessed = ref(false);
54
+
55
+ /** @type {import("vue").Ref<Record<string,any>|null>} */
56
+ const jsonformSchema = ref(null);
57
+
58
+ /** @type {import("vue").Ref<import("@eox/jsonform").EOxJSONForm | null>} */
59
+ const jsonformEl = ref(null);
60
+ const loading = ref(false);
61
+
62
+ const autoExec = ref(false);
63
+
64
+ const isPolling = ref(false);
65
+
66
+ onMounted(async () => {
67
+ // wait for the layers to be rendered
68
+ if (mapEl.value?.layers.length <= 1) {
69
+ layersEvents.once(async () => {
70
+ await initProcess({
71
+ //@ts-expect-error TODO
72
+ selectedStac,
73
+ jsonformEl,
74
+ jsonformSchema,
75
+ chartSpec,
76
+ isProcessed,
77
+ loading,
78
+ isPolling,
79
+ });
80
+ });
81
+ } else {
82
+ await initProcess({
83
+ //@ts-expect-error TODO
84
+ selectedStac,
85
+ jsonformEl,
86
+ jsonformSchema,
87
+ chartSpec,
88
+ isProcessed,
89
+ loading,
90
+ isPolling,
91
+ });
92
+ }
93
+ });
94
+
95
+ useOnLayersUpdate(
96
+ async () =>
97
+ await initProcess({
98
+ //@ts-expect-error TODO
99
+ selectedStac,
100
+ jsonformEl,
101
+ jsonformSchema,
102
+ chartSpec,
103
+ isProcessed,
104
+ loading,
105
+ isPolling,
106
+ }),
107
+ );
108
+
109
+ const startProcess = async () => {
110
+ const errors = jsonformEl.value?.editor.validate();
111
+ if (errors?.length) {
112
+ console.warn("[eodash] Form validation failed", errors);
113
+ return;
114
+ }
115
+ await handleProcesses({
116
+ jsonformEl,
117
+ jsonformSchema,
118
+ chartSpec,
119
+ chartData,
120
+ loading,
121
+ //@ts-expect-error TODO
122
+ selectedStac,
123
+ isProcessed,
124
+ isPolling,
125
+ });
126
+ isProcessed.value = true;
127
+ };
128
+ useAutoExec(autoExec, jsonformEl, jsonformSchema, startProcess);
129
+ </script>
130
+ <style>
131
+ .chart {
132
+ height: 400px;
133
+ width: 100%;
134
+ }
135
+
136
+ .process-container {
137
+ height: 100%;
138
+ overflow-y: auto;
139
+ }
140
+ eox-chart {
141
+ --background-color: transparent;
142
+ }
143
+ </style>
@@ -0,0 +1,82 @@
1
+ <template>
2
+ <div class="flex-grow-1 fill-height overflow-auto">
3
+ <eox-stacinfo
4
+ .for="currentUrl"
5
+ .allowHtml="allowHtml"
6
+ .body="body"
7
+ .featured="featured"
8
+ .footer="footer"
9
+ .styleOverride="styleOverride"
10
+ .header="header"
11
+ .subheader="subheader"
12
+ .tags="tags"
13
+ style="--color-primary-lighter: none"
14
+ >
15
+ </eox-stacinfo>
16
+ </div>
17
+ </template>
18
+
19
+ <script setup>
20
+ import "@eox/stacinfo";
21
+ import { currentUrl } from "@/store/states";
22
+
23
+ const {
24
+ allowHtml,
25
+ featured,
26
+ footer,
27
+ header,
28
+ body,
29
+ styleOverride,
30
+ subheader,
31
+ tags,
32
+ } = defineProps({
33
+ allowHtml: {
34
+ type: Boolean,
35
+ default: true,
36
+ },
37
+
38
+ styleOverride: {
39
+ type: String,
40
+ default: `
41
+ .single-property {columns: 1!important;}
42
+ h1 {margin:0px!important;font-size:16px!important;}
43
+ header h1:after {
44
+ content:' ';
45
+ display:block;
46
+ border:1px solid #d0d0d0;
47
+ }
48
+ h2 {font-size:15px}
49
+ h3 {font-size:14px}
50
+ summary {cursor: pointer;}
51
+ #properties li > .value { font-weight: normal !important;}
52
+ main {padding-bottom: 10px;}
53
+ .footer-container {line-height:1;}
54
+ .footer-container button {margin-top: -10px;}
55
+ .footer-container small {font-size:10px;line-height:1;}`,
56
+ },
57
+ header: {
58
+ type: Array,
59
+ default: () => ["title"],
60
+ },
61
+ tags: {
62
+ type: Array,
63
+ default: () => ["themes"],
64
+ },
65
+ subheader: {
66
+ type: Array,
67
+ default: () => [],
68
+ },
69
+ body: {
70
+ type: Array,
71
+ default: () => ["satellite", "sensor", "agency", "extent"],
72
+ },
73
+ featured: {
74
+ type: Array,
75
+ default: () => ["description", "providers", "assets", "links"],
76
+ },
77
+ footer: {
78
+ type: Array,
79
+ default: () => ["sci:citation"],
80
+ },
81
+ });
82
+ </script>
@@ -0,0 +1,83 @@
1
+ <template>
2
+ <div
3
+ ref="rootEl"
4
+ class="d-flex flex-column fill-height overflow-auto bg-primary"
5
+ >
6
+ <div class="d-flex flex-row justify-space-between pa-4 align-center">
7
+ <v-btn
8
+ v-if="props.showIndicatorsBtn"
9
+ color="secondary"
10
+ class="text-none py-2 px-4"
11
+ :append-icon="[mdiPlus]"
12
+ :text="indicatorBtnText"
13
+ @click="dialog = !dialog"
14
+ >
15
+ </v-btn>
16
+ <EodashLayoutSwitcher
17
+ v-if="props.showLayoutSwitcher"
18
+ :target="layoutTarget"
19
+ :icon="layoutIcon"
20
+ />
21
+ </div>
22
+ <PopUp
23
+ v-model="dialog"
24
+ :maxWidth="popupWidth"
25
+ :width="popupWidth"
26
+ :max-height="popupHeight"
27
+ :height="popupHeight"
28
+ >
29
+ <EodashItemFilter
30
+ class="pa-4"
31
+ results-title=""
32
+ v-bind="props.itemFilterConfig"
33
+ @select="dialog = !dialog"
34
+ />
35
+ </PopUp>
36
+ </div>
37
+ </template>
38
+
39
+ <script setup>
40
+ import PopUp from "^/PopUp.vue";
41
+ import EodashItemFilter from "^/EodashItemFilter.vue";
42
+ import EodashLayoutSwitcher from "^/EodashLayoutSwitcher.vue";
43
+ import { mdiPlus, mdiViewDashboard } from "@mdi/js";
44
+ import { computed, ref } from "vue";
45
+ import { makePanelTransparent } from "@/composables";
46
+ import { useDisplay } from "vuetify/lib/framework.mjs";
47
+
48
+ const dialog = ref(false);
49
+
50
+ const { smAndDown } = useDisplay();
51
+ const popupWidth = computed(() => (smAndDown.value ? "80%" : "1500px"));
52
+ const popupHeight = computed(() => (smAndDown.value ? "90%" : "800px"));
53
+
54
+ const props = defineProps({
55
+ showIndicatorsBtn: {
56
+ type: Boolean,
57
+ default: true,
58
+ },
59
+ showLayoutSwitcher: {
60
+ type: Boolean,
61
+ default: true,
62
+ },
63
+ layoutTarget: {
64
+ type: String,
65
+ default: "light",
66
+ },
67
+ // mdi/js icon
68
+ layoutIcon: {
69
+ type: String,
70
+ default: mdiViewDashboard,
71
+ },
72
+ indicatorBtnText: {
73
+ type: String,
74
+ default: "Select indicator",
75
+ },
76
+ itemFilterConfig: {
77
+ type: Object,
78
+ default: () => {},
79
+ },
80
+ });
81
+ const rootEl = ref(null);
82
+ makePanelTransparent(rootEl);
83
+ </script>
@@ -53,9 +53,9 @@ import { mdiClipboardCheckOutline, mdiContentCopy } from "@mdi/js";
53
53
  import PopUp from "./PopUp.vue";
54
54
  import { copyToClipBoard } from "@/utils";
55
55
  import { computed, ref } from "vue";
56
- import { getLayers as getLayerAction } from "@/store/Actions";
57
- import { mapPosition } from "@/store/States";
58
- import { removeUnneededProperties } from "@/utils/helpers";
56
+ import { getLayers as getLayerAction } from "@/store/actions";
57
+ import { mapPosition } from "@/store/states";
58
+ import { removeUnneededProperties } from "@/eodashSTAC/helpers";
59
59
 
60
60
  const dialog = defineModel({ type: Boolean, required: true, default: false });
61
61
 
package/widgets/PopUp.vue CHANGED
@@ -1,8 +1,7 @@
1
1
  <template>
2
2
  <span>
3
3
  <v-dialog
4
- max-width="500px"
5
- max-height="500px"
4
+ v-bind="config"
6
5
  absolute
7
6
  scrollable
8
7
  scroll-strategy="block"
@@ -34,7 +33,30 @@ const props = defineProps({
34
33
  type: Object,
35
34
  default: undefined,
36
35
  },
36
+ maxWidth: {
37
+ type: String,
38
+ default: "500px",
39
+ },
40
+ maxHeight: {
41
+ type: String,
42
+ default: "500px",
43
+ },
44
+ width: {
45
+ type: String,
46
+ default: "500px",
47
+ },
48
+ height: {
49
+ type: String,
50
+ default: "500px",
51
+ },
37
52
  });
38
53
 
54
+ const config = {
55
+ maxWidth: props.maxWidth,
56
+ maxHeight: props.maxHeight,
57
+ width: props.width,
58
+ height: props.height,
59
+ };
60
+
39
61
  const [definedWidget] = useDefineWidgets([props?.widget]);
40
62
  </script>
@@ -1,23 +0,0 @@
1
- /** @group WebComponent */
2
- type EodashConstructor = import("vue").VueElementConstructor<
3
- import("vue").ExtractPropTypes<{ config: string }>
4
- >;
5
- /**
6
- * Eodash Web Component constructor
7
- *
8
- * @group WebComponent
9
- */
10
- export declare const Eodash: EodashConstructor;
11
- /**
12
- * Registers `eo-dash` as Custom Element in the window
13
- *
14
- * @group WebComponent
15
- */
16
- export declare function register(): void;
17
-
18
- /**
19
- * Eodash store @see EodashStore
20
- *
21
- * @group WebComponent
22
- */
23
- export declare const store: import("./types").EodashStore;