@geogirafe/lib-geoportal 1.2.0-dev.2857926790 → 1.2.0-dev.2870319621

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/CONTRIBUTING.md CHANGED
@@ -92,18 +92,19 @@ A big thank to all the contributors of GeoGirafe, in alphabetical order:
92
92
  - Anne Philipp @svamaa (Geoinformation Basel-Stadt)
93
93
  - Arnaud Poncet-Montanges @ponceta (SIGIP)
94
94
  - Barbara Bombelli @barbara.bombelli (Geoinformation Ticino)
95
- - Ben Koch @beeekey (OpenGIS)
95
+ - Ben Koch @beeekey (OPENGIS.ch)
96
96
  - Benjamin Gerber @ger-benjamin (Camptocamp SA)
97
- - Clemens Rudert @crud3_rt (OpenGIS)
97
+ - Clemens Rudert @crud3_rt (OPENGIS.ch)
98
98
  - Corentin Junod @D0lpic (SITN Neuchâtel)
99
99
  - Daniel Gnerre @gnerred (Cartoriviera)
100
100
  - Daniel Kastner @danielkastner (Karakun)
101
- - Didier Dupertuis @dddpt (OpenGIS)
101
+ - Didier Dupertuis @dddpt (OPENGIS.ch)
102
102
  - Dietmar Schneider @sdietmar (Techplus Tirol)
103
103
  - Guillaume Remy @remyguillaume (Geoinformation Basel-Stadt)
104
104
  - Jonathan Lurie @jonathanlurie (Camptocamp SA)
105
105
  - Karsten Deininger @kdeininger (Geoinformation Basel-Landschaft)
106
106
  - Laurent Lienher @llienher (JaquierPointet SA)
107
+ - Livio Bätscher @LivioBae (Geoinformation Basel-Stadt)
107
108
  - Loris Hubler @lhubler (Geoinformation Basel-Stadt)
108
109
  - Lucie Nicolier @lucienicolier (JaquierPointet SA)
109
110
  - Matthew Parkan @matthew.parkan (SITN Neuchâtel)
@@ -111,7 +112,7 @@ A big thank to all the contributors of GeoGirafe, in alphabetical order:
111
112
  - Moritz Kirmse @mki-c2c (Camptocamp SA)
112
113
  - Nicolas Blanc @nicolas-sitylb (SIT Yverdon-les-bains)
113
114
  - Olivier Monod @monodo (SIT Yverdon-les-bains)
114
- - Patricia Moll @piMoll (OpenGIS)
115
+ - Patricia Moll @piMoll (OPENGIS.ch)
115
116
  - Pauline Fanguin @pfanguin (Cartolacote)
116
117
  - Philipp Franke @philippfra (Geoinformation Basel-Landschaft)
117
118
  - Rémi Bovard @rbovard (Cartoriviera)
@@ -1,5 +1,6 @@
1
1
  import GirafeHTMLElement from '../../base/GirafeHTMLElement.js';
2
2
  import IGirafePanel from '../../tools/state/igirafepanel.js';
3
+ import { IUrlShortener } from '../../tools/share/iurlshortener.js';
3
4
  declare class ContactComponent extends GirafeHTMLElement implements IGirafePanel {
4
5
  protected templateUrl: string | null;
5
6
  protected styleUrls: string[] | null;
@@ -10,6 +11,7 @@ declare class ContactComponent extends GirafeHTMLElement implements IGirafePanel
10
11
  shortUrl: string;
11
12
  constructor();
12
13
  togglePanel(visible: boolean): void;
14
+ get urlShortener(): IUrlShortener | undefined;
13
15
  private getCurrentStateUrl;
14
16
  sendMessage(): Promise<void>;
15
17
  render(): void;
@@ -23,15 +23,28 @@ ${this.htmlUnsafe(this.feedbackTemplateHtml ?? '')}`;
23
23
  }
24
24
  togglePanel(visible) {
25
25
  this.isPanelVisible = visible;
26
+ this.render();
26
27
  if (visible) {
27
- this.shortUrl = this.getCurrentStateUrl();
28
+ this.getCurrentStateUrl().then((url) => {
29
+ this.shortUrl = url;
30
+ this.refreshRender();
31
+ });
28
32
  }
29
- this.render();
30
33
  }
31
- getCurrentStateUrl() {
34
+ get urlShortener() {
35
+ return this.context.shareManager.UrlShortener;
36
+ }
37
+ async getCurrentStateUrl() {
32
38
  const baseUrl = this.context.urlManager.getBaseUrlPath();
33
39
  const hash = this.context.shareManager.getStateToShare();
34
- return `${baseUrl}#${hash}`;
40
+ const longurl = `${baseUrl}#${hash}`;
41
+ // Fallback if shortner is unavailable
42
+ if (!this.urlShortener) {
43
+ return longurl;
44
+ }
45
+ // Get short URL
46
+ const response = await this.urlShortener.shortenUrl(longurl);
47
+ return response.shorturl;
35
48
  }
36
49
  async sendMessage() {
37
50
  const email = this.shadow.getElementById('email').value;
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "name": "GeoGirafe PSC",
6
6
  "url": "https://doc.geogirafe.org"
7
7
  },
8
- "version": "1.2.0-dev.2857926790",
8
+ "version": "1.2.0-dev.2870319621",
9
9
  "type": "module",
10
10
  "engines": {
11
11
  "node": ">=20.19.0"
@@ -1 +1 @@
1
- {"version":"1.2.0-dev.2857926790", "build":"2857926790", "date":"17/09/2026"}
1
+ {"version":"1.2.0-dev.2870319621", "build":"2870319621", "date":"22/09/2026"}