@appbaseio/reactivesearch-vue 1.16.0-alpha.58 → 1.16.0-alpha.59
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.
- package/dist/@appbaseio/reactivesearch-vue.umd.js +532 -273
- package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js +7 -7
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
- package/dist/cjs/SingleRange.js +1 -1
- package/dist/cjs/StateProvider.js +28 -3
- package/dist/cjs/ToggleButton.js +1 -0
- package/dist/cjs/index.js +2 -1
- package/dist/cjs/{install-b494733c.js → install-a9aae115.js} +0 -0
- package/dist/cjs/install.js +2 -1
- package/dist/cjs/version.js +1 -1
- package/dist/es/SingleRange.js +1 -1
- package/dist/es/StateProvider.js +28 -3
- package/dist/es/ToggleButton.js +1 -0
- package/dist/es/index.js +3 -2
- package/dist/es/{install-cde230d4.js → install-686dd71d.js} +0 -0
- package/dist/es/install.js +2 -1
- package/dist/es/version.js +1 -1
- package/package.json +2 -2
|
@@ -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.
|
|
866
|
-
var constants_6 = constants.
|
|
867
|
-
var constants_7 = constants.
|
|
868
|
-
var constants_8 = constants.
|
|
869
|
-
var constants_9 = constants.
|
|
870
|
-
var constants_10 = constants.
|
|
871
|
-
var constants_11 = constants.
|
|
872
|
-
var constants_12 = constants.
|
|
873
|
-
var constants_13 = constants.
|
|
874
|
-
var constants_14 = constants.
|
|
875
|
-
var constants_15 = constants.
|
|
876
|
-
var constants_16 = constants.
|
|
877
|
-
var constants_17 = constants.
|
|
878
|
-
var constants_18 = constants.
|
|
879
|
-
var constants_19 = constants.
|
|
880
|
-
var constants_20 = constants.
|
|
881
|
-
var constants_21 = constants.
|
|
882
|
-
var constants_22 = constants.
|
|
883
|
-
var constants_23 = constants.
|
|
884
|
-
var constants_24 = constants.
|
|
885
|
-
var constants_25 = constants.
|
|
886
|
-
var constants_26 = constants.
|
|
887
|
-
var constants_27 = constants.
|
|
888
|
-
var constants_28 = constants.
|
|
889
|
-
var constants_29 = constants.
|
|
890
|
-
var constants_30 = constants.
|
|
891
|
-
var constants_31 = constants.
|
|
892
|
-
var constants_32 = constants.
|
|
893
|
-
var constants_33 = constants.
|
|
894
|
-
var constants_34 = constants.
|
|
895
|
-
var constants_35 = constants.
|
|
896
|
-
var constants_36 = constants.
|
|
897
|
-
var constants_37 = constants.
|
|
898
|
-
var constants_38 = constants.
|
|
899
|
-
var constants_39 = constants.
|
|
900
|
-
var constants_40 = constants.
|
|
901
|
-
var constants_41 = constants.
|
|
902
|
-
var constants_42 = constants.
|
|
903
|
-
var constants_43 = constants.
|
|
904
|
-
var constants_44 = constants.
|
|
905
|
-
var constants_45 = constants.
|
|
906
|
-
var constants_46 = constants.
|
|
907
|
-
var constants_47 = constants.
|
|
908
|
-
var constants_48 = constants.
|
|
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
|
-
|
|
5983
|
-
var value = createCommonjsModule(function (module, exports) {
|
|
5984
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5985
|
-
value: true
|
|
5986
|
-
});
|
|
5987
6003
|
|
|
5988
|
-
var
|
|
5989
|
-
|
|
5990
|
-
|
|
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;
|
|
5991
6010
|
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
target[key] = source[key];
|
|
5995
|
-
}
|
|
5996
|
-
}
|
|
6011
|
+
if (format === 'json') {
|
|
6012
|
+
dataToWrite = JSON.stringify(dataToWrite, 0, 4);
|
|
5997
6013
|
}
|
|
5998
6014
|
|
|
5999
|
-
|
|
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.
|
|
6003
|
-
|
|
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
|
-
}
|
|
6031
|
+
var flatten = exports.flatten = function flatten(data) {
|
|
6032
|
+
var result = {};
|
|
6019
6033
|
|
|
6020
|
-
|
|
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
|
+
function recurse(cur) {
|
|
6035
|
+
var prop = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
6034
6036
|
|
|
6035
|
-
|
|
6036
|
-
|
|
6037
|
-
|
|
6038
|
-
|
|
6039
|
-
|
|
6040
|
-
|
|
6041
|
-
|
|
6042
|
-
|
|
6043
|
-
|
|
6044
|
-
|
|
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
|
-
|
|
6069
|
-
|
|
6070
|
-
return;
|
|
6048
|
+
if (isEmpty && prop) {
|
|
6049
|
+
result[prop] = {};
|
|
6071
6050
|
}
|
|
6072
6051
|
}
|
|
6052
|
+
}
|
|
6073
6053
|
|
|
6074
|
-
|
|
6075
|
-
|
|
6076
|
-
|
|
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(
|
|
6154
|
-
var
|
|
6155
|
-
var
|
|
6156
|
-
var
|
|
6157
|
-
var
|
|
6158
|
-
var
|
|
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", {
|
|
@@ -15014,7 +15249,7 @@
|
|
|
15014
15249
|
filteredResults = [].concat(parsedPromotedResults, filteredResults);
|
|
15015
15250
|
}
|
|
15016
15251
|
|
|
15017
|
-
return
|
|
15252
|
+
return helper_11(filteredResults);
|
|
15018
15253
|
}
|
|
15019
15254
|
},
|
|
15020
15255
|
watch: {
|
|
@@ -17475,14 +17710,14 @@
|
|
|
17475
17710
|
this.updateState(this.$props);
|
|
17476
17711
|
},
|
|
17477
17712
|
analyticsConfig: function analyticsConfig(newVal, oldVal) {
|
|
17478
|
-
if (!
|
|
17713
|
+
if (!helper_28(newVal, oldVal)) {
|
|
17479
17714
|
if (this.store) {
|
|
17480
17715
|
this.store.dispatch(analytics_3$1(newVal));
|
|
17481
17716
|
}
|
|
17482
17717
|
}
|
|
17483
17718
|
},
|
|
17484
17719
|
appbaseConfig: function appbaseConfig(newVal, oldVal) {
|
|
17485
|
-
if (!
|
|
17720
|
+
if (!helper_28(newVal, oldVal)) {
|
|
17486
17721
|
if (this.store) {
|
|
17487
17722
|
this.store.dispatch(analytics_3$1(newVal));
|
|
17488
17723
|
}
|
|
@@ -20583,7 +20818,7 @@
|
|
|
20583
20818
|
// returns size and aggs property
|
|
20584
20819
|
getBasicQueryOptions: function getBasicQueryOptions() {
|
|
20585
20820
|
var aggregationField = this.$props.aggregationField;
|
|
20586
|
-
var queryOptions =
|
|
20821
|
+
var queryOptions = helper_31(this.$props);
|
|
20587
20822
|
|
|
20588
20823
|
if (aggregationField) {
|
|
20589
20824
|
queryOptions.aggs = getCompositeAggsQuery$1({
|
|
@@ -21947,7 +22182,7 @@
|
|
|
21947
22182
|
// returns size and aggs property
|
|
21948
22183
|
getBasicQueryOptions: function getBasicQueryOptions() {
|
|
21949
22184
|
var aggregationField = this.$props.aggregationField;
|
|
21950
|
-
var queryOptions =
|
|
22185
|
+
var queryOptions = helper_31(this.$props);
|
|
21951
22186
|
|
|
21952
22187
|
if (aggregationField) {
|
|
21953
22188
|
queryOptions.aggs = getCompositeAggsQuery$2({
|
|
@@ -22646,10 +22881,10 @@
|
|
|
22646
22881
|
var renderSuggestionsDropdown = function renderSuggestionsDropdown() {
|
|
22647
22882
|
var getIcon = function getIcon(iconType) {
|
|
22648
22883
|
switch (iconType) {
|
|
22649
|
-
case
|
|
22884
|
+
case helper_9.Recent:
|
|
22650
22885
|
return recentSearchesIcon;
|
|
22651
22886
|
|
|
22652
|
-
case
|
|
22887
|
+
case helper_9.Popular:
|
|
22653
22888
|
return popularSearchesIcon;
|
|
22654
22889
|
|
|
22655
22890
|
default:
|
|
@@ -25454,6 +25689,7 @@
|
|
|
25454
25689
|
name: 'ToggleButton',
|
|
25455
25690
|
props: {
|
|
25456
25691
|
componentId: types.stringRequired,
|
|
25692
|
+
customQuery: types.func,
|
|
25457
25693
|
data: types.data,
|
|
25458
25694
|
dataField: types.stringRequired,
|
|
25459
25695
|
defaultValue: types.any,
|
|
@@ -26402,7 +26638,7 @@
|
|
|
26402
26638
|
props = this.$props;
|
|
26403
26639
|
}
|
|
26404
26640
|
|
|
26405
|
-
var currentValue = SingleRange.parseValue(value, props);
|
|
26641
|
+
var currentValue = typeof value === 'string' ? SingleRange.parseValue(value, props) : value;
|
|
26406
26642
|
|
|
26407
26643
|
var performUpdate = function performUpdate() {
|
|
26408
26644
|
_this2.currentValue = currentValue;
|
|
@@ -27986,13 +28222,32 @@
|
|
|
27986
28222
|
if (this.isStateChanged(newVal, oldVal)) {
|
|
27987
28223
|
this.searchState = filterByKeys(getSearchState(filterProps(this.searchStateProps)), this.includeKeys);
|
|
27988
28224
|
}
|
|
28225
|
+
},
|
|
28226
|
+
setSearchState: function setSearchState(valuesMap) {
|
|
28227
|
+
if (valuesMap === void 0) {
|
|
28228
|
+
valuesMap = {};
|
|
28229
|
+
}
|
|
28230
|
+
|
|
28231
|
+
var components = this.components;
|
|
28232
|
+
var computedValuesMap = {};
|
|
28233
|
+
components.filter(function (component) {
|
|
28234
|
+
return !transform_11(component);
|
|
28235
|
+
}).forEach(function (component) {
|
|
28236
|
+
if (component in valuesMap) {
|
|
28237
|
+
computedValuesMap[component] = valuesMap[component];
|
|
28238
|
+
} else {
|
|
28239
|
+
computedValuesMap[component] = null;
|
|
28240
|
+
}
|
|
28241
|
+
});
|
|
28242
|
+
this.setValues(computedValuesMap);
|
|
27989
28243
|
}
|
|
27990
28244
|
},
|
|
27991
28245
|
render: function render() {
|
|
27992
28246
|
var searchState = this.searchState;
|
|
27993
28247
|
var dom = this.$scopedSlots["default"];
|
|
27994
28248
|
return dom ? dom({
|
|
27995
|
-
searchState: searchState
|
|
28249
|
+
searchState: searchState,
|
|
28250
|
+
setSearchState: this.setSearchState
|
|
27996
28251
|
}) : null;
|
|
27997
28252
|
}
|
|
27998
28253
|
};
|
|
@@ -28010,11 +28265,15 @@
|
|
|
28010
28265
|
promotedResults: filterByComponentIds(state.promotedResults, props),
|
|
28011
28266
|
customData: filterByComponentIds(state.customData, props),
|
|
28012
28267
|
settings: filterByComponentIds(state.settings, props),
|
|
28013
|
-
rawData: filterByComponentIds(state.rawData, props)
|
|
28268
|
+
rawData: filterByComponentIds(state.rawData, props),
|
|
28269
|
+
components: filterByComponentIds(state.components, props)
|
|
28014
28270
|
};
|
|
28015
28271
|
};
|
|
28016
28272
|
|
|
28017
|
-
var
|
|
28273
|
+
var mapDispatchtoProps$d = {
|
|
28274
|
+
setValues: value_6
|
|
28275
|
+
};
|
|
28276
|
+
var StateProviderConnected = connect(mapStateToProps$g, mapDispatchtoProps$d)(StateProvider);
|
|
28018
28277
|
|
|
28019
28278
|
StateProvider.install = function (Vue) {
|
|
28020
28279
|
Vue.component(StateProvider.name, StateProviderConnected);
|
|
@@ -36392,8 +36651,8 @@
|
|
|
36392
36651
|
if (component.defaultQuery) {
|
|
36393
36652
|
var defaultQuery = component.defaultQuery(currentValue, component);
|
|
36394
36653
|
return _extends({
|
|
36395
|
-
query:
|
|
36396
|
-
},
|
|
36654
|
+
query: helper_17(defaultQuery)
|
|
36655
|
+
}, helper_18(defaultQuery));
|
|
36397
36656
|
}
|
|
36398
36657
|
|
|
36399
36658
|
return component.source.defaultQuery ? {
|
|
@@ -36409,8 +36668,8 @@
|
|
|
36409
36668
|
if (component.customQuery) {
|
|
36410
36669
|
var customQuery = component.customQuery(currentValue, component);
|
|
36411
36670
|
return _extends({
|
|
36412
|
-
query:
|
|
36413
|
-
},
|
|
36671
|
+
query: helper_17(customQuery)
|
|
36672
|
+
}, helper_18(customQuery));
|
|
36414
36673
|
}
|
|
36415
36674
|
|
|
36416
36675
|
return component.source.defaultQuery ? {
|
|
@@ -36574,7 +36833,7 @@
|
|
|
36574
36833
|
var react = component.react;
|
|
36575
36834
|
|
|
36576
36835
|
if (isInternalComponentPresent || isResultComponent) {
|
|
36577
|
-
react =
|
|
36836
|
+
react = helper_33(react, internalComponent);
|
|
36578
36837
|
}
|
|
36579
36838
|
|
|
36580
36839
|
dependencyTree = dependencyTreeReducer(dependencyTree, {
|
|
@@ -36637,7 +36896,7 @@
|
|
|
36637
36896
|
|
|
36638
36897
|
componentCollection.forEach(function (component) {
|
|
36639
36898
|
// eslint-disable-next-line
|
|
36640
|
-
var _buildQuery =
|
|
36899
|
+
var _buildQuery = helper_32(component.componentId, dependencyTree, queryList, queryOptions),
|
|
36641
36900
|
queryObj = _buildQuery.queryObj,
|
|
36642
36901
|
options = _buildQuery.options;
|
|
36643
36902
|
|
|
@@ -36705,7 +36964,7 @@
|
|
|
36705
36964
|
|
|
36706
36965
|
aggregations = _extends({}, aggregations, (_extends4 = {}, _extends4[component] = response.aggregations, _extends4));
|
|
36707
36966
|
compositeAggregations = compositeAggsReducer(compositeAggregations, {
|
|
36708
|
-
type:
|
|
36967
|
+
type: constants_10,
|
|
36709
36968
|
aggregations: response.aggregations,
|
|
36710
36969
|
append: false
|
|
36711
36970
|
});
|
|
@@ -36847,7 +37106,7 @@
|
|
|
36847
37106
|
});
|
|
36848
37107
|
}
|
|
36849
37108
|
|
|
36850
|
-
var version = "1.16.0-alpha.
|
|
37109
|
+
var version = "1.16.0-alpha.59";
|
|
36851
37110
|
|
|
36852
37111
|
var _templateObject$q, _templateObject2$c;
|
|
36853
37112
|
|