@ornikar/kitt-universal 25.9.4 → 25.9.5
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/CHANGELOG.md +9 -0
- package/dist/definitions/GoogleMapsAutocompleteProvider/hooks/useGoogleMapsApi.d.ts.map +1 -1
- package/dist/definitions/GoogleMapsAutocompleteProvider/utils/makeMapsApiUrl.d.ts +1 -1
- package/dist/definitions/GoogleMapsAutocompleteProvider/utils/makeMapsApiUrl.d.ts.map +1 -1
- package/dist/index-metro.es.android.js +11 -7
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +11 -7
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-20.10.cjs.js +11 -7
- package/dist/index-node-20.10.cjs.js.map +1 -1
- package/dist/index-node-20.10.es.mjs +11 -7
- package/dist/index-node-20.10.es.mjs.map +1 -1
- package/dist/index.es.js +13 -5
- package/dist/index.es.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,15 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [25.9.5](https://github.com/ornikar/kitt/compare/@ornikar/kitt-universal@25.9.4...@ornikar/kitt-universal@25.9.5) (2024-07-15)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **kitt-u/gmapautocomplete:** encode all query params in url [no issue] ([#2439](https://github.com/ornikar/kitt/issues/2439)) ([defb540](https://github.com/ornikar/kitt/commit/defb5404ca7cb3d93fe0c2a1c21aaa4886d25d04))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
6
15
|
## [25.9.4](https://github.com/ornikar/kitt/compare/@ornikar/kitt-universal@25.9.3...@ornikar/kitt-universal@25.9.4) (2024-07-12)
|
|
7
16
|
|
|
8
17
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGoogleMapsApi.d.ts","sourceRoot":"","sources":["../../../../src/GoogleMapsAutocompleteProvider/hooks/useGoogleMapsApi.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"useGoogleMapsApi.d.ts","sourceRoot":"","sources":["../../../../src/GoogleMapsAutocompleteProvider/hooks/useGoogleMapsApi.ts"],"names":[],"mappings":";;AAOA,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;IACxC,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC;CAChD;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,sBAAsB,EAAE,CAAC;IACrD,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC;CAChD;AAED,MAAM,WAAW,uBAAuB;IACtC,YAAY,EAAE;QACZ,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,mBAAmB,CAAC,CAAC;KACtE,CAAC;IACF,aAAa,EAAE;QACb,UAAU,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,kBAAkB,CAAC,CAAC;KAC9D,CAAC;CACH;AAED,wBAAgB,gBAAgB,IAAI,uBAAuB,CA8D1D"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type MapsApiUrlSearchParamsName = 'input' | 'language' | 'types' | 'key' | 'place_id';
|
|
1
|
+
export type MapsApiUrlSearchParamsName = 'input' | 'language' | 'types' | 'key' | 'place_id' | 'components';
|
|
2
2
|
export interface MapsApiUrlSearchParams {
|
|
3
3
|
paramsName: MapsApiUrlSearchParamsName;
|
|
4
4
|
value: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"makeMapsApiUrl.d.ts","sourceRoot":"","sources":["../../../../src/GoogleMapsAutocompleteProvider/utils/makeMapsApiUrl.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,0BAA0B,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,GAAG,KAAK,GAAG,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"makeMapsApiUrl.d.ts","sourceRoot":"","sources":["../../../../src/GoogleMapsAutocompleteProvider/utils/makeMapsApiUrl.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,0BAA0B,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,GAAG,KAAK,GAAG,UAAU,GAAG,YAAY,CAAC;AAE5G,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,0BAA0B,CAAC;IACvC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,sBAAsB,EAAE,CAAC;CAClC;AAED,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,gBAAgB,GAAG,MAAM,CAM7E"}
|
|
@@ -6264,6 +6264,13 @@ function useGoogleMapApiKey() {
|
|
|
6264
6264
|
return context;
|
|
6265
6265
|
}
|
|
6266
6266
|
|
|
6267
|
+
/** @description web-only parameter due to iOS faulty behaviour */
|
|
6268
|
+
// Countries where we can have instructors and students
|
|
6269
|
+
// Restricting the search of the InputAddress component
|
|
6270
|
+
// France, Guyane Française, Guadeloupe, Martinique, Réunion
|
|
6271
|
+
// As of today, Google restrict this array to 5 country codes
|
|
6272
|
+
const countryCodes = ['FR', 'GF', 'GP', 'MQ', 'RE'];
|
|
6273
|
+
|
|
6267
6274
|
const defaultLanguageSearch = 'fr';
|
|
6268
6275
|
|
|
6269
6276
|
// types of result we want to allow as suggestions from the Autocomplete search
|
|
@@ -6277,13 +6284,7 @@ function makeMapsApiUrl({
|
|
|
6277
6284
|
const queryParams = params.map(({
|
|
6278
6285
|
paramsName,
|
|
6279
6286
|
value
|
|
6280
|
-
}) => {
|
|
6281
|
-
let encodedValue = value;
|
|
6282
|
-
if (paramsName === 'input') {
|
|
6283
|
-
encodedValue = encodeURIComponent(value);
|
|
6284
|
-
}
|
|
6285
|
-
return `${paramsName}=${encodedValue}`;
|
|
6286
|
-
});
|
|
6287
|
+
}) => `${paramsName}=${encodeURIComponent(value)}`);
|
|
6287
6288
|
return `https://maps.googleapis.com/maps/api/${resource}/json?` + queryParams.join('&');
|
|
6288
6289
|
}
|
|
6289
6290
|
|
|
@@ -6298,6 +6299,9 @@ function useGoogleMapsApi() {
|
|
|
6298
6299
|
}, {
|
|
6299
6300
|
paramsName: 'types',
|
|
6300
6301
|
value: autocompletePredictionTypes.join('|')
|
|
6302
|
+
}, {
|
|
6303
|
+
paramsName: 'components',
|
|
6304
|
+
value: countryCodes.map(country => `country:${country}`).join('|')
|
|
6301
6305
|
}];
|
|
6302
6306
|
const makeApiUrl = (resource, paramsName, param) => {
|
|
6303
6307
|
return makeMapsApiUrl({
|