@appbaseio/reactivesearch-vue 1.16.0-alpha.6 → 1.16.0-alpha.62

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 +16030 -13113
  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-446f819e.js +68 -0
  6. package/dist/cjs/{DownShift-966a58cb.js → CancelSvg-9f258f4f.js} +60 -16
  7. package/dist/cjs/Card-642547a8.js +30 -0
  8. package/dist/cjs/{ComponentWrapper-603848ed.js → ComponentWrapper-ad3dad02.js} +40 -21
  9. package/dist/cjs/{Container-6cdd3864.js → Container-daf30918.js} +3 -11
  10. package/dist/cjs/DataSearch-86914b10.js +2322 -0
  11. package/dist/cjs/DataSearch.js +18 -2151
  12. package/dist/cjs/{DropDown-f6224ac8.js → DropDown-5513ea77.js} +80 -95
  13. package/dist/cjs/DynamicRangeSlider.js +107 -43
  14. package/dist/cjs/Flex-aa517a13.js +52 -0
  15. package/dist/cjs/FormControlList-c195a592.js +47 -0
  16. package/dist/cjs/Input-e6603a7e.js +79 -0
  17. package/dist/cjs/ListItem-8c9e0d68.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-af399262.js → Pagination-fe5452fc.js} +14 -8
  22. package/dist/cjs/RangeInput.js +29 -45
  23. package/dist/cjs/RangeSlider.js +32 -30
  24. package/dist/cjs/ReactiveBase.js +87 -56
  25. package/dist/cjs/ReactiveComponent.js +75 -62
  26. package/dist/cjs/ReactiveGoogleMap.js +262 -191
  27. package/dist/cjs/ReactiveList.js +189 -241
  28. package/dist/cjs/ResultCard.js +8 -6
  29. package/dist/cjs/ResultList.js +8 -6
  30. package/dist/cjs/SelectedFilters.js +66 -34
  31. package/dist/cjs/SingleDropdownList.js +88 -60
  32. package/dist/cjs/SingleList.js +53 -35
  33. package/dist/cjs/SingleRange.js +19 -14
  34. package/dist/cjs/StateProvider.js +39 -10
  35. package/dist/cjs/{Title-65d39104.js → Title-1de7d0f4.js} +3 -11
  36. package/dist/cjs/ToggleButton.js +36 -16
  37. package/dist/cjs/{_rollupPluginBabelHelpers-4abdbfff.js → _rollupPluginBabelHelpers-c705cbe6.js} +2 -4
  38. package/dist/cjs/{index-baca18c4.js → index-6a167fe0.js} +99 -13
  39. package/dist/cjs/index.js +31 -25
  40. package/dist/cjs/initReactivesearch.js +178 -104
  41. package/dist/cjs/install-004c6aa4.js +1408 -0
  42. package/dist/cjs/install.js +42 -44
  43. package/dist/cjs/ssr-3027b848.js +39 -0
  44. package/dist/cjs/{utils-ea846a20.js → utils-d6a52588.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-d8bc15ea.js +59 -0
  48. package/dist/es/{DownShift-92347b5e.js → CancelSvg-4cfae5fd.js} +56 -17
  49. package/dist/es/Card-450683f1.js +23 -0
  50. package/dist/es/{ComponentWrapper-c4c91949.js → ComponentWrapper-424e86fd.js} +40 -21
  51. package/dist/es/Container-ba826e96.js +10 -0
  52. package/dist/es/DataSearch-e71a1014.js +2307 -0
  53. package/dist/es/DataSearch.js +17 -2150
  54. package/dist/es/{DropDown-3d4291f1.js → DropDown-7d9a15c1.js} +79 -94
  55. package/dist/es/DynamicRangeSlider.js +107 -43
  56. package/dist/es/Flex-1f0795c3.js +47 -0
  57. package/dist/es/FormControlList-c22d64f6.js +40 -0
  58. package/dist/es/Input-7a2a9fac.js +71 -0
  59. package/dist/es/ListItem-cad14c5e.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-c2a00175.js → Pagination-3f350098.js} +14 -8
  64. package/dist/es/RangeInput.js +29 -45
  65. package/dist/es/RangeSlider.js +32 -30
  66. package/dist/es/ReactiveBase.js +87 -56
  67. package/dist/es/ReactiveComponent.js +75 -62
  68. package/dist/es/ReactiveGoogleMap.js +262 -191
  69. package/dist/es/ReactiveList.js +189 -241
  70. package/dist/es/ResultCard.js +8 -6
  71. package/dist/es/ResultList.js +8 -6
  72. package/dist/es/SelectedFilters.js +66 -34
  73. package/dist/es/SingleDropdownList.js +88 -60
  74. package/dist/es/SingleList.js +53 -35
  75. package/dist/es/SingleRange.js +19 -14
  76. package/dist/es/StateProvider.js +39 -10
  77. package/dist/es/Title-3342664a.js +10 -0
  78. package/dist/es/ToggleButton.js +36 -16
  79. package/dist/es/{_rollupPluginBabelHelpers-ecf6c03c.js → _rollupPluginBabelHelpers-76660dab.js} +2 -4
  80. package/dist/es/{index-185b6266.js → index-7788a843.js} +95 -14
  81. package/dist/es/index.js +27 -22
  82. package/dist/es/initReactivesearch.js +179 -105
  83. package/dist/es/install-b7b604cc.js +1401 -0
  84. package/dist/es/install.js +40 -46
  85. package/dist/es/ssr-b2c0b401.js +33 -0
  86. package/dist/es/{utils-57cc8789.js → utils-9e68acee.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-d48d4365.js +0 -146
  91. package/dist/cjs/Card-9748fbb2.js +0 -58
  92. package/dist/cjs/Flex-befd65fc.js +0 -160
  93. package/dist/cjs/FormControlList-f3857d4b.js +0 -105
  94. package/dist/cjs/Input-95cb19f8.js +0 -178
  95. package/dist/cjs/ListItem-84d185cf.js +0 -84
  96. package/dist/cjs/ssr-3ca8a14f.js +0 -47
  97. package/dist/es/Button-27cc8574.js +0 -137
  98. package/dist/es/Card-1f93780d.js +0 -51
  99. package/dist/es/Container-88c805ef.js +0 -18
  100. package/dist/es/Flex-16d1103a.js +0 -155
  101. package/dist/es/FormControlList-96d44e7b.js +0 -98
  102. package/dist/es/Input-1159c4b5.js +0 -170
  103. package/dist/es/ListItem-d22510c9.js +0 -77
  104. package/dist/es/Title-f0217338.js +0 -18
  105. package/dist/es/ssr-a710392b.js +0 -41
@@ -1,5 +1,5 @@
1
1
  import { helper } from '@appbaseio/reactivecore';
2
- import { a as _extends } from './_rollupPluginBabelHelpers-ecf6c03c.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
 
@@ -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,79 @@ 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
+ }
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
+ }
297
378
 
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 };
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,39 +1,43 @@
1
1
  import '@appbaseio/reactivecore';
