@eodash/eodash 5.3.1 → 5.3.3
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/eodashSTAC/EodashCollection.js +25 -16
- package/core/client/eodashSTAC/auth.js +19 -15
- package/core/client/eodashSTAC/createLayers.js +55 -23
- package/core/client/eodashSTAC/helpers.js +91 -5
- package/core/client/store/states.js +1 -1
- package/core/client/types.ts +12 -8
- package/core/client/utils/states.js +32 -0
- package/dist/client/{DashboardLayout-BAstYnhU.js → DashboardLayout-Cp8Rv3Ef.js} +2 -2
- package/dist/client/{DynamicWebComponent-7v4_DFqP.js → DynamicWebComponent-CBsxC82P.js} +1 -1
- package/dist/client/{EodashDatePicker-IVHLv9UN.js → EodashDatePicker-Dewym-cx.js} +3 -3
- package/dist/client/{EodashItemFilter-BPMpnXjo.js → EodashItemFilter-CAsZpOoQ.js} +1 -1
- package/dist/client/{EodashLayerControl-CSnQh2tb.js → EodashLayerControl-fn-rt8Ac.js} +2 -2
- package/dist/client/{EodashLayoutSwitcher-CPpGM8Pb.js → EodashLayoutSwitcher-B9XqQXCS.js} +3 -3
- package/dist/client/{EodashMapBtns-C_jyUJ2x.js → EodashMapBtns-nFY6MIAX.js} +6 -6
- package/dist/client/{EodashStacInfo-DjuWc0Iz.js → EodashStacInfo-lxBKoav9.js} +1 -1
- package/dist/client/{EodashTimeSlider-CDh9Lf02.js → EodashTimeSlider-DI97QkNT.js} +2 -2
- package/dist/client/{EodashTools-DSvDUUlL.js → EodashTools-D5ShUT1g.js} +4 -4
- package/dist/client/{ExportState-BhjxS0jG.js → ExportState-ruNyRS2E.js} +4 -4
- package/dist/client/{Footer-C3PPcdjv.js → Footer-IQNyfd78.js} +1 -1
- package/dist/client/{Header-E5NbT7HE.js → Header-BBdi_-Lp.js} +2 -2
- package/dist/client/{MobileLayout-DY7OHr1k.js → MobileLayout-BfBeF-JF.js} +2 -2
- package/dist/client/{PopUp-CSPXdqKI.js → PopUp-DRgOmD7-.js} +2 -2
- package/dist/client/{ProcessList-C3HV7G0b.js → ProcessList-DxyCFQdz.js} +20 -8
- package/dist/client/{VImg-FoXcOnWF.js → VImg-hwmwzSwG.js} +2 -2
- package/dist/client/{VMain-Ck2g1QOG.js → VMain-vk4-rkw-.js} +1 -1
- package/dist/client/{VTooltip-F_1Zcvhp.js → VTooltip-BYUZeia1.js} +2 -2
- package/dist/client/{WidgetsContainer-Cq9uZEuN.js → WidgetsContainer-DXD_8rqh.js} +1 -1
- package/dist/client/{asWebComponent-DZeEbWG0.js → asWebComponent-DdguWGDI.js} +121 -49
- package/dist/client/{async-Dk79llLt.js → async-D1MvO_Z_.js} +2 -2
- package/dist/client/eo-dash.js +1 -1
- package/dist/client/{forwardRefs-BbvoXHtj.js → forwardRefs-DM-E2MfG.js} +2 -2
- package/dist/client/{handling-DxucYlYh.js → handling-CbgeKrqT.js} +3 -3
- package/dist/client/{helpers-CI_7CUmn.js → helpers-CtUlAW0N.js} +93 -7
- package/dist/client/{index-DcCcdbgR.js → index-BJvLt3Xf.js} +5 -5
- package/dist/client/{index-KrGHjH-_.js → index-BkW06-Lg.js} +33 -21
- package/dist/client/{index-BO5uGfUe.js → index-BxDh5v-H.js} +3 -3
- package/dist/client/{index-C13BiO9C.js → index-DBo0F4Fv.js} +2 -2
- package/dist/client/templates.js +2 -2
- package/dist/client/{transition-Ctkv90El.js → transition-BdzATvPB.js} +1 -1
- package/dist/types/core/client/eodashSTAC/EodashCollection.d.ts +2 -1
- package/dist/types/core/client/eodashSTAC/auth.d.ts +5 -5
- package/dist/types/core/client/eodashSTAC/helpers.d.ts +11 -0
- package/dist/types/core/client/types.d.ts +1 -0
- package/dist/types/core/client/utils/states.d.ts +28 -0
- package/dist/types/templates/index.d.ts +1 -0
- package/package.json +6 -6
- package/templates/index.js +2 -0
- package/widgets/EodashMap/index.vue +21 -11
- package/widgets/EodashMap/methods/index.js +9 -7
- package/widgets/EodashProcess/ProcessList.vue +10 -2
|
@@ -10,7 +10,8 @@ import {
|
|
|
10
10
|
generateFeatures,
|
|
11
11
|
getDatetimeProperty,
|
|
12
12
|
isSTACItem,
|
|
13
|
-
|
|
13
|
+
findLayersByLayerPrefix,
|
|
14
|
+
replaceLayersInStructure,
|
|
14
15
|
extractLayerLegend,
|
|
15
16
|
extractLayerTimeValues,
|
|
16
17
|
} from "./helpers";
|
|
@@ -210,8 +211,9 @@ export class EodashCollection {
|
|
|
210
211
|
return data;
|
|
211
212
|
}, /** @type {Record<string,import('stac-ts').StacAsset>} */ ({}));
|
|
212
213
|
const isSupported =
|
|
213
|
-
item.links.some((link) =>
|
|
214
|
-
|
|
214
|
+
item.links.some((link) =>
|
|
215
|
+
["wms", "xyz", "wmts", "vector-tile"].includes(link.rel),
|
|
216
|
+
) || Object.keys(dataAssets).length;
|
|
215
217
|
|
|
216
218
|
if (isSupported) {
|
|
217
219
|
// Checking for potential legend asset
|
|
@@ -363,14 +365,18 @@ export class EodashCollection {
|
|
|
363
365
|
**/
|
|
364
366
|
async getItem(date) {
|
|
365
367
|
if (!date) {
|
|
366
|
-
|
|
368
|
+
const items = await this.getItems(false, true);
|
|
369
|
+
// in case no datetime property is found, return the last item
|
|
370
|
+
return items && items.at(-1);
|
|
367
371
|
}
|
|
368
372
|
|
|
369
373
|
const items = await this.getItems();
|
|
370
374
|
const datetimeProperty = getDatetimeProperty(items);
|
|
371
375
|
if (!datetimeProperty) {
|
|
372
|
-
// in case no datetime property is found, return the
|
|
373
|
-
|
|
376
|
+
// in case no datetime property is found, return the last item
|
|
377
|
+
const items = await this.getItems(false, true);
|
|
378
|
+
// in case no datetime property is found, return the last item
|
|
379
|
+
return items && items.at(-1);
|
|
374
380
|
}
|
|
375
381
|
return (await this.getItems())?.sort((a, b) => {
|
|
376
382
|
const distanceA = Math.abs(
|
|
@@ -406,9 +412,9 @@ export class EodashCollection {
|
|
|
406
412
|
const aggregatedTooltips = [
|
|
407
413
|
...new Map(
|
|
408
414
|
styles
|
|
409
|
-
.flatMap(style => style.tooltip || [])
|
|
410
|
-
.map(entry => [entry.id, entry])
|
|
411
|
-
).values()
|
|
415
|
+
.flatMap((style) => style.tooltip || [])
|
|
416
|
+
.map((entry) => [entry.id, entry]),
|
|
417
|
+
).values(),
|
|
412
418
|
];
|
|
413
419
|
this.#tooltipProperties = aggregatedTooltips ?? [];
|
|
414
420
|
return this.#tooltipProperties;
|
|
@@ -461,15 +467,18 @@ export class EodashCollection {
|
|
|
461
467
|
currentLayers = getCompareLayers();
|
|
462
468
|
}
|
|
463
469
|
|
|
464
|
-
|
|
465
|
-
const oldLayerID = findLayer(currentLayers, layer)?.properties?.id;
|
|
470
|
+
const oldLayer = findLayer(currentLayers, layer);
|
|
466
471
|
|
|
467
|
-
|
|
472
|
+
const toBeReplacedLayers = findLayersByLayerPrefix(currentLayers, oldLayer);
|
|
473
|
+
|
|
474
|
+
if (!toBeReplacedLayers) {
|
|
468
475
|
return;
|
|
469
476
|
}
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
477
|
+
const updatedLayers = replaceLayersInStructure(
|
|
478
|
+
currentLayers,
|
|
479
|
+
toBeReplacedLayers,
|
|
480
|
+
newLayers,
|
|
481
|
+
);
|
|
473
482
|
|
|
474
483
|
return updatedLayers;
|
|
475
484
|
}
|
|
@@ -493,7 +502,7 @@ export class EodashCollection {
|
|
|
493
502
|
);
|
|
494
503
|
|
|
495
504
|
return [
|
|
496
|
-
|
|
505
|
+
//@ts-expect-error indicator instead of item
|
|
497
506
|
...(await createLayersFromLinks(
|
|
498
507
|
indicator?.id ?? "",
|
|
499
508
|
indicator?.title || indicator.id,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Generic handler for possible authentications schemes as defined in STAC authentication extension.
|
|
3
|
-
* @param {import("@/types").StacAuthItem } item
|
|
4
|
-
* @param {import("@/types").StacAuthLink | import("@/types").StacAuthAsset} linkOrAsset
|
|
5
|
-
* @returns {string}
|
|
6
|
-
*/
|
|
2
|
+
* Generic handler for possible authentications schemes as defined in STAC authentication extension.
|
|
3
|
+
* @param {import("@/types").StacAuthItem } item
|
|
4
|
+
* @param {import("@/types").StacAuthLink | import("@/types").StacAuthAsset} linkOrAsset
|
|
5
|
+
* @returns {string}
|
|
6
|
+
*/
|
|
7
7
|
export function handleAuthenticationOfLink(item, linkOrAsset) {
|
|
8
8
|
// browse through all authentication refs on a link to find a first one we support
|
|
9
9
|
for (const authRef of linkOrAsset["auth:refs"] || []) {
|
|
10
|
-
const authSchemes
|
|
10
|
+
const authSchemes = item["auth:schemes"];
|
|
11
11
|
if (authRef in authSchemes) {
|
|
12
12
|
switch (authSchemes[authRef].type) {
|
|
13
13
|
case "apiKey": {
|
|
@@ -22,18 +22,20 @@ export function handleAuthenticationOfLink(item, linkOrAsset) {
|
|
|
22
22
|
// case "oauth2":
|
|
23
23
|
// todo add more handlers when needed
|
|
24
24
|
default:
|
|
25
|
-
|
|
25
|
+
console.error(
|
|
26
|
+
`eodash does not support referenced authentication scheme ${authRef}`,
|
|
27
|
+
);
|
|
26
28
|
}
|
|
27
29
|
}
|
|
28
30
|
}
|
|
29
31
|
return linkOrAsset.href;
|
|
30
32
|
}
|
|
31
33
|
/**
|
|
32
|
-
* Generic handler for possible authentications schemes as defined in STAC authentication extension.
|
|
33
|
-
* @param {import("@/types").ApiKeyAuthScheme } schemeDef
|
|
34
|
-
* @param { string } href
|
|
35
|
-
* @returns { string }
|
|
36
|
-
*/
|
|
34
|
+
* Generic handler for possible authentications schemes as defined in STAC authentication extension.
|
|
35
|
+
* @param {import("@/types").ApiKeyAuthScheme } schemeDef
|
|
36
|
+
* @param { string } href
|
|
37
|
+
* @returns { string }
|
|
38
|
+
*/
|
|
37
39
|
function handleApiKeyBasedAuth(schemeDef, href) {
|
|
38
40
|
// add token to query parameters of href
|
|
39
41
|
let url = href;
|
|
@@ -45,12 +47,14 @@ function handleApiKeyBasedAuth(schemeDef, href) {
|
|
|
45
47
|
if (envValue) {
|
|
46
48
|
url = setQueryParam(href, apiKey, envValue);
|
|
47
49
|
} else {
|
|
48
|
-
console.error(
|
|
50
|
+
console.error(
|
|
51
|
+
`env variable ${envVar} for authentication parameter ${apiKey} not set`,
|
|
52
|
+
);
|
|
49
53
|
}
|
|
50
|
-
break
|
|
54
|
+
break;
|
|
51
55
|
}
|
|
52
56
|
default:
|
|
53
|
-
console.error(
|
|
57
|
+
console.error("eodash does not support any referenced handler");
|
|
54
58
|
}
|
|
55
59
|
return url;
|
|
56
60
|
}
|
|
@@ -39,7 +39,7 @@ export async function createLayersFromAssets(
|
|
|
39
39
|
let geoTIFFSources = [];
|
|
40
40
|
/** @type {number|null} */
|
|
41
41
|
let geoTIFFIdx = null;
|
|
42
|
-
|
|
42
|
+
|
|
43
43
|
let geoJsonIdx = 0;
|
|
44
44
|
let geoJsonAttributions = [];
|
|
45
45
|
|
|
@@ -113,14 +113,41 @@ export async function createLayersFromAssets(
|
|
|
113
113
|
);
|
|
114
114
|
continue;
|
|
115
115
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
116
|
+
/** @type {Record<string,any>[]} */
|
|
117
|
+
const features = [];
|
|
118
|
+
responseData.forEach((ftr, i) => {
|
|
119
|
+
const { geometry, ...properties } = ftr;
|
|
120
|
+
if (
|
|
121
|
+
geometry.type === "MultiPoint" ||
|
|
122
|
+
geometry.type === "MultiPolygon"
|
|
123
|
+
) {
|
|
124
|
+
geometry.coordinates.forEach(
|
|
125
|
+
(
|
|
126
|
+
/** @type {Record<string,any>[]} */ coordPair,
|
|
127
|
+
/** @type {number} */ j,
|
|
128
|
+
) => {
|
|
129
|
+
const singleGeometry = {
|
|
130
|
+
type: geometry.type === "MultiPoint" ? "Point" : "Polygon",
|
|
131
|
+
coordinates: coordPair,
|
|
132
|
+
};
|
|
133
|
+
features.push({
|
|
134
|
+
type: "Feature",
|
|
135
|
+
id: `${i}_${j}`,
|
|
136
|
+
properties,
|
|
137
|
+
geometry: singleGeometry,
|
|
138
|
+
});
|
|
139
|
+
},
|
|
140
|
+
);
|
|
141
|
+
} else {
|
|
142
|
+
features.push({
|
|
143
|
+
type: "Feature",
|
|
144
|
+
properties,
|
|
145
|
+
id: `${i}`,
|
|
146
|
+
geometry: geometry,
|
|
147
|
+
});
|
|
148
|
+
}
|
|
123
149
|
});
|
|
150
|
+
|
|
124
151
|
const geojson = {
|
|
125
152
|
type: "FeatureCollection",
|
|
126
153
|
features: features,
|
|
@@ -142,7 +169,7 @@ export async function createLayersFromAssets(
|
|
|
142
169
|
source: {
|
|
143
170
|
type: "Vector",
|
|
144
171
|
url: await mergeGeojsons(geoJsonSources),
|
|
145
|
-
format: {
|
|
172
|
+
format: { type: "GeoJSON", dataProjection: projection },
|
|
146
173
|
attributions: geoJsonAttributions,
|
|
147
174
|
},
|
|
148
175
|
properties: {
|
|
@@ -216,7 +243,8 @@ export const createLayersFromLinks = async (
|
|
|
216
243
|
const wmsArray = item.links.filter((l) => l.rel === "wms");
|
|
217
244
|
const wmtsArray = item.links.filter((l) => l.rel === "wmts");
|
|
218
245
|
const xyzArray = item.links.filter((l) => l.rel === "xyz") ?? [];
|
|
219
|
-
const vectorTileArray =
|
|
246
|
+
const vectorTileArray =
|
|
247
|
+
item.links.filter((l) => l.rel === "vector-tile") ?? [];
|
|
220
248
|
|
|
221
249
|
// Taking projection code from main map view, as main view defines
|
|
222
250
|
// projection for comparison map
|
|
@@ -413,7 +441,9 @@ export const createLayersFromLinks = async (
|
|
|
413
441
|
(vectorTileLink?.["proj:epsg"] || vectorTileLink?.["eodash:proj4_def"]);
|
|
414
442
|
|
|
415
443
|
await registerProjection(vectorTileLinkProjection);
|
|
416
|
-
const projectionCode = getProjectionCode(
|
|
444
|
+
const projectionCode = getProjectionCode(
|
|
445
|
+
vectorTileLinkProjection || "EPSG:3857",
|
|
446
|
+
);
|
|
417
447
|
const linkId = createLayerID(
|
|
418
448
|
collectionId,
|
|
419
449
|
item.id,
|
|
@@ -421,18 +451,19 @@ export const createLayersFromLinks = async (
|
|
|
421
451
|
viewProjectionCode,
|
|
422
452
|
);
|
|
423
453
|
log.debug("Vector Tile Layer added", linkId);
|
|
424
|
-
const key =
|
|
454
|
+
const key =
|
|
455
|
+
/** @type {string | undefined} */ (vectorTileLink["key"]) || undefined;
|
|
425
456
|
// fetch styles and separate them by their mapping between links and assets
|
|
426
457
|
const styles = await fetchStyle(item, itemUrl, key);
|
|
427
458
|
// get the correct style which is not attached to a link
|
|
428
|
-
let { layerConfig, style } = extractLayerConfig(
|
|
429
|
-
|
|
430
|
-
styles,
|
|
431
|
-
);
|
|
432
|
-
|
|
459
|
+
let { layerConfig, style } = extractLayerConfig(linkId ?? "", styles);
|
|
460
|
+
|
|
433
461
|
let href = vectorTileLink.href;
|
|
434
462
|
if ("auth:schemes" in item && "auth:refs" in vectorTileLink) {
|
|
435
|
-
href = handleAuthenticationOfLink(
|
|
463
|
+
href = handleAuthenticationOfLink(
|
|
464
|
+
/** @type { import("@/types").StacAuthItem} */ (item),
|
|
465
|
+
/** @type { import("@/types").StacAuthLink} */ (vectorTileLink),
|
|
466
|
+
);
|
|
436
467
|
}
|
|
437
468
|
const json = {
|
|
438
469
|
type: "VectorTile",
|
|
@@ -443,17 +474,18 @@ export const createLayersFromLinks = async (
|
|
|
443
474
|
roles: vectorTileLink.roles,
|
|
444
475
|
layerDatetime,
|
|
445
476
|
...(layerConfig && {
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
477
|
+
layerConfig: {
|
|
478
|
+
...layerConfig,
|
|
479
|
+
style,
|
|
480
|
+
},
|
|
481
|
+
}),
|
|
451
482
|
},
|
|
452
483
|
source: {
|
|
453
484
|
type: "VectorTile",
|
|
454
485
|
format: {
|
|
455
486
|
type: "MVT",
|
|
456
487
|
idProperty: vectorTileLink.idProperty,
|
|
488
|
+
layers: vectorTileLink.layers,
|
|
457
489
|
},
|
|
458
490
|
url: href,
|
|
459
491
|
projection: projectionCode,
|
|
@@ -167,14 +167,21 @@ export const extractRoles = (properties, linkOrAsset) => {
|
|
|
167
167
|
* @param {import("stac-ts").StacItem} item
|
|
168
168
|
* @param {string} itemUrl
|
|
169
169
|
* @param {string | undefined} key
|
|
170
|
-
* @returns
|
|
170
|
+
* @returns
|
|
171
171
|
**/
|
|
172
|
-
export const fetchStyle = async (item, itemUrl, key=undefined) => {
|
|
172
|
+
export const fetchStyle = async (item, itemUrl, key = undefined) => {
|
|
173
173
|
let styleLink = null;
|
|
174
174
|
if (key) {
|
|
175
|
-
styleLink = item.links.find(
|
|
175
|
+
styleLink = item.links.find(
|
|
176
|
+
(link) =>
|
|
177
|
+
link.rel.includes("style") &&
|
|
178
|
+
link["links:keys"] &&
|
|
179
|
+
/** @type {Array<string>} */ (link["links:keys"]).includes(key),
|
|
180
|
+
);
|
|
176
181
|
} else {
|
|
177
|
-
styleLink = item.links.find(
|
|
182
|
+
styleLink = item.links.find(
|
|
183
|
+
(link) => link.rel.includes("style") && !link["links:keys"],
|
|
184
|
+
);
|
|
178
185
|
}
|
|
179
186
|
if (styleLink) {
|
|
180
187
|
let url = "";
|
|
@@ -321,6 +328,37 @@ export const extractLayerTimeValues = (items, currentStep) => {
|
|
|
321
328
|
};
|
|
322
329
|
};
|
|
323
330
|
|
|
331
|
+
/**
|
|
332
|
+
* Recursively find all layers whose ID up to the first ; is same as given layer
|
|
333
|
+
*
|
|
334
|
+
* @param {import("@eox/map").EoxLayer[]} layers
|
|
335
|
+
* @param {import("@eox/map").EoxLayer | undefined} referenceLayer - layer
|
|
336
|
+
* @returns {import("@eox/map").EoxLayer[]} Matching layer objects.
|
|
337
|
+
*/
|
|
338
|
+
export const findLayersByLayerPrefix = (layers, referenceLayer) => {
|
|
339
|
+
const refId = referenceLayer?.properties?.id;
|
|
340
|
+
|
|
341
|
+
if (typeof refId !== "string" || !refId.includes(";")) {
|
|
342
|
+
throw new Error("Reference layer ID must contain a ';' separator.");
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
const prefix = refId.split(";")[0];
|
|
346
|
+
const matches = [];
|
|
347
|
+
|
|
348
|
+
for (const layer of layers) {
|
|
349
|
+
if (layer.type === "Group" && Array.isArray(layer.layers)) {
|
|
350
|
+
matches.push(...findLayersByLayerPrefix(layer.layers, referenceLayer));
|
|
351
|
+
} else {
|
|
352
|
+
const id = layer?.properties?.id;
|
|
353
|
+
if (typeof id === "string" && id.startsWith(prefix)) {
|
|
354
|
+
matches.push(layer);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
return matches;
|
|
360
|
+
};
|
|
361
|
+
|
|
324
362
|
/**
|
|
325
363
|
* Find JSON layer by ID
|
|
326
364
|
* @param {string} layer
|
|
@@ -342,6 +380,54 @@ export const findLayer = (layers, layer) => {
|
|
|
342
380
|
}
|
|
343
381
|
};
|
|
344
382
|
|
|
383
|
+
/**
|
|
384
|
+
* Removes a list of layers (and nested ones) from a layer/group structure,
|
|
385
|
+
* and inserts new layers in place of the first removed one.
|
|
386
|
+
*
|
|
387
|
+
* @param {import("@eox/map").EoxLayer[]} layers - Array of layers or groups.
|
|
388
|
+
* @param {import("@eox/map").EoxLayer[]} toRemove - Array of layers to remove (by id).
|
|
389
|
+
* @param {Record<string, any>[]} toInsert - Array of layers to insert instead.
|
|
390
|
+
* @returns {Record<string, any>[]} New array with replacements applied.
|
|
391
|
+
*/
|
|
392
|
+
export const replaceLayersInStructure = (layers, toRemove, toInsert) => {
|
|
393
|
+
const result = [];
|
|
394
|
+
let inserted = false;
|
|
395
|
+
|
|
396
|
+
for (const layer of layers) {
|
|
397
|
+
if (layer.type === "Group" && Array.isArray(layer.layers)) {
|
|
398
|
+
// Recurse into group layers
|
|
399
|
+
const newGroupLayers = replaceLayersInStructure(
|
|
400
|
+
layer.layers,
|
|
401
|
+
toRemove,
|
|
402
|
+
toInsert,
|
|
403
|
+
);
|
|
404
|
+
result.push({ ...layer, layers: newGroupLayers });
|
|
405
|
+
continue;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
// Match by reference or id
|
|
409
|
+
const id = layer?.properties?.id;
|
|
410
|
+
const isToRemove = toRemove.some((rem) => {
|
|
411
|
+
const remId = rem?.properties?.id;
|
|
412
|
+
return remId === id;
|
|
413
|
+
});
|
|
414
|
+
|
|
415
|
+
if (isToRemove) {
|
|
416
|
+
// On first removed occurrence, insert the new layers
|
|
417
|
+
if (!inserted) {
|
|
418
|
+
result.push(...toInsert);
|
|
419
|
+
inserted = true;
|
|
420
|
+
}
|
|
421
|
+
// Skip this layer (it’s removed)
|
|
422
|
+
continue;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
result.push(layer);
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
return result;
|
|
429
|
+
};
|
|
430
|
+
|
|
345
431
|
/**
|
|
346
432
|
* Removes the layer with the id provided and injects an array of layers in its position
|
|
347
433
|
* @param {import("@eox/map").EoxLayer[]} currentLayers
|
|
@@ -387,7 +473,7 @@ export const getColFromLayer = async (indicators, layer) => {
|
|
|
387
473
|
for (const ind of indicators) {
|
|
388
474
|
if (ind.collectionStac?.id !== collectionId) continue;
|
|
389
475
|
const items = await ind.getItems();
|
|
390
|
-
const itemIds = items?.map(item => item.id || item.datetime) ?? [];
|
|
476
|
+
const itemIds = items?.map((item) => item.id || item.datetime) ?? [];
|
|
391
477
|
if (itemIds.includes(itemId)) {
|
|
392
478
|
return ind;
|
|
393
479
|
}
|
|
@@ -11,7 +11,7 @@ export const currentUrl = ref("");
|
|
|
11
11
|
export const currentCompareUrl = ref("");
|
|
12
12
|
|
|
13
13
|
/** Currently selected datetime */
|
|
14
|
-
export const datetime = ref(
|
|
14
|
+
export const datetime = ref("");
|
|
15
15
|
|
|
16
16
|
/** Currently selected indicator */
|
|
17
17
|
export const indicator = ref("");
|
package/core/client/types.ts
CHANGED
|
@@ -465,7 +465,12 @@ export type EodashStyleJson = import("ol/style/flat").FlatStyleLike & {
|
|
|
465
465
|
variables?: Record<string, string | number | boolean | null | undefined>;
|
|
466
466
|
legend?: import("@eox/layercontrol/src/components/layer-config.js").EOxLayerControlLayerConfig["layerConfig"]["legend"];
|
|
467
467
|
jsonform?: import("json-schema").JSONSchema7;
|
|
468
|
-
tooltip?: {
|
|
468
|
+
tooltip?: {
|
|
469
|
+
id: string;
|
|
470
|
+
title?: string;
|
|
471
|
+
appendix?: string;
|
|
472
|
+
decimals?: number;
|
|
473
|
+
}[];
|
|
469
474
|
};
|
|
470
475
|
export type EodashRasterJSONForm = {
|
|
471
476
|
jsonform: Record<string, any>;
|
|
@@ -620,7 +625,6 @@ export interface OAuth2Flow {
|
|
|
620
625
|
scopes: Record<string, string>;
|
|
621
626
|
}
|
|
622
627
|
|
|
623
|
-
|
|
624
628
|
/** Signed URL flow configuration */
|
|
625
629
|
export interface SignedUrlFlow {
|
|
626
630
|
authorizationApi: string;
|
|
@@ -638,20 +642,20 @@ export interface SignedUrlFlow {
|
|
|
638
642
|
}
|
|
639
643
|
|
|
640
644
|
export interface ApiKeyAuthScheme extends AuthScheme {
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
645
|
+
type: "apiKey";
|
|
646
|
+
name: string;
|
|
647
|
+
in: string;
|
|
644
648
|
}
|
|
645
649
|
|
|
646
650
|
import { StacItem, StacLink, StacAsset } from "stac-ts";
|
|
647
651
|
export interface StacAuthItem extends StacItem {
|
|
648
652
|
"auth:schemes": {
|
|
649
653
|
[key: string]: AuthScheme;
|
|
650
|
-
}
|
|
654
|
+
};
|
|
651
655
|
}
|
|
652
656
|
export interface StacAuthLink extends StacLink {
|
|
653
|
-
"auth:refs": [string]
|
|
657
|
+
"auth:refs": [string];
|
|
654
658
|
}
|
|
655
659
|
export interface StacAuthAsset extends StacAsset {
|
|
656
|
-
"auth:refs": [string]
|
|
660
|
+
"auth:refs": [string];
|
|
657
661
|
}
|
|
@@ -9,6 +9,10 @@ import {
|
|
|
9
9
|
mdiSnowflake,
|
|
10
10
|
mdiWater,
|
|
11
11
|
mdiWeatherWindy,
|
|
12
|
+
mdiAccountMultiple,
|
|
13
|
+
mdiHiking,
|
|
14
|
+
mdiVolleyball,
|
|
15
|
+
mdiWrench,
|
|
12
16
|
} from "@mdi/js";
|
|
13
17
|
import { reactive, ref, shallowReactive } from "vue";
|
|
14
18
|
|
|
@@ -97,10 +101,22 @@ export const dataThemesBrands = {
|
|
|
97
101
|
icon: mdiWeatherWindy,
|
|
98
102
|
color: "#475faf",
|
|
99
103
|
},
|
|
104
|
+
climate: {
|
|
105
|
+
icon: mdiWeatherWindy,
|
|
106
|
+
color: "#475faf",
|
|
107
|
+
},
|
|
100
108
|
economy: {
|
|
101
109
|
icon: mdiCurrencyEur,
|
|
102
110
|
color: "#8E81AF",
|
|
103
111
|
},
|
|
112
|
+
commerce: {
|
|
113
|
+
icon: mdiCurrencyEur,
|
|
114
|
+
color: "#8E81AF",
|
|
115
|
+
},
|
|
116
|
+
society: {
|
|
117
|
+
icon: mdiAccountMultiple,
|
|
118
|
+
color: "#8ac501",
|
|
119
|
+
},
|
|
104
120
|
biomass: {
|
|
105
121
|
icon: mdiLeaf,
|
|
106
122
|
color: "#009E73",
|
|
@@ -109,8 +125,24 @@ export const dataThemesBrands = {
|
|
|
109
125
|
icon: mdiLightningBolt,
|
|
110
126
|
color: "#a1280a",
|
|
111
127
|
},
|
|
128
|
+
energy: {
|
|
129
|
+
icon: mdiLightningBolt,
|
|
130
|
+
color: "#475faf",
|
|
131
|
+
},
|
|
132
|
+
tourism: {
|
|
133
|
+
icon: mdiHiking,
|
|
134
|
+
color: "#80510aff",
|
|
135
|
+
},
|
|
136
|
+
sport: {
|
|
137
|
+
icon: mdiVolleyball,
|
|
138
|
+
color: "#e98e65ff",
|
|
139
|
+
},
|
|
112
140
|
cryosphere: {
|
|
113
141
|
icon: mdiSnowflake,
|
|
114
142
|
color: "#42C7B8",
|
|
115
143
|
},
|
|
144
|
+
industry: {
|
|
145
|
+
icon: mdiWrench,
|
|
146
|
+
color: "#8d845cff",
|
|
147
|
+
},
|
|
116
148
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createBlock, openBlock, withCtx, createElementVNode, unref, createElementBlock, createCommentVNode, normalizeStyle, Suspense, resolveDynamicComponent, mergeProps, Fragment, renderList, Transition } from 'vue';
|
|
2
2
|
import '@eox/layout';
|
|
3
|
-
import { _ as _export_sfc, u as useDefineTemplate } from './asWebComponent-
|
|
4
|
-
import { V as VMain } from './VMain-
|
|
3
|
+
import { _ as _export_sfc, u as useDefineTemplate } from './asWebComponent-DdguWGDI.js';
|
|
4
|
+
import { V as VMain } from './VMain-vk4-rkw-.js';
|
|
5
5
|
|
|
6
6
|
const _style_0 = ".panel[data-v-9c8477cc]{position:relative;overflow:auto;z-index:1;pointer-events:none}.pointer[data-v-9c8477cc]{pointer-events:all}.bg-panel[data-v-9c8477cc]{z-index:0;border-radius:0!important}.fade-enter-active[data-v-9c8477cc],.fade-leave-active[data-v-9c8477cc]{transition:opacity .25s ease}.fade-enter-from[data-v-9c8477cc],.fade-leave-to[data-v-9c8477cc]{opacity:0}.bg-surface[data-v-9c8477cc],.bg-primary[data-v-9c8477cc]{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;max-height:100%;overflow:auto;scrollbar-color:rgba(var(--v-theme-on-surface),.2) transparent;scrollbar-width:thin}.bg-surface[data-v-9c8477cc]{background-color:rgba(var(--v-theme-surface),var(--v-surface-opacity, .8))!important}.bg-primary[data-v-9c8477cc]{background-color:rgba(var(--v-theme-primary),var(--v-primary-opacity, .8))!important}";
|
|
7
7
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { withAsyncContext, ref, onMounted, onUnmounted, createElementBlock, openBlock, createBlock, resolveDynamicComponent, mergeProps } from 'vue';
|
|
2
|
-
import { E as useSTAcStore } from './asWebComponent-
|
|
2
|
+
import { E as useSTAcStore } from './asWebComponent-DdguWGDI.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 { useCssVars, ref, useTemplateRef, customRef, computed, reactive, watch, onMounted, createElementBlock, openBlock, createVNode, unref, createSlots, withCtx, createElementVNode, withDirectives, createCommentVNode, createBlock, mergeProps, toHandlers } from 'vue';
|
|
2
2
|
import { DatePicker } from 'v-calendar';
|
|
3
|
-
import { _ as _export_sfc, D as useDisplay, E as useSTAcStore, F as useTransparentPanel, G as VBtn, H as VIcon, I as eodashCollections, J as eodashCompareCollections } from './asWebComponent-
|
|
4
|
-
import {
|
|
3
|
+
import { _ as _export_sfc, D as useDisplay, E as useSTAcStore, F as useTransparentPanel, G as VBtn, H as VIcon, I as eodashCollections, J as eodashCompareCollections } from './asWebComponent-DdguWGDI.js';
|
|
4
|
+
import { B as datetime } from './helpers-CtUlAW0N.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-
|
|
8
|
+
import { T as Tooltip } from './index-DBo0F4Fv.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(--v5270a4d4)!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,5 @@
|
|
|
1
1
|
import { withAsyncContext, computed, ref, createElementBlock, openBlock, mergeProps, unref, createElementVNode, toDisplayString } from 'vue';
|
|
2
|
-
import { _ as _export_sfc, E as useSTAcStore, Q as isFirstLoad } from './asWebComponent-
|
|
2
|
+
import { _ as _export_sfc, E as useSTAcStore, Q as isFirstLoad } from './asWebComponent-DdguWGDI.js';
|
|
3
3
|
|
|
4
4
|
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
5
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { withAsyncContext, computed, ref, createElementBlock, openBlock, createCommentVNode, mergeProps, unref, renderSlot, createElementVNode, toDisplayString } from 'vue';
|
|
2
2
|
import 'color-legend-element';
|
|
3
3
|
import '@eox/timecontrol';
|
|
4
|
-
import {
|
|
5
|
-
import { _ as _export_sfc, E as useSTAcStore, M as layerControlFormValueCompare, N as layerControlFormValue, J as eodashCompareCollections, I as eodashCollections } from './asWebComponent-
|
|
4
|
+
import { N as mapCompareEl, h as mapEl, O as getColFromLayer } from './helpers-CtUlAW0N.js';
|
|
5
|
+
import { _ as _export_sfc, E as useSTAcStore, M as layerControlFormValueCompare, N as layerControlFormValue, J as eodashCompareCollections, I as eodashCollections } from './asWebComponent-DdguWGDI.js';
|
|
6
6
|
import { storeToRefs } from 'pinia';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ref, createElementBlock, openBlock, createBlock, unref, withCtx, createVNode, mergeProps } from 'vue';
|
|
2
|
-
import {
|
|
2
|
+
import { D as activeTemplate } from './helpers-CtUlAW0N.js';
|
|
3
3
|
import { mdiViewDashboard } from '@mdi/js';
|
|
4
|
-
import { D as useDisplay, F as useTransparentPanel, H as VIcon } from './asWebComponent-
|
|
5
|
-
import { V as VTooltip } from './VTooltip-
|
|
4
|
+
import { D as useDisplay, F as useTransparentPanel, H as VIcon } from './asWebComponent-DdguWGDI.js';
|
|
5
|
+
import { V as VTooltip } from './VTooltip-BYUZeia1.js';
|
|
6
6
|
|
|
7
7
|
const _sfc_main = {
|
|
8
8
|
__name: 'EodashLayoutSwitcher',
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { computed, ref, createElementBlock, openBlock, createCommentVNode, createBlock, createVNode, createElementVNode, unref, withCtx, mergeProps, triggerRef } from 'vue';
|
|
2
|
-
import { _ as _export_sfc, E as useSTAcStore, D as useDisplay, F as useTransparentPanel } from './asWebComponent-
|
|
3
|
-
import {
|
|
2
|
+
import { _ as _export_sfc, E as useSTAcStore, D as useDisplay, F as useTransparentPanel } from './asWebComponent-DdguWGDI.js';
|
|
3
|
+
import { D as activeTemplate, Q as availableMapProjection, R as changeMapProjection, C as poi, I as comparePoi, h as mapEl, S as setActiveTemplate } from './helpers-CtUlAW0N.js';
|
|
4
4
|
import { mdiCompareRemove, mdiCompare, mdiPlus, mdiMinus, mdiMapPlus, mdiEarthBox, mdiStarFourPointsCircleOutline } from '@mdi/js';
|
|
5
|
-
import ExportState from './ExportState-
|
|
6
|
-
import _sfc_main$1 from './PopUp-
|
|
7
|
-
import EodashItemFilter from './EodashItemFilter-
|
|
5
|
+
import ExportState from './ExportState-ruNyRS2E.js';
|
|
6
|
+
import _sfc_main$1 from './PopUp-DRgOmD7-.js';
|
|
7
|
+
import EodashItemFilter from './EodashItemFilter-CAsZpOoQ.js';
|
|
8
8
|
import { storeToRefs } from 'pinia';
|
|
9
|
-
import { l as loadPOiIndicator } from './handling-
|
|
9
|
+
import { l as loadPOiIndicator } from './handling-CbgeKrqT.js';
|
|
10
10
|
import { e as easeOut } from './easing-CH0-9wR8.js';
|
|
11
11
|
import '@eox/geosearch';
|
|
12
12
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createElementBlock, openBlock, createElementVNode, unref } from 'vue';
|
|
2
2
|
import '@eox/stacinfo';
|
|
3
|
-
import {
|
|
3
|
+
import { A as currentUrl } from './helpers-CtUlAW0N.js';
|
|
4
4
|
|
|
5
5
|
const _hoisted_1 = { class: "flex-grow-1" };
|
|
6
6
|
const _hoisted_2 = [".for", ".allowHtml", ".body", ".featured", ".footer", ".styleOverride", ".header", ".subheader", ".tags"];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed, createElementBlock, createCommentVNode, openBlock, unref } from 'vue';
|
|
2
|
-
import { h as mapEl,
|
|
3
|
-
import { I as eodashCollections } from './asWebComponent-
|
|
2
|
+
import { h as mapEl, B as datetime } from './helpers-CtUlAW0N.js';
|
|
3
|
+
import { I as eodashCollections } from './asWebComponent-DdguWGDI.js';
|
|
4
4
|
import '@eox/timeslider';
|
|
5
5
|
|
|
6
6
|
const _hoisted_1 = [".filters"];
|