@appbaseio/reactivesearch-vue 1.30.0 → 1.32.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 (89) hide show
  1. package/dist/@appbaseio/reactivesearch-vue.umd.js +10358 -553
  2. package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
  3. package/dist/@appbaseio/reactivesearch-vue.umd.min.js +21 -5
  4. package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
  5. package/dist/cjs/{Button-0e2e2c02.js → Button-0673191e.js} +6 -6
  6. package/dist/cjs/{CancelSvg-c48c1085.js → CancelSvg-9f258f4f.js} +1 -1
  7. package/dist/cjs/{Card-4fa0f769.js → Card-642547a8.js} +2 -2
  8. package/dist/cjs/{ComponentWrapper-5cb08414.js → ComponentWrapper-ad3dad02.js} +2 -2
  9. package/dist/cjs/{Container-cfd69a34.js → Container-daf30918.js} +1 -1
  10. package/dist/cjs/{DataSearch-e550096e.js → DataSearch-d389fbe7.js} +128 -112
  11. package/dist/cjs/DataSearch.js +10 -10
  12. package/dist/cjs/{DropDown-fc59f1ee.js → DropDown-c479bbb0.js} +5 -5
  13. package/dist/cjs/DynamicRangeSlider.js +8 -7
  14. package/dist/cjs/{Flex-63774e4d.js → Flex-aa517a13.js} +1 -1
  15. package/dist/cjs/{FormControlList-a9c64bb8.js → FormControlList-c195a592.js} +1 -1
  16. package/dist/cjs/{Input-43868594.js → Input-e6603a7e.js} +1 -1
  17. package/dist/cjs/{ListItem-38962297.js → ListItem-8c9e0d68.js} +2 -2
  18. package/dist/cjs/MultiDropdownList.js +13 -12
  19. package/dist/cjs/MultiList.js +11 -10
  20. package/dist/cjs/MultiRange.js +9 -8
  21. package/dist/cjs/Pagination-3d73e1b3.js +182 -0
  22. package/dist/cjs/RangeInput.js +11 -10
  23. package/dist/cjs/RangeSlider.js +9 -8
  24. package/dist/cjs/ReactiveBase.js +34 -26
  25. package/dist/cjs/ReactiveComponent.js +6 -5
  26. package/dist/cjs/ReactiveGoogleMap.js +2363 -0
  27. package/dist/cjs/ReactiveList.js +21 -187
  28. package/dist/cjs/ResultCard.js +4 -4
  29. package/dist/cjs/ResultList.js +4 -4
  30. package/dist/cjs/SelectedFilters.js +9 -9
  31. package/dist/cjs/SingleDropdownList.js +13 -12
  32. package/dist/cjs/SingleList.js +11 -10
  33. package/dist/cjs/SingleRange.js +9 -8
  34. package/dist/cjs/StateProvider.js +65 -22
  35. package/dist/cjs/{Title-26661936.js → Title-1de7d0f4.js} +1 -1
  36. package/dist/cjs/ToggleButton.js +9 -8
  37. package/dist/cjs/{_rollupPluginBabelHelpers-91d4b5a6.js → _rollupPluginBabelHelpers-c705cbe6.js} +16 -0
  38. package/dist/cjs/{index-2cd3650b.js → index-6a167fe0.js} +13 -1
  39. package/dist/cjs/index.js +23 -18
  40. package/dist/cjs/initReactivesearch.js +46 -10
  41. package/dist/cjs/{install-250a14f1.js → install-3b864d8f.js} +18 -16
  42. package/dist/cjs/install.js +19 -18
  43. package/dist/cjs/{ssr-949cafb5.js → ssr-3027b848.js} +1 -1
  44. package/dist/cjs/{utils-0df3cb93.js → utils-d6a52588.js} +1 -1
  45. package/dist/cjs/version.js +1 -1
  46. package/dist/cjs/{vueTypes-57d01f18.js → vueTypes-727b7c63.js} +30 -13
  47. package/dist/es/{Button-e18ad90f.js → Button-35aa984e.js} +6 -6
  48. package/dist/es/{CancelSvg-e3b33cdd.js → CancelSvg-4cfae5fd.js} +1 -1
  49. package/dist/es/{Card-ad6ba09f.js → Card-450683f1.js} +2 -2
  50. package/dist/es/{ComponentWrapper-dc92772a.js → ComponentWrapper-424e86fd.js} +2 -2
  51. package/dist/es/{Container-421450dc.js → Container-ba826e96.js} +1 -1
  52. package/dist/es/{DataSearch-8e5d0972.js → DataSearch-b88ef6ee.js} +128 -112
  53. package/dist/es/DataSearch.js +10 -10
  54. package/dist/es/{DropDown-565fad6f.js → DropDown-05a644a5.js} +5 -5
  55. package/dist/es/DynamicRangeSlider.js +8 -7
  56. package/dist/es/{Flex-09d40927.js → Flex-1f0795c3.js} +1 -1
  57. package/dist/es/{FormControlList-38ffe3d3.js → FormControlList-c22d64f6.js} +1 -1
  58. package/dist/es/{Input-c9d757bc.js → Input-7a2a9fac.js} +1 -1
  59. package/dist/es/{ListItem-41d6ddd7.js → ListItem-cad14c5e.js} +2 -2
  60. package/dist/es/MultiDropdownList.js +13 -12
  61. package/dist/es/MultiList.js +11 -10
  62. package/dist/es/MultiRange.js +9 -8
  63. package/dist/es/Pagination-af9de08f.js +177 -0
  64. package/dist/es/RangeInput.js +11 -10
  65. package/dist/es/RangeSlider.js +9 -8
  66. package/dist/es/ReactiveBase.js +35 -27
  67. package/dist/es/ReactiveComponent.js +6 -5
  68. package/dist/es/ReactiveGoogleMap.js +2354 -0
  69. package/dist/es/ReactiveList.js +20 -186
  70. package/dist/es/ResultCard.js +4 -4
  71. package/dist/es/ResultList.js +4 -4
  72. package/dist/es/SelectedFilters.js +7 -7
  73. package/dist/es/SingleDropdownList.js +13 -12
  74. package/dist/es/SingleList.js +11 -10
  75. package/dist/es/SingleRange.js +9 -8
  76. package/dist/es/StateProvider.js +65 -22
  77. package/dist/es/{Title-35edd732.js → Title-3342664a.js} +1 -1
  78. package/dist/es/ToggleButton.js +9 -8
  79. package/dist/es/{_rollupPluginBabelHelpers-51ce1182.js → _rollupPluginBabelHelpers-76660dab.js} +16 -1
  80. package/dist/es/{index-5371a13f.js → index-7788a843.js} +13 -2
  81. package/dist/es/index.js +23 -19
  82. package/dist/es/initReactivesearch.js +47 -11
  83. package/dist/es/{install-9faa87f1.js → install-a1fd08ae.js} +16 -14
  84. package/dist/es/install.js +19 -18
  85. package/dist/es/{ssr-ad57b0ad.js → ssr-b2c0b401.js} +1 -1
  86. package/dist/es/{utils-9b45e0ab.js → utils-9e68acee.js} +1 -1
  87. package/dist/es/version.js +1 -1
  88. package/dist/es/{vueTypes-687b2304.js → vueTypes-b8146772.js} +30 -13
  89. package/package.json +10 -4
