@appbaseio/reactivesearch-vue 1.28.0 → 1.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/@appbaseio/reactivesearch-vue.umd.js +1780 -413
  2. package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
  3. package/dist/@appbaseio/reactivesearch-vue.umd.min.js +5 -5
  4. package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
  5. package/dist/cjs/{Button-11307285.js → Button-e0b7c1f6.js} +1 -1
  6. package/dist/cjs/DataSearch-eec21890.js +2171 -0
  7. package/dist/cjs/DataSearch.js +18 -2107
  8. package/dist/cjs/{DropDown-7aa3d0d2.js → DropDown-e4381fcc.js} +1 -1
  9. package/dist/cjs/{Input-3cc3fa59.js → Input-0d7b25ad.js} +1 -1
  10. package/dist/cjs/MultiDropdownList.js +3 -3
  11. package/dist/cjs/MultiList.js +1 -1
  12. package/dist/cjs/RangeInput.js +1 -1
  13. package/dist/cjs/ReactiveList.js +1 -1
  14. package/dist/cjs/SelectedFilters.js +1 -1
  15. package/dist/cjs/SingleDropdownList.js +3 -3
  16. package/dist/cjs/SingleList.js +1 -1
  17. package/dist/cjs/ToggleButton.js +1 -1
  18. package/dist/cjs/index.js +10 -9
  19. package/dist/cjs/install-4886582d.js +1244 -0
  20. package/dist/cjs/install.js +24 -29
  21. package/dist/cjs/version.js +1 -1
  22. package/dist/es/{Button-91561391.js → Button-33de88e6.js} +1 -1
  23. package/dist/es/DataSearch-42f547cd.js +2158 -0
  24. package/dist/es/DataSearch.js +17 -2106
  25. package/dist/es/{DropDown-60a426a2.js → DropDown-ff6ad982.js} +1 -1
  26. package/dist/es/{Input-08bb1bcf.js → Input-e339e63a.js} +1 -1
  27. package/dist/es/MultiDropdownList.js +3 -3
  28. package/dist/es/MultiList.js +1 -1
  29. package/dist/es/RangeInput.js +1 -1
  30. package/dist/es/ReactiveList.js +1 -1
  31. package/dist/es/SelectedFilters.js +1 -1
  32. package/dist/es/SingleDropdownList.js +3 -3
  33. package/dist/es/SingleList.js +1 -1
  34. package/dist/es/ToggleButton.js +1 -1
  35. package/dist/es/index.js +6 -6
  36. package/dist/es/install-54ebd72e.js +1237 -0
  37. package/dist/es/install.js +22 -31
  38. package/dist/es/version.js +1 -1
  39. package/package.json +2 -2
@@ -820,6 +820,9 @@
820
820
  var RECENT_SEARCHES_ERROR = exports.RECENT_SEARCHES_ERROR = 'RECENT_SEARCHES_ERROR';
821
821
  var SET_VALUE = exports.SET_VALUE = 'SET_VALUE';
822
822
  var RESET_TO_DEFAULT = exports.RESET_TO_DEFAULT = 'RESET_TO_DEFAULT';
823
+ var SET_GOOGLE_MAP_SCRIPT_LOADING = exports.SET_GOOGLE_MAP_SCRIPT_LOADING = 'SET_GOOGLE_MAP_SCRIPT_LOADING';
824
+ var SET_GOOGLE_MAP_SCRIPT_LOADED = exports.SET_GOOGLE_MAP_SCRIPT_LOADED = 'SET_GOOGLE_MAP_SCRIPT_LOADED';
825
+ var SET_GOOGLE_MAP_SCRIPT_ERROR = exports.SET_GOOGLE_MAP_SCRIPT_ERROR = 'SET_GOOGLE_MAP_SCRIPT_ERROR';
823
826
  });
824
827
  unwrapExports(constants);
825
828
  var constants_1 = constants.ADD_COMPONENT;
@@ -867,6 +870,9 @@
867
870
  var constants_43 = constants.RECENT_SEARCHES_ERROR;
868
871
  var constants_44 = constants.SET_VALUE;
869
872
  var constants_45 = constants.RESET_TO_DEFAULT;
873
+ var constants_46 = constants.SET_GOOGLE_MAP_SCRIPT_LOADING;
874
+ var constants_47 = constants.SET_GOOGLE_MAP_SCRIPT_LOADED;
875
+ var constants_48 = constants.SET_GOOGLE_MAP_SCRIPT_ERROR;
870
876
 
871
877
  var componentsReducer_1 = createCommonjsModule(function (module, exports) {
872
878
  Object.defineProperty(exports, "__esModule", {
@@ -3198,6 +3204,59 @@
3198
3204
  });
3199
3205
  unwrapExports(recentSearches);
3200
3206
 
3207
+ var googleMapScriptReducer_1 = createCommonjsModule(function (module, exports) {
3208
+ Object.defineProperty(exports, "__esModule", {
3209
+ value: true
3210
+ });
3211
+
3212
+ var _extends = Object.assign || function (target) {
3213
+ for (var i = 1; i < arguments.length; i++) {
3214
+ var source = arguments[i];
3215
+
3216
+ for (var key in source) {
3217
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
3218
+ target[key] = source[key];
3219
+ }
3220
+ }
3221
+ }
3222
+
3223
+ return target;
3224
+ };
3225
+
3226
+ exports["default"] = googleMapScriptReducer;
3227
+ var INITIAL_STATE = {
3228
+ loading: false,
3229
+ loaded: false,
3230
+ error: null
3231
+ };
3232
+
3233
+ function googleMapScriptReducer() {
3234
+ var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : INITIAL_STATE;
3235
+ var action = arguments[1];
3236
+ var type = action.type,
3237
+ loading = action.loading,
3238
+ loaded = action.loaded,
3239
+ error = action.error;
3240
+
3241
+ if (type === constants.SET_GOOGLE_MAP_SCRIPT_LOADING) {
3242
+ return _extends({}, INITIAL_STATE, {
3243
+ loading: loading
3244
+ });
3245
+ } else if (type === constants.SET_GOOGLE_MAP_SCRIPT_LOADED) {
3246
+ return _extends({}, INITIAL_STATE, {
3247
+ loaded: loaded
3248
+ });
3249
+ } else if (type === constants.SET_GOOGLE_MAP_SCRIPT_ERROR) {
3250
+ return _extends({}, INITIAL_STATE, {
3251
+ error: error
3252
+ });
3253
+ }
3254
+
3255
+ return state;
3256
+ }
3257
+ });
3258
+ unwrapExports(googleMapScriptReducer_1);
3259
+
3201
3260
  var reducers = createCommonjsModule(function (module, exports) {
3202
3261
  Object.defineProperty(exports, "__esModule", {
3203
3262
  value: true
@@ -3269,6 +3328,8 @@
3269
3328
 
3270
3329
  var _recentSearches2 = _interopRequireDefault(recentSearches);
3271
3330
 
3331
+ var _googleMapScriptReducer2 = _interopRequireDefault(googleMapScriptReducer_1);
3332
+
3272
3333
  function _interopRequireDefault(obj) {
3273
3334
  return obj && obj.__esModule ? obj : {
3274
3335
  "default": obj
@@ -3312,7 +3373,8 @@
3312
3373
  urlValues: function urlValues() {
3313
3374
  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
3314
3375
  return state;
3315
- }
3376
+ },
3377
+ googleMapScriptStatus: _googleMapScriptReducer2["default"]
3316
3378
  });
3317
3379
  });
3318
3380
  unwrapExports(reducers);
@@ -4892,7 +4954,7 @@
4892
4954
  Object.defineProperty(exports, "__esModule", {
4893
4955
  value: true
4894
4956
  });
4895
- exports.getCalendarIntervalErrorMessage = exports.queryFormatMillisecondsMap = exports.suggestionTypes = exports.getTopSuggestions = exports.withClickIds = exports.getCompositeAggsQuery = exports.getAggsQuery = exports.extractQueryFromDefaultQuery = exports.updateInternalQuery = exports.getSearchState = exports.extractQueryFromCustomQuery = exports.getOptionsForCustomQuery = exports.getOptionsFromQuery = exports.parseHits = exports.handleA11yAction = exports.getInnerKey = exports.getClassName = exports.checkSomePropChange = exports.checkPropChange = exports.updateDefaultQuery = exports.updateCustomQuery = undefined;
4957
+ exports.hasCustomRenderer = exports.getComponent = exports.isFunction = exports.getCalendarIntervalErrorMessage = exports.queryFormatMillisecondsMap = exports.suggestionTypes = exports.getTopSuggestions = exports.withClickIds = exports.getCompositeAggsQuery = exports.getAggsQuery = exports.extractQueryFromDefaultQuery = exports.updateInternalQuery = exports.getSearchState = exports.extractQueryFromCustomQuery = exports.getOptionsForCustomQuery = exports.getOptionsFromQuery = exports.parseHits = exports.handleA11yAction = exports.getInnerKey = exports.getClassName = exports.checkSomePropChange = exports.checkPropChange = exports.updateDefaultQuery = exports.updateCustomQuery = undefined;
4896
4958
 
4897
4959
  var _extends = Object.assign || function (target) {
4898
4960
  for (var i = 1; i < arguments.length; i++) {
@@ -5794,43 +5856,74 @@
5794
5856
  calculatedCalendarInterval: 'year'
5795
5857
  };
5796
5858
  };
5859
+
5860
+ var isFunction = exports.isFunction = function isFunction(element) {
5861
+ return typeof element === 'function';
5862
+ };
5863
+
5864
+ var getComponent = exports.getComponent = function getComponent() {
5865
+ var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
5866
+ var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
5867
+ var children = props.children,
5868
+ render = props.render;
5869
+
5870
+ if (isFunction(children)) {
5871
+ return children(data);
5872
+ }
5873
+
5874
+ if (isFunction(render)) {
5875
+ return render(data);
5876
+ }
5877
+
5878
+ return null;
5879
+ };
5880
+
5881
+ var hasCustomRenderer = exports.hasCustomRenderer = function hasCustomRenderer() {
5882
+ var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
5883
+ var render = props.render,
5884
+ children = props.children;
5885
+ return isFunction(children) || isFunction(render);
5886
+ };
5797
5887
  });
5798
5888
  unwrapExports(helper);
5799
- var helper_1 = helper.getCalendarIntervalErrorMessage;
5800
- var helper_2 = helper.queryFormatMillisecondsMap;
5801
- var helper_3 = helper.suggestionTypes;
5802
- var helper_4 = helper.getTopSuggestions;
5803
- var helper_5 = helper.withClickIds;
5804
- var helper_6 = helper.getCompositeAggsQuery;
5805
- var helper_7 = helper.getAggsQuery;
5806
- var helper_8 = helper.extractQueryFromDefaultQuery;
5807
- var helper_9 = helper.updateInternalQuery;
5808
- var helper_10 = helper.getSearchState;
5809
- var helper_11 = helper.extractQueryFromCustomQuery;
5810
- var helper_12 = helper.getOptionsForCustomQuery;
5811
- var helper_13 = helper.getOptionsFromQuery;
5812
- var helper_14 = helper.parseHits;
5813
- var helper_15 = helper.handleA11yAction;
5814
- var helper_16 = helper.getInnerKey;
5815
- var helper_17 = helper.getClassName;
5816
- var helper_18 = helper.checkSomePropChange;
5817
- var helper_19 = helper.checkPropChange;
5818
- var helper_20 = helper.updateDefaultQuery;
5819
- var helper_21 = helper.updateCustomQuery;
5820
- var helper_22 = helper.isEqual;
5821
- var helper_23 = helper.compareQueries;
5822
- var helper_24 = helper.debounce;
5823
- var helper_25 = helper.getQueryOptions;
5824
- var helper_26 = helper.buildQuery;
5825
- var helper_27 = helper.pushToAndClause;
5826
- var helper_28 = helper.checkValueChange;
5827
- var helper_29 = helper.getAggsOrder;
5828
- var helper_30 = helper.formatDate;
5829
- var helper_31 = helper.getResultStats;
5830
- var helper_32 = helper.extractFieldsFromSource;
5831
- var helper_33 = helper.normalizeDataField;
5832
- var helper_34 = helper.handleOnSuggestions;
5833
- var helper_35 = helper.isValidDateRangeQueryFormat;
5889
+ var helper_1 = helper.hasCustomRenderer;
5890
+ var helper_2 = helper.getComponent;
5891
+ var helper_3 = helper.isFunction;
5892
+ var helper_4 = helper.getCalendarIntervalErrorMessage;
5893
+ var helper_5 = helper.queryFormatMillisecondsMap;
5894
+ var helper_6 = helper.suggestionTypes;
5895
+ var helper_7 = helper.getTopSuggestions;
5896
+ var helper_8 = helper.withClickIds;
5897
+ var helper_9 = helper.getCompositeAggsQuery;
5898
+ var helper_10 = helper.getAggsQuery;
5899
+ var helper_11 = helper.extractQueryFromDefaultQuery;
5900
+ var helper_12 = helper.updateInternalQuery;
5901
+ var helper_13 = helper.getSearchState;
5902
+ var helper_14 = helper.extractQueryFromCustomQuery;
5903
+ var helper_15 = helper.getOptionsForCustomQuery;
5904
+ var helper_16 = helper.getOptionsFromQuery;
5905
+ var helper_17 = helper.parseHits;
5906
+ var helper_18 = helper.handleA11yAction;
5907
+ var helper_19 = helper.getInnerKey;
5908
+ var helper_20 = helper.getClassName;
5909
+ var helper_21 = helper.checkSomePropChange;
5910
+ var helper_22 = helper.checkPropChange;
5911
+ var helper_23 = helper.updateDefaultQuery;
5912
+ var helper_24 = helper.updateCustomQuery;
5913
+ var helper_25 = helper.isEqual;
5914
+ var helper_26 = helper.compareQueries;
5915
+ var helper_27 = helper.debounce;
5916
+ var helper_28 = helper.getQueryOptions;
5917
+ var helper_29 = helper.buildQuery;
5918
+ var helper_30 = helper.pushToAndClause;
5919
+ var helper_31 = helper.checkValueChange;
5920
+ var helper_32 = helper.getAggsOrder;
5921
+ var helper_33 = helper.formatDate;
5922
+ var helper_34 = helper.getResultStats;
5923
+ var helper_35 = helper.extractFieldsFromSource;
5924
+ var helper_36 = helper.normalizeDataField;
5925
+ var helper_37 = helper.handleOnSuggestions;
5926
+ var helper_38 = helper.isValidDateRangeQueryFormat;
5834
5927
 
