@appbaseio/reactivesearch-vue 2.0.0-alpha.3 → 3.0.0-alpha.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 (108) hide show
  1. package/dist/@appbaseio/reactivesearch-vue.umd.js +17405 -25231
  2. package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
  3. package/dist/@appbaseio/reactivesearch-vue.umd.min.js +6 -15
  4. package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
  5. package/dist/cjs/Button-ad042719.js +59 -0
  6. package/dist/cjs/Card-f5ab024a.js +27 -0
  7. package/dist/cjs/{ComponentWrapper-ad3dad02.js → ComponentWrapper-75f88599.js} +42 -56
  8. package/dist/cjs/Container-29f049b2.js +12 -0
  9. package/dist/cjs/DropDown-6cf84c47.js +698 -0
  10. package/dist/cjs/DynamicRangeSlider.js +103 -155
  11. package/dist/cjs/Flex-d5675ea6.js +48 -0
  12. package/dist/cjs/FormControlList-fadd792f.js +42 -0
  13. package/dist/cjs/Input-4b434436.js +74 -0
  14. package/dist/cjs/ListItem-d57d648d.js +42 -0
  15. package/dist/cjs/MultiDropdownList.js +124 -240
  16. package/dist/cjs/MultiList.js +123 -261
  17. package/dist/cjs/MultiRange.js +87 -133
  18. package/dist/cjs/{Pagination-71e85fa9.js → Pagination-b5ddc906.js} +70 -83
  19. package/dist/cjs/PreferencesConsumer-eb265924.js +75 -0
  20. package/dist/cjs/RangeInput.js +163 -171
  21. package/dist/cjs/RangeSlider.js +81 -109
  22. package/dist/cjs/ReactiveBase.js +139 -157
  23. package/dist/cjs/ReactiveComponent-eb8db4c1.js +2189 -0
  24. package/dist/cjs/ReactiveComponent.js +46 -340
  25. package/dist/cjs/ReactiveGoogleMap.js +445 -655
  26. package/dist/cjs/ReactiveList.js +179 -304
  27. package/dist/cjs/ResultCard.js +36 -36
  28. package/dist/cjs/ResultList.js +48 -56
  29. package/dist/cjs/SelectedFilters.js +62 -69
  30. package/dist/cjs/SingleDropdownList.js +117 -177
  31. package/dist/cjs/SingleList.js +121 -205
  32. package/dist/cjs/SingleRange.js +78 -105
  33. package/dist/cjs/StateProvider.js +74 -47
  34. package/dist/cjs/Title-8802a218.js +12 -0
  35. package/dist/cjs/ToggleButton.js +72 -119
  36. package/dist/cjs/{_rollupPluginBabelHelpers-c705cbe6.js → _rollupPluginBabelHelpers-f8b843f8.js} +0 -15
  37. package/dist/cjs/{index-6a167fe0.js → index-d8d8f291.js} +38 -108
  38. package/dist/cjs/index.js +44 -41
  39. package/dist/cjs/initReactivesearch.js +69 -152
  40. package/dist/cjs/install.js +47 -43
  41. package/dist/cjs/ssr-6907ada3.js +66 -0
  42. package/dist/cjs/{utils-d6a52588.js → utils-83fd01e9.js} +7 -16
  43. package/dist/cjs/version.js +1 -1
  44. package/dist/cjs/{vueTypes-727b7c63.js → vueTypes-1bf00978.js} +8 -19
  45. package/dist/es/Button-474510e3.js +53 -0
  46. package/dist/es/{Card-450683f1.js → Card-38cbe652.js} +3 -3
  47. package/dist/es/{ComponentWrapper-424e86fd.js → ComponentWrapper-5166c76a.js} +42 -56
  48. package/dist/es/{Container-ba826e96.js → Container-d00219f7.js} +2 -2
  49. package/dist/es/DropDown-8764360c.js +688 -0
  50. package/dist/es/DynamicRangeSlider.js +103 -155
  51. package/dist/es/Flex-a08e22d7.js +46 -0
  52. package/dist/es/FormControlList-fe6eaee4.js +38 -0
  53. package/dist/es/Input-4a8ef1f3.js +69 -0
  54. package/dist/es/{ListItem-cad14c5e.js → ListItem-16756c02.js} +7 -8
  55. package/dist/es/MultiDropdownList.js +124 -240
  56. package/dist/es/MultiList.js +123 -261
  57. package/dist/es/MultiRange.js +87 -133
  58. package/dist/es/{Pagination-784bf143.js → Pagination-72bd1d9e.js} +70 -83
  59. package/dist/es/PreferencesConsumer-c276709c.js +73 -0
  60. package/dist/es/RangeInput.js +163 -170
  61. package/dist/es/RangeSlider.js +81 -109
  62. package/dist/es/ReactiveBase.js +138 -155
  63. package/dist/es/ReactiveComponent-f9fa5780.js +2183 -0
  64. package/dist/es/ReactiveComponent.js +42 -337
  65. package/dist/es/ReactiveGoogleMap.js +440 -649
  66. package/dist/es/ReactiveList.js +177 -301
  67. package/dist/es/ResultCard.js +36 -36
  68. package/dist/es/ResultList.js +48 -56
  69. package/dist/es/SelectedFilters.js +62 -69
  70. package/dist/es/SingleDropdownList.js +117 -177
  71. package/dist/es/SingleList.js +121 -205
  72. package/dist/es/SingleRange.js +78 -105
  73. package/dist/es/StateProvider.js +75 -48
  74. package/dist/es/{Title-3342664a.js → Title-863dfa42.js} +2 -2
  75. package/dist/es/ToggleButton.js +72 -119
  76. package/dist/es/{_rollupPluginBabelHelpers-76660dab.js → _rollupPluginBabelHelpers-ded08042.js} +0 -15
  77. package/dist/es/{index-7788a843.js → index-4520a598.js} +39 -107
  78. package/dist/es/index.js +30 -32
  79. package/dist/es/initReactivesearch.js +69 -152
  80. package/dist/es/install.js +49 -41
  81. package/dist/es/{ssr-b2c0b401.js → ssr-af398f0c.js} +36 -7
  82. package/dist/es/{utils-9e68acee.js → utils-9e5a16a1.js} +7 -16
  83. package/dist/es/version.js +1 -1
  84. package/dist/es/{vueTypes-b8146772.js → vueTypes-f1923c72.js} +8 -19
  85. package/package.json +10 -9
  86. package/dist/cjs/Button-446f819e.js +0 -68
  87. package/dist/cjs/CancelSvg-9f258f4f.js +0 -449
  88. package/dist/cjs/Card-642547a8.js +0 -30
  89. package/dist/cjs/Container-daf30918.js +0 -15
  90. package/dist/cjs/DataSearch-6cf29cf0.js +0 -2323
  91. package/dist/cjs/DataSearch.js +0 -30
  92. package/dist/cjs/DropDown-c479bbb0.js +0 -328
  93. package/dist/cjs/Flex-aa517a13.js +0 -52
  94. package/dist/cjs/FormControlList-c195a592.js +0 -47
  95. package/dist/cjs/Input-e6603a7e.js +0 -79
  96. package/dist/cjs/ListItem-8c9e0d68.js +0 -46
  97. package/dist/cjs/Title-1de7d0f4.js +0 -15
  98. package/dist/cjs/install-42ba1d44.js +0 -1409
  99. package/dist/cjs/ssr-3027b848.js +0 -39
  100. package/dist/es/Button-d8bc15ea.js +0 -59
  101. package/dist/es/CancelSvg-4cfae5fd.js +0 -440
  102. package/dist/es/DataSearch-4888aa43.js +0 -2308
  103. package/dist/es/DataSearch.js +0 -22
  104. package/dist/es/DropDown-05a644a5.js +0 -322
  105. package/dist/es/Flex-1f0795c3.js +0 -47
  106. package/dist/es/FormControlList-c22d64f6.js +0 -40
  107. package/dist/es/Input-7a2a9fac.js +0 -71
  108. package/dist/es/install-80bc2764.js +0 -1402
@@ -6,42 +6,44 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
6
6
 
7
7
  var configureStore = require('@appbaseio/reactivecore');
8
8
  var configureStore__default = _interopDefault(configureStore);
9
- var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-c705cbe6.js');
10
- var VueTypes = _interopDefault(require('vue-types'));
11
9
  var constants = require('@appbaseio/reactivecore/lib/utils/constants');
12
- require('emotion');
13
- var styled = require('@appbaseio/vue-emotion');
14
- var styled__default = _interopDefault(styled);
10
+ var _transformOn = _interopDefault(require('@vue/babel-helper-vue-transform-on'));
11
+ var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-f8b843f8.js');
12
+ var vue = require('vue');
13
+ var VueTypes = _interopDefault(require('vue-types'));
14
+ var vueEmotion = require('@appbaseio/vue-emotion');
15
+ var emotion = require('emotion');
15
16
  require('polished');
16
- require('./Button-446f819e.js');
17
- var vueTypes = require('./vueTypes-727b7c63.js');
18
- var Pagination = require('./Pagination-71e85fa9.js');
17
+ require('./Button-ad042719.js');
18
+ var vueTypes = require('./vueTypes-1bf00978.js');
19
+ var Pagination = require('./Pagination-b5ddc906.js');
19
20
  require('@appbaseio/reactivecore/lib/utils/transform');
20
21
  require('redux');
21
- var index = require('./index-6a167fe0.js');
22
- var ComponentWrapper = require('./ComponentWrapper-ad3dad02.js');
23
- var _mergeJSXProps = _interopDefault(require('@vue/babel-helper-vue-jsx-merge-props'));
24
- var FormControlList = require('./FormControlList-c195a592.js');
25
- var GmapVue = require('gmap-vue');
26
- var GmapVue__default = _interopDefault(GmapVue);
22
+ var index = require('./index-d8d8f291.js');
23
+ var ComponentWrapper = require('./ComponentWrapper-75f88599.js');
24
+ var PreferencesConsumer = require('./PreferencesConsumer-eb265924.js');
25
+ var FormControlList = require('./FormControlList-fadd792f.js');
26
+ var VueGoogleMaps = require('vue-google-maps-community-fork');
27
+ var VueGoogleMaps__default = _interopDefault(VueGoogleMaps);
27
28
  var geohash = _interopDefault(require('ngeohash'));
28
29
 
29
30
  var setStreaming = configureStore.Actions.setStreaming,
30
- setQueryOptions = configureStore.Actions.setQueryOptions,
31
- updateQuery = configureStore.Actions.updateQuery,
32
- loadMore = configureStore.Actions.loadMore,
33
- setValue = configureStore.Actions.setValue,
34
- updateComponentProps = configureStore.Actions.updateComponentProps,
35
- setDefaultQuery = configureStore.Actions.setDefaultQuery,
36
- recordResultClick = configureStore.Actions.recordResultClick,
37
- setMapData = configureStore.Actions.setMapData;
31
+ setQueryOptions = configureStore.Actions.setQueryOptions,
32
+ updateQuery = configureStore.Actions.updateQuery,
33
+ loadMore = configureStore.Actions.loadMore,
34
+ setValue = configureStore.Actions.setValue,
35
+ updateComponentProps = configureStore.Actions.updateComponentProps,
36
+ setDefaultQuery = configureStore.Actions.setDefaultQuery,
37
+ recordResultClick = configureStore.Actions.recordResultClick,
38
+ setMapData = configureStore.Actions.setMapData;
38
39
  var isEqual = configureStore.helper.isEqual,
39
- getQueryOptions = configureStore.helper.getQueryOptions,
40
- getClassName = configureStore.helper.getClassName,
41
- parseHits = configureStore.helper.parseHits,
42
- getOptionsFromQuery = configureStore.helper.getOptionsFromQuery,
43
- getResultStats = configureStore.helper.getResultStats; // default map center
40
+ getQueryOptions = configureStore.helper.getQueryOptions,
41
+ getClassName = configureStore.helper.getClassName,
42
+ parseHits = configureStore.helper.parseHits,
43
+ getOptionsFromQuery = configureStore.helper.getOptionsFromQuery,
44
+ getResultStats = configureStore.helper.getResultStats;
44
45
 
