@aacigroup/aaci_shared 6.5.0 → 6.6.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGooglePlacesAutocomplete.d.ts","sourceRoot":"","sources":["../../../src/components/AddressAutocomplete/useGooglePlacesAutocomplete.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useGooglePlacesAutocomplete.d.ts","sourceRoot":"","sources":["../../../src/components/AddressAutocomplete/useGooglePlacesAutocomplete.ts"],"names":[],"mappings":"AAqCA,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,gCAAgC;IACxC,OAAO,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAChD,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B;AAED,UAAU,iCAAiC;IAEzC,SAAS,EAAE,OAAO,CAAC;IACnB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,kBAAkB,EAAE,iBAAiB,EAAE,CAAC;IACxC,eAAe,EAAE,OAAO,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAGxC,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;QAC5C,UAAU,EAAE,iBAAiB,CAAC;QAC9B,gBAAgB,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;KAC3C,GAAG,IAAI,CAAC,CAAC;IACV,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,kBAAkB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CAC7C;AAED,eAAO,MAAM,2BAA2B,GAAI,qCAIzC,gCAAqC,KAAG,iCAiR1C,CAAC"}
|
|
@@ -11,8 +11,7 @@ export const useGooglePlacesAutocomplete = ({ onError, debounceMs = 300, minChar
|
|
|
11
11
|
const postalCodeCacheRef = useRef({});
|
|
12
12
|
const fetchInProgressRef = useRef({});
|
|
13
13
|
const isInitializingRef = useRef(false);
|
|
14
|
-
const
|
|
15
|
-
const placesService = useRef(null);
|
|
14
|
+
const placesApiReady = useRef(false);
|
|
16
15
|
const initializeGoogleMaps = useCallback(async (attempt = 1) => {
|
|
17
16
|
var _a, _b, _c, _d, _e, _f;
|
|
18
17
|
if (isInitializingRef.current)
|
|
@@ -27,14 +26,13 @@ export const useGooglePlacesAutocomplete = ({ onError, debounceMs = 300, minChar
|
|
|
27
26
|
throw new Error(result.error || 'Failed to load Google Maps');
|
|
28
27
|
}
|
|
29
28
|
await new Promise((r) => setTimeout(r, 200));
|
|
30
|
-
if (!((_c = (_b = (_a = window.google) === null || _a === void 0 ? void 0 : _a.maps) === null || _b === void 0 ? void 0 : _b.places) === null || _c === void 0 ? void 0 : _c.
|
|
31
|
-
throw new Error('
|
|
29
|
+
if (!((_c = (_b = (_a = window.google) === null || _a === void 0 ? void 0 : _a.maps) === null || _b === void 0 ? void 0 : _b.places) === null || _c === void 0 ? void 0 : _c.AutocompleteSuggestion)) {
|
|
30
|
+
throw new Error('AutocompleteSuggestion (Places API v3) is not available');
|
|
32
31
|
}
|
|
33
|
-
if (!((_f = (_e = (_d = window.google) === null || _d === void 0 ? void 0 : _d.maps) === null || _e === void 0 ? void 0 : _e.places) === null || _f === void 0 ? void 0 : _f.
|
|
34
|
-
throw new Error('
|
|
32
|
+
if (!((_f = (_e = (_d = window.google) === null || _d === void 0 ? void 0 : _d.maps) === null || _e === void 0 ? void 0 : _e.places) === null || _f === void 0 ? void 0 : _f.Place)) {
|
|
33
|
+
throw new Error('Place (Places API v3) is not available');
|
|
35
34
|
}
|
|
36
|
-
|
|
37
|
-
placesService.current = new google.maps.places.PlacesService(document.createElement('div'));
|
|
35
|
+
placesApiReady.current = true;
|
|
38
36
|
setMapsLoadingFailed(false);
|
|
39
37
|
setLastMapsError(null);
|
|
40
38
|
}
|
|
@@ -65,8 +63,8 @@ export const useGooglePlacesAutocomplete = ({ onError, debounceMs = 300, minChar
|
|
|
65
63
|
}
|
|
66
64
|
};
|
|
67
65
|
}, [initializeGoogleMaps]);
|
|
68
|
-
const doPredict = useCallback((value) => {
|
|
69
|
-
if (!
|
|
66
|
+
const doPredict = useCallback(async (value) => {
|
|
67
|
+
if (!placesApiReady.current) {
|
|
70
68
|
setAddressSuggestions([]);
|
|
71
69
|
setShowSuggestions(false);
|
|
72
70
|
return;
|
|
@@ -77,69 +75,66 @@ export const useGooglePlacesAutocomplete = ({ onError, debounceMs = 300, minChar
|
|
|
77
75
|
return;
|
|
78
76
|
}
|
|
79
77
|
try {
|
|
80
|
-
|
|
78
|
+
const placesApi = google.maps.places;
|
|
79
|
+
const { suggestions } = await placesApi.AutocompleteSuggestion.fetchAutocompleteSuggestions({
|
|
81
80
|
input: value,
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
fetchInProgressRef.current[placeId] = false;
|
|
107
|
-
if (detailStatus === google.maps.places.PlacesServiceStatus.OK && place) {
|
|
108
|
-
const components = place.address_components || [];
|
|
109
|
-
const zipComp = components.find((c) => c.types && c.types.indexOf('postal_code') !== -1);
|
|
110
|
-
const zip = (zipComp === null || zipComp === void 0 ? void 0 : zipComp.long_name) || '';
|
|
111
|
-
if (zip) {
|
|
112
|
-
setPostalCodeCache((prev) => {
|
|
113
|
-
const next = { ...prev, [placeId]: zip };
|
|
114
|
-
postalCodeCacheRef.current = next;
|
|
115
|
-
return next;
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
resolve();
|
|
120
|
-
});
|
|
121
|
-
});
|
|
81
|
+
includedPrimaryTypes: ['address'],
|
|
82
|
+
includedRegionCodes: ['us'],
|
|
83
|
+
});
|
|
84
|
+
const validSuggestions = suggestions.filter((s) => { var _a; return (_a = s.placePrediction) === null || _a === void 0 ? void 0 : _a.placeId; });
|
|
85
|
+
if (validSuggestions.length === 0) {
|
|
86
|
+
setAddressSuggestions([]);
|
|
87
|
+
setShowSuggestions(false);
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
const postalCodePromises = validSuggestions.map(async (suggestion) => {
|
|
91
|
+
var _a;
|
|
92
|
+
const placeId = suggestion.placePrediction.placeId;
|
|
93
|
+
if (postalCodeCacheRef.current[placeId]) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
if (fetchInProgressRef.current[placeId]) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
fetchInProgressRef.current[placeId] = true;
|
|
100
|
+
try {
|
|
101
|
+
const placesApi = google.maps.places;
|
|
102
|
+
const place = new placesApi.Place({ id: placeId });
|
|
103
|
+
const { place: placeDetails } = await place.fetchFields({
|
|
104
|
+
fields: ['addressComponents'],
|
|
122
105
|
});
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
106
|
+
const zipComp = (_a = placeDetails.addressComponents) === null || _a === void 0 ? void 0 : _a.find((c) => c.types && c.types.includes('postal_code'));
|
|
107
|
+
const zip = (zipComp === null || zipComp === void 0 ? void 0 : zipComp.longText) || '';
|
|
108
|
+
if (zip) {
|
|
109
|
+
setPostalCodeCache((prev) => {
|
|
110
|
+
const next = { ...prev, [placeId]: zip };
|
|
111
|
+
postalCodeCacheRef.current = next;
|
|
112
|
+
return next;
|
|
127
113
|
});
|
|
128
|
-
|
|
129
|
-
placeId: p.place_id || '',
|
|
130
|
-
mainText: p.structured_formatting.main_text || '',
|
|
131
|
-
secondaryText: p.structured_formatting.secondary_text || '',
|
|
132
|
-
description: p.description || '',
|
|
133
|
-
}));
|
|
134
|
-
setAddressSuggestions(formattedSuggestions);
|
|
135
|
-
setShowSuggestions(formattedSuggestions.length > 0);
|
|
136
|
-
});
|
|
114
|
+
}
|
|
137
115
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
setShowSuggestions(false);
|
|
116
|
+
finally {
|
|
117
|
+
fetchInProgressRef.current[placeId] = false;
|
|
141
118
|
}
|
|
142
119
|
});
|
|
120
|
+
await Promise.all(postalCodePromises);
|
|
121
|
+
const suggestionsWithZip = validSuggestions.filter((s) => {
|
|
122
|
+
const placeId = s.placePrediction.placeId;
|
|
123
|
+
return postalCodeCacheRef.current[placeId];
|
|
124
|
+
});
|
|
125
|
+
const formattedSuggestions = suggestionsWithZip.map((s) => {
|
|
126
|
+
var _a, _b;
|
|
127
|
+
const pred = s.placePrediction;
|
|
128
|
+
const textParts = pred.text.text.split(',');
|
|
129
|
+
return {
|
|
130
|
+
placeId: pred.placeId,
|
|
131
|
+
mainText: ((_a = pred.mainText) === null || _a === void 0 ? void 0 : _a.text) || textParts[0] || '',
|
|
132
|
+
secondaryText: ((_b = pred.secondaryText) === null || _b === void 0 ? void 0 : _b.text) || textParts.slice(1).join(',').trim() || '',
|
|
133
|
+
description: pred.text.text,
|
|
134
|
+
};
|
|
135
|
+
});
|
|
136
|
+
setAddressSuggestions(formattedSuggestions);
|
|
137
|
+
setShowSuggestions(formattedSuggestions.length > 0);
|
|
143
138
|
}
|
|
144
139
|
catch (err) {
|
|
145
140
|
console.warn('Error getting address predictions:', err);
|
|
@@ -154,64 +149,56 @@ export const useGooglePlacesAutocomplete = ({ onError, debounceMs = 300, minChar
|
|
|
154
149
|
debounceTimer.current = window.setTimeout(() => doPredict(input), debounceMs);
|
|
155
150
|
}, [doPredict, debounceMs]);
|
|
156
151
|
const getPlaceDetails = useCallback(async (placeId) => {
|
|
157
|
-
if (!
|
|
152
|
+
if (!placesApiReady.current) {
|
|
153
|
+
return null;
|
|
154
|
+
}
|
|
155
|
+
try {
|
|
156
|
+
const placesApi = google.maps.places;
|
|
157
|
+
const place = new placesApi.Place({ id: placeId });
|
|
158
|
+
const { place: placeDetails } = await place.fetchFields({
|
|
159
|
+
fields: ['addressComponents', 'formattedAddress', 'location'],
|
|
160
|
+
});
|
|
161
|
+
const components = placeDetails.addressComponents || [];
|
|
162
|
+
let street = '';
|
|
163
|
+
let city = '';
|
|
164
|
+
let state = '';
|
|
165
|
+
let zip = '';
|
|
166
|
+
let county = '';
|
|
167
|
+
let country = '';
|
|
168
|
+
components.forEach((component) => {
|
|
169
|
+
const types = component.types;
|
|
170
|
+
if (types.includes('street_number')) {
|
|
171
|
+
street = (component.longText || '') + ' ' + street;
|
|
172
|
+
}
|
|
173
|
+
if (types.includes('route')) {
|
|
174
|
+
street = (street + ' ' + (component.longText || '')).trim();
|
|
175
|
+
}
|
|
176
|
+
if (types.includes('locality') || types.includes('postal_town')) {
|
|
177
|
+
city = component.longText || city;
|
|
178
|
+
}
|
|
179
|
+
if (types.includes('administrative_area_level_1')) {
|
|
180
|
+
state = component.shortText || component.longText || state;
|
|
181
|
+
}
|
|
182
|
+
if (types.includes('postal_code')) {
|
|
183
|
+
zip = component.longText || zip;
|
|
184
|
+
}
|
|
185
|
+
if (types.includes('administrative_area_level_2')) {
|
|
186
|
+
county = component.longText || county;
|
|
187
|
+
}
|
|
188
|
+
if (types.includes('country')) {
|
|
189
|
+
country = component.longText || country;
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
return {
|
|
193
|
+
components: { street, city, state, zip, county, country },
|
|
194
|
+
formattedAddress: placeDetails.formattedAddress || '',
|
|
195
|
+
geometry: placeDetails.location || undefined,
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
catch (err) {
|
|
199
|
+
console.error('Error getting place details:', err);
|
|
158
200
|
return null;
|
|
159
201
|
}
|
|
160
|
-
return new Promise((resolve) => {
|
|
161
|
-
try {
|
|
162
|
-
placesService.current.getDetails({
|
|
163
|
-
placeId,
|
|
164
|
-
fields: ['address_components', 'geometry', 'formatted_address'],
|
|
165
|
-
}, (place, status) => {
|
|
166
|
-
var _a;
|
|
167
|
-
if (status === google.maps.places.PlacesServiceStatus.OK && place) {
|
|
168
|
-
const components = place.address_components || [];
|
|
169
|
-
let street = '';
|
|
170
|
-
let city = '';
|
|
171
|
-
let state = '';
|
|
172
|
-
let zip = '';
|
|
173
|
-
let county = '';
|
|
174
|
-
let country = '';
|
|
175
|
-
components.forEach((component) => {
|
|
176
|
-
const types = component.types;
|
|
177
|
-
if (types.includes('street_number')) {
|
|
178
|
-
street = (component.long_name || '') + ' ' + street;
|
|
179
|
-
}
|
|
180
|
-
if (types.includes('route')) {
|
|
181
|
-
street = (street + ' ' + (component.long_name || '')).trim();
|
|
182
|
-
}
|
|
183
|
-
if (types.includes('locality') || types.includes('postal_town')) {
|
|
184
|
-
city = component.long_name || city;
|
|
185
|
-
}
|
|
186
|
-
if (types.includes('administrative_area_level_1')) {
|
|
187
|
-
state = component.short_name || component.long_name || state;
|
|
188
|
-
}
|
|
189
|
-
if (types.includes('postal_code')) {
|
|
190
|
-
zip = component.long_name || zip;
|
|
191
|
-
}
|
|
192
|
-
if (types.includes('administrative_area_level_2')) {
|
|
193
|
-
county = component.long_name || county;
|
|
194
|
-
}
|
|
195
|
-
if (types.includes('country')) {
|
|
196
|
-
country = component.long_name || country;
|
|
197
|
-
}
|
|
198
|
-
});
|
|
199
|
-
resolve({
|
|
200
|
-
components: { street, city, state, zip, county, country },
|
|
201
|
-
formattedAddress: place.formatted_address || '',
|
|
202
|
-
geometry: (_a = place.geometry) === null || _a === void 0 ? void 0 : _a.location,
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
else {
|
|
206
|
-
resolve(null);
|
|
207
|
-
}
|
|
208
|
-
});
|
|
209
|
-
}
|
|
210
|
-
catch (err) {
|
|
211
|
-
console.error('Error getting place details:', err);
|
|
212
|
-
resolve(null);
|
|
213
|
-
}
|
|
214
|
-
});
|
|
215
202
|
}, []);
|
|
216
203
|
const clearSuggestions = useCallback(() => {
|
|
217
204
|
setAddressSuggestions([]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGooglePlacesAutocomplete.js","sourceRoot":"","sources":["../../../src/components/AddressAutocomplete/useGooglePlacesAutocomplete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"useGooglePlacesAutocomplete.js","sourceRoot":"","sources":["../../../src/components/AddressAutocomplete/useGooglePlacesAutocomplete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AA8E/D,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,EAC1C,OAAO,EACP,UAAU,GAAG,GAAG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