@eodash/eodash 5.0.0-rc.1.6 → 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/core/client/composables/EodashMap.js +30 -25
- package/core/client/composables/index.js +8 -1
- package/core/client/eodash.js +14 -1
- package/core/client/eodashSTAC/EodashCollection.js +9 -5
- package/core/client/eodashSTAC/createLayers.js +1 -1
- package/core/client/eodashSTAC/helpers.js +10 -2
- package/core/client/eodashSTAC/triggers.js +52 -1
- package/core/client/store/stac.js +7 -2
- package/core/client/types.ts +3 -1
- package/core/client/utils/index.js +12 -0
- package/core/client/utils/states.js +16 -2
- package/core/client/views/Dashboard.vue +3 -1
- package/dist/client/{DashboardLayout-SZfMDUoR.js → DashboardLayout-VrJIbhe8.js} +2 -2
- package/dist/client/{DynamicWebComponent-I9gzMY0L.js → DynamicWebComponent-BCwpocDX.js} +1 -1
- package/dist/client/{EodashDatePicker-B9_u6TTm.js → EodashDatePicker-Bp5ec3BC.js} +60 -35
- package/dist/client/{EodashItemFilter-G7YsYO3B.js → EodashItemFilter-Cx0t-qeW.js} +1 -1
- package/dist/client/{EodashLayerControl-CJ94ul63.js → EodashLayerControl-DERx00In.js} +1 -1
- package/dist/client/{EodashLayoutSwitcher-DRKm8A8U.js → EodashLayoutSwitcher-DTS7otlk.js} +2 -2
- package/dist/client/{EodashMap-Dp44Ajbi.js → EodashMap-C-I6puhb.js} +50 -72
- package/dist/client/{EodashMapBtns-BlPFwhPc.js → EodashMapBtns-CWgtJiG4.js} +4 -4
- package/dist/client/{EodashProcess-BLmIgUGT.js → EodashProcess-DWrTIyHT.js} +32 -10
- package/dist/client/{EodashStacInfo-BIRcfcMo.js → EodashStacInfo-Dvsk97Mz.js} +1 -1
- package/dist/client/{EodashTools-PNfJ-Cw3.js → EodashTools-CdnjgTTl.js} +4 -4
- package/dist/client/{ExportState-5JyTshJH.js → ExportState-S4lcehm3.js} +4 -4
- package/dist/client/{Footer-CM9hgdQP.js → Footer-DlIEbXp-.js} +1 -1
- package/dist/client/{Header-BTq4DW1x.js → Header-CTiEXLi0.js} +3 -3
- package/dist/client/{MobileLayout-Atfoxf8d.js → MobileLayout-DRgyQYFz.js} +17 -7
- package/dist/client/{PopUp-Bmfn3N_4.js → PopUp-CzqV8BFZ.js} +3 -3
- package/dist/client/{VImg-CUF4S39i.js → VImg-Bn8bCvVM.js} +2 -2
- package/dist/client/{VMain-CQpXnzDR.js → VMain-2GOqWb6m.js} +1 -1
- package/dist/client/{VOverlay-DUnITwM1.js → VOverlay-BetC0LGI.js} +3 -3
- package/dist/client/{VTooltip-BYTlbKer.js → VTooltip-BWg0dxx5.js} +3 -3
- package/dist/client/{WidgetsContainer-BPbgxdb0.js → WidgetsContainer-Cv466WUW.js} +1 -1
- package/dist/client/{asWebComponent-DW1XzZkL.js → asWebComponent-CLUhauLl.js} +302 -154
- package/dist/client/eo-dash.css +1 -1
- package/dist/client/eo-dash.js +1 -1
- package/dist/client/{forwardRefs-gx1Fzngc.js → forwardRefs-CxSsJulB.js} +1 -1
- package/dist/client/{index-DvFppNyk.js → index-BMj56LY3.js} +1 -1
- package/dist/client/{transition-j2eWJYMg.js → transition-DidoPMgC.js} +1 -1
- package/dist/node/cli.js +2 -2
- package/dist/types/core/client/composables/EodashMap.d.ts +2 -2
- package/dist/types/core/client/composables/index.d.ts +1 -1
- package/dist/types/core/client/eodashSTAC/EodashCollection.d.ts +2 -0
- package/dist/types/core/client/eodashSTAC/helpers.d.ts +4 -2
- package/dist/types/core/client/eodashSTAC/triggers.d.ts +6 -0
- package/dist/types/core/client/types.d.ts +3 -1
- package/dist/types/core/client/utils/index.d.ts +1 -0
- package/dist/types/core/client/utils/states.d.ts +8 -1
- package/dist/types/widgets/EodashDatePicker.vue.d.ts +455 -0
- package/dist/types/widgets/EodashMap.vue.d.ts +2 -0
- package/dist/types/widgets/EodashProcess.vue.d.ts +1 -0
- package/package.json +19 -19
- package/widgets/EodashDatePicker.vue +51 -17
- package/widgets/EodashMap.vue +14 -2
- package/widgets/EodashProcess.vue +25 -11
|
@@ -3793,6 +3793,18 @@ const eodash = reactive({
|
|
|
3793
3793
|
"surface-opacity": 0.6,
|
|
3794
3794
|
"primary-opacity": 0.8,
|
|
3795
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
|
+
],
|
|
3796
3808
|
},
|
|
3797
3809
|
footerText: "Demo configuration of eodash client",
|
|
3798
3810
|
},
|
|
@@ -3912,7 +3924,6 @@ const eodash = reactive({
|
|
|
3912
3924
|
properties: {
|
|
3913
3925
|
hintText: `<b>Hint:</b> closest available date is displayed <br />
|
|
3914
3926
|
on map (see Analysis Layers)`,
|
|
3915
|
-
toggleCalendar: true,
|
|
3916
3927
|
},
|
|
3917
3928
|
},
|
|
3918
3929
|
}
|
|
@@ -4011,6 +4022,7 @@ const eodash = reactive({
|
|
|
4011
4022
|
properties: {
|
|
4012
4023
|
hintText: `<b>Hint:</b> closest available date is displayed <br />
|
|
4013
4024
|
on map (see Analysis Layers)`,
|
|
4025
|
+
toggleCalendar: true,
|
|
4014
4026
|
},
|
|
4015
4027
|
},
|
|
4016
4028
|
}
|
|
@@ -4183,6 +4195,7 @@ const eodash = reactive({
|
|
|
4183
4195
|
properties: {
|
|
4184
4196
|
hintText: `<b>Hint:</b> closest available date is displayed <br />
|
|
4185
4197
|
on map (see Analysis Layers)`,
|
|
4198
|
+
toggleCalendar: true,
|
|
4186
4199
|
},
|
|
4187
4200
|
},
|
|
4188
4201
|
}
|
|
@@ -7517,7 +7530,7 @@ function createVuetify() {
|
|
|
7517
7530
|
goTo
|
|
7518
7531
|
};
|
|
7519
7532
|
}
|
|
7520
|
-
const version = "3.7.
|
|
7533
|
+
const version = "3.7.7";
|
|
7521
7534
|
createVuetify.version = version;
|
|
7522
7535
|
function inject(key) {
|
|
7523
7536
|
const vm = this.$;
|
|
@@ -7557,8 +7570,84 @@ const eodashCompareCollections = shallowReactive([]);
|
|
|
7557
7570
|
/** whether the map postion was set in URL params on first load */
|
|
7558
7571
|
const posIsSetFromUrl = ref(false);
|
|
7559
7572
|
|
|
7560
|
-
/**
|
|
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
|
+
*/
|
|
7561
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
|
+
};
|
|
7562
7651
|
|
|
7563
7652
|
// functions of this folder can only be consumed inside setup stores,
|
|
7564
7653
|
// setup functions or vue composition api components https://vuejs.org/guide/reusability/composables
|
|
@@ -7627,13 +7716,19 @@ const useCompareAbsoluteUrl = (rel = "", base = eodash.stacEndpoint) => {
|
|
|
7627
7716
|
* `ThemeDefinition`
|
|
7628
7717
|
*
|
|
7629
7718
|
* @param {string} themeName - Name of the theme to be updated
|
|
7630
|
-
* @param {import("
|
|
7719
|
+
* @param {import("@/types").Eodash["brand"]["theme"]} [themeDefinition={}] - New
|
|
7631
7720
|
* defintion to be updated to. Default is `{}`
|
|
7632
7721
|
* @returns {import("vuetify").ThemeInstance}
|
|
7633
7722
|
*/
|
|
7634
7723
|
const useUpdateTheme = (themeName, themeDefinition = {}) => {
|
|
7635
7724
|
const theme = useTheme();
|
|
7636
7725
|
|
|
7726
|
+
// extract collections palette from the theme
|
|
7727
|
+
if (themeDefinition.collectionsPalette?.length) {
|
|
7728
|
+
setCollectionsPalette(themeDefinition.collectionsPalette);
|
|
7729
|
+
delete themeDefinition.collectionsPalette;
|
|
7730
|
+
}
|
|
7731
|
+
|
|
7637
7732
|
/** @type {(keyof import("vuetify").ThemeDefinition)[]} */ (
|
|
7638
7733
|
Object.keys(themeDefinition)
|
|
7639
7734
|
).forEach((key) => {
|
|
@@ -7781,6 +7876,177 @@ const useOnLayersUpdate = (listener) => {
|
|
|
7781
7876
|
});
|
|
7782
7877
|
};
|
|
7783
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
|
+
|
|
7784
8050
|
/** @param {import("stac-ts").StacLink[]} [links] */
|
|
7785
8051
|
function generateFeatures(links) {
|
|
7786
8052
|
/**
|
|
@@ -7818,12 +8084,19 @@ function generateFeatures(links) {
|
|
|
7818
8084
|
/**
|
|
7819
8085
|
* Sperates and extracts layerConfig (jsonform schema & legend) from a style json
|
|
7820
8086
|
*
|
|
7821
|
-
*
|
|
7822
|
-
|
|
8087
|
+
* @param {string} collectionId
|
|
8088
|
+
* @param { import("@/types").EodashStyleJson} [style]
|
|
8089
|
+
* */
|
|
8090
|
+
function extractLayerConfig(collectionId, style) {
|
|
7823
8091
|
if (!style) {
|
|
7824
8092
|
return { layerConfig: undefined, style: undefined };
|
|
7825
8093
|
}
|
|
7826
8094
|
style = { ...style };
|
|
8095
|
+
|
|
8096
|
+
if (Object.keys(style.variables ?? {}).length) {
|
|
8097
|
+
style.variables = getStyleVariablesState(collectionId, style.variables);
|
|
8098
|
+
}
|
|
8099
|
+
|
|
7827
8100
|
/** @type {Record<string,unknown> | undefined} */
|
|
7828
8101
|
let layerConfig = undefined;
|
|
7829
8102
|
|
|
@@ -8160,86 +8433,6 @@ async function mergeGeojsons(geojsonUrls) {
|
|
|
8160
8433
|
);
|
|
8161
8434
|
}
|
|
8162
8435
|
|
|
8163
|
-
/**
|
|
8164
|
-
* Returns the current layers of {@link mapEl}
|
|
8165
|
-
* @returns {Record<string,any>[]}
|
|
8166
|
-
*/
|
|
8167
|
-
const getLayers = () => mapEl.value?.layers.toReversed();
|
|
8168
|
-
|
|
8169
|
-
/**
|
|
8170
|
-
* Returns the current layers of {@link mapCompareEl}
|
|
8171
|
-
* @returns {Record<string,any>[]}
|
|
8172
|
-
*/
|
|
8173
|
-
const getCompareLayers = () => mapCompareEl.value?.layers.toReversed();
|
|
8174
|
-
|
|
8175
|
-
/**
|
|
8176
|
-
* Register EPSG projection in `eox-map`
|
|
8177
|
-
* @param {string|number|{name: string, def: string, extent?:number[]}} [projection]*/
|
|
8178
|
-
const registerProjection = async (projection) => {
|
|
8179
|
-
let code = getProjectionCode(projection);
|
|
8180
|
-
if (!code || registeredProjections.includes(code)) {
|
|
8181
|
-
return;
|
|
8182
|
-
}
|
|
8183
|
-
log.debug("Unregistered projection found, registering it", code);
|
|
8184
|
-
registeredProjections.push(code);
|
|
8185
|
-
if (typeof projection === "object") {
|
|
8186
|
-
// registering whole projection definition
|
|
8187
|
-
await mapEl.value?.registerProjection(
|
|
8188
|
-
code,
|
|
8189
|
-
projection.def,
|
|
8190
|
-
projection.extent,
|
|
8191
|
-
);
|
|
8192
|
-
// also registering for comparison map
|
|
8193
|
-
await mapCompareEl.value?.registerProjection(
|
|
8194
|
-
code,
|
|
8195
|
-
projection.def,
|
|
8196
|
-
projection.extent,
|
|
8197
|
-
);
|
|
8198
|
-
} else {
|
|
8199
|
-
await mapEl.value?.registerProjectionFromCode(code);
|
|
8200
|
-
// also registering for comparison map
|
|
8201
|
-
await mapCompareEl.value?.registerProjectionFromCode(code);
|
|
8202
|
-
}
|
|
8203
|
-
};
|
|
8204
|
-
/**
|
|
8205
|
-
* Change `eox-map` projection from an `EPSG` projection
|
|
8206
|
-
* @param {string|number|{name: string, def: string}} [projection]*/
|
|
8207
|
-
const changeMapProjection = async (projection) => {
|
|
8208
|
-
let code = getProjectionCode(projection);
|
|
8209
|
-
|
|
8210
|
-
if (!code) {
|
|
8211
|
-
mapEl.value?.setAttribute("projection", "EPSG:3857");
|
|
8212
|
-
mapCompareEl.value?.setAttribute("projection", "EPSG:3857");
|
|
8213
|
-
return;
|
|
8214
|
-
}
|
|
8215
|
-
|
|
8216
|
-
if (!registeredProjections.includes(code)) {
|
|
8217
|
-
await registerProjection(projection);
|
|
8218
|
-
}
|
|
8219
|
-
|
|
8220
|
-
code = mapEl.value?.getAttribute("projection") === code ? "EPSG:3857" : code;
|
|
8221
|
-
mapEl.value?.setAttribute("projection", code);
|
|
8222
|
-
mapCompareEl.value?.setAttribute("projection", code);
|
|
8223
|
-
};
|
|
8224
|
-
|
|
8225
|
-
/**
|
|
8226
|
-
*
|
|
8227
|
-
* @param {string} template
|
|
8228
|
-
*/
|
|
8229
|
-
const setActiveTemplate = (template) => {
|
|
8230
|
-
activeTemplate.value = template;
|
|
8231
|
-
log.debug("Setting active template to", template);
|
|
8232
|
-
};
|
|
8233
|
-
|
|
8234
|
-
const actions = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
8235
|
-
__proto__: null,
|
|
8236
|
-
changeMapProjection,
|
|
8237
|
-
getCompareLayers,
|
|
8238
|
-
getLayers,
|
|
8239
|
-
registerProjection,
|
|
8240
|
-
setActiveTemplate
|
|
8241
|
-
}, Symbol.toStringTag, { value: 'Module' }));
|
|
8242
|
-
|
|
8243
8436
|
/**
|
|
8244
8437
|
* @param {string} collectionId
|
|
8245
8438
|
* @param {string} title
|
|
@@ -8313,7 +8506,7 @@ async function createLayersFromAssets(
|
|
|
8313
8506
|
{
|
|
8314
8507
|
type: "select",
|
|
8315
8508
|
options: {
|
|
8316
|
-
id: "
|
|
8509
|
+
id: (Math.random() * 10000).toFixed() + "_selectInteraction",
|
|
8317
8510
|
condition: "pointermove",
|
|
8318
8511
|
style: {
|
|
8319
8512
|
"stroke-color": "#335267",
|
|
@@ -8615,9 +8808,12 @@ class EodashCollection {
|
|
|
8615
8808
|
*/
|
|
8616
8809
|
selectedItem;
|
|
8617
8810
|
|
|
8618
|
-
/** @type {import("@/types").EodashStyleJson["tooltip"]} */
|
|
8811
|
+
/** @type {Exclude<import("@/types").EodashStyleJson["tooltip"],undefined>} */
|
|
8619
8812
|
#tooltipProperties = [];
|
|
8620
8813
|
|
|
8814
|
+
/** @type {string | undefined} */
|
|
8815
|
+
color;
|
|
8816
|
+
|
|
8621
8817
|
// read only
|
|
8622
8818
|
get collectionStac() {
|
|
8623
8819
|
return this.#collectionStac;
|
|
@@ -8732,6 +8928,7 @@ class EodashCollection {
|
|
|
8732
8928
|
// less control.
|
|
8733
8929
|
|
|
8734
8930
|
let { layerConfig, style } = extractLayerConfig(
|
|
8931
|
+
this.#collectionStac?.id ?? "",
|
|
8735
8932
|
await fetchStyle(item, itemUrl),
|
|
8736
8933
|
);
|
|
8737
8934
|
|
|
@@ -8766,6 +8963,10 @@ class EodashCollection {
|
|
|
8766
8963
|
layerLegend: this.#collectionStac["eox:colorlegend"],
|
|
8767
8964
|
};
|
|
8768
8965
|
}
|
|
8966
|
+
extraProperties = {
|
|
8967
|
+
...extraProperties,
|
|
8968
|
+
...(this.color && { color: this.color }),
|
|
8969
|
+
};
|
|
8769
8970
|
const links = await createLayersFromLinks(
|
|
8770
8971
|
this.#collectionStac?.id ?? "",
|
|
8771
8972
|
title,
|
|
@@ -8958,7 +9159,6 @@ class EodashCollection {
|
|
|
8958
9159
|
indicator?.title || indicator.id,
|
|
8959
9160
|
//@ts-expect-error indicator instead of item
|
|
8960
9161
|
indicator,
|
|
8961
|
-
// layerDatetime,
|
|
8962
9162
|
)),
|
|
8963
9163
|
...(await createLayersFromAssets(
|
|
8964
9164
|
indicator?.id ?? "",
|
|
@@ -8966,9 +9166,6 @@ class EodashCollection {
|
|
|
8966
9166
|
indicatorAssets,
|
|
8967
9167
|
//@ts-expect-error indicator instead of item
|
|
8968
9168
|
indicator,
|
|
8969
|
-
// style,
|
|
8970
|
-
// layerConfig,
|
|
8971
|
-
// layerDatetime,
|
|
8972
9169
|
)),
|
|
8973
9170
|
];
|
|
8974
9171
|
}
|
|
@@ -9114,9 +9311,10 @@ const useSTAcStore = defineStore("stac", () => {
|
|
|
9114
9311
|
);
|
|
9115
9312
|
|
|
9116
9313
|
await Promise.all(
|
|
9117
|
-
collectionUrls.map((cu) => {
|
|
9314
|
+
collectionUrls.map((cu, idx) => {
|
|
9118
9315
|
const ec = new EodashCollection(cu);
|
|
9119
9316
|
ec.fetchCollection();
|
|
9317
|
+
ec.color = collectionsPalette[idx % collectionsPalette.length];
|
|
9120
9318
|
return ec;
|
|
9121
9319
|
}),
|
|
9122
9320
|
).then((collections) => {
|
|
@@ -9256,58 +9454,6 @@ const useEodashRuntime = async (runtimeConfig) => {
|
|
|
9256
9454
|
return eodash;
|
|
9257
9455
|
};
|
|
9258
9456
|
|
|
9259
|
-
/**
|
|
9260
|
-
* Loads font in the app using `webfontloader`
|
|
9261
|
-
*
|
|
9262
|
-
* @param {string} [family]
|
|
9263
|
-
* @param {string} [link]
|
|
9264
|
-
* @param {boolean} [isWebComponent]
|
|
9265
|
-
* @returns {Promise<string>} - Font family name
|
|
9266
|
-
* @see {@link "https://github.com/typekit/webfontloader"}
|
|
9267
|
-
*/
|
|
9268
|
-
const loadFont = async (
|
|
9269
|
-
family = "",
|
|
9270
|
-
link = "",
|
|
9271
|
-
isWebComponent = false,
|
|
9272
|
-
) => {
|
|
9273
|
-
if (family && link) {
|
|
9274
|
-
const WebFontLoader = (await import('webfontloader')).default;
|
|
9275
|
-
WebFontLoader.load({
|
|
9276
|
-
classes: false,
|
|
9277
|
-
custom: {
|
|
9278
|
-
// Use FVD notation to include families https://github.com/typekit/fvd
|
|
9279
|
-
families: [family],
|
|
9280
|
-
// Path to stylesheet that defines font-face
|
|
9281
|
-
urls: [link],
|
|
9282
|
-
},
|
|
9283
|
-
fontactive(familyName, _fvd) {
|
|
9284
|
-
const stylesheet = new CSSStyleSheet();
|
|
9285
|
-
const styles = isWebComponent
|
|
9286
|
-
? `eo-dash {font-family: ${familyName};}`
|
|
9287
|
-
: `* {font-family: ${familyName};}`;
|
|
9288
|
-
stylesheet.replaceSync(styles);
|
|
9289
|
-
document.adoptedStyleSheets.push(stylesheet);
|
|
9290
|
-
},
|
|
9291
|
-
fontinactive(familyName, _fvd) {
|
|
9292
|
-
throw new Error(`error loading font: ${familyName}`);
|
|
9293
|
-
},
|
|
9294
|
-
});
|
|
9295
|
-
}
|
|
9296
|
-
return family;
|
|
9297
|
-
};
|
|
9298
|
-
|
|
9299
|
-
/**
|
|
9300
|
-
* @param {string} text
|
|
9301
|
-
* @param {import("vue").Ref<boolean>} showIcon
|
|
9302
|
-
**/
|
|
9303
|
-
const copyToClipBoard = async (text, showIcon) => {
|
|
9304
|
-
await navigator.clipboard.writeText(text);
|
|
9305
|
-
showIcon.value = true;
|
|
9306
|
-
setTimeout(() => {
|
|
9307
|
-
showIcon.value = false;
|
|
9308
|
-
}, 2000);
|
|
9309
|
-
};
|
|
9310
|
-
|
|
9311
9457
|
const _export_sfc = (sfc, props) => {
|
|
9312
9458
|
const target = sfc.__vccOpts || sfc;
|
|
9313
9459
|
for (const [key, val] of props) {
|
|
@@ -10348,7 +10494,7 @@ const VProgressLinear = genericComponent()({
|
|
|
10348
10494
|
"aria-hidden": props.active ? 'false' : 'true',
|
|
10349
10495
|
"aria-valuemin": "0",
|
|
10350
10496
|
"aria-valuemax": props.max,
|
|
10351
|
-
"aria-valuenow": props.indeterminate ? undefined :
|
|
10497
|
+
"aria-valuenow": props.indeterminate ? undefined : Math.min(parseFloat(progress.value), max.value),
|
|
10352
10498
|
"onClick": props.clickable && handleClick
|
|
10353
10499
|
}, {
|
|
10354
10500
|
default: () => [props.stream && createVNode("div", {
|
|
@@ -11302,7 +11448,7 @@ const ErrorAlert = /*#__PURE__*/_export_sfc(_sfc_main$3, [['__scopeId',"data-v-a
|
|
|
11302
11448
|
const internalWidgets = (() => {
|
|
11303
11449
|
/** @type {Record<string, () => Promise<import("vue").Component>>} */
|
|
11304
11450
|
const importMap = {
|
|
11305
|
-
.../* #__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')}),
|
|
11306
11452
|
.../* #__PURE__ */ Object.assign({}),
|
|
11307
11453
|
};
|
|
11308
11454
|
for (const key in importMap) {
|
|
@@ -11410,7 +11556,7 @@ const getWidgetDefinition = (config) => {
|
|
|
11410
11556
|
|
|
11411
11557
|
case "web-component":
|
|
11412
11558
|
importedWidget.component = defineAsyncComponent({
|
|
11413
|
-
loader: () => import('./DynamicWebComponent-
|
|
11559
|
+
loader: () => import('./DynamicWebComponent-BCwpocDX.js'),
|
|
11414
11560
|
suspensible: true,
|
|
11415
11561
|
});
|
|
11416
11562
|
importedWidget.props = reactive(config.widget);
|
|
@@ -11822,7 +11968,9 @@ const eodash = (
|
|
|
11822
11968
|
|
|
11823
11969
|
useURLSearchParametersSync();
|
|
11824
11970
|
|
|
11825
|
-
const theme = useUpdateTheme("dashboardTheme",
|
|
11971
|
+
const theme = useUpdateTheme("dashboardTheme", {
|
|
11972
|
+
...(eodash.brand?.theme ?? {}),
|
|
11973
|
+
});
|
|
11826
11974
|
theme.global.name.value = "dashboardTheme";
|
|
11827
11975
|
(
|
|
11828
11976
|
([__temp,__restore] = withAsyncContext(() => loadFont(
|
|
@@ -11844,15 +11992,15 @@ const { loadSTAC } = useSTAcStore();
|
|
|
11844
11992
|
const { smAndDown } = useDisplay();
|
|
11845
11993
|
const TemplateComponent = computed(() =>
|
|
11846
11994
|
smAndDown.value
|
|
11847
|
-
? defineAsyncComponent(() => import('./MobileLayout-
|
|
11848
|
-
: defineAsyncComponent(() => import('./DashboardLayout-
|
|
11995
|
+
? defineAsyncComponent(() => import('./MobileLayout-DRgyQYFz.js'))
|
|
11996
|
+
: defineAsyncComponent(() => import('./DashboardLayout-VrJIbhe8.js')),
|
|
11849
11997
|
);
|
|
11850
11998
|
|
|
11851
11999
|
const HeaderComponent = defineAsyncComponent(
|
|
11852
|
-
() => import('./Header-
|
|
12000
|
+
() => import('./Header-CTiEXLi0.js'),
|
|
11853
12001
|
);
|
|
11854
12002
|
const FooterComponent = defineAsyncComponent(
|
|
11855
|
-
() => import('./Footer-
|
|
12003
|
+
() => import('./Footer-DlIEbXp-.js'),
|
|
11856
12004
|
);
|
|
11857
12005
|
|
|
11858
12006
|
const templateHeight = props.isWebComponent ? "100%" : "100dvh";
|
|
@@ -12051,4 +12199,4 @@ function register() {
|
|
|
12051
12199
|
|
|
12052
12200
|
register();
|
|
12053
12201
|
|
|
12054
|
-
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 };
|