@geogirafe/lib-geoportal 1.1.0-dev.2595141271 → 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.
@@ -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": "Auswahl Füllfarbe",
454
- "selectHighlightFillColor": "Auswahl Highlight Füllfarbe",
455
- "selectHighlightStrokeColor": "Auswahl Highlight Strichfarbe",
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": "Selektions-Tool",
459
- "selectionComponent": "Komponente für Kartenauswahl",
460
- "selectStrokeColor": "Auswahl Strichfarbe",
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",
@@ -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",
@@ -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",
@@ -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.selectionLayer.setStyle(new Style({
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
@@ -5,7 +5,7 @@
5
5
  "name": "GeoGirafe PSC",
6
6
  "url": "https://doc.geomapfish.dev"
7
7
  },
8
- "version": "1.1.0-dev.2595141271",
8
+ "version": "1.1.0-dev.2596776001",
9
9
  "type": "module",
10
10
  "engines": {
11
11
  "node": ">=20.19.0"
@@ -1 +1 @@
1
- {"version":"1.1.0-dev.2595141271", "build":"2595141271", "date":"11/06/2026"}
1
+ {"version":"1.1.0-dev.2596776001", "build":"2596776001", "date":"12/06/2026"}
@@ -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;
@@ -4,6 +4,7 @@ export default class ObjectSelection {
4
4
  initialSelectionQuery;
5
5
  selectionParameters = [];
6
6
  selectedFeatures = [];
7
+ selectedFeaturesType;
7
8
  focusedFeatures = null;
8
9
  highlightedFeatures = [];
9
10
  gridSelected = false;