homeflowjs 0.13.32 → 0.13.34
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/README.md
CHANGED
@@ -70,4 +70,3 @@ This is a known issue with peer dependencies, see this comment and containing th
|
|
70
70
|
## Deploy
|
71
71
|
|
72
72
|
To create a new version of HomeflowJS when merging to master, keep an eye on the Jenkins build, it pauses and waits for publish confirmation where you can enter the new version number and publish.
|
73
|
-
|
@@ -140,8 +140,10 @@ const IntroStep = ({
|
|
140
140
|
type="text"
|
141
141
|
value={search.postcode}
|
142
142
|
onChange={(e) => {
|
143
|
-
|
144
|
-
|
143
|
+
const { value } = e.target;
|
144
|
+
|
145
|
+
updateState('postcode', value?.toUpperCase());
|
146
|
+
if (value?.replace(/\s/g, '')?.length >= 4) addressLookup(value);
|
145
147
|
}}
|
146
148
|
placeholder="Enter full postcode (with a space)..."
|
147
149
|
/>
|
package/package.json
CHANGED
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
|
|
3
3
|
import L from 'leaflet';
|
4
4
|
import { MapContainer, TileLayer, Marker, Popup } from 'react-leaflet';
|
5
5
|
|
6
|
-
const PropertyLeafletMap = ({ CustomPopup }) => {
|
6
|
+
const PropertyLeafletMap = ({ CustomPopup, leafletWhenReady }) => {
|
7
7
|
const property = Homeflow.get('property');
|
8
8
|
const customIcon = Homeflow.get('custom_map_icon');
|
9
9
|
const customIconAnchor = Homeflow.get('custom_map_icon_anchor');
|
@@ -21,6 +21,9 @@ const PropertyLeafletMap = ({ CustomPopup }) => {
|
|
21
21
|
zoom={property?.agency_zoom_level || 100}
|
22
22
|
scrollWheelZoom={false}
|
23
23
|
style={{ height: '100%' }}
|
24
|
+
{...leafletWhenReady && {
|
25
|
+
whenReady: leafletWhenReady,
|
26
|
+
}}
|
24
27
|
>
|
25
28
|
<TileLayer
|
26
29
|
attribution='© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
|
@@ -39,10 +42,12 @@ const PropertyLeafletMap = ({ CustomPopup }) => {
|
|
39
42
|
|
40
43
|
PropertyLeafletMap.propTypes = {
|
41
44
|
CustomPopup: PropTypes.elementType,
|
45
|
+
leafletWhenReady: PropTypes.func,
|
42
46
|
};
|
43
47
|
|
44
48
|
PropertyLeafletMap.defaultProps = {
|
45
49
|
CustomPopup: null,
|
50
|
+
leafletWhenReady: null,
|
46
51
|
};
|
47
52
|
|
48
53
|
export default PropertyLeafletMap;
|
@@ -76,10 +76,16 @@ class PropertyMap extends React.Component {
|
|
76
76
|
}
|
77
77
|
|
78
78
|
render() {
|
79
|
-
const { google, iconConfig, CustomPopup, placeholder } = this.props;
|
79
|
+
const { google, iconConfig, CustomPopup, placeholder, leafletWhenReady } = this.props;
|
80
80
|
|
81
81
|
if (!google) {
|
82
|
-
return
|
82
|
+
return (
|
83
|
+
<LazyLeafletMap
|
84
|
+
iconConfig={iconConfig}
|
85
|
+
CustomPopup={CustomPopup}
|
86
|
+
placeholder={placeholder}
|
87
|
+
leafletWhenReady={leafletWhenReady}
|
88
|
+
/>);
|
83
89
|
}
|
84
90
|
|
85
91
|
return (
|
@@ -99,6 +105,7 @@ PropertyMap.propTypes = {
|
|
99
105
|
iconConfig: PropTypes.object,
|
100
106
|
CustomPopup: PropTypes.elementType,
|
101
107
|
placeholder: PropTypes.object,
|
108
|
+
leafletWhenReady: PropTypes.func,
|
102
109
|
};
|
103
110
|
|
104
111
|
PropertyMap.defaultProps = {
|
@@ -111,6 +118,7 @@ PropertyMap.defaultProps = {
|
|
111
118
|
iconConfig: null,
|
112
119
|
CustomPopup: null,
|
113
120
|
placeholder: <div>Loading</div>,
|
121
|
+
leafletWhenReady: null,
|
114
122
|
};
|
115
123
|
|
116
124
|
const mapDispatchToProps = {
|