@proprioo/salatim 19.2.0 → 19.3.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/CHANGELOG.md +5 -0
- package/lib/index.js +276 -276
- package/lib/index.js.map +1 -1
- package/lib/ui/src/gmapsAutoComplete/GmapsAutocomplete.d.ts +4 -13
- package/lib/ui/src/gmapsAutoComplete/GmapsAutocomplete.js +28 -38
- package/lib/ui/src/gmapsAutoComplete/GmapsAutocomplete.js.map +1 -1
- package/lib/ui/src/gmapsGeocode/GmapsGeocode.d.ts +4 -7
- package/lib/ui/src/gmapsGeocode/GmapsGeocode.js +21 -36
- package/lib/ui/src/gmapsGeocode/GmapsGeocode.js.map +1 -1
- package/lib/ui/src/gmapsSuggestions/GmapsSuggestions.js +2 -2
- package/lib/ui/src/gmapsSuggestions/GmapsSuggestions.js.map +1 -1
- package/lib/utils/src/gmaps.d.ts +10 -0
- package/lib/utils/src/gmaps.js +19 -1
- package/lib/utils/src/gmaps.js.map +1 -1
- package/lib/utils/src/gmaps.test.js +48 -0
- package/lib/utils/src/gmaps.test.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,23 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FC } from 'react';
|
|
2
2
|
import { GenericInputProps } from '../../../utils';
|
|
3
3
|
export interface GmapsAutocompleteProps extends GenericInputProps {
|
|
4
4
|
value: string;
|
|
5
5
|
country?: string;
|
|
6
|
-
types?: string[];
|
|
7
6
|
id?: string;
|
|
7
|
+
types?: string[];
|
|
8
|
+
withGeocodeType?: boolean;
|
|
8
9
|
onChange(value: string): void;
|
|
9
10
|
onSelect(value: string): void;
|
|
10
11
|
onError?(error: string): void;
|
|
11
12
|
}
|
|
12
|
-
|
|
13
|
-
isOpen: boolean;
|
|
14
|
-
address: string;
|
|
15
|
-
}
|
|
16
|
-
declare class GmapsAutocomplete extends PureComponent<GmapsAutocompleteProps, StateProps> {
|
|
17
|
-
constructor(props: GmapsAutocompleteProps);
|
|
18
|
-
handleChange(address: string): void;
|
|
19
|
-
handleSelect(address: string): void;
|
|
20
|
-
componentDidUpdate(prevProps: GmapsAutocompleteProps): void;
|
|
21
|
-
render(): JSX.Element;
|
|
22
|
-
}
|
|
13
|
+
declare const GmapsAutocomplete: FC<GmapsAutocompleteProps>;
|
|
23
14
|
export default GmapsAutocomplete;
|
|
@@ -24,48 +24,38 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
const react_1 = __importStar(require("react"));
|
|
26
26
|
const react_places_autocomplete_1 = __importDefault(require("react-places-autocomplete"));
|
|
27
|
+
const gmaps_1 = require("../../../utils/src/gmaps");
|
|
27
28
|
const GmapsSuggestions_1 = __importDefault(require("../gmapsSuggestions/GmapsSuggestions"));
|
|
28
29
|
const Input_1 = require("../input/Input");
|
|
29
30
|
const InputBase_1 = __importStar(require("../inputBase/InputBase"));
|
|
30
31
|
const InputLoader_1 = __importDefault(require("../inputLoader/InputLoader"));
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
if (prevProps.value !== value) {
|
|
56
|
-
this.setState(prevState => (Object.assign(Object.assign({}, prevState), { address: value })));
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
render() {
|
|
60
|
-
const { label, error, disabled, zIndex = 0, focused, onError, country = 'FR', types = ['address'], dataTest, required, id } = this.props;
|
|
61
|
-
const { address, isOpen } = this.state;
|
|
62
|
-
return (react_1.default.createElement(react_places_autocomplete_1.default, { value: address, onChange: this.handleChange, onSelect: this.handleSelect, onError: onError, highlightFirstSuggestion: true, searchOptions: {
|
|
63
|
-
types,
|
|
64
|
-
componentRestrictions: { country }
|
|
65
|
-
} }, ({ suggestions, getInputProps, getSuggestionItemProps, loading }) => (react_1.default.createElement(InputBase_1.default, { zIndex: isOpen ? InputBase_1.ZINDEX_OPEN : zIndex, type: Input_1.InputType.TEXT, "data-test": "select-wrapper-input-base", label: label, disabled: disabled, error: error, value: address, dataTest: dataTest, required: required, id: id, gmap: Object.assign({}, getInputProps({
|
|
32
|
+
const GmapsAutocomplete = ({ country = 'FR', dataTest, disabled, error, focused, id, label, required, types = ['address'], value, withGeocodeType = false, zIndex = 0, onChange, onSelect, onError }) => {
|
|
33
|
+
const [{ isOpen, address }, setState] = (0, react_1.useState)({
|
|
34
|
+
isOpen: false,
|
|
35
|
+
address: value
|
|
36
|
+
});
|
|
37
|
+
const handleChange = (address) => {
|
|
38
|
+
setState({ isOpen: true, address });
|
|
39
|
+
onChange(address);
|
|
40
|
+
};
|
|
41
|
+
const handleSelect = (address) => {
|
|
42
|
+
setState({ isOpen: false, address });
|
|
43
|
+
onSelect(address);
|
|
44
|
+
};
|
|
45
|
+
(0, react_1.useEffect)(() => {
|
|
46
|
+
setState({ isOpen, address: value });
|
|
47
|
+
}, [value]);
|
|
48
|
+
return (react_1.default.createElement(react_places_autocomplete_1.default, { value: address, onChange: handleChange, onSelect: handleSelect, onError: onError, highlightFirstSuggestion: true, searchOptions: {
|
|
49
|
+
types,
|
|
50
|
+
componentRestrictions: { country }
|
|
51
|
+
} }, ({ suggestions, getInputProps, getSuggestionItemProps, loading }) => {
|
|
52
|
+
const filteredSuggestions = withGeocodeType
|
|
53
|
+
? (0, gmaps_1.getGeoSearchSuggestions)(suggestions)
|
|
54
|
+
: suggestions;
|
|
55
|
+
return (react_1.default.createElement(InputBase_1.default, { zIndex: isOpen ? InputBase_1.ZINDEX_OPEN : zIndex, type: Input_1.InputType.TEXT, "data-test": "select-wrapper-input-base", label: label, disabled: disabled, error: error, value: address, dataTest: dataTest, required: required, id: id, gmap: Object.assign({}, getInputProps({
|
|
66
56
|
autoFocus: focused
|
|
67
|
-
})), field: loading && suggestions.length === 0 ? (react_1.default.createElement(InputLoader_1.default, null)) : isOpen ? (react_1.default.createElement(GmapsSuggestions_1.default, { suggestions:
|
|
68
|
-
}
|
|
69
|
-
}
|
|
57
|
+
})), field: loading && suggestions.length === 0 ? (react_1.default.createElement(InputLoader_1.default, null)) : isOpen && Boolean(filteredSuggestions.length) ? (react_1.default.createElement(GmapsSuggestions_1.default, { suggestions: filteredSuggestions, getSuggestionItemProps: getSuggestionItemProps })) : (react_1.default.createElement(react_1.Fragment, null)) }));
|
|
58
|
+
}));
|
|
59
|
+
};
|
|
70
60
|
exports.default = GmapsAutocomplete;
|
|
71
61
|
//# sourceMappingURL=GmapsAutocomplete.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GmapsAutocomplete.js","sourceRoot":"","sources":["../../../../packages/ui/src/gmapsAutoComplete/GmapsAutocomplete.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,+
|
|
1
|
+
{"version":3,"file":"GmapsAutocomplete.js","sourceRoot":"","sources":["../../../../packages/ui/src/gmapsAutoComplete/GmapsAutocomplete.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAiE;AACjE,0FAA2E;AAG3E,oDAAmE;AACnE,4FAAoE;AACpE,0CAA2C;AAC3C,oEAAgE;AAChE,6EAAqD;AAkBrD,MAAM,iBAAiB,GAA+B,CAAC,EACrD,OAAO,GAAG,IAAI,EACd,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,OAAO,EACP,EAAE,EACF,KAAK,EACL,QAAQ,EACR,KAAK,GAAG,CAAC,SAAS,CAAC,EACnB,KAAK,EACL,eAAe,GAAG,KAAK,EACvB,MAAM,GAAG,CAAC,EACV,QAAQ,EACR,QAAQ,EACR,OA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EAAE,iBAAS,CAAC,IAAI,eACV,2BAA2B,EACrC,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,EAAE,EAAE,EAAE,EACN,IAAI,oBACC,aAAa,CAAC;gBACf,SAAS,EAAE,OAAO;aACnB,CAAC,GAEJ,KAAK,EACH,OAAO,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CACpC,8BAAC,qBAAW,OAAG,CAChB,CAAC,CAAC,CAAC,MAAM,IAAI,OAAO,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAClD,8BAAC,0BAAgB,IACf,WAAW,EAAE,mBAAmC,EAChD,sBAAsB,EAAE,sBAAsB,GAC9C,CACH,CAAC,CAAC,CAAC,CACF,8BAAC,gBAAQ,OAAG,CACb,GAEH,CACH,CAAC;IACJ,CAAC,CACkB,CACtB,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,iBAAiB,CAAC"}
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
/// <reference types="googlemaps" />
|
|
2
2
|
/// <reference types="google.maps" />
|
|
3
|
-
import {
|
|
3
|
+
import { FC } from 'react';
|
|
4
4
|
import { GenericInputProps } from '../../../utils';
|
|
5
5
|
export interface GmapsGeocodeProps extends GenericInputProps {
|
|
6
6
|
value: string;
|
|
7
7
|
country?: string;
|
|
8
|
-
types?: string[];
|
|
9
8
|
id?: string;
|
|
9
|
+
types?: string[];
|
|
10
|
+
withGeocodeType?: boolean;
|
|
10
11
|
onChange(address: string): void;
|
|
11
12
|
onSelect(place: google.maps.GeocoderResult): void;
|
|
12
13
|
onError?(error: string): void;
|
|
13
14
|
}
|
|
14
|
-
declare
|
|
15
|
-
constructor(props: GmapsGeocodeProps);
|
|
16
|
-
handleOnSelect(value: string): void;
|
|
17
|
-
render(): JSX.Element;
|
|
18
|
-
}
|
|
15
|
+
declare const GmapsGeocode: FC<GmapsGeocodeProps>;
|
|
19
16
|
export default GmapsGeocode;
|
|
@@ -1,22 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
-
}) : function(o, v) {
|
|
12
|
-
o["default"] = v;
|
|
13
|
-
});
|
|
14
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
-
if (mod && mod.__esModule) return mod;
|
|
16
|
-
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
-
__setModuleDefault(result, mod);
|
|
19
|
-
return result;
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
20
10
|
};
|
|
21
11
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
22
12
|
var t = {};
|
|
@@ -33,28 +23,23 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
33
23
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
34
24
|
};
|
|
35
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
const react_1 =
|
|
26
|
+
const react_1 = __importDefault(require("react"));
|
|
37
27
|
const react_places_autocomplete_1 = require("react-places-autocomplete");
|
|
38
28
|
const GmapsAutocomplete_1 = __importDefault(require("../gmapsAutoComplete/GmapsAutocomplete"));
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
.then(results => onSelect(results[0]))
|
|
48
|
-
.catch(error => {
|
|
29
|
+
const GmapsGeocode = (_a) => {
|
|
30
|
+
var { onSelect, onError } = _a, rest = __rest(_a, ["onSelect", "onError"]);
|
|
31
|
+
const handleOnSelect = (value) => __awaiter(void 0, void 0, void 0, function* () {
|
|
32
|
+
try {
|
|
33
|
+
const [result] = yield (0, react_places_autocomplete_1.geocodeByAddress)(value);
|
|
34
|
+
onSelect(result);
|
|
35
|
+
}
|
|
36
|
+
catch (error) {
|
|
49
37
|
if (onError) {
|
|
50
38
|
onError(error);
|
|
51
39
|
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
return (react_1.default.createElement(GmapsAutocomplete_1.default, Object.assign({}, rest, { onSelect: value => this.handleOnSelect(value) })));
|
|
57
|
-
}
|
|
58
|
-
}
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
return (react_1.default.createElement(GmapsAutocomplete_1.default, Object.assign({}, rest, { onError: onError, onSelect: handleOnSelect })));
|
|
43
|
+
};
|
|
59
44
|
exports.default = GmapsGeocode;
|
|
60
45
|
//# sourceMappingURL=GmapsGeocode.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GmapsGeocode.js","sourceRoot":"","sources":["../../../../packages/ui/src/gmapsGeocode/GmapsGeocode.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GmapsGeocode.js","sourceRoot":"","sources":["../../../../packages/ui/src/gmapsGeocode/GmapsGeocode.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAkC;AAClC,yEAA6D;AAG7D,+FAAuE;AAavE,MAAM,YAAY,GAA0B,CAAC,EAI5C,EAAE,EAAE;QAJwC,EAC3C,QAAQ,EACR,OAAO,OAER,EADI,IAAI,cAHoC,uBAI5C,CADQ;IAEP,MAAM,cAAc,GAAG,CAAO,KAAa,EAAE,EAAE;QAC7C,IAAI;YACF,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,IAAA,4CAAgB,EAAC,KAAK,CAAC,CAAC;YAC/C,QAAQ,CAAC,MAAM,CAAC,CAAC;SAClB;QAAC,OAAO,KAAK,EAAE;YACd,IAAI,OAAO,EAAE;gBACX,OAAO,CAAC,KAAe,CAAC,CAAC;aAC1B;SACF;IACH,CAAC,CAAA,CAAC;IAEF,OAAO,CACL,8BAAC,2BAAiB,oBAAK,IAAI,IAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,cAAc,IAAI,CAC5E,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,YAAY,CAAC"}
|
|
@@ -6,13 +6,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const react_1 = __importDefault(require("react"));
|
|
7
7
|
const Option_1 = __importDefault(require("../option/Option"));
|
|
8
8
|
const Select_styles_1 = require("../select/Select.styles");
|
|
9
|
-
const GmapsSuggestions = ({ suggestions, getSuggestionItemProps }) =>
|
|
9
|
+
const GmapsSuggestions = ({ suggestions, getSuggestionItemProps }) => (react_1.default.createElement(Select_styles_1.Layout, { "data-test": "gmaps-suggestions" },
|
|
10
10
|
react_1.default.createElement(Select_styles_1.ItemContainer, null, suggestions.map((suggestion, index) => (react_1.default.createElement(Select_styles_1.ItemLayout, Object.assign({ "data-test": "item-layout" }, getSuggestionItemProps(suggestion, {
|
|
11
11
|
key: `suggestion-gmap-${index}`
|
|
12
12
|
}), { key: index }),
|
|
13
13
|
react_1.default.createElement(Option_1.default, { value: '', option: {
|
|
14
14
|
value: suggestion.id,
|
|
15
15
|
label: suggestion.description
|
|
16
|
-
} })))))))
|
|
16
|
+
} })))))));
|
|
17
17
|
exports.default = GmapsSuggestions;
|
|
18
18
|
//# sourceMappingURL=GmapsSuggestions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GmapsSuggestions.js","sourceRoot":"","sources":["../../../../packages/ui/src/gmapsSuggestions/GmapsSuggestions.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAwE;AAGxE,8DAAsC;AACtC,2DAA4E;AAuB5E,MAAM,gBAAgB,GAA8B,CAAC,EACnD,WAAW,EACX,sBAAsB,EACvB,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"GmapsSuggestions.js","sourceRoot":"","sources":["../../../../packages/ui/src/gmapsSuggestions/GmapsSuggestions.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAwE;AAGxE,8DAAsC;AACtC,2DAA4E;AAuB5E,MAAM,gBAAgB,GAA8B,CAAC,EACnD,WAAW,EACX,sBAAsB,EACvB,EAAE,EAAE,CAAC,CACJ,8BAAC,sBAAM,iBAAW,mBAAmB;IACnC,8BAAC,6BAAa,QACX,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,KAAK,EAAE,EAAE,CAAC,CACtC,8BAAC,0BAAU,+BACC,aAAa,IACnB,sBAAsB,CAAC,UAAU,EAAE;QACrC,GAAG,EAAE,mBAAmB,KAAK,EAAE;KAChC,CAAC,IACF,GAAG,EAAE,KAAK;QAEV,8BAAC,gBAAM,IACL,KAAK,EAAE,EAAE,EACT,MAAM,EAAE;gBACN,KAAK,EAAE,UAAU,CAAC,EAAE;gBACpB,KAAK,EAAE,UAAU,CAAC,WAAW;aAC9B,GACD,CACS,CACd,CAAC,CACY,CACT,CACV,CAAC;AAEF,kBAAe,gBAAgB,CAAC"}
|
package/lib/utils/src/gmaps.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="googlemaps" />
|
|
2
2
|
/// <reference types="google.maps" />
|
|
3
|
+
import { Suggestion } from 'react-places-autocomplete';
|
|
3
4
|
export declare const POSTAL_CODE: string;
|
|
4
5
|
export declare const LOCALITY: string;
|
|
5
6
|
export declare const STREET_NUMBER: string;
|
|
@@ -20,5 +21,14 @@ export interface GeocoderResultFormatted {
|
|
|
20
21
|
street: GeocoderType;
|
|
21
22
|
streetNumber: GeocoderType;
|
|
22
23
|
}
|
|
24
|
+
export declare enum GoogleSearchType {
|
|
25
|
+
ADMINISTRATIVE_AREA_LEVEL_1 = "administrative_area_level_1",
|
|
26
|
+
ADMINISTRATIVE_AREA_LEVEL_2 = "administrative_area_level_2",
|
|
27
|
+
LOCALITY = "locality",
|
|
28
|
+
NEIGHBORHOOD = "neighborhood",
|
|
29
|
+
POSTAL_CODE = "postal_code",
|
|
30
|
+
SUBLOCALITY = "sublocality"
|
|
31
|
+
}
|
|
23
32
|
export declare const getAddressComponent: (addressComponents: GeocoderAddressComponent[], componentType: string) => GeocoderType;
|
|
24
33
|
export declare const getFormattedAddressComponent: ({ address_components, formatted_address, geometry }: GeocoderResult) => GeocoderResultFormatted;
|
|
34
|
+
export declare const getGeoSearchSuggestions: (suggestions: Suggestion[]) => Suggestion[];
|
package/lib/utils/src/gmaps.js
CHANGED
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getFormattedAddressComponent = exports.getAddressComponent = exports.POSTAL_TOWN = exports.STREET = exports.STREET_NUMBER = exports.LOCALITY = exports.POSTAL_CODE = void 0;
|
|
3
|
+
exports.getGeoSearchSuggestions = exports.getFormattedAddressComponent = exports.getAddressComponent = exports.GoogleSearchType = exports.POSTAL_TOWN = exports.STREET = exports.STREET_NUMBER = exports.LOCALITY = exports.POSTAL_CODE = void 0;
|
|
4
4
|
exports.POSTAL_CODE = 'postal_code';
|
|
5
5
|
exports.LOCALITY = 'locality';
|
|
6
6
|
exports.STREET_NUMBER = 'street_number';
|
|
7
7
|
exports.STREET = 'route';
|
|
8
8
|
exports.POSTAL_TOWN = 'postal_town';
|
|
9
|
+
var GoogleSearchType;
|
|
10
|
+
(function (GoogleSearchType) {
|
|
11
|
+
GoogleSearchType["ADMINISTRATIVE_AREA_LEVEL_1"] = "administrative_area_level_1";
|
|
12
|
+
GoogleSearchType["ADMINISTRATIVE_AREA_LEVEL_2"] = "administrative_area_level_2";
|
|
13
|
+
GoogleSearchType["LOCALITY"] = "locality";
|
|
14
|
+
GoogleSearchType["NEIGHBORHOOD"] = "neighborhood";
|
|
15
|
+
GoogleSearchType["POSTAL_CODE"] = "postal_code";
|
|
16
|
+
GoogleSearchType["SUBLOCALITY"] = "sublocality"; // submunicipality
|
|
17
|
+
})(GoogleSearchType = exports.GoogleSearchType || (exports.GoogleSearchType = {}));
|
|
9
18
|
const getAddressComponent = (addressComponents, componentType) => {
|
|
10
19
|
if (addressComponents.length > 0) {
|
|
11
20
|
const addressComponent = addressComponents.filter(({ types }) => types[0] === componentType);
|
|
@@ -27,4 +36,13 @@ const getFormattedAddressComponent = ({ address_components, formatted_address, g
|
|
|
27
36
|
(0, exports.getAddressComponent)(address_components, exports.POSTAL_TOWN)
|
|
28
37
|
});
|
|
29
38
|
exports.getFormattedAddressComponent = getFormattedAddressComponent;
|
|
39
|
+
const getGeoSearchSuggestions = (suggestions) => suggestions.filter(({ types }) => types.some(type => [
|
|
40
|
+
GoogleSearchType.ADMINISTRATIVE_AREA_LEVEL_1,
|
|
41
|
+
GoogleSearchType.ADMINISTRATIVE_AREA_LEVEL_2,
|
|
42
|
+
GoogleSearchType.LOCALITY,
|
|
43
|
+
GoogleSearchType.NEIGHBORHOOD,
|
|
44
|
+
GoogleSearchType.POSTAL_CODE,
|
|
45
|
+
GoogleSearchType.SUBLOCALITY
|
|
46
|
+
].includes(type)));
|
|
47
|
+
exports.getGeoSearchSuggestions = getGeoSearchSuggestions;
|
|
30
48
|
//# sourceMappingURL=gmaps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gmaps.js","sourceRoot":"","sources":["../../../packages/utils/src/gmaps.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"gmaps.js","sourceRoot":"","sources":["../../../packages/utils/src/gmaps.ts"],"names":[],"mappings":";;;AAEa,QAAA,WAAW,GAAW,aAAa,CAAC;AACpC,QAAA,QAAQ,GAAW,UAAU,CAAC;AAC9B,QAAA,aAAa,GAAW,eAAe,CAAC;AACxC,QAAA,MAAM,GAAW,OAAO,CAAC;AACzB,QAAA,WAAW,GAAW,aAAa,CAAC;AAoBjD,IAAY,gBAOX;AAPD,WAAY,gBAAgB;IAC1B,+EAA2D,CAAA;IAC3D,+EAA2D,CAAA;IAC3D,yCAAqB,CAAA;IACrB,iDAA6B,CAAA;IAC7B,+CAA2B,CAAA;IAC3B,+CAA2B,CAAA,CAAC,kBAAkB;AAChD,CAAC,EAPW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAO3B;AAEM,MAAM,mBAAmB,GAAG,CACjC,iBAA6C,EAC7C,aAAqB,EACP,EAAE;IAChB,IAAI,iBAAiB,CAAC,MAAM,GAAG,CAAC,EAAE;QAChC,MAAM,gBAAgB,GACpB,iBAAiB,CAAC,MAAM,CACtB,CAAC,EAAE,KAAK,EAA4B,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,aAAa,CACpE,CAAC;QAEJ,IAAI,gBAAgB,CAAC,MAAM,KAAK,CAAC,EAAE;YACjC,OAAO,IAAI,CAAC;SACb;QACD,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC;KAC5B;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAhBW,QAAA,mBAAmB,uBAgB9B;AAEK,MAAM,4BAA4B,GAAG,CAAC,EAC3C,kBAAkB,EAClB,iBAAiB,EACjB,QAAQ,EACO,EAA2B,EAAE,CAAC,CAAC;IAC9C,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,MAAM,EAAE;IACpC,UAAU,EAAE,IAAA,2BAAmB,EAAC,kBAAkB,EAAE,mBAAW,CAAC;IAChE,MAAM,EAAE,IAAA,2BAAmB,EAAC,kBAAkB,EAAE,cAAM,CAAC;IACvD,YAAY,EAAE,IAAA,2BAAmB,EAAC,kBAAkB,EAAE,qBAAa,CAAC;IACpE,IAAI,EACF,IAAA,2BAAmB,EAAC,kBAAkB,EAAE,gBAAQ,CAAC;QACjD,IAAA,2BAAmB,EAAC,kBAAkB,EAAE,mBAAW,CAAC;CACvD,CAAC,CAAC;AAbU,QAAA,4BAA4B,gCAatC;AAEI,MAAM,uBAAuB,GAAG,CACrC,WAAyB,EACX,EAAE,CAChB,WAAW,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAC/B,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAChB;IACE,gBAAgB,CAAC,2BAA2B;IAC5C,gBAAgB,CAAC,2BAA2B;IAC5C,gBAAgB,CAAC,QAAQ;IACzB,gBAAgB,CAAC,YAAY;IAC7B,gBAAgB,CAAC,WAAW;IAC5B,gBAAgB,CAAC,WAAW;CAC7B,CAAC,QAAQ,CAAC,IAAwB,CAAC,CACrC,CACF,CAAC;AAdS,QAAA,uBAAuB,2BAchC"}
|
|
@@ -35,6 +35,47 @@ const defaultPlace = {
|
|
|
35
35
|
viewport: new google.maps.LatLngBounds()
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
|
+
const MOCK_SUGGESTIONS = [
|
|
39
|
+
{
|
|
40
|
+
description: '3ème Arrondissement, Paris, France',
|
|
41
|
+
placeId: 'ChIJw0-tXgRu5kcRcBqUaMOCCwU',
|
|
42
|
+
active: true,
|
|
43
|
+
index: 0,
|
|
44
|
+
formattedSuggestion: {
|
|
45
|
+
mainText: '3ème Arrondissement',
|
|
46
|
+
secondaryText: 'Paris, France'
|
|
47
|
+
},
|
|
48
|
+
matchedSubstrings: [
|
|
49
|
+
{ length: 4, offset: 0 },
|
|
50
|
+
{ length: 5, offset: 21 }
|
|
51
|
+
],
|
|
52
|
+
terms: [
|
|
53
|
+
{ offset: 0, value: '3ème Arrondissement' },
|
|
54
|
+
{ offset: 21, value: 'Paris' },
|
|
55
|
+
{ offset: 28, value: 'France' }
|
|
56
|
+
],
|
|
57
|
+
types: ['sublocality_level_1', 'sublocality', 'political', 'geocode'],
|
|
58
|
+
id: '1'
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
description: 'Boulevard de Paris, Marseille, France',
|
|
62
|
+
placeId: 'EiVCb3VsZXZhcmQgZGUgUGFyaXMsIE1hcnNlaWxsZSwgRnJhbmNlIi4qLAoUChIJWeqhb_LAyRIR4ujo6puCeXoSFAoSCTNT2kRDv8kSESACl_2lGQgE',
|
|
63
|
+
active: false,
|
|
64
|
+
index: 1,
|
|
65
|
+
formattedSuggestion: {
|
|
66
|
+
mainText: 'Boulevard de Paris',
|
|
67
|
+
secondaryText: 'Marseille, France'
|
|
68
|
+
},
|
|
69
|
+
matchedSubstrings: [{ length: 5, offset: 13 }],
|
|
70
|
+
terms: [
|
|
71
|
+
{ offset: 0, value: 'Boulevard de Paris' },
|
|
72
|
+
{ offset: 20, value: 'Marseille' },
|
|
73
|
+
{ offset: 31, value: 'France' }
|
|
74
|
+
],
|
|
75
|
+
types: ['route', 'geocode'],
|
|
76
|
+
id: '1'
|
|
77
|
+
}
|
|
78
|
+
];
|
|
38
79
|
describe('getAddressComponent', () => {
|
|
39
80
|
it('should return null on empty address components', () => {
|
|
40
81
|
expect((0, gmaps_1.getAddressComponent)([], gmaps_1.STREET)).toEqual(null);
|
|
@@ -137,4 +178,11 @@ describe('getFormattedAddressComponent', () => {
|
|
|
137
178
|
});
|
|
138
179
|
});
|
|
139
180
|
});
|
|
181
|
+
describe('getGeoSearchSuggestions', () => {
|
|
182
|
+
it('should return only accepted types', () => {
|
|
183
|
+
expect((0, gmaps_1.getGeoSearchSuggestions)(MOCK_SUGGESTIONS)).toEqual([
|
|
184
|
+
MOCK_SUGGESTIONS[0]
|
|
185
|
+
]);
|
|
186
|
+
});
|
|
187
|
+
});
|
|
140
188
|
//# sourceMappingURL=gmaps.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gmaps.test.js","sourceRoot":"","sources":["../../../packages/utils/src/gmaps.test.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"gmaps.test.js","sourceRoot":"","sources":["../../../packages/utils/src/gmaps.test.ts"],"names":[],"mappings":";;AAEA,mCAOiB;AAEjB,MAAM,YAAY,GAGd;IACF,kBAAkB,EAAE;QAClB,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,eAAe,CAAC,EAAE;QAC/D;YACE,SAAS,EAAE,kBAAkB;YAC7B,UAAU,EAAE,kBAAkB;YAC9B,KAAK,EAAE,CAAC,OAAO,CAAC;SACjB;QACD;YACE,SAAS,EAAE,OAAO;YAClB,UAAU,EAAE,OAAO;YACnB,KAAK,EAAE,CAAC,UAAU,EAAE,WAAW,CAAC;SACjC;QACD;YACE,SAAS,EAAE,yBAAyB;YACpC,UAAU,EAAE,yBAAyB;YACrC,KAAK,EAAE,CAAC,6BAA6B,EAAE,WAAW,CAAC;SACpD;QACD;YACE,SAAS,EAAE,eAAe;YAC1B,UAAU,EAAE,eAAe;YAC3B,KAAK,EAAE,CAAC,6BAA6B,EAAE,WAAW,CAAC;SACpD;QACD,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,SAAS,EAAE,WAAW,CAAC,EAAE;QAC1E,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,aAAa,CAAC,EAAE;KACpE;IACD,iBAAiB,EAAE,0CAA0C;IAC7D,QAAQ,EAAE;QACR,QAAQ,EAAE,IAAI,MAAM,CAAC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