@geogirafe/lib-geoportal 1.1.0-dev.2316166507 → 1.1.0-dev.2321641404
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/LICENSE +2 -0
- package/api/apicontext.d.ts +2 -0
- package/api/apicontext.js +4 -0
- package/assets/i18n/de.json +6 -1
- package/assets/i18n/en.json +5 -0
- package/assets/i18n/fr.json +5 -0
- package/assets/i18n/it.json +5 -0
- package/assets/icons/adjust-disable.svg +1 -0
- package/assets/icons/favorite-add.svg +1 -0
- package/assets/icons/favorite-no.svg +1 -0
- package/assets/icons/favorite-remove.svg +1 -0
- package/assets/icons/favorite-yes.svg +1 -0
- package/components/contact/component.js +1 -1
- package/components/map/component.d.ts +1 -0
- package/components/map/component.js +7 -2
- package/components/search/component.d.ts +1 -1
- package/components/search/component.js +9 -4
- package/components/themes/component.d.ts +16 -4
- package/components/themes/component.js +68 -11
- package/components/treeview/tools/treeviewelement.d.ts +2 -0
- package/components/treeview/tools/treeviewelement.js +21 -0
- package/components/treeview/treeviewgroup/component.js +1 -1
- package/components/treeview/treeviewitem/component.js +1 -1
- package/components/treeview/treeviewtheme/component.js +1 -1
- package/main.tools.js +6 -1
- package/models/layers/baselayer.d.ts +1 -0
- package/models/layers/baselayer.js +1 -0
- package/package.json +1 -1
- package/styles/variables.css +4 -0
- package/templates/public/about.json +1 -1
- package/tools/configuration/configmanager.d.ts +3 -0
- package/tools/configuration/configmanager.js +14 -8
- package/tools/context/context.d.ts +2 -0
- package/tools/context/context.js +4 -0
- package/tools/context/icontext.d.ts +2 -0
- package/tools/layers/layermanager.d.ts +1 -0
- package/tools/layers/layermanager.js +9 -0
- package/tools/main.d.ts +2 -0
- package/tools/main.js +1 -0
- package/tools/share/serializers/activebasemapsserializer.js +1 -2
- package/tools/state/mapManager.d.ts +4 -3
- package/tools/state/mapManager.js +28 -19
- package/tools/tests/mockcontext.d.ts +2 -0
- package/tools/tests/mockcontext.js +4 -0
- package/tools/themes/themefavoritesmanager.d.ts +17 -0
- package/tools/themes/themefavoritesmanager.js +53 -0
- package/tools/themes/themefavoritesmanager.spec.d.ts +1 -0
- package/tools/themes/themefavoritesmanager.spec.js +103 -0
- package/tools/themes/themeshelper.d.ts +7 -1
- package/tools/themes/themeshelper.js +51 -19
package/LICENSE
CHANGED
|
@@ -237,6 +237,8 @@ From:
|
|
|
237
237
|
- https://www.svgrepo.com/svg/309943/select-all-off
|
|
238
238
|
- https://www.svgrepo.com/svg/310303/arrow-forward
|
|
239
239
|
- https://www.svgrepo.com/svg/310306/arrow-import
|
|
240
|
+
- https://www.svgrepo.com/svg/310006/star
|
|
241
|
+
- https://www.svgrepo.com/svg/310008/star-add
|
|
240
242
|
|
|
241
243
|
|
|
242
244
|
The MIT License (MIT)
|
package/api/apicontext.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ import WmsManager from '../tools/wms/wmsmanager.js';
|
|
|
30
30
|
import IGirafeContext from '../tools/context/icontext.js';
|
|
31
31
|
import ApiSessionManager from './apisessionmanager.js';
|
|
32
32
|
import OnBoardingManager from '../tools/onboarding/onboardingmanager.js';
|
|
33
|
+
import ThemeFavoritesManager from '../tools/themes/themefavoritesmanager.js';
|
|
33
34
|
export default class GirafeApiContext implements IGirafeContext {
|
|
34
35
|
readonly userDataManager: UserDataManager;
|
|
35
36
|
readonly configManager: ConfigManager;
|
|
@@ -62,6 +63,7 @@ export default class GirafeApiContext implements IGirafeContext {
|
|
|
62
63
|
readonly ogcApiFeaturesManager: OgcApiFeaturesManager;
|
|
63
64
|
readonly localFileManager: LocalFileManager;
|
|
64
65
|
readonly onBoardingManager: OnBoardingManager;
|
|
66
|
+
readonly themeFavoritesManager: ThemeFavoritesManager;
|
|
65
67
|
constructor();
|
|
66
68
|
initialize(): Promise<void>;
|
|
67
69
|
}
|
package/api/apicontext.js
CHANGED
|
@@ -29,6 +29,7 @@ import WfsManager from '../tools/wfs/wfsmanager.js';
|
|
|
29
29
|
import WmsManager from '../tools/wms/wmsmanager.js';
|
|
30
30
|
import ApiSessionManager from './apisessionmanager.js';
|
|
31
31
|
import OnBoardingManager from '../tools/onboarding/onboardingmanager.js';
|
|
32
|
+
import ThemeFavoritesManager from '../tools/themes/themefavoritesmanager.js';
|
|
32
33
|
export default class GirafeApiContext {
|
|
33
34
|
userDataManager;
|
|
34
35
|
configManager;
|
|
@@ -61,6 +62,7 @@ export default class GirafeApiContext {
|
|
|
61
62
|
ogcApiFeaturesManager;
|
|
62
63
|
localFileManager;
|
|
63
64
|
onBoardingManager;
|
|
65
|
+
themeFavoritesManager;
|
|
64
66
|
constructor() {
|
|
65
67
|
this.componentManager = new ComponentManager(this);
|
|
66
68
|
this.userDataManager = new UserDataManager(this);
|
|
@@ -93,6 +95,7 @@ export default class GirafeApiContext {
|
|
|
93
95
|
this.localFileManager = new LocalFileManager(this);
|
|
94
96
|
this.ogcApiFeaturesManager = new OgcApiFeaturesManager(this);
|
|
95
97
|
this.onBoardingManager = new OnBoardingManager(this);
|
|
98
|
+
this.themeFavoritesManager = new ThemeFavoritesManager(this);
|
|
96
99
|
}
|
|
97
100
|
async initialize() {
|
|
98
101
|
// NOTE : This initialization order is important, because some singleton will need other ones !
|
|
@@ -129,5 +132,6 @@ export default class GirafeApiContext {
|
|
|
129
132
|
this.localFileManager.initializeSingleton();
|
|
130
133
|
this.ogcApiFeaturesManager.initializeSingleton();
|
|
131
134
|
this.onBoardingManager.initializeSingleton();
|
|
135
|
+
this.themeFavoritesManager.initializeSingleton();
|
|
132
136
|
}
|
|
133
137
|
}
|
package/assets/i18n/de.json
CHANGED
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"Control opacity": "Deckkraft steuern",
|
|
55
55
|
"Copy ShortUrl": "Kurz-URL kopieren",
|
|
56
56
|
"Copy value": "Wert kopieren",
|
|
57
|
-
"Create custom theme": "
|
|
57
|
+
"Create custom theme": "Thema erstellen",
|
|
58
58
|
"cross-section-settings": "Querschnitt",
|
|
59
59
|
"CSV export": "CSV-Export",
|
|
60
60
|
"Current Feature": "Aktuelles Objekt",
|
|
@@ -410,10 +410,15 @@
|
|
|
410
410
|
"The following link will be sent with your message. It contains your current configuration and will help us to understand your problem.": "Der folgende Link wird mit Ihrer Nachricht gesendet. Er enthält Ihre aktuelle Konfiguration und hilft uns, Ihr Problem zu verstehen.",
|
|
411
411
|
"The generated document may contain sensitive data.": "Das generierte Dokument kann sensible Daten enthalten.",
|
|
412
412
|
"The print server is unavailable. Please, try later.": "Der Druckserver ist nicht verfügbar. Bitte versuche es später erneut.",
|
|
413
|
+
"The theme {name} is already present in the treeview.": "Das Thema {name} ist bereits im Layerbaum vorhanden.",
|
|
413
414
|
"theme": "Standardthema",
|
|
414
415
|
"Theme selection": "Themenauswahl",
|
|
415
416
|
"Themes": "Themen",
|
|
416
417
|
"themes": "themen",
|
|
418
|
+
"themes-add-remove-favorites": "Zu Favoriten hinzufügen/entfernen",
|
|
419
|
+
"themes-type-all": "Alle Themen",
|
|
420
|
+
"themes-type-custom": "Benutzerdefinierte",
|
|
421
|
+
"themes-type-favorites": "Favoriten",
|
|
417
422
|
"This instance of GeoGirafe cannot be used at the moment.": "Diese Instanz von GeoGirafe kann momentan nicht verwendet werden.",
|
|
418
423
|
"Toggle all legends": "Alle Legenden umschalten",
|
|
419
424
|
"Toggle legend": "Legende umschalten",
|
package/assets/i18n/en.json
CHANGED
|
@@ -412,10 +412,15 @@
|
|
|
412
412
|
"The following link will be sent with your message. It contains your current configuration and will help us to understand your problem.": "The following link will be sent with your message. It contains your current configuration and will help us to understand your problem.",
|
|
413
413
|
"The generated document may contain sensitive data.": "The generated document may contain sensitive data.",
|
|
414
414
|
"The print server is unavailable. Please, try later.": "The print server is unavailable. Please, try later.",
|
|
415
|
+
"The theme {name} is already present in the treeview.": "The theme {name} is already present in the treeview.",
|
|
415
416
|
"theme": "Default theme",
|
|
416
417
|
"Theme selection": "Theme selection",
|
|
417
418
|
"Themes": "Themes",
|
|
418
419
|
"themes": "themes",
|
|
420
|
+
"themes-add-remove-favorites": "Add/Remove to Favorites",
|
|
421
|
+
"themes-type-all": "All Themes",
|
|
422
|
+
"themes-type-custom": "Custom Themes",
|
|
423
|
+
"themes-type-favorites": "Favorite Themes",
|
|
419
424
|
"This instance of GeoGirafe cannot be used at the moment.": "This instance of GeoGirafe cannot be used at the moment.",
|
|
420
425
|
"Toggle all legends": "Toggle all legends",
|
|
421
426
|
"Toggle legend": "Toggle legend",
|
package/assets/i18n/fr.json
CHANGED
|
@@ -410,10 +410,15 @@
|
|
|
410
410
|
"The following link will be sent with your message. It contains your current configuration and will help us to understand your problem.": "Le lien ci-dessous sera envoyé avec votre message. Il contient votre configuration courante et nous aidera à analyser votre demande.",
|
|
411
411
|
"The generated document may contain sensitive data.": "Le document généré peut contenir des données sensibles.",
|
|
412
412
|
"The print server is unavailable. Please, try later.": "Le serveur d'impression est indisponible. Veuillez réessayer plus tard.",
|
|
413
|
+
"The theme {name} is already present in the treeview.": "Le thème {name} est déjà présent dans l’arbre des couches.",
|
|
413
414
|
"theme": "Thème par défaut",
|
|
414
415
|
"Theme selection": "Sélection du thème",
|
|
415
416
|
"Themes": "Thèmes",
|
|
416
417
|
"themes": "thèmes",
|
|
418
|
+
"themes-add-remove-favorites": "Ajouter aux favoris / retirer des favoris",
|
|
419
|
+
"themes-type-all": "Tous les thèmes",
|
|
420
|
+
"themes-type-custom": "Personnalisés",
|
|
421
|
+
"themes-type-favorites": "Favoris",
|
|
417
422
|
"This instance of GeoGirafe cannot be used at the moment.": "Cette instance de GeoGirafe ne peut pas être utilisée pour le moment.",
|
|
418
423
|
"Toggle all legends": "Afficher / Masquer toutes les légendes",
|
|
419
424
|
"Toggle legend": "Afficher / Masquer la légende",
|
package/assets/i18n/it.json
CHANGED
|
@@ -410,10 +410,15 @@
|
|
|
410
410
|
"The following link will be sent with your message. It contains your current configuration and will help us to understand your problem.": "Il seguente link verrà inviato con il tuo messaggio. Contiene la tua configurazione attuale e ci aiuterà a capire il problema.",
|
|
411
411
|
"The generated document may contain sensitive data.": "Il documento generato potrebbe contenere dati sensibili.",
|
|
412
412
|
"The print server is unavailable. Please, try later.": "Il server di stampa non è disponibile. Riprova più tardi.",
|
|
413
|
+
"The theme {name} is already present in the treeview.": "Il tema {name} è già presente nella struttura ad albero.",
|
|
413
414
|
"theme": "Tema predefinito",
|
|
414
415
|
"Theme selection": "Selezione del tema",
|
|
415
416
|
"Themes": "Temi",
|
|
416
417
|
"themes": "temi",
|
|
418
|
+
"themes-add-remove-favorites": "Aggiungi ai preferiti / rimuovi dai preferiti",
|
|
419
|
+
"themes-type-all": "Tutti i temi",
|
|
420
|
+
"themes-type-custom": "Personalizzati",
|
|
421
|
+
"themes-type-favorites": "Preferiti",
|
|
417
422
|
"This instance of GeoGirafe cannot be used at the moment.": "Questa istanza di GeoGirafe non può essere utilizzata al momento.",
|
|
418
423
|
"Toggle all legends": "Attiva / Disattiva tutte le legende",
|
|
419
424
|
"Toggle legend": "Attiva / Disattiva legenda",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="#5f6368" viewBox="0 -960 960 960"><path d="M480-360q50 0 85-35t35-85-35-85-85-35-85 35-35 85 35 85 85 35m0 280q-83 0-156-31.5T197-197t-85.5-127T80-480t31.5-156T197-763t127-85.5T480-880t156 31.5T763-763t85.5 127T880-480t-31.5 156T763-197t-127 85.5T480-80m0-80q134 0 227-93t93-227-93-227-227-93-227 93-93 227 93 227 227 93m0-320"/><path d="m67.025-67.033 826.657-826.666" style="fill:none;stroke:#000;stroke-width:53.0651;stroke-linecap:round;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="800" height="800" viewBox="0 0 24 24"><title>ic_fluent_star_add_24_regular</title><path fill="#212121" fill-rule="nonzero" d="M17.5 12a5.5 5.5 0 1 1 0 11 5.5 5.5 0 0 1 0-11m-4.827-9.24 2.683 5.448 6.011.869a.75.75 0 0 1 .416 1.279l-1.368 1.333a6.5 6.5 0 0 0-1.583-.552l.815-.793-4.896-.708a.75.75 0 0 1-.566-.41L12 4.787 9.815 9.225a.75.75 0 0 1-.566.411l-4.895.707 3.545 3.45a.75.75 0 0 1 .216.665l-.84 4.873L11 17.37a6.6 6.6 0 0 0 .167 1.607l-4.541 2.392a.75.75 0 0 1-1.09-.79l1.032-5.986-4.352-4.236a.75.75 0 0 1 .416-1.28l6.01-.868 2.684-5.448a.75.75 0 0 1 1.346 0M17.5 14l-.09.007a.5.5 0 0 0-.402.402L17 14.5V17L14.498 17l-.09.008a.5.5 0 0 0-.402.402l-.008.09.008.09a.5.5 0 0 0 .402.402l.09.008H17v2.503l.008.09a.5.5 0 0 0 .402.402l.09.008.09-.008a.5.5 0 0 0 .402-.402l.008-.09V18l2.504.001.09-.008a.5.5 0 0 0 .402-.402l.008-.09-.008-.09a.5.5 0 0 0-.403-.402l-.09-.008H18v-2.5l-.008-.09a.5.5 0 0 0-.402-.403z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="800" height="800" viewBox="0 0 28 28"><title>ic_fluent_star_28_regular</title><path fill="#212121" fill-rule="nonzero" d="M14.437 3.103a1 1 0 0 1 .455.455l2.923 5.924 6.538.95a1 1 0 0 1 .555 1.706l-4.731 4.611 1.116 6.512a1 1 0 0 1-1.45 1.054l-5.848-3.074-5.848 3.074a1 1 0 0 1-1.45-1.054l1.116-6.512-4.731-4.611a1 1 0 0 1 .554-1.706l6.538-.95 2.924-5.924a1 1 0 0 1 1.34-.455m-3.267 7.75-6.316.918 4.57 4.455-1.078 6.29 5.649-2.97 5.649 2.97-1.08-6.29 4.571-4.455-6.316-.918-2.824-5.723z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="800" height="800" fill="#eab308" viewBox="0 0 24 24"><title>ic_fluent_star_add_24_regular</title><g fill="#212121" fill-rule="nonzero"><path d="M14.437 3.103a1 1 0 0 1 .455.455l2.923 5.924 6.538.95a1 1 0 0 1 .555 1.706l-4.731 4.611c-6.224 4.484-.045.03-6.182 4.492l-5.848 3.074a1 1 0 0 1-1.45-1.054l1.116-6.512-4.731-4.611a1 1 0 0 1 .554-1.706l6.538-.95 2.924-5.924a1 1 0 0 1 1.34-.455" class="UnoptimicedTransforms" style="display:inline;fill:#eab308;fill-opacity:1;stroke:none;stroke-opacity:1" transform="matrix(.82693 0 0 .81171 .481 .565)"/><path d="M17.5 12a5.5 5.5 0 1 1 0 11 5.5 5.5 0 0 1 0-11m-4.827-9.24 2.683 5.448 6.011.869a.75.75 0 0 1 .416 1.279l-1.368 1.333a6.5 6.5 0 0 0-1.583-.552l.815-.793-4.896-.708a.75.75 0 0 1-.566-.41L12 4.787 9.815 9.225a.75.75 0 0 1-.566.411l-4.895.707 3.545 3.45a.75.75 0 0 1 .216.665l-.84 4.873L11 17.37a6.6 6.6 0 0 0 .167 1.607l-4.541 2.392a.75.75 0 0 1-1.09-.79l1.032-5.986-4.352-4.236a.75.75 0 0 1 .416-1.28l6.01-.868 2.684-5.448a.75.75 0 0 1 1.346 0M14.5 17a.5.5 0 0 0 0 1h6a.5.5 0 0 0 0-1Z" style="display:inline"/></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="800" height="800" viewBox="0 0 28 28"><title>ic_fluent_star_28_regular</title><g fill="#212121" fill-rule="nonzero"><path d="M14.437 3.103a1 1 0 0 1 .455.455l2.923 5.924 6.538.95a1 1 0 0 1 .555 1.706l-4.731 4.611 1.116 6.512a1 1 0 0 1-1.45 1.054l-5.848-3.074-5.848 3.074a1 1 0 0 1-1.45-1.054l1.116-6.512-4.731-4.611a1 1 0 0 1 .554-1.706l6.538-.95 2.924-5.924a1 1 0 0 1 1.34-.455" class="UnoptimicedTransforms" style="display:inline;fill:#eab308;fill-opacity:1;stroke:none;stroke-opacity:1"/><path d="M14.437 3.103a1 1 0 0 1 .455.455l2.923 5.924 6.538.95a1 1 0 0 1 .555 1.706l-4.731 4.611 1.116 6.512a1 1 0 0 1-1.45 1.054l-5.848-3.074-5.848 3.074a1 1 0 0 1-1.45-1.054l1.116-6.512-4.731-4.611a1 1 0 0 1 .554-1.706l6.538-.95 2.924-5.924a1 1 0 0 1 1.34-.455m-3.267 7.75-6.316.918 4.57 4.455-1.078 6.29 5.649-2.97 5.649 2.97-1.08-6.29 4.571-4.455-6.316-.918-2.824-5.723z" class="UnoptimicedTransforms" style="display:inline"/><path d="M14.437 3.103a1 1 0 0 1 .455.455l2.923 5.924 6.538.95a1 1 0 0 1 .555 1.706l-4.731 4.611 1.116 6.512a1 1 0 0 1-1.45 1.054l-5.848-3.074-5.848 3.074a1 1 0 0 1-1.45-1.054l1.116-6.512-4.731-4.611a1 1 0 0 1 .554-1.706l6.538-.95 2.924-5.924a1 1 0 0 1 1.34-.455m-3.267 7.75-6.316.918 4.57 4.455-1.078 6.29 5.649-2.97 5.649 2.97-1.08-6.29 4.571-4.455-6.316-.918-2.824-5.723z"/></g></svg>
|
|
@@ -7,7 +7,7 @@ class ContactComponent extends GirafeHTMLElement {
|
|
|
7
7
|
</style><style>
|
|
8
8
|
#content{background:var(--bkg-color);color:var(--text-color);flex-direction:column;margin:0;padding:1rem;display:flex}label,input,select,textarea{flex-grow:1;font-size:.9rem}.gg-input,.gg-select{margin-bottom:1rem}.mail-contact{margin-top:2rem;margin-bottom:2rem}
|
|
9
9
|
</style>
|
|
10
|
-
<div id="panel"><div id="content"><label for="email" i18n="Your email (optional)" class="gg-label">Your email (optional)</label> <input id="email" placeholder="
|
|
10
|
+
<div id="panel"><div id="content"><label for="email" i18n="Your email (optional)" class="gg-label">Your email (optional)</label> <input id="email" placeholder="you@example.com" class="gg-input"> <label for="reason" i18n="Why are you contacting us?" class="gg-label">Why are you contacting us?</label> <select id="reason" class="gg-select"><option value="" disabled="disabled" selected="selected">-</option>${this.context.configManager.Config.contact?.reasons.map((reason) => uHtml `<option i18n="${reason}" value="${reason}">${reason}</option>`)}</select> <label for="message" i18n="Your message" class="gg-label">Your message</label> <textarea id="message" class="gg-input gg-textarea"></textarea> <label for="shortlink" i18n="The following link will be sent with your message. It contains your current configuration and will help us to understand your problem." class="gg-label">The following link will be sent with your message. It contains your current configuration and will help us to understand your problem.</label> <input id="shortlink" disabled="disabled" value="${this.shortUrl}" class="gg-input"><div class="mail-contact"><span i18n="You can also contact us directly by E-Mail at">You can also contact us directly by E-Mail at</span> <a href="${'mailto:' + this.context.configManager.Config.contact?.email}">${this.context.configManager.Config.contact?.email}</a></div><button class="gg-button" tip="Send message" i18n="Send" onclick="${() => this.sendMessage()}">Send</button></div></div>`;
|
|
11
11
|
};
|
|
12
12
|
isPanelVisible = false;
|
|
13
13
|
panelTitle = 'contact-panel';
|
|
@@ -74,6 +74,7 @@ export default class MapComponent extends GirafeHTMLElement {
|
|
|
74
74
|
registerEvents(): void;
|
|
75
75
|
locateUser(): void;
|
|
76
76
|
getCurrentLocation(): void;
|
|
77
|
+
disableLocateUser: () => void;
|
|
77
78
|
readonly updateGeolocation: (position: GeolocationPosition) => void;
|
|
78
79
|
render(): void;
|
|
79
80
|
listenOpenLayersEvents(): void;
|
|
@@ -46,9 +46,9 @@ export default class MapComponent extends GirafeHTMLElement {
|
|
|
46
46
|
return uHtml `<style>
|
|
47
47
|
*{font-family:Arial,sans-serif}.hidden{display:none!important}.gg-rotate90{transform:rotate(90deg)}.gg-rotate180{transform:rotate(180deg)}.gg-rotate270{transform:rotate(270deg)}img{filter:var(--svg-filter)}img.legend-image{filter:var(--svg-map-filter);background:var(--svg-legend-bkg)}div{scrollbar-width:thin}a,a:visited{color:var(--link-color)}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes spin-wait{0%{transform:rotate(0)}7%{transform:rotate(360deg)}to{transform:rotate(360deg)}}.gg-spin{animation-name:spin;animation-duration:2s;animation-timing-function:linear;animation-iteration-count:infinite}.gg-spin-wait{animation-name:spin-wait;animation-duration:10s;animation-timing-function:linear;animation-iteration-count:infinite}::-webkit-scrollbar{width:5px}::-webkit-scrollbar-thumb{background:#999}.gg-button,.gg-select,.gg-input,.gg-textarea{background-color:var(--bkg-color);color:var(--text-color);border:var(--app-standard-border);box-sizing:border-box;cursor:pointer;border-radius:3px;outline:0;margin:0;padding:0 0 0 .5rem;display:inline-block}.gg-label{background-color:var(--bkg-color);color:var(--text-color);border:none;align-items:center;margin:0;padding:0;display:flex}.gg-button,.gg-select,.gg-input,.gg-label{min-height:calc(var(--app-standard-height)/1.5)}.gg-textarea{max-height:initial;resize:vertical;height:6rem;padding:.5rem;line-height:1.3rem}.gg-input{cursor:text}.gg-checkbox{accent-color:var(--text-color);width:1.2rem}.gg-range{accent-color:var(--text-color)}.gg-button{padding:0 .5rem}.gg-button.active{border:solid 1px var(--text-color-grad2);background-color:var(--text-color-grad2);color:var(--bkg-color)}.gg-button:disabled{color:gray;cursor:not-allowed;background-color:#d3d3d3;border:none}.gg-input:disabled,.gg-select:disabled,.gg-textarea:disabled{color:gray;cursor:not-allowed;background-color:#d3d3d3}.gg-button>img{vertical-align:middle}.gg-icon-button{color:var(--text-color);cursor:pointer;background-color:#0000;border:none;flex-direction:column;justify-content:center;align-items:center;padding:0;display:flex}.gg-icon{justify-content:center;align-items:center;display:flex}.gg-big,.gg-big-withtext{min-width:var(--app-standard-height);min-height:var(--app-standard-height);max-height:var(--app-standard-height)}.gg-big img,.gg-big-withtext img{width:calc(var(--app-standard-height) - 1.5rem);margin:0}.gg-big-withtext span{font-variant:small-caps;padding:0 1rem;font-size:.9rem}.gg-medium,.gg-medium-withtext{min-width:calc(var(--app-standard-height)/1.2);min-height:calc(var(--app-standard-height)/1.2);max-height:calc(var(--app-standard-height)/1.2);flex-direction:row}.gg-medium img{width:calc(var(--app-standard-height)/2.4);margin:0}.gg-medium-withtext img{width:calc(var(--app-standard-height)/2.4);margin-left:.5rem}.gg-medium-withtext span{padding:0 1rem 0 .5rem;font-size:.9rem}.gg-small,.gg-small-withtext{min-width:calc(var(--app-standard-height)/2);min-height:calc(var(--app-standard-height)/2);max-height:calc(var(--app-standard-height)/2);flex-direction:row}.gg-small img{width:calc(var(--app-standard-height)/3);margin:0}.gg-small-withtext img{width:calc(var(--app-standard-height)/3);margin-left:.5rem}.gg-small-withtext span{padding:0 .5rem 0 .3rem;font-size:.9rem}.gg-button:hover,.gg-select:hover,.gg-input:hover,.gg-textarea:hover,.gg-icon-button:hover{background-color:var(--bkg-color-grad1)}.gg-opacity{opacity:.5}.gg-opacity:hover{opacity:1;background-color:#0000}.gg-tabs{cursor:pointer;grid-auto-flow:column;padding-bottom:1rem;font-size:1rem;display:grid}.gg-tab{border:none;border-bottom:var(--app-standard-border);cursor:pointer;color:var(--text-color);background:0 0;padding:.5rem}.gg-tab.active{border-bottom:solid 1px var(--text-color)}.girafe-button-big,.girafe-button-large,.girafe-button-small,.girafe-button-tiny{color:var(--text-color);background-color:#0000;border:none;flex-direction:column;display:flex}.girafe-button-big:hover,.girafe-button-large:hover,.girafe-button-small:hover,.girafe-button-tiny:hover{background-color:var(--bkg-color-grad1);cursor:pointer}.girafe-button-big.dark,.girafe-button-large.dark,.girafe-button-small.dark,.girafe-button-tiny.dark{background-color:var(--bkg-color);filter:invert()}.girafe-button-big{width:var(--app-standard-height);height:var(--app-standard-height);align-items:center;padding:1rem}.girafe-button-big img{overflow:hidden}.girafe-button-large{flex-direction:row}.girafe-button-large img{height:2rem;margin:.3rem}.girafe-button-large span{height:2rem;margin:.3rem;line-height:2rem}.girafe-button-small{min-width:calc(var(--app-standard-height)/2);height:calc(var(--app-standard-height)/2);align-items:center;padding:.5rem}.girafe-button-small img{overflow:hidden}.girafe-button-small span{text-align:left;text-overflow:ellipsis;width:100%;overflow:hidden}.girafe-button-tiny{align-items:center;width:1rem;height:1rem;padding:0}.girafe-button-tiny img{overflow:hidden}.girafe-onboarding-theme{background-color:var(--bkg-color)!important;color:var(--text-color)!important}.girafe-onboarding-theme button{background-color:var(--bkg-color)!important;color:var(--text-color)!important;text-shadow:none!important}.girafe-onboarding-theme button.driver-popover-close-btn{z-index:10000}
|
|
48
48
|
</style><style>
|
|
49
|
-
#container,#ol-map{background-color:var(--bkg-color);width:100%;height:100%;position:relative}#ol-map.darkmap canvas{filter:invert()hue-rotate(180deg)}.hidden{display:none}.center{text-align:center;margin:10px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.loading span{color:var(--text-color);margin-top:1rem;font-weight:600;display:block}.loading span.quote{font-style:italic;font-weight:300}#cs-map{background-color:var(--bkg-color);border-left:3px solid #444;height:100%;display:none;position:absolute;overflow:hidden}.ol-control{background-color:#0000;border:none;box-shadow:0 1px 4px #0000004d;right:2rem!important;left:unset!important}.ol-zoom{top:2rem!important}.ol-rotate{top:9.3rem!important}.ol-location{top:7rem!important}.img-location{width:55%;height:auto}.ol-zoom-in,.ol-zoom-out,.btn-location,.ol-rotate-reset{cursor:pointer;background-color:#fff;width:2rem!important;height:2rem!important;font-size:1.2rem!important}.ol-scale-line{bottom:.5rem!important;right:1rem!important;left:unset!important}.ol-popup{background-color:var(--bkg-color);color:var(--text-color);box-shadow:0 1px 4px var(--bx-shdw);border:1px solid var(--text-color-grad1);border-radius:10px;min-width:140px;padding:15px;position:absolute;bottom:12px;left:-50px}.ol-popup:after,.ol-popup:before{content:" ";pointer-events:none;border:solid #0000;width:0;height:0;position:absolute;top:100%}.ol-popup:after{border-top-color:var(--bkg-color);border-width:10px;margin-left:-10px;left:48px}.ol-popup:before{border-top-color:var(--text-color-grad1);border-width:11px;margin-left:-11px;left:48px}.ol-popup-closer{background-color:var(--bkg-color);color:var(--text-color);cursor:pointer;text-decoration:none;position:absolute;top:2px;right:8px}.ol-popup-closer:after{content:"✖"}#swiper{width:100%;height:0;margin:0;display:none;position:absolute;top:50%}input[type=range]{-webkit-appearance:none;width:100%}input[type=range]::-webkit-slider-runnable-track{height:0}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;background:var(--bkg-color);cursor:ew-resize;border:2px solid #444;width:6px;height:0;margin-top:-1000px;padding-top:1000px;padding-bottom:1000px}input[type=range]::-moz-range-thumb{background:var(--bkg-color);cursor:ew-resize;border:2px solid #444;width:3px;height:0;padding-top:1000px;padding-bottom:1000px}.close-swiper{--button-size:2rem;transform:translateX(calc(-1*var(--button-size)/2));width:var(--button-size);height:var(--button-size);background-color:var(--bkg-color);color:var(--text-color);cursor:pointer;border-width:1px;border-radius:4px;display:none;position:absolute;top:0}.close-swiper:hover,.close-swiper:focus{outline:1px solid var(--text-color);color:var(--text-color-grad1)}.ol-viewport .tooltip{color:#fff;opacity:.7;white-space:nowrap;background:#00000080;border-radius:0;padding:.32rem .62rem;position:relative}@media screen and (hover:none){.ol-zoom,.ol-rotate,.ol-location{display:none!important}}.contextmenu{background-color:var(--bkg-color);color:var(--text-color);border:1px solid #ccc;box-shadow:1px 3px 4px #0006;& .hidden{display:none}& .menu-entry{cursor:pointer;padding:10px}& .menu-entry:hover{background-color:var(--bkg-color-grad1)}& .menu-entry[aria-disabled=true]{pointer-events:none;color:var(--text-color-grad1)}}
|
|
49
|
+
#container,#ol-map{background-color:var(--bkg-color);width:100%;height:100%;position:relative}#ol-map.darkmap canvas{filter:invert()hue-rotate(180deg)}.hidden{display:none}.center{text-align:center;margin:10px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.loading span{color:var(--text-color);margin-top:1rem;font-weight:600;display:block}.loading span.quote{font-style:italic;font-weight:300}#cs-map{background-color:var(--bkg-color);border-left:3px solid #444;height:100%;display:none;position:absolute;overflow:hidden}.ol-control{background-color:#0000;border:none;box-shadow:0 1px 4px #0000004d;right:2rem!important;left:unset!important}.ol-zoom{top:2rem!important}.ol-rotate{top:9.3rem!important}.ol-location{top:7rem!important}.img-location,.img-disable-location{width:55%;height:auto}.ol-zoom-in,.ol-zoom-out,.btn-location,.btn-disable-location,.ol-rotate-reset{cursor:pointer;background-color:#fff;width:2rem!important;height:2rem!important;font-size:1.2rem!important}.ol-scale-line{bottom:.5rem!important;right:1rem!important;left:unset!important}.ol-popup{background-color:var(--bkg-color);color:var(--text-color);box-shadow:0 1px 4px var(--bx-shdw);border:1px solid var(--text-color-grad1);border-radius:10px;min-width:140px;padding:15px;position:absolute;bottom:12px;left:-50px}.ol-popup:after,.ol-popup:before{content:" ";pointer-events:none;border:solid #0000;width:0;height:0;position:absolute;top:100%}.ol-popup:after{border-top-color:var(--bkg-color);border-width:10px;margin-left:-10px;left:48px}.ol-popup:before{border-top-color:var(--text-color-grad1);border-width:11px;margin-left:-11px;left:48px}.ol-popup-closer{background-color:var(--bkg-color);color:var(--text-color);cursor:pointer;text-decoration:none;position:absolute;top:2px;right:8px}.ol-popup-closer:after{content:"✖"}#swiper{width:100%;height:0;margin:0;display:none;position:absolute;top:50%}input[type=range]{-webkit-appearance:none;width:100%}input[type=range]::-webkit-slider-runnable-track{height:0}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;background:var(--bkg-color);cursor:ew-resize;border:2px solid #444;width:6px;height:0;margin-top:-1000px;padding-top:1000px;padding-bottom:1000px}input[type=range]::-moz-range-thumb{background:var(--bkg-color);cursor:ew-resize;border:2px solid #444;width:3px;height:0;padding-top:1000px;padding-bottom:1000px}.close-swiper{--button-size:2rem;transform:translateX(calc(-1*var(--button-size)/2));width:var(--button-size);height:var(--button-size);background-color:var(--bkg-color);color:var(--text-color);cursor:pointer;border-width:1px;border-radius:4px;display:none;position:absolute;top:0}.close-swiper:hover,.close-swiper:focus{outline:1px solid var(--text-color);color:var(--text-color-grad1)}.ol-viewport .tooltip{color:#fff;opacity:.7;white-space:nowrap;background:#00000080;border-radius:0;padding:.32rem .62rem;position:relative}@media screen and (hover:none){.ol-zoom,.ol-rotate,.ol-location{display:none!important}}.contextmenu{background-color:var(--bkg-color);color:var(--text-color);border:1px solid #ccc;box-shadow:1px 3px 4px #0006;& .hidden{display:none}& .menu-entry{cursor:pointer;padding:10px}& .menu-entry:hover{background-color:var(--bkg-color-grad1)}& .menu-entry[aria-disabled=true]{pointer-events:none;color:var(--text-color-grad1)}}
|
|
50
50
|
</style>
|
|
51
|
-
<link rel="stylesheet" href="lib/ol/ol.css"><div id="container"><div id="ol-map"></div><div class="ol-location ol-unselectable ol-control"><button onclick="${() => this.locateUser()}" class="btn-location"><img class="img-location" alt="location-icon" src="icons/adjust.svg"></button></div><div id="cs-map"><div class="${this.loading ? 'loading center' : 'loading hidden'}"><img alt="loading-icon" src="icons/loading.svg" class="gg-spin"> <span i18n="Loading cesium...">Loading cesium...</span> <span class="quote" i18n="cesium-loading-quote">Please be patient, like a giraffe reaching for the tastiest leaves.</span></div></div><input id="swiper" type="range" min="0" max="1000" step="1"> <button tip="Hide Swiper" id="close-swiper" class="close-swiper">×</button></div>`;
|
|
51
|
+
<link rel="stylesheet" href="lib/ol/ol.css"><div id="container"><div id="ol-map"></div><div class="ol-location ol-unselectable ol-control"><button onclick="${() => this.locateUser()}" class="btn-location"><img class="img-location" alt="location-icon" src="icons/adjust.svg"></button> <button id="disable-location" onclick="${() => this.disableLocateUser()}" class="btn-disable-location hidden"><img class="img-disable-location" alt="disable-location-icon" src="icons/adjust-disable.svg"></button></div><div id="cs-map"><div class="${this.loading ? 'loading center' : 'loading hidden'}"><img alt="loading-icon" src="icons/loading.svg" class="gg-spin"> <span i18n="Loading cesium...">Loading cesium...</span> <span class="quote" i18n="cesium-loading-quote">Please be patient, like a giraffe reaching for the tastiest leaves.</span></div></div><input id="swiper" type="range" min="0" max="1000" step="1"> <button tip="Hide Swiper" id="close-swiper" class="close-swiper">×</button></div>`;
|
|
52
52
|
};
|
|
53
53
|
olMap;
|
|
54
54
|
mapTarget;
|
|
@@ -169,6 +169,7 @@ export default class MapComponent extends GirafeHTMLElement {
|
|
|
169
169
|
// The user's current position is utilized to show the distance to objects in the layer
|
|
170
170
|
navigator.permissions.query({ name: 'geolocation' }).then((result) => {
|
|
171
171
|
if (result.state === 'granted' || result.state === 'prompt') {
|
|
172
|
+
this.shadow.getElementById('disable-location')?.classList.remove('hidden');
|
|
172
173
|
this.getCurrentLocation();
|
|
173
174
|
}
|
|
174
175
|
});
|
|
@@ -199,6 +200,10 @@ export default class MapComponent extends GirafeHTMLElement {
|
|
|
199
200
|
maximumAge: 0
|
|
200
201
|
});
|
|
201
202
|
}
|
|
203
|
+
disableLocateUser = () => {
|
|
204
|
+
this.geolocationSource.clear();
|
|
205
|
+
this.shadow.getElementById('disable-location')?.classList.add('hidden');
|
|
206
|
+
};
|
|
202
207
|
updateGeolocation = (position) => {
|
|
203
208
|
const coords = position.coords;
|
|
204
209
|
const longitude = coords.longitude;
|
|
@@ -6,7 +6,7 @@ declare class SearchComponent extends GirafeHTMLElement {
|
|
|
6
6
|
paintbrushIcon: string;
|
|
7
7
|
private get map();
|
|
8
8
|
private readonly previewFeaturesCollection;
|
|
9
|
-
private previewLayers
|
|
9
|
+
private previewLayers?;
|
|
10
10
|
private previewGeoLayer;
|
|
11
11
|
private maxExtent?;
|
|
12
12
|
private readonly geoJsonFormatter;
|
|
@@ -30,7 +30,7 @@ class SearchComponent extends GirafeHTMLElement {
|
|
|
30
30
|
return this.context.mapManager.getMap();
|
|
31
31
|
}
|
|
32
32
|
previewFeaturesCollection = new Collection();
|
|
33
|
-
previewLayers
|
|
33
|
+
previewLayers;
|
|
34
34
|
previewGeoLayer = null;
|
|
35
35
|
maxExtent;
|
|
36
36
|
geoJsonFormatter = new GeoJSON();
|
|
@@ -321,14 +321,19 @@ class SearchComponent extends GirafeHTMLElement {
|
|
|
321
321
|
// Clear preview search result
|
|
322
322
|
this.previewFeaturesCollection.clear();
|
|
323
323
|
// Clear preview layer
|
|
324
|
-
|
|
325
|
-
|
|
324
|
+
if (this.previewLayers) {
|
|
325
|
+
this.context.themesHelper.removeLayersFromLayerTree(this.previewLayers.insertedLayers);
|
|
326
|
+
for (const layer of this.previewLayers.activatedLayers) {
|
|
327
|
+
this.context.layerManager.toggle(layer, 'off');
|
|
328
|
+
}
|
|
329
|
+
this.previewLayers = undefined;
|
|
330
|
+
}
|
|
326
331
|
}
|
|
327
332
|
onSelect(feature) {
|
|
328
333
|
this.selectedResult = feature;
|
|
329
334
|
this.ignoreBlur = false;
|
|
330
335
|
this.forceHide = true;
|
|
331
|
-
this.previewLayers =
|
|
336
|
+
this.previewLayers = undefined;
|
|
332
337
|
super.render();
|
|
333
338
|
const geom = feature.getGeometry();
|
|
334
339
|
if (geom) {
|
|
@@ -1,22 +1,34 @@
|
|
|
1
1
|
import GirafeHTMLElement from '../../base/GirafeHTMLElement.js';
|
|
2
2
|
import ThemeLayer from '../../models/layers/themelayer.js';
|
|
3
|
-
import Theme from '../../models/theme.js';
|
|
4
3
|
import CustomTheme from '../../models/customtheme.js';
|
|
4
|
+
declare const ThemeTypes: readonly ["all", "favorites", "custom"];
|
|
5
|
+
type ThemeType = (typeof ThemeTypes)[number];
|
|
5
6
|
declare class ThemeComponent extends GirafeHTMLElement {
|
|
6
7
|
template: () => import("uhtml").Hole;
|
|
7
8
|
newIcon: string;
|
|
8
9
|
menuOpen: boolean;
|
|
9
10
|
openedOnce: boolean;
|
|
11
|
+
activeThemeType: ThemeType;
|
|
12
|
+
clickOutsideContainer: HTMLElement | null;
|
|
10
13
|
get customThemes(): CustomTheme[];
|
|
14
|
+
get allThemes(): Record<number, ThemeLayer>;
|
|
15
|
+
get favoriteThemes(): (ThemeLayer | CustomTheme)[];
|
|
16
|
+
get activeThemes(): Record<number, ThemeLayer> | (ThemeLayer | CustomTheme)[];
|
|
11
17
|
constructor();
|
|
12
18
|
registerEvents(): void;
|
|
19
|
+
protected render(): void;
|
|
13
20
|
onBlur(): void;
|
|
14
21
|
toggleThemesList(): void;
|
|
15
|
-
|
|
16
|
-
|
|
22
|
+
activateThemeType(themeType: ThemeType): void;
|
|
23
|
+
onThemeChanged(theme: ThemeLayer | CustomTheme): void;
|
|
24
|
+
isThemeActive(theme: ThemeLayer | CustomTheme): boolean;
|
|
25
|
+
isThemeFavorite(theme: ThemeLayer | CustomTheme): boolean;
|
|
26
|
+
onThemeFavoriteChanged(theme: ThemeLayer | CustomTheme, e: Event): void;
|
|
27
|
+
isThemeTypeActive(themeType: ThemeType): boolean;
|
|
28
|
+
isCustomTheme(theme: ThemeLayer | CustomTheme): theme is CustomTheme;
|
|
17
29
|
onCustomThemeChanged(customTheme: CustomTheme): void;
|
|
18
30
|
onAddCustomTheme(): Promise<void>;
|
|
19
|
-
onDeleteCustomTheme(
|
|
31
|
+
onDeleteCustomTheme(customTheme: CustomTheme, e: Event): Promise<void>;
|
|
20
32
|
protected connectedCallback(): void;
|
|
21
33
|
}
|
|
22
34
|
export default ThemeComponent;
|
|
@@ -1,45 +1,86 @@
|
|
|
1
1
|
import { htmlFor as uHtmlFor } from 'uhtml/keyed';
|
|
2
2
|
import { html as uHtml } from 'uhtml';
|
|
3
3
|
import GirafeHTMLElement from '../../base/GirafeHTMLElement.js';
|
|
4
|
+
import ThemeLayer from '../../models/layers/themelayer.js';
|
|
4
5
|
import NewIcon from './images/new.svg';
|
|
6
|
+
import CustomTheme from '../../models/customtheme.js';
|
|
7
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
8
|
+
const ThemeTypes = ['all', 'favorites', 'custom'];
|
|
5
9
|
class ThemeComponent extends GirafeHTMLElement {
|
|
6
10
|
template = () => {
|
|
7
11
|
return uHtml `<style>
|
|
8
12
|
*{font-family:Arial,sans-serif}.hidden{display:none!important}.gg-rotate90{transform:rotate(90deg)}.gg-rotate180{transform:rotate(180deg)}.gg-rotate270{transform:rotate(270deg)}img{filter:var(--svg-filter)}img.legend-image{filter:var(--svg-map-filter);background:var(--svg-legend-bkg)}div{scrollbar-width:thin}a,a:visited{color:var(--link-color)}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes spin-wait{0%{transform:rotate(0)}7%{transform:rotate(360deg)}to{transform:rotate(360deg)}}.gg-spin{animation-name:spin;animation-duration:2s;animation-timing-function:linear;animation-iteration-count:infinite}.gg-spin-wait{animation-name:spin-wait;animation-duration:10s;animation-timing-function:linear;animation-iteration-count:infinite}::-webkit-scrollbar{width:5px}::-webkit-scrollbar-thumb{background:#999}.gg-button,.gg-select,.gg-input,.gg-textarea{background-color:var(--bkg-color);color:var(--text-color);border:var(--app-standard-border);box-sizing:border-box;cursor:pointer;border-radius:3px;outline:0;margin:0;padding:0 0 0 .5rem;display:inline-block}.gg-label{background-color:var(--bkg-color);color:var(--text-color);border:none;align-items:center;margin:0;padding:0;display:flex}.gg-button,.gg-select,.gg-input,.gg-label{min-height:calc(var(--app-standard-height)/1.5)}.gg-textarea{max-height:initial;resize:vertical;height:6rem;padding:.5rem;line-height:1.3rem}.gg-input{cursor:text}.gg-checkbox{accent-color:var(--text-color);width:1.2rem}.gg-range{accent-color:var(--text-color)}.gg-button{padding:0 .5rem}.gg-button.active{border:solid 1px var(--text-color-grad2);background-color:var(--text-color-grad2);color:var(--bkg-color)}.gg-button:disabled{color:gray;cursor:not-allowed;background-color:#d3d3d3;border:none}.gg-input:disabled,.gg-select:disabled,.gg-textarea:disabled{color:gray;cursor:not-allowed;background-color:#d3d3d3}.gg-button>img{vertical-align:middle}.gg-icon-button{color:var(--text-color);cursor:pointer;background-color:#0000;border:none;flex-direction:column;justify-content:center;align-items:center;padding:0;display:flex}.gg-icon{justify-content:center;align-items:center;display:flex}.gg-big,.gg-big-withtext{min-width:var(--app-standard-height);min-height:var(--app-standard-height);max-height:var(--app-standard-height)}.gg-big img,.gg-big-withtext img{width:calc(var(--app-standard-height) - 1.5rem);margin:0}.gg-big-withtext span{font-variant:small-caps;padding:0 1rem;font-size:.9rem}.gg-medium,.gg-medium-withtext{min-width:calc(var(--app-standard-height)/1.2);min-height:calc(var(--app-standard-height)/1.2);max-height:calc(var(--app-standard-height)/1.2);flex-direction:row}.gg-medium img{width:calc(var(--app-standard-height)/2.4);margin:0}.gg-medium-withtext img{width:calc(var(--app-standard-height)/2.4);margin-left:.5rem}.gg-medium-withtext span{padding:0 1rem 0 .5rem;font-size:.9rem}.gg-small,.gg-small-withtext{min-width:calc(var(--app-standard-height)/2);min-height:calc(var(--app-standard-height)/2);max-height:calc(var(--app-standard-height)/2);flex-direction:row}.gg-small img{width:calc(var(--app-standard-height)/3);margin:0}.gg-small-withtext img{width:calc(var(--app-standard-height)/3);margin-left:.5rem}.gg-small-withtext span{padding:0 .5rem 0 .3rem;font-size:.9rem}.gg-button:hover,.gg-select:hover,.gg-input:hover,.gg-textarea:hover,.gg-icon-button:hover{background-color:var(--bkg-color-grad1)}.gg-opacity{opacity:.5}.gg-opacity:hover{opacity:1;background-color:#0000}.gg-tabs{cursor:pointer;grid-auto-flow:column;padding-bottom:1rem;font-size:1rem;display:grid}.gg-tab{border:none;border-bottom:var(--app-standard-border);cursor:pointer;color:var(--text-color);background:0 0;padding:.5rem}.gg-tab.active{border-bottom:solid 1px var(--text-color)}.girafe-button-big,.girafe-button-large,.girafe-button-small,.girafe-button-tiny{color:var(--text-color);background-color:#0000;border:none;flex-direction:column;display:flex}.girafe-button-big:hover,.girafe-button-large:hover,.girafe-button-small:hover,.girafe-button-tiny:hover{background-color:var(--bkg-color-grad1);cursor:pointer}.girafe-button-big.dark,.girafe-button-large.dark,.girafe-button-small.dark,.girafe-button-tiny.dark{background-color:var(--bkg-color);filter:invert()}.girafe-button-big{width:var(--app-standard-height);height:var(--app-standard-height);align-items:center;padding:1rem}.girafe-button-big img{overflow:hidden}.girafe-button-large{flex-direction:row}.girafe-button-large img{height:2rem;margin:.3rem}.girafe-button-large span{height:2rem;margin:.3rem;line-height:2rem}.girafe-button-small{min-width:calc(var(--app-standard-height)/2);height:calc(var(--app-standard-height)/2);align-items:center;padding:.5rem}.girafe-button-small img{overflow:hidden}.girafe-button-small span{text-align:left;text-overflow:ellipsis;width:100%;overflow:hidden}.girafe-button-tiny{align-items:center;width:1rem;height:1rem;padding:0}.girafe-button-tiny img{overflow:hidden}.girafe-onboarding-theme{background-color:var(--bkg-color)!important;color:var(--text-color)!important}.girafe-onboarding-theme button{background-color:var(--bkg-color)!important;color:var(--text-color)!important;text-shadow:none!important}.girafe-onboarding-theme button.driver-popover-close-btn{z-index:10000}
|
|
9
13
|
</style><style>
|
|
10
|
-
.themes{background-color:var(--bkg-color);border:1px solid #444;border-radius:3px;flex-
|
|
14
|
+
.themes{background-color:var(--bkg-color);border:1px solid #444;border-radius:3px;flex-flow:column;width:58rem;max-height:70vh;margin-top:0;padding:1rem;display:flex;position:absolute;overflow-y:auto}#close-themes-menu{z-index:-1;background:0 0;width:100vw;height:100vh;display:none;position:absolute;top:0;left:0}#active-themes{flex-flow:wrap;flex:1;justify-content:flex-start;display:flex}.theme-card{border:var(--app-standard-border);background-color:#0000;border-radius:6px;flex-direction:column;align-items:center;width:7rem;height:9rem;margin:.25rem;padding:.25rem;display:flex;&:hover{cursor:pointer;background-color:var(--bkg-color-grad2)}& img.theme-favorite{content:url(icons/favorite-no.svg);align-self:flex-start;width:1.5rem;height:1.5rem;&:hover{content:url(icons/favorite-add.svg)}&.yes{content:url(icons/favorite-yes.svg);&:hover{content:url(icons/favorite-remove.svg)}}&.placeholder{content:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=)}}& img.delete-icon{content:url(icons/close.svg);align-self:flex-end;width:1.5rem;height:1.5rem;margin-top:-1.5rem;&.placeholder{content:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=)}}& img.theme-icon{max-width:5rem;max-height:2.5rem;margin-top:1.25rem;margin-bottom:1.25rem}&.selected{background-color:var(--bkg-color-grad1);border:solid 1px var(--text-color)}& span.theme-name{text-align:center;word-break:break-word;max-width:6rem;color:var(--text-color);max-height:2.2rem;line-height:1.1rem;overflow:hidden}}.theme,.custom-theme,.new-theme{cursor:pointer;background-color:#0000;border:none;border-radius:.5rem;align-content:flex-end;width:8rem;margin:.5rem;padding:0;position:relative}.themes>button>span,.custom-theme>button>span,.new-theme>button>span{text-align:center;width:95%;color:var(--text-color);display:inline-block}.themes>button>span,.custom-theme>button>span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.theme>img,.custom-theme>button>img,.new-theme>img{max-width:100%}button.select{cursor:pointer;background-color:#0000;border:none;width:100%;padding:0}button.select>img{height:3rem;margin-bottom:1rem}button.delete{position:absolute;top:0;right:0}.theme.selected,.custom-theme.selected{background-color:var(--bkg-color-grad2)}.theme-icon{--svg-filter:none}#themes-type-chooser{flex:1;justify-content:space-between;display:flex}.gg-tabs{flex-grow:1;margin:0}
|
|
11
15
|
</style>
|
|
12
|
-
<button class="gg-icon-button gg-big-withtext" tip="Theme selection" onclick="${() => this.toggleThemesList()}"
|
|
16
|
+
<button class="gg-icon-button gg-big-withtext" tip="Theme selection" onclick="${() => this.toggleThemesList()}"><img alt="menu-icon" src="icons/themes.svg" class="${(!this.state.loading ? (this.openedOnce ? '' : 'gg-spin-wait') : 'hidden')}"> <img alt="loading-icon" src="icons/loading.svg" class="${(this.state.loading ? 'gg-spin' : 'hidden')}"> <span i18n="Themes">Themes</span></button><div class="${(this.menuOpen ? 'themes' : 'hidden')}"><div id="themes-type-chooser"><div class="gg-tabs">${Object.values(ThemeTypes).map((themeType) => uHtml ` <button id="${'choose-themes-type-' + themeType}" i18n="${'themes-type-' + themeType}" class="${this.isThemeTypeActive(themeType) ? 'gg-tab active' : 'gg-tab'}" .active="${this.isThemeTypeActive(themeType)}" onclick="${() => this.activateThemeType(themeType)}"></button> `)}</div></div><div id="active-themes">${Object.values(this.activeThemes).map(theme => uHtmlFor(theme, theme.id) `<div role="button" tabindex="0" class="${this.isThemeActive(theme) ? 'theme-card selected' : 'theme-card'}" onkeyup="${() => this.onThemeChanged(theme)}" onclick="${() => this.onThemeChanged(theme)}"><img class="${this.isThemeFavorite(theme) ? 'theme-favorite yes' : 'theme-favorite'}" tip="themes-add-remove-favorites" alt="themes-add-remove-favorites" src="" onclick="${(e) => this.onThemeFavoriteChanged(theme, e)}" onkeyup="${(e) => this.onThemeFavoriteChanged(theme, e)}"> <img class="${this.isCustomTheme(theme) ? 'delete-icon' : 'delete-icon placeholder'}" onclick="${(e) => this.onDeleteCustomTheme(theme, e)}" onkeyup="${(e) => this.onDeleteCustomTheme(theme, e)}" alt="delete-icon" src=""> <img class="theme-icon" alt="${'Icon for ' + theme.name}" src="${theme.icon}"> <span i18n="${theme.name}" class="theme-name">${theme.name}</span></div>`)}<div role="button" tabindex="0" class="${this.isThemeTypeActive('custom') ? 'theme-card' : 'hidden'}" onclick="${() => this.onAddCustomTheme()}" onkeyup="${() => this.onAddCustomTheme()}"><img class="theme-favorite placeholder" src="" alt="" disabled="disabled"> <img class="theme-icon" alt="Create custom theme" src="${this.newIcon}" tip="Save the current layer configuration as new theme"> <span i18n="Create custom theme" class="theme-name">Create custom theme</span></div></div></div><div id="close-themes-menu" onclick="${() => this.onBlur()}"></div>`;
|
|
13
17
|
};
|
|
14
18
|
newIcon = NewIcon;
|
|
15
19
|
menuOpen = false;
|
|
16
20
|
openedOnce = false;
|
|
21
|
+
activeThemeType = 'all';
|
|
22
|
+
clickOutsideContainer = null;
|
|
17
23
|
get customThemes() {
|
|
18
24
|
return this.context.customThemesManager.customThemes;
|
|
19
25
|
}
|
|
26
|
+
get allThemes() {
|
|
27
|
+
return this.state.themes._allThemes ?? {};
|
|
28
|
+
}
|
|
29
|
+
get favoriteThemes() {
|
|
30
|
+
return [
|
|
31
|
+
...Object.values(this.allThemes).filter((theme) => this.context.themeFavoritesManager.isThemeInFavorites(theme)),
|
|
32
|
+
...Object.values(this.customThemes).filter((theme) => this.context.themeFavoritesManager.isThemeInFavorites(theme))
|
|
33
|
+
];
|
|
34
|
+
}
|
|
35
|
+
get activeThemes() {
|
|
36
|
+
switch (this.activeThemeType) {
|
|
37
|
+
case 'all':
|
|
38
|
+
return this.allThemes;
|
|
39
|
+
case 'favorites':
|
|
40
|
+
return this.favoriteThemes;
|
|
41
|
+
case 'custom':
|
|
42
|
+
return this.customThemes;
|
|
43
|
+
default:
|
|
44
|
+
return {};
|
|
45
|
+
}
|
|
46
|
+
}
|
|
20
47
|
constructor() {
|
|
21
48
|
super('themes');
|
|
22
49
|
}
|
|
23
50
|
registerEvents() {
|
|
24
|
-
this.subscribe('loading', () =>
|
|
51
|
+
this.subscribe('loading', () => this.render());
|
|
25
52
|
this.subscribe('themes.isLoaded', () => {
|
|
26
53
|
if (this.state.themes.isLoaded) {
|
|
27
|
-
|
|
54
|
+
this.render();
|
|
28
55
|
super.girafeTranslate();
|
|
29
56
|
}
|
|
30
57
|
});
|
|
31
58
|
}
|
|
59
|
+
render() {
|
|
60
|
+
super.render();
|
|
61
|
+
if (this.clickOutsideContainer)
|
|
62
|
+
this.clickOutsideContainer.style.display = this.menuOpen ? 'block' : 'none';
|
|
63
|
+
}
|
|
32
64
|
onBlur() {
|
|
33
65
|
this.menuOpen = false;
|
|
34
|
-
|
|
66
|
+
this.render();
|
|
35
67
|
}
|
|
36
68
|
toggleThemesList() {
|
|
37
69
|
this.openedOnce = true;
|
|
38
70
|
this.menuOpen = !this.menuOpen;
|
|
39
|
-
|
|
71
|
+
this.render();
|
|
72
|
+
}
|
|
73
|
+
activateThemeType(themeType) {
|
|
74
|
+
this.activeThemeType = themeType;
|
|
75
|
+
this.render();
|
|
40
76
|
}
|
|
41
77
|
onThemeChanged(theme) {
|
|
78
|
+
if (this.context.configManager.Config.themes.selectionMode === 'add') {
|
|
79
|
+
this.state.themes.lastSelectedTheme = null;
|
|
80
|
+
}
|
|
42
81
|
this.state.themes.lastSelectedTheme = theme;
|
|
82
|
+
if (theme instanceof CustomTheme)
|
|
83
|
+
return;
|
|
43
84
|
if (theme.disclaimer) {
|
|
44
85
|
this.state.infobox.elements.push({
|
|
45
86
|
id: theme.treeItemId,
|
|
@@ -61,7 +102,22 @@ class ThemeComponent extends GirafeHTMLElement {
|
|
|
61
102
|
if (this.context.configManager.Config.themes.selectionMode === 'replace') {
|
|
62
103
|
return theme.id === this.state.themes.lastSelectedTheme?.id;
|
|
63
104
|
}
|
|
64
|
-
return
|
|
105
|
+
return this.state.layers.layersList.some((layer) => layer instanceof ThemeLayer && layer.id === theme.id);
|
|
106
|
+
}
|
|
107
|
+
isThemeFavorite(theme) {
|
|
108
|
+
return this.context.themeFavoritesManager.isThemeInFavorites(theme);
|
|
109
|
+
}
|
|
110
|
+
onThemeFavoriteChanged(theme, e) {
|
|
111
|
+
e.preventDefault();
|
|
112
|
+
e.stopPropagation();
|
|
113
|
+
this.context.themeFavoritesManager.addOrRemoveThemeFromFavorites(theme);
|
|
114
|
+
this.render();
|
|
115
|
+
}
|
|
116
|
+
isThemeTypeActive(themeType) {
|
|
117
|
+
return (this.activeThemeType ?? 'all') === themeType;
|
|
118
|
+
}
|
|
119
|
+
isCustomTheme(theme) {
|
|
120
|
+
return theme instanceof CustomTheme;
|
|
65
121
|
}
|
|
66
122
|
onCustomThemeChanged(customTheme) {
|
|
67
123
|
this.state.themes.lastSelectedTheme = customTheme;
|
|
@@ -71,15 +127,15 @@ class ThemeComponent extends GirafeHTMLElement {
|
|
|
71
127
|
const themeName = await window.gPrompt('Enter a name for your custom theme', 'Create custom theme', 'Enter a name...');
|
|
72
128
|
if (themeName !== false && themeName.trim().length > 0) {
|
|
73
129
|
this.context.customThemesManager.addTheme(themeName, this.state.layers.layersList);
|
|
74
|
-
|
|
130
|
+
this.render();
|
|
75
131
|
}
|
|
76
132
|
}
|
|
77
|
-
async onDeleteCustomTheme(
|
|
133
|
+
async onDeleteCustomTheme(customTheme, e) {
|
|
78
134
|
e.stopPropagation();
|
|
79
135
|
const confirm = await window.gConfirm('Do you want to delete this theme?', 'Delete Theme');
|
|
80
136
|
if (confirm) {
|
|
81
|
-
this.context.customThemesManager.deleteTheme(
|
|
82
|
-
|
|
137
|
+
this.context.customThemesManager.deleteTheme(customTheme);
|
|
138
|
+
this.render();
|
|
83
139
|
}
|
|
84
140
|
}
|
|
85
141
|
connectedCallback() {
|
|
@@ -87,6 +143,7 @@ class ThemeComponent extends GirafeHTMLElement {
|
|
|
87
143
|
super.render();
|
|
88
144
|
this.registerEvents();
|
|
89
145
|
this.girafeTranslate();
|
|
146
|
+
this.clickOutsideContainer = this.shadow.getElementById('close-themes-menu');
|
|
90
147
|
}
|
|
91
148
|
}
|
|
92
149
|
export default ThemeComponent;
|
|
@@ -6,9 +6,11 @@ export default abstract class TreeViewElement extends GirafeHTMLElement {
|
|
|
6
6
|
protected layer: BaseLayer;
|
|
7
7
|
private dragButton;
|
|
8
8
|
private container;
|
|
9
|
+
private header;
|
|
9
10
|
constructor(layer: BaseLayer, name: string);
|
|
10
11
|
protected connectedCallback(): void;
|
|
11
12
|
render(): void;
|
|
13
|
+
private highlight;
|
|
12
14
|
refreshRender(): void;
|
|
13
15
|
refreshRender(layer?: BaseLayer): void;
|
|
14
16
|
protected showMetadata(): void;
|
|
@@ -10,6 +10,7 @@ export default class TreeViewElement extends GirafeHTMLElement {
|
|
|
10
10
|
layer;
|
|
11
11
|
dragButton;
|
|
12
12
|
container;
|
|
13
|
+
header;
|
|
13
14
|
constructor(layer, name) {
|
|
14
15
|
super(name);
|
|
15
16
|
this.layer = layer;
|
|
@@ -22,11 +23,28 @@ export default class TreeViewElement extends GirafeHTMLElement {
|
|
|
22
23
|
super.render();
|
|
23
24
|
this.dragButton = this.shadow.getElementById('drag-button');
|
|
24
25
|
this.container = this.shadow.getElementById('container');
|
|
26
|
+
this.header = this.shadow.querySelector('header');
|
|
25
27
|
super.girafeTranslate();
|
|
26
28
|
this.initializeDrag();
|
|
27
29
|
if (isTimeAwareLayer(this.layer)) {
|
|
28
30
|
this.createTimeRestrictionTooltip(this.layer);
|
|
29
31
|
}
|
|
32
|
+
this.subscribe(/layers\.layersList\..*\.isHighlighted/, (_oldValue, newValue, layer) => {
|
|
33
|
+
if (newValue && layer === this.layer) {
|
|
34
|
+
this.highlight();
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
highlight() {
|
|
39
|
+
this.header.scrollIntoView({
|
|
40
|
+
behavior: 'smooth',
|
|
41
|
+
block: 'nearest'
|
|
42
|
+
});
|
|
43
|
+
this.header.classList.add('highlight');
|
|
44
|
+
setTimeout(() => {
|
|
45
|
+
this.header.classList.remove('highlight');
|
|
46
|
+
this.layer.isHighlighted = false;
|
|
47
|
+
}, 3000);
|
|
30
48
|
}
|
|
31
49
|
refreshRender(layer) {
|
|
32
50
|
if (this.state.treeview.renderEnabled && (!layer || layer === this.layer)) {
|
|
@@ -34,6 +52,9 @@ export default class TreeViewElement extends GirafeHTMLElement {
|
|
|
34
52
|
// Else, call refresh only if the layer in param is the current one
|
|
35
53
|
super.refreshRender();
|
|
36
54
|
super.girafeTranslate();
|
|
55
|
+
if (this.layer.isHighlighted) {
|
|
56
|
+
this.highlight();
|
|
57
|
+
}
|
|
37
58
|
}
|
|
38
59
|
}
|
|
39
60
|
showMetadata() {
|
|
@@ -5,7 +5,7 @@ import TreeViewGroupElement from '../tools/treeviewgroupelement.js';
|
|
|
5
5
|
class TreeViewGroupComponent extends TreeViewGroupElement {
|
|
6
6
|
template = () => {
|
|
7
7
|
return uHtml `<style>
|
|
8
|
-
header{border-top:1px solid #ddd;align-items:center;height:2rem;display:flex}.tool{display:none!important}header:hover .tool{display:flex!important}.tool.active{order:100;opacity:1!important;display:flex!important}.label-container{flex-grow:1;align-items:center;display:flex;overflow:auto}.label-out-resolution span{font-style:italic}.resolution-tool{margin-left:.5rem}.legend{display:flex}.legend img{background:var(--svg-legend-bkg);height:fit-content;filter:var(--svg-map-filter)}.legend-icon{background:var(--svg-legend-bkg);max-height:1.5rem;filter:var(--svg-map-filter);margin-left:.5rem}.children{flex-basis:100%;order:10;padding-left:1.3rem}.dragAfter{border-bottom:1rem dashed #ccc}.dragBefore{border-top:1rem dashed #ccc}.gg-checkbox{width:1.2rem}.gg-caret,.gg-spacer{text-align:center;width:1.5rem;padding:0}.gg-caret{transform:scale(1.3)}.gg-caret.gg-rotate90{transform:scale(1.3)rotate(90deg)}.gg-small.gg-lock{min-width:1rem}.gg-tree-label{text-align:left;white-space:nowrap;text-overflow:ellipsis;padding-left:0;overflow:hidden}.gg-grab:hover{cursor:grab}.gg-selected{opacity:1}.legend-file{color:var(--text-color);font-style:italic;display:flex}
|
|
8
|
+
header{border-top:1px solid #ddd;align-items:center;height:2rem;display:flex}.tool{display:none!important}header:hover .tool{display:flex!important}.tool.active{order:100;opacity:1!important;display:flex!important}.label-container{flex-grow:1;align-items:center;display:flex;overflow:auto}.label-out-resolution span{font-style:italic}.resolution-tool{margin-left:.5rem}.legend{display:flex}.legend img{background:var(--svg-legend-bkg);height:fit-content;filter:var(--svg-map-filter)}.legend-icon{background:var(--svg-legend-bkg);max-height:1.5rem;filter:var(--svg-map-filter);margin-left:.5rem}.children{flex-basis:100%;order:10;padding-left:1.3rem}.dragAfter{border-bottom:1rem dashed #ccc}.dragBefore{border-top:1rem dashed #ccc}.gg-checkbox{width:1.2rem}.gg-caret,.gg-spacer{text-align:center;width:1.5rem;padding:0}.gg-caret{transform:scale(1.3)}.gg-caret.gg-rotate90{transform:scale(1.3)rotate(90deg)}.gg-small.gg-lock{min-width:1rem}.gg-tree-label{text-align:left;white-space:nowrap;text-overflow:ellipsis;padding-left:0;overflow:hidden}.gg-grab:hover{cursor:grab}.gg-selected{opacity:1}.legend-file{color:var(--text-color);font-style:italic;display:flex}@keyframes headerFade{0%{background-color:var(--highlight-color)}to{background-color:#0000}}.highlight{animation:3s ease-in-out forwards headerFade}
|
|
9
9
|
</style><style>
|
|
10
10
|
*{font-family:Arial,sans-serif}.hidden{display:none!important}.gg-rotate90{transform:rotate(90deg)}.gg-rotate180{transform:rotate(180deg)}.gg-rotate270{transform:rotate(270deg)}img{filter:var(--svg-filter)}img.legend-image{filter:var(--svg-map-filter);background:var(--svg-legend-bkg)}div{scrollbar-width:thin}a,a:visited{color:var(--link-color)}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes spin-wait{0%{transform:rotate(0)}7%{transform:rotate(360deg)}to{transform:rotate(360deg)}}.gg-spin{animation-name:spin;animation-duration:2s;animation-timing-function:linear;animation-iteration-count:infinite}.gg-spin-wait{animation-name:spin-wait;animation-duration:10s;animation-timing-function:linear;animation-iteration-count:infinite}::-webkit-scrollbar{width:5px}::-webkit-scrollbar-thumb{background:#999}.gg-button,.gg-select,.gg-input,.gg-textarea{background-color:var(--bkg-color);color:var(--text-color);border:var(--app-standard-border);box-sizing:border-box;cursor:pointer;border-radius:3px;outline:0;margin:0;padding:0 0 0 .5rem;display:inline-block}.gg-label{background-color:var(--bkg-color);color:var(--text-color);border:none;align-items:center;margin:0;padding:0;display:flex}.gg-button,.gg-select,.gg-input,.gg-label{min-height:calc(var(--app-standard-height)/1.5)}.gg-textarea{max-height:initial;resize:vertical;height:6rem;padding:.5rem;line-height:1.3rem}.gg-input{cursor:text}.gg-checkbox{accent-color:var(--text-color);width:1.2rem}.gg-range{accent-color:var(--text-color)}.gg-button{padding:0 .5rem}.gg-button.active{border:solid 1px var(--text-color-grad2);background-color:var(--text-color-grad2);color:var(--bkg-color)}.gg-button:disabled{color:gray;cursor:not-allowed;background-color:#d3d3d3;border:none}.gg-input:disabled,.gg-select:disabled,.gg-textarea:disabled{color:gray;cursor:not-allowed;background-color:#d3d3d3}.gg-button>img{vertical-align:middle}.gg-icon-button{color:var(--text-color);cursor:pointer;background-color:#0000;border:none;flex-direction:column;justify-content:center;align-items:center;padding:0;display:flex}.gg-icon{justify-content:center;align-items:center;display:flex}.gg-big,.gg-big-withtext{min-width:var(--app-standard-height);min-height:var(--app-standard-height);max-height:var(--app-standard-height)}.gg-big img,.gg-big-withtext img{width:calc(var(--app-standard-height) - 1.5rem);margin:0}.gg-big-withtext span{font-variant:small-caps;padding:0 1rem;font-size:.9rem}.gg-medium,.gg-medium-withtext{min-width:calc(var(--app-standard-height)/1.2);min-height:calc(var(--app-standard-height)/1.2);max-height:calc(var(--app-standard-height)/1.2);flex-direction:row}.gg-medium img{width:calc(var(--app-standard-height)/2.4);margin:0}.gg-medium-withtext img{width:calc(var(--app-standard-height)/2.4);margin-left:.5rem}.gg-medium-withtext span{padding:0 1rem 0 .5rem;font-size:.9rem}.gg-small,.gg-small-withtext{min-width:calc(var(--app-standard-height)/2);min-height:calc(var(--app-standard-height)/2);max-height:calc(var(--app-standard-height)/2);flex-direction:row}.gg-small img{width:calc(var(--app-standard-height)/3);margin:0}.gg-small-withtext img{width:calc(var(--app-standard-height)/3);margin-left:.5rem}.gg-small-withtext span{padding:0 .5rem 0 .3rem;font-size:.9rem}.gg-button:hover,.gg-select:hover,.gg-input:hover,.gg-textarea:hover,.gg-icon-button:hover{background-color:var(--bkg-color-grad1)}.gg-opacity{opacity:.5}.gg-opacity:hover{opacity:1;background-color:#0000}.gg-tabs{cursor:pointer;grid-auto-flow:column;padding-bottom:1rem;font-size:1rem;display:grid}.gg-tab{border:none;border-bottom:var(--app-standard-border);cursor:pointer;color:var(--text-color);background:0 0;padding:.5rem}.gg-tab.active{border-bottom:solid 1px var(--text-color)}.girafe-button-big,.girafe-button-large,.girafe-button-small,.girafe-button-tiny{color:var(--text-color);background-color:#0000;border:none;flex-direction:column;display:flex}.girafe-button-big:hover,.girafe-button-large:hover,.girafe-button-small:hover,.girafe-button-tiny:hover{background-color:var(--bkg-color-grad1);cursor:pointer}.girafe-button-big.dark,.girafe-button-large.dark,.girafe-button-small.dark,.girafe-button-tiny.dark{background-color:var(--bkg-color);filter:invert()}.girafe-button-big{width:var(--app-standard-height);height:var(--app-standard-height);align-items:center;padding:1rem}.girafe-button-big img{overflow:hidden}.girafe-button-large{flex-direction:row}.girafe-button-large img{height:2rem;margin:.3rem}.girafe-button-large span{height:2rem;margin:.3rem;line-height:2rem}.girafe-button-small{min-width:calc(var(--app-standard-height)/2);height:calc(var(--app-standard-height)/2);align-items:center;padding:.5rem}.girafe-button-small img{overflow:hidden}.girafe-button-small span{text-align:left;text-overflow:ellipsis;width:100%;overflow:hidden}.girafe-button-tiny{align-items:center;width:1rem;height:1rem;padding:0}.girafe-button-tiny img{overflow:hidden}.girafe-onboarding-theme{background-color:var(--bkg-color)!important;color:var(--text-color)!important}.girafe-onboarding-theme button{background-color:var(--bkg-color)!important;color:var(--text-color)!important;text-shadow:none!important}.girafe-onboarding-theme button.driver-popover-close-btn{z-index:10000}
|
|
11
11
|
</style>
|
|
@@ -10,7 +10,7 @@ import WmsLegendHelper from '../../../tools/wms/wmslegendhelper.js';
|
|
|
10
10
|
class TreeViewItemComponent extends TreeViewElement {
|
|
11
11
|
template = () => {
|
|
12
12
|
return uHtml `<style>
|
|
13
|
-
header{border-top:1px solid #ddd;align-items:center;height:2rem;display:flex}.tool{display:none!important}header:hover .tool{display:flex!important}.tool.active{order:100;opacity:1!important;display:flex!important}.label-container{flex-grow:1;align-items:center;display:flex;overflow:auto}.label-out-resolution span{font-style:italic}.resolution-tool{margin-left:.5rem}.legend{display:flex}.legend img{background:var(--svg-legend-bkg);height:fit-content;filter:var(--svg-map-filter)}.legend-icon{background:var(--svg-legend-bkg);max-height:1.5rem;filter:var(--svg-map-filter);margin-left:.5rem}.children{flex-basis:100%;order:10;padding-left:1.3rem}.dragAfter{border-bottom:1rem dashed #ccc}.dragBefore{border-top:1rem dashed #ccc}.gg-checkbox{width:1.2rem}.gg-caret,.gg-spacer{text-align:center;width:1.5rem;padding:0}.gg-caret{transform:scale(1.3)}.gg-caret.gg-rotate90{transform:scale(1.3)rotate(90deg)}.gg-small.gg-lock{min-width:1rem}.gg-tree-label{text-align:left;white-space:nowrap;text-overflow:ellipsis;padding-left:0;overflow:hidden}.gg-grab:hover{cursor:grab}.gg-selected{opacity:1}.legend-file{color:var(--text-color);font-style:italic;display:flex}
|
|
13
|
+
header{border-top:1px solid #ddd;align-items:center;height:2rem;display:flex}.tool{display:none!important}header:hover .tool{display:flex!important}.tool.active{order:100;opacity:1!important;display:flex!important}.label-container{flex-grow:1;align-items:center;display:flex;overflow:auto}.label-out-resolution span{font-style:italic}.resolution-tool{margin-left:.5rem}.legend{display:flex}.legend img{background:var(--svg-legend-bkg);height:fit-content;filter:var(--svg-map-filter)}.legend-icon{background:var(--svg-legend-bkg);max-height:1.5rem;filter:var(--svg-map-filter);margin-left:.5rem}.children{flex-basis:100%;order:10;padding-left:1.3rem}.dragAfter{border-bottom:1rem dashed #ccc}.dragBefore{border-top:1rem dashed #ccc}.gg-checkbox{width:1.2rem}.gg-caret,.gg-spacer{text-align:center;width:1.5rem;padding:0}.gg-caret{transform:scale(1.3)}.gg-caret.gg-rotate90{transform:scale(1.3)rotate(90deg)}.gg-small.gg-lock{min-width:1rem}.gg-tree-label{text-align:left;white-space:nowrap;text-overflow:ellipsis;padding-left:0;overflow:hidden}.gg-grab:hover{cursor:grab}.gg-selected{opacity:1}.legend-file{color:var(--text-color);font-style:italic;display:flex}@keyframes headerFade{0%{background-color:var(--highlight-color)}to{background-color:#0000}}.highlight{animation:3s ease-in-out forwards headerFade}
|
|
14
14
|
</style><style>
|
|
15
15
|
*{font-family:Arial,sans-serif}.hidden{display:none!important}.gg-rotate90{transform:rotate(90deg)}.gg-rotate180{transform:rotate(180deg)}.gg-rotate270{transform:rotate(270deg)}img{filter:var(--svg-filter)}img.legend-image{filter:var(--svg-map-filter);background:var(--svg-legend-bkg)}div{scrollbar-width:thin}a,a:visited{color:var(--link-color)}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes spin-wait{0%{transform:rotate(0)}7%{transform:rotate(360deg)}to{transform:rotate(360deg)}}.gg-spin{animation-name:spin;animation-duration:2s;animation-timing-function:linear;animation-iteration-count:infinite}.gg-spin-wait{animation-name:spin-wait;animation-duration:10s;animation-timing-function:linear;animation-iteration-count:infinite}::-webkit-scrollbar{width:5px}::-webkit-scrollbar-thumb{background:#999}.gg-button,.gg-select,.gg-input,.gg-textarea{background-color:var(--bkg-color);color:var(--text-color);border:var(--app-standard-border);box-sizing:border-box;cursor:pointer;border-radius:3px;outline:0;margin:0;padding:0 0 0 .5rem;display:inline-block}.gg-label{background-color:var(--bkg-color);color:var(--text-color);border:none;align-items:center;margin:0;padding:0;display:flex}.gg-button,.gg-select,.gg-input,.gg-label{min-height:calc(var(--app-standard-height)/1.5)}.gg-textarea{max-height:initial;resize:vertical;height:6rem;padding:.5rem;line-height:1.3rem}.gg-input{cursor:text}.gg-checkbox{accent-color:var(--text-color);width:1.2rem}.gg-range{accent-color:var(--text-color)}.gg-button{padding:0 .5rem}.gg-button.active{border:solid 1px var(--text-color-grad2);background-color:var(--text-color-grad2);color:var(--bkg-color)}.gg-button:disabled{color:gray;cursor:not-allowed;background-color:#d3d3d3;border:none}.gg-input:disabled,.gg-select:disabled,.gg-textarea:disabled{color:gray;cursor:not-allowed;background-color:#d3d3d3}.gg-button>img{vertical-align:middle}.gg-icon-button{color:var(--text-color);cursor:pointer;background-color:#0000;border:none;flex-direction:column;justify-content:center;align-items:center;padding:0;display:flex}.gg-icon{justify-content:center;align-items:center;display:flex}.gg-big,.gg-big-withtext{min-width:var(--app-standard-height);min-height:var(--app-standard-height);max-height:var(--app-standard-height)}.gg-big img,.gg-big-withtext img{width:calc(var(--app-standard-height) - 1.5rem);margin:0}.gg-big-withtext span{font-variant:small-caps;padding:0 1rem;font-size:.9rem}.gg-medium,.gg-medium-withtext{min-width:calc(var(--app-standard-height)/1.2);min-height:calc(var(--app-standard-height)/1.2);max-height:calc(var(--app-standard-height)/1.2);flex-direction:row}.gg-medium img{width:calc(var(--app-standard-height)/2.4);margin:0}.gg-medium-withtext img{width:calc(var(--app-standard-height)/2.4);margin-left:.5rem}.gg-medium-withtext span{padding:0 1rem 0 .5rem;font-size:.9rem}.gg-small,.gg-small-withtext{min-width:calc(var(--app-standard-height)/2);min-height:calc(var(--app-standard-height)/2);max-height:calc(var(--app-standard-height)/2);flex-direction:row}.gg-small img{width:calc(var(--app-standard-height)/3);margin:0}.gg-small-withtext img{width:calc(var(--app-standard-height)/3);margin-left:.5rem}.gg-small-withtext span{padding:0 .5rem 0 .3rem;font-size:.9rem}.gg-button:hover,.gg-select:hover,.gg-input:hover,.gg-textarea:hover,.gg-icon-button:hover{background-color:var(--bkg-color-grad1)}.gg-opacity{opacity:.5}.gg-opacity:hover{opacity:1;background-color:#0000}.gg-tabs{cursor:pointer;grid-auto-flow:column;padding-bottom:1rem;font-size:1rem;display:grid}.gg-tab{border:none;border-bottom:var(--app-standard-border);cursor:pointer;color:var(--text-color);background:0 0;padding:.5rem}.gg-tab.active{border-bottom:solid 1px var(--text-color)}.girafe-button-big,.girafe-button-large,.girafe-button-small,.girafe-button-tiny{color:var(--text-color);background-color:#0000;border:none;flex-direction:column;display:flex}.girafe-button-big:hover,.girafe-button-large:hover,.girafe-button-small:hover,.girafe-button-tiny:hover{background-color:var(--bkg-color-grad1);cursor:pointer}.girafe-button-big.dark,.girafe-button-large.dark,.girafe-button-small.dark,.girafe-button-tiny.dark{background-color:var(--bkg-color);filter:invert()}.girafe-button-big{width:var(--app-standard-height);height:var(--app-standard-height);align-items:center;padding:1rem}.girafe-button-big img{overflow:hidden}.girafe-button-large{flex-direction:row}.girafe-button-large img{height:2rem;margin:.3rem}.girafe-button-large span{height:2rem;margin:.3rem;line-height:2rem}.girafe-button-small{min-width:calc(var(--app-standard-height)/2);height:calc(var(--app-standard-height)/2);align-items:center;padding:.5rem}.girafe-button-small img{overflow:hidden}.girafe-button-small span{text-align:left;text-overflow:ellipsis;width:100%;overflow:hidden}.girafe-button-tiny{align-items:center;width:1rem;height:1rem;padding:0}.girafe-button-tiny img{overflow:hidden}.girafe-onboarding-theme{background-color:var(--bkg-color)!important;color:var(--text-color)!important}.girafe-onboarding-theme button{background-color:var(--bkg-color)!important;color:var(--text-color)!important;text-shadow:none!important}.girafe-onboarding-theme button.driver-popover-close-btn{z-index:10000}
|
|
16
16
|
</style>
|