@eodash/eodash 5.0.0-rc.3 → 5.1.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/README.md +1 -0
- package/core/client/App.vue +8 -2
- package/core/client/asWebComponent.js +5 -5
- package/core/client/components/DashboardLayout.vue +42 -25
- package/core/client/components/EodashOverlay.vue +1 -1
- package/core/client/components/ErrorAlert.vue +2 -2
- package/core/client/components/Footer.vue +4 -4
- package/core/client/components/Header.vue +3 -3
- package/core/client/components/MobileLayout.vue +9 -10
- package/core/client/composables/DefineEodash.js +38 -43
- package/core/client/composables/DefineTemplate.js +4 -2
- package/core/client/composables/DefineWidgets.js +14 -8
- package/core/client/composables/index.js +273 -23
- package/core/client/eodashSTAC/EodashCollection.js +80 -47
- package/core/client/eodashSTAC/helpers.js +136 -27
- package/core/client/eodashSTAC/parquet.js +145 -0
- package/core/client/eodashSTAC/triggers.js +6 -3
- package/core/client/plugins/index.js +4 -3
- package/core/client/plugins/vuetify.js +3 -0
- package/core/client/store/actions.js +21 -4
- package/core/client/store/stac.js +93 -56
- package/core/client/store/states.js +15 -5
- package/core/client/types.ts +59 -43
- package/core/client/utils/index.js +79 -0
- package/core/client/utils/keys.js +2 -2
- package/core/client/utils/states.js +30 -5
- package/core/client/views/Dashboard.vue +36 -32
- package/core/client/vite-env.d.ts +7 -0
- package/dist/client/{DashboardLayout-t_PavJPO.js → DashboardLayout-ByVs1DrY.js} +23 -12
- package/dist/client/{DynamicWebComponent-y07rVJch.js → DynamicWebComponent-C3W7HSQm.js} +1 -1
- package/dist/client/{EodashDatePicker-CcOfyzGD.js → EodashDatePicker-BIAf1sMT.js} +59 -32
- package/dist/client/{EodashItemFilter-B9HCvIMi.js → EodashItemFilter-DPznh8UB.js} +20 -10
- package/dist/client/{EodashLayerControl-KStn7Nb_.js → EodashLayerControl-Bhxjw4V2.js} +29 -16
- package/dist/client/EodashLayoutSwitcher-C5qTEffW.js +61 -0
- package/dist/client/EodashMapBtns-WoGq8MuV.js +173 -0
- package/dist/client/{EodashStacInfo-C_hDy6Pd.js → EodashStacInfo-CSvvF2jI.js} +3 -18
- package/dist/client/{EodashTools-BXflvRf8.js → EodashTools-Cv1SXQ5y.js} +13 -13
- package/dist/client/{ExportState-C0QRemK1.js → ExportState-D-iuwaad.js} +58 -52
- package/dist/client/{Footer-7VGyGUAs.js → Footer-CyF0zRAk.js} +15 -13
- package/dist/client/{Header-BQJnXHYq.js → Header-CgD8jDKU.js} +33 -28
- package/dist/client/{MobileLayout-b8nQ-Vyl.js → MobileLayout-EKQ_kpSh.js} +69 -60
- package/dist/client/{PopUp-DgNrh9Df.js → PopUp-BsYLvWch.js} +19 -10
- package/dist/client/ProcessList-C2xsLU2_.js +191 -0
- package/dist/client/{VImg-D4eT3IQ1.js → VImg-OHe8YTs2.js} +24 -24
- package/dist/client/{VMain-C3hN2-H3.js → VMain-PryTLU4a.js} +7 -7
- package/dist/client/{VOverlay-tAeNygaA.js → VOverlay-yUn7p-Uf.js} +64 -27
- package/dist/client/{VTooltip-B0Q3iHMZ.js → VTooltip-DZ0fjpB3.js} +13 -10
- package/dist/client/{WidgetsContainer-CtDHfCYf.js → WidgetsContainer-B9LBadcC.js} +1 -1
- package/dist/client/asWebComponent-By_7_JjS.js +19193 -0
- package/dist/client/async-DkSu_u2K.js +740 -0
- package/dist/client/eo-dash.js +1 -1
- package/dist/client/{forwardRefs-CIFAqXaZ.js → forwardRefs-BXxrv98s.js} +31 -4
- package/dist/client/handling-CgmFXkW6.js +1212 -0
- package/dist/client/helpers-Dy0Q13tP.js +4534 -0
- package/dist/client/{index-DvcUndod.js → index-BuhOHXKv.js} +2 -4
- package/dist/client/{index-BQ16n4Sk.js → index-Ch_HchK3.js} +39 -32
- package/dist/client/{index-Cv7HBz49.js → index-Dqj4tbx2.js} +2 -2
- package/dist/client/index-skjhlH8u.js +376 -0
- package/dist/client/{ssrBoot-BP7SYRyC.js → ssrBoot-Zgc_Ttvi.js} +2 -2
- package/dist/client/templates.js +850 -0
- package/dist/client/transition-C98Yn4Vo.js +40 -0
- package/dist/node/cli.js +16 -6
- package/dist/node/types.d.ts +1 -1
- package/dist/types/core/client/App.vue.d.ts +2 -2
- package/dist/types/core/client/asWebComponent.d.ts +1 -1
- package/dist/types/core/client/components/DynamicWebComponent.vue.d.ts +1 -3
- package/dist/types/core/client/components/Footer.vue.d.ts +1 -105
- package/dist/types/core/client/components/IframeWrapper.vue.d.ts +1 -1
- package/dist/types/core/client/components/MobileLayout.vue.d.ts +1 -324
- package/dist/types/core/client/composables/DefineEodash.d.ts +2 -2
- package/dist/types/core/client/composables/DefineTemplate.d.ts +1 -1
- package/dist/types/core/client/composables/DefineWidgets.d.ts +4 -4
- package/dist/types/core/client/composables/index.d.ts +24 -2
- package/dist/types/core/client/eodashSTAC/EodashCollection.d.ts +9 -6
- package/dist/types/core/client/eodashSTAC/helpers.d.ts +20 -5
- package/dist/types/core/client/eodashSTAC/parquet.d.ts +2 -0
- package/dist/types/core/client/plugins/vuetify.d.ts +7 -4
- package/dist/types/core/client/store/actions.d.ts +3 -2
- package/dist/types/core/client/store/stac.d.ts +16 -13
- package/dist/types/core/client/store/states.d.ts +14 -4
- package/dist/types/core/client/types.d.ts +45 -30
- package/dist/types/core/client/utils/index.d.ts +2 -0
- package/dist/types/core/client/utils/keys.d.ts +4 -4
- package/dist/types/core/client/utils/states.d.ts +59 -47
- package/dist/types/core/client/views/Dashboard.vue.d.ts +2 -2
- package/dist/types/templates/baseConfig.d.ts +4 -0
- package/dist/types/templates/compare.d.ts +210 -0
- package/dist/types/templates/expert.d.ts +151 -0
- package/dist/types/templates/index.d.ts +6 -0
- package/dist/types/templates/light.d.ts +145 -0
- package/dist/types/widgets/EodashDatePicker.vue.d.ts +1 -458
- package/dist/types/widgets/EodashItemFilter.vue.d.ts +3 -3
- package/dist/types/widgets/EodashLayerControl.vue.d.ts +14 -7
- package/dist/types/widgets/EodashLayoutSwitcher.vue.d.ts +1 -3
- package/dist/types/widgets/EodashMap/index.vue.d.ts +1 -4
- package/dist/types/widgets/EodashMapBtns.vue.d.ts +8 -8
- package/dist/types/widgets/EodashProcess/ProcessList.vue.d.ts +8 -1
- package/dist/types/widgets/EodashProcess/index.vue.d.ts +8 -4
- package/dist/types/widgets/EodashProcess/methods/async.d.ts +18 -18
- package/dist/types/widgets/EodashProcess/methods/composables.d.ts +3 -2
- package/dist/types/widgets/EodashProcess/methods/custom-endpoints/chart/index.d.ts +1 -0
- package/dist/types/widgets/EodashProcess/methods/custom-endpoints/chart/sentinelhub-endpoint.d.ts +6 -0
- package/dist/types/widgets/EodashProcess/methods/custom-endpoints/chart/veda-endpoint.d.ts +4 -0
- package/dist/types/widgets/EodashProcess/methods/custom-endpoints/layers/eoxhub-workspaces-endpoint.d.ts +5 -0
- package/dist/types/widgets/EodashProcess/methods/custom-endpoints/layers/index.d.ts +1 -0
- package/dist/types/widgets/EodashProcess/methods/handling.d.ts +12 -5
- package/dist/types/widgets/EodashProcess/methods/outputs.d.ts +72 -41
- package/dist/types/widgets/EodashProcess/methods/utils.d.ts +41 -21
- package/dist/types/widgets/EodashProcess/states.d.ts +11 -0
- package/dist/types/widgets/EodashProcess/types.d.ts +41 -0
- package/dist/types/widgets/EodashStacInfo.vue.d.ts +14 -14
- package/dist/types/widgets/EodashTools.vue.d.ts +3 -3
- package/dist/types/widgets/ExportState.vue.d.ts +1 -1
- package/dist/types/widgets/PopUp.vue.d.ts +11 -16
- package/dist/types/widgets/WidgetsContainer.vue.d.ts +3 -6
- package/package.json +53 -45
- package/templates/baseConfig.js +68 -0
- package/templates/compare.js +162 -0
- package/templates/expert.js +123 -0
- package/templates/index.js +8 -0
- package/templates/light.js +130 -0
- package/widgets/EodashDatePicker.vue +80 -31
- package/widgets/EodashItemFilter.vue +26 -11
- package/widgets/EodashLayerControl.vue +20 -11
- package/widgets/EodashLayoutSwitcher.vue +6 -3
- package/widgets/EodashMap/index.vue +3 -8
- package/widgets/EodashMap/methods/create-layers-config.js +4 -3
- package/widgets/EodashMap/methods/index.js +33 -23
- package/widgets/EodashMapBtns.vue +83 -41
- package/widgets/EodashProcess/ProcessList.vue +34 -10
- package/widgets/EodashProcess/index.vue +55 -20
- package/widgets/EodashProcess/methods/async.js +77 -59
- package/widgets/EodashProcess/methods/composables.js +21 -14
- package/widgets/EodashProcess/methods/custom-endpoints/chart/index.js +35 -0
- package/widgets/EodashProcess/methods/custom-endpoints/chart/sentinelhub-endpoint.js +275 -0
- package/widgets/EodashProcess/methods/custom-endpoints/chart/veda-endpoint.js +116 -0
- package/widgets/EodashProcess/methods/custom-endpoints/layers/eoxhub-workspaces-endpoint.js +94 -0
- package/widgets/EodashProcess/methods/custom-endpoints/layers/index.js +33 -0
- package/widgets/EodashProcess/methods/handling.js +127 -80
- package/widgets/EodashProcess/methods/outputs.js +376 -125
- package/widgets/EodashProcess/methods/utils.js +398 -10
- package/widgets/EodashProcess/states.js +13 -0
- package/widgets/EodashProcess/types.ts +46 -0
- package/widgets/EodashStacInfo.vue +2 -17
- package/widgets/EodashTools.vue +13 -13
- package/widgets/WidgetsContainer.vue +1 -1
- package/core/client/eodash.js +0 -454
- package/dist/client/EodashLayoutSwitcher-DqeFO3RN.js +0 -52
- package/dist/client/EodashMapBtns-5BF27qJB.js +0 -131
- package/dist/client/ProcessList-C62SOVO6.js +0 -484
- package/dist/client/asWebComponent-BJ2NWunV.js +0 -12479
- package/dist/client/eo-dash.css +0 -5
- package/dist/client/index-Da5xXX6Q.js +0 -780
- package/dist/client/transition-Cdb4K27U.js +0 -37
- package/dist/types/core/client/eodash.d.ts +0 -8
|
@@ -0,0 +1,850 @@
|
|
|
1
|
+
import { mdiViewDashboardVariant, mdiViewDashboard } from '@mdi/js';
|
|
2
|
+
import { G as includesProcess } from './helpers-Dy0Q13tP.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Special values that tell deepmerge to perform a certain action.
|
|
6
|
+
*/
|
|
7
|
+
const actions = {
|
|
8
|
+
defaultMerge: Symbol("deepmerge-ts: default merge")};
|
|
9
|
+
/**
|
|
10
|
+
* Special values that tell deepmergeInto to perform a certain action.
|
|
11
|
+
*/
|
|
12
|
+
const actionsInto = {
|
|
13
|
+
defaultMerge: actions.defaultMerge,
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The default function to update meta data.
|
|
18
|
+
*
|
|
19
|
+
* It doesn't update the meta data.
|
|
20
|
+
*/
|
|
21
|
+
function defaultMetaDataUpdater(previousMeta, metaMeta) {
|
|
22
|
+
return metaMeta;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The default function to filter values.
|
|
26
|
+
*
|
|
27
|
+
* It filters out undefined values.
|
|
28
|
+
*/
|
|
29
|
+
function defaultFilterValues(values, meta) {
|
|
30
|
+
return values.filter((value) => value !== undefined);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The different types of objects deepmerge-ts support.
|
|
35
|
+
*/
|
|
36
|
+
var ObjectType;
|
|
37
|
+
(function (ObjectType) {
|
|
38
|
+
ObjectType[ObjectType["NOT"] = 0] = "NOT";
|
|
39
|
+
ObjectType[ObjectType["RECORD"] = 1] = "RECORD";
|
|
40
|
+
ObjectType[ObjectType["ARRAY"] = 2] = "ARRAY";
|
|
41
|
+
ObjectType[ObjectType["SET"] = 3] = "SET";
|
|
42
|
+
ObjectType[ObjectType["MAP"] = 4] = "MAP";
|
|
43
|
+
ObjectType[ObjectType["OTHER"] = 5] = "OTHER";
|
|
44
|
+
})(ObjectType || (ObjectType = {}));
|
|
45
|
+
/**
|
|
46
|
+
* Get the type of the given object.
|
|
47
|
+
*
|
|
48
|
+
* @param object - The object to get the type of.
|
|
49
|
+
* @returns The type of the given object.
|
|
50
|
+
*/
|
|
51
|
+
function getObjectType(object) {
|
|
52
|
+
if (typeof object !== "object" || object === null) {
|
|
53
|
+
return 0 /* ObjectType.NOT */;
|
|
54
|
+
}
|
|
55
|
+
if (Array.isArray(object)) {
|
|
56
|
+
return 2 /* ObjectType.ARRAY */;
|
|
57
|
+
}
|
|
58
|
+
if (isRecord(object)) {
|
|
59
|
+
return 1 /* ObjectType.RECORD */;
|
|
60
|
+
}
|
|
61
|
+
if (object instanceof Set) {
|
|
62
|
+
return 3 /* ObjectType.SET */;
|
|
63
|
+
}
|
|
64
|
+
if (object instanceof Map) {
|
|
65
|
+
return 4 /* ObjectType.MAP */;
|
|
66
|
+
}
|
|
67
|
+
return 5 /* ObjectType.OTHER */;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Get the keys of the given objects including symbol keys.
|
|
71
|
+
*
|
|
72
|
+
* Note: Only keys to enumerable properties are returned.
|
|
73
|
+
*
|
|
74
|
+
* @param objects - An array of objects to get the keys of.
|
|
75
|
+
* @returns A set containing all the keys of all the given objects.
|
|
76
|
+
*/
|
|
77
|
+
function getKeys(objects) {
|
|
78
|
+
const keys = new Set();
|
|
79
|
+
for (const object of objects) {
|
|
80
|
+
for (const key of [...Object.keys(object), ...Object.getOwnPropertySymbols(object)]) {
|
|
81
|
+
keys.add(key);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return keys;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Does the given object have the given property.
|
|
88
|
+
*
|
|
89
|
+
* @param object - The object to test.
|
|
90
|
+
* @param property - The property to test.
|
|
91
|
+
* @returns Whether the object has the property.
|
|
92
|
+
*/
|
|
93
|
+
function objectHasProperty(object, property) {
|
|
94
|
+
return typeof object === "object" && Object.prototype.propertyIsEnumerable.call(object, property);
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Get an iterable object that iterates over the given iterables.
|
|
98
|
+
*/
|
|
99
|
+
function getIterableOfIterables(iterables) {
|
|
100
|
+
let mut_iterablesIndex = 0;
|
|
101
|
+
let mut_iterator = iterables[0]?.[Symbol.iterator]();
|
|
102
|
+
return {
|
|
103
|
+
[Symbol.iterator]() {
|
|
104
|
+
return {
|
|
105
|
+
next() {
|
|
106
|
+
do {
|
|
107
|
+
if (mut_iterator === undefined) {
|
|
108
|
+
return { done: true, value: undefined };
|
|
109
|
+
}
|
|
110
|
+
const result = mut_iterator.next();
|
|
111
|
+
if (result.done === true) {
|
|
112
|
+
mut_iterablesIndex += 1;
|
|
113
|
+
mut_iterator = iterables[mut_iterablesIndex]?.[Symbol.iterator]();
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
116
|
+
return {
|
|
117
|
+
done: false,
|
|
118
|
+
value: result.value,
|
|
119
|
+
};
|
|
120
|
+
} while (true);
|
|
121
|
+
},
|
|
122
|
+
};
|
|
123
|
+
},
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
// eslint-disable-next-line unicorn/prefer-set-has -- Array is more performant for a low number of elements.
|
|
127
|
+
const validRecordToStringValues = ["[object Object]", "[object Module]"];
|
|
128
|
+
/**
|
|
129
|
+
* Does the given object appear to be a record.
|
|
130
|
+
*/
|
|
131
|
+
function isRecord(value) {
|
|
132
|
+
// All records are objects.
|
|
133
|
+
if (!validRecordToStringValues.includes(Object.prototype.toString.call(value))) {
|
|
134
|
+
return false;
|
|
135
|
+
}
|
|
136
|
+
const { constructor } = value;
|
|
137
|
+
// If has modified constructor.
|
|
138
|
+
// eslint-disable-next-line ts/no-unnecessary-condition
|
|
139
|
+
if (constructor === undefined) {
|
|
140
|
+
return true;
|
|
141
|
+
}
|
|
142
|
+
const prototype = constructor.prototype;
|
|
143
|
+
// If has modified prototype.
|
|
144
|
+
if (prototype === null ||
|
|
145
|
+
typeof prototype !== "object" ||
|
|
146
|
+
!validRecordToStringValues.includes(Object.prototype.toString.call(prototype))) {
|
|
147
|
+
return false;
|
|
148
|
+
}
|
|
149
|
+
// If constructor does not have an Object-specific method.
|
|
150
|
+
// eslint-disable-next-line sonar/prefer-single-boolean-return, no-prototype-builtins
|
|
151
|
+
if (!prototype.hasOwnProperty("isPrototypeOf")) {
|
|
152
|
+
return false;
|
|
153
|
+
}
|
|
154
|
+
// Most likely a record.
|
|
155
|
+
return true;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* The default strategy to merge records into a target record.
|
|
160
|
+
*
|
|
161
|
+
* @param mut_target - The result will be mutated into this record
|
|
162
|
+
* @param values - The records (including the target's value if there is one).
|
|
163
|
+
*/
|
|
164
|
+
function mergeRecordsInto$1(mut_target, values, utils, meta) {
|
|
165
|
+
for (const key of getKeys(values)) {
|
|
166
|
+
const propValues = [];
|
|
167
|
+
for (const value of values) {
|
|
168
|
+
if (objectHasProperty(value, key)) {
|
|
169
|
+
propValues.push(value[key]);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
if (propValues.length === 0) {
|
|
173
|
+
continue;
|
|
174
|
+
}
|
|
175
|
+
const updatedMeta = utils.metaDataUpdater(meta, {
|
|
176
|
+
key,
|
|
177
|
+
parents: values,
|
|
178
|
+
});
|
|
179
|
+
const propertyTarget = { value: propValues[0] };
|
|
180
|
+
mergeUnknownsInto(propertyTarget, propValues, utils, updatedMeta);
|
|
181
|
+
if (key === "__proto__") {
|
|
182
|
+
Object.defineProperty(mut_target.value, key, {
|
|
183
|
+
value: propertyTarget.value,
|
|
184
|
+
configurable: true,
|
|
185
|
+
enumerable: true,
|
|
186
|
+
writable: true,
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
mut_target.value[key] = propertyTarget.value;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* The default strategy to merge arrays into a target array.
|
|
196
|
+
*
|
|
197
|
+
* @param mut_target - The result will be mutated into this array
|
|
198
|
+
* @param values - The arrays (including the target's value if there is one).
|
|
199
|
+
*/
|
|
200
|
+
function mergeArraysInto$1(mut_target, values) {
|
|
201
|
+
mut_target.value.push(...values.slice(1).flat());
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* The default strategy to merge sets into a target set.
|
|
205
|
+
*
|
|
206
|
+
* @param mut_target - The result will be mutated into this set
|
|
207
|
+
* @param values - The sets (including the target's value if there is one).
|
|
208
|
+
*/
|
|
209
|
+
function mergeSetsInto$1(mut_target, values) {
|
|
210
|
+
for (const value of getIterableOfIterables(values.slice(1))) {
|
|
211
|
+
mut_target.value.add(value);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* The default strategy to merge maps into a target map.
|
|
216
|
+
*
|
|
217
|
+
* @param mut_target - The result will be mutated into this map
|
|
218
|
+
* @param values - The maps (including the target's value if there is one).
|
|
219
|
+
*/
|
|
220
|
+
function mergeMapsInto$1(mut_target, values) {
|
|
221
|
+
for (const [key, value] of getIterableOfIterables(values.slice(1))) {
|
|
222
|
+
mut_target.value.set(key, value);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Set the target to the last value.
|
|
227
|
+
*/
|
|
228
|
+
function mergeOthersInto$1(mut_target, values) {
|
|
229
|
+
mut_target.value = values.at(-1);
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* The merge functions.
|
|
233
|
+
*/
|
|
234
|
+
const mergeIntoFunctions = {
|
|
235
|
+
mergeRecords: mergeRecordsInto$1,
|
|
236
|
+
mergeArrays: mergeArraysInto$1,
|
|
237
|
+
mergeSets: mergeSetsInto$1,
|
|
238
|
+
mergeMaps: mergeMapsInto$1,
|
|
239
|
+
mergeOthers: mergeOthersInto$1,
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
function deepmergeInto(target, ...objects) {
|
|
243
|
+
return void deepmergeIntoCustom({})(target, ...objects);
|
|
244
|
+
}
|
|
245
|
+
function deepmergeIntoCustom(options, rootMetaData) {
|
|
246
|
+
const utils = getIntoUtils(options, customizedDeepmergeInto);
|
|
247
|
+
/**
|
|
248
|
+
* The customized deepmerge function.
|
|
249
|
+
*/
|
|
250
|
+
function customizedDeepmergeInto(target, ...objects) {
|
|
251
|
+
mergeUnknownsInto({ value: target }, [target, ...objects], utils, rootMetaData);
|
|
252
|
+
}
|
|
253
|
+
return customizedDeepmergeInto;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* The the utils that are available to the merge functions.
|
|
257
|
+
*
|
|
258
|
+
* @param options - The options the user specified
|
|
259
|
+
*/
|
|
260
|
+
function getIntoUtils(options, customizedDeepmergeInto) {
|
|
261
|
+
return {
|
|
262
|
+
defaultMergeFunctions: mergeIntoFunctions,
|
|
263
|
+
mergeFunctions: {
|
|
264
|
+
...mergeIntoFunctions,
|
|
265
|
+
...Object.fromEntries(Object.entries(options)
|
|
266
|
+
.filter(([key, option]) => Object.hasOwn(mergeIntoFunctions, key))
|
|
267
|
+
.map(([key, option]) => (option === false ? [key, mergeIntoFunctions.mergeOthers] : [key, option]))),
|
|
268
|
+
},
|
|
269
|
+
metaDataUpdater: (options.metaDataUpdater ?? defaultMetaDataUpdater),
|
|
270
|
+
deepmergeInto: customizedDeepmergeInto,
|
|
271
|
+
filterValues: options.filterValues === false ? undefined : (options.filterValues ?? defaultFilterValues),
|
|
272
|
+
actions: actionsInto,
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Merge unknown things into a target.
|
|
277
|
+
*
|
|
278
|
+
* @param mut_target - The target to merge into.
|
|
279
|
+
* @param values - The values.
|
|
280
|
+
*/
|
|
281
|
+
function mergeUnknownsInto(mut_target, values, utils, meta) {
|
|
282
|
+
const filteredValues = utils.filterValues?.(values, meta) ?? values;
|
|
283
|
+
if (filteredValues.length === 0) {
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
if (filteredValues.length === 1) {
|
|
287
|
+
return void mergeOthersInto(mut_target, filteredValues, utils, meta);
|
|
288
|
+
}
|
|
289
|
+
const type = getObjectType(mut_target.value);
|
|
290
|
+
if (type !== 0 /* ObjectType.NOT */ && type !== 5 /* ObjectType.OTHER */) {
|
|
291
|
+
for (let mut_index = 1; mut_index < filteredValues.length; mut_index++) {
|
|
292
|
+
if (getObjectType(filteredValues[mut_index]) === type) {
|
|
293
|
+
continue;
|
|
294
|
+
}
|
|
295
|
+
return void mergeOthersInto(mut_target, filteredValues, utils, meta);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
switch (type) {
|
|
299
|
+
case 1 /* ObjectType.RECORD */: {
|
|
300
|
+
return void mergeRecordsInto(mut_target, filteredValues, utils, meta);
|
|
301
|
+
}
|
|
302
|
+
case 2 /* ObjectType.ARRAY */: {
|
|
303
|
+
return void mergeArraysInto(mut_target, filteredValues, utils, meta);
|
|
304
|
+
}
|
|
305
|
+
case 3 /* ObjectType.SET */: {
|
|
306
|
+
return void mergeSetsInto(mut_target, filteredValues, utils, meta);
|
|
307
|
+
}
|
|
308
|
+
case 4 /* ObjectType.MAP */: {
|
|
309
|
+
return void mergeMapsInto(mut_target, filteredValues, utils, meta);
|
|
310
|
+
}
|
|
311
|
+
default: {
|
|
312
|
+
return void mergeOthersInto(mut_target, filteredValues, utils, meta);
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Merge records into a target record.
|
|
318
|
+
*
|
|
319
|
+
* @param mut_target - The target to merge into.
|
|
320
|
+
* @param values - The records.
|
|
321
|
+
*/
|
|
322
|
+
function mergeRecordsInto(mut_target, values, utils, meta) {
|
|
323
|
+
const action = utils.mergeFunctions.mergeRecords(mut_target, values, utils, meta);
|
|
324
|
+
if (action === actionsInto.defaultMerge) {
|
|
325
|
+
utils.defaultMergeFunctions.mergeRecords(mut_target, values, utils, meta);
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* Merge arrays into a target array.
|
|
330
|
+
*
|
|
331
|
+
* @param mut_target - The target to merge into.
|
|
332
|
+
* @param values - The arrays.
|
|
333
|
+
*/
|
|
334
|
+
function mergeArraysInto(mut_target, values, utils, meta) {
|
|
335
|
+
const action = utils.mergeFunctions.mergeArrays(mut_target, values, utils, meta);
|
|
336
|
+
if (action === actionsInto.defaultMerge) {
|
|
337
|
+
utils.defaultMergeFunctions.mergeArrays(mut_target, values);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* Merge sets into a target set.
|
|
342
|
+
*
|
|
343
|
+
* @param mut_target - The target to merge into.
|
|
344
|
+
* @param values - The sets.
|
|
345
|
+
*/
|
|
346
|
+
function mergeSetsInto(mut_target, values, utils, meta) {
|
|
347
|
+
const action = utils.mergeFunctions.mergeSets(mut_target, values, utils, meta);
|
|
348
|
+
if (action === actionsInto.defaultMerge) {
|
|
349
|
+
utils.defaultMergeFunctions.mergeSets(mut_target, values);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* Merge maps into a target map.
|
|
354
|
+
*
|
|
355
|
+
* @param mut_target - The target to merge into.
|
|
356
|
+
* @param values - The maps.
|
|
357
|
+
*/
|
|
358
|
+
function mergeMapsInto(mut_target, values, utils, meta) {
|
|
359
|
+
const action = utils.mergeFunctions.mergeMaps(mut_target, values, utils, meta);
|
|
360
|
+
if (action === actionsInto.defaultMerge) {
|
|
361
|
+
utils.defaultMergeFunctions.mergeMaps(mut_target, values);
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* Merge other things into a target.
|
|
366
|
+
*
|
|
367
|
+
* @param mut_target - The target to merge into.
|
|
368
|
+
* @param values - The other things.
|
|
369
|
+
*/
|
|
370
|
+
function mergeOthersInto(mut_target, values, utils, meta) {
|
|
371
|
+
const action = utils.mergeFunctions.mergeOthers(mut_target, values, utils, meta);
|
|
372
|
+
if (action === actionsInto.defaultMerge || mut_target.value === actionsInto.defaultMerge) {
|
|
373
|
+
utils.defaultMergeFunctions.mergeOthers(mut_target, values);
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
/** @type {import("@/types").Template} */
|
|
378
|
+
const light = {
|
|
379
|
+
gap: 16,
|
|
380
|
+
loading: {
|
|
381
|
+
id: Symbol(),
|
|
382
|
+
type: "web-component",
|
|
383
|
+
widget: {
|
|
384
|
+
// https://uiball.com/ldrs/
|
|
385
|
+
link: "https://cdn.jsdelivr.net/npm/ldrs/dist/auto/mirage.js",
|
|
386
|
+
tagName: "l-mirage",
|
|
387
|
+
properties: {
|
|
388
|
+
class: "align-self-center justify-self-center",
|
|
389
|
+
size: "120",
|
|
390
|
+
speed: "2.5",
|
|
391
|
+
color: "#004170",
|
|
392
|
+
},
|
|
393
|
+
},
|
|
394
|
+
},
|
|
395
|
+
background: {
|
|
396
|
+
id: "background-map",
|
|
397
|
+
type: "internal",
|
|
398
|
+
widget: {
|
|
399
|
+
name: "EodashMap",
|
|
400
|
+
properties: {
|
|
401
|
+
enableCompare: true,
|
|
402
|
+
},
|
|
403
|
+
},
|
|
404
|
+
},
|
|
405
|
+
widgets: [
|
|
406
|
+
{
|
|
407
|
+
id: "tools-light",
|
|
408
|
+
type: "internal",
|
|
409
|
+
title: "Tools",
|
|
410
|
+
layout: { x: 0, y: 0, w: "3/3/2", h: 1 },
|
|
411
|
+
widget: {
|
|
412
|
+
name: "EodashTools",
|
|
413
|
+
properties: {
|
|
414
|
+
layoutTarget: "expert",
|
|
415
|
+
layoutIcon: mdiViewDashboardVariant,
|
|
416
|
+
itemFilterConfig: {
|
|
417
|
+
resultType: "cards",
|
|
418
|
+
filtersTitle: "",
|
|
419
|
+
filterProperties: [],
|
|
420
|
+
resultsTitle: "Explore more indicators",
|
|
421
|
+
subTitleProperty: "subtitle",
|
|
422
|
+
imageProperty: "thumbnail",
|
|
423
|
+
cssVars: {
|
|
424
|
+
"--filter-display": "none",
|
|
425
|
+
},
|
|
426
|
+
},
|
|
427
|
+
},
|
|
428
|
+
},
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
defineWidget: (selectedSTAC) => {
|
|
432
|
+
return selectedSTAC
|
|
433
|
+
? {
|
|
434
|
+
id: "layercontrol-light",
|
|
435
|
+
type: "internal",
|
|
436
|
+
title: "Layers",
|
|
437
|
+
layout: { x: 0, y: 1, w: "3/3/2", h: 10 },
|
|
438
|
+
widget: {
|
|
439
|
+
name: "EodashLayerControl",
|
|
440
|
+
properties: {
|
|
441
|
+
slider: false,
|
|
442
|
+
tools: ["datetime", "info", "legend"],
|
|
443
|
+
cssVars: {
|
|
444
|
+
"--list-padding": "-8px",
|
|
445
|
+
"--tools-button-visibility": "none",
|
|
446
|
+
"--layer-input-visibility": "none",
|
|
447
|
+
"--layer-type-visibility": "none",
|
|
448
|
+
"--padding": "8px",
|
|
449
|
+
"--padding-vertical": "16px",
|
|
450
|
+
"--layer-tools-button-visibility": "none",
|
|
451
|
+
"--layer-toggle-button-visibility": "flex",
|
|
452
|
+
"--layer-summary-visibility": "none",
|
|
453
|
+
"--layer-visibility": "none",
|
|
454
|
+
},
|
|
455
|
+
},
|
|
456
|
+
},
|
|
457
|
+
}
|
|
458
|
+
: null;
|
|
459
|
+
},
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
defineWidget: (selectedSTAC) => {
|
|
463
|
+
return selectedSTAC
|
|
464
|
+
? {
|
|
465
|
+
id: "stacinfo-light",
|
|
466
|
+
type: "internal",
|
|
467
|
+
title: "Information",
|
|
468
|
+
layout: { x: "9/9/10", y: 0, w: "3/3/2", h: 12 },
|
|
469
|
+
widget: {
|
|
470
|
+
name: "EodashStacInfo",
|
|
471
|
+
properties: {
|
|
472
|
+
tags: [],
|
|
473
|
+
header: [],
|
|
474
|
+
footer: [],
|
|
475
|
+
body: ["description"],
|
|
476
|
+
styleOverride: "",
|
|
477
|
+
featured: [],
|
|
478
|
+
},
|
|
479
|
+
},
|
|
480
|
+
}
|
|
481
|
+
: null;
|
|
482
|
+
},
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
defineWidget: (selectedSTAC) => {
|
|
486
|
+
return selectedSTAC
|
|
487
|
+
? {
|
|
488
|
+
id: "light-datepicker",
|
|
489
|
+
type: "internal",
|
|
490
|
+
layout: { x: 4, y: 7, w: 4, h: 5 },
|
|
491
|
+
title: "Date",
|
|
492
|
+
widget: {
|
|
493
|
+
name: "EodashDatePicker",
|
|
494
|
+
properties: {
|
|
495
|
+
hintText: `<b>Hint:</b> closest available date is displayed <br />
|
|
496
|
+
on map (see Analysis Layers)`,
|
|
497
|
+
},
|
|
498
|
+
},
|
|
499
|
+
}
|
|
500
|
+
: null;
|
|
501
|
+
},
|
|
502
|
+
},
|
|
503
|
+
],
|
|
504
|
+
};
|
|
505
|
+
|
|
506
|
+
/** @type {import("@/types").Template} */
|
|
507
|
+
const expert = {
|
|
508
|
+
loading: {
|
|
509
|
+
id: Symbol(),
|
|
510
|
+
type: "web-component",
|
|
511
|
+
widget: {
|
|
512
|
+
// https://uiball.com/ldrs/
|
|
513
|
+
link: "https://cdn.jsdelivr.net/npm/ldrs/dist/auto/mirage.js",
|
|
514
|
+
tagName: "l-mirage",
|
|
515
|
+
properties: {
|
|
516
|
+
class: "align-self-center justify-self-center",
|
|
517
|
+
size: "120",
|
|
518
|
+
speed: "2.5",
|
|
519
|
+
color: "#004170",
|
|
520
|
+
},
|
|
521
|
+
},
|
|
522
|
+
},
|
|
523
|
+
background: {
|
|
524
|
+
id: "background-map",
|
|
525
|
+
type: "internal",
|
|
526
|
+
widget: {
|
|
527
|
+
name: "EodashMap",
|
|
528
|
+
properties: {
|
|
529
|
+
enableCompare: true,
|
|
530
|
+
},
|
|
531
|
+
},
|
|
532
|
+
},
|
|
533
|
+
widgets: [
|
|
534
|
+
{
|
|
535
|
+
id: "Tools",
|
|
536
|
+
type: "internal",
|
|
537
|
+
title: "Tools",
|
|
538
|
+
layout: { x: 0, y: 0, w: "3/3/2", h: 1 },
|
|
539
|
+
widget: {
|
|
540
|
+
name: "EodashTools",
|
|
541
|
+
properties: {
|
|
542
|
+
layoutTarget: "light",
|
|
543
|
+
layoutIcon: mdiViewDashboard,
|
|
544
|
+
itemFilterConfig: {
|
|
545
|
+
resultType: "cards",
|
|
546
|
+
subTitleProperty: "subtitle",
|
|
547
|
+
imageProperty: "thumbnail",
|
|
548
|
+
aggregateResults: "collection_group",
|
|
549
|
+
},
|
|
550
|
+
},
|
|
551
|
+
},
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
id: "Layercontrol",
|
|
555
|
+
type: "internal",
|
|
556
|
+
title: "Layers",
|
|
557
|
+
layout: { x: 0, y: 1, w: "3/3/2", h: 11 },
|
|
558
|
+
widget: {
|
|
559
|
+
name: "EodashLayerControl",
|
|
560
|
+
},
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
defineWidget: (selectedSTAC) => {
|
|
564
|
+
return selectedSTAC
|
|
565
|
+
? {
|
|
566
|
+
id: "Information",
|
|
567
|
+
title: "Information",
|
|
568
|
+
layout: { x: "9/9/10", y: 0, w: "3/3/2", h: 6 },
|
|
569
|
+
type: "internal",
|
|
570
|
+
widget: {
|
|
571
|
+
name: "EodashStacInfo",
|
|
572
|
+
},
|
|
573
|
+
}
|
|
574
|
+
: null;
|
|
575
|
+
},
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
defineWidget: (selectedSTAC) => {
|
|
579
|
+
return selectedSTAC
|
|
580
|
+
? {
|
|
581
|
+
id: "expert-datepicker",
|
|
582
|
+
type: "internal",
|
|
583
|
+
layout: { x: 4, y: 7, w: 4, h: 5 },
|
|
584
|
+
title: "Date",
|
|
585
|
+
widget: {
|
|
586
|
+
name: "EodashDatePicker",
|
|
587
|
+
properties: {
|
|
588
|
+
hintText: `<b>Hint:</b> closest available date is displayed <br />
|
|
589
|
+
on map (see Analysis Layers)`,
|
|
590
|
+
toggleCalendar: true,
|
|
591
|
+
},
|
|
592
|
+
},
|
|
593
|
+
}
|
|
594
|
+
: null;
|
|
595
|
+
},
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
defineWidget: (selected) => {
|
|
599
|
+
return selected
|
|
600
|
+
? {
|
|
601
|
+
id: "Buttons",
|
|
602
|
+
layout: { x: "8/8/9", y: 0, w: 1, h: 2 },
|
|
603
|
+
title: "Buttons",
|
|
604
|
+
type: "internal",
|
|
605
|
+
widget: {
|
|
606
|
+
name: "EodashMapBtns",
|
|
607
|
+
},
|
|
608
|
+
}
|
|
609
|
+
: null;
|
|
610
|
+
},
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
defineWidget: (selectedSTAC) =>
|
|
614
|
+
includesProcess(selectedSTAC) && {
|
|
615
|
+
id: "Processes",
|
|
616
|
+
type: "internal",
|
|
617
|
+
title: "Processes",
|
|
618
|
+
layout: { x: "9/9/10", y: 6, w: "3/3/2", h: 5 },
|
|
619
|
+
widget: {
|
|
620
|
+
name: "EodashProcess",
|
|
621
|
+
},
|
|
622
|
+
},
|
|
623
|
+
},
|
|
624
|
+
],
|
|
625
|
+
};
|
|
626
|
+
|
|
627
|
+
/** @type {import("@/types").Template} */
|
|
628
|
+
const compare = {
|
|
629
|
+
gap: 16,
|
|
630
|
+
loading: {
|
|
631
|
+
id: Symbol(),
|
|
632
|
+
type: "web-component",
|
|
633
|
+
widget: {
|
|
634
|
+
// https://uiball.com/ldrs/
|
|
635
|
+
link: "https://cdn.jsdelivr.net/npm/ldrs/dist/auto/mirage.js",
|
|
636
|
+
tagName: "l-mirage",
|
|
637
|
+
properties: {
|
|
638
|
+
class: "align-self-center justify-self-center",
|
|
639
|
+
size: "120",
|
|
640
|
+
speed: "2.5",
|
|
641
|
+
color: "#004170",
|
|
642
|
+
},
|
|
643
|
+
},
|
|
644
|
+
},
|
|
645
|
+
background: {
|
|
646
|
+
id: "background-map",
|
|
647
|
+
type: "internal",
|
|
648
|
+
widget: {
|
|
649
|
+
name: "EodashMap",
|
|
650
|
+
properties: {
|
|
651
|
+
enableCompare: true,
|
|
652
|
+
},
|
|
653
|
+
},
|
|
654
|
+
},
|
|
655
|
+
widgets: [
|
|
656
|
+
{
|
|
657
|
+
id: "Tools",
|
|
658
|
+
type: "internal",
|
|
659
|
+
title: "Tools",
|
|
660
|
+
layout: { x: 0, y: 0, w: "3/3/2", h: 1 },
|
|
661
|
+
widget: {
|
|
662
|
+
name: "EodashTools",
|
|
663
|
+
properties: {
|
|
664
|
+
showLayoutSwitcher: false,
|
|
665
|
+
itemFilterConfig: {
|
|
666
|
+
resultType: "cards",
|
|
667
|
+
filtersTitle: "Select an indicator",
|
|
668
|
+
resultsTitle: "",
|
|
669
|
+
subTitleProperty: "subtitle",
|
|
670
|
+
imageProperty: "thumbnail",
|
|
671
|
+
},
|
|
672
|
+
},
|
|
673
|
+
},
|
|
674
|
+
},
|
|
675
|
+
// compare indicators
|
|
676
|
+
{
|
|
677
|
+
id: "CompareTools",
|
|
678
|
+
type: "internal",
|
|
679
|
+
title: "Tools",
|
|
680
|
+
layout: { x: "9/9/10", y: 0, w: "3/3/2", h: 1 },
|
|
681
|
+
widget: {
|
|
682
|
+
name: "EodashTools",
|
|
683
|
+
properties: {
|
|
684
|
+
showLayoutSwitcher: false,
|
|
685
|
+
indicatorBtnText: "Select second indicator",
|
|
686
|
+
itemFilterConfig: {
|
|
687
|
+
enableCompare: true,
|
|
688
|
+
resultType: "cards",
|
|
689
|
+
filtersTitle: "Select an indicator to compare",
|
|
690
|
+
resultsTitle: "",
|
|
691
|
+
subTitleProperty: "subtitle",
|
|
692
|
+
imageProperty: "thumbnail",
|
|
693
|
+
},
|
|
694
|
+
},
|
|
695
|
+
},
|
|
696
|
+
},
|
|
697
|
+
{
|
|
698
|
+
id: "layercontrol",
|
|
699
|
+
type: "internal",
|
|
700
|
+
title: "Layers",
|
|
701
|
+
layout: { x: 0, y: 1, w: "3/3/2", h: 5 },
|
|
702
|
+
widget: {
|
|
703
|
+
name: "EodashLayerControl",
|
|
704
|
+
},
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
id: "CompareLayerControl",
|
|
708
|
+
title: "Comparison Layers",
|
|
709
|
+
layout: { x: "9/9/10", y: 1, w: "3/3/2", h: 5 },
|
|
710
|
+
type: "internal",
|
|
711
|
+
widget: {
|
|
712
|
+
name: "EodashLayerControl",
|
|
713
|
+
properties: {
|
|
714
|
+
map: "second",
|
|
715
|
+
},
|
|
716
|
+
},
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
defineWidget: (selectedSTAC) =>
|
|
720
|
+
includesProcess(selectedSTAC) && {
|
|
721
|
+
id: "Process",
|
|
722
|
+
type: "internal",
|
|
723
|
+
title: "Processes",
|
|
724
|
+
layout: { x: 0, y: 6, w: "3/3/2", h: 5 },
|
|
725
|
+
widget: {
|
|
726
|
+
name: "EodashProcess",
|
|
727
|
+
},
|
|
728
|
+
},
|
|
729
|
+
},
|
|
730
|
+
{
|
|
731
|
+
defineWidget: (_, updatedCompareStac) =>
|
|
732
|
+
includesProcess(updatedCompareStac, true) && {
|
|
733
|
+
id: "CompareMapProcess",
|
|
734
|
+
type: "internal",
|
|
735
|
+
title: "Processes",
|
|
736
|
+
layout: { x: 9, y: 6, w: "3/3/2", h: 5 },
|
|
737
|
+
widget: {
|
|
738
|
+
name: "EodashProcess",
|
|
739
|
+
properties: {
|
|
740
|
+
enableCompare: true,
|
|
741
|
+
},
|
|
742
|
+
},
|
|
743
|
+
},
|
|
744
|
+
},
|
|
745
|
+
{
|
|
746
|
+
defineWidget: (selected) => {
|
|
747
|
+
return selected
|
|
748
|
+
? {
|
|
749
|
+
id: "Buttons",
|
|
750
|
+
layout: { x: "8/8/9", y: 0, w: 1, h: 2 },
|
|
751
|
+
title: "Buttons",
|
|
752
|
+
type: "internal",
|
|
753
|
+
widget: {
|
|
754
|
+
name: "EodashMapBtns",
|
|
755
|
+
properties: {
|
|
756
|
+
compareIndicators: {
|
|
757
|
+
fallbackTemplate: "expert",
|
|
758
|
+
},
|
|
759
|
+
},
|
|
760
|
+
},
|
|
761
|
+
}
|
|
762
|
+
: null;
|
|
763
|
+
},
|
|
764
|
+
},
|
|
765
|
+
{
|
|
766
|
+
defineWidget: (selectedSTAC) => {
|
|
767
|
+
return selectedSTAC
|
|
768
|
+
? {
|
|
769
|
+
id: "expert-Datepicker",
|
|
770
|
+
type: "internal",
|
|
771
|
+
layout: { x: 4, y: 7, w: 4, h: 5 },
|
|
772
|
+
title: "Date",
|
|
773
|
+
widget: {
|
|
774
|
+
name: "EodashDatePicker",
|
|
775
|
+
properties: {
|
|
776
|
+
hintText: `<b>Hint:</b> closest available date is displayed <br />
|
|
777
|
+
on map (see Analysis Layers)`,
|
|
778
|
+
toggleCalendar: true,
|
|
779
|
+
},
|
|
780
|
+
},
|
|
781
|
+
}
|
|
782
|
+
: null;
|
|
783
|
+
},
|
|
784
|
+
},
|
|
785
|
+
],
|
|
786
|
+
};
|
|
787
|
+
|
|
788
|
+
/** @type {import("@/types").Eodash} */
|
|
789
|
+
const baseConfig = {
|
|
790
|
+
id: "demo",
|
|
791
|
+
options: {
|
|
792
|
+
// useSubCode: true,
|
|
793
|
+
},
|
|
794
|
+
stacEndpoint:
|
|
795
|
+
"https://esa-eodashboards.github.io/eodashboard-catalog/trilateral/catalog.json",
|
|
796
|
+
brand: {
|
|
797
|
+
noLayout: true,
|
|
798
|
+
name: "Demo",
|
|
799
|
+
font: {
|
|
800
|
+
headers: {
|
|
801
|
+
family: "Open Sans",
|
|
802
|
+
link: "https://eox.at/fonts/opensans/opensans.css",
|
|
803
|
+
},
|
|
804
|
+
body: {
|
|
805
|
+
family: "Sintony",
|
|
806
|
+
link: "https://eox.at/fonts/sintony/sintony.css",
|
|
807
|
+
},
|
|
808
|
+
},
|
|
809
|
+
theme: {
|
|
810
|
+
colors: {
|
|
811
|
+
primary: "#002742",
|
|
812
|
+
secondary: "#0071C2",
|
|
813
|
+
surface: "#ffff",
|
|
814
|
+
},
|
|
815
|
+
variables: {
|
|
816
|
+
"surface-opacity": 0.8,
|
|
817
|
+
"primary-opacity": 0.8,
|
|
818
|
+
},
|
|
819
|
+
// Bank-Wong palette
|
|
820
|
+
collectionsPalette: [
|
|
821
|
+
"#009E73",
|
|
822
|
+
"#E69F00",
|
|
823
|
+
"#56B4E9",
|
|
824
|
+
"#009E73",
|
|
825
|
+
"#F0E442",
|
|
826
|
+
"#0072B2",
|
|
827
|
+
"#D55E00",
|
|
828
|
+
"#CC79A7",
|
|
829
|
+
"#994F00",
|
|
830
|
+
],
|
|
831
|
+
},
|
|
832
|
+
footerText: "Demo configuration of eodash client",
|
|
833
|
+
},
|
|
834
|
+
templates: {
|
|
835
|
+
light,
|
|
836
|
+
expert,
|
|
837
|
+
compare,
|
|
838
|
+
},
|
|
839
|
+
};
|
|
840
|
+
|
|
841
|
+
/**
|
|
842
|
+
* @param {Partial<import("@/types").Eodash>} config
|
|
843
|
+
*/
|
|
844
|
+
const getBaseConfig = (config) => {
|
|
845
|
+
const merged = /** @type {import("@/types").Eodash} */ ({});
|
|
846
|
+
deepmergeInto(merged, baseConfig, config || {});
|
|
847
|
+
return merged;
|
|
848
|
+
};
|
|
849
|
+
|
|
850
|
+
export { compare, getBaseConfig as default, expert, getBaseConfig, light };
|