@appbaseio/reactivesearch-vue 1.26.0 → 1.27.0-gamma.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/@appbaseio/reactivesearch-vue.umd.js +1687 -436
  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/{ComponentWrapper-32481890.js → ComponentWrapper-10bad289.js} +1 -1
  6. package/dist/cjs/DataSearch-37dfdf39.js +2154 -0
  7. package/dist/cjs/DataSearch.js +18 -2101
  8. package/dist/cjs/{DropDown-cf9bfffc.js → DropDown-0076babc.js} +16 -11
  9. package/dist/cjs/DynamicRangeSlider.js +40 -7
  10. package/dist/cjs/{Input-3cc3fa59.js → Input-a9ee53ed.js} +1 -1
  11. package/dist/cjs/MultiDropdownList.js +6 -5
  12. package/dist/cjs/MultiList.js +16 -11
  13. package/dist/cjs/MultiRange.js +2 -2
  14. package/dist/cjs/RangeInput.js +7 -3
  15. package/dist/cjs/RangeSlider.js +2 -2
  16. package/dist/cjs/ReactiveBase.js +1 -1
  17. package/dist/cjs/ReactiveComponent.js +2 -2
  18. package/dist/cjs/ReactiveList.js +13 -3
  19. package/dist/cjs/SelectedFilters.js +1 -1
  20. package/dist/cjs/SingleDropdownList.js +5 -4
  21. package/dist/cjs/SingleList.js +3 -3
  22. package/dist/cjs/SingleRange.js +2 -2
  23. package/dist/cjs/StateProvider.js +1 -1
  24. package/dist/cjs/ToggleButton.js +2 -2
  25. package/dist/cjs/{index-89c39a9e.js → index-4509aa45.js} +10 -4
  26. package/dist/cjs/index.js +11 -10
  27. package/dist/cjs/install-b7a80fc1.js +1196 -0
  28. package/dist/cjs/install.js +25 -30
  29. package/dist/cjs/version.js +1 -1
  30. package/dist/es/{ComponentWrapper-4f85a67e.js → ComponentWrapper-0f3431d1.js} +1 -1
  31. package/dist/es/DataSearch-77325036.js +2141 -0
  32. package/dist/es/DataSearch.js +17 -2100
  33. package/dist/es/{DropDown-c8da0a2c.js → DropDown-0dd8f2a3.js} +16 -11
  34. package/dist/es/DynamicRangeSlider.js +40 -7
  35. package/dist/es/{Input-08bb1bcf.js → Input-10b1d62d.js} +1 -1
  36. package/dist/es/MultiDropdownList.js +6 -5
  37. package/dist/es/MultiList.js +16 -11
  38. package/dist/es/MultiRange.js +2 -2
  39. package/dist/es/RangeInput.js +7 -3
  40. package/dist/es/RangeSlider.js +2 -2
  41. package/dist/es/ReactiveBase.js +1 -1
  42. package/dist/es/ReactiveComponent.js +2 -2
  43. package/dist/es/ReactiveList.js +13 -3
  44. package/dist/es/SelectedFilters.js +1 -1
  45. package/dist/es/SingleDropdownList.js +5 -4
  46. package/dist/es/SingleList.js +3 -3
  47. package/dist/es/SingleRange.js +2 -2
  48. package/dist/es/StateProvider.js +1 -1
  49. package/dist/es/ToggleButton.js +2 -2
  50. package/dist/es/{index-cb1950b6.js → index-78920565.js} +10 -4
  51. package/dist/es/index.js +7 -7
  52. package/dist/es/install-86388b0e.js +1189 -0
  53. package/dist/es/install.js +23 -32
  54. package/dist/es/version.js +1 -1
  55. package/package.json +3 -3
@@ -13264,10 +13264,16 @@
13264
13264
  }; // parses current array (i.e. this.$props.value) for `onChange` callback for multi-* components
13265
13265
 
13266
13266
  function parseValueArray(objectValues, currentValue) {
13267
- var keys = Object.keys(objectValues);
13268
- var selectedValues = keys.map(function (key) {
13269
- return objectValues[key] ? key : null;
13270
- });
13267
+ var selectedValues;
13268
+
13269
+ if (Array.isArray(objectValues)) {
13270
+ selectedValues = [].concat(objectValues);
13271
+ } else {
13272
+ var keys = Object.keys(objectValues);
13273
+ selectedValues = keys.map(function (key) {
13274
+ return objectValues[key] ? key : null;
13275
+ });
13276
+ }
13271
13277
 
13272
13278
  if (selectedValues.includes(currentValue)) {
13273
13279
  return selectedValues.filter(function (item) {
@@ -14082,6 +14088,12 @@
14082
14088
  });
14083
14089
  }
14084
14090
 
14091
+ if (this.urlSortOption) {
14092
+ this.sortOptionIndex = this.$props.sortOptions.findIndex(function (s) {
14093
+ return s.label === _this.urlSortOption;
14094
+ }) || 0;
14095
+ }
14096
+
14085
14097
  this.updateComponentProps(this.componentId, {
14086
14098
  from: this.from
14087
14099
  }, constants_1$1.reactiveList);
@@ -14390,7 +14402,7 @@
14390
14402
  "labelPosition": this.sortOptions ? 'right' : 'left'
14391
14403
  },
14392
14404
  "class": getClassName$1(this.$props.innerClass, 'resultsInfo')
14393
- }, [this.sortOptions ? this.renderSortOptions() : null, this.$props.showResultStats && results.length ? this.renderStats() : null]), !this.isLoading && results.length === 0 ? this.renderNoResult() : null, this.shouldRenderPagination && (this.$props.paginationAt === 'top' || this.$props.paginationAt === 'both') ? h(Pagination, {
14405
+ }, [this.sortOptions ? this.renderSortOptions() : null, this.$props.showResultStats && results.length ? this.renderStats() : null]), !this.isLoading && hits && hits.length === 0 ? this.renderNoResult() : null, this.shouldRenderPagination && (this.$props.paginationAt === 'top' || this.$props.paginationAt === 'both') ? h(Pagination, {
14394
14406
  "attrs": {
14395
14407
  "pages": this.$props.pages,
14396
14408
  "totalPages": this.totalPages,
@@ -14598,8 +14610,11 @@
14598
14610
  sortBy: sortBy
14599
14611
  }, constants_1$1.reactiveList);
14600
14612
  this.setQueryOptions(this.$props.componentId, options, true);
14613
+ this.setPage(0);
14601
14614
  this.currentPageState = 0;
14602
14615
  this.from = 0;
14616
+ var sortOption = this.$props.sortOptions[this.sortOptionIndex] ? this.$props.sortOptions[this.sortOptionIndex].label : null;
14617
+ this.setPageURL(this.$props.componentId + "sortOption", sortOption, this.$props.componentId + "sortOption", false, this.$props.URLParams);
14603
14618
  }
14604
14619
  },
