@eodash/eodash 5.7.0 → 5.8.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 (119) hide show
  1. package/core/client/components/EodashOverlay.vue +27 -4
  2. package/core/client/composables/DefineEodash.js +0 -1
  3. package/core/client/composables/DefineWidgets.js +3 -1
  4. package/core/client/eodashSTAC/EodashCollection.js +87 -24
  5. package/core/client/eodashSTAC/cql.js +64 -0
  6. package/core/client/eodashSTAC/createLayers.js +353 -187
  7. package/core/client/eodashSTAC/helpers.js +694 -110
  8. package/core/client/eodashSTAC/mosaic.js +422 -0
  9. package/core/client/plugins/axios.js +31 -1
  10. package/core/client/store/actions.js +1 -1
  11. package/core/client/store/stac.js +54 -4
  12. package/core/client/store/states.js +20 -2
  13. package/core/client/types.ts +152 -28
  14. package/core/client/utils/bands-editor/exampleSchema.json +50 -50
  15. package/core/client/utils/states.js +10 -0
  16. package/dist/client/{DashboardLayout-kRsmsNW5.js → DashboardLayout-DEs4f_Vy.js} +2 -2
  17. package/dist/client/{DynamicWebComponent-CnKhYo0K.js → DynamicWebComponent-PvnV88BA.js} +1 -1
  18. package/dist/client/EodashChart-D-3AGKZY.js +260 -0
  19. package/dist/client/{EodashDatePicker-CMPDT-ce.js → EodashDatePicker-Dm_goZzs.js} +3 -3
  20. package/dist/client/{EodashItemFilter-BpdA8QQa.js → EodashItemFilter-CJy3zYzD.js} +2 -1
  21. package/dist/client/{EodashLayerControl-BHpDA4_0.js → EodashLayerControl-rL8UnpkA.js} +55 -33
  22. package/dist/client/{EodashLayoutSwitcher-B1fRUt7G.js → EodashLayoutSwitcher-ZRlESI9O.js} +3 -3
  23. package/dist/client/{EodashMapBtns-Cpned0tc.js → EodashMapBtns-CG7u2Aq8.js} +227 -112
  24. package/dist/client/EodashStacInfo-CJhhxthD.js +169 -0
  25. package/dist/client/{EodashTools-1zHz26gv.js → EodashTools-CWyK8QJT.js} +4 -4
  26. package/dist/client/{ExportState-DbOm8hBI.js → ExportState-BXhy5TOU.js} +20 -174
  27. package/dist/client/{Footer-BKg-VVkj.js → Footer-DZPvnhcT.js} +1 -1
  28. package/dist/client/{Header-DCrwCvmY.js → Header-CiGsDE_a.js} +2 -2
  29. package/dist/client/{MobileLayout-vWSHpluo.js → MobileLayout-BJHW7x5V.js} +2 -2
  30. package/dist/client/{PopUp-9uimfK49.js → PopUp-7_XnhvCc.js} +4 -168
  31. package/dist/client/{ProcessList-CTTIZa06.js → ProcessList-LL_UCbvc.js} +5 -5
  32. package/dist/client/VDivider-DWYM0WUr.js +168 -0
  33. package/dist/client/{VImg-CrmB76ZY.js → VImg-B75dgw2K.js} +2 -2
  34. package/dist/client/{VMain-OKZNpcEG.js → VMain-DvMmOL4f.js} +1 -1
  35. package/dist/client/{VTooltip-CJw2FyWk.js → VTooltip-ClWHUmWL.js} +2 -2
  36. package/dist/client/{WidgetsContainer-BaWOnE5R.js → WidgetsContainer-BqaWs4ch.js} +1 -1
  37. package/dist/client/{asWebComponent-BHWpMuE3.js → asWebComponent-IZanwL-A.js} +677 -379
  38. package/dist/client/{async-DSKj6g1f.js → async-CiNIOBVz.js} +31 -29
  39. package/dist/client/{create-layers-config-CBoYedqB.js → create-layers-config-3S3y_kZg.js} +17 -17
  40. package/dist/client/dialog-transition-c4ZSnzac.js +170 -0
  41. package/dist/client/eo-dash.js +1 -1
  42. package/dist/client/{forwardRefs-DH51zPUr.js → forwardRefs-B-c1_6yo.js} +8 -87
  43. package/dist/client/{handling-BrcDDlgS.js → handling-NvY8Csry.js} +3 -4
  44. package/dist/client/{helpers-DjZVl_WF.js → helpers-BFuh19CP.js} +1094 -194
  45. package/dist/client/{index-1JKE68n3.js → index-1wMAyuNL.js} +219 -67
  46. package/dist/client/{index-CSG_JoOA.js → index-B8jGJSTA.js} +62 -56
  47. package/dist/client/{index-Cu3-13Xg.js → index-BKQQJkhy.js} +167 -61
  48. package/dist/client/index-D0jUyol8.js +3167 -0
  49. package/dist/client/{index-CUjl-ZsI.js → index-KGxz5Egv.js} +2 -2
  50. package/dist/client/mosaic-vHvSuih6.js +459 -0
  51. package/dist/client/templates.js +251 -121
  52. package/dist/client/{transition-OHcz5Qq1.js → transition-BkyUsZh_.js} +1 -1
  53. package/dist/node/cli.js +5 -5
  54. package/dist/node/types.d.ts +4 -0
  55. package/dist/types/core/client/composables/DefineEodash.d.ts +1 -1
  56. package/dist/types/core/client/eodashSTAC/EodashCollection.d.ts +57 -25
  57. package/dist/types/core/client/eodashSTAC/cql.d.ts +15 -0
  58. package/dist/types/core/client/eodashSTAC/createLayers.d.ts +42 -23
  59. package/dist/types/core/client/eodashSTAC/helpers.d.ts +118 -19
  60. package/dist/types/core/client/eodashSTAC/mosaic.d.ts +56 -0
  61. package/dist/types/core/client/store/stac.d.ts +38 -8
  62. package/dist/types/core/client/store/states.d.ts +24 -2
  63. package/dist/types/core/client/types.d.ts +128 -24
  64. package/dist/types/core/client/utils/states.d.ts +12 -0
  65. package/dist/types/templates/baseConfig.d.ts +1 -100
  66. package/dist/types/templates/compare.d.ts +32 -3
  67. package/dist/types/templates/expert.d.ts +18 -0
  68. package/dist/types/templates/explore.d.ts +10 -1
  69. package/dist/types/templates/lite.d.ts +11 -0
  70. package/dist/types/widgets/EodashChart.vue.d.ts +5 -3
  71. package/dist/types/widgets/EodashItemCatalog/index.vue.d.ts +129 -2
  72. package/dist/types/widgets/EodashItemCatalog/methods/filters.d.ts +28 -6
  73. package/dist/types/widgets/EodashItemCatalog/methods/handlers.d.ts +17 -4
  74. package/dist/types/widgets/EodashItemCatalog/methods/map.d.ts +16 -4
  75. package/dist/types/widgets/EodashLayerControl.vue.d.ts +35 -16
  76. package/dist/types/widgets/EodashMap/EodashMapBtns.vue.d.ts +14 -10
  77. package/dist/types/widgets/EodashMap/index.vue.d.ts +86 -37
  78. package/dist/types/widgets/EodashMap/methods/create-layers-config.d.ts +1 -1
  79. package/dist/types/widgets/EodashMap/methods/index.d.ts +5 -1
  80. package/dist/types/widgets/EodashMap/methods/use-map-loading.d.ts +1 -0
  81. package/dist/types/widgets/EodashProcess/index.vue.d.ts +5 -3
  82. package/dist/types/widgets/EodashProcess/methods/custom-endpoints/layers/eoxhub-workspaces-endpoint.d.ts +1 -1
  83. package/dist/types/widgets/EodashProcess/states.d.ts +1 -1
  84. package/dist/types/widgets/EodashStacInfo.vue.d.ts +20 -0
  85. package/dist/types/widgets/EodashTimeSlider/index.vue.d.ts +20 -0
  86. package/dist/types/widgets/EodashTimeSlider/methods/index.d.ts +3 -8
  87. package/dist/types/widgets/EodashTimeSlider/types.d.ts +6 -16
  88. package/dist/types/widgets/EodashTools.vue.d.ts +5 -5
  89. package/package.json +34 -34
  90. package/templates/baseConfig.js +37 -6
  91. package/templates/compare.js +61 -7
  92. package/templates/expert.js +24 -2
  93. package/templates/explore.js +12 -5
  94. package/templates/lite.js +13 -0
  95. package/widgets/EodashChart.vue +162 -21
  96. package/widgets/EodashItemCatalog/index.vue +363 -35
  97. package/widgets/EodashItemCatalog/methods/filters.js +134 -70
  98. package/widgets/EodashItemCatalog/methods/handlers.js +113 -19
  99. package/widgets/EodashItemCatalog/methods/map.js +141 -28
  100. package/widgets/EodashLayerControl.vue +51 -25
  101. package/widgets/EodashMap/EodashMapBtns.vue +109 -48
  102. package/widgets/EodashMap/index.vue +91 -105
  103. package/widgets/EodashMap/methods/btns.js +64 -31
  104. package/widgets/EodashMap/methods/create-layers-config.js +16 -16
  105. package/widgets/EodashMap/methods/index.js +71 -8
  106. package/widgets/EodashMap/methods/use-map-loading.js +58 -0
  107. package/widgets/EodashProcess/index.vue +136 -16
  108. package/widgets/EodashProcess/methods/composables.js +13 -0
  109. package/widgets/EodashProcess/methods/outputs.js +0 -1
  110. package/widgets/EodashProcess/methods/utils.js +29 -27
  111. package/widgets/EodashProcess/states.js +1 -1
  112. package/widgets/EodashStacInfo.vue +64 -2
  113. package/widgets/EodashTimeSlider/index.vue +58 -2
  114. package/widgets/EodashTimeSlider/methods/index.js +5 -48
  115. package/widgets/EodashTimeSlider/types.ts +7 -17
  116. package/widgets/ExportState.vue +13 -4
  117. package/dist/client/EodashChart-CLDqE93C.js +0 -144
  118. package/dist/client/EodashStacInfo-BQspAHKH.js +0 -107
  119. package/dist/client/index-5Jhsa8Xe.js +0 -570
