Skip to content

Commit 48acdbf

Browse files
authored
fix: update @eodash/eodash to v5.0.0 (#20)
* fix: update @eodash/eodash to v5.0.0-rc.1.5 * fix: include base to static files URLs * chore: update name & deps * fix: update repo * fix: update brand
1 parent 7db02a6 commit 48acdbf

File tree

11 files changed

+3641
-1056
lines changed

11 files changed

+3641
-1056
lines changed

package-lock.json

Lines changed: 3199 additions & 920 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "config-template",
2+
"name": "eodash-instance-template",
33
"version": "1.0.0",
44
"description": "",
55
"type": "module",
@@ -12,16 +12,15 @@
1212
"format": "prettier . --write"
1313
},
1414
"dependencies": {
15-
"@eodash/eodash": "^5.0.0-alpha.2.18",
16-
"@eox/stacinfo": "^0.3.3"
15+
"@eodash/eodash": "^5.0.0"
1716
},
1817
"author": "",
1918
"devDependencies": {
2019
"@eox/eslint-config": "^1.0.1",
2120
"@typescript-eslint/eslint-plugin": "^7.18.0",
2221
"@typescript-eslint/parser": "^7.18.0",
23-
"eslint": "^8.57.0",
24-
"eslint-plugin-vue": "^9.27.0",
25-
"typescript": "^5.5.4"
22+
"eslint": "^8.57.1",
23+
"eslint-plugin-vue": "^9.33.0",
24+
"typescript": "^5.8.3"
2625
}
2726
}
File renamed without changes.
File renamed without changes.

public/favicon.ico

2.49 KB
Binary file not shown.
File renamed without changes.

src/main.js

Lines changed: 27 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -1,135 +1,33 @@
1-
import { createEodash, store } from "@eodash/eodash";
2-
const { currentUrl } = store.states;
1+
import { createEodash } from "@eodash/eodash";
2+
import light from "./templates/light";
3+
import expert from "./templates/expert";
4+
import compare from "./templates/compare";
35