@@ -15,6 +15,21 @@ function _extends() {
15
15
  return _extends.apply(this, arguments);
16
16
  }
17
17
 
18
+ function _inheritsLoose(subClass, superClass) {
19
+ subClass.prototype = Object.create(superClass.prototype);
20
+ subClass.prototype.constructor = subClass;
21
+
22
+ _setPrototypeOf(subClass, superClass);
23
+ }
24
+
25
+ function _setPrototypeOf(o, p) {
26
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
27
+ o.__proto__ = p;
28
+ return o;
29
+ };
30
+ return _setPrototypeOf(o, p);
31
+ }
32
+
18
33
  function _objectWithoutPropertiesLoose(source, excluded) {
19
34
  if (source == null) return {};
20
35
  var target = {};
@@ -58,4 +73,4 @@ function _toPropertyKey(arg) {
58
73
  return typeof key === "symbol" ? key : String(key);
59
74
  }
60
75
 
61
- export { _taggedTemplateLiteralLoose as _, _extends as a, _objectWithoutPropertiesLoose as b, _toPropertyKey as c };
76
+ export { _taggedTemplateLiteralLoose as _, _extends as a, _objectWithoutPropertiesLoose as b, _toPropertyKey as c, _inheritsLoose as d };
@@ -1,5 +1,5 @@
1
1
  import { helper } from '@appbaseio/reactivecore';
2
- import { a as _extends } from './_rollupPluginBabelHelpers-51ce1182.js';
2
+ import { a as _extends } from './_rollupPluginBabelHelpers-76660dab.js';
3
3
  import { validProps } from '@appbaseio/reactivecore/lib/utils/constants';
4
4
  import { bindActionCreators } from 'redux';
5
5
 
@@ -364,5 +364,16 @@ function extractModifierKeysFromFocusShortcuts(focusShortcutsArray) {
364
364
  return MODIFIER_KEYS.includes(shortcutKey);
365
365
  });
366
366
  }
367
+ function decodeHtml(str) {
368
+ if (typeof str !== 'string') {
369
+ return str;
370
+ }
371
+
372
+ return str.replace(/&#([0-9]{1,3});/gi, function (match, numStr) {
373
+ var num = parseInt(numStr, 10); // read num as normal number
374
+
375
+ return String.fromCharCode(num);
376
+ });
377
+ }
367
378
 