@@ -0,0 +1,260 @@
1
+ import { computed, ref, watch, nextTick, useTemplateRef, onMounted, onBeforeUnmount, openBlock, createElementBlock, createElementVNode, normalizeStyle, withDirectives, unref, createCommentVNode, toRaw } from 'vue';
2
+ import '@eox/chart';
3
+ import { o as onChartClick } from './handling-NvY8Csry.js';
4
+ import { ah as compareChartData, ai as chartData, $ as compareChartSpec, _ as chartSpec, Z as areChartsSeparateLayout } from './helpers-BFuh19CP.js';
5
+ import { _ as _export_sfc, ad as getOverlayParent } from './asWebComponent-IZanwL-A.js';
6
+ import { mdiArrowCollapse, mdiArrowExpand } from '@mdi/js';
7
+ import { T as Tooltip } from './index-KGxz5Egv.js';
8
+
9
+ const _style_0 = ".bg-surface:has(.eodash-chart-wrapper){height:100%;display:flex;flex-direction:column}";
10
+
11
+ const _style_1 = ".eodash-chart-wrapper[data-v-29f0a1a6]{height:100%;flex-grow:1;min-height:180px;display:flex;flex-direction:column}.chart-frame[data-v-29f0a1a6]{position:relative;flex-grow:1;min-height:180px;display:flex;flex-direction:column}eox-chart[data-v-29f0a1a6]{flex-grow:1;min-height:0}.chart-toggle[data-v-29f0a1a6]{position:absolute;top:8px;right:46px;z-index:2;cursor:pointer}";
12
+
13
+ const _hoisted_1 = {
14
+ ref: "container",
15
+ class: "eodash-chart-wrapper"
16
+ };
17
+ const _hoisted_2 = {
18
+ viewBox: "0 0 20 20",
19
+ width: "20",
20
+ height: "20",
21
+ "aria-hidden": "true"
22
+ };
23
+ const _hoisted_3 = ["d"];
24
+ const _hoisted_4 = [".spec", ".dataValues", ".opt"];
25
+
26
+
27
+ const _sfc_main = {
28
+ __name: 'EodashChart',
29
+ props: {
30
+ enableCompare: {
31
+ type: Boolean,
32
+ default: false,
33
+ },
34
+ vegaEmbedOptions: {
35
+ /** @type {import("vue").PropType<import("vega-embed").EmbedOptions>} */
36
+ type: Object,
37
+ default() {
38
+ return { actions: true };
39
+ },
40
+ },
41
+ },
42
+ setup(__props) {
43
+
44
+
45
+
46
+ const usedChartData = computed(() => {
47
+ return __props.enableCompare ? compareChartData.value : chartData.value;
48
+ });
49
+
50
+ const usedChartSpec = computed(() => {
51
+ return __props.enableCompare ? compareChartSpec.value : chartSpec.value;
52
+ });
53
+
54
+ const hasBindings = computed(() => {
55
+ const spec = usedChartSpec.value;
56
+ if (!spec) return false;
57
+
58
+ // Recursively search for any object with a 'bind' key that represents a physical UI input
59
+ let found = false;
60
+ /** @param {any} obj */
61
+ const searchBindings = (obj) => {
62
+ if (found || !obj || typeof obj !== "object") return;
63
+
64
+ // UI bindings that take up physical DOM space are objects with an 'input' property.
65
+ if (
66
+ "bind" in obj &&
67
+ typeof obj.bind === "object" &&
68
+ obj.bind !== null &&
69
+ "input" in obj.bind
70
+ ) {
71
+ found = true;
72
+ return;
73
+ }
74
+ Object.values(obj).forEach(searchBindings);
75
+ };
76
+ searchBindings(spec);
77
+ return found;
78
+ });
79
+
80
+ const renderedChartSpec = ref(null);
81
+
82
+ watch(
83
+ usedChartSpec,
84
+ (newSpec) => {
85
+ if (!newSpec) {
86
+ renderedChartSpec.value = null;
87
+ return;
88
+ }
89
+
90
+ // Create a deep copy so we can safely mutate it
91
+ const adjustedSpec = JSON.parse(JSON.stringify(newSpec));
92
+
93
+ // Force the chart to be fully responsive to its CSS container
94
+ adjustedSpec.height = "container";
95
+ adjustedSpec.width = "container";
96
+
97
+ // Delay passing the spec to eox-chart until the next DOM update cycle.
98
+ // This ensures the dynamic chartStyles are physically applied
99
+ // to the container BEFORE Vega calculates its canvas size.
100
+ nextTick(() => {
101
+ renderedChartSpec.value = adjustedSpec;
102
+ chartRenderKey.value = Math.random(); // Force eox-chart to completely remount
103
+
104
+ // Force a browser-level resize event after the chart mounts.
105
+ // This tells Vega to re-read the container dimensions once the CSS has finished painting.
106
+ setTimeout(() => {
107
+ window.dispatchEvent(new Event("resize"));
108
+ }, 150);
109
+ });
110
+ },
111
+ { immediate: true },
112
+ );
113
+
114
+ const chartRenderKey = ref(0);
115
+ const containerEl = useTemplateRef("container");
116
+
117
+ /** @type {MutationObserver | null} */
118
+ let observer = null;
119
+ /** @type {number | null} */
120
+ let styleInterval = null;
121
+
122
+ onMounted(() => {
123
+ const el = containerEl.value;
124
+ if (!el) return;
125
+
126
+ // Continuously inject basic styling for the bindings form to make it look decent
127
+ styleInterval = window.setInterval(() => {
128
+ if (el) {
129
+ const eoxChart = el.querySelector("eox-chart");
130
+ if (eoxChart && eoxChart.shadowRoot) {
131
+ if (!eoxChart.shadowRoot.querySelector("#eodash-chart-styles")) {
132
+ const style = document.createElement("style");
133
+ style.id = "eodash-chart-styles";
134
+ style.innerHTML = `
135
+ * {
136
+ box-sizing: border-box !important;
137
+ }
138
+ #vis {
139
+ min-height: 100px !important;
140
+ flex: 1 1 auto !important;
141
+ }
142
+ :host, .vega-embed {
143
+ display: flex !important;
144
+ flex-direction: column !important;
145
+ height: 100% !important;
146
+ padding: 0 !important;
147
+ margin: 0 !important;
148
+ }
149
+ .vega-bindings {
150
+ flex: 0 0 auto !important;
151
+ display: flex !important;
152
+ flex-wrap: wrap;
153
+ gap: 2px !important;
154
+ background: rgba(255, 255, 255, 0.85);
155
+ padding: 6px 12px !important;
156
+ border-radius: 6px;
157
+ box-shadow: 0 2px 5px rgba(0,0,0,0.15);
158
+ margin: 0 !important;
159
+ margin-top: -10px !important;
160
+ z-index: 10;
161
+ }
162
+ .vega-bindings:empty {
163
+ display: none !important;
164
+ }
165
+ .vega-embed > canvas, .vega-embed > svg {
166
+ height: 100% !important;
167
+ max-width: 100% !important;
168
+ object-fit: contain;
169
+ }
170
+ .vega-bind {
171
+ display: flex;
172
+ align-items: center;
173
+ gap: 6px;
174
+ margin-bottom: 0 !important;
175
+ }
176
+ `;
177
+ eoxChart.shadowRoot.appendChild(style);
178
+ }
179
+ }
180
+ }
181
+ }, 200);
182
+
183
+ // For mobile view, handle overlay display changes
184
+ const overlay = getOverlayParent(el);
185
+ if (!overlay) return;
186
+
187
+ observer = new MutationObserver(async () => {
188
+ const style = getComputedStyle(overlay);
189
+ const visible = style.display !== "none";
190
+ if (visible) {
191
+ chartRenderKey.value = Math.random();
192
+ }
193
+ });
194
+
195
+ observer.observe(overlay, {
196
+ attributes: true,
197
+ attributeFilter: ["style", "class"],
198
+ });
199
+ });
200
+
201
+ onBeforeUnmount(() => {
202
+ observer?.disconnect();
203
+ if (styleInterval) window.clearInterval(styleInterval);
204
+ });
205
+
206
+ const chartStyles = computed(() => {
207
+ return {
208
+ height: "100%",
209
+ width: "100%",
210
+ };
211
+ });
212
+
213
+ const toggleIcon = computed(() =>
214
+ areChartsSeparateLayout.value ? mdiArrowCollapse : mdiArrowExpand,
215
+ );
216
+
217
+ function toggleLayout() {
218
+ areChartsSeparateLayout.value = !areChartsSeparateLayout.value;
219
+ }
220
+
221
+ return (_ctx, _cache) => {
222
+
223
+
224
+ return (openBlock(), createElementBlock("div", _hoisted_1, [
225
+ createElementVNode("div", {
226
+ class: "chart-frame",
227
+ style: normalizeStyle({ paddingBottom: hasBindings.value ? '25px' : '0px' })
228
+ }, [
229
+ (usedChartData.value && usedChartSpec.value)
230
+ ? withDirectives((openBlock(), createElementBlock("button", {
231
+ key: 0,
232
+ class: "chart-toggle",
233
+ onClick: toggleLayout
234
+ }, [
235
+ (openBlock(), createElementBlock("svg", _hoisted_2, [
236
+ createElementVNode("path", { d: toggleIcon.value }, null, 8 /* PROPS */, _hoisted_3)
237
+ ]))
238
+ ])), [
239
+ [Tooltip, unref(areChartsSeparateLayout) ? 'Minimize' : 'Maximize']
240
+ ])
241
+ : createCommentVNode("v-if", true),
242
+ (usedChartData.value && renderedChartSpec.value)
243
+ ? (openBlock(), createElementBlock("eox-chart", {
244
+ ".spec": toRaw(renderedChartSpec.value),
245
+ key: chartRenderKey.value,
246
+ ".dataValues": toRaw(usedChartData.value),
247
+ "onClick:item": _cache[0] || (_cache[0] = (...args) => (unref(onChartClick) && unref(onChartClick)(...args))),
248
+ style: normalizeStyle(chartStyles.value),
249
+ ".opt": __props.vegaEmbedOptions
250
+ }, null, 44 /* STYLE, PROPS, NEED_HYDRATION */, _hoisted_4))
251
+ : createCommentVNode("v-if", true)
252
+ ], 4 /* STYLE */)
253
+ ], 512 /* NEED_PATCH */))
254
+ }
255
+ }
256
+
257
+ };
258
+ const EodashChart = /*#__PURE__*/_export_sfc(_sfc_main, [['styles',[_style_0,_style_1]],['__scopeId',"data-v-29f0a1a6"]]);
259
+
260
+ export { EodashChart as default };
@@ -1,11 +1,11 @@
1
1
  import { useCssVars, useTemplateRef, customRef, ref, computed, reactive, watch, onMounted, openBlock, createElementBlock, createVNode, unref, createSlots, withCtx, createElementVNode, withDirectives, createBlock, createCommentVNode, mergeProps, toHandlers } from 'vue';
