@appbaseio/reactivesearch-vue 1.16.0-alpha.58 → 1.16.0-alpha.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/@appbaseio/reactivesearch-vue.umd.js +557 -303
  2. package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
  3. package/dist/@appbaseio/reactivesearch-vue.umd.min.js +7 -7
  4. package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
  5. package/dist/cjs/{ComponentWrapper-ca5f0cbd.js → ComponentWrapper-e131f28a.js} +1 -1
  6. package/dist/cjs/{DataSearch-f63fcf44.js → DataSearch-85ca95d1.js} +2 -2
  7. package/dist/cjs/DataSearch.js +3 -3
  8. package/dist/cjs/{DropDown-c3f83a46.js → DropDown-14a6460c.js} +1 -1
  9. package/dist/cjs/DynamicRangeSlider.js +1 -1
  10. package/dist/cjs/MultiDropdownList.js +3 -3
  11. package/dist/cjs/MultiList.js +2 -2
  12. package/dist/cjs/MultiRange.js +2 -2
  13. package/dist/cjs/RangeInput.js +2 -2
  14. package/dist/cjs/RangeSlider.js +2 -2
  15. package/dist/cjs/ReactiveBase.js +1 -1
  16. package/dist/cjs/ReactiveComponent.js +2 -2
  17. package/dist/cjs/ReactiveGoogleMap.js +2 -2
  18. package/dist/cjs/ReactiveList.js +2 -2
  19. package/dist/cjs/SelectedFilters.js +4 -4
  20. package/dist/cjs/SingleDropdownList.js +3 -3
  21. package/dist/cjs/SingleList.js +2 -2
  22. package/dist/cjs/SingleRange.js +3 -3
  23. package/dist/cjs/StateProvider.js +29 -4
  24. package/dist/cjs/ToggleButton.js +3 -2
  25. package/dist/cjs/{index-c288153a.js → index-9fb734df.js} +8 -0
  26. package/dist/cjs/index.js +6 -5
  27. package/dist/cjs/{install-b494733c.js → install-7e220cb1.js} +10 -9
  28. package/dist/cjs/install.js +6 -5
  29. package/dist/cjs/version.js +1 -1
  30. package/dist/es/{ComponentWrapper-6ad0997b.js → ComponentWrapper-3654ce36.js} +1 -1
  31. package/dist/es/{DataSearch-1dba393f.js → DataSearch-9bd510ea.js} +2 -2
  32. package/dist/es/DataSearch.js +3 -3
  33. package/dist/es/{DropDown-2ddad7ae.js → DropDown-219d9321.js} +1 -1
  34. package/dist/es/DynamicRangeSlider.js +1 -1
  35. package/dist/es/MultiDropdownList.js +3 -3
  36. package/dist/es/MultiList.js +2 -2
  37. package/dist/es/MultiRange.js +2 -2
  38. package/dist/es/RangeInput.js +2 -2
  39. package/dist/es/RangeSlider.js +2 -2
  40. package/dist/es/ReactiveBase.js +1 -1
  41. package/dist/es/ReactiveComponent.js +2 -2
  42. package/dist/es/ReactiveGoogleMap.js +2 -2
  43. package/dist/es/ReactiveList.js +2 -2
  44. package/dist/es/SelectedFilters.js +2 -2
  45. package/dist/es/SingleDropdownList.js +3 -3
  46. package/dist/es/SingleList.js +2 -2
  47. package/dist/es/SingleRange.js +3 -3
  48. package/dist/es/StateProvider.js +29 -4
  49. package/dist/es/ToggleButton.js +3 -2
  50. package/dist/es/{index-3d98f51b.js → index-32f9d554.js} +8 -1
  51. package/dist/es/index.js +7 -6
  52. package/dist/es/{install-cde230d4.js → install-32e60122.js} +8 -7
  53. package/dist/es/install.js +6 -5
  54. package/dist/es/version.js +1 -1
  55. package/package.json +3 -3
@@ -812,12 +812,14 @@
812
812
  var REMOVE_COMPONENT = exports.REMOVE_COMPONENT = 'REMOVE_COMPONENT';
813
813
  var WATCH_COMPONENT = exports.WATCH_COMPONENT = 'WATCH_COMPONENT';
814
814
  var SET_QUERY = exports.SET_QUERY = 'SET_QUERY';
815
+ var SET_APPBASE_QUERY = exports.SET_APPBASE_QUERY = 'SET_APPBASE_QUERY';
815
816
  var SET_QUERY_OPTIONS = exports.SET_QUERY_OPTIONS = 'SET_QUERY_OPTIONS';
816
817
  var EXECUTE_QUERY = exports.EXECUTE_QUERY = 'EXECUTE_QUERY';
817
818
  var UPDATE_HITS = exports.UPDATE_HITS = 'UPDATE_HITS';
818
819
  var UPDATE_AGGS = exports.UPDATE_AGGS = 'UPDATE_AGGS';
819
820
  var UPDATE_COMPOSITE_AGGS = exports.UPDATE_COMPOSITE_AGGS = 'UPDATE_COMPOSITE_AGGS';
820
821
  var ADD_CONFIG = exports.ADD_CONFIG = 'ADD_CONFIG';
822
+ var UPDATE_CONFIG = exports.UPDATE_CONFIG = 'UPDATE_CONFIG';
821
823
  var ADD_APPBASE_REF = exports.ADD_APPBASE_REF = 'ADD_APPBASE_REF';
822
824
  var LOG_QUERY = exports.LOG_QUERY = 'LOG_QUERY';
823
825
  var LOG_COMBINED_QUERY = exports.LOG_COMBINED_QUERY = 'LOG_COMBINED_QUERY';
@@ -852,6 +854,7 @@
852
854
  var RECENT_SEARCHES_SUCCESS = exports.RECENT_SEARCHES_SUCCESS = 'RECENT_SEARCHES_SUCCESS';
853
855
  var RECENT_SEARCHES_ERROR = exports.RECENT_SEARCHES_ERROR = 'RECENT_SEARCHES_ERROR';
854
856
  var SET_VALUE = exports.SET_VALUE = 'SET_VALUE';
857
+ var SET_VALUES = exports.SET_VALUES = 'SET_VALUES';
855
858
  var RESET_TO_DEFAULT = exports.RESET_TO_DEFAULT = 'RESET_TO_DEFAULT';
856
859
  var SET_GOOGLE_MAP_SCRIPT_LOADING = exports.SET_GOOGLE_MAP_SCRIPT_LOADING = 'SET_GOOGLE_MAP_SCRIPT_LOADING';
857
860
  var SET_GOOGLE_MAP_SCRIPT_LOADED = exports.SET_GOOGLE_MAP_SCRIPT_LOADED = 'SET_GOOGLE_MAP_SCRIPT_LOADED';
@@ -862,50 +865,53 @@
862
865
  var constants_2 = constants.REMOVE_COMPONENT;
863
866
  var constants_3 = constants.WATCH_COMPONENT;
864
867
  var constants_4 = constants.SET_QUERY;
