@appbaseio/reactivesearch-vue 1.16.0-alpha.5 → 1.16.0-alpha.50

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 (105) hide show
  1. package/dist/@appbaseio/reactivesearch-vue.umd.js +11245 -9254
  2. package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
  3. package/dist/@appbaseio/reactivesearch-vue.umd.min.js +5 -5
  4. package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
  5. package/dist/cjs/Button-10e5cf51.js +68 -0
  6. package/dist/cjs/{DownShift-b09da079.js → CancelSvg-82021d23.js} +60 -16
  7. package/dist/cjs/Card-4b915733.js +30 -0
  8. package/dist/cjs/{ComponentWrapper-5a0a8849.js → ComponentWrapper-7302fe1a.js} +40 -21
  9. package/dist/cjs/{Container-f84e72fc.js → Container-8a08d663.js} +3 -11
  10. package/dist/cjs/DataSearch-deda2e96.js +2171 -0
  11. package/dist/cjs/DataSearch.js +18 -2151
  12. package/dist/cjs/{DropDown-c66be1a8.js → DropDown-16a2a728.js} +80 -95
  13. package/dist/cjs/DynamicRangeSlider.js +107 -43
  14. package/dist/cjs/Flex-699639d2.js +52 -0
  15. package/dist/cjs/FormControlList-73497794.js +47 -0
  16. package/dist/cjs/Input-64087a69.js +79 -0
  17. package/dist/cjs/ListItem-933c27e4.js +46 -0
  18. package/dist/cjs/MultiDropdownList.js +102 -68
  19. package/dist/cjs/MultiList.js +80 -50
  20. package/dist/cjs/MultiRange.js +21 -16
  21. package/dist/cjs/{Pagination-91df3b77.js → Pagination-e0654529.js} +4 -3
  22. package/dist/cjs/RangeInput.js +29 -45
  23. package/dist/cjs/RangeSlider.js +32 -30
  24. package/dist/cjs/ReactiveBase.js +55 -34
  25. package/dist/cjs/ReactiveComponent.js +75 -62
  26. package/dist/cjs/ReactiveGoogleMap.js +326 -235
  27. package/dist/cjs/ReactiveList.js +188 -241
  28. package/dist/cjs/ResultCard.js +8 -6
  29. package/dist/cjs/ResultList.js +8 -6
  30. package/dist/cjs/SelectedFilters.js +27 -12
  31. package/dist/cjs/SingleDropdownList.js +88 -60
  32. package/dist/cjs/SingleList.js +53 -35
  33. package/dist/cjs/SingleRange.js +18 -13
  34. package/dist/cjs/StateProvider.js +11 -7
  35. package/dist/cjs/{Title-e9beb554.js → Title-39765ee6.js} +3 -11
  36. package/dist/cjs/ToggleButton.js +35 -16
  37. package/dist/cjs/{_rollupPluginBabelHelpers-280a574c.js → _rollupPluginBabelHelpers-4abdbfff.js} +11 -1
  38. package/dist/cjs/{index-e0583d76.js → index-d44a0a21.js} +87 -13
  39. package/dist/cjs/index.js +30 -25
  40. package/dist/cjs/initReactivesearch.js +177 -103
  41. package/dist/cjs/install-d0645b5f.js +1244 -0
  42. package/dist/cjs/install.js +41 -44
  43. package/dist/cjs/ssr-c333c82c.js +39 -0
  44. package/dist/cjs/{utils-d1ea9f95.js → utils-23afb20b.js} +2 -2
  45. package/dist/cjs/version.js +1 -1
  46. package/dist/cjs/{vueTypes-c21f265b.js → vueTypes-6de9d2a9.js} +9 -4
  47. package/dist/es/Button-8b211174.js +59 -0
  48. package/dist/es/{DownShift-d8f2500f.js → CancelSvg-4d9e0857.js} +56 -17
  49. package/dist/es/Card-04b3c33e.js +23 -0
  50. package/dist/es/{ComponentWrapper-d0b21b95.js → ComponentWrapper-bbb717bc.js} +40 -21
  51. package/dist/es/Container-4383c6f0.js +10 -0
  52. package/dist/es/DataSearch-7a8a9368.js +2158 -0
  53. package/dist/es/DataSearch.js +17 -2150
  54. package/dist/es/{DropDown-5dbd69c2.js → DropDown-7639f223.js} +79 -94
  55. package/dist/es/DynamicRangeSlider.js +107 -43
  56. package/dist/es/Flex-aac91505.js +47 -0
  57. package/dist/es/FormControlList-fe389a2e.js +40 -0
  58. package/dist/es/Input-d1bb4868.js +71 -0
  59. package/dist/es/ListItem-bdb6d53d.js +39 -0
  60. package/dist/es/MultiDropdownList.js +102 -68
  61. package/dist/es/MultiList.js +80 -50
  62. package/dist/es/MultiRange.js +21 -16
  63. package/dist/es/{Pagination-800af44f.js → Pagination-3c50d4ba.js} +4 -3
  64. package/dist/es/RangeInput.js +29 -45
  65. package/dist/es/RangeSlider.js +32 -30
  66. package/dist/es/ReactiveBase.js +55 -34
  67. package/dist/es/ReactiveComponent.js +75 -62
  68. package/dist/es/ReactiveGoogleMap.js +326 -235
  69. package/dist/es/ReactiveList.js +188 -241
  70. package/dist/es/ResultCard.js +8 -6
  71. package/dist/es/ResultList.js +8 -6
  72. package/dist/es/SelectedFilters.js +27 -12
  73. package/dist/es/SingleDropdownList.js +88 -60
  74. package/dist/es/SingleList.js +53 -35
  75. package/dist/es/SingleRange.js +18 -13
  76. package/dist/es/StateProvider.js +11 -7
  77. package/dist/es/Title-579f8d6c.js +10 -0
  78. package/dist/es/ToggleButton.js +35 -16
  79. package/dist/es/{_rollupPluginBabelHelpers-c9fbe19f.js → _rollupPluginBabelHelpers-ecf6c03c.js} +11 -1
  80. package/dist/es/{index-1fe91a0a.js → index-5daa8276.js} +84 -14
  81. package/dist/es/index.js +26 -22
  82. package/dist/es/initReactivesearch.js +178 -104
  83. package/dist/es/install-183f5d19.js +1237 -0
  84. package/dist/es/install.js +39 -46
  85. package/dist/es/ssr-e3196de1.js +33 -0
  86. package/dist/es/{utils-ce3d86fd.js → utils-3a32e13f.js} +2 -2
  87. package/dist/es/version.js +1 -1
  88. package/dist/es/{vueTypes-98d938a9.js → vueTypes-9326e0be.js} +9 -4
  89. package/package.json +6 -4
  90. package/dist/cjs/Button-78d8bc26.js +0 -146
  91. package/dist/cjs/Card-b4af314f.js +0 -58
  92. package/dist/cjs/Flex-737c55be.js +0 -160
  93. package/dist/cjs/FormControlList-08dfb28e.js +0 -105
  94. package/dist/cjs/Input-643d02a7.js +0 -178
  95. package/dist/cjs/ListItem-0c58c5d2.js +0 -84
  96. package/dist/cjs/ssr-b7a729f9.js +0 -47
  97. package/dist/es/Button-6c71c66e.js +0 -137
  98. package/dist/es/Card-ecf70ba1.js +0 -51
  99. package/dist/es/Container-f5efec9e.js +0 -18
  100. package/dist/es/Flex-40a74d8a.js +0 -155
  101. package/dist/es/FormControlList-b96aebef.js +0 -98
  102. package/dist/es/Input-dfd9dd40.js +0 -170
  103. package/dist/es/ListItem-da73bc7d.js +0 -77
  104. package/dist/es/Title-22c2f3bf.js +0 -18
  105. package/dist/es/ssr-2f57791d.js +0 -41
