@eodash/eodash 5.0.0-rc.1.6 → 5.0.0-rc.2.1

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.
Files changed (56) hide show
  1. package/core/client/composables/EodashMap.js +30 -25
  2. package/core/client/composables/EodashProcess.js +1 -1
  3. package/core/client/composables/index.js +8 -1
  4. package/core/client/eodash.js +14 -1
  5. package/core/client/eodashSTAC/EodashCollection.js +9 -5
  6. package/core/client/eodashSTAC/createLayers.js +1 -1
  7. package/core/client/eodashSTAC/helpers.js +10 -2
  8. package/core/client/eodashSTAC/triggers.js +56 -1
  9. package/core/client/store/stac.js +7 -2
  10. package/core/client/types.ts +3 -1
  11. package/core/client/utils/index.js +12 -0
  12. package/core/client/utils/states.js +16 -2
  13. package/core/client/views/Dashboard.vue +3 -1
  14. package/dist/client/{DashboardLayout-SZfMDUoR.js → DashboardLayout-BjUs7mYs.js} +2 -2
  15. package/dist/client/{DynamicWebComponent-I9gzMY0L.js → DynamicWebComponent-rIFx5c0f.js} +1 -1
  16. package/dist/client/{EodashDatePicker-B9_u6TTm.js → EodashDatePicker-brJlj1aQ.js} +60 -35
  17. package/dist/client/{EodashItemFilter-G7YsYO3B.js → EodashItemFilter-C2i4lnM1.js} +1 -1
  18. package/dist/client/{EodashLayerControl-CJ94ul63.js → EodashLayerControl-DNQzPQQ4.js} +1 -1
  19. package/dist/client/{EodashLayoutSwitcher-DRKm8A8U.js → EodashLayoutSwitcher-gLe7G8Qn.js} +2 -2
  20. package/dist/client/{EodashMap-Dp44Ajbi.js → EodashMap-LOzTlvrM.js} +50 -72
  21. package/dist/client/{EodashMapBtns-BlPFwhPc.js → EodashMapBtns-UXOupU5J.js} +4 -4
  22. package/dist/client/{EodashProcess-BLmIgUGT.js → EodashProcess-BlkqUdzj.js} +33 -11
  23. package/dist/client/{EodashStacInfo-BIRcfcMo.js → EodashStacInfo-Df3LXKAw.js} +1 -1
  24. package/dist/client/{EodashTools-PNfJ-Cw3.js → EodashTools-BrqH4IDP.js} +4 -4
  25. package/dist/client/{ExportState-5JyTshJH.js → ExportState-DVosrSNY.js} +4 -4
  26. package/dist/client/{Footer-CM9hgdQP.js → Footer-tjsscQ7O.js} +1 -1
  27. package/dist/client/{Header-BTq4DW1x.js → Header-DYMnh4of.js} +3 -3
  28. package/dist/client/{MobileLayout-Atfoxf8d.js → MobileLayout-Df4Z1bMl.js} +17 -7
  29. package/dist/client/{PopUp-Bmfn3N_4.js → PopUp-BFcSuX3b.js} +3 -3
  30. package/dist/client/{VImg-CUF4S39i.js → VImg-BO2Ysvsu.js} +2 -2
  31. package/dist/client/{VMain-CQpXnzDR.js → VMain-fx1gaM7Y.js} +1 -1
  32. package/dist/client/{VOverlay-DUnITwM1.js → VOverlay-CiQn3F6n.js} +3 -3
  33. package/dist/client/{VTooltip-BYTlbKer.js → VTooltip-DKOCofTl.js} +3 -3
  34. package/dist/client/{WidgetsContainer-BPbgxdb0.js → WidgetsContainer-DL0bdnjh.js} +1 -1
  35. package/dist/client/{asWebComponent-DW1XzZkL.js → asWebComponent-N7ChSAQG.js} +306 -154
  36. package/dist/client/eo-dash.css +1 -1
  37. package/dist/client/eo-dash.js +1 -1
  38. package/dist/client/{forwardRefs-gx1Fzngc.js → forwardRefs-C2UOEnvr.js} +1 -1
  39. package/dist/client/{index-DvFppNyk.js → index-BXi80Gr9.js} +1 -1
  40. package/dist/client/{transition-j2eWJYMg.js → transition-w_2EtUxa.js} +1 -1
  41. package/dist/node/cli.js +2 -2
  42. package/dist/types/core/client/composables/EodashMap.d.ts +2 -2
  43. package/dist/types/core/client/composables/index.d.ts +1 -1
  44. package/dist/types/core/client/eodashSTAC/EodashCollection.d.ts +2 -0
  45. package/dist/types/core/client/eodashSTAC/helpers.d.ts +4 -2
  46. package/dist/types/core/client/eodashSTAC/triggers.d.ts +6 -0
  47. package/dist/types/core/client/types.d.ts +3 -1
  48. package/dist/types/core/client/utils/index.d.ts +1 -0
  49. package/dist/types/core/client/utils/states.d.ts +8 -1
  50. package/dist/types/widgets/EodashDatePicker.vue.d.ts +455 -0
  51. package/dist/types/widgets/EodashMap.vue.d.ts +2 -0
  52. package/dist/types/widgets/EodashProcess.vue.d.ts +1 -0
  53. package/package.json +19 -19
  54. package/widgets/EodashDatePicker.vue +51 -17
  55. package/widgets/EodashMap.vue +14 -2
  56. 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.6";
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
- /** @type {import("vue").Ref<Record<string,any>|undefined>} */
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("vuetify").ThemeDefinition} [themeDefinition={}] - New
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,181 @@ 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 =
8033
+ /** @type {import("ol/layer").Vector} */ (
8034
+ olLayer
8035
+ //@ts-expect-error variables doesn't exist in non-flat style
8036
+ ).getStyle?.()?.variables ??
8037
+ //@ts-expect-error (styleVariables_ is a private property)
8038
+ /** @type {import("ol/layer").WebGLTile} */ (olLayer).styleVariables_;
8039
+
8040
+ if (!oldVariablesState) {
8041
+ return variables;
8042
+ }
8043
+ const styleVariablesKeys = Object.keys(variables);
8044
+ const matchingKeys =
8045
+ Object.keys(oldVariablesState).every((key) =>
8046
+ styleVariablesKeys.includes(key),
8047
+ ) &&
8048
+ styleVariablesKeys.every((key) =>
8049
+ Object.keys(oldVariablesState).includes(key),
8050
+ );
8051
+ return matchingKeys ? oldVariablesState : variables;
8052
+ }
8053
+
7784
8054
  /** @param {import("stac-ts").StacLink[]} [links] */
