homeflowjs 0.12.21 → 0.12.23

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.
@@ -15,6 +15,7 @@ const BranchesSearchInput = ({
15
15
  label,
16
16
  isRequired,
17
17
  submitOnSelect,
18
+ resetPlaceId,
18
19
  }) => {
19
20
  const { branchesSearch } = useSelector((state) => state?.branches);
20
21
  const dispatch = useDispatch();
@@ -130,6 +131,9 @@ const BranchesSearchInput = ({
130
131
  // eslint-disable-next-line no-unused-vars
131
132
  onChange: (_, { newValue, method }) => {
132
133
  dispatch(setBranchesSearch(newValue));
134
+ if (resetPlaceId) {
135
+ setPlaceID('');
136
+ }
133
137
  },
134
138
  }}
135
139
  highlightFirstSuggestion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homeflowjs",
3
- "version": "0.12.21",
3
+ "version": "0.12.23",
4
4
  "sideEffects": [
5
5
  "modal/**/*",
6
6
  "user/default-profile/**/*",
@@ -9,9 +9,9 @@ const PropertyLeafletMap = ({ CustomPopup }) => {
9
9
  const customIconAnchor = Homeflow.get('custom_map_icon_anchor');
10
10
 
11
11
  const defaultIcon = L.icon({
12
- iconRetinaUrl: '/assets/marker-icon.png',
12
+ iconRetinaUrl: customIcon || '/assets/marker-icon.png',
13
13
  iconUrl: customIcon || '/assets/marker-icon.png',
14
- shadowUrl: '/assets/marker-shadow.png',
14
+ shadowUrl: customIcon || '/assets/marker-shadow.png',
15
15
  iconAnchor: customIconAnchor || [12, 41]
16
16
  });
17
17
 
@@ -10,8 +10,8 @@ import '../properties-map/leaflet.css';
10
10
 
11
11
  const PropertyLeafletMap = React.lazy(() => import('./property-leaflet-map.component'));
12
12
 
13
- const LazyLeafletMap = (props) => (
14
- <Suspense fallback={<div>Loading</div>}>
13
+ const LazyLeafletMap = ({ placeholder, ...props }) => (
14
+ <Suspense fallback={placeholder}>
15
15
  <PropertyLeafletMap {...props} />
16
16
  </Suspense>
17
17
  );
@@ -76,10 +76,10 @@ class PropertyMap extends React.Component {
76
76
  }
77
77
 
78
78
  render() {
79
- const { google, iconConfig, CustomPopup } = this.props;
79
+ const { google, iconConfig, CustomPopup, placeholder } = this.props;
80
80
 
81
81
  if (!google) {
82
- return <LazyLeafletMap iconConfig={iconConfig} CustomPopup={CustomPopup} />;
82
+ return <LazyLeafletMap iconConfig={iconConfig} CustomPopup={CustomPopup} placeholder={placeholder} />;
83
83
  }
84
84
 
85
85
  return (
@@ -98,6 +98,7 @@ PropertyMap.propTypes = {
98
98
  google: PropTypes.bool,
99
99
  iconConfig: PropTypes.object,
100
100
  CustomPopup: PropTypes.elementType,
101
+ placeholder: PropTypes.object,
101
102
  };
102
103
 
103
104
  PropertyMap.defaultProps = {
@@ -109,6 +110,7 @@ PropertyMap.defaultProps = {
109
110
  google: false,
110
111
  iconConfig: null,
111
112
  CustomPopup: null,
113
+ placeholder: <div>Loading</div>,
112
114
  };
113
115
 
114
116
  const mapDispatchToProps = {