@eodash/eodash 5.0.0-rc.1.5 → 5.0.0-rc.2
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/README.md +1 -1
- package/core/client/composables/EodashMap.js +47 -28
- package/core/client/composables/EodashProcess.js +51 -5
- package/core/client/composables/index.js +8 -1
- package/core/client/eodash.js +21 -7
- package/core/client/eodashSTAC/EodashCollection.js +24 -4
- package/core/client/eodashSTAC/createLayers.js +62 -6
- package/core/client/eodashSTAC/helpers.js +48 -5
- package/core/client/eodashSTAC/triggers.js +52 -1
- package/core/client/store/stac.js +7 -2
- package/core/client/types.ts +10 -1
- package/core/client/utils/index.js +12 -0
- package/core/client/utils/states.js +18 -1
- package/core/client/views/Dashboard.vue +3 -1
- package/dist/client/{DashboardLayout-B-4X57-t.js → DashboardLayout-VrJIbhe8.js} +2 -2
- package/dist/client/{DynamicWebComponent-Dj3QYwag.js → DynamicWebComponent-BCwpocDX.js} +1 -1
- package/dist/client/EodashDatePicker-Bp5ec3BC.js +430 -0
- package/dist/client/{EodashItemFilter-DBQwJQPh.js → EodashItemFilter-Cx0t-qeW.js} +1 -1
- package/dist/client/{EodashLayerControl-C5fOCvoI.js → EodashLayerControl-DERx00In.js} +10 -2
- package/dist/client/{EodashLayoutSwitcher-BMO9k_20.js → EodashLayoutSwitcher-DTS7otlk.js} +2 -2
- package/dist/client/{EodashMap-D2bnMLAC.js → EodashMap-C-I6puhb.js} +101 -73
- package/dist/client/{EodashMapBtns-l9B977id.js → EodashMapBtns-CWgtJiG4.js} +4 -4
- package/dist/client/{EodashProcess-BtIlJvF1.js → EodashProcess-DWrTIyHT.js} +188 -33
- package/dist/client/{EodashStacInfo-CPVvp_Hm.js → EodashStacInfo-Dvsk97Mz.js} +1 -1
- package/dist/client/{EodashTools-DY2dlNXW.js → EodashTools-CdnjgTTl.js} +4 -4
- package/dist/client/{ExportState-BvD5A0XG.js → ExportState-S4lcehm3.js} +4 -4
- package/dist/client/{Footer-w95gBnSH.js → Footer-DlIEbXp-.js} +1 -1
- package/dist/client/{Header-BpiorKy9.js → Header-CTiEXLi0.js} +3 -3
- package/dist/client/{MobileLayout-CmVlZe7S.js → MobileLayout-DRgyQYFz.js} +17 -7
- package/dist/client/{PopUp-CREaSybs.js → PopUp-CzqV8BFZ.js} +3 -3
- package/dist/client/{VImg-DF9esgdd.js → VImg-Bn8bCvVM.js} +2 -2
- package/dist/client/{VMain-BWLMf-rn.js → VMain-2GOqWb6m.js} +1 -1
- package/dist/client/{VOverlay-DmNfblmy.js → VOverlay-BetC0LGI.js} +3 -3
- package/dist/client/{VTooltip-C3PeE7iO.js → VTooltip-BWg0dxx5.js} +3 -3
- package/dist/client/{WidgetsContainer-6FHEEXns.js → WidgetsContainer-Cv466WUW.js} +1 -1
- package/dist/client/{asWebComponent-BnFMd0T6.js → asWebComponent-CLUhauLl.js} +422 -164
- package/dist/client/eo-dash.css +1 -1
- package/dist/client/eo-dash.js +1 -1
- package/dist/client/{forwardRefs-BF3Me2RX.js → forwardRefs-CxSsJulB.js} +1 -1
- package/dist/client/{index-CRd5-RSy.js → index-BMj56LY3.js} +1 -1
- package/dist/client/{transition-Cpn_g5jE.js → transition-DidoPMgC.js} +1 -1
- package/dist/node/cli.js +2 -2
- package/dist/types/core/client/composables/EodashMap.d.ts +2 -1
- package/dist/types/core/client/composables/EodashProcess.d.ts +17 -11
- package/dist/types/core/client/composables/index.d.ts +1 -1
- package/dist/types/core/client/eodashSTAC/EodashCollection.d.ts +11 -4
- package/dist/types/core/client/eodashSTAC/createLayers.d.ts +6 -6
- package/dist/types/core/client/eodashSTAC/helpers.d.ts +77 -20
- package/dist/types/core/client/eodashSTAC/triggers.d.ts +6 -0
- package/dist/types/core/client/types.d.ts +13 -1
- package/dist/types/core/client/utils/index.d.ts +1 -0
- package/dist/types/core/client/utils/states.d.ts +9 -0
- package/dist/types/widgets/EodashDatePicker.vue.d.ts +459 -2
- package/dist/types/widgets/EodashMap.vue.d.ts +2 -0
- package/dist/types/widgets/EodashProcess.vue.d.ts +1 -0
- package/dist/types/widgets/PopUp.vue.d.ts +1 -2
- package/package.json +24 -24
- package/widgets/EodashDatePicker.vue +139 -22
- package/widgets/EodashLayerControl.vue +13 -1
- package/widgets/EodashMap.vue +63 -5
- package/widgets/EodashProcess.vue +82 -22
- package/dist/client/EodashDatePicker-DGRJrJ0s.js +0 -306
|
@@ -3775,9 +3775,11 @@ const eodash = reactive({
|
|
|
3775
3775
|
stacEndpoint:
|
|
3776
3776
|
// "https://eurodatacube.github.io/eodash-catalog/RACE/catalog.json",
|
|
3777
3777
|
// "https://gtif-cerulean.github.io/catalog/cerulean/catalog.json",
|
|
3778
|
-
"https://eodashcatalog.eox.at/samplecatalog/samples/catalog.json",
|
|
3779
|
-
|
|
3780
|
-
|
|
3778
|
+
// "https://eodashcatalog.eox.at/samplecatalog/samples/catalog.json",
|
|
3779
|
+
// "https://eodashcatalog.eox.at/test-style/trilateral/catalog.json",
|
|
3780
|
+
// "https://gtif-cerulean.github.io/catalog/cerulean/catalog.json",
|
|
3781
|
+
// "https://gtif-cerulean.github.io/deside-catalog/deside/catalog.json",
|
|
3782
|
+
"https://gtif-cerulean.github.io/cerulean-catalog/cerulean/catalog.json",
|
|
3781
3783
|
brand: {
|
|
3782
3784
|
noLayout: true,
|
|
3783
3785
|
name: "Demo",
|
|
@@ -3791,6 +3793,18 @@ const eodash = reactive({
|
|
|
3791
3793
|
"surface-opacity": 0.6,
|
|
3792
3794
|
"primary-opacity": 0.8,
|
|
3793
3795
|
},
|
|
3796
|
+
// Bank-Wong palette
|
|
3797
|
+
collectionsPalette: [
|
|
3798
|
+
"#009E73",
|
|
3799
|
+
"#E69F00",
|
|
3800
|
+
"#56B4E9",
|
|
3801
|
+
"#009E73",
|
|
3802
|
+
"#F0E442",
|
|
3803
|
+
"#0072B2",
|
|
3804
|
+
"#D55E00",
|
|
3805
|
+
"#CC79A7",
|
|
3806
|
+
"#994F00",
|
|
3807
|
+
],
|
|
3794
3808
|
},
|
|
3795
3809
|
footerText: "Demo configuration of eodash client",
|
|
3796
3810
|
},
|
|
@@ -3908,8 +3922,6 @@ const eodash = reactive({
|
|
|
3908
3922
|
widget: {
|
|
3909
3923
|
name: "EodashDatePicker",
|
|
3910
3924
|
properties: {
|
|
3911
|
-
hideArrows: true,
|
|
3912
|
-
hideInputField: true,
|
|
3913
3925
|
hintText: `<b>Hint:</b> closest available date is displayed <br />
|
|
3914
3926
|
on map (see Analysis Layers)`,
|
|
3915
3927
|
},
|
|
@@ -4010,6 +4022,7 @@ const eodash = reactive({
|
|
|
4010
4022
|
properties: {
|
|
4011
4023
|
hintText: `<b>Hint:</b> closest available date is displayed <br />
|
|
4012
4024
|
on map (see Analysis Layers)`,
|
|
4025
|
+
toggleCalendar: true,
|
|
4013
4026
|
},
|
|
4014
4027
|
},
|
|
4015
4028
|
}
|
|
@@ -4035,10 +4048,10 @@ const eodash = reactive({
|
|
|
4035
4048
|
defineWidget: (selectedSTAC) =>
|
|
4036
4049
|
selectedSTAC?.links.some((l) => l.rel === "service")
|
|
4037
4050
|
? {
|
|
4038
|
-
id:
|
|
4051
|
+
id: "Processes",
|
|
4039
4052
|
type: "internal",
|
|
4040
4053
|
title: "Processes",
|
|
4041
|
-
layout: { x:
|
|
4054
|
+
layout: { x: 9, y: 7, w: 3, h: 5 },
|
|
4042
4055
|
widget: {
|
|
4043
4056
|
name: "EodashProcess",
|
|
4044
4057
|
},
|
|
@@ -4182,6 +4195,7 @@ const eodash = reactive({
|
|
|
4182
4195
|
properties: {
|
|
4183
4196
|
hintText: `<b>Hint:</b> closest available date is displayed <br />
|
|
4184
4197
|
on map (see Analysis Layers)`,
|
|
4198
|
+
toggleCalendar: true,
|
|
4185
4199
|
},
|
|
4186
4200
|
},
|
|
4187
4201
|
}
|
|
@@ -4646,7 +4660,7 @@ function APCAcontrast(text, background) {
|
|
|
4646
4660
|
// WoB should always return negative value.
|
|
4647
4661
|
|
|
4648
4662
|
const SAPC = (Ybg ** revBG - Ytxt ** revTXT) * scaleWoB;
|
|
4649
|
-
outputContrast = SAPC > -
|
|
4663
|
+
outputContrast = SAPC > -1e-3 ? 0.0 : SAPC > -0.078 ? SAPC - SAPC * loConFactor * loConOffset : SAPC + loConOffset;
|
|
4650
4664
|
}
|
|
4651
4665
|
return outputContrast * 100;
|
|
4652
4666
|
}
|
|
@@ -4679,7 +4693,7 @@ function toXYZ$1(lab) {
|
|
|
4679
4693
|
|
|
4680
4694
|
// Utilities
|
|
4681
4695
|
// For converting XYZ to sRGB
|
|
4682
|
-
const srgbForwardMatrix = [[3.2406, -1.5372, -0.4986], [-0.9689, 1.8758, 0.0415], [0.0557, -0.
|
|
4696
|
+
const srgbForwardMatrix = [[3.2406, -1.5372, -0.4986], [-0.9689, 1.8758, 0.0415], [0.0557, -0.204, 1.0570]];
|
|
4683
4697
|
|
|
4684
4698
|
// Forward gamma adjust
|
|
4685
4699
|
const srgbForwardTransform = C => C <= 0.0031308 ? C * 12.92 : 1.055 * C ** (1 / 2.4) - 0.055;
|
|
@@ -7429,7 +7443,7 @@ function createLayout(props) {
|
|
|
7429
7443
|
}
|
|
7430
7444
|
|
|
7431
7445
|
function createVuetify() {
|
|
7432
|
-
let vuetify = arguments.length > 0 && arguments[0] !==
|
|
7446
|
+
let vuetify = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
7433
7447
|
const {
|
|
7434
7448
|
blueprint,
|
|
7435
7449
|
...rest
|
|
@@ -7516,7 +7530,7 @@ function createVuetify() {
|
|
|
7516
7530
|
goTo
|
|
7517
7531
|
};
|
|
7518
7532
|
}
|
|
7519
|
-
const version = "3.7.
|
|
7533
|
+
const version = "3.7.7";
|
|
7520
7534
|
createVuetify.version = version;
|
|
7521
7535
|
function inject(key) {
|
|
7522
7536
|
const vm = this.$;
|
|
@@ -7556,6 +7570,85 @@ const eodashCompareCollections = shallowReactive([]);
|
|
|
7556
7570
|
/** whether the map postion was set in URL params on first load */
|
|
7557
7571
|
const posIsSetFromUrl = ref(false);
|
|
7558
7572
|
|
|
7573
|
+
/**
|
|
7574
|
+
* Current value of the layer control JSON form for the latest layer the user interacted with.
|
|
7575
|
+
* @type {import("vue").Ref<Record<string, any> | undefined>}
|
|
7576
|
+
*/
|
|
7577
|
+
const layerControlFormValue = ref({});
|
|
7578
|
+
/**
|
|
7579
|
+
* STAC indicators color palette, defaults to Bank-Wong palette
|
|
7580
|
+
* @type {string[]} */
|
|
7581
|
+
const collectionsPalette = reactive([
|
|
7582
|
+
"#009E73",
|
|
7583
|
+
"#0072B2",
|
|
7584
|
+
"#E69F00",
|
|
7585
|
+
"#CC79A7",
|
|
7586
|
+
"#56B4E9",
|
|
7587
|
+
"#D55E00",
|
|
7588
|
+
]);
|
|
7589
|
+
|
|
7590
|
+
/**
|
|
7591
|
+
* Loads font in the app using `webfontloader`
|
|
7592
|
+
*
|
|
7593
|
+
* @param {string} [family]
|
|
7594
|
+
* @param {string} [link]
|
|
7595
|
+
* @param {boolean} [isWebComponent]
|
|
7596
|
+
* @returns {Promise<string>} - Font family name
|
|
7597
|
+
* @see {@link "https://github.com/typekit/webfontloader"}
|
|
7598
|
+
*/
|
|
7599
|
+
const loadFont = async (
|
|
7600
|
+
family = "",
|
|
7601
|
+
link = "",
|
|
7602
|
+
isWebComponent = false,
|
|
7603
|
+
) => {
|
|
7604
|
+
if (family && link) {
|
|
7605
|
+
const WebFontLoader = (await import('webfontloader')).default;
|
|
7606
|
+
WebFontLoader.load({
|
|
7607
|
+
classes: false,
|
|
7608
|
+
custom: {
|
|
7609
|
+
// Use FVD notation to include families https://github.com/typekit/fvd
|
|
7610
|
+
families: [family],
|
|
7611
|
+
// Path to stylesheet that defines font-face
|
|
7612
|
+
urls: [link],
|
|
7613
|
+
},
|
|
7614
|
+
fontactive(familyName, _fvd) {
|
|
7615
|
+
const stylesheet = new CSSStyleSheet();
|
|
7616
|
+
const styles = isWebComponent
|
|
7617
|
+
? `eo-dash {font-family: ${familyName};}`
|
|
7618
|
+
: `* {font-family: ${familyName};}`;
|
|
7619
|
+
stylesheet.replaceSync(styles);
|
|
7620
|
+
document.adoptedStyleSheets.push(stylesheet);
|
|
7621
|
+
},
|
|
7622
|
+
fontinactive(familyName, _fvd) {
|
|
7623
|
+
throw new Error(`error loading font: ${familyName}`);
|
|
7624
|
+
},
|
|
7625
|
+
});
|
|
7626
|
+
}
|
|
7627
|
+
return family;
|
|
7628
|
+
};
|
|
7629
|
+
|
|
7630
|
+
/**
|
|
7631
|
+
* @param {string} text
|
|
7632
|
+
* @param {import("vue").Ref<boolean>} showIcon
|
|
7633
|
+
**/
|
|
7634
|
+
const copyToClipBoard = async (text, showIcon) => {
|
|
7635
|
+
await navigator.clipboard.writeText(text);
|
|
7636
|
+
showIcon.value = true;
|
|
7637
|
+
setTimeout(() => {
|
|
7638
|
+
showIcon.value = false;
|
|
7639
|
+
}, 2000);
|
|
7640
|
+
};
|
|
7641
|
+
|
|
7642
|
+
/**
|
|
7643
|
+
* Sets the color palette for STAC indicators
|
|
7644
|
+
* @param {string[]} colors
|
|
7645
|
+
**/
|
|
7646
|
+
const setCollectionsPalette = (colors) => {
|
|
7647
|
+
log.debug("Setting collections color palette", colors);
|
|
7648
|
+
collectionsPalette.splice(0, collectionsPalette.length);
|
|
7649
|
+
collectionsPalette.push(...colors);
|
|
7650
|
+
};
|
|
7651
|
+
|
|
7559
7652
|
// functions of this folder can only be consumed inside setup stores,
|
|
7560
7653
|
// setup functions or vue composition api components https://vuejs.org/guide/reusability/composables
|
|
7561
7654
|
|
|
@@ -7623,13 +7716,19 @@ const useCompareAbsoluteUrl = (rel = "", base = eodash.stacEndpoint) => {
|
|
|
7623
7716
|
* `ThemeDefinition`
|
|
7624
7717
|
*
|
|
7625
7718
|
* @param {string} themeName - Name of the theme to be updated
|
|
7626
|
-
* @param {import("
|
|
7719
|
+
* @param {import("@/types").Eodash["brand"]["theme"]} [themeDefinition={}] - New
|
|
7627
7720
|
* defintion to be updated to. Default is `{}`
|
|
7628
7721
|
* @returns {import("vuetify").ThemeInstance}
|
|
7629
7722
|
*/
|
|
7630
7723
|
const useUpdateTheme = (themeName, themeDefinition = {}) => {
|
|
7631
7724
|
const theme = useTheme();
|
|
7632
7725
|
|
|
7726
|
+
// extract collections palette from the theme
|
|
7727
|
+
if (themeDefinition.collectionsPalette?.length) {
|
|
7728
|
+
setCollectionsPalette(themeDefinition.collectionsPalette);
|
|
7729
|
+
delete themeDefinition.collectionsPalette;
|
|
7730
|
+
}
|
|
7731
|
+
|
|
7633
7732
|
/** @type {(keyof import("vuetify").ThemeDefinition)[]} */ (
|
|
7634
7733
|
Object.keys(themeDefinition)
|
|
7635
7734
|
).forEach((key) => {
|
|
@@ -7777,6 +7876,177 @@ const useOnLayersUpdate = (listener) => {
|
|
|
7777
7876
|
});
|
|
7778
7877
|
};
|
|
7779
7878
|
|
|
7879
|
+
/**
|
|
7880
|
+
* Returns the current layers of {@link mapEl}
|
|
7881
|
+
* @returns {Record<string,any>[]}
|
|
7882
|
+
*/
|
|
7883
|
+
const getLayers = () => mapEl.value?.layers.toReversed();
|
|
7884
|
+
|
|
7885
|
+
/**
|
|
7886
|
+
* Returns the current layers of {@link mapCompareEl}
|
|
7887
|
+
* @returns {Record<string,any>[]}
|
|
7888
|
+
*/
|
|
7889
|
+
const getCompareLayers = () => mapCompareEl.value?.layers.toReversed();
|
|
7890
|
+
|
|
7891
|
+
/**
|
|
7892
|
+
* Register EPSG projection in `eox-map`
|
|
7893
|
+
* @param {string|number|{name: string, def: string, extent?:number[]}} [projection]*/
|
|
7894
|
+
const registerProjection = async (projection) => {
|
|
7895
|
+
let code = getProjectionCode(projection);
|
|
7896
|
+
if (!code || registeredProjections.includes(code)) {
|
|
7897
|
+
return;
|
|
7898
|
+
}
|
|
7899
|
+
log.debug("Unregistered projection found, registering it", code);
|
|
7900
|
+
registeredProjections.push(code);
|
|
7901
|
+
if (typeof projection === "object") {
|
|
7902
|
+
// registering whole projection definition
|
|
7903
|
+
await mapEl.value?.registerProjection(
|
|
7904
|
+
code,
|
|
7905
|
+
projection.def,
|
|
7906
|
+
projection.extent,
|
|
7907
|
+
);
|
|
7908
|
+
// also registering for comparison map
|
|
7909
|
+
await mapCompareEl.value?.registerProjection(
|
|
7910
|
+
code,
|
|
7911
|
+
projection.def,
|
|
7912
|
+
projection.extent,
|
|
7913
|
+
);
|
|
7914
|
+
} else {
|
|
7915
|
+
await mapEl.value?.registerProjectionFromCode(code);
|
|
7916
|
+
// also registering for comparison map
|
|
7917
|
+
await mapCompareEl.value?.registerProjectionFromCode(code);
|
|
7918
|
+
}
|
|
7919
|
+
};
|
|
7920
|
+
/**
|
|
7921
|
+
* Change `eox-map` projection from an `EPSG` projection
|
|
7922
|
+
* @param {string|number|{name: string, def: string}} [projection]*/
|
|
7923
|
+
const changeMapProjection = async (projection) => {
|
|
7924
|
+
let code = getProjectionCode(projection);
|
|
7925
|
+
|
|
7926
|
+
if (!code) {
|
|
7927
|
+
mapEl.value?.setAttribute("projection", "EPSG:3857");
|
|
7928
|
+
mapCompareEl.value?.setAttribute("projection", "EPSG:3857");
|
|
7929
|
+
return;
|
|
7930
|
+
}
|
|
7931
|
+
|
|
7932
|
+
if (!registeredProjections.includes(code)) {
|
|
7933
|
+
await registerProjection(projection);
|
|
7934
|
+
}
|
|
7935
|
+
|
|
7936
|
+
code = mapEl.value?.getAttribute("projection") === code ? "EPSG:3857" : code;
|
|
7937
|
+
mapEl.value?.setAttribute("projection", code);
|
|
7938
|
+
mapCompareEl.value?.setAttribute("projection", code);
|
|
7939
|
+
};
|
|
7940
|
+
|
|
7941
|
+
/**
|
|
7942
|
+
*
|
|
7943
|
+
* @param {string} template
|
|
7944
|
+
*/
|
|
7945
|
+
const setActiveTemplate = (template) => {
|
|
7946
|
+
activeTemplate.value = template;
|
|
7947
|
+
log.debug("Setting active template to", template);
|
|
7948
|
+
};
|
|
7949
|
+
|
|
7950
|
+
const actions = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
7951
|
+
__proto__: null,
|
|
7952
|
+
changeMapProjection,
|
|
7953
|
+
getCompareLayers,
|
|
7954
|
+
getLayers,
|
|
7955
|
+
registerProjection,
|
|
7956
|
+
setActiveTemplate
|
|
7957
|
+
}, Symbol.toStringTag, { value: 'Module' }));
|
|
7958
|
+
|
|
7959
|
+
/*
|
|
7960
|
+
* eodashSTAC helpers that utilizes the app states or actions
|
|
7961
|
+
*/
|
|
7962
|
+
|
|
7963
|
+
/**
|
|
7964
|
+
* checks if there's a projection on the Collection and
|
|
7965
|
+
* updates {@link availableMapProjection}
|
|
7966
|
+
* @param {import('stac-ts').StacCollection} [STAcCollection]
|
|
7967
|
+
*/
|
|
7968
|
+
const setMapProjFromCol = async (STAcCollection) => {
|
|
7969
|
+
// if a projection exists on the collection level
|
|
7970
|
+
log.debug("Checking for available map projection in indicator");
|
|
7971
|
+
const projection =
|
|
7972
|
+
/** @type {number | string | {name: string, def: string} | undefined} */
|
|
7973
|
+
(
|
|
7974
|
+
STAcCollection?.["eodash:mapProjection"] ||
|
|
7975
|
+
STAcCollection?.["proj:epsg"] ||
|
|
7976
|
+
STAcCollection?.["eodash:proj4_def"]
|
|
7977
|
+
);
|
|
7978
|
+
if (projection) {
|
|
7979
|
+
log.debug("Projection found", projection);
|
|
7980
|
+
await registerProjection(projection);
|
|
7981
|
+
const projectionCode = getProjectionCode(projection);
|
|
7982
|
+
if (availableMapProjection.value !== projectionCode) {
|
|
7983
|
+
log.debug(
|
|
7984
|
+
"Changing map projection",
|
|
7985
|
+
availableMapProjection.value,
|
|
7986
|
+
projectionCode,
|
|
7987
|
+
);
|
|
7988
|
+
await changeMapProjection(projection);
|
|
7989
|
+
}
|
|
7990
|
+
// set it for `EodashMapBtns`
|
|
7991
|
+
availableMapProjection.value = /** @type {string} */ (projectionCode);
|
|
7992
|
+
} else {
|
|
7993
|
+
// reset to default projection
|
|
7994
|
+
log.debug("Resetting projection to default EPSG:3857");
|
|
7995
|
+
await changeMapProjection((availableMapProjection.value = ""));
|
|
7996
|
+
}
|
|
7997
|
+
};
|
|
7998
|
+
/**
|
|
7999
|
+
*
|
|
8000
|
+
* @param {string} collectionId
|
|
8001
|
+
* @param {import("@/types").EodashStyleJson["variables"]} variables
|
|
8002
|
+
*/
|
|
8003
|
+
function getStyleVariablesState(collectionId, variables) {
|
|
8004
|
+
const mapElement = /** @type {import("@eox/map").EOxMap} */ (mapEl.value);
|
|
8005
|
+
if (!mapElement || !mapElement.layers.length || !variables) {
|
|
8006
|
+
return variables;
|
|
8007
|
+
}
|
|
8008
|
+
|
|
8009
|
+
const analysisGroup = mapElement.layers.find(
|
|
8010
|
+
(layer) => layer.properties?.id === "AnalysisGroup",
|
|
8011
|
+
);
|
|
8012
|
+
if (!analysisGroup) {
|
|
8013
|
+
return variables;
|
|
8014
|
+
}
|
|
8015
|
+
const matchingLayer = analysisGroup.layers?.find((layer) => {
|
|
8016
|
+
const [collection, ..._other] = layer.properties?.id.split(";:;") ?? [
|
|
8017
|
+
"",
|
|
8018
|
+
"",
|
|
8019
|
+
"",
|
|
8020
|
+
];
|
|
8021
|
+
return (
|
|
8022
|
+
collection === collectionId &&
|
|
8023
|
+
["Vector", "WebGLTile"].includes(layer?.type ?? "")
|
|
8024
|
+
);
|
|
8025
|
+
});
|
|
8026
|
+
|
|
8027
|
+
if (!matchingLayer) {
|
|
8028
|
+
return variables;
|
|
8029
|
+
}
|
|
8030
|
+
|
|
8031
|
+
const olLayer = mapElement.getLayerById(matchingLayer.properties?.id ?? "");
|
|
8032
|
+
const oldVariablesState = /** @type {import("ol/layer").WebGLTile} */ (
|
|
8033
|
+
olLayer
|
|
8034
|
+
//@ts-expect-error todo
|
|
8035
|
+
).getStyle()?.variables;
|
|
8036
|
+
if (!oldVariablesState) {
|
|
8037
|
+
return variables;
|
|
8038
|
+
}
|
|
8039
|
+
const styleVariablesKeys = Object.keys(variables);
|
|
8040
|
+
const matchingKeys =
|
|
8041
|
+
Object.keys(oldVariablesState).every((key) =>
|
|
8042
|
+
styleVariablesKeys.includes(key),
|
|
8043
|
+
) &&
|
|
8044
|
+
styleVariablesKeys.every((key) =>
|
|
8045
|
+
Object.keys(oldVariablesState).includes(key),
|
|
8046
|
+
);
|
|
8047
|
+
return matchingKeys ? oldVariablesState : variables;
|
|
8048
|
+
}
|
|
8049
|
+
|
|
7780
8050
|
/** @param {import("stac-ts").StacLink[]} [links] */
|
|
7781
8051
|
function generateFeatures(links) {
|
|
7782
8052
|
/**
|
|
@@ -7814,13 +8084,24 @@ function generateFeatures(links) {
|
|
|
7814
8084
|
/**
|
|
7815
8085
|
* Sperates and extracts layerConfig (jsonform schema & legend) from a style json
|
|
7816
8086
|
*
|
|
7817
|
-
*
|
|
7818
|
-
|
|
8087
|
+
* @param {string} collectionId
|
|
8088
|
+
* @param { import("@/types").EodashStyleJson} [style]
|
|
8089
|
+
* */
|
|
8090
|
+
function extractLayerConfig(collectionId, style) {
|
|
8091
|
+
if (!style) {
|
|
8092
|
+
return { layerConfig: undefined, style: undefined };
|
|
8093
|
+
}
|
|
8094
|
+
style = { ...style };
|
|
8095
|
+
|
|
8096
|
+
if (Object.keys(style.variables ?? {}).length) {
|
|
8097
|
+
style.variables = getStyleVariablesState(collectionId, style.variables);
|
|
8098
|
+
}
|
|
8099
|
+
|
|
7819
8100
|
/** @type {Record<string,unknown> | undefined} */
|
|
7820
8101
|
let layerConfig = undefined;
|
|
8102
|
+
|
|
7821
8103
|
if (style?.jsonform) {
|
|
7822
8104
|
layerConfig = { schema: style.jsonform, type: "style" };
|
|
7823
|
-
style = { ...style };
|
|
7824
8105
|
delete style.jsonform;
|
|
7825
8106
|
if (style?.legend) {
|
|
7826
8107
|
layerConfig.legend = style.legend;
|
|
@@ -7899,7 +8180,7 @@ const fetchStyle = async (item, itemUrl) => {
|
|
|
7899
8180
|
url = toAbsolute(styleLink.href, itemUrl);
|
|
7900
8181
|
}
|
|
7901
8182
|
|
|
7902
|
-
/** @type {import("
|
|
8183
|
+
/** @type {import("@/types").EodashStyleJson} */
|
|
7903
8184
|
const styleJson = await axios.get(url).then((resp) => resp.data);
|
|
7904
8185
|
|
|
7905
8186
|
log.debug("fetched styles JSON", JSON.parse(JSON.stringify(styleJson)));
|
|
@@ -7975,8 +8256,9 @@ const extractLayerDatetime = (links, currentStep) => {
|
|
|
7975
8256
|
controlValues,
|
|
7976
8257
|
currentStep,
|
|
7977
8258
|
slider: true,
|
|
8259
|
+
navigation: true,
|
|
7978
8260
|
play: false,
|
|
7979
|
-
displayFormat: "DD
|
|
8261
|
+
displayFormat: "DD.MM.YYYY HH:MM",
|
|
7980
8262
|
};
|
|
7981
8263
|
};
|
|
7982
8264
|
|
|
@@ -8071,14 +8353,14 @@ const getColFromLayer = async (indicators, layer) => {
|
|
|
8071
8353
|
*/
|
|
8072
8354
|
const createLayerID = (collectionId, itemId, link, projectionCode) => {
|
|
8073
8355
|
const linkId = link.id || link.title || link.href;
|
|
8074
|
-
let lId = `${collectionId ?? ""};:;${itemId ?? ""};:;${linkId ?? ""};:;${projectionCode
|
|
8356
|
+
let lId = `${collectionId ?? ""};:;${itemId ?? ""};:;${linkId ?? ""};:;${projectionCode}`;
|
|
8075
8357
|
// If we are looking at base layers and overlays we remove the collection and item part
|
|
8076
8358
|
// as we want to make sure tiles are not reloaded when switching layers
|
|
8077
8359
|
if (
|
|
8078
8360
|
/** @type {string[]} */
|
|
8079
8361
|
(link.roles)?.find((r) => ["baselayer", "overlay"].includes(r))
|
|
8080
8362
|
) {
|
|
8081
|
-
lId = `${linkId ?? ""};:;${projectionCode
|
|
8363
|
+
lId = `${linkId ?? ""};:;${projectionCode}`;
|
|
8082
8364
|
}
|
|
8083
8365
|
log.debug("Generated Layer ID", lId);
|
|
8084
8366
|
return lId;
|
|
@@ -8122,91 +8404,41 @@ const removeUnneededProperties = (layers) => {
|
|
|
8122
8404
|
};
|
|
8123
8405
|
|
|
8124
8406
|
/**
|
|
8125
|
-
*
|
|
8126
|
-
* @returns {Record<string,any>[]}
|
|
8127
|
-
*/
|
|
8128
|
-
const getLayers = () => mapEl.value?.layers.toReversed();
|
|
8129
|
-
|
|
8130
|
-
/**
|
|
8131
|
-
* Returns the current layers of {@link mapCompareEl}
|
|
8132
|
-
* @returns {Record<string,any>[]}
|
|
8407
|
+
* @param {string[]} geojsonUrls
|
|
8133
8408
|
*/
|
|
8134
|
-
|
|
8135
|
-
|
|
8136
|
-
|
|
8137
|
-
* Register EPSG projection in `eox-map`
|
|
8138
|
-
* @param {string|number|{name: string, def: string, extent?:number[]}} [projection]*/
|
|
8139
|
-
const registerProjection = async (projection) => {
|
|
8140
|
-
let code = getProjectionCode(projection);
|
|
8141
|
-
if (!code || registeredProjections.includes(code)) {
|
|
8142
|
-
return;
|
|
8143
|
-
}
|
|
8144
|
-
log.debug("Unregistered projection found, registering it", code);
|
|
8145
|
-
registeredProjections.push(code);
|
|
8146
|
-
if (typeof projection === "object") {
|
|
8147
|
-
// registering whole projection definition
|
|
8148
|
-
await mapEl.value?.registerProjection(
|
|
8149
|
-
code,
|
|
8150
|
-
projection.def,
|
|
8151
|
-
projection.extent,
|
|
8152
|
-
);
|
|
8153
|
-
// also registering for comparison map
|
|
8154
|
-
await mapCompareEl.value?.registerProjection(
|
|
8155
|
-
code,
|
|
8156
|
-
projection.def,
|
|
8157
|
-
projection.extent,
|
|
8158
|
-
);
|
|
8159
|
-
} else {
|
|
8160
|
-
await mapEl.value?.registerProjectionFromCode(code);
|
|
8161
|
-
// also registering for comparison map
|
|
8162
|
-
await mapCompareEl.value?.registerProjectionFromCode(code);
|
|
8163
|
-
}
|
|
8164
|
-
};
|
|
8165
|
-
/**
|
|
8166
|
-
* Change `eox-map` projection from an `EPSG` projection
|
|
8167
|
-
* @param {string|number|{name: string, def: string}} [projection]*/
|
|
8168
|
-
const changeMapProjection = async (projection) => {
|
|
8169
|
-
let code = getProjectionCode(projection);
|
|
8170
|
-
|
|
8171
|
-
if (!code) {
|
|
8172
|
-
mapEl.value?.setAttribute("projection", "EPSG:3857");
|
|
8173
|
-
mapCompareEl.value?.setAttribute("projection", "EPSG:3857");
|
|
8174
|
-
return;
|
|
8409
|
+
async function mergeGeojsons(geojsonUrls) {
|
|
8410
|
+
if (!geojsonUrls.length) {
|
|
8411
|
+
return undefined;
|
|
8175
8412
|
}
|
|
8176
|
-
|
|
8177
|
-
|
|
8178
|
-
await registerProjection(projection);
|
|
8413
|
+
if (geojsonUrls.length === 1) {
|
|
8414
|
+
return geojsonUrls[0];
|
|
8179
8415
|
}
|
|
8180
8416
|
|
|
8181
|
-
|
|
8182
|
-
|
|
8183
|
-
|
|
8184
|
-
|
|
8185
|
-
|
|
8186
|
-
|
|
8187
|
-
|
|
8188
|
-
|
|
8189
|
-
|
|
8190
|
-
|
|
8191
|
-
|
|
8192
|
-
|
|
8193
|
-
|
|
8417
|
+
const merged = {
|
|
8418
|
+
type: "FeatureCollection",
|
|
8419
|
+
/** @type {import("ol").Feature[]} */
|
|
8420
|
+
features: [],
|
|
8421
|
+
};
|
|
8422
|
+
await Promise.all(
|
|
8423
|
+
geojsonUrls.map((url) =>
|
|
8424
|
+
axios.get(url).then((resp) => {
|
|
8425
|
+
const geojson = resp.data;
|
|
8426
|
+
merged.features.push(...(geojson.features ?? []));
|
|
8427
|
+
}),
|
|
8428
|
+
),
|
|
8429
|
+
);
|
|
8194
8430
|
|
|
8195
|
-
|
|
8196
|
-
|
|
8197
|
-
|
|
8198
|
-
|
|
8199
|
-
getLayers,
|
|
8200
|
-
registerProjection,
|
|
8201
|
-
setActiveTemplate
|
|
8202
|
-
}, Symbol.toStringTag, { value: 'Module' }));
|
|
8431
|
+
return encodeURI(
|
|
8432
|
+
"data:application/json;charset=utf-8," + JSON.stringify(merged),
|
|
8433
|
+
);
|
|
8434
|
+
}
|
|
8203
8435
|
|
|
8204
8436
|
/**
|
|
8205
8437
|
* @param {string} collectionId
|
|
8206
8438
|
* @param {string} title
|
|
8207
8439
|
* @param {Record<string,import("stac-ts").StacAsset>} assets
|
|
8208
8440
|
* @param {import("stac-ts").StacItem } item
|
|
8209
|
-
* @param {import("
|
|
8441
|
+
* @param {import("@/types").EodashStyleJson} [style]
|
|
8210
8442
|
* @param {Record<string, unknown>} [layerConfig]
|
|
8211
8443
|
* @param {Record<string, unknown>} [layerDatetime]
|
|
8212
8444
|
* @param {object | null} [extraProperties]
|
|
@@ -8226,6 +8458,11 @@ async function createLayersFromAssets(
|
|
|
8226
8458
|
let geoTIFFSources = [];
|
|
8227
8459
|
/** @type {number|null} */
|
|
8228
8460
|
let geoTIFFIdx = null;
|
|
8461
|
+
// let geoJsonLayers = [];
|
|
8462
|
+
let geoJsonIdx = 0;
|
|
8463
|
+
|
|
8464
|
+
const geoJsonSources = [];
|
|
8465
|
+
let geoJsonRoles = {};
|
|
8229
8466
|
|
|
8230
8467
|
for (const [idx, ast] of Object.keys(assets).entries()) {
|
|
8231
8468
|
// register projection if exists
|
|
@@ -8234,15 +8471,18 @@ async function createLayersFromAssets(
|
|
|
8234
8471
|
assets[ast]?.["proj:epsg"] || assets[ast]?.["eodash:proj4_def"]
|
|
8235
8472
|
);
|
|
8236
8473
|
await registerProjection(assetProjection);
|
|
8237
|
-
|
|
8238
|
-
|
|
8474
|
+
if (assets[ast]?.type === "application/geo+json") {
|
|
8475
|
+
geoJsonSources.push(assets[ast].href);
|
|
8476
|
+
geoJsonIdx = idx;
|
|
8477
|
+
extractRoles(geoJsonRoles, assets[ast]);
|
|
8478
|
+
} else if (assets[ast]?.type === "application/vnd.flatgeobuf") {
|
|
8239
8479
|
const assetId = createAssetID(collectionId, item.id, idx);
|
|
8240
|
-
|
|
8241
|
-
|
|
8480
|
+
log.debug(`Creating Vector layer from FlatGeoBuf`, assetId);
|
|
8481
|
+
|
|
8242
8482
|
const layer = {
|
|
8243
8483
|
type: "Vector",
|
|
8244
8484
|
source: {
|
|
8245
|
-
type:
|
|
8485
|
+
type: "FlatGeoBuf",
|
|
8246
8486
|
url: assets[ast].href,
|
|
8247
8487
|
format: "GeoJSON",
|
|
8248
8488
|
},
|
|
@@ -8259,6 +8499,23 @@ async function createLayersFromAssets(
|
|
|
8259
8499
|
},
|
|
8260
8500
|
...(!style?.variables && { style }),
|
|
8261
8501
|
};
|
|
8502
|
+
// add tooltip interaction if style has tooltip
|
|
8503
|
+
if (style?.tooltip) {
|
|
8504
|
+
// @ts-expect-error no type for eox-map layer
|
|
8505
|
+
layer.interactions = [
|
|
8506
|
+
{
|
|
8507
|
+
type: "select",
|
|
8508
|
+
options: {
|
|
8509
|
+
id: (Math.random() * 10000).toFixed() + "_selectInteraction",
|
|
8510
|
+
condition: "pointermove",
|
|
8511
|
+
style: {
|
|
8512
|
+
"stroke-color": "#335267",
|
|
8513
|
+
"stroke-width": 4,
|
|
8514
|
+
},
|
|
8515
|
+
},
|
|
8516
|
+
},
|
|
8517
|
+
];
|
|
8518
|
+
}
|
|
8262
8519
|
|
|
8263
8520
|
extractRoles(layer.properties, assets[ast]);
|
|
8264
8521
|
|
|
@@ -8271,6 +8528,36 @@ async function createLayersFromAssets(
|
|
|
8271
8528
|
}
|
|
8272
8529
|
}
|
|
8273
8530
|
|
|
8531
|
+
if (geoJsonSources.length) {
|
|
8532
|
+
const assetId = createAssetID(collectionId, item.id, geoJsonIdx);
|
|
8533
|
+
log.debug(`Creating Vector layer from GeoJsons`, assetId);
|
|
8534
|
+
|
|
8535
|
+
const layer = {
|
|
8536
|
+
type: "Vector",
|
|
8537
|
+
source: {
|
|
8538
|
+
type: "Vector",
|
|
8539
|
+
url: await mergeGeojsons(geoJsonSources),
|
|
8540
|
+
format: "GeoJSON",
|
|
8541
|
+
},
|
|
8542
|
+
properties: {
|
|
8543
|
+
...geoJsonRoles,
|
|
8544
|
+
id: assetId,
|
|
8545
|
+
title,
|
|
8546
|
+
layerDatetime,
|
|
8547
|
+
...(layerConfig && {
|
|
8548
|
+
layerConfig: {
|
|
8549
|
+
...layerConfig,
|
|
8550
|
+
style,
|
|
8551
|
+
},
|
|
8552
|
+
}),
|
|
8553
|
+
},
|
|
8554
|
+
...(!style?.variables && { style }),
|
|
8555
|
+
};
|
|
8556
|
+
|
|
8557
|
+
layer.properties = { ...layer.properties, ...(extraProperties ?? {}) };
|
|
8558
|
+
|
|
8559
|
+
jsonArray.push(layer);
|
|
8560
|
+
}
|
|
8274
8561
|
if (geoTIFFSources.length && typeof geoTIFFIdx === "number") {
|
|
8275
8562
|
const geotiffSourceID = collectionId + ";:;GeoTIFF";
|
|
8276
8563
|
log.debug("Creating WebGLTile layer from GeoTIFF", geotiffSourceID);
|
|
@@ -8521,6 +8808,12 @@ class EodashCollection {
|
|
|
8521
8808
|
*/
|
|
8522
8809
|
selectedItem;
|
|
8523
8810
|
|
|
8811
|
+
/** @type {Exclude<import("@/types").EodashStyleJson["tooltip"],undefined>} */
|
|
8812
|
+
#tooltipProperties = [];
|
|
8813
|
+
|
|
8814
|
+
/** @type {string | undefined} */
|
|
8815
|
+
color;
|
|
8816
|
+
|
|
8524
8817
|
// read only
|
|
8525
8818
|
get collectionStac() {
|
|
8526
8819
|
return this.#collectionStac;
|
|
@@ -8635,6 +8928,7 @@ class EodashCollection {
|
|
|
8635
8928
|
// less control.
|
|
8636
8929
|
|
|
8637
8930
|
let { layerConfig, style } = extractLayerConfig(
|
|
8931
|
+
this.#collectionStac?.id ?? "",
|
|
8638
8932
|
await fetchStyle(item, itemUrl),
|
|
8639
8933
|
);
|
|
8640
8934
|
|
|
@@ -8669,6 +8963,10 @@ class EodashCollection {
|
|
|
8669
8963
|
layerLegend: this.#collectionStac["eox:colorlegend"],
|
|
8670
8964
|
};
|
|
8671
8965
|
}
|
|
8966
|
+
extraProperties = {
|
|
8967
|
+
...extraProperties,
|
|
8968
|
+
...(this.color && { color: this.color }),
|
|
8969
|
+
};
|
|
8672
8970
|
const links = await createLayersFromLinks(
|
|
8673
8971
|
this.#collectionStac?.id ?? "",
|
|
8674
8972
|
title,
|
|
@@ -8780,6 +9078,19 @@ class EodashCollection {
|
|
|
8780
9078
|
: this.getItems()?.at(-1);
|
|
8781
9079
|
}
|
|
8782
9080
|
|
|
9081
|
+
async getToolTipProperties() {
|
|
9082
|
+
if (!(this.selectedItem instanceof Item)) {
|
|
9083
|
+
return [];
|
|
9084
|
+
}
|
|
9085
|
+
let styles = await fetchStyle(
|
|
9086
|
+
this.selectedItem,
|
|
9087
|
+
`${this.#collectionUrl}/${this.selectedItem.id}`,
|
|
9088
|
+
);
|
|
9089
|
+
const { tooltip } = styles || { tooltip: [] };
|
|
9090
|
+
this.#tooltipProperties = tooltip ?? [];
|
|
9091
|
+
return this.#tooltipProperties;
|
|
9092
|
+
}
|
|
9093
|
+
|
|
8783
9094
|
/**
|
|
8784
9095
|
*
|
|
8785
9096
|
* @param {string} datetime
|
|
@@ -8848,7 +9159,6 @@ class EodashCollection {
|
|
|
8848
9159
|
indicator?.title || indicator.id,
|
|
8849
9160
|
//@ts-expect-error indicator instead of item
|
|
8850
9161
|
indicator,
|
|
8851
|
-
// layerDatetime,
|
|
8852
9162
|
)),
|
|
8853
9163
|
...(await createLayersFromAssets(
|
|
8854
9164
|
indicator?.id ?? "",
|
|
@@ -8856,9 +9166,6 @@ class EodashCollection {
|
|
|
8856
9166
|
indicatorAssets,
|
|
8857
9167
|
//@ts-expect-error indicator instead of item
|
|
8858
9168
|
indicator,
|
|
8859
|
-
// style,
|
|
8860
|
-
// layerConfig,
|
|
8861
|
-
// layerDatetime,
|
|
8862
9169
|
)),
|
|
8863
9170
|
];
|
|
8864
9171
|
}
|
|
@@ -9004,9 +9311,10 @@ const useSTAcStore = defineStore("stac", () => {
|
|
|
9004
9311
|
);
|
|
9005
9312
|
|
|
9006
9313
|
await Promise.all(
|
|
9007
|
-
collectionUrls.map((cu) => {
|
|
9314
|
+
collectionUrls.map((cu, idx) => {
|
|
9008
9315
|
const ec = new EodashCollection(cu);
|
|
9009
9316
|
ec.fetchCollection();
|
|
9317
|
+
ec.color = collectionsPalette[idx % collectionsPalette.length];
|
|
9010
9318
|
return ec;
|
|
9011
9319
|
}),
|
|
9012
9320
|
).then((collections) => {
|
|
@@ -9146,58 +9454,6 @@ const useEodashRuntime = async (runtimeConfig) => {
|
|
|
9146
9454
|
return eodash;
|
|
9147
9455
|
};
|
|
9148
9456
|
|
|
9149
|
-
/**
|
|
9150
|
-
* Loads font in the app using `webfontloader`
|
|
9151
|
-
*
|
|
9152
|
-
* @param {string} [family]
|
|
9153
|
-
* @param {string} [link]
|
|
9154
|
-
* @param {boolean} [isWebComponent]
|
|
9155
|
-
* @returns {Promise<string>} - Font family name
|
|
9156
|
-
* @see {@link "https://github.com/typekit/webfontloader"}
|
|
9157
|
-
*/
|
|
9158
|
-
const loadFont = async (
|
|
9159
|
-
family = "",
|
|
9160
|
-
link = "",
|
|
9161
|
-
isWebComponent = false,
|
|
9162
|
-
) => {
|
|
9163
|
-
if (family && link) {
|
|
9164
|
-
const WebFontLoader = (await import('webfontloader')).default;
|
|
9165
|
-
WebFontLoader.load({
|
|
9166
|
-
classes: false,
|
|
9167
|
-
custom: {
|
|
9168
|
-
// Use FVD notation to include families https://github.com/typekit/fvd
|
|
9169
|
-
families: [family],
|
|
9170
|
-
// Path to stylesheet that defines font-face
|
|
9171
|
-
urls: [link],
|
|
9172
|
-
},
|
|
9173
|
-
fontactive(familyName, _fvd) {
|
|
9174
|
-
const stylesheet = new CSSStyleSheet();
|
|
9175
|
-
const styles = isWebComponent
|
|
9176
|
-
? `eo-dash {font-family: ${familyName};}`
|
|
9177
|
-
: `* {font-family: ${familyName};}`;
|
|
9178
|
-
stylesheet.replaceSync(styles);
|
|
9179
|
-
document.adoptedStyleSheets.push(stylesheet);
|
|
9180
|
-
},
|
|
9181
|
-
fontinactive(familyName, _fvd) {
|
|
9182
|
-
throw new Error(`error loading font: ${familyName}`);
|
|
9183
|
-
},
|
|
9184
|
-
});
|
|
9185
|
-
}
|
|
9186
|
-
return family;
|
|
9187
|
-
};
|
|
9188
|
-
|
|
9189
|
-
/**
|
|
9190
|
-
* @param {string} text
|
|
9191
|
-
* @param {import("vue").Ref<boolean>} showIcon
|
|
9192
|
-
**/
|
|
9193
|
-
const copyToClipBoard = async (text, showIcon) => {
|
|
9194
|
-
await navigator.clipboard.writeText(text);
|
|
9195
|
-
showIcon.value = true;
|
|
9196
|
-
setTimeout(() => {
|
|
9197
|
-
showIcon.value = false;
|
|
9198
|
-
}, 2000);
|
|
9199
|
-
};
|
|
9200
|
-
|
|
9201
9457
|
const _export_sfc = (sfc, props) => {
|
|
9202
9458
|
const target = sfc.__vccOpts || sfc;
|
|
9203
9459
|
for (const [key, val] of props) {
|
|
@@ -10238,7 +10494,7 @@ const VProgressLinear = genericComponent()({
|
|
|
10238
10494
|
"aria-hidden": props.active ? 'false' : 'true',
|
|
10239
10495
|
"aria-valuemin": "0",
|
|
10240
10496
|
"aria-valuemax": props.max,
|
|
10241
|
-
"aria-valuenow": props.indeterminate ? undefined :
|
|
10497
|
+
"aria-valuenow": props.indeterminate ? undefined : Math.min(parseFloat(progress.value), max.value),
|
|
10242
10498
|
"onClick": props.clickable && handleClick
|
|
10243
10499
|
}, {
|
|
10244
10500
|
default: () => [props.stream && createVNode("div", {
|
|
@@ -11192,7 +11448,7 @@ const ErrorAlert = /*#__PURE__*/_export_sfc(_sfc_main$3, [['__scopeId',"data-v-a
|
|
|
11192
11448
|
const internalWidgets = (() => {
|
|
11193
11449
|
/** @type {Record<string, () => Promise<import("vue").Component>>} */
|
|
11194
11450
|
const importMap = {
|
|
11195
|
-
.../* #__PURE__ */ Object.assign({"/widgets/EodashDatePicker.vue": () => import('./EodashDatePicker-
|
|
11451
|
+
.../* #__PURE__ */ Object.assign({"/widgets/EodashDatePicker.vue": () => import('./EodashDatePicker-Bp5ec3BC.js'),"/widgets/EodashItemFilter.vue": () => import('./EodashItemFilter-Cx0t-qeW.js'),"/widgets/EodashLayerControl.vue": () => import('./EodashLayerControl-DERx00In.js'),"/widgets/EodashLayoutSwitcher.vue": () => import('./EodashLayoutSwitcher-DTS7otlk.js'),"/widgets/EodashMap.vue": () => import('./EodashMap-C-I6puhb.js'),"/widgets/EodashMapBtns.vue": () => import('./EodashMapBtns-CWgtJiG4.js'),"/widgets/EodashProcess.vue": () => import('./EodashProcess-DWrTIyHT.js'),"/widgets/EodashStacInfo.vue": () => import('./EodashStacInfo-Dvsk97Mz.js'),"/widgets/EodashTools.vue": () => import('./EodashTools-CdnjgTTl.js'),"/widgets/ExportState.vue": () => import('./ExportState-S4lcehm3.js'),"/widgets/PopUp.vue": () => import('./PopUp-CzqV8BFZ.js'),"/widgets/WidgetsContainer.vue": () => import('./WidgetsContainer-Cv466WUW.js')}),
|
|
11196
11452
|
.../* #__PURE__ */ Object.assign({}),
|
|
11197
11453
|
};
|
|
11198
11454
|
for (const key in importMap) {
|
|
@@ -11300,7 +11556,7 @@ const getWidgetDefinition = (config) => {
|
|
|
11300
11556
|
|
|
11301
11557
|
case "web-component":
|
|
11302
11558
|
importedWidget.component = defineAsyncComponent({
|
|
11303
|
-
loader: () => import('./DynamicWebComponent-
|
|
11559
|
+
loader: () => import('./DynamicWebComponent-BCwpocDX.js'),
|
|
11304
11560
|
suspensible: true,
|
|
11305
11561
|
});
|
|
11306
11562
|
importedWidget.props = reactive(config.widget);
|
|
@@ -11712,7 +11968,9 @@ const eodash = (
|
|
|
11712
11968
|
|
|
11713
11969
|
useURLSearchParametersSync();
|
|
11714
11970
|
|
|
11715
|
-
const theme = useUpdateTheme("dashboardTheme",
|
|
11971
|
+
const theme = useUpdateTheme("dashboardTheme", {
|
|
11972
|
+
...(eodash.brand?.theme ?? {}),
|
|
11973
|
+
});
|
|
11716
11974
|
theme.global.name.value = "dashboardTheme";
|
|
11717
11975
|
(
|
|
11718
11976
|
([__temp,__restore] = withAsyncContext(() => loadFont(
|
|
@@ -11734,15 +11992,15 @@ const { loadSTAC } = useSTAcStore();
|
|
|
11734
11992
|
const { smAndDown } = useDisplay();
|
|
11735
11993
|
const TemplateComponent = computed(() =>
|
|
11736
11994
|
smAndDown.value
|
|
11737
|
-
? defineAsyncComponent(() => import('./MobileLayout-
|
|
11738
|
-
: defineAsyncComponent(() => import('./DashboardLayout-
|
|
11995
|
+
? defineAsyncComponent(() => import('./MobileLayout-DRgyQYFz.js'))
|
|
11996
|
+
: defineAsyncComponent(() => import('./DashboardLayout-VrJIbhe8.js')),
|
|
11739
11997
|
);
|
|
11740
11998
|
|
|
11741
11999
|
const HeaderComponent = defineAsyncComponent(
|
|
11742
|
-
() => import('./Header-
|
|
12000
|
+
() => import('./Header-CTiEXLi0.js'),
|
|
11743
12001
|
);
|
|
11744
12002
|
const FooterComponent = defineAsyncComponent(
|
|
11745
|
-
() => import('./Footer-
|
|
12003
|
+
() => import('./Footer-DlIEbXp-.js'),
|
|
11746
12004
|
);
|
|
11747
12005
|
|
|
11748
12006
|
const templateHeight = props.isWebComponent ? "100%" : "100dvh";
|
|
@@ -11941,4 +12199,4 @@ function register() {
|
|
|
11941
12199
|
|
|
11942
12200
|
register();
|
|
11943
12201
|
|
|
11944
|
-
export { useSTAcStore as $, makeDensityProps as A, useDensity as B, useBackgroundColor as C, provideDefaults as D, isObject as E, useDefineTemplate as F, useLayout as G, makeDimensionProps as H, IconValue as I, useDimension as J, makeBorderProps as K, makeElevationProps as L, makeRoundedProps as M, useBorder as N, useElevation as O, useRounded as P, VDefaultsProvider as Q, clamp as R, consoleWarn as S, makeLayoutItemProps as T, useToggleScope as U, VBtn as V, useLayoutItem as W, eodashKey as X, consoleError as Y, datetime as Z, _export_sfc as _, useRender as a, eodashCollections as a0,
|
|
12202
|
+
export { useSTAcStore as $, makeDensityProps as A, useDensity as B, useBackgroundColor as C, provideDefaults as D, isObject as E, useDefineTemplate as F, useLayout as G, makeDimensionProps as H, IconValue as I, useDimension as J, makeBorderProps as K, makeElevationProps as L, makeRoundedProps as M, useBorder as N, useElevation as O, useRounded as P, VDefaultsProvider as Q, clamp as R, consoleWarn as S, makeLayoutItemProps as T, useToggleScope as U, VBtn as V, useLayoutItem as W, eodashKey as X, consoleError as Y, datetime as Z, _export_sfc as _, useRender as a, eodashCollections as a0, collectionsPalette as a1, makePanelTransparent as a2, mapCompareEl as a3, mapEl as a4, eodashCompareCollections as a5, layerControlFormValue as a6, getColFromLayer as a7, eoxLayersKey as a8, setMapProjFromCol as a9, usePosition as aA, useLink as aB, LoaderSlot as aC, removeUnneededProperties as aD, VRow as aE, VCol as aF, copyToClipBoard as aG, SUPPORTS_INTERSECTION as aH, getCurrentInstance as aI, useDefineWidgets as aJ, isOn as aK, eventName as aL, destructComputed as aM, parseAnchor as aN, flipSide as aO, flipAlign as aP, flipCorner as aQ, getAxis as aR, defer as aS, templateRef as aT, matchesSelector as aU, useRouter as aV, useBackButton as aW, EodashConstructor as aX, register as aY, store as aZ, posIsSetFromUrl as aa, useOnLayersUpdate as ab, EodashCollection as ac, mapPosition as ad, availableMapProjection as ae, changeMapProjection as af, setActiveTemplate as ag, axios$1 as ah, getLayers as ai, extractLayerConfig as aj, currentUrl as ak, activeTemplate as al, getUid as am, createSimpleFunctional as an, makeSizeProps as ao, makeVariantProps as ap, useVariant as aq, useSize as ar, genOverlays as as, makeLoaderProps as at, makeLocationProps as au, makePositionProps as av, makeRouterProps as aw, Ripple as ax, useLoader as ay, useLocation as az, makeComponentProps as b, makeTagProps as c, makeThemeProps as d, provideTheme as e, useRtl as f, genericComponent as g, useLocale as h, useGroup as i, useProxiedModel as j, keys as k, makeGroupItemProps as l, makeVBtnProps as m, useGroupItem as n, omit as o, propsFactory as p, convertToUnit as q, makeDisplayProps as r, makeGroupProps as s, useDisplay as t, useTextColor as u, useResizeObserver as v, useGoTo as w, IN_BROWSER as x, VIcon as y, focusableChildren as z };
|