46
+ // default map center
45
47
  var MAP_CENTER = {
46
48
  lat: 37.7749,
47
49
  lng: 122.4194
@@ -51,37 +53,28 @@ var style = {
51
53
  height: '100vh',
52
54
  position: 'relative'
53
55
  };
54
-
55
56
  function getPrecision(a) {
56
57
  if (isNaN(a)) return 0; // eslint-disable-line
57
-
58
58
  var e = 1;
59
59
  var p = 0;
60
-
61
60
  while (Math.round(a * e) / e !== a) {
62
61
  e *= 10;
63
62
  p += 1;
64
63
  }
65
-
66
64
  return p;
67
65
  }
68
-
69
66
  function withDistinctLat(loc, count) {
70
67
  var length = getPrecision(loc.lat);
71
- var noiseFactor = length >= 6 ? 4 : length - 2; // eslint-disable-next-line
72
-
68
+ var noiseFactor = length >= 6 ? 4 : length - 2;
69
+ // eslint-disable-next-line
73
70
  var suffix = 1 / Math.pow(10, noiseFactor) * count;
74
-
75
71
  var location = _rollupPluginBabelHelpers._extends({}, loc, {
76
72
  lat: parseFloat((loc.lat + suffix).toFixed(length))
77
73
  });
78
-
79
74
  return location;
80
75
  }
81
-
82
76
  function getLocationObject(location) {
83
77
  var resultType = Array.isArray(location) ? 'array' : typeof location;
84
-
85
78
  switch (resultType) {
86
79
  case 'string':
87
80
  {
@@ -92,14 +85,12 @@ function getLocationObject(location) {
92
85
  lng: parseFloat(locationSplit[1])
93
86
  };
94
87
  }
95
-
96
88
  var locationDecode = geohash.decode(location);
97
89
  return {
98
90
  lat: locationDecode.latitude,
99
91
  lng: locationDecode.longitude
100
92
  };
101
93
  }
102
-
103
94
  case 'array':
104
95
  {
105
96
  return {
@@ -107,14 +98,12 @@ function getLocationObject(location) {
107
98
  lng: location[0]
108
99
  };
109
100
  }
110
-
111
101
  default:
112
102
  {
113
103
  return location;
114
104
  }
115
105
  }
116
106
  }
117
-
118
107
  var ReactiveMap = {
119
108
  name: 'ReactiveMap',
120
109
  props: {
@@ -155,11 +144,9 @@ var ReactiveMap = {
155
144
  data: function data() {
156
145
  var props = this.$props;
157
146
  var currentPageState = 0;
158
-
159
147
  if (props.currentPage) {
160
148
  currentPageState = Math.max(props.currentPage - 1, 0);
161
149
  }
162
-
163
150
  this.__state = {
164
151
  from: currentPageState * props.size,
165
152
  zoom: props.defaultZoom,
@@ -176,8 +163,7 @@ var ReactiveMap = {
176
163
  },
177
164
  stats: function stats() {
178
165
  var _this$getAllData = this.getAllData(),
179
- resultsToRender = _this$getAllData.resultsToRender;
180
-
166
+ resultsToRender = _this$getAllData.resultsToRender;
181
167
  return _rollupPluginBabelHelpers._extends({}, getResultStats(this), {
182
168
  currentPage: this.currentPageState,
183
169
  displayedResults: resultsToRender.length
@@ -201,26 +187,21 @@ var ReactiveMap = {
201
187
  var options = getQueryOptions(this.$props);
202
188
  options.from = 0;
203
189
  this.$defaultQuery = newVal(null, this.$props);
204
-
205
190
  var _ref = this.$defaultQuery || {},
206
- sort = _ref.sort,
207
- query = _ref.query;
208
-
191
+ sort = _ref.sort,
192
+ query = _ref.query;
209
193
  if (sort) {
210
194
  options.sort = this.$defaultQuery.sort;
211
195
  }
212
-
213
196
  var queryOptions = getOptionsFromQuery(this.$defaultQuery);
214
-
215
197
  if (queryOptions) {
216
198
  options = _rollupPluginBabelHelpers._extends({}, options, getOptionsFromQuery(this.$defaultQuery));
217
- } // Update calculated default query in store
218
-
219
-
199
+ }
200
+ // Update calculated default query in store
220
201
  this.setQueryOptions(this.$props.componentId, options, false);
221
202
  var persistMapQuery = true;
222
- var forceExecute = true; // Update default query to include the geo bounding box query
223
-
203
+ var forceExecute = true;
204
+ // Update default query to include the geo bounding box query
224
205
  this.setDefaultQueryForRSAPI();
225
206
  var meta = {
226
207
  mapBoxBounds: this.mapBoxBounds
@@ -247,7 +228,6 @@ var ReactiveMap = {
247
228
  },
248
229
  hits: function hits(newVal, oldVal) {
249
230
  this.$emit('data', this.getData());
250
-
251
231
  if (this.pagination) {
252
232
  // called when page is changed
253
233
  if (this.isLoading && (oldVal || newVal)) {
@@ -257,54 +237,46 @@ var ReactiveMap = {
257
237
  },
258
238
  rawData: function rawData(newVal, oldVal) {
259
239
  var _this = this;
260
-
261
240
  if (!isEqual(newVal, oldVal)) {
262
241
  var promotedResults = this.promotedResults,
263
- hits = this.hits;
242
+ hits = this.hits;
264
243
  var results = parseHits(hits) || [];
265
244
  var parsedPromotedResults = parseHits(promotedResults) || [];
266
245
  var filteredResults = results;
267
-
268
246
  if (parsedPromotedResults.length) {
269
247
  var ids = parsedPromotedResults.map(function (item) {
270
248
  return item._id;
271
249
  }).filter(Boolean);
272
-
273
250
  if (ids) {
274
251
  filteredResults = filteredResults.filter(function (item) {
275
252
  return !ids.includes(item._id);
276
253
  });
277
254
  }
278
-
279
255
  filteredResults = [].concat(parsedPromotedResults, filteredResults);
280
256
  }
281
-
282
257
  filteredResults = filteredResults.filter(function (item) {
283
258
  return !!item[_this.dataField];
284
259
  }).map(function (item) {
285
260
  var _extends2;
286
-
287
261
  return _rollupPluginBabelHelpers._extends({}, item, (_extends2 = {}, _extends2[_this.dataField] = getLocationObject(item[_this.dataField]), _extends2));
288
262
  });
289
263
  this.filteredResults = this.addNoise(filteredResults);
290
-
291
264
  if (this.calculateMarkers) {
292
265
  this.markersData = this.calculateMarkers({
293
266
  data: this.filteredResults,
294
267
  rawData: this.rawData
295
268
  }) || [];
296
269
  }
297
-
298
270
  this.$emit('data', this.getData());
299
271
  }
300
272
  },
301
273
  center: function center(newVal, oldVal) {
302
274
  if (!isEqual(newVal, oldVal)) {
303
- var persistMapQuery = !!this.center; // we need to forceExecute the query because the center has changed
304
-
275
+ var persistMapQuery = !!this.center;
276
+ // we need to forceExecute the query because the center has changed
305
277
  var forceExecute = true;
306
- var geoQuery = this.getGeoQuery(this.$props); // Update default query for RS API
307
-
278
+ var geoQuery = this.getGeoQuery(this.$props);
279
+ // Update default query for RS API
308
280
  this.setDefaultQueryForRSAPI();
309
281
  var meta = {
310
282
  mapBoxBounds: this.mapBoxBounds
@@ -321,7 +293,6 @@ var ReactiveMap = {
321
293
  lng: Number(location[1])
322
294
  };
323
295
  }
324
-
325
296
  return {
326
297
  lat: location ? Number(location.lat) : this.defaultCenter.lat,
327
298
  lng: location ? Number(location.lon === undefined ? location.lng : location.lon) : this.defaultCenter.lng
@@ -333,14 +304,11 @@ var ReactiveMap = {
333
304
  },
334
305
  addNoise: function addNoise(hits) {
335
306
  var _this2 = this;
336
-
337
307
  var hitMap = {};
338
308
  var updatedHits = [];
339
309
  hits.forEach(function (item) {
340
310
  var updatedItem = _rollupPluginBabelHelpers._extends({}, item);
341
-
342
311
  var location = _this2.parseLocation(item[_this2.dataField]);
343
-
344
312
  var key = JSON.stringify(location);
345
313
  var count = hitMap[key] || 0;
346
314
  updatedItem[_this2.dataField] = count ? withDistinctLat(location, count) : location;
@@ -353,16 +321,13 @@ var ReactiveMap = {
353
321
  if (result) {
354
322
  return this.parseLocation(result[this.dataField]);
355
323
  }
356
-
357
324
  return null;
358
325
  },
359
326
  getHitsCenter: function getHitsCenter(hits) {
360
327
  var _this3 = this;
361
-
362
328
  var data = hits.map(function (hit) {
363
329
  return hit[_this3.dataField];
364
330
  });
365
-
366
331
  if (data.length) {
367
332
  var numCoords = data.length;
368
333
  var X = 0.0;
@@ -386,8 +351,8 @@ var ReactiveMap = {
386
351
  X /= numCoords;
387
352
  Y /= numCoords;
388
353
  Z /= numCoords;
389
- var lng = Math.atan2(Y, X); // eslint-disable-next-line
390
-
354
+ var lng = Math.atan2(Y, X);
355
+ // eslint-disable-next-line
391
356
  var hyp = Math.sqrt(X * X + Y * Y);
392
357
  var lat = Math.atan2(Z, hyp);
393
358
  var newX = lat * 180 / Math.PI;
@@ -397,18 +362,14 @@ var ReactiveMap = {
397
362
  lng: newY
398
363
  };
399
364
  }
400
-
401
365
  return false;
402
366
  },
403
367
  getCenter: function getCenter(hits) {
404
368
  var _this4 = this;
405
-
406
369
  if (this.center) {
407
370
  return this.parseLocation(this.center);
408
371
  }
409
-
410
372
  var mapRef = this.getMapRef();
411
-
412
373
  if (mapRef && typeof mapRef.getCenter === 'function' && this.$options.preserveCenter) {
413
374
  var currentCenter = mapRef.getCenter();
414
375
  setTimeout(function () {
@@ -419,21 +380,17 @@ var ReactiveMap = {
419
380
  lng: currentCenter.lng()
420
381
  });
421
382
  }
422
-
423
383
  if (hits && hits.length) {
424
384
  if (this.autoCenter) {
425
385
  return this.getHitsCenter(hits) || this.getDefaultCenter();
426
386
  }
427
-
428
387
  return hits[0] && hits[0][this.dataField] ? this.getPosition(hits[0]) : this.getDefaultCenter();
429
388
  }
430
-
431
389
  return this.getDefaultCenter();
432
390
  },
433
391
  handleZoomChange: function handleZoomChange(zoom) {
434
392
  if (zoom) {
435
393
  var prevZoom = this.zoom;
436
-
437
394
  if (this.searchAsMove) {
438
395
  this.zoom = zoom;
439
396
  this.$options.preserveCenter = true;
@@ -441,7 +398,6 @@ var ReactiveMap = {
441
398
  } else {
442
399
  this.zoom = zoom;
443
400
  }
444
-
445
401
  if (prevZoom !== zoom) {
446
402
  this.$emit('zoom-changed', zoom);
447
403
  }
@@ -452,7 +408,6 @@ var ReactiveMap = {
452
408
  this.$options.preserveCenter = true;
453
409
  this.setGeoQuery(true);
454
410
  }
455
-
456
411
  this.$emit('drag-end');
457
412
  },
458
413
  handlePreserveCenter: function handlePreserveCenter(preserveCenter) {
@@ -466,14 +421,12 @@ var ReactiveMap = {
466
421
  var executeUpdate = !!this.center;
467
422
  this.setGeoQuery(executeUpdate);
468
423
  }
469
-
470
424
  this.$emit('idle');
471
425
  },
472
426
  setGeoQuery: function setGeoQuery(executeUpdate) {
473
427
  if (executeUpdate === void 0) {
474
428
  executeUpdate = false;
475
429
  }
476
-
477
430
  // execute a new query on the initial mount
478
431
  // or whenever searchAsMove is true and the map is dragged
479
432
  if (executeUpdate || !this.skipBoundingBox && !this.mapBoxBounds) {
@@ -485,18 +438,16 @@ var ReactiveMap = {
485
438
  };
486
439
  this.setMapData(this.componentId, this.$defaultQuery, persistMapQuery, forceExecute, meta);
487
440
  }
488
-
489
441
  this.skipBoundingBox = false;
490
442
  },
491
443
  getMapParams: function getMapParams() {
492
444
  var _this$getData = this.getData(),
493
- data = _this$getData.data;
494
-
445
+ data = _this$getData.data;
495
446
  var showMarkers = this.showMarkers,
496
- defaultPin = this.defaultPin,
497
- renderPopover = this.renderPopover,
498
- autoClosePopover = this.autoClosePopover,
499
- renderItem = this.renderItem;
447
+ defaultPin = this.defaultPin,
448
+ renderPopover = this.renderPopover,
449
+ autoClosePopover = this.autoClosePopover,
450
+ renderItem = this.renderItem;
500
451
  return {
501
452
  resultsToRender: data,
502
453
  center: this.getCenter(data),
@@ -517,19 +468,17 @@ var ReactiveMap = {
517
468
  },
518
469
  getAllData: function getAllData() {
519
470
  var size = this.size,
520
- promotedResults = this.promotedResults,
521
- customData = this.customData,
522
- currentPage = this.currentPage,
523
- hits = this.hits;
471
+ promotedResults = this.promotedResults,
472
+ customData = this.customData,
473
+ currentPage = this.currentPage,
474
+ hits = this.hits;
524
475
  var results = parseHits(hits) || [];
525
476
  var parsedPromotedResults = parseHits(promotedResults) || [];
526
477
  var base = currentPage * size;
527
478
  var resultsToRender = this.filteredResults || [];
528
-
529
479
  if (this.markersData) {
530
480
  resultsToRender = this.markersData;
531
481
  }
532
-
533
482
  return {
534
483
  results: results,
535
484
  resultsToRender: resultsToRender,
@@ -542,11 +491,10 @@ var ReactiveMap = {
542
491
  },
543
492
  getData: function getData() {
544
493
  var _this$getAllData2 = this.getAllData(),
545
- promotedResults = _this$getAllData2.promotedResults,
546
- aggregationData = _this$getAllData2.aggregationData,
547
- customData = _this$getAllData2.customData,
548
- resultsToRender = _this$getAllData2.resultsToRender;
549
-
494
+ promotedResults = _this$getAllData2.promotedResults,
495
+ aggregationData = _this$getAllData2.aggregationData,
496
+ customData = _this$getAllData2.customData,
497
+ resultsToRender = _this$getAllData2.resultsToRender;
550
498
  return {
551
499
  data: this.withClickIds(resultsToRender),
552
500
  aggregationData: this.withClickIds(aggregationData || []),
@@ -558,8 +506,7 @@ var ReactiveMap = {
558
506
  },
559
507
  getComponent: function getComponent() {
560
508
  var error = this.error,
561
- isLoading = this.isLoading;
562
-
509
+ isLoading = this.isLoading;
563
510
  var data = _rollupPluginBabelHelpers._extends({
564
511
  error: error,
565
512
  loading: isLoading,
@@ -567,7 +514,6 @@ var ReactiveMap = {
567
514
  triggerClickAnalytics: this.triggerClickAnalytics,
568
515
  setPage: this.setPage
569
516
  }, this.getData());
570
-
571
517
  return index.getComponent(data, this);
572
518
  },
573
519
  setPage: function setPage(page) {
@@ -583,7 +529,6 @@ var ReactiveMap = {
583
529
  this.loadMoreAction(this.componentId, _rollupPluginBabelHelpers._extends({}, options, {
584
530
  from: value
585
531
  }), false);
586
-
587
532
  if (this.URLParams) {
588
533
  this.setPageURL(this.componentId, page + 1, this.componentId, false, true);
589
534
  }
@@ -605,7 +550,6 @@ var ReactiveMap = {
605
550
  if (props === void 0) {
606
551
  props = this.$props;
607
552
  }
608
-
609
553
  this.$defaultQuery = props.defaultQuery ? props.defaultQuery() : null;
610
554
  var mapRef = this.getMapRef();
611
555
  var mapBounds = mapRef && typeof mapRef.getBounds === 'function' ? mapRef.getBounds() : false;
@@ -613,10 +557,8 @@ var ReactiveMap = {
613
557
  var south;
614
558
  var east;
615
559
  var west;
616
-
617
560
  if (mapBounds) {
618
561
  var _geo_bounding_box;
619
-
620
562
  north = mapBounds.getNorthEast().lat();
621
563
  south = mapBounds.getSouthWest().lat();
622
564
  east = mapBounds.getNorthEast().lng();
@@ -629,31 +571,27 @@ var ReactiveMap = {
629
571
  var geoQuery = {
630
572
  geo_bounding_box: (_geo_bounding_box = {}, _geo_bounding_box[this.dataField] = boundingBoxCoordinates, _geo_bounding_box)
631
573
  };
632
-
633
574
  if (this.$defaultQuery) {
634
575
  var query = this.$defaultQuery.query;
635
-
636
576
  if (query) {
637
577
  // adds defaultQuery's query to geo-query
638
578
  // to generate a map query
579
+
639
580
  return {
640
581
  must: [geoQuery, query]
641
582
  };
642
583
  }
643
584
  }
644
-
645
585
  return geoQuery;
646
- } // return the defaultQuery (if set) or null when map query not available
647
-
586
+ }
648
587
 
588
+ // return the defaultQuery (if set) or null when map query not available
649
589
  return this.$defaultQuery ? this.$defaultQuery.query : null;
650
590
  },
651
591
  getGeoDistanceQuery: function getGeoDistanceQuery() {
652
592
  var center = this.center || this.defaultCenter;
653
-
654
593
  if (center && this.defaultRadius) {
655
594
  var _geo_distance;
656
-
657
595
  // skips geo bounding box query on initial load
658
596
  this.skipBoundingBox = true;
659
597
  return {
@@ -662,7 +600,6 @@ var ReactiveMap = {
662
600
  }, _geo_distance[this.dataField] = this.getArrPosition(center), _geo_distance)
663
601
  };
664
602
  }
665
-
666
603
  return null;
667
604
  },
668
605
  loadMore: function loadMore() {
@@ -677,26 +614,21 @@ var ReactiveMap = {
677
614
  },
678
615
  triggerClickAnalytics: function triggerClickAnalytics(searchPosition, documentId) {
679
616
  var docId = documentId;
680
-
681
617
  if (!docId) {
682
618
  var _this$getData2 = this.getData(),
683
- data = _this$getData2.data;
684
-
619
+ data = _this$getData2.data;
685
620
  var hitData = data.find(function (hit) {
686
621
  return hit._click_id === searchPosition;
687
622
  });
688
-
689
623
  if (hitData && hitData._id) {
690
624
  docId = hitData._id;
691
625
  }
692
626
  }
693
-
694
627
  this.recordResultClick(searchPosition, docId);
695
628
  },
696
629
  withClickIds: function withClickIds(results) {
697
630
  var _this$getAllData3 = this.getAllData(),
698
- base = _this$getAllData3.base;
699
-
631
+ base = _this$getAllData3.base;
700
632
  return results.map(function (result, index) {
701
633
  return _rollupPluginBabelHelpers._extends({}, result, {
702
634
  _click_id: base + index
@@ -708,19 +640,15 @@ var ReactiveMap = {
708
640
  this.$emit('search-as-move', this.searchAsMove);
709
641
  },
710
642
  renderErrorComponent: function renderErrorComponent() {
711
- var renderError = this.$scopedSlots.renderError || this.$props.renderError;
712
-
643
+ var renderError = this.$slots.renderError || this.$props.renderError;
713
644
  if (renderError && this.error && !this.isLoading) {
714
645
  return index.isFunction(renderError) ? renderError(this.error) : renderError;
715
646
  }
716
-
717
647
  return null;
718
648
  },
719
649
  renderSearchAsMove: function renderSearchAsMove() {
720
- var h = this.$createElement;
721
-
722
650
  if (this.showSearchAsMove) {
723
- return h("div", {
651
+ return vue.createVNode("div", {
724
652
  "style": {
725
653
  position: 'absolute',
726
654
  bottom: '30px',
@@ -732,41 +660,29 @@ var ReactiveMap = {
732
660
  borderRadius: 2,
733
661
  zIndex: 10000
734
662
  },
735
- "attrs": {
736
- "className": getClassName(this.innerClass, 'checkboxContainer') || null
737
- }
738
- }, [h(FormControlList.Checkbox, {
739
- "attrs": {
740
- "type": "checkbox",
741
- "id": this.$props.componentId + "-searchasmove",
742
- "checked": this.searchAsMove,
743
- "show": true
744
- },
663
+ "className": getClassName(this.innerClass, 'checkboxContainer') || null
664
+ }, [vue.createVNode(FormControlList.Checkbox, {
665
+ "type": "checkbox",
745
666
  "class": getClassName(this.$props.innerClass, 'checkbox'),
746
- "on": {
747
- "click": this.toggleSearchAsMove
748
- }
749
- }), h("label", {
750
- "attrs": {
751
- "className": getClassName(this.innerClass, 'label') || null,
752
- "for": this.$props.componentId + "-searchasmove"
753
- }
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"
754
674
  }, [this.searchAsMoveLabel])]);
755
675
  }
756
-
757
676
  return null;
758
677
  },
759
678
  renderPagination: function renderPagination() {
760
- var h = this.$createElement;
761
- return h(Pagination.Pagination, {
762
- "attrs": {
763
- "pages": this.pages,
764
- "totalPages": this.totalPages,
765
- "currentPage": this.currentPageState,
766
- "setPage": this.setPage,
767
- "innerClass": this.innerClass
768
- }
769
- });
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);
770
686
  }
771
687
  },
772
688
  created: function created() {
@@ -774,7 +690,6 @@ var ReactiveMap = {
774
690
  this.currentPageState = this.defaultPage;
775
691
  this.from = this.currentPageState * this.$props.size;
776
692
  }
777
-
778
693
  this.internalComponent = this.$props.componentId + "__internal";
779
694
  this.updateComponentProps(this.componentId, {
780
695
  from: this.from
@@ -789,35 +704,31 @@ var ReactiveMap = {
789
704
  this.setPageURL(this.$props.componentId, this.currentPage, this.$props.componentId, false, true);
790
705
  }
791
706
  }
792
-
793
707
  var options = getQueryOptions(this.$props);
794
708
  options.from = this.$data.from;
795
-
796
709
  if (this.$props.sortBy) {
797
710
  var _ref2;
798
-
799
711
  options.sort = [(_ref2 = {}, _ref2[this.$props.dataField] = {
800
712
  order: this.$props.sortBy
801
713
  }, _ref2)];
802
714
  }
803
-
804
715
  this.$defaultQuery = null;
805
-
806
716
  if (this.$props.defaultQuery) {
807
717
  this.$defaultQuery = this.$props.defaultQuery();
808
- options = _rollupPluginBabelHelpers._extends({}, options, getOptionsFromQuery(this.$defaultQuery)); // Override sort query with defaultQuery's sort if defined
718
+ options = _rollupPluginBabelHelpers._extends({}, options, getOptionsFromQuery(this.$defaultQuery));
809
719
 
720
+ // Override sort query with defaultQuery's sort if defined
810
721
  if (this.$defaultQuery.sort) {
811
722
  options.sort = this.$defaultQuery.sort;
812
- } // since we want defaultQuery to be executed anytime
723
+ }
724
+ // since we want defaultQuery to be executed anytime
813
725
  // map component's query is being executed
814
-
815
-
816
- var persistMapQuery = true; // no need to forceExecute because setReact() will capture the main query
726
+ var persistMapQuery = true;
727
+ // no need to forceExecute because setReact() will capture the main query
817
728
  // and execute the defaultQuery along with it
729
+ var forceExecute = false;
818
730
 
819
- var forceExecute = false; // Update default query for RS API
820
-
731
+ // Update default query for RS API
821
732
  this.setDefaultQueryForRSAPI();
822
733
  var meta = {
823
734
  mapBoxBounds: this.mapBoxBounds
@@ -826,20 +737,19 @@ var ReactiveMap = {
826
737
  } else {
827
738
  // only apply geo-distance when defaultQuery prop is not set
828
739
  var query = this.getGeoDistanceQuery();
829
-
830
740
  if (query) {
831
741
  // - only persist the map query if center prop is set
832
742
  // - ideally, persist the map query if you want to keep executing it
833
743
  // whenever there is a change (due to subscription) in the component query
834
- var _persistMapQuery = !!this.center; // - forceExecute will make sure that the component query + Map query gets executed
744
+ var _persistMapQuery = !!this.center;
745
+
746
+ // - forceExecute will make sure that the component query + Map query gets executed
835
747
  // irrespective of the changes in the component query
836
748
  // - forceExecute will only come into play when searchAsMove is true
837
749
  // - kindly note that forceExecute may result in one additional network request
838
750
  // since it bypasses the gatekeeping
839
-
840
-
841
- var _forceExecute = this.searchAsMove; // Set meta for `distance` and `coordinates` in selected value
842
-
751
+ var _forceExecute = this.searchAsMove;
752
+ // Set meta for `distance` and `coordinates` in selected value
843
753
  var center = this.center || this.defaultCenter;
844
754
  var coordinatesObject = this.getArrPosition(center);
845
755
  var _meta = {
@@ -849,19 +759,16 @@ var ReactiveMap = {
849
759
  this.setMapData(this.componentId, query, _persistMapQuery, _forceExecute, _meta);
850
760
  }
851
761
  }
852
-
853
762
  this.setQueryOptions(this.componentId, options, !(this.$defaultQuery && this.$defaultQuery.query));
854
763
  },
855
764
  render: function render() {
856
- var h = arguments[0];
857
- var loader = this.$scopedSlots.loader || this.$props.loader;
858
- return h("div", {
765
+ var loader = this.$slots.loader || this.$props.loader;
766
+ return vue.createVNode("div", {
859
767
  "style": _rollupPluginBabelHelpers._extends({}, style, this.$props.style),
860
768
  "class": this.$props.className
861
769
  }, [this.renderErrorComponent(), this.isLoading && loader, this.hasCustomRender ? this.getComponent() : null, this.renderMap(this.getMapParams()), this.pagination ? this.renderPagination() : null]);
862
770
  }
863
771
  };
864
-
865
772
  var mapStateToProps = function mapStateToProps(state, props) {
866
773
  return {
867
774
  defaultPage: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value - 1 || -1,
@@ -876,7 +783,6 @@ var mapStateToProps = function mapStateToProps(state, props) {
876
783
  hidden: state.hits[props.componentId] && state.hits[props.componentId].hidden
877
784
  };
878
785
  };
879
-
880
786
  var mapDispatchToProps = {
881
787
  loadMoreAction: loadMore,
882
788
  setPageURL: setValue,
@@ -888,16 +794,14 @@ var mapDispatchToProps = {
888
794
  recordResultClick: recordResultClick,
889
795
  setMapData: setMapData
890
796
  };
891
- var RMConnected = ComponentWrapper.ComponentWrapper(index.connect(mapStateToProps, mapDispatchToProps)(ReactiveMap), {
797
+ var RMConnected = PreferencesConsumer.PreferencesConsumer(ComponentWrapper.ComponentWrapper(index.connect(mapStateToProps, mapDispatchToProps)(ReactiveMap), {
892
798
  componentType: constants.componentTypes.reactiveMap,
893
799
  internalComponent: true
894
- });
895
-
800
+ }));
896
801
  ReactiveMap.install = function (Vue) {
897
802
  Vue.component(ReactiveMap.name, RMConnected);
898
- }; // Add componentType for SSR
899
-
900
-
803
+ };
804
+ // Add componentType for SSR
901
805
  ReactiveMap.componentType = constants.componentTypes.reactiveMap;
902
806
 
903
807
  var infoWindowMappedProps = {
@@ -929,26 +833,26 @@ var infoWindowMappedProps = {
929
833
  * @param {string[]} events an array of string with all events that you want to bind
930
834
  * @returns {void}
931
835
  */
932
-
933
836
  function bindEvents(vueInst, googleMapsInst, events) {
934
837
  events.forEach(function (eventName) {
935
- if (vueInst.$gmapOptions.autoBindAllEvents || vueInst.$listeners[eventName]) {
838
+ if (vueInst.$gmapOptions.autoBindAllEvents || vueInst.$attrs[eventName]) {
936
839
  googleMapsInst.addListener(eventName, function (ev) {
937
840
  vueInst.$emit(eventName, ev);
938
841
  });
939
842
  }
940
843
  });
941
844
  }
845
+
942
846
  /**
943
847
  * Function that helps you to capitalize the first letter on a word
944
848
  *
945
849
  * @param {string} text the text that you want to capitalize
946
850
  * @returns {string}
947
851
  */
948
-
949
852
  function capitalizeFirstLetter(text) {
950
853
  return text.charAt(0).toUpperCase() + text.slice(1);
951
854
  }
855
+
952
856
  /**
953
857
  * Function that helps you to get all non nullable props from a component
954
858
  *
@@ -956,16 +860,15 @@ function capitalizeFirstLetter(text) {
956
860
  * @param {Object} props the props object
957
861
  * @returns {Object}
958
862
  */
959
-
960
863
  function getPropsValues(vueInst, props) {
961
864
  return Object.keys(props).reduce(function (acc, prop) {
962
865
  if (vueInst[prop] !== undefined) {
963
866
  acc[prop] = vueInst[prop];
964
867
  }
965
-
966
868
  return acc;
967
869
  }, {});
968
870
  }
871
+
969
872
  /**
970
873
  * Watch the individual properties of a PoD object, instead of the object
971
874
  * per se. This is different from a deep watch where both the reference
@@ -979,19 +882,17 @@ function getPropsValues(vueInst, props) {
979
882
  * @param {boolean} immediate=false
980
883
  * @returns {void}
981
884
  */
982
-
983
885
  function watchPrimitiveProperties(vueInst, propertiesToTrack, handler, immediate) {
984
886
  if (immediate === void 0) {
985
887
  immediate = false;
986
888
  }
987
-
988
889
  var isHandled = false;
890
+
989
891
  /**
990
892
  * Function in charge to execute the handler function if it was not fired
991
893
  *
992
894
  * @returns void
993
895
  */
994
-
995
896
  function requestHandle() {
996
897
  if (!isHandled) {
997
898
  isHandled = true;
@@ -1001,13 +902,13 @@ function watchPrimitiveProperties(vueInst, propertiesToTrack, handler, immediate
1001
902
  });
1002
903
  }
1003
904
  }
1004
-
1005
905
  propertiesToTrack.forEach(function (prop) {
1006
906
  vueInst.$watch(prop, requestHandle, {
1007
907
  immediate: immediate
1008
908
  });
1009
909
  });
1010
910
  }
911
+
1011
912
  /**
1012
913
  * Binds the properties defined in props to the google maps instance.
1013
914
  * If the prop is an Object type, and we wish to track the properties
@@ -1020,30 +921,27 @@ function watchPrimitiveProperties(vueInst, propertiesToTrack, handler, immediate
1020
921
  * @param {Object} props object with the component props tha should be synched with the Google Maps instances props
1021
922
  * @returns {void}
1022
923
  */
1023
-
1024
924
  function bindProps(vueInst, googleMapsInst, props) {
1025
925
  Object.keys(props).forEach(function (attribute) {
1026
926
  var _props$attribute = props[attribute],
1027
- twoWay = _props$attribute.twoWay,
1028
- type = _props$attribute.type,
1029
- trackProperties = _props$attribute.trackProperties,
1030
- noBind = _props$attribute.noBind;
1031
-
927
+ twoWay = _props$attribute.twoWay,
928
+ type = _props$attribute.type,
929
+ trackProperties = _props$attribute.trackProperties,
930
+ noBind = _props$attribute.noBind;
1032
931
  if (!noBind) {
1033
932
  var setMethodName = "set" + capitalizeFirstLetter(attribute);
1034
933
  var getMethodName = "get" + capitalizeFirstLetter(attribute);
1035
934
  var eventName = attribute.toLowerCase() + "_changed";
1036
935
  var initialValue = vueInst[attribute];
1037
-
1038
936
  if (typeof googleMapsInst[setMethodName] === 'undefined') {
1039
937
  throw new Error( // TODO: Analyze all disabled rules in the file
1040
938
  // eslint-disable-next-line no-underscore-dangle -- old code should be analyzed
1041
939
  setMethodName + " is not a method of (the Maps object corresponding to) " + vueInst.$options._componentTag);
1042
- } // We need to avoid an endless
940
+ }
941
+
942
+ // We need to avoid an endless
1043
943
  // propChanged -> event emitted -> propChanged -> event emitted loop
1044
944
  // although this may really be the user's responsibility
1045
-
1046
-
1047
945
  if (type !== Object || !trackProperties) {
1048
946
  // Track the object deeply
1049
947
  vueInst.$watch(attribute, function () {
@@ -1060,8 +958,7 @@ function bindProps(vueInst, googleMapsInst, props) {
1060
958
  googleMapsInst[setMethodName](vueInst[attribute]);
1061
959
  }, vueInst[attribute] !== undefined);
1062
960
  }
1063
-
1064
- if (twoWay && (vueInst.$gmapOptions.autoBindAllEvents || vueInst.$listeners[eventName])) {
961
+ if (twoWay && (vueInst.$gmapOptions.autoBindAllEvents || vueInst.$attrs[eventName])) {
1065
962
  googleMapsInst.addListener(eventName, function () {
1066
963
  vueInst.$emit(eventName, googleMapsInst[getMethodName]());
1067
964
  });
@@ -1081,47 +978,39 @@ var InfoWindowClusterManager = {
1081
978
  },
1082
979
  provide: function provide() {
1083
980
  var _this = this;
1084
-
1085
- var events = ['domready', 'closeclick', 'content_changed']; // Infowindow needs this to be immediately available
1086
-
981
+ var events = ['domready', 'closeclick', 'content_changed'];
982
+ // Infowindow needs this to be immediately available
1087
983
  var promise = this.$mapPromise.then(function (map) {
1088
- _this.$map = map; // Initialize the maps with the given options
1089
-
984
+ _this.$map = map;
985
+ // Initialize the maps with the given options
1090
986
  var initialOptions = _rollupPluginBabelHelpers._extends({}, _this.options, {
1091
987
  map: map
1092
988
  }, getPropsValues(_this, infoWindowMappedProps));
1093
-
1094
989
  var extraOptions = initialOptions.options,
1095
- position = initialOptions.position,
1096
- finalOptions = _rollupPluginBabelHelpers._objectWithoutPropertiesLoose(initialOptions, _excluded);
1097
-
990
+ position = initialOptions.position,
991
+ finalOptions = _rollupPluginBabelHelpers._objectWithoutPropertiesLoose(initialOptions, _excluded);
1098
992
  finalOptions.content = _this.$refs.flyaway;
1099
-
1100
993
  if (_this.$markerPromise) {
1101
994
  _this.$markerPromise.then(function (markerObject) {
1102
- _this.$markerObject = markerObject; // eslint-disable-next-line
1103
-
995
+ _this.$markerObject = markerObject;
996
+ // eslint-disable-next-line
1104
997
  _this.$infoWindowObject = new google.maps.InfoWindow(finalOptions);
1105
998
  bindProps(_this, _this.$infoWindowObject, infoWindowMappedProps);
1106
- bindEvents(_this, _this.$infoWindowObject, events); // TODO: This function names should be analyzed
1107
-
999
+ bindEvents(_this, _this.$infoWindowObject, events);
1000
+ // TODO: This function names should be analyzed
1108
1001
  /* eslint-disable no-underscore-dangle -- old style */
1109
-
1110
1002
  _this._openInfoWindow();
1111
-
1112
1003
  _this.$watch('opened', function () {
1113
1004
  _this._openInfoWindow();
1114
1005
  });
1115
1006
  /* eslint-enable no-underscore-dangle */
1116
-
1117
-
1118
1007
  return _this.$infoWindowObject;
1119
1008
  });
1120
1009
  }
1121
1010
  })["catch"](function (error) {
1122
1011
  throw error;
1123
- }); // TODO: analyze the efects of only returns the instance and remove completely the promise
1124
-
1012
+ });
1013
+ // TODO: analyze the efects of only returns the instance and remove completely the promise
1125
1014
  this.$infoWindowPromise = promise;
1126
1015
  return {
1127
1016
  $infoWindowPromise: promise
@@ -1138,7 +1027,6 @@ var InfoWindowClusterManager = {
1138
1027
  type: [String, Object],
1139
1028
  "default": undefined
1140
1029
  },
1141
-
1142
1030
  /**
1143
1031
  * Determines if the info-window is open or not
1144
1032
  */
@@ -1146,7 +1034,6 @@ var InfoWindowClusterManager = {
1146
1034
  type: Boolean,
1147
1035
  "default": true
1148
1036
  },
1149
-
1150
1037
  /**
1151
1038
  * Contains the LatLng at which this info window is anchored.
1152
1039
  * Note: An InfoWindow may be attached either to a Marker object
@@ -1162,7 +1049,6 @@ var InfoWindowClusterManager = {
1162
1049
  type: Object,
1163
1050
  "default": undefined
1164
1051
  },
1165
-
1166
1052
  /**
1167
1053
  * All InfoWindows are displayed on the map in order of their zIndex, with higher values displaying in front of InfoWindows with lower values. By default, InfoWindows are displayed according to their latitude, with InfoWindows of lower latitudes appearing in front of InfoWindows at higher latitudes. InfoWindows are always displayed in front of markers.
1168
1054
  * @value 0
@@ -1172,7 +1058,6 @@ var InfoWindowClusterManager = {
1172
1058
  type: Number,
1173
1059
  "default": 0
1174
1060
  },
1175
-
1176
1061
  /**
1177
1062
  * Extra options that you want to pass to the component
1178
1063
  */
@@ -1208,10 +1093,9 @@ var InfoWindowClusterManager = {
1208
1093
  }
1209
1094
  },
1210
1095
  render: function render() {
1211
- var h = arguments[0];
1212
- return h("div", [h("div", {
1096
+ return vue.createVNode("div", null, [vue.createVNode("div", {
1213
1097
  "ref": "flyaway"
1214
- }, [this.$scopedSlots["default"]()])]);
1098
+ }, [this.$slots["default"]()])]);
1215
1099
  }
1216
1100
  };
1217
1101
 
@@ -1243,14 +1127,19 @@ var InfoWindowWrapper = {
1243
1127
  }
1244
1128
  },
1245
1129
  render: function render() {
1246
- var h = arguments[0];
1130
+ var _this = this;
1247
1131
  var renderPopover = this.renderPopover,
1248
- events = this.events;
1249
- return h(InfoWindowClusterManager, {
1250
- "ref": this.id + "-Info-Window",
1251
- "props": _rollupPluginBabelHelpers._extends({}, this.infoWindowProps),
1252
- "on": _rollupPluginBabelHelpers._extends({}, events)
1253
- }, [h("div", [renderPopover(this.handleClose)])]);
1132
+ 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
+ });
1254
1143
  }
1255
1144
  };
1256
1145
 
@@ -1304,14 +1193,12 @@ var ClusterMarkers = {
1304
1193
  },
1305
1194
  closeMarker: function closeMarker(marker) {
1306
1195
  var _this$$props = this.$props,
1307
- autoClosePopover = _this$$props.autoClosePopover,
1308
- handlePreserveCenter = _this$$props.handlePreserveCenter;
1196
+ autoClosePopover = _this$$props.autoClosePopover,
1197
+ handlePreserveCenter = _this$$props.handlePreserveCenter;
1309
1198
  var id = marker.metaData && marker.metaData._id;
1310
-
1311
1199
  var _this$openMarkers = this.openMarkers,
1312
- del = _this$openMarkers[id],
1313
- activeMarkers = _rollupPluginBabelHelpers._objectWithoutPropertiesLoose(_this$openMarkers, [id].map(_rollupPluginBabelHelpers._toPropertyKey));
1314
-
1200
+ del = _this$openMarkers[id],
1201
+ activeMarkers = _rollupPluginBabelHelpers._objectWithoutPropertiesLoose(_this$openMarkers, [id].map(_rollupPluginBabelHelpers._toPropertyKey));
1315
1202
  var newOpenMarkers = autoClosePopover ? {} : activeMarkers;
1316
1203
  this.setOpenMarkers(newOpenMarkers);
1317
1204
  handlePreserveCenter(true);
@@ -1319,15 +1206,14 @@ var ClusterMarkers = {
1319
1206
  },
1320
1207
  openMarker: function openMarker(marker, index) {
1321
1208
  var _ref, _extends2;
1322
-
1323
1209
  var autoClosePopover = this.autoClosePopover,
1324
- handlePreserveCenter = this.handlePreserveCenter;
1210
+ handlePreserveCenter = this.handlePreserveCenter;
1325
1211
  var id = marker.metaData && marker.metaData._id;
1326
1212
  var newOpenMarkers = autoClosePopover ? (_ref = {}, _ref[id] = marker, _ref) : _rollupPluginBabelHelpers._extends({}, this.openMarkers, (_extends2 = {}, _extends2[id] = marker, _extends2));
1327
1213
  this.setOpenMarkers(newOpenMarkers);
1328
1214
  handlePreserveCenter(true);
1329
1215
  this.triggerAnalytics(id, index);
1330
- this.$emit('open-marker-popover', marker.metaData);
1216
+ this.$emit('open-marker-popover', marker);
1331
1217
  },
1332
1218
  removeMarkers: function removeMarkers() {
1333
1219
  if (this.$clusterObject) {
@@ -1338,23 +1224,22 @@ var ClusterMarkers = {
1338
1224
  },
1339
1225
  buildMarkers: function buildMarkers(markersToRender) {
1340
1226
  var _this = this;
1341
-
1342
1227
  this.$mapPromise.then(function (map) {
1343
1228
  if (_this.$clusterPromise) {
1344
1229
  _this.$clusterPromise.then(function (clusterObject) {
1345
1230
  // Detect changed markers
1346
1231
  var markersToAdd = [];
1347
- var markersToRemove = []; // A map of marker id to active status, `true` means marker is active
1232
+ var markersToRemove = [];
1233
+ // A map of marker id to active status, `true` means marker is active
1348
1234
  // `false` means marker is stale and should be removed
1349
-
1350
1235
  var oldMarkersIdMap = {};
1351
1236
  (_this.$markers || []).forEach(function (marker) {
1352
1237
  if (marker.metaData && marker.metaData._id) {
1353
1238
  // mark all old markers as stale
1354
1239
  oldMarkersIdMap[marker.metaData._id] = false;
1355
1240
  }
1356
- }); // build map markers
1357
-
1241
+ });
1242
+ // build map markers
1358
1243
  markersToRender.forEach(function (marker, index) {
1359
1244
  // Avoid if a marker is already rendered
1360
1245
  if (marker._id && oldMarkersIdMap[marker._id] !== undefined) {
@@ -1367,14 +1252,11 @@ var ClusterMarkers = {
1367
1252
  map: map,
1368
1253
  position: _this.getPosition(marker)
1369
1254
  });
1370
-
1371
1255
  if (_this.renderItem) {
1372
1256
  var data = _this.renderItem(marker);
1373
-
1374
1257
  if ('label' in data) {
1375
1258
  initialOptions.label = data.label;
1376
1259
  }
1377
-
1378
1260
  if ('icon' in data) {
1379
1261
  initialOptions.icon = data.icon;
1380
1262
  }
@@ -1383,23 +1265,20 @@ var ClusterMarkers = {
1383
1265
  url: _this.defaultPin
1384
1266
  };
1385
1267
  }
1386
-
1387
1268
  var extraOptions = initialOptions.options,
1388
- finalOptions = _rollupPluginBabelHelpers._objectWithoutPropertiesLoose(initialOptions, _excluded$1);
1389
-
1269
+ finalOptions = _rollupPluginBabelHelpers._objectWithoutPropertiesLoose(initialOptions, _excluded$1);
1390
1270
  if (_this.$clusterPromise) {
1391
1271
  finalOptions.map = null;
1392
- } // eslint-disable-next-line
1393
-
1394
-
1272
+ }
1273
+ // eslint-disable-next-line
1395
1274
  var markerObject = new google.maps.Marker(finalOptions);
1396
1275
  markerObject.addListener('click', function () {
1397
1276
  _this.openMarker(markerObject, index);
1398
1277
  });
1399
1278
  markersToAdd.push(markerObject);
1400
1279
  }
1401
- }); // Current active markers
1402
-
1280
+ });
1281
+ // Current active markers
1403
1282
  var currentMarkers = [];
1404
1283
  markersToAdd.forEach(function (marker) {
1405
1284
  currentMarkers.push(marker);
@@ -1413,10 +1292,10 @@ var ClusterMarkers = {
1413
1292
  currentMarkers.push(marker);
1414
1293
  }
1415
1294
  }
1416
- }); // Remove old markers
1417
-
1418
- clusterObject.removeMarkers(markersToRemove); // Add inital markers at once
1419
-
1295
+ });
1296
+ // Remove old markers
1297
+ clusterObject.removeMarkers(markersToRemove);
1298
+ // Add inital markers at once
1420
1299
  clusterObject.addMarkers(markersToAdd);
1421
1300
  _this.$clusterObject = clusterObject;
1422
1301
  _this.$map = map;
@@ -1430,41 +1309,34 @@ var ClusterMarkers = {
1430
1309
  },
1431
1310
  render: function render() {
1432
1311
  var _this2 = this;
1433
-
1434
- var h = arguments[0];
1435
-
1436
1312
  if (!this.renderPopover) {
1437
1313
  return null;
1438
1314
  }
1439
-
1440
- return h("div", [Object.keys(this.openMarkers).map(function (markerId) {
1315
+ return vue.createVNode("div", null, [Object.keys(this.openMarkers).map(function (markerId) {
1441
1316
  var marker = _this2.openMarkers[markerId];
1442
1317
  var item = marker.metaData;
1443
- return h(InfoWindowWrapper, {
1318
+ return vue.createVNode(InfoWindowWrapper, {
1444
1319
  "key": markerId + "-InfoWindow",
1445
- "attrs": {
1446
- "id": markerId,
1447
- "renderPopover": function renderPopover(_handleClose) {
1448
- return _this2.renderPopover({
1449
- item: item,
1450
- handleClose: function handleClose() {
1451
- _handleClose();
1452
-
1453
- _this2.closeMarker(item);
1454
- }
1455
- });
1456
- },
1457
- "marker": marker,
1458
- "infoWindowProps": {
1459
- zIndex: 500
1460
- },
1461
- "events": {
1462
- closeclick: function closeclick() {
1463
- return _this2.closeMarker(marker);
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);
1464
1327
  }
1328
+ });
1329
+ },
1330
+ "marker": marker,
1331
+ "infoWindowProps": {
1332
+ zIndex: 500
1333
+ },
1334
+ "events": {
1335
+ closeclick: function closeclick() {
1336
+ return _this2.closeMarker(marker);
1465
1337
  }
1466
1338
  }
1467
- });
1339
+ }, null);
1468
1340
  })]);
1469
1341
  }
1470
1342
  };
@@ -1475,7 +1347,6 @@ var ClusterManager = index.connect(function () {
1475
1347
  return null;
1476
1348
  }, mapDispatchToProps$1)(ClusterMarkers);
1477
1349
 
1478
- var InfoWindow = GmapVue.components.InfoWindow;
1479
1350
  var InfoWindowWrapper$1 = {
1480
1351
  name: 'InfoWindowWrapper',
1481
1352
  props: {
@@ -1498,19 +1369,21 @@ var InfoWindowWrapper$1 = {
1498
1369
  }
1499
1370
  },
1500
1371
  render: function render() {
1501
- var h = arguments[0];
1372
+ var _this = this;
1502
1373
  var renderPopover = this.renderPopover,
1503
- events = this.events;
1504
- return h(InfoWindow, {
1505
- "ref": this.id + "-Info-Window",
1506
- "props": _rollupPluginBabelHelpers._extends({}, this.infoWindowProps),
1507
- "on": _rollupPluginBabelHelpers._extends({}, events)
1508
- }, [h("div", [renderPopover(this.handleClose)])]);
1374
+ 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
+ });
1509
1383
  }
1510
1384
  };
1511
1385
 
1512
- var MapElementMixin = GmapVue.components.MapElementMixin; // Note: This file has been taken from https://github.com/eregnier/vue2-gmap-custom-marker/blob/master/gmap-custom-marker.vue
1513
-
1386
+ // Note: This file has been taken from https://github.com/eregnier/vue2-gmap-custom-marker/blob/master/gmap-custom-marker.vue
1514
1387
  var MarkerWithLabel = {
1515
1388
  name: 'MarkerWithLabel',
1516
1389
  props: {
@@ -1554,7 +1427,7 @@ var MarkerWithLabel = {
1554
1427
  opacity: 0.01
1555
1428
  };
1556
1429
  },
1557
- mixins: [MapElementMixin],
1430
+ mixins: [VueGoogleMaps.MapElementMixin],
1558
1431
  inject: {
1559
1432
  $clusterPromise: {
1560
1433
  "default": null
@@ -1571,14 +1444,12 @@ var MarkerWithLabel = {
1571
1444
  if (this.marker instanceof window.google.maps.LatLng) {
1572
1445
  return this.marker;
1573
1446
  }
1574
-
1575
1447
  return new window.google.maps.LatLng(this.lat, this.lng);
1576
1448
  }
1577
1449
  },
1578
1450
  watch: {
1579
1451
  marker: function marker() {
1580
1452
  var _this = this;
1581
-
1582
1453
  this.$mapPromise.then(function () {
1583
1454
  return _this.$overlay.setPosition();
1584
1455
  });
@@ -1594,7 +1465,6 @@ var MarkerWithLabel = {
1594
1465
  // eslint-disable-next-line
1595
1466
  options.map = null;
1596
1467
  }
1597
-
1598
1468
  return this.$clusterPromise;
1599
1469
  },
1600
1470
  destroyed: function destroyed() {
@@ -1607,111 +1477,87 @@ var MarkerWithLabel = {
1607
1477
  },
1608
1478
  provide: function provide() {
1609
1479
  var _this2 = this;
1610
-
1611
1480
  var self = this;
1612
1481
  return this.$mapPromise.then(function (map) {
1613
1482
  var Overlay = /*#__PURE__*/function (_window$google$maps$O) {
1614
1483
  _rollupPluginBabelHelpers._inheritsLoose(Overlay, _window$google$maps$O);
1615
-
1616
1484
  function Overlay(map2) {
1617
1485
  var _this3;
1618
-
1619
1486
  _this3 = _window$google$maps$O.call(this) || this;
1620
1487
  _this3.metaData = self.metaData;
1621
-
1622
1488
  _this3.setMap(map2);
1623
-
1624
1489
  _this3.draw = function () {
1625
1490
  return _this3.repaint();
1626
1491
  };
1627
-
1628
1492
  _this3.setPosition = function () {
1629
1493
  return _this3.repaint();
1630
1494
  };
1631
-
1632
1495
  _this3.getVisible = function () {
1633
1496
  return true;
1634
1497
  };
1635
-
1636
1498
  return _this3;
1637
1499
  }
1638
-
1639
1500
  var _proto = Overlay.prototype;
1640
-
1641
1501
  _proto.repaint = function repaint() {
1642
1502
  var div = self.$el;
1643
1503
  var projection = this.getProjection();
1644
-
1645
1504
  if (projection && div) {
1646
1505
  var posPixel = projection.fromLatLngToDivPixel(self.latLng);
1647
1506
  var x;
1648
1507
  var y;
1649
-
1650
1508
  switch (self.alignment) {
1651
1509
  case 'top':
1652
1510
  x = posPixel.x - div.offsetWidth / 2;
1653
1511
  y = posPixel.y - div.offsetHeight;
1654
1512
  break;
1655
-
1656
1513
  case 'bottom':
1657
1514
  x = posPixel.x - div.offsetWidth / 2;
1658
1515
  y = posPixel.y;
1659
1516
  break;
1660
-
1661
1517
  case 'left':
1662
1518
  x = posPixel.x - div.offsetWidth;
1663
1519
  y = posPixel.y - div.offsetHeight / 2;
1664
1520
  break;
1665
-
1666
1521
  case 'right':
1667
1522
  x = posPixel.x;
1668
1523
  y = posPixel.y - div.offsetHeight / 2;
1669
1524
  break;
1670
-
1671
1525
  case 'center':
1672
1526
  x = posPixel.x - div.offsetWidth / 2;
1673
1527
  y = posPixel.y - div.offsetHeight / 2;
1674
1528
  break;
1675
-
1676
1529
  case 'topleft':
1677
1530
  case 'lefttop':
1678
1531
  x = posPixel.x - div.offsetWidth;
1679
1532
  y = posPixel.y - div.offsetHeight;
1680
1533
  break;
1681
-
1682
1534
  case 'topright':
1683
1535
  case 'righttop':
1684
1536
  x = posPixel.x;
1685
1537
  y = posPixel.y - div.offsetHeight;
1686
1538
  break;
1687
-
1688
1539
  case 'bottomleft':
1689
1540
  case 'leftop':
1690
1541
  x = posPixel.x - div.offsetWidth;
1691
1542
  y = posPixel.y;
1692
1543
  break;
1693
-
1694
1544
  case 'bottomright':
1695
1545
  case 'rightbottom':
1696
1546
  x = posPixel.x;
1697
1547
  y = posPixel.y;
1698
1548
  break;
1699
-
1700
1549
  default:
1701
1550
  throw new Error('Invalid alignment type of custom marker!');
1702
1551
  }
1703
-
1704
1552
  if (self.cssPosition) {
1705
1553
  div.style.transform = "translate(" + (x + self.offsetX) + "px, " + (y + self.offsetY) + "px)";
1706
1554
  } else {
1707
1555
  div.style.left = x + self.offsetX + "px";
1708
1556
  div.style.top = y + self.offsetY + "px";
1709
1557
  }
1710
-
1711
1558
  div.style['z-index'] = self.zIndex;
1712
1559
  }
1713
1560
  };
1714
-
1715
1561
  _proto.onAdd = function onAdd() {
1716
1562
  if (this.$clusterObject) {
1717
1563
  this.$clusterObject.removeMarker(this.$overlay, true);
@@ -1719,7 +1565,6 @@ var MarkerWithLabel = {
1719
1565
  this.$overlay.setMap(null);
1720
1566
  this.$overlay = undefined;
1721
1567
  }
1722
-
1723
1568
  var div = self.$el;
1724
1569
  var panes = this.getPanes();
1725
1570
  div.style.position = 'absolute';
@@ -1727,24 +1572,21 @@ var MarkerWithLabel = {
1727
1572
  div.style.zIndex = self.zIndex;
1728
1573
  panes.overlayLayer.appendChild(div);
1729
1574
  panes.overlayMouseTarget.appendChild(div);
1730
-
1731
1575
  this.getDraggable = function () {
1732
1576
  return false;
1733
1577
  };
1734
-
1735
1578
  this.getPosition = function () {
1736
1579
  return new window.google.maps.LatLng(self.lat, self.lng);
1737
1580
  };
1738
-
1739
1581
  self.afterCreate(this);
1740
- } // eslint-disable-next-line
1582
+ }
1583
+ // eslint-disable-next-line
1741
1584
  ;
1742
-
1743
1585
  _proto.onRemove = function onRemove() {
1744
1586
  if (self.$el) {
1745
1587
  var ua = window.navigator.userAgent;
1746
- var msie = ua.indexOf('MSIE '); // eslint-disable-next-line
1747
-
1588
+ var msie = ua.indexOf('MSIE ');
1589
+ // eslint-disable-next-line
1748
1590
  if (msie > 0 || !!ua.match(/Trident.*rv\:11\./)) {
1749
1591
  self.$el.parentNode.removeChild(self.$el);
1750
1592
  } else {
@@ -1752,15 +1594,12 @@ var MarkerWithLabel = {
1752
1594
  }
1753
1595
  }
1754
1596
  };
1755
-
1756
1597
  return Overlay;
1757
1598
  }(window.google.maps.OverlayView);
1758
-
1759
1599
  _this2.$overlay = new Overlay(map);
1760
1600
  setTimeout(function () {
1761
1601
  if (_this2.$overlay) {
1762
1602
  _this2.$overlay.repaint();
1763
-
1764
1603
  _this2.opacity = 1;
1765
1604
  }
1766
1605
  }, 100);
@@ -1769,7 +1608,6 @@ var MarkerWithLabel = {
1769
1608
  methods: {
1770
1609
  afterCreate: function afterCreate(inst) {
1771
1610
  var _this4 = this;
1772
-
1773
1611
  if (this.$clusterPromise && !this.isMarkerAdded) {
1774
1612
  this.$clusterPromise.then(function (co) {
1775
1613
  co.addMarker(inst);
@@ -1780,26 +1618,22 @@ var MarkerWithLabel = {
1780
1618
  }
1781
1619
  },
1782
1620
  render: function render() {
1783
- var h = arguments[0];
1784
- return h("div", {
1621
+ return vue.createVNode("div", {
1785
1622
  "style": {
1786
1623
  opacity: this.opacity
1787
1624
  },
1788
- "on": {
1789
- "mouseover": this.handleMouseOver,
1790
- "mouseout": this.handleMouseOut,
1791
- "click": this.handleClick
1792
- }
1625
+ "onmouseover": this.handleMouseOver,
1626
+ "onmouseout": this.handleMouseOut,
1627
+ "onclick": this.handleClick
1793
1628
  }, [this.renderMarker()]);
1794
1629
  }
1795
1630
  };
1796
1631
 
1797
1632
  var _templateObject, _templateObject2, _templateObject3;
1798
- 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"])));
1799
- 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"])));
1800
- var mapPinWrapper = styled.css(_templateObject3 || (_templateObject3 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t&:hover,\n\t&:focus {\n\t\tz-index: 200;\n\t}\n"])));
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 = emotion.css(_templateObject3 || (_templateObject3 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t&:hover,\n\t&:focus {\n\t\tz-index: 200;\n\t}\n"])));
1801
1636
 
1802
- var Marker = GmapVue.components.Marker;
1803
1637
  var recordResultClick$2 = configureStore.Actions.recordResultClick;
1804
1638
  var GoogleMapMarker = {
1805
1639
  name: 'GoogleMapMarker',
@@ -1823,211 +1657,180 @@ var GoogleMapMarker = {
1823
1657
  };
1824
1658
  },
1825
1659
  methods: {
1660
+ setIcon: function setIcon(icon) {
1661
+ this.markerIcon = icon;
1662
+ },
1826
1663
  increaseMarkerZIndex: function increaseMarkerZIndex() {
1827
1664
  var handlePreserveCenter = this.$props.handlePreserveCenter;
1828
-
1829
1665
  if (this.highlightMarkerOnHover) {
1830
1666
  this.zIndex += 1;
1831
1667
  }
1832
-
1833
1668
  handlePreserveCenter(true);
1834
1669
  },
1835
1670
  removeMarkerZIndex: function removeMarkerZIndex() {
1836
1671
  var handlePreserveCenter = this.$props.handlePreserveCenter;
1837
-
1838
1672
  if (this.highlightMarkerOnHover) {
1839
1673
  this.zIndex -= 1;
1840
1674
  }
1841
-
1842
1675
  handlePreserveCenter(true);
1843
1676
  },
1844
1677
  openMarker: function openMarker() {
1845
1678
  var _ref, _extends2;
1846
-
1847
1679
  var _this$$props = this.$props,
1848
- handleOpenMarkers = _this$$props.setOpenMarkers,
1849
- openMarkers = _this$$props.openMarkers,
1850
- marker = _this$$props.marker,
1851
- autoClosePopover = _this$$props.autoClosePopover,
1852
- handlePreserveCenter = _this$$props.handlePreserveCenter;
1680
+ handleOpenMarkers = _this$$props.setOpenMarkers,
1681
+ openMarkers = _this$$props.openMarkers,
1682
+ marker = _this$$props.marker,
1683
+ autoClosePopover = _this$$props.autoClosePopover,
1684
+ handlePreserveCenter = _this$$props.handlePreserveCenter;
1853
1685
  var id = marker._id;
1854
1686
  var newOpenMarkers = autoClosePopover ? (_ref = {}, _ref[id] = true, _ref) : _rollupPluginBabelHelpers._extends({}, openMarkers, (_extends2 = {}, _extends2[id] = true, _extends2));
1855
1687
  handleOpenMarkers(newOpenMarkers);
1856
1688
  handlePreserveCenter(true);
1857
1689
  this.triggerAnalytics();
1690
+ marker.setIcon = this.setIcon;
1858
1691
  this.$emit('open-marker-popover', marker);
1859
1692
  },
1860
1693
  closeMarker: function closeMarker() {
1861
1694
  var _this$$props2 = this.$props,
1862
- handleOpenMarkers = _this$$props2.setOpenMarkers,
1863
- marker = _this$$props2.marker,
1864
- autoClosePopover = _this$$props2.autoClosePopover,
1865
- handlePreserveCenter = _this$$props2.handlePreserveCenter,
1866
- openMarkers = _this$$props2.openMarkers;
1695
+ handleOpenMarkers = _this$$props2.setOpenMarkers,
1696
+ marker = _this$$props2.marker,
1697
+ autoClosePopover = _this$$props2.autoClosePopover,
1698
+ handlePreserveCenter = _this$$props2.handlePreserveCenter,
1699
+ openMarkers = _this$$props2.openMarkers;
1867
1700
  var id = marker._id;
1868
-
1869
1701
  var del = openMarkers[id],
1870
- activeMarkers = _rollupPluginBabelHelpers._objectWithoutPropertiesLoose(openMarkers, [id].map(_rollupPluginBabelHelpers._toPropertyKey));
1871
-
1702
+ activeMarkers = _rollupPluginBabelHelpers._objectWithoutPropertiesLoose(openMarkers, [id].map(_rollupPluginBabelHelpers._toPropertyKey));
1872
1703
  var newOpenMarkers = autoClosePopover ? {} : activeMarkers;
1873
1704
  handleOpenMarkers(newOpenMarkers);
1874
1705
  handlePreserveCenter(true);
1706
+ marker.setIcon = this.setIcon;
1875
1707
  this.$emit('close-marker-popover', marker);
1876
1708
  },
1877
1709
  triggerAnalytics: function triggerAnalytics() {
1878
1710
  this.recordResultClick(this.index, this.marker._id);
1879
1711
  },
1880
- renderPopoverClick: function renderPopoverClick(item, includeExternalSettings) {
1712
+ renderPopoverClick: function renderPopoverClick(item) {
1881
1713
  var _this = this;
1882
-
1883
- if (includeExternalSettings === void 0) {
1884
- includeExternalSettings = false;
1885
- }
1886
-
1887
- var h = this.$createElement;
1888
1714
  var additionalProps = {};
1889
1715
  var _this$$props3 = this.$props,
1890
- getPosition = _this$$props3.getPosition,
1891
- _renderPopover = _this$$props3.renderPopover,
1892
- openMarkers = _this$$props3.openMarkers;
1893
-
1894
- if (includeExternalSettings) {
1895
- // to render pop-over correctly with MarkerWithLabel
1896
- additionalProps = {
1897
- position: getPosition(item),
1898
- defaultOptions: {
1899
- pixelOffset: new window.google.maps.Size(0, -30)
1900
- }
1901
- };
1902
- }
1903
-
1716
+ getPosition = _this$$props3.getPosition,
1717
+ _renderPopover = _this$$props3.renderPopover,
1718
+ openMarkers = _this$$props3.openMarkers;
1719
+ additionalProps = {
1720
+ position: getPosition(item),
1721
+ defaultOptions: {
1722
+ pixelOffset: new window.google.maps.Size(0, -30)
1723
+ }
1724
+ };
1904
1725
  if (item._id in openMarkers) {
1905
- return h(InfoWindowWrapper$1, {
1726
+ return vue.createVNode(InfoWindowWrapper$1, {
1906
1727
  "key": item._id + "-InfoWindow",
1907
- "attrs": {
1908
- "id": item._id,
1909
- "renderPopover": function renderPopover(_handleClose) {
1910
- return _renderPopover({
1911
- item: item,
1912
- handleClose: function handleClose() {
1913
- _handleClose();
1914
-
1915
- _this.closeMarker();
1916
- }
1917
- });
1918
- },
1919
- "infoWindowProps": {
1920
- zIndex: 500,
1921
- position: additionalProps.position,
1922
- options: additionalProps.defaultOptions
1923
- },
1924
- "events": {
1925
- closeclick: function closeclick() {
1926
- return _this.closeMarker();
1728
+ "id": item._id,
1729
+ "renderPopover": function renderPopover(_handleClose) {
1730
+ return _renderPopover({
1731
+ item: item,
1732
+ handleClose: function handleClose() {
1733
+ _handleClose();
1734
+ _this.closeMarker();
1927
1735
  }
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();
1928
1746
  }
1929
1747
  }
1930
- });
1748
+ }, null);
1931
1749
  }
1932
-
1933
1750
  return null;
1934
1751
  }
1935
1752
  },
1936
1753
  render: function render() {
1937
1754
  var _this2 = this;
1938
-
1939
- var h = arguments[0];
1940
1755
  var _this$$props4 = this.$props,
1941
- getPosition = _this$$props4.getPosition,
1942
- renderItem = _this$$props4.renderItem,
1943
- defaultPin = _this$$props4.defaultPin,
1944
- renderPopover = _this$$props4.renderPopover,
1945
- customMarkerProps = _this$$props4.markerProps,
1946
- marker = _this$$props4.marker;
1756
+ getPosition = _this$$props4.getPosition,
1757
+ renderItem = _this$$props4.renderItem,
1758
+ defaultPin = _this$$props4.defaultPin,
1759
+ renderPopover = _this$$props4.renderPopover,
1760
+ customMarkerProps = _this$$props4.markerProps,
1761
+ marker = _this$$props4.marker;
1947
1762
  var markerProps = {};
1948
-
1949
1763
  if (this.zIndex) {
1950
1764
  markerProps.zIndex = window.google.maps.Marker.MAX_ZINDEX + this.zIndex;
1951
1765
  }
1952
-
1953
1766
  if (renderItem) {
1954
- marker.setIcon = function (icon) {
1955
- _this2.markerIcon = icon;
1956
- };
1957
-
1767
+ marker.setIcon = this.setIcon;
1958
1768
  var data = renderItem(marker);
1959
-
1960
1769
  if ('label' in data) {
1961
- return h(MarkerWithLabel, {
1770
+ return vue.createVNode(MarkerWithLabel, vue.mergeProps({
1962
1771
  "key": marker._id,
1963
- "attrs": {
1964
- "metaData": marker,
1965
- "marker": getPosition(marker),
1966
- "labelAnchor": new window.google.maps.Point(0, 30),
1967
- "handleMouseOver": this.increaseMarkerZIndex,
1968
- "handleMouseOut": this.removeMarkerZIndex,
1969
- "handleClick": this.openMarker,
1970
- "zIndex": markerProps.zIndex,
1971
- "renderMarker": function renderMarker() {
1972
- return h("div", {
1973
- "attrs": {
1974
- "css": mapPinWrapper
1975
- }
1976
- }, [h(MapPin, [data.label]), h(MapPinArrow), renderPopover ? _this2.renderPopoverClick(marker, true) : null]);
1977
- }
1978
- },
1979
- "props": _rollupPluginBabelHelpers._extends({}, customMarkerProps)
1980
- });
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);
1981
1790
  }
1982
-
1983
1791
  if ('icon' in data) {
1984
1792
  markerProps.icon = data.icon;
1985
1793
  } else {
1986
- return h(MarkerWithLabel, {
1794
+ return vue.createVNode(MarkerWithLabel, vue.mergeProps({
1987
1795
  "key": marker._id,
1988
- "attrs": {
1989
- "metaData": marker,
1990
- "marker": getPosition(marker),
1991
- "handleClick": this.openMarker,
1992
- "handleMouseOver": this.increaseMarkerZIndex,
1993
- "handleMouseOut": this.removeMarkerZIndex,
1994
- "zIndex": markerProps.zIndex,
1995
- "renderMarker": function renderMarker() {
1996
- return h("div", {
1997
- "attrs": {
1998
- "css": mapPinWrapper
1999
- }
2000
- }, [typeof data.custom === 'function' ? data.custom(marker) : data.custom, renderPopover ? _this2.renderPopoverClick(marker, true) : null]);
2001
- }
2002
- },
2003
- "props": _rollupPluginBabelHelpers._extends({}, customMarkerProps)
2004
- });
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);
2005
1809
  }
2006
1810
  } else if (defaultPin) {
2007
1811
  markerProps.icon = {
2008
1812
  url: defaultPin
2009
1813
  };
2010
1814
  }
2011
-
2012
- return h(Marker, {
1815
+ return vue.createVNode(VueGoogleMaps.Marker, vue.mergeProps({
2013
1816
  "key": marker._id,
2014
- "attrs": {
2015
- "zIndex": markerProps.zIndex,
2016
- "position": getPosition(marker),
2017
- "options": {
2018
- metaData: marker
2019
- },
2020
- "icon": this.markerIcon || markerProps.icon
1817
+ "zIndex": markerProps.zIndex,
1818
+ "onClick": function onClick() {
1819
+ return _this2.openMarker();
2021
1820
  },
2022
- "on": {
2023
- "click": function click() {
2024
- return _this2.openMarker();
2025
- },
2026
- "mouseover": this.increaseMarkerZIndex,
2027
- "mouseout": this.removeMarkerZIndex
1821
+ "onMouseover": this.increaseMarkerZIndex,
1822
+ "onMouseout": this.removeMarkerZIndex
1823
+ }, customMarkerProps, {
1824
+ "position": getPosition(marker),
1825
+ "options": {
1826
+ metaData: marker
2028
1827
  },
2029
- "props": _rollupPluginBabelHelpers._extends({}, customMarkerProps)
2030
- }, [renderPopover ? this.renderPopoverClick(marker) : null]);
1828
+ "icon": this.markerIcon || markerProps.icon
1829
+ }), {
1830
+ "default": function _default() {
1831
+ return [renderPopover ? _this2.renderPopoverClick(marker) : null];
1832
+ }
1833
+ });
2031
1834
  }
2032
1835
  };
2033
1836
  var mapDispatchToProps$2 = {
@@ -2037,7 +1840,6 @@ var GoogleMapMarker$1 = index.connect(function () {
2037
1840
  return null;
2038
1841
  }, mapDispatchToProps$2)(GoogleMapMarker);
2039
1842
 
2040
- var Cluster = GmapVue.components.Cluster;
2041
1843
  var GoogleMapMarkers = {
2042
1844
  name: 'GoogleMapMarkers',
2043
1845
  props: {
@@ -2084,8 +1886,6 @@ var GoogleMapMarkers = {
2084
1886
  },
2085
1887
  render: function render() {
2086
1888
  var _this = this;
2087
-
2088
- var h = arguments[0];
2089
1889
  var resultsToRender = this.$props.resultsToRender;
2090
1890
  var openMarkers = this.openMarkers;
2091
1891
  var markerProps = {
@@ -2102,75 +1902,65 @@ var GoogleMapMarkers = {
2102
1902
  showMarkerClusters: this.showMarkerClusters,
2103
1903
  highlightMarkerOnHover: this.highlightMarkerOnHover
2104
1904
  };
2105
-
2106
1905
  if (this.showMarkerClusters) {
2107
- return h("div", [h(Cluster, {
2108
- "props": _rollupPluginBabelHelpers._extends({}, this.clusterProps),
2109
- "on": {
2110
- "click": function click(cluster) {
2111
- var markers = cluster.markers.map(function (i) {
2112
- return i.metaData;
2113
- });
2114
- _this.clickedCluster = cluster;
2115
- _this.clusterMarkers = markers;
2116
-
2117
- _this.$emit('open-cluster-popover', _this.clusterMarkers);
2118
- }
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);
2119
1914
  },
2120
1915
  "ref": "clusterRef"
2121
- }, [h(ClusterManager, {
2122
- "attrs": {
2123
- "getPosition": markerProps.getPosition,
2124
- "markers": resultsToRender,
2125
- "defaultPin": markerProps.defaultPin,
2126
- "renderItem": markerProps.renderItem,
2127
- "markerProps": markerProps.markerProps,
2128
- "handlePreserveCenter": markerProps.handlePreserveCenter,
2129
- "autoClosePopover": markerProps.autoClosePopover,
2130
- "renderPopover": markerProps.renderPopover,
2131
- "highlightMarkerOnHover": markerProps.highlightMarkerOnHover
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
2132
1938
  },
2133
- "on": _rollupPluginBabelHelpers._extends({}, this.$listeners)
2134
- })]), this.clickedCluster && this.renderClusterPopover ? h(InfoWindowWrapper$1, {
2135
- "attrs": {
2136
- "id": "cluster",
2137
- "infoWindowProps": {
2138
- zIndex: 500,
2139
- position: this.getAdditionalProps().position,
2140
- options: this.getAdditionalProps().defaultOptions
2141
- },
2142
- "renderPopover": function renderPopover(_handleClose) {
2143
- return _this.renderClusterPopover({
2144
- markers: _this.clusterMarkers,
2145
- cluster: _this.clickedCluster,
2146
- handleClose: function handleClose() {
2147
- _handleClose();
2148
-
2149
- _this.closeMarker();
2150
- }
2151
- });
2152
- },
2153
- "events": {
2154
- closeclick: this.closeMarker
2155
- }
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
2156
1951
  }
2157
- }) : null]);
1952
+ }, null) : null]);
2158
1953
  }
2159
-
2160
- return h("div", [resultsToRender.map(function (marker, index) {
2161
- return h(GoogleMapMarker$1, {
2162
- "attrs": {
2163
- "index": index,
2164
- "marker": marker
2165
- },
2166
- "props": _rollupPluginBabelHelpers._extends({}, markerProps),
2167
- "on": _rollupPluginBabelHelpers._extends({}, _this.$listeners)
2168
- });
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);
2169
1959
  })]);
2170
1960
  }
2171
1961
  };
2172
1962
 
2173
- var Map = GmapVue.components.MapLayer;
1963
+ var _templateObject$1;
2174
1964
  var ReactiveGoogleMap = {
2175
1965
  name: 'ReactiveGoogleMap',
2176
1966
  props: {
@@ -2205,69 +1995,78 @@ var ReactiveGoogleMap = {
2205
1995
  calculateMarkers: VueTypes.func,
2206
1996
  highlightMarkerOnHover: VueTypes.bool.def(true)
2207
1997
  },
1998
+ computed: {
1999
+ listeners: function listeners() {
2000
+ var onRE = /^on[^a-z]/;
2001
+ var listeners = {};
2002
+ var $attrs = this.$attrs;
2003
+ Object.keys($attrs).forEach(function (property) {
2004
+ if (onRE.test(property)) {
2005
+ listeners[property] = $attrs[property];
2006
+ }
2007
+ });
2008
+ return listeners;
2009
+ }
2010
+ },
2208
2011
  methods: {
2209
2012
  renderMap: function renderMap(_ref) {
2210
2013
  var _this = this;
2211
-
2212
2014
  var resultsToRender = _ref.resultsToRender,
2213
- center = _ref.center,
2214
- zoom = _ref.zoom,
2215
- handleZoomChange = _ref.handleZoomChange,
2216
- handleOnDragEnd = _ref.handleOnDragEnd,
2217
- handleOnIdle = _ref.handleOnIdle,
2218
- renderSearchAsMove = _ref.renderSearchAsMove,
2219
- handlePreserveCenter = _ref.handlePreserveCenter,
2220
- getPosition = _ref.getPosition,
2221
- autoClosePopover = _ref.autoClosePopover,
2222
- defaultPin = _ref.defaultPin;
2223
- var h = this.$createElement;
2015
+ center = _ref.center,
2016
+ zoom = _ref.zoom,
2017
+ handleZoomChange = _ref.handleZoomChange,
2018
+ handleOnDragEnd = _ref.handleOnDragEnd,
2019
+ handleOnIdle = _ref.handleOnIdle,
2020
+ renderSearchAsMove = _ref.renderSearchAsMove,
2021
+ handlePreserveCenter = _ref.handlePreserveCenter,
2022
+ getPosition = _ref.getPosition,
2023
+ autoClosePopover = _ref.autoClosePopover,
2024
+ defaultPin = _ref.defaultPin;
2224
2025
  var style = {
2225
2026
  width: '100%',
2226
2027
  height: '100%',
2227
2028
  position: 'relative'
2228
2029
  };
2229
- return h("div", {
2030
+ return vue.createVNode("div", {
2230
2031
  "style": style
2231
- }, [h(Map, {
2032
+ }, [vue.createVNode(VueGoogleMaps.Map, vue.mergeProps({
2232
2033
  "ref": "mapRef",
2233
- "attrs": {
2234
- "map-type-id": "terrain",
2235
- "options": {
2236
- zoomControl: true
2237
- },
2238
- "center": center,
2239
- "zoom": zoom
2240
- },
2034
+ "map-type-id": "terrain",
2241
2035
  "style": {
2242
2036
  height: '100%'
2243
2037
  },
2244
- "props": _rollupPluginBabelHelpers._extends({}, this.mapProps),
2245
- "on": {
2246
- "zoom_changed": handleZoomChange,
2247
- "dragend": handleOnDragEnd,
2248
- "idle": handleOnIdle
2249
- }
2250
- }, [this.showMarkers ? h(GoogleMapMarkers, {
2251
- "attrs": {
2252
- "resultsToRender": resultsToRender,
2253
- "getPosition": getPosition,
2254
- "markerProps": this.markerProps,
2255
- "clusterProps": this.clusterProps,
2256
- "handlePreserveCenter": handlePreserveCenter,
2257
- "highlightMarkerOnHover": this.highlightMarkerOnHover,
2258
- "renderItem": this.$scopedSlots.renderItem ? function () {
2259
- return {
2260
- custom: _this.$scopedSlots.renderItem
2261
- };
2262
- } : this.renderItem,
2263
- "defaultPin": defaultPin,
2264
- "autoClosePopover": autoClosePopover,
2265
- "renderPopover": this.$scopedSlots.renderPopover,
2266
- "renderClusterPopover": this.$scopedSlots.renderClusterPopover,
2267
- "showMarkerClusters": this.showMarkerClusters
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
2268
2041
  },
2269
- "on": _rollupPluginBabelHelpers._extends({}, this.$listeners)
2270
- }) : null]), renderSearchAsMove()]);
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];
2068
+ }
2069
+ }), renderSearchAsMove()]);
2271
2070
  },
2272
2071
  getMapRef: function getMapRef() {
2273
2072
  return this.mapRef;
@@ -2275,11 +2074,11 @@ var ReactiveGoogleMap = {
2275
2074
  removeMarkers: function removeMarkers() {
2276
2075
  var clusterManagerInstance;
2277
2076
  var currentInstance = this;
2278
-
2279
2077
  while (currentInstance) {
2280
- if (currentInstance && currentInstance._name === '<ConnectClusterMarkers>') {
2078
+ if (currentInstance && currentInstance.$options && currentInstance.$options.name === 'connect-ClusterMarkers') {
2281
2079
  clusterManagerInstance = currentInstance;
2282
2080
  currentInstance = null;
2081
+ // TODO: Check if $children works in vue 3
2283
2082
  } else if (currentInstance.$children) {
2284
2083
  var _currentInstance$$chi = currentInstance.$children;
2285
2084
  currentInstance = _currentInstance$$chi[0];
@@ -2287,7 +2086,6 @@ var ReactiveGoogleMap = {
2287
2086
  currentInstance = null;
2288
2087
  }
2289
2088
  }
2290
-
2291
2089
  if (clusterManagerInstance && clusterManagerInstance.removeMarkers) {
2292
2090
  clusterManagerInstance.removeMarkers();
2293
2091
  }
@@ -2295,7 +2093,6 @@ var ReactiveGoogleMap = {
2295
2093
  },
2296
2094
  mounted: function mounted() {
2297
2095
  var _this2 = this;
2298
-
2299
2096
  if (this.$refs.mapRef) {
2300
2097
  this.$refs.mapRef.$mapPromise.then(function (map) {
2301
2098
  _this2.mapRef = map;
@@ -2303,61 +2100,54 @@ var ReactiveGoogleMap = {
2303
2100
  }
2304
2101
  },
2305
2102
  render: function render() {
2306
- var h = arguments[0];
2307
- return h(RMConnected, _mergeJSXProps([{
2308
- "attrs": {
2309
- "getMapRef": this.getMapRef,
2310
- "renderMap": this.renderMap,
2311
- "componentId": this.componentId,
2312
- "className": this.className,
2313
- "dataField": this.dataField,
2314
- "defaultZoom": this.defaultZoom,
2315
- "react": this.react,
2316
- "size": this.size,
2317
- "sortBy": this.sortBy,
2318
- "pagination": this.pagination,
2319
- "uRLParams": this.URLParams,
2320
- "defaultSearchAsMove": this.searchAsMove,
2321
- "showSearchAsMove": this.showSearchAsMove,
2322
- "searchAsMoveLabel": this.searchAsMoveLabel,
2323
- "showMarkers": this.showMarkers,
2324
- "markerProps": this.markerProps,
2325
- "autoClosePopover": this.autoClosePopover,
2326
- "defaultPin": this.defaultPin,
2327
- "defaultQuery": this.defaultQuery,
2328
- "autoCenter": this.autoCenter,
2329
- "defaultCenter": this.defaultCenter,
2330
- "defaultRadius": this.defaultRadius,
2331
- "unit": this.unit,
2332
- "pages": this.pages,
2333
- "center": this.center,
2334
- "loader": this.loader,
2335
- "calculateMarkers": this.calculateMarkers
2336
- }
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
2337
2131
  }, {
2338
- scopedSlots: this.$scopedSlots,
2339
- on: this.$listeners
2340
- }]));
2132
+ on: this.$attrs
2133
+ }), null);
2341
2134
  }
2342
2135
  };
2343
-
2344
2136
  ReactiveGoogleMap.install = function (Vue, options) {
2345
2137
  Vue.component(ReactiveGoogleMap.name, ReactiveGoogleMap);
2346
-
2347
2138
  if (!options || !options.key) {
2348
2139
  console.error('ReactiveSearch: map key is required to use ReactiveGoogleMap component');
2349
2140
  }
2350
-
2351
- Vue.use(GmapVue__default, {
2141
+ Vue.use(VueGoogleMaps__default, {
2352
2142
  load: {
2353
2143
  key: options.key,
2354
2144
  libraries: 'places'
2355
2145
  },
2356
2146
  installComponents: false
2357
2147
  });
2358
- }; // Add componentType for SSR
2359
-
2148
+ };
2360
2149
 
2150
+ // Add componentType for SSR
2361
2151
  ReactiveGoogleMap.componentType = constants.componentTypes.reactiveMap;
2362
2152
 
2363
2153
  exports.default = ReactiveGoogleMap;