@appbaseio/reactivesearch-vue 1.29.0 → 2.0.0-alpha

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 +11162 -762
  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-e0b7c1f6.js → Button-446f819e.js} +1 -1
  6. package/dist/cjs/{CancelSvg-4aa35935.js → CancelSvg-9f258f4f.js} +1 -1
  7. package/dist/cjs/{Card-fd94ef07.js → Card-642547a8.js} +2 -2
  8. package/dist/cjs/{ComponentWrapper-10bad289.js → ComponentWrapper-ad3dad02.js} +2 -2
  9. package/dist/cjs/{Container-526efa6a.js → Container-daf30918.js} +1 -1
  10. package/dist/cjs/{DataSearch-eec21890.js → DataSearch-6cf29cf0.js} +236 -84
  11. package/dist/cjs/DataSearch.js +10 -10
  12. package/dist/cjs/{DropDown-e4381fcc.js → DropDown-c479bbb0.js} +5 -5
  13. package/dist/cjs/DynamicRangeSlider.js +8 -7
  14. package/dist/cjs/{Flex-f146cdad.js → Flex-aa517a13.js} +1 -1
  15. package/dist/cjs/{FormControlList-808dbcef.js → FormControlList-c195a592.js} +1 -1
  16. package/dist/cjs/{Input-0d7b25ad.js → Input-e6603a7e.js} +1 -1
  17. package/dist/cjs/{ListItem-b40adb04.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-71e85fa9.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 +69 -35
  25. package/dist/cjs/ReactiveComponent.js +6 -5
  26. package/dist/cjs/ReactiveGoogleMap.js +2336 -0
  27. package/dist/cjs/ReactiveList.js +22 -185
  28. package/dist/cjs/ResultCard.js +4 -4
  29. package/dist/cjs/ResultList.js +4 -4
  30. package/dist/cjs/SelectedFilters.js +45 -28
  31. package/dist/cjs/SingleDropdownList.js +13 -12
  32. package/dist/cjs/SingleList.js +11 -10
  33. package/dist/cjs/SingleRange.js +10 -9
  34. package/dist/cjs/StateProvider.js +30 -5
  35. package/dist/cjs/{Title-584a8cc8.js → Title-1de7d0f4.js} +1 -1
  36. package/dist/cjs/ToggleButton.js +10 -8
  37. package/dist/cjs/{_rollupPluginBabelHelpers-f127c8b7.js → _rollupPluginBabelHelpers-c705cbe6.js} +17 -2
  38. package/dist/cjs/{index-4509aa45.js → index-6a167fe0.js} +13 -1
  39. package/dist/cjs/index.js +24 -18
  40. package/dist/cjs/initReactivesearch.js +40 -8
  41. package/dist/cjs/{install-4886582d.js → install-99716d95.js} +252 -87
  42. package/dist/cjs/install.js +20 -18
  43. package/dist/cjs/{ssr-0ee35a09.js → ssr-3027b848.js} +1 -1
  44. package/dist/cjs/{utils-1219e1fe.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-33de88e6.js → Button-d8bc15ea.js} +1 -1
  48. package/dist/es/{CancelSvg-c2c03a35.js → CancelSvg-4cfae5fd.js} +1 -1
  49. package/dist/es/{Card-6446f1b7.js → Card-450683f1.js} +2 -2
  50. package/dist/es/{ComponentWrapper-0f3431d1.js → ComponentWrapper-424e86fd.js} +2 -2
  51. package/dist/es/{Container-18b03fde.js → Container-ba826e96.js} +1 -1
  52. package/dist/es/{DataSearch-42f547cd.js → DataSearch-4888aa43.js} +236 -86
  53. package/dist/es/DataSearch.js +10 -10
  54. package/dist/es/{DropDown-ff6ad982.js → DropDown-05a644a5.js} +5 -5
  55. package/dist/es/DynamicRangeSlider.js +8 -7
  56. package/dist/es/{Flex-8770345d.js → Flex-1f0795c3.js} +1 -1
  57. package/dist/es/{FormControlList-704f8dee.js → FormControlList-c22d64f6.js} +1 -1
  58. package/dist/es/{Input-e339e63a.js → Input-7a2a9fac.js} +1 -1
  59. package/dist/es/{ListItem-8e8fb535.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-784bf143.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 +70 -36
  67. package/dist/es/ReactiveComponent.js +6 -5
  68. package/dist/es/ReactiveGoogleMap.js +2327 -0
  69. package/dist/es/ReactiveList.js +21 -184
  70. package/dist/es/ResultCard.js +4 -4
  71. package/dist/es/ResultList.js +4 -4
  72. package/dist/es/SelectedFilters.js +45 -28
  73. package/dist/es/SingleDropdownList.js +13 -12
  74. package/dist/es/SingleList.js +11 -10
  75. package/dist/es/SingleRange.js +10 -9
  76. package/dist/es/StateProvider.js +30 -5
  77. package/dist/es/{Title-3522ff56.js → Title-3342664a.js} +1 -1
  78. package/dist/es/ToggleButton.js +10 -8
  79. package/dist/es/{_rollupPluginBabelHelpers-0f24d612.js → _rollupPluginBabelHelpers-76660dab.js} +17 -3
  80. package/dist/es/{index-78920565.js → index-7788a843.js} +13 -2
  81. package/dist/es/index.js +24 -19
  82. package/dist/es/initReactivesearch.js +41 -9
  83. package/dist/es/{install-54ebd72e.js → install-87984085.js} +252 -87
  84. package/dist/es/install.js +20 -18
  85. package/dist/es/{ssr-a41dfea9.js → ssr-b2c0b401.js} +1 -1
  86. package/dist/es/{utils-64a2e5f0.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 +11 -5
@@ -1,21 +1,21 @@
1
1
  import { Actions, helper, causes } from '@appbaseio/reactivecore';
2
- import { _ as _taggedTemplateLiteralLoose, a as _extends } from './_rollupPluginBabelHelpers-0f24d612.js';
2
+ import { _ as _taggedTemplateLiteralLoose, a as _extends } from './_rollupPluginBabelHelpers-76660dab.js';
3
3
  import VueTypes from 'vue-types';
4
- import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
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-33de88e6.js';
8
- import { t as types } from './vueTypes-687b2304.js';
7
+ import { B as Button } from './Button-d8bc15ea.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-78920565.js';
11
- import { C as ComponentWrapper } from './ComponentWrapper-0f3431d1.js';
12
- import { T as Title } from './Title-3522ff56.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, b as InputGroup, C as CustomSvg, c as SuggestionItem, D as DataSearch } from './DataSearch-42f547cd.js';
16
- import { C as CancelSvg, a as IconGroup, I as IconWrapper, D as Downshift, b as InputWrapper } from './CancelSvg-c2c03a35.js';
17
- import { s as suggestionsContainer, I as Input, a as suggestions } from './Input-e339e63a.js';
18
- import { C as Container } from './Container-18b03fde.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-4888aa43.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';
@@ -74,10 +74,12 @@ var _debounce = helper.debounce,
74
74
  normalizeDataField = helper.normalizeDataField;
75
75
  var SearchBox = {
76
76
  name: 'SearchBox',
77
+ isTagsMode: false,
77
78
  data: function data() {
78
79
  var props = this.$props;
79
80
  this.__state = {
80
81
  currentValue: '',
82
+ selectedTags: [],
81
83
  isOpen: false,
82
84
  normalizedSuggestions: []
83
85
  };
@@ -93,7 +95,16 @@ var SearchBox = {
93
95
  var _this$$props = this.$props,
94
96
  distinctField = _this$$props.distinctField,
95
97
  distinctFieldConfig = _this$$props.distinctFieldConfig,
96
- index = _this$$props.index;
98
+ index = _this$$props.index,
99
+ mode = _this$$props.mode;
100
+
101
+ if (mode === SEARCH_COMPONENTS_MODES.TAG) {
102
+ this.$options.isTagsMode = true;
103
+ }
104
+
105
+ if (this.$options.isTagsMode) {
106
+ console.warn('Warning(ReactiveSearch): The `categoryField` prop is not supported when `mode` prop is set to `tag`');
107
+ }
97
108
 
98
109
  if (this.enableAppbase && this.aggregationField && this.aggregationField !== '') {
99
110
  console.warn('Warning(ReactiveSearch): The `aggregationField` prop has been marked as deprecated, please use the `distinctField` prop instead.');
@@ -107,9 +118,13 @@ var SearchBox = {
107
118
  console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
108
119
  }
109
120
 
110
- this.currentValue = this.selectedValue || this.value || this.defaultValue || '';
111
- this.handleTextChange = _debounce(this.handleText, this.$props.debounce);
112
- this.setValue(this.currentValue, true, this.$props, undefined, false, this.selectedCategory); // Set custom and default queries in store
121
+ this.currentValue = decodeHtml(this.selectedValue || this.value || this.defaultValue || '');
122
+
123
+ if (this.$options.isTagsMode) {
124
+ this.currentValue = '';
125
+ }
126
+
127
+ this.handleTextChange = _debounce(this.handleText, this.$props.debounce); // Set custom and default queries in store
113
128
 
114
129
  this.triggerCustomQuery(this.currentValue, this.selectedCategory);
115
130
  this.triggerDefaultQuery(this.currentValue);
@@ -145,7 +160,7 @@ var SearchBox = {
145
160
  debounce: VueTypes.number.def(0),
146
161
  defaultValue: types.string,
147
162
  excludeFields: types.excludeFields,
148
- value: types.value,
163
+ value: VueTypes.oneOfType([VueTypes.arrayOf(VueTypes.string), types.value]),
149
164
  defaultSuggestions: types.suggestions,
150
165
  enableSynonyms: VueTypes.bool.def(true),
151
166
  enableQuerySuggestions: VueTypes.bool.def(false),
@@ -198,7 +213,20 @@ var SearchBox = {
198
213
  onData: types.func,
199
214
  renderItem: types.func,
200
215
  enterButton: VueTypes.bool.def(false),
201
- renderEnterButton: VueTypes.any
216
+ renderEnterButton: VueTypes.any,
217
+ mode: VueTypes.oneOf(['select', 'tag']).def('select'),
218
+ renderSelectedTags: VueTypes.any,
219
+ searchboxId: VueTypes.string,
220
+ endpoint: types.endpointConfig
221
+ },
222
+ beforeMount: function beforeMount() {
223
+ if (this.selectedValue) {
224
+ this.setValue(this.selectedValue, true, this.$props, this.$options.isTagsMode ? causes.SUGGESTION_SELECT : undefined);
225
+ } else if (this.$props.value) {
226
+ this.setValue(this.$props.value, true, this.$props, this.$options.isTagsMode ? causes.SUGGESTION_SELECT : undefined);
227
+ } else if (this.$props.defaultValue) {
228
+ this.setValue(this.$props.defaultValue, true, this.$props, this.$options.isTagsMode ? causes.SUGGESTION_SELECT : undefined);
229
+ }
202
230
  },
203
231
  mounted: function mounted() {
204
232
  this.listenForFocusShortcuts();
@@ -248,15 +276,25 @@ var SearchBox = {
248
276
  this.normalizedSuggestions = suggestionsList;
249
277
  },
250
278
  selectedValue: function selectedValue(newVal, oldVal) {
251
- if (oldVal !== newVal && this.$data.currentValue !== newVal) {
279
+ if (!isEqual(newVal, oldVal) && (this.$options.isTagsMode ? !isEqual(this.$data.selectedTags, newVal) : this.$data.currentValue !== newVal)) {
252
280
  if (!newVal && this.$data.currentValue) {
253
281
  // selected value is cleared, call onValueSelected
254
282
  this.onValueSelectedHandler('', causes.CLEAR_VALUE);
283
+ } // if (this.$props.value === undefined) {
284
+
285
+
286
+ if (this.$options.isTagsMode) {
287
+ // handling reset of tags through SelectedFilters or URL
288
+ this.selectedTags = [];
255
289
  }
256
290
 
257
- if (this.$props.value === undefined) {
258
- this.setValue(newVal || '', true, this.$props);
291
+ var cause = !newVal ? causes.CLEAR_VALUE : undefined;
292
+
293
+ if (this.$options.isTagsMode) {
294
+ cause = causes.SUGGESTION_SELECT;
259
295
  }
296
+
297
+ this.setValue(newVal || '', true, this.$props, cause); // }
260
298
  }
261
299
  },
262
300
  focusShortcuts: function focusShortcuts() {
@@ -397,7 +435,40 @@ var SearchBox = {
397
435
  }
398
436
 
399
437
  var performUpdate = function performUpdate() {
400
- _this.currentValue = value;
438
+ if (_this.$options.isTagsMode && isEqual(value, _this.selectedTags)) {
439
+ return;
440
+ }
441
+
442
+ if (_this.$options.isTagsMode && cause === causes.SUGGESTION_SELECT) {
443
+ if (Array.isArray(_this.selectedTags) && _this.selectedTags.length) {
444
+ // check if value already present in selectedTags
445
+ if (typeof value === 'string' && _this.selectedTags.includes(value)) {
446
+ _this.isOpen = false;
447
+ return;
448
+ }
449
+
450
+ _this.selectedTags = [].concat(_this.selectedTags);
451
+
452
+ if (typeof value === 'string' && !!value) {
453
+ _this.selectedTags.push(value);
454
+ } else if (Array.isArray(value) && !isEqual(_this.selectedTags, value)) {
455
+ var mergedArray = Array.from(new Set([].concat(_this.selectedTags, value)));
456
+ _this.selectedTags = mergedArray;
457
+ }
458
+ } else if (value) {
459
+ _this.selectedTags = typeof value !== 'string' ? value : [].concat(value);
460
+ }
461
+
462
+ _this.currentValue = '';
463
+ } else {
464
+ _this.currentValue = decodeHtml(value);
465
+ }
466
+
467
+ var queryHandlerValue = value;
468
+
469
+ if (_this.$options.isTagsMode && cause === causes.SUGGESTION_SELECT) {
470
+ queryHandlerValue = Array.isArray(_this.selectedTags) && _this.selectedTags.length ? _this.selectedTags : undefined;
471
+ }
401
472
 
402
473
  if (isDefaultValue) {
403
474
  if (_this.$props.autosuggest) {
@@ -405,19 +476,19 @@ var SearchBox = {
405
476
  _this.isOpen = false;
406
477
  }
407
478
 
408
- _this.triggerDefaultQuery(value);
479
+ if (typeof _this.currentValue === 'string') _this.triggerDefaultQuery(_this.currentValue);
409
480
  } // in case of strict selection only SUGGESTION_SELECT should be able
410
481
  // to set the query otherwise the value should reset
411
482
 
412
483
 
413
484
  if (props.strictSelection) {
414
- if (cause === causes.SUGGESTION_SELECT || value === '') {
415
- _this.triggerCustomQuery(value, categoryValue);
485
+ if (cause === causes.SUGGESTION_SELECT || (_this.$options.isTagsMode ? _this.selectedTags.length === 0 : value === '')) {
486
+ _this.triggerCustomQuery(queryHandlerValue, _this.$options.isTagsMode ? undefined : categoryValue);
416
487
  } else {
417
488
  _this.setValue('', true);
418
489
  }
419
- } else if (props.value === undefined) {
420
- _this.triggerCustomQuery(value, categoryValue);
490
+ } else if (props.value === undefined || cause === causes.SUGGESTION_SELECT || cause === causes.CLEAR_VALUE) {
491
+ _this.triggerCustomQuery(queryHandlerValue, _this.$options.isTagsMode ? undefined : categoryValue);
421
492
  }
422
493
  } else {
423
494
  // debounce for handling text while typing
@@ -468,6 +539,11 @@ var SearchBox = {
468
539
  showFilter = _this$$props2.showFilter,
469
540
  URLParams = _this$$props2.URLParams;
470
541
  var value = typeof paramValue !== 'string' ? this.$data.currentValue : paramValue;
542
+
543
+ if (this.$options.isTagsMode) {
544
+ value = paramValue;
545
+ }
546
+
471
547
  var defaultQueryTobeSet = SearchBox.defaultQuery("" + value + (categoryValue ? " in " + categoryValue : ''), this.$props);
472
548
  var query = defaultQueryTobeSet;
473
549
 
@@ -552,10 +628,19 @@ var SearchBox = {
552
628
  this.onValueSelectedHandler('', causes.CLEAR_VALUE);
553
629
  },
554
630
  handleKeyDown: function handleKeyDown(event, highlightedIndex) {
631
+ if (highlightedIndex === void 0) {
632
+ highlightedIndex = null;
633
+ }
634
+
555
635
  // if a suggestion was selected, delegate the handling to suggestion handler
556
- if (event.key === 'Enter' && highlightedIndex === null) {
557
- this.setValue(event.target.value, true);
558
- this.onValueSelectedHandler(event.target.value, causes.ENTER_PRESS);
636
+ if (event.key === 'Enter') {
637
+ if (this.$props.autosuggest === false) {
638
+ this.enterButtonOnClick();
639
+ } else if (highlightedIndex === null) {
640
+ this.setValue(event.target.value, true, this.$props, this.$options.isTagsMode ? causes.SUGGESTION_SELECT : undefined // to handle tags
641
+ );
642
+ this.onValueSelectedHandler(event.target.value, causes.ENTER_PRESS);
643
+ }
559
644
  } // Need to review
560
645
 
561
646
 
@@ -598,13 +683,29 @@ var SearchBox = {
598
683
  if (value === undefined) {
599
684
  this.setValue(suggestion.value, true, this.$props, causes.SUGGESTION_SELECT, false, suggestion._category);
600
685
  } else {
601
- this.$emit('change', suggestion.value, function (_ref4) {
686
+ var emitValue = suggestion.value;
687
+
688
+ if (this.$options.isTagsMode) {
689
+ emitValue = Array.isArray(this.selectedTags) ? [].concat(this.selectedTags) : [];
690
+
691
+ if (this.selectedTags.includes(suggestion.value)) {
692
+ // avoid duplicates in tags array
693
+ this.isOpen = false;
694
+ return;
695
+ }
696
+
697
+ emitValue.push(suggestion.value);
698
+ }
699
+
700
+ this.setValue(emitValue, true, this.$props, causes.SUGGESTION_SELECT, false, suggestion._category);
701
+ this.$emit('change', emitValue, function (_ref4) {
602
702
  var isOpen = _ref4.isOpen;
603
- return _this3.triggerQuery({
703
+ return _this3.triggerQuery(_extends({
604
704
  isOpen: isOpen,
605
- value: suggestion.value,
705
+ value: emitValue
706
+ }, !_this3.$options.isTagsMode && {
606
707
  categoryValue: suggestion._category
607
- });
708
+ }));
608
709
  });
609
710
  }
610
711
 
@@ -727,6 +828,13 @@ var SearchBox = {
727
828
 
728
829
  return null;
729
830
  },
831
+ enterButtonOnClick: function enterButtonOnClick() {
832
+ this.triggerQuery({
833
+ isOpen: false,
834
+ value: this.currentValue,
835
+ customQuery: true
836
+ });
837
+ },
730
838
  renderEnterButtonElement: function renderEnterButtonElement() {
731
839
  var _this4 = this;
732
840
 
@@ -736,27 +844,19 @@ var SearchBox = {
736
844
  innerClass = _this$$props4.innerClass;
737
845
  var renderEnterButton = this.$scopedSlots.renderEnterButton;
738
846
 
739
- var enterButtonOnClick = function enterButtonOnClick() {
740
- return _this4.triggerQuery({
741
- isOpen: false,
742
- value: _this4.currentValue,
743
- customQuery: true
744
- });
745
- };
746
-
747
847
  if (enterButton) {
748
848
  var getEnterButtonMarkup = function getEnterButtonMarkup() {
749
849
  if (renderEnterButton) {
750
- return renderEnterButton(enterButtonOnClick);
850
+ return renderEnterButton(_this4.enterButtonOnClick);
751
851
  }
752
852
 
753
853
  return h(Button, {
754
- "class": "enter-btn " + getClassName(innerClass, 'enterButton'),
854
+ "class": "enter-btn " + getClassName(innerClass, 'enter-button'),
755
855
  "attrs": {
756
856
  "primary": true
757
857
  },
758
858
  "on": {
759
- "click": enterButtonOnClick
859
+ "click": _this4.enterButtonOnClick
760
860
  }
761
861
  }, ["Search"]);
762
862
  };
@@ -867,7 +967,7 @@ var SearchBox = {
867
967
  onAutofillClick: function onAutofillClick(suggestion) {
868
968
  var value = suggestion.value;
869
969
  this.isOpen = true;
870
- this.currentValue = value;
970
+ this.currentValue = decodeHtml(value);
871
971
  this.triggerDefaultQuery(value);
872
972
  },
873
973
  renderAutoFill: function renderAutoFill(suggestion) {
@@ -888,10 +988,79 @@ var SearchBox = {
888
988
  "click": handleAutoFillClick
889
989
  }
890
990
  });
991
+ },
992
+ renderTag: function renderTag(item) {
993
+ var _this7 = this;
994
+
995
+ var h = this.$createElement;
996
+ var innerClass = this.$props.innerClass;
997
+ return h(TagItem, {
998
+ "class": getClassName(innerClass, 'selected-tag') || ''
999
+ }, [h("span", [item]), h("span", {
1000
+ "attrs": {
1001
+ "role": "img",
1002
+ "aria-label": "delete-tag"
1003
+ },
1004
+ "class": "close-icon",
1005
+ "on": {
1006
+ "click": function click() {
1007
+ return _this7.clearTag(item);
1008
+ }
1009
+ }
1010
+ }, [h(CancelSvg)])]);
1011
+ },
1012
+ clearAllTags: function clearAllTags() {
1013
+ this.selectedTags = [];
1014
+ this.setValue('', true, this.$props, causes.SUGGESTION_SELECT);
1015
+
1016
+ if (this.$props.value !== undefined) {
1017
+ this.$emit('change', this.selectedTags, this.triggerQuery);
1018
+ }
1019
+ },
1020
+ clearTag: function clearTag(tagValue) {
1021
+ this.selectedTags = [].concat(this.selectedTags.filter(function (tag) {
1022
+ return tag !== tagValue;
1023
+ }));
1024
+ this.setValue('', true, this.$props, causes.SUGGESTION_SELECT);
1025
+
1026
+ if (this.$props.value !== undefined) {
1027
+ this.$emit('change', this.selectedTags, this.triggerQuery);
1028
+ }
1029
+ },
1030
+ renderTags: function renderTags() {
1031
+ var _this8 = this;
1032
+
1033
+ var h = this.$createElement;
1034
+
1035
+ if (!Array.isArray(this.selectedTags)) {
1036
+ return null;
1037
+ }
1038
+
1039
+ var tagsList = [].concat(this.selectedTags);
1040
+ var shouldRenderClearAllTag = tagsList.length > 1;
1041
+ var renderSelectedTags = this.$scopedSlots.renderSelectedTags || this.$props.renderSelectedTags;
1042
+ return renderSelectedTags ? renderSelectedTags({
1043
+ values: this.selectedTags,
1044
+ handleClear: this.clearTag,
1045
+ handleClearAll: this.clearAllTags
1046
+ }) : h(TagsContainer, [tagsList.map(function (item) {
1047
+ return _this8.renderTag(item);
1048
+ }), shouldRenderClearAllTag && h(TagItem, {
1049
+ "class": getClassName(this.$props.innerClass, 'selected-tag') || ''
1050
+ }, [h("span", ["Clear All"]), h("span", {
1051
+ "attrs": {
1052
+ "role": "img",
1053
+ "aria-label": "delete-tag"
1054
+ },
1055
+ "class": "close-icon",
1056
+ "on": {
1057
+ "click": this.clearAllTags
1058
+ }
1059
+ }, [h(CancelSvg)])])]);
891
1060
  }
892
1061
  },
893
1062
  render: function render() {
894
- var _this7 = this;
1063
+ var _this9 = this;
895
1064
 
896
1065
  var h = arguments[0];
897
1066
  var _this$$props6 = this.$props,
@@ -937,14 +1106,14 @@ var SearchBox = {
937
1106
  }
938
1107
  };
939
1108
 
940
- return h("div", [_this7.hasCustomRenderer && _this7.getComponent({
1109
+ return h("div", [_this9.hasCustomRenderer && _this9.getComponent({
941
1110
  isOpen: isOpen,
942
1111
  getItemProps: getItemProps,
943
1112
  getItemEvents: getItemEvents,
944
1113
  highlightedIndex: highlightedIndex
945
- }), _this7.renderErrorComponent(), !_this7.hasCustomRenderer && isOpen && hasSuggestions ? h("ul", {
946
- "class": suggestions(_this7.themePreset, theme) + " " + getClassName(_this7.$props.innerClass, 'list')
947
- }, [_this7.normalizedSuggestions.map(function (item, index) {
1114
+ }), _this9.renderErrorComponent(), !_this9.hasCustomRenderer && isOpen && hasSuggestions ? h("ul", {
1115
+ "class": suggestions(_this9.themePreset, theme) + " " + getClassName(_this9.$props.innerClass, 'list')
1116
+ }, [_this9.normalizedSuggestions.map(function (item, index) {
948
1117
  return renderItem ? h("li", {
949
1118
  "domProps": _extends({}, getItemProps({
950
1119
  item: item
@@ -954,7 +1123,7 @@ var SearchBox = {
954
1123
  })),
955
1124
  "key": index + 1 + "-" + item.value,
956
1125
  "style": {
957
- backgroundColor: _this7.getBackgroundColor(highlightedIndex, index),
1126
+ backgroundColor: _this9.getBackgroundColor(highlightedIndex, index),
958
1127
  justifyContent: 'flex-start',
959
1128
  alignItems: 'center'
960
1129
  }
@@ -967,7 +1136,7 @@ var SearchBox = {
967
1136
  })),
968
1137
  "key": index + 1 + "-" + item.value,
969
1138
  "style": {
970
- backgroundColor: _this7.getBackgroundColor(highlightedIndex, index),
1139
+ backgroundColor: _this9.getBackgroundColor(highlightedIndex, index),
971
1140
  justifyContent: 'flex-start',
972
1141
  alignItems: 'center'
973
1142
  }
@@ -978,61 +1147,61 @@ var SearchBox = {
978
1147
  }
979
1148
  }, [h(CustomSvg, {
980
1149
  "attrs": {
981
- "className": getClassName(_this7.$props.innerClass, item._suggestion_type + "-search-icon") || null,
1150
+ "className": getClassName(_this9.$props.innerClass, item._suggestion_type + "-search-icon") || null,
982
1151
  "icon": getIcon(item._suggestion_type),
983
1152
  "type": item._suggestion_type + "-search-icon"
984
1153
  }
985
1154
  })]), h(SuggestionItem, {
986
1155
  "attrs": {
987
- "currentValue": _this7.currentValue,
1156
+ "currentValue": _this9.currentValue,
988
1157
  "suggestion": item
989
1158
  }
990
- }), _this7.renderAutoFill(item)]);
991
- })]) : _this7.renderNoSuggestions(_this7.normalizedSuggestions)]);
1159
+ }), _this9.renderAutoFill(item)]);
1160
+ })]) : _this9.renderNoSuggestions(_this9.normalizedSuggestions)]);
992
1161
  };
993
1162
 
994
1163
  return h("div", {
995
1164
  "class": suggestionsContainer
996
- }, [h(InputGroup, [_this7.renderInputAddonBefore(), h(InputWrapper, [h(Input, {
1165
+ }, [h(InputGroup, [_this9.renderInputAddonBefore(), h(InputWrapper, [h(Input, {
997
1166
  "attrs": {
998
- "id": _this7.$props.componentId + "-input",
999
- "showIcon": _this7.$props.showIcon,
1000
- "showClear": _this7.$props.showClear,
1001
- "iconPosition": _this7.$props.iconPosition,
1002
- "placeholder": _this7.$props.placeholder,
1003
- "autoFocus": _this7.$props.autoFocus,
1004
- "themePreset": _this7.themePreset,
1167
+ "id": _this9.$props.componentId + "-input",
1168
+ "showIcon": _this9.$props.showIcon,
1169
+ "showClear": _this9.$props.showClear,
1170
+ "iconPosition": _this9.$props.iconPosition,
1171
+ "placeholder": _this9.$props.placeholder,
1172
+ "autoFocus": _this9.$props.autoFocus,
1173
+ "themePreset": _this9.themePreset,
1005
1174
  "autocomplete": "off"
1006
1175
  },
1007
- "ref": _this7.$props.innerRef,
1008
- "class": getClassName(_this7.$props.innerClass, 'input'),
1176
+ "ref": _this9.$props.innerRef,
1177
+ "class": getClassName(_this9.$props.innerClass, 'input'),
1009
1178
  "on": _extends({}, getInputEvents({
1010
- onInput: _this7.onInputChange,
1179
+ onInput: _this9.onInputChange,
1011
1180
  onBlur: function onBlur(e) {
1012
- _this7.$emit('blur', e, _this7.triggerQuery);
1181
+ _this9.$emit('blur', e, _this9.triggerQuery);
1013
1182
  },
1014
- onFocus: _this7.handleFocus,
1183
+ onFocus: _this9.handleFocus,
1015
1184
  onKeyPress: function onKeyPress(e) {
1016
- _this7.$emit('keyPress', e, _this7.triggerQuery);
1185
+ _this9.$emit('keyPress', e, _this9.triggerQuery);
1017
1186
 
1018
- _this7.$emit('key-press', e, _this7.triggerQuery);
1187
+ _this9.$emit('key-press', e, _this9.triggerQuery);
1019
1188
  },
1020
1189
  onKeyDown: function onKeyDown(e) {
1021
- return _this7.handleKeyDown(e, highlightedIndex);
1190
+ return _this9.handleKeyDown(e, highlightedIndex);
1022
1191
  },
1023
1192
  onKeyUp: function onKeyUp(e) {
1024
- _this7.$emit('keyUp', e, _this7.triggerQuery);
1193
+ _this9.$emit('keyUp', e, _this9.triggerQuery);
1025
1194
 
1026
- _this7.$emit('key-up', e, _this7.triggerQuery);
1195
+ _this9.$emit('key-up', e, _this9.triggerQuery);
1027
1196
  },
1028
1197
  onClick: function onClick() {
1029
1198
  setHighlightedIndex(null);
1030
1199
  }
1031
1200
  })),
1032
1201
  "domProps": _extends({}, getInputProps({
1033
- value: _this7.$data.currentValue === null ? '' : _this7.$data.currentValue
1202
+ value: _this9.$data.currentValue === null ? '' : _this9.$data.currentValue
1034
1203
  }))
1035
- }), _this7.renderIcons(), !expandSuggestionsContainer && renderSuggestionsDropdown()]), _this7.renderInputAddonAfter(), _this7.renderEnterButtonElement()]), expandSuggestionsContainer && renderSuggestionsDropdown()]);
1204
+ }), _this9.renderIcons(), !expandSuggestionsContainer && renderSuggestionsDropdown()]), _this9.renderInputAddonAfter(), _this9.renderEnterButtonElement()]), expandSuggestionsContainer && renderSuggestionsDropdown(), _this9.renderTags()]);
1036
1205
  }
1037
1206
  }
1038
1207
  }) : h("div", {
@@ -1048,26 +1217,22 @@ var SearchBox = {
1048
1217
  },
1049
1218
  "on": _extends({}, {
1050
1219
  blur: function blur(e) {
1051
- _this7.$emit('blur', e, _this7.triggerQuery);
1220
+ _this9.$emit('blur', e, _this9.triggerQuery);
1052
1221
  },
1053
1222
  keypress: function keypress(e) {
1054
- _this7.$emit('keyPress', e, _this7.triggerQuery);
1223
+ _this9.$emit('keyPress', e, _this9.triggerQuery);
1055
1224
 
1056
- _this7.$emit('key-press', e, _this7.triggerQuery);
1225
+ _this9.$emit('key-press', e, _this9.triggerQuery);
1057
1226
  },
1058
1227
  input: this.onInputChange,
1059
1228
  focus: function focus(e) {
1060
- _this7.$emit('focus', e, _this7.triggerQuery);
1061
- },
1062
- keydown: function keydown(e) {
1063
- _this7.$emit('keyDown', e, _this7.triggerQuery);
1064
-
1065
- _this7.$emit('key-down', e, _this7.triggerQuery);
1229
+ _this9.$emit('focus', e, _this9.triggerQuery);
1066
1230
  },
1231
+ keydown: this.handleKeyDown,
1067
1232
  keyup: function keyup(e) {
1068
- _this7.$emit('keyUp', e, _this7.triggerQuery);
1233
+ _this9.$emit('keyUp', e, _this9.triggerQuery);
1069
1234
 
1070
- _this7.$emit('key-up', e, _this7.triggerQuery);
1235
+ _this9.$emit('key-up', e, _this9.triggerQuery);
1071
1236
  }
1072
1237
  }),
1073
1238
  "domProps": _extends({}, {
@@ -1,41 +1,42 @@
1
1
  import '@appbaseio/reactivecore';
2
- import './_rollupPluginBabelHelpers-0f24d612.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-33de88e6.js';
10
- import './vueTypes-687b2304.js';
9
+ import './Button-d8bc15ea.js';
10
+ import './vueTypes-b8146772.js';
11
+ import './Pagination-784bf143.js';
11
12
  import './ReactiveList.js';
12
13
  import '@appbaseio/reactivecore/lib/utils/transform';
13
14
  import 'redux';
14
- import './index-78920565.js';
15
- import './ComponentWrapper-0f3431d1.js';
15
+ import './index-7788a843.js';
16
+ import './ComponentWrapper-424e86fd.js';
16
17
  import '@vue/babel-helper-vue-jsx-merge-props';
17
- import './Title-3522ff56.js';
18
- import './ListItem-8e8fb535.js';
19
- import './Card-6446f1b7.js';
20
- import './Flex-8770345d.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-42f547cd.js';
27
- import './CancelSvg-c2c03a35.js';
28
- import './Input-e339e63a.js';
27
+ import './DataSearch-4888aa43.js';
28
+ import './CancelSvg-4cfae5fd.js';
29
+ import './Input-7a2a9fac.js';
29
30
  import 'compute-scroll-into-view';
30
- import './Container-18b03fde.js';
31
+ import './Container-ba826e96.js';
31
32
  import 'vue-highlight-words';
32
- export { i as default } from './install-54ebd72e.js';
33
+ export { i as default } from './install-87984085.js';
33
34
  import '@appbaseio/reactivecore/lib/utils/suggestions';
34
- import './FormControlList-704f8dee.js';
35
- import './utils-64a2e5f0.js';
35
+ import './FormControlList-c22d64f6.js';
36
+ import './utils-9e68acee.js';
36
37
  import './SingleList.js';
37
38
  import './MultiList.js';
38
- import './DropDown-ff6ad982.js';
39
+ import './DropDown-05a644a5.js';
39
40
  import './SingleDropdownList.js';
40
41
  import './MultiDropdownList.js';
41
42
  import './ToggleButton.js';
@@ -46,8 +47,9 @@ import './MultiRange.js';
46
47
  import './ResultCard.js';
47
48
  import './ResultList.js';
48
49
  import 'vue-no-ssr';
49
- import './ssr-a41dfea9.js';
50
+ import './ssr-b2c0b401.js';
50
51
  import './RangeSlider.js';
51
52
  import './DynamicRangeSlider.js';
53
+ import '@appbaseio/reactivecore/lib/actions/value';
52
54
  import './StateProvider.js';
53
55
  import './RangeInput.js';
@@ -1,4 +1,4 @@
1
- import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-0f24d612.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-0f24d612.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.29.0";
1
+ var version = "2.0.0-alpha";
2
2
 
3
3
  export default version;