865
- var constants_5 = constants.SET_QUERY_OPTIONS;
866
- var constants_6 = constants.EXECUTE_QUERY;
867
- var constants_7 = constants.UPDATE_HITS;
868
- var constants_8 = constants.UPDATE_AGGS;
869
- var constants_9 = constants.UPDATE_COMPOSITE_AGGS;
870
- var constants_10 = constants.ADD_CONFIG;
871
- var constants_11 = constants.ADD_APPBASE_REF;
872
- var constants_12 = constants.LOG_QUERY;
873
- var constants_13 = constants.LOG_COMBINED_QUERY;
874
- var constants_14 = constants.SET_INTERNAL_VALUE;
875
- var constants_15 = constants.PATCH_VALUE;
876
- var constants_16 = constants.CLEAR_VALUES;
877
- var constants_17 = constants.SET_LOADING;
878
- var constants_18 = constants.SET_ERROR;
879
- var constants_19 = constants.SET_TIMESTAMP;
880
- var constants_20 = constants.SET_HEADERS;
881
- var constants_21 = constants.SET_MAP_DATA;
882
- var constants_22 = constants.SET_QUERY_LISTENER;
883
- var constants_23 = constants.STORE_KEY;
884
- var constants_24 = constants.SET_SEARCH_ID;
885
- var constants_25 = constants.SET_PROMOTED_RESULTS;
886
- var constants_26 = constants.SET_DEFAULT_QUERY;
887
- var constants_27 = constants.SET_CUSTOM_QUERY;
888
- var constants_28 = constants.SET_CUSTOM_HIGHLIGHT_OPTIONS;
889
- var constants_29 = constants.SET_CUSTOM_DATA;
890
- var constants_30 = constants.SET_APPLIED_SETTINGS;
891
- var constants_31 = constants.SET_PROPS;
892
- var constants_32 = constants.UPDATE_PROPS;
893
- var constants_33 = constants.REMOVE_PROPS;
894
- var constants_34 = constants.SET_SUGGESTIONS_SEARCH_VALUE;
895
- var constants_35 = constants.CLEAR_SUGGESTIONS_SEARCH_VALUE;
896
- var constants_36 = constants.SET_SUGGESTIONS_SEARCH_ID;
897
- var constants_37 = constants.UPDATE_ANALYTICS_CONFIG;
898
- var constants_38 = constants.SET_RAW_DATA;
899
- var constants_39 = constants.SET_POPULAR_SUGGESTIONS;
900
- var constants_40 = constants.SET_DEFAULT_POPULAR_SUGGESTIONS;
901
- var constants_41 = constants.SET_QUERY_TO_HITS;
902
- var constants_42 = constants.RECENT_SEARCHES_SUCCESS;
903
- var constants_43 = constants.RECENT_SEARCHES_ERROR;
904
- var constants_44 = constants.SET_VALUE;
905
- var constants_45 = constants.RESET_TO_DEFAULT;
906
- var constants_46 = constants.SET_GOOGLE_MAP_SCRIPT_LOADING;
907
- var constants_47 = constants.SET_GOOGLE_MAP_SCRIPT_LOADED;
908
- var constants_48 = constants.SET_GOOGLE_MAP_SCRIPT_ERROR;
868
+ var constants_5 = constants.SET_APPBASE_QUERY;
869
+ var constants_6 = constants.SET_QUERY_OPTIONS;
870
+ var constants_7 = constants.EXECUTE_QUERY;
871
+ var constants_8 = constants.UPDATE_HITS;
872
+ var constants_9 = constants.UPDATE_AGGS;
873
+ var constants_10 = constants.UPDATE_COMPOSITE_AGGS;
874
+ var constants_11 = constants.ADD_CONFIG;
875
+ var constants_12 = constants.UPDATE_CONFIG;
876
+ var constants_13 = constants.ADD_APPBASE_REF;
877
+ var constants_14 = constants.LOG_QUERY;
878
+ var constants_15 = constants.LOG_COMBINED_QUERY;
879
+ var constants_16 = constants.SET_INTERNAL_VALUE;
880
+ var constants_17 = constants.PATCH_VALUE;
881
+ var constants_18 = constants.CLEAR_VALUES;
882
+ var constants_19 = constants.SET_LOADING;
883
+ var constants_20 = constants.SET_ERROR;
884
+ var constants_21 = constants.SET_TIMESTAMP;
885
+ var constants_22 = constants.SET_HEADERS;
886
+ var constants_23 = constants.SET_MAP_DATA;
887
+ var constants_24 = constants.SET_QUERY_LISTENER;
888
+ var constants_25 = constants.STORE_KEY;
889
+ var constants_26 = constants.SET_SEARCH_ID;
890
+ var constants_27 = constants.SET_PROMOTED_RESULTS;
891
+ var constants_28 = constants.SET_DEFAULT_QUERY;
892
+ var constants_29 = constants.SET_CUSTOM_QUERY;
893
+ var constants_30 = constants.SET_CUSTOM_HIGHLIGHT_OPTIONS;
894
+ var constants_31 = constants.SET_CUSTOM_DATA;
895
+ var constants_32 = constants.SET_APPLIED_SETTINGS;
896
+ var constants_33 = constants.SET_PROPS;
897
+ var constants_34 = constants.UPDATE_PROPS;
898
+ var constants_35 = constants.REMOVE_PROPS;
899
+ var constants_36 = constants.SET_SUGGESTIONS_SEARCH_VALUE;
900
+ var constants_37 = constants.CLEAR_SUGGESTIONS_SEARCH_VALUE;
901
+ var constants_38 = constants.SET_SUGGESTIONS_SEARCH_ID;
902
+ var constants_39 = constants.UPDATE_ANALYTICS_CONFIG;
903
+ var constants_40 = constants.SET_RAW_DATA;
904
+ var constants_41 = constants.SET_POPULAR_SUGGESTIONS;
905
+ var constants_42 = constants.SET_DEFAULT_POPULAR_SUGGESTIONS;
906
+ var constants_43 = constants.SET_QUERY_TO_HITS;
907
+ var constants_44 = constants.RECENT_SEARCHES_SUCCESS;
908
+ var constants_45 = constants.RECENT_SEARCHES_ERROR;
909
+ var constants_46 = constants.SET_VALUE;
910
+ var constants_47 = constants.SET_VALUES;
911
+ var constants_48 = constants.RESET_TO_DEFAULT;
912
+ var constants_49 = constants.SET_GOOGLE_MAP_SCRIPT_LOADING;
913
+ var constants_50 = constants.SET_GOOGLE_MAP_SCRIPT_LOADED;
914
+ var constants_51 = constants.SET_GOOGLE_MAP_SCRIPT_ERROR;
909
915
 
910
916
  var componentsReducer_1 = createCommonjsModule(function (module, exports) {
911
917
  Object.defineProperty(exports, "__esModule", {
@@ -1159,6 +1165,40 @@
1159
1165
  });
1160
1166
  var queryReducer = unwrapExports(queryReducer_1);
1161
1167
 
1168
+ var appbaseQueryReducer_1 = createCommonjsModule(function (module, exports) {
1169
+ Object.defineProperty(exports, "__esModule", {
1170
+ value: true
1171
+ });
1172
+
1173
+ var _extends = Object.assign || function (target) {
1174
+ for (var i = 1; i < arguments.length; i++) {
1175
+ var source = arguments[i];
1176
+
1177
+ for (var key in source) {
1178
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
1179
+ target[key] = source[key];
1180
+ }
1181
+ }
1182
+ }
1183
+
1184
+ return target;
1185
+ };
1186
+
1187
+ exports["default"] = appbaseQueryReducer;
1188
+
1189
+ function appbaseQueryReducer() {
1190
+ var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1191
+ var action = arguments[1];
1192
+
1193
+ if (action.type === constants.SET_APPBASE_QUERY) {
1194
+ return _extends({}, state, action.query);
1195
+ }
1196
+
1197
+ return state;
1198
+ }
1199
+ });
1200
+ unwrapExports(appbaseQueryReducer_1);
1201
+
1162
1202
  var queryOptionsReducer_1 = createCommonjsModule(function (module, exports) {
1163
1203
  Object.defineProperty(exports, "__esModule", {
1164
1204
  value: true
@@ -1455,6 +1495,8 @@
1455
1495
  return _extends({}, state, {
1456
1496
  analyticsConfig: _extends({}, state.analyticsConfig, action.analyticsConfig)
1457
1497
  });
1498
+ } else if (action.type === constants.UPDATE_CONFIG) {
1499
+ return _extends({}, state, action.config);
1458
1500
  }
1459
1501
 
1460
1502
  return state;
@@ -1778,6 +1820,23 @@
1778
1820
  }));
1779
1821
  }
1780
1822
 
1823
+ case constants.SET_VALUES:
1824
+ {
1825
+ var componentKeys = action.componentsValues ? Object.keys(action.componentsValues) : [];
1826
+
1827
+ if (componentKeys.length) {
1828
+ var _newState = {};
1829
+ componentKeys.forEach(function (component) {
1830
+ _newState[component] = _extends({}, state[component], {
1831
+ value: action.componentsValues[component]
1832
+ });
1833
+ });
1834
+ return _extends({}, state, _newState);
1835
+ }
1836
+
1837
+ return state;
1838
+ }
1839
+
1781
1840
  case constants.PATCH_VALUE:
1782
1841
  return _extends({}, state, _defineProperty({}, action.component, _extends({}, state[action.component], action.payload)));
1783
1842
 
@@ -3318,6 +3377,8 @@
3318
3377
 
3319
3378
  var _queryReducer2 = _interopRequireDefault(queryReducer_1);
3320
3379
 
3380
+ var _appbaseQueryReducer2 = _interopRequireDefault(appbaseQueryReducer_1);
3381
+
3321
3382
  var _queryOptionsReducer2 = _interopRequireDefault(queryOptionsReducer_1);
3322
3383
 
3323
3384
  var _configReducer2 = _interopRequireDefault(configReducer_1);
@@ -3422,7 +3483,8 @@
3422
3483
  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
3423
3484
  return state;
3424
3485
  },
3425
- googleMapScriptStatus: _googleMapScriptReducer2["default"]
3486
+ googleMapScriptStatus: _googleMapScriptReducer2["default"],
3487
+ lastUsedAppbaseQuery: _appbaseQueryReducer2["default"]
3426
3488
  });
3427
3489
  });
3428
3490
  unwrapExports(reducers);
