@eodash/eodash 5.0.0-alpha.2.23 → 5.0.0-alpha.2.25
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.
- package/core/client/eodash.js +2 -2
- package/core/client/store/stac.js +0 -3
- package/core/client/types.d.ts +2 -2
- package/core/client/utils/createLayers.js +24 -6
- package/core/client/utils/eodashSTAC.js +14 -6
- package/core/client/utils/helpers.js +5 -1
- package/dist/client/{DashboardLayout-BZDjLPAM.js → DashboardLayout-jpgby4Eh.js} +2 -2
- package/dist/client/{DynamicWebComponent-B3pcDnnp.js → DynamicWebComponent-Bwrmh0sP.js} +1 -1
- package/dist/client/{EodashDatePicker-CYH67qUf.js → EodashDatePicker-Dv9_y547.js} +3 -3
- package/dist/client/{EodashItemFilter-BPtyEU15.js → EodashItemFilter-CZ5Hdn0p.js} +1 -1
- package/dist/client/{EodashLayerControl-BMulJ7Nu.js → EodashLayerControl-iRPRTWaC.js} +3 -2
- package/dist/client/{EodashMap-CAlmeyEK.js → EodashMap-G1xNg6jB.js} +1 -1
- package/dist/client/{EodashMapBtns-Cb21hoLK.js → EodashMapBtns-DOiv-00v.js} +2 -2
- package/dist/client/{ExportState-Cs26sTpI.js → ExportState-CDovKW7n.js} +4 -4
- package/dist/client/{Footer-DeQud94i.js → Footer-B1O4tw8o.js} +1 -1
- package/dist/client/{Header-BCbNDZVc.js → Header-DDLdUYod.js} +3 -3
- package/dist/client/{MobileLayout-fwxBmlOE.js → MobileLayout-B3QtXpa0.js} +5 -5
- package/dist/client/{PopUp-Cy2yuwTa.js → PopUp-BMd-trL0.js} +3 -3
- package/dist/client/{VImg-CBdK-aqy.js → VImg-knszc_IF.js} +2 -2
- package/dist/client/{VMain-DS_lMGEB.js → VMain-ClWkSR7S.js} +1 -1
- package/dist/client/{VOverlay-Dr3Qyf3n.js → VOverlay-CRTrjcqf.js} +3 -3
- package/dist/client/{WidgetsContainer-C8M-2vnt.js → WidgetsContainer-D4mWWQgi.js} +1 -1
- package/dist/client/{asWebComponent-BNtA1Amp.js → asWebComponent-Cc5OdWN5.js} +51 -24
- package/dist/client/eo-dash.js +1 -1
- package/dist/client/{forwardRefs-CPEcWmMd.js → forwardRefs-DqVLK6M0.js} +1 -1
- package/dist/client/{index-CT6bsa-4.js → index-CuOyaGAl.js} +1 -1
- package/dist/client/{transition-B7l2l8dM.js → transition-gjF7vk5X.js} +1 -1
- package/dist/node/cli.js +1 -1
- package/dist/types/core/client/types.d.ts +2 -2
- package/dist/types/core/client/utils/createLayers.d.ts +3 -2
- package/dist/types/core/client/utils/helpers.d.ts +5 -1
- package/package.json +3 -2
- package/widgets/EodashLayerControl.vue +2 -1
package/core/client/eodash.js
CHANGED
|
@@ -10,8 +10,8 @@ import { currentUrl } from "./store/States";
|
|
|
10
10
|
export const eodash = reactive({
|
|
11
11
|
id: "demo",
|
|
12
12
|
stacEndpoint:
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
"https://eodashcatalog.eox.at/test-style/trilateral/catalog.json",
|
|
14
|
+
// "https://gtif-cerulean.github.io/catalog/cerulean/catalog.json",
|
|
15
15
|
brand: {
|
|
16
16
|
noLayout: true,
|
|
17
17
|
name: "Demo",
|
|
@@ -46,7 +46,6 @@ export const useSTAcStore = defineStore("stac", () => {
|
|
|
46
46
|
/**
|
|
47
47
|
* Fetches root stac catalog and assign it to `stac`
|
|
48
48
|
*
|
|
49
|
-
* @async
|
|
50
49
|
* @param {import("@/types").StacEndpoint} [url=eodash.stacEndpoint] Default
|
|
51
50
|
* is `eodash.stacEndpoint`
|
|
52
51
|
* @returns {Promise<void>}
|
|
@@ -76,7 +75,6 @@ export const useSTAcStore = defineStore("stac", () => {
|
|
|
76
75
|
/**
|
|
77
76
|
* Fetches selected stac object and assign it to `selectedStac`
|
|
78
77
|
*
|
|
79
|
-
* @async
|
|
80
78
|
* @param {string} relativePath - Stac link href
|
|
81
79
|
* @returns {Promise<void>}
|
|
82
80
|
* @see {@link selectedStac}
|
|
@@ -117,7 +115,6 @@ export const useSTAcStore = defineStore("stac", () => {
|
|
|
117
115
|
/**
|
|
118
116
|
* Fetches selected stac object and assign it to `selectedCompareStac`
|
|
119
117
|
*
|
|
120
|
-
* @async
|
|
121
118
|
* @param {string} relativePath - Stac link href
|
|
122
119
|
* @returns {Promise<void>}
|
|
123
120
|
* @see {@link selectedCompareStac}
|
package/core/client/types.d.ts
CHANGED
|
@@ -258,7 +258,7 @@ export interface EodashStore {
|
|
|
258
258
|
getLayers: (el?: string) => object[];
|
|
259
259
|
|
|
260
260
|
/**
|
|
261
|
-
* Register EPSG projection in `eox-map` and adds it to
|
|
261
|
+
* Register EPSG projection in `eox-map` and adds it to `availableMapProjection`
|
|
262
262
|
* */
|
|
263
263
|
registerProjection: (
|
|
264
264
|
code?: number | string | { name: string; def: string },
|
|
@@ -276,4 +276,4 @@ export interface EodashStore {
|
|
|
276
276
|
};
|
|
277
277
|
}
|
|
278
278
|
///////
|
|
279
|
-
export
|
|
279
|
+
export { createEodash, store } from "./main.js";
|
|
@@ -16,6 +16,7 @@ import log from "loglevel";
|
|
|
16
16
|
* @param {import("ol/layer/WebGLTile").Style} [style]
|
|
17
17
|
* @param {Record<string, unknown>} [layerConfig]
|
|
18
18
|
* @param {Record<string, unknown>} [layerDatetime]
|
|
19
|
+
* @param {object | null} [extraProperties]
|
|
19
20
|
**/
|
|
20
21
|
export async function createLayersFromAssets(
|
|
21
22
|
collectionId,
|
|
@@ -25,6 +26,7 @@ export async function createLayersFromAssets(
|
|
|
25
26
|
style,
|
|
26
27
|
layerConfig,
|
|
27
28
|
layerDatetime,
|
|
29
|
+
extraProperties,
|
|
28
30
|
) {
|
|
29
31
|
log.debug("Creating layers from assets");
|
|
30
32
|
let jsonArray = [];
|
|
@@ -64,6 +66,9 @@ export async function createLayersFromAssets(
|
|
|
64
66
|
...(!style?.variables && { style }),
|
|
65
67
|
};
|
|
66
68
|
extractRoles(layer.properties, assets[ast]);
|
|
69
|
+
if (extraProperties !== null) {
|
|
70
|
+
layer.properties = { ...layer.properties, ...extraProperties };
|
|
71
|
+
}
|
|
67
72
|
jsonArray.push(layer);
|
|
68
73
|
} else if (assets[ast]?.type === "image/tiff") {
|
|
69
74
|
geoTIFFIdx = idx;
|
|
@@ -102,14 +107,14 @@ export async function createLayersFromAssets(
|
|
|
102
107
|
* @param {import('stac-ts').StacItem} item
|
|
103
108
|
* @param {string} title
|
|
104
109
|
* @param {Record<string,any>} [layerDatetime]
|
|
105
|
-
* @param {
|
|
110
|
+
* @param {object | null} [extraProperties]
|
|
106
111
|
*/
|
|
107
112
|
export const createLayersFromLinks = async (
|
|
108
113
|
collectionId,
|
|
109
114
|
title,
|
|
110
115
|
item,
|
|
111
116
|
layerDatetime,
|
|
112
|
-
|
|
117
|
+
extraProperties,
|
|
113
118
|
) => {
|
|
114
119
|
log.debug("Creating layers from links");
|
|
115
120
|
/** @type {Record<string,any>[]} */
|
|
@@ -142,6 +147,10 @@ export const createLayersFromLinks = async (
|
|
|
142
147
|
viewProjectionCode,
|
|
143
148
|
);
|
|
144
149
|
log.debug("WMS Layer added", linkId);
|
|
150
|
+
const tileSize =
|
|
151
|
+
"wms:tilesize" in wmsLink
|
|
152
|
+
? [wmsLink["wms:tilesize"], wmsLink["wms:tilesize"]]
|
|
153
|
+
: [512, 512];
|
|
145
154
|
let json = {
|
|
146
155
|
type: "Tile",
|
|
147
156
|
properties: {
|
|
@@ -154,7 +163,7 @@ export const createLayersFromLinks = async (
|
|
|
154
163
|
url: wmsLink.href,
|
|
155
164
|
projection: linkProjectionCode,
|
|
156
165
|
tileGrid: {
|
|
157
|
-
tileSize
|
|
166
|
+
tileSize,
|
|
158
167
|
},
|
|
159
168
|
params: {
|
|
160
169
|
LAYERS: wmsLink["wms:layers"],
|
|
@@ -162,14 +171,17 @@ export const createLayersFromLinks = async (
|
|
|
162
171
|
},
|
|
163
172
|
},
|
|
164
173
|
};
|
|
174
|
+
if ("wms:version" in wmsLink) {
|
|
175
|
+
// @ts-expect-error no type for eox-map
|
|
176
|
+
json.source.params["VERSION"] = wmsLink["wms:version"];
|
|
177
|
+
}
|
|
165
178
|
extractRoles(json.properties, wmsLink);
|
|
166
179
|
if ("wms:dimensions" in wmsLink) {
|
|
167
180
|
// Expand all dimensions into the params attribute
|
|
168
181
|
Object.assign(json.source.params, wmsLink["wms:dimensions"]);
|
|
169
182
|
}
|
|
170
|
-
if (
|
|
171
|
-
|
|
172
|
-
json.properties.description = legendInfo;
|
|
183
|
+
if (extraProperties !== null) {
|
|
184
|
+
json.properties = { ...json.properties, ...extraProperties };
|
|
173
185
|
}
|
|
174
186
|
jsonArray.push(json);
|
|
175
187
|
}
|
|
@@ -253,6 +265,9 @@ export const createLayersFromLinks = async (
|
|
|
253
265
|
};
|
|
254
266
|
}
|
|
255
267
|
extractRoles(json.properties, wmtsLink);
|
|
268
|
+
if (extraProperties !== null) {
|
|
269
|
+
json.properties = { ...json.properties, ...extraProperties };
|
|
270
|
+
}
|
|
256
271
|
jsonArray.push(json);
|
|
257
272
|
}
|
|
258
273
|
|
|
@@ -286,6 +301,9 @@ export const createLayersFromLinks = async (
|
|
|
286
301
|
};
|
|
287
302
|
|
|
288
303
|
extractRoles(json.properties, xyzLink);
|
|
304
|
+
if (extraProperties !== null) {
|
|
305
|
+
json.properties = { ...json.properties, ...extraProperties };
|
|
306
|
+
}
|
|
289
307
|
jsonArray.push(json);
|
|
290
308
|
}
|
|
291
309
|
return jsonArray;
|
|
@@ -167,7 +167,7 @@ export class EodashCollection {
|
|
|
167
167
|
// will try to extract anything it supports but for which we have
|
|
168
168
|
// less control.
|
|
169
169
|
|
|
170
|
-
|
|
170
|
+
let { layerConfig, style } = extractLayerConfig(
|
|
171
171
|
await fetchStyle(item, itemUrl),
|
|
172
172
|
);
|
|
173
173
|
|
|
@@ -188,19 +188,26 @@ export class EodashCollection {
|
|
|
188
188
|
|
|
189
189
|
if (isSupported) {
|
|
190
190
|
// Checking for potential legend asset
|
|
191
|
-
let
|
|
191
|
+
let extraProperties = null;
|
|
192
192
|
if (this.#collectionStac?.assets?.legend?.href) {
|
|
193
|
-
|
|
194
|
-
|
|
193
|
+
extraProperties = {
|
|
194
|
+
description: `<div style="text-align:center; width: 100%">
|
|
195
195
|
<img src="${this.#collectionStac.assets.legend.href}" style="max-height:70px; margin-top:-15px; margin-bottom:-20px;" />
|
|
196
|
-
</div
|
|
196
|
+
</div>`,
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
// Check if collection has eox:colorlegend definition, if yes overwrite legend description
|
|
200
|
+
if (this.#collectionStac && this.#collectionStac["eox:colorlegend"]) {
|
|
201
|
+
extraProperties = {
|
|
202
|
+
layerLegend: this.#collectionStac["eox:colorlegend"],
|
|
203
|
+
};
|
|
197
204
|
}
|
|
198
205
|
const links = await createLayersFromLinks(
|
|
199
206
|
this.#collectionStac?.id ?? "",
|
|
200
207
|
title,
|
|
201
208
|
item,
|
|
202
209
|
layerDatetime,
|
|
203
|
-
|
|
210
|
+
extraProperties,
|
|
204
211
|
);
|
|
205
212
|
jsonArray.push(
|
|
206
213
|
...links,
|
|
@@ -212,6 +219,7 @@ export class EodashCollection {
|
|
|
212
219
|
style,
|
|
213
220
|
layerConfig,
|
|
214
221
|
layerDatetime,
|
|
222
|
+
extraProperties,
|
|
215
223
|
)),
|
|
216
224
|
);
|
|
217
225
|
} else {
|
|
@@ -43,7 +43,7 @@ export function generateFeatures(links) {
|
|
|
43
43
|
return geojsonObject;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
/** @param { import("ol/layer/WebGLTile").Style & { jsonform?: Record<string,any> } } [style] */
|
|
46
|
+
/** @param { import("ol/layer/WebGLTile").Style & { jsonform?: Record<string,any> } & { legend?: Record<string,any> } } [style] */
|
|
47
47
|
export function extractLayerConfig(style) {
|
|
48
48
|
/** @type {Record<string,unknown> | undefined} */
|
|
49
49
|
let layerConfig = undefined;
|
|
@@ -51,6 +51,10 @@ export function extractLayerConfig(style) {
|
|
|
51
51
|
layerConfig = { schema: style.jsonform, type: "style" };
|
|
52
52
|
style = { ...style };
|
|
53
53
|
delete style.jsonform;
|
|
54
|
+
if (style?.legend) {
|
|
55
|
+
layerConfig.legend = style.legend;
|
|
56
|
+
delete style.legend;
|
|
57
|
+
}
|
|
54
58
|
}
|
|
55
59
|
log.debug(
|
|
56
60
|
"extracted layerConfig",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { inject, openBlock, createBlock, withCtx, createElementVNode, unref, createElementBlock, Suspense, resolveDynamicComponent, mergeProps, createCommentVNode, Fragment, renderList, Transition } from 'vue';
|
|
2
|
-
import { _ as _export_sfc, F as eodashKey, G as useDefineWidgets } from './asWebComponent-
|
|
2
|
+
import { _ as _export_sfc, F as eodashKey, G as useDefineWidgets } from './asWebComponent-Cc5OdWN5.js';
|
|
3
3
|
import '@eox/layout';
|
|
4
|
-
import { V as VMain } from './VMain-
|
|
4
|
+
import { V as VMain } from './VMain-ClWkSR7S.js';
|
|
5
5
|
|
|
6
6
|
const _hoisted_1 = ["gap"];
|
|
7
7
|
const _hoisted_2 = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { withAsyncContext, ref, onMounted, onUnmounted, openBlock, createElementBlock, createBlock, resolveDynamicComponent, mergeProps } from 'vue';
|
|
2
|
-
import { $ as useSTAcStore } from './asWebComponent-
|
|
2
|
+
import { $ as useSTAcStore } from './asWebComponent-Cc5OdWN5.js';
|
|
3
3
|
|
|
4
4
|
const _hoisted_1 = { class: "d-flex flex-column fill-height overflow-auto" };
|
|
5
5
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { computed, ref, mergeProps, createVNode, resolveComponent, render, h, useCssVars, customRef, reactive, watch, onMounted, openBlock, createElementBlock, Fragment, unref, createSlots, withCtx, createElementVNode, toHandlers, withDirectives, createBlock } from 'vue';
|
|
2
2
|
import { DatePicker } from 'v-calendar';
|
|
3
3
|
import { storeToRefs } from 'pinia';
|
|
4
|
-
import { p as propsFactory, o as omit, g as genericComponent, j as useProxiedModel, Y as getUid, a as useRender, E as isObject, Z as datetime, $ as useSTAcStore, a0 as eodashCollections, a1 as VRow, V as VBtn, y as VIcon } from './asWebComponent-
|
|
4
|
+
import { p as propsFactory, o as omit, g as genericComponent, j as useProxiedModel, Y as getUid, a as useRender, E as isObject, Z as datetime, $ as useSTAcStore, a0 as eodashCollections, a1 as VRow, V as VBtn, y as VIcon } from './asWebComponent-Cc5OdWN5.js';
|
|
5
5
|
import { mdiRayEndArrow, mdiRayStartArrow } from '@mdi/js';
|
|
6
6
|
import log from 'loglevel';
|
|
7
|
-
import { m as makeVOverlayProps, V as VOverlay } from './VOverlay-
|
|
8
|
-
import { b as useScopeId, f as forwardRefs } from './forwardRefs-
|
|
7
|
+
import { m as makeVOverlayProps, V as VOverlay } from './VOverlay-CRTrjcqf.js';
|
|
8
|
+
import { b as useScopeId, f as forwardRefs } from './forwardRefs-DqVLK6M0.js';
|
|
9
9
|
|
|
10
10
|
const makeVTooltipProps = propsFactory({
|
|
11
11
|
id: String,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref, onMounted, openBlock, createElementBlock, mergeProps, createElementVNode, toDisplayString } from 'vue';
|
|
2
|
-
import { $ as useSTAcStore } from './asWebComponent-
|
|
2
|
+
import { $ as useSTAcStore } from './asWebComponent-Cc5OdWN5.js';
|
|
3
3
|
import '@eox/itemfilter';
|
|
4
4
|
|
|
5
5
|
const _hoisted_1 = {
|
|
@@ -2,7 +2,8 @@ import { computed, ref, openBlock, createElementBlock, unref, createCommentVNode
|
|
|
2
2
|
import '@eox/layercontrol';
|
|
3
3
|
import '@eox/jsonform';
|
|
4
4
|
import '@eox/timecontrol';
|
|
5
|
-
import
|
|
5
|
+
import 'color-legend-element';
|
|
6
|
+
import { $ as useSTAcStore, a2 as mapCompareEl, a3 as mapEl, a4 as eodashCompareCollections, a0 as eodashCollections, a5 as getColFromLayer } from './asWebComponent-Cc5OdWN5.js';
|
|
6
7
|
import { storeToRefs } from 'pinia';
|
|
7
8
|
|
|
8
9
|
const _hoisted_1 = { class: "d-flex flex-column fill-height overflow-auto" };
|
|
@@ -94,7 +95,7 @@ return (_ctx, _cache) => {
|
|
|
94
95
|
? (openBlock(), createElementBlock("eox-layercontrol", {
|
|
95
96
|
key: 0,
|
|
96
97
|
for: unref(mapElement),
|
|
97
|
-
".tools": ['datetime', 'info', 'config', 'opacity'],
|
|
98
|
+
".tools": ['datetime', 'info', 'config', 'legend', 'opacity'],
|
|
98
99
|
"onDatetime:updated": debouncedHandleDateTime,
|
|
99
100
|
class: "fill-height",
|
|
100
101
|
toolsAsList: "true",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { onMounted, onUnmounted, watch, ref, computed, openBlock, createElementBlock, createElementVNode } from 'vue';
|
|
2
2
|
import '@eox/map';
|
|
3
3
|
import '@eox/map/dist/eox-map-advanced-layers-and-sources.js';
|
|
4
|
-
import { $ as useSTAcStore, a6 as setMapProjFromCol, a7 as EodashCollection, a8 as mapPosition, a3 as mapEl, a2 as mapCompareEl, Z as datetime, a4 as eodashCompareCollections, a0 as eodashCollections } from './asWebComponent-
|
|
4
|
+
import { $ as useSTAcStore, a6 as setMapProjFromCol, a7 as EodashCollection, a8 as mapPosition, a3 as mapEl, a2 as mapCompareEl, Z as datetime, a4 as eodashCompareCollections, a0 as eodashCollections } from './asWebComponent-Cc5OdWN5.js';
|
|
5
5
|
import { storeToRefs } from 'pinia';
|
|
6
6
|
import log from 'loglevel';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ref, openBlock, createElementBlock, createBlock, unref, createCommentVNode } from 'vue';
|
|
2
|
-
import { _ as _export_sfc, a9 as makePanelTransparent, V as VBtn, aa as availableMapProjection, ab as changeMapProjection } from './asWebComponent-
|
|
2
|
+
import { _ as _export_sfc, a9 as makePanelTransparent, V as VBtn, aa as availableMapProjection, ab as changeMapProjection } from './asWebComponent-Cc5OdWN5.js';
|
|
3
3
|
import { mdiMapPlus, mdiEarthBox } from '@mdi/js';
|
|
4
|
-
import ExportState from './ExportState-
|
|
4
|
+
import ExportState from './ExportState-CDovKW7n.js';
|
|
5
5
|
|
|
6
6
|
const _sfc_main = {
|
|
7
7
|
__name: 'EodashMapBtns',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createVNode, Fragment, computed, withDirectives, mergeProps, resolveDirective, toRef, mergeModels, useModel, ref, openBlock, createBlock, withCtx, createElementVNode, createTextVNode, toDisplayString, unref, createElementBlock, createCommentVNode, renderList } from 'vue';
|
|
2
2
|
import { mdiClipboardCheckOutline, mdiContentCopy } from '@mdi/js';
|
|
3
|
-
import _sfc_main$1 from './PopUp-
|
|
4
|
-
import { ac as createSimpleFunctional, g as genericComponent, b as makeComponentProps, D as provideDefaults, a as useRender, p as propsFactory, c as makeTagProps, I as IconValue, L as makeBorderProps, A as makeDensityProps, N as makeRoundedProps, ad as makeSizeProps, d as makeThemeProps, ae as makeVariantProps, e as provideTheme, O as useBorder, af as useVariant, B as useDensity, Q as useRounded, ag as useSize, y as VIcon, R as VDefaultsProvider, ah as genOverlays, J as makeDimensionProps, M as makeElevationProps, ai as makeLoaderProps, aj as makeLocationProps, ak as makePositionProps, al as makeRouterProps, am as Ripple, K as useDimension, P as useElevation, an as useLoader, ao as useLocation, ap as usePosition, aq as useLink, ar as LoaderSlot, u as useTextColor, q as convertToUnit, _ as _export_sfc, as as getLayers, a8 as mapPosition, at as removeUnneededProperties, a1 as VRow, au as VCol, V as VBtn, av as copyToClipBoard } from './asWebComponent-
|
|
5
|
-
import { a as VExpandTransition } from './index-
|
|
6
|
-
import { V as VImg } from './VImg-
|
|
3
|
+
import _sfc_main$1 from './PopUp-BMd-trL0.js';
|
|
4
|
+
import { ac as createSimpleFunctional, g as genericComponent, b as makeComponentProps, D as provideDefaults, a as useRender, p as propsFactory, c as makeTagProps, I as IconValue, L as makeBorderProps, A as makeDensityProps, N as makeRoundedProps, ad as makeSizeProps, d as makeThemeProps, ae as makeVariantProps, e as provideTheme, O as useBorder, af as useVariant, B as useDensity, Q as useRounded, ag as useSize, y as VIcon, R as VDefaultsProvider, ah as genOverlays, J as makeDimensionProps, M as makeElevationProps, ai as makeLoaderProps, aj as makeLocationProps, ak as makePositionProps, al as makeRouterProps, am as Ripple, K as useDimension, P as useElevation, an as useLoader, ao as useLocation, ap as usePosition, aq as useLink, ar as LoaderSlot, u as useTextColor, q as convertToUnit, _ as _export_sfc, as as getLayers, a8 as mapPosition, at as removeUnneededProperties, a1 as VRow, au as VCol, V as VBtn, av as copyToClipBoard } from './asWebComponent-Cc5OdWN5.js';
|
|
5
|
+
import { a as VExpandTransition } from './index-CuOyaGAl.js';
|
|
6
|
+
import { V as VImg } from './VImg-knszc_IF.js';
|
|
7
7
|
|
|
8
8
|
// Styles
|
|
9
9
|
const VSpacer = createSimpleFunctional('v-spacer', 'div', 'VSpacer');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref, toRef, shallowRef, computed, createVNode, watchEffect, inject, openBlock, createBlock, unref, withCtx, createElementVNode, toDisplayString, createTextVNode } from 'vue';
|
|
2
|
-
import { p as propsFactory, L as makeBorderProps, b as makeComponentProps, M as makeElevationProps, U as makeLayoutItemProps, N as makeRoundedProps, c as makeTagProps, d as makeThemeProps, g as genericComponent, e as provideTheme, C as useBackgroundColor, O as useBorder, P as useElevation, Q as useRounded, v as useResizeObserver, W as useToggleScope, a as useRender, q as convertToUnit, X as useLayoutItem, _ as _export_sfc, F as eodashKey, t as useDisplay } from './asWebComponent-
|
|
2
|
+
import { p as propsFactory, L as makeBorderProps, b as makeComponentProps, M as makeElevationProps, U as makeLayoutItemProps, N as makeRoundedProps, c as makeTagProps, d as makeThemeProps, g as genericComponent, e as provideTheme, C as useBackgroundColor, O as useBorder, P as useElevation, Q as useRounded, v as useResizeObserver, W as useToggleScope, a as useRender, q as convertToUnit, X as useLayoutItem, _ as _export_sfc, F as eodashKey, t as useDisplay } from './asWebComponent-Cc5OdWN5.js';
|
|
3
3
|
|
|
4
4
|
const makeVFooterProps = propsFactory({
|
|
5
5
|
app: Boolean,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createVNode, toRef, shallowRef, computed, ref, watch, onMounted, onBeforeUnmount, mergeProps, watchEffect, inject, openBlock, createBlock, withCtx, createTextVNode, toDisplayString, unref } from 'vue';
|
|
2
|
-
import { p as propsFactory, b as makeComponentProps, c as makeTagProps, g as genericComponent, a as useRender, L as makeBorderProps, M as makeElevationProps, N as makeRoundedProps, d as makeThemeProps, C as useBackgroundColor, O as useBorder, P as useElevation, Q as useRounded, e as provideTheme, f as useRtl, D as provideDefaults, R as VDefaultsProvider, q as convertToUnit, S as clamp, T as consoleWarn, U as makeLayoutItemProps, j as useProxiedModel, W as useToggleScope, X as useLayoutItem, _ as _export_sfc, F as eodashKey } from './asWebComponent-
|
|
3
|
-
import { a as VExpandTransition } from './index-
|
|
4
|
-
import { V as VImg } from './VImg-
|
|
2
|
+
import { p as propsFactory, b as makeComponentProps, c as makeTagProps, g as genericComponent, a as useRender, L as makeBorderProps, M as makeElevationProps, N as makeRoundedProps, d as makeThemeProps, C as useBackgroundColor, O as useBorder, P as useElevation, Q as useRounded, e as provideTheme, f as useRtl, D as provideDefaults, R as VDefaultsProvider, q as convertToUnit, S as clamp, T as consoleWarn, U as makeLayoutItemProps, j as useProxiedModel, W as useToggleScope, X as useLayoutItem, _ as _export_sfc, F as eodashKey } from './asWebComponent-Cc5OdWN5.js';
|
|
3
|
+
import { a as VExpandTransition } from './index-CuOyaGAl.js';
|
|
4
|
+
import { V as VImg } from './VImg-knszc_IF.js';
|
|
5
5
|
import { u as useSsrBoot } from './ssrBoot-BP7SYRyC.js';
|
|
6
6
|
|
|
7
7
|
const makeVToolbarTitleProps = propsFactory({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ref, computed, createVNode, mergeProps, Fragment, shallowRef, watch, provide, withDirectives, resolveDirective, inject, vShow, nextTick, toRef, useCssVars, onMounted, openBlock, createBlock, withCtx, Suspense, unref, resolveDynamicComponent, createCommentVNode, createElementBlock, renderList, createTextVNode, createElementVNode, toDisplayString } from 'vue';
|
|
2
|
-
import { k as keys, p as propsFactory, o as omit, m as makeVBtnProps, g as genericComponent, u as useTextColor, a as useRender, V as VBtn, b as makeComponentProps, c as makeTagProps, d as makeThemeProps, e as provideTheme, f as useRtl, h as useLocale, i as useGroup, j as useProxiedModel, l as makeGroupItemProps, n as useGroupItem, q as convertToUnit, I as IconValue, r as makeDisplayProps, s as makeGroupProps, t as useDisplay, v as useResizeObserver, w as useGoTo, x as IN_BROWSER, y as VIcon, z as focusableChildren, A as makeDensityProps, B as useDensity, C as useBackgroundColor, D as provideDefaults, E as isObject, _ as _export_sfc, F as eodashKey, G as useDefineWidgets, H as useLayout } from './asWebComponent-
|
|
3
|
-
import { V as VMain } from './VMain-
|
|
4
|
-
import { f as forwardRefs, a as animate, s as standardEasing, m as makeLazyProps, u as useLazy, b as useScopeId } from './forwardRefs-
|
|
2
|
+
import { k as keys, p as propsFactory, o as omit, m as makeVBtnProps, g as genericComponent, u as useTextColor, a as useRender, V as VBtn, b as makeComponentProps, c as makeTagProps, d as makeThemeProps, e as provideTheme, f as useRtl, h as useLocale, i as useGroup, j as useProxiedModel, l as makeGroupItemProps, n as useGroupItem, q as convertToUnit, I as IconValue, r as makeDisplayProps, s as makeGroupProps, t as useDisplay, v as useResizeObserver, w as useGoTo, x as IN_BROWSER, y as VIcon, z as focusableChildren, A as makeDensityProps, B as useDensity, C as useBackgroundColor, D as provideDefaults, E as isObject, _ as _export_sfc, F as eodashKey, G as useDefineWidgets, H as useLayout } from './asWebComponent-Cc5OdWN5.js';
|
|
3
|
+
import { V as VMain } from './VMain-ClWkSR7S.js';
|
|
4
|
+
import { f as forwardRefs, a as animate, s as standardEasing, m as makeLazyProps, u as useLazy, b as useScopeId } from './forwardRefs-DqVLK6M0.js';
|
|
5
5
|
import { u as useSsrBoot } from './ssrBoot-BP7SYRyC.js';
|
|
6
|
-
import { M as MaybeTransition } from './transition-
|
|
7
|
-
import { V as VFadeTransition } from './index-
|
|
6
|
+
import { M as MaybeTransition } from './transition-gjF7vk5X.js';
|
|
7
|
+
import { V as VFadeTransition } from './index-CuOyaGAl.js';
|
|
8
8
|
|
|
9
9
|
// Utilities
|
|
10
10
|
const handleGesture = wrapper => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createVNode, Transition, mergeProps, ref, watch, nextTick, toRef, mergeModels, useModel, openBlock, createElementBlock, withCtx, createBlock, resolveDynamicComponent, unref, createCommentVNode, renderSlot } from 'vue';
|
|
2
|
-
import { g as genericComponent, p as propsFactory, j as useProxiedModel, x as IN_BROWSER, a as useRender, z as focusableChildren, R as VDefaultsProvider, L as makeBorderProps, b as makeComponentProps, J as makeDimensionProps, M as makeElevationProps, aj as makeLocationProps, ak as makePositionProps, N as makeRoundedProps, c as makeTagProps, d as makeThemeProps, e as provideTheme, C as useBackgroundColor, O as useBorder, K as useDimension, P as useElevation, ao as useLocation, ap as usePosition, Q as useRounded, G as useDefineWidgets } from './asWebComponent-
|
|
3
|
-
import { m as makeVOverlayProps, V as VOverlay } from './VOverlay-
|
|
4
|
-
import { a as animate, d as deceleratedEasing, s as standardEasing, c as acceleratedEasing, g as getTargetBox, n as nullifyTransforms, b as useScopeId, f as forwardRefs } from './forwardRefs-
|
|
2
|
+
import { g as genericComponent, p as propsFactory, j as useProxiedModel, x as IN_BROWSER, a as useRender, z as focusableChildren, R as VDefaultsProvider, L as makeBorderProps, b as makeComponentProps, J as makeDimensionProps, M as makeElevationProps, aj as makeLocationProps, ak as makePositionProps, N as makeRoundedProps, c as makeTagProps, d as makeThemeProps, e as provideTheme, C as useBackgroundColor, O as useBorder, K as useDimension, P as useElevation, ao as useLocation, ap as usePosition, Q as useRounded, G as useDefineWidgets } from './asWebComponent-Cc5OdWN5.js';
|
|
3
|
+
import { m as makeVOverlayProps, V as VOverlay } from './VOverlay-CRTrjcqf.js';
|
|
4
|
+
import { a as animate, d as deceleratedEasing, s as standardEasing, c as acceleratedEasing, g as getTargetBox, n as nullifyTransforms, b as useScopeId, f as forwardRefs } from './forwardRefs-DqVLK6M0.js';
|
|
5
5
|
|
|
6
6
|
const makeVDialogTransitionProps = propsFactory({
|
|
7
7
|
target: [Object, Array]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createVNode, computed, toRef, shallowRef, ref, watch, onBeforeMount, nextTick, onBeforeUnmount, withDirectives, mergeProps, Fragment, resolveDirective, vShow } from 'vue';
|
|
2
|
-
import { aw as SUPPORTS_INTERSECTION, p as propsFactory, b as makeComponentProps, J as makeDimensionProps, g as genericComponent, K as useDimension, a as useRender, N as makeRoundedProps, C as useBackgroundColor, Q as useRounded, ax as getCurrentInstance, q as convertToUnit } from './asWebComponent-
|
|
3
|
-
import { m as makeTransitionProps, M as MaybeTransition } from './transition-
|
|
2
|
+
import { aw as SUPPORTS_INTERSECTION, p as propsFactory, b as makeComponentProps, J as makeDimensionProps, g as genericComponent, K as useDimension, a as useRender, N as makeRoundedProps, C as useBackgroundColor, Q as useRounded, ax as getCurrentInstance, q as convertToUnit } from './asWebComponent-Cc5OdWN5.js';
|
|
3
|
+
import { m as makeTransitionProps, M as MaybeTransition } from './transition-gjF7vk5X.js';
|
|
4
4
|
|
|
5
5
|
// Utilities
|
|
6
6
|
function mounted(el, binding) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createVNode } from 'vue';
|
|
2
|
-
import { p as propsFactory, b as makeComponentProps, J as makeDimensionProps, c as makeTagProps, g as genericComponent, K as useDimension, H as useLayout, a as useRender } from './asWebComponent-
|
|
2
|
+
import { p as propsFactory, b as makeComponentProps, J as makeDimensionProps, c as makeTagProps, g as genericComponent, K as useDimension, H as useLayout, a as useRender } from './asWebComponent-Cc5OdWN5.js';
|
|
3
3
|
import { u as useSsrBoot } from './ssrBoot-BP7SYRyC.js';
|
|
4
4
|
|
|
5
5
|
const makeVMainProps = propsFactory({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ref, watch, onScopeDispose, computed, nextTick, watchEffect, effectScope, inject, mergeProps, shallowRef, onMounted, reactive, provide, readonly, toRaw, warn, toRef, onBeforeUnmount, createVNode, Fragment, Teleport, withDirectives, vShow, resolveDirective, Transition } from 'vue';
|
|
2
|
-
import { ay as isOn, az as eventName, p as propsFactory, x as IN_BROWSER, W as useToggleScope, aA as destructComputed, aB as parseAnchor, aC as flipSide, aD as flipAlign, aE as flipCorner, aF as consoleError, aG as getAxis, q as convertToUnit, S as clamp, aH as defer, ax as getCurrentInstance, aI as templateRef, aJ as matchesSelector, t as useDisplay, b as makeComponentProps, J as makeDimensionProps, d as makeThemeProps, g as genericComponent, j as useProxiedModel, e as provideTheme, f as useRtl, C as useBackgroundColor, K as useDimension, aK as useRouter, a as useRender, aL as useBackButton } from './asWebComponent-
|
|
3
|
-
import { g as getTargetBox, B as Box, e as getOverflow, n as nullifyTransforms, m as makeLazyProps, u as useLazy, b as useScopeId, a as animate, s as standardEasing } from './forwardRefs-
|
|
4
|
-
import { m as makeTransitionProps, M as MaybeTransition } from './transition-
|
|
2
|
+
import { ay as isOn, az as eventName, p as propsFactory, x as IN_BROWSER, W as useToggleScope, aA as destructComputed, aB as parseAnchor, aC as flipSide, aD as flipAlign, aE as flipCorner, aF as consoleError, aG as getAxis, q as convertToUnit, S as clamp, aH as defer, ax as getCurrentInstance, aI as templateRef, aJ as matchesSelector, t as useDisplay, b as makeComponentProps, J as makeDimensionProps, d as makeThemeProps, g as genericComponent, j as useProxiedModel, e as provideTheme, f as useRtl, C as useBackgroundColor, K as useDimension, aK as useRouter, a as useRender, aL as useBackButton } from './asWebComponent-Cc5OdWN5.js';
|
|
3
|
+
import { g as getTargetBox, B as Box, e as getOverflow, n as nullifyTransforms, m as makeLazyProps, u as useLazy, b as useScopeId, a as animate, s as standardEasing } from './forwardRefs-DqVLK6M0.js';
|
|
4
|
+
import { m as makeTransitionProps, M as MaybeTransition } from './transition-gjF7vk5X.js';
|
|
5
5
|
|
|
6
6
|
// Utilities
|
|
7
7
|
const handlers = new WeakMap();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ref, onMounted, nextTick, openBlock, createElementBlock, Fragment, renderList, unref, createElementVNode, toDisplayString, normalizeStyle, createBlock, resolveDynamicComponent, mergeProps } from 'vue';
|
|
2
|
-
import { G as useDefineWidgets, H as useLayout } from './asWebComponent-
|
|
2
|
+
import { G as useDefineWidgets, H as useLayout } from './asWebComponent-Cc5OdWN5.js';
|
|
3
3
|
import 'animated-details';
|
|
4
4
|
|
|
5
5
|
const _sfc_main = {
|
|
@@ -3830,7 +3830,7 @@ function generateFeatures(links) {
|
|
|
3830
3830
|
return geojsonObject;
|
|
3831
3831
|
}
|
|
3832
3832
|
|
|
3833
|
-
/** @param { import("ol/layer/WebGLTile").Style & { jsonform?: Record<string,any> } } [style] */
|
|
3833
|
+
/** @param { import("ol/layer/WebGLTile").Style & { jsonform?: Record<string,any> } & { legend?: Record<string,any> } } [style] */
|
|
3834
3834
|
function extractLayerConfig(style) {
|
|
3835
3835
|
/** @type {Record<string,unknown> | undefined} */
|
|
3836
3836
|
let layerConfig = undefined;
|
|
@@ -3838,6 +3838,10 @@ function extractLayerConfig(style) {
|
|
|
3838
3838
|
layerConfig = { schema: style.jsonform, type: "style" };
|
|
3839
3839
|
style = { ...style };
|
|
3840
3840
|
delete style.jsonform;
|
|
3841
|
+
if (style?.legend) {
|
|
3842
|
+
layerConfig.legend = style.legend;
|
|
3843
|
+
delete style.legend;
|
|
3844
|
+
}
|
|
3841
3845
|
}
|
|
3842
3846
|
log.debug(
|
|
3843
3847
|
"extracted layerConfig",
|
|
@@ -4236,8 +4240,8 @@ const __vite_glob_0_0 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.definePro
|
|
|
4236
4240
|
const eodash = reactive({
|
|
4237
4241
|
id: "demo",
|
|
4238
4242
|
stacEndpoint:
|
|
4239
|
-
|
|
4240
|
-
|
|
4243
|
+
"https://eodashcatalog.eox.at/test-style/trilateral/catalog.json",
|
|
4244
|
+
// "https://gtif-cerulean.github.io/catalog/cerulean/catalog.json",
|
|
4241
4245
|
brand: {
|
|
4242
4246
|
noLayout: true,
|
|
4243
4247
|
name: "Demo",
|
|
@@ -7943,6 +7947,7 @@ const eodashCompareCollections = shallowReactive([]);
|
|
|
7943
7947
|
* @param {import("ol/layer/WebGLTile").Style} [style]
|
|
7944
7948
|
* @param {Record<string, unknown>} [layerConfig]
|
|
7945
7949
|
* @param {Record<string, unknown>} [layerDatetime]
|
|
7950
|
+
* @param {object | null} [extraProperties]
|
|
7946
7951
|
**/
|
|
7947
7952
|
async function createLayersFromAssets(
|
|
7948
7953
|
collectionId,
|
|
@@ -7952,6 +7957,7 @@ async function createLayersFromAssets(
|
|
|
7952
7957
|
style,
|
|
7953
7958
|
layerConfig,
|
|
7954
7959
|
layerDatetime,
|
|
7960
|
+
extraProperties,
|
|
7955
7961
|
) {
|
|
7956
7962
|
log.debug("Creating layers from assets");
|
|
7957
7963
|
let jsonArray = [];
|
|
@@ -7991,6 +7997,9 @@ async function createLayersFromAssets(
|
|
|
7991
7997
|
...(!style?.variables && { style }),
|
|
7992
7998
|
};
|
|
7993
7999
|
extractRoles(layer.properties, assets[ast]);
|
|
8000
|
+
if (extraProperties !== null) {
|
|
8001
|
+
layer.properties = { ...layer.properties, ...extraProperties };
|
|
8002
|
+
}
|
|
7994
8003
|
jsonArray.push(layer);
|
|
7995
8004
|
} else if (assets[ast]?.type === "image/tiff") {
|
|
7996
8005
|
geoTIFFIdx = idx;
|
|
@@ -8029,14 +8038,14 @@ async function createLayersFromAssets(
|
|
|
8029
8038
|
* @param {import('stac-ts').StacItem} item
|
|
8030
8039
|
* @param {string} title
|
|
8031
8040
|
* @param {Record<string,any>} [layerDatetime]
|
|
8032
|
-
* @param {
|
|
8041
|
+
* @param {object | null} [extraProperties]
|
|
8033
8042
|
*/
|
|
8034
8043
|
const createLayersFromLinks = async (
|
|
8035
8044
|
collectionId,
|
|
8036
8045
|
title,
|
|
8037
8046
|
item,
|
|
8038
8047
|
layerDatetime,
|
|
8039
|
-
|
|
8048
|
+
extraProperties,
|
|
8040
8049
|
) => {
|
|
8041
8050
|
log.debug("Creating layers from links");
|
|
8042
8051
|
/** @type {Record<string,any>[]} */
|
|
@@ -8069,6 +8078,10 @@ const createLayersFromLinks = async (
|
|
|
8069
8078
|
viewProjectionCode,
|
|
8070
8079
|
);
|
|
8071
8080
|
log.debug("WMS Layer added", linkId);
|
|
8081
|
+
const tileSize =
|
|
8082
|
+
"wms:tilesize" in wmsLink
|
|
8083
|
+
? [wmsLink["wms:tilesize"], wmsLink["wms:tilesize"]]
|
|
8084
|
+
: [512, 512];
|
|
8072
8085
|
let json = {
|
|
8073
8086
|
type: "Tile",
|
|
8074
8087
|
properties: {
|
|
@@ -8081,7 +8094,7 @@ const createLayersFromLinks = async (
|
|
|
8081
8094
|
url: wmsLink.href,
|
|
8082
8095
|
projection: linkProjectionCode,
|
|
8083
8096
|
tileGrid: {
|
|
8084
|
-
tileSize
|
|
8097
|
+
tileSize,
|
|
8085
8098
|
},
|
|
8086
8099
|
params: {
|
|
8087
8100
|
LAYERS: wmsLink["wms:layers"],
|
|
@@ -8089,14 +8102,17 @@ const createLayersFromLinks = async (
|
|
|
8089
8102
|
},
|
|
8090
8103
|
},
|
|
8091
8104
|
};
|
|
8105
|
+
if ("wms:version" in wmsLink) {
|
|
8106
|
+
// @ts-expect-error no type for eox-map
|
|
8107
|
+
json.source.params["VERSION"] = wmsLink["wms:version"];
|
|
8108
|
+
}
|
|
8092
8109
|
extractRoles(json.properties, wmsLink);
|
|
8093
8110
|
if ("wms:dimensions" in wmsLink) {
|
|
8094
8111
|
// Expand all dimensions into the params attribute
|
|
8095
8112
|
Object.assign(json.source.params, wmsLink["wms:dimensions"]);
|
|
8096
8113
|
}
|
|
8097
|
-
if (
|
|
8098
|
-
|
|
8099
|
-
json.properties.description = legendInfo;
|
|
8114
|
+
if (extraProperties !== null) {
|
|
8115
|
+
json.properties = { ...json.properties, ...extraProperties };
|
|
8100
8116
|
}
|
|
8101
8117
|
jsonArray.push(json);
|
|
8102
8118
|
}
|
|
@@ -8180,6 +8196,9 @@ const createLayersFromLinks = async (
|
|
|
8180
8196
|
};
|
|
8181
8197
|
}
|
|
8182
8198
|
extractRoles(json.properties, wmtsLink);
|
|
8199
|
+
if (extraProperties !== null) {
|
|
8200
|
+
json.properties = { ...json.properties, ...extraProperties };
|
|
8201
|
+
}
|
|
8183
8202
|
jsonArray.push(json);
|
|
8184
8203
|
}
|
|
8185
8204
|
|
|
@@ -8213,6 +8232,9 @@ const createLayersFromLinks = async (
|
|
|
8213
8232
|
};
|
|
8214
8233
|
|
|
8215
8234
|
extractRoles(json.properties, xyzLink);
|
|
8235
|
+
if (extraProperties !== null) {
|
|
8236
|
+
json.properties = { ...json.properties, ...extraProperties };
|
|
8237
|
+
}
|
|
8216
8238
|
jsonArray.push(json);
|
|
8217
8239
|
}
|
|
8218
8240
|
return jsonArray;
|
|
@@ -8367,7 +8389,7 @@ class EodashCollection {
|
|
|
8367
8389
|
// will try to extract anything it supports but for which we have
|
|
8368
8390
|
// less control.
|
|
8369
8391
|
|
|
8370
|
-
|
|
8392
|
+
let { layerConfig, style } = extractLayerConfig(
|
|
8371
8393
|
await fetchStyle(item, itemUrl),
|
|
8372
8394
|
);
|
|
8373
8395
|
|
|
@@ -8388,19 +8410,26 @@ class EodashCollection {
|
|
|
8388
8410
|
|
|
8389
8411
|
if (isSupported) {
|
|
8390
8412
|
// Checking for potential legend asset
|
|
8391
|
-
let
|
|
8413
|
+
let extraProperties = null;
|
|
8392
8414
|
if (this.#collectionStac?.assets?.legend?.href) {
|
|
8393
|
-
|
|
8394
|
-
|
|
8415
|
+
extraProperties = {
|
|
8416
|
+
description: `<div style="text-align:center; width: 100%">
|
|
8395
8417
|
<img src="${this.#collectionStac.assets.legend.href}" style="max-height:70px; margin-top:-15px; margin-bottom:-20px;" />
|
|
8396
|
-
</div
|
|
8418
|
+
</div>`,
|
|
8419
|
+
};
|
|
8420
|
+
}
|
|
8421
|
+
// Check if collection has eox:colorlegend definition, if yes overwrite legend description
|
|
8422
|
+
if (this.#collectionStac && this.#collectionStac["eox:colorlegend"]) {
|
|
8423
|
+
extraProperties = {
|
|
8424
|
+
layerLegend: this.#collectionStac["eox:colorlegend"],
|
|
8425
|
+
};
|
|
8397
8426
|
}
|
|
8398
8427
|
const links = await createLayersFromLinks(
|
|
8399
8428
|
this.#collectionStac?.id ?? "",
|
|
8400
8429
|
title,
|
|
8401
8430
|
item,
|
|
8402
8431
|
layerDatetime,
|
|
8403
|
-
|
|
8432
|
+
extraProperties,
|
|
8404
8433
|
);
|
|
8405
8434
|
jsonArray.push(
|
|
8406
8435
|
...links,
|
|
@@ -8412,6 +8441,7 @@ class EodashCollection {
|
|
|
8412
8441
|
style,
|
|
8413
8442
|
layerConfig,
|
|
8414
8443
|
layerDatetime,
|
|
8444
|
+
extraProperties,
|
|
8415
8445
|
)),
|
|
8416
8446
|
);
|
|
8417
8447
|
} else {
|
|
@@ -8626,7 +8656,6 @@ const useSTAcStore = defineStore("stac", () => {
|
|
|
8626
8656
|
/**
|
|
8627
8657
|
* Fetches root stac catalog and assign it to `stac`
|
|
8628
8658
|
*
|
|
8629
|
-
* @async
|
|
8630
8659
|
* @param {import("@/types").StacEndpoint} [url=eodash.stacEndpoint] Default
|
|
8631
8660
|
* is `eodash.stacEndpoint`
|
|
8632
8661
|
* @returns {Promise<void>}
|
|
@@ -8656,7 +8685,6 @@ const useSTAcStore = defineStore("stac", () => {
|
|
|
8656
8685
|
/**
|
|
8657
8686
|
* Fetches selected stac object and assign it to `selectedStac`
|
|
8658
8687
|
*
|
|
8659
|
-
* @async
|
|
8660
8688
|
* @param {string} relativePath - Stac link href
|
|
8661
8689
|
* @returns {Promise<void>}
|
|
8662
8690
|
* @see {@link selectedStac}
|
|
@@ -8697,7 +8725,6 @@ const useSTAcStore = defineStore("stac", () => {
|
|
|
8697
8725
|
/**
|
|
8698
8726
|
* Fetches selected stac object and assign it to `selectedCompareStac`
|
|
8699
8727
|
*
|
|
8700
|
-
* @async
|
|
8701
8728
|
* @param {string} relativePath - Stac link href
|
|
8702
8729
|
* @returns {Promise<void>}
|
|
8703
8730
|
* @see {@link selectedCompareStac}
|
|
@@ -8892,7 +8919,7 @@ const copyToClipBoard = async (text, showIcon) => {
|
|
|
8892
8919
|
const internalWidgets = (() => {
|
|
8893
8920
|
/** @type {Record<string, () => Promise<import("vue").Component>>} */
|
|
8894
8921
|
const importMap = {
|
|
8895
|
-
.../* #__PURE__ */ Object.assign({"/widgets/EodashDatePicker.vue": () => import('./EodashDatePicker-
|
|
8922
|
+
.../* #__PURE__ */ Object.assign({"/widgets/EodashDatePicker.vue": () => import('./EodashDatePicker-Dv9_y547.js'),"/widgets/EodashItemFilter.vue": () => import('./EodashItemFilter-CZ5Hdn0p.js'),"/widgets/EodashLayerControl.vue": () => import('./EodashLayerControl-iRPRTWaC.js'),"/widgets/EodashMap.vue": () => import('./EodashMap-G1xNg6jB.js'),"/widgets/EodashMapBtns.vue": () => import('./EodashMapBtns-DOiv-00v.js'),"/widgets/ExportState.vue": () => import('./ExportState-CDovKW7n.js'),"/widgets/PopUp.vue": () => import('./PopUp-BMd-trL0.js'),"/widgets/WidgetsContainer.vue": () => import('./WidgetsContainer-D4mWWQgi.js')}),
|
|
8896
8923
|
.../* #__PURE__ */ Object.assign({}),
|
|
8897
8924
|
};
|
|
8898
8925
|
for (const key in importMap) {
|
|
@@ -9001,7 +9028,7 @@ const getWidgetDefinition = (config) => {
|
|
|
9001
9028
|
|
|
9002
9029
|
case "web-component":
|
|
9003
9030
|
importedWidget.component = defineAsyncComponent({
|
|
9004
|
-
loader: () => import('./DynamicWebComponent-
|
|
9031
|
+
loader: () => import('./DynamicWebComponent-Bwrmh0sP.js'),
|
|
9005
9032
|
suspensible: true,
|
|
9006
9033
|
});
|
|
9007
9034
|
importedWidget.props = reactive(config.widget);
|
|
@@ -11352,14 +11379,14 @@ const { loadSTAC } = useSTAcStore();
|
|
|
11352
11379
|
|
|
11353
11380
|
const { smAndDown } = useDisplay();
|
|
11354
11381
|
const TemplateComponent = smAndDown.value
|
|
11355
|
-
? defineAsyncComponent(() => import('./MobileLayout-
|
|
11356
|
-
: defineAsyncComponent(() => import('./DashboardLayout-
|
|
11382
|
+
? defineAsyncComponent(() => import('./MobileLayout-B3QtXpa0.js'))
|
|
11383
|
+
: defineAsyncComponent(() => import('./DashboardLayout-jpgby4Eh.js'));
|
|
11357
11384
|
|
|
11358
11385
|
const HeaderComponent = defineAsyncComponent(
|
|
11359
|
-
() => import('./Header-
|
|
11386
|
+
() => import('./Header-DDLdUYod.js'),
|
|
11360
11387
|
);
|
|
11361
11388
|
const FooterComponent = defineAsyncComponent(
|
|
11362
|
-
() => import('./Footer-
|
|
11389
|
+
() => import('./Footer-B1O4tw8o.js'),
|
|
11363
11390
|
);
|
|
11364
11391
|
|
|
11365
11392
|
const templateHeight = props.isWebComponent ? "100%" : "100dvh";
|
package/dist/client/eo-dash.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { aM as Eodash, aN as register, aO as store } from './asWebComponent-
|
|
1
|
+
export { aM as Eodash, aN as register, aO as store } from './asWebComponent-Cc5OdWN5.js';
|
|
2
2
|
import 'vue';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { shallowRef, computed, watch } from 'vue';
|
|
2
|
-
import { p as propsFactory, ax as getCurrentInstance } from './asWebComponent-
|
|
2
|
+
import { p as propsFactory, ax as getCurrentInstance } from './asWebComponent-Cc5OdWN5.js';
|
|
3
3
|
|
|
4
4
|
class Box {
|
|
5
5
|
constructor(_ref) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TransitionGroup, Transition, h, camelize } from 'vue';
|
|
2
|
-
import { g as genericComponent, p as propsFactory } from './asWebComponent-
|
|
2
|
+
import { g as genericComponent, p as propsFactory } from './asWebComponent-Cc5OdWN5.js';
|
|
3
3
|
|
|
4
4
|
// Utilities
|
|
5
5
|
const makeTransitionProps = propsFactory({
|
package/dist/node/cli.js
CHANGED
|
@@ -17,4 +17,4 @@ ${o.lib?`<eo-dash style="height:100dvh;"/>
|
|
|
17
17
|
<script type="module" src="${t.resolve(`/@fs/${c}`,"core/client/render.js")}"><\/script>
|
|
18
18
|
`}
|
|
19
19
|
</body>
|
|
20
|
-
</html>`,x=w(async({mode:e,command:a})=>({base:o.base??"",cacheDir:Y,plugins:[H({template:{transformAssetUrls:J,compilerOptions:{isCustomElement:r=>!r.includes("v-")&&r.includes("-")}}}),M({autoImport:!0}),e==="development"&&{name:"inject-html",configureServer:G}],customLogger:g,define:{"process.env":{}},resolve:{alias:{"@":t.join(c,"core/client"),"^":t.join(c,"widgets"),"user:config":m,"user:widgets":D},extensions:[".js",".json",".jsx",".mjs",".ts",".tsx",".vue"]},server:{warmup:{clientFiles:[t.join(c,"core/client/**"),m]},port:o.port??3e3,open:o.open,fs:{allow:[W(process.cwd())]},host:o.host},root:c,...e==="development"&&{optimizeDeps:{include:["webfontloader","vuetify","vue","pinia","stac-js","urijs","loglevel"],noDiscovery:!0}},publicDir:o.publicDir===!1?!1:z,build:{outDir:v,emptyOutDir:!0,target:"esnext",cssMinify:!0,...o.lib&&a==="build"&&{minify:!1,lib:{entry:t.join(c,"core/client/asWebComponent.js"),fileName:"eo-dash",formats:["es"],name:"@eodash/eodash"},rollupOptions:{input:t.join(c,"core/client/asWebComponent.js"),external:r=>{const i=r.includes("vuetify")||r.endsWith(".css")||r.endsWith("styles"),n=V.some(l=>r.startsWith(l));return!i&&n}}}}})),k=w(async e=>o.vite?F(await x(e),o.vite):x(e));async function G(e){e.watcher.add([m,p,t.join(D,"**/*.vue")]);let a="";const r=g.info;return g.info=(i,n)=>{if(i.includes("core")){const l=i.split("/")[0].split(" ");l.pop();const d=l.join(" ")+" "+a.replace(s,"");return r(d,n)}return r(i,n)},e.watcher.on("change",async i=>{a=i,i===p&&e.ws.send({type:"full-reload",path:i})}),()=>{e.middlewares.use(async(i,n,l)=>{if(i.originalUrl==="/@fs/config.js"||i.originalUrl==="/config.js"){n.statusCode=200,n.setHeader("Content-Type","text/javascript"),u(p)&&await T(p).then(d=>{n.write(d)}),n.end();return}if(i.url?.endsWith(".html")){n.statusCode=200,n.setHeader("Content-Type","text/html");const d=await e.transformIndexHtml(i.url,C,i.originalUrl);n.end(d);return}l()})}}const K=async()=>{const e=await O(await k({mode:"development",command:"serve"}));await e.listen(),e.printUrls(),e.bindCLIShortcuts({print:!0})},Q=async()=>{const e=async()=>{const a=await k({mode:"production",command:"build"});await N(a),u(p)&&await A(p,t.join(v,"config.js"),{recursive:!0}).catch(r=>{console.error(r)})};if(o.lib)await e();else{const a=t.join(c,"/index.html");await $(a,C).then(async()=>{await e(),await L(a).catch(()=>{console.error("failed to remove index.html")})})}};async function X(){(await U({root:s,base:o.base??"",preview:{port:isNaN(o.port)?8080:o.port,open:o.open,host:o.host},build:{outDir:v}})).printUrls()}const Z=process.argv?.[2];(async()=>{switch(Z){case"dev":await K();break;case"build":await Q();break;case"preview":await X();break;default:console.error("command not found");break}})();
|
|
20
|
+
</html>`,x=w(async({mode:e,command:a})=>({base:o.base??"",cacheDir:Y,plugins:[H({template:{transformAssetUrls:J,compilerOptions:{isCustomElement:r=>!r.includes("v-")&&r.includes("-")}}}),M({autoImport:!0}),e==="development"&&{name:"inject-html",configureServer:G}],customLogger:g,define:{"process.env":{}},resolve:{alias:{"@":t.join(c,"core/client"),"^":t.join(c,"widgets"),"user:config":m,"user:widgets":D},extensions:[".js",".json",".jsx",".mjs",".ts",".tsx",".vue"]},server:{warmup:{clientFiles:[t.join(c,"core/client/**"),m]},port:o.port??3e3,open:o.open,fs:{allow:[W(process.cwd())]},host:o.host},root:c,...e==="development"&&{optimizeDeps:{include:["webfontloader","vuetify","vue","pinia","stac-js","urijs","loglevel","color-legend-element"],noDiscovery:!0}},publicDir:o.publicDir===!1?!1:z,build:{outDir:v,emptyOutDir:!0,target:"esnext",cssMinify:!0,...o.lib&&a==="build"&&{minify:!1,lib:{entry:t.join(c,"core/client/asWebComponent.js"),fileName:"eo-dash",formats:["es"],name:"@eodash/eodash"},rollupOptions:{input:t.join(c,"core/client/asWebComponent.js"),external:r=>{const i=r.includes("vuetify")||r.endsWith(".css")||r.endsWith("styles"),n=V.some(l=>r.startsWith(l));return!i&&n}}}}})),k=w(async e=>o.vite?F(await x(e),o.vite):x(e));async function G(e){e.watcher.add([m,p,t.join(D,"**/*.vue")]);let a="";const r=g.info;return g.info=(i,n)=>{if(i.includes("core")){const l=i.split("/")[0].split(" ");l.pop();const d=l.join(" ")+" "+a.replace(s,"");return r(d,n)}return r(i,n)},e.watcher.on("change",async i=>{a=i,i===p&&e.ws.send({type:"full-reload",path:i})}),()=>{e.middlewares.use(async(i,n,l)=>{if(i.originalUrl==="/@fs/config.js"||i.originalUrl==="/config.js"){n.statusCode=200,n.setHeader("Content-Type","text/javascript"),u(p)&&await T(p).then(d=>{n.write(d)}),n.end();return}if(i.url?.endsWith(".html")){n.statusCode=200,n.setHeader("Content-Type","text/html");const d=await e.transformIndexHtml(i.url,C,i.originalUrl);n.end(d);return}l()})}}const K=async()=>{const e=await O(await k({mode:"development",command:"serve"}));await e.listen(),e.printUrls(),e.bindCLIShortcuts({print:!0})},Q=async()=>{const e=async()=>{const a=await k({mode:"production",command:"build"});await N(a),u(p)&&await A(p,t.join(v,"config.js"),{recursive:!0}).catch(r=>{console.error(r)})};if(o.lib)await e();else{const a=t.join(c,"/index.html");await $(a,C).then(async()=>{await e(),await L(a).catch(()=>{console.error("failed to remove index.html")})})}};async function X(){(await U({root:s,base:o.base??"",preview:{port:isNaN(o.port)?8080:o.port,open:o.open,host:o.host},build:{outDir:v}})).printUrls()}const Z=process.argv?.[2];(async()=>{switch(Z){case"dev":await K();break;case"build":await Q();break;case"preview":await X();break;default:console.error("command not found");break}})();
|
|
@@ -258,7 +258,7 @@ export interface EodashStore {
|
|
|
258
258
|
getLayers: (el?: string) => object[];
|
|
259
259
|
|
|
260
260
|
/**
|
|
261
|
-
* Register EPSG projection in `eox-map` and adds it to
|
|
261
|
+
* Register EPSG projection in `eox-map` and adds it to `availableMapProjection`
|
|
262
262
|
* */
|
|
263
263
|
registerProjection: (
|
|
264
264
|
code?: number | string | { name: string; def: string },
|
|
@@ -276,4 +276,4 @@ export interface EodashStore {
|
|
|
276
276
|
};
|
|
277
277
|
}
|
|
278
278
|
///////
|
|
279
|
-
export
|
|
279
|
+
export { createEodash, store } from "./main.js";
|
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
* @param {import("ol/layer/WebGLTile").Style} [style]
|
|
7
7
|
* @param {Record<string, unknown>} [layerConfig]
|
|
8
8
|
* @param {Record<string, unknown>} [layerDatetime]
|
|
9
|
+
* @param {object | null} [extraProperties]
|
|
9
10
|
**/
|
|
10
|
-
export function createLayersFromAssets(collectionId: string, title: string, assets: Record<string, import("stac-ts").StacAsset>, item: import("stac-ts").StacItem, style?: import("ol/layer/WebGLTile").Style | undefined, layerConfig?: Record<string, unknown> | undefined, layerDatetime?: Record<string, unknown> | undefined): Promise<({
|
|
11
|
+
export function createLayersFromAssets(collectionId: string, title: string, assets: Record<string, import("stac-ts").StacAsset>, item: import("stac-ts").StacItem, style?: import("ol/layer/WebGLTile").Style | undefined, layerConfig?: Record<string, unknown> | undefined, layerDatetime?: Record<string, unknown> | undefined, extraProperties?: object | null | undefined): Promise<({
|
|
11
12
|
style?: import("ol/layer/WebGLTile").Style | undefined;
|
|
12
13
|
type: string;
|
|
13
14
|
source: {
|
|
@@ -41,4 +42,4 @@ export function createLayersFromAssets(collectionId: string, title: string, asse
|
|
|
41
42
|
};
|
|
42
43
|
style: import("ol/layer/WebGLTile").Style | undefined;
|
|
43
44
|
})[]>;
|
|
44
|
-
export function createLayersFromLinks(collectionId: string, title: string, item: import("stac-ts").StacItem, layerDatetime?: Record<string, any> | undefined,
|
|
45
|
+
export function createLayersFromLinks(collectionId: string, title: string, item: import("stac-ts").StacItem, layerDatetime?: Record<string, any> | undefined, extraProperties?: object | null | undefined): Promise<Record<string, any>[]>;
|
|
@@ -15,13 +15,17 @@ export function generateFeatures(links?: import("stac-ts").StacLink[] | undefine
|
|
|
15
15
|
};
|
|
16
16
|
}[];
|
|
17
17
|
};
|
|
18
|
-
/** @param { import("ol/layer/WebGLTile").Style & { jsonform?: Record<string,any> } } [style] */
|
|
18
|
+
/** @param { import("ol/layer/WebGLTile").Style & { jsonform?: Record<string,any> } & { legend?: Record<string,any> } } [style] */
|
|
19
19
|
export function extractLayerConfig(style?: (import("ol/layer/WebGLTile").Style & {
|
|
20
20
|
jsonform?: Record<string, any>;
|
|
21
|
+
} & {
|
|
22
|
+
legend?: Record<string, any>;
|
|
21
23
|
}) | undefined): {
|
|
22
24
|
layerConfig: Record<string, unknown> | undefined;
|
|
23
25
|
style: (import("ol/layer/WebGLTile").Style & {
|
|
24
26
|
jsonform?: Record<string, any>;
|
|
27
|
+
} & {
|
|
28
|
+
legend?: Record<string, any>;
|
|
25
29
|
}) | undefined;
|
|
26
30
|
};
|
|
27
31
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eodash/eodash",
|
|
3
|
-
"version": "5.0.0-alpha.2.
|
|
3
|
+
"version": "5.0.0-alpha.2.25",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"core/client",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@eox/itemfilter": "^1.1.1",
|
|
52
52
|
"@eox/jsonform": "^0.8.2",
|
|
53
|
-
"@eox/layercontrol": "^0.
|
|
53
|
+
"@eox/layercontrol": "^0.22.0",
|
|
54
54
|
"@eox/layout": "^0.1.0",
|
|
55
55
|
"@eox/map": "^1.13.1",
|
|
56
56
|
"@eox/stacinfo": "^0.3.3",
|
|
@@ -60,6 +60,7 @@
|
|
|
60
60
|
"animated-details": "gist:2912bb049fa906671807415eb0e87188",
|
|
61
61
|
"axios": "^1.7.7",
|
|
62
62
|
"axios-cache-interceptor": "^1.6.0",
|
|
63
|
+
"color-legend-element": "^1.3.0",
|
|
63
64
|
"commander": "^12.1.0",
|
|
64
65
|
"core-js": "^3.38.1",
|
|
65
66
|
"loglevel": "^1.9.2",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<eox-layercontrol
|
|
4
4
|
v-if="showControls"
|
|
5
5
|
:for="mapElement"
|
|
6
|
-
.tools="['datetime', 'info', 'config', 'opacity']"
|
|
6
|
+
.tools="['datetime', 'info', 'config', 'legend', 'opacity']"
|
|
7
7
|
@datetime:updated="debouncedHandleDateTime"
|
|
8
8
|
class="fill-height"
|
|
9
9
|
toolsAsList="true"
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
import "@eox/layercontrol";
|
|
16
16
|
import "@eox/jsonform";
|
|
17
17
|
import "@eox/timecontrol";
|
|
18
|
+
import "color-legend-element";
|
|
18
19
|
|
|
19
20
|
import { computed, ref } from "vue";
|
|
20
21
|
import { mapEl, mapCompareEl } from "@/store/States";
|