14605
14620
  triggerClickAnalytics: function triggerClickAnalytics(searchPosition, documentId) {
@@ -14711,6 +14726,7 @@
14711
14726
  var mapStateToProps$1 = function mapStateToProps(state, props) {
14712
14727
  return {
14713
14728
  defaultPage: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value - 1,
14729
+ urlSortOption: state.selectedValues[props.componentId + "sortOption"] && state.selectedValues[props.componentId + "sortOption"].value,
14714
14730
  hits: state.hits[props.componentId] && state.hits[props.componentId].hits,
14715
14731
  rawData: state.rawData[props.componentId],
14716
14732
  aggregationData: state.compositeAggregations[props.componentId],
@@ -17929,7 +17945,7 @@
17929
17945
  });
17930
17946
 
17931
17947
  var suggestions$1 = function suggestions(themePreset, theme) {
17932
- return css(_templateObject14 || (_templateObject14 = _taggedTemplateLiteralLoose(["\n\tdisplay: block;\n\twidth: 100%;\n\tborder: 1px solid #ccc;\n\tborder-top: none;\n\tbackground-color: #fff;\n\tfont-size: 0.9rem;\n\tz-index: 3;\n\tposition: absolute;\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n\tmax-height: 395px;\n\toverflow-y: auto;\n\n\t&.small {\n\t\ttop: 30px;\n\t}\n\n\tli {\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\tcursor: pointer;\n\t\tpadding: 10px;\n\t\tuser-select: none;\n\n\t\t& > .trim {\n\t\t\tdisplay: -webkit-box;\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t\tmax-height: 2.3rem;\n\t\t\tline-height: 1.2rem;\n\t\t\t-webkit-line-clamp: 2;\n\t\t\t-webkit-box-orient: vertical;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\twhite-space: nowrap;\n\t\t}\n\n\t\t&:hover,\n\t\t&:focus {\n\t\t\tbackground-color: #eee;\n\t\t}\n\t}\n\n\t", ";\n"])), themePreset === 'dark' && theme && dark$1(theme));
17948
+ return css(_templateObject14 || (_templateObject14 = _taggedTemplateLiteralLoose(["\n\tdisplay: block;\n\twidth: 100%;\n\tborder: 1px solid #ccc;\n\tborder-top: none;\n\tbackground-color: #fff;\n\tfont-size: 0.9rem;\n\tz-index: 3;\n\tposition: absolute;\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n\tmax-height: min(100vh, 395px);\n\toverflow-y: auto;\n\n\t&.small {\n\t\ttop: 30px;\n\t}\n\n\tli {\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\tcursor: pointer;\n\t\tpadding: 10px;\n\t\tuser-select: none;\n\n\t\t& > .trim {\n\t\t\tdisplay: -webkit-box;\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t\tmax-height: 2.3rem;\n\t\t\tline-height: 1.2rem;\n\t\t\t-webkit-line-clamp: 2;\n\t\t\t-webkit-box-orient: vertical;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\twhite-space: nowrap;\n\t\t}\n\n\t\t&:hover,\n\t\t&:focus {\n\t\t\tbackground-color: #eee;\n\t\t}\n\t}\n\n\t", ";\n"])), themePreset === 'dark' && theme && dark$1(theme));
17933
17949
  };
17934
17950
 
17935
17951
  var suggestionsContainer = css(_templateObject15 || (_templateObject15 = _taggedTemplateLiteralLoose(["\n\tposition: relative;\n\t.cancel-icon {\n\t\tcursor: pointer;\n\t}\n"])));
@@ -18969,19 +18985,22 @@
18969
18985
  title = _this$suggestion.title,
18970
18986
  description = _this$suggestion.description,
18971
18987
  image = _this$suggestion.image,
18972
- isPredictiveSuggestion = _this$suggestion.isPredictiveSuggestion;
18988
+ isPredictiveSuggestion = _this$suggestion.isPredictiveSuggestion,
18989
+ _suggestion_type = _this$suggestion._suggestion_type,
18990
+ _category = _this$suggestion._category;
18973
18991
 
18974
18992
  if (label) {
18975
18993
  // label has highest precedence
18976
18994
  return typeof label === 'string' ? h("div", {
18977
18995
  "class": "trim"
18978
- }, [isPredictiveSuggestion ? h(PredictiveSuggestion, {
18996
+ }, [(_category ? false : isPredictiveSuggestion // eslint-disable-next-line
18997
+ || !!_suggestion_type) ? h(PredictiveSuggestion, {
18979
18998
  "domProps": {
18980
18999
  "innerHTML": label
18981
19000
  }
18982
19001
  }) : h(VueHighlightWords, {
18983
19002
  "attrs": {
18984
- "searchWords": this.currentValue.split(' '),
19003
+ "searchWords": _category ? [_category] : this.currentValue.split(' '),
18985
19004
  "textToHighlight": label,
18986
19005
  "autoEscape": true,
18987
19006
  "highlightStyle": highlightStyle
@@ -19050,17 +19069,22 @@
19050
19069
  };
19051
19070
 
19052
19071
  var SearchSvg = {
19053
- functional: true,
19054
- render: function render(h) {
19072
+ name: 'SearchSvg',
19073
+ props: ['styles'],
19074
+ render: function render() {
19075
+ var h = arguments[0];
19055
19076
  return h("svg", {
19056
19077
  "attrs": {
19057
19078
  "alt": "Search",
19058
- "height": "14",
19059
- "width": "10",
19079
+ "height": "12",
19060
19080
  "xmlns": "http://www.w3.org/2000/svg",
19061
19081
  "viewBox": "0 0 15 15"
19062
19082
  },
19063
- "class": "search-icon"
19083
+ "class": "search-icon",
19084
+ "style": _extends({
19085
+ transform: 'scale(1.35)',
19086
+ position: 'relative'
19087
+ }, this.$props.styles ? this.$props.styles : {})
19064
19088
  }, [h("title", ["Search"]), h("path", {
19065
19089
  "attrs": {
19066
19090
  "d": 'M6.02945,10.20327a4.17382,4.17382,0,1,1,4.17382-4.17382A4.15609,4.15609,0,0,1,6.02945,10.20327Zm9.69195,4.2199L10.8989,9.59979A5.88021,5.88021,0,0,0,12.058,6.02856,6.00467,6.00467,0,1,0,9.59979,10.8989l4.82338,4.82338a.89729.89729,0,0,0,1.29912,0,.89749.89749,0,0,0-.00087-1.29909Z'
@@ -19732,11 +19756,11 @@
19732
19756
  }, [this.customIcon]);
19733
19757
  }
19734
19758
 
19735
- if (this.$props.type === 'popular-search-icon') {
19759
+ if (this.$props.type === 'recent-search-icon') {
19736
19760
  return h("svg", {
19737
19761
  "attrs": {
19738
19762
  "xmlns": "http://www.w3.org/2000/svg",
19739
- "alt": "Popular Searches",
19763
+ "alt": "Recent Search",
19740
19764
  "height": "20",
19741
19765
  "width": "20",
19742
19766
  "viewBox": "0 0 24 24"
@@ -19752,14 +19776,36 @@
19752
19776
  }
19753
19777
  }), h("path", {
19754
19778
  "attrs": {
19755
- "d": "M16 6l2.29 2.29-4.88 4.88-4-4L2 16.59 3.41 18l6-6 4 4 6.3-6.29L22 12V6z"
19779
+ "d": "M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"
19756
19780
  }
19757
19781
  })]);
19758
- } else {
19782
+ }
19783
+
19784
+ if (this.$props.type === 'promoted-search-icon') {
19785
+ return h("svg", {
19786
+ "attrs": {
19787
+ "xmlns": "http://www.w3.org/2000/svg",
19788
+ "width": "20",
19789
+ "alt": "promoted search",
19790
+ "height": "20",
19791
+ "viewBox": "0 0 24 24"
19792
+ },
19793
+ "class": this.$props.className,
19794
+ "style": {
19795
+ fill: '#707070'
19796
+ }
19797
+ }, [h("path", {
19798
+ "attrs": {
19799
+ "d": "M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"
19800
+ }
19801
+ })]);
19802
+ }
19803
+
19804
+ if (this.$props.type === 'popular-search-icon') {
19759
19805
  return h("svg", {
19760
19806
  "attrs": {
19761
19807
  "xmlns": "http://www.w3.org/2000/svg",
19762
- "alt": "Recent Searches",
19808
+ "alt": "Popular Search",
19763
19809
  "height": "20",
19764
19810
  "width": "20",
19765
19811
  "viewBox": "0 0 24 24"
@@ -19775,10 +19821,21 @@
19775
19821
  }
19776
19822
  }), h("path", {
19777
19823
  "attrs": {
19778
- "d": "M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"
19824
+ "d": "M16 6l2.29 2.29-4.88 4.88-4-4L2 16.59 3.41 18l6-6 4 4 6.3-6.29L22 12V6z"
19779
19825
  }
19780
19826
  })]);
19781
19827
  }
19828
+
19829
+ return h(SearchSvg, {
19830
+ "attrs": {
19831
+ "styles": {
19832
+ position: 'relative',
19833
+ fill: '#707070',
19834
+ left: '3px',
19835
+ marginRight: '8px'
19836
+ }
19837
+ }
19838
+ });
19782
19839
  }
19783
19840
  };
19784
19841
 
@@ -21022,217 +21079,1364 @@
21022
21079
 
21023
21080
  DataSearch.componentType = constants_1$1.dataSearch;
21024
21081
 
21025
- var _templateObject$j, _templateObject2$7, _templateObject3$6, _templateObject4$5, _templateObject5$3, _templateObject6$3;
21026
- var item = {
21027
- width: '15px',
21028
- height: '15px',
21029
- scale: '4px'
21030
- };
21031
- var vh = css(_templateObject$j || (_templateObject$j = _taggedTemplateLiteralLoose(["\n\tborder: 0;\n\tclip: rect(1px, 1px, 1px, 1px);\n\tclip-path: inset(50%);\n\theight: 1px;\n\toverflow: hidden;\n\tpadding: 0;\n\tposition: absolute;\n\twidth: 1px;\n\twhite-space: nowrap;\n"])));
21032
- var hideInputControl = css(_templateObject2$7 || (_templateObject2$7 = _taggedTemplateLiteralLoose(["\n\t+ label {\n\t\tpadding-left: 0;\n\n\t\t&::before,\n\t\t&::after {\n\t\t\twidth: 0;\n\t\t\theight: 0;\n\t\t\tborder: 0;\n\t\t\tmargin: 0;\n\t\t\tvisibility: hidden;\n\t\t}\n\t}\n\n\t&:checked {\n\t\t+ label {\n\t\t\tfont-weight: bold;\n\t\t}\n\t}\n"])));
21033
-
21034
- var formItem = function formItem(_ref) {
21035
- var theme = _ref.theme;
21036
- return css(_templateObject3$6 || (_templateObject3$6 = _taggedTemplateLiteralLoose(["\n\t", ";\n\n\t&:focus {\n\t\t+ label {\n\t\t\t&::before {\n\t\t\t\tbox-shadow: 0 0 0 2px ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t&:hover {\n\t\t+ label {\n\t\t\t&::before {\n\t\t\t\tborder-color: ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t&:active {\n\t\t+ label {\n\t\t\t&::before {\n\t\t\t\ttransition-duration: 0;\n\t\t\t}\n\t\t}\n\t}\n\n\t+ label {\n\t\tposition: relative;\n\t\tuser-select: none;\n\t\tdisplay: flex;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\talign-items: center;\n\t\tcursor: pointer;\n\n\t\t&::before {\n\t\t\tbackground-color: #fff;\n\t\t\tborder: 1px solid ", ";\n\t\t\tbox-sizing: content-box;\n\t\t\tcontent: '';\n\t\t\tcolor: ", ";\n\t\t\tmargin-right: calc(", " * 0.5);\n\t\t\ttop: 50%;\n\t\t\tleft: 0;\n\t\t\twidth: ", ";\n\t\t\theight: ", ";\n\t\t\tdisplay: inline-block;\n\t\t\tvertical-align: middle;\n\t\t}\n\n\t\t&::after {\n\t\t\tbox-sizing: content-box;\n\t\t\tcontent: '';\n\t\t\tbackground-color: ", ";\n\t\t\tposition: absolute;\n\t\t\ttop: 50%;\n\t\t\tleft: calc(1px + ", " / 2);\n\t\t\twidth: calc(", " - ", ");\n\t\t\theight: calc(", " - ", ");\n\t\t\tmargin-top: calc(", " / -2 - ", " / -2);\n\t\t\ttransform: scale(0);\n\t\t\ttransform-origin: 50%;\n\t\t\ttransition: transform 200ms ease-out;\n\t\t}\n\t}\n"])), vh, curriedLighten(0.4, theme.colors.primaryColor), theme.colors.primaryColor, theme.colors.borderColor || curriedLighten(0.1, theme.colors.textColor), theme.colors.primaryColor, item.width, item.width, item.height, theme.colors.primaryColor, item.scale, item.width, item.scale, item.height, item.scale, item.height, item.scale);
21037
- };
21038
-
21039
- var Radio = index$1('input')(_templateObject4$5 || (_templateObject4$5 = _taggedTemplateLiteralLoose(["\n\t", ";\n\t", ";\n\n\t+ label {\n\t\t&::before,\n\t\t&::after {\n\t\t\tborder-radius: 50%;\n\t\t}\n\t}\n\n\t&:checked {\n\t\t&:active,\n\t\t&:focus {\n\t\t\t+ label {\n\t\t\t\tcolor: ", ";\n\n\t\t\t\t&::before {\n\t\t\t\t\tanimation: none;\n\t\t\t\t\tfilter: none;\n\t\t\t\t\ttransition: none;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t+ label {\n\t\t\t&::before {\n\t\t\t\tanimation: none;\n\t\t\t\tbackground-color: #fff;\n\t\t\t\tborder-color: ", ";\n\t\t}\n\n\t\t&::after {\n\t\t\ttransform: scale(1);\n\t\t}\n\t}\n"])), formItem, function (props) {
21040
- return props.show ? null : hideInputControl;
21041
- }, function (_ref2) {
21042
- var theme = _ref2.theme;
21043
- return theme.colors.primaryColor;
21044
- }, function (_ref3) {
21045
- var theme = _ref3.theme;
21046
- return theme.colors.primaryColor;
21047
- });
21048
- var Checkbox = index$1('input')(_templateObject5$3 || (_templateObject5$3 = _taggedTemplateLiteralLoose(["\n\t", ";\n\t", ";\n\n\t+ label {\n\t\t&::before,\n\t\t&::after {\n\t\t\tborder-radius: 0;\n\t\t}\n\n\t\t&::after {\n\t\t\tbackground-color: transparent;\n\t\t\ttop: 50%;\n\t\t\tleft: calc(1px + ", " / 5);\n\t\t\twidth: calc(", " / 2);\n\t\t\theight: calc(", " / 5);\n\t\t\tmargin-top: calc(", " / -2 / 2 * 0.8);\n\t\t\tborder-style: solid;\n\t\t\tborder-color: ", ";\n\t\t\tborder-width: 0 0 2px 2px;\n\t\t\tborder-radius: 0;\n\t\t\tborder-image: none;\n\t\t\ttransform: rotate(-45deg) scale(0);\n\t\t\ttransition: none;\n\t\t}\n\t}\n\n\t&:checked {\n\t\t+ label {\n\t\t\t&::before {\n\t\t\t\tborder-color: ", ";\n\t\t\t}\n\n\t\t\t&::after {\n\t\t\t\tcontent: '';\n\t\t\t\ttransform: rotate(-45deg) scale(1);\n\t\t\t\ttransition: transform 200ms ease-out;\n\t\t\t}\n\t\t}\n\t}\n"])), formItem, function (props) {
21049
- return props.show ? null : hideInputControl;
21050
- }, item.width, item.width, item.width, item.height, function (_ref4) {
21051
- var theme = _ref4.theme;
21052
- return theme.colors.primaryColor;
21053
- }, function (_ref5) {
21054
- var theme = _ref5.theme;
21055
- return theme.colors.primaryColor;
21056
- });
21057
- var UL = index$1('ul')(_templateObject6$3 || (_templateObject6$3 = _taggedTemplateLiteralLoose(["\n\tlist-style: none;\n\tpadding: 0;\n\tmargin: 0;\n\tmax-height: 240px;\n\tposition: relative;\n\toverflow-y: auto;\n\tpadding-bottom: 12px;\n\n\tli {\n\t\theight 30px;\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\talign-items: center;\n\t\tpadding-left: 2px;\n\t}\n"])));
21058
-
21059
- var getAggsOrder = lib_8.getAggsOrder;
21060
-
21061
- var extractQuery = function extractQuery(props) {
21062
- var queryToBeReturned = {};
21063
-
21064
- if (props.defaultQuery) {
21065
- var evaluateQuery = props.defaultQuery([], props);
21066
-
21067
- if (evaluateQuery) {
21068
- if (evaluateQuery.query) {
21069
- queryToBeReturned.query = evaluateQuery.query;
21082
+ var _templateObject$j;
21083
+ var AutofillSvgIcon = index$1('button')(_templateObject$j || (_templateObject$j = _taggedTemplateLiteralLoose(["\n\tdisplay: flex;\n\tmargin-left: auto;\n\tposition: relative;\n\tright: -3px;\n\tborder: none;\n\toutline: none;\n\tbackground: transparent;\n\tpadding: 0;\n\tz-index: 111000;\n\n\tsvg {\n\t\tcursor: pointer;\n\t\tfill: #707070;\n\t\theight: 20px;\n\t}\n\n\t&:hover {\n\t\tsvg {\n\t\t\tfill: #1c1a1a;\n\t\t}\n\t}\n"])));
21084
+ var AutoFillSvg = {
21085
+ name: 'AutoFillSvg',
21086
+ render: function render() {
21087
+ var h = arguments[0];
21088
+ return h(AutofillSvgIcon, {
21089
+ "on": {
21090
+ "click": this.$listeners.click
21070
21091
  }
21071
-
21072
- if (evaluateQuery.aggs) {
21073
- queryToBeReturned.aggs = evaluateQuery.aggs;
21092
+ }, [h("svg", {
21093
+ "attrs": {
21094
+ "viewBox": "0 0 24 24"
21074
21095
  }
21075
- }
21076
- }
21077
-
21078
- return queryToBeReturned;
21079
- }; // eslint-disable-next-line import/prefer-default-export
21080
-
21081
-
21082
- var getAggsQuery = function getAggsQuery(query, props) {
21083
- var _clonedQuery$aggs;
21084
-
21085
- var clonedQuery = query;
21086
- var dataField = props.dataField,
21087
- size = props.size,
21088
- sortBy = props.sortBy,
21089
- showMissing = props.showMissing,
21090
- missingLabel = props.missingLabel;
21091
- clonedQuery.size = 0;
21092
- clonedQuery.aggs = (_clonedQuery$aggs = {}, _clonedQuery$aggs[dataField] = {
21093
- terms: _extends({
21094
- field: dataField,
21095
- size: size,
21096
- order: getAggsOrder(sortBy || 'count')
21097
- }, showMissing ? {
21098
- missing: missingLabel
21099
- } : {})
21100
- }, _clonedQuery$aggs);
21101
-
21102
- if (props.nestedField) {
21103
- clonedQuery.aggs = {
21104
- reactivesearch_nested: {
21105
- nested: {
21106
- path: props.nestedField
21107
- },
21108
- aggs: clonedQuery.aggs
21096
+ }, [h("path", {
21097
+ "attrs": {
21098
+ "d": "M8 17v-7.586l8.293 8.293c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414l-8.293-8.293h7.586c0.552 0 1-0.448 1-1s-0.448-1-1-1h-10c-0.552 0-1 0.448-1 1v10c0 0.552 0.448 1 1 1s1-0.448 1-1z"
21109
21099
  }
21110
- };
21100
+ })])]);
21101
+ },
21102
+ methods: {
21103
+ clicked: function clicked(e) {
21104
+ e.stopPropagation();
21105
+ window.console.log('hey', e);
21106
+ }
21111
21107
  }
21112
-
21113
- return _extends({}, clonedQuery, extractQuery(props));
21114
21108
  };
21115
21109
 
21116
21110
  var updateQuery$2 = lib_5.updateQuery,
21117
- setQueryOptions$2 = lib_5.setQueryOptions,
21118
21111
  setCustomQuery$1 = lib_5.setCustomQuery,
21119
- setDefaultQuery$2 = lib_5.setDefaultQuery;
21120
- var getQueryOptions$1 = lib_8.getQueryOptions,
21112
+ setDefaultQuery$2 = lib_5.setDefaultQuery,
21113
+ recordSuggestionClick$1 = lib_5.recordSuggestionClick;
21114
+ var _debounce = lib_8.debounce,
21121
21115
  checkValueChange$1 = lib_8.checkValueChange,
21122
21116
  getClassName$4 = lib_8.getClassName,
21123
- getOptionsFromQuery$2 = lib_8.getOptionsFromQuery,
21124
- isEqual$5 = lib_8.isEqual;
21125
- var SingleList = {
21126
- name: 'SingleList',
21127
- props: {
21128
- beforeValueChange: types.func,
21129
- className: VueTypes.string.def(''),
21130
- componentId: types.stringRequired,
21131
- customQuery: types.func,
21132
- dataField: types.stringRequired,
21133
- defaultValue: types.string,
21134
- value: types.value,
21135
- defaultQuery: types.func,
21136
- filterLabel: types.string,
21137
- innerClass: types.style,
21138
- placeholder: VueTypes.string.def('Search'),
21139
- react: types.react,
21140
- render: types.func,
21141
- renderItem: types.func,
21142
- renderNoResults: VueTypes.any,
21143
- transformData: types.func,
21144
- selectAllLabel: types.string,
21145
- showCount: VueTypes.bool.def(true),
21146
- showFilter: VueTypes.bool.def(true),
21147
- showRadio: VueTypes.bool.def(true),
21148
- showSearch: VueTypes.bool.def(true),
21149
- size: VueTypes.number,
21150
- sortBy: VueTypes.oneOf(['asc', 'desc', 'count']).def('count'),
21151
- title: types.title,
21152
- URLParams: VueTypes.bool.def(false),
21153
- showMissing: VueTypes.bool.def(false),
21154
- missingLabel: VueTypes.string.def('N/A'),
21155
- nestedField: types.string,
21156
- index: VueTypes.string,
21157
- enableStrictSelection: VueTypes.bool.def(false)
21158
- },
21117
+ isEqual$5 = lib_8.isEqual,
21118
+ getCompositeAggsQuery$2 = lib_8.getCompositeAggsQuery,
21119
+ withClickIds$1 = lib_8.withClickIds,
21120
+ getResultStats$2 = lib_8.getResultStats,
21121
+ normalizeDataField$1 = lib_8.normalizeDataField;
21122
+ var SearchBox = {
21123
+ name: 'SearchBox',
21159
21124
  data: function data() {
21160
21125
  var props = this.$props;
21161
21126
  this.__state = {
21162
21127
  currentValue: '',
21163
- modifiedOptions: [],
21164
- searchTerm: ''
21128
+ isOpen: false,
21129
+ normalizedSuggestions: []
21165
21130
  };
21166
21131
  this.internalComponent = props.componentId + "__internal";
21167
21132
  return this.__state;
21168
21133
  },
21169
- created: function created() {
21170
- if (!this.enableAppbase && this.$props.index) {
21171
- console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
21134
+ inject: {
21135
+ theme: {
21136
+ from: 'theme_reactivesearch'
21172
21137
  }
21138
+ },
21139
+ created: function created() {
21140
+ var _this$$props = this.$props,
21141
+ distinctField = _this$$props.distinctField,
21142
+ distinctFieldConfig = _this$$props.distinctFieldConfig,
21143
+ index = _this$$props.index;
21173
21144
 
21174
- var props = this.$props;
21175
- this.modifiedOptions = this.options && this.options[props.dataField] ? this.options[props.dataField].buckets : []; // Set custom and default queries in store
21145
+ if (this.enableAppbase && this.aggregationField && this.aggregationField !== '') {
21146
+ console.warn('Warning(ReactiveSearch): The `aggregationField` prop has been marked as deprecated, please use the `distinctField` prop instead.');
21147
+ }
21176
21148
 
21177
- updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
21178
- updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, this.currentValue);
21179
- },
21180
- beforeMount: function beforeMount() {
21181
- this.updateQueryHandlerOptions(this.$props);
21149
+ if (!this.enableAppbase && (distinctField || distinctFieldConfig)) {
21150
+ console.warn('Warning(ReactiveSearch): In order to use the `distinctField` and `distinctFieldConfig` props, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
21151
+ }
21182
21152
 
21183
- if (this.selectedValue) {
21184
- this.setValue(this.selectedValue);
21185
- } else if (this.$props.value) {
21186
- this.setValue(this.$props.value);
21187
- } else if (this.$props.defaultValue) {
21188
- this.setValue(this.$props.defaultValue);
21153
+ if (!this.enableAppbase && index) {
21154
+ console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
21189
21155
  }
21156
+
21157
+ this.currentValue = this.selectedValue || this.value || this.defaultValue || '';
21158
+ this.handleTextChange = _debounce(this.handleText, this.$props.debounce);
21159
+ this.setValue(this.currentValue, true, this.$props, undefined, false, this.selectedCategory); // Set custom and default queries in store
21160
+
21161
+ this.triggerCustomQuery(this.currentValue, this.selectedCategory);
21162
+ this.triggerDefaultQuery(this.currentValue);
21190
21163
  },
21191
- watch: {
21192
- options: function options(newVal) {
21193
- if (newVal) {
21194
- this.modifiedOptions = newVal[this.$props.dataField] ? newVal[this.$props.dataField].buckets : [];
21195
- }
21196
- },
21197
- size: function size() {
21198
- this.updateQueryHandlerOptions(this.$props);
21199
- },
21200
- sortBy: function sortBy() {
21201
- this.updateQueryHandlerOptions(this.$props);
21202
- },
21203
- dataField: function dataField() {
21204
- this.updateQueryHandlerOptions(this.$props);
21205
- this.updateQueryHandler(this.$data.currentValue, this.$props);
21206
- },
21207
- defaultValue: function defaultValue(newVal) {
21208
- this.setValue(newVal);
21209
- },
21210
- value: function value(newVal, oldVal) {
21211
- if (!isEqual$5(newVal, oldVal)) {
21212
- this.setValue(newVal);
21213
- }
21214
- },
21215
- selectedValue: function selectedValue(newVal) {
21216
- if (this.$data.currentValue !== newVal) {
21217
- this.setValue(newVal || '');
21218
- }
21219
- },
21220
- defaultQuery: function defaultQuery(newVal, oldVal) {
21221
- if (!isQueryIdentical(newVal, oldVal, this.$data.currentValue, this.$props)) {
21222
- this.updateDefaultQueryHandler(this.$data.currentValue, this.$props);
21223
- }
21164
+ computed: {
21165
+ hasCustomRenderer: function hasCustomRenderer$1() {
21166
+ return hasCustomRenderer(this);
21224
21167
  },
21225
- customQuery: function customQuery(newVal, oldVal) {
21226
- if (!isQueryIdentical(newVal, oldVal, this.$data.currentValue, this.$props)) {
21227
- this.updateQueryHandler(this.componentId, this.$data.currentValue, this.$props);
21228
- }
21168
+ stats: function stats() {
21169
+ return getResultStats$2(this);
21229
21170
  }
21230
21171
  },
21231
- render: function render() {
21232
- var _this = this;
21233
-
21234
- var h = arguments[0];
21235
- var _this$$props = this.$props,
21172
+ props: {
21173
+ autoFocus: VueTypes.bool,
21174
+ autosuggest: VueTypes.bool.def(true),
21175
+ beforeValueChange: types.func,
21176
+ className: VueTypes.string.def(''),
21177
+ clearIcon: types.children,
21178
+ componentId: types.stringRequired,
21179
+ customHighlight: types.func,
21180
+ customQuery: types.func,
21181
+ defaultQuery: types.func,
21182
+ dataField: VueTypes.oneOfType([VueTypes.string, VueTypes.shape({
21183
+ field: VueTypes.string,
21184
+ weight: VueTypes.number
21185
+ }), VueTypes.arrayOf(VueTypes.string), VueTypes.arrayOf({
21186
+ field: VueTypes.string,
21187
+ weight: VueTypes.number
21188
+ })]),
21189
+ aggregationField: types.string,
21190
+ aggregationSize: VueTypes.number,
21191
+ size: VueTypes.number,
21192
+ debounce: VueTypes.number.def(0),
21193
+ defaultValue: types.string,
21194
+ excludeFields: types.excludeFields,
21195
+ value: types.value,
21196
+ defaultSuggestions: types.suggestions,
21197
+ enableSynonyms: VueTypes.bool.def(true),
21198
+ enableQuerySuggestions: VueTypes.bool.def(false),
21199
+ enablePopularSuggestions: VueTypes.bool.def(false),
21200
+ enableRecentSuggestions: VueTypes.bool.def(false),
21201
+ fieldWeights: types.fieldWeights,
21202
+ filterLabel: types.string,
21203
+ fuzziness: types.fuzziness,
21204
+ highlight: VueTypes.bool,
21205
+ highlightField: types.stringOrArray,
21206
+ icon: types.children,
21207
+ iconPosition: VueTypes.oneOf(['left', 'right']).def('left'),
21208
+ includeFields: types.includeFields,
21209
+ innerClass: types.style,
21210
+ innerRef: VueTypes.string.def('searchInputField'),
21211
+ render: types.func,
21212
+ renderNoSuggestion: types.title,
21213
+ renderError: types.title,
21214
+ placeholder: VueTypes.string.def('Search'),
21215
+ queryFormat: VueTypes.oneOf(['and', 'or']).def('or'),
21216
+ react: types.react,
21217
+ showClear: VueTypes.bool.def(true),
21218
+ showDistinctSuggestions: VueTypes.bool.def(true),
21219
+ showFilter: VueTypes.bool.def(true),
21220
+ showIcon: VueTypes.bool.def(true),
21221
+ title: types.title,
21222
+ theme: types.style,
21223
+ URLParams: VueTypes.bool.def(false),
21224
+ strictSelection: VueTypes.bool.def(false),
21225
+ nestedField: types.string,
21226
+ enablePredictiveSuggestions: VueTypes.bool.def(false),
21227
+ recentSearchesIcon: VueTypes.any,
21228
+ popularSearchesIcon: VueTypes.any,
21229
+ // mic props
21230
+ showVoiceSearch: VueTypes.bool.def(false),
21231
+ getMicInstance: types.func,
21232
+ renderMic: types.func,
21233
+ distinctField: types.string,
21234
+ distinctFieldConfig: types.props,
21235
+ //
21236
+ focusShortcuts: VueTypes.arrayOf(VueTypes.oneOfType([VueTypes.string, VueTypes.number])).def(['/']),
21237
+ addonBefore: VueTypes.any,
21238
+ addonAfter: VueTypes.any,
21239
+ expandSuggestionsContainer: VueTypes.bool.def(true),
21240
+ index: VueTypes.string,
21241
+ popularSuggestionsConfig: VueTypes.object,
21242
+ recentSuggestionsConfig: VueTypes.object,
21243
+ applyStopwords: VueTypes.bool,
21244
+ customStopwords: types.stringArray,
21245
+ onData: types.func,
21246
+ renderItem: types.func
21247
+ },
21248
+ mounted: function mounted() {
21249
+ this.listenForFocusShortcuts();
21250
+ },
21251
+ watch: {
21252
+ dataField: function dataField(newVal, oldVal) {
21253
+ if (!isEqual$5(newVal, oldVal)) {
21254
+ this.triggerCustomQuery(this.$data.currentValue);
21255
+ }
21256
+ },
21257
+ fieldWeights: function fieldWeights() {
21258
+ this.triggerCustomQuery(this.$data.currentValue);
21259
+ },
21260
+ fuzziness: function fuzziness() {
21261
+ this.triggerCustomQuery(this.$data.currentValue);
21262
+ },
21263
+ queryFormat: function queryFormat() {
21264
+ this.triggerCustomQuery(this.$data.currentValue);
21265
+ },
21266
+ defaultValue: function defaultValue(newVal) {
21267
+ this.setValue(newVal, true, this.$props);
21268
+ },
21269
+ value: function value(newVal, oldVal) {
21270
+ if (!isEqual$5(newVal, oldVal)) {
21271
+ this.setValue(newVal, true, this.$props, newVal === '' ? lib_7.CLEAR_VALUE : undefined, false);
21272
+ }
21273
+ },
21274
+ defaultQuery: function defaultQuery(newVal, oldVal) {
21275
+ if (!isQueryIdentical(newVal, oldVal, this.$data.currentValue, this.$props)) {
21276
+ this.triggerDefaultQuery(this.$data.currentValue);
21277
+ }
21278
+ },
21279
+ customQuery: function customQuery(newVal, oldVal) {
21280
+ if (!isQueryIdentical(newVal, oldVal, this.$data.currentValue, this.$props)) {
21281
+ this.triggerCustomQuery(this.$data.currentValue);
21282
+ }
21283
+ },
21284
+ suggestions: function suggestions(newVal) {
21285
+ var suggestionsList = [];
21286
+
21287
+ if (Array.isArray(newVal) && newVal.length) {
21288
+ suggestionsList = [].concat(withClickIds$1(newVal));
21289
+ } else if (Array.isArray(this.$props.defaultSuggestions) && this.$props.defaultSuggestions.length) {
21290
+ suggestionsList = [].concat(withClickIds$1(this.$props.defaultSuggestions));
21291
+ }
21292
+
21293
+ this.normalizedSuggestions = suggestionsList;
21294
+ },
21295
+ selectedValue: function selectedValue(newVal, oldVal) {
21296
+ if (oldVal !== newVal && this.$data.currentValue !== newVal) {
21297
+ if (!newVal && this.$data.currentValue) {
21298
+ // selected value is cleared, call onValueSelected
21299
+ this.onValueSelectedHandler('', lib_7.CLEAR_VALUE);
21300
+ }
21301
+
21302
+ if (this.$props.value === undefined) {
21303
+ this.setValue(newVal || '', true, this.$props);
21304
+ }
21305
+ }
21306
+ },
21307
+ focusShortcuts: function focusShortcuts() {
21308
+ this.listenForFocusShortcuts();
21309
+ },
21310
+ rawData: function rawData(newVal) {
21311
+ this.$emit('on-data', {
21312
+ data: this.normalizedSuggestions,
21313
+ rawData: newVal,
21314
+ aggregationData: this.aggregationData,
21315
+ loading: this.isLoading,
21316
+ error: this.isError
21317
+ });
21318
+ },
21319
+ aggregationData: function aggregationData(newVal) {
21320
+ this.$emit('on-data', {
21321
+ data: this.normalizedSuggestions,
21322
+ rawData: this.rawData,
21323
+ aggregationData: newVal,
21324
+ loading: this.isLoading,
21325
+ error: this.isError
21326
+ });
21327
+ },
21328
+ loading: function loading(newVal) {
21329
+ this.$emit('on-data', {
21330
+ data: this.normalizedSuggestions,
21331
+ rawData: this.rawData,
21332
+ aggregationData: this.aggregationData,
21333
+ loading: newVal,
21334
+ error: this.isError
21335
+ });
21336
+ },
21337
+ error: function error(newVal) {
21338
+ this.$emit('on-data', {
21339
+ data: this.normalizedSuggestions,
21340
+ rawData: this.rawData,
21341
+ aggregationData: this.aggregationData,
21342
+ loading: this.isLoading,
21343
+ error: newVal
21344
+ });
21345
+ },
21346
+ debounce: function debounce(newVal, oldVal) {
21347
+ if (!isEqual$5(newVal, oldVal)) {
21348
+ this.handleTextChange = _debounce(this.handleText, newVal);
21349
+ }
21350
+ }
21351
+ },
21352
+ methods: {
21353
+ handleText: function handleText(value, cause) {
21354
+ if (cause === lib_7.CLEAR_VALUE) {
21355
+ this.triggerCustomQuery(value);
21356
+ this.triggerDefaultQuery(value);
21357
+ } else if (this.$props.autosuggest) {
21358
+ this.triggerDefaultQuery(value);
21359
+ } else {
21360
+ this.triggerCustomQuery(value);
21361
+ }
21362
+ },
21363
+ validateDataField: function validateDataField() {
21364
+ var propName = 'dataField';
21365
+ var componentName = SearchBox.name;
21366
+ var props = this.$props;
21367
+ var requiredError = propName + " supplied to " + componentName + " is required. Validation failed.";
21368
+ var propValue = props[propName];
21369
+
21370
+ if (!this.enableAppbase) {
21371
+ if (!propValue) {
21372
+ console.error(requiredError);
21373
+ return;
21374
+ }
21375
+
21376
+ if (typeof propValue !== 'string' && typeof propValue !== 'object' && !Array.isArray(propValue)) {
21377
+ console.error("Invalid " + propName + " supplied to " + componentName + ". Validation failed.");
21378
+ return;
21379
+ }
21380
+
21381
+ if (Array.isArray(propValue) && propValue.length === 0) {
21382
+ console.error(requiredError);
21383
+ }
21384
+ }
21385
+ },
21386
+ getComponent: function getComponent$1(downshiftProps) {
21387
+ if (downshiftProps === void 0) {
21388
+ downshiftProps = {};
21389
+ }
21390
+
21391
+ var currentValue = this.$data.currentValue;
21392
+ var data = {
21393
+ error: this.error,
21394
+ loading: this.isLoading,
21395
+ downshiftProps: downshiftProps,
21396
+ data: this.normalizedSuggestions,
21397
+ rawData: this.rawData,
21398
+ value: currentValue,
21399
+ resultStats: this.stats
21400
+ };
21401
+ return getComponent(data, this);
21402
+ },
21403
+ // returns size and aggs property
21404
+ getBasicQueryOptions: function getBasicQueryOptions() {
21405
+ var aggregationField = this.$props.aggregationField;
21406
+ var queryOptions = helper_20(this.$props);
21407
+
21408
+ if (aggregationField) {
21409
+ queryOptions.aggs = getCompositeAggsQuery$2({
21410
+ props: this.$props,
21411
+ showTopHits: true
21412
+ }).aggs;
21413
+ }
21414
+
21415
+ return queryOptions;
21416
+ },
21417
+ handleSearchIconClick: function handleSearchIconClick() {
21418
+ var currentValue = this.currentValue;
21419
+
21420
+ if (currentValue.trim()) {
21421
+ this.setValue(currentValue, true);
21422
+ this.onValueSelectedHandler(currentValue, lib_7.SEARCH_ICON_CLICK);
21423
+ }
21424
+ },
21425
+ setValue: function setValue(value, isDefaultValue, props, cause, toggleIsOpen, categoryValue) {
21426
+ var _this = this;
21427
+
21428
+ if (isDefaultValue === void 0) {
21429
+ isDefaultValue = false;
21430
+ }
21431
+
21432
+ if (props === void 0) {
21433
+ props = this.$props;
21434
+ }
21435
+
21436
+ if (toggleIsOpen === void 0) {
21437
+ toggleIsOpen = true;
21438
+ }
21439
+
21440
+ if (categoryValue === void 0) {
21441
+ categoryValue = undefined;
21442
+ }
21443
+
21444
+ var performUpdate = function performUpdate() {
21445
+ _this.currentValue = value;
21446
+
21447
+ if (isDefaultValue) {
21448
+ if (_this.$props.autosuggest) {
21449
+ if (toggleIsOpen) {
21450
+ _this.isOpen = false;
21451
+ }
21452
+
21453
+ _this.triggerDefaultQuery(value);
21454
+ } // in case of strict selection only SUGGESTION_SELECT should be able
21455
+ // to set the query otherwise the value should reset
21456
+
21457
+
21458
+ if (props.strictSelection) {
21459
+ if (cause === lib_7.SUGGESTION_SELECT || value === '') {
21460
+ _this.triggerCustomQuery(value, categoryValue);
21461
+ } else {
21462
+ _this.setValue('', true);
21463
+ }
21464
+ } else if (props.value === undefined) {
21465
+ _this.triggerCustomQuery(value, categoryValue);
21466
+ }
21467
+ } else {
21468
+ // debounce for handling text while typing
21469
+ _this.handleTextChange(value, cause);
21470
+ }
21471
+
21472
+ _this.$emit('valueChange', value);
21473
+
21474
+ _this.$emit('value-change', value);
21475
+ };
21476
+
21477
+ checkValueChange$1(props.componentId, value, props.beforeValueChange, performUpdate);
21478
+ },
21479
+ triggerDefaultQuery: function triggerDefaultQuery(paramValue) {
21480
+ if (!this.$props.autosuggest) {
21481
+ return;
21482
+ }
21483
+
21484
+ var value = typeof paramValue !== 'string' ? this.currentValue : paramValue;
21485
+ var query = SearchBox.defaultQuery(value, this.$props);
21486
+
21487
+ if (this.defaultQuery) {
21488
+ var defaultQueryToBeSet = this.defaultQuery(value, this.$props) || {};
21489
+
21490
+ if (defaultQueryToBeSet.query) {
21491
+ query = defaultQueryToBeSet.query;
21492
+ } // Update calculated default query in store
21493
+
21494
+
21495
+ updateDefaultQuery(this.$props.componentId, this.setDefaultQuery, this.$props, value);
21496
+ }
21497
+
21498
+ this.updateQuery({
21499
+ componentId: this.internalComponent,
21500
+ query: query,
21501
+ value: value,
21502
+ componentType: constants_1$1.searchBox
21503
+ });
21504
+ },
21505
+ triggerCustomQuery: function triggerCustomQuery(paramValue, categoryValue) {
21506
+ if (categoryValue === void 0) {
21507
+ categoryValue = undefined;
21508
+ }
21509
+
21510
+ var _this$$props2 = this.$props,
21511
+ customQuery = _this$$props2.customQuery,
21512
+ filterLabel = _this$$props2.filterLabel,
21513
+ showFilter = _this$$props2.showFilter,
21514
+ URLParams = _this$$props2.URLParams;
21515
+ var value = typeof paramValue !== 'string' ? this.$data.currentValue : paramValue;
21516
+ var defaultQueryTobeSet = SearchBox.defaultQuery("" + value + (categoryValue ? " in " + categoryValue : ''), this.$props);
21517
+ var query = defaultQueryTobeSet;
21518
+
21519
+ if (customQuery) {
21520
+ var customQueryTobeSet = customQuery(value, this.$props);
21521
+ var queryTobeSet = customQueryTobeSet.query;
21522
+
21523
+ if (queryTobeSet) {
21524
+ query = queryTobeSet;
21525
+ }
21526
+
21527
+ updateCustomQuery(this.$props.componentId, this.setCustomQuery, this.$props, value);
21528
+ }
21529
+
21530
+ this.updateQuery({
21531
+ componentId: this.$props.componentId,
21532
+ query: query,
21533
+ value: value,
21534
+ label: filterLabel,
21535
+ showFilter: showFilter,
21536
+ URLParams: URLParams,
21537
+ componentType: constants_1$1.searchBox,
21538
+ category: categoryValue
21539
+ });
21540
+ },
21541
+ handleFocus: function handleFocus(event) {
21542
+ if (this.$props.autosuggest) {
21543
+ this.isOpen = true;
21544
+ }
21545
+
21546
+ this.$emit('focus', event);
21547
+ },
21548
+ handleVoiceResults: function handleVoiceResults(_ref) {
21549
+ var results = _ref.results;
21550
+
21551
+ if (results && results[0] && results[0].isFinal && results[0][0] && results[0][0].transcript && results[0][0].transcript.trim()) {
21552
+ this.setValue(results[0][0].transcript.trim(), true);
21553
+ }
21554
+ },
21555
+ triggerQuery: function triggerQuery(_ref2) {
21556
+ var _ref2$isOpen = _ref2.isOpen,
21557
+ isOpen = _ref2$isOpen === void 0 ? undefined : _ref2$isOpen,
21558
+ _ref2$customQuery = _ref2.customQuery,
21559
+ customQuery = _ref2$customQuery === void 0 ? true : _ref2$customQuery,
21560
+ _ref2$defaultQuery = _ref2.defaultQuery,
21561
+ defaultQuery = _ref2$defaultQuery === void 0 ? true : _ref2$defaultQuery,
21562
+ _ref2$value = _ref2.value,
21563
+ value = _ref2$value === void 0 ? undefined : _ref2$value,
21564
+ _ref2$categoryValue = _ref2.categoryValue,
21565
+ categoryValue = _ref2$categoryValue === void 0 ? undefined : _ref2$categoryValue;
21566
+
21567
+ if (typeof isOpen === 'boolean') {
21568
+ this.isOpen = isOpen;
21569
+ }
21570
+
21571
+ if (customQuery) {
21572
+ this.triggerCustomQuery(value, categoryValue);
21573
+ }
21574
+
21575
+ if (defaultQuery) {
21576
+ this.triggerDefaultQuery(value);
21577
+ }
21578
+ },
21579
+ triggerClickAnalytics: function triggerClickAnalytics(searchPosition, documentId) {
21580
+ // click analytics would only work client side and after javascript loads
21581
+ var docId = documentId;
21582
+
21583
+ if (!docId) {
21584
+ var hitData = this.normalizedSuggestions.find(function (hit) {
21585
+ return hit._click_id === searchPosition;
21586
+ });
21587
+
21588
+ if (hitData && hitData.source && hitData.source._id) {
21589
+ docId = hitData.source._id;
21590
+ }
21591
+ }
21592
+
21593
+ this.recordSuggestionClick(searchPosition, docId);
21594
+ },
21595
+ clearValue: function clearValue() {
21596
+ this.setValue('', false, this.$props, lib_7.CLEAR_VALUE, false);
21597
+ this.onValueSelectedHandler('', lib_7.CLEAR_VALUE);
21598
+ },
21599
+ handleKeyDown: function handleKeyDown(event, highlightedIndex) {
21600
+ // if a suggestion was selected, delegate the handling to suggestion handler
21601
+ if (event.key === 'Enter' && highlightedIndex === null) {
21602
+ this.setValue(event.target.value, true);
21603
+ this.onValueSelectedHandler(event.target.value, lib_7.ENTER_PRESS);
21604
+ } // Need to review
21605
+
21606
+
21607
+ this.$emit('keyDown', event, this.triggerQuery);
21608
+ this.$emit('key-down', event, this.triggerQuery);
21609
+ },
21610
+ onInputChange: function onInputChange(e) {
21611
+ var _this2 = this;
21612
+
21613
+ var inputValue = e.target.value;
21614
+
21615
+ if (!this.$data.isOpen && this.$props.autosuggest) {
21616
+ this.isOpen = true;
21617
+ }
21618
+
21619
+ var value = this.$props.value;
21620
+
21621
+ if (value === undefined) {
21622
+ this.setValue(inputValue, false, this.$props, inputValue === '' ? lib_7.CLEAR_VALUE : undefined);
21623
+ } else {
21624
+ this.$emit('change', inputValue, function (_ref3) {
21625
+ var isOpen = _ref3.isOpen;
21626
+ return _this2.triggerQuery({
21627
+ defaultQuery: true,
21628
+ customQuery: true,
21629
+ value: inputValue,
21630
+ isOpen: isOpen
21631
+ });
21632
+ }, e);
21633
+ }
21634
+ },
21635
+ onSuggestionSelected: function onSuggestionSelected(suggestion) {
21636
+ var _this3 = this;
21637
+
21638
+ this.isOpen = false;
21639
+ var value = this.$props.value; // Record analytics for selected suggestions
21640
+
21641
+ this.triggerClickAnalytics(suggestion._click_id);
21642
+
21643
+ if (value === undefined) {
21644
+ this.setValue(suggestion.value, true, this.$props, lib_7.SUGGESTION_SELECT, false, suggestion._category);
21645
+ } else {
21646
+ this.$emit('change', suggestion.value, function (_ref4) {
21647
+ var isOpen = _ref4.isOpen;
21648
+ return _this3.triggerQuery({
21649
+ isOpen: isOpen,
21650
+ value: suggestion.value,
21651
+ categoryValue: suggestion._category
21652
+ });
21653
+ });
21654
+ }
21655
+
21656
+ this.onValueSelectedHandler(suggestion.value, lib_7.SUGGESTION_SELECT, suggestion.source);
21657
+ },
21658
+ onValueSelectedHandler: function onValueSelectedHandler(currentValue) {
21659
+ if (currentValue === void 0) {
21660
+ currentValue = this.$data.currentValue;
21661
+ }
21662
+
21663
+ for (var _len = arguments.length, cause = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
21664
+ cause[_key - 1] = arguments[_key];
21665
+ }
21666
+
21667
+ this.$emit.apply(this, ['valueSelected', currentValue].concat(cause));
21668
+ this.$emit.apply(this, ['value-selected', currentValue].concat(cause));
21669
+ },
21670
+ handleStateChange: function handleStateChange(changes) {
21671
+ var isOpen = changes.isOpen;
21672
+ this.isOpen = isOpen;
21673
+ },
21674
+ getBackgroundColor: function getBackgroundColor(highlightedIndex, index) {
21675
+ var isDark = this.themePreset === 'dark';
21676
+
21677
+ if (isDark) {
21678
+ return highlightedIndex === index ? '#555' : '#424242';
21679
+ }
21680
+
21681
+ return highlightedIndex === index ? '#eee' : '#fff';
21682
+ },
21683
+ renderIcon: function renderIcon() {
21684
+ var h = this.$createElement;
21685
+
21686
+ if (this.$props.showIcon) {
21687
+ return this.$props.icon || h(SearchSvg);
21688
+ }
21689
+
21690
+ return null;
21691
+ },
21692
+ renderErrorComponent: function renderErrorComponent() {
21693
+ var h = this.$createElement;
21694
+ var renderError = this.$scopedSlots.renderError || this.$props.renderError;
21695
+
21696
+ if (this.error && renderError && this.$data.currentValue && !this.isLoading) {
21697
+ return h(SuggestionWrapper, {
21698
+ "attrs": {
21699
+ "innerClass": this.$props.innerClass,
21700
+ "innerClassName": "error",
21701
+ "theme": this.theme,
21702
+ "themePreset": this.themePreset
21703
+ }
21704
+ }, [isFunction$1(renderError) ? renderError(this.error) : renderError]);
21705
+ }
21706
+
21707
+ return null;
21708
+ },
21709
+ renderCancelIcon: function renderCancelIcon() {
21710
+ var h = this.$createElement;
21711
+
21712
+ if (this.$props.showClear) {
21713
+ return this.$props.clearIcon || h(CancelSvg);
21714
+ }
21715
+
21716
+ return null;
21717
+ },
21718
+ renderNoSuggestions: function renderNoSuggestions(finalSuggestionsList) {
21719
+ if (finalSuggestionsList === void 0) {
21720
+ finalSuggestionsList = [];
21721
+ }
21722
+
21723
+ var h = this.$createElement;
21724
+ var _this$$props3 = this.$props,
21725
+ theme = _this$$props3.theme,
21726
+ innerClass = _this$$props3.innerClass;
21727
+ var renderNoSuggestion = this.$scopedSlots.renderNoSuggestion || this.$props.renderNoSuggestion;
21728
+ var renderError = this.$scopedSlots.renderError || this.$props.renderError;
21729
+ var _this$$data = this.$data,
21730
+ isOpen = _this$$data.isOpen,
21731
+ currentValue = _this$$data.currentValue;
21732
+
21733
+ if (renderNoSuggestion && isOpen && !finalSuggestionsList.length && !this.isLoading && currentValue && !(renderError && this.error)) {
21734
+ return h(SuggestionWrapper, {
21735
+ "attrs": {
21736
+ "innerClass": innerClass,
21737
+ "themePreset": this.themePreset,
21738
+ "theme": theme,
21739
+ "innerClassName": "noSuggestion"
21740
+ },
21741
+ "scopedSlots": {
21742
+ "default": function _default() {
21743
+ return typeof renderNoSuggestion === 'function' ? renderNoSuggestion(currentValue) : renderNoSuggestion;
21744
+ }
21745
+ }
21746
+ });
21747
+ }
21748
+
21749
+ return null;
21750
+ },
21751
+ renderInputAddonBefore: function renderInputAddonBefore() {
21752
+ var h = this.$createElement;
21753
+ var addonBefore = this.$scopedSlots.addonBefore;
21754
+
21755
+ if (addonBefore) {
21756
+ return h(InputAddon, [addonBefore()]);
21757
+ }
21758
+
21759
+ return null;
21760
+ },
21761
+ renderInputAddonAfter: function renderInputAddonAfter() {
21762
+ var h = this.$createElement;
21763
+ var addonAfter = this.$scopedSlots.addonAfter;
21764
+
21765
+ if (addonAfter) {
21766
+ return h(InputAddon, [addonAfter()]);
21767
+ }
21768
+
21769
+ return null;
21770
+ },
21771
+ renderIcons: function renderIcons() {
21772
+ var h = this.$createElement;
21773
+ var _this$$props4 = this.$props,
21774
+ iconPosition = _this$$props4.iconPosition,
21775
+ showClear = _this$$props4.showClear,
21776
+ innerClass = _this$$props4.innerClass,
21777
+ getMicInstance = _this$$props4.getMicInstance,
21778
+ showVoiceSearch = _this$$props4.showVoiceSearch,
21779
+ showIcon = _this$$props4.showIcon;
21780
+ var renderMic = this.$scopedSlots.renderMic || this.$props.renderMic;
21781
+ var currentValue = this.$data.currentValue;
21782
+ return h("div", [h(IconGroup, {
21783
+ "attrs": {
21784
+ "groupPosition": "right",
21785
+ "positionType": "absolute"
21786
+ }
21787
+ }, [currentValue && showClear && h(IconWrapper, {
21788
+ "on": {
21789
+ "click": this.clearValue
21790
+ },
21791
+ "attrs": {
21792
+ "showIcon": showIcon,
21793
+ "isClearIcon": true
21794
+ }
21795
+ }, [this.renderCancelIcon()]), showVoiceSearch && h(Mic, {
21796
+ "attrs": {
21797
+ "getInstance": getMicInstance,
21798
+ "render": renderMic,
21799
+ "handleResult": this.handleVoiceResults,
21800
+ "className": getClassName$4(innerClass, 'mic') || null
21801
+ }
21802
+ }), iconPosition === 'right' && showIcon && h(IconWrapper, {
21803
+ "on": {
21804
+ "click": this.handleSearchIconClick
21805
+ }
21806
+ }, [this.renderIcon()])]), h(IconGroup, {
21807
+ "attrs": {
21808
+ "groupPosition": "left",
21809
+ "positionType": "absolute"
21810
+ }
21811
+ }, [iconPosition === 'left' && showIcon && h(IconWrapper, {
21812
+ "on": {
21813
+ "click": this.handleSearchIconClick
21814
+ }
21815
+ }, [this.renderIcon()])])]);
21816
+ },
21817
+ focusSearchBox: function focusSearchBox(event) {
21818
+ var _this$$refs, _this$$refs$this$$pro;
21819
+
21820
+ var elt = event.target || event.srcElement;
21821
+ var tagName = elt.tagName;
21822
+
21823
+ if (elt.isContentEditable || tagName === 'INPUT' || tagName === 'SELECT' || tagName === 'TEXTAREA') {
21824
+ // already in an input
21825
+ return;
21826
+ }
21827
+
21828
+ (_this$$refs = this.$refs) == null ? void 0 : (_this$$refs$this$$pro = _this$$refs[this.$props.innerRef]) == null ? void 0 : _this$$refs$this$$pro.focus(); // eslint-disable-line
21829
+ },
21830
+ listenForFocusShortcuts: function listenForFocusShortcuts() {
21831
+ var _this4 = this;
21832
+
21833
+ var _this$$props$focusSho = this.$props.focusShortcuts,
21834
+ focusShortcuts = _this$$props$focusSho === void 0 ? ['/'] : _this$$props$focusSho;
21835
+
21836
+ if (isEmpty(focusShortcuts)) {
21837
+ return;
21838
+ }
21839
+
21840
+ var shortcutsString = parseFocusShortcuts(focusShortcuts).join(','); // handler for alphabets and other key combinations
21841
+
21842
+ hotkeys(shortcutsString, // eslint-disable-next-line no-unused-vars
21843
+
21844
+ /* eslint-disable no-shadow */
21845
+ function (event, handler) {
21846
+ // Prevent the default refresh event under WINDOWS system
21847
+ event.preventDefault();
21848
+
21849
+ _this4.focusSearchBox(event);
21850
+ }); // if one of modifier keys are used, they are handled below
21851
+
21852
+ hotkeys('*', function (event) {
21853
+ var modifierKeys = extractModifierKeysFromFocusShortcuts(focusShortcuts);
21854
+ if (modifierKeys.length === 0) return;
21855
+
21856
+ for (var index = 0; index < modifierKeys.length; index += 1) {
21857
+ var element = modifierKeys[index];
21858
+
21859
+ if (hotkeys[element]) {
21860
+ _this4.focusSearchBox(event);
21861
+
21862
+ break;
21863
+ }
21864
+ }
21865
+ });
21866
+ },
21867
+ onAutofillClick: function onAutofillClick(suggestion) {
21868
+ var value = suggestion.value;
21869
+ this.isOpen = true;
21870
+ this.currentValue = value;
21871
+ this.triggerDefaultQuery(value);
21872
+ },
21873
+ renderAutoFill: function renderAutoFill(suggestion) {
21874
+ var _this5 = this;
21875
+
21876
+ var h = this.$createElement;
21877
+
21878
+ var handleAutoFillClick = function handleAutoFillClick(e) {
21879
+ e.stopPropagation();
21880
+
21881
+ _this5.onAutofillClick(suggestion);
21882
+ };
21883
+ /* 👇 avoid showing autofill for category suggestions👇 */
21884
+
21885
+
21886
+ return suggestion._category ? null : h(AutoFillSvg, {
21887
+ "on": {
21888
+ "click": handleAutoFillClick
21889
+ }
21890
+ });
21891
+ }
21892
+ },
21893
+ render: function render() {
21894
+ var _this6 = this;
21895
+
21896
+ var h = arguments[0];
21897
+ var _this$$props5 = this.$props,
21898
+ theme = _this$$props5.theme,
21899
+ expandSuggestionsContainer = _this$$props5.expandSuggestionsContainer;
21900
+ var _this$$scopedSlots = this.$scopedSlots,
21901
+ recentSearchesIcon = _this$$scopedSlots.recentSearchesIcon,
21902
+ popularSearchesIcon = _this$$scopedSlots.popularSearchesIcon;
21903
+ var hasSuggestions = Array.isArray(this.normalizedSuggestions) && this.normalizedSuggestions.length;
21904
+ var renderItem = this.$scopedSlots.renderItem || this.$props.renderItem;
21905
+ return h(Container, {
21906
+ "class": this.$props.className
21907
+ }, [this.$props.title && h(Title, {
21908
+ "class": getClassName$4(this.$props.innerClass, 'title') || ''
21909
+ }, [this.$props.title]), this.$props.autosuggest ? h(Downshift, {
21910
+ "attrs": {
21911
+ "id": this.$props.componentId + "-downshift",
21912
+ "handleChange": this.onSuggestionSelected,
21913
+ "handleMouseup": this.handleStateChange,
21914
+ "isOpen": this.$data.isOpen
21915
+ },
21916
+ "scopedSlots": {
21917
+ "default": function _default(_ref5) {
21918
+ var getInputEvents = _ref5.getInputEvents,
21919
+ getInputProps = _ref5.getInputProps,
21920
+ getItemProps = _ref5.getItemProps,
21921
+ getItemEvents = _ref5.getItemEvents,
21922
+ isOpen = _ref5.isOpen,
21923
+ highlightedIndex = _ref5.highlightedIndex,
21924
+ setHighlightedIndex = _ref5.setHighlightedIndex;
21925
+
21926
+ var renderSuggestionsDropdown = function renderSuggestionsDropdown() {
21927
+ var getIcon = function getIcon(iconType) {
21928
+ switch (iconType) {
21929
+ case helper_1.Recent:
21930
+ return recentSearchesIcon;
21931
+
21932
+ case helper_1.Popular:
21933
+ return popularSearchesIcon;
21934
+
21935
+ default:
21936
+ return null;
21937
+ }
21938
+ };
21939
+
21940
+ return h("div", [_this6.hasCustomRenderer && _this6.getComponent({
21941
+ isOpen: isOpen,
21942
+ getItemProps: getItemProps,
21943
+ getItemEvents: getItemEvents,
21944
+ highlightedIndex: highlightedIndex
21945
+ }), _this6.renderErrorComponent(), !_this6.hasCustomRenderer && isOpen && hasSuggestions ? h("ul", {
21946
+ "class": suggestions$1(_this6.themePreset, theme) + " " + getClassName$4(_this6.$props.innerClass, 'list')
21947
+ }, [_this6.normalizedSuggestions.map(function (item, index) {
21948
+ return renderItem ? h("li", {
21949
+ "domProps": _extends({}, getItemProps({
21950
+ item: item
21951
+ })),
21952
+ "on": _extends({}, getItemEvents({
21953
+ item: item
21954
+ })),
21955
+ "key": index + 1 + "-" + item.value,
21956
+ "style": {
21957
+ backgroundColor: _this6.getBackgroundColor(highlightedIndex, index),
21958
+ justifyContent: 'flex-start',
21959
+ alignItems: 'center'
21960
+ }
21961
+ }, [renderItem(item)]) : h("li", {
21962
+ "domProps": _extends({}, getItemProps({
21963
+ item: item
21964
+ })),
21965
+ "on": _extends({}, getItemEvents({
21966
+ item: item
21967
+ })),
21968
+ "key": index + 1 + "-" + item.value,
21969
+ "style": {
21970
+ backgroundColor: _this6.getBackgroundColor(highlightedIndex, index),
21971
+ justifyContent: 'flex-start',
21972
+ alignItems: 'center'
21973
+ }
21974
+ }, [h("div", {
21975
+ "style": {
21976
+ padding: '0 10px 0 0',
21977
+ display: 'flex'
21978
+ }
21979
+ }, [h(CustomSvg, {
21980
+ "attrs": {
21981
+ "className": getClassName$4(_this6.$props.innerClass, item._suggestion_type + "-search-icon") || null,
21982
+ "icon": getIcon(item._suggestion_type),
21983
+ "type": item._suggestion_type + "-search-icon"
21984
+ }
21985
+ })]), h(SuggestionItem, {
21986
+ "attrs": {
21987
+ "currentValue": _this6.currentValue,
21988
+ "suggestion": item
21989
+ }
21990
+ }), _this6.renderAutoFill(item)]);
21991
+ })]) : _this6.renderNoSuggestions(_this6.normalizedSuggestions)]);
21992
+ };
21993
+
21994
+ return h("div", {
21995
+ "class": suggestionsContainer
21996
+ }, [h(InputGroup, [_this6.renderInputAddonBefore(), h(InputWrapper, [h(Input, {
21997
+ "attrs": {
21998
+ "id": _this6.$props.componentId + "-input",
21999
+ "showIcon": _this6.$props.showIcon,
22000
+ "showClear": _this6.$props.showClear,
22001
+ "iconPosition": _this6.$props.iconPosition,
22002
+ "placeholder": _this6.$props.placeholder,
22003
+ "autoFocus": _this6.$props.autoFocus,
22004
+ "themePreset": _this6.themePreset,
22005
+ "autocomplete": "off"
22006
+ },
22007
+ "ref": _this6.$props.innerRef,
22008
+ "class": getClassName$4(_this6.$props.innerClass, 'input'),
22009
+ "on": _extends({}, getInputEvents({
22010
+ onInput: _this6.onInputChange,
22011
+ onBlur: function onBlur(e) {
22012
+ _this6.$emit('blur', e, _this6.triggerQuery);
22013
+ },
22014
+ onFocus: _this6.handleFocus,
22015
+ onKeyPress: function onKeyPress(e) {
22016
+ _this6.$emit('keyPress', e, _this6.triggerQuery);
22017
+
22018
+ _this6.$emit('key-press', e, _this6.triggerQuery);
22019
+ },
22020
+ onKeyDown: function onKeyDown(e) {
22021
+ return _this6.handleKeyDown(e, highlightedIndex);
22022
+ },
22023
+ onKeyUp: function onKeyUp(e) {
22024
+ _this6.$emit('keyUp', e, _this6.triggerQuery);
22025
+
22026
+ _this6.$emit('key-up', e, _this6.triggerQuery);
22027
+ },
22028
+ onClick: function onClick() {
22029
+ setHighlightedIndex(null);
22030
+ }
22031
+ })),
22032
+ "domProps": _extends({}, getInputProps({
22033
+ value: _this6.$data.currentValue === null ? '' : _this6.$data.currentValue
22034
+ }))
22035
+ }), _this6.renderIcons(), !expandSuggestionsContainer && renderSuggestionsDropdown()]), _this6.renderInputAddonAfter()]), expandSuggestionsContainer && renderSuggestionsDropdown()]);
22036
+ }
22037
+ }
22038
+ }) : h("div", {
22039
+ "class": suggestionsContainer
22040
+ }, [h(InputGroup, [this.renderInputAddonBefore(), h(InputWrapper, [h(Input, {
22041
+ "class": getClassName$4(this.$props.innerClass, 'input') || '',
22042
+ "attrs": {
22043
+ "placeholder": this.$props.placeholder,
22044
+ "iconPosition": this.$props.iconPosition,
22045
+ "showIcon": this.$props.showIcon,
22046
+ "showClear": this.$props.showClear,
22047
+ "themePreset": this.themePreset
22048
+ },
22049
+ "on": _extends({}, {
22050
+ blur: function blur(e) {
22051
+ _this6.$emit('blur', e, _this6.triggerQuery);
22052
+ },
22053
+ keypress: function keypress(e) {
22054
+ _this6.$emit('keyPress', e, _this6.triggerQuery);
22055
+
22056
+ _this6.$emit('key-press', e, _this6.triggerQuery);
22057
+ },
22058
+ input: this.onInputChange,
22059
+ focus: function focus(e) {
22060
+ _this6.$emit('focus', e, _this6.triggerQuery);
22061
+ },
22062
+ keydown: function keydown(e) {
22063
+ _this6.$emit('keyDown', e, _this6.triggerQuery);
22064
+
22065
+ _this6.$emit('key-down', e, _this6.triggerQuery);
22066
+ },
22067
+ keyup: function keyup(e) {
22068
+ _this6.$emit('keyUp', e, _this6.triggerQuery);
22069
+
22070
+ _this6.$emit('key-up', e, _this6.triggerQuery);
22071
+ }
22072
+ }),
22073
+ "domProps": _extends({}, {
22074
+ autofocus: this.$props.autoFocus,
22075
+ value: this.$data.currentValue ? this.$data.currentValue : ''
22076
+ }),
22077
+ "ref": this.$props.innerRef
22078
+ }), this.renderIcons()]), this.renderInputAddonAfter()])])]);
22079
+ },
22080
+ destroyed: function destroyed() {
22081
+ document.removeEventListener('keydown', this.onKeyDown);
22082
+ }
22083
+ };
22084
+
22085
+ SearchBox.defaultQuery = function (value, props) {
22086
+ var finalQuery = null;
22087
+ var fields = normalizeDataField$1(props.dataField, props.fieldWeights);
22088
+ finalQuery = {
22089
+ bool: {
22090
+ should: SearchBox.shouldQuery(value, fields, props),
22091
+ minimum_should_match: '1'
22092
+ }
22093
+ };
22094
+
22095
+ if (finalQuery && props.nestedField) {
22096
+ return {
22097
+ query: {
22098
+ nested: {
22099
+ path: props.nestedField,
22100
+ query: finalQuery
22101
+ }
22102
+ }
22103
+ };
22104
+ }
22105
+
22106
+ return finalQuery;
22107
+ };
22108
+
22109
+ SearchBox.shouldQuery = function (value, dataFields, props) {
22110
+ var finalQuery = [];
22111
+ var phrasePrefixFields = [];
22112
+ var fields = dataFields.map(function (dataField) {
22113
+ var queryField = "" + dataField.field + (dataField.weight ? "^" + dataField.weight : '');
22114
+
22115
+ if (!(dataField.field.endsWith('.keyword') || dataField.field.endsWith('.autosuggest') || dataField.field.endsWith('.search'))) {
22116
+ phrasePrefixFields.push(queryField);
22117
+ }
22118
+
22119
+ return queryField;
22120
+ });
22121
+
22122
+ if (props.searchOperators || props.queryString) {
22123
+ return {
22124
+ query: value,
22125
+ fields: fields,
22126
+ default_operator: props.queryFormat
22127
+ };
22128
+ }
22129
+
22130
+ if (props.queryFormat === 'and') {
22131
+ finalQuery.push({
22132
+ multi_match: {
22133
+ query: value,
22134
+ fields: fields,
22135
+ type: 'cross_fields',
22136
+ operator: 'and'
22137
+ }
22138
+ });
22139
+ finalQuery.push({
22140
+ multi_match: {
22141
+ query: value,
22142
+ fields: fields,
22143
+ type: 'phrase',
22144
+ operator: 'and'
22145
+ }
22146
+ });
22147
+
22148
+ if (phrasePrefixFields.length > 0) {
22149
+ finalQuery.push({
22150
+ multi_match: {
22151
+ query: value,
22152
+ fields: phrasePrefixFields,
22153
+ type: 'phrase_prefix',
22154
+ operator: 'and'
22155
+ }
22156
+ });
22157
+ }
22158
+
22159
+ return finalQuery;
22160
+ }
22161
+
22162
+ finalQuery.push({
22163
+ multi_match: {
22164
+ query: value,
22165
+ fields: fields,
22166
+ type: 'best_fields',
22167
+ operator: 'or',
22168
+ fuzziness: props.fuzziness ? props.fuzziness : 0
22169
+ }
22170
+ });
22171
+ finalQuery.push({
22172
+ multi_match: {
22173
+ query: value,
22174
+ fields: fields,
22175
+ type: 'phrase',
22176
+ operator: 'or'
22177
+ }
22178
+ });
22179
+
22180
+ if (phrasePrefixFields.length > 0) {
22181
+ finalQuery.push({
22182
+ multi_match: {
22183
+ query: value,
22184
+ fields: phrasePrefixFields,
22185
+ type: 'phrase_prefix',
22186
+ operator: 'or'
22187
+ }
22188
+ });
22189
+ }
22190
+
22191
+ return finalQuery;
22192
+ };
22193
+
22194
+ var mapStateToProps$4 = function mapStateToProps(state, props) {
22195
+ return {
22196
+ selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || null,
22197
+ selectedCategory: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].category || null,
22198
+ suggestions: state.hits[props.componentId] && state.hits[props.componentId].hits,
22199
+ rawData: state.rawData[props.componentId],
22200
+ aggregationData: state.compositeAggregations[props.componentId] || [],
22201
+ themePreset: state.config.themePreset,
22202
+ isLoading: !!state.isLoading[props.componentId + "_active"],
22203
+ error: state.error[props.componentId],
22204
+ enableAppbase: state.config.enableAppbase,
22205
+ time: state.hits[props.componentId] && state.hits[props.componentId].time || 0,
22206
+ total: state.hits[props.componentId] && state.hits[props.componentId].total,
22207
+ hidden: state.hits[props.componentId] && state.hits[props.componentId].hidden
22208
+ };
22209
+ };
22210
+
22211
+ var mapDispatchToProps$3 = {
22212
+ updateQuery: updateQuery$2,
22213
+ setCustomQuery: setCustomQuery$1,
22214
+ setDefaultQuery: setDefaultQuery$2,
22215
+ recordSuggestionClick: recordSuggestionClick$1
22216
+ };
22217
+ var DSConnected$1 = ComponentWrapper$1(connect(mapStateToProps$4, mapDispatchToProps$3)(SearchBox), {
22218
+ componentType: constants_1$1.searchBox,
22219
+ internalComponent: true
22220
+ });
22221
+
22222
+ SearchBox.install = function (Vue) {
22223
+ Vue.component(SearchBox.name, DSConnected$1);
22224
+ }; // Add componentType for SSR
22225
+
22226
+
22227
+ SearchBox.componentType = constants_1$1.searchBox;
22228
+
22229
+ var _templateObject$k, _templateObject2$7, _templateObject3$6, _templateObject4$5, _templateObject5$3, _templateObject6$3;
22230
+ var item = {
22231
+ width: '15px',
22232
+ height: '15px',
22233
+ scale: '4px'
22234
+ };
22235
+ var vh = css(_templateObject$k || (_templateObject$k = _taggedTemplateLiteralLoose(["\n\tborder: 0;\n\tclip: rect(1px, 1px, 1px, 1px);\n\tclip-path: inset(50%);\n\theight: 1px;\n\toverflow: hidden;\n\tpadding: 0;\n\tposition: absolute;\n\twidth: 1px;\n\twhite-space: nowrap;\n"])));
22236
+ var hideInputControl = css(_templateObject2$7 || (_templateObject2$7 = _taggedTemplateLiteralLoose(["\n\t+ label {\n\t\tpadding-left: 0;\n\n\t\t&::before,\n\t\t&::after {\n\t\t\twidth: 0;\n\t\t\theight: 0;\n\t\t\tborder: 0;\n\t\t\tmargin: 0;\n\t\t\tvisibility: hidden;\n\t\t}\n\t}\n\n\t&:checked {\n\t\t+ label {\n\t\t\tfont-weight: bold;\n\t\t}\n\t}\n"])));
22237
+
22238
+ var formItem = function formItem(_ref) {
22239
+ var theme = _ref.theme;
22240
+ return css(_templateObject3$6 || (_templateObject3$6 = _taggedTemplateLiteralLoose(["\n\t", ";\n\n\t&:focus {\n\t\t+ label {\n\t\t\t&::before {\n\t\t\t\tbox-shadow: 0 0 0 2px ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t&:hover {\n\t\t+ label {\n\t\t\t&::before {\n\t\t\t\tborder-color: ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t&:active {\n\t\t+ label {\n\t\t\t&::before {\n\t\t\t\ttransition-duration: 0;\n\t\t\t}\n\t\t}\n\t}\n\n\t+ label {\n\t\tposition: relative;\n\t\tuser-select: none;\n\t\tdisplay: flex;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\talign-items: center;\n\t\tcursor: pointer;\n\n\t\t&::before {\n\t\t\tbackground-color: #fff;\n\t\t\tborder: 1px solid ", ";\n\t\t\tbox-sizing: content-box;\n\t\t\tcontent: '';\n\t\t\tcolor: ", ";\n\t\t\tmargin-right: calc(", " * 0.5);\n\t\t\ttop: 50%;\n\t\t\tleft: 0;\n\t\t\twidth: ", ";\n\t\t\theight: ", ";\n\t\t\tdisplay: inline-block;\n\t\t\tvertical-align: middle;\n\t\t}\n\n\t\t&::after {\n\t\t\tbox-sizing: content-box;\n\t\t\tcontent: '';\n\t\t\tbackground-color: ", ";\n\t\t\tposition: absolute;\n\t\t\ttop: 50%;\n\t\t\tleft: calc(1px + ", " / 2);\n\t\t\twidth: calc(", " - ", ");\n\t\t\theight: calc(", " - ", ");\n\t\t\tmargin-top: calc(", " / -2 - ", " / -2);\n\t\t\ttransform: scale(0);\n\t\t\ttransform-origin: 50%;\n\t\t\ttransition: transform 200ms ease-out;\n\t\t}\n\t}\n"])), vh, curriedLighten(0.4, theme.colors.primaryColor), theme.colors.primaryColor, theme.colors.borderColor || curriedLighten(0.1, theme.colors.textColor), theme.colors.primaryColor, item.width, item.width, item.height, theme.colors.primaryColor, item.scale, item.width, item.scale, item.height, item.scale, item.height, item.scale);
22241
+ };
22242
+
22243
+ var Radio = index$1('input')(_templateObject4$5 || (_templateObject4$5 = _taggedTemplateLiteralLoose(["\n\t", ";\n\t", ";\n\n\t+ label {\n\t\t&::before,\n\t\t&::after {\n\t\t\tborder-radius: 50%;\n\t\t}\n\t}\n\n\t&:checked {\n\t\t&:active,\n\t\t&:focus {\n\t\t\t+ label {\n\t\t\t\tcolor: ", ";\n\n\t\t\t\t&::before {\n\t\t\t\t\tanimation: none;\n\t\t\t\t\tfilter: none;\n\t\t\t\t\ttransition: none;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t+ label {\n\t\t\t&::before {\n\t\t\t\tanimation: none;\n\t\t\t\tbackground-color: #fff;\n\t\t\t\tborder-color: ", ";\n\t\t}\n\n\t\t&::after {\n\t\t\ttransform: scale(1);\n\t\t}\n\t}\n"])), formItem, function (props) {
22244
+ return props.show ? null : hideInputControl;
22245
+ }, function (_ref2) {
22246
+ var theme = _ref2.theme;
22247
+ return theme.colors.primaryColor;
22248
+ }, function (_ref3) {
22249
+ var theme = _ref3.theme;
22250
+ return theme.colors.primaryColor;
22251
+ });
22252
+ var Checkbox = index$1('input')(_templateObject5$3 || (_templateObject5$3 = _taggedTemplateLiteralLoose(["\n\t", ";\n\t", ";\n\n\t+ label {\n\t\t&::before,\n\t\t&::after {\n\t\t\tborder-radius: 0;\n\t\t}\n\n\t\t&::after {\n\t\t\tbackground-color: transparent;\n\t\t\ttop: 50%;\n\t\t\tleft: calc(1px + ", " / 5);\n\t\t\twidth: calc(", " / 2);\n\t\t\theight: calc(", " / 5);\n\t\t\tmargin-top: calc(", " / -2 / 2 * 0.8);\n\t\t\tborder-style: solid;\n\t\t\tborder-color: ", ";\n\t\t\tborder-width: 0 0 2px 2px;\n\t\t\tborder-radius: 0;\n\t\t\tborder-image: none;\n\t\t\ttransform: rotate(-45deg) scale(0);\n\t\t\ttransition: none;\n\t\t}\n\t}\n\n\t&:checked {\n\t\t+ label {\n\t\t\t&::before {\n\t\t\t\tborder-color: ", ";\n\t\t\t}\n\n\t\t\t&::after {\n\t\t\t\tcontent: '';\n\t\t\t\ttransform: rotate(-45deg) scale(1);\n\t\t\t\ttransition: transform 200ms ease-out;\n\t\t\t}\n\t\t}\n\t}\n"])), formItem, function (props) {
22253
+ return props.show ? null : hideInputControl;
22254
+ }, item.width, item.width, item.width, item.height, function (_ref4) {
22255
+ var theme = _ref4.theme;
22256
+ return theme.colors.primaryColor;
22257
+ }, function (_ref5) {
22258
+ var theme = _ref5.theme;
22259
+ return theme.colors.primaryColor;
22260
+ });
22261
+ var UL = index$1('ul')(_templateObject6$3 || (_templateObject6$3 = _taggedTemplateLiteralLoose(["\n\tlist-style: none;\n\tpadding: 0;\n\tmargin: 0;\n\tmax-height: 240px;\n\tposition: relative;\n\toverflow-y: auto;\n\tpadding-bottom: 12px;\n\n\tli {\n\t\theight 30px;\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\talign-items: center;\n\t\tpadding-left: 2px;\n\t}\n"])));
22262
+
22263
+ var getAggsOrder = lib_8.getAggsOrder;
22264
+
22265
+ var extractQuery = function extractQuery(props) {
22266
+ var queryToBeReturned = {};
22267
+
22268
+ if (props.defaultQuery) {
22269
+ var evaluateQuery = props.defaultQuery([], props);
22270
+
22271
+ if (evaluateQuery) {
22272
+ if (evaluateQuery.query) {
22273
+ queryToBeReturned.query = evaluateQuery.query;
22274
+ }
22275
+
22276
+ if (evaluateQuery.aggs) {
22277
+ queryToBeReturned.aggs = evaluateQuery.aggs;
22278
+ }
22279
+ }
22280
+ }
22281
+
22282
+ return queryToBeReturned;
22283
+ }; // eslint-disable-next-line import/prefer-default-export
22284
+
22285
+
22286
+ var getAggsQuery = function getAggsQuery(query, props) {
22287
+ var _clonedQuery$aggs;
22288
+
22289
+ var clonedQuery = query;
22290
+ var dataField = props.dataField,
22291
+ size = props.size,
22292
+ sortBy = props.sortBy,
22293
+ showMissing = props.showMissing,
22294
+ missingLabel = props.missingLabel;
22295
+ clonedQuery.size = 0;
22296
+ clonedQuery.aggs = (_clonedQuery$aggs = {}, _clonedQuery$aggs[dataField] = {
22297
+ terms: _extends({
22298
+ field: dataField,
22299
+ size: size,
22300
+ order: getAggsOrder(sortBy || 'count')
22301
+ }, showMissing ? {
22302
+ missing: missingLabel
22303
+ } : {})
22304
+ }, _clonedQuery$aggs);
22305
+
22306
+ if (props.nestedField) {
22307
+ clonedQuery.aggs = {
22308
+ reactivesearch_nested: {
22309
+ nested: {
22310
+ path: props.nestedField
22311
+ },
22312
+ aggs: clonedQuery.aggs
22313
+ }
22314
+ };
22315
+ }
22316
+
22317
+ return _extends({}, clonedQuery, extractQuery(props));
22318
+ };
22319
+
22320
+ var updateQuery$3 = lib_5.updateQuery,
22321
+ setQueryOptions$2 = lib_5.setQueryOptions,
22322
+ setCustomQuery$2 = lib_5.setCustomQuery,
22323
+ setDefaultQuery$3 = lib_5.setDefaultQuery;
22324
+ var getQueryOptions$1 = lib_8.getQueryOptions,
22325
+ checkValueChange$2 = lib_8.checkValueChange,
22326
+ getClassName$5 = lib_8.getClassName,
22327
+ getOptionsFromQuery$2 = lib_8.getOptionsFromQuery,
22328
+ isEqual$6 = lib_8.isEqual;
22329
+ var SingleList = {
22330
+ name: 'SingleList',
22331
+ props: {
22332
+ beforeValueChange: types.func,
22333
+ className: VueTypes.string.def(''),
22334
+ componentId: types.stringRequired,
22335
+ customQuery: types.func,
22336
+ dataField: types.stringRequired,
22337
+ defaultValue: types.string,
22338
+ value: types.value,
22339
+ defaultQuery: types.func,
22340
+ filterLabel: types.string,
22341
+ innerClass: types.style,
22342
+ placeholder: VueTypes.string.def('Search'),
22343
+ react: types.react,
22344
+ render: types.func,
22345
+ renderItem: types.func,
22346
+ renderNoResults: VueTypes.any,
22347
+ transformData: types.func,
22348
+ selectAllLabel: types.string,
22349
+ showCount: VueTypes.bool.def(true),
22350
+ showFilter: VueTypes.bool.def(true),
22351
+ showRadio: VueTypes.bool.def(true),
22352
+ showSearch: VueTypes.bool.def(true),
22353
+ size: VueTypes.number,
22354
+ sortBy: VueTypes.oneOf(['asc', 'desc', 'count']).def('count'),
22355
+ title: types.title,
22356
+ URLParams: VueTypes.bool.def(false),
22357
+ showMissing: VueTypes.bool.def(false),
22358
+ missingLabel: VueTypes.string.def('N/A'),
22359
+ nestedField: types.string,
22360
+ index: VueTypes.string,
22361
+ enableStrictSelection: VueTypes.bool.def(false)
22362
+ },
22363
+ data: function data() {
22364
+ var props = this.$props;
22365
+ this.__state = {
22366
+ currentValue: '',
22367
+ modifiedOptions: [],
22368
+ searchTerm: ''
22369
+ };
22370
+ this.internalComponent = props.componentId + "__internal";
22371
+ return this.__state;
22372
+ },
22373
+ created: function created() {
22374
+ if (!this.enableAppbase && this.$props.index) {
22375
+ console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
22376
+ }
22377
+
22378
+ var props = this.$props;
22379
+ this.modifiedOptions = this.options && this.options[props.dataField] ? this.options[props.dataField].buckets : []; // Set custom and default queries in store
22380
+
22381
+ updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
22382
+ updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, this.currentValue);
22383
+ },
22384
+ beforeMount: function beforeMount() {
22385
+ this.updateQueryHandlerOptions(this.$props);
22386
+
22387
+ if (this.selectedValue) {
22388
+ this.setValue(this.selectedValue);
22389
+ } else if (this.$props.value) {
22390
+ this.setValue(this.$props.value);
22391
+ } else if (this.$props.defaultValue) {
22392
+ this.setValue(this.$props.defaultValue);
22393
+ }
22394
+ },
22395
+ watch: {
22396
+ options: function options(newVal) {
22397
+ if (newVal) {
22398
+ this.modifiedOptions = newVal[this.$props.dataField] ? newVal[this.$props.dataField].buckets : [];
22399
+ }
22400
+ },
22401
+ size: function size() {
22402
+ this.updateQueryHandlerOptions(this.$props);
22403
+ },
22404
+ sortBy: function sortBy() {
22405
+ this.updateQueryHandlerOptions(this.$props);
22406
+ },
22407
+ dataField: function dataField() {
22408
+ this.updateQueryHandlerOptions(this.$props);
22409
+ this.updateQueryHandler(this.$data.currentValue, this.$props);
22410
+ },
22411
+ defaultValue: function defaultValue(newVal) {
22412
+ this.setValue(newVal);
22413
+ },
22414
+ value: function value(newVal, oldVal) {
22415
+ if (!isEqual$6(newVal, oldVal)) {
22416
+ this.setValue(newVal);
22417
+ }
22418
+ },
22419
+ selectedValue: function selectedValue(newVal) {
22420
+ if (this.$data.currentValue !== newVal) {
22421
+ this.setValue(newVal || '');
22422
+ }
22423
+ },
22424
+ defaultQuery: function defaultQuery(newVal, oldVal) {
22425
+ if (!isQueryIdentical(newVal, oldVal, this.$data.currentValue, this.$props)) {
22426
+ this.updateDefaultQueryHandler(this.$data.currentValue, this.$props);
22427
+ }
22428
+ },
22429
+ customQuery: function customQuery(newVal, oldVal) {
22430
+ if (!isQueryIdentical(newVal, oldVal, this.$data.currentValue, this.$props)) {
22431
+ this.updateQueryHandler(this.componentId, this.$data.currentValue, this.$props);
22432
+ }
22433
+ }
22434
+ },
22435
+ render: function render() {
22436
+ var _this = this;
22437
+
22438
+ var h = arguments[0];
22439
+ var _this$$props = this.$props,
21236
22440
  selectAllLabel = _this$$props.selectAllLabel,
21237
22441
  renderItem = _this$$props.renderItem,
21238
22442
  renderError = _this$$props.renderError;
@@ -21271,14 +22475,14 @@
21271
22475
  return h(Container, {
21272
22476
  "class": this.$props.className
21273
22477
  }, [this.$props.title && h(Title, {
21274
- "class": getClassName$4(this.$props.innerClass, 'title') || ''
22478
+ "class": getClassName$5(this.$props.innerClass, 'title') || ''
21275
22479
  }, [this.$props.title]), this.renderSearch(), this.hasCustomRenderer ? this.getComponent() : h(UL, {
21276
- "class": getClassName$4(this.$props.innerClass, 'list') || ''
22480
+ "class": getClassName$5(this.$props.innerClass, 'list') || ''
21277
22481
  }, [selectAllLabel ? h("li", {
21278
22482
  "key": selectAllLabel,
21279
22483
  "class": "" + (this.$data.currentValue === selectAllLabel ? 'active' : '')
21280
22484
  }, [h(Radio, {
21281
- "class": getClassName$4(this.$props.innerClass, 'radio'),
22485
+ "class": getClassName$5(this.$props.innerClass, 'radio'),
21282
22486
  "attrs": {
21283
22487
  "id": this.$props.componentId + "-" + selectAllLabel,
21284
22488
  "name": this.$props.componentId,
@@ -21293,7 +22497,7 @@
21293
22497
  checked: this.$data.currentValue === selectAllLabel
21294
22498
  })
21295
22499
  }), h("label", {
21296
- "class": getClassName$4(this.$props.innerClass, 'label') || null,
22500
+ "class": getClassName$5(this.$props.innerClass, 'label') || null,
21297
22501
  "attrs": {
21298
22502
  "for": this.$props.componentId + "-" + selectAllLabel
21299
22503
  }
@@ -21302,7 +22506,7 @@
21302
22506
  "key": item.key,
21303
22507
  "class": "" + (_this.currentValue === String(item.key) ? 'active' : '')
21304
22508
  }, [h(Radio, {
21305
- "class": getClassName$4(_this.$props.innerClass, 'radio'),
22509
+ "class": getClassName$5(_this.$props.innerClass, 'radio'),
21306
22510
  "attrs": {
21307
22511
  "id": _this.$props.componentId + "-" + item.key,
21308
22512
  "name": _this.$props.componentId,
@@ -21318,7 +22522,7 @@
21318
22522
  checked: _this.currentValue === String(item.key)
21319
22523
  })
21320
22524
  }), h("label", {
21321
- "class": getClassName$4(_this.$props.innerClass, 'label') || null,
22525
+ "class": getClassName$5(_this.$props.innerClass, 'label') || null,
21322
22526
  "attrs": {
21323
22527
  "for": _this.$props.componentId + "-" + item.key
21324
22528
  }
@@ -21327,7 +22531,7 @@
21327
22531
  count: item.doc_count,
21328
22532
  isChecked: _this.currentValue === String(item.key)
21329
22533
  }) : h("span", [item.key, _this.$props.showCount && h("span", {
21330
- "class": getClassName$4(_this.$props.innerClass, 'count') || null
22534
+ "class": getClassName$5(_this.$props.innerClass, 'count') || null
21331
22535
  }, ["\xA0(", item.doc_count, ")"])])])]);
21332
22536
  })])]);
21333
22537
  },
@@ -21355,7 +22559,7 @@
21355
22559
  _this2.$emit('value-change', value);
21356
22560
  };
21357
22561
 
21358
- checkValueChange$1(props.componentId, value, props.beforeValueChange, performUpdate);
22562
+ checkValueChange$2(props.componentId, value, props.beforeValueChange, performUpdate);
21359
22563
  },
21360
22564
  updateDefaultQueryHandler: function updateDefaultQueryHandler(value, props) {
21361
22565
  var defaultQueryOptions;
@@ -21429,7 +22633,7 @@
21429
22633
 
21430
22634
  if (this.$props.showSearch) {
21431
22635
  return h(Input, {
21432
- "class": getClassName$4(this.$props.innerClass, 'input') || '',
22636
+ "class": getClassName$5(this.$props.innerClass, 'input') || '',
21433
22637
  "on": {
21434
22638
  "input": this.handleInputChange
21435
22639
  },
@@ -21492,7 +22696,7 @@
21492
22696
  var h = this.$createElement;
21493
22697
  var renderNoResults = this.$scopedSlots.renderNoResults || this.$props.renderNoResults;
21494
22698
  return h("p", {
21495
- "class": getClassName$4(this.$props.innerClass, 'noResults') || null
22699
+ "class": getClassName$5(this.$props.innerClass, 'noResults') || null
21496
22700
  }, [isFunction$1(renderNoResults) ? renderNoResults() : renderNoResults]);
21497
22701
  }
21498
22702
  },
@@ -21559,7 +22763,7 @@
21559
22763
  return query;
21560
22764
  };
21561
22765
 
21562
- var mapStateToProps$4 = function mapStateToProps(state, props) {
22766
+ var mapStateToProps$5 = function mapStateToProps(state, props) {
21563
22767
  return {
21564
22768
  options: props.nestedField && state.aggregations[props.componentId] ? state.aggregations[props.componentId].reactivesearch_nested : state.aggregations[props.componentId],
21565
22769
  rawData: state.rawData[props.componentId],
@@ -21574,11 +22778,11 @@
21574
22778
 
21575
22779
  var mapDispatchtoProps$2 = {
21576
22780
  setQueryOptions: setQueryOptions$2,
21577
- updateQuery: updateQuery$2,
21578
- setCustomQuery: setCustomQuery$1,
21579
- setDefaultQuery: setDefaultQuery$2
22781
+ updateQuery: updateQuery$3,
22782
+ setCustomQuery: setCustomQuery$2,
22783
+ setDefaultQuery: setDefaultQuery$3
21580
22784
  };
21581
- var ListConnected = ComponentWrapper$1(connect(mapStateToProps$4, mapDispatchtoProps$2)(SingleList), {
22785
+ var ListConnected = ComponentWrapper$1(connect(mapStateToProps$5, mapDispatchtoProps$2)(SingleList), {
21582
22786
  componentType: constants_1$1.singleList,
21583
22787
  internalComponent: true
21584
22788
  });
@@ -21590,14 +22794,14 @@
21590
22794
 
21591
22795
  SingleList.componentType = constants_1$1.singleList;
21592
22796
 
21593
- var updateQuery$3 = lib_5.updateQuery,
22797
+ var updateQuery$4 = lib_5.updateQuery,
21594
22798
  setQueryOptions$3 = lib_5.setQueryOptions,
21595
- setCustomQuery$2 = lib_5.setCustomQuery,
21596
- setDefaultQuery$3 = lib_5.setDefaultQuery;
21597
- var isEqual$6 = lib_8.isEqual,
22799
+ setCustomQuery$3 = lib_5.setCustomQuery,
22800
+ setDefaultQuery$4 = lib_5.setDefaultQuery;
22801
+ var isEqual$7 = lib_8.isEqual,
21598
22802
  getQueryOptions$2 = lib_8.getQueryOptions,
21599
- checkValueChange$2 = lib_8.checkValueChange,
21600
- getClassName$5 = lib_8.getClassName,
22803
+ checkValueChange$3 = lib_8.checkValueChange,
22804
+ getClassName$6 = lib_8.getClassName,
21601
22805
  getOptionsFromQuery$3 = lib_8.getOptionsFromQuery;
21602
22806
  var MultiList = {
21603
22807
  name: 'MultiList',
@@ -21657,13 +22861,14 @@
21657
22861
  },
21658
22862
  beforeMount: function beforeMount() {
21659
22863
  this.updateQueryHandlerOptions(this.$props);
22864
+ var value = this.selectedValue || this.$props.value || this.$props.defaultValue;
22865
+ this.setValue(value, !this.selectedValue);
22866
+ },
22867
+ mounted: function mounted() {
22868
+ var currentValue = Object.keys(this.$data.currentValue);
21660
22869
 
21661
- if (this.selectedValue) {
21662
- this.setValue(this.selectedValue);
21663
- } else if (this.$props.value) {
21664
- this.setValue(this.$props.value, true);
21665
- } else if (this.$props.defaultValue) {
21666
- this.setValue(this.$props.defaultValue, true);
22870
+ if (this.$props.value !== undefined && !isEqual$7(this.$props.value, currentValue)) {
22871
+ this.$emit('change', currentValue);
21667
22872
  }
21668
22873
  },
21669
22874
  watch: {
@@ -21683,12 +22888,12 @@
21683
22888
  this.updateQueryHandler(this.$data.currentValue, this.$props);
21684
22889
  },
21685
22890
  value: function value(newVal, oldVal) {
21686
- if (!isEqual$6(oldVal, newVal)) {
22891
+ if (!isEqual$7(oldVal, newVal)) {
21687
22892
  this.setValue(newVal, true);
21688
22893
  }
21689
22894
  },
21690
22895
  defaultValue: function defaultValue(newVal, oldVal) {
21691
- if (!isEqual$6(oldVal, newVal)) {
22896
+ if (!isEqual$7(oldVal, newVal)) {
21692
22897
  this.setValue(newVal, true);
21693
22898
  }
21694
22899
  },
@@ -21707,8 +22912,12 @@
21707
22912
  }
21708
22913
  }
21709
22914
 
21710
- if (!isEqual$6(selectedValue, newVal)) {
21711
- this.setValue(newVal || [], true);
22915
+ if (!isEqual$7(selectedValue, newVal)) {
22916
+ if (this.value === undefined) {
22917
+ this.setValue(newVal, true);
22918
+ } else {
22919
+ this.$emit('change', newVal);
22920
+ }
21712
22921
  }
21713
22922
  },
21714
22923
  defaultQuery: function defaultQuery(newVal, oldVal) {
@@ -21765,9 +22974,9 @@
21765
22974
  return h(Container, {
21766
22975
  "class": this.$props.className
21767
22976
  }, [this.$props.title && h(Title, {
21768
- "class": getClassName$5(this.$props.innerClass, 'title')
22977
+ "class": getClassName$6(this.$props.innerClass, 'title')
21769
22978
  }, [this.$props.title]), this.renderSearch(), this.hasCustomRenderer ? this.getComponent() : h(UL, {
21770
- "class": getClassName$5(this.$props.innerClass, 'list')
22979
+ "class": getClassName$6(this.$props.innerClass, 'list')
21771
22980
  }, [selectAllLabel ? h("li", {
21772
22981
  "key": selectAllLabel,
21773
22982
  "class": "" + (this.currentValue[selectAllLabel] ? 'active' : '')
@@ -21779,7 +22988,7 @@
21779
22988
  "value": selectAllLabel,
21780
22989
  "show": this.$props.showCheckbox
21781
22990
  },
21782
- "class": getClassName$5(this.$props.innerClass, 'checkbox'),
22991
+ "class": getClassName$6(this.$props.innerClass, 'checkbox'),
21783
22992
  "on": {
21784
22993
  "click": this.handleClick
21785
22994
  },
@@ -21787,7 +22996,7 @@
21787
22996
  checked: !!this.currentValue[selectAllLabel]
21788
22997
  })
21789
22998
  }), h("label", {
21790
- "class": getClassName$5(this.$props.innerClass, 'label'),
22999
+ "class": getClassName$6(this.$props.innerClass, 'label'),
21791
23000
  "attrs": {
21792
23001
  "for": this.$props.componentId + "-" + selectAllLabel
21793
23002
  }
@@ -21803,7 +23012,7 @@
21803
23012
  "value": item.key,
21804
23013
  "show": _this2.$props.showCheckbox
21805
23014
  },
21806
- "class": getClassName$5(_this2.$props.innerClass, 'checkbox'),
23015
+ "class": getClassName$6(_this2.$props.innerClass, 'checkbox'),
21807
23016
  "on": {
21808
23017
  "click": _this2.handleClick
21809
23018
  },
@@ -21811,7 +23020,7 @@
21811
23020
  checked: !!_this2.$data.currentValue[item.key]
21812
23021
  })
21813
23022
  }), h("label", {
21814
- "class": getClassName$5(_this2.$props.innerClass, 'label'),
23023
+ "class": getClassName$6(_this2.$props.innerClass, 'label'),
21815
23024
  "attrs": {
21816
23025
  "for": _this2.$props.componentId + "-" + item.key
21817
23026
  }
@@ -21820,7 +23029,7 @@
21820
23029
  count: item.doc_count,
21821
23030
  isChecked: !!_this2.$data.currentValue[item.key]
21822
23031
  }) : h("span", [item.key, _this2.$props.showCount && h("span", {
21823
- "class": getClassName$5(_this2.$props.innerClass, 'count')
23032
+ "class": getClassName$6(_this2.$props.innerClass, 'count')
21824
23033
  }, ["\xA0(", item.doc_count, ")"])])])]);
21825
23034
  })])]);
21826
23035
  },
@@ -21904,7 +23113,7 @@
21904
23113
  _this3.$emit('value-change', finalValues);
21905
23114
  };
21906
23115
 
21907
- checkValueChange$2(props.componentId, finalValues, props.beforeValueChange, performUpdate);
23116
+ checkValueChange$3(props.componentId, finalValues, props.beforeValueChange, performUpdate);
21908
23117
  },
21909
23118
  updateDefaultQueryHandler: function updateDefaultQueryHandler(value, props) {
21910
23119
  var defaultQueryOptions;
@@ -21978,7 +23187,7 @@
21978
23187
 
21979
23188
  if (this.$props.showSearch) {
21980
23189
  return h(Input, {
21981
- "class": getClassName$5(this.$props.innerClass, 'input') || '',
23190
+ "class": getClassName$6(this.$props.innerClass, 'input') || '',
21982
23191
  "on": {
21983
23192
  "input": this.handleInputChange
21984
23193
  },
@@ -22007,7 +23216,7 @@
22007
23216
  if (value === undefined) {
22008
23217
  this.setValue(currentValue);
22009
23218
  } else {
22010
- var values = parseValueArray(value, currentValue);
23219
+ var values = parseValueArray(value || [], currentValue);
22011
23220
  this.$emit('change', values);
22012
23221
  }
22013
23222
  },
@@ -22036,7 +23245,7 @@
22036
23245
  var h = this.$createElement;
22037
23246
  var renderNoResults = this.$scopedSlots.renderNoResults || this.$props.renderNoResults;
22038
23247
  return h("p", {
22039
- "class": getClassName$5(this.$props.innerClass, 'noResults') || null
23248
+ "class": getClassName$6(this.$props.innerClass, 'noResults') || null
22040
23249
  }, [isFunction$1(renderNoResults) ? renderNoResults() : renderNoResults]);
22041
23250
  }
22042
23251
  },
@@ -22137,7 +23346,7 @@
22137
23346
  return getAggsQuery(queryOptions, props);
22138
23347
  };
22139
23348
 
22140
- var mapStateToProps$5 = function mapStateToProps(state, props) {
23349
+ var mapStateToProps$6 = function mapStateToProps(state, props) {
22141
23350
  return {
22142
23351
  options: props.nestedField && state.aggregations[props.componentId] ? state.aggregations[props.componentId].reactivesearch_nested : state.aggregations[props.componentId],
22143
23352
  rawData: state.rawData[props.componentId],
@@ -22152,11 +23361,11 @@
22152
23361
 
22153
23362
  var mapDispatchtoProps$3 = {
22154
23363
  setQueryOptions: setQueryOptions$3,
22155
- updateQuery: updateQuery$3,
22156
- setCustomQuery: setCustomQuery$2,
22157
- setDefaultQuery: setDefaultQuery$3
23364
+ updateQuery: updateQuery$4,
23365
+ setCustomQuery: setCustomQuery$3,
23366
+ setDefaultQuery: setDefaultQuery$4
22158
23367
  };
22159
- var ListConnected$1 = ComponentWrapper$1(connect(mapStateToProps$5, mapDispatchtoProps$3)(MultiList), {
23368
+ var ListConnected$1 = ComponentWrapper$1(connect(mapStateToProps$6, mapDispatchtoProps$3)(MultiList), {
22160
23369
  componentType: constants_1$1.multiList,
22161
23370
  internalComponent: true
22162
23371
  });
@@ -22168,8 +23377,8 @@
22168
23377
 
22169
23378
  MultiList.componentType = constants_1$1.multiList;
22170
23379
 
22171
- var _templateObject$k, _templateObject2$8, _templateObject3$7, _templateObject4$6;
22172
- var small = css(_templateObject$k || (_templateObject$k = _taggedTemplateLiteralLoose(["\n\tmin-height: 0;\n\theight: 30px;\n\tborder: 0;\n\tbox-shadow: rgba(0, 0, 0, 0.3) 0px 1px 4px -1px;\n\tborder-radius: 2px;\n"])));
23380
+ var _templateObject$l, _templateObject2$8, _templateObject3$7, _templateObject4$6;
23381
+ var small = css(_templateObject$l || (_templateObject$l = _taggedTemplateLiteralLoose(["\n\tmin-height: 0;\n\theight: 30px;\n\tborder: 0;\n\tbox-shadow: rgba(0, 0, 0, 0.3) 0px 1px 4px -1px;\n\tborder-radius: 2px;\n"])));
22173
23382
 
22174
23383
  var dark$2 = function dark(_ref) {
22175
23384
  var theme = _ref.theme;
@@ -22187,13 +23396,13 @@
22187
23396
  return theme.colors.primaryColor;
22188
23397
  });
22189
23398
 
22190
- var _templateObject$l, _templateObject2$9;
22191
- var open = css(_templateObject$l || (_templateObject$l = _taggedTemplateLiteralLoose(["\n\ttop: 0.55em;\n\ttransform: rotate(-45deg);\n"])));
23399
+ var _templateObject$m, _templateObject2$9;
23400
+ var open = css(_templateObject$m || (_templateObject$m = _taggedTemplateLiteralLoose(["\n\ttop: 0.55em;\n\ttransform: rotate(-45deg);\n"])));
22192
23401
  var Chevron = index$1('span')(_templateObject2$9 || (_templateObject2$9 = _taggedTemplateLiteralLoose(["\n\t&::before {\n\t\tcontent: '';\n\t\tborder-style: solid;\n\t\tborder-width: 0.15em 0.15em 0 0;\n\t\tdisplay: inline-block;\n\t\theight: 0.45em;\n\t\tposition: relative;\n\t\ttop: 0.35em;\n\t\tleft: 0;\n\t\ttransform: rotate(135deg);\n\t\tvertical-align: top;\n\t\twidth: 0.45em;\n\n\t\t", ";\n\t}\n"])), function (props) {
22193
23402
  return props.open ? open : null;
22194
23403
  });
22195
23404
 
22196
- var getClassName$6 = lib_8.getClassName;
23405
+ var getClassName$7 = lib_8.getClassName;
22197
23406
  var Dropdown = {
22198
23407
  data: function data() {
22199
23408
  this.__state = {
@@ -22279,14 +23488,15 @@
22279
23488
  isOpen = _ref.isOpen,
22280
23489
  highlightedIndex = _ref.highlightedIndex,
22281
23490
  getButtonProps = _ref.getButtonProps,
22282
- getItemEvents = _ref.getItemEvents;
23491
+ getItemEvents = _ref.getItemEvents,
23492
+ getInputEvents = _ref.getInputEvents;
22283
23493
  return h("div", {
22284
23494
  "class": suggestionsContainer
22285
23495
  }, [h(Select, {
22286
23496
  "on": _extends({}, _extends({}, getButtonProps({
22287
23497
  onClick: _this.toggle
22288
23498
  }))),
22289
- "class": getClassName$6(_this.$props.innerClass, 'select') || '',
23499
+ "class": getClassName$7(_this.$props.innerClass, 'select') || '',
22290
23500
  "attrs": {
22291
23501
  "title": selectedItem ? _this.renderToString(selectedItem) : placeholder,
22292
23502
  "small": _this.$props.small,
@@ -22303,8 +23513,14 @@
22303
23513
  getButtonProps: getButtonProps,
22304
23514
  getItemEvents: getItemEvents
22305
23515
  }) : isOpen && itemsToRender.length ? h("ul", {
22306
- "class": suggestions$1(themePreset, _this.theme) + " " + (_this.$props.small ? 'small' : '') + " " + getClassName$6(_this.$props.innerClass, 'list')
22307
- }, [_this.$props.showSearch ? _this.renderSearchbox() : null, !hasCustomRenderer && filteredItemsToRender.length === 0 ? _this.renderNoResult() : filteredItemsToRender.map(function (item, index) {
23516
+ "class": suggestions$1(themePreset, _this.theme) + " " + (_this.$props.small ? 'small' : '') + " " + getClassName$7(_this.$props.innerClass, 'list')
23517
+ }, [_this.$props.showSearch ? _this.renderSearchbox({
23518
+ on: {
23519
+ input: getInputEvents({
23520
+ onInput: _this.handleInputChange
23521
+ }).input
23522
+ }
23523
+ }) : null, !hasCustomRenderer && filteredItemsToRender.length === 0 ? _this.renderNoResult() : filteredItemsToRender.map(function (item, index) {
22308
23524
  var selected = _this.$props.multi // MultiDropdownList
22309
23525
  && (selectedItem && !!selectedItem[item[keyField]] // MultiDropdownRange
22310
23526
  || Array.isArray(selectedItem) && selectedItem.find(function (value) {
@@ -22332,9 +23548,9 @@
22332
23548
  "innerHTML": item[labelField]
22333
23549
  }
22334
23550
  }) : item[labelField], _this.$props.showCount && item.doc_count && h("span", {
22335
- "class": getClassName$6(_this.$props.innerClass, 'count') || ''
23551
+ "class": getClassName$7(_this.$props.innerClass, 'count') || ''
22336
23552
  }, ["\xA0(", item.doc_count, ")"])]), selected && _this.$props.multi ? h(Tick, {
22337
- "class": getClassName$6(_this.$props.innerClass, 'icon') || ''
23553
+ "class": getClassName$7(_this.$props.innerClass, 'icon') || ''
22338
23554
  }) : null]);
22339
23555
  }), footer]) : null]);
22340
23556
  }
@@ -22422,10 +23638,10 @@
22422
23638
  var h = this.$createElement;
22423
23639
  var renderNoResults = this.$scopedSlots.renderNoResults || this.$props.renderNoResults;
22424
23640
  return h("p", {
22425
- "class": getClassName$6(this.$props.innerClass, 'noResults') || null
23641
+ "class": getClassName$7(this.$props.innerClass, 'noResults') || null
22426
23642
  }, [isFunction$1(renderNoResults) ? renderNoResults() : renderNoResults]);
22427
23643
  },
22428
- renderSearchbox: function renderSearchbox() {
23644
+ renderSearchbox: function renderSearchbox(eventObject) {
22429
23645
  var h = this.$createElement;
22430
23646
  var _this$$props2 = this.$props,
22431
23647
  componentId = _this$$props2.componentId,
@@ -22433,7 +23649,7 @@
22433
23649
  showClear = _this$$props2.showClear,
22434
23650
  themePreset = _this$$props2.themePreset,
22435
23651
  innerClass = _this$$props2.innerClass;
22436
- var InputComponent = h(Input, {
23652
+ var InputComponent = h(Input, helper$1([{
22437
23653
  "attrs": {
22438
23654
  "id": componentId + "-input",
22439
23655
  "showIcon": false,
@@ -22446,11 +23662,8 @@
22446
23662
  border: 0,
22447
23663
  borderBottom: '1px solid #ddd'
22448
23664
  },
22449
- "class": getClassName$6(innerClass, 'input'),
22450
- "on": {
22451
- "change": this.handleInputChange
22452
- }
22453
- });
23665
+ "class": getClassName$7(innerClass, 'input')
23666
+ }, eventObject]));
22454
23667
 
22455
23668
  if (showClear) {
22456
23669
  return h(InputWrapper, [InputComponent, this.searchTerm && h(IconGroup, {
@@ -22473,17 +23686,17 @@
22473
23686
  }
22474
23687
  };
22475
23688
 
22476
- var updateQuery$4 = lib_5.updateQuery,
23689
+ var updateQuery$5 = lib_5.updateQuery,
22477
23690
  setQueryOptions$4 = lib_5.setQueryOptions,
22478
- setCustomQuery$3 = lib_5.setCustomQuery,
22479
- setDefaultQuery$4 = lib_5.setDefaultQuery;
23691
+ setCustomQuery$4 = lib_5.setCustomQuery,
23692
+ setDefaultQuery$5 = lib_5.setDefaultQuery;
22480
23693
  var getQueryOptions$3 = lib_8.getQueryOptions,
22481
- checkValueChange$3 = lib_8.checkValueChange,
23694
+ checkValueChange$4 = lib_8.checkValueChange,
22482
23695
  checkPropChange$1 = lib_8.checkPropChange,
22483
- getClassName$7 = lib_8.getClassName,
23696
+ getClassName$8 = lib_8.getClassName,
22484
23697
  getOptionsFromQuery$4 = lib_8.getOptionsFromQuery,
22485
- isEqual$7 = lib_8.isEqual,
22486
- getCompositeAggsQuery$2 = lib_8.getCompositeAggsQuery;
23698
+ isEqual$8 = lib_8.isEqual,
23699
+ getCompositeAggsQuery$3 = lib_8.getCompositeAggsQuery;
22487
23700
  var SingleDropdownList = {
22488
23701
  name: 'SingleDropdownList',
22489
23702
  data: function data() {
@@ -22604,7 +23817,7 @@
22604
23817
  this.setValue(newVal);
22605
23818
  },
22606
23819
  value: function value(newVal, oldVal) {
22607
- if (!isEqual$7(newVal, oldVal)) {
23820
+ if (!isEqual$8(newVal, oldVal)) {
22608
23821
  this.setValue(newVal);
22609
23822
  }
22610
23823
  },
@@ -22664,7 +23877,7 @@
22664
23877
  return h(Container, {
22665
23878
  "class": this.$props.className
22666
23879
  }, [this.$props.title && h(Title, {
22667
- "class": getClassName$7(this.$props.innerClass, 'title') || ''
23880
+ "class": getClassName$8(this.$props.innerClass, 'title') || ''
22668
23881
  }, [this.$props.title]), h(Dropdown, {
22669
23882
  "attrs": {
22670
23883
  "innerClass": this.$props.innerClass,
@@ -22720,7 +23933,7 @@
22720
23933
  _this2.$emit('value-change', value);
22721
23934
  };
22722
23935
 
22723
- checkValueChange$3(props.componentId, value, props.beforeValueChange, performUpdate);
23936
+ checkValueChange$4(props.componentId, value, props.beforeValueChange, performUpdate);
22724
23937
  },
22725
23938
  handleChange: function handleChange(item) {
22726
23939
  var value = this.$props.value;
@@ -22781,7 +23994,7 @@
22781
23994
  },
22782
23995
  generateQueryOptions: function generateQueryOptions(props, after) {
22783
23996
  var queryOptions = getQueryOptions$3(props);
22784
- return props.showLoadMore ? getCompositeAggsQuery$2({
23997
+ return props.showLoadMore ? getCompositeAggsQuery$3({
22785
23998
  query: queryOptions,
22786
23999
  props: props,
22787
24000
  after: after
@@ -22887,14 +24100,14 @@
22887
24100
 
22888
24101
  SingleDropdownList.generateQueryOptions = function (props, after) {
22889
24102
  var queryOptions = getQueryOptions$3(props);
22890
- return props.showLoadMore ? getCompositeAggsQuery$2({
24103
+ return props.showLoadMore ? getCompositeAggsQuery$3({
22891
24104
  query: queryOptions,
22892
24105
  props: props,
22893
24106
  after: after
22894
24107
  }) : getAggsQuery(queryOptions, props);
22895
24108
  };
22896
24109
 
22897
- var mapStateToProps$6 = function mapStateToProps(state, props) {
24110
+ var mapStateToProps$7 = function mapStateToProps(state, props) {
22898
24111
  return {
22899
24112
  options: props.nestedField && state.aggregations[props.componentId] ? state.aggregations[props.componentId].reactivesearch_nested : state.aggregations[props.componentId],
22900
24113
  rawData: state.rawData[props.componentId],
@@ -22909,11 +24122,11 @@
22909
24122
 
22910
24123
  var mapDispatchtoProps$4 = {
22911
24124
  setQueryOptions: setQueryOptions$4,
22912
- updateQuery: updateQuery$4,
22913
- setCustomQuery: setCustomQuery$3,
22914
- setDefaultQuery: setDefaultQuery$4
24125
+ updateQuery: updateQuery$5,
24126
+ setCustomQuery: setCustomQuery$4,
24127
+ setDefaultQuery: setDefaultQuery$5
22915
24128
  };
22916
- var ListConnected$2 = ComponentWrapper$1(connect(mapStateToProps$6, mapDispatchtoProps$4)(SingleDropdownList), {
24129
+ var ListConnected$2 = ComponentWrapper$1(connect(mapStateToProps$7, mapDispatchtoProps$4)(SingleDropdownList), {
22917
24130
  componentType: constants_1$1.singleDropdownList,
22918
24131
  internalComponent: true
22919
24132
  });
@@ -22925,17 +24138,17 @@
22925
24138
 
22926
24139
  SingleDropdownList.componentType = constants_1$1.singleDropdownList;
22927
24140
 
22928
- var updateQuery$5 = lib_5.updateQuery,
24141
+ var updateQuery$6 = lib_5.updateQuery,
22929
24142
  setQueryOptions$5 = lib_5.setQueryOptions,
22930
- setCustomQuery$4 = lib_5.setCustomQuery,
22931
- setDefaultQuery$5 = lib_5.setDefaultQuery;
22932
- var isEqual$8 = lib_8.isEqual,
24143
+ setCustomQuery$5 = lib_5.setCustomQuery,
24144
+ setDefaultQuery$6 = lib_5.setDefaultQuery;
24145
+ var isEqual$9 = lib_8.isEqual,
22933
24146
  getQueryOptions$4 = lib_8.getQueryOptions,
22934
- checkValueChange$4 = lib_8.checkValueChange,
24147
+ checkValueChange$5 = lib_8.checkValueChange,
22935
24148
  checkPropChange$2 = lib_8.checkPropChange,
22936
- getClassName$8 = lib_8.getClassName,
24149
+ getClassName$9 = lib_8.getClassName,
22937
24150
  getOptionsFromQuery$5 = lib_8.getOptionsFromQuery,
22938
- getCompositeAggsQuery$3 = lib_8.getCompositeAggsQuery;
24151
+ getCompositeAggsQuery$4 = lib_8.getCompositeAggsQuery;
22939
24152
  var MultiDropdownList = {
22940
24153
  name: 'MultiDropdownList',
22941
24154
  data: function data() {
@@ -23025,7 +24238,7 @@
23025
24238
  }
23026
24239
  }
23027
24240
 
23028
- if (!isEqual$8(selectedValue, newVal)) {
24241
+ if (!isEqual$9(selectedValue, newVal)) {
23029
24242
  this.setValue(newVal || [], true);
23030
24243
  }
23031
24244
  },
@@ -23076,7 +24289,7 @@
23076
24289
  this.setValue(newVal, true);
23077
24290
  },
23078
24291
  value: function value(newVal, oldVal) {
23079
- if (!isEqual$8(newVal, oldVal)) {
24292
+ if (!isEqual$9(newVal, oldVal)) {
23080
24293
  this.setValue(newVal, true);
23081
24294
  }
23082
24295
  },
@@ -23131,7 +24344,7 @@
23131
24344
  return h(Container, {
23132
24345
  "class": this.$props.className
23133
24346
  }, [this.$props.title && h(Title, {
23134
- "class": getClassName$8(this.$props.innerClass, 'title') || ''
24347
+ "class": getClassName$9(this.$props.innerClass, 'title') || ''
23135
24348
  }, [this.$props.title]), h(Dropdown, {
23136
24349
  "attrs": {
23137
24350
  "innerClass": this.$props.innerClass,
@@ -23247,7 +24460,7 @@
23247
24460
  }
23248
24461
 
23249
24462
  var performUpdate = function performUpdate() {
23250
- _this3.currentValue = currentValue;
24463
+ _this3.currentValue = _extends({}, currentValue);
23251
24464
 
23252
24465
  _this3.updateQueryHandler(finalValues, props);
23253
24466
 
@@ -23256,7 +24469,7 @@
23256
24469
  _this3.$emit('value-change', finalValues);
23257
24470
  };
23258
24471
 
23259
- checkValueChange$4(props.componentId, finalValues, props.beforeValueChange, performUpdate);
24472
+ checkValueChange$5(props.componentId, finalValues, props.beforeValueChange, performUpdate);
23260
24473
  },
23261
24474
  updateDefaultQueryHandler: function updateDefaultQueryHandler(value, props) {
23262
24475
  var defaultQueryOptions;
@@ -23308,7 +24521,7 @@
23308
24521
  },
23309
24522
  generateQueryOptions: function generateQueryOptions(props, after) {
23310
24523
  var queryOptions = getQueryOptions$4(props);
23311
- return props.showLoadMore ? getCompositeAggsQuery$3({
24524
+ return props.showLoadMore ? getCompositeAggsQuery$4({
23312
24525
  query: queryOptions,
23313
24526
  props: props,
23314
24527
  after: after
@@ -23450,14 +24663,14 @@
23450
24663
 
23451
24664
  MultiDropdownList.generateQueryOptions = function (props, after) {
23452
24665
  var queryOptions = getQueryOptions$4(props);
23453
- return props.showLoadMore ? getCompositeAggsQuery$3({
24666
+ return props.showLoadMore ? getCompositeAggsQuery$4({
23454
24667
  query: queryOptions,
23455
24668
  props: props,
23456
24669
  after: after
23457
24670
  }) : getAggsQuery(queryOptions, props);
23458
24671
  };
23459
24672
 
23460
- var mapStateToProps$7 = function mapStateToProps(state, props) {
24673
+ var mapStateToProps$8 = function mapStateToProps(state, props) {
23461
24674
  return {
23462
24675
  options: props.nestedField && state.aggregations[props.componentId] ? state.aggregations[props.componentId].reactivesearch_nested : state.aggregations[props.componentId],
23463
24676
  rawData: state.rawData[props.componentId],
@@ -23472,11 +24685,11 @@
23472
24685
 
23473
24686
  var mapDispatchtoProps$5 = {
23474
24687
  setQueryOptions: setQueryOptions$5,
23475
- updateQuery: updateQuery$5,
23476
- setCustomQuery: setCustomQuery$4,
23477
- setDefaultQuery: setDefaultQuery$5
24688
+ updateQuery: updateQuery$6,
24689
+ setCustomQuery: setCustomQuery$5,
24690
+ setDefaultQuery: setDefaultQuery$6
23478
24691
  };
23479
- var ListConnected$3 = ComponentWrapper$1(connect(mapStateToProps$7, mapDispatchtoProps$5)(MultiDropdownList), {
24692
+ var ListConnected$3 = ComponentWrapper$1(connect(mapStateToProps$8, mapDispatchtoProps$5)(MultiDropdownList), {
23480
24693
  componentType: constants_1$1.multiDropdownList,
23481
24694
  internalComponent: true
23482
24695
  });
@@ -23488,12 +24701,12 @@
23488
24701
 
23489
24702
  MultiDropdownList.componentType = constants_1$1.multiDropdownList;
23490
24703
 
23491
- var updateQuery$6 = lib_5.updateQuery,
24704
+ var updateQuery$7 = lib_5.updateQuery,
23492
24705
  setQueryOptions$6 = lib_5.setQueryOptions,
23493
- setCustomQuery$5 = lib_5.setCustomQuery;
23494
- var isEqual$9 = lib_8.isEqual,
23495
- checkValueChange$5 = lib_8.checkValueChange,
23496
- getClassName$9 = lib_8.getClassName,
24706
+ setCustomQuery$6 = lib_5.setCustomQuery;
24707
+ var isEqual$a = lib_8.isEqual,
24708
+ checkValueChange$6 = lib_8.checkValueChange,
24709
+ getClassName$a = lib_8.getClassName,
23497
24710
  getOptionsFromQuery$6 = lib_8.getOptionsFromQuery,
23498
24711
  handleA11yAction$1 = lib_8.handleA11yAction;
23499
24712
  var ToggleButton = {
@@ -23552,21 +24765,21 @@
23552
24765
  this.updateQuery(this.$data.currentValue, this.$props);
23553
24766
  },
23554
24767
  value: function value(newVal, oldVal) {
23555
- if (!isEqual$9(newVal, oldVal)) {
24768
+ if (!isEqual$a(newVal, oldVal)) {
23556
24769
  this.handleToggle(newVal, true, this.$props);
23557
24770
  }
23558
24771
  },
23559
24772
  selectedValue: function selectedValue(newVal, oldVal) {
23560
24773
  if (this.$props.multiSelect) {
23561
24774
  // for multiselect selectedValue will be an array
23562
- if (!isEqual$9(this.$data.currentValue, newVal) && !isEqual$9(oldVal, newVal)) {
24775
+ if (!isEqual$a(this.$data.currentValue, newVal) && !isEqual$a(oldVal, newVal)) {
23563
24776
  this.handleToggle(newVal || [], true, this.$props);
23564
24777
  }
23565
24778
  } else {
23566
24779
  // else selectedValue will be a string
23567
24780
  var currentValue = this.$data.currentValue[0] ? this.$data.currentValue[0].value : null;
23568
24781
 
23569
- if (!isEqual$9(currentValue, this.selectedValue) && !isEqual$9(oldVal, this.selectedValue)) {
24782
+ if (!isEqual$a(currentValue, this.selectedValue) && !isEqual$a(oldVal, this.selectedValue)) {
23570
24783
  this.handleToggle(this.selectedValue || [], true, this.$props);
23571
24784
  }
23572
24785
  }
@@ -23644,7 +24857,7 @@
23644
24857
  }
23645
24858
  };
23646
24859
 
23647
- checkValueChange$5(props.componentId, props.multiSelect ? value : value[0], props.beforeValueChange, performUpdate);
24860
+ checkValueChange$6(props.componentId, props.multiSelect ? value : value[0], props.beforeValueChange, performUpdate);
23648
24861
  },
23649
24862
  updateQuery: function updateQuery(value, props) {
23650
24863
  var filterValue = value;
@@ -23681,7 +24894,7 @@
23681
24894
  multiSelect = _this$$props.multiSelect;
23682
24895
 
23683
24896
  if (enableStrictSelection && !multiSelect && this.$data.currentValue.find(function (stateItem) {
23684
- return isEqual$9(item, stateItem);
24897
+ return isEqual$a(item, stateItem);
23685
24898
  })) {
23686
24899
  return false;
23687
24900
  }
@@ -23711,7 +24924,7 @@
23711
24924
  return _this2.handleClick(item);
23712
24925
  }
23713
24926
  }) : h(Button, {
23714
- "class": getClassName$9(this.$props.innerClass, 'button') + " " + (isSelected ? 'active' : ''),
24927
+ "class": getClassName$a(this.$props.innerClass, 'button') + " " + (isSelected ? 'active' : ''),
23715
24928
  "on": {
23716
24929
  "click": function click() {
23717
24930
  return _this2.handleClick(item);
@@ -23738,7 +24951,7 @@
23738
24951
  return h(Container, {
23739
24952
  "class": toggleButtons
23740
24953
  }, [this.$props.title && h(Title, {
23741
- "class": getClassName$9(this.$props.innerClass, 'title')
24954
+ "class": getClassName$a(this.$props.innerClass, 'title')
23742
24955
  }, [this.$props.title]), this.$props.data.map(function (item) {
23743
24956
  return _this3.renderButton(item);
23744
24957
  })]);
@@ -23794,7 +25007,7 @@
23794
25007
  return query;
23795
25008
  };
23796
25009
 
23797
- var mapStateToProps$8 = function mapStateToProps(state, props) {
25010
+ var mapStateToProps$9 = function mapStateToProps(state, props) {
23798
25011
  return {
23799
25012
  selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || null,
23800
25013
  componentProps: state.props[props.componentId],
@@ -23803,11 +25016,11 @@
23803
25016
  };
23804
25017
 
23805
25018
  var mapDispatchtoProps$6 = {
23806
- updateQueryHandler: updateQuery$6,
25019
+ updateQueryHandler: updateQuery$7,
23807
25020
  setQueryOptions: setQueryOptions$6,
23808
- setCustomQuery: setCustomQuery$5
25021
+ setCustomQuery: setCustomQuery$6
23809
25022
  };
23810
- var RcConnected = ComponentWrapper$1(connect(mapStateToProps$8, mapDispatchtoProps$6)(ToggleButton), {
25023
+ var RcConnected = ComponentWrapper$1(connect(mapStateToProps$9, mapDispatchtoProps$6)(ToggleButton), {
23811
25024
  componentType: constants_1$1.toggleButton
23812
25025
  });
23813
25026
 
@@ -23822,15 +25035,15 @@
23822
25035
  _excluded2 = ["query"],
23823
25036
  _excluded3 = ["query"],
23824
25037
  _excluded4 = ["query"];
23825
- var updateQuery$7 = lib_5.updateQuery,
25038
+ var updateQuery$8 = lib_5.updateQuery,
23826
25039
  setQueryOptions$7 = lib_5.setQueryOptions,
23827
- setCustomQuery$6 = lib_5.setCustomQuery,
23828
- setDefaultQuery$6 = lib_5.setDefaultQuery;
25040
+ setCustomQuery$7 = lib_5.setCustomQuery,
25041
+ setDefaultQuery$7 = lib_5.setDefaultQuery;
23829
25042
  var parseHits$1 = lib_8.parseHits,
23830
- isEqual$a = lib_8.isEqual,
23831
- getCompositeAggsQuery$4 = lib_8.getCompositeAggsQuery,
25043
+ isEqual$b = lib_8.isEqual,
25044
+ getCompositeAggsQuery$5 = lib_8.getCompositeAggsQuery,
23832
25045
  getOptionsFromQuery$7 = lib_8.getOptionsFromQuery,
23833
- getResultStats$2 = lib_8.getResultStats;
25046
+ getResultStats$3 = lib_8.getResultStats;
23834
25047
  var ReactiveComponent = {
23835
25048
  name: 'ReactiveComponent',
23836
25049
  props: {
@@ -23973,42 +25186,42 @@
23973
25186
  },
23974
25187
  watch: {
23975
25188
  hits: function hits(newVal, oldVal) {
23976
- if (!isEqual$a(newVal, oldVal)) {
25189
+ if (!isEqual$b(newVal, oldVal)) {
23977
25190
  this.$emit('data', this.getData());
23978
25191
  }
23979
25192
  },
23980
25193
  rawData: function rawData(newVal, oldVal) {
23981
- if (!isEqual$a(newVal, oldVal)) {
25194
+ if (!isEqual$b(newVal, oldVal)) {
23982
25195
  this.$emit('data', this.getData());
23983
25196
  }
23984
25197
  },
23985
25198
  aggregations: function aggregations(newVal, oldVal) {
23986
- if (!isEqual$a(newVal, oldVal)) {
25199
+ if (!isEqual$b(newVal, oldVal)) {
23987
25200
  this.$emit('data', this.getData());
23988
25201
  }
23989
25202
  },
23990
25203
  aggregationData: function aggregationData(newVal, oldVal) {
23991
- if (!isEqual$a(newVal, oldVal)) {
25204
+ if (!isEqual$b(newVal, oldVal)) {
23992
25205
  this.$emit('data', this.getData());
23993
25206
  }
23994
25207
  },
23995
25208
  promotedResults: function promotedResults(newVal, oldVal) {
23996
- if (!isEqual$a(newVal, oldVal)) {
25209
+ if (!isEqual$b(newVal, oldVal)) {
23997
25210
  this.$emit('data', this.getData());
23998
25211
  }
23999
25212
  },
24000
25213
  hidden: function hidden(newVal, oldVal) {
24001
- if (!isEqual$a(newVal, oldVal)) {
25214
+ if (!isEqual$b(newVal, oldVal)) {
24002
25215
  this.$emit('data', this.getData());
24003
25216
  }
24004
25217
  },
24005
25218
  total: function total(newVal, oldVal) {
24006
- if (!isEqual$a(newVal, oldVal)) {
25219
+ if (!isEqual$b(newVal, oldVal)) {
24007
25220
  this.$emit('data', this.getData());
24008
25221
  }
24009
25222
  },
24010
25223
  time: function time(newVal, oldVal) {
24011
- if (!isEqual$a(newVal, oldVal)) {
25224
+ if (!isEqual$b(newVal, oldVal)) {
24012
25225
  this.$emit('data', this.getData());
24013
25226
  }
24014
25227
  },
@@ -24092,7 +25305,7 @@
24092
25305
  getAggsQuery: function getAggsQuery() {
24093
25306
  if (this.aggregationField) {
24094
25307
  return {
24095
- aggs: getCompositeAggsQuery$4({
25308
+ aggs: getCompositeAggsQuery$5({
24096
25309
  props: this.$props,
24097
25310
  showTopHits: true,
24098
25311
  value: this.selectedValue
@@ -24136,12 +25349,12 @@
24136
25349
  },
24137
25350
  computed: {
24138
25351
  stats: function stats() {
24139
- return getResultStats$2(this);
25352
+ return getResultStats$3(this);
24140
25353
  }
24141
25354
  }
24142
25355
  };
24143
25356
 
24144
- var mapStateToProps$9 = function mapStateToProps(state, props) {
25357
+ var mapStateToProps$a = function mapStateToProps(state, props) {
24145
25358
  return {
24146
25359
  aggregations: state.aggregations[props.componentId] && state.aggregations[props.componentId] || null,
24147
25360
  aggregationData: state.compositeAggregations[props.componentId] || [],
@@ -24161,11 +25374,11 @@
24161
25374
 
24162
25375
  var mapDispatchtoProps$7 = {
24163
25376
  setQueryOptions: setQueryOptions$7,
24164
- updateQuery: updateQuery$7,
24165
- setCustomQuery: setCustomQuery$6,
24166
- setDefaultQuery: setDefaultQuery$6
25377
+ updateQuery: updateQuery$8,
25378
+ setCustomQuery: setCustomQuery$7,
25379
+ setDefaultQuery: setDefaultQuery$7
24167
25380
  };
24168
- var RcConnected$1 = ComponentWrapper$1(connect(mapStateToProps$9, mapDispatchtoProps$7)(ReactiveComponent), {
25381
+ var RcConnected$1 = ComponentWrapper$1(connect(mapStateToProps$a, mapDispatchtoProps$7)(ReactiveComponent), {
24169
25382
  componentType: constants_1$1.reactiveComponent
24170
25383
  });
24171
25384
 
@@ -24179,7 +25392,7 @@
24179
25392
  var setValue$2 = lib_5.setValue,
24180
25393
  clearValues = lib_5.clearValues,
24181
25394
  resetValuesToDefault = lib_5.resetValuesToDefault;
24182
- var getClassName$a = lib_8.getClassName,
25395
+ var getClassName$b = lib_8.getClassName,
24183
25396
  handleA11yAction$2 = lib_8.handleA11yAction;
24184
25397
  var SelectedFilters = {
24185
25398
  name: 'SelectedFilters',
@@ -24217,9 +25430,9 @@
24217
25430
  return h(Container, {
24218
25431
  "class": filters(this.theme) + " " + (this.$props.className || '')
24219
25432
  }, [this.$props.title && hasValues && h(Title, {
24220
- "class": getClassName$a(this.$props.innerClass, 'title') || ''
25433
+ "class": getClassName$b(this.$props.innerClass, 'title') || ''
24221
25434
  }, [this.$props.title]), filtersToRender, this.$props.showClearAll && hasValues ? h(Button, {
24222
- "class": getClassName$a(this.$props.innerClass, 'button') || '',
25435
+ "class": getClassName$b(this.$props.innerClass, 'button') || '',
24223
25436
  "on": _extends({}, {
24224
25437
  click: this.clearValues,
24225
25438
  keypress: function keypress(event) {
@@ -24294,7 +25507,7 @@
24294
25507
  var valueToRender = _this3.renderValue(value, isArray);
24295
25508
 
24296
25509
  return h(Button, {
24297
- "class": getClassName$a(_this3.$props.innerClass, 'button') || '',
25510
+ "class": getClassName$b(_this3.$props.innerClass, 'button') || '',
24298
25511
  "key": component + "-" + (index + 1),
24299
25512
  "on": _extends({}, {
24300
25513
  click: function click() {
@@ -24323,7 +25536,7 @@
24323
25536
  }
24324
25537
  };
24325
25538
 
24326
- var mapStateToProps$a = function mapStateToProps(state) {
25539
+ var mapStateToProps$b = function mapStateToProps(state) {
24327
25540
  return {
24328
25541
  components: state.components,
24329
25542
  selectedValues: state.selectedValues
@@ -24335,18 +25548,18 @@
24335
25548
  setValue: setValue$2,
24336
25549
  resetValuesToDefault: resetValuesToDefault
24337
25550
  };
24338
- var RcConnected$2 = connect(mapStateToProps$a, mapDispatchtoProps$8)(SelectedFilters);
25551
+ var RcConnected$2 = connect(mapStateToProps$b, mapDispatchtoProps$8)(SelectedFilters);
24339
25552
 
24340
25553
  SelectedFilters.install = function (Vue) {
24341
25554
  Vue.component(SelectedFilters.name, RcConnected$2);
24342
25555
  };
24343
25556
 
24344
- var updateQuery$8 = lib_5.updateQuery,
25557
+ var updateQuery$9 = lib_5.updateQuery,
24345
25558
  setQueryOptions$8 = lib_5.setQueryOptions,
24346
- setCustomQuery$7 = lib_5.setCustomQuery;
24347
- var isEqual$b = lib_8.isEqual,
24348
- checkValueChange$6 = lib_8.checkValueChange,
24349
- getClassName$b = lib_8.getClassName,
25559
+ setCustomQuery$8 = lib_5.setCustomQuery;
25560
+ var isEqual$c = lib_8.isEqual,
25561
+ checkValueChange$7 = lib_8.checkValueChange,
25562
+ getClassName$c = lib_8.getClassName,
24350
25563
  getOptionsFromQuery$8 = lib_8.getOptionsFromQuery;
24351
25564
  var SingleRange = {
24352
25565
  name: 'SingleRange',
@@ -24401,12 +25614,12 @@
24401
25614
  this.setValue(newVal);
24402
25615
  },
24403
25616
  value: function value(newVal, oldVal) {
24404
- if (!isEqual$b(newVal, oldVal)) {
25617
+ if (!isEqual$c(newVal, oldVal)) {
24405
25618
  this.setValue(newVal);
24406
25619
  }
24407
25620
  },
24408
25621
  selectedValue: function selectedValue(newVal) {
24409
- if (!isEqual$b(this.$data.currentValue, newVal)) {
25622
+ if (!isEqual$c(this.$data.currentValue, newVal)) {
24410
25623
  this.setValue(newVal);
24411
25624
  }
24412
25625
  },
@@ -24423,16 +25636,16 @@
24423
25636
  return h(Container, {
24424
25637
  "class": this.$props.className
24425
25638
  }, [this.$props.title && h(Title, {
24426
- "class": getClassName$b(this.$props.innerClass, 'title')
25639
+ "class": getClassName$c(this.$props.innerClass, 'title')
24427
25640
  }, [this.$props.title]), h(UL, {
24428
- "class": getClassName$b(this.$props.innerClass, 'list')
25641
+ "class": getClassName$c(this.$props.innerClass, 'list')
24429
25642
  }, [this.$props.data.map(function (item) {
24430
25643
  var selected = !!_this.$data.currentValue && _this.$data.currentValue.label === item.label;
24431
25644
  return h("li", {
24432
25645
  "key": item.label,
24433
25646
  "class": "" + (selected ? 'active' : '')
24434
25647
  }, [h(Radio, {
24435
- "class": getClassName$b(_this.$props.innerClass, 'radio'),
25648
+ "class": getClassName$c(_this.$props.innerClass, 'radio'),
24436
25649
  "attrs": {
24437
25650
  "id": _this.$props.componentId + "-" + item.label,
24438
25651
  "name": _this.$props.componentId,
@@ -24445,7 +25658,7 @@
24445
25658
  "change": _this.handleChange
24446
25659
  }
24447
25660
  }), h("label", {
24448
- "class": getClassName$b(_this.$props.innerClass, 'label'),
25661
+ "class": getClassName$c(_this.$props.innerClass, 'label'),
24449
25662
  "attrs": {
24450
25663
  "for": _this.$props.componentId + "-" + item.label
24451
25664
  }
@@ -24472,7 +25685,7 @@
24472
25685
  _this2.$emit('value-change', currentValue);
24473
25686
  };
24474
25687
 
24475
- checkValueChange$6(props.componentId, currentValue, props.beforeValueChange, performUpdate);
25688
+ checkValueChange$7(props.componentId, currentValue, props.beforeValueChange, performUpdate);
24476
25689
  },
24477
25690
  updateQueryHandler: function updateQueryHandler(value, props) {
24478
25691
  var customQuery = props.customQuery;
@@ -24545,7 +25758,7 @@
24545
25758
  return query;
24546
25759
  };
24547
25760
 
24548
- var mapStateToProps$b = function mapStateToProps(state, props) {
25761
+ var mapStateToProps$c = function mapStateToProps(state, props) {
24549
25762
  return {
24550
25763
  selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || null,
24551
25764
  componentProps: state.props[props.componentId],
@@ -24554,11 +25767,11 @@
24554
25767
  };
24555
25768
 
24556
25769
  var mapDispatchtoProps$9 = {
24557
- updateQuery: updateQuery$8,
25770
+ updateQuery: updateQuery$9,
24558
25771
  setQueryOptions: setQueryOptions$8,
24559
- setCustomQuery: setCustomQuery$7
25772
+ setCustomQuery: setCustomQuery$8
24560
25773
  };
24561
- var RangeConnected = ComponentWrapper$1(connect(mapStateToProps$b, mapDispatchtoProps$9)(SingleRange), {
25774
+ var RangeConnected = ComponentWrapper$1(connect(mapStateToProps$c, mapDispatchtoProps$9)(SingleRange), {
24562
25775
  componentType: constants_1$1.singleRange
24563
25776
  });
24564
25777
 
@@ -24569,12 +25782,12 @@
24569
25782
 
24570
25783
  SingleRange.componentType = constants_1$1.singleRange;
24571
25784
 
24572
- var updateQuery$9 = lib_5.updateQuery,
25785
+ var updateQuery$a = lib_5.updateQuery,
24573
25786
  setQueryOptions$9 = lib_5.setQueryOptions,
24574
- setCustomQuery$8 = lib_5.setCustomQuery;
24575
- var isEqual$c = lib_8.isEqual,
24576
- checkValueChange$7 = lib_8.checkValueChange,
24577
- getClassName$c = lib_8.getClassName,
25787
+ setCustomQuery$9 = lib_5.setCustomQuery;
25788
+ var isEqual$d = lib_8.isEqual,
25789
+ checkValueChange$8 = lib_8.checkValueChange,
25790
+ getClassName$d = lib_8.getClassName,
24578
25791
  getOptionsFromQuery$9 = lib_8.getOptionsFromQuery;
24579
25792
  var MultiRange = {
24580
25793
  name: 'MultiRange',
@@ -24681,7 +25894,7 @@
24681
25894
  _this.$emit('value-change', Object.keys(selectedValues));
24682
25895
  };
24683
25896
 
24684
- checkValueChange$7(props.componentId, currentValue, props.beforeValueChange, performUpdate);
25897
+ checkValueChange$8(props.componentId, currentValue, props.beforeValueChange, performUpdate);
24685
25898
  },
24686
25899
  updateQueryHandler: function updateQueryHandler(value, props) {
24687
25900
  var customQuery = props.customQuery;
@@ -24716,12 +25929,12 @@
24716
25929
  this.selectItem(newVal, true, undefined, true);
24717
25930
  },
24718
25931
  value: function value(newVal, oldVal) {
24719
- if (!isEqual$c(newVal, oldVal)) {
25932
+ if (!isEqual$d(newVal, oldVal)) {
24720
25933
  this.selectItem(newVal, true, undefined, true);
24721
25934
  }
24722
25935
  },
24723
25936
  selectedValue: function selectedValue(newVal) {
24724
- if (!isEqual$c(this.$data.currentValue, newVal)) {
25937
+ if (!isEqual$d(this.$data.currentValue, newVal)) {
24725
25938
  this.selectItem(newVal, true, undefined, true);
24726
25939
  }
24727
25940
  },
@@ -24755,16 +25968,16 @@
24755
25968
  return h(Container, {
24756
25969
  "class": this.$props.className
24757
25970
  }, [this.$props.title && h(Title, {
24758
- "class": getClassName$c(this.$props.innerClass, 'title')
25971
+ "class": getClassName$d(this.$props.innerClass, 'title')
24759
25972
  }, [this.$props.title]), h(UL, {
24760
- "class": getClassName$c(this.$props.innerClass, 'list')
25973
+ "class": getClassName$d(this.$props.innerClass, 'list')
24761
25974
  }, [this.$props.data.map(function (item) {
24762
25975
  var selected = !!_this2.$data.currentValue && _this2.$data.currentValue.label === item.label;
24763
25976
  return h("li", {
24764
25977
  "key": item.label,
24765
25978
  "class": "" + (selected ? 'active' : '')
24766
25979
  }, [h(Checkbox, {
24767
- "class": getClassName$c(_this2.$props.innerClass, 'checkbox'),
25980
+ "class": getClassName$d(_this2.$props.innerClass, 'checkbox'),
24768
25981
  "attrs": {
24769
25982
  "id": _this2.$props.componentId + "-" + item.label,
24770
25983
  "name": _this2.$props.componentId,
@@ -24779,7 +25992,7 @@
24779
25992
  click: _this2.handleClick
24780
25993
  })
24781
25994
  }), h("label", {
24782
- "class": getClassName$c(_this2.$props.innerClass, 'label'),
25995
+ "class": getClassName$d(_this2.$props.innerClass, 'label'),
24783
25996
  "attrs": {
24784
25997
  "for": _this2.$props.componentId + "-" + item.label
24785
25998
  }
@@ -24839,7 +26052,7 @@
24839
26052
  return query;
24840
26053
  };
24841
26054
 
24842
- var mapStateToProps$c = function mapStateToProps(state, props) {
26055
+ var mapStateToProps$d = function mapStateToProps(state, props) {
24843
26056
  return {
24844
26057
  selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || null,
24845
26058
  componentProps: state.props[props.componentId],
@@ -24848,11 +26061,11 @@
24848
26061
  };
24849
26062
 
24850
26063
  var mapDispatchtoProps$a = {
24851
- updateQuery: updateQuery$9,
26064
+ updateQuery: updateQuery$a,
24852
26065
  setQueryOptions: setQueryOptions$9,
24853
- setCustomQuery: setCustomQuery$8
26066
+ setCustomQuery: setCustomQuery$9
24854
26067
  };
24855
- var RangeConnected$1 = ComponentWrapper$1(connect(mapStateToProps$c, mapDispatchtoProps$a)(MultiRange), {
26068
+ var RangeConnected$1 = ComponentWrapper$1(connect(mapStateToProps$d, mapDispatchtoProps$a)(MultiRange), {
24856
26069
  componentType: constants_1$1.multiRange
24857
26070
  });
24858
26071
 
@@ -25138,8 +26351,8 @@
25138
26351
  };
25139
26352
  var vueNoSsr_common = index$2;
25140
26353
 
25141
- var _templateObject$m;
25142
- var Slider = index$1('div')(_templateObject$m || (_templateObject$m = _taggedTemplateLiteralLoose(["\n\tmargin-top: 30px;\n\tpadding: 10px;\n\n\t/* component style */\n\t.vue-slider-disabled {\n\t\topacity: 0.5;\n\t\tcursor: not-allowed;\n\t}\n\n\t/* rail style */\n\t.vue-slider-rail {\n\t\tbackground-color: #ccc;\n\t\tborder-radius: 15px;\n\t\theight: 4px;\n\t}\n\n\t/* process style */\n\t.vue-slider-process {\n\t\tbackground-color: #0b6aff;\n\t\tborder-radius: 15px;\n\t}\n\n\t/* mark style */\n\t.vue-slider-mark {\n\t\tz-index: 4;\n\t}\n\n\t.vue-slider-mark:first-child .vue-slider-mark-step,\n\t.vue-slider-mark:last-child .vue-slider-mark-step {\n\t\tdisplay: none;\n\t}\n\n\t.vue-slider-mark-step {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tborder-radius: 50%;\n\t\tbackground-color: rgba(0, 0, 0, 0.16);\n\t}\n\n\t.vue-slider-mark-label {\n\t\tfont-size: 14px;\n\t\twhite-space: nowrap;\n\t}\n\n\t/* dot style */\n\t.vue-slider-dot {\n\t\tz-index: 2;\n\t}\n\n\t.vue-slider-dot-handle {\n\t\tcursor: pointer;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tborder-radius: 50%;\n\t\tbackground-color: #fff;\n\t\tbox-sizing: border-box;\n\t\tborder: 1px solid #9a9a9a;\n\t\tz-index: 2;\n\t\tbox-shadow: 0.5px 0.5px 2px 1px rgb(0 0 0 / 32%);\n\t}\n\n\t.vue-slider-dot-handle-disabled {\n\t\tcursor: not-allowed;\n\t\tbackground-color: #ccc;\n\t}\n\n\t.vue-slider-dot-tooltip-inner {\n\t\tfont-size: 14px;\n\t\twhite-space: nowrap;\n\t\tpadding: 2px 5px;\n\t\tmin-width: 20px;\n\t\ttext-align: center;\n\t\tcolor: #fff;\n\t\tborder-radius: 5px;\n\t\tborder: 1px solid #3498db;\n\t\tbackground-color: #3498db;\n\t\tbox-sizing: content-box;\n\t}\n\n\t.vue-slider-dot-tooltip-inner::after {\n\t\tcontent: '';\n\t\tposition: absolute;\n\t}\n\n\t.vue-slider-dot-tooltip-inner-top::after {\n\t\ttop: 100%;\n\t\tleft: 50%;\n\t\ttransform: translate(-50%, 0);\n\t\theight: 0;\n\t\twidth: 0;\n\t\tborder-color: transparent;\n\t\tborder-style: solid;\n\t\tborder-width: 5px;\n\t\tborder-top-color: inherit;\n\t}\n\n\t.vue-slider-dot-tooltip-inner-bottom::after {\n\t\tbottom: 100%;\n\t\tleft: 50%;\n\t\ttransform: translate(-50%, 0);\n\t\theight: 0;\n\t\twidth: 0;\n\t\tborder-color: transparent;\n\t\tborder-style: solid;\n\t\tborder-width: 5px;\n\t\tborder-bottom-color: inherit;\n\t}\n\n\t.vue-slider-dot-tooltip-inner-left::after {\n\t\tleft: 100%;\n\t\ttop: 50%;\n\t\ttransform: translate(0, -50%);\n\t\theight: 0;\n\t\twidth: 0;\n\t\tborder-color: transparent;\n\t\tborder-style: solid;\n\t\tborder-width: 5px;\n\t\tborder-left-color: inherit;\n\t}\n\n\t.vue-slider-dot-tooltip-inner-right::after {\n\t\tright: 100%;\n\t\ttop: 50%;\n\t\ttransform: translate(0, -50%);\n\t\theight: 0;\n\t\twidth: 0;\n\t\tborder-color: transparent;\n\t\tborder-style: solid;\n\t\tborder-width: 5px;\n\t\tborder-right-color: inherit;\n\t}\n\n\t.vue-slider-dot-tooltip-wrapper {\n\t\topacity: 0;\n\t\ttransition: all 0.3s;\n\t}\n\t.vue-slider-dot-tooltip-wrapper-show {\n\t\topacity: 1;\n\t}\n\n\t.label-container {\n\t\tmargin: 10px 0;\n\t\twidth: 100%;\n\t}\n\n\t.range-label-right {\n\t\tfloat: right;\n\t}\n"])));
26354
+ var _templateObject$n;
26355
+ var Slider = index$1('div')(_templateObject$n || (_templateObject$n = _taggedTemplateLiteralLoose(["\n\tmargin-top: 30px;\n\tpadding: 10px;\n\n\t/* component style */\n\t.vue-slider-disabled {\n\t\topacity: 0.5;\n\t\tcursor: not-allowed;\n\t}\n\n\t/* rail style */\n\t.vue-slider-rail {\n\t\tbackground-color: #ccc;\n\t\tborder-radius: 15px;\n\t\theight: 4px;\n\t}\n\n\t/* process style */\n\t.vue-slider-process {\n\t\tbackground-color: #0b6aff;\n\t\tborder-radius: 15px;\n\t}\n\n\t/* mark style */\n\t.vue-slider-mark {\n\t\tz-index: 4;\n\t}\n\n\t.vue-slider-mark:first-child .vue-slider-mark-step,\n\t.vue-slider-mark:last-child .vue-slider-mark-step {\n\t\tdisplay: none;\n\t}\n\n\t.vue-slider-mark-step {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tborder-radius: 50%;\n\t\tbackground-color: rgba(0, 0, 0, 0.16);\n\t}\n\n\t.vue-slider-mark-label {\n\t\tfont-size: 14px;\n\t\twhite-space: nowrap;\n\t}\n\n\t/* dot style */\n\t.vue-slider-dot {\n\t\tz-index: 2;\n\t}\n\n\t.vue-slider-dot-handle {\n\t\tcursor: pointer;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tborder-radius: 50%;\n\t\tbackground-color: #fff;\n\t\tbox-sizing: border-box;\n\t\tborder: 1px solid #9a9a9a;\n\t\tz-index: 2;\n\t\tbox-shadow: 0.5px 0.5px 2px 1px rgb(0 0 0 / 32%);\n\t}\n\n\t.vue-slider-dot-handle-disabled {\n\t\tcursor: not-allowed;\n\t\tbackground-color: #ccc;\n\t}\n\n\t.vue-slider-dot-tooltip-inner {\n\t\tfont-size: 14px;\n\t\twhite-space: nowrap;\n\t\tpadding: 2px 5px;\n\t\tmin-width: 20px;\n\t\ttext-align: center;\n\t\tcolor: #fff;\n\t\tborder-radius: 5px;\n\t\tborder: 1px solid #3498db;\n\t\tbackground-color: #3498db;\n\t\tbox-sizing: content-box;\n\t}\n\n\t.vue-slider-dot-tooltip-inner::after {\n\t\tcontent: '';\n\t\tposition: absolute;\n\t}\n\n\t.vue-slider-dot-tooltip-inner-top::after {\n\t\ttop: 100%;\n\t\tleft: 50%;\n\t\ttransform: translate(-50%, 0);\n\t\theight: 0;\n\t\twidth: 0;\n\t\tborder-color: transparent;\n\t\tborder-style: solid;\n\t\tborder-width: 5px;\n\t\tborder-top-color: inherit;\n\t}\n\n\t.vue-slider-dot-tooltip-inner-bottom::after {\n\t\tbottom: 100%;\n\t\tleft: 50%;\n\t\ttransform: translate(-50%, 0);\n\t\theight: 0;\n\t\twidth: 0;\n\t\tborder-color: transparent;\n\t\tborder-style: solid;\n\t\tborder-width: 5px;\n\t\tborder-bottom-color: inherit;\n\t}\n\n\t.vue-slider-dot-tooltip-inner-left::after {\n\t\tleft: 100%;\n\t\ttop: 50%;\n\t\ttransform: translate(0, -50%);\n\t\theight: 0;\n\t\twidth: 0;\n\t\tborder-color: transparent;\n\t\tborder-style: solid;\n\t\tborder-width: 5px;\n\t\tborder-left-color: inherit;\n\t}\n\n\t.vue-slider-dot-tooltip-inner-right::after {\n\t\tright: 100%;\n\t\ttop: 50%;\n\t\ttransform: translate(0, -50%);\n\t\theight: 0;\n\t\twidth: 0;\n\t\tborder-color: transparent;\n\t\tborder-style: solid;\n\t\tborder-width: 5px;\n\t\tborder-right-color: inherit;\n\t}\n\n\t.vue-slider-dot-tooltip-wrapper {\n\t\topacity: 0;\n\t\ttransition: all 0.3s;\n\t}\n\t.vue-slider-dot-tooltip-wrapper-show {\n\t\topacity: 1;\n\t}\n\n\t.label-container {\n\t\tmargin: 10px 0;\n\t\twidth: 100%;\n\t}\n\n\t.range-label-right {\n\t\tfloat: right;\n\t}\n"])));
25143
26356
 
25144
26357
  /**
25145
26358
  * Caution: Please do not change this file without having a discussion with the Team.
@@ -25182,13 +26395,13 @@
25182
26395
  return components;
25183
26396
  };
25184
26397
 
25185
- var updateQuery$a = lib_5.updateQuery,
26398
+ var updateQuery$b = lib_5.updateQuery,
25186
26399
  setQueryOptions$a = lib_5.setQueryOptions,
25187
- setCustomQuery$9 = lib_5.setCustomQuery;
25188
- var checkValueChange$8 = lib_8.checkValueChange,
25189
- getClassName$d = lib_8.getClassName,
26400
+ setCustomQuery$a = lib_5.setCustomQuery;
26401
+ var checkValueChange$9 = lib_8.checkValueChange,
26402
+ getClassName$e = lib_8.getClassName,
25190
26403
  getOptionsFromQuery$a = lib_8.getOptionsFromQuery,
25191
- isEqual$d = lib_8.isEqual;
26404
+ isEqual$e = lib_8.isEqual;
25192
26405
  var RangeSlider = {
25193
26406
  name: 'RangeSlider',
25194
26407
  components: getComponents(),
@@ -25269,7 +26482,7 @@
25269
26482
  });
25270
26483
  };
25271
26484
 
25272
- checkValueChange$8(props.componentId, {
26485
+ checkValueChange$9(props.componentId, {
25273
26486
  start: currentValue[0],
25274
26487
  end: currentValue[1]
25275
26488
  }, props.beforeValueChange, performUpdate);
@@ -25312,12 +26525,12 @@
25312
26525
  this.handleChange(RangeSlider.parseValue(newVal, this.$props));
25313
26526
  },
25314
26527
  value: function value(newVal, oldVal) {
25315
- if (!isEqual$d(newVal, oldVal)) {
26528
+ if (!isEqual$e(newVal, oldVal)) {
25316
26529
  this.handleChange(RangeSlider.parseValue(newVal, this.$props));
25317
26530
  }
25318
26531
  },
25319
26532
  selectedValue: function selectedValue(newVal) {
25320
- if (!isEqual$d(this.$data.currentValue, newVal)) {
26533
+ if (!isEqual$e(this.$data.currentValue, newVal)) {
25321
26534
  this.handleChange(RangeSlider.parseValue(newVal, this.$props));
25322
26535
  this.$emit('change', newVal);
25323
26536
  }
@@ -25363,9 +26576,9 @@
25363
26576
  return h(Container, {
25364
26577
  "class": this.$props.className
25365
26578
  }, [this.$props.title && h(Title, {
25366
- "class": getClassName$d(this.$props.innerClass, 'title')
26579
+ "class": getClassName$e(this.$props.innerClass, 'title')
25367
26580
  }, [this.$props.title]), this.$props.range ? h(vueNoSsr_common, [h(Slider, {
25368
- "class": getClassName$d(this.$props.innerClass, 'slider')
26581
+ "class": getClassName$e(this.$props.innerClass, 'slider')
25369
26582
  }, [h("vue-slider-component", {
25370
26583
  "ref": "slider",
25371
26584
  "attrs": {
@@ -25384,9 +26597,9 @@
25384
26597
  }), this.$props.rangeLabels && h("div", {
25385
26598
  "class": "label-container"
25386
26599
  }, [h("label", {
25387
- "class": getClassName$d(this.$props.innerClass, 'label') || 'range-label-left'
26600
+ "class": getClassName$e(this.$props.innerClass, 'label') || 'range-label-left'
25388
26601
  }, [this.$props.rangeLabels.start]), h("label", {
25389
- "class": getClassName$d(this.$props.innerClass, 'label') || 'range-label-right'
26602
+ "class": getClassName$e(this.$props.innerClass, 'label') || 'range-label-right'
25390
26603
  }, [this.$props.rangeLabels.end])])])]) : null]);
25391
26604
  }
25392
26605
  };
@@ -25432,7 +26645,7 @@
25432
26645
  return [];
25433
26646
  };
25434
26647
 
25435
- var mapStateToProps$d = function mapStateToProps(state, props) {
26648
+ var mapStateToProps$e = function mapStateToProps(state, props) {
25436
26649
  return {
25437
26650
  options: state.aggregations[props.componentId] ? state.aggregations[props.componentId][props.dataField] && state.aggregations[props.componentId][props.dataField].buckets // eslint-disable-line
25438
26651
  : [],
@@ -25443,11 +26656,11 @@
25443
26656
  };
25444
26657
 
25445
26658
  var mapDispatchtoProps$b = {
25446
- updateQuery: updateQuery$a,
26659
+ updateQuery: updateQuery$b,
25447
26660
  setQueryOptions: setQueryOptions$a,
25448
- setCustomQuery: setCustomQuery$9
26661
+ setCustomQuery: setCustomQuery$a
25449
26662
  };
25450
- var RangeConnected$2 = ComponentWrapper$1(connect(mapStateToProps$d, mapDispatchtoProps$b)(RangeSlider), {
26663
+ var RangeConnected$2 = ComponentWrapper$1(connect(mapStateToProps$e, mapDispatchtoProps$b)(RangeSlider), {
25451
26664
  componentType: constants_1$1.rangeSlider
25452
26665
  });
25453
26666
 
@@ -25461,16 +26674,16 @@
25461
26674
  var addComponent$1 = lib_5.addComponent,
25462
26675
  removeComponent$1 = lib_5.removeComponent,
25463
26676
  watchComponent$1 = lib_5.watchComponent,
25464
- updateQuery$b = lib_5.updateQuery,
26677
+ updateQuery$c = lib_5.updateQuery,
25465
26678
  setQueryListener$1 = lib_5.setQueryListener,
25466
26679
  setQueryOptions$b = lib_5.setQueryOptions,
25467
26680
  setComponentProps$1 = lib_5.setComponentProps,
25468
- setCustomQuery$a = lib_5.setCustomQuery,
26681
+ setCustomQuery$b = lib_5.setCustomQuery,
25469
26682
  updateComponentProps$2 = lib_5.updateComponentProps;
25470
- var checkValueChange$9 = lib_8.checkValueChange,
25471
- getClassName$e = lib_8.getClassName,
26683
+ var checkValueChange$a = lib_8.checkValueChange,
26684
+ getClassName$f = lib_8.getClassName,
25472
26685
  getOptionsFromQuery$b = lib_8.getOptionsFromQuery,
25473
- isEqual$e = lib_8.isEqual,
26686
+ isEqual$f = lib_8.isEqual,
25474
26687
  checkSomePropChange$1 = lib_8.checkSomePropChange;
25475
26688
  var DynamicRangeSlider = {
25476
26689
  name: 'DynamicRangeSlider',
@@ -25494,7 +26707,8 @@
25494
26707
  URLParams: VueTypes.bool.def(false),
25495
26708
  sliderOptions: VueTypes.object.def({}),
25496
26709
  nestedField: types.string,
25497
- index: VueTypes.string
26710
+ index: VueTypes.string,
26711
+ value: types.range
25498
26712
  },
25499
26713
  data: function data() {
25500
26714
  this.internalRangeComponent = this.$props.componentId + "__range__internal";
@@ -25540,6 +26754,8 @@
25540
26754
  components = _this$$$store$getStat.components;
25541
26755
  }
25542
26756
 
26757
+ var value = this.$props.value;
26758
+
25543
26759
  if (this.destroyOnUnmount || components.indexOf(this.componentId) === -1) {
25544
26760
  this.addComponent(this.componentId);
25545
26761
  this.addComponent(this.internalRangeComponent);
@@ -25548,6 +26764,8 @@
25548
26764
  this.handleChange(this.selectedValue);
25549
26765
  } else if (this.selectedValue) {
25550
26766
  this.handleChange(DynamicRangeSlider.parseValue(this.selectedValue, this.$props));
26767
+ } else if (value) {
26768
+ this.handleChange(DynamicRangeSlider.parseValue(value, this.$props));
25551
26769
  } // get range before executing other queries
25552
26770
 
25553
26771
 
@@ -25566,6 +26784,13 @@
25566
26784
  }
25567
26785
  },
25568
26786
  methods: {
26787
+ isControlled: function isControlled() {
26788
+ if (this.$props.value && this.$listeners) {
26789
+ return true;
26790
+ }
26791
+
26792
+ return false;
26793
+ },
25569
26794
  setDefaultValue: function setDefaultValue(_ref) {
25570
26795
  var start = _ref.start,
25571
26796
  end = _ref.end;
@@ -25576,6 +26801,8 @@
25576
26801
  defaultEnd = _this$$props$defaultV.end;
25577
26802
 
25578
26803
  this.handleChange([defaultStart, defaultEnd]);
26804
+ } else if (this.isControlled()) {
26805
+ this.handleChange(DynamicRangeSlider.parseValue(this.$props.value), 'change');
25579
26806
  } else {
25580
26807
  this.currentValue = [start, end];
25581
26808
  }
@@ -25625,7 +26852,16 @@
25625
26852
  },
25626
26853
  handleSlider: function handleSlider() {
25627
26854
  var sliderValues = this.$refs.slider.getValue();
25628
- this.handleChange(sliderValues);
26855
+ var value = this.$props.value;
26856
+
26857
+ if (value === undefined) {
26858
+ this.handleChange(sliderValues);
26859
+ } else {
26860
+ this.$emit('change', {
26861
+ start: sliderValues[0],
26862
+ end: sliderValues[1]
26863
+ });
26864
+ }
25629
26865
  },
25630
26866
  handleChange: function handleChange(currentValue) {
25631
26867
  var _this2 = this;
@@ -25649,7 +26885,7 @@
25649
26885
  });
25650
26886
  };
25651
26887
 
25652
- checkValueChange$9(this.$props.componentId, {
26888
+ checkValueChange$a(this.$props.componentId, {
25653
26889
  start: normalizedValue[0],
25654
26890
  end: normalizedValue[1]
25655
26891
  }, this.$props.beforeValueChange, performUpdate);
@@ -25713,15 +26949,16 @@
25713
26949
  this.setReact();
25714
26950
  },
25715
26951
  selectedValue: function selectedValue(newValue) {
25716
- if (isEqual$e(newValue, this.currentValue)) return;
26952
+ if (isEqual$f(newValue, this.currentValue)) return;
25717
26953
  var value = newValue || {
25718
26954
  start: this.range.start,
25719
26955
  end: this.range.end
25720
26956
  };
26957
+ this.$emit('change', value);
25721
26958
  this.handleChange(DynamicRangeSlider.parseValue(value, this.$props));
25722
26959
  },
25723
26960
  range: function range(newValue, oldValue) {
25724
- if (isEqual$e(newValue, oldValue) || !this.currentValue) return;
26961
+ if (isEqual$f(newValue, oldValue) || !this.currentValue) return;
25725
26962
 
25726
26963
  var _ref4 = this.currentValue || [],
25727
26964
  currentStart = _ref4[0],
@@ -25739,6 +26976,11 @@
25739
26976
  if (!isQueryIdentical(newVal, oldVal, this.$data.currentValue, this.$props)) {
25740
26977
  this.updateQueryHandler(this.$data.currentValue);
25741
26978
  }
26979
+ },
26980
+ value: function value(newVal, oldVal) {
26981
+ if (!isEqual$f(newVal, oldVal)) {
26982
+ this.handleChange(DynamicRangeSlider.parseValue(newVal, this.$props));
26983
+ }
25742
26984
  }
25743
26985
  },
25744
26986
  render: function render() {
@@ -25754,15 +26996,15 @@
25754
26996
  return h(Container, {
25755
26997
  "class": this.$props.className
25756
26998
  }, [this.$props.title && h(Title, {
25757
- "class": getClassName$e(this.$props.innerClass, 'title')
26999
+ "class": getClassName$f(this.$props.innerClass, 'title')
25758
27000
  }, [this.$props.title]), h(vueNoSsr_common, [h(Slider, {
25759
- "class": getClassName$e(this.$props.innerClass, 'slider')
27001
+ "class": getClassName$f(this.$props.innerClass, 'slider')
25760
27002
  }, [h("vue-slider-component", {
25761
27003
  "ref": "slider",
25762
27004
  "attrs": {
25763
- "value": [Math.max(start, this.currentValue[0]), Math.min(end, this.currentValue[1])],
25764
- "min": Math.min(start, this.currentValue[0]),
25765
- "max": Math.max(end, this.currentValue[1]),
27005
+ "value": [Math.floor(Math.max(start, this.currentValue[0])), Math.ceil(Math.min(end, this.currentValue[1]))],
27006
+ "min": Math.floor(Math.min(start, this.currentValue[0])),
27007
+ "max": Math.ceil(Math.max(end, this.currentValue[1])),
25766
27008
  "dotSize": 20,
25767
27009
  "height": 4,
25768
27010
  "enable-cross": false,
@@ -25775,9 +27017,9 @@
25775
27017
  }), this.labels ? h("div", {
25776
27018
  "class": "label-container"
25777
27019
  }, [h("label", {
25778
- "class": getClassName$e(this.$props.innerClass, 'label') || 'range-label-left'
27020
+ "class": getClassName$f(this.$props.innerClass, 'label') || 'range-label-left'
25779
27021
  }, [this.labels.start]), h("label", {
25780
- "class": getClassName$e(this.$props.innerClass, 'label') || 'range-label-right'
27022
+ "class": getClassName$f(this.$props.innerClass, 'label') || 'range-label-right'
25781
27023
  }, [this.labels.end])]) : null])])]);
25782
27024
  }
25783
27025
  };
@@ -25812,10 +27054,14 @@
25812
27054
  };
25813
27055
 
25814
27056
  DynamicRangeSlider.parseValue = function (value) {
25815
- return [value.start, value.end];
27057
+ if (value) {
27058
+ return Array.isArray(value) ? value : [value.start, value.end];
27059
+ }
27060
+
27061
+ return [];
25816
27062
  };
25817
27063
 
25818
- var mapStateToProps$e = function mapStateToProps(state, props) {
27064
+ var mapStateToProps$f = function mapStateToProps(state, props) {
25819
27065
  var componentId = state.aggregations[props.componentId];
25820
27066
  var internalRange = state.aggregations[props.componentId + "__range__internal"];
25821
27067
  var options = componentId && componentId[props.dataField];
@@ -25847,15 +27093,15 @@
25847
27093
  var mapDispatchtoProps$c = {
25848
27094
  addComponent: addComponent$1,
25849
27095
  removeComponent: removeComponent$1,
25850
- updateQuery: updateQuery$b,
27096
+ updateQuery: updateQuery$c,
25851
27097
  watchComponent: watchComponent$1,
25852
27098
  setQueryListener: setQueryListener$1,
25853
27099
  setQueryOptions: setQueryOptions$b,
25854
27100
  setComponentProps: setComponentProps$1,
25855
- setCustomQuery: setCustomQuery$a,
27101
+ setCustomQuery: setCustomQuery$b,
25856
27102
  updateComponentProps: updateComponentProps$2
25857
27103
  };
25858
- var RangeConnected$3 = connect(mapStateToProps$e, mapDispatchtoProps$c)(DynamicRangeSlider);
27104
+ var RangeConnected$3 = connect(mapStateToProps$f, mapDispatchtoProps$c)(DynamicRangeSlider);
25859
27105
 
25860
27106
  DynamicRangeSlider.install = function (Vue) {
25861
27107
  Vue.component(DynamicRangeSlider.name, RangeConnected$3);
@@ -26017,7 +27263,7 @@
26017
27263
  }
26018
27264
  };
26019
27265
 
26020
- var mapStateToProps$f = function mapStateToProps(state, props) {
27266
+ var mapStateToProps$g = function mapStateToProps(state, props) {
26021
27267
  return {
26022
27268
  selectedValues: filterByComponentIds(state.selectedValues, props),
26023
27269
  queryLog: filterByComponentIds(state.queryLog, props),
@@ -26034,7 +27280,7 @@
26034
27280
  };
26035
27281
  };
26036
27282
 
26037
- var StateProviderConnected = connect(mapStateToProps$f, {})(StateProvider);
27283
+ var StateProviderConnected = connect(mapStateToProps$g, {})(StateProvider);
26038
27284
 
26039
27285
  StateProvider.install = function (Vue) {
26040
27286
  Vue.component(StateProvider.name, StateProviderConnected);
@@ -26510,21 +27756,21 @@
26510
27756
  });
26511
27757
  }
26512
27758
 
26513
- var version = "1.26.0";
27759
+ var version = "1.27.0-gamma.1";
26514
27760
 
26515
- var _templateObject$n, _templateObject2$a;
27761
+ var _templateObject$o, _templateObject2$a;
26516
27762
 
26517
27763
  var alert = function alert(_ref) {
26518
27764
  var theme = _ref.theme;
26519
- return css(_templateObject$n || (_templateObject$n = _taggedTemplateLiteralLoose(["\n\tcolor: ", ";\n"])), theme.colors.alertColor);
27765
+ return css(_templateObject$o || (_templateObject$o = _taggedTemplateLiteralLoose(["\n\tcolor: ", ";\n"])), theme.colors.alertColor);
26520
27766
  };
26521
27767
 
26522
27768
  var Content = index$1('div')(_templateObject2$a || (_templateObject2$a = _taggedTemplateLiteralLoose(["\n\t", ";\n\tfont-size: 13px;\n\tmargin: 8px;\n"])), function (props) {
26523
27769
  return props.alert && alert;
26524
27770
  });
26525
27771
 
26526
- var getClassName$f = lib_8.getClassName,
26527
- isEqual$f = lib_8.isEqual;
27772
+ var getClassName$g = lib_8.getClassName,
27773
+ isEqual$g = lib_8.isEqual;
26528
27774
  var RangeInput = {
26529
27775
  name: 'RangeInput',
26530
27776
  components: {
@@ -26606,7 +27852,7 @@
26606
27852
  handleChange: function handleChange(value, event) {
26607
27853
  var currentValue = value;
26608
27854
 
26609
- if (this.shouldUpdate(value) && !isEqual$f(value, this.currentValue)) {
27855
+ if (this.shouldUpdate(value) && !isEqual$g(value, this.currentValue)) {
26610
27856
  switch (event) {
26611
27857
  case 'change':
26612
27858
  if (!value) {
@@ -26676,7 +27922,7 @@
26676
27922
  }
26677
27923
  },
26678
27924
  value: function value(newVal, oldVal) {
26679
- if (!isEqual$f(newVal, oldVal)) {
27925
+ if (!isEqual$g(newVal, oldVal)) {
26680
27926
  if (this.isControlled()) {
26681
27927
  this.handleChange(newVal, 'change');
26682
27928
  }
@@ -26687,6 +27933,10 @@
26687
27933
  if (this.$props.defaultValue && this.$props.defaultValue.start && this.$props.defaultValue.end) {
26688
27934
  this.handleChange(this.$props.defaultValue);
26689
27935
  }
27936
+
27937
+ if (this.isControlled()) {
27938
+ this.handleChange(this.$props.value, 'change');
27939
+ }
26690
27940
  },
26691
27941
  render: function render() {
26692
27942
  var h = arguments[0];
@@ -26743,7 +27993,7 @@
26743
27993
  "value-change": this.handleValueChange
26744
27994
  }
26745
27995
  }), h(Flex, {
26746
- "class": getClassName$f(innerClass, 'input-container') || ''
27996
+ "class": getClassName$g(innerClass, 'input-container') || ''
26747
27997
  }, [h(Flex, {
26748
27998
  "attrs": {
26749
27999
  "direction": "column",
@@ -26763,7 +28013,7 @@
26763
28013
  "on": {
26764
28014
  "change": this.handleInputChange
26765
28015
  },
26766
- "class": getClassName$f(innerClass, 'input') || '',
28016
+ "class": getClassName$g(innerClass, 'input') || '',
26767
28017
  "domProps": _extends({}, {
26768
28018
  value: this.currentValue.start
26769
28019
  })
@@ -26796,7 +28046,7 @@
26796
28046
  "on": {
26797
28047
  "change": this.handleInputChange
26798
28048
  },
26799
- "class": getClassName$f(innerClass, 'input') || '',
28049
+ "class": getClassName$g(innerClass, 'input') || '',
26800
28050
  "domProps": _extends({}, {
26801
28051
  value: this.currentValue.end
26802
28052
  })
@@ -26808,13 +28058,13 @@
26808
28058
  }
26809
28059
  };
26810
28060
 
26811
- var mapStateToProps$g = function mapStateToProps(state) {
28061
+ var mapStateToProps$h = function mapStateToProps(state) {
26812
28062
  return {
26813
28063
  themePreset: state.config.themePreset
26814
28064
  };
26815
28065
  };
26816
28066
 
26817
- var RangeConnected$4 = ComponentWrapper$1(connect(mapStateToProps$g, {})(RangeInput), {
28067
+ var RangeConnected$4 = ComponentWrapper$1(connect(mapStateToProps$h, {})(RangeInput), {
26818
28068
  componentType: constants_1$1.rangeInput
26819
28069
  });
26820
28070
 
@@ -26825,7 +28075,7 @@
26825
28075
 
26826
28076
  RangeInput.componentType = constants_1$1.rangeInput;
26827
28077
 
26828
- var components = [ReactiveList, ResultCard, ResultList, ReactiveBase, DataSearch, SingleList, MultiList, SingleRange, MultiRange, RangeSlider, DynamicRangeSlider, ReactiveComponent, SelectedFilters, ToggleButton, SingleDropdownList, MultiDropdownList, StateProvider, RangeInput];
28078
+ var components = [ReactiveList, ResultCard, ResultList, ReactiveBase, DataSearch, SearchBox, SingleList, MultiList, SingleRange, MultiRange, RangeSlider, DynamicRangeSlider, ReactiveComponent, SelectedFilters, ToggleButton, SingleDropdownList, MultiDropdownList, StateProvider, RangeInput];
26829
28079
  function install (Vue) {
26830
28080
  components.map(function (component) {
26831
28081
  Vue.use(component);
@@ -26855,6 +28105,7 @@
26855
28105
  exports.ReactiveList = ReactiveList;
26856
28106
  exports.ResultCard = ResultCard;
26857
28107
  exports.ResultList = ResultList;
28108
+ exports.SearchBox = SearchBox;
26858
28109
  exports.SelectedFilters = SelectedFilters;
26859
28110
  exports.SingleDropdownList = SingleDropdownList;
26860
28111
  exports.SingleList = SingleList;