2
2
  import { DatePicker } from 'v-calendar';
3
- import { _ as _export_sfc, G as useDisplay, H as useSTAcStore, I as useTransparentPanel, J as VBtn, K as VIcon, L as eodashCollections, M as eodashCompareCollections } from './asWebComponent-BHWpMuE3.js';
4
- import { A as datetime } from './helpers-DjZVl_WF.js';
3
+ import { _ as _export_sfc, G as useDisplay, H as useSTAcStore, I as useTransparentPanel, J as VBtn, K as VIcon } from './asWebComponent-IZanwL-A.js';
4
+ import { L as datetime, W as eodashCollections, T as eodashCompareCollections } from './helpers-BFuh19CP.js';
5
5
  import { mdiRayEndArrow, mdiRayStartArrow } from '@mdi/js';
6
6
  import log from 'loglevel';
7
7
  import { storeToRefs } from 'pinia';
8
- import { T as Tooltip } from './index-CUjl-ZsI.js';
8
+ import { T as Tooltip } from './index-KGxz5Egv.js';
9
9
 
10
10
  const _style_0 = ".vc-popover-content{--vc-nav-hover-bg: rgba(var(--v-theme-on-surface), .1);--vc-nav-item-active-color: rgb(var(--v-theme-on-secondary));--vc-nav-item-active-bg: rgba(var(--v-theme-secondary), .8);--vc-focus-ring: 0 0 0 2px rgba(var(--v-theme-secondary), .5)}.vc-container{--vc-day-content-hover-bg: rgba(var(--v-theme-on-surface), .2);--vc-focus-ring: 0 0 0 2px rgba(var(--v-theme-secondary), .4);--vc-header-arrow-hover-bg: rgba(var(--v-theme-secondary), .1)}.vc-attr{--vc-accent-600: rgba(var(--v-theme-secondary), .8)}.datePicker{--vc-day-content-hover-bg: red}@media(min-width:960px){.datePicker{position:absolute;bottom:0;left:0;right:0;margin-inline:auto;width:fit-content}}.vc-day-content{color:#5e5e5e;font-weight:400}.vc-highlight-content-solid{color:#fff!important}.vc-popover-content-wrapper{transform:var(--v518b583c)!important}.vc-date-picker-content,.datePicker{backdrop-filter:blur(10px)!important;border-radius:8px;border:none;box-shadow:0 0 1px #18274b38,0 6px 12px -6px #18274b1f,0 8px 24px -4px #18274b14;background-color:rgba(var(--v-theme-surface),var(--v-surface-opacity, .8))!important}.vc-popover-caret.direction-top.align-left{clip-path:polygon(0% 0%,100% 0%,0% 100%,0% 100%)}.vc-bordered{border:none}";
