@appbaseio/reactivesearch-vue 1.24.3 → 1.27.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 +679 -314
- 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-4aa35935.js} +58 -14
- package/dist/cjs/{ComponentWrapper-32481890.js → ComponentWrapper-10bad289.js} +1 -1
- package/dist/cjs/DataSearch.js +33 -84
- package/dist/cjs/{DropDown-6815b9b6.js → DropDown-7aa3d0d2.js} +65 -23
- package/dist/cjs/DynamicRangeSlider.js +48 -12
- package/dist/cjs/MultiDropdownList.js +18 -10
- package/dist/cjs/MultiList.js +21 -15
- package/dist/cjs/MultiRange.js +4 -4
- package/dist/cjs/RangeInput.js +9 -5
- package/dist/cjs/RangeSlider.js +19 -22
- package/dist/cjs/ReactiveBase.js +6 -4
- package/dist/cjs/ReactiveComponent.js +3 -3
- package/dist/cjs/ReactiveList.js +61 -44
- package/dist/cjs/ResultCard.js +1 -1
- package/dist/cjs/ResultList.js +1 -1
- package/dist/cjs/SelectedFilters.js +8 -6
- package/dist/cjs/SingleDropdownList.js +17 -9
- package/dist/cjs/SingleList.js +9 -8
- package/dist/cjs/SingleRange.js +4 -4
- package/dist/cjs/StateProvider.js +7 -3
- package/dist/cjs/ToggleButton.js +5 -5
- package/dist/cjs/{index-89c39a9e.js → index-4509aa45.js} +10 -4
- package/dist/cjs/index.js +9 -6
- package/dist/cjs/initReactivesearch.js +19 -0
- package/dist/cjs/install.js +7 -6
- package/dist/cjs/ssr-0ee35a09.js +39 -0
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/{vueTypes-4c19b4c8.js → vueTypes-57d01f18.js} +3 -3
- package/dist/es/{DownShift-3558d402.js → CancelSvg-c2c03a35.js} +55 -16
- package/dist/es/{ComponentWrapper-4f85a67e.js → ComponentWrapper-0f3431d1.js} +1 -1
- package/dist/es/DataSearch.js +23 -74
- package/dist/es/{DropDown-035c804f.js → DropDown-60a426a2.js} +64 -22
- package/dist/es/DynamicRangeSlider.js +48 -12
- package/dist/es/MultiDropdownList.js +18 -10
- package/dist/es/MultiList.js +21 -15
- package/dist/es/MultiRange.js +4 -4
- package/dist/es/RangeInput.js +9 -5
- package/dist/es/RangeSlider.js +19 -22
- package/dist/es/ReactiveBase.js +6 -4
- package/dist/es/ReactiveComponent.js +3 -3
- package/dist/es/ReactiveList.js +61 -44
- package/dist/es/ResultCard.js +1 -1
- package/dist/es/ResultList.js +1 -1
- package/dist/es/SelectedFilters.js +8 -6
- package/dist/es/SingleDropdownList.js +17 -9
- package/dist/es/SingleList.js +9 -8
- package/dist/es/SingleRange.js +4 -4
- package/dist/es/StateProvider.js +7 -3
- package/dist/es/ToggleButton.js +5 -5
- package/dist/es/{index-cb1950b6.js → index-78920565.js} +10 -4
- package/dist/es/index.js +9 -6
- package/dist/es/initReactivesearch.js +19 -0
- package/dist/es/install.js +7 -6
- package/dist/es/ssr-a41dfea9.js +33 -0
- package/dist/es/version.js +1 -1
- package/dist/es/{vueTypes-fb61bb7b.js → vueTypes-687b2304.js} +3 -3
- package/package.json +4 -4
- package/dist/cjs/ssr-08e95ede.js +0 -39
- package/dist/es/ssr-5d255b08.js +0 -33
|
@@ -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',
|
|
@@ -1348,7 +1351,6 @@
|
|
|
1348
1351
|
}
|
|
1349
1352
|
|
|
1350
1353
|
var defaultAnalyticsConfig = exports.defaultAnalyticsConfig = {
|
|
1351
|
-
searchStateHeader: false,
|
|
1352
1354
|
emptyQuery: true,
|
|
1353
1355
|
suggestionAnalytics: true,
|
|
1354
1356
|
userId: null,
|
|
@@ -1726,7 +1728,19 @@
|
|
|
1726
1728
|
return _extends({}, state, _defineProperty({}, action.component, _extends({}, state[action.component], action.payload)));
|
|
1727
1729
|
|
|
1728
1730
|
case constants.CLEAR_VALUES:
|
|
1729
|
-
|
|
1731
|
+
{
|
|
1732
|
+
if (action.resetValues) {
|
|
1733
|
+
var nextState = {};
|
|
1734
|
+
Object.keys(action.resetValues).forEach(function (componentId) {
|
|
1735
|
+
nextState[componentId] = _extends({}, state[componentId], {
|
|
1736
|
+
value: action.resetValues[componentId]
|
|
1737
|
+
});
|
|
1738
|
+
});
|
|
1739
|
+
return nextState;
|
|
1740
|
+
}
|
|
1741
|
+
|
|
1742
|
+
return {};
|
|
1743
|
+
}
|
|
1730
1744
|
|
|
1731
1745
|
case constants.REMOVE_COMPONENT:
|
|
1732
1746
|
{
|
|
@@ -2749,7 +2763,12 @@
|
|
|
2749
2763
|
var aggsResponse = Object.values(action.aggregations) && Object.values(action.aggregations)[0];
|
|
2750
2764
|
var fieldName = Object.keys(action.aggregations)[0];
|
|
2751
2765
|
if (!aggsResponse) return state;
|
|
2752
|
-
var buckets =
|
|
2766
|
+
var buckets = [];
|
|
2767
|
+
|
|
2768
|
+
if (aggsResponse.buckets && Array.isArray(aggsResponse.buckets)) {
|
|
2769
|
+
buckets = aggsResponse.buckets;
|
|
2770
|
+
}
|
|
2771
|
+
|
|
2753
2772
|
var parsedAggs = buckets.map(function (bucket) {
|
|
2754
2773
|
var doc_count = bucket.doc_count,
|
|
2755
2774
|
key = bucket.key,
|
|
@@ -2765,7 +2784,7 @@
|
|
|
2765
2784
|
|
|
2766
2785
|
return _extends({
|
|
2767
2786
|
_doc_count: doc_count,
|
|
2768
|
-
_key: key[fieldName],
|
|
2787
|
+
_key: typeof key === 'string' ? key : key[fieldName],
|
|
2769
2788
|
top_hits: hitsData
|
|
2770
2789
|
}, flatData, _source);
|
|
2771
2790
|
});
|
|
@@ -2775,7 +2794,7 @@
|
|
|
2775
2794
|
return state;
|
|
2776
2795
|
}
|
|
2777
2796
|
});
|
|
2778
|
-
unwrapExports(compositeAggsReducer_1);
|
|
2797
|
+
var compositeAggsReducer = unwrapExports(compositeAggsReducer_1);
|
|
2779
2798
|
|
|
2780
2799
|
var appliedSettingsReducer_1 = createCommonjsModule(function (module, exports) {
|
|
2781
2800
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4557,6 +4576,8 @@
|
|
|
4557
4576
|
return target;
|
|
4558
4577
|
};
|
|
4559
4578
|
|
|
4579
|
+
exports.replaceDiacritics = replaceDiacritics;
|
|
4580
|
+
|
|
4560
4581
|
var _diacritics2 = _interopRequireDefault(diacritics_1);
|
|
4561
4582
|
|
|
4562
4583
|
function _interopRequireDefault(obj) {
|
|
@@ -4834,12 +4855,13 @@
|
|
|
4834
4855
|
exports["default"] = getSuggestions;
|
|
4835
4856
|
});
|
|
4836
4857
|
unwrapExports(suggestions);
|
|
4858
|
+
var suggestions_1 = suggestions.replaceDiacritics;
|
|
4837
4859
|
|
|
4838
4860
|
var helper = createCommonjsModule(function (module, exports) {
|
|
4839
4861
|
Object.defineProperty(exports, "__esModule", {
|
|
4840
4862
|
value: true
|
|
4841
4863
|
});
|
|
4842
|
-
exports.getTopSuggestions = exports.withClickIds = exports.getCompositeAggsQuery = exports.getAggsQuery = exports.extractQueryFromDefaultQuery = exports.updateInternalQuery = exports.getSearchState = exports.getOptionsFromQuery = exports.parseHits = exports.handleA11yAction = exports.getInnerKey = exports.getClassName = exports.checkSomePropChange = exports.checkPropChange = exports.updateDefaultQuery = exports.updateCustomQuery = undefined;
|
|
4864
|
+
exports.getCalendarIntervalErrorMessage = exports.queryFormatMillisecondsMap = exports.suggestionTypes = exports.getTopSuggestions = exports.withClickIds = exports.getCompositeAggsQuery = exports.getAggsQuery = exports.extractQueryFromDefaultQuery = exports.updateInternalQuery = exports.getSearchState = exports.getOptionsFromQuery = exports.parseHits = exports.handleA11yAction = exports.getInnerKey = exports.getClassName = exports.checkSomePropChange = exports.checkPropChange = exports.updateDefaultQuery = exports.updateCustomQuery = undefined;
|
|
4843
4865
|
|
|
4844
4866
|
var _extends = Object.assign || function (target) {
|
|
4845
4867
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -4867,6 +4889,7 @@
|
|
|
4867
4889
|
exports.extractFieldsFromSource = extractFieldsFromSource;
|
|
4868
4890
|
exports.normalizeDataField = normalizeDataField;
|
|
4869
4891
|
exports.handleOnSuggestions = handleOnSuggestions;
|
|
4892
|
+
exports.isValidDateRangeQueryFormat = isValidDateRangeQueryFormat;
|
|
4870
4893
|
|
|
4871
4894
|
var _dateFormats2 = _interopRequireDefault(dateFormats_1);
|
|
4872
4895
|
|
|
@@ -5255,7 +5278,7 @@
|
|
|
5255
5278
|
case 'epoch_millis':
|
|
5256
5279
|
return date.getTime();
|
|
5257
5280
|
|
|
5258
|
-
case '
|
|
5281
|
+
case 'epoch_second':
|
|
5259
5282
|
return Math.floor(date.getTime() / 1000);
|
|
5260
5283
|
|
|
5261
5284
|
default:
|
|
@@ -5648,36 +5671,89 @@
|
|
|
5648
5671
|
});
|
|
5649
5672
|
return withClickIds(finalSuggestions);
|
|
5650
5673
|
};
|
|
5674
|
+
|
|
5675
|
+
function isValidDateRangeQueryFormat(queryFormat) {
|
|
5676
|
+
return Object.keys(_dateFormats2["default"]).includes(queryFormat);
|
|
5677
|
+
}
|
|
5678
|
+
|
|
5679
|
+
var suggestionTypes = exports.suggestionTypes = {
|
|
5680
|
+
Popular: 'popular',
|
|
5681
|
+
Index: 'index',
|
|
5682
|
+
Recent: 'recent',
|
|
5683
|
+
Promoted: 'promoted'
|
|
5684
|
+
};
|
|
5685
|
+
var queryFormatMillisecondsMap = exports.queryFormatMillisecondsMap = {
|
|
5686
|
+
minute: 60000,
|
|
5687
|
+
hour: 3600000,
|
|
5688
|
+
day: 86400000,
|
|
5689
|
+
week: 604800000,
|
|
5690
|
+
month: 2629746000,
|
|
5691
|
+
quarter: 7889238000,
|
|
5692
|
+
year: 31556952000
|
|
5693
|
+
};
|
|
5694
|
+
|
|
5695
|
+
var getCalendarIntervalErrorMessage = exports.getCalendarIntervalErrorMessage = function getCalendarIntervalErrorMessage(totalRange) {
|
|
5696
|
+
var calendarInterval = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'minute';
|
|
5697
|
+
var queryFormatMillisecondsMapKeys = Object.keys(queryFormatMillisecondsMap);
|
|
5698
|
+
var indexOfCurrentCalendarInterval = queryFormatMillisecondsMapKeys.indexOf(calendarInterval);
|
|
5699
|
+
|
|
5700
|
+
if (indexOfCurrentCalendarInterval === -1) {
|
|
5701
|
+
console.error('Invalid calendarInterval Passed');
|
|
5702
|
+
}
|
|
5703
|
+
|
|
5704
|
+
if (calendarInterval === 'year') {
|
|
5705
|
+
return 'Try using a shorter range of values.';
|
|
5706
|
+
}
|
|
5707
|
+
|
|
5708
|
+
for (var index = indexOfCurrentCalendarInterval + 1; index < queryFormatMillisecondsMapKeys.length; index += 1) {
|
|
5709
|
+
if (totalRange / Object.values(queryFormatMillisecondsMap)[index] <= 100) {
|
|
5710
|
+
var calendarIntervalKey = queryFormatMillisecondsMapKeys[index];
|
|
5711
|
+
return {
|
|
5712
|
+
errorMessage: 'Please pass calendarInterval prop with value greater than or equal to a `' + calendarIntervalKey + '` for a meaningful resolution of histogram.',
|
|
5713
|
+
calculatedCalendarInterval: calendarIntervalKey
|
|
5714
|
+
};
|
|
5715
|
+
}
|
|
5716
|
+
}
|
|
5717
|
+
|
|
5718
|
+
return {
|
|
5719
|
+
errorMessage: 'Try using a shorter range of values.',
|
|
5720
|
+
calculatedCalendarInterval: 'year'
|
|
5721
|
+
};
|
|
5722
|
+
};
|
|
5651
5723
|
});
|
|
5652
5724
|
unwrapExports(helper);
|
|
5653
|
-
var helper_1 = helper.
|
|
5654
|
-
var helper_2 = helper.
|
|
5655
|
-
var helper_3 = helper.
|
|
5656
|
-
var helper_4 = helper.
|
|
5657
|
-
var helper_5 = helper.
|
|
5658
|
-
var helper_6 = helper.
|
|
5659
|
-
var helper_7 = helper.
|
|
5660
|
-
var helper_8 = helper.
|
|
5661
|
-
var helper_9 = helper.
|
|
5662
|
-
var helper_10 = helper.
|
|
5663
|
-
var helper_11 = helper.
|
|
5664
|
-
var helper_12 = helper.
|
|
5665
|
-
var helper_13 = helper.
|
|
5666
|
-
var helper_14 = helper.
|
|
5667
|
-
var helper_15 = helper.
|
|
5668
|
-
var helper_16 = helper.
|
|
5669
|
-
var helper_17 = helper.
|
|
5670
|
-
var helper_18 = helper.
|
|
5671
|
-
var helper_19 = helper.
|
|
5672
|
-
var helper_20 = helper.
|
|
5673
|
-
var helper_21 = helper.
|
|
5674
|
-
var helper_22 = helper.
|
|
5675
|
-
var helper_23 = helper.
|
|
5676
|
-
var helper_24 = helper.
|
|
5677
|
-
var helper_25 = helper.
|
|
5678
|
-
var helper_26 = helper.
|
|
5679
|
-
var helper_27 = helper.
|
|
5680
|
-
var helper_28 = helper.
|
|
5725
|
+
var helper_1 = helper.getCalendarIntervalErrorMessage;
|
|
5726
|
+
var helper_2 = helper.queryFormatMillisecondsMap;
|
|
5727
|
+
var helper_3 = helper.suggestionTypes;
|
|
5728
|
+
var helper_4 = helper.getTopSuggestions;
|
|
5729
|
+
var helper_5 = helper.withClickIds;
|
|
5730
|
+
var helper_6 = helper.getCompositeAggsQuery;
|
|
5731
|
+
var helper_7 = helper.getAggsQuery;
|
|
5732
|
+
var helper_8 = helper.extractQueryFromDefaultQuery;
|
|
5733
|
+
var helper_9 = helper.updateInternalQuery;
|
|
5734
|
+
var helper_10 = helper.getSearchState;
|
|
5735
|
+
var helper_11 = helper.getOptionsFromQuery;
|
|
5736
|
+
var helper_12 = helper.parseHits;
|
|
5737
|
+
var helper_13 = helper.handleA11yAction;
|
|
5738
|
+
var helper_14 = helper.getInnerKey;
|
|
5739
|
+
var helper_15 = helper.getClassName;
|
|
5740
|
+
var helper_16 = helper.checkSomePropChange;
|
|
5741
|
+
var helper_17 = helper.checkPropChange;
|
|
5742
|
+
var helper_18 = helper.updateDefaultQuery;
|
|
5743
|
+
var helper_19 = helper.updateCustomQuery;
|
|
5744
|
+
var helper_20 = helper.isEqual;
|
|
5745
|
+
var helper_21 = helper.debounce;
|
|
5746
|
+
var helper_22 = helper.getQueryOptions;
|
|
5747
|
+
var helper_23 = helper.buildQuery;
|
|
5748
|
+
var helper_24 = helper.pushToAndClause;
|
|
5749
|
+
var helper_25 = helper.checkValueChange;
|
|
5750
|
+
var helper_26 = helper.getAggsOrder;
|
|
5751
|
+
var helper_27 = helper.formatDate;
|
|
5752
|
+
var helper_28 = helper.getResultStats;
|
|
5753
|
+
var helper_29 = helper.extractFieldsFromSource;
|
|
5754
|
+
var helper_30 = helper.normalizeDataField;
|
|
5755
|
+
var helper_31 = helper.handleOnSuggestions;
|
|
5756
|
+
var helper_32 = helper.isValidDateRangeQueryFormat;
|
|
5681
5757
|
|
|
5682
5758
|
var value = createCommonjsModule(function (module, exports) {
|
|
5683
5759
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5799,8 +5875,10 @@
|
|
|
5799
5875
|
}
|
|
5800
5876
|
|
|
5801
5877
|
function clearValues() {
|
|
5878
|
+
var resetValues = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
5802
5879
|
return {
|
|
5803
|
-
type: constants.CLEAR_VALUES
|
|
5880
|
+
type: constants.CLEAR_VALUES,
|
|
5881
|
+
resetValues: resetValues
|
|
5804
5882
|
};
|
|
5805
5883
|
}
|
|
5806
5884
|
});
|
|
@@ -6036,6 +6114,7 @@
|
|
|
6036
6114
|
exports.updateCompositeAggs = updateCompositeAggs;
|
|
6037
6115
|
exports.updateHits = updateHits;
|
|
6038
6116
|
exports.saveQueryToHits = saveQueryToHits;
|
|
6117
|
+
exports.mockDataForTesting = mockDataForTesting;
|
|
6039
6118
|
|
|
6040
6119
|
function updateAggs(component, aggregations) {
|
|
6041
6120
|
var append = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
@@ -6077,12 +6156,25 @@
|
|
|
6077
6156
|
query: query
|
|
6078
6157
|
};
|
|
6079
6158
|
}
|
|
6159
|
+
|
|
6160
|
+
function mockDataForTesting(component, data) {
|
|
6161
|
+
return function (dispatch) {
|
|
6162
|
+
if (data.hasOwnProperty('aggregations')) {
|
|
6163
|
+
dispatch(updateAggs(component, data.aggregations));
|
|
6164
|
+
}
|
|
6165
|
+
|
|
6166
|
+
if (data.hasOwnProperty('hits')) {
|
|
6167
|
+
dispatch(updateHits(component, data, data.time || undefined));
|
|
6168
|
+
}
|
|
6169
|
+
};
|
|
6170
|
+
}
|
|
6080
6171
|
});
|
|
6081
6172
|
unwrapExports(hits);
|
|
6082
6173
|
var hits_1 = hits.updateAggs;
|
|
6083
6174
|
var hits_2 = hits.updateCompositeAggs;
|
|
6084
6175
|
var hits_3 = hits.updateHits;
|
|
6085
6176
|
var hits_4 = hits.saveQueryToHits;
|
|
6177
|
+
var hits_5 = hits.mockDataForTesting;
|
|
6086
6178
|
|
|
6087
6179
|
var xdate = createCommonjsModule(function (module) {
|
|
6088
6180
|
/**
|
|
@@ -6910,6 +7002,8 @@
|
|
|
6910
7002
|
|
|
6911
7003
|
var _xdate2 = _interopRequireDefault(xdate);
|
|
6912
7004
|
|
|
7005
|
+
var _dateFormats2 = _interopRequireDefault(dateFormats_1);
|
|
7006
|
+
|
|
6913
7007
|
function _interopRequireDefault(obj) {
|
|
6914
7008
|
return obj && obj.__esModule ? obj : {
|
|
6915
7009
|
"default": obj
|
|
@@ -6943,10 +7037,10 @@
|
|
|
6943
7037
|
return obj;
|
|
6944
7038
|
}
|
|
6945
7039
|
|
|
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);
|
|
7040
|
+
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
7041
|
var multiRangeComponents = [constants$1.componentTypes.multiRange, constants$1.componentTypes.multiDropdownRange];
|
|
6948
7042
|
var dateRangeComponents = [constants$1.componentTypes.dateRange, constants$1.componentTypes.datePicker];
|
|
6949
|
-
var searchComponents = [constants$1.componentTypes.categorySearch, constants$1.componentTypes.dataSearch];
|
|
7043
|
+
var searchComponents = [constants$1.componentTypes.categorySearch, constants$1.componentTypes.dataSearch, constants$1.componentTypes.searchBox];
|
|
6950
7044
|
var listComponentsWithPagination = [constants$1.componentTypes.singleList, constants$1.componentTypes.multiList, constants$1.componentTypes.singleDropdownList, constants$1.componentTypes.multiDropdownList];
|
|
6951
7045
|
|
|
6952
7046
|
var getNormalizedField = exports.getNormalizedField = function getNormalizedField(field) {
|
|
@@ -7002,7 +7096,7 @@
|
|
|
7002
7096
|
return null;
|
|
7003
7097
|
}
|
|
7004
7098
|
|
|
7005
|
-
return {
|
|
7099
|
+
return _extends({
|
|
7006
7100
|
id: componentId,
|
|
7007
7101
|
type: queryType,
|
|
7008
7102
|
dataField: getNormalizedField(props.dataField),
|
|
@@ -7041,7 +7135,17 @@
|
|
|
7041
7135
|
distinctField: props.distinctField,
|
|
7042
7136
|
distinctFieldConfig: props.distinctFieldConfig,
|
|
7043
7137
|
index: props.index
|
|
7044
|
-
}
|
|
7138
|
+
}, queryType === constants$1.queryTypes.suggestion ? {
|
|
7139
|
+
enablePopularSuggestions: props.enablePopularSuggestions,
|
|
7140
|
+
enableRecentSuggestions: props.enableRecentSuggestions,
|
|
7141
|
+
popularSuggestionsConfig: props.popularSuggestionsConfig,
|
|
7142
|
+
recentSuggestionsConfig: props.recentSuggestionsConfig,
|
|
7143
|
+
applyStopwords: props.applyStopwords,
|
|
7144
|
+
customStopwords: props.customStopwords,
|
|
7145
|
+
enablePredictiveSuggestions: props.enablePredictiveSuggestions
|
|
7146
|
+
} : {}, {
|
|
7147
|
+
calendarInterval: props.calendarInterval
|
|
7148
|
+
});
|
|
7045
7149
|
}
|
|
7046
7150
|
|
|
7047
7151
|
return null;
|
|
@@ -7071,6 +7175,7 @@
|
|
|
7071
7175
|
var calcValues = store.selectedValues[component] || store.internalValues[component];
|
|
7072
7176
|
var value = calcValues !== undefined && calcValues !== null ? calcValues.value : undefined;
|
|
7073
7177
|
var queryFormat = componentProps.queryFormat;
|
|
7178
|
+
var calendarInterval = void 0;
|
|
7074
7179
|
var interval = componentProps.interval;
|
|
7075
7180
|
var type = componentToTypeMap[componentProps.componentType];
|
|
7076
7181
|
var dataField = componentProps.dataField;
|
|
@@ -7139,6 +7244,24 @@
|
|
|
7139
7244
|
aggregations = ['histogram'];
|
|
7140
7245
|
}
|
|
7141
7246
|
|
|
7247
|
+
if (componentProps.componentType === constants$1.componentTypes.dynamicRangeSlider || componentProps.componentType === constants$1.componentTypes.rangeSlider) {
|
|
7248
|
+
calendarInterval = Object.keys(_dateFormats2["default"]).includes(queryFormat) ? componentProps.calendarInterval : undefined;
|
|
7249
|
+
|
|
7250
|
+
if (value) {
|
|
7251
|
+
if ((0, helper.isValidDateRangeQueryFormat)(componentProps.queryFormat)) {
|
|
7252
|
+
value = {
|
|
7253
|
+
start: (0, helper.formatDate)(new _xdate2["default"](value.start), componentProps),
|
|
7254
|
+
end: (0, helper.formatDate)(new _xdate2["default"](value.end), componentProps)
|
|
7255
|
+
};
|
|
7256
|
+
} else {
|
|
7257
|
+
value = {
|
|
7258
|
+
start: parseFloat(value.start),
|
|
7259
|
+
end: parseFloat(value.end)
|
|
7260
|
+
};
|
|
7261
|
+
}
|
|
7262
|
+
}
|
|
7263
|
+
}
|
|
7264
|
+
|
|
7142
7265
|
if (dateRangeComponents.includes(componentProps.componentType)) {
|
|
7143
7266
|
queryFormat = 'or';
|
|
7144
7267
|
|
|
@@ -7261,6 +7384,7 @@
|
|
|
7261
7384
|
}
|
|
7262
7385
|
|
|
7263
7386
|
return _extends({}, componentProps, {
|
|
7387
|
+
calendarInterval: calendarInterval,
|
|
7264
7388
|
dataField: dataField,
|
|
7265
7389
|
queryFormat: queryFormat,
|
|
7266
7390
|
type: type,
|
|
@@ -7271,7 +7395,7 @@
|
|
|
7271
7395
|
defaultQuery: store.defaultQueries ? store.defaultQueries[component] : undefined,
|
|
7272
7396
|
customHighlight: store.customHighlightOptions ? store.customHighlightOptions[component] : undefined,
|
|
7273
7397
|
categoryValue: store.internalValues[component] ? store.internalValues[component].category : undefined,
|
|
7274
|
-
value: value,
|
|
7398
|
+
value: componentProps.componentType === constants$1.componentTypes.searchBox ? value || undefined : value,
|
|
7275
7399
|
pagination: pagination,
|
|
7276
7400
|
from: from
|
|
7277
7401
|
}, customOptions);
|
|
@@ -7307,7 +7431,8 @@
|
|
|
7307
7431
|
var orderOfQueries = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
7308
7432
|
var finalQuery = {};
|
|
7309
7433
|
var react = flatReactProp(store.dependencyTree[componentID], componentID);
|
|
7310
|
-
react.forEach(function (
|
|
7434
|
+
react.forEach(function (componentObject) {
|
|
7435
|
+
var component = componentObject;
|
|
7311
7436
|
var customQuery = store.customQueries[component];
|
|
7312
7437
|
|
|
7313
7438
|
if (!isInternalComponent(component)) {
|
|
@@ -7320,7 +7445,12 @@
|
|
|
7320
7445
|
execute = true;
|
|
7321
7446
|
}
|
|
7322
7447
|
|
|
7323
|
-
var
|
|
7448
|
+
var componentProps = store.props[component];
|
|
7449
|
+
var dependentQuery = getRSQuery(component, extractPropsFromState(store, component, _extends({}, componentProps && componentProps.componentType === constants$1.componentTypes.searchBox ? _extends({}, execute === false ? {
|
|
7450
|
+
type: constants$1.queryTypes.search
|
|
7451
|
+
} : {}, calcValues.category ? {
|
|
7452
|
+
categoryValue: calcValues.category
|
|
7453
|
+
} : {}) : {})), execute);
|
|
7324
7454
|
|
|
7325
7455
|
if (dependentQuery) {
|
|
7326
7456
|
finalQuery[component] = dependentQuery;
|
|
@@ -8291,6 +8421,20 @@
|
|
|
8291
8421
|
value: true
|
|
8292
8422
|
});
|
|
8293
8423
|
|
|
8424
|
+
var _extends = Object.assign || function (target) {
|
|
8425
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
8426
|
+
var source = arguments[i];
|
|
8427
|
+
|
|
8428
|
+
for (var key in source) {
|
|
8429
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
8430
|
+
target[key] = source[key];
|
|
8431
|
+
}
|
|
8432
|
+
}
|
|
8433
|
+
}
|
|
8434
|
+
|
|
8435
|
+
return target;
|
|
8436
|
+
};
|
|
8437
|
+
|
|
8294
8438
|
var _crossFetch2 = _interopRequireDefault(browserPonyfill);
|
|
8295
8439
|
|
|
8296
8440
|
function _interopRequireDefault(obj) {
|
|
@@ -8299,20 +8443,26 @@
|
|
|
8299
8443
|
};
|
|
8300
8444
|
}
|
|
8301
8445
|
|
|
8302
|
-
var fetchGraphQL = function fetchGraphQL(
|
|
8446
|
+
var fetchGraphQL = function fetchGraphQL(requestOptions) {
|
|
8447
|
+
var graphQLUrl = requestOptions.graphQLUrl,
|
|
8448
|
+
url = requestOptions.url,
|
|
8449
|
+
credentials = requestOptions.credentials,
|
|
8450
|
+
app = requestOptions.app,
|
|
8451
|
+
query = requestOptions.query,
|
|
8452
|
+
headers = requestOptions.headers;
|
|
8303
8453
|
var fetchUrl = credentials ? url.replace('//', '//' + credentials + '@') : url;
|
|
8304
8454
|
return (0, _crossFetch2["default"])(graphQLUrl, {
|
|
8305
8455
|
method: 'POST',
|
|
8306
|
-
body: '\n\t\t\tquery{\n\t\t\t\
|
|
8456
|
+
body: '\n\t\t\tquery{\n\t\t\t\telastic77(host: "' + fetchUrl + '"){\n\t\t\t\t\tmsearch(\n\t\t\t\t\t\tindex: "' + app + '"\n\t\t\t\t\t\tbody: ' + JSON.stringify(query.map(function (item) {
|
|
8307
8457
|
return JSON.stringify(item);
|
|
8308
8458
|
})) + '\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t}\n\t\t',
|
|
8309
|
-
headers: {
|
|
8459
|
+
headers: _extends({}, headers, {
|
|
8310
8460
|
'Content-Type': 'application/graphql'
|
|
8311
|
-
}
|
|
8461
|
+
})
|
|
8312
8462
|
}).then(function (res) {
|
|
8313
8463
|
return res.json();
|
|
8314
8464
|
}).then(function (jsonRes) {
|
|
8315
|
-
return jsonRes.data.
|
|
8465
|
+
return jsonRes.data.elastic77.msearch;
|
|
8316
8466
|
})["catch"](function (error) {
|
|
8317
8467
|
console.error(error);
|
|
8318
8468
|
});
|
|
@@ -8422,6 +8572,15 @@
|
|
|
8422
8572
|
};
|
|
8423
8573
|
}
|
|
8424
8574
|
|
|
8575
|
+
var handleTransformRequest = function handleTransformRequest(transformRequest, res) {
|
|
8576
|
+
if (transformRequest && typeof transformRequest === 'function') {
|
|
8577
|
+
var transformRequestPromise = transformRequest(res);
|
|
8578
|
+
return transformRequestPromise instanceof Promise ? transformRequestPromise : Promise.resolve(transformRequestPromise);
|
|
8579
|
+
}
|
|
8580
|
+
|
|
8581
|
+
return Promise.resolve(res);
|
|
8582
|
+
};
|
|
8583
|
+
|
|
8425
8584
|
function msearch(query, orderOfQueries) {
|
|
8426
8585
|
var appendToHits = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
8427
8586
|
var isInternalComponent = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
@@ -8472,14 +8631,6 @@
|
|
|
8472
8631
|
}
|
|
8473
8632
|
}
|
|
8474
8633
|
|
|
8475
|
-
if (config.analyticsConfig.searchStateHeader) {
|
|
8476
|
-
var searchState = (0, helper.getSearchState)(getState(), true);
|
|
8477
|
-
|
|
8478
|
-
if (searchState && Object.keys(searchState).length) {
|
|
8479
|
-
searchHeaders['X-Search-State'] = JSON.stringify(searchState);
|
|
8480
|
-
}
|
|
8481
|
-
}
|
|
8482
|
-
|
|
8483
8634
|
if (config.analyticsConfig.userId) {
|
|
8484
8635
|
searchHeaders['X-User-Id'] = config.analyticsConfig.userId;
|
|
8485
8636
|
}
|
|
@@ -8495,14 +8646,29 @@
|
|
|
8495
8646
|
});
|
|
8496
8647
|
|
|
8497
8648
|
if (config.graphQLUrl) {
|
|
8498
|
-
|
|
8499
|
-
|
|
8500
|
-
|
|
8501
|
-
|
|
8502
|
-
|
|
8503
|
-
|
|
8504
|
-
|
|
8505
|
-
|
|
8649
|
+
var requestOptions = {
|
|
8650
|
+
graphQLUrl: config.graphQLUrl,
|
|
8651
|
+
url: config.url,
|
|
8652
|
+
credentials: config.credentials,
|
|
8653
|
+
app: config.app,
|
|
8654
|
+
query: query,
|
|
8655
|
+
headers: headers
|
|
8656
|
+
};
|
|
8657
|
+
handleTransformRequest(appbaseRef.transformRequest, requestOptions).then(function (modifiedRequest) {
|
|
8658
|
+
(0, _graphQL2["default"])(modifiedRequest).then(function (res) {
|
|
8659
|
+
(0, utils.handleResponseMSearch)({
|
|
8660
|
+
res: res,
|
|
8661
|
+
isSuggestionsQuery: isSuggestionsQuery,
|
|
8662
|
+
orderOfQueries: orderOfQueries,
|
|
8663
|
+
appendToHits: appendToHits,
|
|
8664
|
+
appendToAggs: appendToAggs
|
|
8665
|
+
}, getState, dispatch);
|
|
8666
|
+
})["catch"](function (err) {
|
|
8667
|
+
(0, utils.handleError)({
|
|
8668
|
+
orderOfQueries: orderOfQueries,
|
|
8669
|
+
error: err
|
|
8670
|
+
}, getState, dispatch);
|
|
8671
|
+
});
|
|
8506
8672
|
})["catch"](function (err) {
|
|
8507
8673
|
(0, utils.handleError)({
|
|
8508
8674
|
orderOfQueries: orderOfQueries,
|
|
@@ -8699,7 +8865,7 @@
|
|
|
8699
8865
|
var isInternalComponent = componentId.endsWith('__internal');
|
|
8700
8866
|
var mainComponentProps = props[componentId];
|
|
8701
8867
|
|
|
8702
|
-
if (isInternalComponent && (0, transform.isSearchComponent)(mainComponentProps.componentType)) {
|
|
8868
|
+
if (isInternalComponent && mainComponentProps && (0, transform.isSearchComponent)(mainComponentProps.componentType)) {
|
|
8703
8869
|
value$1 = internalValues[componentId] && internalValues[componentId].value;
|
|
8704
8870
|
}
|
|
8705
8871
|
|
|
@@ -12778,19 +12944,19 @@
|
|
|
12778
12944
|
unit: VueTypes.oneOf(['mi', 'miles', 'yd', 'yards', 'ft', 'feet', 'in', 'inch', 'km', 'kilometers', 'm', 'meters', 'cm', 'centimeters', 'mm', 'millimeters', 'NM', 'nmi', 'nauticalmiles']),
|
|
12779
12945
|
value: VueTypes.string.def(undefined),
|
|
12780
12946
|
analyticsConfig: VueTypes.shape({
|
|
12781
|
-
searchStateHeader: VueTypes.bool,
|
|
12782
12947
|
emptyQuery: VueTypes.bool,
|
|
12783
12948
|
suggestionAnalytics: VueTypes.bool,
|
|
12784
12949
|
userId: VueTypes.string,
|
|
12785
12950
|
customEvents: VueTypes.object
|
|
12786
12951
|
}),
|
|
12787
12952
|
appbaseConfig: VueTypes.shape({
|
|
12788
|
-
enableQueryRules: VueTypes.bool,
|
|
12789
12953
|
recordAnalytics: VueTypes.bool,
|
|
12790
|
-
searchStateHeader: VueTypes.bool,
|
|
12791
12954
|
emptyQuery: VueTypes.bool,
|
|
12792
12955
|
suggestionAnalytics: VueTypes.bool,
|
|
12956
|
+
enableQueryRules: VueTypes.bool,
|
|
12957
|
+
enableSearchRelevancy: VueTypes.bool,
|
|
12793
12958
|
userId: VueTypes.string,
|
|
12959
|
+
useCache: VueTypes.bool,
|
|
12794
12960
|
customEvents: VueTypes.object,
|
|
12795
12961
|
enableTelemetry: VueTypes.bool.def(true)
|
|
12796
12962
|
}).def({}),
|
|
@@ -13138,10 +13304,16 @@
|
|
|
13138
13304
|
}; // parses current array (i.e. this.$props.value) for `onChange` callback for multi-* components
|
|
13139
13305
|
|
|
13140
13306
|
function parseValueArray(objectValues, currentValue) {
|
|
13141
|
-
var
|
|
13142
|
-
|
|
13143
|
-
|
|
13144
|
-
|
|
13307
|
+
var selectedValues;
|
|
13308
|
+
|
|
13309
|
+
if (Array.isArray(objectValues)) {
|
|
13310
|
+
selectedValues = [].concat(objectValues);
|
|
13311
|
+
} else {
|
|
13312
|
+
var keys = Object.keys(objectValues);
|
|
13313
|
+
selectedValues = keys.map(function (key) {
|
|
13314
|
+
return objectValues[key] ? key : null;
|
|
13315
|
+
});
|
|
13316
|
+
}
|
|
13145
13317
|
|
|
13146
13318
|
if (selectedValues.includes(currentValue)) {
|
|
13147
13319
|
return selectedValues.filter(function (item) {
|
|
@@ -13948,9 +14120,20 @@
|
|
|
13948
14120
|
}
|
|
13949
14121
|
|
|
13950
14122
|
this.internalComponent = this.$props.componentId + "__internal";
|
|
13951
|
-
this.sortOptionIndex =
|
|
13952
|
-
|
|
13953
|
-
|
|
14123
|
+
this.sortOptionIndex = 0;
|
|
14124
|
+
|
|
14125
|
+
if (this.defaultSortOption && this.sortOptions && Array.isArray(this.sortOptions)) {
|
|
14126
|
+
this.sortOptionIndex = this.sortOptions.findIndex(function (s) {
|
|
14127
|
+
return s.label === _this.defaultSortOption;
|
|
14128
|
+
});
|
|
14129
|
+
}
|
|
14130
|
+
|
|
14131
|
+
if (this.urlSortOption) {
|
|
14132
|
+
this.sortOptionIndex = this.$props.sortOptions.findIndex(function (s) {
|
|
14133
|
+
return s.label === _this.urlSortOption;
|
|
14134
|
+
}) || 0;
|
|
14135
|
+
}
|
|
14136
|
+
|
|
13954
14137
|
this.updateComponentProps(this.componentId, {
|
|
13955
14138
|
from: this.from
|
|
13956
14139
|
}, constants_1$1.reactiveList);
|
|
@@ -13960,7 +14143,7 @@
|
|
|
13960
14143
|
},
|
|
13961
14144
|
props: {
|
|
13962
14145
|
currentPage: VueTypes.number.def(0),
|
|
13963
|
-
includeFields: types.includeFields
|
|
14146
|
+
includeFields: types.includeFields,
|
|
13964
14147
|
// component props
|
|
13965
14148
|
className: types.string,
|
|
13966
14149
|
componentId: types.stringRequired,
|
|
@@ -13969,7 +14152,7 @@
|
|
|
13969
14152
|
aggregationSize: VueTypes.number,
|
|
13970
14153
|
defaultQuery: types.func,
|
|
13971
14154
|
defaultSortOption: types.string,
|
|
13972
|
-
excludeFields: types.excludeFields
|
|
14155
|
+
excludeFields: types.excludeFields,
|
|
13973
14156
|
innerClass: types.style,
|
|
13974
14157
|
listClass: VueTypes.string.def(''),
|
|
13975
14158
|
loader: types.title,
|
|
@@ -13981,7 +14164,7 @@
|
|
|
13981
14164
|
pages: VueTypes.number.def(5),
|
|
13982
14165
|
pagination: VueTypes.bool.def(false),
|
|
13983
14166
|
infiniteScroll: VueTypes.bool.def(true),
|
|
13984
|
-
paginationAt:
|
|
14167
|
+
paginationAt: VueTypes.oneOf(['top', 'bottom', 'both']).def('bottom'),
|
|
13985
14168
|
react: types.react,
|
|
13986
14169
|
scrollOnChange: VueTypes.bool.def(true),
|
|
13987
14170
|
showResultStats: VueTypes.bool.def(true),
|
|
@@ -14041,7 +14224,7 @@
|
|
|
14041
14224
|
filteredResults = [].concat(parsedPromotedResults, filteredResults);
|
|
14042
14225
|
}
|
|
14043
14226
|
|
|
14044
|
-
return
|
|
14227
|
+
return helper_5(filteredResults);
|
|
14045
14228
|
}
|
|
14046
14229
|
},
|
|
14047
14230
|
watch: {
|
|
@@ -14182,11 +14365,11 @@
|
|
|
14182
14365
|
var options = getQueryOptions(this.$props);
|
|
14183
14366
|
options.from = this.$data.from;
|
|
14184
14367
|
|
|
14185
|
-
if (this
|
|
14368
|
+
if (this.sortOptions && this.sortOptions[this.sortOptionIndex]) {
|
|
14186
14369
|
var _ref2;
|
|
14187
14370
|
|
|
14188
|
-
var sortField = this
|
|
14189
|
-
var sortBy = this
|
|
14371
|
+
var sortField = this.sortOptions[this.sortOptionIndex].dataField;
|
|
14372
|
+
var sortBy = this.sortOptions[this.sortOptionIndex].sortBy;
|
|
14190
14373
|
options.sort = [(_ref2 = {}, _ref2[sortField] = {
|
|
14191
14374
|
order: sortBy
|
|
14192
14375
|
}, _ref2)]; // To handle sort options for RS API
|
|
@@ -14256,10 +14439,10 @@
|
|
|
14256
14439
|
"class": this.$props.className
|
|
14257
14440
|
}, [this.isLoading && this.shouldRenderPagination && this.showInfiniteScroll && (this.$scopedSlots.loader || this.$props.loader), this.renderErrorComponent(), h(Flex, {
|
|
14258
14441
|
"attrs": {
|
|
14259
|
-
"labelPosition": this
|
|
14442
|
+
"labelPosition": this.sortOptions ? 'right' : 'left'
|
|
14260
14443
|
},
|
|
14261
14444
|
"class": getClassName$1(this.$props.innerClass, 'resultsInfo')
|
|
14262
|
-
}, [this
|
|
14445
|
+
}, [this.sortOptions ? this.renderSortOptions() : null, this.$props.showResultStats && results.length ? this.renderStats() : null]), !this.isLoading && hits && hits.length === 0 ? this.renderNoResult() : null, this.shouldRenderPagination && (this.$props.paginationAt === 'top' || this.$props.paginationAt === 'both') ? h(Pagination, {
|
|
14263
14446
|
"attrs": {
|
|
14264
14447
|
"pages": this.$props.pages,
|
|
14265
14448
|
"totalPages": this.totalPages,
|
|
@@ -14330,15 +14513,18 @@
|
|
|
14330
14513
|
var options = getQueryOptions(props);
|
|
14331
14514
|
options.from = this.$data.from;
|
|
14332
14515
|
|
|
14333
|
-
if (props.sortOptions) {
|
|
14334
|
-
var _ref5;
|
|
14335
|
-
|
|
14516
|
+
if (props.sortOptions && Array.isArray(props.sortOptions)) {
|
|
14336
14517
|
var sortOptionIndex = props.defaultSortOption ? props.sortOptions.findIndex(function (s) {
|
|
14337
14518
|
return s.label === props.defaultSortOption;
|
|
14338
14519
|
}) : 0;
|
|
14339
|
-
|
|
14340
|
-
|
|
14341
|
-
|
|
14520
|
+
|
|
14521
|
+
if (props.sortOptions[sortOptionIndex]) {
|
|
14522
|
+
var _ref5;
|
|
14523
|
+
|
|
14524
|
+
options.sort = [(_ref5 = {}, _ref5[props.sortOptions[sortOptionIndex].dataField] = {
|
|
14525
|
+
order: props.sortOptions[sortOptionIndex].sortBy
|
|
14526
|
+
}, _ref5)];
|
|
14527
|
+
}
|
|
14342
14528
|
} else if (props.sortBy) {
|
|
14343
14529
|
var _ref6;
|
|
14344
14530
|
|
|
@@ -14444,26 +14630,32 @@
|
|
|
14444
14630
|
}, [isFunction$1(renderNoResults) ? renderNoResults() : renderNoResults]);
|
|
14445
14631
|
},
|
|
14446
14632
|
handleSortChange: function handleSortChange(e) {
|
|
14447
|
-
var
|
|
14448
|
-
|
|
14449
|
-
var index = e.target.value; // This fixes issue #371 (where sorting a multi-result page with infinite loader breaks)
|
|
14633
|
+
var index = e.target.value;
|
|
14450
14634
|
|
|
14451
|
-
|
|
14452
|
-
|
|
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
|
|
14635
|
+
if (this.sortOptions && this.sortOptions[index]) {
|
|
14636
|
+
var _ref7;
|
|
14459
14637
|
|
|
14460
|
-
|
|
14461
|
-
|
|
14462
|
-
|
|
14463
|
-
|
|
14464
|
-
|
|
14465
|
-
|
|
14466
|
-
|
|
14638
|
+
// This fixes issue #371 (where sorting a multi-result page with infinite loader breaks)
|
|
14639
|
+
var options = getQueryOptions(this.$props);
|
|
14640
|
+
options.from = 0;
|
|
14641
|
+
var sortField = this.sortOptions[index].dataField;
|
|
14642
|
+
var sortBy = this.sortOptions[index].sortBy;
|
|
14643
|
+
options.sort = [(_ref7 = {}, _ref7[sortField] = {
|
|
14644
|
+
order: sortBy
|
|
14645
|
+
}, _ref7)];
|
|
14646
|
+
this.sortOptionIndex = index; // To handle sort options for RS API
|
|
14647
|
+
|
|
14648
|
+
this.updateComponentProps(this.componentId, {
|
|
14649
|
+
dataField: sortField,
|
|
14650
|
+
sortBy: sortBy
|
|
14651
|
+
}, constants_1$1.reactiveList);
|
|
14652
|
+
this.setQueryOptions(this.$props.componentId, options, true);
|
|
14653
|
+
this.setPage(0);
|
|
14654
|
+
this.currentPageState = 0;
|
|
14655
|
+
this.from = 0;
|
|
14656
|
+
var sortOption = this.$props.sortOptions[this.sortOptionIndex] ? this.$props.sortOptions[this.sortOptionIndex].label : null;
|
|
14657
|
+
this.setPageURL(this.$props.componentId + "sortOption", sortOption, this.$props.componentId + "sortOption", false, this.$props.URLParams);
|
|
14658
|
+
}
|
|
14467
14659
|
},
|
|
14468
14660
|
triggerClickAnalytics: function triggerClickAnalytics(searchPosition, documentId) {
|
|
14469
14661
|
var docId = documentId;
|
|
@@ -14497,7 +14689,7 @@
|
|
|
14497
14689
|
"domProps": {
|
|
14498
14690
|
"value": this.sortOptionIndex
|
|
14499
14691
|
}
|
|
14500
|
-
}, [this
|
|
14692
|
+
}, [this.sortOptions.map(function (sort, index) {
|
|
14501
14693
|
return h("option", {
|
|
14502
14694
|
"key": sort.label,
|
|
14503
14695
|
"domProps": {
|
|
@@ -14574,6 +14766,7 @@
|
|
|
14574
14766
|
var mapStateToProps$1 = function mapStateToProps(state, props) {
|
|
14575
14767
|
return {
|
|
14576
14768
|
defaultPage: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value - 1,
|
|
14769
|
+
urlSortOption: state.selectedValues[props.componentId + "sortOption"] && state.selectedValues[props.componentId + "sortOption"].value,
|
|
14577
14770
|
hits: state.hits[props.componentId] && state.hits[props.componentId].hits,
|
|
14578
14771
|
rawData: state.rawData[props.componentId],
|
|
14579
14772
|
aggregationData: state.compositeAggregations[props.componentId],
|
|
@@ -14603,11 +14796,7 @@
|
|
|
14603
14796
|
}; // Only used for SSR
|
|
14604
14797
|
|
|
14605
14798
|
ReactiveList.generateQueryOptions = function (props) {
|
|
14606
|
-
|
|
14607
|
-
var options = getQueryOptions(_extends({
|
|
14608
|
-
includeFields: ['*'],
|
|
14609
|
-
excludeFields: []
|
|
14610
|
-
}, props));
|
|
14799
|
+
var options = getQueryOptions(props);
|
|
14611
14800
|
var size = props.size,
|
|
14612
14801
|
dataField = props.dataField,
|
|
14613
14802
|
defaultSortOption = props.defaultSortOption,
|
|
@@ -14797,22 +14986,21 @@
|
|
|
14797
14986
|
var querystring_3 = querystring.encode;
|
|
14798
14987
|
var querystring_4 = querystring.stringify;
|
|
14799
14988
|
|
|
14800
|
-
var browserPonyfill$1 = createCommonjsModule(function (module) {
|
|
14801
|
-
var
|
|
14989
|
+
var browserPonyfill$1 = createCommonjsModule(function (module, exports) {
|
|
14990
|
+
var global = typeof self !== 'undefined' ? self : commonjsGlobal;
|
|
14991
|
+
|
|
14992
|
+
var __self__ = function () {
|
|
14802
14993
|
function F() {
|
|
14803
14994
|
this.fetch = false;
|
|
14995
|
+
this.DOMException = global.DOMException;
|
|
14804
14996
|
}
|
|
14805
14997
|
|
|
14806
|
-
F.prototype =
|
|
14998
|
+
F.prototype = global;
|
|
14807
14999
|
return new F();
|
|
14808
|
-
}(
|
|
15000
|
+
}();
|
|
14809
15001
|
|
|
14810
15002
|
(function (self) {
|
|
14811
|
-
|
|
14812
|
-
if (self.fetch) {
|
|
14813
|
-
return;
|
|
14814
|
-
}
|
|
14815
|
-
|
|
15003
|
+
var irrelevant = function (exports) {
|
|
14816
15004
|
var support = {
|
|
14817
15005
|
searchParams: 'URLSearchParams' in self,
|
|
14818
15006
|
iterable: 'Symbol' in self && 'iterator' in Symbol,
|
|
@@ -14828,13 +15016,13 @@
|
|
|
14828
15016
|
arrayBuffer: 'ArrayBuffer' in self
|
|
14829
15017
|
};
|
|
14830
15018
|
|
|
15019
|
+
function isDataView(obj) {
|
|
15020
|
+
return obj && DataView.prototype.isPrototypeOf(obj);
|
|
15021
|
+
}
|
|
15022
|
+
|
|
14831
15023
|
if (support.arrayBuffer) {
|
|
14832
15024
|
var viewClasses = ['[object Int8Array]', '[object Uint8Array]', '[object Uint8ClampedArray]', '[object Int16Array]', '[object Uint16Array]', '[object Int32Array]', '[object Uint32Array]', '[object Float32Array]', '[object Float64Array]'];
|
|
14833
15025
|
|
|
14834
|
-
var isDataView = function isDataView(obj) {
|
|
14835
|
-
return obj && DataView.prototype.isPrototypeOf(obj);
|
|
14836
|
-
};
|
|
14837
|
-
|
|
14838
15026
|
var isArrayBufferView = ArrayBuffer.isView || function (obj) {
|
|
14839
15027
|
return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1;
|
|
14840
15028
|
};
|
|
@@ -14845,7 +15033,7 @@
|
|
|
14845
15033
|
name = String(name);
|
|
14846
15034
|
}
|
|
14847
15035
|
|
|
14848
|
-
if (/[^a-z0-9\-#$%&'
|
|
15036
|
+
if (/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(name)) {
|
|
14849
15037
|
throw new TypeError('Invalid character in header field name');
|
|
14850
15038
|
}
|
|
14851
15039
|
|
|
@@ -14903,7 +15091,7 @@
|
|
|
14903
15091
|
name = normalizeName(name);
|
|
14904
15092
|
value = normalizeValue(value);
|
|
14905
15093
|
var oldValue = this.map[name];
|
|
14906
|
-
this.map[name] = oldValue ? oldValue + ',' + value : value;
|
|
15094
|
+
this.map[name] = oldValue ? oldValue + ', ' + value : value;
|
|
14907
15095
|
};
|
|
14908
15096
|
|
|
14909
15097
|
Headers.prototype['delete'] = function (name) {
|
|
@@ -15037,7 +15225,7 @@
|
|
|
15037
15225
|
} else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {
|
|
15038
15226
|
this._bodyArrayBuffer = bufferClone(body);
|
|
15039
15227
|
} else {
|
|
15040
|
-
|
|
15228
|
+
this._bodyText = body = Object.prototype.toString.call(body);
|
|
15041
15229
|
}
|
|
15042
15230
|
|
|
15043
15231
|
if (!this.headers.get('content-type')) {
|
|
@@ -15136,6 +15324,7 @@
|
|
|
15136
15324
|
|
|
15137
15325
|
this.method = input.method;
|
|
15138
15326
|
this.mode = input.mode;
|
|
15327
|
+
this.signal = input.signal;
|
|
15139
15328
|
|
|
15140
15329
|
if (!body && input._bodyInit != null) {
|
|
15141
15330
|
body = input._bodyInit;
|
|
@@ -15145,7 +15334,7 @@
|
|
|
15145
15334
|
this.url = String(input);
|
|
15146
15335
|
}
|
|
15147
15336
|
|
|
15148
|
-
this.credentials = options.credentials || this.credentials || '
|
|
15337
|
+
this.credentials = options.credentials || this.credentials || 'same-origin';
|
|
15149
15338
|
|
|
15150
15339
|
if (options.headers || !this.headers) {
|
|
15151
15340
|
this.headers = new Headers(options.headers);
|
|
@@ -15153,6 +15342,7 @@
|
|
|
15153
15342
|
|
|
15154
15343
|
this.method = normalizeMethod(options.method || this.method || 'GET');
|
|
15155
15344
|
this.mode = options.mode || this.mode || null;
|
|
15345
|
+
this.signal = options.signal || this.signal;
|
|
15156
15346
|
this.referrer = null;
|
|
15157
15347
|
|
|
15158
15348
|
if ((this.method === 'GET' || this.method === 'HEAD') && body) {
|
|
@@ -15250,15 +15440,36 @@
|
|
|
15250
15440
|
});
|
|
15251
15441
|
};
|
|
15252
15442
|
|
|
15253
|
-
|
|
15254
|
-
|
|
15255
|
-
|
|
15443
|
+
exports.DOMException = self.DOMException;
|
|
15444
|
+
|
|
15445
|
+
try {
|
|
15446
|
+
new exports.DOMException();
|
|
15447
|
+
} catch (err) {
|
|
15448
|
+
exports.DOMException = function (message, name) {
|
|
15449
|
+
this.message = message;
|
|
15450
|
+
this.name = name;
|
|
15451
|
+
var error = Error(message);
|
|
15452
|
+
this.stack = error.stack;
|
|
15453
|
+
};
|
|
15454
|
+
|
|
15455
|
+
exports.DOMException.prototype = Object.create(Error.prototype);
|
|
15456
|
+
exports.DOMException.prototype.constructor = exports.DOMException;
|
|
15457
|
+
}
|
|
15256
15458
|
|
|
15257
|
-
|
|
15459
|
+
function fetch(input, init) {
|
|
15258
15460
|
return new Promise(function (resolve, reject) {
|
|
15259
15461
|
var request = new Request(input, init);
|
|
15462
|
+
|
|
15463
|
+
if (request.signal && request.signal.aborted) {
|
|
15464
|
+
return reject(new exports.DOMException('Aborted', 'AbortError'));
|
|
15465
|
+
}
|
|
15466
|
+
|
|
15260
15467
|
var xhr = new XMLHttpRequest();
|
|
15261
15468
|
|
|
15469
|
+
function abortXhr() {
|
|
15470
|
+
xhr.abort();
|
|
15471
|
+
}
|
|
15472
|
+
|
|
15262
15473
|
xhr.onload = function () {
|
|
15263
15474
|
var options = {
|
|
15264
15475
|
status: xhr.status,
|
|
@@ -15278,6 +15489,10 @@
|
|
|
15278
15489
|
reject(new TypeError('Network request failed'));
|
|
15279
15490
|
};
|
|
15280
15491
|
|
|
15492
|
+
xhr.onabort = function () {
|
|
15493
|
+
reject(new exports.DOMException('Aborted', 'AbortError'));
|
|
15494
|
+
};
|
|
15495
|
+
|
|
15281
15496
|
xhr.open(request.method, request.url, true);
|
|
15282
15497
|
|
|
15283
15498
|
if (request.credentials === 'include') {
|
|
@@ -15293,24 +15508,65 @@
|
|
|
15293
15508
|
request.headers.forEach(function (value, name) {
|
|
15294
15509
|
xhr.setRequestHeader(name, value);
|
|
15295
15510
|
});
|
|
15511
|
+
|
|
15512
|
+
if (request.signal) {
|
|
15513
|
+
request.signal.addEventListener('abort', abortXhr);
|
|
15514
|
+
|
|
15515
|
+
xhr.onreadystatechange = function () {
|
|
15516
|
+
// DONE (success or failure)
|
|
15517
|
+
if (xhr.readyState === 4) {
|
|
15518
|
+
request.signal.removeEventListener('abort', abortXhr);
|
|
15519
|
+
}
|
|
15520
|
+
};
|
|
15521
|
+
}
|
|
15522
|
+
|
|
15296
15523
|
xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);
|
|
15297
15524
|
});
|
|
15298
|
-
}
|
|
15525
|
+
}
|
|
15299
15526
|
|
|
15300
|
-
|
|
15301
|
-
})(typeof self !== 'undefined' ? self : this);
|
|
15302
|
-
}).call(__root__, void 0);
|
|
15303
|
-
var fetch = __root__.fetch;
|
|
15304
|
-
var Response = fetch.Response = __root__.Response;
|
|
15305
|
-
var Request = fetch.Request = __root__.Request;
|
|
15306
|
-
var Headers = fetch.Headers = __root__.Headers;
|
|
15527
|
+
fetch.polyfill = true;
|
|
15307
15528
|
|
|
15308
|
-
|
|
15309
|
-
|
|
15529
|
+
if (!self.fetch) {
|
|
15530
|
+
self.fetch = fetch;
|
|
15531
|
+
self.Headers = Headers;
|
|
15532
|
+
self.Request = Request;
|
|
15533
|
+
self.Response = Response;
|
|
15534
|
+
}
|
|
15310
15535
|
|
|
15311
|
-
|
|
15312
|
-
|
|
15536
|
+
exports.Headers = Headers;
|
|
15537
|
+
exports.Request = Request;
|
|
15538
|
+
exports.Response = Response;
|
|
15539
|
+
exports.fetch = fetch;
|
|
15540
|
+
Object.defineProperty(exports, '__esModule', {
|
|
15541
|
+
value: true
|
|
15542
|
+
});
|
|
15543
|
+
return exports;
|
|
15544
|
+
}({});
|
|
15545
|
+
})(__self__);
|
|
15546
|
+
|
|
15547
|
+
__self__.fetch.ponyfill = true; // Remove "polyfill" property added by whatwg-fetch
|
|
15548
|
+
|
|
15549
|
+
delete __self__.fetch.polyfill; // Choose between native implementation (global) or custom implementation (__self__)
|
|
15550
|
+
// var ctx = global.fetch ? global : __self__;
|
|
15551
|
+
|
|
15552
|
+
var ctx = __self__; // this line disable service worker support temporarily
|
|
15553
|
+
|
|
15554
|
+
exports = ctx.fetch; // To enable: import fetch from 'cross-fetch'
|
|
15555
|
+
|
|
15556
|
+
exports["default"] = ctx.fetch; // For TypeScript consumers without esModuleInterop.
|
|
15557
|
+
|
|
15558
|
+
exports.fetch = ctx.fetch; // To enable: import {fetch} from 'cross-fetch'
|
|
15559
|
+
|
|
15560
|
+
exports.Headers = ctx.Headers;
|
|
15561
|
+
exports.Request = ctx.Request;
|
|
15562
|
+
exports.Response = ctx.Response;
|
|
15563
|
+
module.exports = exports;
|
|
15313
15564
|
});
|
|
15565
|
+
var fetch$1 = unwrapExports(browserPonyfill$1);
|
|
15566
|
+
var browserPonyfill_1$1 = browserPonyfill$1.fetch;
|
|
15567
|
+
var browserPonyfill_2$1 = browserPonyfill$1.Headers;
|
|
15568
|
+
var browserPonyfill_3$1 = browserPonyfill$1.Request;
|
|
15569
|
+
var browserPonyfill_4$1 = browserPonyfill$1.Response;
|
|
15314
15570
|
|
|
15315
15571
|
var _typeof$1 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
|
15316
15572
|
return typeof obj;
|
|
@@ -15642,17 +15898,10 @@
|
|
|
15642
15898
|
}
|
|
15643
15899
|
|
|
15644
15900
|
var credentials = auth || null;
|
|
15645
|
-
|
|
15646
|
-
if (!config.mongodb) {
|
|
15647
|
-
if (isAppbase(url) && credentials === null) {
|
|
15648
|
-
throw new Error('Authentication information is not present. Did you add credentials?');
|
|
15649
|
-
}
|
|
15650
|
-
}
|
|
15651
15901
|
/**
|
|
15652
15902
|
* Credentials can be provided as a part of the URL,
|
|
15653
15903
|
* as username, password args or as a credentials argument directly */
|
|
15654
15904
|
|
|
15655
|
-
|
|
15656
15905
|
if (typeof config.credentials === 'string' && config.credentials !== '') {
|
|
15657
15906
|
// eslint-disable-next-line
|
|
15658
15907
|
credentials = config.credentials;
|
|
@@ -15660,6 +15909,12 @@
|
|
|
15660
15909
|
credentials = config.username + ':' + config.password;
|
|
15661
15910
|
}
|
|
15662
15911
|
|
|
15912
|
+
if (!config.mongodb) {
|
|
15913
|
+
if (isAppbase(url) && credentials === null) {
|
|
15914
|
+
throw new Error('Authentication information is not present. Did you add credentials?');
|
|
15915
|
+
}
|
|
15916
|
+
}
|
|
15917
|
+
|
|
15663
15918
|
this.url = url;
|
|
15664
15919
|
this.protocol = protocol;
|
|
15665
15920
|
this.app = config.app;
|
|
@@ -15757,7 +16012,7 @@
|
|
|
15757
16012
|
var transformedRequest = Object.assign({}, ts);
|
|
15758
16013
|
var url = transformedRequest.url;
|
|
15759
16014
|
delete transformedRequest.url;
|
|
15760
|
-
return
|
|
16015
|
+
return fetch$1(url || finalURL, Object.assign({}, transformedRequest, {
|
|
15761
16016
|
// apply timestamp header for RS API
|
|
15762
16017
|
headers: isRSAPI && !isMongoRequest ? Object.assign({}, transformedRequest.headers, {
|
|
15763
16018
|
'x-timestamp': new Date().getTime()
|
|
@@ -16688,7 +16943,7 @@
|
|
|
16688
16943
|
headers: types.headers,
|
|
16689
16944
|
getSearchParams: types.func,
|
|
16690
16945
|
setSearchParams: types.func,
|
|
16691
|
-
as:
|
|
16946
|
+
as: VueTypes.string.def('div')
|
|
16692
16947
|
},
|
|
16693
16948
|
mounted: function mounted() {
|
|
16694
16949
|
var _this = this;
|
|
@@ -16836,7 +17091,9 @@
|
|
|
16836
17091
|
return value.map(function (item) {
|
|
16837
17092
|
return _this3.getValue(item);
|
|
16838
17093
|
});
|
|
16839
|
-
}
|
|
17094
|
+
}
|
|
17095
|
+
|
|
17096
|
+
if (value && typeof value === 'object') {
|
|
16840
17097
|
// TODO: support for NestedList
|
|
16841
17098
|
if (value.location) return value;
|
|
16842
17099
|
if (value.category) return value;
|
|
@@ -17010,14 +17267,14 @@
|
|
|
17010
17267
|
this.updateState(this.$props);
|
|
17011
17268
|
},
|
|
17012
17269
|
analyticsConfig: function analyticsConfig(newVal, oldVal) {
|
|
17013
|
-
if (!
|
|
17270
|
+
if (!helper_20(newVal, oldVal)) {
|
|
17014
17271
|
if (this.store) {
|
|
17015
17272
|
this.store.dispatch(analytics_3$1(newVal));
|
|
17016
17273
|
}
|
|
17017
17274
|
}
|
|
17018
17275
|
},
|
|
17019
17276
|
appbaseConfig: function appbaseConfig(newVal, oldVal) {
|
|
17020
|
-
if (!
|
|
17277
|
+
if (!helper_20(newVal, oldVal)) {
|
|
17021
17278
|
if (this.store) {
|
|
17022
17279
|
this.store.dispatch(analytics_3$1(newVal));
|
|
17023
17280
|
}
|
|
@@ -17950,8 +18207,7 @@
|
|
|
17950
18207
|
internal_isOpen: false,
|
|
17951
18208
|
internal_inputValue: '',
|
|
17952
18209
|
internal_selectedItem: null,
|
|
17953
|
-
internal_highlightedIndex: null
|
|
17954
|
-
internal_eventsCalled: {}
|
|
18210
|
+
internal_highlightedIndex: null
|
|
17955
18211
|
};
|
|
17956
18212
|
},
|
|
17957
18213
|
computed: {
|
|
@@ -18136,23 +18392,11 @@
|
|
|
18136
18392
|
}
|
|
18137
18393
|
|
|
18138
18394
|
var vm = this;
|
|
18139
|
-
setTimeout(function () {
|
|
18140
|
-
vm.internal_eventsCalled[index] = false;
|
|
18141
|
-
}, 0);
|
|
18142
18395
|
return {
|
|
18143
18396
|
mouseenter: function mouseenter() {
|
|
18144
18397
|
vm.setHighlightedIndex(newIndex);
|
|
18145
18398
|
},
|
|
18146
|
-
// for browsers not supporting click event (e.g. firefox android)
|
|
18147
|
-
mousedown: function mousedown(event) {
|
|
18148
|
-
if (vm.internal_eventsCalled[index]) return;
|
|
18149
|
-
vm.internal_eventsCalled[index] = true;
|
|
18150
|
-
event.stopPropagation();
|
|
18151
|
-
vm.selectItemAtIndex(newIndex);
|
|
18152
|
-
},
|
|
18153
18399
|
click: function click(event) {
|
|
18154
|
-
if (vm.internal_eventsCalled[index]) return;
|
|
18155
|
-
vm.internal_eventsCalled[index] = true;
|
|
18156
18400
|
event.stopPropagation();
|
|
18157
18401
|
vm.selectItemAtIndex(newIndex);
|
|
18158
18402
|
}
|
|
@@ -18447,24 +18691,22 @@
|
|
|
18447
18691
|
|
|
18448
18692
|
return __webpack_require__(0);
|
|
18449
18693
|
/******/
|
|
18450
|
-
}
|
|
18451
|
-
|
|
18452
|
-
|
|
18453
|
-
/***/
|
|
18454
|
-
|
|
18455
|
-
/* 1 */
|
|
18456
|
-
|
|
18457
|
-
/***/
|
|
18458
|
-
|
|
18459
|
-
/* 2 */
|
|
18694
|
+
}
|
|
18695
|
+
/************************************************************************/
|
|
18460
18696
|
|
|
18461
|
-
|
|
18697
|
+
/******/
|
|
18698
|
+
([
|
|
18699
|
+
/* 0 */
|
|
18462
18700
|
|
|
18463
|
-
|
|
18701
|
+
/***/
|
|
18464
18702
|
function (module, exports, __webpack_require__) {
|
|
18465
18703
|
module.exports = __webpack_require__(1);
|
|
18466
18704
|
/***/
|
|
18467
|
-
},
|
|
18705
|
+
},
|
|
18706
|
+
/* 1 */
|
|
18707
|
+
|
|
18708
|
+
/***/
|
|
18709
|
+
function (module, exports, __webpack_require__) {
|
|
18468
18710
|
|
|
18469
18711
|
Object.defineProperty(exports, "__esModule", {
|
|
18470
18712
|
value: true
|
|
@@ -18497,7 +18739,11 @@
|
|
|
18497
18739
|
}
|
|
18498
18740
|
});
|
|
18499
18741
|
/***/
|
|
18500
|
-
},
|
|
18742
|
+
},
|
|
18743
|
+
/* 2 */
|
|
18744
|
+
|
|
18745
|
+
/***/
|
|
18746
|
+
function (module, exports) {
|
|
18501
18747
|
|
|
18502
18748
|
Object.defineProperty(exports, "__esModule", {
|
|
18503
18749
|
value: true
|
|
@@ -18666,7 +18912,9 @@
|
|
|
18666
18912
|
}
|
|
18667
18913
|
/***/
|
|
18668
18914
|
|
|
18669
|
-
}
|
|
18915
|
+
}
|
|
18916
|
+
/******/
|
|
18917
|
+
]);
|
|
18670
18918
|
});
|
|
18671
18919
|
unwrapExports(dist);
|
|
18672
18920
|
var dist_1 = dist.findAll;
|
|
@@ -19396,8 +19644,8 @@
|
|
|
19396
19644
|
name: 'Mic',
|
|
19397
19645
|
props: {
|
|
19398
19646
|
children: types.title,
|
|
19399
|
-
lang:
|
|
19400
|
-
iconPosition:
|
|
19647
|
+
lang: VueTypes.string.def('en-US'),
|
|
19648
|
+
iconPosition: VueTypes.string.def('left'),
|
|
19401
19649
|
handleResult: types.func,
|
|
19402
19650
|
onNoMatch: types.func,
|
|
19403
19651
|
onError: types.func,
|
|
@@ -19809,10 +20057,10 @@
|
|
|
19809
20057
|
})]),
|
|
19810
20058
|
aggregationField: types.string,
|
|
19811
20059
|
aggregationSize: VueTypes.number,
|
|
19812
|
-
size: VueTypes.number
|
|
20060
|
+
size: VueTypes.number,
|
|
19813
20061
|
debounce: VueTypes.number.def(0),
|
|
19814
20062
|
defaultValue: types.string,
|
|
19815
|
-
excludeFields: types.excludeFields
|
|
20063
|
+
excludeFields: types.excludeFields,
|
|
19816
20064
|
value: types.value,
|
|
19817
20065
|
defaultSuggestions: types.suggestions,
|
|
19818
20066
|
enableSynonyms: VueTypes.bool.def(true),
|
|
@@ -19826,9 +20074,9 @@
|
|
|
19826
20074
|
highlightField: types.stringOrArray,
|
|
19827
20075
|
icon: types.children,
|
|
19828
20076
|
iconPosition: VueTypes.oneOf(['left', 'right']).def('left'),
|
|
19829
|
-
includeFields: types.includeFields
|
|
20077
|
+
includeFields: types.includeFields,
|
|
19830
20078
|
innerClass: types.style,
|
|
19831
|
-
innerRef:
|
|
20079
|
+
innerRef: VueTypes.string.def('searchInputField'),
|
|
19832
20080
|
render: types.func,
|
|
19833
20081
|
renderQuerySuggestions: types.func,
|
|
19834
20082
|
renderPopularSuggestions: types.func,
|
|
@@ -19860,7 +20108,7 @@
|
|
|
19860
20108
|
focusShortcuts: VueTypes.arrayOf(VueTypes.oneOfType([VueTypes.string, VueTypes.number])).def(['/']),
|
|
19861
20109
|
addonBefore: VueTypes.any,
|
|
19862
20110
|
addonAfter: VueTypes.any,
|
|
19863
|
-
expandSuggestionsContainer:
|
|
20111
|
+
expandSuggestionsContainer: VueTypes.bool.def(true),
|
|
19864
20112
|
index: VueTypes.string
|
|
19865
20113
|
},
|
|
19866
20114
|
beforeMount: function beforeMount() {
|
|
@@ -20029,7 +20277,7 @@
|
|
|
20029
20277
|
// returns size and aggs property
|
|
20030
20278
|
getBasicQueryOptions: function getBasicQueryOptions() {
|
|
20031
20279
|
var aggregationField = this.$props.aggregationField;
|
|
20032
|
-
var queryOptions =
|
|
20280
|
+
var queryOptions = helper_22(this.$props);
|
|
20033
20281
|
|
|
20034
20282
|
if (aggregationField) {
|
|
20035
20283
|
queryOptions.aggs = getCompositeAggsQuery$1({
|
|
@@ -20135,7 +20383,7 @@
|
|
|
20135
20383
|
updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
|
|
20136
20384
|
}
|
|
20137
20385
|
|
|
20138
|
-
this.setQueryOptions(this.internalComponent, _extends({}, this.queryOptions, defaultQueryOptions));
|
|
20386
|
+
this.setQueryOptions(this.internalComponent, _extends({}, this.queryOptions, defaultQueryOptions), false);
|
|
20139
20387
|
this.updateQuery({
|
|
20140
20388
|
componentId: this.internalComponent,
|
|
20141
20389
|
query: query,
|
|
@@ -20162,7 +20410,7 @@
|
|
|
20162
20410
|
|
|
20163
20411
|
customQueryOptions = getOptionsFromQuery$1(customQueryTobeSet);
|
|
20164
20412
|
updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
20165
|
-
this.setQueryOptions(componentId, _extends({}, this.queryOptions, customQueryOptions));
|
|
20413
|
+
this.setQueryOptions(componentId, _extends({}, this.queryOptions, customQueryOptions), false);
|
|
20166
20414
|
}
|
|
20167
20415
|
|
|
20168
20416
|
if (!this.isPending) {
|
|
@@ -20521,7 +20769,7 @@
|
|
|
20521
20769
|
highlightedIndex: highlightedIndex
|
|
20522
20770
|
}), _this3.renderErrorComponent(), !_this3.hasCustomRenderer && isOpen && hasSuggestions ? h("ul", {
|
|
20523
20771
|
"class": suggestions$1(_this3.themePreset, theme) + " " + getClassName$3(_this3.$props.innerClass, 'list')
|
|
20524
|
-
}, [_this3.suggestionsList.slice(0, size).map(function (item, index) {
|
|
20772
|
+
}, [_this3.suggestionsList.slice(0, size || 10).map(function (item, index) {
|
|
20525
20773
|
return h("li", {
|
|
20526
20774
|
"domProps": _extends({}, getItemProps({
|
|
20527
20775
|
item: item
|
|
@@ -21000,7 +21248,7 @@
|
|
|
21000
21248
|
name: 'SingleList',
|
|
21001
21249
|
props: {
|
|
21002
21250
|
beforeValueChange: types.func,
|
|
21003
|
-
className:
|
|
21251
|
+
className: VueTypes.string.def(''),
|
|
21004
21252
|
componentId: types.stringRequired,
|
|
21005
21253
|
customQuery: types.func,
|
|
21006
21254
|
dataField: types.stringRequired,
|
|
@@ -21020,7 +21268,7 @@
|
|
|
21020
21268
|
showFilter: VueTypes.bool.def(true),
|
|
21021
21269
|
showRadio: VueTypes.bool.def(true),
|
|
21022
21270
|
showSearch: VueTypes.bool.def(true),
|
|
21023
|
-
size: VueTypes.number
|
|
21271
|
+
size: VueTypes.number,
|
|
21024
21272
|
sortBy: VueTypes.oneOf(['asc', 'desc', 'count']).def('count'),
|
|
21025
21273
|
title: types.title,
|
|
21026
21274
|
URLParams: VueTypes.bool.def(false),
|
|
@@ -21134,7 +21382,7 @@
|
|
|
21134
21382
|
var filteredItemsToRender = itemsToRender.filter(function (item) {
|
|
21135
21383
|
if (String(item.key).length) {
|
|
21136
21384
|
if (_this.$props.showSearch && _this.$data.searchTerm) {
|
|
21137
|
-
return String(item.key).toLowerCase().includes(_this.$data.searchTerm.toLowerCase());
|
|
21385
|
+
return suggestions_1(String(item.key)).toLowerCase().includes(suggestions_1(_this.$data.searchTerm.toLowerCase()));
|
|
21138
21386
|
}
|
|
21139
21387
|
|
|
21140
21388
|
return true;
|
|
@@ -21247,7 +21495,7 @@
|
|
|
21247
21495
|
updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
|
|
21248
21496
|
}
|
|
21249
21497
|
|
|
21250
|
-
this.setQueryOptions(this.internalComponent, defaultQueryOptions);
|
|
21498
|
+
this.setQueryOptions(this.internalComponent, defaultQueryOptions, false);
|
|
21251
21499
|
this.updateQuery({
|
|
21252
21500
|
componentId: this.internalComponent,
|
|
21253
21501
|
query: query,
|
|
@@ -21268,7 +21516,7 @@
|
|
|
21268
21516
|
updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
21269
21517
|
}
|
|
21270
21518
|
|
|
21271
|
-
this.setQueryOptions(props.componentId, customQueryOptions);
|
|
21519
|
+
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
21272
21520
|
this.updateQuery({
|
|
21273
21521
|
componentId: props.componentId,
|
|
21274
21522
|
query: query,
|
|
@@ -21481,7 +21729,7 @@
|
|
|
21481
21729
|
queryFormat: VueTypes.oneOf(['and', 'or']).def('or'),
|
|
21482
21730
|
showCheckbox: VueTypes.bool.def(true),
|
|
21483
21731
|
beforeValueChange: types.func,
|
|
21484
|
-
className:
|
|
21732
|
+
className: VueTypes.string.def(''),
|
|
21485
21733
|
componentId: types.stringRequired,
|
|
21486
21734
|
customQuery: types.func,
|
|
21487
21735
|
dataField: types.stringRequired,
|
|
@@ -21531,13 +21779,14 @@
|
|
|
21531
21779
|
},
|
|
21532
21780
|
beforeMount: function beforeMount() {
|
|
21533
21781
|
this.updateQueryHandlerOptions(this.$props);
|
|
21782
|
+
var value = this.selectedValue || this.$props.value || this.$props.defaultValue;
|
|
21783
|
+
this.setValue(value, !this.selectedValue);
|
|
21784
|
+
},
|
|
21785
|
+
mounted: function mounted() {
|
|
21786
|
+
var currentValue = Object.keys(this.$data.currentValue);
|
|
21534
21787
|
|
|
21535
|
-
if (this.
|
|
21536
|
-
this
|
|
21537
|
-
} else if (this.$props.value) {
|
|
21538
|
-
this.setValue(this.$props.value, true);
|
|
21539
|
-
} else if (this.$props.defaultValue) {
|
|
21540
|
-
this.setValue(this.$props.defaultValue, true);
|
|
21788
|
+
if (this.$props.value !== undefined && !isEqual$6(this.$props.value, currentValue)) {
|
|
21789
|
+
this.$emit('change', currentValue);
|
|
21541
21790
|
}
|
|
21542
21791
|
},
|
|
21543
21792
|
watch: {
|
|
@@ -21582,7 +21831,11 @@
|
|
|
21582
21831
|
}
|
|
21583
21832
|
|
|
21584
21833
|
if (!isEqual$6(selectedValue, newVal)) {
|
|
21585
|
-
this.
|
|
21834
|
+
if (this.value === undefined) {
|
|
21835
|
+
this.setValue(newVal, true);
|
|
21836
|
+
} else {
|
|
21837
|
+
this.$emit('change', newVal);
|
|
21838
|
+
}
|
|
21586
21839
|
}
|
|
21587
21840
|
},
|
|
21588
21841
|
defaultQuery: function defaultQuery(newVal, oldVal) {
|
|
@@ -21628,7 +21881,7 @@
|
|
|
21628
21881
|
var filteredItemsToRender = itemsToRender.filter(function (item) {
|
|
21629
21882
|
if (String(item.key).length) {
|
|
21630
21883
|
if (_this2.$props.showSearch && _this2.$data.searchTerm) {
|
|
21631
|
-
return String(item.key).toLowerCase().includes(_this2.$data.searchTerm.toLowerCase());
|
|
21884
|
+
return suggestions_1(String(item.key)).toLowerCase().includes(suggestions_1(_this2.$data.searchTerm).toLowerCase());
|
|
21632
21885
|
}
|
|
21633
21886
|
|
|
21634
21887
|
return true;
|
|
@@ -21796,7 +22049,7 @@
|
|
|
21796
22049
|
updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
|
|
21797
22050
|
}
|
|
21798
22051
|
|
|
21799
|
-
this.setQueryOptions(this.internalComponent, defaultQueryOptions);
|
|
22052
|
+
this.setQueryOptions(this.internalComponent, defaultQueryOptions, false);
|
|
21800
22053
|
this.updateQuery({
|
|
21801
22054
|
componentId: this.internalComponent,
|
|
21802
22055
|
query: query,
|
|
@@ -21817,7 +22070,7 @@
|
|
|
21817
22070
|
updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
21818
22071
|
}
|
|
21819
22072
|
|
|
21820
|
-
this.setQueryOptions(props.componentId, customQueryOptions);
|
|
22073
|
+
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
21821
22074
|
this.updateQuery({
|
|
21822
22075
|
componentId: props.componentId,
|
|
21823
22076
|
query: query,
|
|
@@ -21881,7 +22134,7 @@
|
|
|
21881
22134
|
if (value === undefined) {
|
|
21882
22135
|
this.setValue(currentValue);
|
|
21883
22136
|
} else {
|
|
21884
|
-
var values = parseValueArray(value, currentValue);
|
|
22137
|
+
var values = parseValueArray(value || [], currentValue);
|
|
21885
22138
|
this.$emit('change', values);
|
|
21886
22139
|
}
|
|
21887
22140
|
},
|
|
@@ -22102,7 +22355,9 @@
|
|
|
22102
22355
|
single: VueTypes.bool,
|
|
22103
22356
|
small: VueTypes.bool.def(false),
|
|
22104
22357
|
themePreset: types.themePreset,
|
|
22105
|
-
showSearch: VueTypes.bool
|
|
22358
|
+
showSearch: VueTypes.bool,
|
|
22359
|
+
showClear: VueTypes.bool,
|
|
22360
|
+
searchPlaceholder: VueTypes.string.def('Type here to search...')
|
|
22106
22361
|
},
|
|
22107
22362
|
render: function render() {
|
|
22108
22363
|
var _this = this;
|
|
@@ -22130,7 +22385,7 @@
|
|
|
22130
22385
|
var filteredItemsToRender = itemsToRender.filter(function (item) {
|
|
22131
22386
|
if (String(item[labelField]).length) {
|
|
22132
22387
|
if (_this.$props.showSearch && _this.$data.searchTerm) {
|
|
22133
|
-
return String(item[labelField]).toLowerCase().includes(_this.$data.searchTerm.toLowerCase());
|
|
22388
|
+
return suggestions_1(String(item[labelField])).toLowerCase().includes(suggestions_1(_this.$data.searchTerm.toLowerCase()));
|
|
22134
22389
|
}
|
|
22135
22390
|
|
|
22136
22391
|
return true;
|
|
@@ -22151,7 +22406,8 @@
|
|
|
22151
22406
|
isOpen = _ref.isOpen,
|
|
22152
22407
|
highlightedIndex = _ref.highlightedIndex,
|
|
22153
22408
|
getButtonProps = _ref.getButtonProps,
|
|
22154
|
-
getItemEvents = _ref.getItemEvents
|
|
22409
|
+
getItemEvents = _ref.getItemEvents,
|
|
22410
|
+
getInputEvents = _ref.getInputEvents;
|
|
22155
22411
|
return h("div", {
|
|
22156
22412
|
"class": suggestionsContainer
|
|
22157
22413
|
}, [h(Select, {
|
|
@@ -22176,25 +22432,16 @@
|
|
|
22176
22432
|
getItemEvents: getItemEvents
|
|
22177
22433
|
}) : isOpen && itemsToRender.length ? h("ul", {
|
|
22178
22434
|
"class": suggestions$1(themePreset, _this.theme) + " " + (_this.$props.small ? 'small' : '') + " " + getClassName$6(_this.$props.innerClass, 'list')
|
|
22179
|
-
}, [_this.$props.showSearch ?
|
|
22180
|
-
|
|
22181
|
-
|
|
22182
|
-
|
|
22183
|
-
|
|
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
|
|
22435
|
+
}, [_this.$props.showSearch ? _this.renderSearchbox({
|
|
22436
|
+
on: {
|
|
22437
|
+
input: getInputEvents({
|
|
22438
|
+
onInput: _this.handleInputChange
|
|
22439
|
+
}).input
|
|
22194
22440
|
}
|
|
22195
22441
|
}) : null, !hasCustomRenderer && filteredItemsToRender.length === 0 ? _this.renderNoResult() : filteredItemsToRender.map(function (item, index) {
|
|
22196
22442
|
var selected = _this.$props.multi // MultiDropdownList
|
|
22197
|
-
&& (selectedItem && !!selectedItem[item[keyField]]
|
|
22443
|
+
&& (selectedItem && !!selectedItem[item[keyField]] // MultiDropdownRange
|
|
22444
|
+
|| Array.isArray(selectedItem) && selectedItem.find(function (value) {
|
|
22198
22445
|
return value[labelField] === item[labelField];
|
|
22199
22446
|
}));
|
|
22200
22447
|
if (!_this.$props.multi) selected = item.key === selectedItem;
|
|
@@ -22244,6 +22491,7 @@
|
|
|
22244
22491
|
|
|
22245
22492
|
if (!this.$props.multi) {
|
|
22246
22493
|
this.isOpen = false;
|
|
22494
|
+
this.searchTerm = '';
|
|
22247
22495
|
}
|
|
22248
22496
|
},
|
|
22249
22497
|
handleStateChange: function handleStateChange(_ref2) {
|
|
@@ -22267,6 +22515,9 @@
|
|
|
22267
22515
|
var value = e.target.value;
|
|
22268
22516
|
this.searchTerm = value;
|
|
22269
22517
|
},
|
|
22518
|
+
clearSearchTerm: function clearSearchTerm() {
|
|
22519
|
+
this.searchTerm = '';
|
|
22520
|
+
},
|
|
22270
22521
|
renderToString: function renderToString(value) {
|
|
22271
22522
|
var _this2 = this;
|
|
22272
22523
|
|
|
@@ -22307,6 +22558,48 @@
|
|
|
22307
22558
|
return h("p", {
|
|
22308
22559
|
"class": getClassName$6(this.$props.innerClass, 'noResults') || null
|
|
22309
22560
|
}, [isFunction$1(renderNoResults) ? renderNoResults() : renderNoResults]);
|
|
22561
|
+
},
|
|
22562
|
+
renderSearchbox: function renderSearchbox(eventObject) {
|
|
22563
|
+
var h = this.$createElement;
|
|
22564
|
+
var _this$$props2 = this.$props,
|
|
22565
|
+
componentId = _this$$props2.componentId,
|
|
22566
|
+
searchPlaceholder = _this$$props2.searchPlaceholder,
|
|
22567
|
+
showClear = _this$$props2.showClear,
|
|
22568
|
+
themePreset = _this$$props2.themePreset,
|
|
22569
|
+
innerClass = _this$$props2.innerClass;
|
|
22570
|
+
var InputComponent = h(Input, helper$1([{
|
|
22571
|
+
"attrs": {
|
|
22572
|
+
"id": componentId + "-input",
|
|
22573
|
+
"showIcon": false,
|
|
22574
|
+
"showClear": showClear,
|
|
22575
|
+
"placeholder": searchPlaceholder,
|
|
22576
|
+
"value": this.$data.searchTerm,
|
|
22577
|
+
"themePreset": themePreset
|
|
22578
|
+
},
|
|
22579
|
+
"style": {
|
|
22580
|
+
border: 0,
|
|
22581
|
+
borderBottom: '1px solid #ddd'
|
|
22582
|
+
},
|
|
22583
|
+
"class": getClassName$6(innerClass, 'input')
|
|
22584
|
+
}, eventObject]));
|
|
22585
|
+
|
|
22586
|
+
if (showClear) {
|
|
22587
|
+
return h(InputWrapper, [InputComponent, this.searchTerm && h(IconGroup, {
|
|
22588
|
+
"attrs": {
|
|
22589
|
+
"groupPosition": "right",
|
|
22590
|
+
"positionType": "absolute"
|
|
22591
|
+
}
|
|
22592
|
+
}, [h(IconWrapper, {
|
|
22593
|
+
"on": {
|
|
22594
|
+
"click": this.clearSearchTerm
|
|
22595
|
+
},
|
|
22596
|
+
"attrs": {
|
|
22597
|
+
"isClearIcon": true
|
|
22598
|
+
}
|
|
22599
|
+
}, [h(CancelSvg)])])]);
|
|
22600
|
+
}
|
|
22601
|
+
|
|
22602
|
+
return InputComponent;
|
|
22310
22603
|
}
|
|
22311
22604
|
}
|
|
22312
22605
|
};
|
|
@@ -22365,10 +22658,12 @@
|
|
|
22365
22658
|
showMissing: VueTypes.bool.def(false),
|
|
22366
22659
|
missingLabel: VueTypes.string.def('N/A'),
|
|
22367
22660
|
showSearch: VueTypes.bool.def(false),
|
|
22661
|
+
showClear: VueTypes.bool.def(false),
|
|
22368
22662
|
showLoadMore: VueTypes.bool.def(false),
|
|
22369
22663
|
loadMoreLabel: VueTypes.oneOfType([VueTypes.string, VueTypes.any]).def('Load More'),
|
|
22370
22664
|
nestedField: types.string,
|
|
22371
|
-
index: VueTypes.string
|
|
22665
|
+
index: VueTypes.string,
|
|
22666
|
+
searchPlaceholder: VueTypes.string.def('Type here to search...')
|
|
22372
22667
|
},
|
|
22373
22668
|
created: function created() {
|
|
22374
22669
|
if (!this.enableAppbase && this.$props.index) {
|
|
@@ -22482,7 +22777,9 @@
|
|
|
22482
22777
|
if (!this.hasCustomRenderer && this.$data.modifiedOptions.length === 0 && !this.isLoading) {
|
|
22483
22778
|
if (renderNoResults && isFunction$1(renderNoResults)) {
|
|
22484
22779
|
return h("div", [renderNoResults()]);
|
|
22485
|
-
}
|
|
22780
|
+
}
|
|
22781
|
+
|
|
22782
|
+
if (renderNoResults && !isFunction$1(renderNoResults)) {
|
|
22486
22783
|
return renderNoResults;
|
|
22487
22784
|
}
|
|
22488
22785
|
|
|
@@ -22520,6 +22817,8 @@
|
|
|
22520
22817
|
"renderNoResults": this.$scopedSlots.renderNoResults || this.$props.renderNoResults,
|
|
22521
22818
|
"themePreset": this.themePreset,
|
|
22522
22819
|
"showSearch": this.$props.showSearch,
|
|
22820
|
+
"showClear": this.$props.showClear,
|
|
22821
|
+
"searchPlaceholder": this.$props.searchPlaceholder,
|
|
22523
22822
|
"transformData": this.$props.transformData,
|
|
22524
22823
|
"footer": showLoadMore && !isLastBucket && h("div", {
|
|
22525
22824
|
"attrs": {
|
|
@@ -22579,7 +22878,7 @@
|
|
|
22579
22878
|
updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
|
|
22580
22879
|
}
|
|
22581
22880
|
|
|
22582
|
-
this.setQueryOptions(this.internalComponent, defaultQueryOptions);
|
|
22881
|
+
this.setQueryOptions(this.internalComponent, defaultQueryOptions, false);
|
|
22583
22882
|
this.updateQuery({
|
|
22584
22883
|
componentId: this.internalComponent,
|
|
22585
22884
|
query: query,
|
|
@@ -22600,7 +22899,7 @@
|
|
|
22600
22899
|
updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
22601
22900
|
}
|
|
22602
22901
|
|
|
22603
|
-
this.setQueryOptions(props.componentId, customQueryOptions);
|
|
22902
|
+
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
22604
22903
|
this.updateQuery({
|
|
22605
22904
|
componentId: props.componentId,
|
|
22606
22905
|
query: query,
|
|
@@ -22812,10 +23111,12 @@
|
|
|
22812
23111
|
showMissing: VueTypes.bool.def(false),
|
|
22813
23112
|
missingLabel: VueTypes.string.def('N/A'),
|
|
22814
23113
|
showSearch: VueTypes.bool.def(false),
|
|
23114
|
+
showClear: VueTypes.bool.def(false),
|
|
22815
23115
|
showLoadMore: VueTypes.bool.def(false),
|
|
22816
23116
|
loadMoreLabel: VueTypes.oneOfType([VueTypes.string, VueTypes.any]).def('Load More'),
|
|
22817
23117
|
nestedField: types.string,
|
|
22818
|
-
index: VueTypes.string
|
|
23118
|
+
index: VueTypes.string,
|
|
23119
|
+
searchPlaceholder: VueTypes.string.def('Type here to search...')
|
|
22819
23120
|
},
|
|
22820
23121
|
created: function created() {
|
|
22821
23122
|
if (!this.enableAppbase && this.$props.index) {
|
|
@@ -22943,7 +23244,9 @@
|
|
|
22943
23244
|
if (!this.hasCustomRenderer && this.$data.modifiedOptions.length === 0 && !this.isLoading) {
|
|
22944
23245
|
if (renderNoResults && isFunction$1(renderNoResults)) {
|
|
22945
23246
|
return h("div", [renderNoResults()]);
|
|
22946
|
-
}
|
|
23247
|
+
}
|
|
23248
|
+
|
|
23249
|
+
if (renderNoResults && !isFunction$1(renderNoResults)) {
|
|
22947
23250
|
return renderNoResults;
|
|
22948
23251
|
}
|
|
22949
23252
|
|
|
@@ -22982,6 +23285,8 @@
|
|
|
22982
23285
|
"renderItem": renderItemCalc,
|
|
22983
23286
|
"renderNoResults": this.$scopedSlots.renderNoResults || this.$props.renderNoResults,
|
|
22984
23287
|
"showSearch": this.$props.showSearch,
|
|
23288
|
+
"showClear": this.$props.showClear,
|
|
23289
|
+
"searchPlaceholder": this.$props.searchPlaceholder,
|
|
22985
23290
|
"transformData": this.$props.transformData,
|
|
22986
23291
|
"footer": showLoadMore && !isLastBucket && h("div", {
|
|
22987
23292
|
"attrs": {
|
|
@@ -23073,7 +23378,7 @@
|
|
|
23073
23378
|
}
|
|
23074
23379
|
|
|
23075
23380
|
var performUpdate = function performUpdate() {
|
|
23076
|
-
_this3.currentValue = currentValue;
|
|
23381
|
+
_this3.currentValue = _extends({}, currentValue);
|
|
23077
23382
|
|
|
23078
23383
|
_this3.updateQueryHandler(finalValues, props);
|
|
23079
23384
|
|
|
@@ -23100,7 +23405,7 @@
|
|
|
23100
23405
|
updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
|
|
23101
23406
|
}
|
|
23102
23407
|
|
|
23103
|
-
this.setQueryOptions(this.internalComponent, defaultQueryOptions);
|
|
23408
|
+
this.setQueryOptions(this.internalComponent, defaultQueryOptions, false);
|
|
23104
23409
|
this.updateQuery({
|
|
23105
23410
|
componentId: this.internalComponent,
|
|
23106
23411
|
query: query,
|
|
@@ -23121,7 +23426,7 @@
|
|
|
23121
23426
|
updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
23122
23427
|
}
|
|
23123
23428
|
|
|
23124
|
-
this.setQueryOptions(props.componentId, customQueryOptions);
|
|
23429
|
+
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
23125
23430
|
this.updateQuery({
|
|
23126
23431
|
componentId: props.componentId,
|
|
23127
23432
|
query: query,
|
|
@@ -23328,7 +23633,7 @@
|
|
|
23328
23633
|
componentId: types.stringRequired,
|
|
23329
23634
|
data: types.data,
|
|
23330
23635
|
dataField: types.stringRequired,
|
|
23331
|
-
defaultValue: types.
|
|
23636
|
+
defaultValue: types.any,
|
|
23332
23637
|
value: types.stringOrArray,
|
|
23333
23638
|
filterLabel: types.string,
|
|
23334
23639
|
nestedField: types.string,
|
|
@@ -23486,7 +23791,7 @@
|
|
|
23486
23791
|
var _ref = customQuery(value, props) || {};
|
|
23487
23792
|
|
|
23488
23793
|
query = _ref.query;
|
|
23489
|
-
this.setQueryOptions(props.componentId, getOptionsFromQuery$6(customQuery(value, props)));
|
|
23794
|
+
this.setQueryOptions(props.componentId, getOptionsFromQuery$6(customQuery(value, props)), false);
|
|
23490
23795
|
updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
23491
23796
|
}
|
|
23492
23797
|
|
|
@@ -24015,7 +24320,8 @@
|
|
|
24015
24320
|
innerClass: types.style,
|
|
24016
24321
|
showClearAll: VueTypes.bool.def(true),
|
|
24017
24322
|
title: types.title,
|
|
24018
|
-
resetToDefault: VueTypes.bool.def(false)
|
|
24323
|
+
resetToDefault: VueTypes.bool.def(false),
|
|
24324
|
+
resetToValues: VueTypes.object
|
|
24019
24325
|
},
|
|
24020
24326
|
inject: {
|
|
24021
24327
|
theme: {
|
|
@@ -24068,15 +24374,16 @@
|
|
|
24068
24374
|
this.$emit('clear', component, value);
|
|
24069
24375
|
},
|
|
24070
24376
|
clearValues: function clearValues() {
|
|
24071
|
-
var resetToDefault = this.resetToDefault
|
|
24377
|
+
var resetToDefault = this.resetToDefault,
|
|
24378
|
+
resetToValues = this.resetToValues;
|
|
24072
24379
|
|
|
24073
24380
|
if (resetToDefault) {
|
|
24074
24381
|
this.resetValuesToDefault();
|
|
24075
24382
|
} else {
|
|
24076
|
-
this.clearValuesAction();
|
|
24383
|
+
this.clearValuesAction(resetToValues);
|
|
24077
24384
|
}
|
|
24078
24385
|
|
|
24079
|
-
this.$emit('clear',
|
|
24386
|
+
this.$emit('clear', resetToValues);
|
|
24080
24387
|
},
|
|
24081
24388
|
renderValue: function renderValue(value, isArray) {
|
|
24082
24389
|
var _this2 = this;
|
|
@@ -24311,7 +24618,7 @@
|
|
|
24311
24618
|
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
24312
24619
|
}
|
|
24313
24620
|
|
|
24314
|
-
this.setQueryOptions(props.componentId, customQueryOptions);
|
|
24621
|
+
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
24315
24622
|
this.updateQuery({
|
|
24316
24623
|
componentId: props.componentId,
|
|
24317
24624
|
query: query,
|
|
@@ -24520,7 +24827,7 @@
|
|
|
24520
24827
|
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
24521
24828
|
}
|
|
24522
24829
|
|
|
24523
|
-
this.setQueryOptions(props.componentId, customQueryOptions);
|
|
24830
|
+
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
24524
24831
|
this.updateQuery({
|
|
24525
24832
|
componentId: props.componentId,
|
|
24526
24833
|
query: query,
|
|
@@ -24963,14 +25270,14 @@
|
|
|
24963
25270
|
var vueNoSsr_common = index$2;
|
|
24964
25271
|
|
|
24965
25272
|
var _templateObject$m;
|
|
24966
|
-
var Slider = index$1('div')(_templateObject$m || (_templateObject$m = _taggedTemplateLiteralLoose(["\n\tmargin-top: 30px;\n\tpadding: 10px;\n\n\t/* component style */\n\t.vue-slider-disabled {\n\t\topacity: 0.5;\n\t\tcursor: not-allowed;\n\t}\n\n\t/* rail style */\n\t.vue-slider-rail {\n\t\tbackground-color: #ccc;\n\t\tborder-radius: 15px;\n\t\theight: 4px;\n\t}\n\n\t/* process style */\n\t.vue-slider-process {\n\t\tbackground-color: #0b6aff;\n\t\tborder-radius: 15px;\n\t}\n\n\t/* mark style */\n\t.vue-slider-mark {\n\t\tz-index: 4;\n\t}\n\n\t.vue-slider-mark:first-child .vue-slider-mark-step,\n\t.vue-slider-mark:last-child .vue-slider-mark-step {\n\t\tdisplay: none;\n\t}\n\n\t.vue-slider-mark-step {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tborder-radius: 50%;\n\t\tbackground-color: rgba(0, 0, 0, 0.16);\n\t}\n\n\t.vue-slider-mark-label {\n\t\tfont-size: 14px;\n\t\twhite-space: nowrap;\n\t}\n\n\t/* dot style */\n\t.vue-slider-dot{\n\t\tz-index: 2;\n\t}\n\n\t.vue-slider-dot-handle {\n\t\tcursor: pointer;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tborder-radius: 50%;\n\t\tbackground-color: #fff;\n\t\tbox-sizing: border-box;\n\t\tborder: 1px solid #9a9a9a;\n\t\tz-index: 2;\n\t}\n\n\t.vue-slider-dot-handle-disabled {\n\t\tcursor: not-allowed;\n\t\tbackground-color: #ccc;\n\t}\n\n\t.vue-slider-dot-tooltip-inner {\n\t\tfont-size: 14px;\n\t\twhite-space: nowrap;\n\t\tpadding: 2px 5px;\n\t\tmin-width: 20px;\n\t\ttext-align: center;\n\t\tcolor: #fff;\n\t\tborder-radius: 5px;\n\t\tborder
|
|
25273
|
+
var Slider = index$1('div')(_templateObject$m || (_templateObject$m = _taggedTemplateLiteralLoose(["\n\tmargin-top: 30px;\n\tpadding: 10px;\n\n\t/* component style */\n\t.vue-slider-disabled {\n\t\topacity: 0.5;\n\t\tcursor: not-allowed;\n\t}\n\n\t/* rail style */\n\t.vue-slider-rail {\n\t\tbackground-color: #ccc;\n\t\tborder-radius: 15px;\n\t\theight: 4px;\n\t}\n\n\t/* process style */\n\t.vue-slider-process {\n\t\tbackground-color: #0b6aff;\n\t\tborder-radius: 15px;\n\t}\n\n\t/* mark style */\n\t.vue-slider-mark {\n\t\tz-index: 4;\n\t}\n\n\t.vue-slider-mark:first-child .vue-slider-mark-step,\n\t.vue-slider-mark:last-child .vue-slider-mark-step {\n\t\tdisplay: none;\n\t}\n\n\t.vue-slider-mark-step {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tborder-radius: 50%;\n\t\tbackground-color: rgba(0, 0, 0, 0.16);\n\t}\n\n\t.vue-slider-mark-label {\n\t\tfont-size: 14px;\n\t\twhite-space: nowrap;\n\t}\n\n\t/* dot style */\n\t.vue-slider-dot {\n\t\tz-index: 2;\n\t}\n\n\t.vue-slider-dot-handle {\n\t\tcursor: pointer;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tborder-radius: 50%;\n\t\tbackground-color: #fff;\n\t\tbox-sizing: border-box;\n\t\tborder: 1px solid #9a9a9a;\n\t\tz-index: 2;\n\t\tbox-shadow: 0.5px 0.5px 2px 1px rgb(0 0 0 / 32%);\n\t}\n\n\t.vue-slider-dot-handle-disabled {\n\t\tcursor: not-allowed;\n\t\tbackground-color: #ccc;\n\t}\n\n\t.vue-slider-dot-tooltip-inner {\n\t\tfont-size: 14px;\n\t\twhite-space: nowrap;\n\t\tpadding: 2px 5px;\n\t\tmin-width: 20px;\n\t\ttext-align: center;\n\t\tcolor: #fff;\n\t\tborder-radius: 5px;\n\t\tborder: 1px solid #3498db;\n\t\tbackground-color: #3498db;\n\t\tbox-sizing: content-box;\n\t}\n\n\t.vue-slider-dot-tooltip-inner::after {\n\t\tcontent: '';\n\t\tposition: absolute;\n\t}\n\n\t.vue-slider-dot-tooltip-inner-top::after {\n\t\ttop: 100%;\n\t\tleft: 50%;\n\t\ttransform: translate(-50%, 0);\n\t\theight: 0;\n\t\twidth: 0;\n\t\tborder-color: transparent;\n\t\tborder-style: solid;\n\t\tborder-width: 5px;\n\t\tborder-top-color: inherit;\n\t}\n\n\t.vue-slider-dot-tooltip-inner-bottom::after {\n\t\tbottom: 100%;\n\t\tleft: 50%;\n\t\ttransform: translate(-50%, 0);\n\t\theight: 0;\n\t\twidth: 0;\n\t\tborder-color: transparent;\n\t\tborder-style: solid;\n\t\tborder-width: 5px;\n\t\tborder-bottom-color: inherit;\n\t}\n\n\t.vue-slider-dot-tooltip-inner-left::after {\n\t\tleft: 100%;\n\t\ttop: 50%;\n\t\ttransform: translate(0, -50%);\n\t\theight: 0;\n\t\twidth: 0;\n\t\tborder-color: transparent;\n\t\tborder-style: solid;\n\t\tborder-width: 5px;\n\t\tborder-left-color: inherit;\n\t}\n\n\t.vue-slider-dot-tooltip-inner-right::after {\n\t\tright: 100%;\n\t\ttop: 50%;\n\t\ttransform: translate(0, -50%);\n\t\theight: 0;\n\t\twidth: 0;\n\t\tborder-color: transparent;\n\t\tborder-style: solid;\n\t\tborder-width: 5px;\n\t\tborder-right-color: inherit;\n\t}\n\n\t.vue-slider-dot-tooltip-wrapper {\n\t\topacity: 0;\n\t\ttransition: all 0.3s;\n\t}\n\t.vue-slider-dot-tooltip-wrapper-show {\n\t\topacity: 1;\n\t}\n\n\t.label-container {\n\t\tmargin: 10px 0;\n\t\twidth: 100%;\n\t}\n\n\t.range-label-right {\n\t\tfloat: right;\n\t}\n"])));
|
|
24967
25274
|
|
|
24968
25275
|
/**
|
|
24969
25276
|
* Caution: Please do not change this file without having a discussion with the Team.
|
|
24970
25277
|
* Any change may break the umd build, we're directly replacing the line no: 14
|
|
24971
25278
|
* `
|
|
24972
25279
|
var s = document.createElement("script");
|
|
24973
|
-
s.setAttribute("src","https://cdn.jsdelivr.net/npm/vue-slider-component@2.
|
|
25280
|
+
s.setAttribute("src","https://cdn.jsdelivr.net/npm/vue-slider-component@3.2.15/dist/vue-slider-component.umd.min.js");
|
|
24974
25281
|
s.onload = function(){
|
|
24975
25282
|
var VueSlider = global['vue-slider-component'];
|
|
24976
25283
|
components['vue-slider-component'] = VueSlider;
|
|
@@ -24991,7 +25298,7 @@
|
|
|
24991
25298
|
// eslint-disable-next-line
|
|
24992
25299
|
|
|
24993
25300
|
var s = document.createElement("script");
|
|
24994
|
-
s.setAttribute("src","https://cdn.jsdelivr.net/npm/vue-slider-component@2.
|
|
25301
|
+
s.setAttribute("src","https://cdn.jsdelivr.net/npm/vue-slider-component@3.2.15/dist/vue-slider-component.umd.min.js");
|
|
24995
25302
|
s.onload = function(){
|
|
24996
25303
|
var VueSlider = global$1['vue-slider-component'];
|
|
24997
25304
|
components['vue-slider-component'] = VueSlider;
|
|
@@ -25066,32 +25373,28 @@
|
|
|
25066
25373
|
});
|
|
25067
25374
|
}
|
|
25068
25375
|
},
|
|
25069
|
-
handleSlider: function handleSlider(
|
|
25070
|
-
var
|
|
25071
|
-
|
|
25072
|
-
clearTimeout(this.handleSliderChange._tId);
|
|
25073
|
-
this.handleSliderChange._tId = setTimeout(function () {
|
|
25074
|
-
_this.handleSliderChange(values);
|
|
25075
|
-
}, 100);
|
|
25376
|
+
handleSlider: function handleSlider() {
|
|
25377
|
+
var sliderValues = this.$refs.slider.getValue();
|
|
25378
|
+
this.handleSliderChange(sliderValues);
|
|
25076
25379
|
},
|
|
25077
25380
|
handleChange: function handleChange(currentValue, props) {
|
|
25078
|
-
var
|
|
25381
|
+
var _this = this;
|
|
25079
25382
|
|
|
25080
25383
|
if (props === void 0) {
|
|
25081
25384
|
props = this.$props;
|
|
25082
25385
|
}
|
|
25083
25386
|
|
|
25084
25387
|
var performUpdate = function performUpdate() {
|
|
25085
|
-
|
|
25388
|
+
_this.currentValue = currentValue;
|
|
25086
25389
|
|
|
25087
|
-
|
|
25390
|
+
_this.updateQueryHandler([currentValue[0], currentValue[1]], props);
|
|
25088
25391
|
|
|
25089
|
-
|
|
25392
|
+
_this.$emit('valueChange', {
|
|
25090
25393
|
start: currentValue[0],
|
|
25091
25394
|
end: currentValue[1]
|
|
25092
25395
|
});
|
|
25093
25396
|
|
|
25094
|
-
|
|
25397
|
+
_this.$emit('value-change', {
|
|
25095
25398
|
start: currentValue[0],
|
|
25096
25399
|
end: currentValue[1]
|
|
25097
25400
|
});
|
|
@@ -25123,7 +25426,7 @@
|
|
|
25123
25426
|
currentEnd = value[1]; // check if the slider is at its initial position
|
|
25124
25427
|
|
|
25125
25428
|
var isInitialValue = currentStart === start && currentEnd === end;
|
|
25126
|
-
this.setQueryOptions(props.componentId, customQueryOptions);
|
|
25429
|
+
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
25127
25430
|
this.updateQuery({
|
|
25128
25431
|
componentId: props.componentId,
|
|
25129
25432
|
query: query,
|
|
@@ -25202,12 +25505,13 @@
|
|
|
25202
25505
|
"max": this.$props.range.end,
|
|
25203
25506
|
"dotSize": 20,
|
|
25204
25507
|
"height": 4,
|
|
25205
|
-
"enable-cross": false
|
|
25508
|
+
"enable-cross": false,
|
|
25509
|
+
"tooltip": "always"
|
|
25206
25510
|
},
|
|
25207
|
-
"
|
|
25208
|
-
|
|
25209
|
-
|
|
25210
|
-
})
|
|
25511
|
+
"on": {
|
|
25512
|
+
"drag-end": this.handleSlider
|
|
25513
|
+
},
|
|
25514
|
+
"props": _extends({}, this.$props.sliderOptions)
|
|
25211
25515
|
}), this.$props.rangeLabels && h("div", {
|
|
25212
25516
|
"class": "label-container"
|
|
25213
25517
|
}, [h("label", {
|
|
@@ -25321,7 +25625,8 @@
|
|
|
25321
25625
|
URLParams: VueTypes.bool.def(false),
|
|
25322
25626
|
sliderOptions: VueTypes.object.def({}),
|
|
25323
25627
|
nestedField: types.string,
|
|
25324
|
-
index: VueTypes.string
|
|
25628
|
+
index: VueTypes.string,
|
|
25629
|
+
value: types.range
|
|
25325
25630
|
},
|
|
25326
25631
|
data: function data() {
|
|
25327
25632
|
this.internalRangeComponent = this.$props.componentId + "__range__internal";
|
|
@@ -25367,6 +25672,8 @@
|
|
|
25367
25672
|
components = _this$$$store$getStat.components;
|
|
25368
25673
|
}
|
|
25369
25674
|
|
|
25675
|
+
var value = this.$props.value;
|
|
25676
|
+
|
|
25370
25677
|
if (this.destroyOnUnmount || components.indexOf(this.componentId) === -1) {
|
|
25371
25678
|
this.addComponent(this.componentId);
|
|
25372
25679
|
this.addComponent(this.internalRangeComponent);
|
|
@@ -25375,6 +25682,8 @@
|
|
|
25375
25682
|
this.handleChange(this.selectedValue);
|
|
25376
25683
|
} else if (this.selectedValue) {
|
|
25377
25684
|
this.handleChange(DynamicRangeSlider.parseValue(this.selectedValue, this.$props));
|
|
25685
|
+
} else if (value) {
|
|
25686
|
+
this.handleChange(DynamicRangeSlider.parseValue(value, this.$props));
|
|
25378
25687
|
} // get range before executing other queries
|
|
25379
25688
|
|
|
25380
25689
|
|
|
@@ -25393,6 +25702,13 @@
|
|
|
25393
25702
|
}
|
|
25394
25703
|
},
|
|
25395
25704
|
methods: {
|
|
25705
|
+
isControlled: function isControlled() {
|
|
25706
|
+
if (this.$props.value && this.$listeners) {
|
|
25707
|
+
return true;
|
|
25708
|
+
}
|
|
25709
|
+
|
|
25710
|
+
return false;
|
|
25711
|
+
},
|
|
25396
25712
|
setDefaultValue: function setDefaultValue(_ref) {
|
|
25397
25713
|
var start = _ref.start,
|
|
25398
25714
|
end = _ref.end;
|
|
@@ -25403,6 +25719,8 @@
|
|
|
25403
25719
|
defaultEnd = _this$$props$defaultV.end;
|
|
25404
25720
|
|
|
25405
25721
|
this.handleChange([defaultStart, defaultEnd]);
|
|
25722
|
+
} else if (this.isControlled()) {
|
|
25723
|
+
this.handleChange(DynamicRangeSlider.parseValue(this.$props.value), 'change');
|
|
25406
25724
|
} else {
|
|
25407
25725
|
this.currentValue = [start, end];
|
|
25408
25726
|
}
|
|
@@ -25450,8 +25768,18 @@
|
|
|
25450
25768
|
aggs: aggs
|
|
25451
25769
|
});
|
|
25452
25770
|
},
|
|
25453
|
-
handleSlider: function handleSlider(
|
|
25454
|
-
this.
|
|
25771
|
+
handleSlider: function handleSlider() {
|
|
25772
|
+
var sliderValues = this.$refs.slider.getValue();
|
|
25773
|
+
var value = this.$props.value;
|
|
25774
|
+
|
|
25775
|
+
if (value === undefined) {
|
|
25776
|
+
this.handleChange(sliderValues);
|
|
25777
|
+
} else {
|
|
25778
|
+
this.$emit('change', {
|
|
25779
|
+
start: sliderValues[0],
|
|
25780
|
+
end: sliderValues[1]
|
|
25781
|
+
});
|
|
25782
|
+
}
|
|
25455
25783
|
},
|
|
25456
25784
|
handleChange: function handleChange(currentValue) {
|
|
25457
25785
|
var _this2 = this;
|
|
@@ -25503,7 +25831,7 @@
|
|
|
25503
25831
|
currentEnd = value[1]; // check if the slider is at its initial position
|
|
25504
25832
|
|
|
25505
25833
|
var isInitialValue = currentStart === start && currentEnd === end;
|
|
25506
|
-
this.setQueryOptions(this.$props.componentId, customQueryOptions);
|
|
25834
|
+
this.setQueryOptions(this.$props.componentId, customQueryOptions, false);
|
|
25507
25835
|
this.updateQuery({
|
|
25508
25836
|
componentId: this.$props.componentId,
|
|
25509
25837
|
query: query,
|
|
@@ -25544,6 +25872,7 @@
|
|
|
25544
25872
|
start: this.range.start,
|
|
25545
25873
|
end: this.range.end
|
|
25546
25874
|
};
|
|
25875
|
+
this.$emit('change', value);
|
|
25547
25876
|
this.handleChange(DynamicRangeSlider.parseValue(value, this.$props));
|
|
25548
25877
|
},
|
|
25549
25878
|
range: function range(newValue, oldValue) {
|
|
@@ -25565,6 +25894,11 @@
|
|
|
25565
25894
|
if (!isQueryIdentical(newVal, oldVal, this.$data.currentValue, this.$props)) {
|
|
25566
25895
|
this.updateQueryHandler(this.$data.currentValue);
|
|
25567
25896
|
}
|
|
25897
|
+
},
|
|
25898
|
+
value: function value(newVal, oldVal) {
|
|
25899
|
+
if (!isEqual$e(newVal, oldVal)) {
|
|
25900
|
+
this.handleChange(DynamicRangeSlider.parseValue(newVal, this.$props));
|
|
25901
|
+
}
|
|
25568
25902
|
}
|
|
25569
25903
|
},
|
|
25570
25904
|
render: function render() {
|
|
@@ -25584,13 +25918,15 @@
|
|
|
25584
25918
|
}, [this.$props.title]), h(vueNoSsr_common, [h(Slider, {
|
|
25585
25919
|
"class": getClassName$e(this.$props.innerClass, 'slider')
|
|
25586
25920
|
}, [h("vue-slider-component", {
|
|
25921
|
+
"ref": "slider",
|
|
25587
25922
|
"attrs": {
|
|
25588
|
-
"value": [Math.max(start, this.currentValue[0]), Math.min(end, this.currentValue[1])],
|
|
25589
|
-
"min": Math.min(start, this.currentValue[0]),
|
|
25590
|
-
"max": Math.max(end, this.currentValue[1]),
|
|
25923
|
+
"value": [Math.floor(Math.max(start, this.currentValue[0])), Math.ceil(Math.min(end, this.currentValue[1]))],
|
|
25924
|
+
"min": Math.floor(Math.min(start, this.currentValue[0])),
|
|
25925
|
+
"max": Math.ceil(Math.max(end, this.currentValue[1])),
|
|
25591
25926
|
"dotSize": 20,
|
|
25592
25927
|
"height": 4,
|
|
25593
|
-
"enable-cross": false
|
|
25928
|
+
"enable-cross": false,
|
|
25929
|
+
"tooltip": "always"
|
|
25594
25930
|
},
|
|
25595
25931
|
"on": {
|
|
25596
25932
|
"drag-end": this.handleSlider
|
|
@@ -25636,7 +25972,11 @@
|
|
|
25636
25972
|
};
|
|
25637
25973
|
|
|
25638
25974
|
DynamicRangeSlider.parseValue = function (value) {
|
|
25639
|
-
|
|
25975
|
+
if (value) {
|
|
25976
|
+
return Array.isArray(value) ? value : [value.start, value.end];
|
|
25977
|
+
}
|
|
25978
|
+
|
|
25979
|
+
return [];
|
|
25640
25980
|
};
|
|
25641
25981
|
|
|
25642
25982
|
var mapStateToProps$e = function mapStateToProps(state, props) {
|
|
@@ -25692,6 +26032,10 @@
|
|
|
25692
26032
|
var defaultKeys = ['hits', 'value', 'aggregations', 'error'];
|
|
25693
26033
|
|
|
25694
26034
|
var filterProps = function filterProps(props) {
|
|
26035
|
+
if (props === void 0) {
|
|
26036
|
+
props = {};
|
|
26037
|
+
}
|
|
26038
|
+
|
|
25695
26039
|
return _extends({}, props, {
|
|
25696
26040
|
props: props.componentProps
|
|
25697
26041
|
});
|
|
@@ -25711,7 +26055,7 @@
|
|
|
25711
26055
|
return _ref = {}, _ref[componentIds] = state[componentIds], _ref;
|
|
25712
26056
|
}
|
|
25713
26057
|
|
|
25714
|
-
if (componentIds
|
|
26058
|
+
if (Array.isArray(componentIds)) {
|
|
25715
26059
|
var filteredState = {};
|
|
25716
26060
|
componentIds.forEach(function (componentId) {
|
|
25717
26061
|
filteredState[componentId] = state[componentId];
|
|
@@ -25750,7 +26094,7 @@
|
|
|
25750
26094
|
};
|
|
25751
26095
|
return this.__state;
|
|
25752
26096
|
},
|
|
25753
|
-
|
|
26097
|
+
created: function created() {
|
|
25754
26098
|
this.searchState = filterByKeys(getSearchState(filterProps(this.searchStateProps)), this.includeKeys);
|
|
25755
26099
|
},
|
|
25756
26100
|
computed: {
|
|
@@ -25952,6 +26296,7 @@
|
|
|
25952
26296
|
var orderOfQueries = [];
|
|
25953
26297
|
var hits = {};
|
|
25954
26298
|
var aggregations = {};
|
|
26299
|
+
var compositeAggregations = {};
|
|
25955
26300
|
var state = {};
|
|
25956
26301
|
var customQueries = {};
|
|
25957
26302
|
var defaultQueries = {};
|
|
@@ -26074,7 +26419,7 @@
|
|
|
26074
26419
|
var react = component.react;
|
|
26075
26420
|
|
|
26076
26421
|
if (isInternalComponentPresent || isResultComponent) {
|
|
26077
|
-
react =
|
|
26422
|
+
react = helper_24(react, internalComponent);
|
|
26078
26423
|
}
|
|
26079
26424
|
|
|
26080
26425
|
dependencyTree = dependencyTreeReducer(dependencyTree, {
|
|
@@ -26120,7 +26465,7 @@
|
|
|
26120
26465
|
|
|
26121
26466
|
componentCollection.forEach(function (component) {
|
|
26122
26467
|
// eslint-disable-next-line
|
|
26123
|
-
var _buildQuery =
|
|
26468
|
+
var _buildQuery = helper_23(component.componentId, dependencyTree, queryList, queryOptions),
|
|
26124
26469
|
queryObj = _buildQuery.queryObj,
|
|
26125
26470
|
options = _buildQuery.options;
|
|
26126
26471
|
|
|
@@ -26186,6 +26531,11 @@
|
|
|
26186
26531
|
var _extends4;
|
|
26187
26532
|
|
|
26188
26533
|
aggregations = _extends({}, aggregations, (_extends4 = {}, _extends4[component] = response.aggregations, _extends4));
|
|
26534
|
+
compositeAggregations = compositeAggsReducer(compositeAggregations, {
|
|
26535
|
+
type: constants_9,
|
|
26536
|
+
aggregations: response.aggregations,
|
|
26537
|
+
append: false
|
|
26538
|
+
});
|
|
26189
26539
|
}
|
|
26190
26540
|
|
|
26191
26541
|
hits = _extends({}, hits, (_extends5 = {}, _extends5[component] = {
|
|
@@ -26212,6 +26562,8 @@
|
|
|
26212
26562
|
var promotedResults = {};
|
|
26213
26563
|
var rawData = {};
|
|
26214
26564
|
var customData = {};
|
|
26565
|
+
var settingsResponse = {};
|
|
26566
|
+
var timestamp = {};
|
|
26215
26567
|
var allPromises = orderOfQueries.map(function (component) {
|
|
26216
26568
|
return new Promise(function (responseResolve, responseReject) {
|
|
26217
26569
|
handleTransformResponse(res[component], component).then(function (response) {
|
|
@@ -26230,6 +26582,11 @@
|
|
|
26230
26582
|
|
|
26231
26583
|
if (response.customData) {
|
|
26232
26584
|
customData[component] = response.customData;
|
|
26585
|
+
} // Update settings
|
|
26586
|
+
|
|
26587
|
+
|
|
26588
|
+
if (response.settings) {
|
|
26589
|
+
settingsResponse[component] = response.settings;
|
|
26233
26590
|
}
|
|
26234
26591
|
|
|
26235
26592
|
if (response.aggregations) {
|
|
@@ -26238,6 +26595,7 @@
|
|
|
26238
26595
|
aggregations = _extends({}, aggregations, (_extends6 = {}, _extends6[component] = response.aggregations, _extends6));
|
|
26239
26596
|
}
|
|
26240
26597
|
|
|
26598
|
+
timestamp[component] = res._timestamp;
|
|
26241
26599
|
hits = _extends({}, hits, (_extends7 = {}, _extends7[component] = {
|
|
26242
26600
|
hits: response.hits.hits,
|
|
26243
26601
|
total: typeof response.hits.total === 'object' ? response.hits.total.value : response.hits.total,
|
|
@@ -26253,8 +26611,11 @@
|
|
|
26253
26611
|
Promise.all(allPromises).then(function () {
|
|
26254
26612
|
state = _extends({}, state, {
|
|
26255
26613
|
hits: hits,
|
|
26614
|
+
timestamp: timestamp,
|
|
26256
26615
|
aggregations: aggregations,
|
|
26616
|
+
compositeAggregations: compositeAggregations,
|
|
26257
26617
|
promotedResults: promotedResults,
|
|
26618
|
+
settings: settingsResponse,
|
|
26258
26619
|
customData: customData,
|
|
26259
26620
|
rawData: rawData
|
|
26260
26621
|
});
|
|
@@ -26313,7 +26674,7 @@
|
|
|
26313
26674
|
});
|
|
26314
26675
|
}
|
|
26315
26676
|
|
|
26316
|
-
var version = "1.
|
|
26677
|
+
var version = "1.27.0";
|
|
26317
26678
|
|
|
26318
26679
|
var _templateObject$n, _templateObject2$a;
|
|
26319
26680
|
|
|
@@ -26435,7 +26796,7 @@
|
|
|
26435
26796
|
}
|
|
26436
26797
|
},
|
|
26437
26798
|
handleOnChange: function handleOnChange(value) {
|
|
26438
|
-
this.handleChange(value, 'change');
|
|
26799
|
+
this.handleChange(value || this.$props.range, 'change');
|
|
26439
26800
|
},
|
|
26440
26801
|
handleValueChange: function handleValueChange(value) {
|
|
26441
26802
|
this.handleChange(value, 'value-change');
|
|
@@ -26490,6 +26851,10 @@
|
|
|
26490
26851
|
if (this.$props.defaultValue && this.$props.defaultValue.start && this.$props.defaultValue.end) {
|
|
26491
26852
|
this.handleChange(this.$props.defaultValue);
|
|
26492
26853
|
}
|
|
26854
|
+
|
|
26855
|
+
if (this.isControlled()) {
|
|
26856
|
+
this.handleChange(this.$props.value, 'change');
|
|
26857
|
+
}
|
|
26493
26858
|
},
|
|
26494
26859
|
render: function render() {
|
|
26495
26860
|
var h = arguments[0];
|