@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
|
@@ -3838,7 +3838,7 @@ const currentUrl = ref("");
|
|
|
3838
3838
|
const currentCompareUrl = ref("");
|
|
3839
3839
|
|
|
3840
3840
|
/** Currently selected datetime */
|
|
3841
|
-
const datetime = ref(
|
|
3841
|
+
const datetime = ref("");
|
|
3842
3842
|
|
|
3843
3843
|
/** Currently selected indicator */
|
|
3844
3844
|
const indicator = ref("");
|
|
@@ -4270,14 +4270,21 @@ const extractRoles = (properties, linkOrAsset) => {
|
|
|
4270
4270
|
* @param {import("stac-ts").StacItem} item
|
|
4271
4271
|
* @param {string} itemUrl
|
|
4272
4272
|
* @param {string | undefined} key
|
|
4273
|
-
* @returns
|
|
4273
|
+
* @returns
|
|
4274
4274
|
**/
|
|
4275
|
-
const fetchStyle = async (item, itemUrl, key=undefined) => {
|
|
4275
|
+
const fetchStyle = async (item, itemUrl, key = undefined) => {
|
|
4276
4276
|
let styleLink = null;
|
|
4277
4277
|
if (key) {
|
|
4278
|
-
styleLink = item.links.find(
|
|
4278
|
+
styleLink = item.links.find(
|
|
4279
|
+
(link) =>
|
|
4280
|
+
link.rel.includes("style") &&
|
|
4281
|
+
link["links:keys"] &&
|
|
4282
|
+
/** @type {Array<string>} */ (link["links:keys"]).includes(key),
|
|
4283
|
+
);
|
|
4279
4284
|
} else {
|
|
4280
|
-
styleLink = item.links.find(
|
|
4285
|
+
styleLink = item.links.find(
|
|
4286
|
+
(link) => link.rel.includes("style") && !link["links:keys"],
|
|
4287
|
+
);
|
|
4281
4288
|
}
|
|
4282
4289
|
if (styleLink) {
|
|
4283
4290
|
let url = "";
|
|
@@ -4424,6 +4431,37 @@ const extractLayerTimeValues = (items, currentStep) => {
|
|
|
4424
4431
|
};
|
|
4425
4432
|
};
|
|
4426
4433
|
|
|
4434
|
+
/**
|
|
4435
|
+
* Recursively find all layers whose ID up to the first ; is same as given layer
|
|
4436
|
+
*
|
|
4437
|
+
* @param {import("@eox/map").EoxLayer[]} layers
|
|
4438
|
+
* @param {import("@eox/map").EoxLayer | undefined} referenceLayer - layer
|
|
4439
|
+
* @returns {import("@eox/map").EoxLayer[]} Matching layer objects.
|
|
4440
|
+
*/
|
|
4441
|
+
const findLayersByLayerPrefix = (layers, referenceLayer) => {
|
|
4442
|
+
const refId = referenceLayer?.properties?.id;
|
|
4443
|
+
|
|
4444
|
+
if (typeof refId !== "string" || !refId.includes(";")) {
|
|
4445
|
+
throw new Error("Reference layer ID must contain a ';' separator.");
|
|
4446
|
+
}
|
|
4447
|
+
|
|
4448
|
+
const prefix = refId.split(";")[0];
|
|
4449
|
+
const matches = [];
|
|
4450
|
+
|
|
4451
|
+
for (const layer of layers) {
|
|
4452
|
+
if (layer.type === "Group" && Array.isArray(layer.layers)) {
|
|
4453
|
+
matches.push(...findLayersByLayerPrefix(layer.layers, referenceLayer));
|
|
4454
|
+
} else {
|
|
4455
|
+
const id = layer?.properties?.id;
|
|
4456
|
+
if (typeof id === "string" && id.startsWith(prefix)) {
|
|
4457
|
+
matches.push(layer);
|
|
4458
|
+
}
|
|
4459
|
+
}
|
|
4460
|
+
}
|
|
4461
|
+
|
|
4462
|
+
return matches;
|
|
4463
|
+
};
|
|
4464
|
+
|
|
4427
4465
|
/**
|
|
4428
4466
|
* Find JSON layer by ID
|
|
4429
4467
|
* @param {string} layer
|
|
@@ -4445,6 +4483,54 @@ const findLayer = (layers, layer) => {
|
|
|
4445
4483
|
}
|
|
4446
4484
|
};
|
|
4447
4485
|
|
|
4486
|
+
/**
|
|
4487
|
+
* Removes a list of layers (and nested ones) from a layer/group structure,
|
|
4488
|
+
* and inserts new layers in place of the first removed one.
|
|
4489
|
+
*
|
|
4490
|
+
* @param {import("@eox/map").EoxLayer[]} layers - Array of layers or groups.
|
|
4491
|
+
* @param {import("@eox/map").EoxLayer[]} toRemove - Array of layers to remove (by id).
|
|
4492
|
+
* @param {Record<string, any>[]} toInsert - Array of layers to insert instead.
|
|
4493
|
+
* @returns {Record<string, any>[]} New array with replacements applied.
|
|
4494
|
+
*/
|
|
4495
|
+
const replaceLayersInStructure = (layers, toRemove, toInsert) => {
|
|
4496
|
+
const result = [];
|
|
4497
|
+
let inserted = false;
|
|
4498
|
+
|
|
4499
|
+
for (const layer of layers) {
|
|
4500
|
+
if (layer.type === "Group" && Array.isArray(layer.layers)) {
|
|
4501
|
+
// Recurse into group layers
|
|
4502
|
+
const newGroupLayers = replaceLayersInStructure(
|
|
4503
|
+
layer.layers,
|
|
4504
|
+
toRemove,
|
|
4505
|
+
toInsert,
|
|
4506
|
+
);
|
|
4507
|
+
result.push({ ...layer, layers: newGroupLayers });
|
|
4508
|
+
continue;
|
|
4509
|
+
}
|
|
4510
|
+
|
|
4511
|
+
// Match by reference or id
|
|
4512
|
+
const id = layer?.properties?.id;
|
|
4513
|
+
const isToRemove = toRemove.some((rem) => {
|
|
4514
|
+
const remId = rem?.properties?.id;
|
|
4515
|
+
return remId === id;
|
|
4516
|
+
});
|
|
4517
|
+
|
|
4518
|
+
if (isToRemove) {
|
|
4519
|
+
// On first removed occurrence, insert the new layers
|
|
4520
|
+
if (!inserted) {
|
|
4521
|
+
result.push(...toInsert);
|
|
4522
|
+
inserted = true;
|
|
4523
|
+
}
|
|
4524
|
+
// Skip this layer (it’s removed)
|
|
4525
|
+
continue;
|
|
4526
|
+
}
|
|
4527
|
+
|
|
4528
|
+
result.push(layer);
|
|
4529
|
+
}
|
|
4530
|
+
|
|
4531
|
+
return result;
|
|
4532
|
+
};
|
|
4533
|
+
|
|
4448
4534
|
/**
|
|
4449
4535
|
* Removes the layer with the id provided and injects an array of layers in its position
|
|
4450
4536
|
* @param {import("@eox/map").EoxLayer[]} currentLayers
|
|
@@ -4490,7 +4576,7 @@ const getColFromLayer = async (indicators, layer) => {
|
|
|
4490
4576
|
for (const ind of indicators) {
|
|
4491
4577
|
if (ind.collectionStac?.id !== collectionId) continue;
|
|
4492
4578
|
const items = await ind.getItems();
|
|
4493
|
-
const itemIds = items?.map(item => item.id || item.datetime) ?? [];
|
|
4579
|
+
const itemIds = items?.map((item) => item.id || item.datetime) ?? [];
|
|
4494
4580
|
if (itemIds.includes(itemId)) {
|
|
4495
4581
|
return ind;
|
|
4496
4582
|
}
|
|
@@ -4840,4 +4926,4 @@ function extractLayerLegend(collection) {
|
|
|
4840
4926
|
return extraProperties;
|
|
4841
4927
|
}
|
|
4842
4928
|
|
|
4843
|
-
export {
|
|
4929
|
+
export { currentUrl as A, datetime as B, poi as C, activeTemplate as D, mapPosition as E, indicator as F, currentCompareUrl as G, compareIndicator as H, comparePoi as I, states as J, actions as K, includesProcess as L, sanitizeBbox as M, mapCompareEl as N, getColFromLayer as O, setMapProjFromCol as P, availableMapProjection as Q, changeMapProjection as R, setActiveTemplate as S, compareChartEl as T, chartEl as U, replaceLayer as V, axios$1 as W, removeUnneededProperties as X, getChartSpec as Y, extractLayerConfig as a, addTooltipInteraction as b, createLayerID as c, createAssetID as d, extractRoles as e, fetchStyle as f, getProjectionCode as g, mapEl as h, isSTACItem as i, axios as j, extractLayerTimeValues as k, fetchApiItems as l, mergeGeojsons as m, getDatetimeProperty as n, fetchAllStyles as o, getLayers as p, getCompareLayers as q, registerProjection as r, findLayer as s, findLayersByLayerPrefix as t, replaceLayersInStructure as u, generateFeatures as v, extractLayerLegend as w, extractCollectionUrls as x, generateLinksFromItems as y, revokeCollectionBlobUrls as z };
|
|
@@ -2,13 +2,13 @@ import { onMounted, watch, nextTick, ref, useTemplateRef, computed, createElemen
|
|
|
2
2
|
import '@eox/chart';
|
|
3
3
|
import '@eox/drawtools';
|
|
4
4
|
import '@eox/jsonform';
|
|
5
|
-
import { R as eoxLayersKey, K as useOnLayersUpdate, _ as _export_sfc, E as useSTAcStore, G as VBtn } from './asWebComponent-
|
|
5
|
+
import { R as eoxLayersKey, K as useOnLayersUpdate, _ as _export_sfc, E as useSTAcStore, G as VBtn } from './asWebComponent-DdguWGDI.js';
|
|
6
6
|
import { storeToRefs } from 'pinia';
|
|
7
|
-
import { P as ProcessList, c as compareJobs, j as jobs } from './ProcessList-
|
|
8
|
-
import { i as initProcess, o as onChartClick, h as handleProcesses } from './handling-
|
|
7
|
+
import { P as ProcessList, c as compareJobs, j as jobs } from './ProcessList-DxyCFQdz.js';
|
|
8
|
+
import { i as initProcess, o as onChartClick, h as handleProcesses } from './handling-CbgeKrqT.js';
|
|
9
9
|
import { useEventBus } from '@vueuse/core';
|
|
10
|
-
import { u as updateJobsStatus, d as download } from './async-
|
|
11
|
-
import {
|
|
10
|
+
import { u as updateJobsStatus, d as download } from './async-D1MvO_Z_.js';
|
|
11
|
+
import { H as compareIndicator, F as indicator, N as mapCompareEl, h as mapEl, T as compareChartEl, U as chartEl } from './helpers-CtUlAW0N.js';
|
|
12
12
|
import { mdiCogPlayOutline, mdiDownloadCircleOutline } from '@mdi/js';
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { onMounted, onUnmounted, watch, computed, useTemplateRef, ref, toRaw, createElementBlock, openBlock, createElementVNode, createCommentVNode, unref, normalizeStyle, createVNode } from 'vue';
|
|
2
2
|
import '@eox/map';
|
|
3
3
|
import '@eox/map/src/plugins/advancedLayersAndSources';
|
|
4
|
-
import {
|
|
4
|
+
import { P as setMapProjFromCol, E as mapPosition, M as sanitizeBbox, h as mapEl, N as mapCompareEl, F as indicator, H as compareIndicator, C as poi, B as datetime } from './helpers-CtUlAW0N.js';
|
|
5
5
|
import { storeToRefs } from 'pinia';
|
|
6
|
-
import { O as EodashCollection, E as useSTAcStore, P as useEmitLayersUpdate, Q as isFirstLoad, K as useOnLayersUpdate, _ as _export_sfc, D as useDisplay, N as layerControlFormValue, M as layerControlFormValueCompare, J as eodashCompareCollections, I as eodashCollections } from './asWebComponent-
|
|
6
|
+
import { O as EodashCollection, E as useSTAcStore, P as useEmitLayersUpdate, Q as isFirstLoad, K as useOnLayersUpdate, _ as _export_sfc, D as useDisplay, a as useLayout, N as layerControlFormValue, M as layerControlFormValueCompare, J as eodashCompareCollections, I as eodashCollections } from './asWebComponent-DdguWGDI.js';
|
|
7
7
|
import log from 'loglevel';
|
|
8
8
|
import { i as inAndOut } from './easing-CH0-9wR8.js';
|
|
9
9
|
import mustache from 'mustache';
|
|
10
|
-
import EodashMapBtns from './EodashMapBtns-
|
|
10
|
+
import EodashMapBtns from './EodashMapBtns-nFY6MIAX.js';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Creates full layer configuration from indicator and time information
|
|
@@ -309,13 +309,6 @@ const useInitMap = (
|
|
|
309
309
|
return;
|
|
310
310
|
}
|
|
311
311
|
|
|
312
|
-
/** @type {Record<string,any>[]} */
|
|
313
|
-
layersCollection = await createLayersConfig(
|
|
314
|
-
updatedStac,
|
|
315
|
-
eodashCols,
|
|
316
|
-
selectedItem ? updatedItem : updatedTime,
|
|
317
|
-
);
|
|
318
|
-
|
|
319
312
|
// We try to set the current time selection to latest extent date
|
|
320
313
|
let endInterval = null;
|
|
321
314
|
const interval = updatedStac?.extent?.temporal?.interval;
|
|
@@ -334,8 +327,17 @@ const useInitMap = (
|
|
|
334
327
|
!isFirstLoad.value
|
|
335
328
|
) {
|
|
336
329
|
datetime.value = endInterval.toISOString();
|
|
330
|
+
} else if (isFirstLoad.value && !datetime.value && endInterval) {
|
|
331
|
+
datetime.value = endInterval.toISOString();
|
|
337
332
|
}
|
|
338
333
|
|
|
334
|
+
/** @type {Record<string,any>[]} */
|
|
335
|
+
layersCollection = await createLayersConfig(
|
|
336
|
+
updatedStac,
|
|
337
|
+
eodashCols,
|
|
338
|
+
updatedItem ?? updatedTime,
|
|
339
|
+
);
|
|
340
|
+
|
|
339
341
|
if (zoomToExtent) {
|
|
340
342
|
// Try to move map view to extent only when main
|
|
341
343
|
// indicator and map changes
|
|
@@ -407,7 +409,7 @@ const useUpdateTooltipProperties = (eodashCols, tooltipProperties) => {
|
|
|
407
409
|
});
|
|
408
410
|
};
|
|
409
411
|
|
|
410
|
-
const _style_0 = "#cursor-coordinates[data-v-
|
|
412
|
+
const _style_0 = "#cursor-coordinates[data-v-76f918a2]{position:fixed;left:24px;bottom:54px;color:#000000e6;font-size:11px;font-family:var(--eox-body-font-family);background:#fffe;border-radius:4px;border:none;padding:0 3px;max-height:24px}@media (max-width: 959px){#cursor-coordinates[data-v-76f918a2]{display:none}}#scale-line[data-v-76f918a2]{position:fixed;left:24px;bottom:28px;color:#fff}@media (max-width: 959px){#scale-line[data-v-76f918a2]{bottom:102px}}[data-v-76f918a2] .ol-scale-line{background:#fffe!important;border-radius:4px!important;border:none!important;padding:0 3px 3px!important;font-size:10px!important;font-family:var(--eox-body-font-family);max-height:20px}[data-v-76f918a2] .ol-scale-line-inner{display:flex;justify-content:center;border:1px solid rgba(0,0,0,.5)!important;border-top:none!important;color:#333!important;font-weight:500!important;transform:translateY(1px)}.map-buttons-container[data-v-76f918a2]{position:fixed;left:0;width:100%;height:100%;display:grid;grid-template-columns:repeat(12,1fr);grid-template-rows:repeat(12,1fr);pointer-events:none;z-index:1}.map-buttons-container[data-v-76f918a2]>*{pointer-events:auto}";
|
|
411
413
|
|
|
412
414
|
const _hoisted_1 = [".enabled"];
|
|
413
415
|
const _hoisted_2 = [".center", ".zoom", ".layers", ".controls"];
|
|
@@ -691,7 +693,10 @@ const tooltipPropertyTransform = (map) => {
|
|
|
691
693
|
param.value = JSON.stringify(param.value);
|
|
692
694
|
}
|
|
693
695
|
if (!isNaN(Number(param.value))) {
|
|
694
|
-
|
|
696
|
+
const decimals = !isNaN(Number(tooltipProp.decimals))
|
|
697
|
+
? Number(tooltipProp.decimals)
|
|
698
|
+
: 4;
|
|
699
|
+
param.value = Number(param.value).toFixed(decimals).toString();
|
|
695
700
|
}
|
|
696
701
|
|
|
697
702
|
return {
|
|
@@ -700,6 +705,13 @@ const tooltipPropertyTransform = (map) => {
|
|
|
700
705
|
};
|
|
701
706
|
};
|
|
702
707
|
};
|
|
708
|
+
const { mainRect } = useLayout();
|
|
709
|
+
const btnsTop = ref(0);
|
|
710
|
+
onMounted(() => {
|
|
711
|
+
const eoDash = document.querySelector("eo-dash");
|
|
712
|
+
btnsTop.value =
|
|
713
|
+
(mainRect.value.top || eoDash?.getBoundingClientRect().top) ?? 0;
|
|
714
|
+
});
|
|
703
715
|
|
|
704
716
|
return (_ctx, _cache) => {
|
|
705
717
|
return (openBlock(), createElementBlock("span", null, [
|
|
@@ -746,24 +758,24 @@ return (_ctx, _cache) => {
|
|
|
746
758
|
: createCommentVNode("v-if", true),
|
|
747
759
|
createElementVNode("div", {
|
|
748
760
|
class: "map-buttons-container",
|
|
749
|
-
style: normalizeStyle(`margin: ${__props.btnsPosition.gap}px 0 ${__props.btnsPosition.gap}px 0
|
|
761
|
+
style: normalizeStyle(`margin: ${__props.btnsPosition.gap}px 0 ${__props.btnsPosition.gap}px 0; top: ${btnsTop.value}px;`)
|
|
750
762
|
}, [
|
|
751
763
|
createCommentVNode(" prettier-ignore "),
|
|
752
764
|
createVNode(EodashMapBtns, {
|
|
753
765
|
style: normalizeStyle({
|
|
754
|
-
gridColumn: (unref(indicator) || unref(compareIndicator)) ? responsiveX.value : '12',
|
|
766
|
+
gridColumn: (unref(indicator) || unref(compareIndicator) || unref(poi)) ? responsiveX.value : '12',
|
|
755
767
|
gridRow: responsiveY.value,
|
|
756
768
|
}),
|
|
757
|
-
exportMap: (unref(indicator) || unref(compareIndicator)) ? btnsProps.value.exportMap : false,
|
|
758
|
-
changeProjection: (unref(indicator) || unref(compareIndicator)) ? btnsProps.value.changeProjection : false
|
|
769
|
+
exportMap: (unref(indicator) || unref(compareIndicator) || unref(poi)) ? btnsProps.value.exportMap : false,
|
|
770
|
+
changeProjection: (unref(indicator) || unref(compareIndicator) || unref(poi)) ? btnsProps.value.changeProjection : false
|
|
759
771
|
,
|
|
760
|
-
compareIndicators: (unref(indicator) || unref(compareIndicator)) ? btnsProps.value.compareIndicators : false
|
|
772
|
+
compareIndicators: (unref(indicator) || unref(compareIndicator) || unref(poi)) ? btnsProps.value.compareIndicators : false
|
|
761
773
|
,
|
|
762
|
-
backToPOIs: (unref(indicator) || unref(compareIndicator)) ? btnsProps.value.backToPOIs : false
|
|
774
|
+
backToPOIs: (unref(indicator) || unref(compareIndicator) || unref(poi)) ? btnsProps.value.backToPOIs : false
|
|
763
775
|
,
|
|
764
|
-
enableSearch: (unref(indicator) || unref(compareIndicator)) ? btnsProps.value.enableSearch : false
|
|
776
|
+
enableSearch: (unref(indicator) || unref(compareIndicator) || unref(poi)) ? btnsProps.value.enableSearch : false
|
|
765
777
|
,
|
|
766
|
-
enableZoom: (unref(indicator) || unref(compareIndicator)) ? btnsProps.value.enableZoom : false
|
|
778
|
+
enableZoom: (unref(indicator) || unref(compareIndicator) || unref(poi)) ? btnsProps.value.enableZoom : false
|
|
767
779
|
|
|
768
780
|
}, null, 8 /* PROPS */, ["style", "exportMap", "changeProjection", "compareIndicators", "backToPOIs", "enableSearch", "enableZoom"])
|
|
769
781
|
], 4 /* STYLE */)
|
|
@@ -772,6 +784,6 @@ return (_ctx, _cache) => {
|
|
|
772
784
|
}
|
|
773
785
|
|
|
774
786
|
};
|
|
775
|
-
const index = /*#__PURE__*/_export_sfc(_sfc_main, [['styles',[_style_0]],['__scopeId',"data-v-
|
|
787
|
+
const index = /*#__PURE__*/_export_sfc(_sfc_main, [['styles',[_style_0]],['__scopeId',"data-v-76f918a2"]]);
|
|
776
788
|
|
|
777
789
|
export { index as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { onMounted, onUnmounted, withAsyncContext, useTemplateRef, ref, createElementBlock, openBlock, createVNode, createElementVNode, withCtx, unref, toDisplayString } from 'vue';
|
|
2
|
-
import { E as useSTAcStore, K as useOnLayersUpdate, _ as _export_sfc, L as VRow } from './asWebComponent-
|
|
3
|
-
import {
|
|
2
|
+
import { E as useSTAcStore, K as useOnLayersUpdate, _ as _export_sfc, L as VRow } from './asWebComponent-DdguWGDI.js';
|
|
3
|
+
import { F as indicator, h as mapEl, M as sanitizeBbox, j as axios } from './helpers-CtUlAW0N.js';
|
|
4
4
|
import { i as inAndOut } from './easing-CH0-9wR8.js';
|
|
5
5
|
import { mdiViewDashboard } from '@mdi/js';
|
|
6
|
-
import _sfc_main$1 from './EodashLayoutSwitcher-
|
|
6
|
+
import _sfc_main$1 from './EodashLayoutSwitcher-B9XqQXCS.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolveComponent, render, h, mergeProps } from 'vue';
|
|
2
|
-
import { X as consoleError, Y as isObject } from './asWebComponent-
|
|
3
|
-
import { V as VTooltip } from './VTooltip-
|
|
2
|
+
import { X as consoleError, Y as isObject } from './asWebComponent-DdguWGDI.js';
|
|
3
|
+
import { V as VTooltip } from './VTooltip-BYUZeia1.js';
|
|
4
4
|
|
|
5
5
|
// Utilities
|
|
6
6
|
function useDirectiveComponent(component, props) {
|
package/dist/client/templates.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { mdiViewDashboardVariant, mdiViewDashboard } from '@mdi/js';
|
|
2
|
-
import {
|
|
2
|
+
import { L as includesProcess } from './helpers-CtUlAW0N.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Special values that tell deepmerge to perform a certain action.
|
|
@@ -904,4 +904,4 @@ const getBaseConfig = (config) => {
|
|
|
904
904
|
return merged;
|
|
905
905
|
};
|
|
906
906
|
|
|
907
|
-
export { compare, getBaseConfig as default, expert, getBaseConfig, lite };
|
|
907
|
+
export { compare, getBaseConfig as default, expert, explore, getBaseConfig, lite };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { mergeProps, h, TransitionGroup, Transition } from 'vue';
|
|
2
|
-
import { p as propsFactory, Y as isObject, aG as onlyDefinedProps } from './asWebComponent-
|
|
2
|
+
import { p as propsFactory, Y as isObject, aG as onlyDefinedProps } from './asWebComponent-DdguWGDI.js';
|
|
3
3
|
|
|
4
4
|
// Utilities
|
|
5
5
|
const makeTransitionProps = propsFactory({
|
|
@@ -150,6 +150,7 @@ export class EodashCollection {
|
|
|
150
150
|
id: string;
|
|
151
151
|
title?: string;
|
|
152
152
|
appendix?: string;
|
|
153
|
+
decimals?: number;
|
|
153
154
|
}[]>;
|
|
154
155
|
/**
|
|
155
156
|
*
|
|
@@ -157,6 +158,6 @@ export class EodashCollection {
|
|
|
157
158
|
* @param {string} layer
|
|
158
159
|
* @param {string} map
|
|
159
160
|
*/
|
|
160
|
-
updateLayerJson(datetime: string, layer: string, map: string): Promise<
|
|
161
|
+
updateLayerJson(datetime: string, layer: string, map: string): Promise<Record<string, any>[] | undefined>;
|
|
161
162
|
#private;
|
|
162
163
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
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: import("../types").StacAuthItem, linkOrAsset: import("../types").StacAuthLink | import("../types").StacAuthAsset): string;
|
|
@@ -204,6 +204,7 @@ export function fetchStyle(item: import("stac-ts").StacItem, itemUrl: string, ke
|
|
|
204
204
|
id: string;
|
|
205
205
|
title?: string;
|
|
206
206
|
appendix?: string;
|
|
207
|
+
decimals?: number;
|
|
207
208
|
}[];
|
|
208
209
|
} | {
|
|
209
210
|
[n: number]: import("ol/style/flat.js").FlatStyle;
|
|
@@ -227,6 +228,7 @@ export function fetchStyle(item: import("stac-ts").StacItem, itemUrl: string, ke
|
|
|
227
228
|
id: string;
|
|
228
229
|
title?: string;
|
|
229
230
|
appendix?: string;
|
|
231
|
+
decimals?: number;
|
|
230
232
|
}[];
|
|
231
233
|
};
|
|
232
234
|
splice(start: number, deleteCount?: number): import("ol/style/flat.js").FlatStyle[];
|
|
@@ -258,6 +260,7 @@ export function fetchStyle(item: import("stac-ts").StacItem, itemUrl: string, ke
|
|
|
258
260
|
id: string;
|
|
259
261
|
title?: string;
|
|
260
262
|
appendix?: string;
|
|
263
|
+
decimals?: number;
|
|
261
264
|
}[];
|
|
262
265
|
};
|
|
263
266
|
copyWithin(target: number, start: number, end?: number): import("ol/style/flat.js").FlatStyle[] & {
|
|
@@ -268,6 +271,7 @@ export function fetchStyle(item: import("stac-ts").StacItem, itemUrl: string, ke
|
|
|
268
271
|
id: string;
|
|
269
272
|
title?: string;
|
|
270
273
|
appendix?: string;
|
|
274
|
+
decimals?: number;
|
|
271
275
|
}[];
|
|
272
276
|
};
|
|
273
277
|
entries(): ArrayIterator<[number, import("ol/style/flat.js").FlatStyle]>;
|
|
@@ -337,6 +341,7 @@ export function fetchStyle(item: import("stac-ts").StacItem, itemUrl: string, ke
|
|
|
337
341
|
id: string;
|
|
338
342
|
title?: string;
|
|
339
343
|
appendix?: string;
|
|
344
|
+
decimals?: number;
|
|
340
345
|
}[];
|
|
341
346
|
} | {
|
|
342
347
|
[n: number]: import("ol/style/flat.js").Rule;
|
|
@@ -360,6 +365,7 @@ export function fetchStyle(item: import("stac-ts").StacItem, itemUrl: string, ke
|
|
|
360
365
|
id: string;
|
|
361
366
|
title?: string;
|
|
362
367
|
appendix?: string;
|
|
368
|
+
decimals?: number;
|
|
363
369
|
}[];
|
|
364
370
|
};
|
|
365
371
|
splice(start: number, deleteCount?: number): import("ol/style/flat.js").Rule[];
|
|
@@ -391,6 +397,7 @@ export function fetchStyle(item: import("stac-ts").StacItem, itemUrl: string, ke
|
|
|
391
397
|
id: string;
|
|
392
398
|
title?: string;
|
|
393
399
|
appendix?: string;
|
|
400
|
+
decimals?: number;
|
|
394
401
|
}[];
|
|
395
402
|
};
|
|
396
403
|
copyWithin(target: number, start: number, end?: number): import("ol/style/flat.js").Rule[] & {
|
|
@@ -401,6 +408,7 @@ export function fetchStyle(item: import("stac-ts").StacItem, itemUrl: string, ke
|
|
|
401
408
|
id: string;
|
|
402
409
|
title?: string;
|
|
403
410
|
appendix?: string;
|
|
411
|
+
decimals?: number;
|
|
404
412
|
}[];
|
|
405
413
|
};
|
|
406
414
|
entries(): ArrayIterator<[number, import("ol/style/flat.js").Rule]>;
|
|
@@ -470,6 +478,7 @@ export function fetchStyle(item: import("stac-ts").StacItem, itemUrl: string, ke
|
|
|
470
478
|
id: string;
|
|
471
479
|
title?: string;
|
|
472
480
|
appendix?: string;
|
|
481
|
+
decimals?: number;
|
|
473
482
|
}[];
|
|
474
483
|
} | undefined>;
|
|
475
484
|
export function fetchAllStyles(item: import("stac-ts").StacItem, itemUrl: string): Promise<Array<import("../types").EodashStyleJson>>;
|
|
@@ -494,7 +503,9 @@ export function extractLayerTimeValues(items?: import("stac-ts").StacLink[] | im
|
|
|
494
503
|
itemId: string;
|
|
495
504
|
}[];
|
|
496
505
|
};
|
|
506
|
+
export function findLayersByLayerPrefix(layers: import("@eox/map").EoxLayer[], referenceLayer: import("@eox/map").EoxLayer | undefined): import("@eox/map").EoxLayer[];
|
|
497
507
|
export function findLayer(layers: import("@eox/map").EoxLayer[], layer: string): import("@eox/map").EoxLayer | undefined;
|
|
508
|
+
export function replaceLayersInStructure(layers: import("@eox/map").EoxLayer[], toRemove: import("@eox/map").EoxLayer[], toInsert: Record<string, any>[]): Record<string, any>[];
|
|
498
509
|
export function replaceLayer(currentLayers: import("@eox/map").EoxLayer[], oldLayer: string, newLayers: import("@eox/map").EoxLayer[]): import("@eox/map").EoxLayer[];
|
|
499
510
|
export function getColFromLayer(indicators: import("../eodashSTAC/EodashCollection.js").EodashCollection[], layer: import("ol/layer").Layer): Promise<import("../eodashSTAC/EodashCollection.js").EodashCollection | undefined>;
|
|
500
511
|
export function createLayerID(collectionId: string, itemId: string, link: import("stac-ts").StacLink, projectionCode: string | import("ol/proj").ProjectionLike): string;
|
|
@@ -70,10 +70,22 @@ export const dataThemesBrands: {
|
|
|
70
70
|
icon: string;
|
|
71
71
|
color: string;
|
|
72
72
|
};
|
|
73
|
+
climate: {
|
|
74
|
+
icon: string;
|
|
75
|
+
color: string;
|
|
76
|
+
};
|
|
73
77
|
economy: {
|
|
74
78
|
icon: string;
|
|
75
79
|
color: string;
|
|
76
80
|
};
|
|
81
|
+
commerce: {
|
|
82
|
+
icon: string;
|
|
83
|
+
color: string;
|
|
84
|
+
};
|
|
85
|
+
society: {
|
|
86
|
+
icon: string;
|
|
87
|
+
color: string;
|
|
88
|
+
};
|
|
77
89
|
biomass: {
|
|
78
90
|
icon: string;
|
|
79
91
|
color: string;
|
|
@@ -82,8 +94,24 @@ export const dataThemesBrands: {
|
|
|
82
94
|
icon: string;
|
|
83
95
|
color: string;
|
|
84
96
|
};
|
|
97
|
+
energy: {
|
|
98
|
+
icon: string;
|
|
99
|
+
color: string;
|
|
100
|
+
};
|
|
101
|
+
tourism: {
|
|
102
|
+
icon: string;
|
|
103
|
+
color: string;
|
|
104
|
+
};
|
|
105
|
+
sport: {
|
|
106
|
+
icon: string;
|
|
107
|
+
color: string;
|
|
108
|
+
};
|
|
85
109
|
cryosphere: {
|
|
86
110
|
icon: string;
|
|
87
111
|
color: string;
|
|
88
112
|
};
|
|
113
|
+
industry: {
|
|
114
|
+
icon: string;
|
|
115
|
+
color: string;
|
|
116
|
+
};
|
|
89
117
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { default as lite } from "./lite";
|
|
2
2
|
export { default as expert } from "./expert";
|
|
3
3
|
export { default as compare } from "./compare";
|
|
4
|
+
export { default as explore } from "./explore";
|
|
4
5
|
export { getBaseConfig };
|
|
5
6
|
export default getBaseConfig;
|
|
6
7
|
import { getBaseConfig } from "./baseConfig";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eodash/eodash",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./dist/types/core/client/types.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"browser": "./core/client/main.js",
|
|
43
43
|
"scripts": {
|
|
44
44
|
"start": "npx eodash dev --entryPoint templates/baseConfig.js",
|
|
45
|
-
"prepare": "rollup -c",
|
|
45
|
+
"prepare": "rollup -c && chmod +x dist/node/cli.js",
|
|
46
46
|
"prepack": "npm run build:lib && npm run build:types",
|
|
47
47
|
"dev": "npx eodash dev --entryPoint templates/baseConfig.js",
|
|
48
48
|
"dev:lib": "npx eodash dev --entryPoint templates/baseConfig.js --lib",
|
|
@@ -66,14 +66,14 @@
|
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"@eox/chart": "^1.0.1",
|
|
69
|
-
"@eox/drawtools": "^1.1.
|
|
69
|
+
"@eox/drawtools": "^1.1.5",
|
|
70
70
|
"@eox/geosearch": "^1.1.0",
|
|
71
|
-
"@eox/itemfilter": "^1.
|
|
71
|
+
"@eox/itemfilter": "^1.13.0",
|
|
72
72
|
"@eox/jsonform": "^1.4.2",
|
|
73
73
|
"@eox/layercontrol": "^1.3.1",
|
|
74
74
|
"@eox/layout": "^1.0.0",
|
|
75
|
-
"@eox/map": "^1.26.
|
|
76
|
-
"@eox/stacinfo": "^1.0.
|
|
75
|
+
"@eox/map": "^1.26.2",
|
|
76
|
+
"@eox/stacinfo": "^1.0.2",
|
|
77
77
|
"@eox/timecontrol": "^1.0.2",
|
|
78
78
|
"@eox/timeslider": "https://pkg.pr.new/EOX-A/EOxElements/@eox/timeslider@9873028",
|
|
79
79
|
"@eox/ui": "^0.4.0",
|
package/templates/index.js
CHANGED
|
@@ -3,6 +3,8 @@ import { getBaseConfig } from "./baseConfig";
|
|
|
3
3
|
export { default as lite } from "./lite";
|
|
4
4
|
export { default as expert } from "./expert";
|
|
5
5
|
export { default as compare } from "./compare";
|
|
6
|
+
export { default as explore } from "./explore";
|
|
7
|
+
|
|
6
8
|
export { getBaseConfig };
|
|
7
9
|
|
|
8
10
|
export default getBaseConfig;
|
|
@@ -41,24 +41,24 @@
|
|
|
41
41
|
<span v-if="enableScaleLine" id="scale-line" ref="scale-line" />
|
|
42
42
|
<div
|
|
43
43
|
class="map-buttons-container"
|
|
44
|
-
:style="`margin: ${btnsPosition.gap}px 0 ${btnsPosition.gap}px 0
|
|
44
|
+
:style="`margin: ${btnsPosition.gap}px 0 ${btnsPosition.gap}px 0; top: ${btnsTop}px;`"
|
|
45
45
|
>
|
|
46
46
|
<!-- prettier-ignore -->
|
|
47
47
|
<EodashMapBtns
|
|
48
48
|
:style="{
|
|
49
|
-
gridColumn: (indicator || compareIndicator) ? responsiveX : '12',
|
|
49
|
+
gridColumn: (indicator || compareIndicator || poi) ? responsiveX : '12',
|
|
50
50
|
gridRow: responsiveY,
|
|
51
51
|
}"
|
|
52
|
-
:exportMap="(indicator || compareIndicator) ? btnsProps.exportMap : false"
|
|
53
|
-
:changeProjection="(indicator || compareIndicator) ? btnsProps.changeProjection : false
|
|
52
|
+
:exportMap="(indicator || compareIndicator || poi) ? btnsProps.exportMap : false"
|
|
53
|
+
:changeProjection="(indicator || compareIndicator || poi) ? btnsProps.changeProjection : false
|
|
54
54
|
"
|
|
55
|
-
:compareIndicators="(indicator || compareIndicator) ? btnsProps.compareIndicators : false
|
|
55
|
+
:compareIndicators="(indicator || compareIndicator || poi) ? btnsProps.compareIndicators : false
|
|
56
56
|
"
|
|
57
|
-
:backToPOIs="(indicator || compareIndicator) ? btnsProps.backToPOIs : false
|
|
57
|
+
:backToPOIs="(indicator || compareIndicator || poi) ? btnsProps.backToPOIs : false
|
|
58
58
|
"
|
|
59
|
-
:enableSearch="(indicator || compareIndicator) ? btnsProps.enableSearch : false
|
|
59
|
+
:enableSearch="(indicator || compareIndicator || poi) ? btnsProps.enableSearch : false
|
|
60
60
|
"
|
|
61
|
-
:enableZoom="(indicator || compareIndicator) ? btnsProps.enableZoom : false
|
|
61
|
+
:enableZoom="(indicator || compareIndicator || poi) ? btnsProps.enableZoom : false
|
|
62
62
|
"
|
|
63
63
|
/>
|
|
64
64
|
</div>
|
|
@@ -75,10 +75,11 @@ import {
|
|
|
75
75
|
mapCompareEl,
|
|
76
76
|
indicator,
|
|
77
77
|
compareIndicator,
|
|
78
|
+
poi,
|
|
78
79
|
} from "@/store/states";
|
|
79
80
|
import { storeToRefs } from "pinia";
|
|
80
81
|
import { useSTAcStore } from "@/store/stac";
|
|
81
|
-
import { useDisplay } from "vuetify";
|
|
82
|
+
import { useDisplay, useLayout } from "vuetify";
|
|
82
83
|
import {
|
|
83
84
|
eodashCollections,
|
|
84
85
|
eodashCompareCollections,
|
|
@@ -354,7 +355,10 @@ const tooltipPropertyTransform = (map) => {
|
|
|
354
355
|
param.value = JSON.stringify(param.value);
|
|
355
356
|
}
|
|
356
357
|
if (!isNaN(Number(param.value))) {
|
|
357
|
-
|
|
358
|
+
const decimals = !isNaN(Number(tooltipProp.decimals))
|
|
359
|
+
? Number(tooltipProp.decimals)
|
|
360
|
+
: 4;
|
|
361
|
+
param.value = Number(param.value).toFixed(decimals).toString();
|
|
358
362
|
}
|
|
359
363
|
|
|
360
364
|
return {
|
|
@@ -363,6 +367,13 @@ const tooltipPropertyTransform = (map) => {
|
|
|
363
367
|
};
|
|
364
368
|
};
|
|
365
369
|
};
|
|
370
|
+
const { mainRect } = useLayout();
|
|
371
|
+
const btnsTop = ref(0);
|
|
372
|
+
onMounted(() => {
|
|
373
|
+
const eoDash = document.querySelector("eo-dash");
|
|
374
|
+
btnsTop.value =
|
|
375
|
+
(mainRect.value.top || eoDash?.getBoundingClientRect().top) ?? 0;
|
|
376
|
+
});
|
|
366
377
|
</script>
|
|
367
378
|
|
|
368
379
|
<style scoped>
|
|
@@ -420,7 +431,6 @@ const tooltipPropertyTransform = (map) => {
|
|
|
420
431
|
|
|
421
432
|
.map-buttons-container {
|
|
422
433
|
position: fixed;
|
|
423
|
-
top: 0;
|
|
424
434
|
left: 0;
|
|
425
435
|
width: 100%;
|
|
426
436
|
height: 100%;
|