@@ -1,18 +1,18 @@
1
1
  import { Actions, helper } from '@appbaseio/reactivecore';
2
- import './_rollupPluginBabelHelpers-c9fbe19f.js';
2
+ import './_rollupPluginBabelHelpers-ecf6c03c.js';
3
3
  import VueTypes from 'vue-types';
4
4
  import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import 'emotion';
6
6
  import '@appbaseio/vue-emotion';
7
7
  import 'polished';
8
- import { t as types } from './vueTypes-98d938a9.js';
8
+ import { t as types } from './vueTypes-9326e0be.js';
9
9
  import '@appbaseio/reactivecore/lib/utils/transform';
10
10
  import 'redux';
11
- import { f as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-1fe91a0a.js';
12
- import { C as ComponentWrapper } from './ComponentWrapper-d0b21b95.js';
13
- import { T as Title } from './Title-22c2f3bf.js';
14
- import { C as Container } from './Container-f5efec9e.js';
15
- import { U as UL, R as Radio } from './FormControlList-b96aebef.js';
11
+ import { f as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-5daa8276.js';
12
+ import { C as ComponentWrapper } from './ComponentWrapper-bbb717bc.js';
13
+ import { T as Title } from './Title-579f8d6c.js';
14
+ import { C as Container } from './Container-4383c6f0.js';
15
+ import { U as UL, R as Radio } from './FormControlList-fe389a2e.js';
16
16
 
17
17
  var updateQuery = Actions.updateQuery,
18
18
  setQueryOptions = Actions.setQueryOptions,
@@ -46,10 +46,15 @@ var SingleRange = {
46
46
  showRadio: VueTypes.bool.def(true),
47
47
  title: types.title,
48
48
  URLParams: VueTypes.bool.def(false),
49
- nestedField: types.string
49
+ nestedField: types.string,
50
+ index: VueTypes.string
50
51
  },
51
52
  created: function created() {
52
- // Set custom query in store
53
+ if (!this.enableAppbase && this.$props.index) {
54
+ console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
55
+ } // Set custom query in store
56
+
57
+
53
58
  updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
54
59
  },
55
60
  beforeMount: function beforeMount() {
@@ -145,17 +150,16 @@ var SingleRange = {
145
150
  updateQueryHandler: function updateQueryHandler(value, props) {
146
151
  var customQuery = props.customQuery;
147
152
  var query = SingleRange.defaultQuery(value, props);
148
- var customQueryOptions;
149
153
 
150
154
  if (customQuery) {
151
155
  var _ref = customQuery(value, props) || {};
152
156
 
153
157
  query = _ref.query;
154
- customQueryOptions = getOptionsFromQuery(customQuery(value, props));
158
+ var customQueryOptions = getOptionsFromQuery(customQuery(value, props));
155
159
  updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
160
+ this.setQueryOptions(props.componentId, customQueryOptions, false);
156
161
  }
157
162
 
158
- this.setQueryOptions(props.componentId, customQueryOptions);
159
163
  this.updateQuery({
160
164
  componentId: props.componentId,
161
165
  query: query,
@@ -216,7 +220,8 @@ SingleRange.defaultQuery = function (value, props) {
216
220
  var mapStateToProps = function mapStateToProps(state, props) {
217
221
  return {
218
222
  selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || null,
219
- componentProps: state.props[props.componentId]
223
+ componentProps: state.props[props.componentId],
224
+ enableAppbase: state.config.enableAppbase
220
225
  };
221
226
  };
222
227
 
@@ -1,15 +1,19 @@
1
1
  import { helper } from '@appbaseio/reactivecore';
2
- import { a as _extends } from './_rollupPluginBabelHelpers-c9fbe19f.js';
2
+ import { a as _extends } from './_rollupPluginBabelHelpers-ecf6c03c.js';
3
3
  import VueTypes from 'vue-types';
4
4
  import '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import 'redux';
6
- import { c as connect } from './index-1fe91a0a.js';
6
+ import { c as connect } from './index-5daa8276.js';
7
7
 
8
8
  var getSearchState = helper.getSearchState;
9
9
  var defaultKeys = ['hits', 'value', 'aggregations', 'error'];
10
10
 
11
11
  var filterProps = function filterProps(props) {
12
- return _extends(_extends({}, props), {}, {
12
+ if (props === void 0) {
13
+ props = {};
14
+ }
15
+
16
+ return _extends({}, props, {
13
17
  props: props.componentProps
14
18
  });
15
19
  };
@@ -28,7 +32,7 @@ var filterByComponentIds = function filterByComponentIds(state, props) {
28
32
  return _ref = {}, _ref[componentIds] = state[componentIds], _ref;
29
33
  }
30
34
 
31
- if (componentIds instanceof Array) {
35
+ if (Array.isArray(componentIds)) {
32
36
  var filteredState = {};
33
37
  componentIds.forEach(function (componentId) {
34
38
  filteredState[componentId] = state[componentId];
@@ -43,7 +47,7 @@ var filterByKeys = function filterByKeys(state, allowedKeys) {
43
47
  return Object.keys(state).reduce(function (components, componentId) {
44
48
  var _extends2;
45
49
 
46
- return _extends(_extends({}, components), {}, (_extends2 = {}, _extends2[componentId] = Object.keys(state[componentId]).filter(function (key) {
50
+ return _extends({}, components, (_extends2 = {}, _extends2[componentId] = Object.keys(state[componentId]).filter(function (key) {
47
51
  return allowedKeys.includes(key);
48
52
  }).reduce(function (obj, key) {
49
53
  // eslint-disable-next-line
@@ -67,7 +71,7 @@ var StateProvider = {
67
71
  };
68
72
  return this.__state;
69
73
  },
70
- mounted: function mounted() {
74
+ created: function created() {
71
75
  this.searchState = filterByKeys(getSearchState(filterProps(this.searchStateProps)), this.includeKeys);
72
76
  },
73
77
  computed: {
@@ -89,7 +93,7 @@ var StateProvider = {
89
93
  watch: {
90
94
  searchState: function searchState(newVal, oldVal) {
91
95
  if (this.isStateChanged(newVal, oldVal)) {
92
- this.$emit('change', newVal, oldVal);
96
+ this.$emit('change', oldVal, newVal);
93
97
  }
94
98
  },
95
99
  selectedValues: function selectedValues(newVal, oldVal) {
@@ -0,0 +1,10 @@
1
+ import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-ecf6c03c.js';
2
+ import styled from '@appbaseio/vue-emotion';
3
+
4
+ var _templateObject;
5
+ var Title = styled('h2')(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n\tmargin: 0 0 8px;\n\tfont-size: 1rem;\n\tcolor: ", ";\n"])), function (_ref) {
6
+ var theme = _ref.theme;
7
+ return theme.colors.titleColor;
8
+ });
9
+
10
+ export { Title as T };
@@ -1,18 +1,18 @@
1
1
  import { Actions, helper } from '@appbaseio/reactivecore';
2
- import './_rollupPluginBabelHelpers-c9fbe19f.js';
3
- import 'vue-types';
2
+ import './_rollupPluginBabelHelpers-ecf6c03c.js';
3
+ import VueTypes from 'vue-types';
4
4
  import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
5
5
  import 'emotion';
6
6
  import '@appbaseio/vue-emotion';
7
7
  import 'polished';
8
- import { B as Button, t as toggleButtons } from './Button-6c71c66e.js';
9
- import { t as types } from './vueTypes-98d938a9.js';
8
+ import { B as Button, t as toggleButtons } from './Button-8b211174.js';
9
+ import { t as types } from './vueTypes-9326e0be.js';
10
10
  import '@appbaseio/reactivecore/lib/utils/transform';
11
11
  import 'redux';
12
- import { f as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-1fe91a0a.js';
13
- import { C as ComponentWrapper } from './ComponentWrapper-d0b21b95.js';
14
- import { T as Title } from './Title-22c2f3bf.js';
15
- import { C as Container } from './Container-f5efec9e.js';
12
+ import { f as updateCustomQuery, i as isQueryIdentical, c as connect } from './index-5daa8276.js';
13
+ import { C as ComponentWrapper } from './ComponentWrapper-bbb717bc.js';
14
+ import { T as Title } from './Title-579f8d6c.js';
15
+ import { C as Container } from './Container-4383c6f0.js';
16
16
 
17
17
  var updateQuery = Actions.updateQuery,
18
18
  setQueryOptions = Actions.setQueryOptions,
@@ -28,17 +28,19 @@ var ToggleButton = {
28
28
  componentId: types.stringRequired,
29
29
  data: types.data,
30
30
  dataField: types.stringRequired,
31
- defaultValue: types.stringOrArray,
31
+ defaultValue: types.any,
32
32
  value: types.stringOrArray,
33
33
  filterLabel: types.string,
34
34
  nestedField: types.string,
35
35
  innerClass: types.style,
36
- multiSelect: types.bool,
36
+ multiSelect: VueTypes.bool,
37
37
  react: types.react,
38
- showFilter: types.bool,
38
+ showFilter: VueTypes.bool,
39
39
  title: types.title,
40
- URLParams: types.bool,
41
- renderItem: types.func
40
+ URLParams: VueTypes.bool,
41
+ renderItem: types.func,
42
+ index: VueTypes.string,
43
+ enableStrictSelection: VueTypes.bool
42
44
  },
43
45
  data: function data() {
44
46
  this.__state = {
@@ -58,7 +60,11 @@ var ToggleButton = {
58
60
  }
59
61
  },
60
62
  created: function created() {
61
- // Set custom query in store
63
+ if (!this.enableAppbase && this.$props.index) {
64
+ console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
65
+ } // Set custom query in store
66
+
67
+
62
68
  updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
63
69
  },
64
70
  watch: {
@@ -180,7 +186,7 @@ var ToggleButton = {
180
186
  var _ref = customQuery(value, props) || {};
181
187
 
182
188
  query = _ref.query;
183
- this.setQueryOptions(props.componentId, getOptionsFromQuery(customQuery(value, props)));
189
+ this.setQueryOptions(props.componentId, getOptionsFromQuery(customQuery(value, props)), false);
184
190
  updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
185
191
  }
186
192
 
@@ -196,6 +202,16 @@ var ToggleButton = {
196
202
  });
197
203
  },
198
204
  handleClick: function handleClick(item) {
205
+ var _this$$props = this.$props,
206
+ enableStrictSelection = _this$$props.enableStrictSelection,
207
+ multiSelect = _this$$props.multiSelect;
208
+
209
+ if (enableStrictSelection && !multiSelect && this.$data.currentValue.find(function (stateItem) {
210
+ return isEqual(item, stateItem);
211
+ })) {
212
+ return false;
213
+ }
214
+
199
215
  var value = this.$props.value;
200
216
 
201
217
  if (value === undefined) {
@@ -203,6 +219,8 @@ var ToggleButton = {
203
219
  } else {
204
220
  this.$emit('change', item.value);
205
221
  }
222
+
223
+ return true;
206
224
  },
207
225
  renderButton: function renderButton(item) {
208
226
  var _this2 = this;
@@ -305,7 +323,8 @@ ToggleButton.defaultQuery = function (value, props) {
305
323
  var mapStateToProps = function mapStateToProps(state, props) {
306
324
  return {
307
325
  selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || null,
308
- componentProps: state.props[props.componentId]
326
+ componentProps: state.props[props.componentId],
327
+ enableAppbase: state.config.enableAppbase
309
328
  };
310
329
  };
311
330
 
@@ -19,7 +19,17 @@ function _extends() {
19
19
  function _inheritsLoose(subClass, superClass) {
20
20
  subClass.prototype = Object.create(superClass.prototype);
21
21
  subClass.prototype.constructor = subClass;
22
- subClass.__proto__ = superClass;
22
+
23
+ _setPrototypeOf(subClass, superClass);
24
+ }
25
+
26
+ function _setPrototypeOf(o, p) {
27
+ _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
28
+ o.__proto__ = p;
29
+ return o;
30
+ };
31
+
32
+ return _setPrototypeOf(o, p);
23
33
  }
24
34
 
25
35
  function _objectWithoutPropertiesLoose(source, excluded) {
@@ -1,5 +1,5 @@
1
1
  import { helper } from '@appbaseio/reactivecore';
2
- import { a as _extends } from './_rollupPluginBabelHelpers-c9fbe19f.js';
2
+ import { a as _extends } from './_rollupPluginBabelHelpers-ecf6c03c.js';
3
3
  import { validProps } from '@appbaseio/reactivecore/lib/utils/constants';
4
4
  import { bindActionCreators } from 'redux';
5
5
 
@@ -52,7 +52,7 @@ var normalizeMapState = function normalizeMapState(mapState) {
52
52
  }).reduce(function (map, key) {
53
53
  var _extends2;
54
54
 
55
- return _extends(_extends({}, map), {}, (_extends2 = {}, _extends2[key] = mapState[key](state, ownProps), _extends2));
55
+ return _extends({}, map, (_extends2 = {}, _extends2[key] = mapState[key](state, ownProps), _extends2));
56
56
  }, {});
57
57
  };
58
58
  }
@@ -77,12 +77,12 @@ var connector = function connector(_mapState, mapDispatch) {
77
77
  mixins: [component],
78
78
  inject: ['$$store'],
79
79
  data: function data() {
80
- var merged = _extends(_extends({}, mapState(this.$$store.getState(), this.$props || {})), bindActionCreators(mapDispatch, this.$$store.dispatch));
80
+ var merged = _extends({}, mapState(this.$$store.getState(), this.$props || {}), bindActionCreators(mapDispatch, this.$$store.dispatch));
81
81
 
82
82
  return Object.keys(merged).reduce(function (data, key) {
83
83
  var _extends3;
84
84
 
85
- return _extends(_extends({}, data), {}, (_extends3 = {}, _extends3[key] = merged[key], _extends3));
85
+ return _extends({}, data, (_extends3 = {}, _extends3[key] = merged[key], _extends3));
86
86
  }, {});
87
87
  },
88
88
  created: function created() {
@@ -129,6 +129,7 @@ var connect = function connect() {
129
129
  // storeKey,
130
130
  // });
131
131
 
132
+ var X_SEARCH_CLIENT = 'ReactiveSearch Vue';
132
133
  var composeThemeObject = function composeThemeObject(ownTheme, userTheme) {
133
134
  if (ownTheme === void 0) {
134
135
  ownTheme = {};
@@ -139,9 +140,9 @@ var composeThemeObject = function composeThemeObject(ownTheme, userTheme) {
139
140
  }
140
141
 
141
142
  return {
142
- typography: _extends(_extends({}, ownTheme.typography), userTheme.typography),
143
- colors: _extends(_extends({}, ownTheme.colors), userTheme.colors),
144
- component: _extends(_extends({}, ownTheme.component), userTheme.component)
143
+ typography: _extends({}, ownTheme.typography, userTheme.typography),
144
+ colors: _extends({}, ownTheme.colors, userTheme.colors),
145
+ component: _extends({}, ownTheme.component, userTheme.component)
145
146
  };
146
147
  };
147
148
  /**
@@ -154,10 +155,16 @@ var isFunction = function isFunction(element) {
154
155
  }; // parses current array (i.e. this.$props.value) for `onChange` callback for multi-* components
155
156
 
156
157
  function parseValueArray(objectValues, currentValue) {
157
- var keys = Object.keys(objectValues);
158
- var selectedValues = keys.map(function (key) {
159
- return objectValues[key] ? key : null;
160
- });
158
+ var selectedValues;
159
+
160
+ if (Array.isArray(objectValues)) {
161
+ selectedValues = [].concat(objectValues);
162
+ } else {
163
+ var keys = Object.keys(objectValues);
164
+ selectedValues = keys.map(function (key) {
165
+ return objectValues[key] ? key : null;
166
+ });
167
+ }
161
168
 
162
169
  if (selectedValues.includes(currentValue)) {
163
170
  return selectedValues.filter(function (item) {
@@ -216,12 +223,12 @@ var isEvent = function isEvent(candidate) {
216
223
  return !!(candidate && candidate.stopPropagation && candidate.preventDefault);
217
224
  };
218
225
  var updateDefaultQuery = function updateDefaultQuery(componentId, setDefaultQuery, props, value) {
219
- defaultQueryUtil(componentId, _extends(_extends({}, props), {}, {
226
+ defaultQueryUtil(componentId, _extends({}, props, {
220
227
  setDefaultQuery: setDefaultQuery
221
228
  }), value);
222
229
  };
223
230
  var updateCustomQuery = function updateCustomQuery(componentId, setCustomQuery, props, value) {
224
- customQueryUtil(componentId, _extends(_extends({}, props), {}, {
231
+ customQueryUtil(componentId, _extends({}, props, {
225
232
  setCustomQuery: setCustomQuery
226
233
  }), value);
227
234
  };
@@ -294,5 +301,68 @@ var getCamelCase = function getCamelCase(str) {
294
301
  var capitalString = capital.join('');
295
302
  return capitalString || '';
296
303
  };
304
+ var isEmpty = function isEmpty(val) {
305
+ return !(val && val.length && Object.keys(val).length);
306
+ };
307
+ function isNumeric(value) {
308
+ return /^-?\d+$/.test(value);
309
+ } // check if passed shortcut a key combination
310
+
311
+ function isHotkeyCombination(hotkey) {
312
+ return typeof hotkey === 'string' && hotkey.indexOf('+') !== -1;
313
+ } // used for getting correct string char from keycode passed
314
+ // the below algebraic expression is used to get the correct ascii code out of the e.which || e.keycode returned value
315
+ // since the keyboards doesn't understand ascii but scan codes and they differ for certain keys such as '/'
316
+ // stackoverflow ref: https://stackoverflow.com/a/29811987/10822996
317
+
318
+ function getCharFromCharCode(passedCharCode) {
319
+ var which = passedCharCode;
320
+ var chrCode = which - 48 * Math.floor(which / 48);
321
+ return String.fromCharCode(which >= 96 ? chrCode : which);
322
+ } // used for parsing focusshortcuts for keycodes passed as string, eg: 'ctrl+/' is same as 'ctrl+47'
323
+ // returns focusShortcuts containing appropriate key charsas depicted on keyboards
324
+
325
+ function parseFocusShortcuts(focusShortcutsArray) {
326
+ if (isEmpty(focusShortcutsArray)) return [];
327
+ var parsedFocusShortcutsArray = [];
328
+ focusShortcutsArray.forEach(function (element) {
329
+ if (typeof element === 'string') {
330
+ if (isHotkeyCombination(element)) {
331
+ // splitting the combination into pieces
332
+ var splitCombination = element.split('+');
333
+ var parsedSplitCombination = []; // parsedCombination would have all the keycodes converted into chars
334
+
335
+ var parsedCombination = '';
336
+
337
+ for (var i = 0; i < splitCombination.length; i += 1) {
338
+ if (isNumeric(splitCombination[i])) {
339
+ parsedSplitCombination.push(getCharFromCharCode(+splitCombination[i]));
340
+ } else {
341
+ parsedSplitCombination.push(splitCombination[i]);
342
+ }
343
+ }
344
+
345
+ parsedCombination = parsedSplitCombination.join('+');
346
+ parsedFocusShortcutsArray.push(parsedCombination);
347
+ } else if (isNumeric(element)) {
348
+ parsedFocusShortcutsArray.push(getCharFromCharCode(+element));
349
+ } else {
350
+ // single char shortcut, eg: '/'
351
+ parsedFocusShortcutsArray.push(element);
352
+ }
353
+ } else {
354
+ // if not a string the the shortcut is assumed to be a keycode
355
+ parsedFocusShortcutsArray.push(getCharFromCharCode(element));
356
+ }
357
+ });
358
+ return parsedFocusShortcutsArray;
359
+ }
360
+ var MODIFIER_KEYS = ['shift', 'ctrl', 'alt', 'control', 'option', 'cmd', 'command']; // filter out modifierkeys such as ctrl, alt, command, shift from focusShortcuts prop
361
+
362
+ function extractModifierKeysFromFocusShortcuts(focusShortcutsArray) {
363
+ return focusShortcutsArray.filter(function (shortcutKey) {
364
+ return MODIFIER_KEYS.includes(shortcutKey);
365
+ });
366
+ }
297
367
 
298
- export { 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, hasQuerySuggestionsRenderer as k, isEvent as l, parseValueArray as p, updateDefaultQuery as u };
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 };
package/dist/es/index.js CHANGED
@@ -1,39 +1,43 @@
1
1
  import '@appbaseio/reactivecore';
2
- import './_rollupPluginBabelHelpers-c9fbe19f.js';
2
+ import './_rollupPluginBabelHelpers-ecf6c03c.js';
3
3
  import 'vue-types';
4
4
  import '@appbaseio/reactivecore/lib/utils/constants';
5
+ import '@appbaseio/reactivecore/lib/utils/helper';
5
6
  import 'emotion';
6
7
  import '@appbaseio/vue-emotion';
7
8
  import 'polished';
8
- import './Button-6c71c66e.js';
9
- import './vueTypes-98d938a9.js';
10
- import './Pagination-800af44f.js';
9
+ import './Button-8b211174.js';
10
+ import './vueTypes-9326e0be.js';
11
+ import './Pagination-3c50d4ba.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-1fe91a0a.js';
15
- import './ComponentWrapper-d0b21b95.js';
15
+ import './index-5daa8276.js';
16
+ import './ComponentWrapper-bbb717bc.js';
16
17
  import '@vue/babel-helper-vue-jsx-merge-props';
17
- import './Title-22c2f3bf.js';
18
- import './ListItem-da73bc7d.js';
19
- import './Card-ecf70ba1.js';
20
- import './Flex-40a74d8a.js';
21
- import '@appbaseio/reactivecore/lib/utils/helper';
18
+ import './Title-579f8d6c.js';
19
+ import './ListItem-bdb6d53d.js';
20
+ import './Card-04b3c33e.js';
21
+ import './Flex-aac91505.js';
22
22
  import '@appbaseio/reactivecore/lib/actions/analytics';
23
23
  import 'appbase-js';
24
24
  import 'url-search-params-polyfill';
25
25
  export { default as ReactiveBase } from './ReactiveBase.js';
26
- import './Input-dfd9dd40.js';
27
- export { default as DataSearch } from './DataSearch.js';
26
+ import 'hotkeys-js';
27
+ export { D as DataSearch } from './DataSearch-7a8a9368.js';
28
+ import './CancelSvg-4d9e0857.js';
29
+ import './Input-d1bb4868.js';
28
30
  import 'compute-scroll-into-view';
29
- import './DownShift-d8f2500f.js';
30
- import './Container-f5efec9e.js';
31
+ import './Container-4383c6f0.js';
31
32
  import 'vue-highlight-words';
32
- import './FormControlList-b96aebef.js';
33
- import './utils-ce3d86fd.js';
33
+ import { i as install } from './install-183f5d19.js';
34
+ export { S as SearchBox, i as install } from './install-183f5d19.js';
35
+ import '@appbaseio/reactivecore/lib/utils/suggestions';
36
+ import './FormControlList-fe389a2e.js';
37
+ import './utils-3a32e13f.js';
34
38
  export { default as SingleList } from './SingleList.js';
35
39
  export { default as MultiList } from './MultiList.js';
36
- import './DropDown-5dbd69c2.js';
40
+ import './DropDown-7639f223.js';
37
41
  export { default as SingleDropdownList } from './SingleDropdownList.js';
38
42
  export { default as MultiDropdownList } from './MultiDropdownList.js';
39
43
  export { default as ToggleButton } from './ToggleButton.js';
@@ -44,7 +48,7 @@ export { default as MultiRange } from './MultiRange.js';
44
48
  export { default as ResultCard } from './ResultCard.js';
45
49
  export { default as ResultList } from './ResultList.js';
46
50
  import 'vue-no-ssr';
47
- import './ssr-2f57791d.js';
51
+ import './ssr-e3196de1.js';
48
52
  export { default as RangeSlider } from './RangeSlider.js';
49
53
  export { default as DynamicRangeSlider } from './DynamicRangeSlider.js';
50
54
  export { default as StateProvider } from './StateProvider.js';
@@ -53,12 +57,14 @@ import 'gmap-vue/dist/components-implementation/map';
53
57
  import 'ngeohash';
54
58
  export { default as ReactiveGoogleMap } from './ReactiveGoogleMap.js';
55
59
  import 'gmap-vue/dist/components/cluster';
56
- import 'gmap-vue/dist/components/marker';
57
60
  import 'gmap-vue/dist/components-implementation/info-window';
61
+ import 'gmap-vue/dist/components/marker';
58
62
  import 'gmap-vue/dist/mixins/map-element';
59
63
  import '@appbaseio/reactivecore/lib/reducers/valueReducer';
60
64
  import '@appbaseio/reactivecore/lib/reducers/queryReducer';
61
65
  import '@appbaseio/reactivecore/lib/reducers/queryOptionsReducer';
66
+ import '@appbaseio/reactivecore/lib/reducers/compositeAggsReducer';
67
+ import '@appbaseio/reactivecore/lib/constants';
62
68
  import '@appbaseio/reactivecore/lib/reducers/dependencyTreeReducer';
63
69
  import '@appbaseio/reactivecore/lib/utils/graphQL';
64
70
  import '@appbaseio/reactivecore/lib/actions/utils';
@@ -66,8 +72,6 @@ export { default as initReactivesearch } from './initReactivesearch.js';
66
72
  import version from './version.js';
67
73
  export { default as version } from './version.js';
68
74
  export { default as RangeInput } from './RangeInput.js';
69
- import install from './install.js';
70
- export { default as install } from './install.js';
71
75
 
72
76
  // Add polyfills to support in IE
73
77