@appbaseio/reactivesearch-vue 1.27.0 → 1.28.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 +564 -1038
- 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/DataSearch.js +13 -7
- package/dist/cjs/DynamicRangeSlider.js +24 -16
- package/dist/cjs/MultiDropdownList.js +33 -24
- package/dist/cjs/MultiList.js +33 -23
- package/dist/cjs/MultiRange.js +2 -3
- package/dist/cjs/RangeSlider.js +2 -3
- package/dist/cjs/ReactiveComponent.js +41 -72
- package/dist/cjs/ReactiveList.js +37 -47
- package/dist/cjs/SelectedFilters.js +5 -3
- package/dist/cjs/SingleDropdownList.js +20 -17
- package/dist/cjs/SingleList.js +19 -16
- package/dist/cjs/SingleRange.js +2 -3
- package/dist/cjs/initReactivesearch.js +109 -77
- package/dist/cjs/version.js +1 -1
- package/dist/es/DataSearch.js +13 -7
- package/dist/es/DynamicRangeSlider.js +24 -16
- package/dist/es/MultiDropdownList.js +33 -24
- package/dist/es/MultiList.js +33 -23
- package/dist/es/MultiRange.js +2 -3
- package/dist/es/RangeSlider.js +2 -3
- package/dist/es/ReactiveComponent.js +41 -72
- package/dist/es/ReactiveList.js +37 -47
- package/dist/es/SelectedFilters.js +5 -3
- package/dist/es/SingleDropdownList.js +20 -17
- package/dist/es/SingleList.js +19 -16
- package/dist/es/SingleRange.js +2 -3
- package/dist/es/initReactivesearch.js +111 -79
- package/dist/es/version.js +1 -1
- package/package.json +2 -2
|
@@ -1729,17 +1729,25 @@
|
|
|
1729
1729
|
|
|
1730
1730
|
case constants.CLEAR_VALUES:
|
|
1731
1731
|
{
|
|
1732
|
+
var nextState = {};
|
|
1733
|
+
|
|
1732
1734
|
if (action.resetValues) {
|
|
1733
|
-
var nextState = {};
|
|
1734
1735
|
Object.keys(action.resetValues).forEach(function (componentId) {
|
|
1735
1736
|
nextState[componentId] = _extends({}, state[componentId], {
|
|
1736
1737
|
value: action.resetValues[componentId]
|
|
1737
1738
|
});
|
|
1738
1739
|
});
|
|
1739
|
-
return nextState;
|
|
1740
1740
|
}
|
|
1741
1741
|
|
|
1742
|
-
|
|
1742
|
+
if (Array.isArray(action.clearAllBlacklistComponents)) {
|
|
1743
|
+
Object.keys(state).forEach(function (componentId) {
|
|
1744
|
+
if (action.clearAllBlacklistComponents.includes(componentId)) {
|
|
1745
|
+
nextState[componentId] = state[componentId];
|
|
1746
|
+
}
|
|
1747
|
+
});
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1750
|
+
return nextState;
|
|
1743
1751
|
}
|
|
1744
1752
|
|
|
1745
1753
|
case constants.REMOVE_COMPONENT:
|
|
@@ -1822,7 +1830,30 @@
|
|
|
1822
1830
|
}));
|
|
1823
1831
|
|
|
1824
1832
|
case constants.CLEAR_VALUES:
|
|
1825
|
-
|
|
1833
|
+
{
|
|
1834
|
+
var nextState = {};
|
|
1835
|
+
|
|
1836
|
+
if (action.resetValues) {
|
|
1837
|
+
Object.keys(action.resetValues).forEach(function (componentId) {
|
|
1838
|
+
nextState[componentId] = _extends({}, state[componentId], {
|
|
1839
|
+
value: action.resetValues[componentId]
|
|
1840
|
+
});
|
|
1841
|
+
});
|
|
1842
|
+
}
|
|
1843
|
+
|
|
1844
|
+
if (Array.isArray(action.clearAllBlacklistComponents)) {
|
|
1845
|
+
Object.keys(state).forEach(function (componentId) {
|
|
1846
|
+
if (action.clearAllBlacklistComponents.includes(componentId)) {
|
|
1847
|
+
nextState[componentId] = state[componentId];
|
|
1848
|
+
}
|
|
1849
|
+
});
|
|
1850
|
+
}
|
|
1851
|
+
|
|
1852
|
+
return nextState;
|
|
1853
|
+
}
|
|
1854
|
+
|
|
1855
|
+
case constants.RESET_TO_DEFAULT:
|
|
1856
|
+
return _extends({}, state, action.defaultValues);
|
|
1826
1857
|
|
|
1827
1858
|
case constants.REMOVE_COMPONENT:
|
|
1828
1859
|
{
|
|
@@ -4861,7 +4892,7 @@
|
|
|
4861
4892
|
Object.defineProperty(exports, "__esModule", {
|
|
4862
4893
|
value: true
|
|
4863
4894
|
});
|
|
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;
|
|
4895
|
+
exports.getCalendarIntervalErrorMessage = exports.queryFormatMillisecondsMap = exports.suggestionTypes = exports.getTopSuggestions = exports.withClickIds = exports.getCompositeAggsQuery = exports.getAggsQuery = exports.extractQueryFromDefaultQuery = exports.updateInternalQuery = exports.getSearchState = exports.extractQueryFromCustomQuery = exports.getOptionsForCustomQuery = exports.getOptionsFromQuery = exports.parseHits = exports.handleA11yAction = exports.getInnerKey = exports.getClassName = exports.checkSomePropChange = exports.checkPropChange = exports.updateDefaultQuery = exports.updateCustomQuery = undefined;
|
|
4865
4896
|
|
|
4866
4897
|
var _extends = Object.assign || function (target) {
|
|
4867
4898
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -4878,6 +4909,7 @@
|
|
|
4878
4909
|
};
|
|
4879
4910
|
|
|
4880
4911
|
exports.isEqual = isEqual;
|
|
4912
|
+
exports.compareQueries = compareQueries;
|
|
4881
4913
|
exports.debounce = debounce;
|
|
4882
4914
|
exports.getQueryOptions = getQueryOptions;
|
|
4883
4915
|
exports.buildQuery = buildQuery;
|
|
@@ -4972,6 +5004,14 @@
|
|
|
4972
5004
|
return true;
|
|
4973
5005
|
}
|
|
4974
5006
|
|
|
5007
|
+
function compareQueries(x, y) {
|
|
5008
|
+
try {
|
|
5009
|
+
return isEqual(JSON.parse(JSON.stringify(x)), JSON.parse(JSON.stringify(y)));
|
|
5010
|
+
} catch (e) {
|
|
5011
|
+
return false;
|
|
5012
|
+
}
|
|
5013
|
+
}
|
|
5014
|
+
|
|
4975
5015
|
function debounce(callback, wait) {
|
|
4976
5016
|
var context = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this;
|
|
4977
5017
|
var timeout = null;
|
|
@@ -5053,7 +5093,9 @@
|
|
|
5053
5093
|
if (typeof comp !== 'string') {
|
|
5054
5094
|
return getQuery(comp, queryList);
|
|
5055
5095
|
} else if (comp in queryList) {
|
|
5056
|
-
|
|
5096
|
+
if (queryList[comp] && Object.keys(queryList[comp]).length) {
|
|
5097
|
+
return queryList[comp];
|
|
5098
|
+
}
|
|
5057
5099
|
}
|
|
5058
5100
|
|
|
5059
5101
|
return null;
|
|
@@ -5062,7 +5104,7 @@
|
|
|
5062
5104
|
});
|
|
5063
5105
|
var boolQuery = createBoolQuery(operation, queryArr);
|
|
5064
5106
|
|
|
5065
|
-
if (boolQuery) {
|
|
5107
|
+
if (boolQuery && Object.keys(boolQuery).length) {
|
|
5066
5108
|
query = [].concat(_toConsumableArray(query), [boolQuery]);
|
|
5067
5109
|
}
|
|
5068
5110
|
} else if (typeof react[conjunction] === 'string') {
|
|
@@ -5070,13 +5112,13 @@
|
|
|
5070
5112
|
|
|
5071
5113
|
var _boolQuery = createBoolQuery(_operation, queryList[react[conjunction]]);
|
|
5072
5114
|
|
|
5073
|
-
if (_boolQuery) {
|
|
5115
|
+
if (_boolQuery && Object.keys(_boolQuery).length) {
|
|
5074
5116
|
query = [].concat(_toConsumableArray(query), [_boolQuery]);
|
|
5075
5117
|
}
|
|
5076
5118
|
} else if (typeof react[conjunction] === 'object' && react[conjunction] !== null) {
|
|
5077
5119
|
var _boolQuery2 = getQuery(react[conjunction], queryList);
|
|
5078
5120
|
|
|
5079
|
-
if (_boolQuery2) {
|
|
5121
|
+
if (_boolQuery2 && Object.keys(_boolQuery2).length) {
|
|
5080
5122
|
query = [].concat(_toConsumableArray(query), [_boolQuery2]);
|
|
5081
5123
|
}
|
|
5082
5124
|
}
|
|
@@ -5194,7 +5236,7 @@
|
|
|
5194
5236
|
}
|
|
5195
5237
|
|
|
5196
5238
|
return {
|
|
5197
|
-
|
|
5239
|
+
_key: sortBy
|
|
5198
5240
|
};
|
|
5199
5241
|
}
|
|
5200
5242
|
|
|
@@ -5307,6 +5349,38 @@
|
|
|
5307
5349
|
|
|
5308
5350
|
exports.getOptionsFromQuery = getOptionsFromQuery;
|
|
5309
5351
|
|
|
5352
|
+
var getOptionsForCustomQuery = function getOptionsForCustomQuery() {
|
|
5353
|
+
var customQuery = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
5354
|
+
|
|
5355
|
+
if (customQuery) {
|
|
5356
|
+
var query = customQuery.query,
|
|
5357
|
+
id = customQuery.id,
|
|
5358
|
+
params = customQuery.params,
|
|
5359
|
+
rest = _objectWithoutProperties(customQuery, ['query', 'id', 'params']);
|
|
5360
|
+
|
|
5361
|
+
return Object.keys(rest).length ? rest : null;
|
|
5362
|
+
}
|
|
5363
|
+
|
|
5364
|
+
return null;
|
|
5365
|
+
};
|
|
5366
|
+
|
|
5367
|
+
exports.getOptionsForCustomQuery = getOptionsForCustomQuery;
|
|
5368
|
+
|
|
5369
|
+
var extractQueryFromCustomQuery = exports.extractQueryFromCustomQuery = function extractQueryFromCustomQuery(customQuery) {
|
|
5370
|
+
if (customQuery) {
|
|
5371
|
+
if (customQuery.id) {
|
|
5372
|
+
return {
|
|
5373
|
+
id: customQuery.id,
|
|
5374
|
+
params: customQuery.params
|
|
5375
|
+
};
|
|
5376
|
+
}
|
|
5377
|
+
|
|
5378
|
+
return customQuery.query;
|
|
5379
|
+
}
|
|
5380
|
+
|
|
5381
|
+
return null;
|
|
5382
|
+
};
|
|
5383
|
+
|
|
5310
5384
|
function computeResultStats(hits, searchState, promotedResults) {
|
|
5311
5385
|
Object.keys(hits).forEach(function (componentId) {
|
|
5312
5386
|
var _ref = hits[componentId] || {},
|
|
@@ -5732,28 +5806,31 @@
|
|
|
5732
5806
|
var helper_8 = helper.extractQueryFromDefaultQuery;
|
|
5733
5807
|
var helper_9 = helper.updateInternalQuery;
|
|
5734
5808
|
var helper_10 = helper.getSearchState;
|
|
5735
|
-
var helper_11 = helper.
|
|
5736
|
-
var helper_12 = helper.
|
|
5737
|
-
var helper_13 = helper.
|
|
5738
|
-
var helper_14 = helper.
|
|
5739
|
-
var helper_15 = helper.
|
|
5740
|
-
var helper_16 = helper.
|
|
5741
|
-
var helper_17 = helper.
|
|
5742
|
-
var helper_18 = helper.
|
|
5743
|
-
var helper_19 = helper.
|
|
5744
|
-
var helper_20 = helper.
|
|
5745
|
-
var helper_21 = helper.
|
|
5746
|
-
var helper_22 = helper.
|
|
5747
|
-
var helper_23 = helper.
|
|
5748
|
-
var helper_24 = helper.
|
|
5749
|
-
var helper_25 = helper.
|
|
5750
|
-
var helper_26 = helper.
|
|
5751
|
-
var helper_27 = helper.
|
|
5752
|
-
var helper_28 = helper.
|
|
5753
|
-
var helper_29 = helper.
|
|
5754
|
-
var helper_30 = helper.
|
|
5755
|
-
var helper_31 = helper.
|
|
5756
|
-
var helper_32 = helper.
|
|
5809
|
+
var helper_11 = helper.extractQueryFromCustomQuery;
|
|
5810
|
+
var helper_12 = helper.getOptionsForCustomQuery;
|
|
5811
|
+
var helper_13 = helper.getOptionsFromQuery;
|
|
5812
|
+
var helper_14 = helper.parseHits;
|
|
5813
|
+
var helper_15 = helper.handleA11yAction;
|
|
5814
|
+
var helper_16 = helper.getInnerKey;
|
|
5815
|
+
var helper_17 = helper.getClassName;
|
|
5816
|
+
var helper_18 = helper.checkSomePropChange;
|
|
5817
|
+
var helper_19 = helper.checkPropChange;
|
|
5818
|
+
var helper_20 = helper.updateDefaultQuery;
|
|
5819
|
+
var helper_21 = helper.updateCustomQuery;
|
|
5820
|
+
var helper_22 = helper.isEqual;
|
|
5821
|
+
var helper_23 = helper.compareQueries;
|
|
5822
|
+
var helper_24 = helper.debounce;
|
|
5823
|
+
var helper_25 = helper.getQueryOptions;
|
|
5824
|
+
var helper_26 = helper.buildQuery;
|
|
5825
|
+
var helper_27 = helper.pushToAndClause;
|
|
5826
|
+
var helper_28 = helper.checkValueChange;
|
|
5827
|
+
var helper_29 = helper.getAggsOrder;
|
|
5828
|
+
var helper_30 = helper.formatDate;
|
|
5829
|
+
var helper_31 = helper.getResultStats;
|
|
5830
|
+
var helper_32 = helper.extractFieldsFromSource;
|
|
5831
|
+
var helper_33 = helper.normalizeDataField;
|
|
5832
|
+
var helper_34 = helper.handleOnSuggestions;
|
|
5833
|
+
var helper_35 = helper.isValidDateRangeQueryFormat;
|
|
5757
5834
|
|
|
5758
5835
|
var value = createCommonjsModule(function (module, exports) {
|
|
5759
5836
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5821,7 +5898,7 @@
|
|
|
5821
5898
|
};
|
|
5822
5899
|
}
|
|
5823
5900
|
|
|
5824
|
-
function resetValuesToDefault() {
|
|
5901
|
+
function resetValuesToDefault(clearAllBlacklistComponents) {
|
|
5825
5902
|
return function (dispatch, getState) {
|
|
5826
5903
|
var _getState2 = getState(),
|
|
5827
5904
|
selectedValues = _getState2.selectedValues,
|
|
@@ -5830,23 +5907,23 @@
|
|
|
5830
5907
|
var defaultValues = {};
|
|
5831
5908
|
var valueToSet = void 0;
|
|
5832
5909
|
Object.keys(selectedValues).forEach(function (component) {
|
|
5833
|
-
if (!
|
|
5834
|
-
|
|
5835
|
-
|
|
5836
|
-
|
|
5837
|
-
|
|
5838
|
-
|
|
5839
|
-
|
|
5840
|
-
|
|
5841
|
-
|
|
5910
|
+
if (!(Array.isArray(clearAllBlacklistComponents) && clearAllBlacklistComponents.includes(component))) {
|
|
5911
|
+
if (!componentProps[component] || !componentProps[component].componentType || !componentProps[component].defaultValue) {
|
|
5912
|
+
valueToSet = null;
|
|
5913
|
+
} else if ([constants$1.componentTypes.rangeSlider, constants$1.componentTypes.rangeInput, constants$1.componentTypes.ratingsFilter, constants$1.componentTypes.dateRange].includes(componentProps[component].componentType)) {
|
|
5914
|
+
valueToSet = typeof componentProps[component].defaultValue === 'object' ? [componentProps[component].defaultValue.start, componentProps[component].defaultValue.end] : null;
|
|
5915
|
+
} else if ([constants$1.componentTypes.multiDropdownList, constants$1.componentTypes.multiDataList, constants$1.componentTypes.multiList, constants$1.componentTypes.singleDataList, constants$1.componentTypes.singleDropdownList, constants$1.componentTypes.singleList, constants$1.componentTypes.tagCloud, constants$1.componentTypes.toggleButton, constants$1.componentTypes.multiDropdownRange, constants$1.componentTypes.multiRange, constants$1.componentTypes.singleDropdownRange, constants$1.componentTypes.singleRange, constants$1.componentTypes.dataSearch, constants$1.componentTypes.datePicker].includes(componentProps[component].componentType)) {
|
|
5916
|
+
valueToSet = componentProps[component].defaultValue;
|
|
5917
|
+
} else if ([constants$1.componentTypes.categorySearch].includes(componentProps[component].componentType)) {
|
|
5918
|
+
valueToSet = componentProps[component].defaultValue ? componentProps[component].defaultValue.term : '';
|
|
5919
|
+
}
|
|
5842
5920
|
|
|
5843
|
-
|
|
5844
|
-
|
|
5845
|
-
|
|
5846
|
-
|
|
5921
|
+
if (!(0, helper.isEqual)(selectedValues[component].value, valueToSet)) {
|
|
5922
|
+
defaultValues = _extends({}, defaultValues, _defineProperty({}, component, _extends({}, selectedValues[component], {
|
|
5923
|
+
value: valueToSet
|
|
5924
|
+
})));
|
|
5925
|
+
}
|
|
5847
5926
|
}
|
|
5848
|
-
|
|
5849
|
-
return true;
|
|
5850
5927
|
});
|
|
5851
5928
|
dispatch({
|
|
5852
5929
|
type: constants.RESET_TO_DEFAULT,
|
|
@@ -5876,9 +5953,11 @@
|
|
|
5876
5953
|
|
|
5877
5954
|
function clearValues() {
|
|
5878
5955
|
var resetValues = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
5956
|
+
var clearAllBlacklistComponents = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
5879
5957
|
return {
|
|
5880
5958
|
type: constants.CLEAR_VALUES,
|
|
5881
|
-
resetValues: resetValues
|
|
5959
|
+
resetValues: resetValues,
|
|
5960
|
+
clearAllBlacklistComponents: clearAllBlacklistComponents
|
|
5882
5961
|
};
|
|
5883
5962
|
}
|
|
5884
5963
|
});
|
|
@@ -8410,7 +8489,7 @@
|
|
|
8410
8489
|
exports.Response = ctx.Response;
|
|
8411
8490
|
module.exports = exports;
|
|
8412
8491
|
});
|
|
8413
|
-
unwrapExports(browserPonyfill);
|
|
8492
|
+
var fetch$1 = unwrapExports(browserPonyfill);
|
|
8414
8493
|
var browserPonyfill_1 = browserPonyfill.fetch;
|
|
8415
8494
|
var browserPonyfill_2 = browserPonyfill.Headers;
|
|
8416
8495
|
var browserPonyfill_3 = browserPonyfill.Request;
|
|
@@ -8834,7 +8913,7 @@
|
|
|
8834
8913
|
|
|
8835
8914
|
var oldQuery = queryLog[component];
|
|
8836
8915
|
|
|
8837
|
-
if (mustExecuteMapQuery || !(0, helper.
|
|
8916
|
+
if (mustExecuteMapQuery || !(0, helper.compareQueries)(currentQuery, oldQuery, false)) {
|
|
8838
8917
|
orderOfQueries = [].concat(_toConsumableArray(orderOfQueries), [component]);
|
|
8839
8918
|
dispatch((0, misc.logQuery)(component, queryToLog));
|
|
8840
8919
|
var isMapComponent = Object.keys(mapData).includes(component);
|
|
@@ -8854,7 +8933,7 @@
|
|
|
8854
8933
|
var _getState5 = getState(),
|
|
8855
8934
|
combinedLog = _getState5.combinedLog;
|
|
8856
8935
|
|
|
8857
|
-
if ((0, helper.
|
|
8936
|
+
if ((0, helper.compareQueries)(combinedLog[component], currentQuery)) return;
|
|
8858
8937
|
dispatch((0, misc.logCombinedQuery)(component, currentQuery));
|
|
8859
8938
|
}
|
|
8860
8939
|
|
|
@@ -9071,7 +9150,7 @@
|
|
|
9071
9150
|
query: _extends({}, queryObj)
|
|
9072
9151
|
}, options);
|
|
9073
9152
|
|
|
9074
|
-
if ((0, helper.
|
|
9153
|
+
if ((0, helper.compareQueries)(queryLog[component], currentQuery)) return;
|
|
9075
9154
|
dispatch((0, misc.logQuery)(component, currentQuery));
|
|
9076
9155
|
|
|
9077
9156
|
if (store.config && store.config.enableAppbase) {
|
|
@@ -14063,9 +14142,10 @@
|
|
|
14063
14142
|
getQueryOptions = lib_8.getQueryOptions,
|
|
14064
14143
|
getClassName$1 = lib_8.getClassName,
|
|
14065
14144
|
parseHits = lib_8.parseHits,
|
|
14066
|
-
getOptionsFromQuery = lib_8.getOptionsFromQuery,
|
|
14067
14145
|
getCompositeAggsQuery = lib_8.getCompositeAggsQuery,
|
|
14068
|
-
getResultStats = lib_8.getResultStats
|
|
14146
|
+
getResultStats = lib_8.getResultStats,
|
|
14147
|
+
extractQueryFromCustomQuery = lib_8.extractQueryFromCustomQuery,
|
|
14148
|
+
getOptionsForCustomQuery = lib_8.getOptionsForCustomQuery;
|
|
14069
14149
|
var ReactiveList = {
|
|
14070
14150
|
name: 'ReactiveList',
|
|
14071
14151
|
components: {
|
|
@@ -14263,19 +14343,11 @@
|
|
|
14263
14343
|
var options = getQueryOptions(this.$props);
|
|
14264
14344
|
options.from = 0;
|
|
14265
14345
|
this.$defaultQuery = newVal(null, this.$props);
|
|
14266
|
-
|
|
14267
|
-
var
|
|
14268
|
-
sort = _ref.sort,
|
|
14269
|
-
query = _ref.query;
|
|
14270
|
-
|
|
14271
|
-
if (sort) {
|
|
14272
|
-
options.sort = this.$defaultQuery.sort;
|
|
14273
|
-
}
|
|
14274
|
-
|
|
14275
|
-
var queryOptions = getOptionsFromQuery(this.$defaultQuery);
|
|
14346
|
+
var query = extractQueryFromCustomQuery(this.$defaultQuery);
|
|
14347
|
+
var queryOptions = getOptionsForCustomQuery(this.$defaultQuery);
|
|
14276
14348
|
|
|
14277
14349
|
if (queryOptions) {
|
|
14278
|
-
options = _extends({}, options,
|
|
14350
|
+
options = _extends({}, options, queryOptions);
|
|
14279
14351
|
} // Update calculated default query in store
|
|
14280
14352
|
|
|
14281
14353
|
|
|
@@ -14366,24 +14438,24 @@
|
|
|
14366
14438
|
options.from = this.$data.from;
|
|
14367
14439
|
|
|
14368
14440
|
if (this.sortOptions && this.sortOptions[this.sortOptionIndex]) {
|
|
14369
|
-
var
|
|
14441
|
+
var _ref;
|
|
14370
14442
|
|
|
14371
14443
|
var sortField = this.sortOptions[this.sortOptionIndex].dataField;
|
|
14372
14444
|
var sortBy = this.sortOptions[this.sortOptionIndex].sortBy;
|
|
14373
|
-
options.sort = [(
|
|
14445
|
+
options.sort = [(_ref = {}, _ref[sortField] = {
|
|
14374
14446
|
order: sortBy
|
|
14375
|
-
},
|
|
14447
|
+
}, _ref)]; // To handle sort options for RS API
|
|
14376
14448
|
|
|
14377
14449
|
this.updateComponentProps(this.componentId, {
|
|
14378
14450
|
dataField: sortField,
|
|
14379
14451
|
sortBy: sortBy
|
|
14380
14452
|
}, constants_1$1.reactiveList);
|
|
14381
14453
|
} else if (this.$props.sortBy) {
|
|
14382
|
-
var
|
|
14454
|
+
var _ref2;
|
|
14383
14455
|
|
|
14384
|
-
options.sort = [(
|
|
14456
|
+
options.sort = [(_ref2 = {}, _ref2[this.$props.dataField] = {
|
|
14385
14457
|
order: this.$props.sortBy
|
|
14386
|
-
},
|
|
14458
|
+
}, _ref2)];
|
|
14387
14459
|
} // Override sort query with defaultQuery's sort if defined
|
|
14388
14460
|
|
|
14389
14461
|
|
|
@@ -14391,20 +14463,13 @@
|
|
|
14391
14463
|
|
|
14392
14464
|
if (this.$props.defaultQuery) {
|
|
14393
14465
|
this.$defaultQuery = this.$props.defaultQuery();
|
|
14394
|
-
options = _extends({}, options,
|
|
14395
|
-
|
|
14396
|
-
if (this.$defaultQuery.sort) {
|
|
14397
|
-
options.sort = this.$defaultQuery.sort;
|
|
14398
|
-
} // Update calculated default query in store
|
|
14399
|
-
|
|
14466
|
+
options = _extends({}, options, getOptionsForCustomQuery(this.$defaultQuery)); // Update calculated default query in store
|
|
14400
14467
|
|
|
14401
14468
|
updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props);
|
|
14402
14469
|
} // execute is set to false at the time of mount
|
|
14403
14470
|
|
|
14404
14471
|
|
|
14405
|
-
var
|
|
14406
|
-
query = _ref4.query;
|
|
14407
|
-
|
|
14472
|
+
var query = extractQueryFromCustomQuery(this.$defaultQuery);
|
|
14408
14473
|
var execute = false;
|
|
14409
14474
|
this.setQueryOptions(this.$props.componentId, _extends({}, options, this.getAggsQuery()), execute);
|
|
14410
14475
|
|
|
@@ -14519,18 +14584,18 @@
|
|
|
14519
14584
|
}) : 0;
|
|
14520
14585
|
|
|
14521
14586
|
if (props.sortOptions[sortOptionIndex]) {
|
|
14522
|
-
var
|
|
14587
|
+
var _ref3;
|
|
14523
14588
|
|
|
14524
|
-
options.sort = [(
|
|
14589
|
+
options.sort = [(_ref3 = {}, _ref3[props.sortOptions[sortOptionIndex].dataField] = {
|
|
14525
14590
|
order: props.sortOptions[sortOptionIndex].sortBy
|
|
14526
|
-
},
|
|
14591
|
+
}, _ref3)];
|
|
14527
14592
|
}
|
|
14528
14593
|
} else if (props.sortBy) {
|
|
14529
|
-
var
|
|
14594
|
+
var _ref4;
|
|
14530
14595
|
|
|
14531
|
-
options.sort = [(
|
|
14596
|
+
options.sort = [(_ref4 = {}, _ref4[props.dataField] = {
|
|
14532
14597
|
order: props.sortBy
|
|
14533
|
-
},
|
|
14598
|
+
}, _ref4)];
|
|
14534
14599
|
}
|
|
14535
14600
|
|
|
14536
14601
|
this.setQueryOptions(this.$props.componentId, _extends({}, options, this.getAggsQuery()), true);
|
|
@@ -14633,16 +14698,16 @@
|
|
|
14633
14698
|
var index = e.target.value;
|
|
14634
14699
|
|
|
14635
14700
|
if (this.sortOptions && this.sortOptions[index]) {
|
|
14636
|
-
var
|
|
14701
|
+
var _ref5;
|
|
14637
14702
|
|
|
14638
14703
|
// This fixes issue #371 (where sorting a multi-result page with infinite loader breaks)
|
|
14639
14704
|
var options = getQueryOptions(this.$props);
|
|
14640
14705
|
options.from = 0;
|
|
14641
14706
|
var sortField = this.sortOptions[index].dataField;
|
|
14642
14707
|
var sortBy = this.sortOptions[index].sortBy;
|
|
14643
|
-
options.sort = [(
|
|
14708
|
+
options.sort = [(_ref5 = {}, _ref5[sortField] = {
|
|
14644
14709
|
order: sortBy
|
|
14645
|
-
},
|
|
14710
|
+
}, _ref5)];
|
|
14646
14711
|
this.sortOptionIndex = index; // To handle sort options for RS API
|
|
14647
14712
|
|
|
14648
14713
|
this.updateComponentProps(this.componentId, {
|
|
@@ -14807,7 +14872,7 @@
|
|
|
14807
14872
|
options.size = size || 10;
|
|
14808
14873
|
|
|
14809
14874
|
var getSortOption = function getSortOption() {
|
|
14810
|
-
var
|
|
14875
|
+
var _ref7;
|
|
14811
14876
|
|
|
14812
14877
|
if (defaultSortOption) {
|
|
14813
14878
|
var sortOption = sortOptionsNew.find(function (option) {
|
|
@@ -14815,35 +14880,39 @@
|
|
|
14815
14880
|
});
|
|
14816
14881
|
|
|
14817
14882
|
if (sortOption) {
|
|
14818
|
-
var
|
|
14883
|
+
var _ref6;
|
|
14819
14884
|
|
|
14820
|
-
return
|
|
14885
|
+
return _ref6 = {}, _ref6[sortOption.dataField] = {
|
|
14821
14886
|
order: sortOption.sortBy
|
|
14822
|
-
},
|
|
14887
|
+
}, _ref6;
|
|
14823
14888
|
}
|
|
14824
14889
|
}
|
|
14825
14890
|
|
|
14826
|
-
return
|
|
14891
|
+
return _ref7 = {}, _ref7[sortOptionsNew[0].dataField] = {
|
|
14827
14892
|
order: sortOptionsNew[0].sortBy
|
|
14828
|
-
},
|
|
14893
|
+
}, _ref7;
|
|
14829
14894
|
};
|
|
14830
14895
|
|
|
14831
14896
|
if (sortOptionsNew) {
|
|
14832
14897
|
options.sort = [getSortOption()];
|
|
14833
14898
|
} else if (sortBy) {
|
|
14834
|
-
var
|
|
14899
|
+
var _ref8;
|
|
14835
14900
|
|
|
14836
|
-
options.sort = [(
|
|
14901
|
+
options.sort = [(_ref8 = {}, _ref8[dataField] = {
|
|
14837
14902
|
order: sortBy
|
|
14838
|
-
},
|
|
14903
|
+
}, _ref8)];
|
|
14839
14904
|
}
|
|
14840
14905
|
|
|
14841
14906
|
return options;
|
|
14842
14907
|
};
|
|
14843
14908
|
|
|
14909
|
+
ReactiveList.hasInternalComponent = function () {
|
|
14910
|
+
return true;
|
|
14911
|
+
};
|
|
14912
|
+
|
|
14844
14913
|
var RLConnected = ComponentWrapper$1(connect(mapStateToProps$1, mapDispatchtoProps)(ReactiveList), {
|
|
14845
14914
|
componentType: constants_1$1.reactiveList,
|
|
14846
|
-
internalComponent:
|
|
14915
|
+
internalComponent: ReactiveList.hasInternalComponent()
|
|
14847
14916
|
});
|
|
14848
14917
|
|
|
14849
14918
|
ReactiveList.install = function (Vue) {
|
|
@@ -14986,691 +15055,109 @@
|
|
|
14986
15055
|
var querystring_3 = querystring.encode;
|
|
14987
15056
|
var querystring_4 = querystring.stringify;
|
|
14988
15057
|
|
|
14989
|
-
var
|
|
14990
|
-
|
|
14991
|
-
|
|
14992
|
-
|
|
14993
|
-
|
|
14994
|
-
this.fetch = false;
|
|
14995
|
-
this.DOMException = global.DOMException;
|
|
14996
|
-
}
|
|
15058
|
+
var _typeof$1 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
|
15059
|
+
return typeof obj;
|
|
15060
|
+
} : function (obj) {
|
|
15061
|
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
15062
|
+
};
|
|
14997
15063
|
|
|
14998
|
-
|
|
14999
|
-
|
|
15000
|
-
|
|
15064
|
+
function contains(string, substring) {
|
|
15065
|
+
return string.indexOf(substring) !== -1;
|
|
15066
|
+
}
|
|
15001
15067
|
|
|
15002
|
-
|
|
15003
|
-
|
|
15004
|
-
|
|
15005
|
-
searchParams: 'URLSearchParams' in self,
|
|
15006
|
-
iterable: 'Symbol' in self && 'iterator' in Symbol,
|
|
15007
|
-
blob: 'FileReader' in self && 'Blob' in self && function () {
|
|
15008
|
-
try {
|
|
15009
|
-
new Blob();
|
|
15010
|
-
return true;
|
|
15011
|
-
} catch (e) {
|
|
15012
|
-
return false;
|
|
15013
|
-
}
|
|
15014
|
-
}(),
|
|
15015
|
-
formData: 'FormData' in self,
|
|
15016
|
-
arrayBuffer: 'ArrayBuffer' in self
|
|
15017
|
-
};
|
|
15068
|
+
function isAppbase(url) {
|
|
15069
|
+
return contains(url, 'scalr.api.appbase.io');
|
|
15070
|
+
}
|
|
15018
15071
|
|
|
15019
|
-
|
|
15020
|
-
|
|
15021
|
-
|
|
15072
|
+
function btoa$1() {
|
|
15073
|
+
var input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
15074
|
+
var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
|
15075
|
+
var str = input;
|
|
15076
|
+
var output = ''; // eslint-disable-next-line
|
|
15022
15077
|
|
|
15023
|
-
|
|
15024
|
-
|
|
15078
|
+
for (var block = 0, charCode, i = 0, map = chars; str.charAt(i | 0) || (map = '=', i % 1); // eslint-disable-line no-bitwise
|
|
15079
|
+
output += map.charAt(63 & block >> 8 - i % 1 * 8) // eslint-disable-line no-bitwise
|
|
15080
|
+
) {
|
|
15081
|
+
charCode = str.charCodeAt(i += 3 / 4);
|
|
15025
15082
|
|
|
15026
|
-
|
|
15027
|
-
|
|
15028
|
-
|
|
15029
|
-
}
|
|
15083
|
+
if (charCode > 0xff) {
|
|
15084
|
+
throw new Error('"btoa" failed: The string to be encoded contains characters outside of the Latin1 range.');
|
|
15085
|
+
}
|
|
15030
15086
|
|
|
15031
|
-
|
|
15032
|
-
|
|
15033
|
-
name = String(name);
|
|
15034
|
-
}
|
|
15087
|
+
block = block << 8 | charCode; // eslint-disable-line no-bitwise
|
|
15088
|
+
}
|
|
15035
15089
|
|
|
15036
|
-
|
|
15037
|
-
|
|
15038
|
-
}
|
|
15090
|
+
return output;
|
|
15091
|
+
}
|
|
15039
15092
|
|
|
15040
|
-
|
|
15041
|
-
|
|
15093
|
+
function validateRSQuery(query) {
|
|
15094
|
+
if (query && Object.prototype.toString.call(query) === '[object Array]') {
|
|
15095
|
+
for (var i = 0; i < query.length; i += 1) {
|
|
15096
|
+
var q = query[i];
|
|
15042
15097
|
|
|
15043
|
-
|
|
15044
|
-
if (
|
|
15045
|
-
|
|
15098
|
+
if (q) {
|
|
15099
|
+
if (!q.id) {
|
|
15100
|
+
return new Error("'id' field must be present in query object");
|
|
15046
15101
|
}
|
|
15102
|
+
} else {
|
|
15103
|
+
return new Error('query object can not have an empty value');
|
|
15104
|
+
}
|
|
15105
|
+
}
|
|
15047
15106
|
|
|
15048
|
-
|
|
15049
|
-
|
|
15107
|
+
return true;
|
|
15108
|
+
}
|
|
15050
15109
|
|
|
15110
|
+
return new Error("invalid query value, 'query' value must be an array");
|
|
15111
|
+
}
|
|
15051
15112
|
|
|
15052
|
-
|
|
15053
|
-
|
|
15054
|
-
|
|
15055
|
-
|
|
15056
|
-
|
|
15057
|
-
|
|
15058
|
-
|
|
15059
|
-
|
|
15060
|
-
|
|
15061
|
-
|
|
15113
|
+
function validate(object, fields) {
|
|
15114
|
+
var invalid = [];
|
|
15115
|
+
var emptyFor = {
|
|
15116
|
+
object: null,
|
|
15117
|
+
string: '',
|
|
15118
|
+
number: 0
|
|
15119
|
+
};
|
|
15120
|
+
var keys = Object.keys(fields);
|
|
15121
|
+
keys.forEach(function (key) {
|
|
15122
|
+
var types = fields[key].split('|');
|
|
15123
|
+
var matchedType = types.find(function (type) {
|
|
15124
|
+
return (// eslint-disable-next-line
|
|
15125
|
+
_typeof$1(object[key]) === type
|
|
15126
|
+
);
|
|
15127
|
+
});
|
|
15062
15128
|
|
|
15063
|
-
|
|
15064
|
-
|
|
15065
|
-
|
|
15066
|
-
|
|
15067
|
-
|
|
15129
|
+
if (!matchedType || object[key] === emptyFor[matchedType]) {
|
|
15130
|
+
invalid.push(key);
|
|
15131
|
+
}
|
|
15132
|
+
});
|
|
15133
|
+
var missing = '';
|
|
15068
15134
|
|
|
15069
|
-
|
|
15070
|
-
|
|
15135
|
+
for (var i = 0; i < invalid.length; i += 1) {
|
|
15136
|
+
missing += invalid[i] + ', ';
|
|
15137
|
+
}
|
|
15071
15138
|
|
|
15072
|
-
|
|
15073
|
-
|
|
15139
|
+
if (invalid.length > 0) {
|
|
15140
|
+
return new Error('fields missing: ' + missing);
|
|
15141
|
+
}
|
|
15074
15142
|
|
|
15075
|
-
|
|
15076
|
-
|
|
15077
|
-
this.append(name, value);
|
|
15078
|
-
}, this);
|
|
15079
|
-
} else if (Array.isArray(headers)) {
|
|
15080
|
-
headers.forEach(function (header) {
|
|
15081
|
-
this.append(header[0], header[1]);
|
|
15082
|
-
}, this);
|
|
15083
|
-
} else if (headers) {
|
|
15084
|
-
Object.getOwnPropertyNames(headers).forEach(function (name) {
|
|
15085
|
-
this.append(name, headers[name]);
|
|
15086
|
-
}, this);
|
|
15087
|
-
}
|
|
15088
|
-
}
|
|
15143
|
+
return true;
|
|
15144
|
+
}
|
|
15089
15145
|
|
|
15090
|
-
|
|
15091
|
-
|
|
15092
|
-
value = normalizeValue(value);
|
|
15093
|
-
var oldValue = this.map[name];
|
|
15094
|
-
this.map[name] = oldValue ? oldValue + ', ' + value : value;
|
|
15095
|
-
};
|
|
15146
|
+
function removeUndefined() {
|
|
15147
|
+
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
15096
15148
|
|
|
15097
|
-
|
|
15098
|
-
|
|
15099
|
-
|
|
15149
|
+
if (value || !(Object.keys(value).length === 0 && value.constructor === Object)) {
|
|
15150
|
+
return JSON.parse(JSON.stringify(value));
|
|
15151
|
+
}
|
|
15100
15152
|
|
|
15101
|
-
|
|
15102
|
-
|
|
15103
|
-
return this.has(name) ? this.map[name] : null;
|
|
15104
|
-
};
|
|
15153
|
+
return null;
|
|
15154
|
+
}
|
|
15105
15155
|
|
|
15106
|
-
|
|
15107
|
-
|
|
15108
|
-
|
|
15156
|
+
function encodeHeaders() {
|
|
15157
|
+
var headers = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
15158
|
+
var shouldEncode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; // Encode headers
|
|
15109
15159
|
|
|
15110
|
-
|
|
15111
|
-
this.map[normalizeName(name)] = normalizeValue(value);
|
|
15112
|
-
};
|
|
15113
|
-
|
|
15114
|
-
Headers.prototype.forEach = function (callback, thisArg) {
|
|
15115
|
-
for (var name in this.map) {
|
|
15116
|
-
if (this.map.hasOwnProperty(name)) {
|
|
15117
|
-
callback.call(thisArg, this.map[name], name, this);
|
|
15118
|
-
}
|
|
15119
|
-
}
|
|
15120
|
-
};
|
|
15121
|
-
|
|
15122
|
-
Headers.prototype.keys = function () {
|
|
15123
|
-
var items = [];
|
|
15124
|
-
this.forEach(function (value, name) {
|
|
15125
|
-
items.push(name);
|
|
15126
|
-
});
|
|
15127
|
-
return iteratorFor(items);
|
|
15128
|
-
};
|
|
15129
|
-
|
|
15130
|
-
Headers.prototype.values = function () {
|
|
15131
|
-
var items = [];
|
|
15132
|
-
this.forEach(function (value) {
|
|
15133
|
-
items.push(value);
|
|
15134
|
-
});
|
|
15135
|
-
return iteratorFor(items);
|
|
15136
|
-
};
|
|
15137
|
-
|
|
15138
|
-
Headers.prototype.entries = function () {
|
|
15139
|
-
var items = [];
|
|
15140
|
-
this.forEach(function (value, name) {
|
|
15141
|
-
items.push([name, value]);
|
|
15142
|
-
});
|
|
15143
|
-
return iteratorFor(items);
|
|
15144
|
-
};
|
|
15145
|
-
|
|
15146
|
-
if (support.iterable) {
|
|
15147
|
-
Headers.prototype[Symbol.iterator] = Headers.prototype.entries;
|
|
15148
|
-
}
|
|
15149
|
-
|
|
15150
|
-
function consumed(body) {
|
|
15151
|
-
if (body.bodyUsed) {
|
|
15152
|
-
return Promise.reject(new TypeError('Already read'));
|
|
15153
|
-
}
|
|
15154
|
-
|
|
15155
|
-
body.bodyUsed = true;
|
|
15156
|
-
}
|
|
15157
|
-
|
|
15158
|
-
function fileReaderReady(reader) {
|
|
15159
|
-
return new Promise(function (resolve, reject) {
|
|
15160
|
-
reader.onload = function () {
|
|
15161
|
-
resolve(reader.result);
|
|
15162
|
-
};
|
|
15163
|
-
|
|
15164
|
-
reader.onerror = function () {
|
|
15165
|
-
reject(reader.error);
|
|
15166
|
-
};
|
|
15167
|
-
});
|
|
15168
|
-
}
|
|
15169
|
-
|
|
15170
|
-
function readBlobAsArrayBuffer(blob) {
|
|
15171
|
-
var reader = new FileReader();
|
|
15172
|
-
var promise = fileReaderReady(reader);
|
|
15173
|
-
reader.readAsArrayBuffer(blob);
|
|
15174
|
-
return promise;
|
|
15175
|
-
}
|
|
15176
|
-
|
|
15177
|
-
function readBlobAsText(blob) {
|
|
15178
|
-
var reader = new FileReader();
|
|
15179
|
-
var promise = fileReaderReady(reader);
|
|
15180
|
-
reader.readAsText(blob);
|
|
15181
|
-
return promise;
|
|
15182
|
-
}
|
|
15183
|
-
|
|
15184
|
-
function readArrayBufferAsText(buf) {
|
|
15185
|
-
var view = new Uint8Array(buf);
|
|
15186
|
-
var chars = new Array(view.length);
|
|
15187
|
-
|
|
15188
|
-
for (var i = 0; i < view.length; i++) {
|
|
15189
|
-
chars[i] = String.fromCharCode(view[i]);
|
|
15190
|
-
}
|
|
15191
|
-
|
|
15192
|
-
return chars.join('');
|
|
15193
|
-
}
|
|
15194
|
-
|
|
15195
|
-
function bufferClone(buf) {
|
|
15196
|
-
if (buf.slice) {
|
|
15197
|
-
return buf.slice(0);
|
|
15198
|
-
} else {
|
|
15199
|
-
var view = new Uint8Array(buf.byteLength);
|
|
15200
|
-
view.set(new Uint8Array(buf));
|
|
15201
|
-
return view.buffer;
|
|
15202
|
-
}
|
|
15203
|
-
}
|
|
15204
|
-
|
|
15205
|
-
function Body() {
|
|
15206
|
-
this.bodyUsed = false;
|
|
15207
|
-
|
|
15208
|
-
this._initBody = function (body) {
|
|
15209
|
-
this._bodyInit = body;
|
|
15210
|
-
|
|
15211
|
-
if (!body) {
|
|
15212
|
-
this._bodyText = '';
|
|
15213
|
-
} else if (typeof body === 'string') {
|
|
15214
|
-
this._bodyText = body;
|
|
15215
|
-
} else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
|
|
15216
|
-
this._bodyBlob = body;
|
|
15217
|
-
} else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
|
|
15218
|
-
this._bodyFormData = body;
|
|
15219
|
-
} else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
|
|
15220
|
-
this._bodyText = body.toString();
|
|
15221
|
-
} else if (support.arrayBuffer && support.blob && isDataView(body)) {
|
|
15222
|
-
this._bodyArrayBuffer = bufferClone(body.buffer); // IE 10-11 can't handle a DataView body.
|
|
15223
|
-
|
|
15224
|
-
this._bodyInit = new Blob([this._bodyArrayBuffer]);
|
|
15225
|
-
} else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {
|
|
15226
|
-
this._bodyArrayBuffer = bufferClone(body);
|
|
15227
|
-
} else {
|
|
15228
|
-
this._bodyText = body = Object.prototype.toString.call(body);
|
|
15229
|
-
}
|
|
15230
|
-
|
|
15231
|
-
if (!this.headers.get('content-type')) {
|
|
15232
|
-
if (typeof body === 'string') {
|
|
15233
|
-
this.headers.set('content-type', 'text/plain;charset=UTF-8');
|
|
15234
|
-
} else if (this._bodyBlob && this._bodyBlob.type) {
|
|
15235
|
-
this.headers.set('content-type', this._bodyBlob.type);
|
|
15236
|
-
} else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
|
|
15237
|
-
this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
|
|
15238
|
-
}
|
|
15239
|
-
}
|
|
15240
|
-
};
|
|
15241
|
-
|
|
15242
|
-
if (support.blob) {
|
|
15243
|
-
this.blob = function () {
|
|
15244
|
-
var rejected = consumed(this);
|
|
15245
|
-
|
|
15246
|
-
if (rejected) {
|
|
15247
|
-
return rejected;
|
|
15248
|
-
}
|
|
15249
|
-
|
|
15250
|
-
if (this._bodyBlob) {
|
|
15251
|
-
return Promise.resolve(this._bodyBlob);
|
|
15252
|
-
} else if (this._bodyArrayBuffer) {
|
|
15253
|
-
return Promise.resolve(new Blob([this._bodyArrayBuffer]));
|
|
15254
|
-
} else if (this._bodyFormData) {
|
|
15255
|
-
throw new Error('could not read FormData body as blob');
|
|
15256
|
-
} else {
|
|
15257
|
-
return Promise.resolve(new Blob([this._bodyText]));
|
|
15258
|
-
}
|
|
15259
|
-
};
|
|
15260
|
-
|
|
15261
|
-
this.arrayBuffer = function () {
|
|
15262
|
-
if (this._bodyArrayBuffer) {
|
|
15263
|
-
return consumed(this) || Promise.resolve(this._bodyArrayBuffer);
|
|
15264
|
-
} else {
|
|
15265
|
-
return this.blob().then(readBlobAsArrayBuffer);
|
|
15266
|
-
}
|
|
15267
|
-
};
|
|
15268
|
-
}
|
|
15269
|
-
|
|
15270
|
-
this.text = function () {
|
|
15271
|
-
var rejected = consumed(this);
|
|
15272
|
-
|
|
15273
|
-
if (rejected) {
|
|
15274
|
-
return rejected;
|
|
15275
|
-
}
|
|
15276
|
-
|
|
15277
|
-
if (this._bodyBlob) {
|
|
15278
|
-
return readBlobAsText(this._bodyBlob);
|
|
15279
|
-
} else if (this._bodyArrayBuffer) {
|
|
15280
|
-
return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer));
|
|
15281
|
-
} else if (this._bodyFormData) {
|
|
15282
|
-
throw new Error('could not read FormData body as text');
|
|
15283
|
-
} else {
|
|
15284
|
-
return Promise.resolve(this._bodyText);
|
|
15285
|
-
}
|
|
15286
|
-
};
|
|
15287
|
-
|
|
15288
|
-
if (support.formData) {
|
|
15289
|
-
this.formData = function () {
|
|
15290
|
-
return this.text().then(decode);
|
|
15291
|
-
};
|
|
15292
|
-
}
|
|
15293
|
-
|
|
15294
|
-
this.json = function () {
|
|
15295
|
-
return this.text().then(JSON.parse);
|
|
15296
|
-
};
|
|
15297
|
-
|
|
15298
|
-
return this;
|
|
15299
|
-
} // HTTP methods whose capitalization should be normalized
|
|
15300
|
-
|
|
15301
|
-
|
|
15302
|
-
var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'];
|
|
15303
|
-
|
|
15304
|
-
function normalizeMethod(method) {
|
|
15305
|
-
var upcased = method.toUpperCase();
|
|
15306
|
-
return methods.indexOf(upcased) > -1 ? upcased : method;
|
|
15307
|
-
}
|
|
15308
|
-
|
|
15309
|
-
function Request(input, options) {
|
|
15310
|
-
options = options || {};
|
|
15311
|
-
var body = options.body;
|
|
15312
|
-
|
|
15313
|
-
if (input instanceof Request) {
|
|
15314
|
-
if (input.bodyUsed) {
|
|
15315
|
-
throw new TypeError('Already read');
|
|
15316
|
-
}
|
|
15317
|
-
|
|
15318
|
-
this.url = input.url;
|
|
15319
|
-
this.credentials = input.credentials;
|
|
15320
|
-
|
|
15321
|
-
if (!options.headers) {
|
|
15322
|
-
this.headers = new Headers(input.headers);
|
|
15323
|
-
}
|
|
15324
|
-
|
|
15325
|
-
this.method = input.method;
|
|
15326
|
-
this.mode = input.mode;
|
|
15327
|
-
this.signal = input.signal;
|
|
15328
|
-
|
|
15329
|
-
if (!body && input._bodyInit != null) {
|
|
15330
|
-
body = input._bodyInit;
|
|
15331
|
-
input.bodyUsed = true;
|
|
15332
|
-
}
|
|
15333
|
-
} else {
|
|
15334
|
-
this.url = String(input);
|
|
15335
|
-
}
|
|
15336
|
-
|
|
15337
|
-
this.credentials = options.credentials || this.credentials || 'same-origin';
|
|
15338
|
-
|
|
15339
|
-
if (options.headers || !this.headers) {
|
|
15340
|
-
this.headers = new Headers(options.headers);
|
|
15341
|
-
}
|
|
15342
|
-
|
|
15343
|
-
this.method = normalizeMethod(options.method || this.method || 'GET');
|
|
15344
|
-
this.mode = options.mode || this.mode || null;
|
|
15345
|
-
this.signal = options.signal || this.signal;
|
|
15346
|
-
this.referrer = null;
|
|
15347
|
-
|
|
15348
|
-
if ((this.method === 'GET' || this.method === 'HEAD') && body) {
|
|
15349
|
-
throw new TypeError('Body not allowed for GET or HEAD requests');
|
|
15350
|
-
}
|
|
15351
|
-
|
|
15352
|
-
this._initBody(body);
|
|
15353
|
-
}
|
|
15354
|
-
|
|
15355
|
-
Request.prototype.clone = function () {
|
|
15356
|
-
return new Request(this, {
|
|
15357
|
-
body: this._bodyInit
|
|
15358
|
-
});
|
|
15359
|
-
};
|
|
15360
|
-
|
|
15361
|
-
function decode(body) {
|
|
15362
|
-
var form = new FormData();
|
|
15363
|
-
body.trim().split('&').forEach(function (bytes) {
|
|
15364
|
-
if (bytes) {
|
|
15365
|
-
var split = bytes.split('=');
|
|
15366
|
-
var name = split.shift().replace(/\+/g, ' ');
|
|
15367
|
-
var value = split.join('=').replace(/\+/g, ' ');
|
|
15368
|
-
form.append(decodeURIComponent(name), decodeURIComponent(value));
|
|
15369
|
-
}
|
|
15370
|
-
});
|
|
15371
|
-
return form;
|
|
15372
|
-
}
|
|
15373
|
-
|
|
15374
|
-
function parseHeaders(rawHeaders) {
|
|
15375
|
-
var headers = new Headers(); // Replace instances of \r\n and \n followed by at least one space or horizontal tab with a space
|
|
15376
|
-
// https://tools.ietf.org/html/rfc7230#section-3.2
|
|
15377
|
-
|
|
15378
|
-
var preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, ' ');
|
|
15379
|
-
preProcessedHeaders.split(/\r?\n/).forEach(function (line) {
|
|
15380
|
-
var parts = line.split(':');
|
|
15381
|
-
var key = parts.shift().trim();
|
|
15382
|
-
|
|
15383
|
-
if (key) {
|
|
15384
|
-
var value = parts.join(':').trim();
|
|
15385
|
-
headers.append(key, value);
|
|
15386
|
-
}
|
|
15387
|
-
});
|
|
15388
|
-
return headers;
|
|
15389
|
-
}
|
|
15390
|
-
|
|
15391
|
-
Body.call(Request.prototype);
|
|
15392
|
-
|
|
15393
|
-
function Response(bodyInit, options) {
|
|
15394
|
-
if (!options) {
|
|
15395
|
-
options = {};
|
|
15396
|
-
}
|
|
15397
|
-
|
|
15398
|
-
this.type = 'default';
|
|
15399
|
-
this.status = options.status === undefined ? 200 : options.status;
|
|
15400
|
-
this.ok = this.status >= 200 && this.status < 300;
|
|
15401
|
-
this.statusText = 'statusText' in options ? options.statusText : 'OK';
|
|
15402
|
-
this.headers = new Headers(options.headers);
|
|
15403
|
-
this.url = options.url || '';
|
|
15404
|
-
|
|
15405
|
-
this._initBody(bodyInit);
|
|
15406
|
-
}
|
|
15407
|
-
|
|
15408
|
-
Body.call(Response.prototype);
|
|
15409
|
-
|
|
15410
|
-
Response.prototype.clone = function () {
|
|
15411
|
-
return new Response(this._bodyInit, {
|
|
15412
|
-
status: this.status,
|
|
15413
|
-
statusText: this.statusText,
|
|
15414
|
-
headers: new Headers(this.headers),
|
|
15415
|
-
url: this.url
|
|
15416
|
-
});
|
|
15417
|
-
};
|
|
15418
|
-
|
|
15419
|
-
Response.error = function () {
|
|
15420
|
-
var response = new Response(null, {
|
|
15421
|
-
status: 0,
|
|
15422
|
-
statusText: ''
|
|
15423
|
-
});
|
|
15424
|
-
response.type = 'error';
|
|
15425
|
-
return response;
|
|
15426
|
-
};
|
|
15427
|
-
|
|
15428
|
-
var redirectStatuses = [301, 302, 303, 307, 308];
|
|
15429
|
-
|
|
15430
|
-
Response.redirect = function (url, status) {
|
|
15431
|
-
if (redirectStatuses.indexOf(status) === -1) {
|
|
15432
|
-
throw new RangeError('Invalid status code');
|
|
15433
|
-
}
|
|
15434
|
-
|
|
15435
|
-
return new Response(null, {
|
|
15436
|
-
status: status,
|
|
15437
|
-
headers: {
|
|
15438
|
-
location: url
|
|
15439
|
-
}
|
|
15440
|
-
});
|
|
15441
|
-
};
|
|
15442
|
-
|
|
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
|
-
}
|
|
15458
|
-
|
|
15459
|
-
function fetch(input, init) {
|
|
15460
|
-
return new Promise(function (resolve, reject) {
|
|
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
|
-
|
|
15467
|
-
var xhr = new XMLHttpRequest();
|
|
15468
|
-
|
|
15469
|
-
function abortXhr() {
|
|
15470
|
-
xhr.abort();
|
|
15471
|
-
}
|
|
15472
|
-
|
|
15473
|
-
xhr.onload = function () {
|
|
15474
|
-
var options = {
|
|
15475
|
-
status: xhr.status,
|
|
15476
|
-
statusText: xhr.statusText,
|
|
15477
|
-
headers: parseHeaders(xhr.getAllResponseHeaders() || '')
|
|
15478
|
-
};
|
|
15479
|
-
options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');
|
|
15480
|
-
var body = 'response' in xhr ? xhr.response : xhr.responseText;
|
|
15481
|
-
resolve(new Response(body, options));
|
|
15482
|
-
};
|
|
15483
|
-
|
|
15484
|
-
xhr.onerror = function () {
|
|
15485
|
-
reject(new TypeError('Network request failed'));
|
|
15486
|
-
};
|
|
15487
|
-
|
|
15488
|
-
xhr.ontimeout = function () {
|
|
15489
|
-
reject(new TypeError('Network request failed'));
|
|
15490
|
-
};
|
|
15491
|
-
|
|
15492
|
-
xhr.onabort = function () {
|
|
15493
|
-
reject(new exports.DOMException('Aborted', 'AbortError'));
|
|
15494
|
-
};
|
|
15495
|
-
|
|
15496
|
-
xhr.open(request.method, request.url, true);
|
|
15497
|
-
|
|
15498
|
-
if (request.credentials === 'include') {
|
|
15499
|
-
xhr.withCredentials = true;
|
|
15500
|
-
} else if (request.credentials === 'omit') {
|
|
15501
|
-
xhr.withCredentials = false;
|
|
15502
|
-
}
|
|
15503
|
-
|
|
15504
|
-
if ('responseType' in xhr && support.blob) {
|
|
15505
|
-
xhr.responseType = 'blob';
|
|
15506
|
-
}
|
|
15507
|
-
|
|
15508
|
-
request.headers.forEach(function (value, name) {
|
|
15509
|
-
xhr.setRequestHeader(name, value);
|
|
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
|
-
|
|
15523
|
-
xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);
|
|
15524
|
-
});
|
|
15525
|
-
}
|
|
15526
|
-
|
|
15527
|
-
fetch.polyfill = true;
|
|
15528
|
-
|
|
15529
|
-
if (!self.fetch) {
|
|
15530
|
-
self.fetch = fetch;
|
|
15531
|
-
self.Headers = Headers;
|
|
15532
|
-
self.Request = Request;
|
|
15533
|
-
self.Response = Response;
|
|
15534
|
-
}
|
|
15535
|
-
|
|
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;
|
|
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;
|
|
15570
|
-
|
|
15571
|
-
var _typeof$1 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
|
15572
|
-
return typeof obj;
|
|
15573
|
-
} : function (obj) {
|
|
15574
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
15575
|
-
};
|
|
15576
|
-
|
|
15577
|
-
function contains(string, substring) {
|
|
15578
|
-
return string.indexOf(substring) !== -1;
|
|
15579
|
-
}
|
|
15580
|
-
|
|
15581
|
-
function isAppbase(url) {
|
|
15582
|
-
return contains(url, 'scalr.api.appbase.io');
|
|
15583
|
-
}
|
|
15584
|
-
|
|
15585
|
-
function btoa$1() {
|
|
15586
|
-
var input = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
15587
|
-
var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
|
15588
|
-
var str = input;
|
|
15589
|
-
var output = ''; // eslint-disable-next-line
|
|
15590
|
-
|
|
15591
|
-
for (var block = 0, charCode, i = 0, map = chars; str.charAt(i | 0) || (map = '=', i % 1); // eslint-disable-line no-bitwise
|
|
15592
|
-
output += map.charAt(63 & block >> 8 - i % 1 * 8) // eslint-disable-line no-bitwise
|
|
15593
|
-
) {
|
|
15594
|
-
charCode = str.charCodeAt(i += 3 / 4);
|
|
15595
|
-
|
|
15596
|
-
if (charCode > 0xff) {
|
|
15597
|
-
throw new Error('"btoa" failed: The string to be encoded contains characters outside of the Latin1 range.');
|
|
15598
|
-
}
|
|
15599
|
-
|
|
15600
|
-
block = block << 8 | charCode; // eslint-disable-line no-bitwise
|
|
15601
|
-
}
|
|
15602
|
-
|
|
15603
|
-
return output;
|
|
15604
|
-
}
|
|
15605
|
-
|
|
15606
|
-
function validateRSQuery(query) {
|
|
15607
|
-
if (query && Object.prototype.toString.call(query) === '[object Array]') {
|
|
15608
|
-
for (var i = 0; i < query.length; i += 1) {
|
|
15609
|
-
var q = query[i];
|
|
15610
|
-
|
|
15611
|
-
if (q) {
|
|
15612
|
-
if (!q.id) {
|
|
15613
|
-
return new Error("'id' field must be present in query object");
|
|
15614
|
-
}
|
|
15615
|
-
} else {
|
|
15616
|
-
return new Error('query object can not have an empty value');
|
|
15617
|
-
}
|
|
15618
|
-
}
|
|
15619
|
-
|
|
15620
|
-
return true;
|
|
15621
|
-
}
|
|
15622
|
-
|
|
15623
|
-
return new Error("invalid query value, 'query' value must be an array");
|
|
15624
|
-
}
|
|
15625
|
-
|
|
15626
|
-
function validate(object, fields) {
|
|
15627
|
-
var invalid = [];
|
|
15628
|
-
var emptyFor = {
|
|
15629
|
-
object: null,
|
|
15630
|
-
string: '',
|
|
15631
|
-
number: 0
|
|
15632
|
-
};
|
|
15633
|
-
var keys = Object.keys(fields);
|
|
15634
|
-
keys.forEach(function (key) {
|
|
15635
|
-
var types = fields[key].split('|');
|
|
15636
|
-
var matchedType = types.find(function (type) {
|
|
15637
|
-
return (// eslint-disable-next-line
|
|
15638
|
-
_typeof$1(object[key]) === type
|
|
15639
|
-
);
|
|
15640
|
-
});
|
|
15641
|
-
|
|
15642
|
-
if (!matchedType || object[key] === emptyFor[matchedType]) {
|
|
15643
|
-
invalid.push(key);
|
|
15644
|
-
}
|
|
15645
|
-
});
|
|
15646
|
-
var missing = '';
|
|
15647
|
-
|
|
15648
|
-
for (var i = 0; i < invalid.length; i += 1) {
|
|
15649
|
-
missing += invalid[i] + ', ';
|
|
15650
|
-
}
|
|
15651
|
-
|
|
15652
|
-
if (invalid.length > 0) {
|
|
15653
|
-
return new Error('fields missing: ' + missing);
|
|
15654
|
-
}
|
|
15655
|
-
|
|
15656
|
-
return true;
|
|
15657
|
-
}
|
|
15658
|
-
|
|
15659
|
-
function removeUndefined() {
|
|
15660
|
-
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
15661
|
-
|
|
15662
|
-
if (value || !(Object.keys(value).length === 0 && value.constructor === Object)) {
|
|
15663
|
-
return JSON.parse(JSON.stringify(value));
|
|
15664
|
-
}
|
|
15665
|
-
|
|
15666
|
-
return null;
|
|
15667
|
-
}
|
|
15668
|
-
|
|
15669
|
-
function encodeHeaders() {
|
|
15670
|
-
var headers = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
15671
|
-
var shouldEncode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; // Encode headers
|
|
15672
|
-
|
|
15673
|
-
var encodedHeaders = {};
|
|
15160
|
+
var encodedHeaders = {};
|
|
15674
15161
|
|
|
15675
15162
|
if (shouldEncode) {
|
|
15676
15163
|
Object.keys(headers).forEach(function (header) {
|
|
@@ -17267,14 +16754,14 @@
|
|
|
17267
16754
|
this.updateState(this.$props);
|
|
17268
16755
|
},
|
|
17269
16756
|
analyticsConfig: function analyticsConfig(newVal, oldVal) {
|
|
17270
|
-
if (!
|
|
16757
|
+
if (!helper_22(newVal, oldVal)) {
|
|
17271
16758
|
if (this.store) {
|
|
17272
16759
|
this.store.dispatch(analytics_3$1(newVal));
|
|
17273
16760
|
}
|
|
17274
16761
|
}
|
|
17275
16762
|
},
|
|
17276
16763
|
appbaseConfig: function appbaseConfig(newVal, oldVal) {
|
|
17277
|
-
if (!
|
|
16764
|
+
if (!helper_22(newVal, oldVal)) {
|
|
17278
16765
|
if (this.store) {
|
|
17279
16766
|
this.store.dispatch(analytics_3$1(newVal));
|
|
17280
16767
|
}
|
|
@@ -19915,7 +19402,8 @@
|
|
|
19915
19402
|
var debounce$1 = lib_8.debounce,
|
|
19916
19403
|
checkValueChange = lib_8.checkValueChange,
|
|
19917
19404
|
getClassName$3 = lib_8.getClassName,
|
|
19918
|
-
|
|
19405
|
+
extractQueryFromCustomQuery$1 = lib_8.extractQueryFromCustomQuery,
|
|
19406
|
+
getOptionsForCustomQuery$1 = lib_8.getOptionsForCustomQuery,
|
|
19919
19407
|
isEqual$4 = lib_8.isEqual,
|
|
19920
19408
|
getCompositeAggsQuery$1 = lib_8.getCompositeAggsQuery,
|
|
19921
19409
|
withClickIds = lib_8.withClickIds,
|
|
@@ -20277,7 +19765,7 @@
|
|
|
20277
19765
|
// returns size and aggs property
|
|
20278
19766
|
getBasicQueryOptions: function getBasicQueryOptions() {
|
|
20279
19767
|
var aggregationField = this.$props.aggregationField;
|
|
20280
|
-
var queryOptions =
|
|
19768
|
+
var queryOptions = helper_25(this.$props);
|
|
20281
19769
|
|
|
20282
19770
|
if (aggregationField) {
|
|
20283
19771
|
queryOptions.aggs = getCompositeAggsQuery$1({
|
|
@@ -20373,12 +19861,13 @@
|
|
|
20373
19861
|
|
|
20374
19862
|
if (this.defaultQuery) {
|
|
20375
19863
|
var defaultQueryToBeSet = this.defaultQuery(value, props) || {};
|
|
19864
|
+
var defaultQueryObj = extractQueryFromCustomQuery$1(defaultQueryToBeSet);
|
|
20376
19865
|
|
|
20377
|
-
if (
|
|
20378
|
-
query =
|
|
19866
|
+
if (defaultQueryObj) {
|
|
19867
|
+
query = defaultQueryObj;
|
|
20379
19868
|
}
|
|
20380
19869
|
|
|
20381
|
-
defaultQueryOptions =
|
|
19870
|
+
defaultQueryOptions = getOptionsForCustomQuery$1(defaultQueryToBeSet); // Update calculated default query in store
|
|
20382
19871
|
|
|
20383
19872
|
updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
|
|
20384
19873
|
}
|
|
@@ -20402,13 +19891,13 @@
|
|
|
20402
19891
|
|
|
20403
19892
|
if (customQuery) {
|
|
20404
19893
|
var customQueryTobeSet = customQuery(value, props);
|
|
20405
|
-
var queryTobeSet = customQueryTobeSet
|
|
19894
|
+
var queryTobeSet = extractQueryFromCustomQuery$1(customQueryTobeSet);
|
|
20406
19895
|
|
|
20407
19896
|
if (queryTobeSet) {
|
|
20408
19897
|
query = queryTobeSet;
|
|
20409
19898
|
}
|
|
20410
19899
|
|
|
20411
|
-
customQueryOptions =
|
|
19900
|
+
customQueryOptions = getOptionsForCustomQuery$1(customQueryTobeSet);
|
|
20412
19901
|
updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
20413
19902
|
this.setQueryOptions(componentId, _extends({}, this.queryOptions, customQueryOptions), false);
|
|
20414
19903
|
}
|
|
@@ -21097,6 +20586,10 @@
|
|
|
21097
20586
|
};
|
|
21098
20587
|
};
|
|
21099
20588
|
|
|
20589
|
+
DataSearch.hasInternalComponent = function () {
|
|
20590
|
+
return true;
|
|
20591
|
+
};
|
|
20592
|
+
|
|
21100
20593
|
var mapStateToProps$3 = function mapStateToProps(state, props) {
|
|
21101
20594
|
return {
|
|
21102
20595
|
selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || null,
|
|
@@ -21134,7 +20627,7 @@
|
|
|
21134
20627
|
};
|
|
21135
20628
|
var DSConnected = ComponentWrapper$1(connect(mapStateToProps$3, mapDispatchToProps$2)(DataSearch), {
|
|
21136
20629
|
componentType: constants_1$1.dataSearch,
|
|
21137
|
-
internalComponent:
|
|
20630
|
+
internalComponent: DataSearch.hasInternalComponent()
|
|
21138
20631
|
});
|
|
21139
20632
|
|
|
21140
20633
|
DataSearch.install = function (Vue) {
|
|
@@ -21242,8 +20735,9 @@
|
|
|
21242
20735
|
var getQueryOptions$1 = lib_8.getQueryOptions,
|
|
21243
20736
|
checkValueChange$1 = lib_8.checkValueChange,
|
|
21244
20737
|
getClassName$4 = lib_8.getClassName,
|
|
21245
|
-
|
|
21246
|
-
|
|
20738
|
+
isEqual$5 = lib_8.isEqual,
|
|
20739
|
+
extractQueryFromCustomQuery$2 = lib_8.extractQueryFromCustomQuery,
|
|
20740
|
+
getOptionsForCustomQuery$2 = lib_8.getOptionsForCustomQuery;
|
|
21247
20741
|
var SingleList = {
|
|
21248
20742
|
name: 'SingleList',
|
|
21249
20743
|
props: {
|
|
@@ -21480,22 +20974,22 @@
|
|
|
21480
20974
|
checkValueChange$1(props.componentId, value, props.beforeValueChange, performUpdate);
|
|
21481
20975
|
},
|
|
21482
20976
|
updateDefaultQueryHandler: function updateDefaultQueryHandler(value, props) {
|
|
21483
|
-
var defaultQueryOptions;
|
|
21484
20977
|
var query = SingleList.defaultQuery(value, props);
|
|
21485
20978
|
|
|
21486
20979
|
if (this.defaultQuery) {
|
|
21487
20980
|
var defaultQueryToBeSet = this.defaultQuery(value, props) || {};
|
|
20981
|
+
var defaultQueryObj = extractQueryFromCustomQuery$2(defaultQueryToBeSet);
|
|
21488
20982
|
|
|
21489
|
-
if (
|
|
21490
|
-
query =
|
|
21491
|
-
}
|
|
20983
|
+
if (defaultQueryObj) {
|
|
20984
|
+
query = defaultQueryObj;
|
|
20985
|
+
} // Update calculated default query in store
|
|
21492
20986
|
|
|
21493
|
-
defaultQueryOptions = getOptionsFromQuery$2(defaultQueryToBeSet); // Update calculated default query in store
|
|
21494
20987
|
|
|
21495
20988
|
updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
|
|
20989
|
+
var defaultQueryOptions = getOptionsForCustomQuery$2(defaultQueryToBeSet);
|
|
20990
|
+
this.setQueryOptions(this.internalComponent, defaultQueryOptions, false);
|
|
21496
20991
|
}
|
|
21497
20992
|
|
|
21498
|
-
this.setQueryOptions(this.internalComponent, defaultQueryOptions, false);
|
|
21499
20993
|
this.updateQuery({
|
|
21500
20994
|
componentId: this.internalComponent,
|
|
21501
20995
|
query: query,
|
|
@@ -21506,17 +21000,15 @@
|
|
|
21506
21000
|
updateQueryHandler: function updateQueryHandler(value, props) {
|
|
21507
21001
|
var customQuery = props.customQuery;
|
|
21508
21002
|
var query = SingleList.defaultQuery(value, props);
|
|
21509
|
-
var customQueryOptions;
|
|
21510
21003
|
|
|
21511
21004
|
if (customQuery) {
|
|
21512
|
-
var
|
|
21513
|
-
|
|
21514
|
-
|
|
21515
|
-
customQueryOptions = getOptionsFromQuery$2(customQuery(value, props));
|
|
21005
|
+
var customQueryCalc = customQuery(value, props);
|
|
21006
|
+
query = extractQueryFromCustomQuery$2(customQueryCalc);
|
|
21007
|
+
var customQueryOptions = getOptionsForCustomQuery$2(customQueryCalc);
|
|
21516
21008
|
updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
21009
|
+
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
21517
21010
|
}
|
|
21518
21011
|
|
|
21519
|
-
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
21520
21012
|
this.updateQuery({
|
|
21521
21013
|
componentId: props.componentId,
|
|
21522
21014
|
query: query,
|
|
@@ -21536,7 +21028,7 @@
|
|
|
21536
21028
|
|
|
21537
21029
|
if (props.defaultQuery) {
|
|
21538
21030
|
var value = this.$data.currentValue;
|
|
21539
|
-
var defaultQueryOptions =
|
|
21031
|
+
var defaultQueryOptions = getOptionsForCustomQuery$2(props.defaultQuery(value, props));
|
|
21540
21032
|
this.setQueryOptions(this.internalComponent, _extends({}, queryOptions, defaultQueryOptions));
|
|
21541
21033
|
} else {
|
|
21542
21034
|
this.setQueryOptions(this.internalComponent, queryOptions);
|
|
@@ -21681,6 +21173,10 @@
|
|
|
21681
21173
|
return query;
|
|
21682
21174
|
};
|
|
21683
21175
|
|
|
21176
|
+
SingleList.hasInternalComponent = function () {
|
|
21177
|
+
return true;
|
|
21178
|
+
};
|
|
21179
|
+
|
|
21684
21180
|
var mapStateToProps$4 = function mapStateToProps(state, props) {
|
|
21685
21181
|
return {
|
|
21686
21182
|
options: props.nestedField && state.aggregations[props.componentId] ? state.aggregations[props.componentId].reactivesearch_nested : state.aggregations[props.componentId],
|
|
@@ -21702,7 +21198,7 @@
|
|
|
21702
21198
|
};
|
|
21703
21199
|
var ListConnected = ComponentWrapper$1(connect(mapStateToProps$4, mapDispatchtoProps$2)(SingleList), {
|
|
21704
21200
|
componentType: constants_1$1.singleList,
|
|
21705
|
-
internalComponent:
|
|
21201
|
+
internalComponent: SingleList.hasInternalComponent()
|
|
21706
21202
|
});
|
|
21707
21203
|
|
|
21708
21204
|
SingleList.install = function (Vue) {
|
|
@@ -21720,7 +21216,8 @@
|
|
|
21720
21216
|
getQueryOptions$2 = lib_8.getQueryOptions,
|
|
21721
21217
|
checkValueChange$2 = lib_8.checkValueChange,
|
|
21722
21218
|
getClassName$5 = lib_8.getClassName,
|
|
21723
|
-
|
|
21219
|
+
extractQueryFromCustomQuery$3 = lib_8.extractQueryFromCustomQuery,
|
|
21220
|
+
getOptionsForCustomQuery$3 = lib_8.getOptionsForCustomQuery;
|
|
21724
21221
|
var MultiList = {
|
|
21725
21222
|
name: 'MultiList',
|
|
21726
21223
|
props: {
|
|
@@ -21747,7 +21244,7 @@
|
|
|
21747
21244
|
showCount: VueTypes.bool.def(true),
|
|
21748
21245
|
showFilter: VueTypes.bool.def(true),
|
|
21749
21246
|
showSearch: VueTypes.bool.def(true),
|
|
21750
|
-
size: VueTypes.number
|
|
21247
|
+
size: VueTypes.number,
|
|
21751
21248
|
sortBy: VueTypes.oneOf(['asc', 'desc', 'count']).def('count'),
|
|
21752
21249
|
title: types.title,
|
|
21753
21250
|
URLParams: VueTypes.bool.def(false),
|
|
@@ -22034,22 +21531,22 @@
|
|
|
22034
21531
|
checkValueChange$2(props.componentId, finalValues, props.beforeValueChange, performUpdate);
|
|
22035
21532
|
},
|
|
22036
21533
|
updateDefaultQueryHandler: function updateDefaultQueryHandler(value, props) {
|
|
22037
|
-
var defaultQueryOptions;
|
|
22038
21534
|
var query = MultiList.defaultQuery(value, props);
|
|
22039
21535
|
|
|
22040
21536
|
if (this.defaultQuery) {
|
|
22041
21537
|
var defaultQueryToBeSet = this.defaultQuery(value, props) || {};
|
|
21538
|
+
var defaultQueryObj = extractQueryFromCustomQuery$3(defaultQueryToBeSet);
|
|
22042
21539
|
|
|
22043
|
-
if (
|
|
22044
|
-
query =
|
|
22045
|
-
}
|
|
21540
|
+
if (defaultQueryObj) {
|
|
21541
|
+
query = defaultQueryObj;
|
|
21542
|
+
} // Update calculated default query in store
|
|
22046
21543
|
|
|
22047
|
-
defaultQueryOptions = getOptionsFromQuery$3(defaultQueryToBeSet); // Update calculated default query in store
|
|
22048
21544
|
|
|
22049
21545
|
updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
|
|
21546
|
+
var defaultQueryOptions = getOptionsForCustomQuery$3(defaultQueryToBeSet);
|
|
21547
|
+
this.setQueryOptions(this.internalComponent, defaultQueryOptions, false);
|
|
22050
21548
|
}
|
|
22051
21549
|
|
|
22052
|
-
this.setQueryOptions(this.internalComponent, defaultQueryOptions, false);
|
|
22053
21550
|
this.updateQuery({
|
|
22054
21551
|
componentId: this.internalComponent,
|
|
22055
21552
|
query: query,
|
|
@@ -22060,17 +21557,15 @@
|
|
|
22060
21557
|
updateQueryHandler: function updateQueryHandler(value, props) {
|
|
22061
21558
|
var customQuery = props.customQuery;
|
|
22062
21559
|
var query = MultiList.defaultQuery(value, props);
|
|
22063
|
-
var customQueryOptions;
|
|
22064
21560
|
|
|
22065
21561
|
if (customQuery) {
|
|
22066
|
-
var
|
|
22067
|
-
|
|
22068
|
-
query = _ref.query;
|
|
22069
|
-
customQueryOptions = getOptionsFromQuery$3(customQuery(value, props));
|
|
21562
|
+
var customQueryCalc = customQuery(value, props);
|
|
21563
|
+
query = extractQueryFromCustomQuery$3(customQueryCalc);
|
|
22070
21564
|
updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
21565
|
+
var customQueryOptions = getOptionsForCustomQuery$3(customQueryCalc);
|
|
21566
|
+
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
22071
21567
|
}
|
|
22072
21568
|
|
|
22073
|
-
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
22074
21569
|
this.updateQuery({
|
|
22075
21570
|
componentId: props.componentId,
|
|
22076
21571
|
query: query,
|
|
@@ -22090,7 +21585,7 @@
|
|
|
22090
21585
|
|
|
22091
21586
|
if (props.defaultQuery) {
|
|
22092
21587
|
var value = Object.keys(this.$data.currentValue);
|
|
22093
|
-
var defaultQueryOptions =
|
|
21588
|
+
var defaultQueryOptions = getOptionsForCustomQuery$3(props.defaultQuery(value, props));
|
|
22094
21589
|
this.setQueryOptions(this.internalComponent, _extends({}, queryOptions, defaultQueryOptions));
|
|
22095
21590
|
} else {
|
|
22096
21591
|
this.setQueryOptions(this.internalComponent, queryOptions);
|
|
@@ -22176,7 +21671,13 @@
|
|
|
22176
21671
|
|
|
22177
21672
|
MultiList.defaultQuery = function (value, props) {
|
|
22178
21673
|
var query = null;
|
|
22179
|
-
var
|
|
21674
|
+
var queryFormat = props.queryFormat;
|
|
21675
|
+
|
|
21676
|
+
if (queryFormat === undefined) {
|
|
21677
|
+
queryFormat = 'or';
|
|
21678
|
+
}
|
|
21679
|
+
|
|
21680
|
+
var type = queryFormat === 'or' ? 'terms' : 'term';
|
|
22180
21681
|
|
|
22181
21682
|
if (!Array.isArray(value) || value.length === 0) {
|
|
22182
21683
|
return null;
|
|
@@ -22197,14 +21698,14 @@
|
|
|
22197
21698
|
} else if (value) {
|
|
22198
21699
|
var listQuery;
|
|
22199
21700
|
|
|
22200
|
-
if (
|
|
21701
|
+
if (queryFormat === 'or') {
|
|
22201
21702
|
if (props.showMissing) {
|
|
22202
|
-
var _type,
|
|
21703
|
+
var _type, _ref;
|
|
22203
21704
|
|
|
22204
21705
|
var hasMissingTerm = value.includes(props.missingLabel);
|
|
22205
|
-
var should = [(
|
|
21706
|
+
var should = [(_ref = {}, _ref[type] = (_type = {}, _type[props.dataField] = value.filter(function (item) {
|
|
22206
21707
|
return item !== props.missingLabel;
|
|
22207
|
-
}), _type),
|
|
21708
|
+
}), _type), _ref)];
|
|
22208
21709
|
|
|
22209
21710
|
if (hasMissingTerm) {
|
|
22210
21711
|
should = should.concat({
|
|
@@ -22231,9 +21732,9 @@
|
|
|
22231
21732
|
} else {
|
|
22232
21733
|
// adds a sub-query with must as an array of objects for each term/value
|
|
22233
21734
|
var queryArray = value.map(function (item) {
|
|
22234
|
-
var _type3,
|
|
21735
|
+
var _type3, _ref2;
|
|
22235
21736
|
|
|
22236
|
-
return
|
|
21737
|
+
return _ref2 = {}, _ref2[type] = (_type3 = {}, _type3[props.dataField] = item, _type3), _ref2;
|
|
22237
21738
|
});
|
|
22238
21739
|
listQuery = {
|
|
22239
21740
|
bool: {
|
|
@@ -22283,9 +21784,14 @@
|
|
|
22283
21784
|
setCustomQuery: setCustomQuery$2,
|
|
22284
21785
|
setDefaultQuery: setDefaultQuery$3
|
|
22285
21786
|
};
|
|
21787
|
+
|
|
21788
|
+
MultiList.hasInternalComponent = function () {
|
|
21789
|
+
return true;
|
|
21790
|
+
};
|
|
21791
|
+
|
|
22286
21792
|
var ListConnected$1 = ComponentWrapper$1(connect(mapStateToProps$5, mapDispatchtoProps$3)(MultiList), {
|
|
22287
21793
|
componentType: constants_1$1.multiList,
|
|
22288
|
-
internalComponent:
|
|
21794
|
+
internalComponent: MultiList.hasInternalComponent()
|
|
22289
21795
|
});
|
|
22290
21796
|
|
|
22291
21797
|
MultiList.install = function (Vue) {
|
|
@@ -22612,9 +22118,10 @@
|
|
|
22612
22118
|
checkValueChange$3 = lib_8.checkValueChange,
|
|
22613
22119
|
checkPropChange$1 = lib_8.checkPropChange,
|
|
22614
22120
|
getClassName$7 = lib_8.getClassName,
|
|
22615
|
-
getOptionsFromQuery$4 = lib_8.getOptionsFromQuery,
|
|
22616
22121
|
isEqual$7 = lib_8.isEqual,
|
|
22617
|
-
getCompositeAggsQuery$2 = lib_8.getCompositeAggsQuery
|
|
22122
|
+
getCompositeAggsQuery$2 = lib_8.getCompositeAggsQuery,
|
|
22123
|
+
extractQueryFromCustomQuery$4 = lib_8.extractQueryFromCustomQuery,
|
|
22124
|
+
getOptionsForCustomQuery$4 = lib_8.getOptionsForCustomQuery;
|
|
22618
22125
|
var SingleDropdownList = {
|
|
22619
22126
|
name: 'SingleDropdownList',
|
|
22620
22127
|
data: function data() {
|
|
@@ -22651,7 +22158,7 @@
|
|
|
22651
22158
|
selectAllLabel: types.string,
|
|
22652
22159
|
showCount: VueTypes.bool.def(true),
|
|
22653
22160
|
showFilter: VueTypes.bool.def(true),
|
|
22654
|
-
size: VueTypes.number
|
|
22161
|
+
size: VueTypes.number,
|
|
22655
22162
|
sortBy: VueTypes.oneOf(['asc', 'desc', 'count']).def('count'),
|
|
22656
22163
|
title: types.title,
|
|
22657
22164
|
URLParams: VueTypes.bool.def(false),
|
|
@@ -22863,22 +22370,22 @@
|
|
|
22863
22370
|
}
|
|
22864
22371
|
},
|
|
22865
22372
|
updateDefaultQueryHandler: function updateDefaultQueryHandler(value, props) {
|
|
22866
|
-
var defaultQueryOptions;
|
|
22867
22373
|
var query = SingleDropdownList.defaultQuery(value, props);
|
|
22868
22374
|
|
|
22869
22375
|
if (this.defaultQuery) {
|
|
22870
22376
|
var defaultQueryToBeSet = this.defaultQuery(value, props) || {};
|
|
22377
|
+
var defaultQueryObj = extractQueryFromCustomQuery$4(defaultQueryToBeSet);
|
|
22871
22378
|
|
|
22872
|
-
if (
|
|
22873
|
-
query =
|
|
22874
|
-
}
|
|
22379
|
+
if (defaultQueryObj) {
|
|
22380
|
+
query = defaultQueryObj;
|
|
22381
|
+
} // Update calculated default query in store
|
|
22875
22382
|
|
|
22876
|
-
defaultQueryOptions = getOptionsFromQuery$4(defaultQueryToBeSet); // Update calculated default query in store
|
|
22877
22383
|
|
|
22878
22384
|
updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
|
|
22385
|
+
var defaultQueryOptions = getOptionsForCustomQuery$4(defaultQueryToBeSet);
|
|
22386
|
+
this.setQueryOptions(this.internalComponent, defaultQueryOptions, false);
|
|
22879
22387
|
}
|
|
22880
22388
|
|
|
22881
|
-
this.setQueryOptions(this.internalComponent, defaultQueryOptions, false);
|
|
22882
22389
|
this.updateQuery({
|
|
22883
22390
|
componentId: this.internalComponent,
|
|
22884
22391
|
query: query,
|
|
@@ -22889,17 +22396,15 @@
|
|
|
22889
22396
|
updateQueryHandler: function updateQueryHandler(value, props) {
|
|
22890
22397
|
var customQuery = props.customQuery;
|
|
22891
22398
|
var query = SingleDropdownList.defaultQuery(value, props);
|
|
22892
|
-
var customQueryOptions;
|
|
22893
22399
|
|
|
22894
22400
|
if (customQuery) {
|
|
22895
|
-
var
|
|
22896
|
-
|
|
22897
|
-
query = _ref.query;
|
|
22898
|
-
customQueryOptions = getOptionsFromQuery$4(customQuery(value, props));
|
|
22401
|
+
var customQueryCalc = customQuery(value, props);
|
|
22402
|
+
query = extractQueryFromCustomQuery$4(customQueryCalc);
|
|
22899
22403
|
updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
22404
|
+
var customQueryOptions = getOptionsForCustomQuery$4(customQueryCalc);
|
|
22405
|
+
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
22900
22406
|
}
|
|
22901
22407
|
|
|
22902
|
-
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
22903
22408
|
this.updateQuery({
|
|
22904
22409
|
componentId: props.componentId,
|
|
22905
22410
|
query: query,
|
|
@@ -22933,7 +22438,7 @@
|
|
|
22933
22438
|
|
|
22934
22439
|
if (props.defaultQuery) {
|
|
22935
22440
|
var value = this.$data.currentValue;
|
|
22936
|
-
var defaultQueryOptions =
|
|
22441
|
+
var defaultQueryOptions = getOptionsForCustomQuery$4(props.defaultQuery(value, props));
|
|
22937
22442
|
this.setQueryOptions(this.internalComponent, _extends({}, queryOptions, defaultQueryOptions));
|
|
22938
22443
|
} else {
|
|
22939
22444
|
this.setQueryOptions(this.internalComponent, queryOptions);
|
|
@@ -23025,6 +22530,10 @@
|
|
|
23025
22530
|
}) : getAggsQuery(queryOptions, props);
|
|
23026
22531
|
};
|
|
23027
22532
|
|
|
22533
|
+
SingleDropdownList.hasInternalComponent = function () {
|
|
22534
|
+
return true;
|
|
22535
|
+
};
|
|
22536
|
+
|
|
23028
22537
|
var mapStateToProps$6 = function mapStateToProps(state, props) {
|
|
23029
22538
|
return {
|
|
23030
22539
|
options: props.nestedField && state.aggregations[props.componentId] ? state.aggregations[props.componentId].reactivesearch_nested : state.aggregations[props.componentId],
|
|
@@ -23046,7 +22555,7 @@
|
|
|
23046
22555
|
};
|
|
23047
22556
|
var ListConnected$2 = ComponentWrapper$1(connect(mapStateToProps$6, mapDispatchtoProps$4)(SingleDropdownList), {
|
|
23048
22557
|
componentType: constants_1$1.singleDropdownList,
|
|
23049
|
-
internalComponent:
|
|
22558
|
+
internalComponent: SingleDropdownList.hasInternalComponent()
|
|
23050
22559
|
});
|
|
23051
22560
|
|
|
23052
22561
|
SingleDropdownList.install = function (Vue) {
|
|
@@ -23065,8 +22574,9 @@
|
|
|
23065
22574
|
checkValueChange$4 = lib_8.checkValueChange,
|
|
23066
22575
|
checkPropChange$2 = lib_8.checkPropChange,
|
|
23067
22576
|
getClassName$8 = lib_8.getClassName,
|
|
23068
|
-
|
|
23069
|
-
|
|
22577
|
+
getCompositeAggsQuery$3 = lib_8.getCompositeAggsQuery,
|
|
22578
|
+
extractQueryFromCustomQuery$5 = lib_8.extractQueryFromCustomQuery,
|
|
22579
|
+
getOptionsForCustomQuery$5 = lib_8.getOptionsForCustomQuery;
|
|
23070
22580
|
var MultiDropdownList = {
|
|
23071
22581
|
name: 'MultiDropdownList',
|
|
23072
22582
|
data: function data() {
|
|
@@ -23104,7 +22614,7 @@
|
|
|
23104
22614
|
selectAllLabel: types.string,
|
|
23105
22615
|
showCount: VueTypes.bool.def(true),
|
|
23106
22616
|
showFilter: VueTypes.bool.def(true),
|
|
23107
|
-
size: VueTypes.number
|
|
22617
|
+
size: VueTypes.number,
|
|
23108
22618
|
sortBy: VueTypes.oneOf(['asc', 'desc', 'count']).def('count'),
|
|
23109
22619
|
title: types.title,
|
|
23110
22620
|
URLParams: VueTypes.bool.def(false),
|
|
@@ -23390,22 +22900,22 @@
|
|
|
23390
22900
|
checkValueChange$4(props.componentId, finalValues, props.beforeValueChange, performUpdate);
|
|
23391
22901
|
},
|
|
23392
22902
|
updateDefaultQueryHandler: function updateDefaultQueryHandler(value, props) {
|
|
23393
|
-
var defaultQueryOptions;
|
|
23394
22903
|
var query = MultiDropdownList.defaultQuery(value, props);
|
|
23395
22904
|
|
|
23396
22905
|
if (this.defaultQuery) {
|
|
23397
22906
|
var defaultQueryToBeSet = this.defaultQuery(value, props) || {};
|
|
22907
|
+
var defaultQueryObj = extractQueryFromCustomQuery$5(defaultQueryToBeSet);
|
|
23398
22908
|
|
|
23399
|
-
if (
|
|
23400
|
-
query =
|
|
23401
|
-
}
|
|
22909
|
+
if (defaultQueryObj) {
|
|
22910
|
+
query = defaultQueryObj;
|
|
22911
|
+
} // Update calculated default query in store
|
|
23402
22912
|
|
|
23403
|
-
defaultQueryOptions = getOptionsFromQuery$5(defaultQueryToBeSet); // Update calculated default query in store
|
|
23404
22913
|
|
|
23405
22914
|
updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
|
|
22915
|
+
var defaultQueryOptions = getOptionsForCustomQuery$5(defaultQueryToBeSet);
|
|
22916
|
+
this.setQueryOptions(this.internalComponent, defaultQueryOptions, false);
|
|
23406
22917
|
}
|
|
23407
22918
|
|
|
23408
|
-
this.setQueryOptions(this.internalComponent, defaultQueryOptions, false);
|
|
23409
22919
|
this.updateQuery({
|
|
23410
22920
|
componentId: this.internalComponent,
|
|
23411
22921
|
query: query,
|
|
@@ -23416,17 +22926,15 @@
|
|
|
23416
22926
|
updateQueryHandler: function updateQueryHandler(value, props) {
|
|
23417
22927
|
var customQuery = props.customQuery;
|
|
23418
22928
|
var query = MultiDropdownList.defaultQuery(value, props);
|
|
23419
|
-
var customQueryOptions;
|
|
23420
22929
|
|
|
23421
22930
|
if (customQuery) {
|
|
23422
|
-
var
|
|
23423
|
-
|
|
23424
|
-
query = _ref.query;
|
|
23425
|
-
customQueryOptions = getOptionsFromQuery$5(customQuery(value, props));
|
|
22931
|
+
var customQueryCalc = customQuery(value, props);
|
|
22932
|
+
query = extractQueryFromCustomQuery$5(customQueryCalc);
|
|
23426
22933
|
updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
22934
|
+
var customQueryOptions = getOptionsForCustomQuery$5(customQueryCalc);
|
|
22935
|
+
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
23427
22936
|
}
|
|
23428
22937
|
|
|
23429
|
-
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
23430
22938
|
this.updateQuery({
|
|
23431
22939
|
componentId: props.componentId,
|
|
23432
22940
|
query: query,
|
|
@@ -23460,7 +22968,7 @@
|
|
|
23460
22968
|
|
|
23461
22969
|
if (props.defaultQuery) {
|
|
23462
22970
|
var value = Object.keys(this.$data.currentValue);
|
|
23463
|
-
var defaultQueryOptions =
|
|
22971
|
+
var defaultQueryOptions = getOptionsForCustomQuery$5(props.defaultQuery(value, props));
|
|
23464
22972
|
this.setQueryOptions(this.internalComponent, _extends({}, queryOptions, defaultQueryOptions));
|
|
23465
22973
|
} else {
|
|
23466
22974
|
this.setQueryOptions(this.internalComponent, queryOptions);
|
|
@@ -23496,7 +23004,13 @@
|
|
|
23496
23004
|
|
|
23497
23005
|
MultiDropdownList.defaultQuery = function (value, props) {
|
|
23498
23006
|
var query = null;
|
|
23499
|
-
var
|
|
23007
|
+
var queryFormat = props.queryFormat;
|
|
23008
|
+
|
|
23009
|
+
if (queryFormat === undefined) {
|
|
23010
|
+
queryFormat = 'or';
|
|
23011
|
+
}
|
|
23012
|
+
|
|
23013
|
+
var type = queryFormat === 'or' ? 'terms' : 'term';
|
|
23500
23014
|
|
|
23501
23015
|
if (!Array.isArray(value) || value.length === 0) {
|
|
23502
23016
|
return null;
|
|
@@ -23517,14 +23031,14 @@
|
|
|
23517
23031
|
} else if (value) {
|
|
23518
23032
|
var listQuery;
|
|
23519
23033
|
|
|
23520
|
-
if (
|
|
23034
|
+
if (queryFormat === 'or') {
|
|
23521
23035
|
if (props.showMissing) {
|
|
23522
|
-
var _type,
|
|
23036
|
+
var _type, _ref;
|
|
23523
23037
|
|
|
23524
23038
|
var hasMissingTerm = value.includes(props.missingLabel);
|
|
23525
|
-
var should = [(
|
|
23039
|
+
var should = [(_ref = {}, _ref[type] = (_type = {}, _type[props.dataField] = value.filter(function (item) {
|
|
23526
23040
|
return item !== props.missingLabel;
|
|
23527
|
-
}), _type),
|
|
23041
|
+
}), _type), _ref)];
|
|
23528
23042
|
|
|
23529
23043
|
if (hasMissingTerm) {
|
|
23530
23044
|
should = should.concat({
|
|
@@ -23551,9 +23065,9 @@
|
|
|
23551
23065
|
} else {
|
|
23552
23066
|
// adds a sub-query with must as an array of objects for each term/value
|
|
23553
23067
|
var queryArray = value.map(function (item) {
|
|
23554
|
-
var _type3,
|
|
23068
|
+
var _type3, _ref2;
|
|
23555
23069
|
|
|
23556
|
-
return
|
|
23070
|
+
return _ref2 = {}, _ref2[type] = (_type3 = {}, _type3[props.dataField] = item, _type3), _ref2;
|
|
23557
23071
|
});
|
|
23558
23072
|
listQuery = {
|
|
23559
23073
|
bool: {
|
|
@@ -23588,6 +23102,10 @@
|
|
|
23588
23102
|
}) : getAggsQuery(queryOptions, props);
|
|
23589
23103
|
};
|
|
23590
23104
|
|
|
23105
|
+
MultiDropdownList.hasInternalComponent = function () {
|
|
23106
|
+
return true;
|
|
23107
|
+
};
|
|
23108
|
+
|
|
23591
23109
|
var mapStateToProps$7 = function mapStateToProps(state, props) {
|
|
23592
23110
|
return {
|
|
23593
23111
|
options: props.nestedField && state.aggregations[props.componentId] ? state.aggregations[props.componentId].reactivesearch_nested : state.aggregations[props.componentId],
|
|
@@ -23609,7 +23127,7 @@
|
|
|
23609
23127
|
};
|
|
23610
23128
|
var ListConnected$3 = ComponentWrapper$1(connect(mapStateToProps$7, mapDispatchtoProps$5)(MultiDropdownList), {
|
|
23611
23129
|
componentType: constants_1$1.multiDropdownList,
|
|
23612
|
-
internalComponent:
|
|
23130
|
+
internalComponent: MultiDropdownList.hasInternalComponent()
|
|
23613
23131
|
});
|
|
23614
23132
|
|
|
23615
23133
|
MultiDropdownList.install = function (Vue) {
|
|
@@ -23625,7 +23143,7 @@
|
|
|
23625
23143
|
var isEqual$9 = lib_8.isEqual,
|
|
23626
23144
|
checkValueChange$5 = lib_8.checkValueChange,
|
|
23627
23145
|
getClassName$9 = lib_8.getClassName,
|
|
23628
|
-
getOptionsFromQuery
|
|
23146
|
+
getOptionsFromQuery = lib_8.getOptionsFromQuery,
|
|
23629
23147
|
handleA11yAction$1 = lib_8.handleA11yAction;
|
|
23630
23148
|
var ToggleButton = {
|
|
23631
23149
|
name: 'ToggleButton',
|
|
@@ -23791,7 +23309,7 @@
|
|
|
23791
23309
|
var _ref = customQuery(value, props) || {};
|
|
23792
23310
|
|
|
23793
23311
|
query = _ref.query;
|
|
23794
|
-
this.setQueryOptions(props.componentId, getOptionsFromQuery
|
|
23312
|
+
this.setQueryOptions(props.componentId, getOptionsFromQuery(customQuery(value, props)), false);
|
|
23795
23313
|
updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
23796
23314
|
}
|
|
23797
23315
|
|
|
@@ -23949,10 +23467,7 @@
|
|
|
23949
23467
|
|
|
23950
23468
|
ToggleButton.componentType = constants_1$1.toggleButton;
|
|
23951
23469
|
|
|
23952
|
-
var _excluded = ["options"]
|
|
23953
|
-
_excluded2 = ["query"],
|
|
23954
|
-
_excluded3 = ["query"],
|
|
23955
|
-
_excluded4 = ["query"];
|
|
23470
|
+
var _excluded = ["options"];
|
|
23956
23471
|
var updateQuery$7 = lib_5.updateQuery,
|
|
23957
23472
|
setQueryOptions$7 = lib_5.setQueryOptions,
|
|
23958
23473
|
setCustomQuery$6 = lib_5.setCustomQuery,
|
|
@@ -23960,15 +23475,16 @@
|
|
|
23960
23475
|
var parseHits$1 = lib_8.parseHits,
|
|
23961
23476
|
isEqual$a = lib_8.isEqual,
|
|
23962
23477
|
getCompositeAggsQuery$4 = lib_8.getCompositeAggsQuery,
|
|
23963
|
-
|
|
23964
|
-
|
|
23478
|
+
getResultStats$2 = lib_8.getResultStats,
|
|
23479
|
+
extractQueryFromCustomQuery$6 = lib_8.extractQueryFromCustomQuery,
|
|
23480
|
+
getOptionsForCustomQuery$6 = lib_8.getOptionsForCustomQuery;
|
|
23965
23481
|
var ReactiveComponent = {
|
|
23966
23482
|
name: 'ReactiveComponent',
|
|
23967
23483
|
props: {
|
|
23968
23484
|
componentId: types.stringRequired,
|
|
23969
23485
|
aggregationField: types.string,
|
|
23970
23486
|
aggregationSize: VueTypes.number,
|
|
23971
|
-
size: VueTypes.number
|
|
23487
|
+
size: VueTypes.number,
|
|
23972
23488
|
defaultQuery: types.func,
|
|
23973
23489
|
customQuery: types.func,
|
|
23974
23490
|
filterLabel: types.string,
|
|
@@ -24010,25 +23526,16 @@
|
|
|
24010
23526
|
|
|
24011
23527
|
if (customQuery) {
|
|
24012
23528
|
var calcCustomQuery = customQuery(this.selectedValue, props);
|
|
24013
|
-
|
|
24014
|
-
var
|
|
24015
|
-
query = _ref.query;
|
|
24016
|
-
|
|
24017
|
-
var customQueryOptions = calcCustomQuery ? getOptionsFromQuery$7(calcCustomQuery) : null;
|
|
23529
|
+
var query = extractQueryFromCustomQuery$6(calcCustomQuery);
|
|
23530
|
+
var customQueryOptions = calcCustomQuery ? getOptionsForCustomQuery$6(calcCustomQuery) : null;
|
|
24018
23531
|
|
|
24019
23532
|
if (customQueryOptions) {
|
|
24020
23533
|
this.setQueryOptions(componentId, _extends({}, customQueryOptions, this.getAggsQuery()), false);
|
|
24021
23534
|
} else this.setQueryOptions(componentId, this.getAggsQuery(), false);
|
|
24022
23535
|
|
|
24023
|
-
var queryToSet = query || null;
|
|
24024
|
-
|
|
24025
|
-
if (calcCustomQuery && calcCustomQuery.id) {
|
|
24026
|
-
queryToSet = calcCustomQuery;
|
|
24027
|
-
}
|
|
24028
|
-
|
|
24029
23536
|
this.updateQuery({
|
|
24030
23537
|
componentId: componentId,
|
|
24031
|
-
query:
|
|
23538
|
+
query: query,
|
|
24032
23539
|
value: this.selectedValue || null,
|
|
24033
23540
|
label: filterLabel,
|
|
24034
23541
|
showFilter: showFilter,
|
|
@@ -24036,36 +23543,35 @@
|
|
|
24036
23543
|
});
|
|
24037
23544
|
}
|
|
24038
23545
|
|
|
24039
|
-
this.setQuery = function (
|
|
24040
|
-
var options =
|
|
24041
|
-
obj = _objectWithoutPropertiesLoose(
|
|
23546
|
+
this.setQuery = function (_ref) {
|
|
23547
|
+
var options = _ref.options,
|
|
23548
|
+
obj = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
24042
23549
|
|
|
24043
|
-
|
|
24044
|
-
|
|
23550
|
+
var queryToBeSet = obj.query; // when enableAppbase is true, Backend throws error because of repeated query in request body
|
|
23551
|
+
|
|
23552
|
+
if (queryToBeSet && queryToBeSet.query) {
|
|
23553
|
+
queryToBeSet = queryToBeSet.query;
|
|
24045
23554
|
}
|
|
24046
23555
|
|
|
24047
|
-
var
|
|
23556
|
+
var customQueryCalc = _extends({}, options, {
|
|
23557
|
+
query: queryToBeSet
|
|
23558
|
+
});
|
|
24048
23559
|
|
|
24049
|
-
|
|
24050
|
-
queryToBeSet = obj.query.query;
|
|
24051
|
-
} // Update customQuery field for RS API
|
|
23560
|
+
var rsAPIQuery = customQueryCalc; // handle stored queries
|
|
24052
23561
|
|
|
23562
|
+
if (queryToBeSet && queryToBeSet.id) {
|
|
23563
|
+
rsAPIQuery = queryToBeSet;
|
|
23564
|
+
} // Update customQuery field for RS API
|
|
24053
23565
|
|
|
24054
|
-
if (obj && obj.query || options) {
|
|
24055
|
-
var customQueryCalc = _extends({}, options);
|
|
24056
23566
|
|
|
24057
|
-
|
|
24058
|
-
if (obj.query.id) {
|
|
24059
|
-
customQueryCalc = queryToBeSet;
|
|
24060
|
-
} else {
|
|
24061
|
-
customQueryCalc.query = obj.query;
|
|
24062
|
-
}
|
|
24063
|
-
}
|
|
23567
|
+
_this.setCustomQuery(props.componentId, rsAPIQuery);
|
|
24064
23568
|
|
|
24065
|
-
|
|
23569
|
+
if (options) {
|
|
23570
|
+
_this.setQueryOptions(props.componentId, _extends({}, _this.getAggsQuery(), options), false);
|
|
24066
23571
|
}
|
|
24067
23572
|
|
|
24068
23573
|
_this.updateQuery(_extends({}, obj, {
|
|
23574
|
+
query: customQueryCalc.query,
|
|
24069
23575
|
componentId: props.componentId,
|
|
24070
23576
|
label: props.filterLabel,
|
|
24071
23577
|
showFilter: props.showFilter,
|
|
@@ -24076,29 +23582,22 @@
|
|
|
24076
23582
|
if (props.defaultQuery) {
|
|
24077
23583
|
this.internalComponent = props.componentId + "__internal";
|
|
24078
23584
|
}
|
|
24079
|
-
|
|
24080
|
-
beforeMount: function beforeMount() {
|
|
23585
|
+
|
|
24081
23586
|
if (this.internalComponent && this.$props.defaultQuery) {
|
|
24082
23587
|
updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, this.selectedValue);
|
|
24083
23588
|
this.$defaultQuery = this.$props.defaultQuery(this.selectedValue, this.$props);
|
|
24084
23589
|
|
|
24085
|
-
var
|
|
24086
|
-
|
|
24087
|
-
|
|
23590
|
+
var _query = extractQueryFromCustomQuery$6(this.$defaultQuery);
|
|
23591
|
+
|
|
23592
|
+
var queryOptions = getOptionsForCustomQuery$6(this.$defaultQuery);
|
|
24088
23593
|
|
|
24089
23594
|
if (queryOptions) {
|
|
24090
23595
|
this.setQueryOptions(this.internalComponent, _extends({}, queryOptions, this.getAggsQuery()), false);
|
|
24091
23596
|
} else this.setQueryOptions(this.internalComponent, this.getAggsQuery(), false);
|
|
24092
23597
|
|
|
24093
|
-
var queryToSet = query || null;
|
|
24094
|
-
|
|
24095
|
-
if (!queryToSet && this.$defaultQuery && this.$defaultQuery.id) {
|
|
24096
|
-
queryToSet = this.$defaultQuery;
|
|
24097
|
-
}
|
|
24098
|
-
|
|
24099
23598
|
this.updateQuery({
|
|
24100
23599
|
componentId: this.internalComponent,
|
|
24101
|
-
query:
|
|
23600
|
+
query: _query
|
|
24102
23601
|
});
|
|
24103
23602
|
}
|
|
24104
23603
|
},
|
|
@@ -24146,10 +23645,8 @@
|
|
|
24146
23645
|
defaultQuery: function defaultQuery(newVal, oldVal) {
|
|
24147
23646
|
if (newVal && !isQueryIdentical(newVal, oldVal, this.selectedValue, this.$props)) {
|
|
24148
23647
|
this.$defaultQuery = newVal(this.selectedValue, this.$props);
|
|
24149
|
-
|
|
24150
|
-
var
|
|
24151
|
-
query = _ref4.query,
|
|
24152
|
-
queryOptions = _objectWithoutPropertiesLoose(_ref4, _excluded3);
|
|
23648
|
+
var query = extractQueryFromCustomQuery$6(this.$defaultQuery);
|
|
23649
|
+
var queryOptions = getOptionsForCustomQuery$6(this.$defaultQuery);
|
|
24153
23650
|
|
|
24154
23651
|
if (queryOptions) {
|
|
24155
23652
|
this.setQueryOptions(this.internalComponent, _extends({}, queryOptions, this.getAggsQuery()), false);
|
|
@@ -24157,15 +23654,9 @@
|
|
|
24157
23654
|
|
|
24158
23655
|
|
|
24159
23656
|
updateDefaultQuery(this.componentId, this.setDefaultQuery, this.$props, this.selectedValue);
|
|
24160
|
-
var queryToSet = query || null;
|
|
24161
|
-
|
|
24162
|
-
if (!queryToSet && this.$defaultQuery && this.$defaultQuery.id) {
|
|
24163
|
-
queryToSet = this.$defaultQuery;
|
|
24164
|
-
}
|
|
24165
|
-
|
|
24166
23657
|
this.updateQuery({
|
|
24167
23658
|
componentId: this.internalComponent,
|
|
24168
|
-
query:
|
|
23659
|
+
query: query
|
|
24169
23660
|
});
|
|
24170
23661
|
}
|
|
24171
23662
|
},
|
|
@@ -24173,10 +23664,8 @@
|
|
|
24173
23664
|
if (newVal && !isQueryIdentical(newVal, oldVal, this.selectedValue, this.$props)) {
|
|
24174
23665
|
var componentId = this.$props.componentId;
|
|
24175
23666
|
this.$customQuery = newVal(this.selectedValue, this.$props);
|
|
24176
|
-
|
|
24177
|
-
var
|
|
24178
|
-
query = _ref5.query,
|
|
24179
|
-
queryOptions = _objectWithoutPropertiesLoose(_ref5, _excluded4);
|
|
23667
|
+
var query = extractQueryFromCustomQuery$6(this.$customQuery);
|
|
23668
|
+
var queryOptions = getOptionsForCustomQuery$6(this.$customQuery);
|
|
24180
23669
|
|
|
24181
23670
|
if (queryOptions) {
|
|
24182
23671
|
this.setQueryOptions(componentId, _extends({}, queryOptions, this.getAggsQuery()), false);
|
|
@@ -24184,15 +23673,9 @@
|
|
|
24184
23673
|
|
|
24185
23674
|
|
|
24186
23675
|
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.selectedValue);
|
|
24187
|
-
var queryToSet = query || null;
|
|
24188
|
-
|
|
24189
|
-
if (this.$customQuery && this.$customQuery.id) {
|
|
24190
|
-
queryToSet = this.$customQuery;
|
|
24191
|
-
}
|
|
24192
|
-
|
|
24193
23676
|
this.updateQuery({
|
|
24194
23677
|
componentId: componentId,
|
|
24195
|
-
query:
|
|
23678
|
+
query: query
|
|
24196
23679
|
});
|
|
24197
23680
|
}
|
|
24198
23681
|
}
|
|
@@ -24272,6 +23755,10 @@
|
|
|
24272
23755
|
}
|
|
24273
23756
|
};
|
|
24274
23757
|
|
|
23758
|
+
ReactiveComponent.hasInternalComponent = function (props) {
|
|
23759
|
+
return !!props.defaultQuery;
|
|
23760
|
+
};
|
|
23761
|
+
|
|
24275
23762
|
var mapStateToProps$9 = function mapStateToProps(state, props) {
|
|
24276
23763
|
return {
|
|
24277
23764
|
aggregations: state.aggregations[props.componentId] && state.aggregations[props.componentId] || null,
|
|
@@ -24321,6 +23808,7 @@
|
|
|
24321
23808
|
showClearAll: VueTypes.bool.def(true),
|
|
24322
23809
|
title: types.title,
|
|
24323
23810
|
resetToDefault: VueTypes.bool.def(false),
|
|
23811
|
+
clearAllBlacklistComponents: VueTypes.array,
|
|
24324
23812
|
resetToValues: VueTypes.object
|
|
24325
23813
|
},
|
|
24326
23814
|
inject: {
|
|
@@ -24375,12 +23863,13 @@
|
|
|
24375
23863
|
},
|
|
24376
23864
|
clearValues: function clearValues() {
|
|
24377
23865
|
var resetToDefault = this.resetToDefault,
|
|
24378
|
-
resetToValues = this.resetToValues
|
|
23866
|
+
resetToValues = this.resetToValues,
|
|
23867
|
+
clearAllBlacklistComponents = this.clearAllBlacklistComponents;
|
|
24379
23868
|
|
|
24380
23869
|
if (resetToDefault) {
|
|
24381
|
-
this.resetValuesToDefault();
|
|
23870
|
+
this.resetValuesToDefault(clearAllBlacklistComponents);
|
|
24382
23871
|
} else {
|
|
24383
|
-
this.clearValuesAction(resetToValues);
|
|
23872
|
+
this.clearValuesAction(resetToValues, clearAllBlacklistComponents);
|
|
24384
23873
|
}
|
|
24385
23874
|
|
|
24386
23875
|
this.$emit('clear', resetToValues);
|
|
@@ -24478,7 +23967,7 @@
|
|
|
24478
23967
|
var isEqual$b = lib_8.isEqual,
|
|
24479
23968
|
checkValueChange$6 = lib_8.checkValueChange,
|
|
24480
23969
|
getClassName$b = lib_8.getClassName,
|
|
24481
|
-
getOptionsFromQuery$
|
|
23970
|
+
getOptionsFromQuery$1 = lib_8.getOptionsFromQuery;
|
|
24482
23971
|
var SingleRange = {
|
|
24483
23972
|
name: 'SingleRange',
|
|
24484
23973
|
data: function data() {
|
|
@@ -24608,17 +24097,16 @@
|
|
|
24608
24097
|
updateQueryHandler: function updateQueryHandler(value, props) {
|
|
24609
24098
|
var customQuery = props.customQuery;
|
|
24610
24099
|
var query = SingleRange.defaultQuery(value, props);
|
|
24611
|
-
var customQueryOptions;
|
|
24612
24100
|
|
|
24613
24101
|
if (customQuery) {
|
|
24614
24102
|
var _ref = customQuery(value, props) || {};
|
|
24615
24103
|
|
|
24616
24104
|
query = _ref.query;
|
|
24617
|
-
customQueryOptions = getOptionsFromQuery$
|
|
24105
|
+
var customQueryOptions = getOptionsFromQuery$1(customQuery(value, props));
|
|
24618
24106
|
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
24107
|
+
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
24619
24108
|
}
|
|
24620
24109
|
|
|
24621
|
-
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
24622
24110
|
this.updateQuery({
|
|
24623
24111
|
componentId: props.componentId,
|
|
24624
24112
|
query: query,
|
|
@@ -24706,7 +24194,7 @@
|
|
|
24706
24194
|
var isEqual$c = lib_8.isEqual,
|
|
24707
24195
|
checkValueChange$7 = lib_8.checkValueChange,
|
|
24708
24196
|
getClassName$c = lib_8.getClassName,
|
|
24709
|
-
getOptionsFromQuery$
|
|
24197
|
+
getOptionsFromQuery$2 = lib_8.getOptionsFromQuery;
|
|
24710
24198
|
var MultiRange = {
|
|
24711
24199
|
name: 'MultiRange',
|
|
24712
24200
|
data: function data() {
|
|
@@ -24817,17 +24305,16 @@
|
|
|
24817
24305
|
updateQueryHandler: function updateQueryHandler(value, props) {
|
|
24818
24306
|
var customQuery = props.customQuery;
|
|
24819
24307
|
var query = MultiRange.defaultQuery(value, props);
|
|
24820
|
-
var customQueryOptions;
|
|
24821
24308
|
|
|
24822
24309
|
if (customQuery) {
|
|
24823
24310
|
var _ref = customQuery(value, props) || {};
|
|
24824
24311
|
|
|
24825
24312
|
query = _ref.query;
|
|
24826
|
-
customQueryOptions = getOptionsFromQuery$
|
|
24313
|
+
var customQueryOptions = getOptionsFromQuery$2(customQuery(value, props));
|
|
24827
24314
|
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
24315
|
+
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
24828
24316
|
}
|
|
24829
24317
|
|
|
24830
|
-
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
24831
24318
|
this.updateQuery({
|
|
24832
24319
|
componentId: props.componentId,
|
|
24833
24320
|
query: query,
|
|
@@ -25318,7 +24805,7 @@
|
|
|
25318
24805
|
setCustomQuery$9 = lib_5.setCustomQuery;
|
|
25319
24806
|
var checkValueChange$8 = lib_8.checkValueChange,
|
|
25320
24807
|
getClassName$d = lib_8.getClassName,
|
|
25321
|
-
getOptionsFromQuery$
|
|
24808
|
+
getOptionsFromQuery$3 = lib_8.getOptionsFromQuery,
|
|
25322
24809
|
isEqual$d = lib_8.isEqual;
|
|
25323
24810
|
var RangeSlider = {
|
|
25324
24811
|
name: 'RangeSlider',
|
|
@@ -25408,14 +24895,14 @@
|
|
|
25408
24895
|
updateQueryHandler: function updateQueryHandler(value, props) {
|
|
25409
24896
|
var customQuery = props.customQuery;
|
|
25410
24897
|
var query = RangeSlider.defaultQuery(value, props);
|
|
25411
|
-
var customQueryOptions;
|
|
25412
24898
|
|
|
25413
24899
|
if (customQuery) {
|
|
25414
24900
|
var _ref = customQuery(value, props) || {};
|
|
25415
24901
|
|
|
25416
24902
|
query = _ref.query;
|
|
25417
|
-
customQueryOptions = getOptionsFromQuery$
|
|
24903
|
+
var customQueryOptions = getOptionsFromQuery$3(customQuery(value, props));
|
|
25418
24904
|
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
24905
|
+
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
25419
24906
|
}
|
|
25420
24907
|
|
|
25421
24908
|
var showFilter = props.showFilter,
|
|
@@ -25426,7 +24913,6 @@
|
|
|
25426
24913
|
currentEnd = value[1]; // check if the slider is at its initial position
|
|
25427
24914
|
|
|
25428
24915
|
var isInitialValue = currentStart === start && currentEnd === end;
|
|
25429
|
-
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
25430
24916
|
this.updateQuery({
|
|
25431
24917
|
componentId: props.componentId,
|
|
25432
24918
|
query: query,
|
|
@@ -25600,9 +25086,10 @@
|
|
|
25600
25086
|
updateComponentProps$2 = lib_5.updateComponentProps;
|
|
25601
25087
|
var checkValueChange$9 = lib_8.checkValueChange,
|
|
25602
25088
|
getClassName$e = lib_8.getClassName,
|
|
25603
|
-
getOptionsFromQuery$b = lib_8.getOptionsFromQuery,
|
|
25604
25089
|
isEqual$e = lib_8.isEqual,
|
|
25605
|
-
checkSomePropChange$1 = lib_8.checkSomePropChange
|
|
25090
|
+
checkSomePropChange$1 = lib_8.checkSomePropChange,
|
|
25091
|
+
extractQueryFromCustomQuery$7 = lib_8.extractQueryFromCustomQuery,
|
|
25092
|
+
getOptionsForCustomQuery$7 = lib_8.getOptionsForCustomQuery;
|
|
25606
25093
|
var DynamicRangeSlider = {
|
|
25607
25094
|
name: 'DynamicRangeSlider',
|
|
25608
25095
|
components: getComponents(),
|
|
@@ -25810,28 +25297,31 @@
|
|
|
25810
25297
|
},
|
|
25811
25298
|
updateQueryHandler: function updateQueryHandler(value) {
|
|
25812
25299
|
var query = DynamicRangeSlider.defaultQuery(value, this.$props);
|
|
25813
|
-
var customQueryOptions;
|
|
25814
25300
|
|
|
25815
25301
|
if (this.$props.customQuery) {
|
|
25816
|
-
var
|
|
25302
|
+
var customQueryTobeSet = this.$props.customQuery(value, this.$props);
|
|
25303
|
+
var queryTobeSet = extractQueryFromCustomQuery$7(customQueryTobeSet);
|
|
25304
|
+
|
|
25305
|
+
if (queryTobeSet) {
|
|
25306
|
+
query = queryTobeSet;
|
|
25307
|
+
}
|
|
25817
25308
|
|
|
25818
|
-
|
|
25819
|
-
customQueryOptions = getOptionsFromQuery$b(this.$props.customQuery(value, this.$props));
|
|
25309
|
+
var customQueryOptions = getOptionsForCustomQuery$7(customQueryTobeSet);
|
|
25820
25310
|
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, value);
|
|
25311
|
+
this.setQueryOptions(this.$props.componentId, customQueryOptions, false);
|
|
25821
25312
|
}
|
|
25822
25313
|
|
|
25823
|
-
var
|
|
25314
|
+
var _ref2 = this.range || {
|
|
25824
25315
|
start: value[0],
|
|
25825
25316
|
end: value[1]
|
|
25826
25317
|
},
|
|
25827
|
-
start =
|
|
25828
|
-
end =
|
|
25318
|
+
start = _ref2.start,
|
|
25319
|
+
end = _ref2.end;
|
|
25829
25320
|
|
|
25830
25321
|
var currentStart = value[0],
|
|
25831
25322
|
currentEnd = value[1]; // check if the slider is at its initial position
|
|
25832
25323
|
|
|
25833
25324
|
var isInitialValue = currentStart === start && currentEnd === end;
|
|
25834
|
-
this.setQueryOptions(this.$props.componentId, customQueryOptions, false);
|
|
25835
25325
|
this.updateQuery({
|
|
25836
25326
|
componentId: this.$props.componentId,
|
|
25837
25327
|
query: query,
|
|
@@ -25878,13 +25368,13 @@
|
|
|
25878
25368
|
range: function range(newValue, oldValue) {
|
|
25879
25369
|
if (isEqual$e(newValue, oldValue) || !this.currentValue) return;
|
|
25880
25370
|
|
|
25881
|
-
var
|
|
25882
|
-
currentStart =
|
|
25883
|
-
currentEnd =
|
|
25371
|
+
var _ref3 = this.currentValue || [],
|
|
25372
|
+
currentStart = _ref3[0],
|
|
25373
|
+
currentEnd = _ref3[1];
|
|
25884
25374
|
|
|
25885
|
-
var
|
|
25886
|
-
oldStart =
|
|
25887
|
-
oldEnd =
|
|
25375
|
+
var _ref4 = oldValue || {},
|
|
25376
|
+
oldStart = _ref4.start,
|
|
25377
|
+
oldEnd = _ref4.end;
|
|
25888
25378
|
|
|
25889
25379
|
var newStart = currentStart === oldStart ? newValue.start : currentStart;
|
|
25890
25380
|
var newEnd = currentEnd === oldEnd ? newValue.end : currentEnd;
|
|
@@ -25979,6 +25469,10 @@
|
|
|
25979
25469
|
return [];
|
|
25980
25470
|
};
|
|
25981
25471
|
|
|
25472
|
+
DynamicRangeSlider.hasInternalComponent = function () {
|
|
25473
|
+
return true;
|
|
25474
|
+
};
|
|
25475
|
+
|
|
25982
25476
|
var mapStateToProps$e = function mapStateToProps(state, props) {
|
|
25983
25477
|
var componentId = state.aggregations[props.componentId];
|
|
25984
25478
|
var internalRange = state.aggregations[props.componentId + "__range__internal"];
|
|
@@ -26204,10 +25698,10 @@
|
|
|
26204
25698
|
Vue.component(StateProvider.name, StateProviderConnected);
|
|
26205
25699
|
};
|
|
26206
25700
|
|
|
26207
|
-
var _excluded$5 = ["aggs", "size"]
|
|
25701
|
+
var _excluded$5 = ["aggs", "size"],
|
|
25702
|
+
_excluded2 = ["query"],
|
|
25703
|
+
_excluded3 = ["query"];
|
|
26208
25704
|
var X_SEARCH_CLIENT$1 = 'ReactiveSearch Vue';
|
|
26209
|
-
var componentsWithHighlightQuery = [constants_1$1.dataSearch, constants_1$1.categorySearch];
|
|
26210
|
-
var componentsWithOptions = [constants_1$1.reactiveList, constants_1$1.reactiveMap, constants_1$1.singleList, constants_1$1.multiList, constants_1$1.tagCloud].concat(componentsWithHighlightQuery);
|
|
26211
25705
|
var componentsWithoutFilters = [constants_1$1.numberBox, constants_1$1.ratingsFilter];
|
|
26212
25706
|
var resultComponents = [constants_1$1.reactiveList, constants_1$1.reactiveMap];
|
|
26213
25707
|
|
|
@@ -26241,23 +25735,40 @@
|
|
|
26241
25735
|
}
|
|
26242
25736
|
|
|
26243
25737
|
return value;
|
|
26244
|
-
}
|
|
25738
|
+
} // Returns query DSL with query property and other options
|
|
25739
|
+
|
|
26245
25740
|
|
|
26246
|
-
function
|
|
26247
|
-
// get default query of
|
|
26248
|
-
|
|
26249
|
-
|
|
26250
|
-
|
|
25741
|
+
function getDefaultQuery(component, value) {
|
|
25742
|
+
// get custom or default query of sensor components
|
|
25743
|
+
var currentValue = parseValue(value, component); // get default query of result components
|
|
25744
|
+
|
|
25745
|
+
if (component.defaultQuery) {
|
|
25746
|
+
var defaultQuery = component.defaultQuery(currentValue, component);
|
|
25747
|
+
return _extends({
|
|
25748
|
+
query: helper_11(defaultQuery)
|
|
25749
|
+
}, helper_12(defaultQuery));
|
|
25750
|
+
}
|
|
25751
|
+
|
|
25752
|
+
return component.source.defaultQuery ? {
|
|
25753
|
+
query: component.source.defaultQuery(currentValue, component)
|
|
25754
|
+
} : {};
|
|
25755
|
+
} // Only results the query part
|
|
26251
25756
|
|
|
26252
25757
|
|
|
25758
|
+
function getCustomQuery(component, value) {
|
|
25759
|
+
// get custom or default query of sensor components
|
|
26253
25760
|
var currentValue = parseValue(value, component);
|
|
26254
25761
|
|
|
26255
25762
|
if (component.customQuery) {
|
|
26256
25763
|
var customQuery = component.customQuery(currentValue, component);
|
|
26257
|
-
return
|
|
25764
|
+
return _extends({
|
|
25765
|
+
query: helper_11(customQuery)
|
|
25766
|
+
}, helper_12(customQuery));
|
|
26258
25767
|
}
|
|
26259
25768
|
|
|
26260
|
-
return component.source.defaultQuery ?
|
|
25769
|
+
return component.source.defaultQuery ? {
|
|
25770
|
+
query: component.source.defaultQuery(currentValue, component)
|
|
25771
|
+
} : null;
|
|
26261
25772
|
}
|
|
26262
25773
|
|
|
26263
25774
|
function initReactivesearch(componentCollection, searchState, settings) {
|
|
@@ -26312,6 +25823,11 @@
|
|
|
26312
25823
|
}
|
|
26313
25824
|
});
|
|
26314
25825
|
var isInternalComponentPresent = false;
|
|
25826
|
+
|
|
25827
|
+
if (component.source.hasInternalComponent) {
|
|
25828
|
+
isInternalComponentPresent = component.source.hasInternalComponent(component);
|
|
25829
|
+
}
|
|
25830
|
+
|
|
26315
25831
|
var isResultComponent = resultComponents.includes(componentType);
|
|
26316
25832
|
var internalComponent = component.componentId + "__internal";
|
|
26317
25833
|
var label = component.filterLabel || component.componentId;
|
|
@@ -26343,74 +25859,66 @@
|
|
|
26343
25859
|
|
|
26344
25860
|
if (component.defaultQuery && typeof component.defaultQuery === 'function') {
|
|
26345
25861
|
defaultQueries[component.componentId] = component.defaultQuery(value, compProps);
|
|
26346
|
-
}
|
|
26347
|
-
|
|
26348
|
-
|
|
26349
|
-
if (componentsWithOptions.includes(componentType)) {
|
|
26350
|
-
var options = component.source.generateQueryOptions ? component.source.generateQueryOptions(component) : null;
|
|
26351
|
-
var highlightQuery = {};
|
|
26352
|
-
|
|
26353
|
-
if (componentsWithHighlightQuery.includes(componentType) && component.highlight) {
|
|
26354
|
-
highlightQuery = component.source.highlightQuery(component);
|
|
26355
|
-
}
|
|
25862
|
+
}
|
|
26356
25863
|
|
|
26357
|
-
|
|
26358
|
-
// eslint-disable-next-line
|
|
26359
|
-
var _ref = options || {},
|
|
26360
|
-
aggs = _ref.aggs,
|
|
26361
|
-
size = _ref.size,
|
|
26362
|
-
otherQueryOptions = _objectWithoutPropertiesLoose(_ref, _excluded$5);
|
|
25864
|
+
var componentQueryOptions = {}; // [2] set query options - main component query (valid for result components)
|
|
26363
25865
|
|
|
26364
|
-
|
|
26365
|
-
|
|
26366
|
-
|
|
25866
|
+
if (component && component.source.generateQueryOptions) {
|
|
25867
|
+
componentQueryOptions = _extends({}, componentQueryOptions, component.source.generateQueryOptions(component));
|
|
25868
|
+
}
|
|
26367
25869
|
|
|
26368
|
-
|
|
26369
|
-
type: 'SET_QUERY_OPTIONS',
|
|
26370
|
-
component: internalComponent,
|
|
26371
|
-
options: {
|
|
26372
|
-
aggs: aggs,
|
|
26373
|
-
size: typeof size === 'undefined' ? 100 : size
|
|
26374
|
-
}
|
|
26375
|
-
});
|
|
26376
|
-
} // sort, highlight, size, from - query should be applied on the main component
|
|
25870
|
+
var highlightQuery = {};
|
|
26377
25871
|
|
|
25872
|
+
if (component.source.highlightQuery) {
|
|
25873
|
+
highlightQuery = component.source.highlightQuery(component);
|
|
25874
|
+
}
|
|
26378
25875
|
|
|
26379
|
-
|
|
26380
|
-
|
|
26381
|
-
|
|
25876
|
+
if (componentQueryOptions && Object.keys(componentQueryOptions).length || highlightQuery && Object.keys(highlightQuery).length) {
|
|
25877
|
+
// eslint-disable-next-line
|
|
25878
|
+
var _ref = componentQueryOptions || {},
|
|
25879
|
+
aggs = _ref.aggs,
|
|
25880
|
+
size = _ref.size,
|
|
25881
|
+
otherQueryOptions = _objectWithoutPropertiesLoose(_ref, _excluded$5);
|
|
25882
|
+
|
|
25883
|
+
if (aggs && Object.keys(aggs).length) {
|
|
25884
|
+
isInternalComponentPresent = true;
|
|
25885
|
+
componentQueryOptions = _extends({}, componentQueryOptions, {
|
|
25886
|
+
aggs: aggs,
|
|
25887
|
+
size: typeof size === 'undefined' ? 100 : size
|
|
25888
|
+
});
|
|
25889
|
+
} // sort, highlight, size, from - query should be applied on the main component
|
|
26382
25890
|
|
|
26383
|
-
var mainQueryOptions = _extends({}, otherQueryOptions, highlightQuery, {
|
|
26384
|
-
size: size
|
|
26385
|
-
});
|
|
26386
25891
|
|
|
26387
|
-
|
|
26388
|
-
|
|
26389
|
-
|
|
25892
|
+
if (otherQueryOptions && Object.keys(otherQueryOptions).length || highlightQuery && Object.keys(highlightQuery).length) {
|
|
25893
|
+
if (!otherQueryOptions) otherQueryOptions = {};
|
|
25894
|
+
if (!highlightQuery) highlightQuery = {};
|
|
26390
25895
|
|
|
26391
|
-
|
|
26392
|
-
|
|
25896
|
+
var mainQueryOptions = _extends({}, otherQueryOptions, highlightQuery, {
|
|
25897
|
+
size: size
|
|
25898
|
+
});
|
|
26393
25899
|
|
|
26394
|
-
|
|
26395
|
-
|
|
26396
|
-
|
|
25900
|
+
if (isInternalComponentPresent) {
|
|
25901
|
+
mainQueryOptions = _extends({}, otherQueryOptions, highlightQuery);
|
|
25902
|
+
}
|
|
26397
25903
|
|
|
26398
|
-
|
|
26399
|
-
|
|
25904
|
+
if (isResultComponent) {
|
|
25905
|
+
var currentPage = component.currentPage ? component.currentPage - 1 : 0;
|
|
26400
25906
|
|
|
26401
|
-
|
|
26402
|
-
|
|
26403
|
-
size: resultSize,
|
|
26404
|
-
from: from
|
|
26405
|
-
});
|
|
25907
|
+
if (selectedValues[component.componentId] && selectedValues[component.componentId].value) {
|
|
25908
|
+
currentPage = selectedValues[component.componentId].value - 1 || 0;
|
|
26406
25909
|
}
|
|
26407
25910
|
|
|
26408
|
-
|
|
26409
|
-
|
|
26410
|
-
|
|
26411
|
-
|
|
25911
|
+
var resultSize = component.size || 10;
|
|
25912
|
+
var from = currentPage * resultSize; // Update props for RS API
|
|
25913
|
+
|
|
25914
|
+
compProps.from = from;
|
|
25915
|
+
mainQueryOptions = _extends({}, mainQueryOptions, highlightQuery, {
|
|
25916
|
+
size: resultSize,
|
|
25917
|
+
from: from
|
|
26412
25918
|
});
|
|
26413
25919
|
}
|
|
25920
|
+
|
|
25921
|
+
componentQueryOptions = _extends({}, componentQueryOptions, mainQueryOptions);
|
|
26414
25922
|
}
|
|
26415
25923
|
} // [3] set dependency tree
|
|
26416
25924
|
|
|
@@ -26419,7 +25927,7 @@
|
|
|
26419
25927
|
var react = component.react;
|
|
26420
25928
|
|
|
26421
25929
|
if (isInternalComponentPresent || isResultComponent) {
|
|
26422
|
-
react =
|
|
25930
|
+
react = helper_27(react, internalComponent);
|
|
26423
25931
|
}
|
|
26424
25932
|
|
|
26425
25933
|
dependencyTree = dependencyTreeReducer(dependencyTree, {
|
|
@@ -26428,25 +25936,42 @@
|
|
|
26428
25936
|
react: react
|
|
26429
25937
|
});
|
|
26430
25938
|
} // [4] set query list
|
|
25939
|
+
// Do not set default query for suggestions
|
|
26431
25940
|
|
|
26432
25941
|
|
|
26433
|
-
if (
|
|
26434
|
-
var
|
|
26435
|
-
|
|
25942
|
+
if (isInternalComponentPresent && !transform_7(component.componentType)) {
|
|
25943
|
+
var _ref2 = getDefaultQuery(component, value) || {},
|
|
25944
|
+
defaultQuery = _ref2.query,
|
|
25945
|
+
defaultQueryOptions = _objectWithoutPropertiesLoose(_ref2, _excluded2);
|
|
26436
25946
|
|
|
26437
25947
|
queryList = queryReducer(queryList, {
|
|
26438
25948
|
type: 'SET_QUERY',
|
|
26439
25949
|
component: internalComponent,
|
|
26440
|
-
query:
|
|
25950
|
+
query: defaultQuery
|
|
26441
25951
|
});
|
|
26442
|
-
|
|
26443
|
-
|
|
26444
|
-
|
|
26445
|
-
|
|
26446
|
-
query: getQuery(component, value, componentType)
|
|
25952
|
+
queryOptions = queryOptionsReducer(queryOptions, {
|
|
25953
|
+
type: 'SET_QUERY_OPTIONS',
|
|
25954
|
+
component: internalComponent,
|
|
25955
|
+
options: _extends({}, componentQueryOptions, defaultQueryOptions)
|
|
26447
25956
|
});
|
|
26448
|
-
}
|
|
25957
|
+
}
|
|
25958
|
+
|
|
25959
|
+
var _ref3 = getCustomQuery(component, value) || {},
|
|
25960
|
+
query = _ref3.query,
|
|
25961
|
+
options = _objectWithoutPropertiesLoose(_ref3, _excluded3);
|
|
26449
25962
|
|
|
25963
|
+
var customQuery = query; // set custom query for main component
|
|
25964
|
+
|
|
25965
|
+
queryList = queryReducer(queryList, {
|
|
25966
|
+
type: 'SET_QUERY',
|
|
25967
|
+
component: component.componentId,
|
|
25968
|
+
query: customQuery
|
|
25969
|
+
});
|
|
25970
|
+
queryOptions = queryOptionsReducer(queryOptions, {
|
|
25971
|
+
type: 'SET_QUERY_OPTIONS',
|
|
25972
|
+
component: component.componentId,
|
|
25973
|
+
options: _extends({}, options)
|
|
25974
|
+
}); // Set component type in component props
|
|
26450
25975
|
|
|
26451
25976
|
compProps.componentType = componentType;
|
|
26452
25977
|
componentProps[component.componentId] = compProps;
|
|
@@ -26465,13 +25990,14 @@
|
|
|
26465
25990
|
|
|
26466
25991
|
componentCollection.forEach(function (component) {
|
|
26467
25992
|
// eslint-disable-next-line
|
|
26468
|
-
var _buildQuery =
|
|
25993
|
+
var _buildQuery = helper_26(component.componentId, dependencyTree, queryList, queryOptions),
|
|
26469
25994
|
queryObj = _buildQuery.queryObj,
|
|
26470
25995
|
options = _buildQuery.options;
|
|
26471
25996
|
|
|
26472
|
-
var
|
|
25997
|
+
var componentQueryOptions = options;
|
|
25998
|
+
var validOptions = ['aggs', 'from', 'sort']; // check if query or componentQueryOptions are valid - non-empty
|
|
26473
25999
|
|
|
26474
|
-
if (queryObj && !!Object.keys(queryObj).length ||
|
|
26000
|
+
if (queryObj && !!Object.keys(queryObj).length || componentQueryOptions && Object.keys(componentQueryOptions).some(function (item) {
|
|
26475
26001
|
return validOptions.includes(item);
|
|
26476
26002
|
})) {
|
|
26477
26003
|
var _extends2;
|
|
@@ -26486,7 +26012,7 @@
|
|
|
26486
26012
|
|
|
26487
26013
|
var currentQuery = _extends({
|
|
26488
26014
|
query: _extends({}, queryObj)
|
|
26489
|
-
},
|
|
26015
|
+
}, componentQueryOptions, queryOptions[component.componentId]);
|
|
26490
26016
|
|
|
26491
26017
|
queryLog = _extends({}, queryLog, (_extends2 = {}, _extends2[component.componentId] = currentQuery, _extends2));
|
|
26492
26018
|
|
|
@@ -26674,7 +26200,7 @@
|
|
|
26674
26200
|
});
|
|
26675
26201
|
}
|
|
26676
26202
|
|
|
26677
|
-
var version = "1.
|
|
26203
|
+
var version = "1.28.0";
|
|
26678
26204
|
|
|
26679
26205
|
var _templateObject$n, _templateObject2$a;
|
|
26680
26206
|
|