368
- export { X_SEARCH_CLIENT as X, isFunction as a, getCamelCase as b, connect as c, getValidPropsKeys as d, composeThemeObject as e, updateCustomQuery as f, getComponent as g, hasCustomRenderer as h, isQueryIdentical as i, getQuerySuggestionsComponent as j, isEmpty as k, extractModifierKeysFromFocusShortcuts as l, hasQuerySuggestionsRenderer as m, isEvent as n, parseValueArray as o, parseFocusShortcuts as p, updateDefaultQuery as u };
379
+ export { X_SEARCH_CLIENT as X, isFunction as a, getCamelCase as b, connect as c, getValidPropsKeys as d, composeThemeObject as e, updateCustomQuery as f, getComponent as g, hasCustomRenderer as h, isQueryIdentical as i, getQuerySuggestionsComponent as j, isEmpty as k, extractModifierKeysFromFocusShortcuts as l, hasQuerySuggestionsRenderer as m, decodeHtml as n, isEvent as o, parseFocusShortcuts as p, parseValueArray as q, updateDefaultQuery as u };
package/dist/es/index.js CHANGED
@@ -1,42 +1,43 @@
1
1
  import '@appbaseio/reactivecore';
2
- import './_rollupPluginBabelHelpers-51ce1182.js';
2
+ import './_rollupPluginBabelHelpers-76660dab.js';
3
3
  import 'vue-types';
4
4
  import '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import '@appbaseio/reactivecore/lib/utils/helper';
6
6
  import 'emotion';
7
7
  import '@appbaseio/vue-emotion';
8
8
  import 'polished';
9
- import './Button-e18ad90f.js';
10
- import './vueTypes-687b2304.js';
9
+ import './Button-35aa984e.js';
10
+ import './vueTypes-b8146772.js';
11
+ import './Pagination-af9de08f.js';
11
12
  export { default as ReactiveList } from './ReactiveList.js';
12
13
  import '@appbaseio/reactivecore/lib/utils/transform';
13
14
  import 'redux';
14
- import './index-5371a13f.js';
15
- import './ComponentWrapper-dc92772a.js';
15
+ import './index-7788a843.js';
16
+ import './ComponentWrapper-424e86fd.js';
16
17
  import '@vue/babel-helper-vue-jsx-merge-props';
17
- import './Title-35edd732.js';
18
- import './ListItem-41d6ddd7.js';
19
- import './Card-ad6ba09f.js';
20
- import './Flex-09d40927.js';
18
+ import './Title-3342664a.js';
19
+ import './ListItem-cad14c5e.js';
20
+ import './Card-450683f1.js';
21
+ import './Flex-1f0795c3.js';
21
22
  import '@appbaseio/reactivecore/lib/actions/analytics';
22
23
  import 'appbase-js';
23
24
  import 'url-search-params-polyfill';
24
25
  export { default as ReactiveBase } from './ReactiveBase.js';
25
26
  import 'hotkeys-js';
26
- export { D as DataSearch } from './DataSearch-8e5d0972.js';
27
- import './CancelSvg-e3b33cdd.js';
28
- import './Input-c9d757bc.js';
27
+ export { D as DataSearch } from './DataSearch-b88ef6ee.js';
28
+ import './CancelSvg-4cfae5fd.js';
29
+ import './Input-7a2a9fac.js';
29
30
  import 'compute-scroll-into-view';
30
- import './Container-421450dc.js';
31
+ import './Container-ba826e96.js';
31
32
  import 'vue-highlight-words';
32
- import { i as install } from './install-9faa87f1.js';
33
- export { S as SearchBox, i as install } from './install-9faa87f1.js';
33
+ import { i as install } from './install-a1fd08ae.js';
34
+ export { S as SearchBox, i as install } from './install-a1fd08ae.js';
34
35
  import '@appbaseio/reactivecore/lib/utils/suggestions';
35
- import './FormControlList-38ffe3d3.js';
36
- import './utils-9b45e0ab.js';
36
+ import './FormControlList-c22d64f6.js';
37
+ import './utils-9e68acee.js';
37
38
  export { default as SingleList } from './SingleList.js';
38
39
  export { default as MultiList } from './MultiList.js';
39
- import './DropDown-565fad6f.js';
40
+ import './DropDown-05a644a5.js';
40
41
  export { default as SingleDropdownList } from './SingleDropdownList.js';
41
42
  export { default as MultiDropdownList } from './MultiDropdownList.js';
42
43
  export { default as ToggleButton } from './ToggleButton.js';
@@ -47,11 +48,14 @@ export { default as MultiRange } from './MultiRange.js';
47
48
  export { default as ResultCard } from './ResultCard.js';
