@contentful/field-editor-location 1.3.5 → 1.3.8
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.
|
@@ -169,9 +169,9 @@ class LocationEditor extends _react.Component {
|
|
|
169
169
|
});
|
|
170
170
|
});
|
|
171
171
|
this.state = {
|
|
172
|
-
localValue: props
|
|
173
|
-
lng: props.value.lon,
|
|
174
|
-
lat: props.value.lat
|
|
172
|
+
localValue: props?.value?.lon || props?.value?.lat ? {
|
|
173
|
+
lng: props.value.lon ?? 0,
|
|
174
|
+
lat: props.value.lat ?? 0
|
|
175
175
|
} : undefined,
|
|
176
176
|
mapsObject: null
|
|
177
177
|
};
|
|
@@ -107,9 +107,9 @@ export class LocationEditor extends React.Component {
|
|
|
107
107
|
});
|
|
108
108
|
});
|
|
109
109
|
this.state = {
|
|
110
|
-
localValue: props
|
|
111
|
-
lng: props.value.lon,
|
|
112
|
-
lat: props.value.lat
|
|
110
|
+
localValue: props?.value?.lon || props?.value?.lat ? {
|
|
111
|
+
lng: props.value.lon ?? 0,
|
|
112
|
+
lat: props.value.lat ?? 0
|
|
113
113
|
} : undefined,
|
|
114
114
|
mapsObject: null
|
|
115
115
|
};
|
|
@@ -32,9 +32,9 @@ export declare class LocationEditor extends React.Component<LocationEditorProps,
|
|
|
32
32
|
constructor(props: LocationEditorProps);
|
|
33
33
|
onSearchAddress: (value: string) => Promise<GeocodeApiResponse>;
|
|
34
34
|
onGetAddressFromLocation: (location: Coords | undefined, value: string) => Promise<string>;
|
|
35
|
-
render():
|
|
35
|
+
render(): JSX.Element;
|
|
36
36
|
}
|
|
37
|
-
export declare function LocationEditorConnected(props: LocationEditorConnectedProps):
|
|
37
|
+
export declare function LocationEditorConnected(props: LocationEditorConnectedProps): JSX.Element;
|
|
38
38
|
export declare namespace LocationEditorConnected {
|
|
39
39
|
var defaultProps: {
|
|
40
40
|
isInitiallyDisabled: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { Coords, GeocodeApiResponse } from './types';
|
|
3
3
|
type LocationSearchInputProps = {
|
|
4
4
|
disabled: boolean;
|
|
@@ -7,5 +7,5 @@ type LocationSearchInputProps = {
|
|
|
7
7
|
onGetAddressFromLocation: (coors: Coords | undefined, value: string) => Promise<string>;
|
|
8
8
|
onChangeLocation: (location?: Coords) => void;
|
|
9
9
|
};
|
|
10
|
-
export declare function LocationSearchInput(props: LocationSearchInputProps):
|
|
10
|
+
export declare function LocationSearchInput(props: LocationSearchInputProps): JSX.Element;
|
|
11
11
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { Coords, GeocodeApiResponse, ViewType } from './types';
|
|
3
3
|
interface LocationSelectorProps {
|
|
4
4
|
disabled: boolean;
|
|
@@ -9,5 +9,5 @@ interface LocationSelectorProps {
|
|
|
9
9
|
onSearchAddress: (value: string) => Promise<GeocodeApiResponse>;
|
|
10
10
|
onGetAddressFromLocation: (location: Coords | undefined, address: string) => Promise<string>;
|
|
11
11
|
}
|
|
12
|
-
export declare function LocationSelector(props: LocationSelectorProps):
|
|
12
|
+
export declare function LocationSelector(props: LocationSelectorProps): JSX.Element;
|
|
13
13
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/field-editor-location",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.8",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@contentful/f36-components": "^4.0.27",
|
|
37
37
|
"@contentful/f36-tokens": "^4.0.0",
|
|
38
|
-
"@contentful/field-editor-shared": "^1.4.
|
|
38
|
+
"@contentful/field-editor-shared": "^1.4.4",
|
|
39
39
|
"@types/google-map-react": "2.1.7",
|
|
40
40
|
"deep-equal": "2.2.2",
|
|
41
41
|
"emotion": "^10.0.17",
|
|
@@ -43,10 +43,13 @@
|
|
|
43
43
|
"lodash": "^4.17.15"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@contentful/field-editor-test-utils": "^1.4.
|
|
46
|
+
"@contentful/field-editor-test-utils": "^1.4.5"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"react": ">=16.8.0"
|
|
50
50
|
},
|
|
51
|
-
"
|
|
51
|
+
"publishConfig": {
|
|
52
|
+
"registry": "https://npm.pkg.github.com/"
|
|
53
|
+
},
|
|
54
|
+
"gitHead": "b1f62d6b934520b6d4dc328921dd500381d1e22c"
|
|
52
55
|
}
|