@eodash/eodash 5.1.0 → 5.3.0

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 (133) hide show
  1. package/core/client/components/DashboardLayout.vue +1 -2
  2. package/core/client/components/EodashOverlay.vue +4 -5
  3. package/core/client/components/MobileLayout.vue +42 -21
  4. package/core/client/composables/index.js +54 -60
  5. package/core/client/eodashSTAC/EodashCollection.js +199 -108
  6. package/core/client/eodashSTAC/auth.js +86 -0
  7. package/core/client/eodashSTAC/createLayers.js +234 -4
  8. package/core/client/eodashSTAC/helpers.js +281 -59
  9. package/core/client/eodashSTAC/parquet.js +0 -13
  10. package/core/client/eodashSTAC/triggers.js +1 -1
  11. package/core/client/store/actions.js +14 -0
  12. package/core/client/store/stac.js +46 -8
  13. package/core/client/store/states.js +6 -0
  14. package/core/client/types.ts +206 -3
  15. package/core/client/utils/bands-editor/arithmetic.js +144 -0
  16. package/core/client/utils/bands-editor/colors.js +36 -0
  17. package/core/client/utils/bands-editor/dom.js +196 -0
  18. package/core/client/utils/bands-editor/exampleSchema.json +1320 -0
  19. package/core/client/utils/bands-editor/index.js +68 -0
  20. package/core/client/utils/bands-editor/rgb.js +102 -0
  21. package/core/client/utils/index.js +5 -2
  22. package/core/client/views/Dashboard.vue +1 -1
  23. package/core/client/vite-env.d.ts +122 -0
  24. package/dist/client/{DashboardLayout-ByVs1DrY.js → DashboardLayout-Cq15p4TH.js} +5 -6
  25. package/dist/client/{DynamicWebComponent-C3W7HSQm.js → DynamicWebComponent-Cv-fPRG1.js} +1 -1
  26. package/dist/client/{EodashDatePicker-BIAf1sMT.js → EodashDatePicker-CPlJwEIO.js} +20 -22
  27. package/dist/client/{EodashItemFilter-DPznh8UB.js → EodashItemFilter-Ydebgbjj.js} +46 -31
  28. package/dist/client/EodashLayerControl-COhrkNEs.js +1517 -0
  29. package/dist/client/{EodashLayoutSwitcher-C5qTEffW.js → EodashLayoutSwitcher-pnKhTRZV.js} +4 -4
  30. package/dist/client/EodashMapBtns-Cj0Fx119.js +301 -0
  31. package/dist/client/{EodashStacInfo-CSvvF2jI.js → EodashStacInfo-Dadkg_Nj.js} +1 -1
  32. package/dist/client/EodashTimeSlider-CpoHX0S7.js +53 -0
  33. package/dist/client/{EodashTools-Cv1SXQ5y.js → EodashTools-UGBG7KC9.js} +10 -7
  34. package/dist/client/{ExportState-D-iuwaad.js → ExportState-GtJkAqeZ.js} +145 -121
  35. package/dist/client/{Footer-CyF0zRAk.js → Footer-D3ZPG5c4.js} +1 -1
  36. package/dist/client/{Header-CgD8jDKU.js → Header-z6AK-wpN.js} +2 -3
  37. package/dist/client/MobileLayout-BXNsNftb.js +118 -0
  38. package/dist/client/{PopUp-BsYLvWch.js → PopUp-BbQdjENV.js} +79 -44
  39. package/dist/client/{ProcessList-C2xsLU2_.js → ProcessList-C6VsdsYI.js} +18 -12
  40. package/dist/client/{VImg-OHe8YTs2.js → VImg-CxaMSB99.js} +203 -5
  41. package/dist/client/{VMain-PryTLU4a.js → VMain-Ds7yw0wj.js} +1 -1
  42. package/dist/client/{VTooltip-DZ0fjpB3.js → VTooltip-Cze6CEVh.js} +2 -3
  43. package/dist/client/{WidgetsContainer-B9LBadcC.js → WidgetsContainer-D66bj-JJ.js} +1 -1
  44. package/dist/client/asWebComponent-CWbNRdf9.js +8895 -0
  45. package/dist/client/{async-DkSu_u2K.js → async-BA7oWCMX.js} +69 -5
  46. package/dist/client/easing-CH0-9wR8.js +35 -0
  47. package/dist/client/eo-dash.js +1 -1
  48. package/dist/client/{VOverlay-yUn7p-Uf.js → forwardRefs-BUfxOIo-.js} +308 -28
  49. package/dist/client/{handling-CgmFXkW6.js → handling-DlNTtKB-.js} +27 -6
  50. package/dist/client/{helpers-Dy0Q13tP.js → helpers-CtE0W7iu.js} +595 -278
  51. package/dist/client/{index-skjhlH8u.js → index-CeEZIjO6.js} +26 -13
  52. package/dist/client/{index-Ch_HchK3.js → index-CsKbRDeN.js} +238 -77
  53. package/dist/client/{index-Dqj4tbx2.js → index-D4_NRKrf.js} +2 -2
  54. package/dist/client/index-DeECc3lV.js +571 -0
  55. package/dist/client/material-symbols-outlined.woff2 +0 -0
  56. package/dist/client/material-symbols-rounded.woff2 +0 -0
  57. package/dist/client/material-symbols-sharp.woff2 +0 -0
  58. package/dist/client/material-symbols-subset.woff2 +0 -0
  59. package/dist/client/templates.js +106 -49
  60. package/dist/client/{transition-C98Yn4Vo.js → transition-Byvp3L6Y.js} +1 -1
  61. package/dist/node/cli.js +6 -6
  62. package/dist/types/core/client/eodashSTAC/EodashCollection.d.ts +24 -10
  63. package/dist/types/core/client/eodashSTAC/auth.d.ts +7 -0
  64. package/dist/types/core/client/eodashSTAC/createLayers.d.ts +15 -3
  65. package/dist/types/core/client/eodashSTAC/helpers.d.ts +51 -15
  66. package/dist/types/core/client/plugins/vuetify.d.ts +14 -14
  67. package/dist/types/core/client/store/actions.d.ts +2 -0
  68. package/dist/types/core/client/store/stac.d.ts +16 -7
  69. package/dist/types/core/client/store/states.d.ts +4 -0
  70. package/dist/types/core/client/types.d.ts +171 -3
  71. package/dist/types/core/client/utils/bands-editor/arithmetic.d.ts +8 -0
  72. package/dist/types/core/client/utils/bands-editor/colors.d.ts +15 -0
  73. package/dist/types/core/client/utils/bands-editor/dom.d.ts +42 -0
  74. package/dist/types/core/client/utils/bands-editor/index.d.ts +20 -0
  75. package/dist/types/core/client/utils/bands-editor/rgb.d.ts +15 -0
  76. package/dist/types/core/client/utils/index.d.ts +1 -1
  77. package/dist/types/templates/baseConfig.d.ts +87 -1
  78. package/dist/types/templates/compare.d.ts +0 -25
  79. package/dist/types/templates/expert.d.ts +17 -21
  80. package/dist/types/templates/explore.d.ts +67 -0
  81. package/dist/types/templates/index.d.ts +1 -1
  82. package/dist/types/templates/{light.d.ts → lite.d.ts} +9 -0
  83. package/dist/types/widgets/EodashItemCatalog/index.vue.d.ts +21 -0
  84. package/dist/types/widgets/EodashItemCatalog/methods/filters.d.ts +49 -0
  85. package/dist/types/widgets/EodashItemCatalog/methods/handlers.d.ts +4 -0
  86. package/dist/types/widgets/EodashItemCatalog/methods/map.d.ts +12 -0
  87. package/dist/types/widgets/EodashItemCatalog/types.d.ts +14 -0
  88. package/dist/types/widgets/{EodashMapBtns.vue.d.ts → EodashMap/EodashMapBtns.vue.d.ts} +6 -0
  89. package/dist/types/widgets/EodashMap/index.vue.d.ts +114 -0
  90. package/dist/types/widgets/EodashMap/methods/create-layers-config.d.ts +1 -1
  91. package/dist/types/widgets/EodashMap/methods/index.d.ts +1 -1
  92. package/dist/types/widgets/EodashProcess/methods/async.d.ts +1 -0
  93. package/dist/types/widgets/EodashProcess/methods/custom-endpoints/layers/eoxhub-workspaces-endpoint.d.ts +1 -1
  94. package/dist/types/widgets/EodashTimeSlider.vue.d.ts +7 -0
  95. package/dist/types/widgets/EodashTools.vue.d.ts +10 -10
  96. package/dist/types/widgets/ExportState.vue.d.ts +2 -0
  97. package/package.json +31 -28
  98. package/templates/baseConfig.js +10 -5
  99. package/templates/compare.js +2 -22
  100. package/templates/expert.js +19 -18
  101. package/templates/explore.js +62 -0
  102. package/templates/index.js +1 -1
  103. package/templates/{light.js → lite.js} +11 -2
  104. package/widgets/EodashDatePicker.vue +15 -18
  105. package/widgets/EodashItemCatalog/index.vue +161 -0
  106. package/widgets/EodashItemCatalog/methods/filters.js +216 -0
  107. package/widgets/EodashItemCatalog/methods/handlers.js +50 -0
  108. package/widgets/EodashItemCatalog/methods/map.js +144 -0
  109. package/widgets/EodashItemCatalog/types.ts +15 -0
  110. package/widgets/EodashItemFilter.vue +35 -28
  111. package/widgets/EodashLayerControl.vue +10 -6
  112. package/widgets/EodashLayoutSwitcher.vue +1 -1
  113. package/widgets/EodashMap/EodashMapBtns.vue +278 -0
  114. package/widgets/EodashMap/index.vue +263 -38
  115. package/widgets/EodashMap/methods/create-layers-config.js +9 -6
  116. package/widgets/EodashMap/methods/index.js +27 -13
  117. package/widgets/EodashProcess/ProcessList.vue +13 -1
  118. package/widgets/EodashProcess/index.vue +17 -1
  119. package/widgets/EodashProcess/methods/async.js +22 -1
  120. package/widgets/EodashProcess/methods/custom-endpoints/chart/veda-endpoint.js +25 -3
  121. package/widgets/EodashProcess/methods/handling.js +2 -0
  122. package/widgets/EodashProcess/methods/outputs.js +1 -0
  123. package/widgets/EodashProcess/methods/utils.js +45 -1
  124. package/widgets/EodashTimeSlider.vue +40 -0
  125. package/widgets/EodashTools.vue +7 -3
  126. package/widgets/ExportState.vue +53 -22
  127. package/dist/client/EodashLayerControl-Bhxjw4V2.js +0 -154
  128. package/dist/client/EodashMapBtns-WoGq8MuV.js +0 -173
  129. package/dist/client/MobileLayout-EKQ_kpSh.js +0 -1226
  130. package/dist/client/asWebComponent-By_7_JjS.js +0 -19193
  131. package/dist/client/forwardRefs-BXxrv98s.js +0 -272
  132. package/dist/client/index-BuhOHXKv.js +0 -199
  133. package/widgets/EodashMapBtns.vue +0 -155
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Custom band combination editor interface for eox-jsonform
3
+ */
4
+ import { AbstractEditor } from "@json-editor/json-editor/src/editor";
5
+ import { generateBandColors } from "./colors";
6
+ import { buildRGBInterface } from "./rgb.js";
7
+ import { buildArithmeticInterface } from "./arithmetic.js";
8
+
9
+ export class BandsEditor extends AbstractEditor {
10
+ /** @type {Record<string, HTMLElement[]>} */
11
+ variableSlots = {};
12
+ /** @type {Record<string, string>} */
13
+ variableValues = {};
14
+ /** @type {string[]} */
15
+ bands = [];
16
+ /** @type {string[]} */
17
+ bandTitles = [];
18
+ /** @type {string[]} */
19
+ colors = [];
20
+
21
+ build() {
22
+ super.build();
23
+ // Determine the format type
24
+ const format = this.schema.format || "bands";
25
+
26
+ this.bands =
27
+ format === "bands" ? this.schema.items?.enum : this.schema.enum || [];
28
+ this.bandTitles =
29
+ format === "bands"
30
+ ? this.schema.items?.options?.enum_titles
31
+ : this.schema.options.enum_titles || this.bands;
32
+ this.colors = generateBandColors(this.schema, format);
33
+
34
+ // control
35
+ this.control = document.createElement("div");
36
+ this.control.classList.add("form-control");
37
+
38
+ if (format === "bands") {
39
+ buildRGBInterface(this, this.colors, this.bands, this.bandTitles);
40
+ } else if (format === "bands-arithmetic") {
41
+ buildArithmeticInterface(this, this.colors, this.bands, this.bandTitles);
42
+ }
43
+
44
+ // label
45
+ this.label = document.createElement("span");
46
+ this.label.classList.add("je-header");
47
+ this.label.textContent = this.schema.title ?? "";
48
+
49
+ // appends
50
+ this.container?.appendChild(this.label);
51
+ this.container?.appendChild(this.control);
52
+ }
53
+ }
54
+
55
+ export const bandsEditorInterface = [
56
+ {
57
+ type: "array",
58
+ format: "bands",
59
+ func: BandsEditor,
60
+ },
61
+ {
62
+ type: "string",
63
+ format: "bands-arithmetic",
64
+ func: BandsEditor,
65
+ },
66
+ ];
67
+
68
+ export default bandsEditorInterface;
@@ -0,0 +1,102 @@
1
+ import {
2
+ createSlotStyles,
3
+ createSlot,
4
+ fillSlotWithBand,
5
+ addDraggableBands,
6
+ } from "./dom";
7
+
8
+ /**
9
+ * Build the traditional RGB bands interface
10
+ * @param {import("./index.js").BandsEditor} editor - The editor instance
11
+ * @param {Array<string>} colors - Array of color strings
12
+ * @param {Array<string>} bands - Array of band identifiers
13
+ * @param {Array<string>} bandTitles - Array of band titles
14
+ */
15
+ export function buildRGBInterface(editor, colors, bands, bandTitles) {
16
+ // Use unified styles instead of creating separate styles
17
+ const style = createSlotStyles(bands, colors);
18
+ editor.control?.appendChild(style);
19
+
20
+ // Add draggable bands
21
+ addDraggableBands(editor, bands, bandTitles);
22
+
23
+ editor.control?.appendChild(document.createElement("hr"));
24
+
25
+ // Add RGB slots using unified slot system
26
+ addRGBSlots(editor, bands, bandTitles);
27
+ }
28
+
29
+ /**
30
+ * Add RGB slots for traditional bands interface using unified slot system
31
+ * @param {import("./index.js").BandsEditor} editor - The editor instance
32
+ * @param {Array<string>} bands - Array of band identifiers
33
+ * @param {Array<string>} bandTitles - Array of band titles
34
+ */
35
+ export function addRGBSlots(editor, bands, bandTitles) {
36
+ // Create a container for RGB slots
37
+ const rgbContainer = document.createElement("div");
38
+ rgbContainer.classList.add("slots-container");
39
+ ["R", "G", "B"].forEach((slot, index) => {
40
+ const onDrop = (/** @type {DragEvent} */ e) => {
41
+ e.preventDefault();
42
+ const enumValue = e.dataTransfer?.getData("band");
43
+ if (!enumValue) return;
44
+
45
+ const enumIndex = bands.indexOf(enumValue);
46
+ const title = bandTitles[enumIndex] || enumValue;
47
+
48
+ fillSlotWithBand(slotDiv, enumValue, title);
49
+ // Get current value as array or create new one
50
+ const currentValue = editor.getValue() || [];
51
+ currentValue[index] = enumValue;
52
+ editor.setValue(currentValue);
53
+ editor.onChange(true);
54
+ };
55
+
56
+ const slotDiv = createSlot(slot, onDrop);
57
+ addRGBSlotStyle(slotDiv);
58
+ rgbContainer.appendChild(slotDiv);
59
+
60
+ // Initialize with existing value
61
+ setTimeout(() => {
62
+ const currentValue = editor.getValue();
63
+ if (currentValue?.[index]) {
64
+ const enumValue = currentValue[index];
65
+ const enumIndex = bands.indexOf(enumValue);
66
+ const title = bandTitles[enumIndex] || enumValue;
67
+ if (enumValue) {
68
+ fillSlotWithBand(slotDiv, enumValue, title);
69
+ }
70
+ }
71
+ });
72
+ });
73
+
74
+ editor.control?.appendChild(rgbContainer);
75
+ }
76
+
77
+ /**
78
+ * Create specific styles for RGB slots
79
+ * @param {HTMLElement} rgbSlot - Array of RGB slot elements
80
+ */
81
+ function addRGBSlotStyle(rgbSlot) {
82
+ rgbSlot.style.border = "2px dashed";
83
+ switch (rgbSlot.dataset.slot) {
84
+ case "R": {
85
+ rgbSlot.style.borderColor = "#F88";
86
+ rgbSlot.style.background = "#FEE";
87
+ break;
88
+ }
89
+ case "G": {
90
+ rgbSlot.style.borderColor = "#8F8";
91
+ rgbSlot.style.background = "#EFE";
92
+ break;
93
+ }
94
+ case "B": {
95
+ rgbSlot.style.borderColor = "#88F";
96
+ rgbSlot.style.background = "#EEF";
97
+ break;
98
+ }
99
+ default:
100
+ break;
101
+ }
102
+ }
@@ -156,6 +156,8 @@ export const setCollectionsPalette = (colors) => {
156
156
  * @param {string} absoluteUrl - The absolute indicator URL
157
157
  * @param {import('@/eodashSTAC/EodashCollection').EodashCollection[]} eodashCollections - The array of existing eodash collections to be updated
158
158
  * @param {string[]} colorPalette - The color palette to assign to each collection
159
+ * @param {boolean} isAPI - Flag indicating if the collection is fetched from an API
160
+ * @param {string | null} rasterEndpoint - Optional raster endpoint URL
159
161
  * @async
160
162
  * @description This function extracts collection URLs from the indicator, fetches collection data,
161
163
  * processes parquet items if available, and updates the eodashCollections array with new collection data.
@@ -166,6 +168,8 @@ export const updateEodashCollections = async (
166
168
  selectedStac,
167
169
  absoluteUrl,
168
170
  colorPalette,
171
+ isAPI,
172
+ rasterEndpoint = null,
169
173
  ) => {
170
174
  // init eodash collections
171
175
  const collectionUrls = extractCollectionUrls(selectedStac, absoluteUrl);
@@ -173,11 +177,10 @@ export const updateEodashCollections = async (
173
177
  await Promise.all(
174
178
  collectionUrls.map((cu, idx) => {
175
179
  return new Promise((resolve, _reject) => {
176
- const ec = new EodashCollection(cu);
180
+ const ec = new EodashCollection(cu, isAPI, rasterEndpoint);
177
181
  ec.fetchCollection().then((col) => {
178
182
  // assign color from the palette
179
183
  ec.color = colorPalette[idx % colorPalette.length];
180
-
181
184
  const parquetAsset = Object.values(col.assets ?? {}).find(
182
185
  (asset) =>
183
186
  asset.type === "application/vnd.apache.parquet" &&
@@ -52,7 +52,7 @@ await loadFont(eodash?.brand?.font, props.isWebComponent);
52
52
 
53
53
  const { loadSTAC, init } = useSTAcStore();
54
54
  init(eodash.stacEndpoint);
55
- await loadSTAC(eodash.stacEndpoint);
55
+ await loadSTAC();
56
56
 
57
57
  const { smAndDown } = useDisplay();
58
58
 
@@ -30,3 +30,125 @@ declare module "@eox/ui/vuetify/blueprint.js" {
30
30
  const eox: Blueprint;
31
31
  export { eox };
32
32
  }
33
+
34
+ declare module "@json-editor/json-editor/src/editor" {
35
+ export class AbstractEditor {
36
+ schema: Record<string, any>;
37
+ active: boolean;
38
+ options: Record<string, any>;
39
+ formname: string;
40
+ path: string;
41
+ parent?: AbstractEditor;
42
+ container?: HTMLElement;
43
+ input?: HTMLElement;
44
+ label?: HTMLElement;
45
+ header?: HTMLElement;
46
+
47
+ constructor(
48
+ options: {
49
+ jsoneditor: any;
50
+ schema: Record<string, any>;
51
+ path?: string;
52
+ formname?: string;
53
+ parent?: AbstractEditor;
54
+ container?: HTMLElement;
55
+ },
56
+ defaults: any,
57
+ );
58
+
59
+ // Core lifecycle methods
60
+ build(): void;
61
+ preBuild(): void;
62
+ postBuild(): void;
63
+ destroy(): void;
64
+ register(): void;
65
+ unregister(): void;
66
+
67
+ // Event handling
68
+ onChildEditorChange(editor: AbstractEditor, eventData?: unknown): void;
69
+ notify(): void;
70
+ change(eventData?: unknown): void;
71
+ onChange(
72
+ bubble?: boolean,
73
+ fromTemplate?: boolean,
74
+ eventData?: unknown,
75
+ ): void;
76
+ onMove(): void;
77
+ onWatchedFieldChange(): void;
78
+
79
+ // Value management
80
+ setValue(value: unknown): void;
81
+ getValue(): any;
82
+ refreshValue(): void;
83
+ getDefault(): unknown;
84
+ applyConstFilter(value: unknown): unknown;
85
+
86
+ // State management
87
+ isActive(): boolean;
88
+ activate(): void;
89
+ deactivate(): void;
90
+ enable(): void;
91
+ disable(): void;
92
+ isEnabled(): boolean;
93
+ isRequired(): boolean;
94
+ isDefaultRequired(): boolean;
95
+
96
+ // Dependencies
97
+ registerDependencies(): void;
98
+ evaluateDependencies(): void;
99
+ checkDependency(path: string, choices: unknown): void;
100
+
101
+ // Container and UI
102
+ setContainer(container: HTMLElement): void;
103
+ setContainerAttributes(): void;
104
+ setOptInCheckbox(): void;
105
+ getNumColumns(): number;
106
+
107
+ // Watch functionality
108
+ setupWatchListeners(): void;
109
+ refreshWatchedFieldValues(): boolean;
110
+ getWatchedFieldValues(): Record<string, unknown>;
111
+
112
+ // Links
113
+ addLinks(): void;
114
+ addLink(link: HTMLElement): void;
115
+ getLink(data: {
116
+ href: string;
117
+ rel?: string;
118
+ mediaType?: string;
119
+ download?: boolean | string;
120
+ class?: string;
121
+ }): HTMLElement;
122
+
123
+ // UI helpers
124
+ getButton(
125
+ text: string,
126
+ icon?: string,
127
+ title?: string,
128
+ args?: unknown[],
129
+ ): HTMLElement;
130
+ setButtonText(
131
+ button: HTMLElement,
132
+ text: string,
133
+ icon?: string,
134
+ title?: string,
135
+ args?: unknown[],
136
+ ): HTMLElement;
137
+ updateHeaderText(): void;
138
+ getHeaderText(titleOnly?: boolean): string;
139
+ getTitle(): string;
140
+ cleanText(txt: string): string;
141
+
142
+ // Utility methods
143
+ getPathDepth(): number;
144
+ getChildEditors(): boolean | Record<string, AbstractEditor>;
145
+ getDisplayText(arr: unknown[]): string[];
146
+ getValidId(id?: string | number): string;
147
+ setInputAttributes(inputAttribute: string[], input?: HTMLElement): void;
148
+ expandCallbacks(
149
+ scope: string,
150
+ options: Record<string, unknown>,
151
+ ): Record<string, unknown>;
152
+ showValidationErrors(errors: unknown[]): void;
153
+ }
154
+ }
@@ -1,9 +1,9 @@
1
1
  import { createBlock, openBlock, withCtx, createElementVNode, unref, createElementBlock, createCommentVNode, normalizeStyle, Suspense, resolveDynamicComponent, mergeProps, Fragment, renderList, Transition } from 'vue';
2
2
  import '@eox/layout';
3
- import { _ as _export_sfc, F as useDefineTemplate } from './asWebComponent-By_7_JjS.js';
4
- import { V as VMain } from './VMain-PryTLU4a.js';
3
+ import { _ as _export_sfc, u as useDefineTemplate } from './asWebComponent-CWbNRdf9.js';
4
+ import { V as VMain } from './VMain-Ds7yw0wj.js';
5
5
 
6
- const _style_0 = ".panel[data-v-835b2a14]{position:relative;overflow:auto;z-index:1;pointer-events:none}.pointer[data-v-835b2a14]{pointer-events:all}.bg-panel[data-v-835b2a14]{z-index:0;border-radius:0!important}.fade-enter-active[data-v-835b2a14],.fade-leave-active[data-v-835b2a14]{transition:opacity .25s ease}.fade-enter-from[data-v-835b2a14],.fade-leave-to[data-v-835b2a14]{opacity:0}.bg-surface[data-v-835b2a14],.bg-primary[data-v-835b2a14]{backdrop-filter:blur(10px)!important;border-radius:8px;border:none;box-shadow:0 0 1px #18274b38,0 6px 12px -6px #18274b1f,0 8px 24px -4px #18274b14;max-height:100%;overflow:auto;scrollbar-color:rgba(var(--v-theme-on-surface),.2) transparent;scrollbar-width:thin}.bg-surface[data-v-835b2a14]{background-color:rgba(var(--v-theme-surface),var(--v-surface-opacity, .8))!important}.bg-primary[data-v-835b2a14]{background-color:rgba(var(--v-theme-primary),var(--v-primary-opacity, .8))!important}";
6
+ const _style_0 = ".panel[data-v-9c8477cc]{position:relative;overflow:auto;z-index:1;pointer-events:none}.pointer[data-v-9c8477cc]{pointer-events:all}.bg-panel[data-v-9c8477cc]{z-index:0;border-radius:0!important}.fade-enter-active[data-v-9c8477cc],.fade-leave-active[data-v-9c8477cc]{transition:opacity .25s ease}.fade-enter-from[data-v-9c8477cc],.fade-leave-to[data-v-9c8477cc]{opacity:0}.bg-surface[data-v-9c8477cc],.bg-primary[data-v-9c8477cc]{backdrop-filter:blur(10px)!important;border-radius:8px;border:none;box-shadow:0 0 1px #18274b38,0 6px 12px -6px #18274b1f,0 8px 24px -4px #18274b14;max-height:100%;overflow:auto;scrollbar-color:rgba(var(--v-theme-on-surface),.2) transparent;scrollbar-width:thin}.bg-surface[data-v-9c8477cc]{background-color:rgba(var(--v-theme-surface),var(--v-surface-opacity, .8))!important}.bg-primary[data-v-9c8477cc]{background-color:rgba(var(--v-theme-primary),var(--v-primary-opacity, .8))!important}";
7
7
 
8
8
  const _hoisted_1 = ["gap"];
9
9
  const _hoisted_2 = ["id", "h", "w", "x", "y"];
@@ -24,12 +24,11 @@ const layoutStyle = {
24
24
  return (_ctx, _cache) => {
25
25
 
26
26
 
27
- return (openBlock(), createBlock(VMain, null, {
27
+ return (openBlock(), createBlock(VMain, { class: "pa-0" }, {
28
28
  default: withCtx(() => [
29
29
  createElementVNode("eox-layout", {
30
30
  mediaBreakpoints: [0, 960, 1920],
31
31
  gap: unref(gap),
32
- class: "layout-container",
33
32
  style: layoutStyle
34
33
  }, [
35
34
  (unref(bgWidget)?.component)
@@ -90,6 +89,6 @@ return (_ctx, _cache) => {
90
89
  }
91
90
 
92
91
  };
93
- const DashboardLayout = /*#__PURE__*/_export_sfc(_sfc_main, [['styles',[_style_0]],['__scopeId',"data-v-835b2a14"]]);
92
+ const DashboardLayout = /*#__PURE__*/_export_sfc(_sfc_main, [['styles',[_style_0]],['__scopeId',"data-v-9c8477cc"]]);
94
93
 
95
94
  export { DashboardLayout as default };
@@ -1,5 +1,5 @@
1
1
  import { withAsyncContext, ref, onMounted, onUnmounted, createElementBlock, openBlock, createBlock, resolveDynamicComponent, mergeProps } from 'vue';
2
- import { Y as useSTAcStore } from './asWebComponent-By_7_JjS.js';
2
+ import { E as useSTAcStore } from './asWebComponent-CWbNRdf9.js';
3
3
 
4
4
  const _hoisted_1 = { class: "d-flex flex-column fill-height overflow-auto" };
5
5
 
@@ -1,13 +1,13 @@
1
1
  import { useCssVars, ref, useTemplateRef, customRef, computed, reactive, watch, onMounted, createElementBlock, openBlock, createVNode, unref, createSlots, withCtx, createElementVNode, withDirectives, createCommentVNode, createBlock, mergeProps, toHandlers } from 'vue';
2
2
  import { DatePicker } from 'v-calendar';
3
- import { _ as _export_sfc, r as useDisplay, Y as useSTAcStore, Z as useTransparentPanel, V as VBtn, v as VIcon, $ as eodashCollections, a0 as eodashCompareCollections } from './asWebComponent-By_7_JjS.js';
4
- import { x as datetime, k as getDatetimeProperty } from './helpers-Dy0Q13tP.js';
3
+ import { _ as _export_sfc, D as useDisplay, E as useSTAcStore, F as useTransparentPanel, G as VBtn, H as VIcon, I as eodashCollections, J as eodashCompareCollections } from './asWebComponent-CWbNRdf9.js';
4
+ import { A as datetime } from './helpers-CtE0W7iu.js';
5
5
  import { mdiRayEndArrow, mdiRayStartArrow } from '@mdi/js';
6
6
  import log from 'loglevel';
7
7
  import { storeToRefs } from 'pinia';
8
- import { T as Tooltip } from './index-Dqj4tbx2.js';
8
+ import { T as Tooltip } from './index-D4_NRKrf.js';
9
9
 
10
- const _style_0 = ".vc-popover-content{--vc-nav-hover-bg: rgba(var(--v-theme-on-surface), .1);--vc-nav-item-active-color: rgb(var(--v-theme-on-secondary));--vc-nav-item-active-bg: rgba(var(--v-theme-secondary), .8);--vc-focus-ring: 0 0 0 2px rgba(var(--v-theme-secondary), .5)}.vc-container{--vc-day-content-hover-bg: rgba(var(--v-theme-on-surface), .2);--vc-focus-ring: 0 0 0 2px rgba(var(--v-theme-secondary), .4);--vc-header-arrow-hover-bg: rgba(var(--v-theme-secondary), .1)}.vc-attr{--vc-accent-600: rgba(var(--v-theme-secondary), .8)}.datePicker{--vc-day-content-hover-bg: red}@media (min-width: 960px){.datePicker{position:absolute;bottom:0;left:0;right:0;margin-inline:auto;width:fit-content}}.vc-day-content{color:#5e5e5e;font-weight:400}.vc-highlight-content-solid{color:#fff!important}.vc-popover-content-wrapper{transform:var(--254ea936)!important}.vc-date-picker-content,.datePicker{backdrop-filter:blur(10px)!important;border-radius:8px;border:none;box-shadow:0 0 1px #18274b38,0 6px 12px -6px #18274b1f,0 8px 24px -4px #18274b14;background-color:rgba(var(--v-theme-surface),var(--v-surface-opacity, .8))!important}.vc-popover-caret.direction-top.align-left{clip-path:polygon(0% 0%,100% 0%,0% 100%,0% 100%)}.vc-bordered{border:none}";
10
+ const _style_0 = ".vc-popover-content{--vc-nav-hover-bg: rgba(var(--v-theme-on-surface), .1);--vc-nav-item-active-color: rgb(var(--v-theme-on-secondary));--vc-nav-item-active-bg: rgba(var(--v-theme-secondary), .8);--vc-focus-ring: 0 0 0 2px rgba(var(--v-theme-secondary), .5)}.vc-container{--vc-day-content-hover-bg: rgba(var(--v-theme-on-surface), .2);--vc-focus-ring: 0 0 0 2px rgba(var(--v-theme-secondary), .4);--vc-header-arrow-hover-bg: rgba(var(--v-theme-secondary), .1)}.vc-attr{--vc-accent-600: rgba(var(--v-theme-secondary), .8)}.datePicker{--vc-day-content-hover-bg: red}@media (min-width: 960px){.datePicker{position:absolute;bottom:0;left:0;right:0;margin-inline:auto;width:fit-content}}.vc-day-content{color:#5e5e5e;font-weight:400}.vc-highlight-content-solid{color:#fff!important}.vc-popover-content-wrapper{transform:var(--v5270a4d4)!important}.vc-date-picker-content,.datePicker{backdrop-filter:blur(10px)!important;border-radius:8px;border:none;box-shadow:0 0 1px #18274b38,0 6px 12px -6px #18274b1f,0 8px 24px -4px #18274b14;background-color:rgba(var(--v-theme-surface),var(--v-surface-opacity, .8))!important}.vc-popover-caret.direction-top.align-left{clip-path:polygon(0% 0%,100% 0%,0% 100%,0% 100%)}.vc-bordered{border:none}";
11
11
 
12
12
  const _hoisted_1 = {
13
13
  ref: "rootRef",
@@ -56,7 +56,7 @@ const _sfc_main = {
56
56
  setup(__props) {
57
57
 
58
58
  useCssVars(_ctx => ({
59
- "254ea936": (transform.value)
59
+ "v5270a4d4": (transform.value)
60
60
  }));
61
61
 
62
62
  const { lgAndDown } = useDisplay();
@@ -76,6 +76,13 @@ const currentDate = customRef((track, trigger) => ({
76
76
  trigger();
77
77
  log.debug("Datepicker setting currentDate", datetime.value);
78
78
  const date = new Date(num);
79
+
80
+ // Validate the date before setting
81
+ if (isNaN(date.getTime())) {
82
+ log.warn("Invalid date value provided to datepicker:", num);
83
+ return;
84
+ }
85
+
79
86
  datetime.value = date.toISOString();
80
87
  //@ts-expect-error supports move method https://vcalendar.io/datepicker/basics.html#basics
81
88
  datePickerEl.value?.move({
@@ -157,24 +164,15 @@ async function fetchCollectionsAttributes(eodashCollections) {
157
164
 
158
165
  return await Promise.all(
159
166
  eodashCollections.map((ec, idx) => {
160
- return ec.fetchCollection().then(() => {
161
- const dateProperty = getDatetimeProperty(ec.getItems());
162
- if (!dateProperty) {
163
- return [];
167
+ return ec.fetchCollection().then(async () => {
168
+ const dates = await ec.getDates();
169
+ if (!dates || !dates.length) {
170
+ log.debug(
171
+ `Collection ${ec.collectionStac?.id} has no dates, skipping datepicker attribute`,
172
+ );
173
+ return undefined;
164
174
  }
165
- const dates = [
166
- ...new Set(
167
- ec.getItems()?.reduce((valid, item) => {
168
- const parsed = Date.parse(
169
- /** @type {string} */ (item[dateProperty]),
170
- );
171
- if (parsed) {
172
- valid.push(new Date(parsed));
173
- }
174
- return valid;
175
- }, /** @type {Date[]} */ ([])),
176
- ),
177
- ];
175
+
178
176
  return {
179
177
  key: "id-" + idx.toString() + Math.random().toString(16).slice(2),
180
178
  dot: {
@@ -1,8 +1,7 @@
1
- import { computed, ref, createElementBlock, openBlock, mergeProps, unref, createElementVNode, toDisplayString } from 'vue';
2
- import { _ as _export_sfc, Y as useSTAcStore, a5 as isFirstLoad } from './asWebComponent-By_7_JjS.js';
3
- import '@eox/itemfilter';
1
+ import { withAsyncContext, computed, ref, createElementBlock, openBlock, mergeProps, unref, createElementVNode, toDisplayString } from 'vue';
2
+ import { _ as _export_sfc, E as useSTAcStore, Q as isFirstLoad } from './asWebComponent-CWbNRdf9.js';
4
3
 
5
- const _style_0 = "eox-itemfilter[data-v-1be0ec61]{--form-flex-direction: row}@media (max-width: 768px){eox-itemfilter[data-v-1be0ec61]{--form-flex-direction: column}}";
4
+ const _style_0 = "eox-itemfilter[data-v-88d0abc7]{--form-flex-direction: row}@media (max-width: 768px){eox-itemfilter[data-v-88d0abc7]{--form-flex-direction: column}}";
6
5
 
7
6
  const _hoisted_1 = [".items"];
8
7
  const _hoisted_2 = {
@@ -83,38 +82,55 @@ const _sfc_main = {
83
82
  },
84
83
  },
85
84
  emits: ["select"],
86
- setup(__props, { emit: __emit }) {
85
+ async setup(__props, { emit: __emit }) {
86
+
87
+ let __temp, __restore;
88
+
89
+ if (!customElements.get("eox-itemfilter")) {
90
+ (
91
+ ([__temp,__restore] = withAsyncContext(() => import('@eox/itemfilter'))),
92
+ await __temp,
93
+ __restore()
94
+ );
95
+ }
87
96
 
88
97
  const store = useSTAcStore();
89
98
  const emit = __emit;
90
-
99
+ const items = store.isApi
100
+ ? store.stac
101
+ : store.stac?.filter((item) => item.rel === "child");
91
102
  const props = __props;
92
103
  /**
93
- * @param {import("stac-ts").StacLink} item
104
+ *
105
+ * @param {Function} loader Function to load the item
106
+ * @param {Function} reset Function to reset the selection
94
107
  */
95
- const selectIndicator = async (item) => {
96
- if (item) {
97
- if (isFirstLoad.value) {
98
- // prevent the map from jumping to the initial position
99
- isFirstLoad.value = false;
108
+ const createSelect = (loader, reset) => {
109
+ /**
110
+ * @param {import("stac-ts").StacLink | import("stac-ts").StacCollection} item
111
+ */
112
+ return async (item) => {
113
+ if (item) {
114
+ if (isFirstLoad.value) {
115
+ // prevent the map from jumping to the initial position
116
+ isFirstLoad.value = false;
117
+ }
118
+ const href = /** @type {string} */ (store.isApi ? item.id : item.href);
119
+ await loader(href);
120
+ emit("select", item);
121
+ } else {
122
+ reset();
100
123
  }
101
- await store.loadSelectedSTAC(item.href);
102
- emit("select", item);
103
- } else {
104
- store.selectedStac = null;
105
- }
106
- };
107
- /**
108
- * @param {import("stac-ts").StacLink} item
109
- */
110
- const selectCompareIndicator = (item) => {
111
- if (item) {
112
- store.loadSelectedCompareSTAC(item.href);
113
- emit("select", item);
114
- } else {
115
- store.resetSelectedCompareSTAC();
116
- }
124
+ };
117
125
  };
126
+ const selectIndicator = createSelect(
127
+ store.loadSelectedSTAC,
128
+ () => (store.selectedStac = null),
129
+ );
130
+ const selectCompareIndicator = createSelect(
131
+ store.loadSelectedCompareSTAC,
132
+ store.resetSelectedCompareSTAC,
133
+ );
118
134
  /** @param {any} evt*/
119
135
  const onSelect = async (evt) => {
120
136
  const item = /** @type {import('stac-ts').StacLink} */ evt.detail;
@@ -124,7 +140,6 @@ const onSelect = async (evt) => {
124
140
  selectIndicator(item);
125
141
  }
126
142
  };
127
-
128
143
  const config = computed(() => ({
129
144
  titleProperty: props.titleProperty,
130
145
  enableHighlighting: props.enableHighlighting,
@@ -147,7 +162,7 @@ return (_ctx, _cache) => {
147
162
  ref: eoxItemFilter,
148
163
  style: {"overflow":"auto","--background-color":"none"},
149
164
  onSelect: onSelect,
150
- ".items": unref(store).stac?.filter((item) => item.rel === 'child')
165
+ ".items": unref(items)
151
166
  }), [
152
167
  createElementVNode("h4", _hoisted_2, toDisplayString(__props.filtersTitle), 1 /* TEXT */),
153
168
  createElementVNode("h4", _hoisted_3, toDisplayString(__props.resultsTitle), 1 /* TEXT */)
@@ -156,6 +171,6 @@ return (_ctx, _cache) => {
156
171
  }
157
172
 
158
173
  };
159
- const EodashItemFilter = /*#__PURE__*/_export_sfc(_sfc_main, [['styles',[_style_0]],['__scopeId',"data-v-1be0ec61"]]);
174
+ const EodashItemFilter = /*#__PURE__*/_export_sfc(_sfc_main, [['styles',[_style_0]],['__scopeId',"data-v-88d0abc7"]]);
160
175
 
161
176
  export { EodashItemFilter as default };