2
- import './_rollupPluginBabelHelpers-ecf6c03c.js';
2
+ import './_rollupPluginBabelHelpers-76660dab.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-27cc8574.js';
9
- import './vueTypes-98d938a9.js';
10
- import './Pagination-c2a00175.js';
9
+ import './Button-d8bc15ea.js';
10
+ import './vueTypes-9326e0be.js';
11
+ import './Pagination-3f350098.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-185b6266.js';
15
- import './ComponentWrapper-c4c91949.js';
15
+ import './index-7788a843.js';
16
+ import './ComponentWrapper-424e86fd.js';
16
17
  import '@vue/babel-helper-vue-jsx-merge-props';
17
- import './Title-f0217338.js';
18
- import './ListItem-d22510c9.js';
19
- import './Card-1f93780d.js';
20
- import './Flex-16d1103a.js';
21
- import '@appbaseio/reactivecore/lib/utils/helper';
18
+ import './Title-3342664a.js';
19
+ import './ListItem-cad14c5e.js';
20
+ import './Card-450683f1.js';
21
+ import './Flex-1f0795c3.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-1159c4b5.js';
27
- export { default as DataSearch } from './DataSearch.js';
26
+ import 'hotkeys-js';
27
+ export { D as DataSearch } from './DataSearch-e71a1014.js';
28
+ import './CancelSvg-4cfae5fd.js';
29
+ import './Input-7a2a9fac.js';
28
30
  import 'compute-scroll-into-view';
29
- import './DownShift-92347b5e.js';
30
- import './Container-88c805ef.js';
31
+ import './Container-ba826e96.js';
31
32
  import 'vue-highlight-words';
32
- import './FormControlList-96d44e7b.js';
33
- import './utils-57cc8789.js';
33
+ import { i as install } from './install-b7b604cc.js';
34
+ export { S as SearchBox, i as install } from './install-b7b604cc.js';
35
+ import '@appbaseio/reactivecore/lib/utils/suggestions';
36
+ import './FormControlList-c22d64f6.js';
37
+ import './utils-9e68acee.js';
34
38
  export { default as SingleList } from './SingleList.js';
35
39
  export { default as MultiList } from './MultiList.js';
36
- import './DropDown-3d4291f1.js';
40
+ import './DropDown-7d9a15c1.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,21 +48,24 @@ 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-a710392b.js';
51
+ import './ssr-b2c0b401.js';
48
52
  export { default as RangeSlider } from './RangeSlider.js';
49
53
  export { default as DynamicRangeSlider } from './DynamicRangeSlider.js';
54
+ import '@appbaseio/reactivecore/lib/actions/value';
50
55
  export { default as StateProvider } from './StateProvider.js';
51
56
  import 'gmap-vue';
52
57
  import 'gmap-vue/dist/components-implementation/map';
53
58
  import 'ngeohash';
54
59
  export { default as ReactiveGoogleMap } from './ReactiveGoogleMap.js';
55
60
  import 'gmap-vue/dist/components/cluster';
56
- import 'gmap-vue/dist/components/marker';
57
61
  import 'gmap-vue/dist/components-implementation/info-window';
62
+ import 'gmap-vue/dist/components/marker';
58
63
  import 'gmap-vue/dist/mixins/map-element';
59
64
  import '@appbaseio/reactivecore/lib/reducers/valueReducer';
60
65
  import '@appbaseio/reactivecore/lib/reducers/queryReducer';
61
66
  import '@appbaseio/reactivecore/lib/reducers/queryOptionsReducer';
67
+ import '@appbaseio/reactivecore/lib/reducers/compositeAggsReducer';
68
+ import '@appbaseio/reactivecore/lib/constants';
62
69
  import '@appbaseio/reactivecore/lib/reducers/dependencyTreeReducer';
63
70
  import '@appbaseio/reactivecore/lib/utils/graphQL';
64
71
  import '@appbaseio/reactivecore/lib/actions/utils';
@@ -66,8 +73,6 @@ export { default as initReactivesearch } from './initReactivesearch.js';
66
73
  import version from './version.js';
67
74
  export { default as version } from './version.js';
68
75
  export { default as RangeInput } from './RangeInput.js';
69
- import install from './install.js';
70
- export { default as install } from './install.js';
71
76
 
72
77
  // Add polyfills to support in IE
73
78