@appbaseio/reactivesearch-vue 1.24.0 → 1.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@appbaseio/reactivesearch-vue.umd.js +310 -159
- package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js +5 -5
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
- package/dist/cjs/{DownShift-62e82255.js → CancelSvg-62d42af4.js} +57 -0
- package/dist/cjs/DataSearch.js +28 -79
- package/dist/cjs/{DropDown-6815b9b6.js → DropDown-5847d6e4.js} +59 -22
- package/dist/cjs/MultiDropdownList.js +11 -4
- package/dist/cjs/MultiList.js +3 -2
- package/dist/cjs/ReactiveBase.js +4 -2
- package/dist/cjs/ReactiveComponent.js +11 -11
- package/dist/cjs/ReactiveList.js +53 -41
- package/dist/cjs/SingleDropdownList.js +11 -4
- package/dist/cjs/SingleList.js +4 -3
- package/dist/cjs/ToggleButton.js +1 -1
- package/dist/cjs/index.js +5 -2
- package/dist/cjs/initReactivesearch.js +31 -12
- package/dist/cjs/install.js +3 -2
- package/dist/cjs/version.js +1 -1
- package/dist/es/{DownShift-3558d402.js → CancelSvg-e0cace2d.js} +54 -2
- package/dist/es/DataSearch.js +18 -69
- package/dist/es/{DropDown-035c804f.js → DropDown-1ee01031.js} +58 -21
- package/dist/es/MultiDropdownList.js +11 -4
- package/dist/es/MultiList.js +3 -2
- package/dist/es/ReactiveBase.js +4 -2
- package/dist/es/ReactiveComponent.js +11 -11
- package/dist/es/ReactiveList.js +53 -41
- package/dist/es/SingleDropdownList.js +11 -4
- package/dist/es/SingleList.js +4 -3
- package/dist/es/ToggleButton.js +1 -1
- package/dist/es/index.js +5 -2
- package/dist/es/initReactivesearch.js +31 -12
- package/dist/es/install.js +3 -2
- package/dist/es/version.js +1 -1
- package/package.json +3 -3
|
@@ -36,14 +36,9 @@
|
|
|
36
36
|
|
|
37
37
|
if (Object.getOwnPropertySymbols) {
|
|
38
38
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
keys.push.apply(keys, symbols);
|
|
39
|
+
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
40
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
41
|
+
})), keys.push.apply(keys, symbols);
|
|
47
42
|
}
|
|
48
43
|
|
|
49
44
|
return keys;
|
|
@@ -51,19 +46,12 @@
|
|
|
51
46
|
|
|
52
47
|
function _objectSpread2(target) {
|
|
53
48
|
for (var i = 1; i < arguments.length; i++) {
|
|
54
|
-
var source = arguments[i]
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
} else if (Object.getOwnPropertyDescriptors) {
|
|
61
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
62
|
-
} else {
|
|
63
|
-
ownKeys(Object(source)).forEach(function (key) {
|
|
64
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
65
|
-
});
|
|
66
|
-
}
|
|
49
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
50
|
+
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
51
|
+
_defineProperty(target, key, source[key]);
|
|
52
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
53
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
54
|
+
});
|
|
67
55
|
}
|
|
68
56
|
|
|
69
57
|
return target;
|
|
@@ -751,23 +739,36 @@
|
|
|
751
739
|
createStore: createStore
|
|
752
740
|
});
|
|
753
741
|
|
|
742
|
+
/** A function that accepts a potential "extra argument" value to be injected later,
|
|
743
|
+
* and returns an instance of the thunk middleware that uses that value
|
|
744
|
+
*/
|
|
754
745
|
function createThunkMiddleware(extraArgument) {
|
|
755
|
-
|
|
746
|
+
// Standard Redux middleware definition pattern:
|
|
747
|
+
// See: https://redux.js.org/tutorials/fundamentals/part-4-store#writing-custom-middleware
|
|
748
|
+
var middleware = function middleware(_ref) {
|
|
756
749
|
var dispatch = _ref.dispatch,
|
|
757
750
|
getState = _ref.getState;
|
|
758
751
|
return function (next) {
|
|
759
752
|
return function (action) {
|
|
753
|
+
// The thunk middleware looks for any functions that were passed to `store.dispatch`.
|
|
754
|
+
// If this "action" is really a function, call it and return the result.
|
|
760
755
|
if (typeof action === 'function') {
|
|
756
|
+
// Inject the store's `dispatch` and `getState` methods, as well as any "extra arg"
|
|
761
757
|
return action(dispatch, getState, extraArgument);
|
|
762
|
-
}
|
|
758
|
+
} // Otherwise, pass the action down the middleware chain as usual
|
|
759
|
+
|
|
763
760
|
|
|
764
761
|
return next(action);
|
|
765
762
|
};
|
|
766
763
|
};
|
|
767
764
|
};
|
|
765
|
+
|
|
766
|
+
return middleware;
|
|
768
767
|
}
|
|
769
768
|
|
|
770
|
-
var thunk = createThunkMiddleware();
|
|
769
|
+
var thunk = createThunkMiddleware(); // Attach the factory function so users can create a customized version
|
|
770
|
+
// with whatever "extra arg" they want to inject into their thunks
|
|
771
|
+
|
|
771
772
|
thunk.withExtraArgument = createThunkMiddleware;
|
|
772
773
|
|
|
773
774
|
var constants = createCommonjsModule(function (module, exports) {
|
|
@@ -1193,6 +1194,7 @@
|
|
|
1193
1194
|
reactiveList: 'REACTIVELIST',
|
|
1194
1195
|
dataSearch: 'DATASEARCH',
|
|
1195
1196
|
categorySearch: 'CATEGORYSEARCH',
|
|
1197
|
+
searchBox: 'SUGGESTION',
|
|
1196
1198
|
singleList: 'SINGLELIST',
|
|
1197
1199
|
multiList: 'MULTILIST',
|
|
1198
1200
|
singleDataList: 'SINGLEDATALIST',
|
|
@@ -1221,9 +1223,10 @@
|
|
|
1221
1223
|
search: 'search',
|
|
1222
1224
|
term: 'term',
|
|
1223
1225
|
range: 'range',
|
|
1224
|
-
geo: 'geo'
|
|
1226
|
+
geo: 'geo',
|
|
1227
|
+
suggestion: 'suggestion'
|
|
1225
1228
|
};
|
|
1226
|
-
var validProps = exports.validProps = ['componentType', 'aggregationField', 'aggregationSize', 'distinctField', 'distinctFieldConfig', 'index', 'dataField', 'includeFields', 'excludeFields', 'size', 'from', 'sortBy', 'sortOptions', 'pagination', 'autoFocus', 'autosuggest', 'debounce', 'defaultValue', 'defaultSuggestions', 'fieldWeights', 'filterLabel', 'fuzziness', 'highlight', 'highlightField', 'nestedField', 'placeholder', 'queryFormat', 'searchOperators', 'enableSynonyms', 'enableQuerySuggestions', 'enablePopularSuggestions', 'queryString', 'categoryField', 'strictSelection', 'selectAllLabel', 'showCheckbox', 'showFilter', 'showSearch', 'showCount', 'showLoadMore', 'loadMoreLabel', 'showMissing', 'missingLabel', 'data', 'showRadio', 'multiSelect', 'includeNullValues', 'interval', 'showHistogram', 'snap', 'stepValue', 'range', 'showSlider', 'parseDate', 'unit'];
|
|
1229
|
+
var validProps = exports.validProps = ['componentType', 'aggregationField', 'aggregationSize', 'distinctField', 'distinctFieldConfig', 'index', 'dataField', 'includeFields', 'excludeFields', 'size', 'from', 'sortBy', 'sortOptions', 'pagination', 'autoFocus', 'autosuggest', 'debounce', 'defaultValue', 'defaultSuggestions', 'fieldWeights', 'filterLabel', 'fuzziness', 'highlight', 'highlightField', 'nestedField', 'placeholder', 'queryFormat', 'searchOperators', 'enableSynonyms', 'enableQuerySuggestions', 'enablePopularSuggestions', 'queryString', 'categoryField', 'strictSelection', 'selectAllLabel', 'showCheckbox', 'showFilter', 'showSearch', 'showCount', 'showLoadMore', 'loadMoreLabel', 'showMissing', 'missingLabel', 'data', 'showRadio', 'multiSelect', 'includeNullValues', 'interval', 'showHistogram', 'snap', 'stepValue', 'range', 'showSlider', 'parseDate', 'calendarInterval', 'unit', 'enablePopularSuggestions', 'popularSuggestionsConfig', 'enableRecentSuggestions', 'recentSuggestionsConfig', 'enablePredictiveSuggestions', 'applyStopwords', 'customStopwords'];
|
|
1227
1230
|
var CLEAR_ALL = exports.CLEAR_ALL = {
|
|
1228
1231
|
NEVER: 'never',
|
|
1229
1232
|
ALWAYS: 'always',
|
|
@@ -2749,7 +2752,12 @@
|
|
|
2749
2752
|
var aggsResponse = Object.values(action.aggregations) && Object.values(action.aggregations)[0];
|
|
2750
2753
|
var fieldName = Object.keys(action.aggregations)[0];
|
|
2751
2754
|
if (!aggsResponse) return state;
|
|
2752
|
-
var buckets =
|
|
2755
|
+
var buckets = [];
|
|
2756
|
+
|
|
2757
|
+
if (aggsResponse.buckets && Array.isArray(aggsResponse.buckets)) {
|
|
2758
|
+
buckets = aggsResponse.buckets;
|
|
2759
|
+
}
|
|
2760
|
+
|
|
2753
2761
|
var parsedAggs = buckets.map(function (bucket) {
|
|
2754
2762
|
var doc_count = bucket.doc_count,
|
|
2755
2763
|
key = bucket.key,
|
|
@@ -2765,7 +2773,7 @@
|
|
|
2765
2773
|
|
|
2766
2774
|
return _extends({
|
|
2767
2775
|
_doc_count: doc_count,
|
|
2768
|
-
_key: key[fieldName],
|
|
2776
|
+
_key: typeof key === 'string' ? key : key[fieldName],
|
|
2769
2777
|
top_hits: hitsData
|
|
2770
2778
|
}, flatData, _source);
|
|
2771
2779
|
});
|
|
@@ -2775,7 +2783,7 @@
|
|
|
2775
2783
|
return state;
|
|
2776
2784
|
}
|
|
2777
2785
|
});
|
|
2778
|
-
unwrapExports(compositeAggsReducer_1);
|
|
2786
|
+
var compositeAggsReducer = unwrapExports(compositeAggsReducer_1);
|
|
2779
2787
|
|
|
2780
2788
|
var appliedSettingsReducer_1 = createCommonjsModule(function (module, exports) {
|
|
2781
2789
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4557,6 +4565,8 @@
|
|
|
4557
4565
|
return target;
|
|
4558
4566
|
};
|
|
4559
4567
|
|
|
4568
|
+
exports.replaceDiacritics = replaceDiacritics;
|
|
4569
|
+
|
|
4560
4570
|
var _diacritics2 = _interopRequireDefault(diacritics_1);
|
|
4561
4571
|
|
|
4562
4572
|
function _interopRequireDefault(obj) {
|
|
@@ -4834,6 +4844,7 @@
|
|
|
4834
4844
|
exports["default"] = getSuggestions;
|
|
4835
4845
|
});
|
|
4836
4846
|
unwrapExports(suggestions);
|
|
4847
|
+
var suggestions_1 = suggestions.replaceDiacritics;
|
|
4837
4848
|
|
|
4838
4849
|
var helper = createCommonjsModule(function (module, exports) {
|
|
4839
4850
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4867,6 +4878,7 @@
|
|
|
4867
4878
|
exports.extractFieldsFromSource = extractFieldsFromSource;
|
|
4868
4879
|
exports.normalizeDataField = normalizeDataField;
|
|
4869
4880
|
exports.handleOnSuggestions = handleOnSuggestions;
|
|
4881
|
+
exports.isValidDateRangeQueryFormat = isValidDateRangeQueryFormat;
|
|
4870
4882
|
|
|
4871
4883
|
var _dateFormats2 = _interopRequireDefault(dateFormats_1);
|
|
4872
4884
|
|
|
@@ -5255,7 +5267,7 @@
|
|
|
5255
5267
|
case 'epoch_millis':
|
|
5256
5268
|
return date.getTime();
|
|
5257
5269
|
|
|
5258
|
-
case '
|
|
5270
|
+
case 'epoch_second':
|
|
5259
5271
|
return Math.floor(date.getTime() / 1000);
|
|
5260
5272
|
|
|
5261
5273
|
default:
|
|
@@ -5648,6 +5660,10 @@
|
|
|
5648
5660
|
});
|
|
5649
5661
|
return withClickIds(finalSuggestions);
|
|
5650
5662
|
};
|
|
5663
|
+
|
|
5664
|
+
function isValidDateRangeQueryFormat(queryFormat) {
|
|
5665
|
+
return Object.keys(_dateFormats2["default"]).includes(queryFormat);
|
|
5666
|
+
}
|
|
5651
5667
|
});
|
|
5652
5668
|
unwrapExports(helper);
|
|
5653
5669
|
var helper_1 = helper.getTopSuggestions;
|
|
@@ -5678,6 +5694,7 @@
|
|
|
5678
5694
|
var helper_26 = helper.extractFieldsFromSource;
|
|
5679
5695
|
var helper_27 = helper.normalizeDataField;
|
|
5680
5696
|
var helper_28 = helper.handleOnSuggestions;
|
|
5697
|
+
var helper_29 = helper.isValidDateRangeQueryFormat;
|
|
5681
5698
|
|
|
5682
5699
|
var value = createCommonjsModule(function (module, exports) {
|
|
5683
5700
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6036,6 +6053,7 @@
|
|
|
6036
6053
|
exports.updateCompositeAggs = updateCompositeAggs;
|
|
6037
6054
|
exports.updateHits = updateHits;
|
|
6038
6055
|
exports.saveQueryToHits = saveQueryToHits;
|
|
6056
|
+
exports.mockDataForTesting = mockDataForTesting;
|
|
6039
6057
|
|
|
6040
6058
|
function updateAggs(component, aggregations) {
|
|
6041
6059
|
var append = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
@@ -6077,12 +6095,25 @@
|
|
|
6077
6095
|
query: query
|
|
6078
6096
|
};
|
|
6079
6097
|
}
|
|
6098
|
+
|
|
6099
|
+
function mockDataForTesting(component, data) {
|
|
6100
|
+
return function (dispatch) {
|
|
6101
|
+
if (data.hasOwnProperty('aggregations')) {
|
|
6102
|
+
dispatch(updateAggs(component, data.aggregations));
|
|
6103
|
+
}
|
|
6104
|
+
|
|
6105
|
+
if (data.hasOwnProperty('hits')) {
|
|
6106
|
+
dispatch(updateHits(component, data, data.time || undefined));
|
|
6107
|
+
}
|
|
6108
|
+
};
|
|
6109
|
+
}
|
|
6080
6110
|
});
|
|
6081
6111
|
unwrapExports(hits);
|
|
6082
6112
|
var hits_1 = hits.updateAggs;
|
|
6083
6113
|
var hits_2 = hits.updateCompositeAggs;
|
|
6084
6114
|
var hits_3 = hits.updateHits;
|
|
6085
6115
|
var hits_4 = hits.saveQueryToHits;
|
|
6116
|
+
var hits_5 = hits.mockDataForTesting;
|
|
6086
6117
|
|
|
6087
6118
|
var xdate = createCommonjsModule(function (module) {
|
|
6088
6119
|
/**
|
|
@@ -6910,6 +6941,8 @@
|
|
|
6910
6941
|
|
|
6911
6942
|
var _xdate2 = _interopRequireDefault(xdate);
|
|
6912
6943
|
|
|
6944
|
+
var _dateFormats2 = _interopRequireDefault(dateFormats_1);
|
|
6945
|
+
|
|
6913
6946
|
function _interopRequireDefault(obj) {
|
|
6914
6947
|
return obj && obj.__esModule ? obj : {
|
|
6915
6948
|
"default": obj
|
|
@@ -6943,10 +6976,10 @@
|
|
|
6943
6976
|
return obj;
|
|
6944
6977
|
}
|
|
6945
6978
|
|
|
6946
|
-
var componentToTypeMap = exports.componentToTypeMap = (_componentToTypeMap = {}, _defineProperty(_componentToTypeMap, constants$1.componentTypes.reactiveList, constants$1.queryTypes.search), _defineProperty(_componentToTypeMap, constants$1.componentTypes.dataSearch, constants$1.queryTypes.search), _defineProperty(_componentToTypeMap, constants$1.componentTypes.categorySearch, constants$1.queryTypes.search), _defineProperty(_componentToTypeMap, constants$1.componentTypes.singleList, constants$1.queryTypes.term), _defineProperty(_componentToTypeMap, constants$1.componentTypes.multiList, constants$1.queryTypes.term), _defineProperty(_componentToTypeMap, constants$1.componentTypes.singleDataList, constants$1.queryTypes.term), _defineProperty(_componentToTypeMap, constants$1.componentTypes.singleDropdownList, constants$1.queryTypes.term), _defineProperty(_componentToTypeMap, constants$1.componentTypes.multiDataList, constants$1.queryTypes.term), _defineProperty(_componentToTypeMap, constants$1.componentTypes.multiDropdownList, constants$1.queryTypes.term), _defineProperty(_componentToTypeMap, constants$1.componentTypes.tagCloud, constants$1.queryTypes.term), _defineProperty(_componentToTypeMap, constants$1.componentTypes.toggleButton, constants$1.queryTypes.term), _defineProperty(_componentToTypeMap, constants$1.componentTypes.numberBox, constants$1.queryTypes.term), _defineProperty(_componentToTypeMap, constants$1.componentTypes.datePicker, constants$1.queryTypes.range), _defineProperty(_componentToTypeMap, constants$1.componentTypes.dateRange, constants$1.queryTypes.range), _defineProperty(_componentToTypeMap, constants$1.componentTypes.dynamicRangeSlider, constants$1.queryTypes.range), _defineProperty(_componentToTypeMap, constants$1.componentTypes.singleDropdownRange, constants$1.queryTypes.range), _defineProperty(_componentToTypeMap, constants$1.componentTypes.multiDropdownRange, constants$1.queryTypes.range), _defineProperty(_componentToTypeMap, constants$1.componentTypes.singleRange, constants$1.queryTypes.range), _defineProperty(_componentToTypeMap, constants$1.componentTypes.multiRange, constants$1.queryTypes.range), _defineProperty(_componentToTypeMap, constants$1.componentTypes.rangeSlider, constants$1.queryTypes.range), _defineProperty(_componentToTypeMap, constants$1.componentTypes.ratingsFilter, constants$1.queryTypes.range), _defineProperty(_componentToTypeMap, constants$1.componentTypes.rangeInput, constants$1.queryTypes.range), _defineProperty(_componentToTypeMap, constants$1.componentTypes.geoDistanceDropdown, constants$1.queryTypes.geo), _defineProperty(_componentToTypeMap, constants$1.componentTypes.geoDistanceSlider, constants$1.queryTypes.geo), _defineProperty(_componentToTypeMap, constants$1.componentTypes.reactiveMap, constants$1.queryTypes.geo), _componentToTypeMap);
|
|
6979
|
+
var componentToTypeMap = exports.componentToTypeMap = (_componentToTypeMap = {}, _defineProperty(_componentToTypeMap, constants$1.componentTypes.reactiveList, constants$1.queryTypes.search), _defineProperty(_componentToTypeMap, constants$1.componentTypes.dataSearch, constants$1.queryTypes.search), _defineProperty(_componentToTypeMap, constants$1.componentTypes.categorySearch, constants$1.queryTypes.search), _defineProperty(_componentToTypeMap, constants$1.componentTypes.searchBox, constants$1.queryTypes.suggestion), _defineProperty(_componentToTypeMap, constants$1.componentTypes.singleList, constants$1.queryTypes.term), _defineProperty(_componentToTypeMap, constants$1.componentTypes.multiList, constants$1.queryTypes.term), _defineProperty(_componentToTypeMap, constants$1.componentTypes.singleDataList, constants$1.queryTypes.term), _defineProperty(_componentToTypeMap, constants$1.componentTypes.singleDropdownList, constants$1.queryTypes.term), _defineProperty(_componentToTypeMap, constants$1.componentTypes.multiDataList, constants$1.queryTypes.term), _defineProperty(_componentToTypeMap, constants$1.componentTypes.multiDropdownList, constants$1.queryTypes.term), _defineProperty(_componentToTypeMap, constants$1.componentTypes.tagCloud, constants$1.queryTypes.term), _defineProperty(_componentToTypeMap, constants$1.componentTypes.toggleButton, constants$1.queryTypes.term), _defineProperty(_componentToTypeMap, constants$1.componentTypes.numberBox, constants$1.queryTypes.term), _defineProperty(_componentToTypeMap, constants$1.componentTypes.datePicker, constants$1.queryTypes.range), _defineProperty(_componentToTypeMap, constants$1.componentTypes.dateRange, constants$1.queryTypes.range), _defineProperty(_componentToTypeMap, constants$1.componentTypes.dynamicRangeSlider, constants$1.queryTypes.range), _defineProperty(_componentToTypeMap, constants$1.componentTypes.singleDropdownRange, constants$1.queryTypes.range), _defineProperty(_componentToTypeMap, constants$1.componentTypes.multiDropdownRange, constants$1.queryTypes.range), _defineProperty(_componentToTypeMap, constants$1.componentTypes.singleRange, constants$1.queryTypes.range), _defineProperty(_componentToTypeMap, constants$1.componentTypes.multiRange, constants$1.queryTypes.range), _defineProperty(_componentToTypeMap, constants$1.componentTypes.rangeSlider, constants$1.queryTypes.range), _defineProperty(_componentToTypeMap, constants$1.componentTypes.ratingsFilter, constants$1.queryTypes.range), _defineProperty(_componentToTypeMap, constants$1.componentTypes.rangeInput, constants$1.queryTypes.range), _defineProperty(_componentToTypeMap, constants$1.componentTypes.geoDistanceDropdown, constants$1.queryTypes.geo), _defineProperty(_componentToTypeMap, constants$1.componentTypes.geoDistanceSlider, constants$1.queryTypes.geo), _defineProperty(_componentToTypeMap, constants$1.componentTypes.reactiveMap, constants$1.queryTypes.geo), _componentToTypeMap);
|
|
6947
6980
|
var multiRangeComponents = [constants$1.componentTypes.multiRange, constants$1.componentTypes.multiDropdownRange];
|
|
6948
6981
|
var dateRangeComponents = [constants$1.componentTypes.dateRange, constants$1.componentTypes.datePicker];
|
|
6949
|
-
var searchComponents = [constants$1.componentTypes.categorySearch, constants$1.componentTypes.dataSearch];
|
|
6982
|
+
var searchComponents = [constants$1.componentTypes.categorySearch, constants$1.componentTypes.dataSearch, constants$1.componentTypes.searchBox];
|
|
6950
6983
|
var listComponentsWithPagination = [constants$1.componentTypes.singleList, constants$1.componentTypes.multiList, constants$1.componentTypes.singleDropdownList, constants$1.componentTypes.multiDropdownList];
|
|
6951
6984
|
|
|
6952
6985
|
var getNormalizedField = exports.getNormalizedField = function getNormalizedField(field) {
|
|
@@ -7002,7 +7035,7 @@
|
|
|
7002
7035
|
return null;
|
|
7003
7036
|
}
|
|
7004
7037
|
|
|
7005
|
-
return {
|
|
7038
|
+
return _extends({
|
|
7006
7039
|
id: componentId,
|
|
7007
7040
|
type: queryType,
|
|
7008
7041
|
dataField: getNormalizedField(props.dataField),
|
|
@@ -7041,7 +7074,17 @@
|
|
|
7041
7074
|
distinctField: props.distinctField,
|
|
7042
7075
|
distinctFieldConfig: props.distinctFieldConfig,
|
|
7043
7076
|
index: props.index
|
|
7044
|
-
}
|
|
7077
|
+
}, queryType === constants$1.queryTypes.suggestion ? {
|
|
7078
|
+
enablePopularSuggestions: props.enablePopularSuggestions,
|
|
7079
|
+
enableRecentSuggestions: props.enableRecentSuggestions,
|
|
7080
|
+
popularSuggestionsConfig: props.popularSuggestionsConfig,
|
|
7081
|
+
recentSuggestionsConfig: props.recentSuggestionsConfig,
|
|
7082
|
+
applyStopwords: props.applyStopwords,
|
|
7083
|
+
customStopwords: props.customStopwords,
|
|
7084
|
+
enablePredictiveSuggestions: props.enablePredictiveSuggestions
|
|
7085
|
+
} : {}, {
|
|
7086
|
+
calendarInterval: props.calendarInterval
|
|
7087
|
+
});
|
|
7045
7088
|
}
|
|
7046
7089
|
|
|
7047
7090
|
return null;
|
|
@@ -7071,6 +7114,7 @@
|
|
|
7071
7114
|
var calcValues = store.selectedValues[component] || store.internalValues[component];
|
|
7072
7115
|
var value = calcValues !== undefined && calcValues !== null ? calcValues.value : undefined;
|
|
7073
7116
|
var queryFormat = componentProps.queryFormat;
|
|
7117
|
+
var calendarInterval = void 0;
|
|
7074
7118
|
var interval = componentProps.interval;
|
|
7075
7119
|
var type = componentToTypeMap[componentProps.componentType];
|
|
7076
7120
|
var dataField = componentProps.dataField;
|
|
@@ -7139,6 +7183,24 @@
|
|
|
7139
7183
|
aggregations = ['histogram'];
|
|
7140
7184
|
}
|
|
7141
7185
|
|
|
7186
|
+
if (componentProps.componentType === constants$1.componentTypes.dynamicRangeSlider || componentProps.componentType === constants$1.componentTypes.rangeSlider) {
|
|
7187
|
+
calendarInterval = Object.keys(_dateFormats2["default"]).includes(queryFormat) ? componentProps.calendarInterval || 'month' : undefined;
|
|
7188
|
+
|
|
7189
|
+
if (value) {
|
|
7190
|
+
if ((0, helper.isValidDateRangeQueryFormat)(componentProps.queryFormat)) {
|
|
7191
|
+
value = {
|
|
7192
|
+
start: (0, helper.formatDate)(new _xdate2["default"](value.start), componentProps),
|
|
7193
|
+
end: (0, helper.formatDate)(new _xdate2["default"](value.end), componentProps)
|
|
7194
|
+
};
|
|
7195
|
+
} else {
|
|
7196
|
+
value = {
|
|
7197
|
+
start: parseFloat(value.start),
|
|
7198
|
+
end: parseFloat(value.end)
|
|
7199
|
+
};
|
|
7200
|
+
}
|
|
7201
|
+
}
|
|
7202
|
+
}
|
|
7203
|
+
|
|
7142
7204
|
if (dateRangeComponents.includes(componentProps.componentType)) {
|
|
7143
7205
|
queryFormat = 'or';
|
|
7144
7206
|
|
|
@@ -7261,6 +7323,7 @@
|
|
|
7261
7323
|
}
|
|
7262
7324
|
|
|
7263
7325
|
return _extends({}, componentProps, {
|
|
7326
|
+
calendarInterval: calendarInterval,
|
|
7264
7327
|
dataField: dataField,
|
|
7265
7328
|
queryFormat: queryFormat,
|
|
7266
7329
|
type: type,
|
|
@@ -7271,7 +7334,7 @@
|
|
|
7271
7334
|
defaultQuery: store.defaultQueries ? store.defaultQueries[component] : undefined,
|
|
7272
7335
|
customHighlight: store.customHighlightOptions ? store.customHighlightOptions[component] : undefined,
|
|
7273
7336
|
categoryValue: store.internalValues[component] ? store.internalValues[component].category : undefined,
|
|
7274
|
-
value: value,
|
|
7337
|
+
value: componentProps.componentType === constants$1.componentTypes.searchBox ? value || undefined : value,
|
|
7275
7338
|
pagination: pagination,
|
|
7276
7339
|
from: from
|
|
7277
7340
|
}, customOptions);
|
|
@@ -7307,7 +7370,8 @@
|
|
|
7307
7370
|
var orderOfQueries = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
7308
7371
|
var finalQuery = {};
|
|
7309
7372
|
var react = flatReactProp(store.dependencyTree[componentID], componentID);
|
|
7310
|
-
react.forEach(function (
|
|
7373
|
+
react.forEach(function (componentObject) {
|
|
7374
|
+
var component = componentObject;
|
|
7311
7375
|
var customQuery = store.customQueries[component];
|
|
7312
7376
|
|
|
7313
7377
|
if (!isInternalComponent(component)) {
|
|
@@ -7320,7 +7384,11 @@
|
|
|
7320
7384
|
execute = true;
|
|
7321
7385
|
}
|
|
7322
7386
|
|
|
7323
|
-
var dependentQuery = getRSQuery(component, extractPropsFromState(store, component
|
|
7387
|
+
var dependentQuery = getRSQuery(component, extractPropsFromState(store, component, _extends({}, store.props[component].componentType === constants$1.componentTypes.searchBox ? _extends({}, execute === false ? {
|
|
7388
|
+
type: constants$1.queryTypes.search
|
|
7389
|
+
} : {}, calcValues.category ? {
|
|
7390
|
+
categoryValue: calcValues.category
|
|
7391
|
+
} : {}) : {})), execute);
|
|
7324
7392
|
|
|
7325
7393
|
if (dependentQuery) {
|
|
7326
7394
|
finalQuery[component] = dependentQuery;
|
|
@@ -13948,9 +14016,14 @@
|
|
|
13948
14016
|
}
|
|
13949
14017
|
|
|
13950
14018
|
this.internalComponent = this.$props.componentId + "__internal";
|
|
13951
|
-
this.sortOptionIndex =
|
|
13952
|
-
|
|
13953
|
-
|
|
14019
|
+
this.sortOptionIndex = 0;
|
|
14020
|
+
|
|
14021
|
+
if (this.defaultSortOption && this.sortOptions && Array.isArray(this.sortOptions)) {
|
|
14022
|
+
this.sortOptionIndex = this.sortOptions.findIndex(function (s) {
|
|
14023
|
+
return s.label === _this.defaultSortOption;
|
|
14024
|
+
});
|
|
14025
|
+
}
|
|
14026
|
+
|
|
13954
14027
|
this.updateComponentProps(this.componentId, {
|
|
13955
14028
|
from: this.from
|
|
13956
14029
|
}, constants_1$1.reactiveList);
|
|
@@ -13960,7 +14033,7 @@
|
|
|
13960
14033
|
},
|
|
13961
14034
|
props: {
|
|
13962
14035
|
currentPage: VueTypes.number.def(0),
|
|
13963
|
-
includeFields: types.includeFields
|
|
14036
|
+
includeFields: types.includeFields,
|
|
13964
14037
|
// component props
|
|
13965
14038
|
className: types.string,
|
|
13966
14039
|
componentId: types.stringRequired,
|
|
@@ -13969,7 +14042,7 @@
|
|
|
13969
14042
|
aggregationSize: VueTypes.number,
|
|
13970
14043
|
defaultQuery: types.func,
|
|
13971
14044
|
defaultSortOption: types.string,
|
|
13972
|
-
excludeFields: types.excludeFields
|
|
14045
|
+
excludeFields: types.excludeFields,
|
|
13973
14046
|
innerClass: types.style,
|
|
13974
14047
|
listClass: VueTypes.string.def(''),
|
|
13975
14048
|
loader: types.title,
|
|
@@ -13981,7 +14054,7 @@
|
|
|
13981
14054
|
pages: VueTypes.number.def(5),
|
|
13982
14055
|
pagination: VueTypes.bool.def(false),
|
|
13983
14056
|
infiniteScroll: VueTypes.bool.def(true),
|
|
13984
|
-
paginationAt:
|
|
14057
|
+
paginationAt: VueTypes.oneOf(['top', 'bottom', 'both']).def('bottom'),
|
|
13985
14058
|
react: types.react,
|
|
13986
14059
|
scrollOnChange: VueTypes.bool.def(true),
|
|
13987
14060
|
showResultStats: VueTypes.bool.def(true),
|
|
@@ -14182,11 +14255,11 @@
|
|
|
14182
14255
|
var options = getQueryOptions(this.$props);
|
|
14183
14256
|
options.from = this.$data.from;
|
|
14184
14257
|
|
|
14185
|
-
if (this
|
|
14258
|
+
if (this.sortOptions && this.sortOptions[this.sortOptionIndex]) {
|
|
14186
14259
|
var _ref2;
|
|
14187
14260
|
|
|
14188
|
-
var sortField = this
|
|
14189
|
-
var sortBy = this
|
|
14261
|
+
var sortField = this.sortOptions[this.sortOptionIndex].dataField;
|
|
14262
|
+
var sortBy = this.sortOptions[this.sortOptionIndex].sortBy;
|
|
14190
14263
|
options.sort = [(_ref2 = {}, _ref2[sortField] = {
|
|
14191
14264
|
order: sortBy
|
|
14192
14265
|
}, _ref2)]; // To handle sort options for RS API
|
|
@@ -14256,10 +14329,10 @@
|
|
|
14256
14329
|
"class": this.$props.className
|
|
14257
14330
|
}, [this.isLoading && this.shouldRenderPagination && this.showInfiniteScroll && (this.$scopedSlots.loader || this.$props.loader), this.renderErrorComponent(), h(Flex, {
|
|
14258
14331
|
"attrs": {
|
|
14259
|
-
"labelPosition": this
|
|
14332
|
+
"labelPosition": this.sortOptions ? 'right' : 'left'
|
|
14260
14333
|
},
|
|
14261
14334
|
"class": getClassName$1(this.$props.innerClass, 'resultsInfo')
|
|
14262
|
-
}, [this
|
|
14335
|
+
}, [this.sortOptions ? this.renderSortOptions() : null, this.$props.showResultStats && results.length ? this.renderStats() : null]), !this.isLoading && results.length === 0 ? this.renderNoResult() : null, this.shouldRenderPagination && (this.$props.paginationAt === 'top' || this.$props.paginationAt === 'both') ? h(Pagination, {
|
|
14263
14336
|
"attrs": {
|
|
14264
14337
|
"pages": this.$props.pages,
|
|
14265
14338
|
"totalPages": this.totalPages,
|
|
@@ -14330,15 +14403,18 @@
|
|
|
14330
14403
|
var options = getQueryOptions(props);
|
|
14331
14404
|
options.from = this.$data.from;
|
|
14332
14405
|
|
|
14333
|
-
if (props.sortOptions) {
|
|
14334
|
-
var _ref5;
|
|
14335
|
-
|
|
14406
|
+
if (props.sortOptions && Array.isArray(props.sortOptions)) {
|
|
14336
14407
|
var sortOptionIndex = props.defaultSortOption ? props.sortOptions.findIndex(function (s) {
|
|
14337
14408
|
return s.label === props.defaultSortOption;
|
|
14338
14409
|
}) : 0;
|
|
14339
|
-
|
|
14340
|
-
|
|
14341
|
-
|
|
14410
|
+
|
|
14411
|
+
if (props.sortOptions[sortOptionIndex]) {
|
|
14412
|
+
var _ref5;
|
|
14413
|
+
|
|
14414
|
+
options.sort = [(_ref5 = {}, _ref5[props.sortOptions[sortOptionIndex].dataField] = {
|
|
14415
|
+
order: props.sortOptions[sortOptionIndex].sortBy
|
|
14416
|
+
}, _ref5)];
|
|
14417
|
+
}
|
|
14342
14418
|
} else if (props.sortBy) {
|
|
14343
14419
|
var _ref6;
|
|
14344
14420
|
|
|
@@ -14434,31 +14510,39 @@
|
|
|
14434
14510
|
renderNoResult: function renderNoResult() {
|
|
14435
14511
|
var h = this.$createElement;
|
|
14436
14512
|
var renderNoResults = this.$scopedSlots.renderNoResults || this.$props.renderNoResults;
|
|
14513
|
+
|
|
14514
|
+
if (this.$scopedSlots.renderNoResults) {
|
|
14515
|
+
return isFunction$1(renderNoResults) ? renderNoResults() : renderNoResults;
|
|
14516
|
+
}
|
|
14517
|
+
|
|
14437
14518
|
return h("p", {
|
|
14438
14519
|
"class": getClassName$1(this.$props.innerClass, 'noResults') || null
|
|
14439
14520
|
}, [isFunction$1(renderNoResults) ? renderNoResults() : renderNoResults]);
|
|
14440
14521
|
},
|
|
14441
14522
|
handleSortChange: function handleSortChange(e) {
|
|
14442
|
-
var
|
|
14523
|
+
var index = e.target.value;
|
|
14443
14524
|
|
|
14444
|
-
|
|
14445
|
-
|
|
14446
|
-
var options = getQueryOptions(this.$props);
|
|
14447
|
-
options.from = 0;
|
|
14448
|
-
var sortField = this.$props.sortOptions[index].dataField;
|
|
14449
|
-
var sortBy = this.$props.sortOptions[index].sortBy;
|
|
14450
|
-
options.sort = [(_ref7 = {}, _ref7[sortField] = {
|
|
14451
|
-
order: sortBy
|
|
14452
|
-
}, _ref7)];
|
|
14453
|
-
this.sortOptionIndex = index; // To handle sort options for RS API
|
|
14525
|
+
if (this.sortOptions && this.sortOptions[index]) {
|
|
14526
|
+
var _ref7;
|
|
14454
14527
|
|
|
14455
|
-
|
|
14456
|
-
|
|
14457
|
-
|
|
14458
|
-
|
|
14459
|
-
|
|
14460
|
-
|
|
14461
|
-
|
|
14528
|
+
// This fixes issue #371 (where sorting a multi-result page with infinite loader breaks)
|
|
14529
|
+
var options = getQueryOptions(this.$props);
|
|
14530
|
+
options.from = 0;
|
|
14531
|
+
var sortField = this.sortOptions[index].dataField;
|
|
14532
|
+
var sortBy = this.sortOptions[index].sortBy;
|
|
14533
|
+
options.sort = [(_ref7 = {}, _ref7[sortField] = {
|
|
14534
|
+
order: sortBy
|
|
14535
|
+
}, _ref7)];
|
|
14536
|
+
this.sortOptionIndex = index; // To handle sort options for RS API
|
|
14537
|
+
|
|
14538
|
+
this.updateComponentProps(this.componentId, {
|
|
14539
|
+
dataField: sortField,
|
|
14540
|
+
sortBy: sortBy
|
|
14541
|
+
}, constants_1$1.reactiveList);
|
|
14542
|
+
this.setQueryOptions(this.$props.componentId, options, true);
|
|
14543
|
+
this.currentPageState = 0;
|
|
14544
|
+
this.from = 0;
|
|
14545
|
+
}
|
|
14462
14546
|
},
|
|
14463
14547
|
triggerClickAnalytics: function triggerClickAnalytics(searchPosition, documentId) {
|
|
14464
14548
|
var docId = documentId;
|
|
@@ -14492,7 +14576,7 @@
|
|
|
14492
14576
|
"domProps": {
|
|
14493
14577
|
"value": this.sortOptionIndex
|
|
14494
14578
|
}
|
|
14495
|
-
}, [this
|
|
14579
|
+
}, [this.sortOptions.map(function (sort, index) {
|
|
14496
14580
|
return h("option", {
|
|
14497
14581
|
"key": sort.label,
|
|
14498
14582
|
"domProps": {
|
|
@@ -14598,11 +14682,7 @@
|
|
|
14598
14682
|
}; // Only used for SSR
|
|
14599
14683
|
|
|
14600
14684
|
ReactiveList.generateQueryOptions = function (props) {
|
|
14601
|
-
|
|
14602
|
-
var options = getQueryOptions(_extends({
|
|
14603
|
-
includeFields: ['*'],
|
|
14604
|
-
excludeFields: []
|
|
14605
|
-
}, props));
|
|
14685
|
+
var options = getQueryOptions(props);
|
|
14606
14686
|
var size = props.size,
|
|
14607
14687
|
dataField = props.dataField,
|
|
14608
14688
|
defaultSortOption = props.defaultSortOption,
|
|
@@ -15745,7 +15825,7 @@
|
|
|
15745
15825
|
paramsString = '?' + querystring.stringify(params);
|
|
15746
15826
|
}
|
|
15747
15827
|
|
|
15748
|
-
var finalURL =
|
|
15828
|
+
var finalURL = isMongoRequest ? _this.protocol + '://' + _this.url : _this.protocol + '://' + _this.url + '/' + app + '/' + path + paramsString;
|
|
15749
15829
|
return handleTransformRequest(Object.assign({}, {
|
|
15750
15830
|
url: finalURL
|
|
15751
15831
|
}, requestOptions)).then(function (ts) {
|
|
@@ -15782,7 +15862,7 @@
|
|
|
15782
15862
|
|
|
15783
15863
|
if (data) {
|
|
15784
15864
|
Object.keys(data).forEach(function (key) {
|
|
15785
|
-
if (data[key] && Object.prototype.hasOwnProperty.call(data[key], 'error')) {
|
|
15865
|
+
if (data[key] && Object.prototype.hasOwnProperty.call(data[key], 'error') && !!data[key].error) {
|
|
15786
15866
|
errorResponses += 1;
|
|
15787
15867
|
}
|
|
15788
15868
|
});
|
|
@@ -16683,7 +16763,7 @@
|
|
|
16683
16763
|
headers: types.headers,
|
|
16684
16764
|
getSearchParams: types.func,
|
|
16685
16765
|
setSearchParams: types.func,
|
|
16686
|
-
as:
|
|
16766
|
+
as: VueTypes.string.def('div')
|
|
16687
16767
|
},
|
|
16688
16768
|
mounted: function mounted() {
|
|
16689
16769
|
var _this = this;
|
|
@@ -16831,7 +16911,9 @@
|
|
|
16831
16911
|
return value.map(function (item) {
|
|
16832
16912
|
return _this3.getValue(item);
|
|
16833
16913
|
});
|
|
16834
|
-
}
|
|
16914
|
+
}
|
|
16915
|
+
|
|
16916
|
+
if (value && typeof value === 'object') {
|
|
16835
16917
|
// TODO: support for NestedList
|
|
16836
16918
|
if (value.location) return value;
|
|
16837
16919
|
if (value.category) return value;
|
|
@@ -18442,24 +18524,22 @@
|
|
|
18442
18524
|
|
|
18443
18525
|
return __webpack_require__(0);
|
|
18444
18526
|
/******/
|
|
18445
|
-
}
|
|
18446
|
-
|
|
18447
|
-
|
|
18448
|
-
/***/
|
|
18449
|
-
|
|
18450
|
-
/* 1 */
|
|
18451
|
-
|
|
18452
|
-
/***/
|
|
18453
|
-
|
|
18454
|
-
/* 2 */
|
|
18527
|
+
}
|
|
18528
|
+
/************************************************************************/
|
|
18455
18529
|
|
|
18456
|
-
|
|
18530
|
+
/******/
|
|
18531
|
+
([
|
|
18532
|
+
/* 0 */
|
|
18457
18533
|
|
|
18458
|
-
|
|
18534
|
+
/***/
|
|
18459
18535
|
function (module, exports, __webpack_require__) {
|
|
18460
18536
|
module.exports = __webpack_require__(1);
|
|
18461
18537
|
/***/
|
|
18462
|
-
},
|
|
18538
|
+
},
|
|
18539
|
+
/* 1 */
|
|
18540
|
+
|
|
18541
|
+
/***/
|
|
18542
|
+
function (module, exports, __webpack_require__) {
|
|
18463
18543
|
|
|
18464
18544
|
Object.defineProperty(exports, "__esModule", {
|
|
18465
18545
|
value: true
|
|
@@ -18492,7 +18572,11 @@
|
|
|
18492
18572
|
}
|
|
18493
18573
|
});
|
|
18494
18574
|
/***/
|
|
18495
|
-
},
|
|
18575
|
+
},
|
|
18576
|
+
/* 2 */
|
|
18577
|
+
|
|
18578
|
+
/***/
|
|
18579
|
+
function (module, exports) {
|
|
18496
18580
|
|
|
18497
18581
|
Object.defineProperty(exports, "__esModule", {
|
|
18498
18582
|
value: true
|
|
@@ -18661,7 +18745,9 @@
|
|
|
18661
18745
|
}
|
|
18662
18746
|
/***/
|
|
18663
18747
|
|
|
18664
|
-
}
|
|
18748
|
+
}
|
|
18749
|
+
/******/
|
|
18750
|
+
]);
|
|
18665
18751
|
});
|
|
18666
18752
|
unwrapExports(dist);
|
|
18667
18753
|
var dist_1 = dist.findAll;
|
|
@@ -19391,8 +19477,8 @@
|
|
|
19391
19477
|
name: 'Mic',
|
|
19392
19478
|
props: {
|
|
19393
19479
|
children: types.title,
|
|
19394
|
-
lang:
|
|
19395
|
-
iconPosition:
|
|
19480
|
+
lang: VueTypes.string.def('en-US'),
|
|
19481
|
+
iconPosition: VueTypes.string.def('left'),
|
|
19396
19482
|
handleResult: types.func,
|
|
19397
19483
|
onNoMatch: types.func,
|
|
19398
19484
|
onError: types.func,
|
|
@@ -19804,10 +19890,10 @@
|
|
|
19804
19890
|
})]),
|
|
19805
19891
|
aggregationField: types.string,
|
|
19806
19892
|
aggregationSize: VueTypes.number,
|
|
19807
|
-
size: VueTypes.number
|
|
19893
|
+
size: VueTypes.number,
|
|
19808
19894
|
debounce: VueTypes.number.def(0),
|
|
19809
19895
|
defaultValue: types.string,
|
|
19810
|
-
excludeFields: types.excludeFields
|
|
19896
|
+
excludeFields: types.excludeFields,
|
|
19811
19897
|
value: types.value,
|
|
19812
19898
|
defaultSuggestions: types.suggestions,
|
|
19813
19899
|
enableSynonyms: VueTypes.bool.def(true),
|
|
@@ -19821,9 +19907,9 @@
|
|
|
19821
19907
|
highlightField: types.stringOrArray,
|
|
19822
19908
|
icon: types.children,
|
|
19823
19909
|
iconPosition: VueTypes.oneOf(['left', 'right']).def('left'),
|
|
19824
|
-
includeFields: types.includeFields
|
|
19910
|
+
includeFields: types.includeFields,
|
|
19825
19911
|
innerClass: types.style,
|
|
19826
|
-
innerRef:
|
|
19912
|
+
innerRef: VueTypes.string.def('searchInputField'),
|
|
19827
19913
|
render: types.func,
|
|
19828
19914
|
renderQuerySuggestions: types.func,
|
|
19829
19915
|
renderPopularSuggestions: types.func,
|
|
@@ -19855,7 +19941,7 @@
|
|
|
19855
19941
|
focusShortcuts: VueTypes.arrayOf(VueTypes.oneOfType([VueTypes.string, VueTypes.number])).def(['/']),
|
|
19856
19942
|
addonBefore: VueTypes.any,
|
|
19857
19943
|
addonAfter: VueTypes.any,
|
|
19858
|
-
expandSuggestionsContainer:
|
|
19944
|
+
expandSuggestionsContainer: VueTypes.bool.def(true),
|
|
19859
19945
|
index: VueTypes.string
|
|
19860
19946
|
},
|
|
19861
19947
|
beforeMount: function beforeMount() {
|
|
@@ -20516,7 +20602,7 @@
|
|
|
20516
20602
|
highlightedIndex: highlightedIndex
|
|
20517
20603
|
}), _this3.renderErrorComponent(), !_this3.hasCustomRenderer && isOpen && hasSuggestions ? h("ul", {
|
|
20518
20604
|
"class": suggestions$1(_this3.themePreset, theme) + " " + getClassName$3(_this3.$props.innerClass, 'list')
|
|
20519
|
-
}, [_this3.suggestionsList.slice(0, size).map(function (item, index) {
|
|
20605
|
+
}, [_this3.suggestionsList.slice(0, size || 10).map(function (item, index) {
|
|
20520
20606
|
return h("li", {
|
|
20521
20607
|
"domProps": _extends({}, getItemProps({
|
|
20522
20608
|
item: item
|
|
@@ -20995,7 +21081,7 @@
|
|
|
20995
21081
|
name: 'SingleList',
|
|
20996
21082
|
props: {
|
|
20997
21083
|
beforeValueChange: types.func,
|
|
20998
|
-
className:
|
|
21084
|
+
className: VueTypes.string.def(''),
|
|
20999
21085
|
componentId: types.stringRequired,
|
|
21000
21086
|
customQuery: types.func,
|
|
21001
21087
|
dataField: types.stringRequired,
|
|
@@ -21015,7 +21101,7 @@
|
|
|
21015
21101
|
showFilter: VueTypes.bool.def(true),
|
|
21016
21102
|
showRadio: VueTypes.bool.def(true),
|
|
21017
21103
|
showSearch: VueTypes.bool.def(true),
|
|
21018
|
-
size: VueTypes.number
|
|
21104
|
+
size: VueTypes.number,
|
|
21019
21105
|
sortBy: VueTypes.oneOf(['asc', 'desc', 'count']).def('count'),
|
|
21020
21106
|
title: types.title,
|
|
21021
21107
|
URLParams: VueTypes.bool.def(false),
|
|
@@ -21129,7 +21215,7 @@
|
|
|
21129
21215
|
var filteredItemsToRender = itemsToRender.filter(function (item) {
|
|
21130
21216
|
if (String(item.key).length) {
|
|
21131
21217
|
if (_this.$props.showSearch && _this.$data.searchTerm) {
|
|
21132
|
-
return String(item.key).toLowerCase().includes(_this.$data.searchTerm.toLowerCase());
|
|
21218
|
+
return suggestions_1(String(item.key)).toLowerCase().includes(suggestions_1(_this.$data.searchTerm.toLowerCase()));
|
|
21133
21219
|
}
|
|
21134
21220
|
|
|
21135
21221
|
return true;
|
|
@@ -21476,7 +21562,7 @@
|
|
|
21476
21562
|
queryFormat: VueTypes.oneOf(['and', 'or']).def('or'),
|
|
21477
21563
|
showCheckbox: VueTypes.bool.def(true),
|
|
21478
21564
|
beforeValueChange: types.func,
|
|
21479
|
-
className:
|
|
21565
|
+
className: VueTypes.string.def(''),
|
|
21480
21566
|
componentId: types.stringRequired,
|
|
21481
21567
|
customQuery: types.func,
|
|
21482
21568
|
dataField: types.stringRequired,
|
|
@@ -21623,7 +21709,7 @@
|
|
|
21623
21709
|
var filteredItemsToRender = itemsToRender.filter(function (item) {
|
|
21624
21710
|
if (String(item.key).length) {
|
|
21625
21711
|
if (_this2.$props.showSearch && _this2.$data.searchTerm) {
|
|
21626
|
-
return String(item.key).toLowerCase().includes(_this2.$data.searchTerm.toLowerCase());
|
|
21712
|
+
return suggestions_1(String(item.key)).toLowerCase().includes(suggestions_1(_this2.$data.searchTerm).toLowerCase());
|
|
21627
21713
|
}
|
|
21628
21714
|
|
|
21629
21715
|
return true;
|
|
@@ -22097,7 +22183,9 @@
|
|
|
22097
22183
|
single: VueTypes.bool,
|
|
22098
22184
|
small: VueTypes.bool.def(false),
|
|
22099
22185
|
themePreset: types.themePreset,
|
|
22100
|
-
showSearch: VueTypes.bool
|
|
22186
|
+
showSearch: VueTypes.bool,
|
|
22187
|
+
showClear: VueTypes.bool,
|
|
22188
|
+
searchPlaceholder: VueTypes.string.def('Type here to search...')
|
|
22101
22189
|
},
|
|
22102
22190
|
render: function render() {
|
|
22103
22191
|
var _this = this;
|
|
@@ -22125,7 +22213,7 @@
|
|
|
22125
22213
|
var filteredItemsToRender = itemsToRender.filter(function (item) {
|
|
22126
22214
|
if (String(item[labelField]).length) {
|
|
22127
22215
|
if (_this.$props.showSearch && _this.$data.searchTerm) {
|
|
22128
|
-
return String(item[labelField]).toLowerCase().includes(_this.$data.searchTerm.toLowerCase());
|
|
22216
|
+
return suggestions_1(String(item[labelField])).toLowerCase().includes(suggestions_1(_this.$data.searchTerm.toLowerCase()));
|
|
22129
22217
|
}
|
|
22130
22218
|
|
|
22131
22219
|
return true;
|
|
@@ -22171,25 +22259,10 @@
|
|
|
22171
22259
|
getItemEvents: getItemEvents
|
|
22172
22260
|
}) : isOpen && itemsToRender.length ? h("ul", {
|
|
22173
22261
|
"class": suggestions$1(themePreset, _this.theme) + " " + (_this.$props.small ? 'small' : '') + " " + getClassName$6(_this.$props.innerClass, 'list')
|
|
22174
|
-
}, [_this.$props.showSearch ?
|
|
22175
|
-
"attrs": {
|
|
22176
|
-
"id": _this.$props.componentId + "-input",
|
|
22177
|
-
"showIcon": false,
|
|
22178
|
-
"placeholder": "Type here to search...",
|
|
22179
|
-
"value": _this.$data.searchTerm,
|
|
22180
|
-
"themePreset": themePreset
|
|
22181
|
-
},
|
|
22182
|
-
"style": {
|
|
22183
|
-
border: 0,
|
|
22184
|
-
borderBottom: '1px solid #ddd'
|
|
22185
|
-
},
|
|
22186
|
-
"class": getClassName$6(_this.$props.innerClass, 'input'),
|
|
22187
|
-
"on": {
|
|
22188
|
-
"change": _this.handleInputChange
|
|
22189
|
-
}
|
|
22190
|
-
}) : null, !hasCustomRenderer && filteredItemsToRender.length === 0 ? _this.renderNoResult() : filteredItemsToRender.map(function (item, index) {
|
|
22262
|
+
}, [_this.$props.showSearch ? _this.renderSearchbox() : null, !hasCustomRenderer && filteredItemsToRender.length === 0 ? _this.renderNoResult() : filteredItemsToRender.map(function (item, index) {
|
|
22191
22263
|
var selected = _this.$props.multi // MultiDropdownList
|
|
22192
|
-
&& (selectedItem && !!selectedItem[item[keyField]]
|
|
22264
|
+
&& (selectedItem && !!selectedItem[item[keyField]] // MultiDropdownRange
|
|
22265
|
+
|| Array.isArray(selectedItem) && selectedItem.find(function (value) {
|
|
22193
22266
|
return value[labelField] === item[labelField];
|
|
22194
22267
|
}));
|
|
22195
22268
|
if (!_this.$props.multi) selected = item.key === selectedItem;
|
|
@@ -22239,6 +22312,7 @@
|
|
|
22239
22312
|
|
|
22240
22313
|
if (!this.$props.multi) {
|
|
22241
22314
|
this.isOpen = false;
|
|
22315
|
+
this.searchTerm = '';
|
|
22242
22316
|
}
|
|
22243
22317
|
},
|
|
22244
22318
|
handleStateChange: function handleStateChange(_ref2) {
|
|
@@ -22262,6 +22336,9 @@
|
|
|
22262
22336
|
var value = e.target.value;
|
|
22263
22337
|
this.searchTerm = value;
|
|
22264
22338
|
},
|
|
22339
|
+
clearSearchTerm: function clearSearchTerm() {
|
|
22340
|
+
this.searchTerm = '';
|
|
22341
|
+
},
|
|
22265
22342
|
renderToString: function renderToString(value) {
|
|
22266
22343
|
var _this2 = this;
|
|
22267
22344
|
|
|
@@ -22302,6 +22379,51 @@
|
|
|
22302
22379
|
return h("p", {
|
|
22303
22380
|
"class": getClassName$6(this.$props.innerClass, 'noResults') || null
|
|
22304
22381
|
}, [isFunction$1(renderNoResults) ? renderNoResults() : renderNoResults]);
|
|
22382
|
+
},
|
|
22383
|
+
renderSearchbox: function renderSearchbox() {
|
|
22384
|
+
var h = this.$createElement;
|
|
22385
|
+
var _this$$props2 = this.$props,
|
|
22386
|
+
componentId = _this$$props2.componentId,
|
|
22387
|
+
searchPlaceholder = _this$$props2.searchPlaceholder,
|
|
22388
|
+
showClear = _this$$props2.showClear,
|
|
22389
|
+
themePreset = _this$$props2.themePreset,
|
|
22390
|
+
innerClass = _this$$props2.innerClass;
|
|
22391
|
+
var InputComponent = h(Input, {
|
|
22392
|
+
"attrs": {
|
|
22393
|
+
"id": componentId + "-input",
|
|
22394
|
+
"showIcon": false,
|
|
22395
|
+
"showClear": showClear,
|
|
22396
|
+
"placeholder": searchPlaceholder,
|
|
22397
|
+
"value": this.$data.searchTerm,
|
|
22398
|
+
"themePreset": themePreset
|
|
22399
|
+
},
|
|
22400
|
+
"style": {
|
|
22401
|
+
border: 0,
|
|
22402
|
+
borderBottom: '1px solid #ddd'
|
|
22403
|
+
},
|
|
22404
|
+
"class": getClassName$6(innerClass, 'input'),
|
|
22405
|
+
"on": {
|
|
22406
|
+
"change": this.handleInputChange
|
|
22407
|
+
}
|
|
22408
|
+
});
|
|
22409
|
+
|
|
22410
|
+
if (showClear) {
|
|
22411
|
+
return h(InputWrapper, [InputComponent, this.searchTerm && h(IconGroup, {
|
|
22412
|
+
"attrs": {
|
|
22413
|
+
"groupPosition": "right",
|
|
22414
|
+
"positionType": "absolute"
|
|
22415
|
+
}
|
|
22416
|
+
}, [h(IconWrapper, {
|
|
22417
|
+
"on": {
|
|
22418
|
+
"click": this.clearSearchTerm
|
|
22419
|
+
},
|
|
22420
|
+
"attrs": {
|
|
22421
|
+
"isClearIcon": true
|
|
22422
|
+
}
|
|
22423
|
+
}, [h(CancelSvg)])])]);
|
|
22424
|
+
}
|
|
22425
|
+
|
|
22426
|
+
return InputComponent;
|
|
22305
22427
|
}
|
|
22306
22428
|
}
|
|
22307
22429
|
};
|
|
@@ -22360,10 +22482,12 @@
|
|
|
22360
22482
|
showMissing: VueTypes.bool.def(false),
|
|
22361
22483
|
missingLabel: VueTypes.string.def('N/A'),
|
|
22362
22484
|
showSearch: VueTypes.bool.def(false),
|
|
22485
|
+
showClear: VueTypes.bool.def(false),
|
|
22363
22486
|
showLoadMore: VueTypes.bool.def(false),
|
|
22364
22487
|
loadMoreLabel: VueTypes.oneOfType([VueTypes.string, VueTypes.any]).def('Load More'),
|
|
22365
22488
|
nestedField: types.string,
|
|
22366
|
-
index: VueTypes.string
|
|
22489
|
+
index: VueTypes.string,
|
|
22490
|
+
searchPlaceholder: VueTypes.string.def('Type here to search...')
|
|
22367
22491
|
},
|
|
22368
22492
|
created: function created() {
|
|
22369
22493
|
if (!this.enableAppbase && this.$props.index) {
|
|
@@ -22477,7 +22601,9 @@
|
|
|
22477
22601
|
if (!this.hasCustomRenderer && this.$data.modifiedOptions.length === 0 && !this.isLoading) {
|
|
22478
22602
|
if (renderNoResults && isFunction$1(renderNoResults)) {
|
|
22479
22603
|
return h("div", [renderNoResults()]);
|
|
22480
|
-
}
|
|
22604
|
+
}
|
|
22605
|
+
|
|
22606
|
+
if (renderNoResults && !isFunction$1(renderNoResults)) {
|
|
22481
22607
|
return renderNoResults;
|
|
22482
22608
|
}
|
|
22483
22609
|
|
|
@@ -22515,6 +22641,8 @@
|
|
|
22515
22641
|
"renderNoResults": this.$scopedSlots.renderNoResults || this.$props.renderNoResults,
|
|
22516
22642
|
"themePreset": this.themePreset,
|
|
22517
22643
|
"showSearch": this.$props.showSearch,
|
|
22644
|
+
"showClear": this.$props.showClear,
|
|
22645
|
+
"searchPlaceholder": this.$props.searchPlaceholder,
|
|
22518
22646
|
"transformData": this.$props.transformData,
|
|
22519
22647
|
"footer": showLoadMore && !isLastBucket && h("div", {
|
|
22520
22648
|
"attrs": {
|
|
@@ -22807,10 +22935,12 @@
|
|
|
22807
22935
|
showMissing: VueTypes.bool.def(false),
|
|
22808
22936
|
missingLabel: VueTypes.string.def('N/A'),
|
|
22809
22937
|
showSearch: VueTypes.bool.def(false),
|
|
22938
|
+
showClear: VueTypes.bool.def(false),
|
|
22810
22939
|
showLoadMore: VueTypes.bool.def(false),
|
|
22811
22940
|
loadMoreLabel: VueTypes.oneOfType([VueTypes.string, VueTypes.any]).def('Load More'),
|
|
22812
22941
|
nestedField: types.string,
|
|
22813
|
-
index: VueTypes.string
|
|
22942
|
+
index: VueTypes.string,
|
|
22943
|
+
searchPlaceholder: VueTypes.string.def('Type here to search...')
|
|
22814
22944
|
},
|
|
22815
22945
|
created: function created() {
|
|
22816
22946
|
if (!this.enableAppbase && this.$props.index) {
|
|
@@ -22938,7 +23068,9 @@
|
|
|
22938
23068
|
if (!this.hasCustomRenderer && this.$data.modifiedOptions.length === 0 && !this.isLoading) {
|
|
22939
23069
|
if (renderNoResults && isFunction$1(renderNoResults)) {
|
|
22940
23070
|
return h("div", [renderNoResults()]);
|
|
22941
|
-
}
|
|
23071
|
+
}
|
|
23072
|
+
|
|
23073
|
+
if (renderNoResults && !isFunction$1(renderNoResults)) {
|
|
22942
23074
|
return renderNoResults;
|
|
22943
23075
|
}
|
|
22944
23076
|
|
|
@@ -22977,6 +23109,8 @@
|
|
|
22977
23109
|
"renderItem": renderItemCalc,
|
|
22978
23110
|
"renderNoResults": this.$scopedSlots.renderNoResults || this.$props.renderNoResults,
|
|
22979
23111
|
"showSearch": this.$props.showSearch,
|
|
23112
|
+
"showClear": this.$props.showClear,
|
|
23113
|
+
"searchPlaceholder": this.$props.searchPlaceholder,
|
|
22980
23114
|
"transformData": this.$props.transformData,
|
|
22981
23115
|
"footer": showLoadMore && !isLastBucket && h("div", {
|
|
22982
23116
|
"attrs": {
|
|
@@ -23323,7 +23457,7 @@
|
|
|
23323
23457
|
componentId: types.stringRequired,
|
|
23324
23458
|
data: types.data,
|
|
23325
23459
|
dataField: types.stringRequired,
|
|
23326
|
-
defaultValue: types.
|
|
23460
|
+
defaultValue: types.any,
|
|
23327
23461
|
value: types.stringOrArray,
|
|
23328
23462
|
filterLabel: types.string,
|
|
23329
23463
|
nestedField: types.string,
|
|
@@ -23676,7 +23810,7 @@
|
|
|
23676
23810
|
this.internalComponent = null;
|
|
23677
23811
|
this.$defaultQuery = null; // Set custom query in store
|
|
23678
23812
|
|
|
23679
|
-
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props,
|
|
23813
|
+
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.selectedValue);
|
|
23680
23814
|
var customQuery = props.customQuery,
|
|
23681
23815
|
componentId = props.componentId,
|
|
23682
23816
|
filterLabel = props.filterLabel,
|
|
@@ -23699,7 +23833,7 @@
|
|
|
23699
23833
|
}
|
|
23700
23834
|
|
|
23701
23835
|
if (customQuery) {
|
|
23702
|
-
var calcCustomQuery = customQuery(props);
|
|
23836
|
+
var calcCustomQuery = customQuery(this.selectedValue, props);
|
|
23703
23837
|
|
|
23704
23838
|
var _ref = calcCustomQuery || {},
|
|
23705
23839
|
query = _ref.query;
|
|
@@ -23718,7 +23852,7 @@
|
|
|
23718
23852
|
|
|
23719
23853
|
this.updateQuery({
|
|
23720
23854
|
componentId: componentId,
|
|
23721
|
-
|
|
23855
|
+
query: queryToSet,
|
|
23722
23856
|
value: this.selectedValue || null,
|
|
23723
23857
|
label: filterLabel,
|
|
23724
23858
|
showFilter: showFilter,
|
|
@@ -23769,8 +23903,8 @@
|
|
|
23769
23903
|
},
|
|
23770
23904
|
beforeMount: function beforeMount() {
|
|
23771
23905
|
if (this.internalComponent && this.$props.defaultQuery) {
|
|
23772
|
-
updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props,
|
|
23773
|
-
this.$defaultQuery = this.$props.defaultQuery();
|
|
23906
|
+
updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, this.selectedValue);
|
|
23907
|
+
this.$defaultQuery = this.$props.defaultQuery(this.selectedValue, this.$props);
|
|
23774
23908
|
|
|
23775
23909
|
var _ref3 = this.$defaultQuery || {},
|
|
23776
23910
|
query = _ref3.query,
|
|
@@ -23834,8 +23968,8 @@
|
|
|
23834
23968
|
}
|
|
23835
23969
|
},
|
|
23836
23970
|
defaultQuery: function defaultQuery(newVal, oldVal) {
|
|
23837
|
-
if (newVal && !isQueryIdentical(newVal, oldVal,
|
|
23838
|
-
this.$defaultQuery = newVal();
|
|
23971
|
+
if (newVal && !isQueryIdentical(newVal, oldVal, this.selectedValue, this.$props)) {
|
|
23972
|
+
this.$defaultQuery = newVal(this.selectedValue, this.$props);
|
|
23839
23973
|
|
|
23840
23974
|
var _ref4 = this.$defaultQuery || {},
|
|
23841
23975
|
query = _ref4.query,
|
|
@@ -23846,7 +23980,7 @@
|
|
|
23846
23980
|
} else this.setQueryOptions(this.internalComponent, this.getAggsQuery(), false); // Update default query for RS API
|
|
23847
23981
|
|
|
23848
23982
|
|
|
23849
|
-
updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props,
|
|
23983
|
+
updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, this.selectedValue);
|
|
23850
23984
|
var queryToSet = query || null;
|
|
23851
23985
|
|
|
23852
23986
|
if (!queryToSet && this.$defaultQuery && this.$defaultQuery.id) {
|
|
@@ -23860,9 +23994,9 @@
|
|
|
23860
23994
|
}
|
|
23861
23995
|
},
|
|
23862
23996
|
customQuery: function customQuery(newVal, oldVal) {
|
|
23863
|
-
if (newVal && !isQueryIdentical(newVal, oldVal,
|
|
23997
|
+
if (newVal && !isQueryIdentical(newVal, oldVal, this.selectedValue, this.$props)) {
|
|
23864
23998
|
var componentId = this.$props.componentId;
|
|
23865
|
-
this.$customQuery = newVal(this.$props);
|
|
23999
|
+
this.$customQuery = newVal(this.selectedValue, this.$props);
|
|
23866
24000
|
|
|
23867
24001
|
var _ref5 = this.$customQuery || {},
|
|
23868
24002
|
query = _ref5.query,
|
|
@@ -23873,7 +24007,7 @@
|
|
|
23873
24007
|
} else this.setQueryOptions(componentId, this.getAggsQuery(), false); // Update custom query for RS API
|
|
23874
24008
|
|
|
23875
24009
|
|
|
23876
|
-
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props,
|
|
24010
|
+
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.selectedValue);
|
|
23877
24011
|
var queryToSet = query || null;
|
|
23878
24012
|
|
|
23879
24013
|
if (this.$customQuery && this.$customQuery.id) {
|
|
@@ -25947,6 +26081,7 @@
|
|
|
25947
26081
|
var orderOfQueries = [];
|
|
25948
26082
|
var hits = {};
|
|
25949
26083
|
var aggregations = {};
|
|
26084
|
+
var compositeAggregations = {};
|
|
25950
26085
|
var state = {};
|
|
25951
26086
|
var customQueries = {};
|
|
25952
26087
|
var defaultQueries = {};
|
|
@@ -25961,16 +26096,7 @@
|
|
|
25961
26096
|
compProps[key] = component[key];
|
|
25962
26097
|
}
|
|
25963
26098
|
});
|
|
25964
|
-
var isInternalComponentPresent = false;
|
|
25965
|
-
|
|
25966
|
-
if (component.customQuery && typeof component.customQuery === 'function') {
|
|
25967
|
-
customQueries[component.componentId] = component.customQuery(component.value, compProps);
|
|
25968
|
-
}
|
|
25969
|
-
|
|
25970
|
-
if (component.defaultQuery && typeof component.defaultQuery === 'function') {
|
|
25971
|
-
defaultQueries[component.componentId] = component.defaultQuery(component.value, compProps);
|
|
25972
|
-
}
|
|
25973
|
-
|
|
26099
|
+
var isInternalComponentPresent = false;
|
|
25974
26100
|
var isResultComponent = resultComponents.includes(componentType);
|
|
25975
26101
|
var internalComponent = component.componentId + "__internal";
|
|
25976
26102
|
var label = component.filterLabel || component.componentId;
|
|
@@ -25994,7 +26120,16 @@
|
|
|
25994
26120
|
reference: reference,
|
|
25995
26121
|
showFilter: showFilter,
|
|
25996
26122
|
URLParams: component.URLParams || false
|
|
25997
|
-
}); //
|
|
26123
|
+
}); // Set custom and default queries
|
|
26124
|
+
|
|
26125
|
+
if (component.customQuery && typeof component.customQuery === 'function') {
|
|
26126
|
+
customQueries[component.componentId] = component.customQuery(value, compProps);
|
|
26127
|
+
}
|
|
26128
|
+
|
|
26129
|
+
if (component.defaultQuery && typeof component.defaultQuery === 'function') {
|
|
26130
|
+
defaultQueries[component.componentId] = component.defaultQuery(value, compProps);
|
|
26131
|
+
} // [2] set query options - main component query (valid for result components)
|
|
26132
|
+
|
|
25998
26133
|
|
|
25999
26134
|
if (componentsWithOptions.includes(componentType)) {
|
|
26000
26135
|
var options = component.source.generateQueryOptions ? component.source.generateQueryOptions(component) : null;
|
|
@@ -26081,7 +26216,7 @@
|
|
|
26081
26216
|
|
|
26082
26217
|
|
|
26083
26218
|
if (isResultComponent) {
|
|
26084
|
-
var _getQuery = getQuery(component,
|
|
26219
|
+
var _getQuery = getQuery(component, value, componentType),
|
|
26085
26220
|
query = _getQuery.query;
|
|
26086
26221
|
|
|
26087
26222
|
queryList = queryReducer(queryList, {
|
|
@@ -26181,6 +26316,11 @@
|
|
|
26181
26316
|
var _extends4;
|
|
26182
26317
|
|
|
26183
26318
|
aggregations = _extends({}, aggregations, (_extends4 = {}, _extends4[component] = response.aggregations, _extends4));
|
|
26319
|
+
compositeAggregations = compositeAggsReducer(compositeAggregations, {
|
|
26320
|
+
type: constants_9,
|
|
26321
|
+
aggregations: response.aggregations,
|
|
26322
|
+
append: false
|
|
26323
|
+
});
|
|
26184
26324
|
}
|
|
26185
26325
|
|
|
26186
26326
|
hits = _extends({}, hits, (_extends5 = {}, _extends5[component] = {
|
|
@@ -26207,6 +26347,8 @@
|
|
|
26207
26347
|
var promotedResults = {};
|
|
26208
26348
|
var rawData = {};
|
|
26209
26349
|
var customData = {};
|
|
26350
|
+
var settingsResponse = {};
|
|
26351
|
+
var timestamp = {};
|
|
26210
26352
|
var allPromises = orderOfQueries.map(function (component) {
|
|
26211
26353
|
return new Promise(function (responseResolve, responseReject) {
|
|
26212
26354
|
handleTransformResponse(res[component], component).then(function (response) {
|
|
@@ -26225,6 +26367,11 @@
|
|
|
26225
26367
|
|
|
26226
26368
|
if (response.customData) {
|
|
26227
26369
|
customData[component] = response.customData;
|
|
26370
|
+
} // Update settings
|
|
26371
|
+
|
|
26372
|
+
|
|
26373
|
+
if (response.settings) {
|
|
26374
|
+
settingsResponse[component] = response.settings;
|
|
26228
26375
|
}
|
|
26229
26376
|
|
|
26230
26377
|
if (response.aggregations) {
|
|
@@ -26233,6 +26380,7 @@
|
|
|
26233
26380
|
aggregations = _extends({}, aggregations, (_extends6 = {}, _extends6[component] = response.aggregations, _extends6));
|
|
26234
26381
|
}
|
|
26235
26382
|
|
|
26383
|
+
timestamp[component] = res._timestamp;
|
|
26236
26384
|
hits = _extends({}, hits, (_extends7 = {}, _extends7[component] = {
|
|
26237
26385
|
hits: response.hits.hits,
|
|
26238
26386
|
total: typeof response.hits.total === 'object' ? response.hits.total.value : response.hits.total,
|
|
@@ -26248,8 +26396,11 @@
|
|
|
26248
26396
|
Promise.all(allPromises).then(function () {
|
|
26249
26397
|
state = _extends({}, state, {
|
|
26250
26398
|
hits: hits,
|
|
26399
|
+
timestamp: timestamp,
|
|
26251
26400
|
aggregations: aggregations,
|
|
26401
|
+
compositeAggregations: compositeAggregations,
|
|
26252
26402
|
promotedResults: promotedResults,
|
|
26403
|
+
settings: settingsResponse,
|
|
26253
26404
|
customData: customData,
|
|
26254
26405
|
rawData: rawData
|
|
26255
26406
|
});
|
|
@@ -26308,7 +26459,7 @@
|
|
|
26308
26459
|
});
|
|
26309
26460
|
}
|
|
26310
26461
|
|
|
26311
|
-
var version = "1.
|
|
26462
|
+
var version = "1.25.0";
|
|
26312
26463
|
|
|
26313
26464
|
var _templateObject$n, _templateObject2$a;
|
|
26314
26465
|
|