@appbaseio/reactivesearch-vue 2.0.0-alpha.4 → 3.0.0-alpha.1

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 (109) hide show
  1. package/README.md +9 -9
  2. package/dist/@appbaseio/reactivesearch-vue.umd.js +21316 -29369
  3. package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
  4. package/dist/@appbaseio/reactivesearch-vue.umd.min.js +5 -19
  5. package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
  6. package/dist/cjs/Button-ad042719.js +59 -0
  7. package/dist/cjs/Card-f5ab024a.js +27 -0
  8. package/dist/cjs/{ComponentWrapper-ad3dad02.js → ComponentWrapper-611cf7f9.js} +44 -58
  9. package/dist/cjs/Container-29f049b2.js +12 -0
  10. package/dist/cjs/DropDown-dc184468.js +700 -0
  11. package/dist/cjs/DynamicRangeSlider.js +106 -157
  12. package/dist/cjs/Flex-d5675ea6.js +48 -0
  13. package/dist/cjs/FormControlList-fadd792f.js +42 -0
  14. package/dist/cjs/Input-088dfcb4.js +74 -0
  15. package/dist/cjs/ListItem-d57d648d.js +42 -0
  16. package/dist/cjs/MultiDropdownList.js +124 -240
  17. package/dist/cjs/MultiList.js +124 -262
  18. package/dist/cjs/MultiRange.js +87 -133
  19. package/dist/cjs/{Pagination-71e85fa9.js → Pagination-b5ddc906.js} +70 -83
  20. package/dist/cjs/PreferencesConsumer-22d1b49f.js +73 -0
  21. package/dist/cjs/RangeInput.js +163 -171
  22. package/dist/cjs/RangeSlider.js +81 -109
  23. package/dist/cjs/ReactiveBase.js +139 -156
  24. package/dist/cjs/ReactiveComponent-a6108189.js +2184 -0
  25. package/dist/cjs/ReactiveComponent.js +46 -340
  26. package/dist/cjs/ReactiveGoogleMap.js +451 -660
  27. package/dist/cjs/ReactiveList.js +180 -305
  28. package/dist/cjs/ResultCard.js +36 -36
  29. package/dist/cjs/ResultList.js +48 -56
  30. package/dist/cjs/SelectedFilters.js +62 -69
  31. package/dist/cjs/SingleDropdownList.js +117 -177
  32. package/dist/cjs/SingleList.js +122 -206
  33. package/dist/cjs/SingleRange.js +78 -105
  34. package/dist/cjs/StateProvider.js +35 -38
  35. package/dist/cjs/Title-8802a218.js +12 -0
  36. package/dist/cjs/ToggleButton.js +72 -119
  37. package/dist/cjs/{_rollupPluginBabelHelpers-c705cbe6.js → _rollupPluginBabelHelpers-f8b843f8.js} +0 -15
  38. package/dist/cjs/{index-6a167fe0.js → index-d8d8f291.js} +38 -108
  39. package/dist/cjs/index.js +44 -41
  40. package/dist/cjs/initReactivesearch.js +63 -150
  41. package/dist/cjs/install.js +47 -43
  42. package/dist/cjs/ssr-6c8a72e1.js +66 -0
  43. package/dist/cjs/{utils-d6a52588.js → utils-83fd01e9.js} +7 -16
  44. package/dist/cjs/version.js +1 -1
  45. package/dist/cjs/{vueTypes-727b7c63.js → vueTypes-1bf00978.js} +8 -19
  46. package/dist/es/Button-474510e3.js +53 -0
  47. package/dist/es/{Card-450683f1.js → Card-38cbe652.js} +3 -3
  48. package/dist/es/{ComponentWrapper-424e86fd.js → ComponentWrapper-3dfe6931.js} +44 -58
  49. package/dist/es/{Container-ba826e96.js → Container-d00219f7.js} +2 -2
  50. package/dist/es/DropDown-029ffd42.js +690 -0
  51. package/dist/es/DynamicRangeSlider.js +106 -157
  52. package/dist/es/Flex-a08e22d7.js +46 -0
  53. package/dist/es/FormControlList-fe6eaee4.js +38 -0
  54. package/dist/es/Input-ad474a55.js +69 -0
  55. package/dist/es/{ListItem-cad14c5e.js → ListItem-16756c02.js} +7 -8
  56. package/dist/es/MultiDropdownList.js +124 -240
  57. package/dist/es/MultiList.js +124 -262
  58. package/dist/es/MultiRange.js +87 -133
  59. package/dist/es/{Pagination-784bf143.js → Pagination-72bd1d9e.js} +70 -83
  60. package/dist/es/PreferencesConsumer-24e88f3b.js +71 -0
  61. package/dist/es/RangeInput.js +163 -170
  62. package/dist/es/RangeSlider.js +81 -109
  63. package/dist/es/ReactiveBase.js +138 -154
  64. package/dist/es/ReactiveComponent-0a97eb1e.js +2178 -0
  65. package/dist/es/ReactiveComponent.js +42 -337
  66. package/dist/es/ReactiveGoogleMap.js +446 -654
  67. package/dist/es/ReactiveList.js +178 -302
  68. package/dist/es/ResultCard.js +36 -36
  69. package/dist/es/ResultList.js +48 -56
  70. package/dist/es/SelectedFilters.js +62 -69
  71. package/dist/es/SingleDropdownList.js +117 -177
  72. package/dist/es/SingleList.js +122 -206
  73. package/dist/es/SingleRange.js +78 -105
  74. package/dist/es/StateProvider.js +36 -39
  75. package/dist/es/{Title-3342664a.js → Title-863dfa42.js} +2 -2
  76. package/dist/es/ToggleButton.js +72 -119
  77. package/dist/es/{_rollupPluginBabelHelpers-76660dab.js → _rollupPluginBabelHelpers-ded08042.js} +0 -15
  78. package/dist/es/{index-7788a843.js → index-4520a598.js} +39 -107
  79. package/dist/es/index.js +30 -32
  80. package/dist/es/initReactivesearch.js +63 -150
  81. package/dist/es/install.js +49 -41
  82. package/dist/es/{ssr-b2c0b401.js → ssr-584c278d.js} +37 -8
  83. package/dist/es/{utils-9e68acee.js → utils-9e5a16a1.js} +7 -16
  84. package/dist/es/version.js +1 -1
  85. package/dist/es/{vueTypes-b8146772.js → vueTypes-f1923c72.js} +8 -19
  86. package/package.json +10 -9
  87. package/dist/cjs/Button-446f819e.js +0 -68
  88. package/dist/cjs/CancelSvg-9f258f4f.js +0 -449
  89. package/dist/cjs/Card-642547a8.js +0 -30
  90. package/dist/cjs/Container-daf30918.js +0 -15
  91. package/dist/cjs/DataSearch-aa04dc6e.js +0 -2352
  92. package/dist/cjs/DataSearch.js +0 -30
  93. package/dist/cjs/DropDown-c479bbb0.js +0 -328
  94. package/dist/cjs/Flex-aa517a13.js +0 -52
  95. package/dist/cjs/FormControlList-c195a592.js +0 -47
  96. package/dist/cjs/Input-e6603a7e.js +0 -79
  97. package/dist/cjs/ListItem-8c9e0d68.js +0 -46
  98. package/dist/cjs/Title-1de7d0f4.js +0 -15
  99. package/dist/cjs/install-b97dbac4.js +0 -1409
  100. package/dist/cjs/ssr-3027b848.js +0 -39
  101. package/dist/es/Button-d8bc15ea.js +0 -59
  102. package/dist/es/CancelSvg-4cfae5fd.js +0 -440
  103. package/dist/es/DataSearch-b86a6675.js +0 -2337
  104. package/dist/es/DataSearch.js +0 -22
  105. package/dist/es/DropDown-05a644a5.js +0 -322
  106. package/dist/es/Flex-1f0795c3.js +0 -47
  107. package/dist/es/FormControlList-c22d64f6.js +0 -40
  108. package/dist/es/Input-7a2a9fac.js +0 -71
  109. package/dist/es/install-ac8a1edb.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-611cf7f9.js');
24
+ var PreferencesConsumer = require('./PreferencesConsumer-22d1b49f.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,28 @@ 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
- var query = this.$defaultQuery.query;
635
-
575
+ var _ref2 = this.$defaultQuery || {},
576
+ query = _ref2.query;
636
577
  if (query) {
637
578
  // adds defaultQuery's query to geo-query
638
579
  // to generate a map query
580
+
639
581
  return {
640
582
  must: [geoQuery, query]
641
583
  };
642
584
  }
643
585
  }
644
-
645
586
  return geoQuery;
646
- } // return the defaultQuery (if set) or null when map query not available
647
-
587
+ }
648
588
 
589
+ // return the defaultQuery (if set) or null when map query not available
649
590
  return this.$defaultQuery ? this.$defaultQuery.query : null;
650
591
  },
