@quantaroute/checkout 1.3.1 → 1.3.2

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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @quantaroute/checkout v1.3.1
2
+ * @quantaroute/checkout v1.3.2
3
3
  * (c) 2026 QuantaRoute – https://quantaroute.com
4
4
  * Released under the MIT License.
5
5
  *
@@ -404,7 +404,7 @@ const MapPinSelector = ({
404
404
  flyToCoord(la, lo);
405
405
  setSuggestions([]);
406
406
  setDropdownOpen(false);
407
- setSearchQuery("");
407
+ setSearchQuery(trimmed.toUpperCase());
408
408
  } catch {
409
409
  setSearchError("Invalid DigiPin code");
410
410
  }
@@ -1,7 +1,7 @@
1
1
  !function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("react/jsx-runtime"),require("react"),require("maplibre-gl")):"function"==typeof define&&define.amd?define(["exports","react/jsx-runtime","react","maplibre-gl"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).QuantaRouteCheckout={},e.ReactJSXRuntime,e.React,e.maplibregl)}(this,function(e,r,a,n){"use strict"
2
2
 
3
3
  ;/*!
4
- * @quantaroute/checkout v1.3.1
4
+ * @quantaroute/checkout v1.3.2
5
5
  * (c) 2026 QuantaRoute – https://quantaroute.com
6
6
  * Released under the MIT License.
7
7
  *
@@ -67,7 +67,7 @@ M(r),R(null),U.current&&clearTimeout(U.current)
67
67
  const a=r.trim()
68
68
  if(!a)return D([]),j(!1),void $(!1)
69
69
  if(p(a))try{const e=l(a.toUpperCase()),r=parseFloat(e.latitude),n=parseFloat(e.longitude)
70
- Z(r,n),D([]),j(!1),M("")}catch{R("Invalid DigiPin code")}else{if(a.length<3)return D([]),void j(!1)
70
+ Z(r,n),D([]),j(!1),M(a.toUpperCase())}catch{R("Invalid DigiPin code")}else{if(a.length<3)return D([]),void j(!1)
71
71
  $(!0),U.current=setTimeout(async()=>{try{const e=u??"",r=await m(a,e,h,5,w,x)
72
72
  D(r),j(r.length>0)}catch(e){R(e instanceof Error?e.message:"Search failed"),D([]),j(!1)}finally{$(!1)}},400)}},[u,h,Z]),Q=a.useCallback(e=>{var r
73
73
  Z(e.coordinates.latitude,e.coordinates.longitude),M(""),D([]),j(!1),null==(r=O.current)||r.blur()},[Z]),V=a.useCallback(e=>{"Escape"===e.key&&(D([]),j(!1),M(""))},[])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quantaroute/checkout",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "Embeddable DigiPin-powered smart address checkout widget — React (web), React Native & Expo (iOS/Android)",
5
5
  "main": "./dist/lib/quantaroute-checkout.umd.js",
6
6
  "module": "./dist/lib/quantaroute-checkout.es.js",
@@ -128,12 +128,13 @@ const MapPinSelector: React.FC<MapPinSelectorProps> = ({
128
128
  }
129
129
 
130
130
  // DigiPin — offline, instant
131
+ // Keep the text visible in the input; just close the keyboard and dropdown.
131
132
  if (looksLikeDigiPin(trimmed)) {
132
133
  try {
133
134
  const coords = getLatLngFromDigiPin(trimmed.toUpperCase());
134
135
  flyToCoord(parseFloat(coords.latitude), parseFloat(coords.longitude));
135
136
  setSuggestions([]);
136
- setSearchQuery('');
137
+ setSearchQuery(trimmed.toUpperCase());
137
138
  Keyboard.dismiss();
138
139
  } catch {
139
140
  setSearchError('Invalid DigiPin code');
@@ -171,6 +171,7 @@ const MapPinSelector: React.FC<MapPinSelectorProps> = ({
171
171
  }
172
172
 
173
173
  // DigiPin input — resolve 100% offline, instant, zero API cost
174
+ // Keep the text in the input so the user can see what resolved.
174
175
  if (looksLikeDigiPin(trimmed)) {
175
176
  try {
176
177
  const coords = getLatLngFromDigiPin(trimmed.toUpperCase());
@@ -179,7 +180,8 @@ const MapPinSelector: React.FC<MapPinSelectorProps> = ({
179
180
  flyToCoord(la, lo);
180
181
  setSuggestions([]);
181
182
  setDropdownOpen(false);
182
- setSearchQuery('');
183
+ // normalise to canonical XX-XXX-XXXX format in case user typed without dashes
184
+ setSearchQuery(trimmed.toUpperCase());
183
185
  } catch {
184
186
  setSearchError('Invalid DigiPin code');
185
187
  }