@betterstore/react 0.5.12 → 0.5.13
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/compounds/form/address-input/index.tsx"],"names":[],"mappings":"AA+BA,UAAU,iBAAiB;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACnC;AAED,wBAAgB,YAAY,CAAC,EAC3B,SAAc,EACd,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,wBAAwB,GACzB,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/compounds/form/address-input/index.tsx"],"names":[],"mappings":"AA+BA,UAAU,iBAAiB;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACnC;AAED,wBAAgB,YAAY,CAAC,EAC3B,SAAc,EACd,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,wBAAwB,GACzB,EAAE,iBAAiB,2CAmOnB"}
|
package/dist/index.cjs.js
CHANGED
|
@@ -7409,14 +7409,9 @@ var Client = class {
|
|
|
7409
7409
|
*/
|
|
7410
7410
|
async getAutosuggestAddressResults(clientSecret, params) {
|
|
7411
7411
|
const apiClient = createApiClient(clientSecret, this.proxy);
|
|
7412
|
-
const { data
|
|
7413
|
-
|
|
7414
|
-
|
|
7415
|
-
params
|
|
7416
|
-
}
|
|
7417
|
-
);
|
|
7418
|
-
console.log("autosuggest data", data);
|
|
7419
|
-
console.log("autosuggest rest", rest);
|
|
7412
|
+
const { data } = await apiClient.get("/helpers/autosuggest-address", {
|
|
7413
|
+
params
|
|
7414
|
+
});
|
|
7420
7415
|
return data;
|
|
7421
7416
|
}
|
|
7422
7417
|
/**
|
|
@@ -7424,11 +7419,14 @@ var Client = class {
|
|
|
7424
7419
|
*/
|
|
7425
7420
|
async getGeocodeAddressResults(clientSecret, params) {
|
|
7426
7421
|
const apiClient = createApiClient(clientSecret, this.proxy);
|
|
7427
|
-
const {
|
|
7428
|
-
|
|
7422
|
+
const { position, ...rest } = params;
|
|
7423
|
+
const { data } = await apiClient.get("/helpers/geocode-address", {
|
|
7424
|
+
params: {
|
|
7425
|
+
...rest,
|
|
7426
|
+
lat: position.lat,
|
|
7427
|
+
lng: position.lng
|
|
7428
|
+
}
|
|
7429
7429
|
});
|
|
7430
|
-
console.log("geocode data", data);
|
|
7431
|
-
console.log("geocode rest", rest);
|
|
7432
7430
|
return data;
|
|
7433
7431
|
}
|
|
7434
7432
|
};
|
|
@@ -34450,10 +34448,7 @@ function AddressInput({ className = "", proxy, clientSecret, latitude, longitude
|
|
|
34450
34448
|
if (!isLookup) {
|
|
34451
34449
|
setIsLoading(true);
|
|
34452
34450
|
storeClient
|
|
34453
|
-
.getGeocodeAddressResults(clientSecret,
|
|
34454
|
-
selectedStreetId: address.id,
|
|
34455
|
-
position: address.position,
|
|
34456
|
-
})
|
|
34451
|
+
.getGeocodeAddressResults(clientSecret, address)
|
|
34457
34452
|
.then((results) => {
|
|
34458
34453
|
console.log(results);
|
|
34459
34454
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -7389,14 +7389,9 @@ var Client = class {
|
|
|
7389
7389
|
*/
|
|
7390
7390
|
async getAutosuggestAddressResults(clientSecret, params) {
|
|
7391
7391
|
const apiClient = createApiClient(clientSecret, this.proxy);
|
|
7392
|
-
const { data
|
|
7393
|
-
|
|
7394
|
-
|
|
7395
|
-
params
|
|
7396
|
-
}
|
|
7397
|
-
);
|
|
7398
|
-
console.log("autosuggest data", data);
|
|
7399
|
-
console.log("autosuggest rest", rest);
|
|
7392
|
+
const { data } = await apiClient.get("/helpers/autosuggest-address", {
|
|
7393
|
+
params
|
|
7394
|
+
});
|
|
7400
7395
|
return data;
|
|
7401
7396
|
}
|
|
7402
7397
|
/**
|
|
@@ -7404,11 +7399,14 @@ var Client = class {
|
|
|
7404
7399
|
*/
|
|
7405
7400
|
async getGeocodeAddressResults(clientSecret, params) {
|
|
7406
7401
|
const apiClient = createApiClient(clientSecret, this.proxy);
|
|
7407
|
-
const {
|
|
7408
|
-
|
|
7402
|
+
const { position, ...rest } = params;
|
|
7403
|
+
const { data } = await apiClient.get("/helpers/geocode-address", {
|
|
7404
|
+
params: {
|
|
7405
|
+
...rest,
|
|
7406
|
+
lat: position.lat,
|
|
7407
|
+
lng: position.lng
|
|
7408
|
+
}
|
|
7409
7409
|
});
|
|
7410
|
-
console.log("geocode data", data);
|
|
7411
|
-
console.log("geocode rest", rest);
|
|
7412
7410
|
return data;
|
|
7413
7411
|
}
|
|
7414
7412
|
};
|
|
@@ -34430,10 +34428,7 @@ function AddressInput({ className = "", proxy, clientSecret, latitude, longitude
|
|
|
34430
34428
|
if (!isLookup) {
|
|
34431
34429
|
setIsLoading(true);
|
|
34432
34430
|
storeClient
|
|
34433
|
-
.getGeocodeAddressResults(clientSecret,
|
|
34434
|
-
selectedStreetId: address.id,
|
|
34435
|
-
position: address.position,
|
|
34436
|
-
})
|
|
34431
|
+
.getGeocodeAddressResults(clientSecret, address)
|
|
34437
34432
|
.then((results) => {
|
|
34438
34433
|
console.log(results);
|
|
34439
34434
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@betterstore/react",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.13",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"tailwindcss-animate": "^1.0.7",
|
|
78
78
|
"zod": "^3.25.30",
|
|
79
79
|
"zustand": "^5.0.5",
|
|
80
|
-
"@betterstore/sdk": "0.5.
|
|
80
|
+
"@betterstore/sdk": "0.5.13"
|
|
81
81
|
},
|
|
82
82
|
"publishConfig": {
|
|
83
83
|
"access": "public"
|