@grupalia/rn-ui-kit 0.93.0 → 0.94.0

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.
@@ -14,53 +14,59 @@ const CONFIG = {
14
14
  _geolocation.default.setRNConfiguration(CONFIG);
15
15
  const HIGH_ACCURACY_OPTIONS = {
16
16
  enableHighAccuracy: true,
17
- timeout: 1000 * 20,
18
- maximumAge: 1000 * 60 * 5
17
+ timeout: 20_000,
18
+ maximumAge: 300_000
19
19
  };
20
20
  const LOW_ACCURACY_OPTIONS = {
21
21
  enableHighAccuracy: false,
22
- timeout: 20000,
23
- maximumAge: 1000 * 60 * 5
22
+ timeout: 20_000,
23
+ maximumAge: 300_000
24
24
  };
25
25
  function isGeolocationError(error) {
26
26
  return typeof error === 'object' && error !== null && 'code' in error && 'TIMEOUT' in error && 'PERMISSION_DENIED' in error && 'POSITION_UNAVAILABLE' in error;
27
27
  }
28
+ function isPermissionDenied(error) {
29
+ return isGeolocationError(error) && error.code === error.PERMISSION_DENIED;
30
+ }
31
+ function isRetryable(error) {
32
+ return isGeolocationError(error) && (error.code === error.TIMEOUT || error.code === error.POSITION_UNAVAILABLE);
33
+ }
34
+ function getCurrentPosition(options) {
35
+ return new Promise((resolve, reject) => {
36
+ _geolocation.default.getCurrentPosition(data => resolve(data), error => reject(error), options);
37
+ });
38
+ }
39
+ async function fetchPositionWithLowAccuracyFallback() {
40
+ try {
41
+ return await getCurrentPosition(HIGH_ACCURACY_OPTIONS);
42
+ } catch (error) {
43
+ if (isRetryable(error)) {
44
+ return getCurrentPosition(LOW_ACCURACY_OPTIONS);
45
+ }
46
+ throw error;
47
+ }
48
+ }
28
49
  function useGetGeolocation({
29
50
  onRetrievedGeolocation,
30
51
  onError,
31
52
  onPermissionDenied
32
53
  }) {
33
54
  const [isLoading, setIsLoading] = (0, _react.useState)(false);
34
- const getCurrentPositionWithOptions = (0, _react.useCallback)(options => new Promise((resolve, reject) => {
35
- _geolocation.default.getCurrentPosition(data => resolve(data), error => reject(error), options);
36
- }), []);
37
- const fetchGeolocation = (0, _react.useCallback)(async () => {
55
+ const getGeolocation = (0, _react.useCallback)(async () => {
56
+ setIsLoading(true);
38
57
  try {
39
- const data = await getCurrentPositionWithOptions(HIGH_ACCURACY_OPTIONS);
58
+ const data = await fetchPositionWithLowAccuracyFallback();
40
59
  onRetrievedGeolocation(data);
41
60
  } catch (error) {
42
- if (isGeolocationError(error) && error.code === error.TIMEOUT) {
43
- try {
44
- const data = await getCurrentPositionWithOptions(LOW_ACCURACY_OPTIONS);
45
- onRetrievedGeolocation(data);
46
- } catch (retryError) {
47
- onError?.(retryError);
48
- }
61
+ if (isPermissionDenied(error)) {
62
+ onPermissionDenied?.();
49
63
  } else {
50
64
  onError?.(error);
51
65
  }
52
- }
53
- }, [getCurrentPositionWithOptions, onRetrievedGeolocation, onError]);
54
- const getGeolocation = (0, _react.useCallback)(() => {
55
- setIsLoading(true);
56
- _geolocation.default.requestAuthorization(async () => {
57
- await fetchGeolocation();
58
- setIsLoading(false);
59
- }, () => {
60
- onPermissionDenied?.();
66
+ } finally {
61
67
  setIsLoading(false);
62
- });
63
- }, [fetchGeolocation, onPermissionDenied]);
68
+ }
69
+ }, [onRetrievedGeolocation, onError, onPermissionDenied]);
64
70
  return {
65
71
  isLoading,
66
72
  getGeolocation
@@ -1 +1 @@
1
- {"version":3,"names":["_geolocation","_interopRequireDefault","require","_react","e","__esModule","default","CONFIG","skipPermissionRequests","locationProvider","Geolocation","setRNConfiguration","HIGH_ACCURACY_OPTIONS","enableHighAccuracy","timeout","maximumAge","LOW_ACCURACY_OPTIONS","isGeolocationError","error","useGetGeolocation","onRetrievedGeolocation","onError","onPermissionDenied","isLoading","setIsLoading","useState","getCurrentPositionWithOptions","useCallback","options","Promise","resolve","reject","getCurrentPosition","data","fetchGeolocation","code","TIMEOUT","retryError","getGeolocation","requestAuthorization"],"sourceRoot":"../../../src","sources":["hooks/useGetGeolocation.ts"],"mappings":";;;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C,EACxBU,OACF,CAAC;EACH,CAAC,CAAC,EAAE,EAAE,CAAC;EAEP,MAAMM,gBAAgB,GAAG,IAAAP,kBAAW,EAAC,YAAY;IAC/C,IAAI;MACF,MAAMM,IAAI,GAAG,MAAMP,6BAA6B,CAACd,qBAAqB,CAAC;MACvEQ,sBAAsB,CAACa,IAAI,CAAC;IAC9B,CAAC,CAAC,OAAOf,KAAK,EAAE;MACd,IAAID,kBAAkB,CAACC,KAAK,CAAC,IAAIA,KAAK,CAACiB,IAAI,KAAKjB,KAAK,CAACkB,OAAO,EAAE;QAC7D,IAAI;UACF,MAAMH,IAAI,GAAG,MAAMP,6BAA6B,CAACV,oBAAoB,CAAC;UACtEI,sBAAsB,CAACa,IAAI,CAAC;QAC9B,CAAC,CAAC,OAAOI,UAAU,EAAE;UACnBhB,OAAO,GAAGgB,UAAU,CAAC;QACvB;MACF,CAAC,MAAM;QACLhB,OAAO,GAAGH,KAAK,CAAC;MAClB;IACF;EACF,CAAC,EAAE,CAACQ,6BAA6B,EAAEN,sBAAsB,EAAEC,OAAO,CAAC,CAAC;EAEpE,MAAMiB,cAAc,GAAG,IAAAX,kBAAW,EAAC,MAAM;IACvCH,YAAY,CAAC,IAAI,CAAC;IAElBd,oBAAW,CAAC6B,oBAAoB,CAC9B,YAAY;MACV,MAAML,gBAAgB,CAAC,CAAC;MACxBV,YAAY,CAAC,KAAK,CAAC;IACrB,CAAC,EACD,MAAM;MACJF,kBAAkB,GAAG,CAAC;MACtBE,YAAY,CAAC,KAAK,CAAC;IACrB,CACF,CAAC;EACH,CAAC,EAAE,CAACU,gBAAgB,EAAEZ,kBAAkB,CAAC,CAAC;EAE1C,OAAO;IACLC,SAAS;IACTe;EACF,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"names":["_geolocation","_interopRequireDefault","require","_react","e","__esModule","default","CONFIG","skipPermissionRequests","locationProvider","Geolocation","setRNConfiguration","HIGH_ACCURACY_OPTIONS","enableHighAccuracy","timeout","maximumAge","LOW_ACCURACY_OPTIONS","isGeolocationError","error","isPermissionDenied","code","PERMISSION_DENIED","isRetryable","TIMEOUT","POSITION_UNAVAILABLE","getCurrentPosition","options","Promise","resolve","reject","data","fetchPositionWithLowAccuracyFallback","useGetGeolocation","onRetrievedGeolocation","onError","onPermissionDenied","isLoading","setIsLoading","useState","getGeolocation","useCallback"],"sourceRoot":"../../../src","sources":["hooks/useGetGeolocation.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAA8C,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE9C,MAAMG,MAAM,GAAG;EACbC,sBAAsB,EAAE,KAAK;EAC7BC,gBAAgB,EAAE;AACpB,CAAU;AAEVC,oBAAW,CAACC,kBAAkB,CAACJ,MAAM,CAAC;AAQtC,MAAMK,qBAA6C,GAAG;EACpDC,kBAAkB,EAAE,IAAI;EACxBC,OAAO,EAAE,MAAM;EACfC,UAAU,EAAE;AACd,CAAC;AAED,MAAMC,oBAA4C,GAAG;EACnDH,kBAAkB,EAAE,KAAK;EACzBC,OAAO,EAAE,MAAM;EACfC,UAAU,EAAE;AACd,CAAC;AAUD,SAASE,kBAAkBA,CAACC,KAAc,EAA6B;EACrE,OACE,OAAOA,KAAK,KAAK,QAAQ,IACtBA,KAAK,KAAK,IAAI,IACd,MAAM,IAAIA,KAAK,IACf,SAAS,IAAIA,KAAK,IAClB,mBAAmB,IAAIA,KAAK,IAC5B,sBAAsB,IAAIA,KAAK;AAEtC;AAEA,SAASC,kBAAkBA,CAACD,KAAc,EAAW;EACnD,OAAOD,kBAAkB,CAACC,KAAK,CAAC,IAAIA,KAAK,CAACE,IAAI,KAAKF,KAAK,CAACG,iBAAiB;AAC5E;AAEA,SAASC,WAAWA,CAACJ,KAAc,EAAW;EAC5C,OAAOD,kBAAkB,CA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AE,CAACJ,sBAAsB,EAAEC,OAAO,EAAEC,kBAAkB,CAAC,CAAC;EAEzD,OAAO;IACLC,SAAS;IACTG;EACF,CAAC;AACH","ignoreList":[]}
@@ -9,53 +9,59 @@ const CONFIG = {
9
9
  Geolocation.setRNConfiguration(CONFIG);
10
10
  const HIGH_ACCURACY_OPTIONS = {
11
11
  enableHighAccuracy: true,
12
- timeout: 1000 * 20,
13
- maximumAge: 1000 * 60 * 5
12
+ timeout: 20_000,
13
+ maximumAge: 300_000
14
14
  };
15
15
  const LOW_ACCURACY_OPTIONS = {
16
16
  enableHighAccuracy: false,
17
- timeout: 20000,
18
- maximumAge: 1000 * 60 * 5
17
+ timeout: 20_000,
18
+ maximumAge: 300_000
19
19
  };
20
20
  function isGeolocationError(error) {
21
21
  return typeof error === 'object' && error !== null && 'code' in error && 'TIMEOUT' in error && 'PERMISSION_DENIED' in error && 'POSITION_UNAVAILABLE' in error;
22
22
  }
23
+ function isPermissionDenied(error) {
24
+ return isGeolocationError(error) && error.code === error.PERMISSION_DENIED;
25
+ }
26
+ function isRetryable(error) {
27
+ return isGeolocationError(error) && (error.code === error.TIMEOUT || error.code === error.POSITION_UNAVAILABLE);
28
+ }
29
+ function getCurrentPosition(options) {
30
+ return new Promise((resolve, reject) => {
31
+ Geolocation.getCurrentPosition(data => resolve(data), error => reject(error), options);
32
+ });
33
+ }
34
+ async function fetchPositionWithLowAccuracyFallback() {
35
+ try {
36
+ return await getCurrentPosition(HIGH_ACCURACY_OPTIONS);
37
+ } catch (error) {
38
+ if (isRetryable(error)) {
39
+ return getCurrentPosition(LOW_ACCURACY_OPTIONS);
40
+ }
41
+ throw error;
42
+ }
43
+ }
23
44
  export default function useGetGeolocation({
24
45
  onRetrievedGeolocation,
25
46
  onError,
26
47
  onPermissionDenied
27
48
  }) {
28
49
  const [isLoading, setIsLoading] = useState(false);
29
- const getCurrentPositionWithOptions = useCallback(options => new Promise((resolve, reject) => {
30
- Geolocation.getCurrentPosition(data => resolve(data), error => reject(error), options);
31
- }), []);
32
- const fetchGeolocation = useCallback(async () => {
50
+ const getGeolocation = useCallback(async () => {
51
+ setIsLoading(true);
33
52
  try {
34
- const data = await getCurrentPositionWithOptions(HIGH_ACCURACY_OPTIONS);
53
+ const data = await fetchPositionWithLowAccuracyFallback();
35
54
  onRetrievedGeolocation(data);
36
55
  } catch (error) {
37
- if (isGeolocationError(error) && error.code === error.TIMEOUT) {
38
- try {
39
- const data = await getCurrentPositionWithOptions(LOW_ACCURACY_OPTIONS);
40
- onRetrievedGeolocation(data);
41
- } catch (retryError) {
42
- onError?.(retryError);
43
- }
56
+ if (isPermissionDenied(error)) {
57
+ onPermissionDenied?.();
44
58
  } else {
45
59
  onError?.(error);
46
60
  }
47
- }
48
- }, [getCurrentPositionWithOptions, onRetrievedGeolocation, onError]);
49
- const getGeolocation = useCallback(() => {
50
- setIsLoading(true);
51
- Geolocation.requestAuthorization(async () => {
52
- await fetchGeolocation();
53
- setIsLoading(false);
54
- }, () => {
55
- onPermissionDenied?.();
61
+ } finally {
56
62
  setIsLoading(false);
57
- });
58
- }, [fetchGeolocation, onPermissionDenied]);
63
+ }
64
+ }, [onRetrievedGeolocation, onError, onPermissionDenied]);
59
65
  return {
60
66
  isLoading,
61
67
  getGeolocation
@@ -1 +1 @@
1
- {"version":3,"names":["Geolocation","useCallback","useState","CONFIG","skipPermissionRequests","locationProvider","setRNConfiguration","HIGH_ACCURACY_OPTIONS","enableHighAccuracy","timeout","maximumAge","LOW_ACCURACY_OPTIONS","isGeolocationError","error","useGetGeolocation","onRetrievedGeolocation","onError","onPermissionDenied","isLoading","setIsLoading","getCurrentPositionWithOptions","options","Promise","resolve","reject","getCurrentPosition","data","fetchGeolocation","code","TIMEOUT","retryError","getGeolocation","requestAuthorization"],"sourceRoot":"../../../src","sources":["hooks/useGetGeolocation.ts"],"mappings":";;AAAA,OAAOA,WAAW,MAAoC,qCAAqC;AAC3F,SAASC,WAAW,EAAEC,QAAQ,QAAQ,OAAO;AAE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W,IAAI,CAAC;IAC9B,CAAC,CAAC,OAAOb,KAAK,EAAE;MACd,IAAID,kBAAkB,CAACC,KAAK,CAAC,IAAIA,KAAK,CAACe,IAAI,KAAKf,KAAK,CAACgB,OAAO,EAAE;QAC7D,IAAI;UACF,MAAMH,IAAI,GAAG,MAAMN,6BAA6B,CAACT,oBAAoB,CAAC;UACtEI,sBAAsB,CAACW,IAAI,CAAC;QAC9B,CAAC,CAAC,OAAOI,UAAU,EAAE;UACnBd,OAAO,GAAGc,UAAU,CAAC;QACvB;MACF,CAAC,MAAM;QACLd,OAAO,GAAGH,KAAK,CAAC;MAClB;IACF;EACF,CAAC,EAAE,CAACO,6BAA6B,EAAEL,sBAAsB,EAAEC,OAAO,CAAC,CAAC;EAEpE,MAAMe,cAAc,GAAG9B,WAAW,CAAC,MAAM;IACvCkB,YAAY,CAAC,IAAI,CAAC;IAElBnB,WAAW,CAACgC,oBAAoB,CAC9B,YAAY;MACV,MAAML,gBAAgB,CAAC,CAAC;MACxBR,YAAY,CAAC,KAAK,CAAC;IACrB,CAAC,EACD,MAAM;MACJF,kBAAkB,GAAG,CAAC;MACtBE,YAAY,CAAC,KAAK,CAAC;IACrB,CACF,CAAC;EACH,CAAC,EAAE,CAACQ,gBAAgB,EAAEV,kBAAkB,CAAC,CAAC;EAE1C,OAAO;IACLC,SAAS;IACTa;EACF,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"names":["Geolocation","useCallback","useState","CONFIG","skipPermissionRequests","locationProvider","setRNConfiguration","HIGH_ACCURACY_OPTIONS","enableHighAccuracy","timeout","maximumAge","LOW_ACCURACY_OPTIONS","isGeolocationError","error","isPermissionDenied","code","PERMISSION_DENIED","isRetryable","TIMEOUT","POSITION_UNAVAILABLE","getCurrentPosition","options","Promise","resolve","reject","data","fetchPositionWithLowAccuracyFallback","useGetGeolocation","onRetrievedGeolocation","onError","onPermissionDenied","isLoading","setIsLoading","getGeolocation"],"sourceRoot":"../../../src","sources":["hooks/useGetGeolocation.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Q,OACF,CAAC;EACH,CAAC,CAAC;AACJ;AAEA,eAAeK,oCAAoCA,CAAA,EAAG;EACpD,IAAI;IACF,OAAO,MAAMN,kBAAkB,CAACb,qBAAqB,CAAC;EACxD,CAAC,CAAC,OAAOM,KAAK,EAAE;IACd,IAAII,WAAW,CAACJ,KAAK,CAAC,EAAE;MACtB,OAAOO,kBAAkB,CAACT,oBAAoB,CAAC;IACjD;IACA,MAAME,KAAK;EACb;AACF;AAQA,eAAe,SAASc,iBAAiBA,CAAC;EACxCC,sBAAsB;EACtBC,OAAO;EACPC;AACK,CAAC,EAAE;EACR,MAAM,CAACC,SAAS,EAAEC,YAAY,CAAC,GAAG9B,QAAQ,CAAC,KAAK,CAAC;EAEjD,MAAM+B,cAAc,GAAGhC,WAAW,CAAC,YAAY;IAC7C+B,YAAY,CAAC,IAAI,CAAC;IAClB,IAAI;MACF,MAAMP,IAAI,GAAG,MAAMC,oCAAoC,CAAC,CAAC;MACzDE,sBAAsB,CAACH,IAAI,CAAC;IAC9B,CAAC,CAAC,OAAOZ,KAAK,EAAE;MACd,IAAIC,kBAAkB,CAACD,KAAK,CAAC,EAAE;QAC7BiB,kBAAkB,GAAG,CAAC;MACxB,CAAC,MAAM;QACLD,OAAO,GAAGhB,KAAK,CAAC;MAClB;IACF,CAAC,SAAS;MACRmB,YAAY,CAAC,KAAK,CAAC;IACrB;EACF,CAAC,EAAE,CAACJ,sBAAsB,EAAEC,OAAO,EAAEC,kBAAkB,CAAC,CAAC;EAEzD,OAAO;IACLC,SAAS;IACTE;EACF,CAAC;AACH","ignoreList":[]}
@@ -6,7 +6,7 @@ interface Props {
6
6
  }
7
7
  export default function useGetGeolocation({ onRetrievedGeolocation, onError, onPermissionDenied, }: Props): {
8
8
  isLoading: boolean;
9
- getGeolocation: () => void;
9
+ getGeolocation: () => Promise<void>;
10
10
  };
11
11
  export {};
12
12
  //# sourceMappingURL=useGetGeolocation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useGetGeolocation.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useGetGeolocation.ts"],"names":[],"mappings":"AAAA,OAAoB,EAAE,KAAK,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AA+C5F,UAAU,KAAK;IACb,sBAAsB,EAAE,CAAC,IAAI,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAC5D,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;CACjC;AAED,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EACxC,sBAAsB,EACtB,OAAO,EACP,kBAAkB,GACnB,EAAE,KAAK;;;EAkDP"}
1
+ {"version":3,"file":"useGetGeolocation.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useGetGeolocation.ts"],"names":[],"mappings":"AAAA,OAAoB,EAAE,KAAK,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AA6E5F,UAAU,KAAK;IACb,sBAAsB,EAAE,CAAC,IAAI,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAC5D,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;CACjC;AAED,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EACxC,sBAAsB,EACtB,OAAO,EACP,kBAAkB,GACnB,EAAE,KAAK;;;EAuBP"}
@@ -6,7 +6,7 @@ interface Props {
6
6
  }
7
7
  export default function useGetGeolocation({ onRetrievedGeolocation, onError, onPermissionDenied, }: Props): {
8
8
  isLoading: boolean;
9
- getGeolocation: () => void;
9
+ getGeolocation: () => Promise<void>;
10
10
  };
11
11
  export {};
12
12
  //# sourceMappingURL=useGetGeolocation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useGetGeolocation.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useGetGeolocation.ts"],"names":[],"mappings":"AAAA,OAAoB,EAAE,KAAK,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AA+C5F,UAAU,KAAK;IACb,sBAAsB,EAAE,CAAC,IAAI,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAC5D,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;CACjC;AAED,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EACxC,sBAAsB,EACtB,OAAO,EACP,kBAAkB,GACnB,EAAE,KAAK;;;EAkDP"}
1
+ {"version":3,"file":"useGetGeolocation.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useGetGeolocation.ts"],"names":[],"mappings":"AAAA,OAAoB,EAAE,KAAK,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AA6E5F,UAAU,KAAK;IACb,sBAAsB,EAAE,CAAC,IAAI,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAC5D,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;CACjC;AAED,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EACxC,sBAAsB,EACtB,OAAO,EACP,kBAAkB,GACnB,EAAE,KAAK;;;EAuBP"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grupalia/rn-ui-kit",
3
- "version": "0.93.0",
3
+ "version": "0.94.0",
4
4
  "description": "Grupalia React Native UI Kit",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/module/index.d.ts",