@@ -5002,7 +5064,7 @@
5002
5064
  Object.defineProperty(exports, "__esModule", {
5003
5065
  value: true
5004
5066
  });
5005
- exports.hasCustomRenderer = exports.getComponent = exports.isFunction = exports.getCalendarIntervalErrorMessage = exports.queryFormatMillisecondsMap = exports.featuredSuggestionsActionTypes = 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;
5067
+ exports.flatten = exports.saveDataAsFile = exports.hasCustomRenderer = exports.getComponent = exports.isFunction = exports.getCalendarIntervalErrorMessage = exports.queryFormatMillisecondsMap = exports.featuredSuggestionsActionTypes = 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;
5006
5068
 
5007
5069
  var _extends = Object.assign || function (target) {
5008
5070
  for (var i = 1; i < arguments.length; i++) {
@@ -5938,224 +6000,103 @@
5938
6000
  children = props.children;
5939
6001
  return isFunction(children) || isFunction(render);
5940
6002
  };
5941
- });
5942
- unwrapExports(helper);
5943
- var helper_1 = helper.hasCustomRenderer;
5944
- var helper_2 = helper.getComponent;
5945
- var helper_3 = helper.isFunction;
5946
- var helper_4 = helper.getCalendarIntervalErrorMessage;
5947
- var helper_5 = helper.queryFormatMillisecondsMap;
5948
- var helper_6 = helper.featuredSuggestionsActionTypes;
5949
- var helper_7 = helper.suggestionTypes;
5950
- var helper_8 = helper.getTopSuggestions;
5951
- var helper_9 = helper.withClickIds;
5952
- var helper_10 = helper.getCompositeAggsQuery;
5953
- var helper_11 = helper.getAggsQuery;
5954
- var helper_12 = helper.extractQueryFromDefaultQuery;
5955
- var helper_13 = helper.updateInternalQuery;
5956
- var helper_14 = helper.getSearchState;
5957
- var helper_15 = helper.extractQueryFromCustomQuery;
5958
- var helper_16 = helper.getOptionsForCustomQuery;
5959
- var helper_17 = helper.getOptionsFromQuery;
5960
- var helper_18 = helper.parseHits;
5961
- var helper_19 = helper.handleA11yAction;
5962
- var helper_20 = helper.getInnerKey;
5963
- var helper_21 = helper.getClassName;
5964
- var helper_22 = helper.checkSomePropChange;
5965
- var helper_23 = helper.checkPropChange;
5966
- var helper_24 = helper.updateDefaultQuery;
5967
- var helper_25 = helper.updateCustomQuery;
5968
- var helper_26 = helper.isEqual;
5969
- var helper_27 = helper.compareQueries;
5970
- var helper_28 = helper.debounce;
5971
- var helper_29 = helper.getQueryOptions;
5972
- var helper_30 = helper.buildQuery;
5973
- var helper_31 = helper.pushToAndClause;
5974
- var helper_32 = helper.checkValueChange;
5975
- var helper_33 = helper.getAggsOrder;
5976
- var helper_34 = helper.formatDate;
5977
- var helper_35 = helper.getResultStats;
5978
- var helper_36 = helper.extractFieldsFromSource;
5979
- var helper_37 = helper.normalizeDataField;
5980
- var helper_38 = helper.handleOnSuggestions;
5981
- var helper_39 = helper.isValidDateRangeQueryFormat;
5982
6003
 
