@appbaseio/reactivesearch-vue 1.34.0-alpha.2 → 1.34.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.
Files changed (104) hide show
  1. package/dist/@appbaseio/reactivesearch-vue.umd.js +10874 -8633
  2. package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
  3. package/dist/@appbaseio/reactivesearch-vue.umd.min.js +12 -11
  4. package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
  5. package/dist/cjs/Button-841fd06d.js +62 -0
  6. package/dist/cjs/{CancelSvg-062a42f0.js → CancelSvg-220a7cc3.js} +40 -32
  7. package/dist/cjs/Card-240f283d.js +30 -0
  8. package/dist/cjs/{ComponentWrapper-db45cc6d.js → ComponentWrapper-94c50228.js} +7 -7
  9. package/dist/cjs/Container-e699ea95.js +15 -0
  10. package/dist/cjs/DataSearch.js +1312 -20
  11. package/dist/cjs/{DropDown-3b899b20.js → DropDown-7a52c661.js} +79 -78
  12. package/dist/cjs/DynamicRangeSlider.js +46 -56
  13. package/dist/cjs/Flex-ddd7cb6b.js +50 -0
  14. package/dist/cjs/FormControlList-bbb5cd24.js +45 -0
  15. package/dist/cjs/Input-ead4cd84.js +77 -0
  16. package/dist/cjs/ListItem-5088bd6a.js +45 -0
  17. package/dist/cjs/MultiDropdownList.js +68 -74
  18. package/dist/cjs/MultiList.js +94 -89
  19. package/dist/cjs/MultiRange.js +44 -54
  20. package/dist/cjs/{Pagination-a468f960.js → Pagination-e56a5b79.js} +53 -56
  21. package/dist/cjs/{PreferencesConsumer-034c55e3.js → PreferencesConsumer-5e6e84a2.js} +5 -6
  22. package/dist/cjs/RangeInput.js +107 -115
  23. package/dist/cjs/RangeSlider.js +39 -50
  24. package/dist/cjs/ReactiveBase.js +55 -69
  25. package/dist/cjs/ReactiveComponent.js +316 -46
  26. package/dist/cjs/{ReactiveComponent-f0f486ca.js → ReactiveComponentPrivate-244c6055.js} +321 -618
  27. package/dist/cjs/ReactiveComponentPrivate.js +55 -0
  28. package/dist/cjs/ReactiveGoogleMap.js +439 -384
  29. package/dist/cjs/ReactiveList.js +128 -100
  30. package/dist/cjs/ResultCard.js +19 -26
  31. package/dist/cjs/ResultList.js +27 -31
  32. package/dist/cjs/SelectedFilters.js +34 -49
  33. package/dist/cjs/SingleDropdownList.js +66 -73
  34. package/dist/cjs/SingleList.js +96 -90
  35. package/dist/cjs/SingleRange.js +42 -48
  36. package/dist/cjs/StateProvider.js +2 -2
  37. package/dist/cjs/Tags-4ec43831.js +883 -0
  38. package/dist/cjs/Title-16042ea0.js +15 -0
  39. package/dist/cjs/ToggleButton.js +34 -39
  40. package/dist/cjs/{index-dc25b706.js → index-de136c17.js} +8 -6
  41. package/dist/cjs/index.js +27 -25
  42. package/dist/cjs/initReactivesearch.js +0 -3
  43. package/dist/cjs/install.js +23 -22
  44. package/dist/cjs/ssr-f2fc1bf6.js +36 -0
  45. package/dist/cjs/version.js +1 -1
  46. package/dist/cjs/{vueTypes-621a8143.js → vueTypes-b7007f5f.js} +3 -2
  47. package/dist/es/Button-153cd885.js +53 -0
  48. package/dist/es/{CancelSvg-14ebc9a1.js → CancelSvg-e40552a5.js} +37 -30
  49. package/dist/es/{Card-1951569e.js → Card-19ad6d90.js} +6 -5
  50. package/dist/es/{ComponentWrapper-bf443c0b.js → ComponentWrapper-edaeaceb.js} +6 -6
  51. package/dist/es/Container-d00219f7.js +1 -1
  52. package/dist/es/DataSearch.js +1312 -18
  53. package/dist/es/{DropDown-35e232b7.js → DropDown-2c0dd714.js} +78 -78
  54. package/dist/es/DynamicRangeSlider.js +43 -53
  55. package/dist/es/Flex-7c177a10.js +45 -0
  56. package/dist/es/FormControlList-99797d0a.js +38 -0
  57. package/dist/es/Input-c09c0b56.js +69 -0
  58. package/dist/es/{ListItem-47a6345a.js → ListItem-07888a65.js} +7 -6
  59. package/dist/es/MultiDropdownList.js +66 -72
  60. package/dist/es/MultiList.js +93 -88
  61. package/dist/es/MultiRange.js +42 -52
  62. package/dist/es/{Pagination-145b4ff2.js → Pagination-edeb7dbe.js} +53 -56
  63. package/dist/es/{PreferencesConsumer-7ea7313a.js → PreferencesConsumer-86a676c8.js} +4 -5
  64. package/dist/es/RangeInput.js +103 -112
  65. package/dist/es/RangeSlider.js +36 -47
  66. package/dist/es/ReactiveBase.js +53 -68
  67. package/dist/es/ReactiveComponent.js +316 -45
  68. package/dist/es/{ReactiveComponent-e2fb9eb4.js → ReactiveComponentPrivate-6f16e1b7.js} +316 -614
  69. package/dist/es/ReactiveComponentPrivate.js +47 -0
  70. package/dist/es/ReactiveGoogleMap.js +434 -380
  71. package/dist/es/ReactiveList.js +125 -98
  72. package/dist/es/ResultCard.js +18 -25
  73. package/dist/es/ResultList.js +26 -30
  74. package/dist/es/SelectedFilters.js +32 -47
  75. package/dist/es/SingleDropdownList.js +64 -71
  76. package/dist/es/SingleList.js +94 -88
  77. package/dist/es/SingleRange.js +40 -46
  78. package/dist/es/StateProvider.js +2 -2
  79. package/dist/es/Tags-1c2d6c4d.js +869 -0
  80. package/dist/es/Title-863dfa42.js +1 -1
  81. package/dist/es/ToggleButton.js +32 -37
  82. package/dist/es/{index-285a43a6.js → index-5509c0bc.js} +8 -6
  83. package/dist/es/index.js +20 -19
  84. package/dist/es/initReactivesearch.js +0 -3
  85. package/dist/es/install.js +20 -19
  86. package/dist/es/ssr-03607d84.js +1 -1
  87. package/dist/es/version.js +1 -1
  88. package/dist/es/{vueTypes-e4af6fe2.js → vueTypes-66ebc93e.js} +3 -2
  89. package/package.json +10 -10
  90. package/dist/cjs/Button-626c5e8e.js +0 -58
  91. package/dist/cjs/Card-c381ded3.js +0 -26
  92. package/dist/cjs/Container-29f049b2.js +0 -12
  93. package/dist/cjs/DataSearch-7c71ec9f.js +0 -2043
  94. package/dist/cjs/Flex-d5675ea6.js +0 -48
  95. package/dist/cjs/FormControlList-cf1ff2ca.js +0 -42
  96. package/dist/cjs/Input-4d278ca0.js +0 -74
  97. package/dist/cjs/ListItem-c067bc07.js +0 -41
  98. package/dist/cjs/Title-8802a218.js +0 -12
  99. package/dist/cjs/ssr-eb901d09.js +0 -35
  100. package/dist/es/Button-ebafa3d6.js +0 -52
  101. package/dist/es/DataSearch-4f9a4e46.js +0 -2028
  102. package/dist/es/Flex-a08e22d7.js +0 -46
  103. package/dist/es/FormControlList-fa5cf78b.js +0 -38
  104. package/dist/es/Input-3b8408a6.js +0 -69
@@ -8,23 +8,23 @@ var configureStore = require('@appbaseio/reactivecore');
8
8
  var configureStore__default = _interopDefault(configureStore);
9
9
  var constants = require('@appbaseio/reactivecore/lib/utils/constants');