48
49
  export { default as ResultList } from './ResultList.js';
49
50
  import 'vue-no-ssr';
50
- import './ssr-ad57b0ad.js';
51
+ import './ssr-b2c0b401.js';
51
52
  export { default as RangeSlider } from './RangeSlider.js';
52
53
  export { default as DynamicRangeSlider } from './DynamicRangeSlider.js';
53
54
  import '@appbaseio/reactivecore/lib/actions/value';
54
55
  export { default as StateProvider } from './StateProvider.js';
56
+ import 'gmap-vue';
57
+ import 'ngeohash';
58
+ export { default as ReactiveGoogleMap } from './ReactiveGoogleMap.js';
55
59
  import '@appbaseio/reactivecore/lib/reducers/valueReducer';
56
60
  import '@appbaseio/reactivecore/lib/reducers/queryReducer';
57
61
  import '@appbaseio/reactivecore/lib/reducers/queryOptionsReducer';
@@ -1,6 +1,6 @@
1
- import { a as _extends, b as _objectWithoutPropertiesLoose } from './_rollupPluginBabelHelpers-51ce1182.js';
1
+ import { a as _extends, b as _objectWithoutPropertiesLoose } from './_rollupPluginBabelHelpers-76660dab.js';
2
2
  import { validProps, componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
3
- import { pushToAndClause, buildQuery, extractQueryFromCustomQuery, getOptionsForCustomQuery } from '@appbaseio/reactivecore/lib/utils/helper';
3
+ import { transformRequestUsingEndpoint, pushToAndClause, buildQuery, extractQueryFromCustomQuery, getOptionsForCustomQuery } from '@appbaseio/reactivecore/lib/utils/helper';
4
4
  import { isSearchComponent, getRSQuery, extractPropsFromState, getDependentQueries } from '@appbaseio/reactivecore/lib/utils/transform';
5
5
  import Appbase from 'appbase-js';
6
6
  import valueReducer from '@appbaseio/reactivecore/lib/reducers/valueReducer';
@@ -15,11 +15,14 @@ import { isPropertyDefined } from '@appbaseio/reactivecore/lib/actions/utils';
15
15
  var _excluded = ["aggs", "size"],
16
16
  _excluded2 = ["query"],
17
17
  _excluded3 = ["query"];
18
+
19
+ var _componentTypeToDefau;
18
20
  var X_SEARCH_CLIENT = 'ReactiveSearch Vue';
19
21
  var componentsWithoutFilters = [componentTypes.numberBox, componentTypes.ratingsFilter];
20
22
  var resultComponents = [componentTypes.reactiveList, componentTypes.reactiveMap];
23
+ var componentTypeToDefaultValue = (_componentTypeToDefau = {}, _componentTypeToDefau[componentTypes.singleList] = '', _componentTypeToDefau[componentTypes.multiList] = [], _componentTypeToDefau[componentTypes.singleDataList] = '', _componentTypeToDefau[componentTypes.singleDropdownList] = '', _componentTypeToDefau[componentTypes.multiDataList] = [], _componentTypeToDefau[componentTypes.multiDropdownList] = [], _componentTypeToDefau[componentTypes.tagCloud] = '', _componentTypeToDefau[componentTypes.toggleButton] = '', _componentTypeToDefau[componentTypes.singleDropdownRange] = '', _componentTypeToDefau[componentTypes.multiDropdownRange] = [], _componentTypeToDefau[componentTypes.singleRange] = '', _componentTypeToDefau[componentTypes.multiRange] = [], _componentTypeToDefau);
21
24
 
22
- function getValue(state, id, defaultValue) {
25
+ function getValue(state, id, defaultValue, componentType) {
23
26
  if (state && state[id]) {
24
27
  try {
25
28
  // parsing for next.js - since it uses extra set of quotes to wrap params
@@ -38,7 +41,7 @@ function getValue(state, id, defaultValue) {
38
41
  }
39
42
 
40
43
  return {
41
- value: defaultValue,
44
+ value: defaultValue || componentTypeToDefaultValue[componentType] || null,
42
45
  reference: 'DEFAULT'
43
46
  };
44
47
  }
@@ -94,20 +97,51 @@ function initReactivesearch(componentCollection, searchState, settings) {
94
97
  'X-Search-Client': X_SEARCH_CLIENT
95
98
  }, enableTelemetry === false && {
96
99
  'X-Enable-Telemetry': false
97
- }), settings.headers);
100
+ }), settings.headers, settings.enableAppbase && settings.endpoint && settings.endpoint.headers ? settings.endpoint.headers : {});
101
+
102
+ var url = settings.url && settings.url.trim() !== '' ? settings.url : 'https://scalr.api.appbase.io';
103
+ var transformRequest = settings.transformRequest || null;
104
+
105
+ if (settings.enableAppbase && settings.endpoint) {
106
+ if (settings.endpoint.url) {
107
+ // eslint-disable-next-line prefer-destructuring
108
+ url = settings.endpoint.url;
109
+ }
110
+
111
+ transformRequest = function transformRequest(request) {
112
+ var modifiedRequest = transformRequestUsingEndpoint(request, settings.endpoint);
113
+
114
+ if (settings.transformRequest) {
115
+ return settings.transformRequest(modifiedRequest);
116
+ }
117
+
118
+ return modifiedRequest;
119
+ };
120
+ }
98
121
 
