@geogirafe/lib-geoportal 1.1.0-dev.2629550578 → 1.1.0-dev.2631714424
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/api/apigeogirafeapp.js +1 -1
- package/assets/i18n/de.json +5 -1
- package/assets/i18n/en.json +5 -1
- package/assets/i18n/fr.json +5 -1
- package/assets/i18n/it.json +5 -1
- package/assets/icons/arrow-download-multiple.svg +1 -0
- package/assets/icons/arrow-download.svg +1 -1
- package/assets/icons/checked-no-border.svg +1 -0
- package/assets/icons/invert.svg +1 -0
- package/assets/icons/plus.svg +1 -0
- package/buildtools/tools.js +23 -0
- package/components/about/component.js +1 -1
- package/components/addbookmark/component.js +1 -1
- package/components/advancedfilter/component.d.ts +3 -0
- package/components/advancedfilter/component.js +57 -14
- package/components/advancedfilter/filterconditionelement.js +3 -0
- package/components/advancedfilter/layercsvexporter.d.ts +15 -0
- package/components/advancedfilter/layercsvexporter.js +73 -0
- package/components/advancedfilter/layerfilterelement.d.ts +5 -2
- package/components/advancedfilter/layerfilterelement.js +18 -3
- package/components/advancedfilter/style.css +37 -8
- package/components/alignnorthbutton-mobile/component.js +1 -1
- package/components/auth/component.js +1 -1
- package/components/basemap/component.js +1 -1
- package/components/contact/component.js +1 -1
- package/components/context-menu/custom-context-menu/component.js +1 -1
- package/components/context-menu/default-context-menu/component.js +1 -1
- package/components/coordinate/component.js +1 -1
- package/components/cross-section/cross-section-settings/component.js +1 -1
- package/components/cross-section/cross-section-viewer/component.js +1 -1
- package/components/displaymenubutton-mobile/component.js +1 -1
- package/components/displayselectorbutton-mobile/component.js +1 -1
- package/components/drawing/component-mobile.js +1 -1
- package/components/drawing/component.js +1 -1
- package/components/drawing/fixed-dimension/component.js +1 -1
- package/components/drawing-container-mobile/component.js +1 -1
- package/components/drawing-toolbar/component.js +1 -1
- package/components/edit/component.js +1 -1
- package/components/edit/editform/component.js +1 -1
- package/components/extlayers/component.js +1 -1
- package/components/feedbackbutton/component.js +1 -1
- package/components/geolocation-mobile/component.js +1 -1
- package/components/getdirections/component.js +1 -1
- package/components/help/component.js +1 -1
- package/components/infobox/component.js +1 -1
- package/components/infowindow/component.js +1 -1
- package/components/layout/component.js +1 -1
- package/components/lr-panel/component.js +1 -1
- package/components/map/component.js +1 -1
- package/components/menu-mobile/component.js +1 -1
- package/components/menubutton/component.js +1 -1
- package/components/modals/component.js +1 -1
- package/components/navigation/component.js +1 -1
- package/components/news/news-button/component.js +1 -1
- package/components/news/news-panel/component.js +1 -1
- package/components/offline/component.js +1 -1
- package/components/print/component.js +1 -1
- package/components/prototypebanner/component.js +1 -1
- package/components/querybuilder/component.js +1 -1
- package/components/scale/component.js +1 -1
- package/components/search/component.js +1 -1
- package/components/selectiongrid/component.js +1 -1
- package/components/selectionpanel-mobile/component.js +1 -1
- package/components/selectiontool/component.js +1 -1
- package/components/selectionwindow/component.js +1 -1
- package/components/share/component.js +1 -1
- package/components/swipe-up-panel-mobile/component.js +1 -1
- package/components/themes/component.js +1 -1
- package/components/timerestriction/component.js +1 -1
- package/components/timerestriction/timepicker/component.js +1 -1
- package/components/timerestriction/timeslider/component.js +1 -1
- package/components/treeview/treeviewgroup/component.js +2 -2
- package/components/treeview/treeviewitem/component.js +2 -2
- package/components/treeview/treeviewroot/component.js +1 -1
- package/components/treeview/treeviewtheme/component.js +2 -2
- package/components/userpreferences/component.js +1 -1
- package/components/videorecord/component.js +1 -1
- package/models/filter.d.ts +1 -1
- package/models/filter.js +3 -2
- package/models/serverwfs.js +1 -1
- package/package.json +1 -1
- package/styles/common.css +15 -12
- package/templates/public/about.json +1 -1
- package/tools/wfs/wfsclient.d.ts +1 -1
- package/tools/wfs/wfsfilter.js +9 -2
- package/tools/wfs/wfsfiltercondition.js +2 -0
package/api/apigeogirafeapp.js
CHANGED
|
@@ -32,7 +32,7 @@ export default class GeoGirafeApi extends GirafeHTMLElement {
|
|
|
32
32
|
styleUrls = null;
|
|
33
33
|
template = () => {
|
|
34
34
|
return uHtml `<style>
|
|
35
|
-
.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}button,input,select,textarea{font:inherit}.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-
|
|
35
|
+
.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}button,input,select,textarea{font:inherit}.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-grad1);background-color:var(--bkg-color-grad2)}.gg-button:disabled{background-color:var(--bkg-color-grad1);color:var(--text-color-grad2);cursor:not-allowed;border:none}.gg-button:disabled img{filter:opacity(.6)}.gg-input:disabled,.gg-select:disabled,.gg-textarea:disabled{background-color:var(--bkg-color-grad1);color:var(--text-color-grad2);cursor:not-allowed}.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:not(:disabled),.gg-select:hover:not(:disabled),.gg-input:hover:not(:disabled),.gg-textarea:hover:not(:disabled),.gg-icon-button:hover:not(:disabled){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}
|
|
36
36
|
</style><style>
|
|
37
37
|
:host{position:relative}girafe-map{width:100%;height:100%;position:relative}girafe-basemap{display:block;position:absolute;bottom:.5rem;left:.5rem}girafe-search{width:50%;height:2.25rem;display:block;position:absolute;top:.5rem;left:.5rem;box-shadow:0 1px 4px #0000004d}girafe-selection-window{z-index:100;width:400px;height:240px;position:absolute;bottom:1rem;right:1rem}
|
|
38
38
|
</style>
|
package/assets/i18n/de.json
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"add": "Hinzufügen",
|
|
11
11
|
"Add bookmark": "Lesezeichen hinzufügen",
|
|
12
12
|
"Add condition": "Bedingung hinzufügen",
|
|
13
|
+
"Add filter": "Filter hinzufügen",
|
|
13
14
|
"Add selected": "Auswahl hinzufügen",
|
|
14
15
|
"Add your first items": "Fügen Sie Inhalte hinzu:",
|
|
15
16
|
"add_bookmark": "Lesezeichen hinzufügen",
|
|
@@ -130,6 +131,8 @@
|
|
|
130
131
|
"does not contain": "enthält nicht",
|
|
131
132
|
"does not equal": "ungleich",
|
|
132
133
|
"download": "Herunterladen",
|
|
134
|
+
"Download all to CSV": "Alle in CSV exportieren",
|
|
135
|
+
"Download CSV": "In CSV exportieren",
|
|
133
136
|
"download_help": "Herunterladen",
|
|
134
137
|
"download_video": "Video herunterladen",
|
|
135
138
|
"Draw a line on the map to display the corresponding LiDAR profile. Use double-click to finish the drawing.": "Zeichne eine Linie auf die Karte, um das entsprechende LiDAR-Profil anzuzeigen. Doppelklicken, um die Zeichnung abzuschliessen.",
|
|
@@ -261,6 +264,7 @@
|
|
|
261
264
|
"info": "Information",
|
|
262
265
|
"Information without public faith": "Informationen ohne öffentliche Glaubwürdigkeit",
|
|
263
266
|
"Intensity": "Intensität",
|
|
267
|
+
"Invert filter": "Invertiere Filter",
|
|
264
268
|
"Invert selection": "Auswahl umkehren",
|
|
265
269
|
"it": "Italienisch",
|
|
266
270
|
"It might be offline": "Der Dienst könnte offline sein",
|
|
@@ -318,7 +322,6 @@
|
|
|
318
322
|
"My selection": "Meine Auswahl",
|
|
319
323
|
"Name": "Name",
|
|
320
324
|
"Navigate to Selection": "Zur Auswahl navigieren",
|
|
321
|
-
"New Filter": "Neuer Filter",
|
|
322
325
|
"news": "Nachrichten",
|
|
323
326
|
"No": "Nein",
|
|
324
327
|
"No bookmark": "Kein Lesezeichen",
|
|
@@ -513,6 +516,7 @@
|
|
|
513
516
|
"Take measure": "Messen",
|
|
514
517
|
"Test for Translation": "Test für Übersetzung",
|
|
515
518
|
"Thanks for your message. If necessary, somebody will enter in contact with you as soon as possible.": "Vielen Dank für Ihre Nachricht. Falls erforderlich, wird sich so schnell wie möglich jemand mit Ihnen in Verbindung setzen.",
|
|
519
|
+
"The CSV export has been truncated to the maximum number of features allowed for download": "Der CSV-Export wurde auf die maximal zulässige Anzahl herunterladbarer Objekte begrenzt.",
|
|
516
520
|
"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.",
|
|
517
521
|
"The generated document may contain sensitive data.": "Das generierte Dokument kann sensible Daten enthalten.",
|
|
518
522
|
"The print server is unavailable. Please, try later.": "Der Druckserver ist nicht verfügbar. Bitte versuche es später erneut.",
|
package/assets/i18n/en.json
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"add": "Add",
|
|
11
11
|
"Add bookmark": "Add bookmark",
|
|
12
12
|
"Add condition": "Add condition",
|
|
13
|
+
"Add filter": "Add filter",
|
|
13
14
|
"Add selected": "Add selected",
|
|
14
15
|
"Add your first items": "Add your first items",
|
|
15
16
|
"add_bookmark": "Add bookmark",
|
|
@@ -131,6 +132,8 @@
|
|
|
131
132
|
"does not contain": "does not contain",
|
|
132
133
|
"does not equal": "does not equal",
|
|
133
134
|
"download": "Download",
|
|
135
|
+
"Download all to CSV": "Download all to CSV",
|
|
136
|
+
"Download CSV": "Download CSV",
|
|
134
137
|
"download_help": "Download",
|
|
135
138
|
"download_video": "Download video",
|
|
136
139
|
"Draw a line on the map to display the corresponding LiDAR profile. Use double-click to finish the drawing.": "Draw a line on the map to display the corresponding LiDAR profile. Use double-click to finish the drawing.",
|
|
@@ -263,6 +266,7 @@
|
|
|
263
266
|
"info": "Info",
|
|
264
267
|
"Information without public faith": "Information without public faith",
|
|
265
268
|
"Intensity": "Intensity",
|
|
269
|
+
"Invert filter": "Invert filter",
|
|
266
270
|
"Invert selection": "Invert selection",
|
|
267
271
|
"it": "Italian",
|
|
268
272
|
"It might be offline": "It might be offline",
|
|
@@ -320,7 +324,6 @@
|
|
|
320
324
|
"My selection": "My selection",
|
|
321
325
|
"Name": "Name",
|
|
322
326
|
"Navigate to Selection": "Navigate to Selection",
|
|
323
|
-
"New Filter": "New Filter",
|
|
324
327
|
"news": "News",
|
|
325
328
|
"No": "No",
|
|
326
329
|
"No bookmark": "No bookmark",
|
|
@@ -516,6 +519,7 @@
|
|
|
516
519
|
"Take measure": "Take measure",
|
|
517
520
|
"Test for Translation": "Test for Translation",
|
|
518
521
|
"Thanks for your message. If necessary, somebody will enter in contact with you as soon as possible.": "Thanks for your message. If necessary, someone will get in touch with you as soon as possible.",
|
|
522
|
+
"The CSV export has been truncated to the maximum number of features allowed for download": "The CSV export has been truncated to the maximum number of features allowed for download.",
|
|
519
523
|
"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.",
|
|
520
524
|
"The generated document may contain sensitive data.": "The generated document may contain sensitive data.",
|
|
521
525
|
"The print server is unavailable. Please, try later.": "The print server is unavailable. Please, try later.",
|
package/assets/i18n/fr.json
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"add": "Ajouter",
|
|
11
11
|
"Add bookmark": "Ajouter un favori",
|
|
12
12
|
"Add condition": "Ajouter une condition",
|
|
13
|
+
"Add filter": "Ajouter un filtre",
|
|
13
14
|
"Add selected": "Ajouter la sélection",
|
|
14
15
|
"Add your first items": "Ajoutez vos premiers éléments",
|
|
15
16
|
"add_bookmark": "Ajouter un favori",
|
|
@@ -130,6 +131,8 @@
|
|
|
130
131
|
"does not contain": "ne contient pas",
|
|
131
132
|
"does not equal": "n'est pas égal à",
|
|
132
133
|
"download": "Télécharger",
|
|
134
|
+
"Download all to CSV": "Exporter tout en CSV",
|
|
135
|
+
"Download CSV": "Exporter en CSV",
|
|
133
136
|
"download_help": "Télécharger",
|
|
134
137
|
"download_video": "Télécharger la vidéo",
|
|
135
138
|
"Draw a line on the map to display the corresponding LiDAR profile. Use double-click to finish the drawing.": "Tracez une ligne sur la carte pour afficher le profil LiDAR correspondant. Utilisez un double-clic pour terminer le dessin.",
|
|
@@ -261,6 +264,7 @@
|
|
|
261
264
|
"info": "Information",
|
|
262
265
|
"Information without public faith": "Informations dépourvues de foi publique",
|
|
263
266
|
"Intensity": "Intensité",
|
|
267
|
+
"Invert filter": "Inverser le filtre",
|
|
264
268
|
"Invert selection": "Inverser la sélection",
|
|
265
269
|
"it": "Italien",
|
|
266
270
|
"It might be offline": "Il pourrait être hors ligne",
|
|
@@ -318,7 +322,6 @@
|
|
|
318
322
|
"My selection": "Ma sélection",
|
|
319
323
|
"Name": "Nom",
|
|
320
324
|
"Navigate to Selection": "Naviguer vers la sélection",
|
|
321
|
-
"New Filter": "Nouveau filtre",
|
|
322
325
|
"news": "Actualités",
|
|
323
326
|
"No": "Non",
|
|
324
327
|
"No bookmark": "Aucun favori",
|
|
@@ -513,6 +516,7 @@
|
|
|
513
516
|
"Take measure": "Prendre une mesure",
|
|
514
517
|
"Test for Translation": "Test de traduction",
|
|
515
518
|
"Thanks for your message. If necessary, somebody will enter in contact with you as soon as possible.": "Merci pour votre message. Si nécessaire, quelqu'un prendra contact avec vous dès que possible.",
|
|
519
|
+
"The CSV export has been truncated to the maximum number of features allowed for download": "L’export CSV a été limité au nombre maximal d’entités autorisées au téléchargement.",
|
|
516
520
|
"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.",
|
|
517
521
|
"The generated document may contain sensitive data.": "Le document généré peut contenir des données sensibles.",
|
|
518
522
|
"The print server is unavailable. Please, try later.": "Le serveur d'impression est indisponible. Veuillez réessayer plus tard.",
|
package/assets/i18n/it.json
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"add": "Aggiungi",
|
|
11
11
|
"Add bookmark": "Aggiungi segnalibro",
|
|
12
12
|
"Add condition": "Aggiungi condizione",
|
|
13
|
+
"Add filter": "Aggiungi filtro",
|
|
13
14
|
"Add selected": "Agguingi selezione",
|
|
14
15
|
"Add your first items": "Aggiungi i tuoi primi elementi",
|
|
15
16
|
"add_bookmark": "Aggiungi segnalibro",
|
|
@@ -130,6 +131,8 @@
|
|
|
130
131
|
"does not contain": "non contiene",
|
|
131
132
|
"does not equal": "diverso da",
|
|
132
133
|
"download": "Scarica",
|
|
134
|
+
"Download all to CSV": "Scarica tutto in CSV",
|
|
135
|
+
"Download CSV": "Scarica CSV",
|
|
133
136
|
"download_help": "Scarica",
|
|
134
137
|
"download_video": "Scaricare il video",
|
|
135
138
|
"Draw a line on the map to display the corresponding LiDAR profile. Use double-click to finish the drawing.": "Disegna una linea sulla mappa per visualizzare il profilo LiDAR corrispondente. Usa un doppio clic per terminare il disegno.",
|
|
@@ -261,6 +264,7 @@
|
|
|
261
264
|
"info": "Informazione",
|
|
262
265
|
"Information without public faith": "Informazioni prive di fede pubblica",
|
|
263
266
|
"Intensity": "Intensità",
|
|
267
|
+
"Invert filter": "Inverti filtro",
|
|
264
268
|
"Invert selection": "Inverti selezione",
|
|
265
269
|
"it": "Italiano",
|
|
266
270
|
"It might be offline": "Potrebbe essere offline",
|
|
@@ -318,7 +322,6 @@
|
|
|
318
322
|
"My selection": "La mia selezione",
|
|
319
323
|
"Name": "Nome",
|
|
320
324
|
"Navigate to Selection": "Vai alla selezione",
|
|
321
|
-
"New Filter": "Nuovo filtro",
|
|
322
325
|
"news": "Notizie",
|
|
323
326
|
"No": "No",
|
|
324
327
|
"No bookmark": "Nessun segnalibro",
|
|
@@ -513,6 +516,7 @@
|
|
|
513
516
|
"Take measure": "Prendi misura",
|
|
514
517
|
"Test for Translation": "Test di traduzione",
|
|
515
518
|
"Thanks for your message. If necessary, somebody will enter in contact with you as soon as possible.": "Grazie per il tuo messaggio. Se necessario, qualcuno ti contatterà il prima possibile.",
|
|
519
|
+
"The CSV export has been truncated to the maximum number of features allowed for download": "L'esportazione CSV è stata limitata al numero massimo di elementi consentiti per il download.",
|
|
516
520
|
"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.",
|
|
517
521
|
"The generated document may contain sensitive data.": "Il documento generato potrebbe contenere dati sensibili.",
|
|
518
522
|
"The print server is unavailable. Please, try later.": "Il server di stampa non è disponibile. Riprova più tardi.",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="150" height="150" fill="none" stroke="#212121" stroke-linecap="round" stroke-linejoin="round" stroke-width="12" viewBox="40 35 240 240"><path d="M110 70v155M80 195l30 30 30-30M210 70v155M180 195l30 30 30-30M70 260h180"/></svg>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="150" height="150" viewBox="0 0 48 48"><title>ic_fluent_arrow_download_48_regular</title><path fill="#212121" fill-rule="nonzero" d="M12.25 39.5h23.5a1.25 1.25 0 0 1 .128 2.494L35.75 42h-23.5a1.25 1.25 0 0 1-.128-2.494zh23.5zM23.622 6.006 23.75 6c.647 0 1.18.492 1.244 1.122L25 7.25v24.29l5.647-5.646a1.25 1.25 0 0 1 1.767 1.768l-7.778 7.778a1.25 1.25 0 0 1-1.767 0l-7.779-7.778a1.25 1.25 0 1 1 1.768-1.768l5.642 5.642V7.25c0-.647.492-1.18 1.122-1.244L23.75 6z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M337 209 209 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L303 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64"><defs><clipPath id="a"><path d="M64 64H0L64 0z"/></clipPath><clipPath id="c"><path d="M0 64V0h64z"/></clipPath><mask id="b"><path fill="#fff" d="M0 0h64v64H0z"/><circle cx="32" cy="32" r="12"/></mask></defs><g clip-path="url(#a)"><rect width="56" height="56" x="4" y="4" fill="currentColor" mask="url(#b)" rx="6"/></g><g clip-path="url(#c)"><circle cx="32" cy="32" r="12" fill="currentColor"/></g><rect width="56" height="56" x="4" y="4" fill="none" stroke="currentColor" stroke-width="4" rx="6"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="#212121" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24"><path d="M12 5v14M5 12h14"/></svg>
|
package/buildtools/tools.js
CHANGED
|
@@ -111,6 +111,7 @@ async function getHtmlCode(currentFilename, relativeHtmlPath, styleCode) {
|
|
|
111
111
|
const htmlFilePath = path.join(path.dirname(currentFilename), relativeHtmlPath.trim());
|
|
112
112
|
try {
|
|
113
113
|
let htmlCode = fs.readFileSync(htmlFilePath, 'utf8');
|
|
114
|
+
htmlCode = inlineImageSource(htmlCode);
|
|
114
115
|
htmlCode = await minify.html(htmlCode, {
|
|
115
116
|
html: {
|
|
116
117
|
minifyCSS: false,
|
|
@@ -377,3 +378,25 @@ function appendExtensionToMatchingImports(code, importRegex, extension) {
|
|
|
377
378
|
|
|
378
379
|
return updatedCode;
|
|
379
380
|
}
|
|
381
|
+
|
|
382
|
+
const imgRegex = /<img\b[^>]*\bsrc\s*=\s*["']([^"']+)["'][^>]*\/?>/gis;
|
|
383
|
+
|
|
384
|
+
function inlineImageSource(htmlCode) {
|
|
385
|
+
const imagesFound = htmlCode.matchAll(imgRegex);
|
|
386
|
+
for (const imageFound of imagesFound) {
|
|
387
|
+
const imageSrc = imageFound[1];
|
|
388
|
+
if (imageSrc.startsWith('http') || !imageSrc.endsWith('.svg?girafeInline')) {
|
|
389
|
+
// We do not want to inline the images if they have an absolute path, if they are not svg images
|
|
390
|
+
// And we only want to inline them if they have the tag '?girafeInline'
|
|
391
|
+
continue;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
const imagePath = path.join('./src/assets', imageSrc.trim().replace('?girafeInline', ''));
|
|
395
|
+
const imageContent = fs.readFileSync(imagePath, 'utf8');
|
|
396
|
+
htmlCode = htmlCode.replace(
|
|
397
|
+
imageFound[1],
|
|
398
|
+
'data:image/svg+xml;base64,' + Buffer.from(imageContent).toString('base64')
|
|
399
|
+
);
|
|
400
|
+
}
|
|
401
|
+
return htmlCode;
|
|
402
|
+
}
|
|
@@ -6,7 +6,7 @@ class AboutComponent extends GirafeHTMLElement {
|
|
|
6
6
|
styleUrls = null;
|
|
7
7
|
template = () => {
|
|
8
8
|
return uHtml `<style>
|
|
9
|
-
.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}button,input,select,textarea{font:inherit}.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-
|
|
9
|
+
.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}button,input,select,textarea{font:inherit}.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-grad1);background-color:var(--bkg-color-grad2)}.gg-button:disabled{background-color:var(--bkg-color-grad1);color:var(--text-color-grad2);cursor:not-allowed;border:none}.gg-button:disabled img{filter:opacity(.6)}.gg-input:disabled,.gg-select:disabled,.gg-textarea:disabled{background-color:var(--bkg-color-grad1);color:var(--text-color-grad2);cursor:not-allowed}.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:not(:disabled),.gg-select:hover:not(:disabled),.gg-input:hover:not(:disabled),.gg-textarea:hover:not(:disabled),.gg-icon-button:hover:not(:disabled){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}
|
|
10
10
|
</style><style>
|
|
11
11
|
.panel{color:var(--text-color)}.panel>div{padding:1rem}img.logo{filter:var(--svg-filter);opacity:.8;height:4rem}.list{flex-direction:column;margin-top:1rem;display:flex}
|
|
12
12
|
</style>
|
|
@@ -7,7 +7,7 @@ class AddBookmarkComponent extends GirafeHTMLElement {
|
|
|
7
7
|
styleUrls = null;
|
|
8
8
|
template = () => {
|
|
9
9
|
return uHtml `<style>
|
|
10
|
-
.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}button,input,select,textarea{font:inherit}.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-
|
|
10
|
+
.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}button,input,select,textarea{font:inherit}.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-grad1);background-color:var(--bkg-color-grad2)}.gg-button:disabled{background-color:var(--bkg-color-grad1);color:var(--text-color-grad2);cursor:not-allowed;border:none}.gg-button:disabled img{filter:opacity(.6)}.gg-input:disabled,.gg-select:disabled,.gg-textarea:disabled{background-color:var(--bkg-color-grad1);color:var(--text-color-grad2);cursor:not-allowed}.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:not(:disabled),.gg-select:hover:not(:disabled),.gg-input:hover:not(:disabled),.gg-textarea:hover:not(:disabled),.gg-icon-button:hover:not(:disabled){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>
|
|
12
12
|
<style>${this.customStyle}</style>
|
|
13
13
|
<div class="add-bookmark"><button tip="add_bookmark" class="gg-icon-button gg-big" onclick="${() => this.addBookmark()}"><img alt="add-icon" src="icons/bookmark-add.svg" ?hidden="${this.awaitingBookmarkLink}"> <img ?hidden="${!this.awaitingBookmarkLink}" loading="eager" src="icons/progress.svg" class="gg-spin gg-small" alt="${this.context.i18nManager.getTranslation('Loading')}"></button></div>
|
|
@@ -16,6 +16,7 @@ declare class AdvancedFilterComponent extends GirafeHTMLElement implements IGira
|
|
|
16
16
|
layerFilterElements: LayerFilterElement[];
|
|
17
17
|
columnAliasHelper: ColumnAliasHelper;
|
|
18
18
|
layerIsRefreshing: Map<number, boolean>;
|
|
19
|
+
private csvDownloader;
|
|
19
20
|
constructor();
|
|
20
21
|
render(): void;
|
|
21
22
|
registerEvents(): void;
|
|
@@ -50,7 +51,9 @@ declare class AdvancedFilterComponent extends GirafeHTMLElement implements IGira
|
|
|
50
51
|
onValue2Changed(condition: FilterConditionElement, e: Event): void;
|
|
51
52
|
onChoiceChanged(condition: FilterConditionElement, _e: Event): void;
|
|
52
53
|
onConditionApplied(filterElement: LayerFilterElement, condition: FilterConditionElement): void;
|
|
54
|
+
onFilterInverted(filterElement: LayerFilterElement): void;
|
|
53
55
|
private applyFilter;
|
|
56
|
+
onDownloadLayerData(filterElements?: LayerFilterElement[]): Promise<void>;
|
|
54
57
|
hasNonAppliedFilters(): boolean;
|
|
55
58
|
togglePanel(visible: boolean): void;
|
|
56
59
|
protected connectedCallback(): void;
|
|
@@ -13,17 +13,18 @@ import LayerFilterElement from './layerfilterelement.js';
|
|
|
13
13
|
import GroupLayer from '../../models/layers/grouplayer.js';
|
|
14
14
|
import { UsedInTemplateOnly } from '../../decorators.js';
|
|
15
15
|
import FilterConditionElement from './filterconditionelement.js';
|
|
16
|
+
import LayerCsvExporter from './layercsvexporter.js';
|
|
16
17
|
class AdvancedFilterComponent extends GirafeHTMLElement {
|
|
17
18
|
templateUrl = null;
|
|
18
19
|
styleUrls = null;
|
|
19
20
|
template = () => {
|
|
20
21
|
return uHtml `<style>
|
|
21
|
-
.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}button,input,select,textarea{font:inherit}.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-
|
|
22
|
+
.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}button,input,select,textarea{font:inherit}.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-grad1);background-color:var(--bkg-color-grad2)}.gg-button:disabled{background-color:var(--bkg-color-grad1);color:var(--text-color-grad2);cursor:not-allowed;border:none}.gg-button:disabled img{filter:opacity(.6)}.gg-input:disabled,.gg-select:disabled,.gg-textarea:disabled{background-color:var(--bkg-color-grad1);color:var(--text-color-grad2);cursor:not-allowed}.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:not(:disabled),.gg-select:hover:not(:disabled),.gg-input:hover:not(:disabled),.gg-textarea:hover:not(:disabled),.gg-icon-button:hover:not(:disabled){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}
|
|
22
23
|
</style><style>
|
|
23
|
-
#content{background:var(--bkg-color);color:var(--text-color);flex-direction:column;gap:1rem;margin:0;padding:1rem;display:flex}.filter-element-container{flex-direction:column;gap:
|
|
24
|
+
#content{background:var(--bkg-color);color:var(--text-color);flex-direction:column;gap:1rem;margin:0;padding:1rem;display:flex}.filter-element-container{flex-direction:column;gap:2rem;display:flex}.filter-element{background-color:color-mix(in srgb, var(--bkg-color-grad1) 30%, transparent);box-shadow:var(--bx-shdw);border-radius:3px;flex-direction:column;gap:.5rem;padding:.5rem;display:flex;position:relative}.filter-title{text-overflow:ellipsis;white-space:nowrap;padding-right:2rem;font-size:1.2rem}.filter-expression{padding-right:1.5rem;font-family:monospace,Arial,sans-serif;font-size:.85rem}.gg-label{background-color:#0000}.layer-select-container{flex-direction:column;display:flex}.text-ellipsis{text-overflow:ellipsis;overflow:hidden}.filter-condition-container{flex-direction:column;gap:.5rem;display:flex}.filter-condition{background-color:var(--bkg-color);box-shadow:var(--bx-shdw);border-radius:3px;flex-direction:column;margin-left:.5rem;padding:.5rem;display:flex}.value-inputs{gap:.5rem;display:flex}.value-inputs>input{width:100%}.btn-with-icon-and-text{color:var(--text-color);white-space:nowrap;flex-shrink:0;align-items:center;gap:.25em;width:max-content;display:inline-flex}.btn-with-icon-and-text>img{margin:auto}.apply-btn{margin-top:1rem}.export-btn{width:21px}.remove-btn{align-self:flex-end;margin:-.25rem -.25rem 0 0;font-size:1.25rem;position:absolute}ul.value-choices{border:var(--app-standard-border);max-height:10rem;margin:0;padding:.5em .25em;overflow-y:auto}ul.value-choices li{align-items:flex-start;gap:.25em;display:flex}ul.value-choices li label{flex:1}.footer-container{flex-flow:wrap;gap:.5rem;display:flex}.component-loading{margin-left:auto;margin-right:auto}.layer-loading{align-items:center;min-width:50px;margin-left:1rem;margin-right:auto;display:flex}.loader{box-sizing:border-box;border:3px solid var(--text-color);opacity:.7;vertical-align:middle;border-bottom-color:#0000;border-radius:50%;align-self:center;width:25px;height:25px;animation:1s linear infinite rotation;display:inline-block}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.filter-actions{flex-wrap:wrap;gap:.5rem;display:flex}#export-all-btn{margin-left:auto}
|
|
24
25
|
</style>
|
|
25
26
|
<style>${this.customStyle}</style>
|
|
26
|
-
<div id="content"><div class="filter-element-container">${this.layerFilterElements.map((filterElement) => uHtml `<div class="filter-element" data-id="${filterElement.id}"><div class="filter-title text-ellipsis">${filterElement.title}</div><button class="gg-icon-button gg-small remove-btn" onclick="${() => this.onFilterRemoved(filterElement)}"><img alt="remove-icon" src="icons/close.svg"></button><div class="layer-select-container"><label class="gg-label" i18n="Layer selection" for="${'layer-select-' + filterElement.id}">Layer selection</label> <select id="${'layer-select-' + filterElement.id}" class="gg-select text-ellipsis" onchange="${(e) => this.onLayerChanged(filterElement, e)}"><option value="" i18n="${this.layers.length === 0 ? 'No layer available' : 'Select a layer'}" ?selected="${filterElement.layer === undefined}" disabled="disabled">${this.layers.length === 0 ? 'No layer available' : 'Select a layer'}</option>${this.layers.map(layer => uHtml `<option value="${layer.id}" i18n="${this.getLayerDisplayName(layer)}" ?selected="${filterElement.layer?.id === layer.id}" ?disabled="${!this.isLayerSelectable(filterElement, layer)}">${this.getLayerDisplayName(layer)}</option>`)}</select></div><div class="${filterElement.conditions ? 'filter-condition-container' : 'hidden'}">${filterElement.conditions.map((condition) => uHtml `<div class="filter-condition"><button class="gg-icon-button gg-small remove-btn" onclick="${() => this.onConditionRemoved(filterElement, condition)}"><img alt="remove-icon" src="icons/close.svg"></button> ${condition.applied ? uHtml `<div class="filter-expression">${condition.toText()}</div>` : uHtml ` ${filterElement.isLogicalOperatorSelectorVisible(condition) ? uHtml ` <label class="gg-label" i18n="Logic" for="${'attribute-select-' + condition.id}">Logic</label> <select id="${'logic-select-' + condition.id}" class="gg-select text-ellipsis" onchange="${(e) => this.onLogicalOperatorChanged(condition, e)}">${filterElement.availableLogicalOperators.map((lop) => uHtml `<option value="${lop.operator}" i18n="${lop.displayName}" ?selected="${condition.logicalOperator === lop.operator}">${lop.displayName}</option>`)}</select> ` : ''} <label class="gg-label" i18n="Attribute" for="${'attribute-select-' + condition.id}">Attribute</label> <select id="${'attribute-select-' + condition.id}" class="gg-select text-ellipsis" onchange="${(e) => this.onAttributeChanged(filterElement, condition, e)}"><option value="" i18n="Select an attribute" ?selected="${condition.attribute === undefined}" disabled="disabled">Select an attribute</option>${filterElement.attributes.map((attr) => uHtml `<option value="${attr.name}" ?selected="${condition.attribute?.name === attr.name}">${filterElement.getAttributeDisplayName(attr)}</option>`)}</select> <label class="gg-label" i18n="Operator" for="${'operator-select-' + condition.id}">Operator</label> <select id="${'operator-select-' + condition.id}" class="gg-select text-ellipsis" disabled="${!condition.isOperatorSelectorEnabled()}" onchange="${(e) => this.onOperatorChanged(condition, e)}"><option value="" i18n="Select an operator" ?selected="${condition.operator === undefined}" disabled="disabled">Select an operator</option>${(condition.availableOperators ?? []).map((op) => uHtml `<option value="${op.operator}" i18n="${op.displayName}" ?selected="${condition.operator === op.operator}" ?disabled="${!condition.isSpatialOperatorEnabled(op.operator)}">${op.displayName}</option>`)}</select> ${condition.isValueInputVisible() ? uHtml ` <label class="gg-label" i18n="Value" for="${'value-input-' + condition.id}">Value</label><div class="value-inputs"><input id="${'value-input-' + condition.id}" type="${condition.attributeInputType}" class="gg-input" disabled="${condition.operator ? '' : 'disabled'}" value="${condition.value}" oninput="${(e) => this.onValueChanged(condition, e)}"> ${condition.isValue2InputVisible() ? uHtml ` <input type="${condition.attributeInputType}" class="gg-input" value="${condition.value2}" oninput="${(e) => this.onValue2Changed(condition, e)}"> ` : ''}</div>` : ''}<div class="${condition.isGeometryToolbarVisible() ? '' : 'hidden'}"><label class="gg-label" i18n="Draw geometry" for="${'value-input-' + condition.id}">Draw geometry</label><girafe-drawing-toolbar statelocation="${FilterConditionElement.drawingStateLocation}"></girafe-drawing-toolbar></div>${condition.isChoicesListVisible() ? uHtml ` <label class="gg-label" i18n="Possible values" for="${'choice-' + condition.id}">Possible values</label><ul id="${'choice-' + condition.id}" class="value-choices">${(condition.choices ?? []).map((choice) => uHtml `<li><input id="${'choice-' + condition.id + '-' + choice}" type="checkbox" class="gg-checkbox" value="${choice}" onchange="${(e) => this.onChoiceChanged(condition, e)}"> <label for="${'choice-' + condition.id + '-' + choice}" i18n="${choice}">${choice}</label></li>`)}</ul>` : ''} <button class="gg-button
|
|
27
|
+
<div id="content"><div class="filter-element-container">${this.layerFilterElements.map((filterElement) => uHtml `<div class="filter-element" data-id="${filterElement.id}"><div class="filter-title text-ellipsis">${filterElement.title}</div><button class="gg-icon-button gg-small remove-btn" onclick="${() => this.onFilterRemoved(filterElement)}"><img alt="remove-icon" src="icons/close.svg"></button><div class="layer-select-container"><label class="gg-label" i18n="Layer selection" for="${'layer-select-' + filterElement.id}">Layer selection</label> <select id="${'layer-select-' + filterElement.id}" class="gg-select text-ellipsis" onchange="${(e) => this.onLayerChanged(filterElement, e)}"><option value="" i18n="${this.layers.length === 0 ? 'No layer available' : 'Select a layer'}" ?selected="${filterElement.layer === undefined}" disabled="disabled">${this.layers.length === 0 ? 'No layer available' : 'Select a layer'}</option>${this.layers.map(layer => uHtml `<option value="${layer.id}" i18n="${this.getLayerDisplayName(layer)}" ?selected="${filterElement.layer?.id === layer.id}" ?disabled="${!this.isLayerSelectable(filterElement, layer)}">${this.getLayerDisplayName(layer)}</option>`)}</select></div><div class="${filterElement.conditions ? 'filter-condition-container' : 'hidden'}">${filterElement.conditions.map((condition) => uHtml `<div class="filter-condition"><button class="gg-icon-button gg-small remove-btn" onclick="${() => this.onConditionRemoved(filterElement, condition)}"><img alt="remove-icon" src="icons/close.svg"></button> ${condition.applied ? uHtml `<div class="filter-expression">${condition.toText()}</div>` : uHtml ` ${filterElement.isLogicalOperatorSelectorVisible(condition) ? uHtml ` <label class="gg-label" i18n="Logic" for="${'attribute-select-' + condition.id}">Logic</label> <select id="${'logic-select-' + condition.id}" class="gg-select text-ellipsis" onchange="${(e) => this.onLogicalOperatorChanged(condition, e)}">${filterElement.availableLogicalOperators.map((lop) => uHtml `<option value="${lop.operator}" i18n="${lop.displayName}" ?selected="${condition.logicalOperator === lop.operator}">${lop.displayName}</option>`)}</select> ` : ''} <label class="gg-label" i18n="Attribute" for="${'attribute-select-' + condition.id}">Attribute</label> <select id="${'attribute-select-' + condition.id}" class="gg-select text-ellipsis" onchange="${(e) => this.onAttributeChanged(filterElement, condition, e)}"><option value="" i18n="Select an attribute" ?selected="${condition.attribute === undefined}" disabled="disabled">Select an attribute</option>${filterElement.attributes.map((attr) => uHtml `<option value="${attr.name}" ?selected="${condition.attribute?.name === attr.name}">${filterElement.getAttributeDisplayName(attr)}</option>`)}</select> <label class="gg-label" i18n="Operator" for="${'operator-select-' + condition.id}">Operator</label> <select id="${'operator-select-' + condition.id}" class="gg-select text-ellipsis" disabled="${!condition.isOperatorSelectorEnabled()}" onchange="${(e) => this.onOperatorChanged(condition, e)}"><option value="" i18n="Select an operator" ?selected="${condition.operator === undefined}" disabled="disabled">Select an operator</option>${(condition.availableOperators ?? []).map((op) => uHtml `<option value="${op.operator}" i18n="${op.displayName}" ?selected="${condition.operator === op.operator}" ?disabled="${!condition.isSpatialOperatorEnabled(op.operator)}">${op.displayName}</option>`)}</select> ${condition.isValueInputVisible() ? uHtml ` <label class="gg-label" i18n="Value" for="${'value-input-' + condition.id}">Value</label><div class="value-inputs"><input id="${'value-input-' + condition.id}" type="${condition.attributeInputType}" class="gg-input" disabled="${condition.operator ? '' : 'disabled'}" value="${condition.value}" oninput="${(e) => this.onValueChanged(condition, e)}"> ${condition.isValue2InputVisible() ? uHtml ` <input id="${'value-input-2-' + condition.id}" aria-label="Value 2" type="${condition.attributeInputType}" class="gg-input" value="${condition.value2}" oninput="${(e) => this.onValue2Changed(condition, e)}"> ` : ''}</div>` : ''}<div class="${condition.isGeometryToolbarVisible() ? '' : 'hidden'}"><label class="gg-label" i18n="Draw geometry" for="${'value-input-' + condition.id}">Draw geometry</label><girafe-drawing-toolbar statelocation="${FilterConditionElement.drawingStateLocation}"></girafe-drawing-toolbar></div>${condition.isChoicesListVisible() ? uHtml ` <label class="gg-label" i18n="Possible values" for="${'choice-' + condition.id}">Possible values</label><ul id="${'choice-' + condition.id}" class="value-choices">${(condition.choices ?? []).map((choice) => uHtml `<li><input id="${'choice-' + condition.id + '-' + choice}" type="checkbox" class="gg-checkbox" value="${choice}" onchange="${(e) => this.onChoiceChanged(condition, e)}"> <label for="${'choice-' + condition.id + '-' + choice}" i18n="${choice}">${choice}</label></li>`)}</ul>` : ''} <button class="gg-button gg-medium btn-with-icon-and-text apply-btn" disabled="${!condition.isValid()}" onclick="${() => this.onConditionApplied(filterElement, condition)}"><img alt="apply-icon" src="icons/checked-no-border.svg"> <span i18n="Apply">Apply</span></button> `}</div>`)}</div><div class="footer-container"><button class="${filterElement.layer ? 'gg-button gg-medium btn-with-icon-and-text' : 'hidden'}" disabled="${this.hasNonAppliedFilters()}" onclick="${() => this.onConditionAdded(filterElement)}"><img alt="plus-icon" src="icons/plus.svg"> <span i18n="Add condition">Add condition</span></button><div class="layer-loading"><span class="${filterElement.layer && this.layerIsRefreshing.get(filterElement.layer.id) ? 'loader' : 'hidden'}"></span></div>${(filterElement.conditions ?? []).length ? uHtml ` <button class="${filterElement.inverted ? 'gg-button gg-medium btn-with-icon-and-text active' : 'gg-button gg-medium btn-with-icon-and-text'}" disabled="${this.hasNonAppliedFilters()}" tip="Invert filter" onclick="${() => this.onFilterInverted(filterElement)}"><img alt="invert-icon" src="icons/invert.svg"></button> <button class="gg-button gg-medium btn-with-icon-and-text export-btn" tip="Download CSV" disabled="${this.hasNonAppliedFilters() || this.loading}" onclick="${() => this.onDownloadLayerData([filterElement])}"><img alt="download-icon" src="icons/arrow-download.svg"></button> ` : ''}</div></div>`)}</div><div class="component-loading"><span class="${this.loading ? 'loader' : 'hidden'}"></span></div><div class="filter-actions"><button class="gg-button gg-medium btn-with-icon-and-text" disabled="${this.hasNonAppliedFilters() || this.loading}" onclick="${() => this.onFilterAdded()}"><img alt="plus-icon" src="icons/plus.svg"> <span i18n="Add filter">Add filter</span></button> ${(this.layerFilterElements ?? []).length && this.layerFilterElements[0].layer ? uHtml ` <button id="export-all-btn" class="gg-button gg-medium btn-with-icon-and-text" disabled="${this.hasNonAppliedFilters() || this.loading || this.state.loading}" onclick="${() => this.onDownloadLayerData()}"><img alt="download-all-icon" src="icons/arrow-download-multiple.svg"> <span i18n="Download all to CSV">Download all to CSV</span></button> ` : ''}</div></div>
|
|
27
28
|
${this.htmlUnsafe(this.feedbackTemplateHtml ?? '')}`;
|
|
28
29
|
};
|
|
29
30
|
isPanelVisible = false;
|
|
@@ -34,6 +35,7 @@ ${this.htmlUnsafe(this.feedbackTemplateHtml ?? '')}`;
|
|
|
34
35
|
layerFilterElements = [];
|
|
35
36
|
columnAliasHelper;
|
|
36
37
|
layerIsRefreshing = new Map();
|
|
38
|
+
csvDownloader;
|
|
37
39
|
constructor() {
|
|
38
40
|
super('advanced-filter');
|
|
39
41
|
}
|
|
@@ -73,7 +75,7 @@ ${this.htmlUnsafe(this.feedbackTemplateHtml ?? '')}`;
|
|
|
73
75
|
updateFilterableLayerList() {
|
|
74
76
|
this.layers = this.context.layerManager
|
|
75
77
|
.getFlattenedLayerTree(this.state.layers.layersList)
|
|
76
|
-
.filter((l) => l instanceof LayerWms && l.active && l.
|
|
78
|
+
.filter((l) => l instanceof LayerWms && l.active && l.wfsQueryable);
|
|
77
79
|
}
|
|
78
80
|
/**
|
|
79
81
|
* Updates the list of filter elements based on the current state of the layers in the layer tree.
|
|
@@ -94,7 +96,7 @@ ${this.htmlUnsafe(this.feedbackTemplateHtml ?? '')}`;
|
|
|
94
96
|
// Layer isn't in layer tree anymore
|
|
95
97
|
(filterElement.layer && !layerInTree) ||
|
|
96
98
|
// Filter in layer was removed by simple filter component
|
|
97
|
-
(filterElement.layer && layerInTree.filter === undefined && filterElement.
|
|
99
|
+
(filterElement.layer && layerInTree.filter === undefined && filterElement.hasAppliedConditions())) {
|
|
98
100
|
this.removeFilterElement(filterElement);
|
|
99
101
|
}
|
|
100
102
|
}
|
|
@@ -152,20 +154,34 @@ ${this.htmlUnsafe(this.feedbackTemplateHtml ?? '')}`;
|
|
|
152
154
|
removeFilterElement(filterElement) {
|
|
153
155
|
const idx = this.layerFilterElements.indexOf(filterElement);
|
|
154
156
|
if (idx !== -1) {
|
|
155
|
-
|
|
157
|
+
filterElement.removeConditions();
|
|
158
|
+
this.layerFilterElements.splice(idx, 1);
|
|
159
|
+
if (filterElement.layer?.filter) {
|
|
160
|
+
// Note: Changing layer.filter will trigger the subscription that re-renders the component
|
|
156
161
|
filterElement.layer.filter = undefined;
|
|
157
162
|
}
|
|
158
|
-
filterElement.delete();
|
|
159
|
-
this.layerFilterElements.splice(idx, 1);
|
|
160
163
|
}
|
|
161
164
|
}
|
|
162
165
|
async onLayerChanged(filterElement, e) {
|
|
166
|
+
if (!filterElement.conditions.length) {
|
|
167
|
+
// Display an empty condition while layer metadata is being loaded
|
|
168
|
+
filterElement.addCondition();
|
|
169
|
+
this.render();
|
|
170
|
+
}
|
|
163
171
|
const layerId = Number(e.target.value);
|
|
164
172
|
const layer = this.layers.find((l) => l.id === layerId);
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
173
|
+
if (filterElement.hasAppliedConditions()) {
|
|
174
|
+
// If the filter has already been applied to the layer, a new filter is created and the old one is deleted
|
|
175
|
+
const newFilter = new LayerFilterElement(this.context, this.columnAliasHelper, this.layerFilterElements.length);
|
|
176
|
+
this.layerFilterElements.push(newFilter);
|
|
177
|
+
newFilter?.setLayer(layer).then((_) => this.render());
|
|
178
|
+
// Remove filter from previous layer and from UI
|
|
179
|
+
this.removeFilterElement(filterElement);
|
|
180
|
+
}
|
|
181
|
+
else {
|
|
182
|
+
// Simply switch out layers
|
|
183
|
+
filterElement.setLayer(layer).then((_) => this.render());
|
|
184
|
+
}
|
|
169
185
|
}
|
|
170
186
|
onConditionRemoved(filterElement, condition) {
|
|
171
187
|
filterElement.removeCondition(condition);
|
|
@@ -222,14 +238,40 @@ ${this.htmlUnsafe(this.feedbackTemplateHtml ?? '')}`;
|
|
|
222
238
|
}
|
|
223
239
|
this.render();
|
|
224
240
|
}
|
|
241
|
+
onFilterInverted(filterElement) {
|
|
242
|
+
filterElement.toggleInverted();
|
|
243
|
+
this.applyFilter(filterElement);
|
|
244
|
+
this.render();
|
|
245
|
+
}
|
|
225
246
|
applyFilter(filterElement) {
|
|
226
247
|
if (filterElement.layer) {
|
|
227
|
-
filterElement.layer.filter = filterElement.applyFilter();
|
|
228
248
|
this.layerIsRefreshing.set(filterElement.layer.id, true);
|
|
249
|
+
// Note: Changing layer.filter will trigger the subscription that re-renders the component
|
|
250
|
+
filterElement.layer.filter = filterElement.applyFilter();
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
async onDownloadLayerData(filterElements) {
|
|
254
|
+
this.state.loading = true;
|
|
255
|
+
filterElements ??= this.layerFilterElements;
|
|
256
|
+
try {
|
|
257
|
+
for (const filterElement of filterElements) {
|
|
258
|
+
if (filterElement.hasNoneAppliedConditions()) {
|
|
259
|
+
continue;
|
|
260
|
+
}
|
|
261
|
+
await this.csvDownloader.createCsvFile(filterElement.layer);
|
|
262
|
+
if (this.csvDownloader.csvContentTruncated) {
|
|
263
|
+
// Replace the standard wfs feature-limit warning with a more meaningful
|
|
264
|
+
this.context.errorManager.pushMessage('wfs-max-features-reached', 'The CSV export has been truncated to the maximum number of features allowed for download', 'warning');
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
finally {
|
|
269
|
+
this.state.loading = false;
|
|
270
|
+
this.render();
|
|
229
271
|
}
|
|
230
272
|
}
|
|
231
273
|
hasNonAppliedFilters() {
|
|
232
|
-
return this.layerFilterElements.some((f) => f.hasNoneAppliedConditions());
|
|
274
|
+
return this.layerFilterElements.some((f) => f.hasNoneAppliedConditions() || !f.layer);
|
|
233
275
|
}
|
|
234
276
|
togglePanel(visible) {
|
|
235
277
|
this.isPanelVisible = visible;
|
|
@@ -246,6 +288,7 @@ ${this.htmlUnsafe(this.feedbackTemplateHtml ?? '')}`;
|
|
|
246
288
|
connectedCallback() {
|
|
247
289
|
super.connectedCallback();
|
|
248
290
|
this.columnAliasHelper = new ColumnAliasHelper(this.context.stateManager);
|
|
291
|
+
this.csvDownloader = new LayerCsvExporter(this.context);
|
|
249
292
|
this.updateFilterItemsByLayerState().then(() => {
|
|
250
293
|
super.render();
|
|
251
294
|
super.girafeTranslate();
|
|
@@ -63,6 +63,9 @@ class FilterConditionElement {
|
|
|
63
63
|
}
|
|
64
64
|
setOperator(operator) {
|
|
65
65
|
this.operator = this.availableOperators?.find((op) => op.operator === operator)?.operator;
|
|
66
|
+
if (!this.operator) {
|
|
67
|
+
console.warn(`Invalid operator ${operator} for attribute ${this.attribute?.name}`);
|
|
68
|
+
}
|
|
66
69
|
this.updateDrawingToolbar();
|
|
67
70
|
}
|
|
68
71
|
updateDrawingToolbar() {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import IGirafeContext from '../../tools/context/icontext.js';
|
|
2
|
+
import BaseLayer from '../../models/layers/baselayer.js';
|
|
3
|
+
declare class LayerCsvExporter {
|
|
4
|
+
private readonly context;
|
|
5
|
+
private readonly csvManager;
|
|
6
|
+
private readonly columnAliasHelper;
|
|
7
|
+
private readonly wktFormat;
|
|
8
|
+
private readonly WKT_DECIMALS;
|
|
9
|
+
csvContentTruncated: boolean;
|
|
10
|
+
constructor(context: IGirafeContext);
|
|
11
|
+
createCsvFile(layer?: BaseLayer): Promise<void>;
|
|
12
|
+
private requestFeatures;
|
|
13
|
+
private featuresToColumnData;
|
|
14
|
+
}
|
|
15
|
+
export default LayerCsvExporter;
|