11
11
 
@@ -1,5 +1,6 @@
1
1
  import { withAsyncContext, computed, ref, openBlock, createElementBlock, mergeProps, unref, createElementVNode, toDisplayString } from 'vue';
2
- import { _ as _export_sfc, H as useSTAcStore, S as isFirstLoad } from './asWebComponent-BHWpMuE3.js';
2
+ import { _ as _export_sfc, H as useSTAcStore } from './asWebComponent-IZanwL-A.js';
3
+ import { P as isFirstLoad } from './helpers-BFuh19CP.js';
3
4
 
4
5
  const _style_0 = "eox-itemfilter[data-v-88d0abc7]{--form-flex-direction: row}@media(max-width:768px){eox-itemfilter[data-v-88d0abc7]{--form-flex-direction: column}}";
5
6
 
@@ -1,9 +1,11 @@
1
- import { withAsyncContext, computed, ref, watch, openBlock, createElementBlock, mergeProps, unref, renderSlot, createElementVNode, toDisplayString, createCommentVNode } from 'vue';
1
+ import { withAsyncContext, computed, ref, openBlock, createElementBlock, mergeProps, unref, createElementVNode, toDisplayString, createCommentVNode, createBlock } from 'vue';
2
2
  import 'color-legend-element';
3
3
  import '@eox/timecontrol';