7785
8055
  function generateFeatures(links) {
7786
8056
  /**
@@ -7818,12 +8088,19 @@ function generateFeatures(links) {
7818
8088
  /**
7819
8089
  * Sperates and extracts layerConfig (jsonform schema & legend) from a style json
7820
8090
  *
7821
- * @param { import("@/types").EodashStyleJson} [style] */
7822
- function extractLayerConfig(style) {
8091
+ * @param {string} collectionId
8092
+ * @param { import("@/types").EodashStyleJson} [style]
8093
+ * */
8094
+ function extractLayerConfig(collectionId, style) {
7823
8095
  if (!style) {
7824
8096
  return { layerConfig: undefined, style: undefined };
7825
8097
  }
7826
8098
  style = { ...style };
8099
+
8100
+ if (Object.keys(style.variables ?? {}).length) {
8101
+ style.variables = getStyleVariablesState(collectionId, style.variables);
8102
+ }
8103
+
7827
8104
  /** @type {Record<string,unknown> | undefined} */
7828
8105
  let layerConfig = undefined;
7829
8106
 
@@ -8160,86 +8437,6 @@ async function mergeGeojsons(geojsonUrls) {
8160
8437
  );
8161
8438
  }
8162
8439
 
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
8440
  /**
8244
8441
  * @param {string} collectionId
8245
8442
  * @param {string} title
@@ -8313,7 +8510,7 @@ async function createLayersFromAssets(
8313
8510
  {
8314
8511
  type: "select",
8315
8512
  options: {
8316
- id: "selectInteraction",
8513
+ id: (Math.random() * 10000).toFixed() + "_selectInteraction",
8317
8514
  condition: "pointermove",
8318
8515
  style: {
8319
8516
  "stroke-color": "#335267",
@@ -8615,9 +8812,12 @@ class EodashCollection {
8615
8812
  */
8616
8813
  selectedItem;
8617
8814
 
8618
- /** @type {import("@/types").EodashStyleJson["tooltip"]} */
8815
+ /** @type {Exclude<import("@/types").EodashStyleJson["tooltip"],undefined>} */
8619
8816
  #tooltipProperties = [];
8620
8817
 
8818
+ /** @type {string | undefined} */
8819
+ color;
8820
+
8621
8821
  // read only
8622
8822
  get collectionStac() {
8623
8823
  return this.#collectionStac;
@@ -8732,6 +8932,7 @@ class EodashCollection {
8732
8932
  // less control.
8733
8933
 
8734
8934
  let { layerConfig, style } = extractLayerConfig(
8935
+ this.#collectionStac?.id ?? "",
8735
8936
  await fetchStyle(item, itemUrl),
8736
8937
  );
8737
8938
 
@@ -8766,6 +8967,10 @@ class EodashCollection {
8766
8967
  layerLegend: this.#collectionStac["eox:colorlegend"],
8767
8968
  };
8768
8969
  }
8970
+ extraProperties = {
8971
+ ...extraProperties,
8972
+ ...(this.color && { color: this.color }),
8973
+ };
8769
8974
  const links = await createLayersFromLinks(
8770
8975
  this.#collectionStac?.id ?? "",
8771
8976
  title,
@@ -8958,7 +9163,6 @@ class EodashCollection {
8958
9163
  indicator?.title || indicator.id,
8959
9164
  //@ts-expect-error indicator instead of item
8960
9165
  indicator,
8961
- // layerDatetime,
8962
9166
  )),
8963
9167
  ...(await createLayersFromAssets(
8964
9168
  indicator?.id ?? "",
@@ -8966,9 +9170,6 @@ class EodashCollection {
8966
9170
  indicatorAssets,
8967
9171
  //@ts-expect-error indicator instead of item
8968
9172
  indicator,
8969
- // style,
8970
- // layerConfig,
8971
- // layerDatetime,
8972
9173
  )),
8973
9174
  ];
8974
9175
  }
@@ -9114,9 +9315,10 @@ const useSTAcStore = defineStore("stac", () => {
9114
9315
  );
9115
9316
 
9116
9317
  await Promise.all(
9117
- collectionUrls.map((cu) => {
9318
+ collectionUrls.map((cu, idx) => {
9118
9319
  const ec = new EodashCollection(cu);
9119
9320
  ec.fetchCollection();
9321
+ ec.color = collectionsPalette[idx % collectionsPalette.length];
9120
9322
  return ec;
9121
9323
  }),
9122
9324
  ).then((collections) => {
@@ -9256,58 +9458,6 @@ const useEodashRuntime = async (runtimeConfig) => {
9256
9458
  return eodash;
9257
9459
  };
9258
9460
 
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
9461
  const _export_sfc = (sfc, props) => {
9312
9462
  const target = sfc.__vccOpts || sfc;
9313
9463
  for (const [key, val] of props) {
@@ -10348,7 +10498,7 @@ const VProgressLinear = genericComponent()({
10348
10498
  "aria-hidden": props.active ? 'false' : 'true',
10349
10499
  "aria-valuemin": "0",
10350
10500
  "aria-valuemax": props.max,
10351
- "aria-valuenow": props.indeterminate ? undefined : normalizedValue.value,
10501
+ "aria-valuenow": props.indeterminate ? undefined : Math.min(parseFloat(progress.value), max.value),
10352
10502
  "onClick": props.clickable && handleClick
10353
10503
  }, {
10354
10504
  default: () => [props.stream && createVNode("div", {
@@ -11302,7 +11452,7 @@ const ErrorAlert = /*#__PURE__*/_export_sfc(_sfc_main$3, [['__scopeId',"data-v-a
11302
11452
  const internalWidgets = (() => {
11303
11453
  /** @type {Record<string, () => Promise<import("vue").Component>>} */
11304
11454
  const importMap = {
11305
- .../* #__PURE__ */ Object.assign({"/widgets/EodashDatePicker.vue": () => import('./EodashDatePicker-B9_u6TTm.js'),"/widgets/EodashItemFilter.vue": () => import('./EodashItemFilter-G7YsYO3B.js'),"/widgets/EodashLayerControl.vue": () => import('./EodashLayerControl-CJ94ul63.js'),"/widgets/EodashLayoutSwitcher.vue": () => import('./EodashLayoutSwitcher-DRKm8A8U.js'),"/widgets/EodashMap.vue": () => import('./EodashMap-Dp44Ajbi.js'),"/widgets/EodashMapBtns.vue": () => import('./EodashMapBtns-BlPFwhPc.js'),"/widgets/EodashProcess.vue": () => import('./EodashProcess-BLmIgUGT.js'),"/widgets/EodashStacInfo.vue": () => import('./EodashStacInfo-BIRcfcMo.js'),"/widgets/EodashTools.vue": () => import('./EodashTools-PNfJ-Cw3.js'),"/widgets/ExportState.vue": () => import('./ExportState-5JyTshJH.js'),"/widgets/PopUp.vue": () => import('./PopUp-Bmfn3N_4.js'),"/widgets/WidgetsContainer.vue": () => import('./WidgetsContainer-BPbgxdb0.js')}),
11455
+ .../* #__PURE__ */ Object.assign({"/widgets/EodashDatePicker.vue": () => import('./EodashDatePicker-brJlj1aQ.js'),"/widgets/EodashItemFilter.vue": () => import('./EodashItemFilter-C2i4lnM1.js'),"/widgets/EodashLayerControl.vue": () => import('./EodashLayerControl-DNQzPQQ4.js'),"/widgets/EodashLayoutSwitcher.vue": () => import('./EodashLayoutSwitcher-gLe7G8Qn.js'),"/widgets/EodashMap.vue": () => import('./EodashMap-LOzTlvrM.js'),"/widgets/EodashMapBtns.vue": () => import('./EodashMapBtns-UXOupU5J.js'),"/widgets/EodashProcess.vue": () => import('./EodashProcess-BlkqUdzj.js'),"/widgets/EodashStacInfo.vue": () => import('./EodashStacInfo-Df3LXKAw.js'),"/widgets/EodashTools.vue": () => import('./EodashTools-BrqH4IDP.js'),"/widgets/ExportState.vue": () => import('./ExportState-DVosrSNY.js'),"/widgets/PopUp.vue": () => import('./PopUp-BFcSuX3b.js'),"/widgets/WidgetsContainer.vue": () => import('./WidgetsContainer-DL0bdnjh.js')}),
11306
11456
  .../* #__PURE__ */ Object.assign({}),
11307
11457
  };
11308
11458
  for (const key in importMap) {
@@ -11410,7 +11560,7 @@ const getWidgetDefinition = (config) => {
11410
11560
 
11411
11561
  case "web-component":
11412
11562
  importedWidget.component = defineAsyncComponent({
11413
- loader: () => import('./DynamicWebComponent-I9gzMY0L.js'),
11563
+ loader: () => import('./DynamicWebComponent-rIFx5c0f.js'),
11414
11564
  suspensible: true,
11415
11565
  });
11416
11566
  importedWidget.props = reactive(config.widget);
@@ -11822,7 +11972,9 @@ const eodash = (
11822
11972
 
11823
11973
  useURLSearchParametersSync();
11824
11974
 
11825
- const theme = useUpdateTheme("dashboardTheme", eodash.brand?.theme);
11975
+ const theme = useUpdateTheme("dashboardTheme", {
11976
+ ...(eodash.brand?.theme ?? {}),
11977
+ });
11826
11978
  theme.global.name.value = "dashboardTheme";
11827
11979
  (
11828
11980
  ([__temp,__restore] = withAsyncContext(() => loadFont(
@@ -11844,15 +11996,15 @@ const { loadSTAC } = useSTAcStore();
11844
11996
  const { smAndDown } = useDisplay();
11845
11997
  const TemplateComponent = computed(() =>
11846
11998
  smAndDown.value
11847
- ? defineAsyncComponent(() => import('./MobileLayout-Atfoxf8d.js'))
11848
- : defineAsyncComponent(() => import('./DashboardLayout-SZfMDUoR.js')),
11999
+ ? defineAsyncComponent(() => import('./MobileLayout-Df4Z1bMl.js'))
12000
+ : defineAsyncComponent(() => import('./DashboardLayout-BjUs7mYs.js')),
11849
12001
  );
11850
12002
 
11851
12003
  const HeaderComponent = defineAsyncComponent(
11852
- () => import('./Header-BTq4DW1x.js'),
12004
+ () => import('./Header-DYMnh4of.js'),
11853
12005
  );
11854
12006
  const FooterComponent = defineAsyncComponent(
11855
- () => import('./Footer-CM9hgdQP.js'),
12007
+ () => import('./Footer-tjsscQ7O.js'),
11856
12008
  );
11857
12009
 
11858
12010
  const templateHeight = props.isWebComponent ? "100%" : "100dvh";
@@ -12051,4 +12203,4 @@ function register() {
12051
12203
 
12052
12204
  register();
12053
12205
 
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, makePanelTransparent as a1, mapCompareEl as a2, mapEl as a3, eodashCompareCollections as a4, layerControlFormValue as a5, getColFromLayer as a6, registerProjection as a7, getProjectionCode as a8, availableMapProjection 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, changeMapProjection as aa, eoxLayersKey as ab, posIsSetFromUrl as ac, useOnLayersUpdate as ad, EodashCollection as ae, mapPosition 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 };
12206
+ 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 };