homeflowjs 0.13.33 → 0.13.35

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
- updateState('postcode', e.target.value.toUpperCase());
144
- addressLookup(e.target.value);
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "homeflowjs",
3
- "version": "0.13.33",
3
+ "version": "0.13.35",
4
4
  "sideEffects": [
5
5
  "modal/**/*",
6
6
  "user/default-profile/**/*",
@@ -73,6 +73,9 @@ export default class DraggableMap {
73
73
  }
74
74
  Homeflow.kickEvent('map_view_rendered', this);
75
75
  store.dispatch(setLoading({ propertiesMap: false }));
76
+ if (Homeflow.get('draw_map_search_loader')) {
77
+ this.drawSearchLoader = document.querySelector(`${Homeflow.get('draw_map_search_loader')}`);
78
+ }
76
79
  return this.mapLoadedTimes = 2;
77
80
  }
78
81
 
@@ -652,6 +655,9 @@ export default class DraggableMap {
652
655
  fetch(url)
653
656
  .then((response) => response.json())
654
657
  .then((json) => {
658
+ if (this.drawSearchLoader) {
659
+ this.drawSearchLoader.style.display = 'none';
660
+ }
655
661
  store.dispatch(setPagination(json.pagination))
656
662
  // TODO: implement user history
657
663
  // Ctesius.getUserHistoryCollection().addSearch(s);
@@ -177,6 +177,11 @@ export default class DrawableMap extends DraggableMap {
177
177
  theMap.removeLayer(layer);
178
178
  }
179
179
  });
180
+
181
+ if (this.drawSearchLoader) {
182
+ this.drawSearchLoader.style.display = 'grid';
183
+ }
184
+
180
185
  return Homeflow.kickEvent('drawbannertoggled', this);
181
186
  });
182
187
 
@@ -218,7 +223,7 @@ export default class DrawableMap extends DraggableMap {
218
223
 
219
224
  this.onPolygonDrawn(layer, true);
220
225
  this.updateURL();
221
- window.location.hash = "map/" + poly;
226
+ window.location.hash = "map";
222
227
  countOfEditedLayers++;
223
228
  });
224
229