@appbaseio/reactivesearch-vue 1.24.3 → 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 +280 -134
- 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/ReactiveList.js +48 -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 +19 -0
- 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/ReactiveList.js +48 -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 +19 -0
- package/dist/es/install.js +3 -2
- package/dist/es/version.js +1 -1
- package/package.json +2 -2
|
@@ -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
|
|
|
@@ -14444,26 +14520,29 @@
|
|
|
14444
14520
|
}, [isFunction$1(renderNoResults) ? renderNoResults() : renderNoResults]);
|
|
14445
14521
|
},
|
|
14446
14522
|
handleSortChange: function handleSortChange(e) {
|
|
14447
|
-
var
|
|
14523
|
+
var index = e.target.value;
|
|
14448
14524
|
|
|
14449
|
-
|
|
14450
|
-
|
|
14451
|
-
var options = getQueryOptions(this.$props);
|
|
14452
|
-
options.from = 0;
|
|
14453
|
-
var sortField = this.$props.sortOptions[index].dataField;
|
|
14454
|
-
var sortBy = this.$props.sortOptions[index].sortBy;
|
|
14455
|
-
options.sort = [(_ref7 = {}, _ref7[sortField] = {
|
|
14456
|
-
order: sortBy
|
|
14457
|
-
}, _ref7)];
|
|
14458
|
-
this.sortOptionIndex = index; // To handle sort options for RS API
|
|
14525
|
+
if (this.sortOptions && this.sortOptions[index]) {
|
|
14526
|
+
var _ref7;
|
|
14459
14527
|
|
|
14460
|
-
|
|
14461
|
-
|
|
14462
|
-
|
|
14463
|
-
|
|
14464
|
-
|
|
14465
|
-
|
|
14466
|
-
|
|
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
|
+
}
|
|
14467
14546
|
},
|
|
14468
14547
|
triggerClickAnalytics: function triggerClickAnalytics(searchPosition, documentId) {
|
|
14469
14548
|
var docId = documentId;
|
|
@@ -14497,7 +14576,7 @@
|
|
|
14497
14576
|
"domProps": {
|
|
14498
14577
|
"value": this.sortOptionIndex
|
|
14499
14578
|
}
|
|
14500
|
-
}, [this
|
|
14579
|
+
}, [this.sortOptions.map(function (sort, index) {
|
|
14501
14580
|
return h("option", {
|
|
14502
14581
|
"key": sort.label,
|
|
14503
14582
|
"domProps": {
|
|
@@ -14603,11 +14682,7 @@
|
|
|
14603
14682
|
}; // Only used for SSR
|
|
14604
14683
|
|
|
14605
14684
|
ReactiveList.generateQueryOptions = function (props) {
|
|
14606
|
-
|
|
14607
|
-
var options = getQueryOptions(_extends({
|
|
14608
|
-
includeFields: ['*'],
|
|
14609
|
-
excludeFields: []
|
|
14610
|
-
}, props));
|
|
14685
|
+
var options = getQueryOptions(props);
|
|
14611
14686
|
var size = props.size,
|
|
14612
14687
|
dataField = props.dataField,
|
|
14613
14688
|
defaultSortOption = props.defaultSortOption,
|
|
@@ -16688,7 +16763,7 @@
|
|
|
16688
16763
|
headers: types.headers,
|
|
16689
16764
|
getSearchParams: types.func,
|
|
16690
16765
|
setSearchParams: types.func,
|
|
16691
|
-
as:
|
|
16766
|
+
as: VueTypes.string.def('div')
|
|
16692
16767
|
},
|
|
16693
16768
|
mounted: function mounted() {
|
|
16694
16769
|
var _this = this;
|
|
@@ -16836,7 +16911,9 @@
|
|
|
16836
16911
|
return value.map(function (item) {
|
|
16837
16912
|
return _this3.getValue(item);
|
|
16838
16913
|
});
|
|
16839
|
-
}
|
|
16914
|
+
}
|
|
16915
|
+
|
|
16916
|
+
if (value && typeof value === 'object') {
|
|
16840
16917
|
// TODO: support for NestedList
|
|
16841
16918
|
if (value.location) return value;
|
|
16842
16919
|
if (value.category) return value;
|
|
@@ -18447,24 +18524,22 @@
|
|
|
18447
18524
|
|
|
18448
18525
|
return __webpack_require__(0);
|
|
18449
18526
|
/******/
|
|
18450
|
-
}
|
|
18451
|
-
|
|
18452
|
-
|
|
18453
|
-
/***/
|
|
18454
|
-
|
|
18455
|
-
/* 1 */
|
|
18456
|
-
|
|
18457
|
-
/***/
|
|
18458
|
-
|
|
18459
|
-
/* 2 */
|
|
18527
|
+
}
|
|
18528
|
+
/************************************************************************/
|
|
18460
18529
|
|
|
18461
|
-
|
|
18530
|
+
/******/
|
|
18531
|
+
([
|
|
18532
|
+
/* 0 */
|
|
18462
18533
|
|
|
18463
|
-
|
|
18534
|
+
/***/
|
|
18464
18535
|
function (module, exports, __webpack_require__) {
|
|
18465
18536
|
module.exports = __webpack_require__(1);
|
|
18466
18537
|
/***/
|
|
18467
|
-
},
|
|
18538
|
+
},
|
|
18539
|
+
/* 1 */
|
|
18540
|
+
|
|
18541
|
+
/***/
|
|
18542
|
+
function (module, exports, __webpack_require__) {
|
|
18468
18543
|
|
|
18469
18544
|
Object.defineProperty(exports, "__esModule", {
|
|
18470
18545
|
value: true
|
|
@@ -18497,7 +18572,11 @@
|
|
|
18497
18572
|
}
|
|
18498
18573
|
});
|
|
18499
18574
|
/***/
|
|
18500
|
-
},
|
|
18575
|
+
},
|
|
18576
|
+
/* 2 */
|
|
18577
|
+
|
|
18578
|
+
/***/
|
|
18579
|
+
function (module, exports) {
|
|
18501
18580
|
|
|
18502
18581
|
Object.defineProperty(exports, "__esModule", {
|
|
18503
18582
|
value: true
|
|
@@ -18666,7 +18745,9 @@
|
|
|
18666
18745
|
}
|
|
18667
18746
|
/***/
|
|
18668
18747
|
|
|
18669
|
-
}
|
|
18748
|
+
}
|
|
18749
|
+
/******/
|
|
18750
|
+
]);
|
|
18670
18751
|
});
|
|
18671
18752
|
unwrapExports(dist);
|
|
18672
18753
|
var dist_1 = dist.findAll;
|
|
@@ -19396,8 +19477,8 @@
|
|
|
19396
19477
|
name: 'Mic',
|
|
19397
19478
|
props: {
|
|
19398
19479
|
children: types.title,
|
|
19399
|
-
lang:
|
|
19400
|
-
iconPosition:
|
|
19480
|
+
lang: VueTypes.string.def('en-US'),
|
|
19481
|
+
iconPosition: VueTypes.string.def('left'),
|
|
19401
19482
|
handleResult: types.func,
|
|
19402
19483
|
onNoMatch: types.func,
|
|
19403
19484
|
onError: types.func,
|
|
@@ -19809,10 +19890,10 @@
|
|
|
19809
19890
|
})]),
|
|
19810
19891
|
aggregationField: types.string,
|
|
19811
19892
|
aggregationSize: VueTypes.number,
|
|
19812
|
-
size: VueTypes.number
|
|
19893
|
+
size: VueTypes.number,
|
|
19813
19894
|
debounce: VueTypes.number.def(0),
|
|
19814
19895
|
defaultValue: types.string,
|
|
19815
|
-
excludeFields: types.excludeFields
|
|
19896
|
+
excludeFields: types.excludeFields,
|
|
19816
19897
|
value: types.value,
|
|
19817
19898
|
defaultSuggestions: types.suggestions,
|
|
19818
19899
|
enableSynonyms: VueTypes.bool.def(true),
|
|
@@ -19826,9 +19907,9 @@
|
|
|
19826
19907
|
highlightField: types.stringOrArray,
|
|
19827
19908
|
icon: types.children,
|
|
19828
19909
|
iconPosition: VueTypes.oneOf(['left', 'right']).def('left'),
|
|
19829
|
-
includeFields: types.includeFields
|
|
19910
|
+
includeFields: types.includeFields,
|
|
19830
19911
|
innerClass: types.style,
|
|
19831
|
-
innerRef:
|
|
19912
|
+
innerRef: VueTypes.string.def('searchInputField'),
|
|
19832
19913
|
render: types.func,
|
|
19833
19914
|
renderQuerySuggestions: types.func,
|
|
19834
19915
|
renderPopularSuggestions: types.func,
|
|
@@ -19860,7 +19941,7 @@
|
|
|
19860
19941
|
focusShortcuts: VueTypes.arrayOf(VueTypes.oneOfType([VueTypes.string, VueTypes.number])).def(['/']),
|
|
19861
19942
|
addonBefore: VueTypes.any,
|
|
19862
19943
|
addonAfter: VueTypes.any,
|
|
19863
|
-
expandSuggestionsContainer:
|
|
19944
|
+
expandSuggestionsContainer: VueTypes.bool.def(true),
|
|
19864
19945
|
index: VueTypes.string
|
|
19865
19946
|
},
|
|
19866
19947
|
beforeMount: function beforeMount() {
|
|
@@ -20521,7 +20602,7 @@
|
|
|
20521
20602
|
highlightedIndex: highlightedIndex
|
|
20522
20603
|
}), _this3.renderErrorComponent(), !_this3.hasCustomRenderer && isOpen && hasSuggestions ? h("ul", {
|
|
20523
20604
|
"class": suggestions$1(_this3.themePreset, theme) + " " + getClassName$3(_this3.$props.innerClass, 'list')
|
|
20524
|
-
}, [_this3.suggestionsList.slice(0, size).map(function (item, index) {
|
|
20605
|
+
}, [_this3.suggestionsList.slice(0, size || 10).map(function (item, index) {
|
|
20525
20606
|
return h("li", {
|
|
20526
20607
|
"domProps": _extends({}, getItemProps({
|
|
20527
20608
|
item: item
|
|
@@ -21000,7 +21081,7 @@
|
|
|
21000
21081
|
name: 'SingleList',
|
|
21001
21082
|
props: {
|
|
21002
21083
|
beforeValueChange: types.func,
|
|
21003
|
-
className:
|
|
21084
|
+
className: VueTypes.string.def(''),
|
|
21004
21085
|
componentId: types.stringRequired,
|
|
21005
21086
|
customQuery: types.func,
|
|
21006
21087
|
dataField: types.stringRequired,
|
|
@@ -21020,7 +21101,7 @@
|
|
|
21020
21101
|
showFilter: VueTypes.bool.def(true),
|
|
21021
21102
|
showRadio: VueTypes.bool.def(true),
|
|
21022
21103
|
showSearch: VueTypes.bool.def(true),
|
|
21023
|
-
size: VueTypes.number
|
|
21104
|
+
size: VueTypes.number,
|
|
21024
21105
|
sortBy: VueTypes.oneOf(['asc', 'desc', 'count']).def('count'),
|
|
21025
21106
|
title: types.title,
|
|
21026
21107
|
URLParams: VueTypes.bool.def(false),
|
|
@@ -21134,7 +21215,7 @@
|
|
|
21134
21215
|
var filteredItemsToRender = itemsToRender.filter(function (item) {
|
|
21135
21216
|
if (String(item.key).length) {
|
|
21136
21217
|
if (_this.$props.showSearch && _this.$data.searchTerm) {
|
|
21137
|
-
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()));
|
|
21138
21219
|
}
|
|
21139
21220
|
|
|
21140
21221
|
return true;
|
|
@@ -21481,7 +21562,7 @@
|
|
|
21481
21562
|
queryFormat: VueTypes.oneOf(['and', 'or']).def('or'),
|
|
21482
21563
|
showCheckbox: VueTypes.bool.def(true),
|
|
21483
21564
|
beforeValueChange: types.func,
|
|
21484
|
-
className:
|
|
21565
|
+
className: VueTypes.string.def(''),
|
|
21485
21566
|
componentId: types.stringRequired,
|
|
21486
21567
|
customQuery: types.func,
|
|
21487
21568
|
dataField: types.stringRequired,
|
|
@@ -21628,7 +21709,7 @@
|
|
|
21628
21709
|
var filteredItemsToRender = itemsToRender.filter(function (item) {
|
|
21629
21710
|
if (String(item.key).length) {
|
|
21630
21711
|
if (_this2.$props.showSearch && _this2.$data.searchTerm) {
|
|
21631
|
-
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());
|
|
21632
21713
|
}
|
|
21633
21714
|
|
|
21634
21715
|
return true;
|
|
@@ -22102,7 +22183,9 @@
|
|
|
22102
22183
|
single: VueTypes.bool,
|
|
22103
22184
|
small: VueTypes.bool.def(false),
|
|
22104
22185
|
themePreset: types.themePreset,
|
|
22105
|
-
showSearch: VueTypes.bool
|
|
22186
|
+
showSearch: VueTypes.bool,
|
|
22187
|
+
showClear: VueTypes.bool,
|
|
22188
|
+
searchPlaceholder: VueTypes.string.def('Type here to search...')
|
|
22106
22189
|
},
|
|
22107
22190
|
render: function render() {
|
|
22108
22191
|
var _this = this;
|
|
@@ -22130,7 +22213,7 @@
|
|
|
22130
22213
|
var filteredItemsToRender = itemsToRender.filter(function (item) {
|
|
22131
22214
|
if (String(item[labelField]).length) {
|
|
22132
22215
|
if (_this.$props.showSearch && _this.$data.searchTerm) {
|
|
22133
|
-
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()));
|
|
22134
22217
|
}
|
|
22135
22218
|
|
|
22136
22219
|
return true;
|
|
@@ -22176,25 +22259,10 @@
|
|
|
22176
22259
|
getItemEvents: getItemEvents
|
|
22177
22260
|
}) : isOpen && itemsToRender.length ? h("ul", {
|
|
22178
22261
|
"class": suggestions$1(themePreset, _this.theme) + " " + (_this.$props.small ? 'small' : '') + " " + getClassName$6(_this.$props.innerClass, 'list')
|
|
22179
|
-
}, [_this.$props.showSearch ?
|
|
22180
|
-
"attrs": {
|
|
22181
|
-
"id": _this.$props.componentId + "-input",
|
|
22182
|
-
"showIcon": false,
|
|
22183
|
-
"placeholder": "Type here to search...",
|
|
22184
|
-
"value": _this.$data.searchTerm,
|
|
22185
|
-
"themePreset": themePreset
|
|
22186
|
-
},
|
|
22187
|
-
"style": {
|
|
22188
|
-
border: 0,
|
|
22189
|
-
borderBottom: '1px solid #ddd'
|
|
22190
|
-
},
|
|
22191
|
-
"class": getClassName$6(_this.$props.innerClass, 'input'),
|
|
22192
|
-
"on": {
|
|
22193
|
-
"change": _this.handleInputChange
|
|
22194
|
-
}
|
|
22195
|
-
}) : 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) {
|
|
22196
22263
|
var selected = _this.$props.multi // MultiDropdownList
|
|
22197
|
-
&& (selectedItem && !!selectedItem[item[keyField]]
|
|
22264
|
+
&& (selectedItem && !!selectedItem[item[keyField]] // MultiDropdownRange
|
|
22265
|
+
|| Array.isArray(selectedItem) && selectedItem.find(function (value) {
|
|
22198
22266
|
return value[labelField] === item[labelField];
|
|
22199
22267
|
}));
|
|
22200
22268
|
if (!_this.$props.multi) selected = item.key === selectedItem;
|
|
@@ -22244,6 +22312,7 @@
|
|
|
22244
22312
|
|
|
22245
22313
|
if (!this.$props.multi) {
|
|
22246
22314
|
this.isOpen = false;
|
|
22315
|
+
this.searchTerm = '';
|
|
22247
22316
|
}
|
|
22248
22317
|
},
|
|
22249
22318
|
handleStateChange: function handleStateChange(_ref2) {
|
|
@@ -22267,6 +22336,9 @@
|
|
|
22267
22336
|
var value = e.target.value;
|
|
22268
22337
|
this.searchTerm = value;
|
|
22269
22338
|
},
|
|
22339
|
+
clearSearchTerm: function clearSearchTerm() {
|
|
22340
|
+
this.searchTerm = '';
|
|
22341
|
+
},
|
|
22270
22342
|
renderToString: function renderToString(value) {
|
|
22271
22343
|
var _this2 = this;
|
|
22272
22344
|
|
|
@@ -22307,6 +22379,51 @@
|
|
|
22307
22379
|
return h("p", {
|
|
22308
22380
|
"class": getClassName$6(this.$props.innerClass, 'noResults') || null
|
|
22309
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;
|
|
22310
22427
|
}
|
|
22311
22428
|
}
|
|
22312
22429
|
};
|
|
@@ -22365,10 +22482,12 @@
|
|
|
22365
22482
|
showMissing: VueTypes.bool.def(false),
|
|
22366
22483
|
missingLabel: VueTypes.string.def('N/A'),
|
|
22367
22484
|
showSearch: VueTypes.bool.def(false),
|
|
22485
|
+
showClear: VueTypes.bool.def(false),
|
|
22368
22486
|
showLoadMore: VueTypes.bool.def(false),
|
|
22369
22487
|
loadMoreLabel: VueTypes.oneOfType([VueTypes.string, VueTypes.any]).def('Load More'),
|
|
22370
22488
|
nestedField: types.string,
|
|
22371
|
-
index: VueTypes.string
|
|
22489
|
+
index: VueTypes.string,
|
|
22490
|
+
searchPlaceholder: VueTypes.string.def('Type here to search...')
|
|
22372
22491
|
},
|
|
22373
22492
|
created: function created() {
|
|
22374
22493
|
if (!this.enableAppbase && this.$props.index) {
|
|
@@ -22482,7 +22601,9 @@
|
|
|
22482
22601
|
if (!this.hasCustomRenderer && this.$data.modifiedOptions.length === 0 && !this.isLoading) {
|
|
22483
22602
|
if (renderNoResults && isFunction$1(renderNoResults)) {
|
|
22484
22603
|
return h("div", [renderNoResults()]);
|
|
22485
|
-
}
|
|
22604
|
+
}
|
|
22605
|
+
|
|
22606
|
+
if (renderNoResults && !isFunction$1(renderNoResults)) {
|
|
22486
22607
|
return renderNoResults;
|
|
22487
22608
|
}
|
|
22488
22609
|
|
|
@@ -22520,6 +22641,8 @@
|
|
|
22520
22641
|
"renderNoResults": this.$scopedSlots.renderNoResults || this.$props.renderNoResults,
|
|
22521
22642
|
"themePreset": this.themePreset,
|
|
22522
22643
|
"showSearch": this.$props.showSearch,
|
|
22644
|
+
"showClear": this.$props.showClear,
|
|
22645
|
+
"searchPlaceholder": this.$props.searchPlaceholder,
|
|
22523
22646
|
"transformData": this.$props.transformData,
|
|
22524
22647
|
"footer": showLoadMore && !isLastBucket && h("div", {
|
|
22525
22648
|
"attrs": {
|
|
@@ -22812,10 +22935,12 @@
|
|
|
22812
22935
|
showMissing: VueTypes.bool.def(false),
|
|
22813
22936
|
missingLabel: VueTypes.string.def('N/A'),
|
|
22814
22937
|
showSearch: VueTypes.bool.def(false),
|
|
22938
|
+
showClear: VueTypes.bool.def(false),
|
|
22815
22939
|
showLoadMore: VueTypes.bool.def(false),
|
|
22816
22940
|
loadMoreLabel: VueTypes.oneOfType([VueTypes.string, VueTypes.any]).def('Load More'),
|
|
22817
22941
|
nestedField: types.string,
|
|
22818
|
-
index: VueTypes.string
|
|
22942
|
+
index: VueTypes.string,
|
|
22943
|
+
searchPlaceholder: VueTypes.string.def('Type here to search...')
|
|
22819
22944
|
},
|
|
22820
22945
|
created: function created() {
|
|
22821
22946
|
if (!this.enableAppbase && this.$props.index) {
|
|
@@ -22943,7 +23068,9 @@
|
|
|
22943
23068
|
if (!this.hasCustomRenderer && this.$data.modifiedOptions.length === 0 && !this.isLoading) {
|
|
22944
23069
|
if (renderNoResults && isFunction$1(renderNoResults)) {
|
|
22945
23070
|
return h("div", [renderNoResults()]);
|
|
22946
|
-
}
|
|
23071
|
+
}
|
|
23072
|
+
|
|
23073
|
+
if (renderNoResults && !isFunction$1(renderNoResults)) {
|
|
22947
23074
|
return renderNoResults;
|
|
22948
23075
|
}
|
|
22949
23076
|
|
|
@@ -22982,6 +23109,8 @@
|
|
|
22982
23109
|
"renderItem": renderItemCalc,
|
|
22983
23110
|
"renderNoResults": this.$scopedSlots.renderNoResults || this.$props.renderNoResults,
|
|
22984
23111
|
"showSearch": this.$props.showSearch,
|
|
23112
|
+
"showClear": this.$props.showClear,
|
|
23113
|
+
"searchPlaceholder": this.$props.searchPlaceholder,
|
|
22985
23114
|
"transformData": this.$props.transformData,
|
|
22986
23115
|
"footer": showLoadMore && !isLastBucket && h("div", {
|
|
22987
23116
|
"attrs": {
|
|
@@ -23328,7 +23457,7 @@
|
|
|
23328
23457
|
componentId: types.stringRequired,
|
|
23329
23458
|
data: types.data,
|
|
23330
23459
|
dataField: types.stringRequired,
|
|
23331
|
-
defaultValue: types.
|
|
23460
|
+
defaultValue: types.any,
|
|
23332
23461
|
value: types.stringOrArray,
|
|
23333
23462
|
filterLabel: types.string,
|
|
23334
23463
|
nestedField: types.string,
|
|
@@ -25952,6 +26081,7 @@
|
|
|
25952
26081
|
var orderOfQueries = [];
|
|
25953
26082
|
var hits = {};
|
|
25954
26083
|
var aggregations = {};
|
|
26084
|
+
var compositeAggregations = {};
|
|
25955
26085
|
var state = {};
|
|
25956
26086
|
var customQueries = {};
|
|
25957
26087
|
var defaultQueries = {};
|
|
@@ -26186,6 +26316,11 @@
|
|
|
26186
26316
|
var _extends4;
|
|
26187
26317
|
|
|
26188
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
|
+
});
|
|
26189
26324
|
}
|
|
26190
26325
|
|
|
26191
26326
|
hits = _extends({}, hits, (_extends5 = {}, _extends5[component] = {
|
|
@@ -26212,6 +26347,8 @@
|
|
|
26212
26347
|
var promotedResults = {};
|
|
26213
26348
|
var rawData = {};
|
|
26214
26349
|
var customData = {};
|
|
26350
|
+
var settingsResponse = {};
|
|
26351
|
+
var timestamp = {};
|
|
26215
26352
|
var allPromises = orderOfQueries.map(function (component) {
|
|
26216
26353
|
return new Promise(function (responseResolve, responseReject) {
|
|
26217
26354
|
handleTransformResponse(res[component], component).then(function (response) {
|
|
@@ -26230,6 +26367,11 @@
|
|
|
26230
26367
|
|
|
26231
26368
|
if (response.customData) {
|
|
26232
26369
|
customData[component] = response.customData;
|
|
26370
|
+
} // Update settings
|
|
26371
|
+
|
|
26372
|
+
|
|
26373
|
+
if (response.settings) {
|
|
26374
|
+
settingsResponse[component] = response.settings;
|
|
26233
26375
|
}
|
|
26234
26376
|
|
|
26235
26377
|
if (response.aggregations) {
|
|
@@ -26238,6 +26380,7 @@
|
|
|
26238
26380
|
aggregations = _extends({}, aggregations, (_extends6 = {}, _extends6[component] = response.aggregations, _extends6));
|
|
26239
26381
|
}
|
|
26240
26382
|
|
|
26383
|
+
timestamp[component] = res._timestamp;
|
|
26241
26384
|
hits = _extends({}, hits, (_extends7 = {}, _extends7[component] = {
|
|
26242
26385
|
hits: response.hits.hits,
|
|
26243
26386
|
total: typeof response.hits.total === 'object' ? response.hits.total.value : response.hits.total,
|
|
@@ -26253,8 +26396,11 @@
|
|
|
26253
26396
|
Promise.all(allPromises).then(function () {
|
|
26254
26397
|
state = _extends({}, state, {
|
|
26255
26398
|
hits: hits,
|
|
26399
|
+
timestamp: timestamp,
|
|
26256
26400
|
aggregations: aggregations,
|
|
26401
|
+
compositeAggregations: compositeAggregations,
|
|
26257
26402
|
promotedResults: promotedResults,
|
|
26403
|
+
settings: settingsResponse,
|
|
26258
26404
|
customData: customData,
|
|
26259
26405
|
rawData: rawData
|
|
26260
26406
|
});
|
|
@@ -26313,7 +26459,7 @@
|
|
|
26313
26459
|
});
|
|
26314
26460
|
}
|
|
26315
26461
|
|
|
26316
|
-
var version = "1.
|
|
26462
|
+
var version = "1.25.0";
|
|
26317
26463
|
|
|
26318
26464
|
var _templateObject$n, _templateObject2$a;
|
|
26319
26465
|
|