99
122
  var config = {
100
- url: settings.url && settings.url.trim() !== '' ? settings.url : 'https://scalr.api.appbase.io',
123
+ url: url,
101
124
  app: settings.app,
102
125
  credentials: credentials,
103
- transformRequest: settings.transformRequest || null,
126
+ transformRequest: transformRequest,
104
127
  type: settings.type ? settings.type : '*',
105
128
  transformResponse: settings.transformResponse || null,
106
129
  graphQLUrl: settings.graphQLUrl || '',
107
130
  headers: headers,
108
- analyticsConfig: settings.appbaseConfig || null
131
+ analyticsConfig: settings.appbaseConfig || null,
132
+ enableAppbase: settings.enableAppbase,
133
+ endpoint: settings.endpoint
109
134
  };
110
135
  var appbaseRef = Appbase(config);
136
+
137
+ if (config.transformRequest) {
138
+ appbaseRef.transformRequest = config.transformRequest;
139
+ }
140
+
141
+ if (config.transformResponse) {
142
+ appbaseRef.transformResponse = config.transformResponse;
143
+ }
144
+
111
145
  var components = [];
112
146
  var selectedValues = {};
113
147
  var internalValues = {};
@@ -146,7 +180,7 @@ function initReactivesearch(componentCollection, searchState, settings) {
146
180
  var internalComponent = component.componentId + "__internal";
147
181
  var label = component.filterLabel || component.componentId;
148
182
 
149
- var _getValue = getValue(searchState, component.componentId, component.value || component.defaultValue),
183
+ var _getValue = getValue(searchState, component.componentId, component.value || component.defaultValue, componentType),
150
184
  value = _getValue.value,
151
185
  reference = _getValue.reference; // [1] set selected values
152
186
 
@@ -436,9 +470,10 @@ function initReactivesearch(componentCollection, searchState, settings) {
436
470
  }
437
471
 
438
472
  timestamp[component] = res._timestamp;
473
+ var hitsObj = response.hits ? response.hits : response[component].hits;
439
474
  hits = _extends({}, hits, (_extends7 = {}, _extends7[component] = {
440
- hits: response.hits.hits,
441
- total: typeof response.hits.total === 'object' ? response.hits.total.value : response.hits.total,
475
+ hits: hitsObj.hits,
476
+ total: typeof hitsObj.total === 'object' ? hitsObj.total.value : hitsObj.total,
442
477
  time: response.took
443
478
  }, _extends7));
444
479
  responseResolve();
@@ -515,3 +550,4 @@ function initReactivesearch(componentCollection, searchState, settings) {
515
550
  }
516
551
 
517
552
  export default initReactivesearch;
553
+ export { componentTypeToDefaultValue };
@@ -1,21 +1,21 @@
1
1
  import { Actions, helper, causes } from '@appbaseio/reactivecore';
2
- import { _ as _taggedTemplateLiteralLoose, a as _extends } from './_rollupPluginBabelHelpers-51ce1182.js';
2
+ import { _ as _taggedTemplateLiteralLoose, a as _extends } from './_rollupPluginBabelHelpers-76660dab.js';
3
3
  import VueTypes from 'vue-types';
4
4
  import { SEARCH_COMPONENTS_MODES, componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import { getQueryOptions, suggestionTypes } from '@appbaseio/reactivecore/lib/utils/helper';
6
6
  import styled from '@appbaseio/vue-emotion';
7
- import { B as Button } from './Button-e18ad90f.js';
8
- import { t as types } from './vueTypes-687b2304.js';
7
+ import { B as Button } from './Button-35aa984e.js';
8
+ import { t as types } from './vueTypes-b8146772.js';
9
9
  import ReactiveList from './ReactiveList.js';
10
- import { h as hasCustomRenderer, i as isQueryIdentical, g as getComponent, u as updateDefaultQuery, f as updateCustomQuery, a as isFunction, k as isEmpty, p as parseFocusShortcuts, l as extractModifierKeysFromFocusShortcuts, c as connect } from './index-5371a13f.js';
11
- import { C as ComponentWrapper } from './ComponentWrapper-dc92772a.js';
12
- import { T as Title } from './Title-35edd732.js';
10
+ import { n as decodeHtml, h as hasCustomRenderer, i as isQueryIdentical, g as getComponent, u as updateDefaultQuery, f as updateCustomQuery, a as isFunction, k as isEmpty, p as parseFocusShortcuts, l as extractModifierKeysFromFocusShortcuts, c as connect } from './index-7788a843.js';
11
+ import { C as ComponentWrapper } from './ComponentWrapper-424e86fd.js';
12
+ import { T as Title } from './Title-3342664a.js';
13
13
  import ReactiveBase from './ReactiveBase.js';
14
14
  import hotkeys from 'hotkeys-js';
15
- import { S as SearchSvg, a as SuggestionWrapper, I as InputAddon, M as Mic, T as TagItem, b as TagsContainer, c as InputGroup, C as CustomSvg, d as SuggestionItem, D as DataSearch } from './DataSearch-8e5d0972.js';
16
- import { C as CancelSvg, a as IconGroup, I as IconWrapper, D as Downshift, b as InputWrapper } from './CancelSvg-e3b33cdd.js';
17
- import { s as suggestionsContainer, I as Input, a as suggestions } from './Input-c9d757bc.js';
18
- import { C as Container } from './Container-421450dc.js';
15
+ import { S as SearchSvg, a as SuggestionWrapper, I as InputAddon, M as Mic, T as TagItem, b as TagsContainer, c as InputGroup, C as CustomSvg, d as SuggestionItem, D as DataSearch } from './DataSearch-b88ef6ee.js';
16
+ import { C as CancelSvg, a as IconGroup, I as IconWrapper, D as Downshift, b as InputWrapper } from './CancelSvg-4cfae5fd.js';
17
+ import { s as suggestionsContainer, I as Input, a as suggestions } from './Input-7a2a9fac.js';
18
+ import { C as Container } from './Container-ba826e96.js';
19
19
  import SingleList from './SingleList.js';
20
20
  import MultiList from './MultiList.js';
21
21
  import SingleDropdownList from './SingleDropdownList.js';
@@ -118,7 +118,7 @@ var SearchBox = {
118
118
  console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
119
119
  }
120
120
 
121
- this.currentValue = this.selectedValue || this.value || this.defaultValue || '';
121
+ this.currentValue = decodeHtml(this.selectedValue || this.value || this.defaultValue || '');
122
122
 
123
123
  if (this.$options.isTagsMode) {
124
124
  this.currentValue = '';
@@ -215,7 +215,9 @@ var SearchBox = {
215
215
  enterButton: VueTypes.bool.def(false),
216
216
  renderEnterButton: VueTypes.any,
217
217
  mode: VueTypes.oneOf(['select', 'tag']).def('select'),
218
- renderSelectedTags: VueTypes.any
218
+ renderSelectedTags: VueTypes.any,
219
+ searchboxId: VueTypes.string,
220
+ endpoint: types.endpointConfig
219
221
  },
220
222
  beforeMount: function beforeMount() {
221
223
  if (this.selectedValue) {
@@ -459,7 +461,7 @@ var SearchBox = {
459
461
 
460
462
  _this.currentValue = '';
461
463
  } else {
462
- _this.currentValue = value;
464
+ _this.currentValue = decodeHtml(value);
463
465
  }
464
466
 
465
467
  var queryHandlerValue = value;
@@ -965,7 +967,7 @@ var SearchBox = {
965
967
  onAutofillClick: function onAutofillClick(suggestion) {
966
968
  var value = suggestion.value;
967
969
  this.isOpen = true;
968
- this.currentValue = value;
970
+ this.currentValue = decodeHtml(value);
969
971
  this.triggerDefaultQuery(value);
970
972
  },
971
973
  renderAutoFill: function renderAutoFill(suggestion) {
@@ -1,41 +1,42 @@
1
1
  import '@appbaseio/reactivecore';
2
- import './_rollupPluginBabelHelpers-51ce1182.js';
2
+ import './_rollupPluginBabelHelpers-76660dab.js';
3
3
  import 'vue-types';
4
4
  import '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import '@appbaseio/reactivecore/lib/utils/helper';
6
6
  import 'emotion';
7
7
  import '@appbaseio/vue-emotion';
8
8
  import 'polished';
9
- import './Button-e18ad90f.js';
10
- import './vueTypes-687b2304.js';
9
+ import './Button-35aa984e.js';
10
+ import './vueTypes-b8146772.js';
11
+ import './Pagination-af9de08f.js';
11
12
  import './ReactiveList.js';
12
13
  import '@appbaseio/reactivecore/lib/utils/transform';
13
14
  import 'redux';
14
- import './index-5371a13f.js';
15
- import './ComponentWrapper-dc92772a.js';
15
+ import './index-7788a843.js';
16
+ import './ComponentWrapper-424e86fd.js';
16
17
  import '@vue/babel-helper-vue-jsx-merge-props';
17
- import './Title-35edd732.js';
18
- import './ListItem-41d6ddd7.js';
19
- import './Card-ad6ba09f.js';
20
- import './Flex-09d40927.js';
18
+ import './Title-3342664a.js';
19
+ import './ListItem-cad14c5e.js';
20
+ import './Card-450683f1.js';
21
+ import './Flex-1f0795c3.js';
21
22
  import '@appbaseio/reactivecore/lib/actions/analytics';
22
23
  import 'appbase-js';
23
24
  import 'url-search-params-polyfill';
24
25
  import './ReactiveBase.js';
25
26
  import 'hotkeys-js';
26
- import './DataSearch-8e5d0972.js';
27
- import './CancelSvg-e3b33cdd.js';
28
- import './Input-c9d757bc.js';
27
+ import './DataSearch-b88ef6ee.js';
28
+ import './CancelSvg-4cfae5fd.js';
29
+ import './Input-7a2a9fac.js';
29
30
  import 'compute-scroll-into-view';
30
- import './Container-421450dc.js';
31
+ import './Container-ba826e96.js';
31
32
  import 'vue-highlight-words';
32
- export { i as default } from './install-9faa87f1.js';
33
+ export { i as default } from './install-a1fd08ae.js';
33
34
  import '@appbaseio/reactivecore/lib/utils/suggestions';
34
- import './FormControlList-38ffe3d3.js';
35
- import './utils-9b45e0ab.js';
35
+ import './FormControlList-c22d64f6.js';
36
+ import './utils-9e68acee.js';
36
37
  import './SingleList.js';
37
38
  import './MultiList.js';
38
- import './DropDown-565fad6f.js';
39
+ import './DropDown-05a644a5.js';
39
40
  import './SingleDropdownList.js';
40
41
  import './MultiDropdownList.js';
41
42
  import './ToggleButton.js';
@@ -46,7 +47,7 @@ import './MultiRange.js';
46
47
  import './ResultCard.js';
47
48
  import './ResultList.js';
48
49
  import 'vue-no-ssr';
49
- import './ssr-ad57b0ad.js';
50
+ import './ssr-b2c0b401.js';
50
51
  import './RangeSlider.js';
51
52
  import './DynamicRangeSlider.js';
52
53
  import '@appbaseio/reactivecore/lib/actions/value';
@@ -1,4 +1,4 @@
1
- import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-51ce1182.js';
1
+ import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-76660dab.js';
2
2
  import styled from '@appbaseio/vue-emotion';
3
3
  import NoSSR from 'vue-no-ssr';
4
4
 
@@ -1,5 +1,5 @@
1
1
  import { helper } from '@appbaseio/reactivecore';
2
- import { a as _extends } from './_rollupPluginBabelHelpers-51ce1182.js';
2
+ import { a as _extends } from './_rollupPluginBabelHelpers-76660dab.js';
3
3
 
4
4
  var getAggsOrder = helper.getAggsOrder;
5
5
 
@@ -1,3 +1,3 @@
1
- var version = "1.30.0";
1
+ var version = "1.32.0";
2
2
 
3
3
  export default version;
@@ -3,21 +3,35 @@ import VueTypes from 'vue-types';
3
3
  VueTypes.sensibleDefaults = false;
4
4
  var reactKeyType = VueTypes.oneOfType([VueTypes.string, VueTypes.arrayOf(VueTypes.string), VueTypes.object, VueTypes.arrayOf(VueTypes.object)]);
5
5
 
6
- function validateLocation(props, propName) {
7
- // eslint-disable-next-line
8
- if (isNaN(props[propName])) {
9
- return new Error(propName + " value must be a VueTypes.number");
6
+ function validateLocation(value) {
7
+ if (!value || !value.lat || !value.lng) {
8
+ console.error(new Error('location must be an object with lat and lng keys defined'));
9
+ return false;
10
+ } // eslint-disable-next-line
11
+
12
+
13
+ if (isNaN(value.lat)) {
14
+ console.error(new Error('lat value must be a number'));
15
+ return false;
16
+ } // eslint-disable-next-line
17
+
18
+
19
+ if (isNaN(value.lat)) {
20
+ console.error(new Error('lng value must be a number'));
21
+ return false;
10
22
  }
11
23
 
12
- if (propName === 'lat' && (props[propName] < -90 || props[propName] > 90)) {
13
- return new Error(propName + " value should be between -90 and 90.");
24
+ if (value.lat < -90 || value.lat > 90) {
25
+ console.error(new Error('lat value should be between -90 and 90.'));
26
+ return false;
14
27
  }
15
28
 
16
- if (propName === 'lng' && (props[propName] < -180 || props[propName] > 180)) {
17
- return new Error(propName + " value should be between -180 and 180.");
29
+ if (value.lat < -180 || value.lat > 180) {
30
+ console.error(new Error('lng value should be between -180 and 180.'));
31
+ return false;
18
32
  }
19
33
 
20
- return null;
34
+ return true;
21
35
  }
22
36
 
23
37
  var types = {
@@ -88,10 +102,7 @@ var types = {
88
102
  rangeLabelsAlign: VueTypes.oneOf(['left', 'right']),
89
103
  title: VueTypes.oneOfType([VueTypes.string, VueTypes.any]),
90
104
  tooltipTrigger: VueTypes.oneOf(['always', 'none', 'hover']),
91
- location: VueTypes.shape({
92
- lat: validateLocation,
93
- lng: validateLocation
94
- }),
105
+ location: VueTypes.custom(validateLocation),
95
106
  unit: VueTypes.oneOf(['mi', 'miles', 'yd', 'yards', 'ft', 'feet', 'in', 'inch', 'km', 'kilometers', 'm', 'meters', 'cm', 'centimeters', 'mm', 'millimeters', 'NM', 'nmi', 'nauticalmiles']),
96
107
  value: VueTypes.string.def(undefined),
97
108
  analyticsConfig: VueTypes.shape({
@@ -114,6 +125,12 @@ var types = {
114
125
  mongodb: VueTypes.shape({
115
126
  db: VueTypes.string,
116
127
  collection: VueTypes.string
128
+ }),
129
+ endpointConfig: VueTypes.shape({
130
+ url: VueTypes.string.isRequired,
131
+ method: VueTypes.string,
132
+ headers: VueTypes.object,
133
+ body: VueTypes.object
117
134
  })
118
135
  };
119
136
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appbaseio/reactivesearch-vue",
3
- "version": "1.30.0",
3
+ "version": "1.32.0",
4
4
  "private": false,
5
5
  "main": "dist/cjs/index.js",
6
6
  "jsnext:main": "dist/es/index.js",
@@ -34,20 +34,22 @@
34
34
  ],
35
35
  "sideEffects": false,
36
36
  "dependencies": {
37
- "@appbaseio/reactivecore": "9.14.17",
37
+ "@appbaseio/reactivecore": "9.14.25",
38
38
  "@appbaseio/vue-emotion": "0.4.4",
39
39
  "@vue/babel-helper-vue-jsx-merge-props": "^1.0.0",
40
- "appbase-js": "^5.0.0",
40
+ "appbase-js": "^5.1.0",
41
41
  "compute-scroll-into-view": "^1.0.11",
42
42
  "emotion": "9.2.12",
43
+ "gmap-vue": "^3.5.4",
43
44
  "hotkeys-js": "^3.8.7",
45
+ "ngeohash": "^0.6.3",
44
46
  "polished": "^2.2.0",
45
47
  "redux": "^4.0.0",
46
48
  "url-search-params-polyfill": "^7.0.0",
47
49
  "vue-highlight-words": "^1.2.0",
48
50
  "vue-no-ssr": "^1.1.0",
49
51
  "vue-slider-component": "^3.2.15",
50
- "vue-types": "^1.3.3"
52
+ "vue-types": "^1.7.0"
51
53
  },
52
54
  "peerDependencies": {
53
55
  "vue": "^2.6.10"
@@ -62,12 +64,14 @@
62
64
  "@babel/preset-env": "^7.5.5",
63
65
  "@babel/preset-stage-2": "^7.0.0",
64
66
  "@vue/babel-preset-jsx": "^1.1.0",
67
+ "@vue/compiler-sfc": "^3.0.11",
65
68
  "eslint": "^4.12.0",
66
69
  "eslint-config-airbnb-base": "^13.1.0",
67
70
  "eslint-config-prettier": "^3.1.0",
68
71
  "eslint-plugin-vue": "^4.7.1",
69
72
  "nps": "^5.9.3",
70
73
  "nps-utils": "^1.7.0",
74
+ "postcss": "^8.3.0",
71
75
  "rollup": "^1.20.3",
72
76
  "rollup-plugin-babel": "^4.3.3",
73
77
  "rollup-plugin-commonjs": "^10.1.0",
@@ -75,8 +79,10 @@
75
79
  "rollup-plugin-node-builtins": "^2.1.2",
76
80
  "rollup-plugin-node-globals": "^1.4.0",
77
81
  "rollup-plugin-node-resolve": "^5.2.0",
82
+ "rollup-plugin-postcss": "^4.0.0",
78
83
  "rollup-plugin-replace": "^2.2.0",
79
84
  "rollup-plugin-terser": "^5.1.1",
85
+ "rollup-plugin-vue": "^6.0.0",
80
86
  "vue-eslint-parser": "^3.2.2"
81
87
  }
82
88
  }