@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.
- package/core/client/components/DashboardLayout.vue +1 -2
- package/core/client/components/EodashOverlay.vue +4 -5
- package/core/client/components/MobileLayout.vue +42 -21
- package/core/client/composables/index.js +54 -60
- package/core/client/eodashSTAC/EodashCollection.js +199 -108
- package/core/client/eodashSTAC/auth.js +86 -0
- package/core/client/eodashSTAC/createLayers.js +234 -4
- package/core/client/eodashSTAC/helpers.js +281 -59
- 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-ByVs1DrY.js → DashboardLayout-Cq15p4TH.js} +5 -6
- package/dist/client/{DynamicWebComponent-C3W7HSQm.js → DynamicWebComponent-Cv-fPRG1.js} +1 -1
- package/dist/client/{EodashDatePicker-BIAf1sMT.js → EodashDatePicker-CPlJwEIO.js} +20 -22
- package/dist/client/{EodashItemFilter-DPznh8UB.js → EodashItemFilter-Ydebgbjj.js} +46 -31
- package/dist/client/EodashLayerControl-COhrkNEs.js +1517 -0
- package/dist/client/{EodashLayoutSwitcher-C5qTEffW.js → EodashLayoutSwitcher-pnKhTRZV.js} +4 -4
- package/dist/client/EodashMapBtns-Cj0Fx119.js +301 -0
- package/dist/client/{EodashStacInfo-CSvvF2jI.js → EodashStacInfo-Dadkg_Nj.js} +1 -1
- package/dist/client/EodashTimeSlider-CpoHX0S7.js +53 -0
- package/dist/client/{EodashTools-Cv1SXQ5y.js → EodashTools-UGBG7KC9.js} +10 -7
- package/dist/client/{ExportState-D-iuwaad.js → ExportState-GtJkAqeZ.js} +145 -121
- package/dist/client/{Footer-CyF0zRAk.js → Footer-D3ZPG5c4.js} +1 -1
- package/dist/client/{Header-CgD8jDKU.js → Header-z6AK-wpN.js} +2 -3
- package/dist/client/MobileLayout-BXNsNftb.js +118 -0
- package/dist/client/{PopUp-BsYLvWch.js → PopUp-BbQdjENV.js} +79 -44
- package/dist/client/{ProcessList-C2xsLU2_.js → ProcessList-C6VsdsYI.js} +18 -12
- package/dist/client/{VImg-OHe8YTs2.js → VImg-CxaMSB99.js} +203 -5
- package/dist/client/{VMain-PryTLU4a.js → VMain-Ds7yw0wj.js} +1 -1
- package/dist/client/{VTooltip-DZ0fjpB3.js → VTooltip-Cze6CEVh.js} +2 -3
- package/dist/client/{WidgetsContainer-B9LBadcC.js → WidgetsContainer-D66bj-JJ.js} +1 -1
- package/dist/client/asWebComponent-CWbNRdf9.js +8895 -0
- package/dist/client/{async-DkSu_u2K.js → async-BA7oWCMX.js} +69 -5
- package/dist/client/easing-CH0-9wR8.js +35 -0
- package/dist/client/eo-dash.js +1 -1
- package/dist/client/{VOverlay-yUn7p-Uf.js → forwardRefs-BUfxOIo-.js} +308 -28
- package/dist/client/{handling-CgmFXkW6.js → handling-DlNTtKB-.js} +27 -6
- package/dist/client/{helpers-Dy0Q13tP.js → helpers-CtE0W7iu.js} +595 -278
- package/dist/client/{index-skjhlH8u.js → index-CeEZIjO6.js} +26 -13
- package/dist/client/{index-Ch_HchK3.js → index-CsKbRDeN.js} +238 -77
- package/dist/client/{index-Dqj4tbx2.js → index-D4_NRKrf.js} +2 -2
- package/dist/client/index-DeECc3lV.js +571 -0
- package/dist/client/material-symbols-outlined.woff2 +0 -0
- package/dist/client/material-symbols-rounded.woff2 +0 -0
- package/dist/client/material-symbols-sharp.woff2 +0 -0
- package/dist/client/material-symbols-subset.woff2 +0 -0
- package/dist/client/templates.js +106 -49
- package/dist/client/{transition-C98Yn4Vo.js → transition-Byvp3L6Y.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 +51 -15
- 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 +171 -3
- 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/compare.d.ts +0 -25
- package/dist/types/templates/expert.d.ts +17 -21
- 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} +9 -0
- 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/{EodashMapBtns.vue.d.ts → EodashMap/EodashMapBtns.vue.d.ts} +6 -0
- package/dist/types/widgets/EodashMap/index.vue.d.ts +114 -0
- 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/async.d.ts +1 -0
- 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 +31 -28
- package/templates/baseConfig.js +10 -5
- package/templates/compare.js +2 -22
- package/templates/expert.js +19 -18
- package/templates/explore.js +62 -0
- package/templates/index.js +1 -1
- package/templates/{light.js → lite.js} +11 -2
- 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 +278 -0
- package/widgets/EodashMap/index.vue +263 -38
- package/widgets/EodashMap/methods/create-layers-config.js +9 -6
- package/widgets/EodashMap/methods/index.js +27 -13
- package/widgets/EodashProcess/ProcessList.vue +13 -1
- package/widgets/EodashProcess/index.vue +17 -1
- package/widgets/EodashProcess/methods/async.js +22 -1
- package/widgets/EodashProcess/methods/custom-endpoints/chart/veda-endpoint.js +25 -3
- package/widgets/EodashProcess/methods/handling.js +2 -0
- package/widgets/EodashProcess/methods/outputs.js +1 -0
- package/widgets/EodashProcess/methods/utils.js +45 -1
- package/widgets/EodashTimeSlider.vue +40 -0
- package/widgets/EodashTools.vue +7 -3
- package/widgets/ExportState.vue +53 -22
- package/dist/client/EodashLayerControl-Bhxjw4V2.js +0 -154
- package/dist/client/EodashMapBtns-WoGq8MuV.js +0 -173
- package/dist/client/MobileLayout-EKQ_kpSh.js +0 -1226
- package/dist/client/asWebComponent-By_7_JjS.js +0 -19193
- package/dist/client/forwardRefs-BXxrv98s.js +0 -272
- package/dist/client/index-BuhOHXKv.js +0 -199
- package/widgets/EodashMapBtns.vue +0 -155
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { q as getCompareLayers, p as getLayers, t as replaceLayer, a as extractLayerConfig, v as extractLayerLegend, m as mergeGeojsons, j as axios, U as axios$1, G as compareIndicator, E as indicator } from './helpers-CtE0W7iu.js';
|
|
2
|
+
import { P as useEmitLayersUpdate } from './asWebComponent-CWbNRdf9.js';
|
|
3
3
|
import { isMulti } from '@eox/jsonform/src/custom-inputs/spatial/utils';
|
|
4
4
|
import log from 'loglevel';
|
|
5
5
|
|
|
@@ -285,7 +285,10 @@ async function creatAsyncProcessLayerDefinitions(
|
|
|
285
285
|
|
|
286
286
|
for (const resultItem of processResults) {
|
|
287
287
|
const flatStyleJSON = extractStyleFromResult(resultItem, flatStyles);
|
|
288
|
-
|
|
288
|
+
/** @type {import("@/types").EodashStyleJson | undefined} */
|
|
289
|
+
let style;
|
|
290
|
+
/** @type {Record<string, unknown> | undefined} */
|
|
291
|
+
let layerConfig;
|
|
289
292
|
if (flatStyleJSON) {
|
|
290
293
|
const extracted = extractLayerConfig(
|
|
291
294
|
selectedStac?.id ?? "",
|
|
@@ -295,6 +298,9 @@ async function creatAsyncProcessLayerDefinitions(
|
|
|
295
298
|
style = extracted.style;
|
|
296
299
|
}
|
|
297
300
|
|
|
301
|
+
// Check if collection has eox:colorlegend definition, if yes overwrite legend description
|
|
302
|
+
let extraProperties = extractLayerLegend(selectedStac);
|
|
303
|
+
|
|
298
304
|
switch (resultItem.type) {
|
|
299
305
|
case "image/tiff": {
|
|
300
306
|
layers.push({
|
|
@@ -308,6 +314,7 @@ async function creatAsyncProcessLayerDefinitions(
|
|
|
308
314
|
(resultItem.id ?? ""),
|
|
309
315
|
layerControlToolsExpand: true,
|
|
310
316
|
...(layerConfig && { layerConfig }),
|
|
317
|
+
...extraProperties,
|
|
311
318
|
},
|
|
312
319
|
source: {
|
|
313
320
|
type: "GeoTIFF",
|
|
@@ -345,12 +352,48 @@ async function creatAsyncProcessLayerDefinitions(
|
|
|
345
352
|
style,
|
|
346
353
|
},
|
|
347
354
|
}),
|
|
355
|
+
...extraProperties,
|
|
348
356
|
},
|
|
349
357
|
...(!style?.variables && { style }),
|
|
350
358
|
interactions: [],
|
|
351
359
|
});
|
|
352
360
|
break;
|
|
353
361
|
}
|
|
362
|
+
case "application/vnd.flatgeobuf": {
|
|
363
|
+
// TODO after more flatgeobuf urls are possible in EOxMap https://github.com/EOX-A/EOxElements/issues/1789
|
|
364
|
+
// we should change this handler to only create one layer instead of many
|
|
365
|
+
resultItem.urls.forEach((url, i) => {
|
|
366
|
+
layers.push({
|
|
367
|
+
type: "Vector",
|
|
368
|
+
source: {
|
|
369
|
+
type: "FlatGeoBuf",
|
|
370
|
+
url,
|
|
371
|
+
},
|
|
372
|
+
properties: {
|
|
373
|
+
id:
|
|
374
|
+
endpointLink.id +
|
|
375
|
+
"_process_" +
|
|
376
|
+
resultItem.id +
|
|
377
|
+
postfixId +
|
|
378
|
+
`_${i}`,
|
|
379
|
+
title:
|
|
380
|
+
"Results " +
|
|
381
|
+
(selectedStac?.id ?? "") +
|
|
382
|
+
" " +
|
|
383
|
+
(resultItem.id ?? ""),
|
|
384
|
+
layerControlToolsExpand: true,
|
|
385
|
+
...(layerConfig && {
|
|
386
|
+
layerConfig: {
|
|
387
|
+
...layerConfig,
|
|
388
|
+
style,
|
|
389
|
+
},
|
|
390
|
+
}),
|
|
391
|
+
...extraProperties,
|
|
392
|
+
},
|
|
393
|
+
});
|
|
394
|
+
});
|
|
395
|
+
break;
|
|
396
|
+
}
|
|
354
397
|
default:
|
|
355
398
|
console.warn(
|
|
356
399
|
`[eodash] Unsupported result type "${resultItem.type}" for ${resultItem.id} layer creation.`,
|
|
@@ -661,7 +704,15 @@ const downloadPreviousResults = async (jobObject, selectedStac) => {
|
|
|
661
704
|
.get(link.href)
|
|
662
705
|
.then((response) => response.data)
|
|
663
706
|
.then((data) => {
|
|
664
|
-
|
|
707
|
+
// either urls is an Array
|
|
708
|
+
if (data.urls) {
|
|
709
|
+
results.push(...data.urls);
|
|
710
|
+
} else {
|
|
711
|
+
// or urls need to be aggregated from mapping objects
|
|
712
|
+
for (const outputMappingObject of Object.values(data)) {
|
|
713
|
+
results.push(...outputMappingObject.urls);
|
|
714
|
+
}
|
|
715
|
+
}
|
|
665
716
|
});
|
|
666
717
|
results.forEach((result) => {
|
|
667
718
|
if (!result) {
|
|
@@ -737,4 +788,17 @@ async function loadPreviousProcess({
|
|
|
737
788
|
applyProcessLayersToMap(mapElement, layers);
|
|
738
789
|
}
|
|
739
790
|
|
|
740
|
-
|
|
791
|
+
/**
|
|
792
|
+
* extracts job status url from local storage based on identifier
|
|
793
|
+
*
|
|
794
|
+
* @param {string} jobID
|
|
795
|
+
* @param {string} indicator
|
|
796
|
+
*/
|
|
797
|
+
const getJobStatusUrl = (jobID, indicator) => {
|
|
798
|
+
/** @type {string[]} */
|
|
799
|
+
const jobsUrls = JSON.parse(localStorage.getItem(indicator) || "[]");
|
|
800
|
+
const jobUrl = jobsUrls.find((url) => url.includes(jobID));
|
|
801
|
+
return jobUrl;
|
|
802
|
+
};
|
|
803
|
+
|
|
804
|
+
export { creatAsyncProcessLayerDefinitions as a, generateTimePairs as b, createTiffLayerDefinition as c, download as d, extractAsyncResults as e, updateJsonformSchemaTarget as f, getBboxProperty as g, extractGeometries as h, applyProcessLayersToMap as i, getJobStatusUrl as j, downloadPreviousResults as k, loadProcess as l, deleteJob as m, pollProcessStatus as p, separateEndpointLinks as s, updateJobsStatus as u };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module ol/easing
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Start slow and speed up.
|
|
7
|
+
* @param {number} t Input between 0 and 1.
|
|
8
|
+
* @return {number} Output between 0 and 1.
|
|
9
|
+
* @api
|
|
10
|
+
*/
|
|
11
|
+
function easeIn(t) {
|
|
12
|
+
return Math.pow(t, 3);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Start fast and slow down.
|
|
17
|
+
* @param {number} t Input between 0 and 1.
|
|
18
|
+
* @return {number} Output between 0 and 1.
|
|
19
|
+
* @api
|
|
20
|
+
*/
|
|
21
|
+
function easeOut(t) {
|
|
22
|
+
return 1 - easeIn(1 - t);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Start slow, speed up, and then slow down again.
|
|
27
|
+
* @param {number} t Input between 0 and 1.
|
|
28
|
+
* @return {number} Output between 0 and 1.
|
|
29
|
+
* @api
|
|
30
|
+
*/
|
|
31
|
+
function inAndOut(t) {
|
|
32
|
+
return 3 * t * t - 2 * t * t * t;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export { easeOut as e, inAndOut as i };
|
package/dist/client/eo-dash.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { aI as EodashConstructor, aH as register, aJ as store } from './asWebComponent-CWbNRdf9.js';
|
|
2
2
|
import 'vue';
|
|
@@ -1,7 +1,149 @@
|
|
|
1
|
-
import { computed, watch, onScopeDispose, nextTick, ref, watchEffect, effectScope, inject, mergeProps, shallowRef, onMounted, reactive, provide, toValue, toRaw,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { computed, watch, onScopeDispose, nextTick, ref, watchEffect, effectScope, inject, mergeProps, shallowRef, onMounted, toRef, reactive, provide, toValue, toRaw, readonly, warn, onBeforeUnmount, createElementVNode, Fragment, createVNode, Teleport, withDirectives, vShow, Transition } from 'vue';
|
|
2
|
+
import { ar as isOn, as as eventName, p as propsFactory, at as destructComputed, au as parseAnchor, av as flipSide, aw as flipAlign, ax as flipCorner, ay as CircularBuffer, az as deepEqual, X as consoleError, aA as getAxis, o as convertToUnit, v as clamp, ao as IN_BROWSER, y as useToggleScope, aB as defer, ak as getCurrentInstance, aC as templateRef, aD as matchesSelector, D as useDisplay, q as makeThemeProps, d as makeDimensionProps, e as makeComponentProps, g as genericComponent, x as useProxiedModel, k as provideTheme, l as useRtl, f as useBackgroundColor, b as useDimension, aE as useRouter, aF as useBackButton, an as standardEasing, c as useRender } from './asWebComponent-CWbNRdf9.js';
|
|
3
|
+
import { m as makeTransitionProps, M as MaybeTransition } from './transition-Byvp3L6Y.js';
|
|
4
|
+
|
|
5
|
+
class Box {
|
|
6
|
+
constructor(args) {
|
|
7
|
+
const pageScale = document.body.currentCSSZoom ?? 1;
|
|
8
|
+
const factor = args instanceof DOMRect ? 1 + (1 - pageScale) / pageScale : 1;
|
|
9
|
+
const {
|
|
10
|
+
x,
|
|
11
|
+
y,
|
|
12
|
+
width,
|
|
13
|
+
height
|
|
14
|
+
} = args;
|
|
15
|
+
this.x = x * factor;
|
|
16
|
+
this.y = y * factor;
|
|
17
|
+
this.width = width * factor;
|
|
18
|
+
this.height = height * factor;
|
|
19
|
+
}
|
|
20
|
+
get top() {
|
|
21
|
+
return this.y;
|
|
22
|
+
}
|
|
23
|
+
get bottom() {
|
|
24
|
+
return this.y + this.height;
|
|
25
|
+
}
|
|
26
|
+
get left() {
|
|
27
|
+
return this.x;
|
|
28
|
+
}
|
|
29
|
+
get right() {
|
|
30
|
+
return this.x + this.width;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
function getOverflow(a, b) {
|
|
34
|
+
return {
|
|
35
|
+
x: {
|
|
36
|
+
before: Math.max(0, b.left - a.left),
|
|
37
|
+
after: Math.max(0, a.right - b.right)
|
|
38
|
+
},
|
|
39
|
+
y: {
|
|
40
|
+
before: Math.max(0, b.top - a.top),
|
|
41
|
+
after: Math.max(0, a.bottom - b.bottom)
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function getTargetBox(target) {
|
|
46
|
+
if (Array.isArray(target)) {
|
|
47
|
+
const pageScale = document.body.currentCSSZoom ?? 1;
|
|
48
|
+
const factor = 1 + (1 - pageScale) / pageScale;
|
|
49
|
+
return new Box({
|
|
50
|
+
x: target[0] * factor,
|
|
51
|
+
y: target[1] * factor,
|
|
52
|
+
width: 0 * factor,
|
|
53
|
+
height: 0 * factor
|
|
54
|
+
});
|
|
55
|
+
} else {
|
|
56
|
+
return new Box(target.getBoundingClientRect());
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
function getElementBox(el) {
|
|
60
|
+
if (el === document.documentElement) {
|
|
61
|
+
if (!visualViewport) {
|
|
62
|
+
return new Box({
|
|
63
|
+
x: 0,
|
|
64
|
+
y: 0,
|
|
65
|
+
width: document.documentElement.clientWidth,
|
|
66
|
+
height: document.documentElement.clientHeight
|
|
67
|
+
});
|
|
68
|
+
} else {
|
|
69
|
+
const pageScale = document.body.currentCSSZoom ?? 1;
|
|
70
|
+
return new Box({
|
|
71
|
+
x: visualViewport.scale > 1 ? 0 : visualViewport.offsetLeft,
|
|
72
|
+
y: visualViewport.scale > 1 ? 0 : visualViewport.offsetTop,
|
|
73
|
+
width: visualViewport.width * visualViewport.scale / pageScale,
|
|
74
|
+
height: visualViewport.height * visualViewport.scale / pageScale
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
} else {
|
|
78
|
+
const rect = el.getBoundingClientRect();
|
|
79
|
+
return new Box({
|
|
80
|
+
x: rect.x,
|
|
81
|
+
y: rect.y,
|
|
82
|
+
width: el.clientWidth,
|
|
83
|
+
height: el.clientHeight
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Utilities
|
|
89
|
+
/** @see https://stackoverflow.com/a/57876601/2074736 */
|
|
90
|
+
function nullifyTransforms(el) {
|
|
91
|
+
const rect = new Box(el.getBoundingClientRect());
|
|
92
|
+
const style = getComputedStyle(el);
|
|
93
|
+
const tx = style.transform;
|
|
94
|
+
if (tx) {
|
|
95
|
+
let ta, sx, sy, dx, dy;
|
|
96
|
+
if (tx.startsWith('matrix3d(')) {
|
|
97
|
+
ta = tx.slice(9, -1).split(/, /);
|
|
98
|
+
sx = Number(ta[0]);
|
|
99
|
+
sy = Number(ta[5]);
|
|
100
|
+
dx = Number(ta[12]);
|
|
101
|
+
dy = Number(ta[13]);
|
|
102
|
+
} else if (tx.startsWith('matrix(')) {
|
|
103
|
+
ta = tx.slice(7, -1).split(/, /);
|
|
104
|
+
sx = Number(ta[0]);
|
|
105
|
+
sy = Number(ta[3]);
|
|
106
|
+
dx = Number(ta[4]);
|
|
107
|
+
dy = Number(ta[5]);
|
|
108
|
+
} else {
|
|
109
|
+
return new Box(rect);
|
|
110
|
+
}
|
|
111
|
+
const to = style.transformOrigin;
|
|
112
|
+
const x = rect.x - dx - (1 - sx) * parseFloat(to);
|
|
113
|
+
const y = rect.y - dy - (1 - sy) * parseFloat(to.slice(to.indexOf(' ') + 1));
|
|
114
|
+
const w = sx ? rect.width / sx : el.offsetWidth + 1;
|
|
115
|
+
const h = sy ? rect.height / sy : el.offsetHeight + 1;
|
|
116
|
+
return new Box({
|
|
117
|
+
x,
|
|
118
|
+
y,
|
|
119
|
+
width: w,
|
|
120
|
+
height: h
|
|
121
|
+
});
|
|
122
|
+
} else {
|
|
123
|
+
return new Box(rect);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
function animate(el, keyframes, options) {
|
|
127
|
+
if (typeof el.animate === 'undefined') return {
|
|
128
|
+
finished: Promise.resolve()
|
|
129
|
+
};
|
|
130
|
+
let animation;
|
|
131
|
+
try {
|
|
132
|
+
animation = el.animate(keyframes, options);
|
|
133
|
+
} catch (err) {
|
|
134
|
+
return {
|
|
135
|
+
finished: Promise.resolve()
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
if (typeof animation.finished === 'undefined') {
|
|
139
|
+
animation.finished = new Promise(resolve => {
|
|
140
|
+
animation.onfinish = () => {
|
|
141
|
+
resolve(animation);
|
|
142
|
+
};
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
return animation;
|
|
146
|
+
}
|
|
5
147
|
|
|
6
148
|
// Utilities
|
|
7
149
|
const handlers = new WeakMap();
|
|
@@ -96,7 +238,9 @@ function getScrollParents(el, stopAt) {
|
|
|
96
238
|
function hasScrollbar(el) {
|
|
97
239
|
if (!el || el.nodeType !== Node.ELEMENT_NODE) return false;
|
|
98
240
|
const style = window.getComputedStyle(el);
|
|
99
|
-
|
|
241
|
+
const hasVerticalScrollbar = style.overflowY === 'scroll' || style.overflowY === 'auto' && el.scrollHeight > el.clientHeight;
|
|
242
|
+
const hasHorizontalScrollbar = style.overflowX === 'scroll' || style.overflowX === 'auto' && el.scrollWidth > el.clientWidth;
|
|
243
|
+
return hasVerticalScrollbar || hasHorizontalScrollbar;
|
|
100
244
|
}
|
|
101
245
|
function isPotentiallyScrollable(el) {
|
|
102
246
|
if (!el || el.nodeType !== Node.ELEMENT_NODE) return false;
|
|
@@ -273,7 +417,8 @@ const makeLocationStrategyProps = propsFactory({
|
|
|
273
417
|
type: String,
|
|
274
418
|
default: 'auto'
|
|
275
419
|
},
|
|
276
|
-
offset: [Number, String, Array]
|
|
420
|
+
offset: [Number, String, Array],
|
|
421
|
+
stickToTarget: Boolean
|
|
277
422
|
}, 'VOverlay-location-strategies');
|
|
278
423
|
function useLocationStrategies(props, data) {
|
|
279
424
|
const contentStyles = ref({});
|
|
@@ -423,11 +568,23 @@ function connectedLocationStrategy(data, props, contentStyles) {
|
|
|
423
568
|
const result = updateLocation();
|
|
424
569
|
if (result) flipped.push(result.flipped);
|
|
425
570
|
});
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
571
|
+
let targetBox = new Box({
|
|
572
|
+
x: 0,
|
|
573
|
+
y: 0,
|
|
574
|
+
width: 0,
|
|
575
|
+
height: 0
|
|
576
|
+
});
|
|
577
|
+
watch(data.target, (newTarget, oldTarget) => {
|
|
429
578
|
if (oldTarget && !Array.isArray(oldTarget)) observer.unobserve(oldTarget);
|
|
430
|
-
if (
|
|
579
|
+
if (!Array.isArray(newTarget)) {
|
|
580
|
+
if (newTarget) observer.observe(newTarget);
|
|
581
|
+
} else if (!deepEqual(newTarget, oldTarget)) {
|
|
582
|
+
updateLocation();
|
|
583
|
+
}
|
|
584
|
+
}, {
|
|
585
|
+
immediate: true
|
|
586
|
+
});
|
|
587
|
+
watch(data.contentEl, (newContentEl, oldContentEl) => {
|
|
431
588
|
if (oldContentEl) observer.unobserve(oldContentEl);
|
|
432
589
|
if (newContentEl) observer.observe(newContentEl);
|
|
433
590
|
}, {
|
|
@@ -436,12 +593,6 @@ function connectedLocationStrategy(data, props, contentStyles) {
|
|
|
436
593
|
onScopeDispose(() => {
|
|
437
594
|
observer.disconnect();
|
|
438
595
|
});
|
|
439
|
-
let targetBox = new Box({
|
|
440
|
-
x: 0,
|
|
441
|
-
y: 0,
|
|
442
|
-
width: 0,
|
|
443
|
-
height: 0
|
|
444
|
-
});
|
|
445
596
|
|
|
446
597
|
// eslint-disable-next-line max-statements
|
|
447
598
|
function updateLocation() {
|
|
@@ -588,19 +739,19 @@ function connectedLocationStrategy(data, props, contentStyles) {
|
|
|
588
739
|
|
|
589
740
|
// shift
|
|
590
741
|
if (overflows.x.before) {
|
|
591
|
-
x += overflows.x.before;
|
|
742
|
+
if (!props.stickToTarget) x += overflows.x.before;
|
|
592
743
|
contentBox.x += overflows.x.before;
|
|
593
744
|
}
|
|
594
745
|
if (overflows.x.after) {
|
|
595
|
-
x -= overflows.x.after;
|
|
746
|
+
if (!props.stickToTarget) x -= overflows.x.after;
|
|
596
747
|
contentBox.x -= overflows.x.after;
|
|
597
748
|
}
|
|
598
749
|
if (overflows.y.before) {
|
|
599
|
-
y += overflows.y.before;
|
|
750
|
+
if (!props.stickToTarget) y += overflows.y.before;
|
|
600
751
|
contentBox.y += overflows.y.before;
|
|
601
752
|
}
|
|
602
753
|
if (overflows.y.after) {
|
|
603
|
-
y -= overflows.y.after;
|
|
754
|
+
if (!props.stickToTarget) y -= overflows.y.after;
|
|
604
755
|
contentBox.y -= overflows.y.after;
|
|
605
756
|
}
|
|
606
757
|
|
|
@@ -609,9 +760,9 @@ function connectedLocationStrategy(data, props, contentStyles) {
|
|
|
609
760
|
const overflows = getOverflow(contentBox, viewport);
|
|
610
761
|
available.x = viewport.width - overflows.x.before - overflows.x.after;
|
|
611
762
|
available.y = viewport.height - overflows.y.before - overflows.y.after;
|
|
612
|
-
x += overflows.x.before;
|
|
763
|
+
if (!props.stickToTarget) x += overflows.x.before;
|
|
613
764
|
contentBox.x += overflows.x.before;
|
|
614
|
-
y += overflows.y.before;
|
|
765
|
+
if (!props.stickToTarget) y += overflows.y.before;
|
|
615
766
|
contentBox.y += overflows.y.before;
|
|
616
767
|
}
|
|
617
768
|
break;
|
|
@@ -730,11 +881,12 @@ function closeScrollStrategy(data) {
|
|
|
730
881
|
function onScroll(e) {
|
|
731
882
|
data.isActive.value = false;
|
|
732
883
|
}
|
|
733
|
-
bindScroll(data.
|
|
884
|
+
bindScroll(getTargetEl(data.target.value, data.contentEl.value), onScroll);
|
|
734
885
|
}
|
|
735
886
|
function blockScrollStrategy(data, props) {
|
|
736
887
|
const offsetParent = data.root.value?.offsetParent;
|
|
737
|
-
const
|
|
888
|
+
const target = getTargetEl(data.target.value, data.contentEl.value);
|
|
889
|
+
const scrollElements = [...new Set([...getScrollParents(target, props.contained ? offsetParent : undefined), ...getScrollParents(data.contentEl.value, props.contained ? offsetParent : undefined)])].filter(el => !el.classList.contains('v-overlay-scroll-blocked'));
|
|
738
890
|
const scrollbarWidth = window.innerWidth - document.documentElement.offsetWidth;
|
|
739
891
|
const scrollableParent = (el => hasScrollbar(el) && el)(offsetParent || document.documentElement);
|
|
740
892
|
if (scrollableParent) {
|
|
@@ -781,7 +933,7 @@ function repositionScrollStrategy(data, props, scope) {
|
|
|
781
933
|
}
|
|
782
934
|
ric = (typeof requestIdleCallback === 'undefined' ? cb => cb() : requestIdleCallback)(() => {
|
|
783
935
|
scope.run(() => {
|
|
784
|
-
bindScroll(data.
|
|
936
|
+
bindScroll(getTargetEl(data.target.value, data.contentEl.value), e => {
|
|
785
937
|
if (slow) {
|
|
786
938
|
// If the position calculation is slow,
|
|
787
939
|
// defer updates until scrolling is finished.
|
|
@@ -804,8 +956,9 @@ function repositionScrollStrategy(data, props, scope) {
|
|
|
804
956
|
cancelAnimationFrame(raf);
|
|
805
957
|
});
|
|
806
958
|
}
|
|
807
|
-
|
|
808
|
-
|
|
959
|
+
function getTargetEl(target, contentEl) {
|
|
960
|
+
return Array.isArray(target) ? document.elementsFromPoint(...target).find(el => !contentEl?.contains(el)) : target ?? contentEl;
|
|
961
|
+
}
|
|
809
962
|
function bindScroll(el, onScroll) {
|
|
810
963
|
const scrollElements = [document, ...getScrollParents(el)];
|
|
811
964
|
scrollElements.forEach(el => {
|
|
@@ -1138,6 +1291,35 @@ function useHydration() {
|
|
|
1138
1291
|
}
|
|
1139
1292
|
}
|
|
1140
1293
|
|
|
1294
|
+
// Utilities
|
|
1295
|
+
const makeLazyProps = propsFactory({
|
|
1296
|
+
eager: Boolean
|
|
1297
|
+
}, 'lazy');
|
|
1298
|
+
function useLazy(props, active) {
|
|
1299
|
+
const isBooted = shallowRef(false);
|
|
1300
|
+
const hasContent = toRef(() => isBooted.value || props.eager || active.value);
|
|
1301
|
+
watch(active, () => isBooted.value = true);
|
|
1302
|
+
function onAfterLeave() {
|
|
1303
|
+
if (!props.eager) isBooted.value = false;
|
|
1304
|
+
}
|
|
1305
|
+
return {
|
|
1306
|
+
isBooted,
|
|
1307
|
+
hasContent,
|
|
1308
|
+
onAfterLeave
|
|
1309
|
+
};
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
// Utilities
|
|
1313
|
+
function useScopeId() {
|
|
1314
|
+
const vm = getCurrentInstance('useScopeId');
|
|
1315
|
+
const scopeId = vm.vnode.scopeId;
|
|
1316
|
+
return {
|
|
1317
|
+
scopeId: scopeId ? {
|
|
1318
|
+
[scopeId]: ''
|
|
1319
|
+
} : undefined
|
|
1320
|
+
};
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1141
1323
|
// Composables
|
|
1142
1324
|
const StackSymbol = Symbol.for('vuetify:stack');
|
|
1143
1325
|
const globalStack = reactive([]);
|
|
@@ -1352,6 +1534,7 @@ const VOverlay = genericComponent()({
|
|
|
1352
1534
|
root,
|
|
1353
1535
|
contentEl,
|
|
1354
1536
|
targetEl,
|
|
1537
|
+
target,
|
|
1355
1538
|
isActive,
|
|
1356
1539
|
updateLocation
|
|
1357
1540
|
});
|
|
@@ -1496,4 +1679,101 @@ const VOverlay = genericComponent()({
|
|
|
1496
1679
|
}
|
|
1497
1680
|
});
|
|
1498
1681
|
|
|
1499
|
-
|
|
1682
|
+
// Types
|
|
1683
|
+
|
|
1684
|
+
const Refs = Symbol('Forwarded refs');
|
|
1685
|
+
|
|
1686
|
+
/** Omit properties starting with P */
|
|
1687
|
+
|
|
1688
|
+
/** Omit keyof $props from T */
|
|
1689
|
+
|
|
1690
|
+
function getDescriptor(obj, key) {
|
|
1691
|
+
let currentObj = obj;
|
|
1692
|
+
while (currentObj) {
|
|
1693
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(currentObj, key);
|
|
1694
|
+
if (descriptor) return descriptor;
|
|
1695
|
+
currentObj = Object.getPrototypeOf(currentObj);
|
|
1696
|
+
}
|
|
1697
|
+
return undefined;
|
|
1698
|
+
}
|
|
1699
|
+
function forwardRefs(target) {
|
|
1700
|
+
for (var _len = arguments.length, refs = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
1701
|
+
refs[_key - 1] = arguments[_key];
|
|
1702
|
+
}
|
|
1703
|
+
target[Refs] = refs;
|
|
1704
|
+
return new Proxy(target, {
|
|
1705
|
+
get(target, key) {
|
|
1706
|
+
if (Reflect.has(target, key)) {
|
|
1707
|
+
return Reflect.get(target, key);
|
|
1708
|
+
}
|
|
1709
|
+
|
|
1710
|
+
// Skip internal properties
|
|
1711
|
+
if (typeof key === 'symbol' || key.startsWith('$') || key.startsWith('__')) return;
|
|
1712
|
+
for (const ref of refs) {
|
|
1713
|
+
if (ref.value && Reflect.has(ref.value, key)) {
|
|
1714
|
+
const val = Reflect.get(ref.value, key);
|
|
1715
|
+
return typeof val === 'function' ? val.bind(ref.value) : val;
|
|
1716
|
+
}
|
|
1717
|
+
}
|
|
1718
|
+
},
|
|
1719
|
+
has(target, key) {
|
|
1720
|
+
if (Reflect.has(target, key)) {
|
|
1721
|
+
return true;
|
|
1722
|
+
}
|
|
1723
|
+
|
|
1724
|
+
// Skip internal properties
|
|
1725
|
+
if (typeof key === 'symbol' || key.startsWith('$') || key.startsWith('__')) return false;
|
|
1726
|
+
for (const ref of refs) {
|
|
1727
|
+
if (ref.value && Reflect.has(ref.value, key)) {
|
|
1728
|
+
return true;
|
|
1729
|
+
}
|
|
1730
|
+
}
|
|
1731
|
+
return false;
|
|
1732
|
+
},
|
|
1733
|
+
set(target, key, value) {
|
|
1734
|
+
if (Reflect.has(target, key)) {
|
|
1735
|
+
return Reflect.set(target, key, value);
|
|
1736
|
+
}
|
|
1737
|
+
|
|
1738
|
+
// Skip internal properties
|
|
1739
|
+
if (typeof key === 'symbol' || key.startsWith('$') || key.startsWith('__')) return false;
|
|
1740
|
+
for (const ref of refs) {
|
|
1741
|
+
if (ref.value && Reflect.has(ref.value, key)) {
|
|
1742
|
+
return Reflect.set(ref.value, key, value);
|
|
1743
|
+
}
|
|
1744
|
+
}
|
|
1745
|
+
return false;
|
|
1746
|
+
},
|
|
1747
|
+
getOwnPropertyDescriptor(target, key) {
|
|
1748
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(target, key);
|
|
1749
|
+
if (descriptor) return descriptor;
|
|
1750
|
+
|
|
1751
|
+
// Skip internal properties
|
|
1752
|
+
if (typeof key === 'symbol' || key.startsWith('$') || key.startsWith('__')) return;
|
|
1753
|
+
|
|
1754
|
+
// Check each ref's own properties
|
|
1755
|
+
for (const ref of refs) {
|
|
1756
|
+
if (!ref.value) continue;
|
|
1757
|
+
const descriptor = getDescriptor(ref.value, key) ?? ('_' in ref.value ? getDescriptor(ref.value._?.setupState, key) : undefined);
|
|
1758
|
+
if (descriptor) return descriptor;
|
|
1759
|
+
}
|
|
1760
|
+
|
|
1761
|
+
// Recursive search up each ref's prototype
|
|
1762
|
+
for (const ref of refs) {
|
|
1763
|
+
const childRefs = ref.value && ref.value[Refs];
|
|
1764
|
+
if (!childRefs) continue;
|
|
1765
|
+
const queue = childRefs.slice();
|
|
1766
|
+
while (queue.length) {
|
|
1767
|
+
const ref = queue.shift();
|
|
1768
|
+
const descriptor = getDescriptor(ref.value, key);
|
|
1769
|
+
if (descriptor) return descriptor;
|
|
1770
|
+
const childRefs = ref.value && ref.value[Refs];
|
|
1771
|
+
if (childRefs) queue.push(...childRefs);
|
|
1772
|
+
}
|
|
1773
|
+
}
|
|
1774
|
+
return undefined;
|
|
1775
|
+
}
|
|
1776
|
+
});
|
|
1777
|
+
}
|
|
1778
|
+
|
|
1779
|
+
export { VOverlay as V, animate as a, forwardRefs as f, getTargetBox as g, makeVOverlayProps as m, nullifyTransforms as n, useScopeId as u };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import log from 'loglevel';
|
|
2
|
-
import { s as separateEndpointLinks, c as createTiffLayerDefinition, p as pollProcessStatus, e as extractAsyncResults, u as updateJobsStatus, a as creatAsyncProcessLayerDefinitions, g as getBboxProperty, b as generateTimePairs, f as updateJsonformSchemaTarget, h as extractGeometries, i as applyProcessLayersToMap } from './async-
|
|
3
|
-
import {
|
|
2
|
+
import { s as separateEndpointLinks, c as createTiffLayerDefinition, p as pollProcessStatus, e as extractAsyncResults, u as updateJobsStatus, a as creatAsyncProcessLayerDefinitions, g as getBboxProperty, b as generateTimePairs, f as updateJsonformSchemaTarget, h as extractGeometries, i as applyProcessLayersToMap } from './async-BA7oWCMX.js';
|
|
3
|
+
import { j as axios, a as extractLayerConfig, G as compareIndicator, E as indicator, w as extractCollectionUrls, F as currentCompareUrl, z as currentUrl, x as generateLinksFromItems, n as getDatetimeProperty, A as datetime, H as comparePoi, B as poi } from './helpers-CtE0W7iu.js';
|
|
4
4
|
import mustache from 'mustache';
|
|
5
|
-
import {
|
|
5
|
+
import { Q as isFirstLoad, E as useSTAcStore, S as readParquetItems, T as useGetSubCodeId } from './asWebComponent-CWbNRdf9.js';
|
|
6
6
|
import { toAbsolute } from 'stac-js/src/http.js';
|
|
7
7
|
|
|
8
8
|
////// --- CHARTS --- //////
|
|
@@ -227,7 +227,7 @@ async function processGeoTiff({
|
|
|
227
227
|
}) {
|
|
228
228
|
if (!links) return;
|
|
229
229
|
|
|
230
|
-
const [geotiffLinks
|
|
230
|
+
const [geotiffLinks] = separateEndpointLinks(
|
|
231
231
|
links,
|
|
232
232
|
"service",
|
|
233
233
|
"image/tiff",
|
|
@@ -323,6 +323,7 @@ async function processVector(links, jsonformValue, layerId) {
|
|
|
323
323
|
type: "Vector",
|
|
324
324
|
source: {
|
|
325
325
|
type: "Vector",
|
|
326
|
+
//@ts-expect-error TODO
|
|
326
327
|
url: mustache.render(link.href, {
|
|
327
328
|
...(jsonformValue ?? {}),
|
|
328
329
|
}),
|
|
@@ -856,7 +857,25 @@ async function fetchVedaCOGsConfig(selectedStac, absoluteUrl) {
|
|
|
856
857
|
collectionLinks.map((link) =>
|
|
857
858
|
axios
|
|
858
859
|
.get(toAbsolute(link.href, absoluteUrl))
|
|
859
|
-
.then((resp) => resp.data)
|
|
860
|
+
.then((resp) => resp.data)
|
|
861
|
+
.then(async (collection) => {
|
|
862
|
+
// items in geoparquet handling specially to get item links
|
|
863
|
+
const parquetAsset = Object.values(collection.assets ?? {}).find(
|
|
864
|
+
(asset) =>
|
|
865
|
+
asset.type === "application/vnd.apache.parquet" &&
|
|
866
|
+
asset.roles?.includes("collection-mirror"),
|
|
867
|
+
);
|
|
868
|
+
if (parquetAsset) {
|
|
869
|
+
const parquetAbsoluteUrl = toAbsolute(
|
|
870
|
+
parquetAsset.href,
|
|
871
|
+
toAbsolute(link.href, absoluteUrl),
|
|
872
|
+
);
|
|
873
|
+
await readParquetItems(parquetAbsoluteUrl).then((items) => {
|
|
874
|
+
collection.links.push(...generateLinksFromItems(items));
|
|
875
|
+
});
|
|
876
|
+
}
|
|
877
|
+
return collection;
|
|
878
|
+
}),
|
|
860
879
|
),
|
|
861
880
|
)),
|
|
862
881
|
);
|
|
@@ -867,7 +886,7 @@ async function fetchVedaCOGsConfig(selectedStac, absoluteUrl) {
|
|
|
867
886
|
const datetimeProperty = /** @type string **/ (
|
|
868
887
|
getDatetimeProperty(collection.links)
|
|
869
888
|
);
|
|
870
|
-
|
|
889
|
+
const itemLinks = collection.links.filter((link) => link.rel == "item");
|
|
871
890
|
configs.push(
|
|
872
891
|
...itemLinks.map((link) => ({
|
|
873
892
|
endpoint: /** @type {string} */ (link["cog_href"]),
|
|
@@ -1090,7 +1109,9 @@ async function handleProcesses({
|
|
|
1090
1109
|
for (const layer of newLayers) {
|
|
1091
1110
|
if (layer.type === "WebGLTile" && layer.source?.type === "GeoTIFF") {
|
|
1092
1111
|
processResults.value.push(...(layer.source.sources ?? []));
|
|
1112
|
+
//@ts-expect-error TODO
|
|
1093
1113
|
} else if (layer.source && "url" in layer.source) {
|
|
1114
|
+
//@ts-expect-error TODO
|
|
1094
1115
|
processResults.value.push(layer.source.url);
|
|
1095
1116
|
}
|
|
1096
1117
|
}
|