10
10
  var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-f8b843f8.js');
11
- var vue = require('vue');
12
11
  var VueTypes = _interopDefault(require('vue-types'));
13
- var vueEmotion = require('@appbaseio/vue-emotion');
14
- var emotion = require('emotion');
12
+ require('emotion');
13
+ var styled = require('@appbaseio/vue-emotion');
14
+ var styled__default = _interopDefault(styled);
15
15
  require('polished');
16
- require('./Button-626c5e8e.js');
17
- var vueTypes = require('./vueTypes-621a8143.js');
18
- var Pagination = require('./Pagination-a468f960.js');
16
+ require('./Button-841fd06d.js');
17
+ var vueTypes = require('./vueTypes-b7007f5f.js');
18
+ var Pagination = require('./Pagination-e56a5b79.js');
19
19
  require('@appbaseio/reactivecore/lib/utils/transform');
20
20
  require('redux');
21
- var index = require('./index-dc25b706.js');
22
- var ComponentWrapper = require('./ComponentWrapper-db45cc6d.js');
23
- var PreferencesConsumer = require('./PreferencesConsumer-034c55e3.js');
24
- var _transformOn = _interopDefault(require('@vue/babel-helper-vue-transform-on'));
25
- var FormControlList = require('./FormControlList-cf1ff2ca.js');
26
- var VueGoogleMaps = require('vue-google-maps-community-fork');
27
- var VueGoogleMaps__default = _interopDefault(VueGoogleMaps);
21
+ var index = require('./index-de136c17.js');
22
+ var ComponentWrapper = require('./ComponentWrapper-94c50228.js');
23
+ var PreferencesConsumer = require('./PreferencesConsumer-5e6e84a2.js');
24
+ var _mergeJSXProps = _interopDefault(require('@vue/babel-helper-vue-jsx-merge-props'));
25
+ var FormControlList = require('./FormControlList-bbb5cd24.js');
26
+ var GmapVue = require('gmap-vue');
27
+ var GmapVue__default = _interopDefault(GmapVue);
28
28
  var geohash = _interopDefault(require('ngeohash'));
29
29
 
30
30
  var setStreaming = configureStore.Actions.setStreaming,
@@ -116,6 +116,7 @@ var ReactiveMap = {
116
116
  URLParams: VueTypes.bool,
117
117
  autoCenter: VueTypes.bool,
118
118
  getMapRef: VueTypes.func.isRequired,
119
+ getMapPromise: VueTypes.func,
119
120
  center: vueTypes.types.location,
120
121
  defaultCenter: vueTypes.types.location,
121
122
  defaultPin: vueTypes.types.string,
@@ -183,32 +184,37 @@ var ReactiveMap = {
183
184
  }
184
185
  },
185
186
  defaultQuery: function defaultQuery(newVal, oldVal) {
187
+ var _this = this;
186
188
  if (!index.isQueryIdentical(newVal, oldVal, null, this.$props)) {
187
- var options = getQueryOptions(this.$props);
188
- options.from = 0;
189
- this.$defaultQuery = newVal(null, this.$props);
190
- var _ref = this.$defaultQuery || {},
191
- sort = _ref.sort,
192
- query = _ref.query;
193
- if (sort) {
194
- options.sort = this.$defaultQuery.sort;
195
- }
196
- var queryOptions = getOptionsFromQuery(this.$defaultQuery);
197
- if (queryOptions) {
198
- options = _rollupPluginBabelHelpers._extends({}, options, getOptionsFromQuery(this.$defaultQuery));
199
- }
200
- // Update calculated default query in store
201
- this.setQueryOptions(this.$props.componentId, options, false);
202
- var persistMapQuery = true;
203
- var forceExecute = true;
204
- // Update default query to include the geo bounding box query
205
- this.setDefaultQueryForRSAPI();
206
- var meta = {
207
- mapBoxBounds: this.mapBoxBounds
208
- };
209
- this.setMapData(this.componentId, query, persistMapQuery, forceExecute, meta);
210
- this.currentPageState = 0;
211
- this.from = 0;
189
+ this.getMapPromise().then(function () {
190
+ var options = getQueryOptions(_this.$props);
191
+ options.from = 0;
192
+ _this.$defaultQuery = newVal(null, _this.$props);
193
+ // Update default query to include the geo bounding box query
194
+ _this.setDefaultQueryForRSAPI();
195
+ if (_this.$defaultQuery) {
196
+ var _ref = _this.$defaultQuery || {},
197
+ sort = _ref.sort,
198
+ query = _ref.query;
199
+ if (sort) {
200
+ options.sort = _this.$defaultQuery.sort;
201
+ }
202
+ var queryOptions = getOptionsFromQuery(_this.$defaultQuery);
203
+ if (queryOptions) {
204
+ options = _rollupPluginBabelHelpers._extends({}, options, getOptionsFromQuery(_this.$defaultQuery));
205
+ }
206
+ // Update calculated default query in store
207
+ _this.setQueryOptions(_this.$props.componentId, options, false);
208
+ var persistMapQuery = true;
209
+ var forceExecute = true;
210
+ var meta = {
211
+ mapBoxBounds: _this.mapBoxBounds
212
+ };
213
+ _this.setMapData(_this.componentId, query, persistMapQuery, forceExecute, meta);
214
+ _this.currentPageState = 0;
215
+ _this.from = 0;
216
+ }
217
+ });
212
218
  }
213
219
  },
214
220
  promotedResults: function promotedResults(newVal, oldVal) {
@@ -236,7 +242,7 @@ var ReactiveMap = {
236
242
  }
237
243
  },