4
- import { R as mapCompareEl, i as mapEl, S as getColFromLayer } from './helpers-DjZVl_WF.js';
5
- import { _ as _export_sfc, H as useSTAcStore, P as layerControlFormValueCompare, Q as layerControlFormValue, R as useEmitLayersUpdate, M as eodashCompareCollections, L as eodashCollections } from './asWebComponent-BHWpMuE3.js';
4
+ import { a5 as mapCompareEl, q as mapEl, a6 as updateGeoZarrBands, a7 as updateLayerUrl, a8 as layerControlFormValueCompare, a9 as layerControlFormValue, aa as getColFromLayer, T as eodashCompareCollections, W as eodashCollections } from './helpers-BFuh19CP.js';
6
5
  import { storeToRefs } from 'pinia';
6
+ import { _ as _export_sfc, H as useSTAcStore, aa as useEmitLayersUpdate } from './asWebComponent-IZanwL-A.js';
7
+ import _sfc_main$1 from './EodashLayoutSwitcher-ZRlESI9O.js';
8
+ import { mdiViewDashboard } from '@mdi/js';
7
9
 
8
10
  /**
9
11
  * Taken from jQuery 2.1.3
@@ -1367,35 +1369,53 @@ const bandsEditorInterface = [
1367
1369
  },
1368
1370
  ];
1369
1371
 
1370
- const _style_0 = "eox-layercontrol[data-v-cd4de44c]{overflow:auto}";
1372
+ const _style_0 = "eox-layercontrol[data-v-8c6e0291]{overflow:auto}";
1371
1373
 
1372
1374
  const _hoisted_1 = { class: "d-flex flex-column" };
1373
- const _hoisted_2 = ["for", ".customEditorInterfaces"];
1375
+ const _hoisted_2 = ["for", ".colormapRegistry", ".customEditorInterfaces"];
1374
1376
  const _hoisted_3 = {
1375
- key: 0,
1376
- class: "mt-2 mb-2"
1377
+ slot: "layerstitle",
1378
+ class: "d-flex justify-space-between ma-2 pa-2 flex-shrink-0"
1377
1379
  };
1380
+ const _hoisted_4 = { key: 0 };
1378
1381
 
1379
1382
 
1380
1383
  const _sfc_main = {
1381
1384
  __name: 'EodashLayerControl',
1382
1385
  props: {
1386
+ /** Which map instance this control is bound to. Use `"second"` in a compare-mode layout. */
1383
1387
  map: {
1384
1388
  /** @type {import("vue").PropType<"first" | "second">} */
1385
1389
  //@ts-expect-error todo
1386
1390
  type: String,
1387
1391
  default: "first",
1388
1392
  },
