@pretto/places 0.24.0 → 0.26.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.
- package/dist/geolocSearch.d.ts.map +1 -1
- package/dist/index.js +44 -23
- package/dist/module.js +44 -23
- package/dist/municipalitySearch.d.ts.map +1 -1
- package/dist/reverseGeolocSearch.d.ts +1 -3
- package/dist/reverseGeolocSearch.d.ts.map +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geolocSearch.d.ts","sourceRoot":"","sources":["../src/geolocSearch.ts"],"names":[],"mappings":"AAAA,oBAAY,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAC9B,CAAA;
|
|
1
|
+
{"version":3,"file":"geolocSearch.d.ts","sourceRoot":"","sources":["../src/geolocSearch.ts"],"names":[],"mappings":"AAAA,oBAAY,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAC9B,CAAA;AAoDD,eAAO,MAAM,GAAG,WAAY,MAAM,kBAAiB,MAAM,KAAS,QAAQ,kBAAkB,EAAE,CAQ7F,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -46,14 +46,15 @@ const convertFirstLetterToUpperCase = (str) => {
|
|
|
46
46
|
return acc + curr;
|
|
47
47
|
}, '');
|
|
48
48
|
};
|
|
49
|
-
const getUri = (search, departmentOnly) => {
|
|
49
|
+
const getUri = (search, departmentOnly, withType = true) => {
|
|
50
50
|
const PLACES_API = 'https://geo.api.gouv.fr';
|
|
51
51
|
const QUERY_FIELDS = `boost=population&fields=departement${departmentOnly ? ',centre,contour' : ',codesPostaux,centre,contour'}`;
|
|
52
52
|
const formatedSearch = encodeURIComponent(search);
|
|
53
|
+
const type = withType ? 'type=arrondissement-municipal&' : '';
|
|
53
54
|
const uri = {
|
|
54
55
|
departments: `${PLACES_API}/departements/${formatedSearch}/communes?${QUERY_FIELDS}`,
|
|
55
|
-
municipality: `${PLACES_API}/communes
|
|
56
|
-
zipcode: `${PLACES_API}/communes
|
|
56
|
+
municipality: `${PLACES_API}/communes?${type}&nom=${formatedSearch}&${QUERY_FIELDS}`,
|
|
57
|
+
zipcode: `${PLACES_API}/communes?${type}codePostal=${formatedSearch}&${QUERY_FIELDS}`,
|
|
57
58
|
};
|
|
58
59
|
if (isNaN(parseInt(search, 10)))
|
|
59
60
|
return uri.municipality;
|
|
@@ -133,10 +134,17 @@ const getData$3 = (search, options) => __awaiter(void 0, void 0, void 0, functio
|
|
|
133
134
|
return SEARCH_CACHE.filter(i => i.value.zipcode.includes(search)).slice(0, limit);
|
|
134
135
|
}
|
|
135
136
|
try {
|
|
137
|
+
let result = [];
|
|
136
138
|
const response = yield fetch(getUri(search, departmentOnly));
|
|
137
139
|
if (!response.ok)
|
|
138
140
|
return Promise.reject(response);
|
|
139
|
-
|
|
141
|
+
result = yield response.json();
|
|
142
|
+
if (result.length === 0) {
|
|
143
|
+
const response = yield fetch(getUri(search, departmentOnly, false));
|
|
144
|
+
if (!response.ok)
|
|
145
|
+
return Promise.reject(response);
|
|
146
|
+
result = yield response.json();
|
|
147
|
+
}
|
|
140
148
|
const formatedResponse = responseFormat(result, country, search, departmentOnly);
|
|
141
149
|
if (isEqual__default["default"](PREVIOUS_SEARCH, formatedResponse)) {
|
|
142
150
|
const cleanValue = search.replace(' ', '').replace(PREVIOUS_VALUE, '');
|
|
@@ -274,11 +282,18 @@ const getData$1 = (search) => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
274
282
|
if (!search || !/(\d){5}/.test(search))
|
|
275
283
|
return [];
|
|
276
284
|
try {
|
|
285
|
+
let results = [];
|
|
277
286
|
const formattedSearch = encodeURIComponent(search);
|
|
278
|
-
const response = yield fetch(`https://geo.api.gouv.fr/communes?codePostal=${formattedSearch}&fields=centre`);
|
|
287
|
+
const response = yield fetch(`https://geo.api.gouv.fr/communes?codePostal=${formattedSearch}&type=arrondissement-municipal&fields=centre`);
|
|
279
288
|
if (!response.ok)
|
|
280
289
|
return Promise.reject(response);
|
|
281
|
-
|
|
290
|
+
results = yield response.json();
|
|
291
|
+
if (results.length === 0) {
|
|
292
|
+
const response = yield fetch(`https://geo.api.gouv.fr/communes?codePostal=${formattedSearch}&fields=centre`);
|
|
293
|
+
if (!response.ok)
|
|
294
|
+
return Promise.reject(response);
|
|
295
|
+
results = yield response.json();
|
|
296
|
+
}
|
|
282
297
|
return formatData$1(results);
|
|
283
298
|
}
|
|
284
299
|
catch (error) {
|
|
@@ -1109,11 +1124,9 @@ const parisOutline = [
|
|
|
1109
1124
|
},
|
|
1110
1125
|
];
|
|
1111
1126
|
|
|
1112
|
-
const formatData = (geoResults
|
|
1113
|
-
const district = addressResults.features.length > 0 ? addressResults.features[0].properties.district : null;
|
|
1114
|
-
const postcode = addressResults.features.length > 0 ? addressResults.features[0].properties.postcode : null;
|
|
1127
|
+
const formatData = (geoResults) => {
|
|
1115
1128
|
const getOutline = (city, zipcode) => {
|
|
1116
|
-
if (
|
|
1129
|
+
if (!geoResults || geoResults.length === 0)
|
|
1117
1130
|
return [];
|
|
1118
1131
|
if (city === 'Paris') {
|
|
1119
1132
|
const outline = parisOutline.find(outline => outline.name === zipcode);
|
|
@@ -1124,10 +1137,17 @@ const formatData = (geoResults, addressResults) => {
|
|
|
1124
1137
|
return [];
|
|
1125
1138
|
};
|
|
1126
1139
|
return geoResults.map(result => {
|
|
1127
|
-
const customOutline = getOutline(result.nom,
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1140
|
+
const customOutline = getOutline(result.nom, result.codesPostaux[0]);
|
|
1141
|
+
let outline = [];
|
|
1142
|
+
if (customOutline.length > 0) {
|
|
1143
|
+
outline = [customOutline];
|
|
1144
|
+
}
|
|
1145
|
+
else if (result.contour.type === 'Polygon') {
|
|
1146
|
+
outline = [result.contour.coordinates[0].map(([longitude, latitude]) => ({ longitude, latitude }))];
|
|
1147
|
+
}
|
|
1148
|
+
else if (result.contour.type === 'MultiPolygon') {
|
|
1149
|
+
outline = result.contour.coordinates.map(([coordinates]) => coordinates.map(([longitude, latitude]) => ({ longitude, latitude })));
|
|
1150
|
+
}
|
|
1131
1151
|
return {
|
|
1132
1152
|
center: { latitude: result.centre.coordinates[1], longitude: result.centre.coordinates[0] },
|
|
1133
1153
|
city: result.nom,
|
|
@@ -1135,22 +1155,23 @@ const formatData = (geoResults, addressResults) => {
|
|
|
1135
1155
|
coordinates: result.centre.coordinates,
|
|
1136
1156
|
zipcode: result.codesPostaux[0],
|
|
1137
1157
|
outline,
|
|
1138
|
-
district,
|
|
1139
|
-
postcode,
|
|
1140
1158
|
};
|
|
1141
1159
|
});
|
|
1142
1160
|
};
|
|
1143
1161
|
const getData = (search, signal) => __awaiter(void 0, void 0, void 0, function* () {
|
|
1144
1162
|
try {
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
fetch(`https://api-adresse.data.gouv.fr/reverse/?lat=${search.latitude}&lon=${search.longitude}&limit=1&&autocomplete=0`, { signal }),
|
|
1148
|
-
]);
|
|
1163
|
+
let geoResults = [];
|
|
1164
|
+
const geoResponse = yield fetch(`https://geo.api.gouv.fr/communes?lat=${search.latitude}&lon=${search.longitude}&type=arrondissement-municipal&fields=departement,codesPostaux,centre,contour`, { signal });
|
|
1149
1165
|
if (!geoResponse.ok)
|
|
1150
1166
|
return Promise.reject(geoResponse);
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1167
|
+
geoResults = yield geoResponse.json();
|
|
1168
|
+
if (geoResults.length === 0) {
|
|
1169
|
+
const geoResponse = yield fetch(`https://geo.api.gouv.fr/communes?lat=${search.latitude}&lon=${search.longitude}&fields=departement,codesPostaux,centre,contour`, { signal });
|
|
1170
|
+
if (!geoResponse.ok)
|
|
1171
|
+
return Promise.reject(geoResponse);
|
|
1172
|
+
geoResults = yield geoResponse.json();
|
|
1173
|
+
}
|
|
1174
|
+
return formatData(geoResults);
|
|
1154
1175
|
}
|
|
1155
1176
|
catch (error) {
|
|
1156
1177
|
if (typeof error === 'string')
|
package/dist/module.js
CHANGED
|
@@ -36,14 +36,15 @@ const convertFirstLetterToUpperCase = (str) => {
|
|
|
36
36
|
return acc + curr;
|
|
37
37
|
}, '');
|
|
38
38
|
};
|
|
39
|
-
const getUri = (search, departmentOnly) => {
|
|
39
|
+
const getUri = (search, departmentOnly, withType = true) => {
|
|
40
40
|
const PLACES_API = 'https://geo.api.gouv.fr';
|
|
41
41
|
const QUERY_FIELDS = `boost=population&fields=departement${departmentOnly ? ',centre,contour' : ',codesPostaux,centre,contour'}`;
|
|
42
42
|
const formatedSearch = encodeURIComponent(search);
|
|
43
|
+
const type = withType ? 'type=arrondissement-municipal&' : '';
|
|
43
44
|
const uri = {
|
|
44
45
|
departments: `${PLACES_API}/departements/${formatedSearch}/communes?${QUERY_FIELDS}`,
|
|
45
|
-
municipality: `${PLACES_API}/communes
|
|
46
|
-
zipcode: `${PLACES_API}/communes
|
|
46
|
+
municipality: `${PLACES_API}/communes?${type}&nom=${formatedSearch}&${QUERY_FIELDS}`,
|
|
47
|
+
zipcode: `${PLACES_API}/communes?${type}codePostal=${formatedSearch}&${QUERY_FIELDS}`,
|
|
47
48
|
};
|
|
48
49
|
if (isNaN(parseInt(search, 10)))
|
|
49
50
|
return uri.municipality;
|
|
@@ -123,10 +124,17 @@ const getData$3 = (search, options) => __awaiter(void 0, void 0, void 0, functio
|
|
|
123
124
|
return SEARCH_CACHE.filter(i => i.value.zipcode.includes(search)).slice(0, limit);
|
|
124
125
|
}
|
|
125
126
|
try {
|
|
127
|
+
let result = [];
|
|
126
128
|
const response = yield fetch(getUri(search, departmentOnly));
|
|
127
129
|
if (!response.ok)
|
|
128
130
|
return Promise.reject(response);
|
|
129
|
-
|
|
131
|
+
result = yield response.json();
|
|
132
|
+
if (result.length === 0) {
|
|
133
|
+
const response = yield fetch(getUri(search, departmentOnly, false));
|
|
134
|
+
if (!response.ok)
|
|
135
|
+
return Promise.reject(response);
|
|
136
|
+
result = yield response.json();
|
|
137
|
+
}
|
|
130
138
|
const formatedResponse = responseFormat(result, country, search, departmentOnly);
|
|
131
139
|
if (isEqual(PREVIOUS_SEARCH, formatedResponse)) {
|
|
132
140
|
const cleanValue = search.replace(' ', '').replace(PREVIOUS_VALUE, '');
|
|
@@ -264,11 +272,18 @@ const getData$1 = (search) => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
264
272
|
if (!search || !/(\d){5}/.test(search))
|
|
265
273
|
return [];
|
|
266
274
|
try {
|
|
275
|
+
let results = [];
|
|
267
276
|
const formattedSearch = encodeURIComponent(search);
|
|
268
|
-
const response = yield fetch(`https://geo.api.gouv.fr/communes?codePostal=${formattedSearch}&fields=centre`);
|
|
277
|
+
const response = yield fetch(`https://geo.api.gouv.fr/communes?codePostal=${formattedSearch}&type=arrondissement-municipal&fields=centre`);
|
|
269
278
|
if (!response.ok)
|
|
270
279
|
return Promise.reject(response);
|
|
271
|
-
|
|
280
|
+
results = yield response.json();
|
|
281
|
+
if (results.length === 0) {
|
|
282
|
+
const response = yield fetch(`https://geo.api.gouv.fr/communes?codePostal=${formattedSearch}&fields=centre`);
|
|
283
|
+
if (!response.ok)
|
|
284
|
+
return Promise.reject(response);
|
|
285
|
+
results = yield response.json();
|
|
286
|
+
}
|
|
272
287
|
return formatData$1(results);
|
|
273
288
|
}
|
|
274
289
|
catch (error) {
|
|
@@ -1099,11 +1114,9 @@ const parisOutline = [
|
|
|
1099
1114
|
},
|
|
1100
1115
|
];
|
|
1101
1116
|
|
|
1102
|
-
const formatData = (geoResults
|
|
1103
|
-
const district = addressResults.features.length > 0 ? addressResults.features[0].properties.district : null;
|
|
1104
|
-
const postcode = addressResults.features.length > 0 ? addressResults.features[0].properties.postcode : null;
|
|
1117
|
+
const formatData = (geoResults) => {
|
|
1105
1118
|
const getOutline = (city, zipcode) => {
|
|
1106
|
-
if (
|
|
1119
|
+
if (!geoResults || geoResults.length === 0)
|
|
1107
1120
|
return [];
|
|
1108
1121
|
if (city === 'Paris') {
|
|
1109
1122
|
const outline = parisOutline.find(outline => outline.name === zipcode);
|
|
@@ -1114,10 +1127,17 @@ const formatData = (geoResults, addressResults) => {
|
|
|
1114
1127
|
return [];
|
|
1115
1128
|
};
|
|
1116
1129
|
return geoResults.map(result => {
|
|
1117
|
-
const customOutline = getOutline(result.nom,
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1130
|
+
const customOutline = getOutline(result.nom, result.codesPostaux[0]);
|
|
1131
|
+
let outline = [];
|
|
1132
|
+
if (customOutline.length > 0) {
|
|
1133
|
+
outline = [customOutline];
|
|
1134
|
+
}
|
|
1135
|
+
else if (result.contour.type === 'Polygon') {
|
|
1136
|
+
outline = [result.contour.coordinates[0].map(([longitude, latitude]) => ({ longitude, latitude }))];
|
|
1137
|
+
}
|
|
1138
|
+
else if (result.contour.type === 'MultiPolygon') {
|
|
1139
|
+
outline = result.contour.coordinates.map(([coordinates]) => coordinates.map(([longitude, latitude]) => ({ longitude, latitude })));
|
|
1140
|
+
}
|
|
1121
1141
|
return {
|
|
1122
1142
|
center: { latitude: result.centre.coordinates[1], longitude: result.centre.coordinates[0] },
|
|
1123
1143
|
city: result.nom,
|
|
@@ -1125,22 +1145,23 @@ const formatData = (geoResults, addressResults) => {
|
|
|
1125
1145
|
coordinates: result.centre.coordinates,
|
|
1126
1146
|
zipcode: result.codesPostaux[0],
|
|
1127
1147
|
outline,
|
|
1128
|
-
district,
|
|
1129
|
-
postcode,
|
|
1130
1148
|
};
|
|
1131
1149
|
});
|
|
1132
1150
|
};
|
|
1133
1151
|
const getData = (search, signal) => __awaiter(void 0, void 0, void 0, function* () {
|
|
1134
1152
|
try {
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
fetch(`https://api-adresse.data.gouv.fr/reverse/?lat=${search.latitude}&lon=${search.longitude}&limit=1&&autocomplete=0`, { signal }),
|
|
1138
|
-
]);
|
|
1153
|
+
let geoResults = [];
|
|
1154
|
+
const geoResponse = yield fetch(`https://geo.api.gouv.fr/communes?lat=${search.latitude}&lon=${search.longitude}&type=arrondissement-municipal&fields=departement,codesPostaux,centre,contour`, { signal });
|
|
1139
1155
|
if (!geoResponse.ok)
|
|
1140
1156
|
return Promise.reject(geoResponse);
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1157
|
+
geoResults = yield geoResponse.json();
|
|
1158
|
+
if (geoResults.length === 0) {
|
|
1159
|
+
const geoResponse = yield fetch(`https://geo.api.gouv.fr/communes?lat=${search.latitude}&lon=${search.longitude}&fields=departement,codesPostaux,centre,contour`, { signal });
|
|
1160
|
+
if (!geoResponse.ok)
|
|
1161
|
+
return Promise.reject(geoResponse);
|
|
1162
|
+
geoResults = yield geoResponse.json();
|
|
1163
|
+
}
|
|
1164
|
+
return formatData(geoResults);
|
|
1144
1165
|
}
|
|
1145
1166
|
catch (error) {
|
|
1146
1167
|
if (typeof error === 'string')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"municipalitySearch.d.ts","sourceRoot":"","sources":["../src/municipalitySearch.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE;QACL,MAAM,EAAE;YAAE,QAAQ,EAAE,MAAM,CAAC;YAAC,SAAS,EAAE,MAAM,CAAA;SAAE,GAAG,IAAI,CAAA;QACtD,IAAI,EAAE,MAAM,CAAA;QACZ,OAAO,EAAE,MAAM,CAAA;QACf,OAAO,EAAE,KAAK,CAAC;YAAE,QAAQ,EAAE,MAAM,CAAC;YAAC,SAAS,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;QACvD,OAAO,E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
-
}
|
|
12
|
+
}>[];
|
|
13
13
|
zipcode: string;
|
|
14
|
-
postcode: string | null;
|
|
15
|
-
district: string | null;
|
|
16
14
|
};
|
|
17
15
|
export declare const get: (search: {
|
|
18
16
|
latitude: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reverseGeolocSearch.d.ts","sourceRoot":"","sources":["../src/reverseGeolocSearch.ts"],"names":[],"mappings":"AAEA,oBAAY,yBAAyB,GAAG;IACtC,MAAM,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAA;IAC/C,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC7B,OAAO,EAAE,KAAK,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"reverseGeolocSearch.d.ts","sourceRoot":"","sources":["../src/reverseGeolocSearch.ts"],"names":[],"mappings":"AAEA,oBAAY,yBAAyB,GAAG;IACtC,MAAM,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAA;IAC/C,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC7B,OAAO,EAAE,KAAK,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,CAAA;IACzD,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAgGD,eAAO,MAAM,GAAG,WACN;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,kBAChC,MAAM,uCAEpB,QAAQ,yBAAyB,EAAE,CAQrC,CAAA"}
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const convertFirstLetterToUpperCase: (str: string) => string;
|
|
2
|
-
export declare const getUri: (search: string, departmentOnly: boolean) => string;
|
|
2
|
+
export declare const getUri: (search: string, departmentOnly: boolean, withType?: boolean) => string;
|
|
3
3
|
//# sourceMappingURL=utils.d.ts.map
|
package/dist/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,6BAA6B,QAAS,MAAM,WAMxD,CAAA;AAED,eAAO,MAAM,MAAM,WAAY,MAAM,kBAAkB,OAAO,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,6BAA6B,QAAS,MAAM,WAMxD,CAAA;AAED,eAAO,MAAM,MAAM,WAAY,MAAM,kBAAkB,OAAO,aAAY,OAAO,WAgBhF,CAAA"}
|