@selfcommunity/react-core 0.7.0-mui7.28 → 0.7.0-mui7.31

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,6 +1,9 @@
1
+ /// <reference types="google.maps" />
1
2
  declare const useSCGoogleApiLoader: () => {
2
3
  isLoaded: boolean;
3
4
  status: import("@vis.gl/react-google-maps").APILoadingStatus;
4
5
  geocodingApiKey: any;
6
+ libraries: string[];
7
+ placesLibrary: google.maps.PlacesLibrary;
5
8
  };
6
9
  export default useSCGoogleApiLoader;
@@ -9,11 +9,13 @@ const useSCGoogleApiLoader = () => {
9
9
  const { preferences } = (0, SCPreferencesProvider_1.useSCPreferences)();
10
10
  const isLoaded = (0, react_google_maps_1.useApiIsLoaded)();
11
11
  const status = (0, react_google_maps_1.useApiLoadingStatus)();
12
+ const placesLibrary = (0, react_google_maps_1.useMapsLibrary)('places');
13
+ const libraries = ['places', 'geocoding', 'maps'];
12
14
  const geocodingApiKey = (0, react_1.useMemo)(() => {
13
15
  return preferences && SCPreferences.PROVIDERS_GOOGLE_GEOCODING_API_KEY in preferences
14
16
  ? preferences[SCPreferences.PROVIDERS_GOOGLE_GEOCODING_API_KEY].value
15
17
  : null;
16
18
  }, [preferences]);
17
- return { isLoaded, status, geocodingApiKey };
19
+ return { isLoaded, status, geocodingApiKey, libraries, placesLibrary };
18
20
  };
19
21
  exports.default = useSCGoogleApiLoader;
@@ -1,6 +1,9 @@
1
+ /// <reference types="google.maps" />
1
2
  declare const useSCGoogleApiLoader: () => {
2
3
  isLoaded: boolean;
3
4
  status: import("@vis.gl/react-google-maps").APILoadingStatus;
4
5
  geocodingApiKey: any;
6
+ libraries: string[];
7
+ placesLibrary: google.maps.PlacesLibrary;
5
8
  };
6
9
  export default useSCGoogleApiLoader;
@@ -1,16 +1,18 @@
1
1
  import { useMemo } from 'react';
2
- import { useApiIsLoaded, useApiLoadingStatus } from '@vis.gl/react-google-maps';
2
+ import { useApiIsLoaded, useApiLoadingStatus, useMapsLibrary } from '@vis.gl/react-google-maps';
3
3
  import { useSCPreferences } from '../components/provider/SCPreferencesProvider';
4
4
  import * as SCPreferences from '../constants/Preferences';
5
5
  const useSCGoogleApiLoader = () => {
6
6
  const { preferences } = useSCPreferences();
7
7
  const isLoaded = useApiIsLoaded();
8
8
  const status = useApiLoadingStatus();
9
+ const placesLibrary = useMapsLibrary('places');
10
+ const libraries = ['places', 'geocoding', 'maps'];
9
11
  const geocodingApiKey = useMemo(() => {
10
12
  return preferences && SCPreferences.PROVIDERS_GOOGLE_GEOCODING_API_KEY in preferences
11
13
  ? preferences[SCPreferences.PROVIDERS_GOOGLE_GEOCODING_API_KEY].value
12
14
  : null;
13
15
  }, [preferences]);
14
- return { isLoaded, status, geocodingApiKey };
16
+ return { isLoaded, status, geocodingApiKey, libraries, placesLibrary };
15
17
  };
16
18
  export default useSCGoogleApiLoader;