46
export default createEodash({
5-
id: "template-id",
6-
stacEndpoint:
7-
"https://eodashcatalog.eox.at/test-style/trilateral/catalog.json",
8-
brand: {
9-
name: "Dashboard",
10-
font: {
11-
family: "Poppins",
12-
link: new URL("./assets/poppins.css", import.meta.url).href,
13-
},
14-
logo: "/logo.png",
15-
errorMessage:
16-
"something went wrong, please contact [email protected] if the issue persists",
17-
footerText: "eodash instance template",
18-
theme: {
19-
colors: {
20-
primary: "#004170",
21-
secondary: "#004170",
22-
background: "#fff",
23-
surface: "#fff",
7+
id: "demo",
8+
stacEndpoint: "https://esa-eodashboards.github.io/eodashboard-catalog/trilateral/catalog.json",
9+
brand: {
10+
name: "Dashboard",
11+
font: {
12+
family: "Poppins",
13+
link: new URL("./assets/poppins.css", import.meta.url).href,
2414
},
25-
},
26-
},
27-
template: {
28-
gap: 0,
29-
background: {
30-
id: Symbol(),
31-
type: "internal",
32-
widget: {
33-
name: "EodashMap",
34-
properties: {
35-
// enableCompare: true,
15+
logo: "/logo.png",
16+
errorMessage:
17+
"something went wrong, please contact [email protected] if the issue persists",
18+
footerText: "eodash instance template",
19+
theme: {
20+
colors: {
21+
primary: "#004170",
22+
secondary: "#004170",
23+
background: "#fff",
24+
surface: "#fff",
3625
},
3726
},
3827
},
39-
widgets: [
40-
{
41-
id: Symbol(),
42-
type: "internal",
43-
title: "Indicators",
44-
layout: { x: 0, y: 0, w: 3, h: 8 },
45-
widget: {
46-
name: "EodashItemFilter",
47-
properties: {
48-
// enableCompare: true,
49-
aggregateResults: "collection_group",
50-
},
51-
},
52-
},
53-
{
54-
id: Symbol(),
55-
type: "internal",
56-
title: "Layer Control",
57-
layout: { x: 0, y: 8, w: 3, h: 4 },
58-
widget: {
59-
name: "EodashLayerControl",
60-
},
61-
},
62-
{
63-
defineWidget: (selectedSTAC) => {
64-
return selectedSTAC
65-
? {
66-
id: "Information",
67-
title: "Information",
68-
layout: { x: 9, y: 0, w: 3, h: 12 },
69-
type: "web-component",
70-
widget: {
71-
link: async () => await import("@eox/stacinfo"),
72-
properties: {
73-
for: currentUrl,
74-
allowHtml: "true",
75-
styleOverride: `.single-property {columns: 1!important;}
76-
h1 {margin:0px!important;font-size:16px!important;}
77-
header h1:after {
78-
content:' ';
79-
display:block;
80-
border:1px solid #d0d0d0;
81-
}
82-
h2 {font-size:15px}
83-
h3 {font-size:14px}
84-
summary {cursor: pointer;}
85-
#properties li > .value { font-weight: normal !important;}
86-
main {padding-bottom: 10px;}
87-
.footer-container {line-height:1;}
88-
.footer-container button {margin-top: -10px;}
89-
.footer-container small {font-size:10px;line-height:1;}`,
90-
header: '["title"]',
91-
tags: '["themes"]',
92-
subheader: "[]",
93-
properties: '["satellite","sensor","agency","extent"]',
94-
featured: '["description","providers","assets","links"]',
95-
footer: '["sci:citation"]',
96-
},
97-
tagName: "eox-stacinfo",
98-
},
99-
}
100-
: null;
101-
},
102-
},
103-
{
104-
defineWidget: (selectedSTAC) => {
105-
return selectedSTAC
106-
? {
107-
id: "Datepicker",
108-
type: "internal",
109-
layout: { x: 5, y: 10, w: 1, h: 1 },
110-
title: "Datepicker",
111-
widget: {
112-
name: "EodashDatePicker",
113-
},
114-
}
115-
: null;
116-
},
117-
},
118-
{
119-
defineWidget: (selected) => {
120-
return selected
121-
? {
122-
id: "Buttons",
123-
layout: { x: 8, y: 0, w: 1, h: 1 },
124-
title: "Buttons",
125-
type: "internal",
126-
widget: {
127-
name: "EodashMapBtns",
128-
},
129-
}
130-
: null;
131-
},
132-
},
133-
],
134-
},
135-
});
28+
templates: {
29+
light,
30+
expert,
31+
compare
32+
}
33+
});

src/templates/compare.js

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
import { mdiViewDashboardVariant } from "@mdi/js";
2+
3+
/** @type {import("@eodash/eodash").Template} */
4+
export default {
5+
gap: 16,
6+
loading: {
7+
id: Symbol(),
8+
type: "web-component",
9+
widget: {
10+
// https://uiball.com/ldrs/
11+
link: "https://cdn.jsdelivr.net/npm/ldrs/dist/auto/mirage.js",
12+
tagName: "l-mirage",
13+
properties: {
14+
class: "align-self-center justify-self-center",
15+
size: "120",
16+
speed: "2.5",
17+
color: "#004170",
18+
},
19+
},
20+
},
21+
background: {
22+
id: "background-map",
23+
type: "internal",
24+
widget: {
25+
name: "EodashMap",
26+
properties: {
27+
enableCompare: true,
28+
},
29+
},
30+
},
31+
widgets: [
32+
{
33+
id: Symbol(),
34+
type: "internal",
35+
title: "Tools",
36+
layout: { x: 0, y: 0, w: 3, h: 1 },
37+
widget: {
38+
name: "EodashTools",
39+
properties: {
40+
layoutTarget: "expert",
41+
layoutIcon: mdiViewDashboardVariant,
42+
itemFilterConfig: {
43+
cssVars: {
44+
"--form-flex-direction": "row",
45+
},
46+
},
47+
},
48+
},
49+
},
50+
// compare indicators
51+
{
52+
id: Symbol(),
53+
type: "internal",
54+
title: "Compare Tools",
55+
layout: { x: 9, y: 0, w: 3, h: 1 },
56+
widget: {
57+
name: "EodashTools",
58+
properties: {
59+
showLayoutSwitcher: false,
60+
indicatorBtnText: "Select an indicator to compare",
61+
itemFilterConfig: {
62+
enableCompare: true,
63+
// resultsTitle:"Select an indicator to compare",
64+
filtersTitle: "Select an indicator to compare",
65+
// filterProperties: [],
66+
cssVars: {
67+
"--form-flex-direction": "row",
68+
},
69+
},
70+
},
71+
},
72+
},
73+
{
74+
id: Symbol(),
75+
type: "internal",
76+
title: "Layers",
77+
layout: { x: 0, y: 1, w: 3, h: 6 },
78+
widget: {
79+
name: "EodashLayerControl",
80+
},
81+
},
82+
{
83+
id: Symbol(),
84+
title: "Comparison Layers",
85+
layout: { x: 9, y: 1, w: 3, h: 6 },
86+
type: "internal",
87+
widget: {
88+
name: "EodashLayerControl",
89+
properties: {
90+
map: "second",
91+
},
92+
},
93+
},
94+
{
95+
defineWidget: (selectedSTAC) =>
96+
selectedSTAC?.links.some((l) => l.rel === "service")
97+
? {
98+
id: Symbol(),
99+
type: "internal",
100+
title: "Processes",
101+
layout: { x: 0, y: 7, w: 3, h: 5 },
102+
widget: {
103+
name: "EodashProcess",
104+
},
105+
}
106+
: null,
107+
},
108+
{
109+
defineWidget: (selected) => {
110+
return selected
111+
? {
112+
id: "Buttons",
113+
layout: { x: 8, y: 0, w: 1, h: 2 },
114+
title: "Buttons",
115+
type: "internal",
116+
widget: {
117+
name: "EodashMapBtns",
118+
},
119+
}
120+
: null;
121+
},
122+
},
123+
{
124+
defineWidget: (selectedSTAC) => {
125+
return selectedSTAC
126+
? {
127+
id: "Datepicker",
128+
type: "internal",
129+
layout: { x: 5, y: 8, w: 2, h: 4 },
130+
title: "Date",
131+
widget: {
132+
name: "EodashDatePicker",
133+
properties: {
134+
hintText: `<b>Hint:</b> closest available date is displayed <br />
135+
on map (see Analysis Layers)`,
136+
},
137+
},
138+
}
139+
: null;
140+
},
141+
},
142+
],
143+
};

0 commit comments

Comments
 (0)