5835
5928
  var value = createCommonjsModule(function (module, exports) {
5836
5929
  Object.defineProperty(exports, "__esModule", {
@@ -5992,6 +6085,9 @@
5992
6085
  exports.setCustomData = setCustomData;
5993
6086
  exports.setAppliedSettings = setAppliedSettings;
5994
6087
  exports.setQueryListener = setQueryListener;
6088
+ exports.setGoogleMapScriptLoading = setGoogleMapScriptLoading;
6089
+ exports.setGoogleMapScriptLoaded = setGoogleMapScriptLoaded;
6090
+ exports.setGoogleMapScriptError = setGoogleMapScriptError;
5995
6091
 
5996
6092
  function setRawData(component, response) {
5997
6093
  return {
@@ -6162,6 +6258,27 @@
6162
6258
  onError: onError
6163
6259
  };
6164
6260
  }
6261
+
6262
+ function setGoogleMapScriptLoading(bool) {
6263
+ return {
6264
+ type: constants.SET_GOOGLE_MAP_SCRIPT_LOADING,
6265
+ loading: bool
6266
+ };
6267
+ }
6268
+
6269
+ function setGoogleMapScriptLoaded(bool) {
6270
+ return {
6271
+ type: constants.SET_GOOGLE_MAP_SCRIPT_LOADED,
6272
+ loaded: bool
6273
+ };
6274
+ }
6275
+
6276
+ function setGoogleMapScriptError(error) {
6277
+ return {
6278
+ type: constants.SET_GOOGLE_MAP_SCRIPT_ERROR,
6279
+ error: error
6280
+ };
6281
+ }
6165
6282
  });
6166
6283
  unwrapExports(misc);
6167
6284
  var misc_1 = misc.setRawData;
@@ -6184,6 +6301,9 @@
6184
6301
  var misc_18 = misc.setCustomData;
6185
6302
  var misc_19 = misc.setAppliedSettings;
6186
6303
  var misc_20 = misc.setQueryListener;
6304
+ var misc_21 = misc.setGoogleMapScriptLoading;
6305
+ var misc_22 = misc.setGoogleMapScriptLoaded;
6306
+ var misc_23 = misc.setGoogleMapScriptError;
6187
6307
 
6188
6308
  var hits = createCommonjsModule(function (module, exports) {
6189
6309
  Object.defineProperty(exports, "__esModule", {
@@ -12900,7 +13020,7 @@
12900
13020
  return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteralLoose(["\n\tbackground-color: ", ";\n\tcolor: #ccc;\n\tcursor: not-allowed;\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: ", ";\n\t}\n"])), theme.colors.backgroundColor ? curriedLighten(0.1, theme.colors.backgroundColor) : '#fafafa', theme.colors.backgroundColor ? curriedLighten(0.2, theme.colors.backgroundColor) : '#fafafa');
12901
13021
  };
12902
13022
 
12903
- var Button = index$1('a')(_templateObject8 || (_templateObject8 = _taggedTemplateLiteralLoose(["\n\tdisplay: inline-flex;\n\tjustify-content: center;\n\talign-items: center;\n\tborder-radius: 3px;\n\tborder: 1px solid transparent;\n\tmin-height: 30px;\n\tword-wrap: break-word;\n\tpadding: 5px 12px;\n\tline-height: 1.2rem;\n\tbackground-color: ", ";\n\tcolor: ", ";\n\tcursor: pointer;\n\tuser-select: none;\n\ttransition: all 0.3s ease;\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: ", ";\n\t}\n\n\t&:focus {\n\t\toutline: 0;\n\t\tborder-color: ", ";\n\t\tbox-shadow: ", ";\n\t}\n\n\t", ";\n\t", ";\n\t", ";\n"])), function (_ref4) {
13023
+ var Button = index$1('a')(_templateObject8 || (_templateObject8 = _taggedTemplateLiteralLoose(["\n\tdisplay: inline-flex;\n\tjustify-content: center;\n\talign-items: center;\n\tborder-radius: 3px;\n\tborder: 1px solid transparent;\n\tmin-height: 30px;\n\tword-wrap: break-word;\n\tpadding: 5px 12px;\n\tline-height: 1.2rem;\n\tbackground-color: ", ";\n\tcolor: ", ";\n\tcursor: pointer;\n\tuser-select: none;\n\ttransition: all 0.3s ease;\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: ", ";\n\t}\n\n\t&:focus {\n\t\toutline: 0;\n\t\tborder-color: ", ";\n\t\tbox-shadow: ", ";\n\t}\n\n\t", ";\n\t", ";\n\t", ";\n\n\t&.enter-btn {\n\t\tborder-top-left-radius: 0px;\n\t\tborder-bottom-left-radius: 0px;\n\t\theight: 100%;\n\t}\n"])), function (_ref4) {
12904
13024
  var theme = _ref4.theme;
12905
13025
  return theme.colors.backgroundColor || '#eee';
12906
13026
  }, function (_ref5) {
@@ -14304,7 +14424,7 @@
14304
14424
  filteredResults = [].concat(parsedPromotedResults, filteredResults);
14305
14425
  }
14306
14426
 
14307
- return helper_5(filteredResults);
14427
+ return helper_8(filteredResults);
14308
14428
  }
14309
14429
  },
14310
14430
  watch: {
@@ -16754,14 +16874,14 @@
16754
16874
  this.updateState(this.$props);
16755
16875
  },
16756
16876
  analyticsConfig: function analyticsConfig(newVal, oldVal) {
16757
- if (!helper_22(newVal, oldVal)) {
16877
+ if (!helper_25(newVal, oldVal)) {
16758
16878
  if (this.store) {
16759
16879
  this.store.dispatch(analytics_3$1(newVal));
16760
16880
  }
16761
16881
  }
16762
16882
  },
16763
16883
  appbaseConfig: function appbaseConfig(newVal, oldVal) {
16764
- if (!helper_22(newVal, oldVal)) {
16884
+ if (!helper_25(newVal, oldVal)) {
16765
16885
  if (this.store) {
16766
16886
  this.store.dispatch(analytics_3$1(newVal));
16767
16887
  }
@@ -17538,7 +17658,7 @@
17538
17658
  });
17539
17659
 
17540
17660
  var suggestions$1 = function suggestions(themePreset, theme) {
17541
- 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));
17661
+ 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, 402px);\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));
17542
17662
  };
17543
17663
 
17544
17664
  var suggestionsContainer = css(_templateObject15 || (_templateObject15 = _taggedTemplateLiteralLoose(["\n\tposition: relative;\n\t.cancel-icon {\n\t\tcursor: pointer;\n\t}\n"])));
@@ -18578,19 +18698,22 @@
18578
18698
  title = _this$suggestion.title,
18579
18699
  description = _this$suggestion.description,
18580
18700
  image = _this$suggestion.image,
18581
- isPredictiveSuggestion = _this$suggestion.isPredictiveSuggestion;
18701
+ isPredictiveSuggestion = _this$suggestion.isPredictiveSuggestion,
18702
+ _suggestion_type = _this$suggestion._suggestion_type,
18703
+ _category = _this$suggestion._category;
18582
18704
 
18583
18705
  if (label) {
18584
18706
  // label has highest precedence
18585
18707
  return typeof label === 'string' ? h("div", {
18586
18708
  "class": "trim"
18587
- }, [isPredictiveSuggestion ? h(PredictiveSuggestion, {
18709
+ }, [(_category ? false : isPredictiveSuggestion // eslint-disable-next-line
18710
+ || !!_suggestion_type) ? h(PredictiveSuggestion, {
18588
18711
  "domProps": {
18589
18712
  "innerHTML": label
18590
18713
  }
18591
18714
  }) : h(VueHighlightWords, {
18592
18715
  "attrs": {
18593
- "searchWords": this.currentValue.split(' '),
18716
+ "searchWords": _category ? [_category] : this.currentValue.split(' '),
18594
18717
  "textToHighlight": label,
18595
18718
  "autoEscape": true,
18596
18719
  "highlightStyle": highlightStyle
@@ -18659,17 +18782,22 @@
18659
18782
  };
18660
18783
 
18661
18784
  var SearchSvg = {
18662
- functional: true,
18663
- render: function render(h) {
18785
+ name: 'SearchSvg',
18786
+ props: ['styles'],
18787
+ render: function render() {
18788
+ var h = arguments[0];
18664
18789
  return h("svg", {
18665
18790
  "attrs": {
18666
18791
  "alt": "Search",
18667
- "height": "14",
18668
- "width": "10",
18792
+ "height": "12",
18669
18793
  "xmlns": "http://www.w3.org/2000/svg",
18670
18794
  "viewBox": "0 0 15 15"
18671
18795
  },
18672
- "class": "search-icon"
18796
+ "class": "search-icon",
18797
+ "style": _extends({
18798
+ transform: 'scale(1.35)',
18799
+ position: 'relative'
18800
+ }, this.$props.styles ? this.$props.styles : {})
18673
18801
  }, [h("title", ["Search"]), h("path", {
18674
18802
  "attrs": {
18675
18803
  "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'
@@ -19341,11 +19469,11 @@
19341
19469
  }, [this.customIcon]);
19342
19470
  }
19343
19471
 
19344
- if (this.$props.type === 'popular-search-icon') {
19472
+ if (this.$props.type === 'recent-search-icon') {
19345
19473
  return h("svg", {
19346
19474
  "attrs": {
19347
19475
  "xmlns": "http://www.w3.org/2000/svg",
19348
- "alt": "Popular Searches",
19476
+ "alt": "Recent Search",
19349
19477
  "height": "20",
19350
19478
  "width": "20",
19351
19479
  "viewBox": "0 0 24 24"
@@ -19361,14 +19489,36 @@
19361
19489
  }
19362
19490
  }), h("path", {
19363
19491
  "attrs": {
19364
- "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"
19492
+ "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"
19365
19493
  }
19366
19494
  })]);
19367
- } else {
19495
+ }
19496
+
19497
+ if (this.$props.type === 'promoted-search-icon') {
19498
+ return h("svg", {
19499
+ "attrs": {
19500
+ "xmlns": "http://www.w3.org/2000/svg",
19501
+ "width": "20",
19502
+ "alt": "promoted search",
19503
+ "height": "20",
19504
+ "viewBox": "0 0 24 24"
19505
+ },
19506
+ "class": this.$props.className,
19507
+ "style": {
19508
+ fill: '#707070'
19509
+ }
19510
+ }, [h("path", {
19511
+ "attrs": {
19512
+ "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"
19513
+ }
19514
+ })]);
19515
+ }
19516
+
19517
+ if (this.$props.type === 'popular-search-icon') {
19368
19518
  return h("svg", {
19369
19519
  "attrs": {
19370
19520
  "xmlns": "http://www.w3.org/2000/svg",
19371
- "alt": "Recent Searches",
19521
+ "alt": "Popular Search",
19372
19522
  "height": "20",
19373
19523
  "width": "20",
19374
19524
  "viewBox": "0 0 24 24"
@@ -19384,10 +19534,21 @@
19384
19534
  }
19385
19535
  }), h("path", {
19386
19536
  "attrs": {
19387
- "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"
19537
+ "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"
19388
19538
  }
19389
19539
  })]);
19390
19540
  }
19541
+
19542
+ return h(SearchSvg, {
19543
+ "attrs": {
19544
+ "styles": {
19545
+ position: 'relative',
19546
+ fill: '#707070',
19547
+ left: '3px',
19548
+ marginRight: '8px'
19549
+ }
19550
+ }
19551
+ });
19391
19552
  }
19392
19553
  };
19393
19554
 
@@ -19459,11 +19620,15 @@
19459
19620
  console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
19460
19621
  }
19461
19622
 
19462
- this.loadPopularSuggestions(this.$props.componentId);
19463
19623
  this.currentValue = this.selectedValue || '';
19624
+ var shouldFetchInitialSuggestions = this.$props.enableDefaultSuggestions || this.currentValue;
19625
+
19626
+ if (shouldFetchInitialSuggestions) {
19627
+ this.loadPopularSuggestions(this.$props.componentId);
19464
19628
 
19465
- if (enableRecentSearches) {
19466
- this.getRecentSearches();
19629
+ if (enableRecentSearches) {
19630
+ this.getRecentSearches();
19631
+ }
19467
19632
  }
19468
19633
 
19469
19634
  this.handleTextChange = debounce$1(this.handleText, this.$props.debounce); // Set custom and default queries in store
@@ -19500,7 +19665,7 @@
19500
19665
  defaultSearchSuggestions: function defaultSearchSuggestions() {
19501
19666
  var isPopularSuggestionsEnabled = this.enableQuerySuggestions || this.enablePopularSuggestions;
19502
19667
 
19503
- if (this.currentValue) {
19668
+ if (this.currentValue || !this.enableDefaultSuggestions) {
19504
19669
  return [];
19505
19670
  }
19506
19671
 
@@ -19597,7 +19762,8 @@
19597
19762
  addonBefore: VueTypes.any,
19598
19763
  addonAfter: VueTypes.any,
19599
19764
  expandSuggestionsContainer: VueTypes.bool.def(true),
19600
- index: VueTypes.string
19765
+ index: VueTypes.string,
19766
+ enableDefaultSuggestions: VueTypes.bool.def(true)
19601
19767
  },
19602
19768
  beforeMount: function beforeMount() {
19603
19769
  if (this.$props.highlight) {
@@ -19765,7 +19931,7 @@
19765
19931
  // returns size and aggs property
19766
19932
  getBasicQueryOptions: function getBasicQueryOptions() {
19767
19933
  var aggregationField = this.$props.aggregationField;
19768
- var queryOptions = helper_25(this.$props);
19934
+ var queryOptions = helper_28(this.$props);
19769
19935
 
19770
19936
  if (aggregationField) {
19771
19937
  queryOptions.aggs = getCompositeAggsQuery$1({
@@ -20224,11 +20390,17 @@
20224
20390
  var _this$$props4 = this.$props,
20225
20391
  theme = _this$$props4.theme,
20226
20392
  size = _this$$props4.size,
20227
- expandSuggestionsContainer = _this$$props4.expandSuggestionsContainer;
20393
+ expandSuggestionsContainer = _this$$props4.expandSuggestionsContainer,
20394
+ enableDefaultSuggestions = _this$$props4.enableDefaultSuggestions;
20228
20395
  var _this$$scopedSlots = this.$scopedSlots,
20229
20396
  recentSearchesIcon = _this$$scopedSlots.recentSearchesIcon,
20230
20397
  popularSearchesIcon = _this$$scopedSlots.popularSearchesIcon;
20231
20398
  var hasSuggestions = this.currentValue ? this.suggestionsList.length || this.topSuggestions.length : this.defaultSearchSuggestions.length;
20399
+
20400
+ if (enableDefaultSuggestions === false && !this.currentValue) {
20401
+ hasSuggestions = false;
20402
+ }
20403
+
20232
20404
  return h(Container, {
20233
20405
  "class": this.$props.className
20234
20406
  }, [this.$props.title && h(Title, {
@@ -20637,161 +20809,1355 @@
20637
20809
 
20638
20810
  DataSearch.componentType = constants_1$1.dataSearch;
20639
20811
 
20640
- var _templateObject$j, _templateObject2$7, _templateObject3$6, _templateObject4$5, _templateObject5$3, _templateObject6$3;
20641
- var item = {
20642
- width: '15px',
20643
- height: '15px',
20644
- scale: '4px'
20645
- };
20646
- 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"])));
20647
- 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"])));
20648
-
20649
- var formItem = function formItem(_ref) {
20650
- var theme = _ref.theme;
20651
- 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);
20652
- };
20653
-
20654
- 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) {
20655
- return props.show ? null : hideInputControl;
20656
- }, function (_ref2) {
20657
- var theme = _ref2.theme;
20658
- return theme.colors.primaryColor;
20659
- }, function (_ref3) {
20660
- var theme = _ref3.theme;
20661
- return theme.colors.primaryColor;
20662
- });
20663
- 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) {
20664
- return props.show ? null : hideInputControl;
20665
- }, item.width, item.width, item.width, item.height, function (_ref4) {
20666
- var theme = _ref4.theme;
20667
- return theme.colors.primaryColor;
20668
- }, function (_ref5) {
20669
- var theme = _ref5.theme;
20670
- return theme.colors.primaryColor;
20671
- });
20672
- 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"])));
20673
-
20674
- var getAggsOrder = lib_8.getAggsOrder;
20675
-
20676
- var extractQuery = function extractQuery(props) {
20677
- var queryToBeReturned = {};
20678
-
20679
- if (props.defaultQuery) {
20680
- var evaluateQuery = props.defaultQuery([], props);
20681
-
20682
- if (evaluateQuery) {
20683
- if (evaluateQuery.query) {
20684
- queryToBeReturned.query = evaluateQuery.query;
20812
+ var _templateObject$j;
20813
+ 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"])));
20814
+ var AutoFillSvg = {
20815
+ name: 'AutoFillSvg',
20816
+ render: function render() {
20817
+ var h = arguments[0];
20818
+ return h(AutofillSvgIcon, {
20819
+ "on": {
20820
+ "click": this.$listeners.click
20685
20821
  }
20686
-
20687
- if (evaluateQuery.aggs) {
20688
- queryToBeReturned.aggs = evaluateQuery.aggs;
20822
+ }, [h("svg", {
20823
+ "attrs": {
20824
+ "viewBox": "0 0 24 24"
20689
20825
  }
20690
- }
20691
- }
20692
-
20693
- return queryToBeReturned;
20694
- }; // eslint-disable-next-line import/prefer-default-export
20695
-
20696
-
20697
- var getAggsQuery = function getAggsQuery(query, props) {
20698
- var _clonedQuery$aggs;
20699
-
20700
- var clonedQuery = query;
20701
- var dataField = props.dataField,
20702
- size = props.size,
20703
- sortBy = props.sortBy,
20704
- showMissing = props.showMissing,
20705
- missingLabel = props.missingLabel;
20706
- clonedQuery.size = 0;
20707
- clonedQuery.aggs = (_clonedQuery$aggs = {}, _clonedQuery$aggs[dataField] = {
20708
- terms: _extends({
20709
- field: dataField,
20710
- size: size,
20711
- order: getAggsOrder(sortBy || 'count')
20712
- }, showMissing ? {
20713
- missing: missingLabel
20714
- } : {})
20715
- }, _clonedQuery$aggs);
20716
-
20717
- if (props.nestedField) {
20718
- clonedQuery.aggs = {
20719
- reactivesearch_nested: {
20720
- nested: {
20721
- path: props.nestedField
20722
- },
20723
- aggs: clonedQuery.aggs
20826
+ }, [h("path", {
20827
+ "attrs": {
20828
+ "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"
20724
20829
  }
20725
- };
20830
+ })])]);
20831
+ },
20832
+ methods: {
20833
+ clicked: function clicked(e) {
20834
+ e.stopPropagation();
20835
+ window.console.log('hey', e);
20836
+ }
20726
20837
  }
20727
-
20728
- return _extends({}, clonedQuery, extractQuery(props));
20729
20838
  };
20730
20839
 
20731
20840
  var updateQuery$2 = lib_5.updateQuery,
20732
- setQueryOptions$2 = lib_5.setQueryOptions,
20733
20841
  setCustomQuery$1 = lib_5.setCustomQuery,
20734
- setDefaultQuery$2 = lib_5.setDefaultQuery;
20735
- var getQueryOptions$1 = lib_8.getQueryOptions,
20842
+ setDefaultQuery$2 = lib_5.setDefaultQuery,
20843
+ recordSuggestionClick$1 = lib_5.recordSuggestionClick;
20844
+ var _debounce = lib_8.debounce,
20736
20845
  checkValueChange$1 = lib_8.checkValueChange,
20737
20846
  getClassName$4 = lib_8.getClassName,
20738
20847
  isEqual$5 = lib_8.isEqual,
20739
- extractQueryFromCustomQuery$2 = lib_8.extractQueryFromCustomQuery,
20740
- getOptionsForCustomQuery$2 = lib_8.getOptionsForCustomQuery;
20741
- var SingleList = {
20742
- name: 'SingleList',
20743
- props: {
20744
- beforeValueChange: types.func,
20745
- className: VueTypes.string.def(''),
20746
- componentId: types.stringRequired,
20747
- customQuery: types.func,
20748
- dataField: types.stringRequired,
20749
- defaultValue: types.string,
20750
- value: types.value,
20751
- defaultQuery: types.func,
20752
- filterLabel: types.string,
20753
- innerClass: types.style,
20754
- placeholder: VueTypes.string.def('Search'),
20755
- react: types.react,
20756
- render: types.func,
20757
- renderItem: types.func,
20758
- renderNoResults: VueTypes.any,
20759
- transformData: types.func,
20760
- selectAllLabel: types.string,
20761
- showCount: VueTypes.bool.def(true),
20762
- showFilter: VueTypes.bool.def(true),
20763
- showRadio: VueTypes.bool.def(true),
20764
- showSearch: VueTypes.bool.def(true),
20765
- size: VueTypes.number,
20766
- sortBy: VueTypes.oneOf(['asc', 'desc', 'count']).def('count'),
20767
- title: types.title,
20768
- URLParams: VueTypes.bool.def(false),
20769
- showMissing: VueTypes.bool.def(false),
20770
- missingLabel: VueTypes.string.def('N/A'),
20771
- nestedField: types.string,
20772
- index: VueTypes.string,
20773
- enableStrictSelection: VueTypes.bool.def(false)
20774
- },
20848
+ getCompositeAggsQuery$2 = lib_8.getCompositeAggsQuery,
20849
+ withClickIds$1 = lib_8.withClickIds,
20850
+ getResultStats$2 = lib_8.getResultStats,
20851
+ normalizeDataField$1 = lib_8.normalizeDataField;
20852
+ var SearchBox = {
20853
+ name: 'SearchBox',
20775
20854
  data: function data() {
20776
20855
  var props = this.$props;
20777
20856
  this.__state = {
20778
20857
  currentValue: '',
20779
- modifiedOptions: [],
20780
- searchTerm: ''
20858
+ isOpen: false,
20859
+ normalizedSuggestions: []
20781
20860
  };
20782
20861
  this.internalComponent = props.componentId + "__internal";
20783
20862
  return this.__state;
20784
20863
  },
20864
+ inject: {
20865
+ theme: {
20866
+ from: 'theme_reactivesearch'
20867
+ }
20868
+ },
20785
20869
  created: function created() {
20786
- if (!this.enableAppbase && this.$props.index) {
20787
- console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
20870
+ var _this$$props = this.$props,
20871
+ distinctField = _this$$props.distinctField,
20872
+ distinctFieldConfig = _this$$props.distinctFieldConfig,
20873
+ index = _this$$props.index;
20874
+
20875
+ if (this.enableAppbase && this.aggregationField && this.aggregationField !== '') {
20876
+ console.warn('Warning(ReactiveSearch): The `aggregationField` prop has been marked as deprecated, please use the `distinctField` prop instead.');
20788
20877
  }
20789
20878
 
20790
- var props = this.$props;
20791
- this.modifiedOptions = this.options && this.options[props.dataField] ? this.options[props.dataField].buckets : []; // Set custom and default queries in store
20879
+ if (!this.enableAppbase && (distinctField || distinctFieldConfig)) {
20880
+ console.warn('Warning(ReactiveSearch): In order to use the `distinctField` and `distinctFieldConfig` props, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
20881
+ }
20792
20882
 
20793
- updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
20794
- updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, this.currentValue);
20883
+ if (!this.enableAppbase && index) {
20884
+ console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
20885
+ }
20886
+
20887
+ this.currentValue = this.selectedValue || this.value || this.defaultValue || '';
20888
+ this.handleTextChange = _debounce(this.handleText, this.$props.debounce);
20889
+ this.setValue(this.currentValue, true, this.$props, undefined, false, this.selectedCategory); // Set custom and default queries in store
20890
+
20891
+ this.triggerCustomQuery(this.currentValue, this.selectedCategory);
20892
+ this.triggerDefaultQuery(this.currentValue);
20893
+ },
20894
+ computed: {
20895
+ hasCustomRenderer: function hasCustomRenderer$1() {
20896
+ return hasCustomRenderer(this);
20897
+ },
20898
+ stats: function stats() {
20899
+ return getResultStats$2(this);
20900
+ }
20901
+ },
20902
+ props: {
20903
+ autoFocus: VueTypes.bool,
20904
+ autosuggest: VueTypes.bool.def(true),
20905
+ beforeValueChange: types.func,
20906
+ className: VueTypes.string.def(''),
20907
+ clearIcon: types.children,
20908
+ componentId: types.stringRequired,
20909
+ customHighlight: types.func,
20910
+ customQuery: types.func,
20911
+ defaultQuery: types.func,
20912
+ dataField: VueTypes.oneOfType([VueTypes.string, VueTypes.shape({
20913
+ field: VueTypes.string,
20914
+ weight: VueTypes.number
20915
+ }), VueTypes.arrayOf(VueTypes.string), VueTypes.arrayOf({
20916
+ field: VueTypes.string,
20917
+ weight: VueTypes.number
20918
+ })]),
20919
+ aggregationField: types.string,
20920
+ aggregationSize: VueTypes.number,
20921
+ size: VueTypes.number,
20922
+ debounce: VueTypes.number.def(0),
20923
+ defaultValue: types.string,
20924
+ excludeFields: types.excludeFields,
20925
+ value: types.value,
20926
+ defaultSuggestions: types.suggestions,
20927
+ enableSynonyms: VueTypes.bool.def(true),
20928
+ enableQuerySuggestions: VueTypes.bool.def(false),
20929
+ enablePopularSuggestions: VueTypes.bool.def(false),
20930
+ enableRecentSuggestions: VueTypes.bool.def(false),
20931
+ fieldWeights: types.fieldWeights,
20932
+ filterLabel: types.string,
20933
+ fuzziness: types.fuzziness,
20934
+ highlight: VueTypes.bool,
20935
+ highlightField: types.stringOrArray,
20936
+ icon: types.children,
20937
+ iconPosition: VueTypes.oneOf(['left', 'right']).def('left'),
20938
+ includeFields: types.includeFields,
20939
+ innerClass: types.style,
20940
+ innerRef: VueTypes.string.def('searchInputField'),
20941
+ render: types.func,
20942
+ renderNoSuggestion: types.title,
20943
+ renderError: types.title,
20944
+ placeholder: VueTypes.string.def('Search'),
20945
+ queryFormat: VueTypes.oneOf(['and', 'or']).def('or'),
20946
+ react: types.react,
20947
+ showClear: VueTypes.bool.def(true),
20948
+ showDistinctSuggestions: VueTypes.bool.def(true),
20949
+ showFilter: VueTypes.bool.def(true),
20950
+ showIcon: VueTypes.bool.def(true),
20951
+ title: types.title,
20952
+ theme: types.style,
20953
+ URLParams: VueTypes.bool.def(false),
20954
+ strictSelection: VueTypes.bool.def(false),
20955
+ nestedField: types.string,
20956
+ enablePredictiveSuggestions: VueTypes.bool.def(false),
20957
+ recentSearchesIcon: VueTypes.any,
20958
+ popularSearchesIcon: VueTypes.any,
20959
+ // mic props
20960
+ showVoiceSearch: VueTypes.bool.def(false),
20961
+ getMicInstance: types.func,
20962
+ renderMic: types.func,
20963
+ distinctField: types.string,
20964
+ distinctFieldConfig: types.props,
20965
+ //
20966
+ focusShortcuts: VueTypes.arrayOf(VueTypes.oneOfType([VueTypes.string, VueTypes.number])).def(['/']),
20967
+ addonBefore: VueTypes.any,
20968
+ addonAfter: VueTypes.any,
20969
+ expandSuggestionsContainer: VueTypes.bool.def(true),
20970
+ index: VueTypes.string,
20971
+ popularSuggestionsConfig: VueTypes.object,
20972
+ recentSuggestionsConfig: VueTypes.object,
20973
+ applyStopwords: VueTypes.bool,
20974
+ customStopwords: types.stringArray,
20975
+ onData: types.func,
20976
+ renderItem: types.func,
20977
+ enterButton: VueTypes.bool.def(false),
20978
+ renderEnterButton: VueTypes.any
20979
+ },
20980
+ mounted: function mounted() {
20981
+ this.listenForFocusShortcuts();
20982
+ },
20983
+ watch: {
20984
+ dataField: function dataField(newVal, oldVal) {
20985
+ if (!isEqual$5(newVal, oldVal)) {
20986
+ this.triggerCustomQuery(this.$data.currentValue);
20987
+ }
20988
+ },
20989
+ fieldWeights: function fieldWeights() {
20990
+ this.triggerCustomQuery(this.$data.currentValue);
20991
+ },
20992
+ fuzziness: function fuzziness() {
20993
+ this.triggerCustomQuery(this.$data.currentValue);
20994
+ },
20995
+ queryFormat: function queryFormat() {
20996
+ this.triggerCustomQuery(this.$data.currentValue);
20997
+ },
20998
+ defaultValue: function defaultValue(newVal) {
20999
+ this.setValue(newVal, true, this.$props);
21000
+ },
21001
+ value: function value(newVal, oldVal) {
21002
+ if (!isEqual$5(newVal, oldVal)) {
21003
+ this.setValue(newVal, true, this.$props, newVal === '' ? lib_7.CLEAR_VALUE : undefined, false);
21004
+ }
21005
+ },
21006
+ defaultQuery: function defaultQuery(newVal, oldVal) {
21007
+ if (!isQueryIdentical(newVal, oldVal, this.$data.currentValue, this.$props)) {
21008
+ this.triggerDefaultQuery(this.$data.currentValue);
21009
+ }
21010
+ },
21011
+ customQuery: function customQuery(newVal, oldVal) {
21012
+ if (!isQueryIdentical(newVal, oldVal, this.$data.currentValue, this.$props)) {
21013
+ this.triggerCustomQuery(this.$data.currentValue);
21014
+ }
21015
+ },
21016
+ suggestions: function suggestions(newVal) {
21017
+ var suggestionsList = [];
21018
+
21019
+ if (Array.isArray(newVal) && newVal.length) {
21020
+ suggestionsList = [].concat(withClickIds$1(newVal));
21021
+ } else if (Array.isArray(this.$props.defaultSuggestions) && this.$props.defaultSuggestions.length) {
21022
+ suggestionsList = [].concat(withClickIds$1(this.$props.defaultSuggestions));
21023
+ }
21024
+
21025
+ this.normalizedSuggestions = suggestionsList;
21026
+ },
21027
+ selectedValue: function selectedValue(newVal, oldVal) {
21028
+ if (oldVal !== newVal && this.$data.currentValue !== newVal) {
21029
+ if (!newVal && this.$data.currentValue) {
21030
+ // selected value is cleared, call onValueSelected
21031
+ this.onValueSelectedHandler('', lib_7.CLEAR_VALUE);
21032
+ }
21033
+
21034
+ if (this.$props.value === undefined) {
21035
+ this.setValue(newVal || '', true, this.$props);
21036
+ }
21037
+ }
21038
+ },
21039
+ focusShortcuts: function focusShortcuts() {
21040
+ this.listenForFocusShortcuts();
21041
+ },
21042
+ rawData: function rawData(newVal) {
21043
+ this.$emit('on-data', {
21044
+ data: this.normalizedSuggestions,
21045
+ rawData: newVal,
21046
+ aggregationData: this.aggregationData,
21047
+ loading: this.isLoading,
21048
+ error: this.isError
21049
+ });
21050
+ },
21051
+ aggregationData: function aggregationData(newVal) {
21052
+ this.$emit('on-data', {
21053
+ data: this.normalizedSuggestions,
21054
+ rawData: this.rawData,
21055
+ aggregationData: newVal,
21056
+ loading: this.isLoading,
21057
+ error: this.isError
21058
+ });
21059
+ },
21060
+ loading: function loading(newVal) {
21061
+ this.$emit('on-data', {
21062
+ data: this.normalizedSuggestions,
21063
+ rawData: this.rawData,
21064
+ aggregationData: this.aggregationData,
21065
+ loading: newVal,
21066
+ error: this.isError
21067
+ });
21068
+ },
21069
+ error: function error(newVal) {
21070
+ this.$emit('on-data', {
21071
+ data: this.normalizedSuggestions,
21072
+ rawData: this.rawData,
21073
+ aggregationData: this.aggregationData,
21074
+ loading: this.isLoading,
21075
+ error: newVal
21076
+ });
21077
+ },
21078
+ debounce: function debounce(newVal, oldVal) {
21079
+ if (!isEqual$5(newVal, oldVal)) {
21080
+ this.handleTextChange = _debounce(this.handleText, newVal);
21081
+ }
21082
+ }
21083
+ },
21084
+ methods: {
21085
+ handleText: function handleText(value, cause) {
21086
+ if (cause === lib_7.CLEAR_VALUE) {
21087
+ this.triggerCustomQuery(value);
21088
+ this.triggerDefaultQuery(value);
21089
+ } else if (this.$props.autosuggest) {
21090
+ this.triggerDefaultQuery(value);
21091
+ } else if (!this.$props.enterButton) {
21092
+ this.triggerCustomQuery(value);
21093
+ }
21094
+ },
21095
+ validateDataField: function validateDataField() {
21096
+ var propName = 'dataField';
21097
+ var componentName = SearchBox.name;
21098
+ var props = this.$props;
21099
+ var requiredError = propName + " supplied to " + componentName + " is required. Validation failed.";
21100
+ var propValue = props[propName];
21101
+
21102
+ if (!this.enableAppbase) {
21103
+ if (!propValue) {
21104
+ console.error(requiredError);
21105
+ return;
21106
+ }
21107
+
21108
+ if (typeof propValue !== 'string' && typeof propValue !== 'object' && !Array.isArray(propValue)) {
21109
+ console.error("Invalid " + propName + " supplied to " + componentName + ". Validation failed.");
21110
+ return;
21111
+ }
21112
+
21113
+ if (Array.isArray(propValue) && propValue.length === 0) {
21114
+ console.error(requiredError);
21115
+ }
21116
+ }
21117
+ },
21118
+ getComponent: function getComponent$1(downshiftProps) {
21119
+ if (downshiftProps === void 0) {
21120
+ downshiftProps = {};
21121
+ }
21122
+
21123
+ var currentValue = this.$data.currentValue;
21124
+ var data = {
21125
+ error: this.error,
21126
+ loading: this.isLoading,
21127
+ downshiftProps: downshiftProps,
21128
+ data: this.normalizedSuggestions,
21129
+ rawData: this.rawData,
21130
+ value: currentValue,
21131
+ resultStats: this.stats
21132
+ };
21133
+ return getComponent(data, this);
21134
+ },
21135
+ // returns size and aggs property
21136
+ getBasicQueryOptions: function getBasicQueryOptions() {
21137
+ var aggregationField = this.$props.aggregationField;
21138
+ var queryOptions = helper_28(this.$props);
21139
+
21140
+ if (aggregationField) {
21141
+ queryOptions.aggs = getCompositeAggsQuery$2({
21142
+ props: this.$props,
21143
+ showTopHits: true
21144
+ }).aggs;
21145
+ }
21146
+
21147
+ return queryOptions;
21148
+ },
21149
+ handleSearchIconClick: function handleSearchIconClick() {
21150
+ var currentValue = this.currentValue;
21151
+
21152
+ if (currentValue.trim()) {
21153
+ this.setValue(currentValue, true);
21154
+ this.onValueSelectedHandler(currentValue, lib_7.SEARCH_ICON_CLICK);
21155
+ }
21156
+ },
21157
+ setValue: function setValue(value, isDefaultValue, props, cause, toggleIsOpen, categoryValue) {
21158
+ var _this = this;
21159
+
21160
+ if (isDefaultValue === void 0) {
21161
+ isDefaultValue = false;
21162
+ }
21163
+
21164
+ if (props === void 0) {
21165
+ props = this.$props;
21166
+ }
21167
+
21168
+ if (toggleIsOpen === void 0) {
21169
+ toggleIsOpen = true;
21170
+ }
21171
+
21172
+ if (categoryValue === void 0) {
21173
+ categoryValue = undefined;
21174
+ }
21175
+
21176
+ var performUpdate = function performUpdate() {
21177
+ _this.currentValue = value;
21178
+
21179
+ if (isDefaultValue) {
21180
+ if (_this.$props.autosuggest) {
21181
+ if (toggleIsOpen) {
21182
+ _this.isOpen = false;
21183
+ }
21184
+
21185
+ _this.triggerDefaultQuery(value);
21186
+ } // in case of strict selection only SUGGESTION_SELECT should be able
21187
+ // to set the query otherwise the value should reset
21188
+
21189
+
21190
+ if (props.strictSelection) {
21191
+ if (cause === lib_7.SUGGESTION_SELECT || value === '') {
21192
+ _this.triggerCustomQuery(value, categoryValue);
21193
+ } else {
21194
+ _this.setValue('', true);
21195
+ }
21196
+ } else if (props.value === undefined) {
21197
+ _this.triggerCustomQuery(value, categoryValue);
21198
+ }
21199
+ } else {
21200
+ // debounce for handling text while typing
21201
+ _this.handleTextChange(value, cause);
21202
+ }
21203
+
21204
+ _this.$emit('valueChange', value);
21205
+
21206
+ _this.$emit('value-change', value);
21207
+ };
21208
+
21209
+ checkValueChange$1(props.componentId, value, props.beforeValueChange, performUpdate);
21210
+ },
21211
+ triggerDefaultQuery: function triggerDefaultQuery(paramValue) {
21212
+ if (!this.$props.autosuggest) {
21213
+ return;
21214
+ }
21215
+
21216
+ var value = typeof paramValue !== 'string' ? this.currentValue : paramValue;
21217
+ var query = SearchBox.defaultQuery(value, this.$props);
21218
+
21219
+ if (this.defaultQuery) {
21220
+ var defaultQueryToBeSet = this.defaultQuery(value, this.$props) || {};
21221
+
21222
+ if (defaultQueryToBeSet.query) {
21223
+ query = defaultQueryToBeSet.query;
21224
+ } // Update calculated default query in store
21225
+
21226
+
21227
+ updateDefaultQuery(this.$props.componentId, this.setDefaultQuery, this.$props, value);
21228
+ }
21229
+
21230
+ this.updateQuery({
21231
+ componentId: this.internalComponent,
21232
+ query: query,
21233
+ value: value,
21234
+ componentType: constants_1$1.searchBox
21235
+ });
21236
+ },
21237
+ triggerCustomQuery: function triggerCustomQuery(paramValue, categoryValue) {
21238
+ if (categoryValue === void 0) {
21239
+ categoryValue = undefined;
21240
+ }
21241
+
21242
+ var _this$$props2 = this.$props,
21243
+ customQuery = _this$$props2.customQuery,
21244
+ filterLabel = _this$$props2.filterLabel,
21245
+ showFilter = _this$$props2.showFilter,
21246
+ URLParams = _this$$props2.URLParams;
21247
+ var value = typeof paramValue !== 'string' ? this.$data.currentValue : paramValue;
21248
+ var defaultQueryTobeSet = SearchBox.defaultQuery("" + value + (categoryValue ? " in " + categoryValue : ''), this.$props);
21249
+ var query = defaultQueryTobeSet;
21250
+
21251
+ if (customQuery) {
21252
+ var customQueryTobeSet = customQuery(value, this.$props);
21253
+ var queryTobeSet = customQueryTobeSet.query;
21254
+
21255
+ if (queryTobeSet) {
21256
+ query = queryTobeSet;
21257
+ }
21258
+
21259
+ updateCustomQuery(this.$props.componentId, this.setCustomQuery, this.$props, value);
21260
+ }
21261
+
21262
+ this.updateQuery({
21263
+ componentId: this.$props.componentId,
21264
+ query: query,
21265
+ value: value,
21266
+ label: filterLabel,
21267
+ showFilter: showFilter,
21268
+ URLParams: URLParams,
21269
+ componentType: constants_1$1.searchBox,
21270
+ category: categoryValue
21271
+ });
21272
+ },
21273
+ handleFocus: function handleFocus(event) {
21274
+ if (this.$props.autosuggest) {
21275
+ this.isOpen = true;
21276
+ }
21277
+
21278
+ this.$emit('focus', event);
21279
+ },
21280
+ handleVoiceResults: function handleVoiceResults(_ref) {
21281
+ var results = _ref.results;
21282
+
21283
+ if (results && results[0] && results[0].isFinal && results[0][0] && results[0][0].transcript && results[0][0].transcript.trim()) {
21284
+ this.setValue(results[0][0].transcript.trim(), true);
21285
+ }
21286
+ },
21287
+ triggerQuery: function triggerQuery(_ref2) {
21288
+ var _ref2$isOpen = _ref2.isOpen,
21289
+ isOpen = _ref2$isOpen === void 0 ? undefined : _ref2$isOpen,
21290
+ _ref2$customQuery = _ref2.customQuery,
21291
+ customQuery = _ref2$customQuery === void 0 ? true : _ref2$customQuery,
21292
+ _ref2$defaultQuery = _ref2.defaultQuery,
21293
+ defaultQuery = _ref2$defaultQuery === void 0 ? true : _ref2$defaultQuery,
21294
+ _ref2$value = _ref2.value,
21295
+ value = _ref2$value === void 0 ? undefined : _ref2$value,
21296
+ _ref2$categoryValue = _ref2.categoryValue,
21297
+ categoryValue = _ref2$categoryValue === void 0 ? undefined : _ref2$categoryValue;
21298
+
21299
+ if (typeof isOpen === 'boolean') {
21300
+ this.isOpen = isOpen;
21301
+ }
21302
+
21303
+ if (customQuery) {
21304
+ this.triggerCustomQuery(value, categoryValue);
21305
+ }
21306
+
21307
+ if (defaultQuery) {
21308
+ this.triggerDefaultQuery(value);
21309
+ }
21310
+ },
21311
+ triggerClickAnalytics: function triggerClickAnalytics(searchPosition, documentId) {
21312
+ // click analytics would only work client side and after javascript loads
21313
+ var docId = documentId;
21314
+
21315
+ if (!docId) {
21316
+ var hitData = this.normalizedSuggestions.find(function (hit) {
21317
+ return hit._click_id === searchPosition;
21318
+ });
21319
+
21320
+ if (hitData && hitData.source && hitData.source._id) {
21321
+ docId = hitData.source._id;
21322
+ }
21323
+ }
21324
+
21325
+ this.recordSuggestionClick(searchPosition, docId);
21326
+ },
21327
+ clearValue: function clearValue() {
21328
+ this.setValue('', false, this.$props, lib_7.CLEAR_VALUE, false);
21329
+ this.onValueSelectedHandler('', lib_7.CLEAR_VALUE);
21330
+ },
21331
+ handleKeyDown: function handleKeyDown(event, highlightedIndex) {
21332
+ // if a suggestion was selected, delegate the handling to suggestion handler
21333
+ if (event.key === 'Enter' && highlightedIndex === null) {
21334
+ this.setValue(event.target.value, true);
21335
+ this.onValueSelectedHandler(event.target.value, lib_7.ENTER_PRESS);
21336
+ } // Need to review
21337
+
21338
+
21339
+ this.$emit('keyDown', event, this.triggerQuery);
21340
+ this.$emit('key-down', event, this.triggerQuery);
21341
+ },
21342
+ onInputChange: function onInputChange(e) {
21343
+ var _this2 = this;
21344
+
21345
+ var inputValue = e.target.value;
21346
+
21347
+ if (!this.$data.isOpen && this.$props.autosuggest) {
21348
+ this.isOpen = true;
21349
+ }
21350
+
21351
+ var value = this.$props.value;
21352
+
21353
+ if (value === undefined) {
21354
+ this.setValue(inputValue, false, this.$props, inputValue === '' ? lib_7.CLEAR_VALUE : undefined);
21355
+ } else {
21356
+ this.$emit('change', inputValue, function (_ref3) {
21357
+ var isOpen = _ref3.isOpen;
21358
+ return _this2.triggerQuery({
21359
+ defaultQuery: true,
21360
+ customQuery: true,
21361
+ value: inputValue,
21362
+ isOpen: isOpen
21363
+ });
21364
+ }, e);
21365
+ }
21366
+ },
21367
+ onSuggestionSelected: function onSuggestionSelected(suggestion) {
21368
+ var _this3 = this;
21369
+
21370
+ this.isOpen = false;
21371
+ var value = this.$props.value; // Record analytics for selected suggestions
21372
+
21373
+ this.triggerClickAnalytics(suggestion._click_id);
21374
+
21375
+ if (value === undefined) {
21376
+ this.setValue(suggestion.value, true, this.$props, lib_7.SUGGESTION_SELECT, false, suggestion._category);
21377
+ } else {
21378
+ this.$emit('change', suggestion.value, function (_ref4) {
21379
+ var isOpen = _ref4.isOpen;
21380
+ return _this3.triggerQuery({
21381
+ isOpen: isOpen,
21382
+ value: suggestion.value,
21383
+ categoryValue: suggestion._category
21384
+ });
21385
+ });
21386
+ }
21387
+
21388
+ this.onValueSelectedHandler(suggestion.value, lib_7.SUGGESTION_SELECT, suggestion.source);
21389
+ },
21390
+ onValueSelectedHandler: function onValueSelectedHandler(currentValue) {
21391
+ if (currentValue === void 0) {
21392
+ currentValue = this.$data.currentValue;
21393
+ }
21394
+
21395
+ for (var _len = arguments.length, cause = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
21396
+ cause[_key - 1] = arguments[_key];
21397
+ }
21398
+
21399
+ this.$emit.apply(this, ['valueSelected', currentValue].concat(cause));
21400
+ this.$emit.apply(this, ['value-selected', currentValue].concat(cause));
21401
+ },
21402
+ handleStateChange: function handleStateChange(changes) {
21403
+ var isOpen = changes.isOpen;
21404
+ this.isOpen = isOpen;
21405
+ },
21406
+ getBackgroundColor: function getBackgroundColor(highlightedIndex, index) {
21407
+ var isDark = this.themePreset === 'dark';
21408
+
21409
+ if (isDark) {
21410
+ return highlightedIndex === index ? '#555' : '#424242';
21411
+ }
21412
+
21413
+ return highlightedIndex === index ? '#eee' : '#fff';
21414
+ },
21415
+ renderIcon: function renderIcon() {
21416
+ var h = this.$createElement;
21417
+
21418
+ if (this.$props.showIcon) {
21419
+ return this.$props.icon || h(SearchSvg);
21420
+ }
21421
+
21422
+ return null;
21423
+ },
21424
+ renderErrorComponent: function renderErrorComponent() {
21425
+ var h = this.$createElement;
21426
+ var renderError = this.$scopedSlots.renderError || this.$props.renderError;
21427
+
21428
+ if (this.error && renderError && this.$data.currentValue && !this.isLoading) {
21429
+ return h(SuggestionWrapper, {
21430
+ "attrs": {
21431
+ "innerClass": this.$props.innerClass,
21432
+ "innerClassName": "error",
21433
+ "theme": this.theme,
21434
+ "themePreset": this.themePreset
21435
+ }
21436
+ }, [isFunction$1(renderError) ? renderError(this.error) : renderError]);
21437
+ }
21438
+
21439
+ return null;
21440
+ },
21441
+ renderCancelIcon: function renderCancelIcon() {
21442
+ var h = this.$createElement;
21443
+
21444
+ if (this.$props.showClear) {
21445
+ return this.$props.clearIcon || h(CancelSvg);
21446
+ }
21447
+
21448
+ return null;
21449
+ },
21450
+ renderNoSuggestions: function renderNoSuggestions(finalSuggestionsList) {
21451
+ if (finalSuggestionsList === void 0) {
21452
+ finalSuggestionsList = [];
21453
+ }
21454
+
21455
+ var h = this.$createElement;
21456
+ var _this$$props3 = this.$props,
21457
+ theme = _this$$props3.theme,
21458
+ innerClass = _this$$props3.innerClass;
21459
+ var renderNoSuggestion = this.$scopedSlots.renderNoSuggestion || this.$props.renderNoSuggestion;
21460
+ var renderError = this.$scopedSlots.renderError || this.$props.renderError;
21461
+ var _this$$data = this.$data,
21462
+ isOpen = _this$$data.isOpen,
21463
+ currentValue = _this$$data.currentValue;
21464
+
21465
+ if (renderNoSuggestion && isOpen && !finalSuggestionsList.length && !this.isLoading && currentValue && !(renderError && this.error)) {
21466
+ return h(SuggestionWrapper, {
21467
+ "attrs": {
21468
+ "innerClass": innerClass,
21469
+ "themePreset": this.themePreset,
21470
+ "theme": theme,
21471
+ "innerClassName": "noSuggestion"
21472
+ },
21473
+ "scopedSlots": {
21474
+ "default": function _default() {
21475
+ return typeof renderNoSuggestion === 'function' ? renderNoSuggestion(currentValue) : renderNoSuggestion;
21476
+ }
21477
+ }
21478
+ });
21479
+ }
21480
+
21481
+ return null;
21482
+ },
21483
+ renderInputAddonBefore: function renderInputAddonBefore() {
21484
+ var h = this.$createElement;
21485
+ var addonBefore = this.$scopedSlots.addonBefore;
21486
+
21487
+ if (addonBefore) {
21488
+ return h(InputAddon, {
21489
+ "class": "addon-before"
21490
+ }, [addonBefore()]);
21491
+ }
21492
+
21493
+ return null;
21494
+ },
21495
+ renderInputAddonAfter: function renderInputAddonAfter() {
21496
+ var h = this.$createElement;
21497
+ var addonAfter = this.$scopedSlots.addonAfter;
21498
+
21499
+ if (addonAfter) {
21500
+ return h(InputAddon, {
21501
+ "class": "addon-after"
21502
+ }, [addonAfter()]);
21503
+ }
21504
+
21505
+ return null;
21506
+ },
21507
+ renderEnterButtonElement: function renderEnterButtonElement() {
21508
+ var _this4 = this;
21509
+
21510
+ var h = this.$createElement;
21511
+ var _this$$props4 = this.$props,
21512
+ enterButton = _this$$props4.enterButton,
21513
+ innerClass = _this$$props4.innerClass;
21514
+ var renderEnterButton = this.$scopedSlots.renderEnterButton;
21515
+
21516
+ var enterButtonOnClick = function enterButtonOnClick() {
21517
+ return _this4.triggerQuery({
21518
+ isOpen: false,
21519
+ value: _this4.currentValue,
21520
+ customQuery: true
21521
+ });
21522
+ };
21523
+
21524
+ if (enterButton) {
21525
+ var getEnterButtonMarkup = function getEnterButtonMarkup() {
21526
+ if (renderEnterButton) {
21527
+ return renderEnterButton(enterButtonOnClick);
21528
+ }
21529
+
21530
+ return h(Button, {
21531
+ "class": "enter-btn " + getClassName$4(innerClass, 'enterButton'),
21532
+ "attrs": {
21533
+ "primary": true
21534
+ },
21535
+ "on": {
21536
+ "click": enterButtonOnClick
21537
+ }
21538
+ }, ["Search"]);
21539
+ };
21540
+
21541
+ return h("div", {
21542
+ "class": "enter-button-wrapper"
21543
+ }, [getEnterButtonMarkup()]);
21544
+ }
21545
+
21546
+ return null;
21547
+ },
21548
+ renderIcons: function renderIcons() {
21549
+ var h = this.$createElement;
21550
+ var _this$$props5 = this.$props,
21551
+ iconPosition = _this$$props5.iconPosition,
21552
+ showClear = _this$$props5.showClear,
21553
+ innerClass = _this$$props5.innerClass,
21554
+ getMicInstance = _this$$props5.getMicInstance,
21555
+ showVoiceSearch = _this$$props5.showVoiceSearch,
21556
+ showIcon = _this$$props5.showIcon;
21557
+ var renderMic = this.$scopedSlots.renderMic || this.$props.renderMic;
21558
+ var currentValue = this.$data.currentValue;
21559
+ return h("div", [h(IconGroup, {
21560
+ "attrs": {
21561
+ "groupPosition": "right",
21562
+ "positionType": "absolute"
21563
+ }
21564
+ }, [currentValue && showClear && h(IconWrapper, {
21565
+ "on": {
21566
+ "click": this.clearValue
21567
+ },
21568
+ "attrs": {
21569
+ "showIcon": showIcon,
21570
+ "isClearIcon": true
21571
+ }
21572
+ }, [this.renderCancelIcon()]), showVoiceSearch && h(Mic, {
21573
+ "attrs": {
21574
+ "getInstance": getMicInstance,
21575
+ "render": renderMic,
21576
+ "handleResult": this.handleVoiceResults,
21577
+ "className": getClassName$4(innerClass, 'mic') || null
21578
+ }
21579
+ }), iconPosition === 'right' && showIcon && h(IconWrapper, {
21580
+ "on": {
21581
+ "click": this.handleSearchIconClick
21582
+ }
21583
+ }, [this.renderIcon()])]), h(IconGroup, {
21584
+ "attrs": {
21585
+ "groupPosition": "left",
21586
+ "positionType": "absolute"
21587
+ }
21588
+ }, [iconPosition === 'left' && showIcon && h(IconWrapper, {
21589
+ "on": {
21590
+ "click": this.handleSearchIconClick
21591
+ }
21592
+ }, [this.renderIcon()])])]);
21593
+ },
21594
+ focusSearchBox: function focusSearchBox(event) {
21595
+ var _this$$refs, _this$$refs$this$$pro;
21596
+
21597
+ var elt = event.target || event.srcElement;
21598
+ var tagName = elt.tagName;
21599
+
21600
+ if (elt.isContentEditable || tagName === 'INPUT' || tagName === 'SELECT' || tagName === 'TEXTAREA') {
21601
+ // already in an input
21602
+ return;
21603
+ }
21604
+
21605
+ (_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
21606
+ },
21607
+ listenForFocusShortcuts: function listenForFocusShortcuts() {
21608
+ var _this5 = this;
21609
+
21610
+ var _this$$props$focusSho = this.$props.focusShortcuts,
21611
+ focusShortcuts = _this$$props$focusSho === void 0 ? ['/'] : _this$$props$focusSho;
21612
+
21613
+ if (isEmpty(focusShortcuts)) {
21614
+ return;
21615
+ }
21616
+
21617
+ var shortcutsString = parseFocusShortcuts(focusShortcuts).join(','); // handler for alphabets and other key combinations
21618
+
21619
+ hotkeys(shortcutsString, // eslint-disable-next-line no-unused-vars
21620
+
21621
+ /* eslint-disable no-shadow */
21622
+ function (event, handler) {
21623
+ // Prevent the default refresh event under WINDOWS system
21624
+ event.preventDefault();
21625
+
21626
+ _this5.focusSearchBox(event);
21627
+ }); // if one of modifier keys are used, they are handled below
21628
+
21629
+ hotkeys('*', function (event) {
21630
+ var modifierKeys = extractModifierKeysFromFocusShortcuts(focusShortcuts);
21631
+ if (modifierKeys.length === 0) return;
21632
+
21633
+ for (var index = 0; index < modifierKeys.length; index += 1) {
21634
+ var element = modifierKeys[index];
21635
+
21636
+ if (hotkeys[element]) {
21637
+ _this5.focusSearchBox(event);
21638
+
21639
+ break;
21640
+ }
21641
+ }
21642
+ });
21643
+ },
21644
+ onAutofillClick: function onAutofillClick(suggestion) {
21645
+ var value = suggestion.value;
21646
+ this.isOpen = true;
21647
+ this.currentValue = value;
21648
+ this.triggerDefaultQuery(value);
21649
+ },
21650
+ renderAutoFill: function renderAutoFill(suggestion) {
21651
+ var _this6 = this;
21652
+
21653
+ var h = this.$createElement;
21654
+
21655
+ var handleAutoFillClick = function handleAutoFillClick(e) {
21656
+ e.stopPropagation();
21657
+
21658
+ _this6.onAutofillClick(suggestion);
21659
+ };
21660
+ /* 👇 avoid showing autofill for category suggestions👇 */
21661
+
21662
+
21663
+ return suggestion._category ? null : h(AutoFillSvg, {
21664
+ "on": {
21665
+ "click": handleAutoFillClick
21666
+ }
21667
+ });
21668
+ }
21669
+ },
21670
+ render: function render() {
21671
+ var _this7 = this;
21672
+
21673
+ var h = arguments[0];
21674
+ var _this$$props6 = this.$props,
21675
+ theme = _this$$props6.theme,
21676
+ expandSuggestionsContainer = _this$$props6.expandSuggestionsContainer;
21677
+ var _this$$scopedSlots = this.$scopedSlots,
21678
+ recentSearchesIcon = _this$$scopedSlots.recentSearchesIcon,
21679
+ popularSearchesIcon = _this$$scopedSlots.popularSearchesIcon;
21680
+ var hasSuggestions = Array.isArray(this.normalizedSuggestions) && this.normalizedSuggestions.length;
21681
+ var renderItem = this.$scopedSlots.renderItem || this.$props.renderItem;
21682
+ return h(Container, {
21683
+ "class": this.$props.className
21684
+ }, [this.$props.title && h(Title, {
21685
+ "class": getClassName$4(this.$props.innerClass, 'title') || ''
21686
+ }, [this.$props.title]), this.$props.autosuggest ? h(Downshift, {
21687
+ "attrs": {
21688
+ "id": this.$props.componentId + "-downshift",
21689
+ "handleChange": this.onSuggestionSelected,
21690
+ "handleMouseup": this.handleStateChange,
21691
+ "isOpen": this.$data.isOpen
21692
+ },
21693
+ "scopedSlots": {
21694
+ "default": function _default(_ref5) {
21695
+ var getInputEvents = _ref5.getInputEvents,
21696
+ getInputProps = _ref5.getInputProps,
21697
+ getItemProps = _ref5.getItemProps,
21698
+ getItemEvents = _ref5.getItemEvents,
21699
+ isOpen = _ref5.isOpen,
21700
+ highlightedIndex = _ref5.highlightedIndex,
21701
+ setHighlightedIndex = _ref5.setHighlightedIndex;
21702
+
21703
+ var renderSuggestionsDropdown = function renderSuggestionsDropdown() {
21704
+ var getIcon = function getIcon(iconType) {
21705
+ switch (iconType) {
21706
+ case helper_6.Recent:
21707
+ return recentSearchesIcon;
21708
+
21709
+ case helper_6.Popular:
21710
+ return popularSearchesIcon;
21711
+
21712
+ default:
21713
+ return null;
21714
+ }
21715
+ };
21716
+
21717
+ return h("div", [_this7.hasCustomRenderer && _this7.getComponent({
21718
+ isOpen: isOpen,
21719
+ getItemProps: getItemProps,
21720
+ getItemEvents: getItemEvents,
21721
+ highlightedIndex: highlightedIndex
21722
+ }), _this7.renderErrorComponent(), !_this7.hasCustomRenderer && isOpen && hasSuggestions ? h("ul", {
21723
+ "class": suggestions$1(_this7.themePreset, theme) + " " + getClassName$4(_this7.$props.innerClass, 'list')
21724
+ }, [_this7.normalizedSuggestions.map(function (item, index) {
21725
+ return renderItem ? h("li", {
21726
+ "domProps": _extends({}, getItemProps({
21727
+ item: item
21728
+ })),
21729
+ "on": _extends({}, getItemEvents({
21730
+ item: item
21731
+ })),
21732
+ "key": index + 1 + "-" + item.value,
21733
+ "style": {
21734
+ backgroundColor: _this7.getBackgroundColor(highlightedIndex, index),
21735
+ justifyContent: 'flex-start',
21736
+ alignItems: 'center'
21737
+ }
21738
+ }, [renderItem(item)]) : h("li", {
21739
+ "domProps": _extends({}, getItemProps({
21740
+ item: item
21741
+ })),
21742
+ "on": _extends({}, getItemEvents({
21743
+ item: item
21744
+ })),
21745
+ "key": index + 1 + "-" + item.value,
21746
+ "style": {
21747
+ backgroundColor: _this7.getBackgroundColor(highlightedIndex, index),
21748
+ justifyContent: 'flex-start',
21749
+ alignItems: 'center'
21750
+ }
21751
+ }, [h("div", {
21752
+ "style": {
21753
+ padding: '0 10px 0 0',
21754
+ display: 'flex'
21755
+ }
21756
+ }, [h(CustomSvg, {
21757
+ "attrs": {
21758
+ "className": getClassName$4(_this7.$props.innerClass, item._suggestion_type + "-search-icon") || null,
21759
+ "icon": getIcon(item._suggestion_type),
21760
+ "type": item._suggestion_type + "-search-icon"
21761
+ }
21762
+ })]), h(SuggestionItem, {
21763
+ "attrs": {
21764
+ "currentValue": _this7.currentValue,
21765
+ "suggestion": item
21766
+ }
21767
+ }), _this7.renderAutoFill(item)]);
21768
+ })]) : _this7.renderNoSuggestions(_this7.normalizedSuggestions)]);
21769
+ };
21770
+
21771
+ return h("div", {
21772
+ "class": suggestionsContainer
21773
+ }, [h(InputGroup, [_this7.renderInputAddonBefore(), h(InputWrapper, [h(Input, {
21774
+ "attrs": {
21775
+ "id": _this7.$props.componentId + "-input",
21776
+ "showIcon": _this7.$props.showIcon,
21777
+ "showClear": _this7.$props.showClear,
21778
+ "iconPosition": _this7.$props.iconPosition,
21779
+ "placeholder": _this7.$props.placeholder,
21780
+ "autoFocus": _this7.$props.autoFocus,
21781
+ "themePreset": _this7.themePreset,
21782
+ "autocomplete": "off"
21783
+ },
21784
+ "ref": _this7.$props.innerRef,
21785
+ "class": getClassName$4(_this7.$props.innerClass, 'input'),
21786
+ "on": _extends({}, getInputEvents({
21787
+ onInput: _this7.onInputChange,
21788
+ onBlur: function onBlur(e) {
21789
+ _this7.$emit('blur', e, _this7.triggerQuery);
21790
+ },
21791
+ onFocus: _this7.handleFocus,
21792
+ onKeyPress: function onKeyPress(e) {
21793
+ _this7.$emit('keyPress', e, _this7.triggerQuery);
21794
+
21795
+ _this7.$emit('key-press', e, _this7.triggerQuery);
21796
+ },
21797
+ onKeyDown: function onKeyDown(e) {
21798
+ return _this7.handleKeyDown(e, highlightedIndex);
21799
+ },
21800
+ onKeyUp: function onKeyUp(e) {
21801
+ _this7.$emit('keyUp', e, _this7.triggerQuery);
21802
+
21803
+ _this7.$emit('key-up', e, _this7.triggerQuery);
21804
+ },
21805
+ onClick: function onClick() {
21806
+ setHighlightedIndex(null);
21807
+ }
21808
+ })),
21809
+ "domProps": _extends({}, getInputProps({
21810
+ value: _this7.$data.currentValue === null ? '' : _this7.$data.currentValue
21811
+ }))
21812
+ }), _this7.renderIcons(), !expandSuggestionsContainer && renderSuggestionsDropdown()]), _this7.renderInputAddonAfter(), _this7.renderEnterButtonElement()]), expandSuggestionsContainer && renderSuggestionsDropdown()]);
21813
+ }
21814
+ }
21815
+ }) : h("div", {
21816
+ "class": suggestionsContainer
21817
+ }, [h(InputGroup, [this.renderInputAddonBefore(), h(InputWrapper, [h(Input, {
21818
+ "class": getClassName$4(this.$props.innerClass, 'input') || '',
21819
+ "attrs": {
21820
+ "placeholder": this.$props.placeholder,
21821
+ "iconPosition": this.$props.iconPosition,
21822
+ "showIcon": this.$props.showIcon,
21823
+ "showClear": this.$props.showClear,
21824
+ "themePreset": this.themePreset
21825
+ },
21826
+ "on": _extends({}, {
21827
+ blur: function blur(e) {
21828
+ _this7.$emit('blur', e, _this7.triggerQuery);
21829
+ },
21830
+ keypress: function keypress(e) {
21831
+ _this7.$emit('keyPress', e, _this7.triggerQuery);
21832
+
21833
+ _this7.$emit('key-press', e, _this7.triggerQuery);
21834
+ },
21835
+ input: this.onInputChange,
21836
+ focus: function focus(e) {
21837
+ _this7.$emit('focus', e, _this7.triggerQuery);
21838
+ },
21839
+ keydown: function keydown(e) {
21840
+ _this7.$emit('keyDown', e, _this7.triggerQuery);
21841
+
21842
+ _this7.$emit('key-down', e, _this7.triggerQuery);
21843
+ },
21844
+ keyup: function keyup(e) {
21845
+ _this7.$emit('keyUp', e, _this7.triggerQuery);
21846
+
21847
+ _this7.$emit('key-up', e, _this7.triggerQuery);
21848
+ }
21849
+ }),
21850
+ "domProps": _extends({}, {
21851
+ autofocus: this.$props.autoFocus,
21852
+ value: this.$data.currentValue ? this.$data.currentValue : ''
21853
+ }),
21854
+ "ref": this.$props.innerRef
21855
+ }), this.renderIcons()]), this.renderInputAddonAfter(), this.renderEnterButtonElement()])])]);
21856
+ },
21857
+ destroyed: function destroyed() {
21858
+ document.removeEventListener('keydown', this.onKeyDown);
21859
+ }
21860
+ };
21861
+
21862
+ SearchBox.defaultQuery = function (value, props) {
21863
+ var finalQuery = null;
21864
+ var fields = normalizeDataField$1(props.dataField, props.fieldWeights);
21865
+ finalQuery = {
21866
+ bool: {
21867
+ should: SearchBox.shouldQuery(value, fields, props),
21868
+ minimum_should_match: '1'
21869
+ }
21870
+ };
21871
+
21872
+ if (finalQuery && props.nestedField) {
21873
+ return {
21874
+ query: {
21875
+ nested: {
21876
+ path: props.nestedField,
21877
+ query: finalQuery
21878
+ }
21879
+ }
21880
+ };
21881
+ }
21882
+
21883
+ return finalQuery;
21884
+ };
21885
+
21886
+ SearchBox.shouldQuery = function (value, dataFields, props) {
21887
+ var finalQuery = [];
21888
+ var phrasePrefixFields = [];
21889
+ var fields = dataFields.map(function (dataField) {
21890
+ var queryField = "" + dataField.field + (dataField.weight ? "^" + dataField.weight : '');
21891
+
21892
+ if (!(dataField.field.endsWith('.keyword') || dataField.field.endsWith('.autosuggest') || dataField.field.endsWith('.search'))) {
21893
+ phrasePrefixFields.push(queryField);
21894
+ }
21895
+
21896
+ return queryField;
21897
+ });
21898
+
21899
+ if (props.searchOperators || props.queryString) {
21900
+ return {
21901
+ query: value,
21902
+ fields: fields,
21903
+ default_operator: props.queryFormat
21904
+ };
21905
+ }
21906
+
21907
+ if (props.queryFormat === 'and') {
21908
+ finalQuery.push({
21909
+ multi_match: {
21910
+ query: value,
21911
+ fields: fields,
21912
+ type: 'cross_fields',
21913
+ operator: 'and'
21914
+ }
21915
+ });
21916
+ finalQuery.push({
21917
+ multi_match: {
21918
+ query: value,
21919
+ fields: fields,
21920
+ type: 'phrase',
21921
+ operator: 'and'
21922
+ }
21923
+ });
21924
+
21925
+ if (phrasePrefixFields.length > 0) {
21926
+ finalQuery.push({
21927
+ multi_match: {
21928
+ query: value,
21929
+ fields: phrasePrefixFields,
21930
+ type: 'phrase_prefix',
21931
+ operator: 'and'
21932
+ }
21933
+ });
21934
+ }
21935
+
21936
+ return finalQuery;
21937
+ }
21938
+
21939
+ finalQuery.push({
21940
+ multi_match: {
21941
+ query: value,
21942
+ fields: fields,
21943
+ type: 'best_fields',
21944
+ operator: 'or',
21945
+ fuzziness: props.fuzziness ? props.fuzziness : 0
21946
+ }
21947
+ });
21948
+ finalQuery.push({
21949
+ multi_match: {
21950
+ query: value,
21951
+ fields: fields,
21952
+ type: 'phrase',
21953
+ operator: 'or'
21954
+ }
21955
+ });
21956
+
21957
+ if (phrasePrefixFields.length > 0) {
21958
+ finalQuery.push({
21959
+ multi_match: {
21960
+ query: value,
21961
+ fields: phrasePrefixFields,
21962
+ type: 'phrase_prefix',
21963
+ operator: 'or'
21964
+ }
21965
+ });
21966
+ }
21967
+
21968
+ return finalQuery;
21969
+ };
21970
+
21971
+ var mapStateToProps$4 = function mapStateToProps(state, props) {
21972
+ return {
21973
+ selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || null,
21974
+ selectedCategory: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].category || null,
21975
+ suggestions: state.hits[props.componentId] && state.hits[props.componentId].hits,
21976
+ rawData: state.rawData[props.componentId],
21977
+ aggregationData: state.compositeAggregations[props.componentId] || [],
21978
+ themePreset: state.config.themePreset,
21979
+ isLoading: !!state.isLoading[props.componentId + "_active"],
21980
+ error: state.error[props.componentId],
21981
+ enableAppbase: state.config.enableAppbase,
21982
+ time: state.hits[props.componentId] && state.hits[props.componentId].time || 0,
21983
+ total: state.hits[props.componentId] && state.hits[props.componentId].total,
21984
+ hidden: state.hits[props.componentId] && state.hits[props.componentId].hidden
21985
+ };
21986
+ };
21987
+
21988
+ var mapDispatchToProps$3 = {
21989
+ updateQuery: updateQuery$2,
21990
+ setCustomQuery: setCustomQuery$1,
21991
+ setDefaultQuery: setDefaultQuery$2,
21992
+ recordSuggestionClick: recordSuggestionClick$1
21993
+ };
21994
+ var DSConnected$1 = ComponentWrapper$1(connect(mapStateToProps$4, mapDispatchToProps$3)(SearchBox), {
21995
+ componentType: constants_1$1.searchBox,
21996
+ internalComponent: true
21997
+ });
21998
+
21999
+ SearchBox.install = function (Vue) {
22000
+ Vue.component(SearchBox.name, DSConnected$1);
22001
+ }; // Add componentType for SSR
22002
+
22003
+
22004
+ SearchBox.componentType = constants_1$1.searchBox;
22005
+
22006
+ var _templateObject$k, _templateObject2$7, _templateObject3$6, _templateObject4$5, _templateObject5$3, _templateObject6$3;
22007
+ var item = {
22008
+ width: '15px',
22009
+ height: '15px',
22010
+ scale: '4px'
22011
+ };
22012
+ 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"])));
22013
+ 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"])));
22014
+
22015
+ var formItem = function formItem(_ref) {
22016
+ var theme = _ref.theme;
22017
+ 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);
22018
+ };
22019
+
22020
+ 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) {
22021
+ return props.show ? null : hideInputControl;
22022
+ }, function (_ref2) {
22023
+ var theme = _ref2.theme;
22024
+ return theme.colors.primaryColor;
22025
+ }, function (_ref3) {
22026
+ var theme = _ref3.theme;
22027
+ return theme.colors.primaryColor;
22028
+ });
22029
+ 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) {
22030
+ return props.show ? null : hideInputControl;
22031
+ }, item.width, item.width, item.width, item.height, function (_ref4) {
22032
+ var theme = _ref4.theme;
22033
+ return theme.colors.primaryColor;
22034
+ }, function (_ref5) {
22035
+ var theme = _ref5.theme;
22036
+ return theme.colors.primaryColor;
22037
+ });
22038
+ 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"])));
22039
+
22040
+ var getAggsOrder = lib_8.getAggsOrder;
22041
+
22042
+ var extractQuery = function extractQuery(props) {
22043
+ var queryToBeReturned = {};
22044
+
22045
+ if (props.defaultQuery) {
22046
+ var evaluateQuery = props.defaultQuery([], props);
22047
+
22048
+ if (evaluateQuery) {
22049
+ if (evaluateQuery.query) {
22050
+ queryToBeReturned.query = evaluateQuery.query;
22051
+ }
22052
+
22053
+ if (evaluateQuery.aggs) {
22054
+ queryToBeReturned.aggs = evaluateQuery.aggs;
22055
+ }
22056
+ }
22057
+ }
22058
+
22059
+ return queryToBeReturned;
22060
+ }; // eslint-disable-next-line import/prefer-default-export
22061
+
22062
+
22063
+ var getAggsQuery = function getAggsQuery(query, props) {
22064
+ var _clonedQuery$aggs;
22065
+
22066
+ var clonedQuery = query;
22067
+ var dataField = props.dataField,
22068
+ size = props.size,
22069
+ sortBy = props.sortBy,
22070
+ showMissing = props.showMissing,
22071
+ missingLabel = props.missingLabel;
22072
+ clonedQuery.size = 0;
22073
+ clonedQuery.aggs = (_clonedQuery$aggs = {}, _clonedQuery$aggs[dataField] = {
22074
+ terms: _extends({
22075
+ field: dataField,
22076
+ size: size,
22077
+ order: getAggsOrder(sortBy || 'count')
22078
+ }, showMissing ? {
22079
+ missing: missingLabel
22080
+ } : {})
22081
+ }, _clonedQuery$aggs);
22082
+
22083
+ if (props.nestedField) {
22084
+ clonedQuery.aggs = {
22085
+ reactivesearch_nested: {
22086
+ nested: {
22087
+ path: props.nestedField
22088
+ },
22089
+ aggs: clonedQuery.aggs
22090
+ }
22091
+ };
22092
+ }
22093
+
22094
+ return _extends({}, clonedQuery, extractQuery(props));
22095
+ };
22096
+
22097
+ var updateQuery$3 = lib_5.updateQuery,
22098
+ setQueryOptions$2 = lib_5.setQueryOptions,
22099
+ setCustomQuery$2 = lib_5.setCustomQuery,
22100
+ setDefaultQuery$3 = lib_5.setDefaultQuery;
22101
+ var getQueryOptions$1 = lib_8.getQueryOptions,
22102
+ checkValueChange$2 = lib_8.checkValueChange,
22103
+ getClassName$5 = lib_8.getClassName,
22104
+ isEqual$6 = lib_8.isEqual,
22105
+ extractQueryFromCustomQuery$2 = lib_8.extractQueryFromCustomQuery,
22106
+ getOptionsForCustomQuery$2 = lib_8.getOptionsForCustomQuery;
22107
+ var SingleList = {
22108
+ name: 'SingleList',
22109
+ props: {
22110
+ beforeValueChange: types.func,
22111
+ className: VueTypes.string.def(''),
22112
+ componentId: types.stringRequired,
22113
+ customQuery: types.func,
22114
+ dataField: types.stringRequired,
22115
+ defaultValue: types.string,
22116
+ value: types.value,
22117
+ defaultQuery: types.func,
22118
+ filterLabel: types.string,
22119
+ innerClass: types.style,
22120
+ placeholder: VueTypes.string.def('Search'),
22121
+ react: types.react,
22122
+ render: types.func,
22123
+ renderItem: types.func,
22124
+ renderNoResults: VueTypes.any,
22125
+ transformData: types.func,
22126
+ selectAllLabel: types.string,
22127
+ showCount: VueTypes.bool.def(true),
22128
+ showFilter: VueTypes.bool.def(true),
22129
+ showRadio: VueTypes.bool.def(true),
22130
+ showSearch: VueTypes.bool.def(true),
22131
+ size: VueTypes.number,
22132
+ sortBy: VueTypes.oneOf(['asc', 'desc', 'count']).def('count'),
22133
+ title: types.title,
22134
+ URLParams: VueTypes.bool.def(false),
22135
+ showMissing: VueTypes.bool.def(false),
22136
+ missingLabel: VueTypes.string.def('N/A'),
22137
+ nestedField: types.string,
22138
+ index: VueTypes.string,
22139
+ enableStrictSelection: VueTypes.bool.def(false)
22140
+ },
22141
+ data: function data() {
22142
+ var props = this.$props;
22143
+ this.__state = {
22144
+ currentValue: '',
22145
+ modifiedOptions: [],
22146
+ searchTerm: ''
22147
+ };
22148
+ this.internalComponent = props.componentId + "__internal";
22149
+ return this.__state;
22150
+ },
22151
+ created: function created() {
22152
+ if (!this.enableAppbase && this.$props.index) {
22153
+ console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
22154
+ }
22155
+
22156
+ var props = this.$props;
22157
+ this.modifiedOptions = this.options && this.options[props.dataField] ? this.options[props.dataField].buckets : []; // Set custom and default queries in store
22158
+
22159
+ updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
22160
+ updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, this.currentValue);
20795
22161
  },
20796
22162
  beforeMount: function beforeMount() {
20797
22163
  this.updateQueryHandlerOptions(this.$props);
@@ -20824,7 +22190,7 @@
20824
22190
  this.setValue(newVal);
20825
22191
  },
20826
22192
  value: function value(newVal, oldVal) {
20827
- if (!isEqual$5(newVal, oldVal)) {
22193
+ if (!isEqual$6(newVal, oldVal)) {
20828
22194
  this.setValue(newVal);
20829
22195
  }
20830
22196
  },
@@ -20887,14 +22253,14 @@
20887
22253
  return h(Container, {
20888
22254
  "class": this.$props.className
20889
22255
  }, [this.$props.title && h(Title, {
20890
- "class": getClassName$4(this.$props.innerClass, 'title') || ''
22256
+ "class": getClassName$5(this.$props.innerClass, 'title') || ''
20891
22257
  }, [this.$props.title]), this.renderSearch(), this.hasCustomRenderer ? this.getComponent() : h(UL, {
20892
- "class": getClassName$4(this.$props.innerClass, 'list') || ''
22258
+ "class": getClassName$5(this.$props.innerClass, 'list') || ''
20893
22259
  }, [selectAllLabel ? h("li", {
20894
22260
  "key": selectAllLabel,
20895
22261
  "class": "" + (this.$data.currentValue === selectAllLabel ? 'active' : '')
20896
22262
  }, [h(Radio, {
20897
- "class": getClassName$4(this.$props.innerClass, 'radio'),
22263
+ "class": getClassName$5(this.$props.innerClass, 'radio'),
20898
22264
  "attrs": {
20899
22265
  "id": this.$props.componentId + "-" + selectAllLabel,
20900
22266
  "name": this.$props.componentId,
@@ -20909,7 +22275,7 @@
20909
22275
  checked: this.$data.currentValue === selectAllLabel
20910
22276
  })
20911
22277
  }), h("label", {
20912
- "class": getClassName$4(this.$props.innerClass, 'label') || null,
22278
+ "class": getClassName$5(this.$props.innerClass, 'label') || null,
20913
22279
  "attrs": {
20914
22280
  "for": this.$props.componentId + "-" + selectAllLabel
20915
22281
  }
@@ -20918,7 +22284,7 @@
20918
22284
  "key": item.key,
20919
22285
  "class": "" + (_this.currentValue === String(item.key) ? 'active' : '')
20920
22286
  }, [h(Radio, {
20921
- "class": getClassName$4(_this.$props.innerClass, 'radio'),
22287
+ "class": getClassName$5(_this.$props.innerClass, 'radio'),
20922
22288
  "attrs": {
20923
22289
  "id": _this.$props.componentId + "-" + item.key,
20924
22290
  "name": _this.$props.componentId,
@@ -20934,7 +22300,7 @@
20934
22300
  checked: _this.currentValue === String(item.key)
20935
22301
  })
20936
22302
  }), h("label", {
20937
- "class": getClassName$4(_this.$props.innerClass, 'label') || null,
22303
+ "class": getClassName$5(_this.$props.innerClass, 'label') || null,
20938
22304
  "attrs": {
20939
22305
  "for": _this.$props.componentId + "-" + item.key
20940
22306
  }
@@ -20943,7 +22309,7 @@
20943
22309
  count: item.doc_count,
20944
22310
  isChecked: _this.currentValue === String(item.key)
20945
22311
  }) : h("span", [item.key, _this.$props.showCount && h("span", {
20946
- "class": getClassName$4(_this.$props.innerClass, 'count') || null
22312
+ "class": getClassName$5(_this.$props.innerClass, 'count') || null
20947
22313
  }, ["\xA0(", item.doc_count, ")"])])])]);
20948
22314
  })])]);
20949
22315
  },
@@ -20971,7 +22337,7 @@
20971
22337
  _this2.$emit('value-change', value);
20972
22338
  };
20973
22339
 
20974
- checkValueChange$1(props.componentId, value, props.beforeValueChange, performUpdate);
22340
+ checkValueChange$2(props.componentId, value, props.beforeValueChange, performUpdate);
20975
22341
  },
20976
22342
  updateDefaultQueryHandler: function updateDefaultQueryHandler(value, props) {
20977
22343
  var query = SingleList.defaultQuery(value, props);
@@ -21043,7 +22409,7 @@
21043
22409
 
21044
22410
  if (this.$props.showSearch) {
21045
22411
  return h(Input, {
21046
- "class": getClassName$4(this.$props.innerClass, 'input') || '',
22412
+ "class": getClassName$5(this.$props.innerClass, 'input') || '',
21047
22413
  "on": {
21048
22414
  "input": this.handleInputChange
21049
22415
  },
@@ -21106,7 +22472,7 @@
21106
22472
  var h = this.$createElement;
21107
22473
  var renderNoResults = this.$scopedSlots.renderNoResults || this.$props.renderNoResults;
21108
22474
  return h("p", {
21109
- "class": getClassName$4(this.$props.innerClass, 'noResults') || null
22475
+ "class": getClassName$5(this.$props.innerClass, 'noResults') || null
21110
22476
  }, [isFunction$1(renderNoResults) ? renderNoResults() : renderNoResults]);
21111
22477
  }
21112
22478
  },
@@ -21177,7 +22543,7 @@
21177
22543
  return true;
21178
22544
  };
21179
22545
 
21180
- var mapStateToProps$4 = function mapStateToProps(state, props) {
22546
+ var mapStateToProps$5 = function mapStateToProps(state, props) {
21181
22547
  return {
21182
22548
  options: props.nestedField && state.aggregations[props.componentId] ? state.aggregations[props.componentId].reactivesearch_nested : state.aggregations[props.componentId],
21183
22549
  rawData: state.rawData[props.componentId],
@@ -21192,11 +22558,11 @@
21192
22558
 
21193
22559
  var mapDispatchtoProps$2 = {
21194
22560
  setQueryOptions: setQueryOptions$2,
21195
- updateQuery: updateQuery$2,
21196
- setCustomQuery: setCustomQuery$1,
21197
- setDefaultQuery: setDefaultQuery$2
22561
+ updateQuery: updateQuery$3,
22562
+ setCustomQuery: setCustomQuery$2,
22563
+ setDefaultQuery: setDefaultQuery$3
21198
22564
  };
21199
- var ListConnected = ComponentWrapper$1(connect(mapStateToProps$4, mapDispatchtoProps$2)(SingleList), {
22565
+ var ListConnected = ComponentWrapper$1(connect(mapStateToProps$5, mapDispatchtoProps$2)(SingleList), {
21200
22566
  componentType: constants_1$1.singleList,
21201
22567
  internalComponent: SingleList.hasInternalComponent()
21202
22568
  });
@@ -21208,14 +22574,14 @@
21208
22574
 
21209
22575
  SingleList.componentType = constants_1$1.singleList;
21210
22576
 
21211
- var updateQuery$3 = lib_5.updateQuery,
22577
+ var updateQuery$4 = lib_5.updateQuery,
21212
22578
  setQueryOptions$3 = lib_5.setQueryOptions,
21213
- setCustomQuery$2 = lib_5.setCustomQuery,
21214
- setDefaultQuery$3 = lib_5.setDefaultQuery;
21215
- var isEqual$6 = lib_8.isEqual,
22579
+ setCustomQuery$3 = lib_5.setCustomQuery,
22580
+ setDefaultQuery$4 = lib_5.setDefaultQuery;
22581
+ var isEqual$7 = lib_8.isEqual,
21216
22582
  getQueryOptions$2 = lib_8.getQueryOptions,
21217
- checkValueChange$2 = lib_8.checkValueChange,
21218
- getClassName$5 = lib_8.getClassName,
22583
+ checkValueChange$3 = lib_8.checkValueChange,
22584
+ getClassName$6 = lib_8.getClassName,
21219
22585
  extractQueryFromCustomQuery$3 = lib_8.extractQueryFromCustomQuery,
21220
22586
  getOptionsForCustomQuery$3 = lib_8.getOptionsForCustomQuery;
21221
22587
  var MultiList = {
@@ -21282,7 +22648,7 @@
21282
22648
  mounted: function mounted() {
21283
22649
  var currentValue = Object.keys(this.$data.currentValue);
21284
22650
 
21285
- if (this.$props.value !== undefined && !isEqual$6(this.$props.value, currentValue)) {
22651
+ if (this.$props.value !== undefined && !isEqual$7(this.$props.value, currentValue)) {
21286
22652
  this.$emit('change', currentValue);
21287
22653
  }
21288
22654
  },
@@ -21303,12 +22669,12 @@
21303
22669
  this.updateQueryHandler(this.$data.currentValue, this.$props);
21304
22670
  },
21305
22671
  value: function value(newVal, oldVal) {
21306
- if (!isEqual$6(oldVal, newVal)) {
22672
+ if (!isEqual$7(oldVal, newVal)) {
21307
22673
  this.setValue(newVal, true);
21308
22674
  }
21309
22675
  },
21310
22676
  defaultValue: function defaultValue(newVal, oldVal) {
21311
- if (!isEqual$6(oldVal, newVal)) {
22677
+ if (!isEqual$7(oldVal, newVal)) {
21312
22678
  this.setValue(newVal, true);
21313
22679
  }
21314
22680
  },
@@ -21327,7 +22693,7 @@
21327
22693
  }
21328
22694
  }
21329
22695
 
21330
- if (!isEqual$6(selectedValue, newVal)) {
22696
+ if (!isEqual$7(selectedValue, newVal)) {
21331
22697
  if (this.value === undefined) {
21332
22698
  this.setValue(newVal, true);
21333
22699
  } else {
@@ -21389,9 +22755,9 @@
21389
22755
  return h(Container, {
21390
22756
  "class": this.$props.className
21391
22757
  }, [this.$props.title && h(Title, {
21392
- "class": getClassName$5(this.$props.innerClass, 'title')
22758
+ "class": getClassName$6(this.$props.innerClass, 'title')
21393
22759
  }, [this.$props.title]), this.renderSearch(), this.hasCustomRenderer ? this.getComponent() : h(UL, {
21394
- "class": getClassName$5(this.$props.innerClass, 'list')
22760
+ "class": getClassName$6(this.$props.innerClass, 'list')
21395
22761
  }, [selectAllLabel ? h("li", {
21396
22762
  "key": selectAllLabel,
21397
22763
  "class": "" + (this.currentValue[selectAllLabel] ? 'active' : '')
@@ -21403,7 +22769,7 @@
21403
22769
  "value": selectAllLabel,
21404
22770
  "show": this.$props.showCheckbox
21405
22771
  },
21406
- "class": getClassName$5(this.$props.innerClass, 'checkbox'),
22772
+ "class": getClassName$6(this.$props.innerClass, 'checkbox'),
21407
22773
  "on": {
21408
22774
  "click": this.handleClick
21409
22775
  },
@@ -21411,7 +22777,7 @@
21411
22777
  checked: !!this.currentValue[selectAllLabel]
21412
22778
  })
21413
22779
  }), h("label", {
21414
- "class": getClassName$5(this.$props.innerClass, 'label'),
22780
+ "class": getClassName$6(this.$props.innerClass, 'label'),
21415
22781
  "attrs": {
21416
22782
  "for": this.$props.componentId + "-" + selectAllLabel
21417
22783
  }
@@ -21427,7 +22793,7 @@
21427
22793
  "value": item.key,
21428
22794
  "show": _this2.$props.showCheckbox
21429
22795
  },
21430
- "class": getClassName$5(_this2.$props.innerClass, 'checkbox'),
22796
+ "class": getClassName$6(_this2.$props.innerClass, 'checkbox'),
21431
22797
  "on": {
21432
22798
  "click": _this2.handleClick
21433
22799
  },
@@ -21435,7 +22801,7 @@
21435
22801
  checked: !!_this2.$data.currentValue[item.key]
21436
22802
  })
21437
22803
  }), h("label", {
21438
- "class": getClassName$5(_this2.$props.innerClass, 'label'),
22804
+ "class": getClassName$6(_this2.$props.innerClass, 'label'),
21439
22805
  "attrs": {
21440
22806
  "for": _this2.$props.componentId + "-" + item.key
21441
22807
  }
@@ -21444,7 +22810,7 @@
21444
22810
  count: item.doc_count,
21445
22811
  isChecked: !!_this2.$data.currentValue[item.key]
21446
22812
  }) : h("span", [item.key, _this2.$props.showCount && h("span", {
21447
- "class": getClassName$5(_this2.$props.innerClass, 'count')
22813
+ "class": getClassName$6(_this2.$props.innerClass, 'count')
21448
22814
  }, ["\xA0(", item.doc_count, ")"])])])]);
21449
22815
  })])]);
21450
22816
  },
@@ -21528,7 +22894,7 @@
21528
22894
  _this3.$emit('value-change', finalValues);
21529
22895
  };
21530
22896
 
21531
- checkValueChange$2(props.componentId, finalValues, props.beforeValueChange, performUpdate);
22897
+ checkValueChange$3(props.componentId, finalValues, props.beforeValueChange, performUpdate);
21532
22898
  },
21533
22899
  updateDefaultQueryHandler: function updateDefaultQueryHandler(value, props) {
21534
22900
  var query = MultiList.defaultQuery(value, props);
@@ -21600,7 +22966,7 @@
21600
22966
 
21601
22967
  if (this.$props.showSearch) {
21602
22968
  return h(Input, {
21603
- "class": getClassName$5(this.$props.innerClass, 'input') || '',
22969
+ "class": getClassName$6(this.$props.innerClass, 'input') || '',
21604
22970
  "on": {
21605
22971
  "input": this.handleInputChange
21606
22972
  },
@@ -21658,7 +23024,7 @@
21658
23024
  var h = this.$createElement;
21659
23025
  var renderNoResults = this.$scopedSlots.renderNoResults || this.$props.renderNoResults;
21660
23026
  return h("p", {
21661
- "class": getClassName$5(this.$props.innerClass, 'noResults') || null
23027
+ "class": getClassName$6(this.$props.innerClass, 'noResults') || null
21662
23028
  }, [isFunction$1(renderNoResults) ? renderNoResults() : renderNoResults]);
21663
23029
  }
21664
23030
  },
@@ -21765,7 +23131,7 @@
21765
23131
  return getAggsQuery(queryOptions, props);
21766
23132
  };
21767
23133
 
21768
- var mapStateToProps$5 = function mapStateToProps(state, props) {
23134
+ var mapStateToProps$6 = function mapStateToProps(state, props) {
21769
23135
  return {
21770
23136
  options: props.nestedField && state.aggregations[props.componentId] ? state.aggregations[props.componentId].reactivesearch_nested : state.aggregations[props.componentId],
21771
23137
  rawData: state.rawData[props.componentId],
@@ -21780,16 +23146,16 @@
21780
23146
 
21781
23147
  var mapDispatchtoProps$3 = {
21782
23148
  setQueryOptions: setQueryOptions$3,
21783
- updateQuery: updateQuery$3,
21784
- setCustomQuery: setCustomQuery$2,
21785
- setDefaultQuery: setDefaultQuery$3
23149
+ updateQuery: updateQuery$4,
23150
+ setCustomQuery: setCustomQuery$3,
23151
+ setDefaultQuery: setDefaultQuery$4
21786
23152
  };
21787
23153
 
21788
23154
  MultiList.hasInternalComponent = function () {
21789
23155
  return true;
21790
23156
  };
21791
23157
 
21792
- var ListConnected$1 = ComponentWrapper$1(connect(mapStateToProps$5, mapDispatchtoProps$3)(MultiList), {
23158
+ var ListConnected$1 = ComponentWrapper$1(connect(mapStateToProps$6, mapDispatchtoProps$3)(MultiList), {
21793
23159
  componentType: constants_1$1.multiList,
21794
23160
  internalComponent: MultiList.hasInternalComponent()
21795
23161
  });
@@ -21801,8 +23167,8 @@
21801
23167
 
21802
23168
  MultiList.componentType = constants_1$1.multiList;
21803
23169
 
21804
- var _templateObject$k, _templateObject2$8, _templateObject3$7, _templateObject4$6;
21805
- 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"])));
23170
+ var _templateObject$l, _templateObject2$8, _templateObject3$7, _templateObject4$6;
23171
+ 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"])));
21806
23172
 
21807
23173
  var dark$2 = function dark(_ref) {
21808
23174
  var theme = _ref.theme;
@@ -21820,13 +23186,13 @@
21820
23186
  return theme.colors.primaryColor;
21821
23187
  });
21822
23188
 
21823
- var _templateObject$l, _templateObject2$9;
21824
- var open = css(_templateObject$l || (_templateObject$l = _taggedTemplateLiteralLoose(["\n\ttop: 0.55em;\n\ttransform: rotate(-45deg);\n"])));
23189
+ var _templateObject$m, _templateObject2$9;
23190
+ var open = css(_templateObject$m || (_templateObject$m = _taggedTemplateLiteralLoose(["\n\ttop: 0.55em;\n\ttransform: rotate(-45deg);\n"])));
21825
23191
  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) {
21826
23192
  return props.open ? open : null;
21827
23193
  });
21828
23194
 
21829
- var getClassName$6 = lib_8.getClassName;
23195
+ var getClassName$7 = lib_8.getClassName;
21830
23196
  var Dropdown = {
21831
23197
  data: function data() {
21832
23198
  this.__state = {
@@ -21920,7 +23286,7 @@
21920
23286
  "on": _extends({}, _extends({}, getButtonProps({
21921
23287
  onClick: _this.toggle
21922
23288
  }))),
21923
- "class": getClassName$6(_this.$props.innerClass, 'select') || '',
23289
+ "class": getClassName$7(_this.$props.innerClass, 'select') || '',
21924
23290
  "attrs": {
21925
23291
  "title": selectedItem ? _this.renderToString(selectedItem) : placeholder,
21926
23292
  "small": _this.$props.small,
@@ -21937,7 +23303,7 @@
21937
23303
  getButtonProps: getButtonProps,
21938
23304
  getItemEvents: getItemEvents
21939
23305
  }) : isOpen && itemsToRender.length ? h("ul", {
21940
- "class": suggestions$1(themePreset, _this.theme) + " " + (_this.$props.small ? 'small' : '') + " " + getClassName$6(_this.$props.innerClass, 'list')
23306
+ "class": suggestions$1(themePreset, _this.theme) + " " + (_this.$props.small ? 'small' : '') + " " + getClassName$7(_this.$props.innerClass, 'list')
21941
23307
  }, [_this.$props.showSearch ? _this.renderSearchbox({
21942
23308
  on: {
21943
23309
  input: getInputEvents({
@@ -21972,9 +23338,9 @@
21972
23338
  "innerHTML": item[labelField]
21973
23339
  }
21974
23340
  }) : item[labelField], _this.$props.showCount && item.doc_count && h("span", {
21975
- "class": getClassName$6(_this.$props.innerClass, 'count') || ''
23341
+ "class": getClassName$7(_this.$props.innerClass, 'count') || ''
21976
23342
  }, ["\xA0(", item.doc_count, ")"])]), selected && _this.$props.multi ? h(Tick, {
21977
- "class": getClassName$6(_this.$props.innerClass, 'icon') || ''
23343
+ "class": getClassName$7(_this.$props.innerClass, 'icon') || ''
21978
23344
  }) : null]);
21979
23345
  }), footer]) : null]);
21980
23346
  }
@@ -22062,7 +23428,7 @@
22062
23428
  var h = this.$createElement;
22063
23429
  var renderNoResults = this.$scopedSlots.renderNoResults || this.$props.renderNoResults;
22064
23430
  return h("p", {
22065
- "class": getClassName$6(this.$props.innerClass, 'noResults') || null
23431
+ "class": getClassName$7(this.$props.innerClass, 'noResults') || null
22066
23432
  }, [isFunction$1(renderNoResults) ? renderNoResults() : renderNoResults]);
22067
23433
  },
22068
23434
  renderSearchbox: function renderSearchbox(eventObject) {
@@ -22086,7 +23452,7 @@
22086
23452
  border: 0,
22087
23453
  borderBottom: '1px solid #ddd'
22088
23454
  },
22089
- "class": getClassName$6(innerClass, 'input')
23455
+ "class": getClassName$7(innerClass, 'input')
22090
23456
  }, eventObject]));
