@eodash/eodash 5.0.0-rc.2.5 → 5.0.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/client/composables/DefineWidgets.js +8 -1
- package/core/client/eodash.js +9 -9
- package/core/client/eodashSTAC/createLayers.js +4 -18
- package/core/client/eodashSTAC/helpers.js +23 -0
- package/core/client/store/stac.js +3 -1
- package/core/client/types.ts +125 -19
- package/core/client/utils/states.js +9 -0
- package/dist/client/{DashboardLayout-BX3Sm_Vx.js → DashboardLayout-t_PavJPO.js} +2 -2
- package/dist/client/{DynamicWebComponent-BqoHM1np.js → DynamicWebComponent-y07rVJch.js} +1 -1
- package/dist/client/{EodashDatePicker-BoWV2vc8.js → EodashDatePicker-CcOfyzGD.js} +3 -83
- package/dist/client/{EodashItemFilter-127fZLyK.js → EodashItemFilter-B9HCvIMi.js} +1 -1
- package/dist/client/{EodashLayerControl-B-pZaizw.js → EodashLayerControl-KStn7Nb_.js} +8 -2
- package/dist/client/{EodashLayoutSwitcher-DwexHfOD.js → EodashLayoutSwitcher-DqeFO3RN.js} +2 -2
- package/dist/client/{EodashMapBtns-Jfn3bpWD.js → EodashMapBtns-5BF27qJB.js} +36 -12
- package/dist/client/{EodashStacInfo-STq_bW7S.js → EodashStacInfo-C_hDy6Pd.js} +7 -1
- package/dist/client/{EodashTools-uxSuJhVJ.js → EodashTools-BXflvRf8.js} +5 -4
- package/dist/client/{ExportState-Ckcb6u01.js → ExportState-C0QRemK1.js} +27 -12
- package/dist/client/{Footer-C8JP-coH.js → Footer-7VGyGUAs.js} +1 -1
- package/dist/client/{Header-Dxx7q9FW.js → Header-BQJnXHYq.js} +3 -3
- package/dist/client/{MobileLayout-BE19Peep.js → MobileLayout-b8nQ-Vyl.js} +5 -5
- package/dist/client/{PopUp-D3IyjsN4.js → PopUp-DgNrh9Df.js} +3 -3
- package/dist/client/ProcessList-C62SOVO6.js +484 -0
- package/dist/client/{VImg-BmCNSu3X.js → VImg-D4eT3IQ1.js} +2 -2
- package/dist/client/{VMain-eZDKIfmJ.js → VMain-C3hN2-H3.js} +1 -1
- package/dist/client/{VOverlay-BS-E4Z6g.js → VOverlay-tAeNygaA.js} +15 -6
- package/dist/client/{VTooltip-BMsliOuh.js → VTooltip-B0Q3iHMZ.js} +3 -3
- package/dist/client/{WidgetsContainer-Cl6M5R5c.js → WidgetsContainer-CtDHfCYf.js} +1 -1
- package/dist/client/{asWebComponent-Df8nUiLs.js → asWebComponent-BJ2NWunV.js} +100 -96
- package/dist/client/eo-dash.css +2 -2
- package/dist/client/eo-dash.js +1 -1
- package/dist/client/{forwardRefs-lhDuXD-N.js → forwardRefs-CIFAqXaZ.js} +9 -9
- package/dist/client/{EodashMap-BSR7_wRA.js → index-BQ16n4Sk.js} +101 -80
- package/dist/client/index-Cv7HBz49.js +85 -0
- package/dist/client/{EodashProcess-CpbZPYBp.js → index-Da5xXX6Q.js} +346 -468
- package/dist/client/{index-Bt5GEGxl.js → index-DvcUndod.js} +1 -1
- package/dist/client/{transition-DHEuQX4I.js → transition-Cdb4K27U.js} +1 -1
- package/dist/types/core/client/components/MobileLayout.vue.d.ts +9 -9
- package/dist/types/core/client/eodashSTAC/helpers.d.ts +3 -2
- package/dist/types/core/client/types.d.ts +83 -17
- package/dist/types/core/client/utils/states.d.ts +7 -0
- package/dist/types/widgets/EodashDatePicker.vue.d.ts +4 -4
- package/dist/types/widgets/EodashItemFilter.vue.d.ts +18 -18
- package/dist/types/widgets/EodashLayerControl.vue.d.ts +2 -2
- package/dist/types/widgets/EodashLayoutSwitcher.vue.d.ts +2 -2
- package/dist/types/widgets/EodashMap/methods/create-layers-config.d.ts +9 -0
- package/dist/types/widgets/EodashMap/methods/index.d.ts +5 -0
- package/dist/types/widgets/EodashMapBtns.vue.d.ts +8 -2
- package/dist/types/widgets/EodashProcess/ProcessList.vue.d.ts +2 -0
- package/dist/types/widgets/EodashProcess/methods/async.d.ts +45 -0
- package/dist/types/widgets/EodashProcess/methods/composables.d.ts +19 -0
- package/dist/types/widgets/EodashProcess/methods/handling.d.ts +78 -0
- package/dist/types/widgets/EodashProcess/methods/outputs.d.ts +54 -0
- package/dist/types/widgets/EodashProcess/methods/utils.d.ts +42 -0
- package/dist/types/widgets/EodashStacInfo.vue.d.ts +12 -12
- package/dist/types/widgets/EodashTools.vue.d.ts +44 -6
- package/dist/types/widgets/PopUp.vue.d.ts +4 -4
- package/package.json +27 -27
- package/widgets/EodashLayerControl.vue +8 -1
- package/widgets/{EodashMap.vue → EodashMap/index.vue} +51 -31
- package/widgets/EodashMap/methods/create-layers-config.js +151 -0
- package/{core/client/composables/EodashMap.js → widgets/EodashMap/methods/index.js} +4 -153
- package/widgets/EodashMapBtns.vue +33 -7
- package/widgets/EodashProcess/ProcessList.vue +82 -0
- package/widgets/EodashProcess/index.vue +186 -0
- package/widgets/EodashProcess/methods/async.js +209 -0
- package/widgets/EodashProcess/methods/composables.js +129 -0
- package/widgets/EodashProcess/methods/handling.js +254 -0
- package/widgets/EodashProcess/methods/outputs.js +216 -0
- package/widgets/EodashProcess/methods/utils.js +138 -0
- package/widgets/EodashStacInfo.vue +6 -0
- package/widgets/EodashTools.vue +1 -0
- package/core/client/composables/EodashProcess.js +0 -654
- package/dist/types/core/client/composables/EodashMap.d.ts +0 -6
- package/dist/types/core/client/composables/EodashProcess.d.ts +0 -162
- package/widgets/EodashProcess.vue +0 -206
- /package/dist/types/widgets/{EodashMap.vue.d.ts → EodashMap/index.vue.d.ts} +0 -0
- /package/dist/types/widgets/{EodashProcess.vue.d.ts → EodashProcess/index.vue.d.ts} +0 -0
|
@@ -23,7 +23,14 @@ const internalWidgets = (() => {
|
|
|
23
23
|
...import.meta.glob("user:widgets/**/*.vue"),
|
|
24
24
|
};
|
|
25
25
|
for (const key in importMap) {
|
|
26
|
-
|
|
26
|
+
// Remove the extention and "widgets" from the key path
|
|
27
|
+
const path = key.split("/");
|
|
28
|
+
path.splice(0, path.findIndex((el) => el === "widgets") + 1);
|
|
29
|
+
const lastIdx = path.length - 1;
|
|
30
|
+
path[lastIdx] = path[lastIdx].split(".")[0];
|
|
31
|
+
const newKey =
|
|
32
|
+
path[lastIdx] == "index" ? path[lastIdx - 1] : path.join("/");
|
|
33
|
+
|
|
27
34
|
Object.defineProperty(
|
|
28
35
|
importMap,
|
|
29
36
|
newKey,
|
package/core/client/eodash.js
CHANGED
|
@@ -14,10 +14,9 @@ export const eodash = reactive({
|
|
|
14
14
|
// "https://gtif-cerulean.github.io/catalog/cerulean/catalog.json",
|
|
15
15
|
// "https://eodashcatalog.eox.at/samplecatalog/samples/catalog.json",
|
|
16
16
|
// "https://eodashcatalog.eox.at/test-style/trilateral/catalog.json",
|
|
17
|
-
// "https://gtif-cerulean.github.io/catalog/cerulean/catalog.json",
|
|
18
17
|
// "https://gtif-cerulean.github.io/deside-catalog/deside/catalog.json",
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
"https://gtif-cerulean.github.io/cerulean-catalog/cerulean/catalog.json",
|
|
19
|
+
// "https://gtif-austria.github.io/public-catalog/GTIF-Austria/catalog.json",
|
|
21
20
|
brand: {
|
|
22
21
|
noLayout: true,
|
|
23
22
|
name: "Demo",
|
|
@@ -163,7 +162,7 @@ export const eodash = reactive({
|
|
|
163
162
|
defineWidget: (selectedSTAC) => {
|
|
164
163
|
return selectedSTAC
|
|
165
164
|
? {
|
|
166
|
-
id: "
|
|
165
|
+
id: "light-datepicker",
|
|
167
166
|
type: "internal",
|
|
168
167
|
layout: { x: 5, y: 8, w: 2, h: 4 },
|
|
169
168
|
title: "Date",
|
|
@@ -257,7 +256,7 @@ export const eodash = reactive({
|
|
|
257
256
|
defineWidget: (selectedSTAC) => {
|
|
258
257
|
return selectedSTAC
|
|
259
258
|
? {
|
|
260
|
-
id: "
|
|
259
|
+
id: "expert-datepicker",
|
|
261
260
|
type: "internal",
|
|
262
261
|
layout: { x: 5, y: 11, w: 2, h: 1 },
|
|
263
262
|
title: "Date",
|
|
@@ -340,8 +339,7 @@ export const eodash = reactive({
|
|
|
340
339
|
widget: {
|
|
341
340
|
name: "EodashTools",
|
|
342
341
|
properties: {
|
|
343
|
-
|
|
344
|
-
layoutIcon: mdiViewDashboardVariant,
|
|
342
|
+
showLayoutSwitcher: false,
|
|
345
343
|
itemFilterConfig: {
|
|
346
344
|
cssVars: {
|
|
347
345
|
"--form-flex-direction": "row",
|
|
@@ -419,7 +417,9 @@ export const eodash = reactive({
|
|
|
419
417
|
widget: {
|
|
420
418
|
name: "EodashMapBtns",
|
|
421
419
|
properties: {
|
|
422
|
-
compareIndicators:
|
|
420
|
+
compareIndicators: {
|
|
421
|
+
fallbackTemplate: "expert",
|
|
422
|
+
},
|
|
423
423
|
},
|
|
424
424
|
},
|
|
425
425
|
}
|
|
@@ -430,7 +430,7 @@ export const eodash = reactive({
|
|
|
430
430
|
defineWidget: (selectedSTAC) => {
|
|
431
431
|
return selectedSTAC
|
|
432
432
|
? {
|
|
433
|
-
id: "Datepicker",
|
|
433
|
+
id: "expert-Datepicker",
|
|
434
434
|
type: "internal",
|
|
435
435
|
layout: { x: 5, y: 8, w: 2, h: 4 },
|
|
436
436
|
title: "Date",
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
createLayerID,
|
|
7
7
|
createAssetID,
|
|
8
8
|
mergeGeojsons,
|
|
9
|
+
addTooltipInteraction,
|
|
9
10
|
} from "./helpers";
|
|
10
11
|
import log from "loglevel";
|
|
11
12
|
|
|
@@ -81,22 +82,7 @@ export async function createLayersFromAssets(
|
|
|
81
82
|
interactions: [],
|
|
82
83
|
};
|
|
83
84
|
// add tooltip interaction if style has tooltip
|
|
84
|
-
|
|
85
|
-
layer.interactions = [
|
|
86
|
-
// @ts-expect-error no type for eox-map layer
|
|
87
|
-
{
|
|
88
|
-
type: "select",
|
|
89
|
-
options: {
|
|
90
|
-
id: (Math.random() * 10000).toFixed() + "_selectInteraction",
|
|
91
|
-
condition: "pointermove",
|
|
92
|
-
style: {
|
|
93
|
-
"stroke-color": "#335267",
|
|
94
|
-
"stroke-width": 4,
|
|
95
|
-
},
|
|
96
|
-
},
|
|
97
|
-
},
|
|
98
|
-
];
|
|
99
|
-
}
|
|
85
|
+
addTooltipInteraction(layer, style);
|
|
100
86
|
|
|
101
87
|
extractRoles(layer.properties, assets[ast]);
|
|
102
88
|
|
|
@@ -137,11 +123,11 @@ export async function createLayersFromAssets(
|
|
|
137
123
|
}),
|
|
138
124
|
},
|
|
139
125
|
...(!style?.variables && { style }),
|
|
140
|
-
interactions:[],
|
|
126
|
+
interactions: [],
|
|
141
127
|
};
|
|
142
128
|
|
|
143
129
|
layer.properties = { ...layer.properties, ...(extraProperties ?? {}) };
|
|
144
|
-
|
|
130
|
+
addTooltipInteraction(layer, style);
|
|
145
131
|
jsonArray.push(layer);
|
|
146
132
|
}
|
|
147
133
|
if (geoTIFFSources.length && typeof geoTIFFIdx === "number") {
|
|
@@ -418,3 +418,26 @@ export async function mergeGeojsons(geojsonUrls) {
|
|
|
418
418
|
"data:application/json;charset=utf-8," + JSON.stringify(merged),
|
|
419
419
|
);
|
|
420
420
|
}
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* adds tooltip to the layer if the style has tooltip property
|
|
424
|
+
* @param {Record<string,any>} layer
|
|
425
|
+
* @param {import("@/types").EodashStyleJson} [style]
|
|
426
|
+
*/
|
|
427
|
+
export const addTooltipInteraction = (layer, style) => {
|
|
428
|
+
if (style?.tooltip) {
|
|
429
|
+
layer.interactions = [
|
|
430
|
+
{
|
|
431
|
+
type: "select",
|
|
432
|
+
options: {
|
|
433
|
+
id: (Math.random() * 10000).toFixed() + "_selectInteraction",
|
|
434
|
+
condition: "pointermove",
|
|
435
|
+
style: {
|
|
436
|
+
"stroke-color": "#335267",
|
|
437
|
+
"stroke-width": 4,
|
|
438
|
+
},
|
|
439
|
+
},
|
|
440
|
+
},
|
|
441
|
+
];
|
|
442
|
+
}
|
|
443
|
+
};
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
eodashCollections,
|
|
10
10
|
eodashCompareCollections,
|
|
11
11
|
collectionsPalette,
|
|
12
|
+
switchToCompare,
|
|
12
13
|
} from "@/utils/states";
|
|
13
14
|
import { EodashCollection } from "@/eodashSTAC/EodashCollection";
|
|
14
15
|
import log from "loglevel";
|
|
@@ -110,6 +111,7 @@ export const useSTAcStore = defineStore("stac", () => {
|
|
|
110
111
|
|
|
111
112
|
selectedStac.value = resp.data;
|
|
112
113
|
indicator.value = selectedStac.value?.id ?? "";
|
|
114
|
+
switchToCompare.value = true;
|
|
113
115
|
});
|
|
114
116
|
})
|
|
115
117
|
.catch((err) => {
|
|
@@ -126,7 +128,6 @@ export const useSTAcStore = defineStore("stac", () => {
|
|
|
126
128
|
*/
|
|
127
129
|
async function loadSelectedCompareSTAC(relativePath = "") {
|
|
128
130
|
const absoluteUrl = useCompareAbsoluteUrl(relativePath);
|
|
129
|
-
|
|
130
131
|
await axios
|
|
131
132
|
.get(absoluteUrl.value)
|
|
132
133
|
.then(async (resp) => {
|
|
@@ -149,6 +150,7 @@ export const useSTAcStore = defineStore("stac", () => {
|
|
|
149
150
|
eodashCompareCollections.push(...collections);
|
|
150
151
|
|
|
151
152
|
selectedCompareStac.value = resp.data;
|
|
153
|
+
switchToCompare.value = false;
|
|
152
154
|
});
|
|
153
155
|
})
|
|
154
156
|
.catch((err) => {
|
package/core/client/types.ts
CHANGED
|
@@ -53,7 +53,10 @@ export interface WidgetsContainerProps {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
// eodash types:
|
|
56
|
-
/**
|
|
56
|
+
/**
|
|
57
|
+
* Properties of EOxLayoutItem used for setting the position and size of panels
|
|
58
|
+
* @group Eodash
|
|
59
|
+
* */
|
|
57
60
|
export interface Layout {
|
|
58
61
|
/** Horizontal start position. Integer between 1 and 12 */
|
|
59
62
|
x: number;
|
|
@@ -77,7 +80,116 @@ export interface WebComponentWidget<T extends ExecutionTime = "compiletime"> {
|
|
|
77
80
|
widget: WebComponentProps<T>;
|
|
78
81
|
type: "web-component";
|
|
79
82
|
}
|
|
83
|
+
// Internal Widget Interfaces
|
|
84
|
+
/** @group Widgets */
|
|
85
|
+
export interface TEodashMap {
|
|
86
|
+
name: "EodashMap";
|
|
87
|
+
properties?: InstanceType<typeof import("^/EodashMap.vue").default>["$props"];
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/** @group Widgets */
|
|
91
|
+
export interface TEodashDatePicker {
|
|
92
|
+
name: "EodashDatePicker";
|
|
93
|
+
properties?: InstanceType<
|
|
94
|
+
typeof import("^/EodashDatePicker.vue").default
|
|
95
|
+
>["$props"];
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/** @group Widgets */
|
|
99
|
+
export interface TEodashItemFilter {
|
|
100
|
+
name: "EodashItemFilter";
|
|
101
|
+
properties?: InstanceType<
|
|
102
|
+
typeof import("^/EodashItemFilter.vue").default
|
|
103
|
+
>["$props"];
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/** @group Widgets */
|
|
107
|
+
export interface TEodashLayerControl {
|
|
108
|
+
name: "EodashLayerControl";
|
|
109
|
+
properties?: InstanceType<
|
|
110
|
+
typeof import("^/EodashLayerControl.vue").default
|
|
111
|
+
>["$props"];
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/** @group Widgets */
|
|
115
|
+
export interface TEodashStacInfo {
|
|
116
|
+
name: "EodashStacInfo";
|
|
117
|
+
properties?: InstanceType<
|
|
118
|
+
typeof import("^/EodashStacInfo.vue").default
|
|
119
|
+
>["$props"];
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/** @group Widgets */
|
|
123
|
+
export interface TEodashProcess {
|
|
124
|
+
name: "EodashProcess";
|
|
125
|
+
properties?: InstanceType<
|
|
126
|
+
typeof import("^/EodashProcess.vue").default
|
|
127
|
+
>["$props"];
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/** @group Widgets */
|
|
131
|
+
export interface TEodashMapBtns {
|
|
132
|
+
name: "EodashMapBtns";
|
|
133
|
+
properties?: InstanceType<
|
|
134
|
+
typeof import("^/EodashMapBtns.vue").default
|
|
135
|
+
>["$props"];
|
|
136
|
+
}
|
|
80
137
|
|
|
138
|
+
/** @group Widgets */
|
|
139
|
+
export interface TEodashTools {
|
|
140
|
+
name: "EodashTools";
|
|
141
|
+
properties?: InstanceType<
|
|
142
|
+
typeof import("^/EodashTools.vue").default
|
|
143
|
+
>["$props"];
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/** @group Widgets */
|
|
147
|
+
export interface TEodashLayoutSwitcher {
|
|
148
|
+
name: "EodashLayoutSwitcher";
|
|
149
|
+
properties?: InstanceType<
|
|
150
|
+
typeof import("^/EodashLayoutSwitcher.vue").default
|
|
151
|
+
>["$props"];
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/** @group Widgets */
|
|
155
|
+
export interface TExportState {
|
|
156
|
+
name: "ExportState";
|
|
157
|
+
properties?: InstanceType<
|
|
158
|
+
typeof import("^/ExportState.vue").default
|
|
159
|
+
>["$props"];
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/** @group Widgets */
|
|
163
|
+
export interface TPopUp {
|
|
164
|
+
name: "PopUp";
|
|
165
|
+
properties?: InstanceType<typeof import("^/PopUp.vue").default>["$props"];
|
|
166
|
+
}
|
|
167
|
+
/** @group Widgets */
|
|
168
|
+
export interface TWidgetsContainer {
|
|
169
|
+
name: "WidgetsContainer";
|
|
170
|
+
properties?: InstanceType<
|
|
171
|
+
typeof import("^/WidgetsContainer.vue").default
|
|
172
|
+
>["$props"];
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Internal Vue Components inside the
|
|
176
|
+
* [widgets](https://github.com/eodash/eodash/tree/main/widgets) folder.
|
|
177
|
+
* Referenced using their name without the .vue extention
|
|
178
|
+
* @group Widgets
|
|
179
|
+
*/
|
|
180
|
+
export type ComponentWidget =
|
|
181
|
+
| TEodashMap
|
|
182
|
+
| TEodashDatePicker
|
|
183
|
+
| TEodashItemFilter
|
|
184
|
+
| TEodashLayerControl
|
|
185
|
+
| TEodashStacInfo
|
|
186
|
+
| TEodashProcess
|
|
187
|
+
| TEodashMapBtns
|
|
188
|
+
| TEodashTools
|
|
189
|
+
| TEodashLayoutSwitcher
|
|
190
|
+
| TExportState
|
|
191
|
+
| TPopUp
|
|
192
|
+
| TWidgetsContainer;
|
|
81
193
|
/**
|
|
82
194
|
* Widget type: `internal` API. Internal widgets are Vue components provided by
|
|
83
195
|
* eodash.
|
|
@@ -89,16 +201,7 @@ export interface InternalComponentWidget {
|
|
|
89
201
|
title: string;
|
|
90
202
|
/** Widget position and size. */
|
|
91
203
|
layout: Layout;
|
|
92
|
-
widget:
|
|
93
|
-
/**
|
|
94
|
-
* Internal Vue Components inside the
|
|
95
|
-
* [widgets](https://github.com/eodash/eodash/tree/main/widgets) folder.
|
|
96
|
-
* Referenced using their name without the .vue extention
|
|
97
|
-
*/
|
|
98
|
-
name: string;
|
|
99
|
-
/** Specified Vue component props */
|
|
100
|
-
properties?: Record<string, unknown>;
|
|
101
|
-
};
|
|
204
|
+
widget: ComponentWidget;
|
|
102
205
|
type: "internal";
|
|
103
206
|
}
|
|
104
207
|
|
|
@@ -170,7 +273,7 @@ export type BackgroundWidget<T extends ExecutionTime = "compiletime"> =
|
|
|
170
273
|
*
|
|
171
274
|
* @group Eodash
|
|
172
275
|
*/
|
|
173
|
-
export interface
|
|
276
|
+
export interface Template<T extends ExecutionTime = "compiletime"> {
|
|
174
277
|
/** Gap between widgets */
|
|
175
278
|
gap?: number;
|
|
176
279
|
/** Loading widget */
|
|
@@ -183,10 +286,10 @@ export interface SingleTemplate<T extends ExecutionTime = "compiletime"> {
|
|
|
183
286
|
/** Array of widgets that will be rendered as dashboard panels. */
|
|
184
287
|
widgets: Widget<T>[];
|
|
185
288
|
}
|
|
186
|
-
|
|
289
|
+
/** @group Eodash */
|
|
187
290
|
export type MultiTemplates<T extends ExecutionTime = "compiletime"> = Record<
|
|
188
291
|
string,
|
|
189
|
-
|
|
292
|
+
Template<T>
|
|
190
293
|
>;
|
|
191
294
|
|
|
192
295
|
/** @ignore */
|
|
@@ -194,7 +297,8 @@ export type StacEndpoint = `${string}/catalog.json`;
|
|
|
194
297
|
|
|
195
298
|
/** @group Eodash */
|
|
196
299
|
type ExecutionTime = "runtime" | "compiletime";
|
|
197
|
-
|
|
300
|
+
/** @group Eodash */
|
|
301
|
+
export interface EodashFont {
|
|
198
302
|
/**
|
|
199
303
|
* Link to stylesheet that defines font-face. Could be either a relative
|
|
200
304
|
* or absolute URL.
|
|
@@ -202,7 +306,7 @@ type EodashFont = {
|
|
|
202
306
|
link?: string;
|
|
203
307
|
/** Font family name. */
|
|
204
308
|
family: string;
|
|
205
|
-
}
|
|
309
|
+
}
|
|
206
310
|
/**
|
|
207
311
|
* Eodash instance API
|
|
208
312
|
*
|
|
@@ -243,7 +347,7 @@ export type Eodash<T extends ExecutionTime = "compiletime"> = {
|
|
|
243
347
|
} & (
|
|
244
348
|
| {
|
|
245
349
|
/** Template configuration */
|
|
246
|
-
template:
|
|
350
|
+
template: Template<T>;
|
|
247
351
|
}
|
|
248
352
|
| {
|
|
249
353
|
/** Multiple templates configuration */
|
|
@@ -297,7 +401,7 @@ export interface EodashStore {
|
|
|
297
401
|
///////
|
|
298
402
|
|
|
299
403
|
/** @group WebComponent */
|
|
300
|
-
type EodashConstructor = import("vue").VueElementConstructor<
|
|
404
|
+
export type EodashConstructor = import("vue").VueElementConstructor<
|
|
301
405
|
import("vue").ExtractPropTypes<{ config: string }>
|
|
302
406
|
>;
|
|
303
407
|
/**
|
|
@@ -323,7 +427,9 @@ export declare const store: typeof import("@/store").default;
|
|
|
323
427
|
/////
|
|
324
428
|
|
|
325
429
|
export * from "./main.js";
|
|
326
|
-
|
|
430
|
+
/**
|
|
431
|
+
* @group Eodash
|
|
432
|
+
*/
|
|
327
433
|
export type EodashStyleJson = import("ol/style/flat").FlatStyleLike & {
|
|
328
434
|
variables?: Record<string, string | number | boolean | null | undefined>;
|
|
329
435
|
legend?: import("@eox/layercontrol/src/components/layer-config.js").EOxLayerControlLayerConfig["layerConfig"]["legend"];
|
|
@@ -35,6 +35,13 @@ export const posIsSetFromUrl = ref(false);
|
|
|
35
35
|
* @type {import("vue").Ref<Record<string, any> | undefined>}
|
|
36
36
|
*/
|
|
37
37
|
export const layerControlFormValue = ref({});
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Current value of the layer control JSON form for the latest layer the user interacted with.
|
|
41
|
+
* @type {import("vue").Ref<Record<string, any> | undefined>}
|
|
42
|
+
*/
|
|
43
|
+
export const layerControlFormValueCompare = ref({});
|
|
44
|
+
|
|
38
45
|
/**
|
|
39
46
|
* STAC indicators color palette, defaults to Bank-Wong palette
|
|
40
47
|
* @type {string[]} */
|
|
@@ -80,3 +87,5 @@ export const dataThemesBrands = {
|
|
|
80
87
|
color: "#8E81AF",
|
|
81
88
|
},
|
|
82
89
|
};
|
|
90
|
+
/** used for switching in and out of compare mode @see {@link widgets/EodashMapBtns.vue} */
|
|
91
|
+
export const switchToCompare = ref(true);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createBlock, openBlock, withCtx, createElementVNode, normalizeStyle, unref, createElementBlock, createCommentVNode, Suspense, resolveDynamicComponent, mergeProps, Fragment, renderList, Transition } from 'vue';
|
|
2
2
|
import '@eox/layout';
|
|
3
|
-
import { _ as _export_sfc, F as useDefineTemplate } from './asWebComponent-
|
|
4
|
-
import { V as VMain } from './VMain-
|
|
3
|
+
import { _ as _export_sfc, F as useDefineTemplate } from './asWebComponent-BJ2NWunV.js';
|
|
4
|
+
import { V as VMain } from './VMain-C3hN2-H3.js';
|
|
5
5
|
|
|
6
6
|
const _hoisted_1 = ["gap"];
|
|
7
7
|
const _hoisted_2 = ["id", "h", "w", "x", "y"];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { withAsyncContext, ref, onMounted, onUnmounted, createElementBlock, openBlock, createBlock, resolveDynamicComponent, mergeProps } from 'vue';
|
|
2
|
-
import {
|
|
2
|
+
import { Z as useSTAcStore } from './asWebComponent-BJ2NWunV.js';
|
|
3
3
|
|
|
4
4
|
const _hoisted_1 = { class: "d-flex flex-column fill-height overflow-auto" };
|
|
5
5
|
|
|
@@ -1,89 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useCssVars, ref, useTemplateRef, customRef, computed, reactive, toRef, 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 {
|
|
3
|
+
import { r as useDisplay, Y as datetime, Z as useSTAcStore, $ as eodashCollections, a0 as collectionsPalette, a1 as makePanelTransparent, V as VBtn, v as VIcon } from './asWebComponent-BJ2NWunV.js';
|
|
4
4
|
import { mdiRayEndArrow, mdiRayStartArrow } from '@mdi/js';
|
|
5
5
|
import log from 'loglevel';
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
// Utilities
|
|
9
|
-
function useDirectiveComponent(component, props) {
|
|
10
|
-
const concreteComponent = typeof component === 'string' ? resolveComponent(component) : component;
|
|
11
|
-
const hook = mountComponent(concreteComponent, props);
|
|
12
|
-
return {
|
|
13
|
-
mounted: hook,
|
|
14
|
-
updated: hook,
|
|
15
|
-
unmounted(el) {
|
|
16
|
-
render(null, el);
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
function mountComponent(component, props) {
|
|
21
|
-
return function (el, binding, vnode) {
|
|
22
|
-
const _props = typeof props === 'function' ? props(binding) : props;
|
|
23
|
-
const text = binding.value?.text ?? binding.value ?? _props?.text;
|
|
24
|
-
const value = isObject(binding.value) ? binding.value : {};
|
|
25
|
-
|
|
26
|
-
// Get the children from the props or directive value, or the element's children
|
|
27
|
-
const children = () => text ?? el.textContent;
|
|
28
|
-
|
|
29
|
-
// If vnode.ctx is the same as the instance, then we're bound to a plain element
|
|
30
|
-
// and need to find the nearest parent component instance to inherit provides from
|
|
31
|
-
const provides = (vnode.ctx === binding.instance.$ ? findComponentParent(vnode, binding.instance.$)?.provides : vnode.ctx?.provides) ?? binding.instance.$.provides;
|
|
32
|
-
const node = h(component, mergeProps(_props, value), children);
|
|
33
|
-
node.appContext = Object.assign(Object.create(null), binding.instance.$.appContext, {
|
|
34
|
-
provides
|
|
35
|
-
});
|
|
36
|
-
render(node, el);
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
function findComponentParent(vnode, root) {
|
|
40
|
-
// Walk the tree from root until we find the child vnode
|
|
41
|
-
const stack = new Set();
|
|
42
|
-
const walk = children => {
|
|
43
|
-
for (const child of children) {
|
|
44
|
-
if (!child) continue;
|
|
45
|
-
if (child === vnode || child.el && vnode.el && child.el === vnode.el) {
|
|
46
|
-
return true;
|
|
47
|
-
}
|
|
48
|
-
stack.add(child);
|
|
49
|
-
let result;
|
|
50
|
-
if (child.suspense) {
|
|
51
|
-
result = walk([child.ssContent]);
|
|
52
|
-
} else if (Array.isArray(child.children)) {
|
|
53
|
-
result = walk(child.children);
|
|
54
|
-
} else if (child.component?.vnode) {
|
|
55
|
-
result = walk([child.component?.subTree]);
|
|
56
|
-
}
|
|
57
|
-
if (result) {
|
|
58
|
-
return result;
|
|
59
|
-
}
|
|
60
|
-
stack.delete(child);
|
|
61
|
-
}
|
|
62
|
-
return false;
|
|
63
|
-
};
|
|
64
|
-
if (!walk([root.subTree])) {
|
|
65
|
-
consoleError('Could not find original vnode, component will not inherit provides');
|
|
66
|
-
return root;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// Return the first component parent
|
|
70
|
-
const result = Array.from(stack).reverse();
|
|
71
|
-
for (const child of result) {
|
|
72
|
-
if (child.component) {
|
|
73
|
-
return child.component;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
return root;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
// Components
|
|
80
|
-
const Tooltip = useDirectiveComponent(VTooltip, binding => {
|
|
81
|
-
return {
|
|
82
|
-
activator: 'parent',
|
|
83
|
-
location: binding.arg?.replace('-', ' '),
|
|
84
|
-
text: typeof binding.value === 'boolean' ? undefined : binding.value
|
|
85
|
-
};
|
|
86
|
-
});
|
|
6
|
+
import { T as Tooltip } from './index-Cv7HBz49.js';
|
|
87
7
|
|
|
88
8
|
const _hoisted_1 = {
|
|
89
9
|
ref: "rootRef",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed, ref, createElementBlock, openBlock, mergeProps, unref, createElementVNode, toDisplayString } from 'vue';
|
|
2
|
-
import { r as useDisplay,
|
|
2
|
+
import { r as useDisplay, Z as useSTAcStore } from './asWebComponent-BJ2NWunV.js';
|
|
3
3
|
import '@eox/itemfilter';
|
|
4
4
|
|
|
5
5
|
const _hoisted_1 = [".items"];
|
|
@@ -3,7 +3,7 @@ import '@eox/layercontrol';
|
|
|
3
3
|
import '@eox/jsonform';
|
|
4
4
|
import '@eox/timecontrol';
|
|
5
5
|
import 'color-legend-element';
|
|
6
|
-
import {
|
|
6
|
+
import { Z as useSTAcStore, a2 as mapCompareEl, a3 as mapEl, a4 as eodashCompareCollections, $ as eodashCollections, a5 as layerControlFormValueCompare, a6 as layerControlFormValue, a7 as getColFromLayer } from './asWebComponent-BJ2NWunV.js';
|
|
7
7
|
import { storeToRefs } from 'pinia';
|
|
8
8
|
|
|
9
9
|
const _hoisted_1 = { class: "d-flex flex-column fill-height overflow-auto" };
|
|
@@ -19,6 +19,8 @@ const _sfc_main = {
|
|
|
19
19
|
__name: 'EodashLayerControl',
|
|
20
20
|
props: {
|
|
21
21
|
map: {
|
|
22
|
+
/** @type {import("vue").PropType<"first" | "second">} */
|
|
23
|
+
//@ts-expect-error todo
|
|
22
24
|
type: String,
|
|
23
25
|
default: "first",
|
|
24
26
|
},
|
|
@@ -107,7 +109,11 @@ const debouncedHandleDateTime = (evt) => {
|
|
|
107
109
|
* @param {Event & {detail:{layer:import("ol/layer").Layer;jsonformValue:Record<string,any>}}} evt
|
|
108
110
|
*/
|
|
109
111
|
const onLayerConfigChange = (evt) => {
|
|
110
|
-
|
|
112
|
+
if (props.map === "second") {
|
|
113
|
+
layerControlFormValueCompare.value = evt.detail.jsonformValue;
|
|
114
|
+
} else {
|
|
115
|
+
layerControlFormValue.value = evt.detail.jsonformValue;
|
|
116
|
+
}
|
|
111
117
|
};
|
|
112
118
|
|
|
113
119
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ref, createElementBlock, openBlock, createVNode, withCtx, mergeProps } from 'vue';
|
|
2
|
-
import {
|
|
2
|
+
import { a1 as makePanelTransparent, v as VIcon, ap as activeTemplate } from './asWebComponent-BJ2NWunV.js';
|
|
3
3
|
import { mdiViewDashboard } from '@mdi/js';
|
|
4
|
-
import { V as VTooltip } from './VTooltip-
|
|
4
|
+
import { V as VTooltip } from './VTooltip-B0Q3iHMZ.js';
|
|
5
5
|
|
|
6
6
|
const _sfc_main = {
|
|
7
7
|
__name: 'EodashLayoutSwitcher',
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { computed, ref, createElementBlock, openBlock, createBlock, createCommentVNode, createVNode, unref, withCtx } from 'vue';
|
|
2
|
-
import { _ as _export_sfc, r as useDisplay,
|
|
3
|
-
import { mdiMapPlus, mdiEarthBox
|
|
4
|
-
import ExportState from './ExportState-
|
|
5
|
-
import _sfc_main$1 from './PopUp-
|
|
6
|
-
import _sfc_main$2 from './EodashItemFilter-
|
|
1
|
+
import { computed, ref, createElementBlock, openBlock, createBlock, createCommentVNode, createVNode, unref, withCtx, triggerRef } from 'vue';
|
|
2
|
+
import { _ as _export_sfc, Z as useSTAcStore, r as useDisplay, ae as switchToCompare, a1 as makePanelTransparent, V as VBtn, af as availableMapProjection, ag as changeMapProjection, ah as setActiveTemplate } from './asWebComponent-BJ2NWunV.js';
|
|
3
|
+
import { mdiCompare, mdiCompareRemove, mdiMapPlus, mdiEarthBox } from '@mdi/js';
|
|
4
|
+
import ExportState from './ExportState-C0QRemK1.js';
|
|
5
|
+
import _sfc_main$1 from './PopUp-DgNrh9Df.js';
|
|
6
|
+
import _sfc_main$2 from './EodashItemFilter-B9HCvIMi.js';
|
|
7
|
+
import { storeToRefs } from 'pinia';
|
|
7
8
|
|
|
8
9
|
const _sfc_main = {
|
|
9
10
|
__name: 'EodashMapBtns',
|
|
@@ -17,25 +18,48 @@ const _sfc_main = {
|
|
|
17
18
|
default: true,
|
|
18
19
|
},
|
|
19
20
|
compareIndicators: {
|
|
20
|
-
type
|
|
21
|
+
/** @type {import("vue").PropType<boolean | {compareTemplate?:string;fallbackTemplate?:string}> }*/
|
|
22
|
+
type: [Boolean, Object],
|
|
21
23
|
default: true,
|
|
22
24
|
},
|
|
23
25
|
},
|
|
24
26
|
setup(__props) {
|
|
25
27
|
|
|
26
28
|
|
|
29
|
+
const { selectedStac, selectedCompareStac } = storeToRefs(useSTAcStore());
|
|
27
30
|
const { smAndDown } = useDisplay();
|
|
28
31
|
const popupWidth = computed(() => (smAndDown ? "70%" : "500px"));
|
|
29
32
|
const popupHeight = computed(() => (smAndDown ? "90%" : "500px"));
|
|
30
33
|
|
|
31
34
|
const showMapState = ref(false);
|
|
32
35
|
const showCompareIndicators = ref(false);
|
|
36
|
+
const compareIcon = computed(() =>
|
|
37
|
+
switchToCompare.value ? mdiCompare : mdiCompareRemove,
|
|
38
|
+
);
|
|
39
|
+
const onCompareClick = () => {
|
|
40
|
+
if (switchToCompare.value) {
|
|
41
|
+
showCompareIndicators.value = !showCompareIndicators.value;
|
|
42
|
+
} else {
|
|
43
|
+
switchToCompare.value = true;
|
|
44
|
+
const fallbackTemplate =
|
|
45
|
+
(typeof __props.compareIndicators === "object" &&
|
|
46
|
+
__props.compareIndicators.fallbackTemplate) ||
|
|
47
|
+
"expert";
|
|
48
|
+
selectedCompareStac.value = null;
|
|
49
|
+
setActiveTemplate(fallbackTemplate);
|
|
50
|
+
triggerRef(selectedStac);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
33
53
|
|
|
34
54
|
/** @type {import("vue").Ref<HTMLDivElement|null>} */
|
|
35
55
|
const rootRef = ref(null);
|
|
36
56
|
|
|
37
57
|
const onSelectCompareIndicator = () => {
|
|
38
|
-
|
|
58
|
+
const compareTemplate =
|
|
59
|
+
(typeof __props.compareIndicators === "object" &&
|
|
60
|
+
__props.compareIndicators.compareTemplate) ||
|
|
61
|
+
"compare";
|
|
62
|
+
setActiveTemplate(compareTemplate);
|
|
39
63
|
showCompareIndicators.value = !showCompareIndicators.value;
|
|
40
64
|
};
|
|
41
65
|
|
|
@@ -76,13 +100,13 @@ return (_ctx, _cache) => {
|
|
|
76
100
|
? (openBlock(), createBlock(VBtn, {
|
|
77
101
|
key: 3,
|
|
78
102
|
class: "map-btn",
|
|
79
|
-
icon: [
|
|
80
|
-
onClick:
|
|
103
|
+
icon: [compareIcon.value],
|
|
104
|
+
onClick: onCompareClick
|
|
81
105
|
}, null, 8 /* PROPS */, ["icon"]))
|
|
82
106
|
: createCommentVNode("v-if", true),
|
|
83
107
|
createVNode(_sfc_main$1, {
|
|
84
108
|
modelValue: showCompareIndicators.value,
|
|
85
|
-
"onUpdate:modelValue": _cache[
|
|
109
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = $event => ((showCompareIndicators).value = $event)),
|
|
86
110
|
maxWidth: popupWidth.value,
|
|
87
111
|
maxHeight: popupHeight.value
|
|
88
112
|
}, {
|
|
@@ -102,6 +126,6 @@ return (_ctx, _cache) => {
|
|
|
102
126
|
}
|
|
103
127
|
|
|
104
128
|
};
|
|
105
|
-
const EodashMapBtns = /*#__PURE__*/_export_sfc(_sfc_main, [['__scopeId',"data-v-
|
|
129
|
+
const EodashMapBtns = /*#__PURE__*/_export_sfc(_sfc_main, [['__scopeId',"data-v-da630fa1"]]);
|
|
106
130
|
|
|
107
131
|
export { EodashMapBtns as default };
|