5983
- var value = createCommonjsModule(function (module, exports) {
5984
- Object.defineProperty(exports, "__esModule", {
5985
- value: true
5986
- });
6004
+ var saveDataAsFile = exports.saveDataAsFile = function saveDataAsFile() {
6005
+ var filename = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'exportedData';
6006
+ var data = arguments[1];
6007
+ var format = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'csv';
6008
+ var dataToWrite = data;
6009
+ var dataType = 'text/' + format;
5987
6010
 
5988
- var _extends = Object.assign || function (target) {
5989
- for (var i = 1; i < arguments.length; i++) {
5990
- var source = arguments[i];
5991
-
5992
- for (var key in source) {
5993
- if (Object.prototype.hasOwnProperty.call(source, key)) {
5994
- target[key] = source[key];
5995
- }
5996
- }
6011
+ if (format === 'json') {
6012
+ dataToWrite = JSON.stringify(dataToWrite, 0, 4);
5997
6013
  }
5998
6014
 
5999
- return target;
6015
+ var blob = new Blob([dataToWrite], {
6016
+ type: dataType
6017
+ });
6018
+ var link = document.createElement('a');
6019
+ link.download = filename + '.' + format;
6020
+ link.href = window.URL.createObjectURL(blob);
6021
+ link.dataset.downloadurl = [dataType, link.download, link.href].join(':');
6022
+ var evt = new MouseEvent('click', {
6023
+ view: window,
6024
+ bubbles: true,
6025
+ cancelable: true
6026
+ });
6027
+ link.dispatchEvent(evt);
6028
+ link.remove();
6000
6029
  };
6001
6030
 
6002
- exports.setValue = setValue;
6003
- exports.resetValuesToDefault = resetValuesToDefault;
6004
- exports.setInternalValue = setInternalValue;
6005
- exports.patchValue = patchValue;
6006
- exports.clearValues = clearValues;
6007
-
6008
- function _defineProperty(obj, key, value) {
6009
- if (key in obj) {
6010
- Object.defineProperty(obj, key, {
6011
- value: value,
6012
- enumerable: true,
6013
- configurable: true,
6014
- writable: true
6015
- });
6016
- } else {
6017
- obj[key] = value;
6018
- }
6019
-
6020
- return obj;
6021
- }
6022
-
6023
- function _toConsumableArray(arr) {
6024
- if (Array.isArray(arr)) {
6025
- for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {
6026
- arr2[i] = arr[i];
6027
- }
6028
-
6029
- return arr2;
6030
- } else {
6031
- return Array.from(arr);
6032
- }
6033
- }
6034
-
6035
- function setValue(component, value, label, showFilter, URLParams, componentType, category, meta, updateSource) {
6036
- return function (dispatch, getState) {
6037
- var _getState = getState(),
6038
- urlValues = _getState.urlValues,
6039
- selectedValues = _getState.selectedValues,
6040
- watchMan = _getState.watchMan,
6041
- props = _getState.props;
6031
+ var flatten = exports.flatten = function flatten(data) {
6032
+ var result = {};
6042
6033
 
6043
- var reference = updateSource;
6034
+ function recurse(cur) {
6035
+ var prop = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
6044
6036
 
6045
- if ((0, helper.isEqual)(urlValues[component], value)) {
6046
- reference = 'URL';
6047
- }
6048
-
6049
- var componentsToReset = {};
6050
- var isResultComponent = [constants$1.componentTypes.reactiveList, constants$1.componentTypes.reactiveMap].includes(props[component] && props[component].componentType);
6051
- var previousValue = selectedValues[component] && selectedValues[component].value;
6052
-
6053
- if (!(0, helper.isEqual)(previousValue, value) && props[component] && !isResultComponent) {
6054
- var componentList = [component];
6055
- var watchList = watchMan[component] || [];
6056
- componentList = [].concat(_toConsumableArray(componentList), _toConsumableArray(watchList));
6057
- componentList.forEach(function (comp) {
6058
- var componentProps = props[comp];
6059
-
6060
- if (reference !== 'URL' && componentProps && [constants$1.componentTypes.reactiveList, constants$1.componentTypes.reactiveMap].includes(componentProps.componentType)) {
6061
- if (selectedValues[comp] !== null) {
6062
- componentsToReset[comp] = null;
6063
- }
6064
- }
6037
+ if (Object(cur) !== cur) {
6038
+ result[prop] = cur;
6039
+ } else if (Array.isArray(cur)) {
6040
+ result[prop] = JSON.stringify(cur);
6041
+ } else {
6042
+ var isEmpty = true;
6043
+ Object.keys(cur).forEach(function (p) {
6044
+ isEmpty = false;
6045
+ recurse(cur[p], prop ? prop + '.' + p : p);
6065
6046
  });
6066
- }
6067
6047
 
6068
- if (isResultComponent) {
6069
- if (value < 2 && (!previousValue || previousValue < 2)) {
6070
- return;
6048
+ if (isEmpty && prop) {
6049
+ result[prop] = {};
6071
6050
  }
6072
6051
  }
6052
+ }
6073
6053
 
6074
- dispatch({
6075
- type: constants.SET_VALUE,
6076
- component: component,
6077
- reference: reference,
6078
- value: value,
6079
- label: label,
6080
- showFilter: showFilter,
6081
- URLParams: URLParams,
6082
- componentType: componentType,
6083
- category: category,
6084
- meta: meta,
6085
- componentsToReset: componentsToReset
6086
- });
6087
- };
6088
- }
6089
-
6090
- function resetValuesToDefault(clearAllBlacklistComponents) {
6091
- return function (dispatch, getState) {
6092
- var _getState2 = getState(),
6093
- selectedValues = _getState2.selectedValues,
6094
- componentProps = _getState2.props;
6095
-
6096
- var defaultValues = {};
6097
- var valueToSet = void 0;
6098
- Object.keys(selectedValues).forEach(function (component) {
6099
- if (!(Array.isArray(clearAllBlacklistComponents) && clearAllBlacklistComponents.includes(component))) {
6100
- if (!componentProps[component] || !componentProps[component].componentType || !componentProps[component].defaultValue) {
6101
- valueToSet = null;
6102
- } else if ([constants$1.componentTypes.rangeSlider, constants$1.componentTypes.rangeInput, constants$1.componentTypes.ratingsFilter, constants$1.componentTypes.dateRange].includes(componentProps[component].componentType)) {
6103
- valueToSet = typeof componentProps[component].defaultValue === 'object' ? [componentProps[component].defaultValue.start, componentProps[component].defaultValue.end] : null;
6104
- } else if ([constants$1.componentTypes.multiDropdownList, constants$1.componentTypes.multiDataList, constants$1.componentTypes.multiList, constants$1.componentTypes.singleDataList, constants$1.componentTypes.singleDropdownList, constants$1.componentTypes.singleList, constants$1.componentTypes.tagCloud, constants$1.componentTypes.toggleButton, constants$1.componentTypes.multiDropdownRange, constants$1.componentTypes.multiRange, constants$1.componentTypes.singleDropdownRange, constants$1.componentTypes.singleRange, constants$1.componentTypes.dataSearch, constants$1.componentTypes.datePicker].includes(componentProps[component].componentType)) {
6105
- valueToSet = componentProps[component].defaultValue;
6106
- } else if ([constants$1.componentTypes.categorySearch].includes(componentProps[component].componentType)) {
6107
- valueToSet = componentProps[component].defaultValue ? componentProps[component].defaultValue.term : '';
6108
- }
6109
-
6110
- if (!(0, helper.isEqual)(selectedValues[component].value, valueToSet)) {
6111
- defaultValues = _extends({}, defaultValues, _defineProperty({}, component, _extends({}, selectedValues[component], {
6112
- value: valueToSet
6113
- })));
6114
- }
6115
- }
6116
- });
6117
- dispatch({
6118
- type: constants.RESET_TO_DEFAULT,
6119
- defaultValues: defaultValues
6120
- });
6121
- };
6122
- }
6123
-
6124
- function setInternalValue(component, value, componentType, category, meta) {
6125
- return {
6126
- type: constants.SET_INTERNAL_VALUE,
6127
- component: component,
6128
- value: value,
6129
- componentType: componentType,
6130
- category: category,
6131
- meta: meta
6132
- };
6133
- }
6134
-
6135
- function patchValue(component, payload) {
6136
- return {
6137
- type: constants.PATCH_VALUE,
6138
- component: component,
6139
- payload: payload
6140
- };
6141
- }
6142
-
6143
- function clearValues() {
6144
- var resetValues = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
6145
- var clearAllBlacklistComponents = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
6146
- return {
6147
- type: constants.CLEAR_VALUES,
6148
- resetValues: resetValues,
6149
- clearAllBlacklistComponents: clearAllBlacklistComponents
6150
- };
6151
- }
6054
+ recurse(data);
6055
+ return result;
6056
+ };
6152
6057
  });
6153
- unwrapExports(value);
6154
- var value_1 = value.setValue;
6155
- var value_2 = value.resetValuesToDefault;
6156
- var value_3 = value.setInternalValue;
6157
- var value_4 = value.patchValue;
6158
- var value_5 = value.clearValues;
6058
+ unwrapExports(helper);
6059
+ var helper_1 = helper.flatten;
6060
+ var helper_2 = helper.saveDataAsFile;
6061
+ var helper_3 = helper.hasCustomRenderer;
6062
+ var helper_4 = helper.getComponent;
6063
+ var helper_5 = helper.isFunction;
6064
+ var helper_6 = helper.getCalendarIntervalErrorMessage;
6065
+ var helper_7 = helper.queryFormatMillisecondsMap;
6066
+ var helper_8 = helper.featuredSuggestionsActionTypes;
6067
+ var helper_9 = helper.suggestionTypes;
6068
+ var helper_10 = helper.getTopSuggestions;
6069
+ var helper_11 = helper.withClickIds;
6070
+ var helper_12 = helper.getCompositeAggsQuery;
6071
+ var helper_13 = helper.getAggsQuery;
6072
+ var helper_14 = helper.extractQueryFromDefaultQuery;
6073
+ var helper_15 = helper.updateInternalQuery;
6074
+ var helper_16 = helper.getSearchState;
6075
+ var helper_17 = helper.extractQueryFromCustomQuery;
6076
+ var helper_18 = helper.getOptionsForCustomQuery;
6077
+ var helper_19 = helper.getOptionsFromQuery;
6078
+ var helper_20 = helper.parseHits;
6079
+ var helper_21 = helper.handleA11yAction;
6080
+ var helper_22 = helper.getInnerKey;
6081
+ var helper_23 = helper.getClassName;
6082
+ var helper_24 = helper.checkSomePropChange;
6083
+ var helper_25 = helper.checkPropChange;
6084
+ var helper_26 = helper.updateDefaultQuery;
6085
+ var helper_27 = helper.updateCustomQuery;
6086
+ var helper_28 = helper.isEqual;
6087
+ var helper_29 = helper.compareQueries;
6088
+ var helper_30 = helper.debounce;
6089
+ var helper_31 = helper.getQueryOptions;
6090
+ var helper_32 = helper.buildQuery;
6091
+ var helper_33 = helper.pushToAndClause;
6092
+ var helper_34 = helper.checkValueChange;
6093
+ var helper_35 = helper.getAggsOrder;
6094
+ var helper_36 = helper.formatDate;
6095
+ var helper_37 = helper.getResultStats;
6096
+ var helper_38 = helper.extractFieldsFromSource;
6097
+ var helper_39 = helper.normalizeDataField;
6098
+ var helper_40 = helper.handleOnSuggestions;
6099
+ var helper_41 = helper.isValidDateRangeQueryFormat;
6159
6100
 
6160
6101
  var hits = createCommonjsModule(function (module, exports) {
6161
6102
  Object.defineProperty(exports, "__esModule", {
@@ -6259,6 +6200,7 @@
6259
6200
  exports.setGoogleMapScriptLoaded = setGoogleMapScriptLoaded;
6260
6201
  exports.setGoogleMapScriptError = setGoogleMapScriptError;
6261
6202
  exports.resetStoreForComponent = resetStoreForComponent;
6203
+ exports.setLastUsedAppbaseQuery = setLastUsedAppbaseQuery;
6262
6204
 
6263
6205
  function setRawData(component, response) {
6264
6206
  return {
@@ -6466,6 +6408,13 @@
6466
6408
  }, 0));
6467
6409
  };
6468
6410
  }
6411
+
6412
+ function setLastUsedAppbaseQuery(query) {
6413
+ return {
6414
+ type: constants.SET_APPBASE_QUERY,
6415
+ query: query
6416
+ };
6417
+ }
6469
6418
  });
6470
6419
  unwrapExports(misc);
6471
6420
  var misc_1 = misc.setRawData;
@@ -6492,6 +6441,7 @@
6492
6441
  var misc_22 = misc.setGoogleMapScriptLoaded;
6493
6442
  var misc_23 = misc.setGoogleMapScriptError;
6494
6443
  var misc_24 = misc.resetStoreForComponent;
6444
+ var misc_25 = misc.setLastUsedAppbaseQuery;
6495
6445
 
6496
6446
  var xdate = createCommonjsModule(function (module) {
6497
6447
  /**
@@ -7829,6 +7779,22 @@
7829
7779
  };
7830
7780
 
7831
7781
  exports.executeQueryListener = executeQueryListener;
7782
+ exports.updateStoreConfig = updateStoreConfig;
7783
+
7784
+ function _defineProperty(obj, key, value) {
7785
+ if (key in obj) {
7786
+ Object.defineProperty(obj, key, {
7787
+ value: value,
7788
+ enumerable: true,
7789
+ configurable: true,
7790
+ writable: true
7791
+ });
7792
+ } else {
7793
+ obj[key] = value;
7794
+ }
7795
+
7796
+ return obj;
7797
+ }
7832
7798
 
7833
7799
  var handleTransformResponse = exports.handleTransformResponse = function handleTransformResponse() {
7834
7800
  var res = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
@@ -7904,7 +7870,8 @@
7904
7870
  _ref2$appendToAggs = _ref2.appendToAggs,
7905
7871
  appendToAggs = _ref2$appendToAggs === undefined ? false : _ref2$appendToAggs,
7906
7872
  _ref2$isSuggestionsQu = _ref2.isSuggestionsQuery,
7907
- isSuggestionsQuery = _ref2$isSuggestionsQu === undefined ? false : _ref2$isSuggestionsQu;
7873
+ isSuggestionsQuery = _ref2$isSuggestionsQu === undefined ? false : _ref2$isSuggestionsQu,
7874
+ query = _ref2.query;
7908
7875
 
7909
7876
  var getState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};
7910
7877
  var dispatch = arguments[2];
@@ -7932,7 +7899,8 @@
7932
7899
  handleTransformResponse(res[component], config, component).then(function (response) {
7933
7900
  if (response) {
7934
7901
  var _getState4 = getState(),
7935
- timestamp = _getState4.timestamp;
7902
+ timestamp = _getState4.timestamp,
7903
+ props = _getState4.props;
7936
7904
 
7937
7905
  if (timestamp[component] === undefined || timestamp[component] < res._timestamp) {
7938
7906
  var promotedResults = response.promoted;
@@ -7953,6 +7921,13 @@
7953
7921
 
7954
7922
  if (response.hits) {
7955
7923
  dispatch((0, misc.setTimestamp)(component, res._timestamp));
7924
+
7925
+ if (props[component].componentType === constants$1.componentTypes.reactiveList && query.find(function (queryItem) {
7926
+ return queryItem.id === component;
7927
+ }).execute) {
7928
+ dispatch((0, misc.setLastUsedAppbaseQuery)(_defineProperty({}, component, query)));
7929
+ }
7930
+
7956
7931
  dispatch((0, hits.updateHits)(component, response.hits, response.took, response.hits && response.hits.hidden, appendToHits));
7957
7932
  var internalComponentID = (0, transform.getInternalComponentID)(component);
7958
7933
 
@@ -8119,6 +8094,15 @@
8119
8094
  listener.onQueryChange(oldQuery, newQuery);
8120
8095
  }
8121
8096
  }
8097
+
8098
+ function updateStoreConfig(payload) {
8099
+ return function (dispatch) {
8100
+ dispatch({
8101
+ type: constants.UPDATE_CONFIG,
8102
+ config: payload
8103
+ });
8104
+ };
8105
+ }
8122
8106
  });
8123
8107
  unwrapExports(utils);
8124
8108
  var utils_1 = utils.getSuggestionQuery;
@@ -8130,6 +8114,201 @@
8130
8114
  var utils_7 = utils.isComponentActive;
8131
8115
  var utils_8 = utils.handleTransformResponse;
8132
8116
  var utils_9 = utils.executeQueryListener;
8117
+ var utils_10 = utils.updateStoreConfig;
8118
+
8119
+ var value = createCommonjsModule(function (module, exports) {
8120
+ Object.defineProperty(exports, "__esModule", {
8121
+ value: true
8122
+ });
8123
+
8124
+ var _extends = Object.assign || function (target) {
8125
+ for (var i = 1; i < arguments.length; i++) {
8126
+ var source = arguments[i];
8127
+
8128
+ for (var key in source) {
8129
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
8130
+ target[key] = source[key];
8131
+ }
8132
+ }
8133
+ }
8134
+
8135
+ return target;
8136
+ };
8137
+
8138
+ exports.setValue = setValue;
8139
+ exports.resetValuesToDefault = resetValuesToDefault;
8140
+ exports.setInternalValue = setInternalValue;
8141
+ exports.patchValue = patchValue;
8142
+ exports.clearValues = clearValues;
8143
+ exports.setValues = setValues;
8144
+
8145
+ function _defineProperty(obj, key, value) {
8146
+ if (key in obj) {
8147
+ Object.defineProperty(obj, key, {
8148
+ value: value,
8149
+ enumerable: true,
8150
+ configurable: true,
8151
+ writable: true
8152
+ });
8153
+ } else {
8154
+ obj[key] = value;
8155
+ }
8156
+
8157
+ return obj;
8158
+ }
8159
+
8160
+ function _toConsumableArray(arr) {
8161
+ if (Array.isArray(arr)) {
8162
+ for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {
8163
+ arr2[i] = arr[i];
8164
+ }
8165
+
8166
+ return arr2;
8167
+ } else {
8168
+ return Array.from(arr);
8169
+ }
8170
+ }
8171
+
8172
+ function setValue(component, value, label, showFilter, URLParams, componentType, category, meta, updateSource) {
8173
+ return function (dispatch, getState) {
8174
+ var _getState = getState(),
8175
+ urlValues = _getState.urlValues,
8176
+ selectedValues = _getState.selectedValues,
8177
+ watchMan = _getState.watchMan,
8178
+ props = _getState.props;
8179
+
8180
+ var reference = updateSource;
8181
+
8182
+ if ((0, helper.isEqual)(urlValues[component], value)) {
8183
+ reference = 'URL';
8184
+ }
8185
+
8186
+ var componentsToReset = {};
8187
+ var isResultComponent = [constants$1.componentTypes.reactiveList, constants$1.componentTypes.reactiveMap].includes(props[component] && props[component].componentType);
8188
+ var previousValue = selectedValues[component] && selectedValues[component].value;
8189
+
8190
+ if (!(0, helper.isEqual)(previousValue, value) && props[component] && !isResultComponent) {
8191
+ var componentList = [component];
8192
+ var watchList = watchMan[component] || [];
8193
+ componentList = [].concat(_toConsumableArray(componentList), _toConsumableArray(watchList));
8194
+ componentList.forEach(function (comp) {
8195
+ var componentProps = props[comp];
8196
+
8197
+ if (reference !== 'URL' && componentProps && [constants$1.componentTypes.reactiveList, constants$1.componentTypes.reactiveMap].includes(componentProps.componentType)) {
8198
+ if (selectedValues[comp] !== null) {
8199
+ componentsToReset[comp] = null;
8200
+ }
8201
+ }
8202
+ });
8203
+ }
8204
+
8205
+ if (isResultComponent) {
8206
+ if (value < 2 && (!previousValue || previousValue < 2)) {
8207
+ return;
8208
+ }
8209
+ }
8210
+
8211
+ dispatch({
8212
+ type: constants.SET_VALUE,
8213
+ component: component,
8214
+ reference: reference,
8215
+ value: value,
8216
+ label: label,
8217
+ showFilter: showFilter,
8218
+ URLParams: URLParams,
8219
+ componentType: componentType,
8220
+ category: category,
8221
+ meta: meta,
8222
+ componentsToReset: componentsToReset
8223
+ });
8224
+ };
8225
+ }
8226
+
8227
+ function resetValuesToDefault(clearAllBlacklistComponents) {
8228
+ return function (dispatch, getState) {
8229
+ var _getState2 = getState(),
8230
+ selectedValues = _getState2.selectedValues,
8231
+ componentProps = _getState2.props;
8232
+
8233
+ var defaultValues = {};
8234
+ var valueToSet = void 0;
8235
+ Object.keys(selectedValues).forEach(function (component) {
8236
+ if (!(Array.isArray(clearAllBlacklistComponents) && clearAllBlacklistComponents.includes(component))) {
8237
+ if (!componentProps[component] || !componentProps[component].componentType || !componentProps[component].defaultValue) {
8238
+ valueToSet = null;
8239
+ } else if ([constants$1.componentTypes.rangeSlider, constants$1.componentTypes.rangeInput, constants$1.componentTypes.ratingsFilter, constants$1.componentTypes.dateRange].includes(componentProps[component].componentType)) {
8240
+ valueToSet = typeof componentProps[component].defaultValue === 'object' ? [componentProps[component].defaultValue.start, componentProps[component].defaultValue.end] : null;
8241
+ } else if ([constants$1.componentTypes.multiDropdownList, constants$1.componentTypes.multiDataList, constants$1.componentTypes.multiList, constants$1.componentTypes.singleDataList, constants$1.componentTypes.singleDropdownList, constants$1.componentTypes.singleList, constants$1.componentTypes.tagCloud, constants$1.componentTypes.toggleButton, constants$1.componentTypes.multiDropdownRange, constants$1.componentTypes.multiRange, constants$1.componentTypes.singleDropdownRange, constants$1.componentTypes.singleRange, constants$1.componentTypes.dataSearch, constants$1.componentTypes.datePicker].includes(componentProps[component].componentType)) {
8242
+ valueToSet = componentProps[component].defaultValue;
8243
+ } else if ([constants$1.componentTypes.categorySearch].includes(componentProps[component].componentType)) {
8244
+ valueToSet = componentProps[component].defaultValue ? componentProps[component].defaultValue.term : '';
8245
+ }
8246
+
8247
+ if (!(0, helper.isEqual)(selectedValues[component].value, valueToSet)) {
8248
+ defaultValues = _extends({}, defaultValues, _defineProperty({}, component, _extends({}, selectedValues[component], {
8249
+ value: valueToSet
8250
+ })));
8251
+ }
8252
+ }
8253
+ });
8254
+ dispatch({
8255
+ type: constants.RESET_TO_DEFAULT,
8256
+ defaultValues: defaultValues
8257
+ });
8258
+ };
8259
+ }
8260
+
8261
+ function setInternalValue(component, value, componentType, category, meta) {
8262
+ return {
8263
+ type: constants.SET_INTERNAL_VALUE,
8264
+ component: component,
8265
+ value: value,
8266
+ componentType: componentType,
8267
+ category: category,
8268
+ meta: meta
8269
+ };
8270
+ }
8271
+
8272
+ function patchValue(component, payload) {
8273
+ return {
8274
+ type: constants.PATCH_VALUE,
8275
+ component: component,
8276
+ payload: payload
8277
+ };
8278
+ }
8279
+
8280
+ function clearValues() {
8281
+ var resetValues = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8282
+ var clearAllBlacklistComponents = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
8283
+ return {
8284
+ type: constants.CLEAR_VALUES,
8285
+ resetValues: resetValues,
8286
+ clearAllBlacklistComponents: clearAllBlacklistComponents
8287
+ };
8288
+ }
8289
+
8290
+ function setValues(componentsValues) {
8291
+ return function (dispatch) {
8292
+ dispatch((0, utils.updateStoreConfig)({
8293
+ queryLockConfig: {
8294
+ initialTimestamp: new Date().getTime(),
8295
+ lockTime: 300
8296
+ }
8297
+ }));
8298
+ dispatch({
8299
+ type: constants.SET_VALUES,
8300
+ componentsValues: componentsValues
8301
+ });
8302
+ };
8303
+ }
8304
+ });
8305
+ unwrapExports(value);
8306
+ var value_1 = value.setValue;
8307
+ var value_2 = value.resetValuesToDefault;
8308
+ var value_3 = value.setInternalValue;
8309
+ var value_4 = value.patchValue;
8310
+ var value_5 = value.clearValues;
8311
+ var value_6 = value.setValues;
8133
8312
 
8134
8313
  var maps = createCommonjsModule(function (module, exports) {
8135
8314
  Object.defineProperty(exports, "__esModule", {
@@ -8827,6 +9006,7 @@
8827
9006
  exports.setQueryOptions = setQueryOptions;
8828
9007
  exports.updateQuery = updateQuery;
8829
9008
  exports.loadMore = loadMore;
9009
+ exports.loadDataToExport = loadDataToExport;
8830
9010
 
8831
9011
  var _analytics2 = _interopRequireDefault(analytics);
8832
9012
 
@@ -9086,7 +9266,8 @@
9086
9266
  res: res,
9087
9267
  orderOfQueries: orderOfQueries,
9088
9268
  appendToHits: appendToHits,
9089
- appendToAggs: appendToAggs
9269
+ appendToAggs: appendToAggs,
9270
+ query: query
9090
9271
  }, getState, dispatch);
9091
9272
  })["catch"](function (err) {
9092
9273
  (0, utils.handleError)({
@@ -9120,6 +9301,12 @@
9120
9301
 
9121
9302
  var lockTime = config.initialQueriesSyncTime;
9122
9303
  var initialTimestamp = config.initialTimestamp;
9304
+
9305
+ if (config.queryLockConfig instanceof Object) {
9306
+ lockTime = config.queryLockConfig.lockTime;
9307
+ initialTimestamp = config.queryLockConfig.initialTimestamp;
9308
+ }
9309
+
9123
9310
  var componentList = [componentId];
9124
9311
  var finalQuery = [];
9125
9312
  var appbaseQuery = {};
@@ -9239,7 +9426,7 @@
9239
9426
  var currentTime = new Date().getTime();
9240
9427
 
9241
9428
  if (currentTime - initialTimestamp < lockTime) {
9242
- if (!lock) {
9429
+ if (!lock || config.queryLockConfig) {
9243
9430
  setTimeout(function () {
9244
9431
  var finalOrderOfQueries = [];
9245
9432
  var finalIsSuggestionsQuery = false;
@@ -9294,6 +9481,9 @@
9294
9481
  }
9295
9482
 
9296
9483
  requestStack = [];
9484
+ dispatch((0, utils.updateStoreConfig)({
9485
+ queryLockConfig: undefined
9486
+ }));
9297
9487
  }, lockTime);
9298
9488
  }
9299
9489
 
@@ -9434,6 +9624,50 @@
9434
9624
  }
9435
9625
  };
9436
9626
  }
9627
+
9628
+ function loadDataToExport(componentId) {
9629
+ var deepPaginationCursor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
9630
+ var totalResults = arguments[2];
9631
+ var data = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
9632
+ return function (dispatch, getState) {
9633
+ var _getState6 = getState(),
9634
+ appbaseRef = _getState6.appbaseRef,
9635
+ lastUsedAppbaseQuery = _getState6.lastUsedAppbaseQuery;
9636
+
9637
+ var queryFromStore = lastUsedAppbaseQuery[componentId];
9638
+
9639
+ if (queryFromStore) {
9640
+ var query = queryFromStore.map(function (queryItem) {
9641
+ if (queryItem.id === componentId) {
9642
+ return _extends({}, queryItem, {
9643
+ deepPaginationConfig: {
9644
+ cursor: deepPaginationCursor
9645
+ },
9646
+ deepPagination: true,
9647
+ size: totalResults < 1000 ? totalResults : 1000,
9648
+ sortField: '_id',
9649
+ sortBy: 'asc'
9650
+ });
9651
+ }
9652
+
9653
+ return queryItem;
9654
+ });
9655
+
9656
+ if (totalResults && Array.isArray(data) && totalResults <= data.length) {
9657
+ return data;
9658
+ }
9659
+
9660
+ return appbaseRef.reactiveSearchv3(query).then(function (res) {
9661
+ var newDataChunk = res[componentId].hits.hits;
9662
+ return dispatch(loadDataToExport(componentId, newDataChunk[newDataChunk.length - 1]._id, res[componentId].hits.total.value, [].concat(_toConsumableArray(data), _toConsumableArray(newDataChunk))));
9663
+ })["catch"](function (err) {
9664
+ console.error('Error fetching data to export! ', err);
9665
+ });
9666
+ }
9667
+
9668
+ return console.error('Error fetching data to export!');
9669
+ };
9670
+ }
9437
9671
  });
9438
9672
  unwrapExports(query);
9439
9673
  var query_1 = query.loadPopularSuggestions;
@@ -9441,6 +9675,7 @@
9441
9675
  var query_3 = query.setQueryOptions;
9442
9676
  var query_4 = query.updateQuery;
9443
9677
  var query_5 = query.loadMore;
9678
+ var query_6 = query.loadDataToExport;
9444
9679
 
9445
9680
  var component = createCommonjsModule(function (module, exports) {
9446
9681
  Object.defineProperty(exports, "__esModule", {
@@ -14302,6 +14537,13 @@
14302
14537
  return MODIFIER_KEYS.includes(shortcutKey);
14303
14538
  });
14304
14539
  }
14540
+ function decodeHtml(str) {
14541
+ return str.replace(/&#([0-9]{1,3});/gi, function (match, numStr) {
14542
+ var num = parseInt(numStr, 10); // read num as normal number
14543
+
14544
+ return String.fromCharCode(num);
14545
+ });
14546
+ }
14305
14547
 
14306
14548
  var addComponent = lib_5.addComponent,
14307
14549
  removeComponent = lib_5.removeComponent,
@@ -15014,7 +15256,7 @@
15014
15256
  filteredResults = [].concat(parsedPromotedResults, filteredResults);
15015
15257
  }
15016
15258
 
15017
- return helper_9(filteredResults);
15259
+ return helper_11(filteredResults);
15018
15260
  }
15019
15261
  },
15020
15262
  watch: {
@@ -17475,14 +17717,14 @@
17475
17717
  this.updateState(this.$props);
17476
17718
  },
17477
17719
  analyticsConfig: function analyticsConfig(newVal, oldVal) {
17478
- if (!helper_26(newVal, oldVal)) {
17720
+ if (!helper_28(newVal, oldVal)) {
17479
17721
  if (this.store) {
17480
17722
  this.store.dispatch(analytics_3$1(newVal));
17481
17723
  }
17482
17724
  }
17483
17725
  },
17484
17726
  appbaseConfig: function appbaseConfig(newVal, oldVal) {
17485
- if (!helper_26(newVal, oldVal)) {
17727
+ if (!helper_28(newVal, oldVal)) {
17486
17728
  if (this.store) {
17487
17729
  this.store.dispatch(analytics_3$1(newVal));
17488
17730
  }
@@ -20583,7 +20825,7 @@
20583
20825
  // returns size and aggs property
20584
20826
  getBasicQueryOptions: function getBasicQueryOptions() {
20585
20827
  var aggregationField = this.$props.aggregationField;
20586
- var queryOptions = helper_29(this.$props);
20828
+ var queryOptions = helper_31(this.$props);
20587
20829
 
20588
20830
  if (aggregationField) {
20589
20831
  queryOptions.aggs = getCompositeAggsQuery$1({
@@ -21671,7 +21913,7 @@
21671
21913
  console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
21672
21914
  }
21673
21915
 
21674
- this.currentValue = this.selectedValue || this.value || this.defaultValue || '';
21916
+ this.currentValue = decodeHtml(this.selectedValue || this.value || this.defaultValue || '');
21675
21917
 
21676
21918
  if (this.$options.isTagsMode) {
21677
21919
  this.currentValue = '';
@@ -21768,7 +22010,8 @@
21768
22010
  enterButton: VueTypes.bool.def(false),
21769
22011
  renderEnterButton: VueTypes.any,
21770
22012
  mode: VueTypes.oneOf(['select', 'tag']).def('select'),
21771
- renderSelectedTags: VueTypes.any
22013
+ renderSelectedTags: VueTypes.any,
22014
+ searchboxId: VueTypes.string
21772
22015
  },
21773
22016
  beforeMount: function beforeMount() {
21774
22017
  if (this.selectedValue) {
@@ -21947,7 +22190,7 @@
21947
22190
  // returns size and aggs property
21948
22191
  getBasicQueryOptions: function getBasicQueryOptions() {
21949
22192
  var aggregationField = this.$props.aggregationField;
21950
- var queryOptions = helper_29(this.$props);
22193
+ var queryOptions = helper_31(this.$props);
21951
22194
 
21952
22195
  if (aggregationField) {
21953
22196
  queryOptions.aggs = getCompositeAggsQuery$2({
@@ -22012,7 +22255,7 @@
22012
22255
 
22013
22256
  _this.currentValue = '';
22014
22257
  } else {
22015
- _this.currentValue = value;
22258
+ _this.currentValue = decodeHtml(value);
22016
22259
  }
22017
22260
 
22018
22261
  var queryHandlerValue = value;
@@ -22518,7 +22761,7 @@
22518
22761
  onAutofillClick: function onAutofillClick(suggestion) {
22519
22762
  var value = suggestion.value;
22520
22763
  this.isOpen = true;
22521
- this.currentValue = value;
22764
+ this.currentValue = decodeHtml(value);
22522
22765
  this.triggerDefaultQuery(value);
22523
22766
  },
22524
22767
  renderAutoFill: function renderAutoFill(suggestion) {
@@ -22646,10 +22889,10 @@
22646
22889
  var renderSuggestionsDropdown = function renderSuggestionsDropdown() {
22647
22890
  var getIcon = function getIcon(iconType) {
22648
22891
  switch (iconType) {
22649
- case helper_7.Recent:
22892
+ case helper_9.Recent:
22650
22893
  return recentSearchesIcon;
22651
22894
 
22652
- case helper_7.Popular:
22895
+ case helper_9.Popular:
22653
22896
  return popularSearchesIcon;
22654
22897
 
22655
22898
  default:
@@ -25454,6 +25697,7 @@
25454
25697
  name: 'ToggleButton',
25455
25698
  props: {
25456
25699
  componentId: types.stringRequired,
25700
+ customQuery: types.func,
25457
25701
  data: types.data,
25458
25702
  dataField: types.stringRequired,
25459
25703
  defaultValue: types.any,
@@ -26251,7 +26495,7 @@
26251
26495
 
26252
26496
  return _this3.renderFilterButton(component, component + "-" + (index + 1), function () {
26253
26497
  return _this3.remove(component, value);
26254
- }, selectedValues[component].label + ": " + valueToRender);
26498
+ }, selectedValues[component].label + ": " + decodeHtml(valueToRender));
26255
26499
  }
26256
26500
 
26257
26501
  return null;
@@ -26402,7 +26646,7 @@
26402
26646
  props = this.$props;
26403
26647
  }
26404
26648
 
26405
- var currentValue = SingleRange.parseValue(value, props);
26649
+ var currentValue = typeof value === 'string' ? SingleRange.parseValue(value, props) : value;
26406
26650
 
26407
26651
  var performUpdate = function performUpdate() {
26408
26652
  _this2.currentValue = currentValue;
@@ -27986,13 +28230,32 @@
27986
28230
  if (this.isStateChanged(newVal, oldVal)) {
27987
28231
  this.searchState = filterByKeys(getSearchState(filterProps(this.searchStateProps)), this.includeKeys);
27988
28232
  }
28233
+ },
28234
+ setSearchState: function setSearchState(valuesMap) {
28235
+ if (valuesMap === void 0) {
28236
+ valuesMap = {};
28237
+ }
28238
+
28239
+ var components = this.components;
28240
+ var computedValuesMap = {};
28241
+ components.filter(function (component) {
28242
+ return !transform_11(component);
28243
+ }).forEach(function (component) {
28244
+ if (component in valuesMap) {
28245
+ computedValuesMap[component] = valuesMap[component];
28246
+ } else {
28247
+ computedValuesMap[component] = null;
28248
+ }
28249
+ });
28250
+ this.setValues(computedValuesMap);
27989
28251
  }
27990
28252
  },
27991
28253
  render: function render() {
27992
28254
  var searchState = this.searchState;
27993
28255
  var dom = this.$scopedSlots["default"];
27994
28256
  return dom ? dom({
27995
- searchState: searchState
28257
+ searchState: searchState,
28258
+ setSearchState: this.setSearchState
27996
28259
  }) : null;
27997
28260
  }
27998
28261
  };
@@ -28010,11 +28273,15 @@
28010
28273
  promotedResults: filterByComponentIds(state.promotedResults, props),
28011
28274
  customData: filterByComponentIds(state.customData, props),
28012
28275
  settings: filterByComponentIds(state.settings, props),
28013
- rawData: filterByComponentIds(state.rawData, props)
28276
+ rawData: filterByComponentIds(state.rawData, props),
28277
+ components: filterByComponentIds(state.components, props)
28014
28278
  };
28015
28279
  };
28016
28280
 
28017
- var StateProviderConnected = connect(mapStateToProps$g, {})(StateProvider);
28281
+ var mapDispatchtoProps$d = {
28282
+ setValues: value_6
28283
+ };
28284
+ var StateProviderConnected = connect(mapStateToProps$g, mapDispatchtoProps$d)(StateProvider);
28018
28285
 
28019
28286
  StateProvider.install = function (Vue) {
28020
28287
  Vue.component(StateProvider.name, StateProviderConnected);
@@ -28174,7 +28441,7 @@
28174
28441
  var origListener = listener; // eslint-disable-next-line no-param-reassign -- Is old style this should be analyzed
28175
28442
 
28176
28443
  listener = function listener(event) {
28177
- var suggestionSelected = document.getElementsByClassName('pac-item-selected').length > 0;
28444
+ var suggestionSelected = document ? document.getElementsByClassName('pac-item-selected').length > 0 : null;
28178
28445
 
28179
28446
  if (event.which === 13 && !suggestionSelected) {
28180
28447
  var simulatedEvent = document.createEvent('Event');
@@ -31010,8 +31277,6 @@
31010
31277
 
31011
31278
  // Infowindow needs this to be immediately available
31012
31279
  var promise = this.$mapPromise.then(function (map) {
31013
- var _this$finalShapes;
31014
-
31015
31280
  _this.$map = map; // Initialize the maps with the given options
31016
31281
 
31017
31282
  var initialOptions = _extends({}, _this.options, {
@@ -31047,7 +31312,7 @@
31047
31312
 
31048
31313
  _this.$map.addListener('click', _this.clearSelection);
31049
31314
 
31050
- if (_this != null && (_this$finalShapes = _this.finalShapes) != null && _this$finalShapes.length) {
31315
+ if (_this && _this.finalShapes && _this.finalShapes.length) {
31051
31316
  _this.drawAll();
31052
31317
  }
31053
31318
 
@@ -31992,8 +32257,6 @@
31992
32257
  var _this2 = this;
31993
32258
 
31994
32259
  return this.$gmapApiPromiseLazy().then(function () {
31995
- var _this2$options;
31996
-
31997
32260
  var events = ['bounds_changed', 'click', 'dblclick', 'drag', 'dragend', 'dragstart', 'idle', 'mousemove', 'mouseout', 'mouseover', 'resize', 'rightclick', 'tilesloaded']; // getting the DOM element where to create the map
31998
32261
 
31999
32262
  var element = _this2.$refs['vue-map']; // creating the map
@@ -32008,7 +32271,7 @@
32008
32271
 
32009
32272
  var recycleKey = _this2.getRecycleKey();
32010
32273
 
32011
- if (_this2 != null && (_this2$options = _this2.options) != null && _this2$options.recycle && window[recycleKey]) {
32274
+ if (_this2 && _this2.options && _this2.options.recycle && window[recycleKey]) {
32012
32275
  element.appendChild(window[recycleKey].div);
32013
32276
  _this2.$mapObject = window[recycleKey].map;
32014
32277
 
@@ -32188,9 +32451,7 @@
32188
32451
  * @public
32189
32452
  */
32190
32453
  getRecycleKey: function getRecycleKey() {
32191
- var _this$options;
32192
-
32193
- return this != null && (_this$options = this.options) != null && _this$options.recycle ? this.recyclePrefix + this.options.recycle : this.recyclePrefix;
32454
+ return this && this.options && this.options.recycle ? this.recyclePrefix + this.options.recycle : this.recyclePrefix;
32194
32455
  }
32195
32456
  },
32196
32457
  destroyed: function destroyed() {
@@ -32283,7 +32544,7 @@
32283
32544
 
32284
32545
  var __vue_inject_styles__$7 = function __vue_inject_styles__(inject) {
32285
32546
  if (!inject) return;
32286
- inject("data-v-2462c60c_0", {
32547
+ inject("data-v-58f81a38_0", {
32287
32548
  source: ".vue-map-container{position:relative}.vue-map-container .vue-map{left:0;right:0;top:0;bottom:0;position:absolute}.vue-map-hidden{display:none}",
32288
32549
  map: undefined,
32289
32550
  media: undefined
@@ -33718,7 +33979,9 @@
33718
33979
  resolveFn();
33719
33980
  callbackExecuted = true; // TODO: this should be removed on the next major release
33720
33981
 
33721
- customCallback === null || customCallback === void 0 ? void 0 : customCallback();
33982
+ if (customCallback) {
33983
+ customCallback();
33984
+ }
33722
33985
  } catch (error) {
33723
33986
  window.console.error('Error executing the GoogleMapsCallback', error);
33724
33987
  }
@@ -33726,14 +33989,12 @@
33726
33989
 
33727
33990
  var timeoutId = setTimeout(function () {
33728
33991
  var intervalId = setInterval(function () {
33729
- var _window, _window$google;
33730
-
33731
33992
  if (timeoutId) {
33732
33993
  clearTimeout(timeoutId);
33733
33994
  timeoutId = undefined;
33734
33995
  }
33735
33996
 
33736
- if (((_window = window) === null || _window === void 0 ? void 0 : (_window$google = _window.google) === null || _window$google === void 0 ? void 0 : _window$google.maps) != null && !callbackExecuted) {
33997
+ if ((window && window.google && window.google.maps) != null && !callbackExecuted) {
33737
33998
  window.GoogleMapsCallback();
33738
33999
  callbackExecuted = true;
33739
34000
  }
@@ -33772,21 +34033,18 @@
33772
34033
  * @param {string|undefined} options.load.customCallback=undefined This option was added on v3.0.0 but will be removed in the next major release. If you already have an script tag that loads Google Maps API and you want to use it set you callback in the `customCallback` option and our `GoogleMapsCallback` callback will execute your custom callback at the end; it must attached to the `window` object, is the only requirement.
33773
34034
  */
33774
34035
  return function promiseLazyCreator(options) {
33775
- var _options$load;
33776
34036
  /**
33777
34037
  * Things to do once the API is loaded
33778
34038
  *
33779
34039
  * @returns {Object} the Google Maps API object
33780
34040
  */
33781
-
33782
-
33783
34041
  function onMapsReady() {
33784
34042
  GoogleMapsApi.isReady = true;
33785
34043
  return window.google;
33786
34044
  } // If library should load the API
33787
34045
 
33788
34046
 
33789
- if (options !== null && options !== void 0 && (_options$load = options.load) !== null && _options$load !== void 0 && _options$load.key || options.dynamicLoad) {
34047
+ if (options && options.load && options.load.key || options.dynamicLoad) {
33790
34048
  return getLazyValue(function () {
33791
34049
  // This will only be evaluated once
33792
34050
  if (typeof window === 'undefined') {
@@ -33796,9 +34054,7 @@
33796
34054
 
33797
34055
  return new Promise(function (resolve, reject) {
33798
34056
  try {
33799
- var _options$load2;
33800
-
33801
- createCallbackAndChecksIfMapIsLoaded(resolve, window[options === null || options === void 0 ? void 0 : (_options$load2 = options.load) === null || _options$load2 === void 0 ? void 0 : _options$load2.customCallback]);
34057
+ createCallbackAndChecksIfMapIsLoaded(resolve, window[options && options.load && options.load.customCallback]);
33802
34058
 
33803
34059
  if (!options.dynamicLoad) {
33804
34060
  googleMapsApiInitializer(options.load, options.loadCn);
@@ -33814,14 +34070,12 @@
33814
34070
 
33815
34071
 
33816
34072
  var promise = new Promise(function (resolve) {
33817
- var _options$load3;
33818
-
33819
34073
  if (typeof window === 'undefined') {
33820
34074
  // Do nothing if run from server-side
33821
34075
  return;
33822
34076
  }
33823
34077
 
33824
- createCallbackAndChecksIfMapIsLoaded(resolve, window[options === null || options === void 0 ? void 0 : (_options$load3 = options.load) === null || _options$load3 === void 0 ? void 0 : _options$load3.customCallback]);
34078
+ createCallbackAndChecksIfMapIsLoaded(resolve, window[options && options.load && options.load.customCallback]);
33825
34079
  }).then(onMapsReady);
33826
34080
  return getLazyValue(function () {
33827
34081
  return promise;
@@ -36392,8 +36646,8 @@
36392
36646
  if (component.defaultQuery) {
36393
36647
  var defaultQuery = component.defaultQuery(currentValue, component);
36394
36648
  return _extends({
36395
- query: helper_15(defaultQuery)
36396
- }, helper_16(defaultQuery));
36649
+ query: helper_17(defaultQuery)
36650
+ }, helper_18(defaultQuery));
36397
36651
  }
36398
36652
 
36399
36653
  return component.source.defaultQuery ? {
@@ -36409,8 +36663,8 @@
36409
36663
  if (component.customQuery) {
36410
36664
  var customQuery = component.customQuery(currentValue, component);
36411
36665
  return _extends({
36412
- query: helper_15(customQuery)
36413
- }, helper_16(customQuery));
36666
+ query: helper_17(customQuery)
36667
+ }, helper_18(customQuery));
36414
36668
  }
36415
36669
 
36416
36670
  return component.source.defaultQuery ? {
@@ -36574,7 +36828,7 @@
36574
36828
  var react = component.react;
36575
36829
 
36576
36830
  if (isInternalComponentPresent || isResultComponent) {
36577
- react = helper_31(react, internalComponent);
36831
+ react = helper_33(react, internalComponent);
36578
36832
  }
36579
36833
 
36580
36834
  dependencyTree = dependencyTreeReducer(dependencyTree, {
@@ -36637,7 +36891,7 @@
36637
36891
 
36638
36892
  componentCollection.forEach(function (component) {
36639
36893
  // eslint-disable-next-line
36640
- var _buildQuery = helper_30(component.componentId, dependencyTree, queryList, queryOptions),
36894
+ var _buildQuery = helper_32(component.componentId, dependencyTree, queryList, queryOptions),
36641
36895
  queryObj = _buildQuery.queryObj,
36642
36896
  options = _buildQuery.options;
36643
36897
 
@@ -36705,7 +36959,7 @@
36705
36959
 
36706
36960
  aggregations = _extends({}, aggregations, (_extends4 = {}, _extends4[component] = response.aggregations, _extends4));
36707
36961
  compositeAggregations = compositeAggsReducer(compositeAggregations, {
36708
- type: constants_9,
36962
+ type: constants_10,
36709
36963
  aggregations: response.aggregations,
36710
36964
  append: false
36711
36965
  });
@@ -36847,7 +37101,7 @@
36847
37101
  });
36848
37102
  }
36849
37103
 
36850
- var version = "1.16.0-alpha.58";
37104
+ var version = "1.16.0-alpha.60";
36851
37105
 
36852
37106
  var _templateObject$q, _templateObject2$c;
36853
37107