allaw-ui 4.8.5 → 4.8.6

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.
@@ -130,12 +130,20 @@ var SearchBar = function (_a) {
130
130
  console.error("Geolocation error:", err);
131
131
  if (err.code === 1) {
132
132
  console.error("Permission denied - user must allow location access");
133
+ // Proposer de réessayer
134
+ if (confirm("L'accès à la localisation a été refusé. Voulez-vous réessayer ?")) {
135
+ setTimeout(function () { return handleLocate(); }, 1000);
136
+ }
133
137
  }
134
138
  else if (err.code === 2) {
135
139
  console.error("Position unavailable");
136
140
  }
137
141
  else if (err.code === 3) {
138
142
  console.error("Timeout");
143
+ // Réessayer en cas de timeout
144
+ if (confirm("La localisation a pris trop de temps. Voulez-vous réessayer ?")) {
145
+ setTimeout(function () { return handleLocate(); }, 1000);
146
+ }
139
147
  }
140
148
  }, { enableHighAccuracy: true, timeout: 10000, maximumAge: 0 });
141
149
  };
@@ -159,6 +167,10 @@ var SearchBar = function (_a) {
159
167
  React.createElement("i", { className: "allaw-icon-x-small" }))),
160
168
  endIcon && (React.createElement("button", { className: styles.searchBarIconButton, tabIndex: -1, "aria-label": "Rechercher" },
161
169
  React.createElement("i", { className: endIcon }))),
162
- showLocate && (React.createElement("button", { type: "button", className: styles.searchBarLocateButton, onClick: handleLocate, "aria-label": "Me localiser", title: "Me localiser" }, "Me localiser"))));
170
+ showLocate && (React.createElement("button", { type: "button", className: styles.searchBarLocateButton, onClick: function (e) {
171
+ e.preventDefault();
172
+ e.stopPropagation();
173
+ handleLocate();
174
+ }, "aria-label": "Me localiser", title: "Me localiser" }, "Me localiser"))));
163
175
  };
164
176
  export default SearchBar;
@@ -102,7 +102,7 @@
102
102
  }
103
103
 
104
104
  .searchBarLocateButton:hover {
105
- filter: brightness(0.9);
105
+ background: #1ea8d4;
106
106
  }
107
107
 
108
108
  .sizeBig .searchBarLocateButton {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allaw-ui",
3
- "version": "4.8.5",
3
+ "version": "4.8.6",
4
4
  "description": "Composants UI pour l'application Allaw",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",