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