1393
+ /** Tool tabs shown inside `eox-layercontrol`. Remove entries to hide individual tabs. */
1389
1394
  tools: {
1390
- type: Array,
1395
+ type: /** @type {import("vue").PropType<string[]>} */ (Array),
1391
1396
  default: () => ["datetime", "info", "config", "legend", "opacity"],
1392
1397
  },
1398
+ /** Heading rendered above the layer list. Set to `false` to hide it. */
1393
1399
  title: {
1394
- type: String || Boolean,
1400
+ type: /** @type {import("vue").PropType<string | false>} */ ([
1401
+ String,
1402
+ Boolean,
1403
+ ]),
1395
1404
  default: "Layers",
1396
1405
  },
1406
+ /** CSS custom-property overrides forwarded to the underlying `eox-layercontrol` element via its `style` attribute. */
1397
1407
  cssVars: {
1398
- type: Object,
1408
+ type: /** @type {import("vue").PropType<Record<string, string>>} */ (
1409
+ Object
1410
+ ),
1411
+ default: {},
1412
+ },
1413
+ layoutIcon: {
1414
+ type: String,
1415
+ default: mdiViewDashboard,
1416
+ },
1417
+ layoutTarget: {
1418
+ type: String,
1399
1419
  },
1400
1420
  },