651
592
  getGeoDistanceQuery: function getGeoDistanceQuery() {
652
593
  var center = this.center || this.defaultCenter;
653
-
654
594
  if (center && this.defaultRadius) {
655
595
  var _geo_distance;
656
-
657
596
  // skips geo bounding box query on initial load
658
597
  this.skipBoundingBox = true;
659
598
  return {
@@ -662,7 +601,6 @@ var ReactiveMap = {
662
601
  }, _geo_distance[this.dataField] = this.getArrPosition(center), _geo_distance)
663
602
  };
664
603
  }
665
-
666
604
  return null;
667
605
  },
668
606
  loadMore: function loadMore() {
@@ -677,26 +615,21 @@ var ReactiveMap = {
677
615
  },
678
616
  triggerClickAnalytics: function triggerClickAnalytics(searchPosition, documentId) {
679
617
  var docId = documentId;
680
-
681
618
  if (!docId) {
682
619
  var _this$getData2 = this.getData(),
683
- data = _this$getData2.data;
684
-
620
+ data = _this$getData2.data;
685
621
  var hitData = data.find(function (hit) {
686
622
  return hit._click_id === searchPosition;
687
623
  });
688
-
689
624
  if (hitData && hitData._id) {
690
625
  docId = hitData._id;
691
626
  }
692
627
  }
693
-
694
628
  this.recordResultClick(searchPosition, docId);
695
629
  },
696
630
  withClickIds: function withClickIds(results) {
697
631
  var _this$getAllData3 = this.getAllData(),
698
- base = _this$getAllData3.base;
699
-
632
+ base = _this$getAllData3.base;
700
633
  return results.map(function (result, index) {
701
634
  return _rollupPluginBabelHelpers._extends({}, result, {
702
635
  _click_id: base + index
@@ -708,19 +641,15 @@ var ReactiveMap = {
708
641
  this.$emit('search-as-move', this.searchAsMove);
709
642
  },
710
643
  renderErrorComponent: function renderErrorComponent() {
711
- var renderError = this.$scopedSlots.renderError || this.$props.renderError;
712
-
644
+ var renderError = this.$slots.renderError || this.$props.renderError;
713
645
  if (renderError && this.error && !this.isLoading) {
714
646
  return index.isFunction(renderError) ? renderError(this.error) : renderError;
715
647
  }
716
-
717
648
  return null;
718
649
  },
719
650
  renderSearchAsMove: function renderSearchAsMove() {
720
- var h = this.$createElement;
721
-
722
651
  if (this.showSearchAsMove) {
723
- return h("div", {
652
+ return vue.createVNode("div", {
724
653
  "style": {
725
654
  position: 'absolute',
726
655
  bottom: '30px',
@@ -732,41 +661,29 @@ var ReactiveMap = {
732
661
  borderRadius: 2,
733
662
  zIndex: 10000
734
663
  },
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
- },
664
+ "className": getClassName(this.innerClass, 'checkboxContainer') || null
665
+ }, [vue.createVNode(FormControlList.Checkbox, {
666
+ "type": "checkbox",
745
667
  "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
- }
668
+ "id": this.$props.componentId + "-searchasmove",
669
+ "onClick": this.toggleSearchAsMove,
670
+ "checked": this.searchAsMove,
671
+ "show": true
672
+ }, null), vue.createVNode("label", {
673
+ "className": getClassName(this.innerClass, 'label') || null,
674
+ "for": this.$props.componentId + "-searchasmove"
754
675
  }, [this.searchAsMoveLabel])]);
755
676
  }
756
-
757
677
  return null;
758
678
  },
759
679
  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
- });
680
+ return vue.createVNode(Pagination.Pagination, {
681
+ "pages": this.pages,
682
+ "totalPages": this.totalPages,
683
+ "currentPage": this.currentPageState,
684
+ "setPage": this.setPage,
685
+ "innerClass": this.innerClass
686
+ }, null);
770
687
  }
771
688
  },
772
689
  created: function created() {
@@ -774,7 +691,6 @@ var ReactiveMap = {
774
691
  this.currentPageState = this.defaultPage;
775
692
  this.from = this.currentPageState * this.$props.size;
776
693
  }
777
-
778
694
  this.internalComponent = this.$props.componentId + "__internal";
779
695
  this.updateComponentProps(this.componentId, {
780
696
  from: this.from
@@ -789,35 +705,31 @@ var ReactiveMap = {
789
705
  this.setPageURL(this.$props.componentId, this.currentPage, this.$props.componentId, false, true);
790
706
  }
791
707
  }
792
-
793
708
  var options = getQueryOptions(this.$props);
794
709
  options.from = this.$data.from;
795
-
796
710
  if (this.$props.sortBy) {
797
- var _ref2;
798
-
799
- options.sort = [(_ref2 = {}, _ref2[this.$props.dataField] = {
711
+ var _ref3;
712
+ options.sort = [(_ref3 = {}, _ref3[this.$props.dataField] = {
800
713
  order: this.$props.sortBy
801
- }, _ref2)];
714
+ }, _ref3)];
802
715
  }
803
-
804
716
  this.$defaultQuery = null;
805
-
806
717
  if (this.$props.defaultQuery) {
807
- this.$defaultQuery = this.$props.defaultQuery();
808
- options = _rollupPluginBabelHelpers._extends({}, options, getOptionsFromQuery(this.$defaultQuery)); // Override sort query with defaultQuery's sort if defined
718
+ this.$defaultQuery = this.$props.defaultQuery() || {};
719
+ options = _rollupPluginBabelHelpers._extends({}, options, getOptionsFromQuery(this.$defaultQuery));
809
720
 
721
+ // Override sort query with defaultQuery's sort if defined
810
722
  if (this.$defaultQuery.sort) {
811
723
  options.sort = this.$defaultQuery.sort;
812
- } // since we want defaultQuery to be executed anytime
724
+ }
725
+ // since we want defaultQuery to be executed anytime
813
726
  // map component's query is being executed
814
-
815
-
816
- var persistMapQuery = true; // no need to forceExecute because setReact() will capture the main query
727
+ var persistMapQuery = true;
728
+ // no need to forceExecute because setReact() will capture the main query
817
729
  // and execute the defaultQuery along with it
730
+ var forceExecute = false;
818
731
 
819
- var forceExecute = false; // Update default query for RS API
820
-
732
+ // Update default query for RS API
821
733
  this.setDefaultQueryForRSAPI();
822
734
  var meta = {
823
735
  mapBoxBounds: this.mapBoxBounds
@@ -826,20 +738,19 @@ var ReactiveMap = {
826
738
  } else {
827
739
  // only apply geo-distance when defaultQuery prop is not set
828
740
  var query = this.getGeoDistanceQuery();
829
-
830
741
  if (query) {
831
742
  // - only persist the map query if center prop is set
832
743
  // - ideally, persist the map query if you want to keep executing it
833
744
  // 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
745
+ var _persistMapQuery = !!this.center;
746
+
747
+ // - forceExecute will make sure that the component query + Map query gets executed
835
748
  // irrespective of the changes in the component query
836
749
  // - forceExecute will only come into play when searchAsMove is true
837
750
  // - kindly note that forceExecute may result in one additional network request
838
751
  // since it bypasses the gatekeeping
839
-
840
-
841
- var _forceExecute = this.searchAsMove; // Set meta for `distance` and `coordinates` in selected value
842
-
752
+ var _forceExecute = this.searchAsMove;
753
+ // Set meta for `distance` and `coordinates` in selected value
843
754
  var center = this.center || this.defaultCenter;
844
755
  var coordinatesObject = this.getArrPosition(center);
845
756
  var _meta = {
@@ -849,19 +760,16 @@ var ReactiveMap = {
849
760
  this.setMapData(this.componentId, query, _persistMapQuery, _forceExecute, _meta);
850
761
  }
851
762
  }
852
-
853
763
  this.setQueryOptions(this.componentId, options, !(this.$defaultQuery && this.$defaultQuery.query));
854
764
  },
855
765
  render: function render() {
856
- var h = arguments[0];
857
- var loader = this.$scopedSlots.loader || this.$props.loader;
858
- return h("div", {
766
+ var loader = this.$slots.loader || this.$props.loader;
767
+ return vue.createVNode("div", {
859
768
  "style": _rollupPluginBabelHelpers._extends({}, style, this.$props.style),
860
769
  "class": this.$props.className
861
770
  }, [this.renderErrorComponent(), this.isLoading && loader, this.hasCustomRender ? this.getComponent() : null, this.renderMap(this.getMapParams()), this.pagination ? this.renderPagination() : null]);
862
771
  }
863
772
  };
864
-
865
773
  var mapStateToProps = function mapStateToProps(state, props) {
866
774
  return {
867
775
  defaultPage: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value - 1 || -1,
@@ -876,7 +784,6 @@ var mapStateToProps = function mapStateToProps(state, props) {
876
784
  hidden: state.hits[props.componentId] && state.hits[props.componentId].hidden
877
785
  };
878
786
  };
879
-
880
787
  var mapDispatchToProps = {
881
788
  loadMoreAction: loadMore,
882
789
  setPageURL: setValue,
@@ -888,16 +795,14 @@ var mapDispatchToProps = {
888
795
  recordResultClick: recordResultClick,
889
796
  setMapData: setMapData
890
797
  };
891
- var RMConnected = ComponentWrapper.ComponentWrapper(index.connect(mapStateToProps, mapDispatchToProps)(ReactiveMap), {
798
+ var RMConnected = PreferencesConsumer.PreferencesConsumer(ComponentWrapper.ComponentWrapper(index.connect(mapStateToProps, mapDispatchToProps)(ReactiveMap), {
892
799
  componentType: constants.componentTypes.reactiveMap,
893
800
  internalComponent: true
894
- });
895
-
801
+ }));
896
802
  ReactiveMap.install = function (Vue) {
897
803
  Vue.component(ReactiveMap.name, RMConnected);
898
- }; // Add componentType for SSR
899
-
900
-
804
+ };
805
+ // Add componentType for SSR
901
806
  ReactiveMap.componentType = constants.componentTypes.reactiveMap;
902
807
 
903
808
  var infoWindowMappedProps = {
@@ -929,26 +834,26 @@ var infoWindowMappedProps = {
929
834
  * @param {string[]} events an array of string with all events that you want to bind
930
835
  * @returns {void}
931
836
  */
932
-
933
837
  function bindEvents(vueInst, googleMapsInst, events) {
934
838
  events.forEach(function (eventName) {
935
- if (vueInst.$gmapOptions.autoBindAllEvents || vueInst.$listeners[eventName]) {
839
+ if (vueInst.$gmapOptions.autoBindAllEvents || vueInst.$attrs[eventName]) {
936
840
  googleMapsInst.addListener(eventName, function (ev) {
937
841
  vueInst.$emit(eventName, ev);
938
842
  });
939
843
  }
940
844
  });
941
845
  }
846
+
942
847
  /**
943
848
  * Function that helps you to capitalize the first letter on a word
944
849
  *
945
850
  * @param {string} text the text that you want to capitalize
946
851
  * @returns {string}
947
852
  */
948
-
949
853
  function capitalizeFirstLetter(text) {
950
854
  return text.charAt(0).toUpperCase() + text.slice(1);
951
855
  }
856
+
952
857
  /**
953
858
  * Function that helps you to get all non nullable props from a component
954
859
  *
@@ -956,16 +861,15 @@ function capitalizeFirstLetter(text) {
956
861
  * @param {Object} props the props object
957
862
  * @returns {Object}
958
863
  */
959
-
960
864
  function getPropsValues(vueInst, props) {
961
865
  return Object.keys(props).reduce(function (acc, prop) {
962
866
  if (vueInst[prop] !== undefined) {
963
867
  acc[prop] = vueInst[prop];
964
868
  }
965
-
966
869
  return acc;
967
870
  }, {});
968
871
  }
872
+
969
873
  /**
970
874
  * Watch the individual properties of a PoD object, instead of the object
971
875
  * per se. This is different from a deep watch where both the reference
@@ -979,19 +883,17 @@ function getPropsValues(vueInst, props) {
979
883
  * @param {boolean} immediate=false
980
884
  * @returns {void}
981
885
  */
982
-
983
886
  function watchPrimitiveProperties(vueInst, propertiesToTrack, handler, immediate) {
984
887
  if (immediate === void 0) {
985
888
  immediate = false;
986
889
  }
987
-
988
890
  var isHandled = false;
891
+
989
892
  /**
990
893
  * Function in charge to execute the handler function if it was not fired
991
894
  *
992
895
  * @returns void
993
896
  */
994
-
995
897
  function requestHandle() {
996
898
  if (!isHandled) {
997
899
  isHandled = true;
@@ -1001,13 +903,13 @@ function watchPrimitiveProperties(vueInst, propertiesToTrack, handler, immediate
1001
903
  });
1002
904
  }
1003
905
  }
1004
-
1005
906
  propertiesToTrack.forEach(function (prop) {
1006
907
  vueInst.$watch(prop, requestHandle, {
1007
908
  immediate: immediate
1008
909
  });
1009
910
  });
1010
911
  }
912
+
1011
913
  /**
1012
914
  * Binds the properties defined in props to the google maps instance.
1013
915
  * If the prop is an Object type, and we wish to track the properties
@@ -1020,30 +922,27 @@ function watchPrimitiveProperties(vueInst, propertiesToTrack, handler, immediate
1020
922
  * @param {Object} props object with the component props tha should be synched with the Google Maps instances props
1021
923
  * @returns {void}
1022
924
  */
1023
-
1024
925
  function bindProps(vueInst, googleMapsInst, props) {
1025
926
  Object.keys(props).forEach(function (attribute) {
1026
927
  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
-
928
+ twoWay = _props$attribute.twoWay,
929
+ type = _props$attribute.type,
930
+ trackProperties = _props$attribute.trackProperties,
931
+ noBind = _props$attribute.noBind;
1032
932
  if (!noBind) {
1033
933
  var setMethodName = "set" + capitalizeFirstLetter(attribute);
1034
934
  var getMethodName = "get" + capitalizeFirstLetter(attribute);
1035
935
  var eventName = attribute.toLowerCase() + "_changed";
1036
936
  var initialValue = vueInst[attribute];
1037
-
1038
937
  if (typeof googleMapsInst[setMethodName] === 'undefined') {
1039
938
  throw new Error( // TODO: Analyze all disabled rules in the file
1040
939
  // eslint-disable-next-line no-underscore-dangle -- old code should be analyzed
1041
940
  setMethodName + " is not a method of (the Maps object corresponding to) " + vueInst.$options._componentTag);
1042
- } // We need to avoid an endless
941
+ }
942
+
943
+ // We need to avoid an endless
1043
944
  // propChanged -> event emitted -> propChanged -> event emitted loop
1044
945
  // although this may really be the user's responsibility
1045
-
1046
-
1047
946
  if (type !== Object || !trackProperties) {
1048
947
  // Track the object deeply
1049
948
  vueInst.$watch(attribute, function () {
@@ -1060,8 +959,7 @@ function bindProps(vueInst, googleMapsInst, props) {
1060
959
  googleMapsInst[setMethodName](vueInst[attribute]);
1061
960
  }, vueInst[attribute] !== undefined);
1062
961
  }
1063
-
1064
- if (twoWay && (vueInst.$gmapOptions.autoBindAllEvents || vueInst.$listeners[eventName])) {
962
+ if (twoWay && (vueInst.$gmapOptions.autoBindAllEvents || vueInst.$attrs[eventName])) {
1065
963
  googleMapsInst.addListener(eventName, function () {
1066
964
  vueInst.$emit(eventName, googleMapsInst[getMethodName]());
1067
965
  });
@@ -1081,47 +979,39 @@ var InfoWindowClusterManager = {
1081
979
  },
1082
980
  provide: function provide() {
1083
981
  var _this = this;
1084
-
1085
- var events = ['domready', 'closeclick', 'content_changed']; // Infowindow needs this to be immediately available
1086
-
982
+ var events = ['domready', 'closeclick', 'content_changed'];
983
+ // Infowindow needs this to be immediately available
1087
984
  var promise = this.$mapPromise.then(function (map) {
1088
- _this.$map = map; // Initialize the maps with the given options
1089
-
985
+ _this.$map = map;
986
+ // Initialize the maps with the given options
1090
987
  var initialOptions = _rollupPluginBabelHelpers._extends({}, _this.options, {
1091
988
  map: map
1092
989
  }, getPropsValues(_this, infoWindowMappedProps));
1093
-
1094
990
  var extraOptions = initialOptions.options,
1095
- position = initialOptions.position,
1096
- finalOptions = _rollupPluginBabelHelpers._objectWithoutPropertiesLoose(initialOptions, _excluded);
1097
-
991
+ position = initialOptions.position,
992
+ finalOptions = _rollupPluginBabelHelpers._objectWithoutPropertiesLoose(initialOptions, _excluded);
1098
993
  finalOptions.content = _this.$refs.flyaway;
1099
-
1100
994
  if (_this.$markerPromise) {
1101
995
  _this.$markerPromise.then(function (markerObject) {
1102
- _this.$markerObject = markerObject; // eslint-disable-next-line
1103
-
996
+ _this.$markerObject = markerObject;
997
+ // eslint-disable-next-line
1104
998
  _this.$infoWindowObject = new google.maps.InfoWindow(finalOptions);
1105
999
  bindProps(_this, _this.$infoWindowObject, infoWindowMappedProps);
1106
- bindEvents(_this, _this.$infoWindowObject, events); // TODO: This function names should be analyzed
1107
-
1000
+ bindEvents(_this, _this.$infoWindowObject, events);
1001
+ // TODO: This function names should be analyzed
1108
1002
  /* eslint-disable no-underscore-dangle -- old style */
1109
-
1110
1003
  _this._openInfoWindow();
1111
-
1112
1004
  _this.$watch('opened', function () {
1113
1005
  _this._openInfoWindow();
1114
1006
  });
1115
1007
  /* eslint-enable no-underscore-dangle */
1116
-
1117
-
1118
1008
  return _this.$infoWindowObject;
1119
1009
  });
1120
1010
  }
1121
1011
  })["catch"](function (error) {
1122
1012
  throw error;
1123
- }); // TODO: analyze the efects of only returns the instance and remove completely the promise
1124
-
1013
+ });
1014
+ // TODO: analyze the efects of only returns the instance and remove completely the promise
1125
1015
  this.$infoWindowPromise = promise;
1126
1016
  return {
1127
1017
  $infoWindowPromise: promise
@@ -1138,7 +1028,6 @@ var InfoWindowClusterManager = {
1138
1028
  type: [String, Object],
1139
1029
  "default": undefined
1140
1030
  },
1141
-
1142
1031
  /**
1143
1032
  * Determines if the info-window is open or not
1144
1033
  */
@@ -1146,7 +1035,6 @@ var InfoWindowClusterManager = {
1146
1035
  type: Boolean,
1147
1036
  "default": true
1148
1037
  },
1149
-
1150
1038
  /**
1151
1039
  * Contains the LatLng at which this info window is anchored.
1152
1040
  * Note: An InfoWindow may be attached either to a Marker object
@@ -1162,7 +1050,6 @@ var InfoWindowClusterManager = {
1162
1050
  type: Object,
1163
1051
  "default": undefined
1164
1052
  },
1165
-
1166
1053
  /**
1167
1054
  * 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
1055
  * @value 0
@@ -1172,7 +1059,6 @@ var InfoWindowClusterManager = {
1172
1059
  type: Number,
1173
1060
  "default": 0
1174
1061
  },
1175
-
1176
1062
  /**
1177
1063
  * Extra options that you want to pass to the component
1178
1064
  */
@@ -1208,10 +1094,9 @@ var InfoWindowClusterManager = {
1208
1094
  }
1209
1095
  },
1210
1096
  render: function render() {
1211
- var h = arguments[0];
1212
- return h("div", [h("div", {
1097
+ return vue.createVNode("div", null, [vue.createVNode("div", {
1213
1098
  "ref": "flyaway"
1214
- }, [this.$scopedSlots["default"]()])]);
1099
+ }, [this.$slots["default"]()])]);
1215
1100
  }
1216
1101
  };
1217
1102
 
@@ -1243,14 +1128,19 @@ var InfoWindowWrapper = {
1243
1128
  }
1244
1129
  },
1245
1130
  render: function render() {
1246
- var h = arguments[0];
1131
+ var _this = this;
1247
1132
  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)])]);
1133
+ events = this.events;
1134
+ return vue.createVNode(InfoWindowClusterManager, vue.mergeProps({
1135
+ "ref": this.id + "-Info-Window"
1136
+ }, {
1137
+ props: this.infoWindowProps,
1138
+ on: events
1139
+ }), {
1140
+ "default": function _default() {
1141
+ return [vue.createVNode("div", null, [renderPopover(_this.handleClose)])];
1142
+ }
1143
+ });
1254
1144
  }
1255
1145
  };
1256
1146
 
@@ -1304,14 +1194,12 @@ var ClusterMarkers = {
1304
1194
  },
1305
1195
  closeMarker: function closeMarker(marker) {
1306
1196
  var _this$$props = this.$props,
1307
- autoClosePopover = _this$$props.autoClosePopover,
1308
- handlePreserveCenter = _this$$props.handlePreserveCenter;
1197
+ autoClosePopover = _this$$props.autoClosePopover,
1198
+ handlePreserveCenter = _this$$props.handlePreserveCenter;
1309
1199
  var id = marker.metaData && marker.metaData._id;
1310
-
1311
1200
  var _this$openMarkers = this.openMarkers,
1312
- del = _this$openMarkers[id],
1313
- activeMarkers = _rollupPluginBabelHelpers._objectWithoutPropertiesLoose(_this$openMarkers, [id].map(_rollupPluginBabelHelpers._toPropertyKey));
1314
-
1201
+ del = _this$openMarkers[id],
1202
+ activeMarkers = _rollupPluginBabelHelpers._objectWithoutPropertiesLoose(_this$openMarkers, [id].map(_rollupPluginBabelHelpers._toPropertyKey));
1315
1203
  var newOpenMarkers = autoClosePopover ? {} : activeMarkers;
1316
1204
  this.setOpenMarkers(newOpenMarkers);
1317
1205
  handlePreserveCenter(true);
@@ -1319,15 +1207,14 @@ var ClusterMarkers = {
1319
1207
  },
1320
1208
  openMarker: function openMarker(marker, index) {
1321
1209
  var _ref, _extends2;
1322
-
1323
1210
  var autoClosePopover = this.autoClosePopover,
1324
- handlePreserveCenter = this.handlePreserveCenter;
1211
+ handlePreserveCenter = this.handlePreserveCenter;
1325
1212
  var id = marker.metaData && marker.metaData._id;
1326
1213
  var newOpenMarkers = autoClosePopover ? (_ref = {}, _ref[id] = marker, _ref) : _rollupPluginBabelHelpers._extends({}, this.openMarkers, (_extends2 = {}, _extends2[id] = marker, _extends2));
1327
1214
  this.setOpenMarkers(newOpenMarkers);
1328
1215
  handlePreserveCenter(true);
1329
1216
  this.triggerAnalytics(id, index);
1330
- this.$emit('open-marker-popover', marker.metaData);
1217
+ this.$emit('open-marker-popover', marker);
1331
1218
  },
1332
1219
  removeMarkers: function removeMarkers() {
1333
1220
  if (this.$clusterObject) {
@@ -1338,23 +1225,22 @@ var ClusterMarkers = {
1338
1225
  },
1339
1226
  buildMarkers: function buildMarkers(markersToRender) {
1340
1227
  var _this = this;
1341
-
1342
1228
  this.$mapPromise.then(function (map) {
1343
1229
  if (_this.$clusterPromise) {
1344
1230
  _this.$clusterPromise.then(function (clusterObject) {
1345
1231
  // Detect changed markers
1346
1232
  var markersToAdd = [];
1347
- var markersToRemove = []; // A map of marker id to active status, `true` means marker is active
1233
+ var markersToRemove = [];
1234
+ // A map of marker id to active status, `true` means marker is active
1348
1235
  // `false` means marker is stale and should be removed
1349
-
1350
1236
  var oldMarkersIdMap = {};
1351
1237
  (_this.$markers || []).forEach(function (marker) {
1352
1238
  if (marker.metaData && marker.metaData._id) {
1353
1239
  // mark all old markers as stale
1354
1240
  oldMarkersIdMap[marker.metaData._id] = false;
1355
1241
  }
1356
- }); // build map markers
1357
-
1242
+ });
1243
+ // build map markers
1358
1244
  markersToRender.forEach(function (marker, index) {
1359
1245
  // Avoid if a marker is already rendered
1360
1246
  if (marker._id && oldMarkersIdMap[marker._id] !== undefined) {
@@ -1367,14 +1253,11 @@ var ClusterMarkers = {
1367
1253
  map: map,
1368
1254
  position: _this.getPosition(marker)
1369
1255
  });
1370
-
1371
1256
  if (_this.renderItem) {
1372
1257
  var data = _this.renderItem(marker);
1373
-
1374
1258
  if ('label' in data) {
1375
1259
  initialOptions.label = data.label;
1376
1260
  }
1377
-
1378
1261
  if ('icon' in data) {
1379
1262
  initialOptions.icon = data.icon;
1380
1263
  }
@@ -1383,23 +1266,20 @@ var ClusterMarkers = {
1383
1266
  url: _this.defaultPin
1384
1267
  };
1385
1268
  }
1386
-
1387
1269
  var extraOptions = initialOptions.options,
1388
- finalOptions = _rollupPluginBabelHelpers._objectWithoutPropertiesLoose(initialOptions, _excluded$1);
1389
-
1270
+ finalOptions = _rollupPluginBabelHelpers._objectWithoutPropertiesLoose(initialOptions, _excluded$1);
1390
1271
  if (_this.$clusterPromise) {
1391
1272
  finalOptions.map = null;
1392
- } // eslint-disable-next-line
1393
-
1394
-
1273
+ }
1274
+ // eslint-disable-next-line
1395
1275
  var markerObject = new google.maps.Marker(finalOptions);
1396
1276
  markerObject.addListener('click', function () {
1397
1277
  _this.openMarker(markerObject, index);
1398
1278
  });
1399
1279
  markersToAdd.push(markerObject);
1400
1280
  }
1401
- }); // Current active markers
1402
-
1281
+ });
1282
+ // Current active markers
1403
1283
  var currentMarkers = [];
1404
1284
  markersToAdd.forEach(function (marker) {
1405
1285
  currentMarkers.push(marker);
@@ -1413,10 +1293,10 @@ var ClusterMarkers = {
1413
1293
  currentMarkers.push(marker);
1414
1294
  }
1415
1295
  }
1416
- }); // Remove old markers
1417
-
1418
- clusterObject.removeMarkers(markersToRemove); // Add inital markers at once
1419
-
1296
+ });
1297
+ // Remove old markers
1298
+ clusterObject.removeMarkers(markersToRemove);
1299
+ // Add inital markers at once
1420
1300
  clusterObject.addMarkers(markersToAdd);
1421
1301
  _this.$clusterObject = clusterObject;
1422
1302
  _this.$map = map;
@@ -1430,41 +1310,34 @@ var ClusterMarkers = {
1430
1310
  },
1431
1311
  render: function render() {
1432
1312
  var _this2 = this;
1433
-
1434
- var h = arguments[0];
1435
-
1436
1313
  if (!this.renderPopover) {
1437
1314
  return null;
1438
1315
  }
1439
-
1440
- return h("div", [Object.keys(this.openMarkers).map(function (markerId) {
1316
+ return vue.createVNode("div", null, [Object.keys(this.openMarkers).map(function (markerId) {
1441
1317
  var marker = _this2.openMarkers[markerId];
1442
1318
  var item = marker.metaData;
1443
- return h(InfoWindowWrapper, {
1319
+ return vue.createVNode(InfoWindowWrapper, {
1444
1320
  "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);
1321
+ "id": markerId,
1322
+ "renderPopover": function renderPopover(_handleClose) {
1323
+ return _this2.renderPopover({
1324
+ item: item,
1325
+ handleClose: function handleClose() {
1326
+ _handleClose();
1327
+ _this2.closeMarker(item);
1464
1328
  }
1329
+ });
1330
+ },
1331
+ "marker": marker,
1332
+ "infoWindowProps": {
1333
+ zIndex: 500
1334
+ },
1335
+ "events": {
1336
+ closeclick: function closeclick() {
1337
+ return _this2.closeMarker(marker);
1465
1338
  }
1466
1339
  }
1467
- });
1340
+ }, null);
1468
1341
  })]);
1469
1342
  }
1470
1343
  };
@@ -1475,7 +1348,6 @@ var ClusterManager = index.connect(function () {
1475
1348
  return null;
1476
1349
  }, mapDispatchToProps$1)(ClusterMarkers);
1477
1350
 
1478
- var InfoWindow = GmapVue.components.InfoWindow;
1479
1351
  var InfoWindowWrapper$1 = {
1480
1352
  name: 'InfoWindowWrapper',
1481
1353
  props: {
@@ -1498,19 +1370,21 @@ var InfoWindowWrapper$1 = {
1498
1370
  }
1499
1371
  },
1500
1372
  render: function render() {
1501
- var h = arguments[0];
1373
+ var _this = this;
1502
1374
  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)])]);
1375
+ events = this.events;
1376
+ return vue.createVNode(VueGoogleMaps.InfoWindow, vue.mergeProps({
1377
+ "closeclick": "true",
1378
+ "ref": this.id + "-Info-Window"
1379
+ }, this.infoWindowProps, _transformOn(events)), {
1380
+ "default": function _default() {
1381
+ return [vue.createVNode("div", null, [renderPopover(_this.handleClose)])];
1382
+ }
1383
+ });
1509
1384
  }
1510
1385
  };
1511
1386
 
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
-
1387
+ // Note: This file has been taken from https://github.com/eregnier/vue2-gmap-custom-marker/blob/master/gmap-custom-marker.vue
1514
1388
  var MarkerWithLabel = {
1515
1389
  name: 'MarkerWithLabel',
1516
1390
  props: {
@@ -1554,7 +1428,7 @@ var MarkerWithLabel = {
1554
1428
  opacity: 0.01
1555
1429
  };
1556
1430
  },
1557
- mixins: [MapElementMixin],
1431
+ mixins: [VueGoogleMaps.MapElementMixin],
1558
1432
  inject: {
1559
1433
  $clusterPromise: {
1560
1434
  "default": null
@@ -1571,14 +1445,12 @@ var MarkerWithLabel = {
1571
1445
  if (this.marker instanceof window.google.maps.LatLng) {
1572
1446
  return this.marker;
1573
1447
  }
1574
-
1575
1448
  return new window.google.maps.LatLng(this.lat, this.lng);
1576
1449
  }
1577
1450
  },
1578
1451
  watch: {
1579
1452
  marker: function marker() {
1580
1453
  var _this = this;
1581
-
1582
1454
  this.$mapPromise.then(function () {
1583
1455
  return _this.$overlay.setPosition();
1584
1456
  });
@@ -1594,7 +1466,6 @@ var MarkerWithLabel = {
1594
1466
  // eslint-disable-next-line
1595
1467
  options.map = null;
1596
1468
  }
1597
-
1598
1469
  return this.$clusterPromise;
1599
1470
  },
1600
1471
  destroyed: function destroyed() {
@@ -1607,111 +1478,87 @@ var MarkerWithLabel = {
1607
1478
  },
1608
1479
  provide: function provide() {
1609
1480
  var _this2 = this;
1610
-
1611
1481
  var self = this;
1612
1482
  return this.$mapPromise.then(function (map) {
1613
1483
  var Overlay = /*#__PURE__*/function (_window$google$maps$O) {
1614
1484
  _rollupPluginBabelHelpers._inheritsLoose(Overlay, _window$google$maps$O);
1615
-
1616
1485
  function Overlay(map2) {
1617
1486
  var _this3;
1618
-
1619
1487
  _this3 = _window$google$maps$O.call(this) || this;
1620
1488
  _this3.metaData = self.metaData;
1621
-
1622
1489
  _this3.setMap(map2);
1623
-
1624
1490
  _this3.draw = function () {
1625
1491
  return _this3.repaint();
1626
1492
  };
1627
-
1628
1493
  _this3.setPosition = function () {
1629
1494
  return _this3.repaint();
1630
1495
  };
1631
-
1632
1496
  _this3.getVisible = function () {
1633
1497
  return true;
1634
1498
  };
1635
-
1636
1499
  return _this3;
1637
1500
  }
1638
-
1639
1501
  var _proto = Overlay.prototype;
1640
-
1641
1502
  _proto.repaint = function repaint() {
1642
1503
  var div = self.$el;
1643
1504
  var projection = this.getProjection();
1644
-
1645
1505
  if (projection && div) {
1646
1506
  var posPixel = projection.fromLatLngToDivPixel(self.latLng);
1647
1507
  var x;
1648
1508
  var y;
1649
-
1650
1509
  switch (self.alignment) {
1651
1510
  case 'top':
1652
1511
  x = posPixel.x - div.offsetWidth / 2;
1653
1512
  y = posPixel.y - div.offsetHeight;
1654
1513
  break;
1655
-
1656
1514
  case 'bottom':
1657
1515
  x = posPixel.x - div.offsetWidth / 2;
1658
1516
  y = posPixel.y;
1659
1517
  break;
1660
-
1661
1518
  case 'left':
1662
1519
  x = posPixel.x - div.offsetWidth;
1663
1520
  y = posPixel.y - div.offsetHeight / 2;
1664
1521
  break;
1665
-
1666
1522
  case 'right':
1667
1523
  x = posPixel.x;
1668
1524
  y = posPixel.y - div.offsetHeight / 2;
1669
1525
  break;
1670
-
1671
1526
  case 'center':
1672
1527
  x = posPixel.x - div.offsetWidth / 2;
1673
1528
  y = posPixel.y - div.offsetHeight / 2;
1674
1529
  break;
1675
-
1676
1530
  case 'topleft':
1677
1531
  case 'lefttop':
1678
1532
  x = posPixel.x - div.offsetWidth;
1679
1533
  y = posPixel.y - div.offsetHeight;
1680
1534
  break;
1681
-
1682
1535
  case 'topright':
1683
1536
  case 'righttop':
1684
1537
  x = posPixel.x;
1685
1538
  y = posPixel.y - div.offsetHeight;
1686
1539
  break;
1687
-
1688
1540
  case 'bottomleft':
1689
1541
  case 'leftop':
1690
1542
  x = posPixel.x - div.offsetWidth;
1691
1543
  y = posPixel.y;
1692
1544
  break;
1693
-
1694
1545
  case 'bottomright':
1695
1546
  case 'rightbottom':
1696
1547
  x = posPixel.x;
1697
1548
  y = posPixel.y;
1698
1549
  break;
1699
-
1700
1550
  default:
1701
1551
  throw new Error('Invalid alignment type of custom marker!');
1702
1552
  }
1703
-
1704
1553
  if (self.cssPosition) {
1705
1554
  div.style.transform = "translate(" + (x + self.offsetX) + "px, " + (y + self.offsetY) + "px)";
1706
1555
  } else {
1707
1556
  div.style.left = x + self.offsetX + "px";
1708
1557
  div.style.top = y + self.offsetY + "px";
1709
1558
  }
1710
-
1711
1559
  div.style['z-index'] = self.zIndex;
1712
1560
  }
1713
1561
  };
1714
-
1715
1562
  _proto.onAdd = function onAdd() {
1716
1563
  if (this.$clusterObject) {
1717
1564
  this.$clusterObject.removeMarker(this.$overlay, true);
@@ -1719,7 +1566,6 @@ var MarkerWithLabel = {
1719
1566
  this.$overlay.setMap(null);
1720
1567
  this.$overlay = undefined;
1721
1568
  }
1722
-
1723
1569
  var div = self.$el;
1724
1570
  var panes = this.getPanes();
1725
1571
  div.style.position = 'absolute';
@@ -1727,24 +1573,21 @@ var MarkerWithLabel = {
1727
1573
  div.style.zIndex = self.zIndex;
1728
1574
  panes.overlayLayer.appendChild(div);
1729
1575
  panes.overlayMouseTarget.appendChild(div);
1730
-
1731
1576
  this.getDraggable = function () {
1732
1577
  return false;
1733
1578
  };
1734
-
1735
1579
  this.getPosition = function () {
1736
1580
  return new window.google.maps.LatLng(self.lat, self.lng);
1737
1581
  };
1738
-
1739
1582
  self.afterCreate(this);
1740
- } // eslint-disable-next-line
1583
+ }
1584
+ // eslint-disable-next-line
1741
1585
  ;
1742
-
1743
1586
  _proto.onRemove = function onRemove() {
1744
1587
  if (self.$el) {
1745
1588
  var ua = window.navigator.userAgent;
1746
- var msie = ua.indexOf('MSIE '); // eslint-disable-next-line
1747
-
1589
+ var msie = ua.indexOf('MSIE ');
1590
+ // eslint-disable-next-line
1748
1591
  if (msie > 0 || !!ua.match(/Trident.*rv\:11\./)) {
1749
1592
  self.$el.parentNode.removeChild(self.$el);
1750
1593
  } else {
@@ -1752,15 +1595,12 @@ var MarkerWithLabel = {
1752
1595
  }
1753
1596
  }
1754
1597
  };
1755
-
1756
1598
  return Overlay;
1757
1599
  }(window.google.maps.OverlayView);
1758
-
1759
1600
  _this2.$overlay = new Overlay(map);
1760
1601
  setTimeout(function () {
1761
1602
  if (_this2.$overlay) {
1762
1603
  _this2.$overlay.repaint();
1763
-
1764
1604
  _this2.opacity = 1;
1765
1605
  }
1766
1606
  }, 100);
@@ -1769,7 +1609,6 @@ var MarkerWithLabel = {
1769
1609
  methods: {
1770
1610
  afterCreate: function afterCreate(inst) {
1771
1611
  var _this4 = this;
1772
-
1773
1612
  if (this.$clusterPromise && !this.isMarkerAdded) {
1774
1613
  this.$clusterPromise.then(function (co) {
1775
1614
  co.addMarker(inst);
@@ -1780,26 +1619,22 @@ var MarkerWithLabel = {
1780
1619
  }
1781
1620
  },
1782
1621
  render: function render() {
1783
- var h = arguments[0];
1784
- return h("div", {
1622
+ return vue.createVNode("div", {
1785
1623
  "style": {
1786
1624
  opacity: this.opacity
1787
1625
  },
1788
- "on": {
1789
- "mouseover": this.handleMouseOver,
1790
- "mouseout": this.handleMouseOut,
1791
- "click": this.handleClick
1792
- }
1626
+ "onmouseover": this.handleMouseOver,
1627
+ "onmouseout": this.handleMouseOut,
1628
+ "onclick": this.handleClick
1793
1629
  }, [this.renderMarker()]);
1794
1630
  }
1795
1631
  };
1796
1632
 
1797
1633
  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"])));
1634
+ 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"])));
1635
+ 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"])));
1636
+ var mapPinWrapper = emotion.css(_templateObject3 || (_templateObject3 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t&:hover,\n\t&:focus {\n\t\tz-index: 200;\n\t}\n"])));
1801
1637
 
1802
- var Marker = GmapVue.components.Marker;
1803
1638
  var recordResultClick$2 = configureStore.Actions.recordResultClick;
1804
1639
  var GoogleMapMarker = {
1805
1640
  name: 'GoogleMapMarker',
@@ -1823,211 +1658,180 @@ var GoogleMapMarker = {
1823
1658
  };
1824
1659
  },
1825
1660
  methods: {
1661
+ setIcon: function setIcon(icon) {
1662
+ this.markerIcon = icon;
1663
+ },
1826
1664
  increaseMarkerZIndex: function increaseMarkerZIndex() {
1827
1665
  var handlePreserveCenter = this.$props.handlePreserveCenter;
1828
-
1829
1666
  if (this.highlightMarkerOnHover) {
1830
1667
  this.zIndex += 1;
1831
1668
  }
1832
-
1833
1669
  handlePreserveCenter(true);
1834
1670
  },
1835
1671
  removeMarkerZIndex: function removeMarkerZIndex() {
1836
1672
  var handlePreserveCenter = this.$props.handlePreserveCenter;
1837
-
1838
1673
  if (this.highlightMarkerOnHover) {
1839
1674
  this.zIndex -= 1;
1840
1675
  }
1841
-
1842
1676
  handlePreserveCenter(true);
1843
1677
  },
1844
1678
  openMarker: function openMarker() {
1845
1679
  var _ref, _extends2;
1846
-
1847
1680
  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;
1681
+ handleOpenMarkers = _this$$props.setOpenMarkers,
1682
+ openMarkers = _this$$props.openMarkers,
1683
+ marker = _this$$props.marker,
1684
+ autoClosePopover = _this$$props.autoClosePopover,
1685
+ handlePreserveCenter = _this$$props.handlePreserveCenter;
1853
1686
  var id = marker._id;
1854
1687
  var newOpenMarkers = autoClosePopover ? (_ref = {}, _ref[id] = true, _ref) : _rollupPluginBabelHelpers._extends({}, openMarkers, (_extends2 = {}, _extends2[id] = true, _extends2));
1855
1688
  handleOpenMarkers(newOpenMarkers);
1856
1689
  handlePreserveCenter(true);
1857
1690
  this.triggerAnalytics();
1691
+ marker.setIcon = this.setIcon;
1858
1692
  this.$emit('open-marker-popover', marker);
1859
1693
  },
1860
1694
  closeMarker: function closeMarker() {
1861
1695
  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;
1696
+ handleOpenMarkers = _this$$props2.setOpenMarkers,
1697
+ marker = _this$$props2.marker,
1698
+ autoClosePopover = _this$$props2.autoClosePopover,
1699
+ handlePreserveCenter = _this$$props2.handlePreserveCenter,
1700
+ openMarkers = _this$$props2.openMarkers;
1867
1701
  var id = marker._id;
1868
-
1869
1702
  var del = openMarkers[id],
1870
- activeMarkers = _rollupPluginBabelHelpers._objectWithoutPropertiesLoose(openMarkers, [id].map(_rollupPluginBabelHelpers._toPropertyKey));
1871
-
1703
+ activeMarkers = _rollupPluginBabelHelpers._objectWithoutPropertiesLoose(openMarkers, [id].map(_rollupPluginBabelHelpers._toPropertyKey));
1872
1704
  var newOpenMarkers = autoClosePopover ? {} : activeMarkers;
1873
1705
  handleOpenMarkers(newOpenMarkers);
1874
1706
  handlePreserveCenter(true);
1707
+ marker.setIcon = this.setIcon;
1875
1708
  this.$emit('close-marker-popover', marker);
1876
1709
  },
1877
1710
  triggerAnalytics: function triggerAnalytics() {
1878
1711
  this.recordResultClick(this.index, this.marker._id);
1879
1712
  },
1880
- renderPopoverClick: function renderPopoverClick(item, includeExternalSettings) {
1713
+ renderPopoverClick: function renderPopoverClick(item) {
1881
1714
  var _this = this;
1882
-
1883
- if (includeExternalSettings === void 0) {
1884
- includeExternalSettings = false;
1885
- }
1886
-
1887
- var h = this.$createElement;
1888
1715
  var additionalProps = {};
1889
1716
  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
-
1717
+ getPosition = _this$$props3.getPosition,
1718
+ _renderPopover = _this$$props3.renderPopover,
1719
+ openMarkers = _this$$props3.openMarkers;
1720
+ additionalProps = {
1721
+ position: getPosition(item),
1722
+ defaultOptions: {
1723
+ pixelOffset: new window.google.maps.Size(0, -30)
1724
+ }
1725
+ };
1904
1726
  if (item._id in openMarkers) {
1905
- return h(InfoWindowWrapper$1, {
1727
+ return vue.createVNode(InfoWindowWrapper$1, {
1906
1728
  "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();
1729
+ "id": item._id,
1730
+ "renderPopover": function renderPopover(_handleClose) {
1731
+ return _renderPopover({
1732
+ item: item,
1733
+ handleClose: function handleClose() {
1734
+ _handleClose();
1735
+ _this.closeMarker();
1927
1736
  }
1737
+ });
1738
+ },
1739
+ "infoWindowProps": {
1740
+ zIndex: 500,
1741
+ position: additionalProps.position,
1742
+ options: additionalProps.defaultOptions
1743
+ },
1744
+ "events": {
1745
+ closeclick: function closeclick() {
1746
+ return _this.closeMarker();
1928
1747
  }
1929
1748
  }
1930
- });
1749
+ }, null);
1931
1750
  }
1932
-
1933
1751
  return null;
1934
1752
  }
1935
1753
  },
1936
1754
  render: function render() {
1937
1755
  var _this2 = this;
1938
-
1939
- var h = arguments[0];
1940
1756
  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;
1757
+ getPosition = _this$$props4.getPosition,
1758
+ renderItem = _this$$props4.renderItem,
1759
+ defaultPin = _this$$props4.defaultPin,
1760
+ renderPopover = _this$$props4.renderPopover,
1761
+ customMarkerProps = _this$$props4.markerProps,
1762
+ marker = _this$$props4.marker;
1947
1763
  var markerProps = {};
1948
-
1949
1764
  if (this.zIndex) {
1950
1765
  markerProps.zIndex = window.google.maps.Marker.MAX_ZINDEX + this.zIndex;
1951
1766
  }
1952
-
1953
1767
  if (renderItem) {
1954
- marker.setIcon = function (icon) {
1955
- _this2.markerIcon = icon;
1956
- };
1957
-
1768
+ marker.setIcon = this.setIcon;
1958
1769
  var data = renderItem(marker);
1959
-
1960
1770
  if ('label' in data) {
1961
- return h(MarkerWithLabel, {
1771
+ return vue.createVNode(MarkerWithLabel, vue.mergeProps({
1962
1772
  "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
- });
1773
+ "metaData": marker,
1774
+ "marker": getPosition(marker),
1775
+ "labelAnchor": new window.google.maps.Point(0, 30),
1776
+ "handleMouseOver": this.increaseMarkerZIndex,
1777
+ "handleMouseOut": this.removeMarkerZIndex,
1778
+ "handleClick": this.openMarker,
1779
+ "zIndex": markerProps.zIndex
1780
+ }, customMarkerProps, {
1781
+ "renderMarker": function renderMarker() {
1782
+ return vue.createVNode("div", {
1783
+ "css": mapPinWrapper
1784
+ }, [vue.createVNode(MapPin, null, {
1785
+ "default": function _default() {
1786
+ return [data.label];
1787
+ }
1788
+ }), vue.createVNode(MapPinArrow, null, null), renderPopover ? _this2.renderPopoverClick(marker, true) : null]);
1789
+ }
1790
+ }), null);
1981
1791
  }
1982
-
1983
1792
  if ('icon' in data) {
1984
1793
  markerProps.icon = data.icon;
1985
1794
  } else {
1986
- return h(MarkerWithLabel, {
1795
+ return vue.createVNode(MarkerWithLabel, vue.mergeProps({
1987
1796
  "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
- });
1797
+ "metaData": marker,
1798
+ "marker": getPosition(marker),
1799
+ "handleClick": this.openMarker,
1800
+ "handleMouseOver": this.increaseMarkerZIndex,
1801
+ "handleMouseOut": this.removeMarkerZIndex,
1802
+ "zIndex": markerProps.zIndex
1803
+ }, customMarkerProps, {
1804
+ "renderMarker": function renderMarker() {
1805
+ return vue.createVNode("div", {
1806
+ "css": mapPinWrapper
1807
+ }, [typeof data.custom === 'function' ? data.custom(marker) : data.custom, renderPopover ? _this2.renderPopoverClick(marker, true) : null]);
1808
+ }
1809
+ }), null);
2005
1810
  }
2006
1811
  } else if (defaultPin) {
2007
1812
  markerProps.icon = {
2008
1813
  url: defaultPin
2009
1814
  };
2010
1815
  }
2011
-
2012
- return h(Marker, {
1816
+ return vue.createVNode(VueGoogleMaps.Marker, vue.mergeProps({
2013
1817
  "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
1818
+ "zIndex": markerProps.zIndex,
1819
+ "onClick": function onClick() {
1820
+ return _this2.openMarker();
2021
1821
  },
2022
- "on": {
2023
- "click": function click() {
2024
- return _this2.openMarker();
2025
- },
2026
- "mouseover": this.increaseMarkerZIndex,
2027
- "mouseout": this.removeMarkerZIndex
1822
+ "onMouseover": this.increaseMarkerZIndex,
1823
+ "onMouseout": this.removeMarkerZIndex
1824
+ }, customMarkerProps, {
1825
+ "position": getPosition(marker),
1826
+ "options": {
1827
+ metaData: marker
2028
1828
  },
2029
- "props": _rollupPluginBabelHelpers._extends({}, customMarkerProps)
2030
- }, [renderPopover ? this.renderPopoverClick(marker) : null]);
1829
+ "icon": this.markerIcon || markerProps.icon
1830
+ }), {
1831
+ "default": function _default() {
1832
+ return [renderPopover ? _this2.renderPopoverClick(marker) : null];
1833
+ }
1834
+ });
2031
1835
  }
2032
1836
  };
2033
1837
  var mapDispatchToProps$2 = {
@@ -2037,7 +1841,6 @@ var GoogleMapMarker$1 = index.connect(function () {
2037
1841
  return null;
2038
1842
  }, mapDispatchToProps$2)(GoogleMapMarker);
2039
1843
 
2040
- var Cluster = GmapVue.components.Cluster;
2041
1844
  var GoogleMapMarkers = {
2042
1845
  name: 'GoogleMapMarkers',
2043
1846
  props: {
@@ -2084,8 +1887,6 @@ var GoogleMapMarkers = {
2084
1887
  },
2085
1888
  render: function render() {
2086
1889
  var _this = this;
2087
-
2088
- var h = arguments[0];
2089
1890
  var resultsToRender = this.$props.resultsToRender;
2090
1891
  var openMarkers = this.openMarkers;
2091
1892
  var markerProps = {
@@ -2102,75 +1903,65 @@ var GoogleMapMarkers = {
2102
1903
  showMarkerClusters: this.showMarkerClusters,
2103
1904
  highlightMarkerOnHover: this.highlightMarkerOnHover
2104
1905
  };
2105
-
2106
1906
  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
- }
1907
+ return vue.createVNode("div", null, [vue.createVNode(VueGoogleMaps.GMapCluster, vue.mergeProps(this.clusterProps, {
1908
+ "onclick": function onclick(cluster) {
1909
+ var markers = cluster.markers.map(function (i) {
1910
+ return i.metaData;
1911
+ });
1912
+ _this.clickedCluster = cluster;
1913
+ _this.clusterMarkers = markers;
1914
+ _this.$emit('open-cluster-popover', _this.clusterMarkers);
2119
1915
  },
2120
1916
  "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
1917
+ }), {
1918
+ "default": function _default() {
1919
+ return [vue.createVNode(ClusterManager, vue.mergeProps({
1920
+ "getPosition": markerProps.getPosition,
1921
+ "markers": resultsToRender,
1922
+ "defaultPin": markerProps.defaultPin,
1923
+ "renderItem": markerProps.renderItem,
1924
+ "markerProps": markerProps.markerProps,
1925
+ "handlePreserveCenter": markerProps.handlePreserveCenter,
1926
+ "autoClosePopover": markerProps.autoClosePopover,
1927
+ "renderPopover": markerProps.renderPopover,
1928
+ "highlightMarkerOnHover": markerProps.highlightMarkerOnHover
1929
+ }, {
1930
+ on: _this.$attrs
1931
+ }), null)];
1932
+ }
1933
+ }), this.clickedCluster && this.renderClusterPopover ? vue.createVNode(InfoWindowWrapper$1, {
1934
+ "id": "cluster",
1935
+ "infoWindowProps": {
1936
+ zIndex: 500,
1937
+ position: this.getAdditionalProps().position,
1938
+ options: this.getAdditionalProps().defaultOptions
2132
1939
  },
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
- }
1940
+ "renderPopover": function renderPopover(_handleClose) {
1941
+ return _this.renderClusterPopover({
1942
+ markers: _this.clusterMarkers,
1943
+ cluster: _this.clickedCluster,
1944
+ handleClose: function handleClose() {
1945
+ _handleClose();
1946
+ _this.closeMarker();
1947
+ }
1948
+ });
1949
+ },
1950
+ "events": {
1951
+ closeclick: this.closeMarker
2156
1952
  }
2157
- }) : null]);
1953
+ }, null) : null]);
2158
1954
  }
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
- });
1955
+ return vue.createVNode("div", null, [resultsToRender.map(function (marker, index) {
1956
+ return vue.createVNode(GoogleMapMarker$1, vue.mergeProps({
1957
+ "index": index,
1958
+ "marker": marker
1959
+ }, markerProps, _this.$attrs), null);
2169
1960
  })]);
2170
1961
  }
2171
1962
  };
2172
1963
 
2173
- var Map = GmapVue.components.MapLayer;
1964
+ var _templateObject$1;
2174
1965
  var ReactiveGoogleMap = {
2175
1966
  name: 'ReactiveGoogleMap',
2176
1967
  props: {
@@ -2205,69 +1996,78 @@ var ReactiveGoogleMap = {
2205
1996
  calculateMarkers: VueTypes.func,
2206
1997
  highlightMarkerOnHover: VueTypes.bool.def(true)
2207
1998
  },
1999
+ computed: {
2000
+ listeners: function listeners() {
2001
+ var onRE = /^on[^a-z]/;
2002
+ var listeners = {};
2003
+ var $attrs = this.$attrs;
2004
+ Object.keys($attrs).forEach(function (property) {
2005
+ if (onRE.test(property)) {
2006
+ listeners[property] = $attrs[property];
2007
+ }
2008
+ });
2009
+ return listeners;
2010
+ }
2011
+ },
2208
2012
  methods: {
2209
2013
  renderMap: function renderMap(_ref) {
2210
2014
  var _this = this;
2211
-
2212
2015
  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;
2016
+ center = _ref.center,
2017
+ zoom = _ref.zoom,
2018
+ handleZoomChange = _ref.handleZoomChange,
2019
+ handleOnDragEnd = _ref.handleOnDragEnd,
2020
+ handleOnIdle = _ref.handleOnIdle,
2021
+ renderSearchAsMove = _ref.renderSearchAsMove,
2022
+ handlePreserveCenter = _ref.handlePreserveCenter,
2023
+ getPosition = _ref.getPosition,
2024
+ autoClosePopover = _ref.autoClosePopover,
2025
+ defaultPin = _ref.defaultPin;
2224
2026
  var style = {
2225
2027
  width: '100%',
2226
2028
  height: '100%',
2227
2029
  position: 'relative'
2228
2030
  };
2229
- return h("div", {
2031
+ return vue.createVNode("div", {
2230
2032
  "style": style
2231
- }, [h(Map, {
2033
+ }, [vue.createVNode(VueGoogleMaps.Map, vue.mergeProps({
2232
2034
  "ref": "mapRef",
2233
- "attrs": {
2234
- "map-type-id": "terrain",
2235
- "options": {
2236
- zoomControl: true
2237
- },
2238
- "center": center,
2239
- "zoom": zoom
2240
- },
2035
+ "map-type-id": "terrain",
2241
2036
  "style": {
2242
2037
  height: '100%'
2243
2038
  },
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
2039
+ "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"]))),
2040
+ "options": {
2041
+ zoomControl: true
2268
2042
  },
2269
- "on": _rollupPluginBabelHelpers._extends({}, this.$listeners)
2270
- }) : null]), renderSearchAsMove()]);
2043
+ "center": center,
2044
+ "zoom": zoom
2045
+ }, this.mapProps, {
2046
+ "onzoom_changed": handleZoomChange,
2047
+ "ondragend": handleOnDragEnd,
2048
+ "onidle": handleOnIdle
2049
+ }), {
2050
+ "default": function _default() {
2051
+ return [_this.showMarkers ? vue.createVNode(GoogleMapMarkers, vue.mergeProps({
2052
+ "resultsToRender": resultsToRender,
2053
+ "getPosition": getPosition,
2054
+ "markerProps": _this.markerProps,
2055
+ "clusterProps": _this.clusterProps,
2056
+ "handlePreserveCenter": handlePreserveCenter,
2057
+ "highlightMarkerOnHover": _this.highlightMarkerOnHover,
2058
+ "renderItem": _this.$slots.renderItem ? function () {
2059
+ return {
2060
+ custom: _this.$slots.renderItem
2061
+ };
2062
+ } : _this.renderItem,
2063
+ "defaultPin": defaultPin,
2064
+ "autoClosePopover": autoClosePopover,
2065
+ "renderPopover": _this.$slots.renderPopover,
2066
+ "renderClusterPopover": _this.$slots.renderClusterPopover,
2067
+ "showMarkerClusters": _this.showMarkerClusters
2068
+ }, _this.listeners), null) : null];
2069
+ }
2070
+ }), renderSearchAsMove()]);
2271
2071
  },
2272
2072
  getMapRef: function getMapRef() {
2273
2073
  return this.mapRef;
@@ -2275,11 +2075,11 @@ var ReactiveGoogleMap = {
2275
2075
  removeMarkers: function removeMarkers() {
2276
2076
  var clusterManagerInstance;
2277
2077
  var currentInstance = this;
2278
-
2279
2078
  while (currentInstance) {
2280
- if (currentInstance && currentInstance._name === '<ConnectClusterMarkers>') {
2079
+ if (currentInstance && currentInstance.$options && currentInstance.$options.name === 'connect-ClusterMarkers') {
2281
2080
  clusterManagerInstance = currentInstance;
2282
2081
  currentInstance = null;
2082
+ // TODO: Check if $children works in vue 3
2283
2083
  } else if (currentInstance.$children) {
2284
2084
  var _currentInstance$$chi = currentInstance.$children;
2285
2085
  currentInstance = _currentInstance$$chi[0];
@@ -2287,7 +2087,6 @@ var ReactiveGoogleMap = {
2287
2087
  currentInstance = null;
2288
2088
  }
2289
2089
  }
2290
-
2291
2090
  if (clusterManagerInstance && clusterManagerInstance.removeMarkers) {
2292
2091
  clusterManagerInstance.removeMarkers();
2293
2092
  }
@@ -2295,7 +2094,6 @@ var ReactiveGoogleMap = {
2295
2094
  },
2296
2095
  mounted: function mounted() {
2297
2096
  var _this2 = this;
2298
-
2299
2097
  if (this.$refs.mapRef) {
2300
2098
  this.$refs.mapRef.$mapPromise.then(function (map) {
2301
2099
  _this2.mapRef = map;
@@ -2303,61 +2101,54 @@ var ReactiveGoogleMap = {
2303
2101
  }
2304
2102
  },
2305
2103
  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
- }
2104
+ return vue.createVNode(RMConnected, vue.mergeProps({
2105
+ "getMapRef": this.getMapRef,
2106
+ "renderMap": this.renderMap,
2107
+ "componentId": this.componentId,
2108
+ "className": this.className,
2109
+ "dataField": this.dataField,
2110
+ "defaultZoom": this.defaultZoom,
2111
+ "react": this.react,
2112
+ "size": this.size,
2113
+ "sortBy": this.sortBy,
2114
+ "pagination": this.pagination,
2115
+ "URLParams": this.URLParams,
2116
+ "defaultSearchAsMove": this.searchAsMove,
2117
+ "showSearchAsMove": this.showSearchAsMove,
2118
+ "searchAsMoveLabel": this.searchAsMoveLabel,
2119
+ "showMarkers": this.showMarkers,
2120
+ "markerProps": this.markerProps,
2121
+ "autoClosePopover": this.autoClosePopover,
2122
+ "defaultPin": this.defaultPin,
2123
+ "defaultQuery": this.defaultQuery,
2124
+ "autoCenter": this.autoCenter,
2125
+ "defaultCenter": this.defaultCenter,
2126
+ "defaultRadius": this.defaultRadius,
2127
+ "unit": this.unit,
2128
+ "pages": this.pages,
2129
+ "center": this.center,
2130
+ "loader": this.loader,
2131
+ "calculateMarkers": this.calculateMarkers
2337
2132
  }, {
2338
- scopedSlots: this.$scopedSlots,
2339
- on: this.$listeners
2340
- }]));
2133
+ on: this.$attrs
2134
+ }), null);
2341
2135
  }
2342
2136
  };
2343
-
2344
2137
  ReactiveGoogleMap.install = function (Vue, options) {
2345
2138
  Vue.component(ReactiveGoogleMap.name, ReactiveGoogleMap);
2346
-
2347
2139
  if (!options || !options.key) {
2348
2140
  console.error('ReactiveSearch: map key is required to use ReactiveGoogleMap component');
2349
2141
  }
2350
-
2351
- Vue.use(GmapVue__default, {
2142
+ Vue.use(VueGoogleMaps__default, {
2352
2143
  load: {
2353
2144
  key: options.key,
2354
2145
  libraries: 'places'
2355
2146
  },
2356
2147
  installComponents: false
2357
2148
  });
2358
- }; // Add componentType for SSR
2359
-
2149
+ };
2360
2150
 
2151
+ // Add componentType for SSR
2361
2152
  ReactiveGoogleMap.componentType = constants.componentTypes.reactiveMap;
2362
2153
 
2363
2154
  exports.default = ReactiveGoogleMap;