22091
23457
 
22092
23458
  if (showClear) {
@@ -22110,16 +23476,16 @@
22110
23476
  }
22111
23477
  };
22112
23478
 
22113
- var updateQuery$4 = lib_5.updateQuery,
23479
+ var updateQuery$5 = lib_5.updateQuery,
22114
23480
  setQueryOptions$4 = lib_5.setQueryOptions,
22115
- setCustomQuery$3 = lib_5.setCustomQuery,
22116
- setDefaultQuery$4 = lib_5.setDefaultQuery;
23481
+ setCustomQuery$4 = lib_5.setCustomQuery,
23482
+ setDefaultQuery$5 = lib_5.setDefaultQuery;
22117
23483
  var getQueryOptions$3 = lib_8.getQueryOptions,
22118
- checkValueChange$3 = lib_8.checkValueChange,
23484
+ checkValueChange$4 = lib_8.checkValueChange,
22119
23485
  checkPropChange$1 = lib_8.checkPropChange,
22120
- getClassName$7 = lib_8.getClassName,
22121
- isEqual$7 = lib_8.isEqual,
22122
- getCompositeAggsQuery$2 = lib_8.getCompositeAggsQuery,
23486
+ getClassName$8 = lib_8.getClassName,
23487
+ isEqual$8 = lib_8.isEqual,
23488
+ getCompositeAggsQuery$3 = lib_8.getCompositeAggsQuery,
22123
23489
  extractQueryFromCustomQuery$4 = lib_8.extractQueryFromCustomQuery,
