@eodash/eodash 5.2.0 → 5.3.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.
- package/core/client/components/DashboardLayout.vue +0 -1
- package/core/client/composables/index.js +53 -59
- package/core/client/eodashSTAC/EodashCollection.js +196 -94
- package/core/client/eodashSTAC/auth.js +86 -0
- package/core/client/eodashSTAC/createLayers.js +204 -4
- package/core/client/eodashSTAC/helpers.js +254 -62
- package/core/client/eodashSTAC/parquet.js +0 -13
- package/core/client/eodashSTAC/triggers.js +1 -1
- package/core/client/store/actions.js +14 -0
- package/core/client/store/stac.js +46 -8
- package/core/client/store/states.js +6 -0
- package/core/client/types.ts +206 -3
- package/core/client/utils/bands-editor/arithmetic.js +144 -0
- package/core/client/utils/bands-editor/colors.js +36 -0
- package/core/client/utils/bands-editor/dom.js +196 -0
- package/core/client/utils/bands-editor/exampleSchema.json +1320 -0
- package/core/client/utils/bands-editor/index.js +68 -0
- package/core/client/utils/bands-editor/rgb.js +102 -0
- package/core/client/utils/index.js +5 -2
- package/core/client/views/Dashboard.vue +1 -1
- package/core/client/vite-env.d.ts +122 -0
- package/dist/client/{DashboardLayout-Dq9Kfe6O.js → DashboardLayout-BAstYnhU.js} +4 -5
- package/dist/client/{DynamicWebComponent-DCBMXskE.js → DynamicWebComponent-7v4_DFqP.js} +1 -1
- package/dist/client/{EodashDatePicker-DtngxU6s.js → EodashDatePicker-IVHLv9UN.js} +20 -22
- package/dist/client/{EodashItemFilter-ClQebJQt.js → EodashItemFilter-BPMpnXjo.js} +46 -31
- package/dist/client/EodashLayerControl-CSnQh2tb.js +1517 -0
- package/dist/client/{EodashLayoutSwitcher-DQ8SfVDd.js → EodashLayoutSwitcher-CPpGM8Pb.js} +4 -4
- package/dist/client/EodashMapBtns-C_jyUJ2x.js +301 -0
- package/dist/client/{EodashStacInfo-Dt1nF06x.js → EodashStacInfo-DjuWc0Iz.js} +1 -1
- package/dist/client/EodashTimeSlider-CDh9Lf02.js +53 -0
- package/dist/client/{EodashTools-DV5ykmWc.js → EodashTools-DSvDUUlL.js} +10 -7
- package/dist/client/{ExportState-B6zZQUmE.js → ExportState-BhjxS0jG.js} +145 -120
- package/dist/client/{Footer-DNhXs8k6.js → Footer-C3PPcdjv.js} +1 -1
- package/dist/client/{Header-BjhN5JY4.js → Header-E5NbT7HE.js} +2 -2
- package/dist/client/MobileLayout-DY7OHr1k.js +118 -0
- package/dist/client/{PopUp-CgpvNr3o.js → PopUp-CSPXdqKI.js} +79 -43
- package/dist/client/{ProcessList-vecpxThi.js → ProcessList-C3HV7G0b.js} +5 -6
- package/dist/client/{VImg-CETuikH2.js → VImg-FoXcOnWF.js} +6 -3
- package/dist/client/{VMain-Ci9DyaGU.js → VMain-Ck2g1QOG.js} +1 -1
- package/dist/client/{VTooltip-J4ac48X7.js → VTooltip-F_1Zcvhp.js} +2 -2
- package/dist/client/{WidgetsContainer-CCML4TyV.js → WidgetsContainer-Cq9uZEuN.js} +1 -1
- package/dist/client/asWebComponent-DZeEbWG0.js +8895 -0
- package/dist/client/{async-B7jIrM53.js → async-Dk79llLt.js} +2 -2
- package/dist/client/easing-CH0-9wR8.js +35 -0
- package/dist/client/eo-dash.js +1 -1
- package/dist/client/{forwardRefs-BQclvjMq.js → forwardRefs-BbvoXHtj.js} +58 -45
- package/dist/client/{handling-BS24aG1q.js → handling-DxucYlYh.js} +12 -6
- package/dist/client/{helpers-wXK7Ywio.js → helpers-CI_7CUmn.js} +568 -281
- package/dist/client/index-BO5uGfUe.js +571 -0
- package/dist/client/{index-9KR-G20t.js → index-C13BiO9C.js} +2 -2
- package/dist/client/{index-4UCzZi8B.js → index-DcCcdbgR.js} +26 -13
- package/dist/client/{index-B2XpdgR6.js → index-KrGHjH-_.js} +63 -36
- package/dist/client/templates.js +82 -15
- package/dist/client/{transition-yBii4fu6.js → transition-Ctkv90El.js} +1 -1
- package/dist/node/cli.js +6 -6
- package/dist/types/core/client/eodashSTAC/EodashCollection.d.ts +24 -10
- package/dist/types/core/client/eodashSTAC/auth.d.ts +7 -0
- package/dist/types/core/client/eodashSTAC/createLayers.d.ts +15 -3
- package/dist/types/core/client/eodashSTAC/helpers.d.ts +47 -16
- package/dist/types/core/client/plugins/vuetify.d.ts +14 -14
- package/dist/types/core/client/store/actions.d.ts +2 -0
- package/dist/types/core/client/store/stac.d.ts +16 -7
- package/dist/types/core/client/store/states.d.ts +4 -0
- package/dist/types/core/client/types.d.ts +170 -2
- package/dist/types/core/client/utils/bands-editor/arithmetic.d.ts +8 -0
- package/dist/types/core/client/utils/bands-editor/colors.d.ts +15 -0
- package/dist/types/core/client/utils/bands-editor/dom.d.ts +42 -0
- package/dist/types/core/client/utils/bands-editor/index.d.ts +20 -0
- package/dist/types/core/client/utils/bands-editor/rgb.d.ts +15 -0
- package/dist/types/core/client/utils/index.d.ts +1 -1
- package/dist/types/templates/baseConfig.d.ts +87 -1
- package/dist/types/templates/expert.d.ts +6 -6
- package/dist/types/templates/explore.d.ts +67 -0
- package/dist/types/templates/index.d.ts +1 -1
- package/dist/types/templates/{light.d.ts → lite.d.ts} +5 -5
- package/dist/types/widgets/EodashItemCatalog/index.vue.d.ts +21 -0
- package/dist/types/widgets/EodashItemCatalog/methods/filters.d.ts +49 -0
- package/dist/types/widgets/EodashItemCatalog/methods/handlers.d.ts +4 -0
- package/dist/types/widgets/EodashItemCatalog/methods/map.d.ts +12 -0
- package/dist/types/widgets/EodashItemCatalog/types.d.ts +14 -0
- package/dist/types/widgets/EodashMap/EodashMapBtns.vue.d.ts +2 -0
- package/dist/types/widgets/EodashMap/index.vue.d.ts +108 -2
- package/dist/types/widgets/EodashMap/methods/create-layers-config.d.ts +1 -1
- package/dist/types/widgets/EodashMap/methods/index.d.ts +1 -1
- package/dist/types/widgets/EodashProcess/methods/custom-endpoints/layers/eoxhub-workspaces-endpoint.d.ts +1 -1
- package/dist/types/widgets/EodashTimeSlider.vue.d.ts +7 -0
- package/dist/types/widgets/EodashTools.vue.d.ts +10 -10
- package/dist/types/widgets/ExportState.vue.d.ts +2 -0
- package/package.json +28 -27
- package/templates/baseConfig.js +10 -5
- package/templates/compare.js +2 -2
- package/templates/expert.js +5 -5
- package/templates/explore.js +62 -0
- package/templates/index.js +1 -1
- package/templates/{light.js → lite.js} +1 -1
- package/widgets/EodashDatePicker.vue +15 -18
- package/widgets/EodashItemCatalog/index.vue +161 -0
- package/widgets/EodashItemCatalog/methods/filters.js +216 -0
- package/widgets/EodashItemCatalog/methods/handlers.js +50 -0
- package/widgets/EodashItemCatalog/methods/map.js +144 -0
- package/widgets/EodashItemCatalog/types.ts +15 -0
- package/widgets/EodashItemFilter.vue +35 -28
- package/widgets/EodashLayerControl.vue +10 -6
- package/widgets/EodashLayoutSwitcher.vue +1 -1
- package/widgets/EodashMap/EodashMapBtns.vue +18 -9
- package/widgets/EodashMap/index.vue +22 -12
- package/widgets/EodashMap/methods/create-layers-config.js +9 -6
- package/widgets/EodashMap/methods/index.js +27 -13
- package/widgets/EodashProcess/index.vue +17 -1
- package/widgets/EodashProcess/methods/custom-endpoints/chart/veda-endpoint.js +9 -3
- package/widgets/EodashProcess/methods/handling.js +2 -0
- package/widgets/EodashProcess/methods/outputs.js +1 -0
- package/widgets/EodashTimeSlider.vue +40 -0
- package/widgets/EodashTools.vue +7 -3
- package/widgets/ExportState.vue +53 -22
- package/dist/client/EodashLayerControl-BLBds28C.js +0 -154
- package/dist/client/EodashMapBtns-B89_YBDw.js +0 -326
- package/dist/client/MobileLayout-JelB6w1G.js +0 -118
- package/dist/client/asWebComponent-ZyEzWOOf.js +0 -19092
|
@@ -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" &&
|
|
@@ -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, u as useDefineTemplate } from './asWebComponent-
|
|
4
|
-
import { V as VMain } from './VMain-
|
|
3
|
+
import { _ as _export_sfc, u as useDefineTemplate } from './asWebComponent-DZeEbWG0.js';
|
|
4
|
+
import { V as VMain } from './VMain-Ck2g1QOG.js';
|
|
5
5
|
|
|
6
|
-
const _style_0 = ".panel[data-v-
|
|
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"];
|
|
@@ -29,7 +29,6 @@ return (_ctx, _cache) => {
|
|
|
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-
|
|
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 { E as useSTAcStore } from './asWebComponent-
|
|
2
|
+
import { E as useSTAcStore } from './asWebComponent-DZeEbWG0.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, D as useDisplay, E as useSTAcStore, F as useTransparentPanel, G as VBtn, H as VIcon, I as eodashCollections, J as eodashCompareCollections } from './asWebComponent-
|
|
4
|
-
import {
|
|
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-DZeEbWG0.js';
|
|
4
|
+
import { A as datetime } from './helpers-CI_7CUmn.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-
|
|
8
|
+
import { T as Tooltip } from './index-C13BiO9C.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(--
|
|
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
|
-
"
|
|
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
|
|
162
|
-
if (!
|
|
163
|
-
|
|
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
|
-
|
|
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, E as useSTAcStore,
|
|
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-DZeEbWG0.js';
|
|
4
3
|
|
|
5
|
-
const _style_0 = "eox-itemfilter[data-v-
|
|
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
|
-
*
|
|
104
|
+
*
|
|
105
|
+
* @param {Function} loader Function to load the item
|
|
106
|
+
* @param {Function} reset Function to reset the selection
|
|
94
107
|
*/
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
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
|
-
|
|
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(
|
|
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-
|
|
174
|
+
const EodashItemFilter = /*#__PURE__*/_export_sfc(_sfc_main, [['styles',[_style_0]],['__scopeId',"data-v-88d0abc7"]]);
|
|
160
175
|
|
|
161
176
|
export { EodashItemFilter as default };
|