1401
1421
  async setup(__props) {
@@ -1424,7 +1444,12 @@ const config = {
1424
1444
  style: props.cssVars,
1425
1445
  };
1426
1446
 
1427
- const { selectedCompareStac, selectedStac } = storeToRefs(useSTAcStore());
1447
+ const enableLayoutSwitcher = computed(
1448
+ () => !!props.layoutTarget && !!props.layoutIcon,
1449
+ );
1450
+
1451
+ const { selectedCompareStac, selectedStac, colormapRegistry } =
1452
+ storeToRefs(useSTAcStore());
1428
1453
 
1429
1454
  const showControls = computed(() => {
1430
1455
  if (props.map === "second") {
@@ -1437,23 +1462,12 @@ const eodashCols =
1437
1462
  props.map === "second" ? eodashCompareCollections : eodashCollections;
1438
1463
  const mapElement = props.map === "second" ? mapCompareEl : mapEl;
1439
1464
 
1440
- /** @type { import("vue").Ref<HTMLElement & Record<string,any> | null>} */
1465
+ /** @type { import("vue").Ref<import("@eox/layercontrol").EOxLayerControl | null>} */
1441
1466
  const eoxLayercontrol = ref(null);
1442
1467
 
1443
- // eox-timecontrol re-fires datetime:updated after layer reassignment;
1444
- // dedupe by (collectionId, datetime)
1445
- const processedDatetimes = new Map();
1446
- watch([selectedStac, selectedCompareStac], () => processedDatetimes.clear());
1447
-
1448
1468
  /** @param {CustomEvent<{layer:import('ol/layer').Layer; datetime:string;}>} evt */
1449
1469
  const handleDatetimeUpdate = async (evt) => {
1450
1470
  const { layer, datetime } = evt.detail;
1451
- const collectionId = layer.get("id")?.split(";:;")[0] ?? layer.get("id");
1452
- if (processedDatetimes.get(collectionId) === datetime) return;
1453
- // First event per collection is eox-timecontrol's mount echo.
1454
- const isFirstEvent = !processedDatetimes.has(collectionId);
1455
- processedDatetimes.set(collectionId, datetime);
1456
- if (isFirstEvent) return;
1457
1471
 
1458
1472
  const ec = await getColFromLayer(eodashCols, layer);
1459
1473
 
@@ -1509,6 +1523,9 @@ const debouncedHandleDateTime = (evt) => {
1509
1523
  * @param {Event & {detail:{layer:import("ol/layer").Layer;jsonformValue:Record<string,any>}}} evt
1510
1524
  */
1511
1525
  const onLayerConfigChange = (evt) => {
1526
+ updateGeoZarrBands(evt.detail.layer, evt.detail.jsonformValue);
1527
+ updateLayerUrl(evt.detail.layer, evt.detail.jsonformValue);
1528
+
1512
1529
  if (props.map === "second") {
1513
1530
  layerControlFormValueCompare.value = evt.detail.jsonformValue;
1514
1531
  } else {
@@ -1521,6 +1538,8 @@ return (_ctx, _cache) => {
1521
1538
  (showControls.value)
1522
1539
  ? (openBlock(), createElementBlock("eox-layercontrol", mergeProps({ key: unref(mapElement) }, config, {
1523
1540
  for: unref(mapElement),
1541
+ ".colormapRegistry": unref(colormapRegistry),
1542
+ ".showLayerZoomState": true,
1524
1543
  ".customEditorInterfaces": unref(bandsEditorInterface),
1525
1544
  "onDatetime:updated": debouncedHandleDateTime,
1526
1545
  toolsAsList: "true",
@@ -1528,15 +1547,18 @@ return (_ctx, _cache) => {
1528
1547
  ref: eoxLayercontrol,
1529
1548
  "on:layerConfig:change": onLayerConfigChange
1530
1549
  }), [
1531
- renderSlot(_ctx.$slots, "layerstitle", {}, () => [
1532
- createElementVNode("div", null, [
1533
- (__props.title)
1534
- ? (openBlock(), createElementBlock("p", _hoisted_3, [
1535
- createElementVNode("strong", null, toDisplayString(__props.title), 1 /* TEXT */)
1536
- ]))
1537
- : createCommentVNode("v-if", true)
1538
- ])
1539
- ], true)
1550
+ createElementVNode("span", _hoisted_3, [
1551
+ (__props.title)
1552
+ ? (openBlock(), createElementBlock("h4", _hoisted_4, toDisplayString(__props.title), 1 /* TEXT */))
1553
+ : createCommentVNode("v-if", true),
1554
+ (enableLayoutSwitcher.value)
1555
+ ? (openBlock(), createBlock(_sfc_main$1, {
1556
+ key: 1,
1557
+ target: __props.layoutTarget,
1558
+ icon: __props.layoutIcon
1559
+ }, null, 8 /* PROPS */, ["target", "icon"]))
1560
+ : createCommentVNode("v-if", true)
1561
+ ])
1540
1562
  ], 48 /* FULL_PROPS, NEED_HYDRATION */, _hoisted_2))
1541
1563
  : createCommentVNode("v-if", true)
1542
1564
  ]))
@@ -1544,6 +1566,6 @@ return (_ctx, _cache) => {
1544
1566
  }
1545
1567
 
1546
1568
  };
1547
- const EodashLayerControl = /*#__PURE__*/_export_sfc(_sfc_main, [['styles',[_style_0]],['__scopeId',"data-v-cd4de44c"]]);
1569
+ const EodashLayerControl = /*#__PURE__*/_export_sfc(_sfc_main, [['styles',[_style_0]],['__scopeId',"data-v-8c6e0291"]]);
1548
1570
 
1549
1571
  export { EodashLayerControl as default };
@@ -1,8 +1,8 @@
1
1
  import { ref, openBlock, createElementBlock, unref, createBlock, withCtx, createVNode, mergeProps } from 'vue';
2
- import { C as activeTemplate } from './helpers-DjZVl_WF.js';
2
+ import { N as activeTemplate } from './helpers-BFuh19CP.js';
3
3
  import { mdiViewDashboard } from '@mdi/js';
4
- import { G as useDisplay, I as useTransparentPanel, K as VIcon } from './asWebComponent-BHWpMuE3.js';
5
- import { V as VTooltip } from './VTooltip-CJw2FyWk.js';
4
+ import { G as useDisplay, I as useTransparentPanel, K as VIcon } from './asWebComponent-IZanwL-A.js';
5
+ import { V as VTooltip } from './VTooltip-ClWHUmWL.js';
6
6
 
7
7
  const _sfc_main = {
8
8
  __name: 'EodashLayoutSwitcher',