22124
23490
  getOptionsForCustomQuery$4 = lib_8.getOptionsForCustomQuery;
22125
23491
  var SingleDropdownList = {
@@ -22242,7 +23608,7 @@
22242
23608
  this.setValue(newVal);
22243
23609
  },
22244
23610
  value: function value(newVal, oldVal) {
22245
- if (!isEqual$7(newVal, oldVal)) {
23611
+ if (!isEqual$8(newVal, oldVal)) {
22246
23612
  this.setValue(newVal);
22247
23613
  }
22248
23614
  },
@@ -22302,7 +23668,7 @@
22302
23668
  return h(Container, {
22303
23669
  "class": this.$props.className
22304
23670
  }, [this.$props.title && h(Title, {
22305
- "class": getClassName$7(this.$props.innerClass, 'title') || ''
23671
+ "class": getClassName$8(this.$props.innerClass, 'title') || ''
22306
23672
  }, [this.$props.title]), h(Dropdown, {
22307
23673
  "attrs": {
22308
23674
  "innerClass": this.$props.innerClass,
@@ -22358,7 +23724,7 @@
22358
23724
  _this2.$emit('value-change', value);
22359
23725
  };
22360
23726
 
22361
- checkValueChange$3(props.componentId, value, props.beforeValueChange, performUpdate);
23727
+ checkValueChange$4(props.componentId, value, props.beforeValueChange, performUpdate);
22362
23728
  },
22363
23729
  handleChange: function handleChange(item) {
22364
23730
  var value = this.$props.value;
@@ -22417,7 +23783,7 @@
22417
23783
  },
22418
23784
  generateQueryOptions: function generateQueryOptions(props, after) {
22419
23785
  var queryOptions = getQueryOptions$3(props);
22420
- return props.showLoadMore ? getCompositeAggsQuery$2({
23786
+ return props.showLoadMore ? getCompositeAggsQuery$3({
22421
23787
  query: queryOptions,
22422
23788
  props: props,
22423
23789
  after: after
@@ -22523,7 +23889,7 @@
22523
23889
 
22524
23890
  SingleDropdownList.generateQueryOptions = function (props, after) {
22525
23891
  var queryOptions = getQueryOptions$3(props);
22526
- return props.showLoadMore ? getCompositeAggsQuery$2({
23892
+ return props.showLoadMore ? getCompositeAggsQuery$3({
22527
23893
  query: queryOptions,
22528
23894
  props: props,
22529
23895
  after: after
@@ -22534,7 +23900,7 @@
22534
23900
  return true;
22535
23901
  };
22536
23902
 
22537
- var mapStateToProps$6 = function mapStateToProps(state, props) {
23903
+ var mapStateToProps$7 = function mapStateToProps(state, props) {
22538
23904
  return {
22539
23905
  options: props.nestedField && state.aggregations[props.componentId] ? state.aggregations[props.componentId].reactivesearch_nested : state.aggregations[props.componentId],
22540
23906
  rawData: state.rawData[props.componentId],
@@ -22549,11 +23915,11 @@
22549
23915
 
22550
23916
  var mapDispatchtoProps$4 = {
22551
23917
  setQueryOptions: setQueryOptions$4,
22552
- updateQuery: updateQuery$4,
22553
- setCustomQuery: setCustomQuery$3,
22554
- setDefaultQuery: setDefaultQuery$4
23918
+ updateQuery: updateQuery$5,
23919
+ setCustomQuery: setCustomQuery$4,
23920
+ setDefaultQuery: setDefaultQuery$5
22555
23921
  };
22556
- var ListConnected$2 = ComponentWrapper$1(connect(mapStateToProps$6, mapDispatchtoProps$4)(SingleDropdownList), {
23922
+ var ListConnected$2 = ComponentWrapper$1(connect(mapStateToProps$7, mapDispatchtoProps$4)(SingleDropdownList), {
22557
23923
  componentType: constants_1$1.singleDropdownList,
22558
23924
  internalComponent: SingleDropdownList.hasInternalComponent()
22559
23925
  });
@@ -22565,16 +23931,16 @@
22565
23931
 
22566
23932
  SingleDropdownList.componentType = constants_1$1.singleDropdownList;
22567
23933
 
22568
- var updateQuery$5 = lib_5.updateQuery,
23934
+ var updateQuery$6 = lib_5.updateQuery,
22569
23935
  setQueryOptions$5 = lib_5.setQueryOptions,
22570
- setCustomQuery$4 = lib_5.setCustomQuery,
22571
- setDefaultQuery$5 = lib_5.setDefaultQuery;
22572
- var isEqual$8 = lib_8.isEqual,
23936
+ setCustomQuery$5 = lib_5.setCustomQuery,
23937
+ setDefaultQuery$6 = lib_5.setDefaultQuery;
23938
+ var isEqual$9 = lib_8.isEqual,
22573
23939
  getQueryOptions$4 = lib_8.getQueryOptions,
22574
- checkValueChange$4 = lib_8.checkValueChange,
23940
+ checkValueChange$5 = lib_8.checkValueChange,
22575
23941
  checkPropChange$2 = lib_8.checkPropChange,
22576
- getClassName$8 = lib_8.getClassName,
22577
- getCompositeAggsQuery$3 = lib_8.getCompositeAggsQuery,
23942
+ getClassName$9 = lib_8.getClassName,
23943
+ getCompositeAggsQuery$4 = lib_8.getCompositeAggsQuery,
22578
23944
  extractQueryFromCustomQuery$5 = lib_8.extractQueryFromCustomQuery,
22579
23945
  getOptionsForCustomQuery$5 = lib_8.getOptionsForCustomQuery;
22580
23946
  var MultiDropdownList = {
@@ -22666,7 +24032,7 @@
22666
24032
  }
22667
24033
  }
22668
24034
 
22669
- if (!isEqual$8(selectedValue, newVal)) {
24035
+ if (!isEqual$9(selectedValue, newVal)) {
22670
24036
  this.setValue(newVal || [], true);
22671
24037
  }
22672
24038
  },
@@ -22717,7 +24083,7 @@
22717
24083
  this.setValue(newVal, true);
22718
24084
  },
22719
24085
  value: function value(newVal, oldVal) {
22720
- if (!isEqual$8(newVal, oldVal)) {
24086
+ if (!isEqual$9(newVal, oldVal)) {
22721
24087
  this.setValue(newVal, true);
22722
24088
  }
22723
24089
  },
@@ -22772,7 +24138,7 @@
22772
24138
  return h(Container, {
22773
24139
  "class": this.$props.className
22774
24140
  }, [this.$props.title && h(Title, {
22775
- "class": getClassName$8(this.$props.innerClass, 'title') || ''
24141
+ "class": getClassName$9(this.$props.innerClass, 'title') || ''
22776
24142
  }, [this.$props.title]), h(Dropdown, {
22777
24143
  "attrs": {
22778
24144
  "innerClass": this.$props.innerClass,
@@ -22897,7 +24263,7 @@
22897
24263
  _this3.$emit('value-change', finalValues);
22898
24264
  };
22899
24265
 
22900
- checkValueChange$4(props.componentId, finalValues, props.beforeValueChange, performUpdate);
24266
+ checkValueChange$5(props.componentId, finalValues, props.beforeValueChange, performUpdate);
22901
24267
  },
22902
24268
  updateDefaultQueryHandler: function updateDefaultQueryHandler(value, props) {
22903
24269
  var query = MultiDropdownList.defaultQuery(value, props);
@@ -22947,7 +24313,7 @@
22947
24313
  },
22948
24314
  generateQueryOptions: function generateQueryOptions(props, after) {
22949
24315
  var queryOptions = getQueryOptions$4(props);
22950
- return props.showLoadMore ? getCompositeAggsQuery$3({
24316
+ return props.showLoadMore ? getCompositeAggsQuery$4({
22951
24317
  query: queryOptions,
22952
24318
  props: props,
22953
24319
  after: after
@@ -23095,7 +24461,7 @@
23095
24461
 
23096
24462
  MultiDropdownList.generateQueryOptions = function (props, after) {
23097
24463
  var queryOptions = getQueryOptions$4(props);
23098
- return props.showLoadMore ? getCompositeAggsQuery$3({
24464
+ return props.showLoadMore ? getCompositeAggsQuery$4({
23099
24465
  query: queryOptions,
23100
24466
  props: props,
23101
24467
  after: after
@@ -23106,7 +24472,7 @@
23106
24472
  return true;
23107
24473
  };
23108
24474
 
23109
- var mapStateToProps$7 = function mapStateToProps(state, props) {
24475
+ var mapStateToProps$8 = function mapStateToProps(state, props) {
23110
24476
  return {
23111
24477
  options: props.nestedField && state.aggregations[props.componentId] ? state.aggregations[props.componentId].reactivesearch_nested : state.aggregations[props.componentId],
23112
24478
  rawData: state.rawData[props.componentId],
@@ -23121,11 +24487,11 @@
23121
24487
 
23122
24488
  var mapDispatchtoProps$5 = {
23123
24489
  setQueryOptions: setQueryOptions$5,
23124
- updateQuery: updateQuery$5,
23125
- setCustomQuery: setCustomQuery$4,
23126
- setDefaultQuery: setDefaultQuery$5
24490
+ updateQuery: updateQuery$6,
24491
+ setCustomQuery: setCustomQuery$5,
24492
+ setDefaultQuery: setDefaultQuery$6
23127
24493
  };
23128
- var ListConnected$3 = ComponentWrapper$1(connect(mapStateToProps$7, mapDispatchtoProps$5)(MultiDropdownList), {
24494
+ var ListConnected$3 = ComponentWrapper$1(connect(mapStateToProps$8, mapDispatchtoProps$5)(MultiDropdownList), {
23129
24495
  componentType: constants_1$1.multiDropdownList,
23130
24496
  internalComponent: MultiDropdownList.hasInternalComponent()
23131
24497
  });
@@ -23137,12 +24503,12 @@
23137
24503
 
23138
24504
  MultiDropdownList.componentType = constants_1$1.multiDropdownList;
23139
24505
 
23140
- var updateQuery$6 = lib_5.updateQuery,
24506
+ var updateQuery$7 = lib_5.updateQuery,
23141
24507
  setQueryOptions$6 = lib_5.setQueryOptions,
23142
- setCustomQuery$5 = lib_5.setCustomQuery;
23143
- var isEqual$9 = lib_8.isEqual,
23144
- checkValueChange$5 = lib_8.checkValueChange,
23145
- getClassName$9 = lib_8.getClassName,
24508
+ setCustomQuery$6 = lib_5.setCustomQuery;
24509
+ var isEqual$a = lib_8.isEqual,
24510
+ checkValueChange$6 = lib_8.checkValueChange,
24511
+ getClassName$a = lib_8.getClassName,
23146
24512
  getOptionsFromQuery = lib_8.getOptionsFromQuery,
23147
24513
  handleA11yAction$1 = lib_8.handleA11yAction;
23148
24514
  var ToggleButton = {
@@ -23201,21 +24567,21 @@
23201
24567
  this.updateQuery(this.$data.currentValue, this.$props);
23202
24568
  },
23203
24569
  value: function value(newVal, oldVal) {
23204
- if (!isEqual$9(newVal, oldVal)) {
24570
+ if (!isEqual$a(newVal, oldVal)) {
23205
24571
  this.handleToggle(newVal, true, this.$props);
23206
24572
  }
23207
24573
  },
23208
24574
  selectedValue: function selectedValue(newVal, oldVal) {
23209
24575
  if (this.$props.multiSelect) {
23210
24576
  // for multiselect selectedValue will be an array
23211
- if (!isEqual$9(this.$data.currentValue, newVal) && !isEqual$9(oldVal, newVal)) {
24577
+ if (!isEqual$a(this.$data.currentValue, newVal) && !isEqual$a(oldVal, newVal)) {
23212
24578
  this.handleToggle(newVal || [], true, this.$props);
23213
24579
  }
23214
24580
  } else {
23215
24581
  // else selectedValue will be a string
23216
24582
  var currentValue = this.$data.currentValue[0] ? this.$data.currentValue[0].value : null;
23217
24583
 
23218
- if (!isEqual$9(currentValue, this.selectedValue) && !isEqual$9(oldVal, this.selectedValue)) {
24584
+ if (!isEqual$a(currentValue, this.selectedValue) && !isEqual$a(oldVal, this.selectedValue)) {
23219
24585
  this.handleToggle(this.selectedValue || [], true, this.$props);
23220
24586
  }
23221
24587
  }
@@ -23293,7 +24659,7 @@
23293
24659
  }
23294
24660
  };
23295
24661
 
23296
- checkValueChange$5(props.componentId, props.multiSelect ? value : value[0], props.beforeValueChange, performUpdate);
24662
+ checkValueChange$6(props.componentId, props.multiSelect ? value : value[0], props.beforeValueChange, performUpdate);
23297
24663
  },
23298
24664
  updateQuery: function updateQuery(value, props) {
23299
24665
  var filterValue = value;
@@ -23330,7 +24696,7 @@
23330
24696
  multiSelect = _this$$props.multiSelect;
23331
24697
 
23332
24698
  if (enableStrictSelection && !multiSelect && this.$data.currentValue.find(function (stateItem) {
23333
- return isEqual$9(item, stateItem);
24699
+ return isEqual$a(item, stateItem);
23334
24700
  })) {
23335
24701
  return false;
23336
24702
  }
@@ -23360,7 +24726,7 @@
23360
24726
  return _this2.handleClick(item);
23361
24727
  }
23362
24728
  }) : h(Button, {
23363
- "class": getClassName$9(this.$props.innerClass, 'button') + " " + (isSelected ? 'active' : ''),
24729
+ "class": getClassName$a(this.$props.innerClass, 'button') + " " + (isSelected ? 'active' : ''),
23364
24730
  "on": {
23365
24731
  "click": function click() {
23366
24732
  return _this2.handleClick(item);
@@ -23387,7 +24753,7 @@
23387
24753
  return h(Container, {
23388
24754
  "class": toggleButtons
23389
24755
  }, [this.$props.title && h(Title, {
23390
- "class": getClassName$9(this.$props.innerClass, 'title')
24756
+ "class": getClassName$a(this.$props.innerClass, 'title')
23391
24757
  }, [this.$props.title]), this.$props.data.map(function (item) {
23392
24758
  return _this3.renderButton(item);
23393
24759
  })]);
@@ -23443,7 +24809,7 @@
23443
24809
  return query;
23444
24810
  };
23445
24811
 
23446
- var mapStateToProps$8 = function mapStateToProps(state, props) {
24812
+ var mapStateToProps$9 = function mapStateToProps(state, props) {
23447
24813
  return {
23448
24814
  selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || null,
23449
24815
  componentProps: state.props[props.componentId],
@@ -23452,11 +24818,11 @@
23452
24818
  };
23453
24819
 
23454
24820
  var mapDispatchtoProps$6 = {
23455
- updateQueryHandler: updateQuery$6,
24821
+ updateQueryHandler: updateQuery$7,
23456
24822
  setQueryOptions: setQueryOptions$6,
23457
- setCustomQuery: setCustomQuery$5
24823
+ setCustomQuery: setCustomQuery$6
23458
24824
  };
23459
- var RcConnected = ComponentWrapper$1(connect(mapStateToProps$8, mapDispatchtoProps$6)(ToggleButton), {
24825
+ var RcConnected = ComponentWrapper$1(connect(mapStateToProps$9, mapDispatchtoProps$6)(ToggleButton), {
23460
24826
  componentType: constants_1$1.toggleButton
23461
24827
  });
23462
24828
 
@@ -23468,14 +24834,14 @@
23468
24834
  ToggleButton.componentType = constants_1$1.toggleButton;
23469
24835
 
23470
24836
  var _excluded = ["options"];
23471
- var updateQuery$7 = lib_5.updateQuery,
24837
+ var updateQuery$8 = lib_5.updateQuery,
23472
24838
  setQueryOptions$7 = lib_5.setQueryOptions,
23473
- setCustomQuery$6 = lib_5.setCustomQuery,
23474
- setDefaultQuery$6 = lib_5.setDefaultQuery;
24839
+ setCustomQuery$7 = lib_5.setCustomQuery,
24840
+ setDefaultQuery$7 = lib_5.setDefaultQuery;
23475
24841
  var parseHits$1 = lib_8.parseHits,
23476
- isEqual$a = lib_8.isEqual,
23477
- getCompositeAggsQuery$4 = lib_8.getCompositeAggsQuery,
23478
- getResultStats$2 = lib_8.getResultStats,
24842
+ isEqual$b = lib_8.isEqual,
24843
+ getCompositeAggsQuery$5 = lib_8.getCompositeAggsQuery,
24844
+ getResultStats$3 = lib_8.getResultStats,
23479
24845
  extractQueryFromCustomQuery$6 = lib_8.extractQueryFromCustomQuery,
23480
24846
  getOptionsForCustomQuery$6 = lib_8.getOptionsForCustomQuery;
23481
24847
  var ReactiveComponent = {
@@ -23603,42 +24969,42 @@
23603
24969
  },
23604
24970
  watch: {
23605
24971
  hits: function hits(newVal, oldVal) {
23606
- if (!isEqual$a(newVal, oldVal)) {
24972
+ if (!isEqual$b(newVal, oldVal)) {
23607
24973
  this.$emit('data', this.getData());
23608
24974
  }
23609
24975
  },
23610
24976
  rawData: function rawData(newVal, oldVal) {
23611
- if (!isEqual$a(newVal, oldVal)) {
24977
+ if (!isEqual$b(newVal, oldVal)) {
23612
24978
  this.$emit('data', this.getData());
23613
24979
  }
23614
24980
  },
23615
24981
  aggregations: function aggregations(newVal, oldVal) {
23616
- if (!isEqual$a(newVal, oldVal)) {
24982
+ if (!isEqual$b(newVal, oldVal)) {
23617
24983
  this.$emit('data', this.getData());
23618
24984
  }
23619
24985
  },
23620
24986
  aggregationData: function aggregationData(newVal, oldVal) {
23621
- if (!isEqual$a(newVal, oldVal)) {
24987
+ if (!isEqual$b(newVal, oldVal)) {
23622
24988
  this.$emit('data', this.getData());
23623
24989
  }
23624
24990
  },
23625
24991
  promotedResults: function promotedResults(newVal, oldVal) {
23626
- if (!isEqual$a(newVal, oldVal)) {
24992
+ if (!isEqual$b(newVal, oldVal)) {
23627
24993
  this.$emit('data', this.getData());
23628
24994
  }
23629
24995
  },
23630
24996
  hidden: function hidden(newVal, oldVal) {
23631
- if (!isEqual$a(newVal, oldVal)) {
24997
+ if (!isEqual$b(newVal, oldVal)) {
23632
24998
  this.$emit('data', this.getData());
23633
24999
  }
23634
25000
  },
23635
25001
  total: function total(newVal, oldVal) {
23636
- if (!isEqual$a(newVal, oldVal)) {
25002
+ if (!isEqual$b(newVal, oldVal)) {
23637
25003
  this.$emit('data', this.getData());
23638
25004
  }
23639
25005
  },
23640
25006
  time: function time(newVal, oldVal) {
23641
- if (!isEqual$a(newVal, oldVal)) {
25007
+ if (!isEqual$b(newVal, oldVal)) {
23642
25008
  this.$emit('data', this.getData());
23643
25009
  }
23644
25010
  },
@@ -23706,7 +25072,7 @@
23706
25072
  getAggsQuery: function getAggsQuery() {
23707
25073
  if (this.aggregationField) {
23708
25074
  return {
23709
- aggs: getCompositeAggsQuery$4({
25075
+ aggs: getCompositeAggsQuery$5({
23710
25076
  props: this.$props,
23711
25077
  showTopHits: true,
23712
25078
  value: this.selectedValue
@@ -23750,7 +25116,7 @@
23750
25116
  },
23751
25117
  computed: {
23752
25118
  stats: function stats() {
23753
- return getResultStats$2(this);
25119
+ return getResultStats$3(this);
23754
25120
  }
23755
25121
  }
23756
25122
  };
@@ -23759,7 +25125,7 @@
23759
25125
  return !!props.defaultQuery;
23760
25126
  };
23761
25127
 
23762
- var mapStateToProps$9 = function mapStateToProps(state, props) {
25128
+ var mapStateToProps$a = function mapStateToProps(state, props) {
23763
25129
  return {
23764
25130
  aggregations: state.aggregations[props.componentId] && state.aggregations[props.componentId] || null,
23765
25131
  aggregationData: state.compositeAggregations[props.componentId] || [],
@@ -23779,11 +25145,11 @@
23779
25145
 
23780
25146
  var mapDispatchtoProps$7 = {
23781
25147
  setQueryOptions: setQueryOptions$7,
23782
- updateQuery: updateQuery$7,
23783
- setCustomQuery: setCustomQuery$6,
23784
- setDefaultQuery: setDefaultQuery$6
25148
+ updateQuery: updateQuery$8,
25149
+ setCustomQuery: setCustomQuery$7,
25150
+ setDefaultQuery: setDefaultQuery$7
23785
25151
  };
23786
- var RcConnected$1 = ComponentWrapper$1(connect(mapStateToProps$9, mapDispatchtoProps$7)(ReactiveComponent), {
25152
+ var RcConnected$1 = ComponentWrapper$1(connect(mapStateToProps$a, mapDispatchtoProps$7)(ReactiveComponent), {
23787
25153
  componentType: constants_1$1.reactiveComponent
23788
25154
  });
23789
25155
 
@@ -23797,7 +25163,7 @@
23797
25163
  var setValue$2 = lib_5.setValue,
23798
25164
  clearValues = lib_5.clearValues,
23799
25165
  resetValuesToDefault = lib_5.resetValuesToDefault;
23800
- var getClassName$a = lib_8.getClassName,
25166
+ var getClassName$b = lib_8.getClassName,
23801
25167
  handleA11yAction$2 = lib_8.handleA11yAction;
23802
25168
  var SelectedFilters = {
23803
25169
  name: 'SelectedFilters',
@@ -23836,9 +25202,9 @@
23836
25202
  return h(Container, {
23837
25203
  "class": filters(this.theme) + " " + (this.$props.className || '')
23838
25204
  }, [this.$props.title && hasValues && h(Title, {
23839
- "class": getClassName$a(this.$props.innerClass, 'title') || ''
25205
+ "class": getClassName$b(this.$props.innerClass, 'title') || ''
23840
25206
  }, [this.$props.title]), filtersToRender, this.$props.showClearAll && hasValues ? h(Button, {
23841
- "class": getClassName$a(this.$props.innerClass, 'button') || '',
25207
+ "class": getClassName$b(this.$props.innerClass, 'button') || '',
23842
25208
  "on": _extends({}, {
23843
25209
  click: this.clearValues,
23844
25210
  keypress: function keypress(event) {
@@ -23914,7 +25280,7 @@
23914
25280
  var valueToRender = _this3.renderValue(value, isArray);
23915
25281
 
23916
25282
  return h(Button, {
23917
- "class": getClassName$a(_this3.$props.innerClass, 'button') || '',
25283
+ "class": getClassName$b(_this3.$props.innerClass, 'button') || '',
23918
25284
  "key": component + "-" + (index + 1),
23919
25285
  "on": _extends({}, {
23920
25286
  click: function click() {
@@ -23943,7 +25309,7 @@
23943
25309
  }
23944
25310
  };
23945
25311
 
23946
- var mapStateToProps$a = function mapStateToProps(state) {
25312
+ var mapStateToProps$b = function mapStateToProps(state) {
23947
25313
  return {
23948
25314
  components: state.components,
23949
25315
  selectedValues: state.selectedValues
@@ -23955,18 +25321,18 @@
23955
25321
  setValue: setValue$2,
23956
25322
  resetValuesToDefault: resetValuesToDefault
23957
25323
  };
23958
- var RcConnected$2 = connect(mapStateToProps$a, mapDispatchtoProps$8)(SelectedFilters);
25324
+ var RcConnected$2 = connect(mapStateToProps$b, mapDispatchtoProps$8)(SelectedFilters);
23959
25325
 
23960
25326
  SelectedFilters.install = function (Vue) {
23961
25327
  Vue.component(SelectedFilters.name, RcConnected$2);
23962
25328
  };
23963
25329
 
23964
- var updateQuery$8 = lib_5.updateQuery,
25330
+ var updateQuery$9 = lib_5.updateQuery,
23965
25331
  setQueryOptions$8 = lib_5.setQueryOptions,
23966
- setCustomQuery$7 = lib_5.setCustomQuery;
23967
- var isEqual$b = lib_8.isEqual,
23968
- checkValueChange$6 = lib_8.checkValueChange,
23969
- getClassName$b = lib_8.getClassName,
25332
+ setCustomQuery$8 = lib_5.setCustomQuery;
25333
+ var isEqual$c = lib_8.isEqual,
25334
+ checkValueChange$7 = lib_8.checkValueChange,
25335
+ getClassName$c = lib_8.getClassName,
23970
25336
  getOptionsFromQuery$1 = lib_8.getOptionsFromQuery;
23971
25337
  var SingleRange = {
23972
25338
  name: 'SingleRange',
@@ -24021,12 +25387,12 @@
24021
25387
  this.setValue(newVal);
24022
25388
  },
24023
25389
  value: function value(newVal, oldVal) {
24024
- if (!isEqual$b(newVal, oldVal)) {
25390
+ if (!isEqual$c(newVal, oldVal)) {
24025
25391
  this.setValue(newVal);
24026
25392
  }
24027
25393
  },
24028
25394
  selectedValue: function selectedValue(newVal) {
24029
- if (!isEqual$b(this.$data.currentValue, newVal)) {
25395
+ if (!isEqual$c(this.$data.currentValue, newVal)) {
24030
25396
  this.setValue(newVal);
24031
25397
  }
24032
25398
  },
@@ -24043,16 +25409,16 @@
24043
25409
  return h(Container, {
24044
25410
  "class": this.$props.className
24045
25411
  }, [this.$props.title && h(Title, {
24046
- "class": getClassName$b(this.$props.innerClass, 'title')
25412
+ "class": getClassName$c(this.$props.innerClass, 'title')
24047
25413
  }, [this.$props.title]), h(UL, {
24048
- "class": getClassName$b(this.$props.innerClass, 'list')
25414
+ "class": getClassName$c(this.$props.innerClass, 'list')
24049
25415
  }, [this.$props.data.map(function (item) {
24050
25416
  var selected = !!_this.$data.currentValue && _this.$data.currentValue.label === item.label;
24051
25417
  return h("li", {
24052
25418
  "key": item.label,
24053
25419
  "class": "" + (selected ? 'active' : '')
24054
25420
  }, [h(Radio, {
24055
- "class": getClassName$b(_this.$props.innerClass, 'radio'),
25421
+ "class": getClassName$c(_this.$props.innerClass, 'radio'),
24056
25422
  "attrs": {
24057
25423
  "id": _this.$props.componentId + "-" + item.label,
24058
25424
  "name": _this.$props.componentId,
@@ -24065,7 +25431,7 @@
24065
25431
  "change": _this.handleChange
24066
25432
  }
24067
25433
  }), h("label", {
24068
- "class": getClassName$b(_this.$props.innerClass, 'label'),
25434
+ "class": getClassName$c(_this.$props.innerClass, 'label'),
24069
25435
  "attrs": {
24070
25436
  "for": _this.$props.componentId + "-" + item.label
24071
25437
  }
@@ -24092,7 +25458,7 @@
24092
25458
  _this2.$emit('value-change', currentValue);
24093
25459
  };
24094
25460
 
24095
- checkValueChange$6(props.componentId, currentValue, props.beforeValueChange, performUpdate);
25461
+ checkValueChange$7(props.componentId, currentValue, props.beforeValueChange, performUpdate);
24096
25462
  },
24097
25463
  updateQueryHandler: function updateQueryHandler(value, props) {
24098
25464
  var customQuery = props.customQuery;
@@ -24164,7 +25530,7 @@
24164
25530
  return query;
24165
25531
  };
24166
25532
 
24167
- var mapStateToProps$b = function mapStateToProps(state, props) {
25533
+ var mapStateToProps$c = function mapStateToProps(state, props) {
24168
25534
  return {
24169
25535
  selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || null,
24170
25536
  componentProps: state.props[props.componentId],
@@ -24173,11 +25539,11 @@
24173
25539
  };
24174
25540
 
24175
25541
  var mapDispatchtoProps$9 = {
24176
- updateQuery: updateQuery$8,
25542
+ updateQuery: updateQuery$9,
24177
25543
  setQueryOptions: setQueryOptions$8,
24178
- setCustomQuery: setCustomQuery$7
25544
+ setCustomQuery: setCustomQuery$8
24179
25545
  };
24180
- var RangeConnected = ComponentWrapper$1(connect(mapStateToProps$b, mapDispatchtoProps$9)(SingleRange), {
25546
+ var RangeConnected = ComponentWrapper$1(connect(mapStateToProps$c, mapDispatchtoProps$9)(SingleRange), {
24181
25547
  componentType: constants_1$1.singleRange
24182
25548
  });
24183
25549
 
@@ -24188,12 +25554,12 @@
24188
25554
 
24189
25555
  SingleRange.componentType = constants_1$1.singleRange;
24190
25556
 
24191
- var updateQuery$9 = lib_5.updateQuery,
25557
+ var updateQuery$a = lib_5.updateQuery,
24192
25558
  setQueryOptions$9 = lib_5.setQueryOptions,
24193
- setCustomQuery$8 = lib_5.setCustomQuery;
24194
- var isEqual$c = lib_8.isEqual,
24195
- checkValueChange$7 = lib_8.checkValueChange,
24196
- getClassName$c = lib_8.getClassName,
25559
+ setCustomQuery$9 = lib_5.setCustomQuery;
25560
+ var isEqual$d = lib_8.isEqual,
25561
+ checkValueChange$8 = lib_8.checkValueChange,
25562
+ getClassName$d = lib_8.getClassName,
24197
25563
  getOptionsFromQuery$2 = lib_8.getOptionsFromQuery;
24198
25564
  var MultiRange = {
24199
25565
  name: 'MultiRange',
@@ -24300,7 +25666,7 @@
24300
25666
  _this.$emit('value-change', Object.keys(selectedValues));
24301
25667
  };
24302
25668
 
24303
- checkValueChange$7(props.componentId, currentValue, props.beforeValueChange, performUpdate);
25669
+ checkValueChange$8(props.componentId, currentValue, props.beforeValueChange, performUpdate);
24304
25670
  },
24305
25671
  updateQueryHandler: function updateQueryHandler(value, props) {
24306
25672
  var customQuery = props.customQuery;
@@ -24334,12 +25700,12 @@
24334
25700
  this.selectItem(newVal, true, undefined, true);
24335
25701
  },
24336
25702
  value: function value(newVal, oldVal) {
24337
- if (!isEqual$c(newVal, oldVal)) {
25703
+ if (!isEqual$d(newVal, oldVal)) {
24338
25704
  this.selectItem(newVal, true, undefined, true);
24339
25705
  }
24340
25706
  },
24341
25707
  selectedValue: function selectedValue(newVal) {
24342
- if (!isEqual$c(this.$data.currentValue, newVal)) {
25708
+ if (!isEqual$d(this.$data.currentValue, newVal)) {
24343
25709
  this.selectItem(newVal, true, undefined, true);
24344
25710
  }
24345
25711
  },
@@ -24373,16 +25739,16 @@
24373
25739
  return h(Container, {
24374
25740
  "class": this.$props.className
24375
25741
  }, [this.$props.title && h(Title, {
24376
- "class": getClassName$c(this.$props.innerClass, 'title')
25742
+ "class": getClassName$d(this.$props.innerClass, 'title')
24377
25743
  }, [this.$props.title]), h(UL, {
24378
- "class": getClassName$c(this.$props.innerClass, 'list')
25744
+ "class": getClassName$d(this.$props.innerClass, 'list')
24379
25745
  }, [this.$props.data.map(function (item) {
24380
25746
  var selected = !!_this2.$data.currentValue && _this2.$data.currentValue.label === item.label;
24381
25747
  return h("li", {
24382
25748
  "key": item.label,
24383
25749
  "class": "" + (selected ? 'active' : '')
24384
25750
  }, [h(Checkbox, {
24385
- "class": getClassName$c(_this2.$props.innerClass, 'checkbox'),
25751
+ "class": getClassName$d(_this2.$props.innerClass, 'checkbox'),
24386
25752
  "attrs": {
24387
25753
  "id": _this2.$props.componentId + "-" + item.label,
24388
25754
  "name": _this2.$props.componentId,
@@ -24397,7 +25763,7 @@
24397
25763
  click: _this2.handleClick
24398
25764
  })
24399
25765
  }), h("label", {
24400
- "class": getClassName$c(_this2.$props.innerClass, 'label'),
25766
+ "class": getClassName$d(_this2.$props.innerClass, 'label'),
24401
25767
  "attrs": {
24402
25768
  "for": _this2.$props.componentId + "-" + item.label
24403
25769
  }
@@ -24457,7 +25823,7 @@
24457
25823
  return query;
24458
25824
  };
24459
25825
 
24460
- var mapStateToProps$c = function mapStateToProps(state, props) {
25826
+ var mapStateToProps$d = function mapStateToProps(state, props) {
24461
25827
  return {
24462
25828
  selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || null,
24463
25829
  componentProps: state.props[props.componentId],
@@ -24466,11 +25832,11 @@
24466
25832
  };
24467
25833
 
24468
25834
  var mapDispatchtoProps$a = {
24469
- updateQuery: updateQuery$9,
25835
+ updateQuery: updateQuery$a,
24470
25836
  setQueryOptions: setQueryOptions$9,
24471
- setCustomQuery: setCustomQuery$8
25837
+ setCustomQuery: setCustomQuery$9
24472
25838
  };
24473
- var RangeConnected$1 = ComponentWrapper$1(connect(mapStateToProps$c, mapDispatchtoProps$a)(MultiRange), {
25839
+ var RangeConnected$1 = ComponentWrapper$1(connect(mapStateToProps$d, mapDispatchtoProps$a)(MultiRange), {
24474
25840
  componentType: constants_1$1.multiRange
24475
25841
  });
24476
25842
 
@@ -24756,8 +26122,8 @@
24756
26122
  };
24757
26123
  var vueNoSsr_common = index$2;
24758
26124
 
24759
- var _templateObject$m;
24760
- 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"])));
26125
+ var _templateObject$n;
26126
+ 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"])));
24761
26127
 
24762
26128
  /**
24763
26129
  * Caution: Please do not change this file without having a discussion with the Team.
@@ -24800,13 +26166,13 @@
24800
26166
  return components;
24801
26167
  };
24802
26168
 
24803
- var updateQuery$a = lib_5.updateQuery,
26169
+ var updateQuery$b = lib_5.updateQuery,
24804
26170
  setQueryOptions$a = lib_5.setQueryOptions,
24805
- setCustomQuery$9 = lib_5.setCustomQuery;
24806
- var checkValueChange$8 = lib_8.checkValueChange,
24807
- getClassName$d = lib_8.getClassName,
26171
+ setCustomQuery$a = lib_5.setCustomQuery;
26172
+ var checkValueChange$9 = lib_8.checkValueChange,
26173
+ getClassName$e = lib_8.getClassName,
24808
26174
  getOptionsFromQuery$3 = lib_8.getOptionsFromQuery,
24809
- isEqual$d = lib_8.isEqual;
26175
+ isEqual$e = lib_8.isEqual;
24810
26176
  var RangeSlider = {
24811
26177
  name: 'RangeSlider',
24812
26178
  components: getComponents(),
@@ -24887,7 +26253,7 @@
24887
26253
  });
24888
26254
  };
24889
26255
 
24890
- checkValueChange$8(props.componentId, {
26256
+ checkValueChange$9(props.componentId, {
24891
26257
  start: currentValue[0],
24892
26258
  end: currentValue[1]
24893
26259
  }, props.beforeValueChange, performUpdate);
@@ -24929,12 +26295,12 @@
24929
26295
  this.handleChange(RangeSlider.parseValue(newVal, this.$props));
24930
26296
  },
24931
26297
  value: function value(newVal, oldVal) {
24932
- if (!isEqual$d(newVal, oldVal)) {
26298
+ if (!isEqual$e(newVal, oldVal)) {
24933
26299
  this.handleChange(RangeSlider.parseValue(newVal, this.$props));
24934
26300
  }
24935
26301
  },
24936
26302
  selectedValue: function selectedValue(newVal) {
24937
- if (!isEqual$d(this.$data.currentValue, newVal)) {
26303
+ if (!isEqual$e(this.$data.currentValue, newVal)) {
24938
26304
  this.handleChange(RangeSlider.parseValue(newVal, this.$props));
24939
26305
  this.$emit('change', newVal);
24940
26306
  }
@@ -24980,9 +26346,9 @@
24980
26346
  return h(Container, {
24981
26347
  "class": this.$props.className
24982
26348
  }, [this.$props.title && h(Title, {
24983
- "class": getClassName$d(this.$props.innerClass, 'title')
26349
+ "class": getClassName$e(this.$props.innerClass, 'title')
24984
26350
  }, [this.$props.title]), this.$props.range ? h(vueNoSsr_common, [h(Slider, {
24985
- "class": getClassName$d(this.$props.innerClass, 'slider')
26351
+ "class": getClassName$e(this.$props.innerClass, 'slider')
24986
26352
  }, [h("vue-slider-component", {
24987
26353
  "ref": "slider",
24988
26354
  "attrs": {
@@ -25001,9 +26367,9 @@
25001
26367
  }), this.$props.rangeLabels && h("div", {
25002
26368
  "class": "label-container"
25003
26369
  }, [h("label", {
25004
- "class": getClassName$d(this.$props.innerClass, 'label') || 'range-label-left'
26370
+ "class": getClassName$e(this.$props.innerClass, 'label') || 'range-label-left'
25005
26371
  }, [this.$props.rangeLabels.start]), h("label", {
25006
- "class": getClassName$d(this.$props.innerClass, 'label') || 'range-label-right'
26372
+ "class": getClassName$e(this.$props.innerClass, 'label') || 'range-label-right'
25007
26373
  }, [this.$props.rangeLabels.end])])])]) : null]);
25008
26374
  }
25009
26375
  };
@@ -25049,7 +26415,7 @@
25049
26415
  return [];
25050
26416
  };
25051
26417
 
25052
- var mapStateToProps$d = function mapStateToProps(state, props) {
26418
+ var mapStateToProps$e = function mapStateToProps(state, props) {
25053
26419
  return {
25054
26420
  options: state.aggregations[props.componentId] ? state.aggregations[props.componentId][props.dataField] && state.aggregations[props.componentId][props.dataField].buckets // eslint-disable-line
25055
26421
  : [],
@@ -25060,11 +26426,11 @@
25060
26426
  };
25061
26427
 
25062
26428
  var mapDispatchtoProps$b = {
25063
- updateQuery: updateQuery$a,
26429
+ updateQuery: updateQuery$b,
25064
26430
  setQueryOptions: setQueryOptions$a,
25065
- setCustomQuery: setCustomQuery$9
26431
+ setCustomQuery: setCustomQuery$a
25066
26432
  };
25067
- var RangeConnected$2 = ComponentWrapper$1(connect(mapStateToProps$d, mapDispatchtoProps$b)(RangeSlider), {
26433
+ var RangeConnected$2 = ComponentWrapper$1(connect(mapStateToProps$e, mapDispatchtoProps$b)(RangeSlider), {
25068
26434
  componentType: constants_1$1.rangeSlider
25069
26435
  });
25070
26436
 
@@ -25078,15 +26444,15 @@
25078
26444
  var addComponent$1 = lib_5.addComponent,
25079
26445
  removeComponent$1 = lib_5.removeComponent,
25080
26446
  watchComponent$1 = lib_5.watchComponent,
25081
- updateQuery$b = lib_5.updateQuery,
26447
+ updateQuery$c = lib_5.updateQuery,
25082
26448
  setQueryListener$1 = lib_5.setQueryListener,
25083
26449
  setQueryOptions$b = lib_5.setQueryOptions,
25084
26450
  setComponentProps$1 = lib_5.setComponentProps,
25085
- setCustomQuery$a = lib_5.setCustomQuery,
26451
+ setCustomQuery$b = lib_5.setCustomQuery,
25086
26452
  updateComponentProps$2 = lib_5.updateComponentProps;
25087
- var checkValueChange$9 = lib_8.checkValueChange,
25088
- getClassName$e = lib_8.getClassName,
25089
- isEqual$e = lib_8.isEqual,
26453
+ var checkValueChange$a = lib_8.checkValueChange,
26454
+ getClassName$f = lib_8.getClassName,
26455
+ isEqual$f = lib_8.isEqual,
25090
26456
  checkSomePropChange$1 = lib_8.checkSomePropChange,
25091
26457
  extractQueryFromCustomQuery$7 = lib_8.extractQueryFromCustomQuery,
25092
26458
  getOptionsForCustomQuery$7 = lib_8.getOptionsForCustomQuery;
@@ -25290,7 +26656,7 @@
25290
26656
  });
25291
26657
  };
25292
26658
 
25293
- checkValueChange$9(this.$props.componentId, {
26659
+ checkValueChange$a(this.$props.componentId, {
25294
26660
  start: normalizedValue[0],
25295
26661
  end: normalizedValue[1]
25296
26662
  }, this.$props.beforeValueChange, performUpdate);
@@ -25357,7 +26723,7 @@
25357
26723
  this.setReact();
25358
26724
  },
25359
26725
  selectedValue: function selectedValue(newValue) {
25360
- if (isEqual$e(newValue, this.currentValue)) return;
26726
+ if (isEqual$f(newValue, this.currentValue)) return;
25361
26727
  var value = newValue || {
25362
26728
  start: this.range.start,
25363
26729
  end: this.range.end
@@ -25366,7 +26732,7 @@
25366
26732
  this.handleChange(DynamicRangeSlider.parseValue(value, this.$props));
25367
26733
  },
25368
26734
  range: function range(newValue, oldValue) {
25369
- if (isEqual$e(newValue, oldValue) || !this.currentValue) return;
26735
+ if (isEqual$f(newValue, oldValue) || !this.currentValue) return;
25370
26736
 
25371
26737
  var _ref3 = this.currentValue || [],
25372
26738
  currentStart = _ref3[0],
@@ -25386,7 +26752,7 @@
25386
26752
  }
25387
26753
  },
25388
26754
  value: function value(newVal, oldVal) {
25389
- if (!isEqual$e(newVal, oldVal)) {
26755
+ if (!isEqual$f(newVal, oldVal)) {
25390
26756
  this.handleChange(DynamicRangeSlider.parseValue(newVal, this.$props));
25391
26757
  }
25392
26758
  }
@@ -25404,9 +26770,9 @@
25404
26770
  return h(Container, {
25405
26771
  "class": this.$props.className
25406
26772
  }, [this.$props.title && h(Title, {
25407
- "class": getClassName$e(this.$props.innerClass, 'title')
26773
+ "class": getClassName$f(this.$props.innerClass, 'title')
25408
26774
  }, [this.$props.title]), h(vueNoSsr_common, [h(Slider, {
25409
- "class": getClassName$e(this.$props.innerClass, 'slider')
26775
+ "class": getClassName$f(this.$props.innerClass, 'slider')
25410
26776
  }, [h("vue-slider-component", {
25411
26777
  "ref": "slider",
25412
26778
  "attrs": {
@@ -25425,9 +26791,9 @@
25425
26791
  }), this.labels ? h("div", {
25426
26792
  "class": "label-container"
25427
26793
  }, [h("label", {
25428
- "class": getClassName$e(this.$props.innerClass, 'label') || 'range-label-left'
26794
+ "class": getClassName$f(this.$props.innerClass, 'label') || 'range-label-left'
25429
26795
  }, [this.labels.start]), h("label", {
25430
- "class": getClassName$e(this.$props.innerClass, 'label') || 'range-label-right'
26796
+ "class": getClassName$f(this.$props.innerClass, 'label') || 'range-label-right'
25431
26797
  }, [this.labels.end])]) : null])])]);
25432
26798
  }
25433
26799
  };
@@ -25473,7 +26839,7 @@
25473
26839
  return true;
25474
26840
  };
25475
26841
 
25476
- var mapStateToProps$e = function mapStateToProps(state, props) {
26842
+ var mapStateToProps$f = function mapStateToProps(state, props) {
25477
26843
  var componentId = state.aggregations[props.componentId];
25478
26844
  var internalRange = state.aggregations[props.componentId + "__range__internal"];
25479
26845
  var options = componentId && componentId[props.dataField];
@@ -25505,15 +26871,15 @@
25505
26871
  var mapDispatchtoProps$c = {
25506
26872
  addComponent: addComponent$1,
25507
26873
  removeComponent: removeComponent$1,
25508
- updateQuery: updateQuery$b,
26874
+ updateQuery: updateQuery$c,
25509
26875
  watchComponent: watchComponent$1,
25510
26876
  setQueryListener: setQueryListener$1,
25511
26877
  setQueryOptions: setQueryOptions$b,
25512
26878
  setComponentProps: setComponentProps$1,
25513
- setCustomQuery: setCustomQuery$a,
26879
+ setCustomQuery: setCustomQuery$b,
25514
26880
  updateComponentProps: updateComponentProps$2
25515
26881
  };
25516
- var RangeConnected$3 = connect(mapStateToProps$e, mapDispatchtoProps$c)(DynamicRangeSlider);
26882
+ var RangeConnected$3 = connect(mapStateToProps$f, mapDispatchtoProps$c)(DynamicRangeSlider);
25517
26883
 
25518
26884
  DynamicRangeSlider.install = function (Vue) {
25519
26885
  Vue.component(DynamicRangeSlider.name, RangeConnected$3);
@@ -25675,7 +27041,7 @@
25675
27041
  }
25676
27042
  };
25677
27043
 
25678
- var mapStateToProps$f = function mapStateToProps(state, props) {
27044
+ var mapStateToProps$g = function mapStateToProps(state, props) {
25679
27045
  return {
25680
27046
  selectedValues: filterByComponentIds(state.selectedValues, props),
25681
27047
  queryLog: filterByComponentIds(state.queryLog, props),
@@ -25692,7 +27058,7 @@
25692
27058
  };
25693
27059
  };
25694
27060
 
25695
- var StateProviderConnected = connect(mapStateToProps$f, {})(StateProvider);
27061
+ var StateProviderConnected = connect(mapStateToProps$g, {})(StateProvider);
25696
27062
 
25697
27063
  StateProvider.install = function (Vue) {
25698
27064
  Vue.component(StateProvider.name, StateProviderConnected);
@@ -25745,8 +27111,8 @@
25745
27111
  if (component.defaultQuery) {
25746
27112
  var defaultQuery = component.defaultQuery(currentValue, component);
25747
27113
  return _extends({
25748
- query: helper_11(defaultQuery)
25749
- }, helper_12(defaultQuery));
27114
+ query: helper_14(defaultQuery)
27115
+ }, helper_15(defaultQuery));
25750
27116
  }
25751
27117
 
25752
27118
  return component.source.defaultQuery ? {
@@ -25762,8 +27128,8 @@
25762
27128
  if (component.customQuery) {
25763
27129
  var customQuery = component.customQuery(currentValue, component);
25764
27130
  return _extends({
25765
- query: helper_11(customQuery)
25766
- }, helper_12(customQuery));
27131
+ query: helper_14(customQuery)
27132
+ }, helper_15(customQuery));
25767
27133
  }
25768
27134
 
25769
27135
  return component.source.defaultQuery ? {
@@ -25927,7 +27293,7 @@
25927
27293
  var react = component.react;
25928
27294
 
25929
27295
  if (isInternalComponentPresent || isResultComponent) {
25930
- react = helper_27(react, internalComponent);
27296
+ react = helper_30(react, internalComponent);
25931
27297
  }
25932
27298
 
25933
27299
  dependencyTree = dependencyTreeReducer(dependencyTree, {
@@ -25990,7 +27356,7 @@
25990
27356
 
25991
27357
  componentCollection.forEach(function (component) {
25992
27358
  // eslint-disable-next-line
25993
- var _buildQuery = helper_26(component.componentId, dependencyTree, queryList, queryOptions),
27359
+ var _buildQuery = helper_29(component.componentId, dependencyTree, queryList, queryOptions),
25994
27360
  queryObj = _buildQuery.queryObj,
25995
27361
  options = _buildQuery.options;
25996
27362
 
@@ -26200,21 +27566,21 @@
26200
27566
  });
26201
27567
  }
26202
27568
 
26203
- var version = "1.28.0";
27569
+ var version = "1.29.0";
26204
27570
 
26205
- var _templateObject$n, _templateObject2$a;
27571
+ var _templateObject$o, _templateObject2$a;
26206
27572
 
26207
27573
  var alert = function alert(_ref) {
26208
27574
  var theme = _ref.theme;
26209
- return css(_templateObject$n || (_templateObject$n = _taggedTemplateLiteralLoose(["\n\tcolor: ", ";\n"])), theme.colors.alertColor);
27575
+ return css(_templateObject$o || (_templateObject$o = _taggedTemplateLiteralLoose(["\n\tcolor: ", ";\n"])), theme.colors.alertColor);
26210
27576
  };
26211
27577
 
26212
27578
  var Content = index$1('div')(_templateObject2$a || (_templateObject2$a = _taggedTemplateLiteralLoose(["\n\t", ";\n\tfont-size: 13px;\n\tmargin: 8px;\n"])), function (props) {
26213
27579
  return props.alert && alert;
26214
27580
  });
26215
27581
 
26216
- var getClassName$f = lib_8.getClassName,
26217
- isEqual$f = lib_8.isEqual;
27582
+ var getClassName$g = lib_8.getClassName,
27583
+ isEqual$g = lib_8.isEqual;
26218
27584
  var RangeInput = {
26219
27585
  name: 'RangeInput',
26220
27586
  components: {
@@ -26296,7 +27662,7 @@
26296
27662
  handleChange: function handleChange(value, event) {
26297
27663
  var currentValue = value;
26298
27664
 
26299
- if (this.shouldUpdate(value) && !isEqual$f(value, this.currentValue)) {
27665
+ if (this.shouldUpdate(value) && !isEqual$g(value, this.currentValue)) {
26300
27666
  switch (event) {
26301
27667
  case 'change':
26302
27668
  if (!value) {
@@ -26366,7 +27732,7 @@
26366
27732
  }
26367
27733
  },
26368
27734
  value: function value(newVal, oldVal) {
26369
- if (!isEqual$f(newVal, oldVal)) {
27735
+ if (!isEqual$g(newVal, oldVal)) {
26370
27736
  if (this.isControlled()) {
26371
27737
  this.handleChange(newVal, 'change');
26372
27738
  }
@@ -26437,7 +27803,7 @@
26437
27803
  "value-change": this.handleValueChange
26438
27804
  }
26439
27805
  }), h(Flex, {
26440
- "class": getClassName$f(innerClass, 'input-container') || ''
27806
+ "class": getClassName$g(innerClass, 'input-container') || ''
26441
27807
  }, [h(Flex, {
26442
27808
  "attrs": {
26443
27809
  "direction": "column",
@@ -26457,7 +27823,7 @@
26457
27823
  "on": {
26458
27824
  "change": this.handleInputChange
26459
27825
  },
26460
- "class": getClassName$f(innerClass, 'input') || '',
27826
+ "class": getClassName$g(innerClass, 'input') || '',
26461
27827
  "domProps": _extends({}, {
26462
27828
  value: this.currentValue.start
26463
27829
  })
@@ -26490,7 +27856,7 @@
26490
27856
  "on": {
26491
27857
  "change": this.handleInputChange
26492
27858
  },
26493
- "class": getClassName$f(innerClass, 'input') || '',
27859
+ "class": getClassName$g(innerClass, 'input') || '',
26494
27860
  "domProps": _extends({}, {
26495
27861
  value: this.currentValue.end
26496
27862
  })
@@ -26502,13 +27868,13 @@
26502
27868
  }
26503
27869
  };
26504
27870
 
26505
- var mapStateToProps$g = function mapStateToProps(state) {
27871
+ var mapStateToProps$h = function mapStateToProps(state) {
26506
27872
  return {
26507
27873
  themePreset: state.config.themePreset
26508
27874
  };
26509
27875
  };
26510
27876
 
26511
- var RangeConnected$4 = ComponentWrapper$1(connect(mapStateToProps$g, {})(RangeInput), {
27877
+ var RangeConnected$4 = ComponentWrapper$1(connect(mapStateToProps$h, {})(RangeInput), {
26512
27878
  componentType: constants_1$1.rangeInput
26513
27879
  });
26514
27880
 
@@ -26519,7 +27885,7 @@
26519
27885
 
26520
27886
  RangeInput.componentType = constants_1$1.rangeInput;
26521
27887
 
26522
- var components = [ReactiveList, ResultCard, ResultList, ReactiveBase, DataSearch, SingleList, MultiList, SingleRange, MultiRange, RangeSlider, DynamicRangeSlider, ReactiveComponent, SelectedFilters, ToggleButton, SingleDropdownList, MultiDropdownList, StateProvider, RangeInput];
27888
+ var components = [ReactiveList, ResultCard, ResultList, ReactiveBase, DataSearch, SearchBox, SingleList, MultiList, SingleRange, MultiRange, RangeSlider, DynamicRangeSlider, ReactiveComponent, SelectedFilters, ToggleButton, SingleDropdownList, MultiDropdownList, StateProvider, RangeInput];
26523
27889
  function install (Vue) {
26524
27890
  components.map(function (component) {
26525
27891
  Vue.use(component);
@@ -26549,6 +27915,7 @@
26549
27915
  exports.ReactiveList = ReactiveList;
26550
27916
  exports.ResultCard = ResultCard;
26551
27917
  exports.ResultList = ResultList;
27918
+ exports.SearchBox = SearchBox;
26552
27919
  exports.SelectedFilters = SelectedFilters;
26553
27920
  exports.SingleDropdownList = SingleDropdownList;
26554
27921
  exports.SingleList = SingleList;