@eodash/eodash 5.3.3 → 5.5.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/asWebComponent.js +1 -1
- package/core/client/composables/DefineEodash.js +3 -1
- package/core/client/composables/DefineWidgets.js +12 -2
- package/core/client/eodashSTAC/EodashCollection.js +20 -37
- package/core/client/eodashSTAC/createLayers.js +306 -136
- package/core/client/eodashSTAC/helpers.js +60 -40
- package/core/client/eodashSTAC/parquet.js +2 -0
- package/core/client/eodashSTAC/triggers.js +5 -5
- package/core/client/store/actions.js +17 -17
- package/core/client/store/states.js +26 -4
- package/core/client/types.ts +12 -1
- package/core/client/utils/index.js +18 -1
- package/dist/client/{DashboardLayout-Cp8Rv3Ef.js → DashboardLayout-CkSgvaFF.js} +2 -2
- package/dist/client/{DynamicWebComponent-CBsxC82P.js → DynamicWebComponent-Ncsg6fb9.js} +1 -1
- package/dist/client/EodashChart-5v7adDpG.js +144 -0
- package/dist/client/{EodashDatePicker-Dewym-cx.js → EodashDatePicker-RoQJe6ss.js} +4 -4
- package/dist/client/{EodashItemFilter-CAsZpOoQ.js → EodashItemFilter-CCoVC5BE.js} +2 -2
- package/dist/client/{EodashLayerControl-fn-rt8Ac.js → EodashLayerControl-weVj7aQA.js} +2 -2
- package/dist/client/{EodashLayoutSwitcher-B9XqQXCS.js → EodashLayoutSwitcher-CL-Z9d5_.js} +3 -3
- package/dist/client/EodashMapBtns-CXU8IuPO.js +433 -0
- package/dist/client/{EodashStacInfo-lxBKoav9.js → EodashStacInfo-BbMnjf-n.js} +11 -15
- package/dist/client/{EodashTimeSlider-DI97QkNT.js → EodashTimeSlider-BZXnqfax.js} +2 -2
- package/dist/client/{EodashTools-D5ShUT1g.js → EodashTools-DUJlkkgx.js} +4 -4
- package/dist/client/{ExportState-ruNyRS2E.js → ExportState-CT3FQOHW.js} +46 -21
- package/dist/client/{Footer-IQNyfd78.js → Footer-D_iqP-1K.js} +1 -1
- package/dist/client/{Header-BBdi_-Lp.js → Header-Dzhnvsy-.js} +127 -17
- package/dist/client/MobileLayout-6Rg_PSO8.js +118 -0
- package/dist/client/{PopUp-DRgOmD7-.js → PopUp-DPPv_GSA.js} +8 -59
- package/dist/client/{ProcessList-DxyCFQdz.js → ProcessList-BIN_Mb27.js} +9 -13
- package/dist/client/{VImg-hwmwzSwG.js → VImg-DhbuvNrA.js} +2 -2
- package/dist/client/{VMain-vk4-rkw-.js → VMain-CVabY_NY.js} +1 -1
- package/dist/client/{VTooltip-BYUZeia1.js → VTooltip-Cc6au3Sn.js} +3 -4
- package/dist/client/{WidgetsContainer-DXD_8rqh.js → WidgetsContainer-ChqTJS4h.js} +1 -1
- package/dist/client/asWebComponent-DaIxULaA.js +9207 -0
- package/dist/client/{async-D1MvO_Z_.js → async-D6Lvv-fT.js} +15 -5
- package/dist/client/eo-dash.js +1 -1
- package/dist/client/{forwardRefs-DM-E2MfG.js → forwardRefs--IccUBdR.js} +196 -37
- package/dist/client/{handling-CbgeKrqT.js → handling-DSA67d6E.js} +160 -37
- package/dist/client/{helpers-CtUlAW0N.js → helpers-BBSdbOmv.js} +239 -126
- package/dist/client/{index-DBo0F4Fv.js → index-6LlXNkke.js} +5 -3
- package/dist/client/{index-BJvLt3Xf.js → index-BS-8Y5FE.js} +34 -77
- package/dist/client/{index-BkW06-Lg.js → index-CQihL_c6.js} +55 -15
- package/dist/client/{index-BxDh5v-H.js → index-qsZhYR_6.js} +15 -16
- package/dist/client/templates.js +52 -2
- package/dist/client/{transition-BdzATvPB.js → transition-DFr4cXu8.js} +1 -1
- package/dist/node/cli.js +1 -1
- package/dist/types/core/client/App.vue.d.ts +16 -6
- package/dist/types/core/client/asWebComponent.d.ts +2 -2
- package/dist/types/core/client/components/DashboardLayout.vue.d.ts +2 -1
- package/dist/types/core/client/components/DynamicWebComponent.vue.d.ts +36 -16
- package/dist/types/core/client/components/EodashOverlay.vue.d.ts +2 -1
- package/dist/types/core/client/components/ErrorAlert.vue.d.ts +9 -1
- package/dist/types/core/client/components/Footer.vue.d.ts +2 -1
- package/dist/types/core/client/components/Header.vue.d.ts +2 -1
- package/dist/types/core/client/components/IframeWrapper.vue.d.ts +12 -6
- package/dist/types/core/client/components/Loading.vue.d.ts +2 -1
- package/dist/types/core/client/components/MobileLayout.vue.d.ts +2 -1
- package/dist/types/core/client/composables/DefineEodash.d.ts +1 -1
- package/dist/types/core/client/eodashSTAC/EodashCollection.d.ts +27 -11
- package/dist/types/core/client/eodashSTAC/createLayers.d.ts +30 -23
- package/dist/types/core/client/eodashSTAC/helpers.d.ts +11 -4
- package/dist/types/core/client/store/actions.d.ts +1 -2
- package/dist/types/core/client/store/states.d.ts +22 -4
- package/dist/types/core/client/types.d.ts +7 -2
- package/dist/types/core/client/utils/index.d.ts +1 -0
- package/dist/types/core/client/views/Dashboard.vue.d.ts +20 -8
- package/dist/types/templates/compare.d.ts +20 -0
- package/dist/types/templates/expert.d.ts +30 -1
- package/dist/types/widgets/EodashChart.vue.d.ts +28 -0
- package/dist/types/widgets/EodashDatePicker.vue.d.ts +38 -9
- package/dist/types/widgets/EodashItemCatalog/index.vue.d.ts +88 -13
- package/dist/types/widgets/EodashItemCatalog/methods/map.d.ts +1 -1
- package/dist/types/widgets/EodashItemFilter.vue.d.ts +169 -26
- package/dist/types/widgets/EodashLayerControl.vue.d.ts +38 -10
- package/dist/types/widgets/EodashLayoutSwitcher.vue.d.ts +22 -7
- package/dist/types/widgets/EodashMap/EodashMapBtns.vue.d.ts +94 -19
- package/dist/types/widgets/EodashMap/index.vue.d.ts +647 -92
- package/dist/types/widgets/EodashMap/methods/btns.d.ts +14 -0
- package/dist/types/widgets/EodashProcess/ProcessList.vue.d.ts +24 -7
- package/dist/types/widgets/EodashProcess/index.vue.d.ts +26 -7
- package/dist/types/widgets/EodashProcess/methods/composables.d.ts +1 -2
- package/dist/types/widgets/EodashProcess/methods/handling.d.ts +18 -11
- package/dist/types/widgets/EodashProcess/methods/outputs.d.ts +2 -2
- package/dist/types/widgets/EodashProcess/methods/utils.d.ts +1 -0
- package/dist/types/widgets/EodashStacInfo.vue.d.ts +67 -18
- package/dist/types/widgets/EodashTimeSlider.vue.d.ts +14 -6
- package/dist/types/widgets/EodashTools.vue.d.ts +437 -47
- package/dist/types/widgets/ExportState.vue.d.ts +26 -8
- package/dist/types/widgets/PopUp.vue.d.ts +61 -11
- package/dist/types/widgets/WidgetsContainer.vue.d.ts +22 -6
- package/package.json +33 -34
- package/templates/baseConfig.js +2 -1
- package/templates/compare.js +28 -1
- package/templates/expert.js +23 -1
- package/widgets/EodashChart.vue +139 -0
- package/widgets/EodashItemCatalog/index.vue +2 -2
- package/widgets/EodashItemCatalog/methods/map.js +9 -10
- package/widgets/EodashMap/EodashMapBtns.vue +73 -93
- package/widgets/EodashMap/index.vue +14 -2
- package/widgets/EodashMap/methods/btns.js +155 -0
- package/widgets/EodashMap/methods/create-layers-config.js +26 -3
- package/widgets/EodashMap/methods/index.js +2 -1
- package/widgets/EodashProcess/ProcessList.vue +2 -3
- package/widgets/EodashProcess/index.vue +19 -70
- package/widgets/EodashProcess/methods/async.js +1 -1
- package/widgets/EodashProcess/methods/composables.js +13 -6
- package/widgets/EodashProcess/methods/custom-endpoints/chart/veda-endpoint.js +20 -7
- package/widgets/EodashProcess/methods/handling.js +100 -22
- package/widgets/EodashProcess/methods/outputs.js +44 -4
- package/widgets/EodashProcess/methods/utils.js +11 -1
- package/widgets/EodashStacInfo.vue +10 -23
- package/widgets/ExportState.vue +9 -15
- package/dist/client/EodashMapBtns-nFY6MIAX.js +0 -301
- package/dist/client/MobileLayout-BfBeF-JF.js +0 -118
- package/dist/client/asWebComponent-DdguWGDI.js +0 -8967
|
@@ -3,6 +3,13 @@ import { setupCache } from 'axios-cache-interceptor';
|
|
|
3
3
|
import log from 'loglevel';
|
|
4
4
|
import { ref, shallowRef } from 'vue';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* Create a bound version of a function with a specified `this` context
|
|
8
|
+
*
|
|
9
|
+
* @param {Function} fn - The function to bind
|
|
10
|
+
* @param {*} thisArg - The value to be passed as the `this` parameter
|
|
11
|
+
* @returns {Function} A new function that will call the original function with the specified `this` context
|
|
12
|
+
*/
|
|
6
13
|
function bind(fn, thisArg) {
|
|
7
14
|
return function wrap() {
|
|
8
15
|
return fn.apply(thisArg, arguments);
|
|
@@ -1255,7 +1262,7 @@ class InterceptorManager {
|
|
|
1255
1262
|
*
|
|
1256
1263
|
* @param {Number} id The ID that was returned by `use`
|
|
1257
1264
|
*
|
|
1258
|
-
* @returns {
|
|
1265
|
+
* @returns {void}
|
|
1259
1266
|
*/
|
|
1260
1267
|
eject(id) {
|
|
1261
1268
|
if (this.handlers[id]) {
|
|
@@ -2215,27 +2222,38 @@ const cookies = platform.hasStandardBrowserEnv ?
|
|
|
2215
2222
|
|
|
2216
2223
|
// Standard browser envs support document.cookie
|
|
2217
2224
|
{
|
|
2218
|
-
write(name, value, expires, path, domain, secure) {
|
|
2219
|
-
|
|
2225
|
+
write(name, value, expires, path, domain, secure, sameSite) {
|
|
2226
|
+
if (typeof document === 'undefined') return;
|
|
2220
2227
|
|
|
2221
|
-
|
|
2228
|
+
const cookie = [`${name}=${encodeURIComponent(value)}`];
|
|
2222
2229
|
|
|
2223
|
-
utils$1.
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2230
|
+
if (utils$1.isNumber(expires)) {
|
|
2231
|
+
cookie.push(`expires=${new Date(expires).toUTCString()}`);
|
|
2232
|
+
}
|
|
2233
|
+
if (utils$1.isString(path)) {
|
|
2234
|
+
cookie.push(`path=${path}`);
|
|
2235
|
+
}
|
|
2236
|
+
if (utils$1.isString(domain)) {
|
|
2237
|
+
cookie.push(`domain=${domain}`);
|
|
2238
|
+
}
|
|
2239
|
+
if (secure === true) {
|
|
2240
|
+
cookie.push('secure');
|
|
2241
|
+
}
|
|
2242
|
+
if (utils$1.isString(sameSite)) {
|
|
2243
|
+
cookie.push(`SameSite=${sameSite}`);
|
|
2244
|
+
}
|
|
2228
2245
|
|
|
2229
2246
|
document.cookie = cookie.join('; ');
|
|
2230
2247
|
},
|
|
2231
2248
|
|
|
2232
2249
|
read(name) {
|
|
2233
|
-
|
|
2234
|
-
|
|
2250
|
+
if (typeof document === 'undefined') return null;
|
|
2251
|
+
const match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));
|
|
2252
|
+
return match ? decodeURIComponent(match[1]) : null;
|
|
2235
2253
|
},
|
|
2236
2254
|
|
|
2237
2255
|
remove(name) {
|
|
2238
|
-
this.write(name, '', Date.now() - 86400000);
|
|
2256
|
+
this.write(name, '', Date.now() - 86400000, '/');
|
|
2239
2257
|
}
|
|
2240
2258
|
}
|
|
2241
2259
|
|
|
@@ -2324,11 +2342,11 @@ function mergeConfig(config1, config2) {
|
|
|
2324
2342
|
}
|
|
2325
2343
|
|
|
2326
2344
|
// eslint-disable-next-line consistent-return
|
|
2327
|
-
function mergeDeepProperties(a, b, prop
|
|
2345
|
+
function mergeDeepProperties(a, b, prop, caseless) {
|
|
2328
2346
|
if (!utils$1.isUndefined(b)) {
|
|
2329
|
-
return getMergedValue(a, b, prop
|
|
2347
|
+
return getMergedValue(a, b, prop, caseless);
|
|
2330
2348
|
} else if (!utils$1.isUndefined(a)) {
|
|
2331
|
-
return getMergedValue(undefined, a, prop
|
|
2349
|
+
return getMergedValue(undefined, a, prop, caseless);
|
|
2332
2350
|
}
|
|
2333
2351
|
}
|
|
2334
2352
|
|
|
@@ -2386,7 +2404,7 @@ function mergeConfig(config1, config2) {
|
|
|
2386
2404
|
socketPath: defaultToConfig2,
|
|
2387
2405
|
responseEncoding: defaultToConfig2,
|
|
2388
2406
|
validateStatus: mergeDirectKeys,
|
|
2389
|
-
headers: (a, b
|
|
2407
|
+
headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
|
|
2390
2408
|
};
|
|
2391
2409
|
|
|
2392
2410
|
utils$1.forEach(Object.keys({...config1, ...config2}), function computeConfigValue(prop) {
|
|
@@ -3024,7 +3042,7 @@ const factory = (env) => {
|
|
|
3024
3042
|
const seedCache = new Map();
|
|
3025
3043
|
|
|
3026
3044
|
const getFetch = (config) => {
|
|
3027
|
-
let env = config
|
|
3045
|
+
let env = (config && config.env) || {};
|
|
3028
3046
|
const {fetch, Request, Response} = env;
|
|
3029
3047
|
const seeds = [
|
|
3030
3048
|
Request, Response, fetch
|
|
@@ -3047,6 +3065,15 @@ const getFetch = (config) => {
|
|
|
3047
3065
|
|
|
3048
3066
|
getFetch();
|
|
3049
3067
|
|
|
3068
|
+
/**
|
|
3069
|
+
* Known adapters mapping.
|
|
3070
|
+
* Provides environment-specific adapters for Axios:
|
|
3071
|
+
* - `http` for Node.js
|
|
3072
|
+
* - `xhr` for browsers
|
|
3073
|
+
* - `fetch` for fetch API-based requests
|
|
3074
|
+
*
|
|
3075
|
+
* @type {Object<string, Function|Object>}
|
|
3076
|
+
*/
|
|
3050
3077
|
const knownAdapters = {
|
|
3051
3078
|
http: httpAdapter,
|
|
3052
3079
|
xhr: xhrAdapter,
|
|
@@ -3055,71 +3082,107 @@ const knownAdapters = {
|
|
|
3055
3082
|
}
|
|
3056
3083
|
};
|
|
3057
3084
|
|
|
3085
|
+
// Assign adapter names for easier debugging and identification
|
|
3058
3086
|
utils$1.forEach(knownAdapters, (fn, value) => {
|
|
3059
3087
|
if (fn) {
|
|
3060
3088
|
try {
|
|
3061
|
-
Object.defineProperty(fn, 'name', {value});
|
|
3089
|
+
Object.defineProperty(fn, 'name', { value });
|
|
3062
3090
|
} catch (e) {
|
|
3063
3091
|
// eslint-disable-next-line no-empty
|
|
3064
3092
|
}
|
|
3065
|
-
Object.defineProperty(fn, 'adapterName', {value});
|
|
3093
|
+
Object.defineProperty(fn, 'adapterName', { value });
|
|
3066
3094
|
}
|
|
3067
3095
|
});
|
|
3068
3096
|
|
|
3097
|
+
/**
|
|
3098
|
+
* Render a rejection reason string for unknown or unsupported adapters
|
|
3099
|
+
*
|
|
3100
|
+
* @param {string} reason
|
|
3101
|
+
* @returns {string}
|
|
3102
|
+
*/
|
|
3069
3103
|
const renderReason = (reason) => `- ${reason}`;
|
|
3070
3104
|
|
|
3105
|
+
/**
|
|
3106
|
+
* Check if the adapter is resolved (function, null, or false)
|
|
3107
|
+
*
|
|
3108
|
+
* @param {Function|null|false} adapter
|
|
3109
|
+
* @returns {boolean}
|
|
3110
|
+
*/
|
|
3071
3111
|
const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
|
|
3072
3112
|
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3113
|
+
/**
|
|
3114
|
+
* Get the first suitable adapter from the provided list.
|
|
3115
|
+
* Tries each adapter in order until a supported one is found.
|
|
3116
|
+
* Throws an AxiosError if no adapter is suitable.
|
|
3117
|
+
*
|
|
3118
|
+
* @param {Array<string|Function>|string|Function} adapters - Adapter(s) by name or function.
|
|
3119
|
+
* @param {Object} config - Axios request configuration
|
|
3120
|
+
* @throws {AxiosError} If no suitable adapter is available
|
|
3121
|
+
* @returns {Function} The resolved adapter function
|
|
3122
|
+
*/
|
|
3123
|
+
function getAdapter(adapters, config) {
|
|
3124
|
+
adapters = utils$1.isArray(adapters) ? adapters : [adapters];
|
|
3080
3125
|
|
|
3081
|
-
|
|
3126
|
+
const { length } = adapters;
|
|
3127
|
+
let nameOrAdapter;
|
|
3128
|
+
let adapter;
|
|
3082
3129
|
|
|
3083
|
-
|
|
3084
|
-
nameOrAdapter = adapters[i];
|
|
3085
|
-
let id;
|
|
3130
|
+
const rejectedReasons = {};
|
|
3086
3131
|
|
|
3087
|
-
|
|
3132
|
+
for (let i = 0; i < length; i++) {
|
|
3133
|
+
nameOrAdapter = adapters[i];
|
|
3134
|
+
let id;
|
|
3088
3135
|
|
|
3089
|
-
|
|
3090
|
-
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
3136
|
+
adapter = nameOrAdapter;
|
|
3091
3137
|
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
}
|
|
3095
|
-
}
|
|
3138
|
+
if (!isResolvedHandle(nameOrAdapter)) {
|
|
3139
|
+
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
3096
3140
|
|
|
3097
|
-
if (adapter
|
|
3098
|
-
|
|
3141
|
+
if (adapter === undefined) {
|
|
3142
|
+
throw new AxiosError(`Unknown adapter '${id}'`);
|
|
3099
3143
|
}
|
|
3144
|
+
}
|
|
3100
3145
|
|
|
3101
|
-
|
|
3146
|
+
if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) {
|
|
3147
|
+
break;
|
|
3102
3148
|
}
|
|
3103
3149
|
|
|
3104
|
-
|
|
3150
|
+
rejectedReasons[id || '#' + i] = adapter;
|
|
3151
|
+
}
|
|
3105
3152
|
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
)
|
|
3153
|
+
if (!adapter) {
|
|
3154
|
+
const reasons = Object.entries(rejectedReasons)
|
|
3155
|
+
.map(([id, state]) => `adapter ${id} ` +
|
|
3156
|
+
(state === false ? 'is not supported by the environment' : 'is not available in the build')
|
|
3157
|
+
);
|
|
3110
3158
|
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3159
|
+
let s = length ?
|
|
3160
|
+
(reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) :
|
|
3161
|
+
'as no adapter specified';
|
|
3114
3162
|
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3163
|
+
throw new AxiosError(
|
|
3164
|
+
`There is no suitable adapter to dispatch the request ` + s,
|
|
3165
|
+
'ERR_NOT_SUPPORT'
|
|
3166
|
+
);
|
|
3167
|
+
}
|
|
3120
3168
|
|
|
3121
|
-
|
|
3122
|
-
|
|
3169
|
+
return adapter;
|
|
3170
|
+
}
|
|
3171
|
+
|
|
3172
|
+
/**
|
|
3173
|
+
* Exports Axios adapters and utility to resolve an adapter
|
|
3174
|
+
*/
|
|
3175
|
+
const adapters = {
|
|
3176
|
+
/**
|
|
3177
|
+
* Resolve an adapter from a list of adapter names or functions.
|
|
3178
|
+
* @type {Function}
|
|
3179
|
+
*/
|
|
3180
|
+
getAdapter,
|
|
3181
|
+
|
|
3182
|
+
/**
|
|
3183
|
+
* Exposes all known adapters
|
|
3184
|
+
* @type {Object<string, Function|Object>}
|
|
3185
|
+
*/
|
|
3123
3186
|
adapters: knownAdapters
|
|
3124
3187
|
};
|
|
3125
3188
|
|
|
@@ -3196,7 +3259,7 @@ function dispatchRequest(config) {
|
|
|
3196
3259
|
});
|
|
3197
3260
|
}
|
|
3198
3261
|
|
|
3199
|
-
const VERSION = "1.
|
|
3262
|
+
const VERSION = "1.13.2";
|
|
3200
3263
|
|
|
3201
3264
|
const validators$1 = {};
|
|
3202
3265
|
|
|
@@ -3751,6 +3814,12 @@ const HttpStatusCode = {
|
|
|
3751
3814
|
LoopDetected: 508,
|
|
3752
3815
|
NotExtended: 510,
|
|
3753
3816
|
NetworkAuthenticationRequired: 511,
|
|
3817
|
+
WebServerIsDown: 521,
|
|
3818
|
+
ConnectionTimedOut: 522,
|
|
3819
|
+
OriginIsUnreachable: 523,
|
|
3820
|
+
TimeoutOccurred: 524,
|
|
3821
|
+
SslHandshakeFailed: 525,
|
|
3822
|
+
InvalidSslCertificate: 526,
|
|
3754
3823
|
};
|
|
3755
3824
|
|
|
3756
3825
|
Object.entries(HttpStatusCode).forEach(([key, value]) => {
|
|
@@ -3873,24 +3942,50 @@ const poi = ref("");
|
|
|
3873
3942
|
*/
|
|
3874
3943
|
const comparePoi = ref("");
|
|
3875
3944
|
|
|
3876
|
-
/**
|
|
3877
|
-
const
|
|
3945
|
+
/** Whether the map is in globe mode */
|
|
3946
|
+
const isGlobe = ref(false);
|
|
3947
|
+
|
|
3948
|
+
/** Whether the charts are in fullscreen mode
|
|
3949
|
+
* @type {import("vue").Ref<boolean>}
|
|
3950
|
+
*/
|
|
3951
|
+
const areChartsSeparateLayout = ref(false);
|
|
3878
3952
|
|
|
3879
|
-
/**
|
|
3880
|
-
|
|
3953
|
+
/** Holds main chart data
|
|
3954
|
+
* @type {import("vue").Ref<Record<string,any>|null>}
|
|
3955
|
+
*/
|
|
3956
|
+
const chartData = ref(null);
|
|
3957
|
+
|
|
3958
|
+
/** Holds compare chart data
|
|
3959
|
+
* @type {import("vue").Ref<Record<string,any>|null>}
|
|
3960
|
+
*/
|
|
3961
|
+
const compareChartData = ref(null);
|
|
3962
|
+
|
|
3963
|
+
/** Holds main chart spec
|
|
3964
|
+
* @type {import("vue").Ref<import("vega-embed").VisualizationSpec | null>}
|
|
3965
|
+
*/
|
|
3966
|
+
const chartSpec = ref(null);
|
|
3967
|
+
|
|
3968
|
+
/** Holds compare chart spec
|
|
3969
|
+
* @type {import("vue").Ref<import("vega-embed").VisualizationSpec | null>}
|
|
3970
|
+
*/
|
|
3971
|
+
const compareChartSpec = ref(null);
|
|
3881
3972
|
|
|
3882
3973
|
const states = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
3883
3974
|
__proto__: null,
|
|
3884
3975
|
activeTemplate,
|
|
3976
|
+
areChartsSeparateLayout,
|
|
3885
3977
|
availableMapProjection,
|
|
3886
|
-
|
|
3887
|
-
|
|
3978
|
+
chartData,
|
|
3979
|
+
chartSpec,
|
|
3980
|
+
compareChartData,
|
|
3981
|
+
compareChartSpec,
|
|
3888
3982
|
compareIndicator,
|
|
3889
3983
|
comparePoi,
|
|
3890
3984
|
currentCompareUrl,
|
|
3891
3985
|
currentUrl,
|
|
3892
3986
|
datetime,
|
|
3893
3987
|
indicator,
|
|
3988
|
+
isGlobe,
|
|
3894
3989
|
mapCompareEl,
|
|
3895
3990
|
mapEl,
|
|
3896
3991
|
mapPosition,
|
|
@@ -3902,26 +3997,13 @@ const states = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
3902
3997
|
* Returns the current layers of {@link mapEl}
|
|
3903
3998
|
* @returns {import("@eox/map").EoxLayer[]}
|
|
3904
3999
|
*/
|
|
3905
|
-
const getLayers = () => mapEl.value?.layers
|
|
4000
|
+
const getLayers = () => mapEl.value?.layers ?? [];
|
|
3906
4001
|
|
|
3907
4002
|
/**
|
|
3908
4003
|
* Returns the current layers of {@link mapCompareEl}
|
|
3909
4004
|
* * @returns {import("@eox/map").EoxLayer[]}
|
|
3910
4005
|
*/
|
|
3911
|
-
const getCompareLayers = () =>
|
|
3912
|
-
mapCompareEl.value?.layers.toReversed() ?? [];
|
|
3913
|
-
|
|
3914
|
-
/**
|
|
3915
|
-
* Returns the current chart spec from {@link chartEl}
|
|
3916
|
-
* @returns {import("vega-embed").VisualizationSpec | null}
|
|
3917
|
-
*/
|
|
3918
|
-
const getChartSpec = () => chartEl.value?.spec ?? null;
|
|
3919
|
-
|
|
3920
|
-
/**
|
|
3921
|
-
* Returns the current chart spec from {@link compareChartEl}
|
|
3922
|
-
* @returns {import("vega-embed").VisualizationSpec | null}
|
|
3923
|
-
*/
|
|
3924
|
-
const getCompareChartSpec = () => compareChartEl.value?.spec ?? null;
|
|
4006
|
+
const getCompareLayers = () => mapCompareEl.value?.layers ?? [];
|
|
3925
4007
|
|
|
3926
4008
|
/**
|
|
3927
4009
|
* Register EPSG projection in `eox-map`
|
|
@@ -3996,16 +4078,27 @@ const includesProcess = (collection, compare = false) => {
|
|
|
3996
4078
|
);
|
|
3997
4079
|
};
|
|
3998
4080
|
|
|
4081
|
+
/**
|
|
4082
|
+
* Check whether main or compare chart have data to show
|
|
4083
|
+
* @param {boolean} [compare=false] - Whether to check for compare collection
|
|
4084
|
+
* @returns
|
|
4085
|
+
*/
|
|
4086
|
+
const shouldShowChartWidget = (compare = false) => {
|
|
4087
|
+
return (
|
|
4088
|
+
areChartsSeparateLayout.value &&
|
|
4089
|
+
(compare ? compareChartData.value : chartData.value)
|
|
4090
|
+
);
|
|
4091
|
+
};
|
|
4092
|
+
|
|
3999
4093
|
const actions = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
4000
4094
|
__proto__: null,
|
|
4001
4095
|
changeMapProjection,
|
|
4002
|
-
getChartSpec,
|
|
4003
|
-
getCompareChartSpec,
|
|
4004
4096
|
getCompareLayers,
|
|
4005
4097
|
getLayers,
|
|
4006
4098
|
includesProcess,
|
|
4007
4099
|
registerProjection,
|
|
4008
|
-
setActiveTemplate
|
|
4100
|
+
setActiveTemplate,
|
|
4101
|
+
shouldShowChartWidget
|
|
4009
4102
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
4010
4103
|
|
|
4011
4104
|
/*
|
|
@@ -4073,18 +4166,18 @@ function getStyleVariablesState(collectionId, variables) {
|
|
|
4073
4166
|
"",
|
|
4074
4167
|
"",
|
|
4075
4168
|
];
|
|
4076
|
-
return
|
|
4077
|
-
collection === collectionId &&
|
|
4078
|
-
["Vector", "WebGLTile", "VectorTile"].includes(layer?.type ?? "")
|
|
4079
|
-
);
|
|
4169
|
+
return collection === collectionId;
|
|
4080
4170
|
});
|
|
4081
4171
|
|
|
4082
4172
|
if (!matchingLayer) {
|
|
4083
4173
|
return variables;
|
|
4084
4174
|
}
|
|
4175
|
+
// TODO instead tap into store for changed variables state per layer
|
|
4176
|
+
// because XYZ and WMTS use tileurlfunction update, where we can not retrieve
|
|
4177
|
+
// current values from OL layers anyhow
|
|
4085
4178
|
|
|
4086
4179
|
const olLayer = mapElement.getLayerById(matchingLayer.properties?.id ?? "");
|
|
4087
|
-
|
|
4180
|
+
let oldVariablesState =
|
|
4088
4181
|
/** @type {import("ol/layer").Vector} */ (
|
|
4089
4182
|
olLayer
|
|
4090
4183
|
//@ts-expect-error variables doesn't exist in non-flat style
|
|
@@ -4145,13 +4238,19 @@ function generateFeatures(links, extraProperties = {}, rel = "item") {
|
|
|
4145
4238
|
}
|
|
4146
4239
|
|
|
4147
4240
|
/**
|
|
4148
|
-
*
|
|
4241
|
+
* Spearates and extracts layerConfig (jsonform schema & legend) from a style json
|
|
4149
4242
|
*
|
|
4150
4243
|
* @param {string} collectionId
|
|
4151
4244
|
* @param { import("@/types").EodashStyleJson} [style]
|
|
4152
4245
|
* @param {Record<string,any>} [rasterJsonform]
|
|
4246
|
+
* @param {string} [layerConfigType]
|
|
4153
4247
|
* */
|
|
4154
|
-
function extractLayerConfig(
|
|
4248
|
+
function extractLayerConfig(
|
|
4249
|
+
collectionId,
|
|
4250
|
+
style,
|
|
4251
|
+
rasterJsonform,
|
|
4252
|
+
layerConfigType,
|
|
4253
|
+
) {
|
|
4155
4254
|
if (!style && !rasterJsonform) {
|
|
4156
4255
|
return { layerConfig: undefined, style: undefined };
|
|
4157
4256
|
}
|
|
@@ -4159,6 +4258,10 @@ function extractLayerConfig(collectionId, style, rasterJsonform) {
|
|
|
4159
4258
|
style = { ...style };
|
|
4160
4259
|
}
|
|
4161
4260
|
|
|
4261
|
+
if (style?.variables && Object.keys(style.variables ?? {}).length) {
|
|
4262
|
+
style.variables = getStyleVariablesState(collectionId, style.variables);
|
|
4263
|
+
}
|
|
4264
|
+
|
|
4162
4265
|
if (rasterJsonform) {
|
|
4163
4266
|
return {
|
|
4164
4267
|
layerConfig: {
|
|
@@ -4170,16 +4273,12 @@ function extractLayerConfig(collectionId, style, rasterJsonform) {
|
|
|
4170
4273
|
};
|
|
4171
4274
|
}
|
|
4172
4275
|
|
|
4173
|
-
if (style?.variables && Object.keys(style.variables ?? {}).length) {
|
|
4174
|
-
style.variables = getStyleVariablesState(collectionId, style.variables);
|
|
4175
|
-
}
|
|
4176
|
-
|
|
4177
4276
|
/** @type {Record<string,unknown> | undefined} */
|
|
4178
4277
|
let layerConfig = undefined;
|
|
4179
4278
|
|
|
4180
4279
|
if (style?.jsonform) {
|
|
4181
4280
|
// this explicitly sets legend only if jsonform is configured
|
|
4182
|
-
layerConfig = { schema: style.jsonform, type: "style" };
|
|
4281
|
+
layerConfig = { schema: style.jsonform, type: layerConfigType || "style" };
|
|
4183
4282
|
delete style.jsonform;
|
|
4184
4283
|
if (style?.legend) {
|
|
4185
4284
|
layerConfig.legend = style.legend;
|
|
@@ -4193,6 +4292,7 @@ function extractLayerConfig(collectionId, style, rasterJsonform) {
|
|
|
4193
4292
|
|
|
4194
4293
|
return { layerConfig, style };
|
|
4195
4294
|
}
|
|
4295
|
+
|
|
4196
4296
|
/**
|
|
4197
4297
|
*
|
|
4198
4298
|
* @param {number[]} bbox
|
|
@@ -4267,35 +4367,41 @@ const extractRoles = (properties, linkOrAsset) => {
|
|
|
4267
4367
|
|
|
4268
4368
|
/**
|
|
4269
4369
|
* Extracts a single non-link style JSON from a STAC Item optionally for a selected key mapping
|
|
4270
|
-
* @param {import("stac-ts").StacItem}
|
|
4271
|
-
* @param {string}
|
|
4272
|
-
* @param {string | undefined}
|
|
4370
|
+
* @param { import("stac-ts").StacItem | import("stac-ts").StacCollection } stacObject
|
|
4371
|
+
* @param {string | undefined} linkKey
|
|
4372
|
+
* @param {string | undefined} assetKey
|
|
4273
4373
|
* @returns
|
|
4274
4374
|
**/
|
|
4275
|
-
const fetchStyle = async (
|
|
4375
|
+
const fetchStyle = async (
|
|
4376
|
+
stacObject,
|
|
4377
|
+
linkKey = undefined,
|
|
4378
|
+
assetKey = undefined,
|
|
4379
|
+
) => {
|
|
4276
4380
|
let styleLink = null;
|
|
4277
|
-
if (
|
|
4278
|
-
styleLink =
|
|
4381
|
+
if (linkKey) {
|
|
4382
|
+
styleLink = stacObject.links.find(
|
|
4279
4383
|
(link) =>
|
|
4280
4384
|
link.rel.includes("style") &&
|
|
4281
4385
|
link["links:keys"] &&
|
|
4282
|
-
/** @type {Array<string>} */ (link["links:keys"]).includes(
|
|
4386
|
+
/** @type {Array<string>} */ (link["links:keys"]).includes(linkKey),
|
|
4387
|
+
);
|
|
4388
|
+
} else if (assetKey) {
|
|
4389
|
+
styleLink = stacObject.links.find(
|
|
4390
|
+
(link) =>
|
|
4391
|
+
link.rel.includes("style") &&
|
|
4392
|
+
link["asset:keys"] &&
|
|
4393
|
+
/** @type {Array<string>} */ (link["asset:keys"]).includes(assetKey),
|
|
4283
4394
|
);
|
|
4284
4395
|
} else {
|
|
4285
|
-
|
|
4286
|
-
|
|
4396
|
+
log.debug(
|
|
4397
|
+
"Neither link key, nor asset key input, can not match any style to layer.",
|
|
4398
|
+
stacObject.id,
|
|
4287
4399
|
);
|
|
4400
|
+
return {};
|
|
4288
4401
|
}
|
|
4289
4402
|
if (styleLink) {
|
|
4290
|
-
let url = "";
|
|
4291
|
-
if (styleLink.href.startsWith("http")) {
|
|
4292
|
-
url = styleLink.href;
|
|
4293
|
-
} else {
|
|
4294
|
-
url = toAbsolute(styleLink.href, itemUrl);
|
|
4295
|
-
}
|
|
4296
|
-
|
|
4297
4403
|
/** @type {import("@/types").EodashStyleJson} */
|
|
4298
|
-
const styleJson = await axios.get(
|
|
4404
|
+
const styleJson = await axios.get(styleLink.href).then((resp) => resp.data);
|
|
4299
4405
|
|
|
4300
4406
|
log.debug("fetched styles JSON", JSON.parse(JSON.stringify(styleJson)));
|
|
4301
4407
|
return { ...styleJson };
|
|
@@ -4304,18 +4410,15 @@ const fetchStyle = async (item, itemUrl, key = undefined) => {
|
|
|
4304
4410
|
|
|
4305
4411
|
/**
|
|
4306
4412
|
* Fetches all style JSONs from a STAC Item and returns an array with style objects
|
|
4307
|
-
* @param {import("stac-ts").StacItem}
|
|
4308
|
-
* @param {string} itemUrl
|
|
4413
|
+
* @param {import("stac-ts").StacItem | import("stac-ts").StacCollection} stacObject
|
|
4309
4414
|
* @returns { Promise <Array<import("@/types").EodashStyleJson>>}
|
|
4310
4415
|
**/
|
|
4311
|
-
const fetchAllStyles = async (
|
|
4312
|
-
const styleLinks =
|
|
4416
|
+
const fetchAllStyles = async (stacObject) => {
|
|
4417
|
+
const styleLinks = stacObject.links.filter((link) =>
|
|
4418
|
+
link.rel.includes("style"),
|
|
4419
|
+
);
|
|
4313
4420
|
const fetchPromises = styleLinks.map(async (link) => {
|
|
4314
|
-
|
|
4315
|
-
? link.href
|
|
4316
|
-
: toAbsolute(link.href, itemUrl);
|
|
4317
|
-
|
|
4318
|
-
const styleJson = await axios.get(url).then((resp) => resp.data);
|
|
4421
|
+
const styleJson = await axios.get(link.href).then((resp) => resp.data);
|
|
4319
4422
|
log.debug("fetched styles JSON", JSON.parse(JSON.stringify(styleJson)));
|
|
4320
4423
|
return styleJson;
|
|
4321
4424
|
});
|
|
@@ -4525,7 +4628,7 @@ const replaceLayersInStructure = (layers, toRemove, toInsert) => {
|
|
|
4525
4628
|
continue;
|
|
4526
4629
|
}
|
|
4527
4630
|
|
|
4528
|
-
result.
|
|
4631
|
+
result.unshift(layer);
|
|
4529
4632
|
}
|
|
4530
4633
|
|
|
4531
4634
|
return result;
|
|
@@ -4571,15 +4674,11 @@ const replaceLayer = (currentLayers, oldLayer, newLayers) => {
|
|
|
4571
4674
|
* @param {import('ol/layer').Layer} layer
|
|
4572
4675
|
*/
|
|
4573
4676
|
const getColFromLayer = async (indicators, layer) => {
|
|
4574
|
-
const [collectionId
|
|
4677
|
+
const [collectionId] = layer.get("id").split(";:;");
|
|
4575
4678
|
|
|
4576
4679
|
for (const ind of indicators) {
|
|
4577
4680
|
if (ind.collectionStac?.id !== collectionId) continue;
|
|
4578
|
-
|
|
4579
|
-
const itemIds = items?.map((item) => item.id || item.datetime) ?? [];
|
|
4580
|
-
if (itemIds.includes(itemId)) {
|
|
4581
|
-
return ind;
|
|
4582
|
-
}
|
|
4681
|
+
return ind;
|
|
4583
4682
|
}
|
|
4584
4683
|
};
|
|
4585
4684
|
|
|
@@ -4926,4 +5025,18 @@ function extractLayerLegend(collection) {
|
|
|
4926
5025
|
return extraProperties;
|
|
4927
5026
|
}
|
|
4928
5027
|
|
|
4929
|
-
|
|
5028
|
+
/**
|
|
5029
|
+
* @param { import ("stac-ts").StacLink } link
|
|
5030
|
+
* @returns {object}
|
|
5031
|
+
*/
|
|
5032
|
+
function extractEoxLegendLink(link) {
|
|
5033
|
+
let extraProperties = {};
|
|
5034
|
+
if (link["eox:colorlegend"]) {
|
|
5035
|
+
extraProperties = {
|
|
5036
|
+
layerLegend: link["eox:colorlegend"],
|
|
5037
|
+
};
|
|
5038
|
+
}
|
|
5039
|
+
return extraProperties;
|
|
5040
|
+
}
|
|
5041
|
+
|
|
5042
|
+
export { replaceLayer as $, revokeCollectionBlobUrls as A, currentUrl as B, datetime as C, poi as D, activeTemplate as E, mapPosition as F, indicator as G, currentCompareUrl as H, compareIndicator as I, comparePoi as J, states as K, actions as L, areChartsSeparateLayout as M, chartSpec as N, compareChartSpec as O, includesProcess as P, shouldShowChartWidget as Q, sanitizeBbox as R, mapCompareEl as S, getColFromLayer as T, setMapProjFromCol as U, isGlobe as V, setActiveTemplate as W, availableMapProjection as X, changeMapProjection as Y, compareChartData as Z, chartData as _, extractEoxLegendLink as a, axios$1 as a0, removeUnneededProperties as a1, extractLayerConfig as b, createLayerID as c, axios as d, extractRoles as e, fetchStyle as f, getProjectionCode as g, addTooltipInteraction as h, createAssetID as i, mapEl as j, isSTACItem as k, extractLayerTimeValues as l, mergeGeojsons as m, fetchApiItems as n, getDatetimeProperty as o, fetchAllStyles as p, findLayer as q, registerProjection as r, findLayersByLayerPrefix as s, replaceLayersInStructure as t, generateFeatures as u, extractLayerLegend as v, getLayers as w, getCompareLayers as x, extractCollectionUrls as y, generateLinksFromItems as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolveComponent, render, h, mergeProps } from 'vue';
|
|
2
|
-
import {
|
|
3
|
-
import { V as VTooltip } from './VTooltip-
|
|
2
|
+
import { Y as consoleError, Z as isObject } from './asWebComponent-DaIxULaA.js';
|
|
3
|
+
import { V as VTooltip } from './VTooltip-Cc6au3Sn.js';
|
|
4
4
|
|
|
5
5
|
// Utilities
|
|
6
6
|
function useDirectiveComponent(component, props) {
|
|
@@ -75,8 +75,10 @@ function findComponentParent(vnode, root) {
|
|
|
75
75
|
|
|
76
76
|
// Components
|
|
77
77
|
const Tooltip = useDirectiveComponent(VTooltip, binding => {
|
|
78
|
+
const disabled = isObject(binding.value) ? !binding.value.text : ['', false, null].includes(binding.value); // undefined means true
|
|
79
|
+
|
|
78
80
|
return {
|
|
79
|
-
activator: 'parent',
|
|
81
|
+
activator: disabled ? null : 'parent',
|
|
80
82
|
location: binding.arg?.replace('-', ' '),
|
|
81
83
|
text: typeof binding.value === 'boolean' ? undefined : binding.value
|
|
82
84
|
};
|