238
244
  rawData: function rawData(newVal, oldVal) {
239
- var _this = this;
245
+ var _this2 = this;
240
246
  if (!isEqual(newVal, oldVal)) {
241
247
  var promotedResults = this.promotedResults,
242
248
  hits = this.hits;
@@ -255,10 +261,10 @@ var ReactiveMap = {
255
261
  filteredResults = [].concat(parsedPromotedResults, filteredResults);
256
262
  }
257
263
  filteredResults = filteredResults.filter(function (item) {
258
- return !!item[_this.dataField];
264
+ return !!item[_this2.dataField];
259
265
  }).map(function (item) {
260
266
  var _extends2;
261
- return _rollupPluginBabelHelpers._extends({}, item, (_extends2 = {}, _extends2[_this.dataField] = getLocationObject(item[_this.dataField]), _extends2));
267
+ return _rollupPluginBabelHelpers._extends({}, item, (_extends2 = {}, _extends2[_this2.dataField] = getLocationObject(item[_this2.dataField]), _extends2));
262
268
  });
263
269
  this.filteredResults = this.addNoise(filteredResults);
264
270
  if (this.calculateMarkers) {
@@ -303,15 +309,15 @@ var ReactiveMap = {
303
309
  return this.parseLocation(MAP_CENTER);
304
310
  },
305
311
  addNoise: function addNoise(hits) {
306
- var _this2 = this;
312
+ var _this3 = this;
307
313
  var hitMap = {};
308
314
  var updatedHits = [];
309
315
  hits.forEach(function (item) {
310
316
  var updatedItem = _rollupPluginBabelHelpers._extends({}, item);
311
- var location = _this2.parseLocation(item[_this2.dataField]);
317
+ var location = _this3.parseLocation(item[_this3.dataField]);
312
318
  var key = JSON.stringify(location);
313
319
  var count = hitMap[key] || 0;
314
- updatedItem[_this2.dataField] = count ? withDistinctLat(location, count) : location;
320
+ updatedItem[_this3.dataField] = count ? withDistinctLat(location, count) : location;
315
321
  updatedHits = [].concat(updatedHits, [updatedItem]);
316
322
  hitMap[key] = count + 1;
317
323
  });
@@ -324,9 +330,9 @@ var ReactiveMap = {
324
330
  return null;
325
331
  },
326
332
  getHitsCenter: function getHitsCenter(hits) {
327
- var _this3 = this;
333
+ var _this4 = this;
328
334
  var data = hits.map(function (hit) {
329
- return hit[_this3.dataField];
335
+ return hit[_this4.dataField];
330
336
  });
331
337
  if (data.length) {
332
338
  var numCoords = data.length;
@@ -365,7 +371,7 @@ var ReactiveMap = {
365
371
  return false;
366
372
  },
367
373
  getCenter: function getCenter(hits) {
368
- var _this4 = this;
374
+ var _this5 = this;
369
375
  if (this.center) {
370
376
  return this.parseLocation(this.center);
371
377
  }
@@ -373,7 +379,7 @@ var ReactiveMap = {
373
379
  if (mapRef && typeof mapRef.getCenter === 'function' && this.$options.preserveCenter) {
374
380
  var currentCenter = mapRef.getCenter();
375
381
  setTimeout(function () {
376
- _this4.$options.preserveCenter = false;
382
+ _this5.$options.preserveCenter = false;
377
383
  }, 100);
378
384
  return this.parseLocation({
379
385
  lat: currentCenter.lat(),
@@ -431,12 +437,14 @@ var ReactiveMap = {
431
437
  // or whenever searchAsMove is true and the map is dragged
432
438
  if (executeUpdate || !this.skipBoundingBox && !this.mapBoxBounds) {
433
439
  this.$defaultQuery = this.getGeoQuery();
434
- var persistMapQuery = !!this.center;
435
- var forceExecute = this.searchAsMove;
436
- var meta = {
437
- mapBoxBounds: this.mapBoxBounds
438
- };
439
- this.setMapData(this.componentId, this.$defaultQuery, persistMapQuery, forceExecute, meta);
440
+ if (this.$defaultQuery) {
441
+ var persistMapQuery = !!this.center;
442
+ var forceExecute = this.searchAsMove;
443
+ var meta = {
444
+ mapBoxBounds: this.mapBoxBounds
445
+ };
446
+ this.setMapData(this.componentId, this.$defaultQuery, persistMapQuery, forceExecute, meta);
447
+ }
440
448
  }
441
449
  this.skipBoundingBox = false;
442
450
  },
@@ -572,7 +580,8 @@ var ReactiveMap = {
572
580
  geo_bounding_box: (_geo_bounding_box = {}, _geo_bounding_box[this.dataField] = boundingBoxCoordinates, _geo_bounding_box)
573
581
  };
574
582
  if (this.$defaultQuery) {
575
- var query = this.$defaultQuery.query;
583
+ var _ref2 = this.$defaultQuery || {},
584
+ query = _ref2.query;
576
585
  if (query) {
577
586
  // adds defaultQuery's query to geo-query
578
587
  // to generate a map query
@@ -640,15 +649,16 @@ var ReactiveMap = {
640
649
  this.$emit('search-as-move', this.searchAsMove);
641
650
  },
642
651
  renderErrorComponent: function renderErrorComponent() {
643
- var renderError = this.$slots.renderError || this.$props.renderError;
652
+ var renderError = this.$scopedSlots.renderError || this.$props.renderError;
644
653
  if (renderError && this.error && !this.isLoading) {
645
654
  return index.isFunction(renderError) ? renderError(this.error) : renderError;
646
655
  }
647
656
  return null;
648
657
  },
649
658
  renderSearchAsMove: function renderSearchAsMove() {
659
+ var h = this.$createElement;
650
660
  if (this.showSearchAsMove) {
651
- return vue.createVNode("div", {
661
+ return h("div", {
652
662
  "style": {
653
663
  position: 'absolute',
654
664
  bottom: '30px',
@@ -660,29 +670,40 @@ var ReactiveMap = {
660
670
  borderRadius: 2,
661
671
  zIndex: 10000
662
672
  },
663
- "className": getClassName(this.innerClass, 'checkboxContainer') || null
664
- }, [vue.createVNode(FormControlList.Checkbox, {
665
- "type": "checkbox",
673
+ "attrs": {
674
+ "className": getClassName(this.innerClass, 'checkboxContainer') || null
675
+ }
676
+ }, [h(FormControlList.Checkbox, {
677
+ "attrs": {
678
+ "type": "checkbox",
679
+ "id": this.$props.componentId + "-searchasmove",
680
+ "checked": this.searchAsMove,
681
+ "show": true
682
+ },
666
683
  "class": getClassName(this.$props.innerClass, 'checkbox'),
667
- "id": this.$props.componentId + "-searchasmove",
668
- "onClick": this.toggleSearchAsMove,
669
- "checked": this.searchAsMove,
670
- "show": true
671
- }, null), vue.createVNode("label", {
672
- "className": getClassName(this.innerClass, 'label') || null,
673
- "for": this.$props.componentId + "-searchasmove"
684
+ "on": {
685
+ "click": this.toggleSearchAsMove
686
+ }
687
+ }), h("label", {
688
+ "attrs": {
689
+ "className": getClassName(this.innerClass, 'label') || null,
690
+ "for": this.$props.componentId + "-searchasmove"
691
+ }
674
692
  }, [this.searchAsMoveLabel])]);
675
693
  }
676
694
  return null;
677
695
  },
678
696
  renderPagination: function renderPagination() {
679
- return vue.createVNode(Pagination.Pagination, {
680
- "pages": this.pages,
681
- "totalPages": this.totalPages,
682
- "currentPage": this.currentPageState,
683
- "setPage": this.setPage,
684
- "innerClass": this.innerClass
685
- }, null);
697
+ var h = this.$createElement;
698
+ return h(Pagination.Pagination, {
699
+ "attrs": {
700
+ "pages": this.pages,
701
+ "totalPages": this.totalPages,
702
+ "currentPage": this.currentPageState,
703
+ "setPage": this.setPage,
704
+ "innerClass": this.innerClass
705
+ }
706
+ });
686
707
  }
687
708
  },
688
709
  created: function created() {
@@ -697,73 +718,82 @@ var ReactiveMap = {
697
718
  this.updateComponentProps(this.internalComponent, {
698
719
  from: this.from
699
720
  }, constants.componentTypes.reactiveMap);
721
+ this.setDefaultQueryForRSAPI();
700
722
  },
701
723
  mounted: function mounted() {
702
- if (this.defaultPage < 0 && this.currentPage > 0) {
703
- if (this.$props.URLParams) {
704
- this.setPageURL(this.$props.componentId, this.currentPage, this.$props.componentId, false, true);
724
+ var _this6 = this;
725
+ this.getMapPromise().then(function () {
726
+ if (_this6.defaultPage < 0 && _this6.currentPage > 0) {
727
+ if (_this6.$props.URLParams) {
728
+ _this6.setPageURL(_this6.$props.componentId, _this6.currentPage, _this6.$props.componentId, false, true);
729
+ }
705
730
  }
706
- }
707
- var options = getQueryOptions(this.$props);
708
- options.from = this.$data.from;
709
- if (this.$props.sortBy) {
710
- var _ref2;
711
- options.sort = [(_ref2 = {}, _ref2[this.$props.dataField] = {
712
- order: this.$props.sortBy
713
- }, _ref2)];
714
- }
715
- this.$defaultQuery = null;
716
- if (this.$props.defaultQuery) {
717
- this.$defaultQuery = this.$props.defaultQuery();
718
- options = _rollupPluginBabelHelpers._extends({}, options, getOptionsFromQuery(this.$defaultQuery));
719
-
720
- // Override sort query with defaultQuery's sort if defined
721
- if (this.$defaultQuery.sort) {
722
- options.sort = this.$defaultQuery.sort;
731
+ var options = getQueryOptions(_this6.$props);
732
+ options.from = _this6.$data.from;
733
+ if (_this6.$props.sortBy) {
734
+ var _ref3;
735
+ options.sort = [(_ref3 = {}, _ref3[_this6.$props.dataField] = {
736
+ order: _this6.$props.sortBy
737
+ }, _ref3)];
723
738
  }
724
- // since we want defaultQuery to be executed anytime
725
- // map component's query is being executed
726
- var persistMapQuery = true;
727
- // no need to forceExecute because setReact() will capture the main query
728
- // and execute the defaultQuery along with it
729
- var forceExecute = false;
739
+ _this6.$defaultQuery = null;
740
+ if (_this6.$props.defaultQuery) {
741
+ _this6.$defaultQuery = _this6.$props.defaultQuery();
742
+ // Update default query for RS API
743
+ _this6.setDefaultQueryForRSAPI();
744
+ if (_this6.$defaultQuery) {
745
+ options = _rollupPluginBabelHelpers._extends({}, options, getOptionsFromQuery(_this6.$defaultQuery));
730
746
 
731
- // Update default query for RS API
732
- this.setDefaultQueryForRSAPI();
733
- var meta = {
734
- mapBoxBounds: this.mapBoxBounds
735
- };
736
- this.setMapData(this.componentId, this.$defaultQuery.query, persistMapQuery, forceExecute, meta);
737
- } else {
738
- // only apply geo-distance when defaultQuery prop is not set
739
- var query = this.getGeoDistanceQuery();
740
- if (query) {
741
- // - only persist the map query if center prop is set
742
- // - ideally, persist the map query if you want to keep executing it
743
- // whenever there is a change (due to subscription) in the component query
744
- var _persistMapQuery = !!this.center;
747
+ // Override sort query with defaultQuery's sort if defined
748
+ if (_this6.$defaultQuery.sort) {
749
+ options.sort = _this6.$defaultQuery.sort;
750
+ }
751
+ // since we want defaultQuery to be executed anytime
752
+ // map component's query is being executed
753
+ var persistMapQuery = true;
754
+ // no need to forceExecute because setReact() will capture the main query
755
+ // and execute the defaultQuery along with it
756
+ var forceExecute = false;
757
+ var meta = {
758
+ mapBoxBounds: _this6.mapBoxBounds
759
+ };
760
+ if (_this6.$defaultQuery) {
761
+ _this6.setMapData(_this6.componentId, _this6.$defaultQuery.query, persistMapQuery, forceExecute, meta);
762
+ _this6.setQueryOptions(_this6.componentId, options);
763
+ }
764
+ }
765
+ } else {
766
+ // only apply geo-distance when defaultQuery prop is not set
767
+ var query = _this6.getGeoDistanceQuery();
768
+ if (query) {
769
+ // - only persist the map query if center prop is set
770
+ // - ideally, persist the map query if you want to keep executing it
771
+ // whenever there is a change (due to subscription) in the component query
772
+ var _persistMapQuery = !!_this6.center;
745
773
 
746
- // - forceExecute will make sure that the component query + Map query gets executed
747
- // irrespective of the changes in the component query
748
- // - forceExecute will only come into play when searchAsMove is true
749
- // - kindly note that forceExecute may result in one additional network request
750
- // since it bypasses the gatekeeping
751
- var _forceExecute = this.searchAsMove;
752
- // Set meta for `distance` and `coordinates` in selected value
753
- var center = this.center || this.defaultCenter;
754
- var coordinatesObject = this.getArrPosition(center);
755
- var _meta = {
756
- distance: this.defaultRadius,
757
- coordinates: coordinatesObject.lat + ", " + coordinatesObject.lon
758
- };
759
- this.setMapData(this.componentId, query, _persistMapQuery, _forceExecute, _meta);
774
+ // - forceExecute will make sure that the component query + Map query gets executed
775
+ // irrespective of the changes in the component query
776
+ // - forceExecute will only come into play when searchAsMove is true
777
+ // - kindly note that forceExecute may result in one additional network request
778
+ // since it bypasses the gatekeeping
779
+ var _forceExecute = _this6.searchAsMove;
780
+ // Set meta for `distance` and `coordinates` in selected value
781
+ var center = _this6.center || _this6.defaultCenter;
782
+ var coordinatesObject = _this6.getArrPosition(center);
783
+ var _meta = {
784
+ distance: _this6.defaultRadius,
785
+ coordinates: coordinatesObject.lat + ", " + coordinatesObject.lon
786
+ };
787
+ _this6.setMapData(_this6.componentId, query, _persistMapQuery, _forceExecute, _meta);
788
+ }
789
+ _this6.setQueryOptions(_this6.componentId, options);
760
790
  }
761
- }
762
- this.setQueryOptions(this.componentId, options, !(this.$defaultQuery && this.$defaultQuery.query));
791
+ });
763
792
  },
764
793
  render: function render() {
765
- var loader = this.$slots.loader || this.$props.loader;
766
- return vue.createVNode("div", {
794
+ var h = arguments[0];
795
+ var loader = this.$scopedSlots.loader || this.$props.loader;
796
+ return h("div", {
767
797
  "style": _rollupPluginBabelHelpers._extends({}, style, this.$props.style),
768
798
  "class": this.$props.className
769
799
  }, [this.renderErrorComponent(), this.isLoading && loader, this.hasCustomRender ? this.getComponent() : null, this.renderMap(this.getMapParams()), this.pagination ? this.renderPagination() : null]);
@@ -835,7 +865,7 @@ var infoWindowMappedProps = {
835
865
  */
836
866
  function bindEvents(vueInst, googleMapsInst, events) {
837
867
  events.forEach(function (eventName) {
838
- if (vueInst.$gmapOptions.autoBindAllEvents || vueInst.$attrs[eventName]) {
868
+ if (vueInst.$gmapOptions.autoBindAllEvents || vueInst.$listeners[eventName]) {
839
869
  googleMapsInst.addListener(eventName, function (ev) {
840
870
  vueInst.$emit(eventName, ev);
841
871
  });
@@ -958,7 +988,7 @@ function bindProps(vueInst, googleMapsInst, props) {
958
988
  googleMapsInst[setMethodName](vueInst[attribute]);
959
989
  }, vueInst[attribute] !== undefined);
960
990
  }
961
- if (twoWay && (vueInst.$gmapOptions.autoBindAllEvents || vueInst.$attrs[eventName])) {
991
+ if (twoWay && (vueInst.$gmapOptions.autoBindAllEvents || vueInst.$listeners[eventName])) {
962
992
  googleMapsInst.addListener(eventName, function () {
963
993
  vueInst.$emit(eventName, googleMapsInst[getMethodName]());
964
994
  });
@@ -1093,9 +1123,10 @@ var InfoWindowClusterManager = {
1093
1123
  }
1094
1124
  },
1095
1125
  render: function render() {
1096
- return vue.createVNode("div", null, [vue.createVNode("div", {
1126
+ var h = arguments[0];
1127
+ return h("div", [h("div", {
1097
1128
  "ref": "flyaway"
1098
- }, [this.$slots["default"]()])]);
1129
+ }, [this.$scopedSlots["default"]()])]);
1099
1130
  }
1100
1131
  };
1101
1132
 
@@ -1127,19 +1158,14 @@ var InfoWindowWrapper = {
1127
1158
  }
1128
1159
  },
1129
1160
  render: function render() {
1130
- var _this = this;
1161
+ var h = arguments[0];
1131
1162
  var renderPopover = this.renderPopover,
1132
1163
  events = this.events;
1133
- return vue.createVNode(InfoWindowClusterManager, vue.mergeProps({
1134
- "ref": this.id + "-Info-Window"
1135
- }, {
1136
- props: this.infoWindowProps,
1137
- on: events
1138
- }), {
1139
- "default": function _default() {
1140
- return [vue.createVNode("div", null, [renderPopover(_this.handleClose)])];
1141
- }
1142
- });
1164
+ return h(InfoWindowClusterManager, {
1165
+ "ref": this.id + "-Info-Window",
1166
+ "props": _rollupPluginBabelHelpers._extends({}, this.infoWindowProps),
1167
+ "on": _rollupPluginBabelHelpers._extends({}, events)
1168
+ }, [h("div", [renderPopover(this.handleClose)])]);
1143
1169
  }
1144
1170
  };
1145
1171
 
@@ -1309,34 +1335,37 @@ var ClusterMarkers = {
1309
1335
  },
1310
1336
  render: function render() {
1311
1337
  var _this2 = this;
1338
+ var h = arguments[0];
1312
1339
  if (!this.renderPopover) {
1313
1340
  return null;
1314
1341
  }
1315
- return vue.createVNode("div", null, [Object.keys(this.openMarkers).map(function (markerId) {
1342
+ return h("div", [Object.keys(this.openMarkers).map(function (markerId) {
1316
1343
  var marker = _this2.openMarkers[markerId];
1317
1344
  var item = marker.metaData;
1318
- return vue.createVNode(InfoWindowWrapper, {
1345
+ return h(InfoWindowWrapper, {
1319
1346
  "key": markerId + "-InfoWindow",
1320
- "id": markerId,
1321
- "renderPopover": function renderPopover(_handleClose) {
1322
- return _this2.renderPopover({
1323
- item: item,
1324
- handleClose: function handleClose() {
1325
- _handleClose();
1326
- _this2.closeMarker(item);
1347
+ "attrs": {
1348
+ "id": markerId,
1349
+ "renderPopover": function renderPopover(_handleClose) {
1350
+ return _this2.renderPopover({
1351
+ item: item,
1352
+ handleClose: function handleClose() {
1353
+ _handleClose();
1354
+ _this2.closeMarker(item);
1355
+ }
1356
+ });
1357
+ },
1358
+ "marker": marker,
1359
+ "infoWindowProps": {
1360
+ zIndex: 500
1361
+ },
1362
+ "events": {
1363
+ closeclick: function closeclick() {
1364
+ return _this2.closeMarker(marker);
1327
1365
  }
1328
- });
1329
- },
1330
- "marker": marker,
1331
- "infoWindowProps": {
1332
- zIndex: 500
1333
- },
1334
- "events": {
1335
- closeclick: function closeclick() {
1336
- return _this2.closeMarker(marker);
1337
1366
  }
1338
1367
  }
1339
- }, null);
1368
+ });
1340
1369
  })]);
1341
1370
  }
1342
1371
  };
@@ -1347,6 +1376,7 @@ var ClusterManager = index.connect(function () {
1347
1376
  return null;
1348
1377
  }, mapDispatchToProps$1)(ClusterMarkers);
1349
1378
 
1379
+ var InfoWindow = GmapVue.components.InfoWindow;
1350
1380
  var InfoWindowWrapper$1 = {
1351
1381
  name: 'InfoWindowWrapper',
1352
1382
  props: {
@@ -1369,20 +1399,19 @@ var InfoWindowWrapper$1 = {
1369
1399
  }
1370
1400
  },
1371
1401
  render: function render() {
1372
- var _this = this;
1402
+ var h = arguments[0];
1373
1403
  var renderPopover = this.renderPopover,
1374
1404
  events = this.events;
1375
- return vue.createVNode(VueGoogleMaps.InfoWindow, vue.mergeProps({
1376
- "closeclick": "true",
1377
- "ref": this.id + "-Info-Window"
1378
- }, this.infoWindowProps, _transformOn(events)), {
1379
- "default": function _default() {
1380
- return [vue.createVNode("div", null, [renderPopover(_this.handleClose)])];
1381
- }
1382
- });
1405
+ return h(InfoWindow, {
1406
+ "ref": this.id + "-Info-Window",
1407
+ "props": _rollupPluginBabelHelpers._extends({}, this.infoWindowProps),
1408
+ "on": _rollupPluginBabelHelpers._extends({}, events)
1409
+ }, [h("div", [renderPopover(this.handleClose)])]);
1383
1410
  }
1384
1411
  };
1385
1412
 
1413
+ var MapElementMixin = GmapVue.components.MapElementMixin;
1414
+
1386
1415
  // Note: This file has been taken from https://github.com/eregnier/vue2-gmap-custom-marker/blob/master/gmap-custom-marker.vue
1387
1416
  var MarkerWithLabel = {
1388
1417
  name: 'MarkerWithLabel',
@@ -1427,7 +1456,7 @@ var MarkerWithLabel = {
1427
1456
  opacity: 0.01
1428
1457
  };
1429
1458
  },
1430
- mixins: [VueGoogleMaps.MapElementMixin],
1459
+ mixins: [MapElementMixin],
1431
1460
  inject: {
1432
1461
  $clusterPromise: {
1433
1462
  "default": null
@@ -1618,22 +1647,26 @@ var MarkerWithLabel = {
1618
1647
  }
1619
1648
  },
1620
1649
  render: function render() {
1621
- return vue.createVNode("div", {
1650
+ var h = arguments[0];
1651
+ return h("div", {
1622
1652
  "style": {
1623
1653
  opacity: this.opacity
1624
1654
  },
1625
- "onmouseover": this.handleMouseOver,
1626
- "onmouseout": this.handleMouseOut,
1627
- "onclick": this.handleClick
1655
+ "on": {
1656
+ "mouseover": this.handleMouseOver,
1657
+ "mouseout": this.handleMouseOut,
1658
+ "click": this.handleClick
1659
+ }
1628
1660
  }, [this.renderMarker()]);
1629
1661
  }
1630
1662
  };
1631
1663
 
1632
- var _templateObject, _templateObject2;
1633
- var MapPin = vueEmotion.styled('div')(_templateObject || (_templateObject = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\theight: 24px;\n\twidth: auto;\n\tbackground-color: #fff;\n\tborder-radius: 2px;\n\tcolor: #222;\n\tbox-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.15);\n\tpadding: 3px 6px;\n\tfont-size: 15px;\n"])));
1634
- var MapPinArrow = vueEmotion.styled('div')(_templateObject2 || (_templateObject2 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tborder-color: rgba(0, 0, 0, 0.2);\n\tborder-style: solid;\n\tborder-width: 0 1px 1px 0;\n\tmargin-left: -6px;\n\tbackground-color: #fff;\n\tmargin-top: -6px;\n\twidth: 12px;\n\theight: 12px;\n\t-webkit-transform: rotate(45deg);\n\t-ms-transform: rotate(45deg);\n\ttransform: rotate(45deg);\n"])));
1635
- var mapPinWrapper = "\n\t&:hover,\n\t&:focus {\n\t\tz-index: 200;\n\t}\n";
1664
+ var _templateObject, _templateObject2, _templateObject3;
1665
+ var MapPin = styled__default('div')(_templateObject || (_templateObject = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\theight: 24px;\n\twidth: auto;\n\tbackground-color: #fff;\n\tborder-radius: 2px;\n\tcolor: #222;\n\tbox-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.15);\n\tpadding: 3px 6px;\n\tfont-size: 15px;\n"])));
1666
+ var MapPinArrow = styled__default('div')(_templateObject2 || (_templateObject2 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tborder-color: rgba(0, 0, 0, 0.2);\n\tborder-style: solid;\n\tborder-width: 0 1px 1px 0;\n\tmargin-left: -6px;\n\tbackground-color: #fff;\n\tmargin-top: -6px;\n\twidth: 12px;\n\theight: 12px;\n\t-webkit-transform: rotate(45deg);\n\t-ms-transform: rotate(45deg);\n\ttransform: rotate(45deg);\n"])));
1667
+ var mapPinWrapper = styled.css(_templateObject3 || (_templateObject3 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t&:hover,\n\t&:focus {\n\t\tz-index: 200;\n\t}\n"])));
1636
1668
 
1669
+ var Marker = GmapVue.components.Marker;
1637
1670
  var recordResultClick$2 = configureStore.Actions.recordResultClick;
1638
1671
  var GoogleMapMarker = {
1639
1672
  name: 'GoogleMapMarker',
@@ -1711,6 +1744,7 @@ var GoogleMapMarker = {
1711
1744
  },
1712
1745
  renderPopoverClick: function renderPopoverClick(item) {
1713
1746
  var _this = this;
1747
+ var h = this.$createElement;
1714
1748
  var additionalProps = {};
1715
1749
  var _this$$props3 = this.$props,
1716
1750
  getPosition = _this$$props3.getPosition,
@@ -1723,35 +1757,38 @@ var GoogleMapMarker = {
1723
1757
  }
1724
1758
  };
1725
1759
  if (item._id in openMarkers) {
1726
- return vue.createVNode(InfoWindowWrapper$1, {
1760
+ return h(InfoWindowWrapper$1, {
1727
1761
  "key": item._id + "-InfoWindow",
1728
- "id": item._id,
1729
- "renderPopover": function renderPopover(_handleClose) {
1730
- return _renderPopover({
1731
- item: item,
1732
- handleClose: function handleClose() {
1733
- _handleClose();
1734
- _this.closeMarker();
1762
+ "attrs": {
1763
+ "id": item._id,
1764
+ "renderPopover": function renderPopover(_handleClose) {
1765
+ return _renderPopover({
1766
+ item: item,
1767
+ handleClose: function handleClose() {
1768
+ _handleClose();
1769
+ _this.closeMarker();
1770
+ }
1771
+ });
1772
+ },
1773
+ "infoWindowProps": {
1774
+ zIndex: 500,
1775
+ position: additionalProps.position,
1776
+ options: additionalProps.defaultOptions
1777
+ },
1778
+ "events": {
1779
+ closeclick: function closeclick() {
1780
+ return _this.closeMarker();
1735
1781
  }
1736
- });
1737
- },
1738
- "infoWindowProps": {
1739
- zIndex: 500,
1740
- position: additionalProps.position,
1741
- options: additionalProps.defaultOptions
1742
- },
1743
- "events": {
1744
- closeclick: function closeclick() {
1745
- return _this.closeMarker();
1746
1782
  }
1747
1783
  }
1748
- }, null);
1784
+ });
1749
1785
  }
1750
1786
  return null;
1751
1787
  }
1752
1788
  },
1753
1789
  render: function render() {
1754
1790
  var _this2 = this;
1791
+ var h = arguments[0];
1755
1792
  var _this$$props4 = this.$props,
1756
1793
  getPosition = _this$$props4.getPosition,
1757
1794
  renderItem = _this$$props4.renderItem,
@@ -1767,70 +1804,74 @@ var GoogleMapMarker = {
1767
1804
  marker.setIcon = this.setIcon;
1768
1805
  var data = renderItem(marker);
1769
1806
  if ('label' in data) {
1770
- return vue.createVNode(MarkerWithLabel, vue.mergeProps({
1807
+ return h(MarkerWithLabel, {
1771
1808
  "key": marker._id,
1772
- "metaData": marker,
1773
- "marker": getPosition(marker),
1774
- "labelAnchor": new window.google.maps.Point(0, 30),
1775
- "handleMouseOver": this.increaseMarkerZIndex,
1776
- "handleMouseOut": this.removeMarkerZIndex,
1777
- "handleClick": this.openMarker,
1778
- "zIndex": markerProps.zIndex
1779
- }, customMarkerProps, {
1780
- "renderMarker": function renderMarker() {
1781
- return vue.createVNode("div", {
1782
- "css": mapPinWrapper
1783
- }, [vue.createVNode(MapPin, null, {
1784
- "default": function _default() {
1785
- return [data.label];
1786
- }
1787
- }), vue.createVNode(MapPinArrow, null, null), renderPopover ? _this2.renderPopoverClick(marker, true) : null]);
1788
- }
1789
- }), null);
1809
+ "attrs": {
1810
+ "metaData": marker,
1811
+ "marker": getPosition(marker),
1812
+ "labelAnchor": new window.google.maps.Point(0, 30),
1813
+ "handleMouseOver": this.increaseMarkerZIndex,
1814
+ "handleMouseOut": this.removeMarkerZIndex,
1815
+ "handleClick": this.openMarker,
1816
+ "zIndex": markerProps.zIndex,
1817
+ "renderMarker": function renderMarker() {
1818
+ return h("div", {
1819
+ "attrs": {
1820
+ "css": mapPinWrapper
1821
+ }
1822
+ }, [h(MapPin, [data.label]), h(MapPinArrow), renderPopover ? _this2.renderPopoverClick(marker, true) : null]);
1823
+ }
1824
+ },
1825
+ "props": _rollupPluginBabelHelpers._extends({}, customMarkerProps)
1826
+ });
1790
1827
  }
1791
1828
  if ('icon' in data) {
1792
1829
  markerProps.icon = data.icon;
1793
1830
  } else {
1794
- return vue.createVNode(MarkerWithLabel, vue.mergeProps({
1831
+ return h(MarkerWithLabel, {
1795
1832
  "key": marker._id,
1796
- "metaData": marker,
1797
- "marker": getPosition(marker),
1798
- "handleClick": this.openMarker,
1799
- "handleMouseOver": this.increaseMarkerZIndex,
1800
- "handleMouseOut": this.removeMarkerZIndex,
1801
- "zIndex": markerProps.zIndex
1802
- }, customMarkerProps, {
1803
- "renderMarker": function renderMarker() {
1804
- return vue.createVNode("div", {
1805
- "css": mapPinWrapper
1806
- }, [typeof data.custom === 'function' ? data.custom(marker) : data.custom, renderPopover ? _this2.renderPopoverClick(marker, true) : null]);
1807
- }
1808
- }), null);
1833
+ "attrs": {
1834
+ "metaData": marker,
1835
+ "marker": getPosition(marker),
1836
+ "handleClick": this.openMarker,
1837
+ "handleMouseOver": this.increaseMarkerZIndex,
1838
+ "handleMouseOut": this.removeMarkerZIndex,
1839
+ "zIndex": markerProps.zIndex,
1840
+ "renderMarker": function renderMarker() {
1841
+ return h("div", {
1842
+ "attrs": {
1843
+ "css": mapPinWrapper
1844
+ }
1845
+ }, [typeof data.custom === 'function' ? data.custom(marker) : data.custom, renderPopover ? _this2.renderPopoverClick(marker, true) : null]);
1846
+ }
1847
+ },
1848
+ "props": _rollupPluginBabelHelpers._extends({}, customMarkerProps)
1849
+ });
1809
1850
  }
1810
1851
  } else if (defaultPin) {
1811
1852
  markerProps.icon = {
1812
1853
  url: defaultPin
1813
1854
  };
1814
1855
  }
1815
- return vue.createVNode(VueGoogleMaps.Marker, vue.mergeProps({
1856
+ return h(Marker, {
1816
1857
  "key": marker._id,
1817
- "zIndex": markerProps.zIndex,
1818
- "onClick": function onClick() {
1819
- return _this2.openMarker();
1858
+ "attrs": {
1859
+ "zIndex": markerProps.zIndex,
1860
+ "position": getPosition(marker),
1861
+ "options": {
1862
+ metaData: marker
1863
+ },
1864
+ "icon": this.markerIcon || markerProps.icon
1820
1865
  },
1821
- "onMouseover": this.increaseMarkerZIndex,
1822
- "onMouseout": this.removeMarkerZIndex
1823
- }, customMarkerProps, {
1824
- "position": getPosition(marker),
1825
- "options": {
1826
- metaData: marker
1866
+ "on": {
1867
+ "click": function click() {
1868
+ return _this2.openMarker();
1869
+ },
1870
+ "mouseover": this.increaseMarkerZIndex,
1871
+ "mouseout": this.removeMarkerZIndex
1827
1872
  },
1828
- "icon": this.markerIcon || markerProps.icon
1829
- }), {
1830
- "default": function _default() {
1831
- return [renderPopover ? _this2.renderPopoverClick(marker) : null];
1832
- }
1833
- });
1873
+ "props": _rollupPluginBabelHelpers._extends({}, customMarkerProps)
1874
+ }, [renderPopover ? this.renderPopoverClick(marker) : null]);
1834
1875
  }
1835
1876
  };
1836
1877
  var mapDispatchToProps$2 = {
@@ -1840,6 +1881,7 @@ var GoogleMapMarker$1 = index.connect(function () {
1840
1881
  return null;
1841
1882
  }, mapDispatchToProps$2)(GoogleMapMarker);
1842
1883
 
1884
+ var Cluster = GmapVue.components.Cluster;
1843
1885
  var GoogleMapMarkers = {
1844
1886
  name: 'GoogleMapMarkers',
1845
1887
  props: {
@@ -1886,6 +1928,7 @@ var GoogleMapMarkers = {
1886
1928
  },
1887
1929
  render: function render() {
1888
1930
  var _this = this;
1931
+ var h = arguments[0];
1889
1932
  var resultsToRender = this.$props.resultsToRender;
1890
1933
  var openMarkers = this.openMarkers;
1891
1934
  var markerProps = {
@@ -1903,64 +1946,70 @@ var GoogleMapMarkers = {
1903
1946
  highlightMarkerOnHover: this.highlightMarkerOnHover
1904
1947
  };
1905
1948
  if (this.showMarkerClusters) {
1906
- return vue.createVNode("div", null, [vue.createVNode(VueGoogleMaps.GMapCluster, vue.mergeProps(this.clusterProps, {
1907
- "onclick": function onclick(cluster) {
1908
- var markers = cluster.markers.map(function (i) {
1909
- return i.metaData;
1910
- });
1911
- _this.clickedCluster = cluster;
1912
- _this.clusterMarkers = markers;
1913
- _this.$emit('open-cluster-popover', _this.clusterMarkers);
1949
+ return h("div", [h(Cluster, {
1950
+ "props": _rollupPluginBabelHelpers._extends({}, this.clusterProps),
1951
+ "on": {
1952
+ "click": function click(cluster) {
1953
+ var markers = cluster.markers.map(function (i) {
1954
+ return i.metaData;
1955
+ });
1956
+ _this.clickedCluster = cluster;
1957
+ _this.clusterMarkers = markers;
1958
+ _this.$emit('open-cluster-popover', _this.clusterMarkers);
1959
+ }
1914
1960
  },
1915
1961
  "ref": "clusterRef"
1916
- }), {
1917
- "default": function _default() {
1918
- return [vue.createVNode(ClusterManager, vue.mergeProps({
1919
- "getPosition": markerProps.getPosition,
1920
- "markers": resultsToRender,
1921
- "defaultPin": markerProps.defaultPin,
1922
- "renderItem": markerProps.renderItem,
1923
- "markerProps": markerProps.markerProps,
1924
- "handlePreserveCenter": markerProps.handlePreserveCenter,
1925
- "autoClosePopover": markerProps.autoClosePopover,
1926
- "renderPopover": markerProps.renderPopover,
1927
- "highlightMarkerOnHover": markerProps.highlightMarkerOnHover
1928
- }, {
1929
- on: _this.$attrs
1930
- }), null)];
1931
- }
1932
- }), this.clickedCluster && this.renderClusterPopover ? vue.createVNode(InfoWindowWrapper$1, {
1933
- "id": "cluster",
1934
- "infoWindowProps": {
1935
- zIndex: 500,
1936
- position: this.getAdditionalProps().position,
1937
- options: this.getAdditionalProps().defaultOptions
1962
+ }, [h(ClusterManager, {
1963
+ "attrs": {
1964
+ "getPosition": markerProps.getPosition,
1965
+ "markers": resultsToRender,
1966
+ "defaultPin": markerProps.defaultPin,
1967
+ "renderItem": markerProps.renderItem,
1968
+ "markerProps": markerProps.markerProps,
1969
+ "handlePreserveCenter": markerProps.handlePreserveCenter,
1970
+ "autoClosePopover": markerProps.autoClosePopover,
1971
+ "renderPopover": markerProps.renderPopover,
1972
+ "highlightMarkerOnHover": markerProps.highlightMarkerOnHover
1938
1973
  },
1939
- "renderPopover": function renderPopover(_handleClose) {
1940
- return _this.renderClusterPopover({
1941
- markers: _this.clusterMarkers,
1942
- cluster: _this.clickedCluster,
1943
- handleClose: function handleClose() {
1944
- _handleClose();
1945
- _this.closeMarker();
1946
- }
1947
- });
1948
- },
1949
- "events": {
1950
- closeclick: this.closeMarker
1974
+ "on": _rollupPluginBabelHelpers._extends({}, this.$listeners)
1975
+ })]), this.clickedCluster && this.renderClusterPopover ? h(InfoWindowWrapper$1, {
1976
+ "attrs": {
1977
+ "id": "cluster",
1978
+ "infoWindowProps": {
1979
+ zIndex: 500,
1980
+ position: this.getAdditionalProps().position,
1981
+ options: this.getAdditionalProps().defaultOptions
1982
+ },
1983
+ "renderPopover": function renderPopover(_handleClose) {
1984
+ return _this.renderClusterPopover({
1985
+ markers: _this.clusterMarkers,
1986
+ cluster: _this.clickedCluster,
1987
+ handleClose: function handleClose() {
1988
+ _handleClose();
1989
+ _this.closeMarker();
1990
+ }
1991
+ });
1992
+ },
1993
+ "events": {
1994
+ closeclick: this.closeMarker
1995
+ }
1951
1996
  }
1952
- }, null) : null]);
1997
+ }) : null]);
1953
1998
  }
1954
- return vue.createVNode("div", null, [resultsToRender.map(function (marker, index) {
1955
- return vue.createVNode(GoogleMapMarker$1, vue.mergeProps({
1956
- "index": index,
1957
- "marker": marker
1958
- }, markerProps, _this.$attrs), null);
1999
+ return h("div", [resultsToRender.map(function (marker, index) {
2000
+ return h(GoogleMapMarker$1, {
2001
+ "attrs": {
2002
+ "index": index,
2003
+ "marker": marker
2004
+ },
2005
+ "props": _rollupPluginBabelHelpers._extends({}, markerProps),
2006
+ "on": _rollupPluginBabelHelpers._extends({}, _this.$listeners)
2007
+ });
1959
2008
  })]);
1960
2009
  }
1961
2010
  };
1962
2011
 
1963
- var _templateObject$1;
2012
+ var Map = GmapVue.components.MapLayer;
1964
2013
  var ReactiveGoogleMap = {
1965
2014
  name: 'ReactiveGoogleMap',
1966
2015
  props: {
@@ -1995,22 +2044,18 @@ var ReactiveGoogleMap = {
1995
2044
  calculateMarkers: VueTypes.func,
1996
2045
  highlightMarkerOnHover: VueTypes.bool.def(true)
1997
2046
  },
1998
- computed: {
1999
- listeners: function listeners() {
2000
- var onRE = /^on[^a-z]/;
2001
- var listeners = {};
2002
- var $attrs = this.$attrs;
2003
- for (var property in $attrs) {
2004
- if (onRE.test(property)) {
2005
- listeners[property] = $attrs[property];
2006
- }
2007
- }
2008
- return listeners;
2009
- }
2047
+ created: function created() {
2048
+ var _this = this;
2049
+ this.mapRefPromiseResolve = null;
2050
+ this.mapRefPromiseRejecter = null;
2051
+ this.mapRefPromise = new Promise(function (resolve, reject) {
2052
+ _this.mapRefPromiseResolver = resolve;
2053
+ _this.mapRefPromiseRejecter = reject;
2054
+ });
2010
2055
  },
2011
2056
  methods: {
2012
2057
  renderMap: function renderMap(_ref) {
2013
- var _this = this;
2058
+ var _this2 = this;
2014
2059
  var resultsToRender = _ref.resultsToRender,
2015
2060
  center = _ref.center,
2016
2061
  zoom = _ref.zoom,
@@ -2022,55 +2067,61 @@ var ReactiveGoogleMap = {
2022
2067
  getPosition = _ref.getPosition,
2023
2068
  autoClosePopover = _ref.autoClosePopover,
2024
2069
  defaultPin = _ref.defaultPin;
2070
+ var h = this.$createElement;
2025
2071
  var style = {
2026
2072
  width: '100%',
2027
2073
  height: '100%',
2028
2074
  position: 'relative'
2029
2075
  };
2030
- return vue.createVNode("div", {
2076
+ return h("div", {
2031
2077
  "style": style
2032
- }, [vue.createVNode(VueGoogleMaps.Map, vue.mergeProps({
2078
+ }, [h(Map, {
2033
2079
  "ref": "mapRef",
2034
- "map-type-id": "terrain",
2080
+ "attrs": {
2081
+ "map-type-id": "terrain",
2082
+ "options": {
2083
+ zoomControl: true
2084
+ },
2085
+ "center": center,
2086
+ "zoom": zoom
2087
+ },
2035
2088
  "style": {
2036
2089
  height: '100%'
2037
2090
  },
2038
- "class": emotion.css(_templateObject$1 || (_templateObject$1 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t\t\t\t\t\t\theight: 100%;\n\t\t\t\t\t\t"]))),
2039
- "options": {
2040
- zoomControl: true
2041
- },
2042
- "center": center,
2043
- "zoom": zoom
2044
- }, this.mapProps, {
2045
- "onzoom_changed": handleZoomChange,
2046
- "ondragend": handleOnDragEnd,
2047
- "onidle": handleOnIdle
2048
- }), {
2049
- "default": function _default() {
2050
- return [_this.showMarkers ? vue.createVNode(GoogleMapMarkers, vue.mergeProps({
2051
- "resultsToRender": resultsToRender,
2052
- "getPosition": getPosition,
2053
- "markerProps": _this.markerProps,
2054
- "clusterProps": _this.clusterProps,
2055
- "handlePreserveCenter": handlePreserveCenter,
2056
- "highlightMarkerOnHover": _this.highlightMarkerOnHover,
2057
- "renderItem": _this.$slots.renderItem ? function () {
2058
- return {
2059
- custom: _this.$slots.renderItem
2060
- };
2061
- } : _this.renderItem,
2062
- "defaultPin": defaultPin,
2063
- "autoClosePopover": autoClosePopover,
2064
- "renderPopover": _this.$slots.renderPopover,
2065
- "renderClusterPopover": _this.$slots.renderClusterPopover,
2066
- "showMarkerClusters": _this.showMarkerClusters
2067
- }, _this.listeners), null) : null];
2091
+ "props": _rollupPluginBabelHelpers._extends({}, this.mapProps),
2092
+ "on": {
2093
+ "zoom_changed": handleZoomChange,
2094
+ "dragend": handleOnDragEnd,
2095
+ "idle": handleOnIdle
2068
2096
  }
2069
- }), renderSearchAsMove()]);
2097
+ }, [this.showMarkers ? h(GoogleMapMarkers, {
2098
+ "attrs": {
2099
+ "resultsToRender": resultsToRender,
2100
+ "getPosition": getPosition,
2101
+ "markerProps": this.markerProps,
2102
+ "clusterProps": this.clusterProps,
2103
+ "handlePreserveCenter": handlePreserveCenter,
2104
+ "highlightMarkerOnHover": this.highlightMarkerOnHover,
2105
+ "renderItem": this.$scopedSlots.renderItem ? function () {
2106
+ return {
2107
+ custom: _this2.$scopedSlots.renderItem
2108
+ };
2109
+ } : this.renderItem,
2110
+ "defaultPin": defaultPin,
2111
+ "autoClosePopover": autoClosePopover,
2112
+ "renderPopover": this.$scopedSlots.renderPopover,
2113
+ "renderClusterPopover": this.$scopedSlots.renderClusterPopover,
2114
+ "showMarkerClusters": this.showMarkerClusters
2115
+ },
2116
+ "on": _rollupPluginBabelHelpers._extends({}, this.$listeners)
2117
+ }) : null]), renderSearchAsMove()]);
2070
2118
  },
2071
2119
  getMapRef: function getMapRef() {
2072
2120
  return this.mapRef;
2073
2121
  },
2122
+ getMapRefPromise: function getMapRefPromise() {
2123
+ return this.mapRefPromise;
2124
+ },
2074
2125
  removeMarkers: function removeMarkers() {
2075
2126
  var clusterManagerInstance;
2076
2127
  var currentInstance = this;
@@ -2078,7 +2129,6 @@ var ReactiveGoogleMap = {
2078
2129
  if (currentInstance && currentInstance.$options && currentInstance.$options.name === 'connect-ClusterMarkers') {
2079
2130
  clusterManagerInstance = currentInstance;
2080
2131
  currentInstance = null;
2081
- // TODO: Check if $children works in vue 3
2082
2132
  } else if (currentInstance.$children) {
2083
2133
  var _currentInstance$$chi = currentInstance.$children;
2084
2134
  currentInstance = _currentInstance$$chi[0];
@@ -2092,46 +2142,51 @@ var ReactiveGoogleMap = {
2092
2142
  }
2093
2143
  },
2094
2144
  mounted: function mounted() {
2095
- var _this2 = this;
2145
+ var _this3 = this;
2096
2146
  if (this.$refs.mapRef) {
2097
2147
  this.$refs.mapRef.$mapPromise.then(function (map) {
2098
- _this2.mapRef = map;
2099
- });
2148
+ _this3.mapRef = map;
2149
+ _this3.mapRefPromiseResolver(_this3.mapRef);
2150
+ })["catch"](this.mapRefPromiseRejecter);
2100
2151
  }
2101
2152
  },
2102
2153
  render: function render() {
2103
- return vue.createVNode(RMConnected, vue.mergeProps({
2104
- "getMapRef": this.getMapRef,
2105
- "renderMap": this.renderMap,
2106
- "componentId": this.componentId,
2107
- "className": this.className,
2108
- "dataField": this.dataField,
2109
- "defaultZoom": this.defaultZoom,
2110
- "react": this.react,
2111
- "size": this.size,
2112
- "sortBy": this.sortBy,
2113
- "pagination": this.pagination,
2114
- "URLParams": this.URLParams,
2115
- "defaultSearchAsMove": this.searchAsMove,
2116
- "showSearchAsMove": this.showSearchAsMove,
2117
- "searchAsMoveLabel": this.searchAsMoveLabel,
2118
- "showMarkers": this.showMarkers,
2119
- "markerProps": this.markerProps,
2120
- "autoClosePopover": this.autoClosePopover,
2121
- "defaultPin": this.defaultPin,
2122
- "defaultQuery": this.defaultQuery,
2123
- "autoCenter": this.autoCenter,
2124
- "defaultCenter": this.defaultCenter,
2125
- "defaultRadius": this.defaultRadius,
2126
- "unit": this.unit,
2127
- "pages": this.pages,
2128
- "center": this.center,
2129
- "loader": this.loader,
2130
- "calculateMarkers": this.calculateMarkers
2154
+ var h = arguments[0];
2155
+ return h(RMConnected, _mergeJSXProps([{
2156
+ "attrs": {
2157
+ "getMapRef": this.getMapRef,
2158
+ "getMapPromise": this.getMapRefPromise,
2159
+ "renderMap": this.renderMap,
2160
+ "componentId": this.componentId,
2161
+ "className": this.className,
2162
+ "dataField": this.dataField,
2163
+ "defaultZoom": this.defaultZoom,
2164
+ "react": this.react,
2165
+ "size": this.size,
2166
+ "sortBy": this.sortBy,
2167
+ "pagination": this.pagination,
2168
+ "uRLParams": this.URLParams,
2169
+ "defaultSearchAsMove": this.searchAsMove,
2170
+ "showSearchAsMove": this.showSearchAsMove,
2171
+ "searchAsMoveLabel": this.searchAsMoveLabel,
2172
+ "showMarkers": this.showMarkers,
2173
+ "markerProps": this.markerProps,
2174
+ "autoClosePopover": this.autoClosePopover,
2175
+ "defaultPin": this.defaultPin,
2176
+ "defaultQuery": this.defaultQuery,
2177
+ "autoCenter": this.autoCenter,
2178
+ "defaultCenter": this.defaultCenter,
2179
+ "defaultRadius": this.defaultRadius,
2180
+ "unit": this.unit,
2181
+ "pages": this.pages,
2182
+ "center": this.center,
2183
+ "loader": this.loader,
2184
+ "calculateMarkers": this.calculateMarkers
2185
+ }
2131
2186
  }, {
2132
- scopedSlots: this.$slots,
2133
- on: this.$attrs
2134
- }), null);
2187
+ scopedSlots: this.$scopedSlots,
2188
+ on: this.$listeners
2189
+ }]));
2135
2190
  }
2136
2191
  };
2137
2192
  ReactiveGoogleMap.install = function (Vue, options) {
@@ -2139,7 +2194,7 @@ ReactiveGoogleMap.install = function (Vue, options) {
2139
2194
  if (!options || !options.key) {
2140
2195
  console.error('ReactiveSearch: map key is required to use ReactiveGoogleMap component');
2141
2196
  }
2142
- Vue.use(VueGoogleMaps__default, {
2197
+ Vue.use(GmapVue__default, {
2143
2198
  load: {
2144
2199
  key: options.key,
2145
2200
  libraries: 'places'