@geogirafe/lib-geoportal 1.1.0-dev.2594292854 → 1.1.0-dev.2596776001
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/assets/i18n/de.json +9 -6
- package/assets/i18n/en.json +3 -0
- package/assets/i18n/fr.json +3 -0
- package/assets/i18n/it.json +3 -0
- package/components/map/component.d.ts +5 -0
- package/components/map/component.js +24 -3
- package/components/selectiongrid/tools/selectiontabulatormanager.js +1 -0
- package/components/userpreferences/component.js +6 -0
- package/package.json +1 -1
- package/templates/api.html +3 -1
- package/templates/public/about.json +1 -1
- package/templates/vite.config.js +2 -10
- package/tools/configuration/girafeconfig.d.ts +5 -0
- package/tools/configuration/girafeconfig.js +8 -1
- package/tools/main.d.ts +1 -0
- package/tools/state/objectselection.d.ts +1 -0
- package/tools/state/objectselection.js +1 -0
package/assets/i18n/de.json
CHANGED
|
@@ -243,6 +243,8 @@
|
|
|
243
243
|
"help-themes": "Entdecken Sie die verfügbaren Themen. Nach der Auswahl werden die zugehörigen Karten automatisch geladen.",
|
|
244
244
|
"help-user-preferences": "Verwalten Sie Ihre Benutzereinstellungen, einschließlich Sprache, Anzeigemodus und Kartenoptionen.",
|
|
245
245
|
"Hide Swiper": "Swiper ausblenden",
|
|
246
|
+
"highlight-all": "Alles markieren",
|
|
247
|
+
"highlight-per-layer": "Markierung pro Layer",
|
|
246
248
|
"info": "Information",
|
|
247
249
|
"Information without public faith": "Informationen ohne öffentliche Glaubwürdigkeit",
|
|
248
250
|
"Intensity": "Intensität",
|
|
@@ -450,14 +452,15 @@
|
|
|
450
452
|
"Select none": "Nichts auswählen",
|
|
451
453
|
"Select operator...": "Operator auswählen...",
|
|
452
454
|
"Select to change appearance": "Auswählen, um das Aussehen zu ändern",
|
|
453
|
-
"selectFillColor": "
|
|
454
|
-
"selectHighlightFillColor": "
|
|
455
|
-
"
|
|
455
|
+
"selectFillColor": "Abfrage Füllfarbe",
|
|
456
|
+
"selectHighlightFillColor": "Abfrageauswahl Füllfarbe",
|
|
457
|
+
"selectHighlightMode": "Abfragemarkierung in der Karte",
|
|
458
|
+
"selectHighlightStrokeColor": "Abfrageauswahl Strichfarbe",
|
|
456
459
|
"Selection": "Auswahl",
|
|
457
460
|
"selection-mode": "Selektionsmodus",
|
|
458
|
-
"selection-tool-panel": "
|
|
459
|
-
"selectionComponent": "Komponente für
|
|
460
|
-
"selectStrokeColor": "
|
|
461
|
+
"selection-tool-panel": "Abfragetool",
|
|
462
|
+
"selectionComponent": "Komponente für Abfrageresultate",
|
|
463
|
+
"selectStrokeColor": "Abfrage Strichfarbe",
|
|
461
464
|
"Send": "Senden",
|
|
462
465
|
"Send message": "Nachricht senden",
|
|
463
466
|
"Settings": "Einstellungen",
|
package/assets/i18n/en.json
CHANGED
|
@@ -454,6 +454,9 @@
|
|
|
454
454
|
"Select to change appearance": "Select to change appearance",
|
|
455
455
|
"selectFillColor": "Selection fill color",
|
|
456
456
|
"selectHighlightFillColor": "Selection highlight fill color",
|
|
457
|
+
"selectHighlightMode": "Selection highlight mode",
|
|
458
|
+
"highlight-all": "Highlight all",
|
|
459
|
+
"highlight-per-layer": "Highlight per layer",
|
|
457
460
|
"selectHighlightStrokeColor": "Selection highlight stroke color",
|
|
458
461
|
"Selection": "Selection",
|
|
459
462
|
"selection-mode": "Selection Mode",
|
package/assets/i18n/fr.json
CHANGED
|
@@ -243,6 +243,8 @@
|
|
|
243
243
|
"help-themes": "Explorez les thèmes disponibles. Une fois un thème sélectionné, les cartes associées s'affichent automatiquement.",
|
|
244
244
|
"help-user-preferences": "Gérez vos préférences, notamment la langue, le mode d'affichage et les options de la carte.",
|
|
245
245
|
"Hide Swiper": "Masquer le swiper",
|
|
246
|
+
"highlight-all": "Tout mettre en surbrillance",
|
|
247
|
+
"highlight-per-layer": "Surbrillance par couche",
|
|
246
248
|
"info": "Information",
|
|
247
249
|
"Information without public faith": "Informations dépourvues de foi publique",
|
|
248
250
|
"Intensity": "Intensité",
|
|
@@ -452,6 +454,7 @@
|
|
|
452
454
|
"Select to change appearance": "Sélectionner pour changer l'apparence",
|
|
453
455
|
"selectFillColor": "Couleur de remplissage des sélections",
|
|
454
456
|
"selectHighlightFillColor": "Couleur de remplissage de surbrillance",
|
|
457
|
+
"selectHighlightMode": "Mode de surbrillance de la sélection",
|
|
455
458
|
"selectHighlightStrokeColor": "Couleur du trait de surbrillance",
|
|
456
459
|
"Selection": "Sélection",
|
|
457
460
|
"selection-mode": "Mode de Sélection",
|
package/assets/i18n/it.json
CHANGED
|
@@ -243,6 +243,8 @@
|
|
|
243
243
|
"help-themes": "Scopri i temi disponibili. Selezionando un tema, le mappe correlate vengono caricate automaticamente.",
|
|
244
244
|
"help-user-preferences": "Gestisci le preferenze utente, inclusa la lingua, la modalità di visualizzazione e le opzioni mappa.",
|
|
245
245
|
"Hide Swiper": "Nascondi Swiper",
|
|
246
|
+
"highlight-all": "Evidenzia tutto",
|
|
247
|
+
"highlight-per-layer": "Evidenzia per livello",
|
|
246
248
|
"info": "Informazione",
|
|
247
249
|
"Information without public faith": "Informazioni prive di fede pubblica",
|
|
248
250
|
"Intensity": "Intensità",
|
|
@@ -452,6 +454,7 @@
|
|
|
452
454
|
"Select to change appearance": "Seleziona per cambiare aspetto",
|
|
453
455
|
"selectFillColor": "Colore di riempimento per le selezioni",
|
|
454
456
|
"selectHighlightFillColor": "Colore di riempimento dell'evidenziazione",
|
|
457
|
+
"selectHighlightMode": "Modalità evidenziazione selezione",
|
|
455
458
|
"selectHighlightStrokeColor": "Colore del tratto di evidenziazione della selezione",
|
|
456
459
|
"Selection": "Selezione",
|
|
457
460
|
"selection-mode": "Modalità di Selezione",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Collection, Feature, Map, MapBrowserEvent, MapEvent } from 'ol';
|
|
2
|
+
import { Style } from 'ol/style.js';
|
|
2
3
|
import { ProjectionLike } from 'ol/proj.js';
|
|
3
4
|
import VectorSource from 'ol/source/Vector.js';
|
|
4
5
|
import VectorLayer from 'ol/layer/Vector.js';
|
|
@@ -23,6 +24,7 @@ import XyzManager from './tools/xyzmanager.js';
|
|
|
23
24
|
import SelectionParam from '../../models/selectionparam.js';
|
|
24
25
|
import { CameraConfig } from '../../tools/state/globe.js';
|
|
25
26
|
import { Callback } from '../../tools/state/statemanager.js';
|
|
27
|
+
import { StyleFunction } from 'ol/style/Style.js';
|
|
26
28
|
declare global {
|
|
27
29
|
interface Window {
|
|
28
30
|
Cesium: unknown;
|
|
@@ -69,6 +71,8 @@ export default class MapComponent extends GirafeHTMLElement {
|
|
|
69
71
|
selectedFeaturesCollection: Collection<Feature<Geometry>>;
|
|
70
72
|
highlightedFeaturesCollection: Collection<Feature<Geometry>>;
|
|
71
73
|
selectionLayer: VectorLayer<VectorSource>;
|
|
74
|
+
selectionLayerStyle: Style;
|
|
75
|
+
selectionLayerStyleFunc: StyleFunction;
|
|
72
76
|
highlightLayer: VectorLayer<VectorSource>;
|
|
73
77
|
pixelTolerance: number;
|
|
74
78
|
dragbox: DragBox;
|
|
@@ -163,4 +167,5 @@ export default class MapComponent extends GirafeHTMLElement {
|
|
|
163
167
|
private clearAllMarkers;
|
|
164
168
|
private addMarker;
|
|
165
169
|
private showCrosshair;
|
|
170
|
+
private onFeaturesTypeChanged;
|
|
166
171
|
}
|
|
@@ -43,6 +43,7 @@ import WfsFilterCondition from '../../tools/wfs/wfsfiltercondition.js';
|
|
|
43
43
|
import { applyFeaturesToSelection, applyOpacityToLayers } from '../../tools/utils/utils.js';
|
|
44
44
|
import { SelectionMode } from '../../models/selection.js';
|
|
45
45
|
import { platformModifierKeyOnly } from 'ol/events/condition.js';
|
|
46
|
+
import { HighlightMode } from '../../tools/configuration/girafeconfig.js';
|
|
46
47
|
export default class MapComponent extends GirafeHTMLElement {
|
|
47
48
|
templateUrl = null;
|
|
48
49
|
styleUrls = null;
|
|
@@ -101,6 +102,20 @@ export default class MapComponent extends GirafeHTMLElement {
|
|
|
101
102
|
selectedFeaturesCollection = new Collection();
|
|
102
103
|
highlightedFeaturesCollection = new Collection();
|
|
103
104
|
selectionLayer;
|
|
105
|
+
selectionLayerStyle;
|
|
106
|
+
selectionLayerStyleFunc = (feature) => {
|
|
107
|
+
const shouldApplyCheck = this.config.selection.defaultHighlightMode === HighlightMode.HighlightPerLayer &&
|
|
108
|
+
this.config.interface.defaultSelectionComponent === 'grid';
|
|
109
|
+
if (shouldApplyCheck) {
|
|
110
|
+
const selectedFeaturesType = this.state.selection.selectedFeaturesType;
|
|
111
|
+
if (selectedFeaturesType && feature.getId().startsWith(selectedFeaturesType)) {
|
|
112
|
+
return this.selectionLayerStyle;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
return this.selectionLayerStyle;
|
|
117
|
+
}
|
|
118
|
+
};
|
|
104
119
|
highlightLayer;
|
|
105
120
|
pixelTolerance = 10;
|
|
106
121
|
dragbox;
|
|
@@ -134,6 +149,7 @@ export default class MapComponent extends GirafeHTMLElement {
|
|
|
134
149
|
this.subscribe('interface.darkMapMode', () => this.onChangeDarkMode());
|
|
135
150
|
this.subscribe('selection.selectionParameters', (_, newParams) => this.onSelectFeatures(newParams));
|
|
136
151
|
this.subscribe('selection.selectedFeatures', (_oldFeatures, newFeatures) => this.onFeaturesSelected(newFeatures));
|
|
152
|
+
this.subscribe('selection.selectedFeaturesType', (_oldFeaturesType, newFeaturesType) => this.onFeaturesTypeChanged(newFeaturesType));
|
|
137
153
|
this.subscribe('selection.highlightedFeatures', (_oldFeatures, newFeatures) => this.onFeatureHighlighted(newFeatures));
|
|
138
154
|
this.subscribe('selection.focusedFeatures', (_oldFeature, newFeature) => this.focusFeature.setFocusedFeatures(newFeature));
|
|
139
155
|
this.subscribe('position.markers', () => {
|
|
@@ -284,7 +300,8 @@ export default class MapComponent extends GirafeHTMLElement {
|
|
|
284
300
|
properties: {
|
|
285
301
|
addToPrintedLayers: true
|
|
286
302
|
},
|
|
287
|
-
source: selectionSource
|
|
303
|
+
source: selectionSource,
|
|
304
|
+
style: this.selectionLayerStyleFunc
|
|
288
305
|
});
|
|
289
306
|
this.highlightLayer = new VectorLayer({
|
|
290
307
|
source: highlightSource
|
|
@@ -531,7 +548,7 @@ export default class MapComponent extends GirafeHTMLElement {
|
|
|
531
548
|
this.closeSwiperButton.style.left = `${offset}px`;
|
|
532
549
|
}
|
|
533
550
|
setSelectLayerStyle() {
|
|
534
|
-
this.
|
|
551
|
+
this.selectionLayerStyle = new Style({
|
|
535
552
|
stroke: new Stroke({
|
|
536
553
|
color: this.config.selection.defaultStrokeColor,
|
|
537
554
|
width: this.config.selection.defaultStrokeWidth
|
|
@@ -545,7 +562,7 @@ export default class MapComponent extends GirafeHTMLElement {
|
|
|
545
562
|
width: this.config.selection.defaultStrokeWidth
|
|
546
563
|
})
|
|
547
564
|
})
|
|
548
|
-
})
|
|
565
|
+
});
|
|
549
566
|
}
|
|
550
567
|
setHighlightLayerStyle() {
|
|
551
568
|
this.highlightLayer.setStyle(new Style({
|
|
@@ -1091,4 +1108,8 @@ export default class MapComponent extends GirafeHTMLElement {
|
|
|
1091
1108
|
this.setCrosshairStyle();
|
|
1092
1109
|
this.olMap.addLayer(this.crosshairLayer);
|
|
1093
1110
|
}
|
|
1111
|
+
onFeaturesTypeChanged(_newFeaturesType) {
|
|
1112
|
+
console.log('Features type changed: ' + _newFeaturesType);
|
|
1113
|
+
this.selectionLayer.changed();
|
|
1114
|
+
}
|
|
1094
1115
|
}
|
|
@@ -54,6 +54,7 @@ export default class SelectionTabulatorManager {
|
|
|
54
54
|
return;
|
|
55
55
|
}
|
|
56
56
|
visibleTabHeader.active = true;
|
|
57
|
+
this.context.stateManager.state.selection.selectedFeaturesType = id;
|
|
57
58
|
}
|
|
58
59
|
/**
|
|
59
60
|
* Creates (replace) the Tabulator grid based on the provided tab id and related data and features.
|
|
@@ -6,6 +6,7 @@ import { PreferenceGroups, UserPreference } from './userPreference.js';
|
|
|
6
6
|
import { getPropertyByPath, setPropertyByPath } from '../../tools/utils/pathUtils.js';
|
|
7
7
|
import GirafeColorPicker from '../../tools/utils/girafecolorpicker.js';
|
|
8
8
|
import { applyOpacityToLayers, systemIsInDarkMode } from '../../tools/utils/utils.js';
|
|
9
|
+
import { HighlightMode } from '../../tools/configuration/girafeconfig.js';
|
|
9
10
|
/**
|
|
10
11
|
Lets the user override default configuration values and saves them as user data.
|
|
11
12
|
*/
|
|
@@ -53,6 +54,7 @@ export default class UserPreferencesComponent extends GirafeHTMLElement {
|
|
|
53
54
|
darkFrontendMode: new UserPreference('interface.darkFrontendMode', 'interface.darkFrontendMode', 'visual', 'select'),
|
|
54
55
|
darkMapMode: new UserPreference('interface.darkMapMode', 'interface.darkMapMode', 'visual', 'checkbox'),
|
|
55
56
|
selectionComponent: new UserPreference('interface.defaultSelectionComponent', 'interface.selectionComponent', 'visual', 'select'),
|
|
57
|
+
selectHighlightMode: new UserPreference('selection.defaultHighlightMode', null, 'visual', 'select'),
|
|
56
58
|
selectFillColor: new UserPreference('selection.defaultFillColor', null, 'visual', 'color'),
|
|
57
59
|
selectStrokeColor: new UserPreference('selection.defaultStrokeColor', null, 'visual', 'color'),
|
|
58
60
|
selectHighlightFillColor: new UserPreference('selection.highlightFillColor', null, 'visual', 'color'),
|
|
@@ -143,6 +145,10 @@ export default class UserPreferencesComponent extends GirafeHTMLElement {
|
|
|
143
145
|
{ label: 'dark', value: true },
|
|
144
146
|
{ label: 'light', value: false }
|
|
145
147
|
];
|
|
148
|
+
this.preferences.selectHighlightMode.options = [
|
|
149
|
+
{ label: 'highlight-all', value: HighlightMode.HighlightAll },
|
|
150
|
+
{ label: 'highlight-per-layer', value: HighlightMode.HighlightPerLayer }
|
|
151
|
+
];
|
|
146
152
|
}
|
|
147
153
|
/**
|
|
148
154
|
* Collect all possible options for the default theme preference. This has to be repeatable, since the user
|
package/package.json
CHANGED
package/templates/api.html
CHANGED
|
@@ -372,7 +372,9 @@
|
|
|
372
372
|
<p class="descr">
|
|
373
373
|
Add a layer to the map. The layer name must be defined in the themes.json file. The layer options follow the
|
|
374
374
|
format defined in the
|
|
375
|
-
<a
|
|
375
|
+
<a
|
|
376
|
+
target="_blank"
|
|
377
|
+
href="https://doc.geogirafe.org/docs/functionalities and concepts/permalink#layers-configuration"
|
|
376
378
|
>documentation</a
|
|
377
379
|
>.
|
|
378
380
|
</p>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"1.1.0-dev.
|
|
1
|
+
{"version":"1.1.0-dev.2596776001", "build":"2596776001", "date":"12/06/2026"}
|
package/templates/vite.config.js
CHANGED
|
@@ -58,15 +58,7 @@ export default defineConfig(({ command, mode }) => {
|
|
|
58
58
|
key: readFileSync(`${certsDirectory}/app.localhost.key.pem`),
|
|
59
59
|
cert: readFileSync(`${certsDirectory}/app.localhost.cert.pem`)
|
|
60
60
|
}
|
|
61
|
-
: false
|
|
62
|
-
// To be able to see Images locally and resolve clickable Links correctly
|
|
63
|
-
proxy: {
|
|
64
|
-
'^/file_proxy/.*': {
|
|
65
|
-
target: "https://map.geo.bs.ch/file_proxy/",
|
|
66
|
-
changeOrigin: true,
|
|
67
|
-
rewrite: (path) => path.replace(/^\/file_proxy/, '')
|
|
68
|
-
}
|
|
69
|
-
}
|
|
61
|
+
: false
|
|
70
62
|
},
|
|
71
63
|
build: {
|
|
72
64
|
outDir: 'dist/app',
|
|
@@ -135,7 +127,7 @@ export default defineConfig(({ command, mode }) => {
|
|
|
135
127
|
{ src: 'node_modules/ol/ol.css', dest: 'lib/ol/' },
|
|
136
128
|
{ src: 'node_modules/tabulator-tables/dist/css/tabulator.min.css', dest: 'lib/tabulator-tables/' },
|
|
137
129
|
{ src: 'node_modules/tippy.js/dist/*.css', dest: 'lib/tippy.js/' },
|
|
138
|
-
{ src: 'node_modules/vanilla-picker/dist/*.css', dest: 'lib/vanilla-picker/' }
|
|
130
|
+
{ src: 'node_modules/vanilla-picker/dist/*.css', dest: 'lib/vanilla-picker/' }
|
|
139
131
|
]
|
|
140
132
|
}),
|
|
141
133
|
InlineTemplatesPlugin(),
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
export declare enum HighlightMode {
|
|
2
|
+
HighlightAll = "highlight-all",
|
|
3
|
+
HighlightPerLayer = "highlight-per-layer"
|
|
4
|
+
}
|
|
1
5
|
import { Config as SanitizeConfig } from 'dompurify';
|
|
2
6
|
declare class GirafeConfig {
|
|
3
7
|
general: {
|
|
@@ -73,6 +77,7 @@ declare class GirafeConfig {
|
|
|
73
77
|
defaultStrokeWidth: number;
|
|
74
78
|
highlightFillColor: string;
|
|
75
79
|
highlightStrokeColor: string;
|
|
80
|
+
defaultHighlightMode: HighlightMode;
|
|
76
81
|
};
|
|
77
82
|
drawing: {
|
|
78
83
|
defaultFillColor: string;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
export var HighlightMode;
|
|
3
|
+
(function (HighlightMode) {
|
|
4
|
+
HighlightMode["HighlightAll"] = "highlight-all";
|
|
5
|
+
HighlightMode["HighlightPerLayer"] = "highlight-per-layer";
|
|
6
|
+
})(HighlightMode || (HighlightMode = {}));
|
|
1
7
|
import { defaultNewsSanitizeConfig, defaultPermalinkSanitizeConfig, defaultQuerySanitizeConfig } from './sanitizeconfig.defaults';
|
|
2
8
|
class GirafeConfig {
|
|
3
9
|
general;
|
|
@@ -190,7 +196,8 @@ class GirafeConfig {
|
|
|
190
196
|
defaultStrokeColor: config.selection?.defaultStrokeColor ?? '#ff3333',
|
|
191
197
|
defaultStrokeWidth: config.selection?.defaultStrokeWidth ?? 4,
|
|
192
198
|
highlightFillColor: config.selection?.highlightFillColor ?? '#00ff227f',
|
|
193
|
-
highlightStrokeColor: config.selection?.highlightStrokeColor ?? '#00ff22'
|
|
199
|
+
highlightStrokeColor: config.selection?.highlightStrokeColor ?? '#00ff22',
|
|
200
|
+
defaultHighlightMode: config.selection?.defaultHighlightMode ?? HighlightMode.HighlightAll
|
|
194
201
|
};
|
|
195
202
|
}
|
|
196
203
|
initConfigPrint(config) {
|
package/tools/main.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export { default as GMFManager } from './auth/gmfmanager.js';
|
|
|
9
9
|
export { default as OpenIdConnectManager } from './auth/openidconnectmanager.js';
|
|
10
10
|
export { default as PluginManager } from './auth/pluginmanager.js';
|
|
11
11
|
export { default as ConfigManager } from './configuration/configmanager.js';
|
|
12
|
+
export type { HighlightMode } from './configuration/girafeconfig.js';
|
|
12
13
|
export { default as GirafeConfig } from './configuration/girafeconfig.js';
|
|
13
14
|
export { defaultNewsSanitizeConfig, defaultPermalinkSanitizeConfig, defaultQuerySanitizeConfig } from './configuration/sanitizeconfig.defaults';
|
|
14
15
|
export { default as GirafeContext } from './context/context.js';
|
|
@@ -8,6 +8,7 @@ export default class ObjectSelection {
|
|
|
8
8
|
initialSelectionQuery?: InitialSelectionQuery;
|
|
9
9
|
selectionParameters: SelectionParam[];
|
|
10
10
|
selectedFeatures: Feature[];
|
|
11
|
+
selectedFeaturesType?: string;
|
|
11
12
|
focusedFeatures: Feature[] | null;
|
|
12
13
|
highlightedFeatures: Feature[];
|
|
13
14
|
gridSelected: boolean;
|