@appbaseio/reactivesearch-vue 1.16.0-alpha.28 → 1.16.0-alpha.31
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 +378 -233
- package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js +5 -5
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
- package/dist/cjs/{DownShift-d41f2442.js → CancelSvg-82021d23.js} +58 -14
- package/dist/cjs/{ComponentWrapper-ab813390.js → ComponentWrapper-7302fe1a.js} +1 -1
- package/dist/cjs/DataSearch.js +25 -76
- package/dist/cjs/{DropDown-3c343026.js → DropDown-c46d8b0c.js} +61 -21
- package/dist/cjs/DynamicRangeSlider.js +45 -9
- package/dist/cjs/MultiDropdownList.js +17 -10
- package/dist/cjs/MultiList.js +18 -13
- package/dist/cjs/MultiRange.js +4 -4
- package/dist/cjs/{Pagination-0b9ec0fc.js → Pagination-1b2320a7.js} +1 -1
- package/dist/cjs/RangeInput.js +9 -5
- package/dist/cjs/RangeSlider.js +19 -22
- package/dist/cjs/ReactiveBase.js +2 -2
- package/dist/cjs/ReactiveComponent.js +3 -3
- package/dist/cjs/ReactiveGoogleMap.js +4 -4
- package/dist/cjs/ReactiveList.js +4 -4
- package/dist/cjs/ResultCard.js +1 -1
- package/dist/cjs/ResultList.js +1 -1
- package/dist/cjs/SelectedFilters.js +8 -6
- package/dist/cjs/SingleDropdownList.js +13 -8
- package/dist/cjs/SingleList.js +5 -5
- package/dist/cjs/SingleRange.js +4 -4
- package/dist/cjs/StateProvider.js +7 -3
- package/dist/cjs/ToggleButton.js +4 -4
- package/dist/cjs/{index-2a8358cd.js → index-d44a0a21.js} +10 -4
- package/dist/cjs/index.js +7 -7
- package/dist/cjs/install.js +7 -7
- package/dist/cjs/ssr-c333c82c.js +39 -0
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/{vueTypes-829a5f2c.js → vueTypes-6de9d2a9.js} +3 -3
- package/dist/es/{DownShift-e7ccf2a7.js → CancelSvg-4d9e0857.js} +55 -16
- package/dist/es/{ComponentWrapper-459505fd.js → ComponentWrapper-bbb717bc.js} +1 -1
- package/dist/es/DataSearch.js +15 -66
- package/dist/es/{DropDown-c5ab660f.js → DropDown-4edaa621.js} +60 -20
- package/dist/es/DynamicRangeSlider.js +45 -9
- package/dist/es/MultiDropdownList.js +17 -10
- package/dist/es/MultiList.js +18 -13
- package/dist/es/MultiRange.js +4 -4
- package/dist/es/{Pagination-e8216949.js → Pagination-b3e4054a.js} +1 -1
- package/dist/es/RangeInput.js +9 -5
- package/dist/es/RangeSlider.js +19 -22
- package/dist/es/ReactiveBase.js +2 -2
- package/dist/es/ReactiveComponent.js +3 -3
- package/dist/es/ReactiveGoogleMap.js +4 -4
- package/dist/es/ReactiveList.js +4 -4
- package/dist/es/ResultCard.js +1 -1
- package/dist/es/ResultList.js +1 -1
- package/dist/es/SelectedFilters.js +8 -6
- package/dist/es/SingleDropdownList.js +13 -8
- package/dist/es/SingleList.js +5 -5
- package/dist/es/SingleRange.js +4 -4
- package/dist/es/StateProvider.js +7 -3
- package/dist/es/ToggleButton.js +4 -4
- package/dist/es/{index-4755c9a0.js → index-5daa8276.js} +10 -4
- package/dist/es/index.js +7 -7
- package/dist/es/install.js +7 -7
- package/dist/es/ssr-e3196de1.js +33 -0
- package/dist/es/version.js +1 -1
- package/dist/es/{vueTypes-98819a12.js → vueTypes-9326e0be.js} +3 -3
- package/package.json +4 -4
- package/dist/cjs/ssr-f312af20.js +0 -39
- package/dist/es/ssr-a3306f57.js +0 -33
|
@@ -1355,7 +1355,6 @@
|
|
|
1355
1355
|
}
|
|
1356
1356
|
|
|
1357
1357
|
var defaultAnalyticsConfig = exports.defaultAnalyticsConfig = {
|
|
1358
|
-
searchStateHeader: false,
|
|
1359
1358
|
emptyQuery: true,
|
|
1360
1359
|
suggestionAnalytics: true,
|
|
1361
1360
|
userId: null,
|
|
@@ -1733,7 +1732,19 @@
|
|
|
1733
1732
|
return _extends({}, state, _defineProperty({}, action.component, _extends({}, state[action.component], action.payload)));
|
|
1734
1733
|
|
|
1735
1734
|
case constants.CLEAR_VALUES:
|
|
1736
|
-
|
|
1735
|
+
{
|
|
1736
|
+
if (action.resetValues) {
|
|
1737
|
+
var nextState = {};
|
|
1738
|
+
Object.keys(action.resetValues).forEach(function (componentId) {
|
|
1739
|
+
nextState[componentId] = _extends({}, state[componentId], {
|
|
1740
|
+
value: action.resetValues[componentId]
|
|
1741
|
+
});
|
|
1742
|
+
});
|
|
1743
|
+
return nextState;
|
|
1744
|
+
}
|
|
1745
|
+
|
|
1746
|
+
return {};
|
|
1747
|
+
}
|
|
1737
1748
|
|
|
1738
1749
|
case constants.REMOVE_COMPONENT:
|
|
1739
1750
|
{
|
|
@@ -4854,7 +4865,7 @@
|
|
|
4854
4865
|
Object.defineProperty(exports, "__esModule", {
|
|
4855
4866
|
value: true
|
|
4856
4867
|
});
|
|
4857
|
-
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;
|
|
4868
|
+
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;
|
|
4858
4869
|
|
|
4859
4870
|
var _extends = Object.assign || function (target) {
|
|
4860
4871
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -5668,37 +5679,45 @@
|
|
|
5668
5679
|
function isValidDateRangeQueryFormat(queryFormat) {
|
|
5669
5680
|
return Object.keys(_dateFormats2["default"]).includes(queryFormat);
|
|
5670
5681
|
}
|
|
5682
|
+
|
|
5683
|
+
var suggestionTypes = exports.suggestionTypes = {
|
|
5684
|
+
Popular: 'popular',
|
|
5685
|
+
Index: 'index',
|
|
5686
|
+
Recent: 'recent',
|
|
5687
|
+
Promoted: 'promoted'
|
|
5688
|
+
};
|
|
5671
5689
|
});
|
|
5672
5690
|
unwrapExports(helper);
|
|
5673
|
-
var helper_1 = helper.
|
|
5674
|
-
var helper_2 = helper.
|
|
5675
|
-
var helper_3 = helper.
|
|
5676
|
-
var helper_4 = helper.
|
|
5677
|
-
var helper_5 = helper.
|
|
5678
|
-
var helper_6 = helper.
|
|
5679
|
-
var helper_7 = helper.
|
|
5680
|
-
var helper_8 = helper.
|
|
5681
|
-
var helper_9 = helper.
|
|
5682
|
-
var helper_10 = helper.
|
|
5683
|
-
var helper_11 = helper.
|
|
5684
|
-
var helper_12 = helper.
|
|
5685
|
-
var helper_13 = helper.
|
|
5686
|
-
var helper_14 = helper.
|
|
5687
|
-
var helper_15 = helper.
|
|
5688
|
-
var helper_16 = helper.
|
|
5689
|
-
var helper_17 = helper.
|
|
5690
|
-
var helper_18 = helper.
|
|
5691
|
-
var helper_19 = helper.
|
|
5692
|
-
var helper_20 = helper.
|
|
5693
|
-
var helper_21 = helper.
|
|
5694
|
-
var helper_22 = helper.
|
|
5695
|
-
var helper_23 = helper.
|
|
5696
|
-
var helper_24 = helper.
|
|
5697
|
-
var helper_25 = helper.
|
|
5698
|
-
var helper_26 = helper.
|
|
5699
|
-
var helper_27 = helper.
|
|
5700
|
-
var helper_28 = helper.
|
|
5701
|
-
var helper_29 = helper.
|
|
5691
|
+
var helper_1 = helper.suggestionTypes;
|
|
5692
|
+
var helper_2 = helper.getTopSuggestions;
|
|
5693
|
+
var helper_3 = helper.withClickIds;
|
|
5694
|
+
var helper_4 = helper.getCompositeAggsQuery;
|
|
5695
|
+
var helper_5 = helper.getAggsQuery;
|
|
5696
|
+
var helper_6 = helper.extractQueryFromDefaultQuery;
|
|
5697
|
+
var helper_7 = helper.updateInternalQuery;
|
|
5698
|
+
var helper_8 = helper.getSearchState;
|
|
5699
|
+
var helper_9 = helper.getOptionsFromQuery;
|
|
5700
|
+
var helper_10 = helper.parseHits;
|
|
5701
|
+
var helper_11 = helper.handleA11yAction;
|
|
5702
|
+
var helper_12 = helper.getInnerKey;
|
|
5703
|
+
var helper_13 = helper.getClassName;
|
|
5704
|
+
var helper_14 = helper.checkSomePropChange;
|
|
5705
|
+
var helper_15 = helper.checkPropChange;
|
|
5706
|
+
var helper_16 = helper.updateDefaultQuery;
|
|
5707
|
+
var helper_17 = helper.updateCustomQuery;
|
|
5708
|
+
var helper_18 = helper.isEqual;
|
|
5709
|
+
var helper_19 = helper.debounce;
|
|
5710
|
+
var helper_20 = helper.getQueryOptions;
|
|
5711
|
+
var helper_21 = helper.buildQuery;
|
|
5712
|
+
var helper_22 = helper.pushToAndClause;
|
|
5713
|
+
var helper_23 = helper.checkValueChange;
|
|
5714
|
+
var helper_24 = helper.getAggsOrder;
|
|
5715
|
+
var helper_25 = helper.formatDate;
|
|
5716
|
+
var helper_26 = helper.getResultStats;
|
|
5717
|
+
var helper_27 = helper.extractFieldsFromSource;
|
|
5718
|
+
var helper_28 = helper.normalizeDataField;
|
|
5719
|
+
var helper_29 = helper.handleOnSuggestions;
|
|
5720
|
+
var helper_30 = helper.isValidDateRangeQueryFormat;
|
|
5702
5721
|
|
|
5703
5722
|
var value = createCommonjsModule(function (module, exports) {
|
|
5704
5723
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5820,8 +5839,10 @@
|
|
|
5820
5839
|
}
|
|
5821
5840
|
|
|
5822
5841
|
function clearValues() {
|
|
5842
|
+
var resetValues = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
5823
5843
|
return {
|
|
5824
|
-
type: constants.CLEAR_VALUES
|
|
5844
|
+
type: constants.CLEAR_VALUES,
|
|
5845
|
+
resetValues: resetValues
|
|
5825
5846
|
};
|
|
5826
5847
|
}
|
|
5827
5848
|
});
|
|
@@ -6049,6 +6070,76 @@
|
|
|
6049
6070
|
var misc_19 = misc.setAppliedSettings;
|
|
6050
6071
|
var misc_20 = misc.setQueryListener;
|
|
6051
6072
|
|
|
6073
|
+
var hits = createCommonjsModule(function (module, exports) {
|
|
6074
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6075
|
+
value: true
|
|
6076
|
+
});
|
|
6077
|
+
exports.updateAggs = updateAggs;
|
|
6078
|
+
exports.updateCompositeAggs = updateCompositeAggs;
|
|
6079
|
+
exports.updateHits = updateHits;
|
|
6080
|
+
exports.saveQueryToHits = saveQueryToHits;
|
|
6081
|
+
exports.mockDataForTesting = mockDataForTesting;
|
|
6082
|
+
|
|
6083
|
+
function updateAggs(component, aggregations) {
|
|
6084
|
+
var append = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
6085
|
+
return {
|
|
6086
|
+
type: constants.UPDATE_AGGS,
|
|
6087
|
+
component: component,
|
|
6088
|
+
aggregations: aggregations,
|
|
6089
|
+
append: append
|
|
6090
|
+
};
|
|
6091
|
+
}
|
|
6092
|
+
|
|
6093
|
+
function updateCompositeAggs(component, aggregations) {
|
|
6094
|
+
var append = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
6095
|
+
return {
|
|
6096
|
+
type: constants.UPDATE_COMPOSITE_AGGS,
|
|
6097
|
+
component: component,
|
|
6098
|
+
aggregations: aggregations,
|
|
6099
|
+
append: append
|
|
6100
|
+
};
|
|
6101
|
+
}
|
|
6102
|
+
|
|
6103
|
+
function updateHits(component, hits, time, hidden) {
|
|
6104
|
+
var append = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
6105
|
+
return {
|
|
6106
|
+
type: constants.UPDATE_HITS,
|
|
6107
|
+
component: component,
|
|
6108
|
+
hits: hits.hits,
|
|
6109
|
+
total: typeof hits.total === 'object' ? hits.total.value : hits.total,
|
|
6110
|
+
hidden: hidden,
|
|
6111
|
+
time: time,
|
|
6112
|
+
append: append
|
|
6113
|
+
};
|
|
6114
|
+
}
|
|
6115
|
+
|
|
6116
|
+
function saveQueryToHits(component, query) {
|
|
6117
|
+
return {
|
|
6118
|
+
type: constants.SET_QUERY_TO_HITS,
|
|
6119
|
+
component: component,
|
|
6120
|
+
query: query
|
|
6121
|
+
};
|
|
6122
|
+
}
|
|
6123
|
+
|
|
6124
|
+
function mockDataForTesting(component, data) {
|
|
6125
|
+
return function (dispatch) {
|
|
6126
|
+
if (data.hasOwnProperty('aggregations')) {
|
|
6127
|
+
dispatch(updateAggs(component, data.aggregations));
|
|
6128
|
+
}
|
|
6129
|
+
|
|
6130
|
+
if (data.hasOwnProperty('hits')) {
|
|
6131
|
+
dispatch(updateHits(component, data, data.time || undefined));
|
|
6132
|
+
}
|
|
6133
|
+
};
|
|
6134
|
+
}
|
|
6135
|
+
});
|
|
6136
|
+
unwrapExports(hits);
|
|
6137
|
+
var hits_1 = hits.updateAggs;
|
|
6138
|
+
var hits_2 = hits.updateCompositeAggs;
|
|
6139
|
+
var hits_3 = hits.updateHits;
|
|
6140
|
+
var hits_4 = hits.saveQueryToHits;
|
|
6141
|
+
var hits_5 = hits.mockDataForTesting;
|
|
6142
|
+
|
|
6052
6143
|
var xdate = createCommonjsModule(function (module) {
|
|
6053
6144
|
/**
|
|
6054
6145
|
* @preserve XDate v@VERSION
|
|
@@ -7318,7 +7409,8 @@
|
|
|
7318
7409
|
execute = true;
|
|
7319
7410
|
}
|
|
7320
7411
|
|
|
7321
|
-
var
|
|
7412
|
+
var componentProps = store.props[component];
|
|
7413
|
+
var dependentQuery = getRSQuery(component, extractPropsFromState(store, component, _extends({}, componentProps && componentProps.componentType === constants$1.componentTypes.searchBox ? _extends({}, execute === false ? {
|
|
7322
7414
|
type: constants$1.queryTypes.search
|
|
7323
7415
|
} : {}, calcValues.category ? {
|
|
7324
7416
|
categoryValue: calcValues.category
|
|
@@ -7349,79 +7441,6 @@
|
|
|
7349
7441
|
var transform_13 = transform.componentToTypeMap;
|
|
7350
7442
|
var transform_14 = transform.flatReactProp;
|
|
7351
7443
|
|
|
7352
|
-
var hits = createCommonjsModule(function (module, exports) {
|
|
7353
|
-
Object.defineProperty(exports, "__esModule", {
|
|
7354
|
-
value: true
|
|
7355
|
-
});
|
|
7356
|
-
exports.updateAggs = updateAggs;
|
|
7357
|
-
exports.updateCompositeAggs = updateCompositeAggs;
|
|
7358
|
-
exports.updateHits = updateHits;
|
|
7359
|
-
exports.saveQueryToHits = saveQueryToHits;
|
|
7360
|
-
exports.mockDataForTesting = mockDataForTesting;
|
|
7361
|
-
|
|
7362
|
-
function updateAggs(component, aggregations) {
|
|
7363
|
-
var append = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
7364
|
-
return {
|
|
7365
|
-
type: constants.UPDATE_AGGS,
|
|
7366
|
-
component: component,
|
|
7367
|
-
aggregations: aggregations,
|
|
7368
|
-
append: append
|
|
7369
|
-
};
|
|
7370
|
-
}
|
|
7371
|
-
|
|
7372
|
-
function updateCompositeAggs(component, aggregations) {
|
|
7373
|
-
var append = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
7374
|
-
return {
|
|
7375
|
-
type: constants.UPDATE_COMPOSITE_AGGS,
|
|
7376
|
-
component: component,
|
|
7377
|
-
aggregations: aggregations,
|
|
7378
|
-
append: append
|
|
7379
|
-
};
|
|
7380
|
-
}
|
|
7381
|
-
|
|
7382
|
-
function updateHits(component, hits, time, hidden) {
|
|
7383
|
-
var append = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
7384
|
-
return {
|
|
7385
|
-
type: constants.UPDATE_HITS,
|
|
7386
|
-
component: component,
|
|
7387
|
-
hits: hits.hits,
|
|
7388
|
-
total: typeof hits.total === 'object' ? hits.total.value : hits.total,
|
|
7389
|
-
hidden: hidden,
|
|
7390
|
-
time: time,
|
|
7391
|
-
append: append
|
|
7392
|
-
};
|
|
7393
|
-
}
|
|
7394
|
-
|
|
7395
|
-
function saveQueryToHits(component, query) {
|
|
7396
|
-
return {
|
|
7397
|
-
type: constants.SET_QUERY_TO_HITS,
|
|
7398
|
-
component: component,
|
|
7399
|
-
query: query
|
|
7400
|
-
};
|
|
7401
|
-
}
|
|
7402
|
-
|
|
7403
|
-
function mockDataForTesting(component, data) {
|
|
7404
|
-
return function (dispatch, getState) {
|
|
7405
|
-
var _getState = getState(),
|
|
7406
|
-
props = _getState.props;
|
|
7407
|
-
|
|
7408
|
-
var componentProps = props[component];
|
|
7409
|
-
|
|
7410
|
-
if (transform.componentToTypeMap[componentProps.componentType] === 'term') {
|
|
7411
|
-
dispatch(updateAggs(component, data));
|
|
7412
|
-
} else {
|
|
7413
|
-
dispatch(updateHits(component, data));
|
|
7414
|
-
}
|
|
7415
|
-
};
|
|
7416
|
-
}
|
|
7417
|
-
});
|
|
7418
|
-
unwrapExports(hits);
|
|
7419
|
-
var hits_1 = hits.updateAggs;
|
|
7420
|
-
var hits_2 = hits.updateCompositeAggs;
|
|
7421
|
-
var hits_3 = hits.updateHits;
|
|
7422
|
-
var hits_4 = hits.saveQueryToHits;
|
|
7423
|
-
var hits_5 = hits.mockDataForTesting;
|
|
7424
|
-
|
|
7425
7444
|
var utils = createCommonjsModule(function (module, exports) {
|
|
7426
7445
|
Object.defineProperty(exports, "__esModule", {
|
|
7427
7446
|
value: true
|
|
@@ -8366,6 +8385,20 @@
|
|
|
8366
8385
|
value: true
|
|
8367
8386
|
});
|
|
8368
8387
|
|
|
8388
|
+
var _extends = Object.assign || function (target) {
|
|
8389
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
8390
|
+
var source = arguments[i];
|
|
8391
|
+
|
|
8392
|
+
for (var key in source) {
|
|
8393
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
8394
|
+
target[key] = source[key];
|
|
8395
|
+
}
|
|
8396
|
+
}
|
|
8397
|
+
}
|
|
8398
|
+
|
|
8399
|
+
return target;
|
|
8400
|
+
};
|
|
8401
|
+
|
|
8369
8402
|
var _crossFetch2 = _interopRequireDefault(browserPonyfill);
|
|
8370
8403
|
|
|
8371
8404
|
function _interopRequireDefault(obj) {
|
|
@@ -8374,20 +8407,26 @@
|
|
|
8374
8407
|
};
|
|
8375
8408
|
}
|
|
8376
8409
|
|
|
8377
|
-
var fetchGraphQL = function fetchGraphQL(
|
|
8410
|
+
var fetchGraphQL = function fetchGraphQL(requestOptions) {
|
|
8411
|
+
var graphQLUrl = requestOptions.graphQLUrl,
|
|
8412
|
+
url = requestOptions.url,
|
|
8413
|
+
credentials = requestOptions.credentials,
|
|
8414
|
+
app = requestOptions.app,
|
|
8415
|
+
query = requestOptions.query,
|
|
8416
|
+
headers = requestOptions.headers;
|
|
8378
8417
|
var fetchUrl = credentials ? url.replace('//', '//' + credentials + '@') : url;
|
|
8379
8418
|
return (0, _crossFetch2["default"])(graphQLUrl, {
|
|
8380
8419
|
method: 'POST',
|
|
8381
|
-
body: '\n\t\t\tquery{\n\t\t\t\
|
|
8420
|
+
body: '\n\t\t\tquery{\n\t\t\t\telastic77(host: "' + fetchUrl + '"){\n\t\t\t\t\tmsearch(\n\t\t\t\t\t\tindex: "' + app + '"\n\t\t\t\t\t\tbody: ' + JSON.stringify(query.map(function (item) {
|
|
8382
8421
|
return JSON.stringify(item);
|
|
8383
8422
|
})) + '\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t}\n\t\t',
|
|
8384
|
-
headers: {
|
|
8423
|
+
headers: _extends({}, headers, {
|
|
8385
8424
|
'Content-Type': 'application/graphql'
|
|
8386
|
-
}
|
|
8425
|
+
})
|
|
8387
8426
|
}).then(function (res) {
|
|
8388
8427
|
return res.json();
|
|
8389
8428
|
}).then(function (jsonRes) {
|
|
8390
|
-
return jsonRes.data.
|
|
8429
|
+
return jsonRes.data.elastic77.msearch;
|
|
8391
8430
|
})["catch"](function (error) {
|
|
8392
8431
|
console.error(error);
|
|
8393
8432
|
});
|
|
@@ -8497,6 +8536,15 @@
|
|
|
8497
8536
|
};
|
|
8498
8537
|
}
|
|
8499
8538
|
|
|
8539
|
+
var handleTransformRequest = function handleTransformRequest(transformRequest, res) {
|
|
8540
|
+
if (transformRequest && typeof transformRequest === 'function') {
|
|
8541
|
+
var transformRequestPromise = transformRequest(res);
|
|
8542
|
+
return transformRequestPromise instanceof Promise ? transformRequestPromise : Promise.resolve(transformRequestPromise);
|
|
8543
|
+
}
|
|
8544
|
+
|
|
8545
|
+
return Promise.resolve(res);
|
|
8546
|
+
};
|
|
8547
|
+
|
|
8500
8548
|
function msearch(query, orderOfQueries) {
|
|
8501
8549
|
var appendToHits = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
8502
8550
|
var isInternalComponent = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
@@ -8547,14 +8595,6 @@
|
|
|
8547
8595
|
}
|
|
8548
8596
|
}
|
|
8549
8597
|
|
|
8550
|
-
if (config.analyticsConfig.searchStateHeader) {
|
|
8551
|
-
var searchState = (0, helper.getSearchState)(getState(), true);
|
|
8552
|
-
|
|
8553
|
-
if (searchState && Object.keys(searchState).length) {
|
|
8554
|
-
searchHeaders['X-Search-State'] = JSON.stringify(searchState);
|
|
8555
|
-
}
|
|
8556
|
-
}
|
|
8557
|
-
|
|
8558
8598
|
if (config.analyticsConfig.userId) {
|
|
8559
8599
|
searchHeaders['X-User-Id'] = config.analyticsConfig.userId;
|
|
8560
8600
|
}
|
|
@@ -8570,14 +8610,29 @@
|
|
|
8570
8610
|
});
|
|
8571
8611
|
|
|
8572
8612
|
if (config.graphQLUrl) {
|
|
8573
|
-
|
|
8574
|
-
|
|
8575
|
-
|
|
8576
|
-
|
|
8577
|
-
|
|
8578
|
-
|
|
8579
|
-
|
|
8580
|
-
|
|
8613
|
+
var requestOptions = {
|
|
8614
|
+
graphQLUrl: config.graphQLUrl,
|
|
8615
|
+
url: config.url,
|
|
8616
|
+
credentials: config.credentials,
|
|
8617
|
+
app: config.app,
|
|
8618
|
+
query: query,
|
|
8619
|
+
headers: headers
|
|
8620
|
+
};
|
|
8621
|
+
handleTransformRequest(appbaseRef.transformRequest, requestOptions).then(function (modifiedRequest) {
|
|
8622
|
+
(0, _graphQL2["default"])(modifiedRequest).then(function (res) {
|
|
8623
|
+
(0, utils.handleResponseMSearch)({
|
|
8624
|
+
res: res,
|
|
8625
|
+
isSuggestionsQuery: isSuggestionsQuery,
|
|
8626
|
+
orderOfQueries: orderOfQueries,
|
|
8627
|
+
appendToHits: appendToHits,
|
|
8628
|
+
appendToAggs: appendToAggs
|
|
8629
|
+
}, getState, dispatch);
|
|
8630
|
+
})["catch"](function (err) {
|
|
8631
|
+
(0, utils.handleError)({
|
|
8632
|
+
orderOfQueries: orderOfQueries,
|
|
8633
|
+
error: err
|
|
8634
|
+
}, getState, dispatch);
|
|
8635
|
+
});
|
|
8581
8636
|
})["catch"](function (err) {
|
|
8582
8637
|
(0, utils.handleError)({
|
|
8583
8638
|
orderOfQueries: orderOfQueries,
|
|
@@ -8774,7 +8829,7 @@
|
|
|
8774
8829
|
var isInternalComponent = componentId.endsWith('__internal');
|
|
8775
8830
|
var mainComponentProps = props[componentId];
|
|
8776
8831
|
|
|
8777
|
-
if (isInternalComponent && (0, transform.isSearchComponent)(mainComponentProps.componentType)) {
|
|
8832
|
+
if (isInternalComponent && mainComponentProps && (0, transform.isSearchComponent)(mainComponentProps.componentType)) {
|
|
8778
8833
|
value$1 = internalValues[componentId] && internalValues[componentId].value;
|
|
8779
8834
|
}
|
|
8780
8835
|
|
|
@@ -12880,19 +12935,19 @@
|
|
|
12880
12935
|
unit: VueTypes.oneOf(['mi', 'miles', 'yd', 'yards', 'ft', 'feet', 'in', 'inch', 'km', 'kilometers', 'm', 'meters', 'cm', 'centimeters', 'mm', 'millimeters', 'NM', 'nmi', 'nauticalmiles']),
|
|
12881
12936
|
value: VueTypes.string.def(undefined),
|
|
12882
12937
|
analyticsConfig: VueTypes.shape({
|
|
12883
|
-
searchStateHeader: VueTypes.bool,
|
|
12884
12938
|
emptyQuery: VueTypes.bool,
|
|
12885
12939
|
suggestionAnalytics: VueTypes.bool,
|
|
12886
12940
|
userId: VueTypes.string,
|
|
12887
12941
|
customEvents: VueTypes.object
|
|
12888
12942
|
}),
|
|
12889
12943
|
appbaseConfig: VueTypes.shape({
|
|
12890
|
-
enableQueryRules: VueTypes.bool,
|
|
12891
12944
|
recordAnalytics: VueTypes.bool,
|
|
12892
|
-
searchStateHeader: VueTypes.bool,
|
|
12893
12945
|
emptyQuery: VueTypes.bool,
|
|
12894
12946
|
suggestionAnalytics: VueTypes.bool,
|
|
12947
|
+
enableQueryRules: VueTypes.bool,
|
|
12948
|
+
enableSearchRelevancy: VueTypes.bool,
|
|
12895
12949
|
userId: VueTypes.string,
|
|
12950
|
+
useCache: VueTypes.bool,
|
|
12896
12951
|
customEvents: VueTypes.object,
|
|
12897
12952
|
enableTelemetry: VueTypes.bool.def(true)
|
|
12898
12953
|
}).def({}),
|
|
@@ -13240,10 +13295,16 @@
|
|
|
13240
13295
|
}; // parses current array (i.e. this.$props.value) for `onChange` callback for multi-* components
|
|
13241
13296
|
|
|
13242
13297
|
function parseValueArray(objectValues, currentValue) {
|
|
13243
|
-
var
|
|
13244
|
-
|
|
13245
|
-
|
|
13246
|
-
|
|
13298
|
+
var selectedValues;
|
|
13299
|
+
|
|
13300
|
+
if (Array.isArray(objectValues)) {
|
|
13301
|
+
selectedValues = [].concat(objectValues);
|
|
13302
|
+
} else {
|
|
13303
|
+
var keys = Object.keys(objectValues);
|
|
13304
|
+
selectedValues = keys.map(function (key) {
|
|
13305
|
+
return objectValues[key] ? key : null;
|
|
13306
|
+
});
|
|
13307
|
+
}
|
|
13247
13308
|
|
|
13248
13309
|
if (selectedValues.includes(currentValue)) {
|
|
13249
13310
|
return selectedValues.filter(function (item) {
|
|
@@ -14148,7 +14209,7 @@
|
|
|
14148
14209
|
filteredResults = [].concat(parsedPromotedResults, filteredResults);
|
|
14149
14210
|
}
|
|
14150
14211
|
|
|
14151
|
-
return
|
|
14212
|
+
return helper_3(filteredResults);
|
|
14152
14213
|
}
|
|
14153
14214
|
},
|
|
14154
14215
|
watch: {
|
|
@@ -17122,14 +17183,14 @@
|
|
|
17122
17183
|
this.updateState(this.$props);
|
|
17123
17184
|
},
|
|
17124
17185
|
analyticsConfig: function analyticsConfig(newVal, oldVal) {
|
|
17125
|
-
if (!
|
|
17186
|
+
if (!helper_18(newVal, oldVal)) {
|
|
17126
17187
|
if (this.store) {
|
|
17127
17188
|
this.store.dispatch(analytics_3$1(newVal));
|
|
17128
17189
|
}
|
|
17129
17190
|
}
|
|
17130
17191
|
},
|
|
17131
17192
|
appbaseConfig: function appbaseConfig(newVal, oldVal) {
|
|
17132
|
-
if (!
|
|
17193
|
+
if (!helper_18(newVal, oldVal)) {
|
|
17133
17194
|
if (this.store) {
|
|
17134
17195
|
this.store.dispatch(analytics_3$1(newVal));
|
|
17135
17196
|
}
|
|
@@ -18062,8 +18123,7 @@
|
|
|
18062
18123
|
internal_isOpen: false,
|
|
18063
18124
|
internal_inputValue: '',
|
|
18064
18125
|
internal_selectedItem: null,
|
|
18065
|
-
internal_highlightedIndex: null
|
|
18066
|
-
internal_eventsCalled: {}
|
|
18126
|
+
internal_highlightedIndex: null
|
|
18067
18127
|
};
|
|
18068
18128
|
},
|
|
18069
18129
|
computed: {
|
|
@@ -18248,23 +18308,11 @@
|
|
|
18248
18308
|
}
|
|
18249
18309
|
|
|
18250
18310
|
var vm = this;
|
|
18251
|
-
setTimeout(function () {
|
|
18252
|
-
vm.internal_eventsCalled[index] = false;
|
|
18253
|
-
}, 0);
|
|
18254
18311
|
return {
|
|
18255
18312
|
mouseenter: function mouseenter() {
|
|
18256
18313
|
vm.setHighlightedIndex(newIndex);
|
|
18257
18314
|
},
|
|
18258
|
-
// for browsers not supporting click event (e.g. firefox android)
|
|
18259
|
-
mousedown: function mousedown(event) {
|
|
18260
|
-
if (vm.internal_eventsCalled[index]) return;
|
|
18261
|
-
vm.internal_eventsCalled[index] = true;
|
|
18262
|
-
event.stopPropagation();
|
|
18263
|
-
vm.selectItemAtIndex(newIndex);
|
|
18264
|
-
},
|
|
18265
18315
|
click: function click(event) {
|
|
18266
|
-
if (vm.internal_eventsCalled[index]) return;
|
|
18267
|
-
vm.internal_eventsCalled[index] = true;
|
|
18268
18316
|
event.stopPropagation();
|
|
18269
18317
|
vm.selectItemAtIndex(newIndex);
|
|
18270
18318
|
}
|
|
@@ -20145,7 +20193,7 @@
|
|
|
20145
20193
|
// returns size and aggs property
|
|
20146
20194
|
getBasicQueryOptions: function getBasicQueryOptions() {
|
|
20147
20195
|
var aggregationField = this.$props.aggregationField;
|
|
20148
|
-
var queryOptions =
|
|
20196
|
+
var queryOptions = helper_20(this.$props);
|
|
20149
20197
|
|
|
20150
20198
|
if (aggregationField) {
|
|
20151
20199
|
queryOptions.aggs = getCompositeAggsQuery$1({
|
|
@@ -20251,7 +20299,7 @@
|
|
|
20251
20299
|
updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
|
|
20252
20300
|
}
|
|
20253
20301
|
|
|
20254
|
-
this.setQueryOptions(this.internalComponent, _extends({}, this.queryOptions, defaultQueryOptions));
|
|
20302
|
+
this.setQueryOptions(this.internalComponent, _extends({}, this.queryOptions, defaultQueryOptions), false);
|
|
20255
20303
|
this.updateQuery({
|
|
20256
20304
|
componentId: this.internalComponent,
|
|
20257
20305
|
query: query,
|
|
@@ -20278,7 +20326,7 @@
|
|
|
20278
20326
|
|
|
20279
20327
|
customQueryOptions = getOptionsFromQuery$1(customQueryTobeSet);
|
|
20280
20328
|
updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
20281
|
-
this.setQueryOptions(componentId, _extends({}, this.queryOptions, customQueryOptions));
|
|
20329
|
+
this.setQueryOptions(componentId, _extends({}, this.queryOptions, customQueryOptions), false);
|
|
20282
20330
|
}
|
|
20283
20331
|
|
|
20284
20332
|
if (!this.isPending) {
|
|
@@ -21363,7 +21411,7 @@
|
|
|
21363
21411
|
updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
|
|
21364
21412
|
}
|
|
21365
21413
|
|
|
21366
|
-
this.setQueryOptions(this.internalComponent, defaultQueryOptions);
|
|
21414
|
+
this.setQueryOptions(this.internalComponent, defaultQueryOptions, false);
|
|
21367
21415
|
this.updateQuery({
|
|
21368
21416
|
componentId: this.internalComponent,
|
|
21369
21417
|
query: query,
|
|
@@ -21384,7 +21432,7 @@
|
|
|
21384
21432
|
updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
21385
21433
|
}
|
|
21386
21434
|
|
|
21387
|
-
this.setQueryOptions(props.componentId, customQueryOptions);
|
|
21435
|
+
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
21388
21436
|
this.updateQuery({
|
|
21389
21437
|
componentId: props.componentId,
|
|
21390
21438
|
query: query,
|
|
@@ -21647,13 +21695,14 @@
|
|
|
21647
21695
|
},
|
|
21648
21696
|
beforeMount: function beforeMount() {
|
|
21649
21697
|
this.updateQueryHandlerOptions(this.$props);
|
|
21698
|
+
var value = this.selectedValue || this.$props.value || this.$props.defaultValue;
|
|
21699
|
+
this.setValue(value, !this.selectedValue);
|
|
21700
|
+
},
|
|
21701
|
+
mounted: function mounted() {
|
|
21702
|
+
var currentValue = Object.keys(this.$data.currentValue);
|
|
21650
21703
|
|
|
21651
|
-
if (this.
|
|
21652
|
-
this
|
|
21653
|
-
} else if (this.$props.value) {
|
|
21654
|
-
this.setValue(this.$props.value, true);
|
|
21655
|
-
} else if (this.$props.defaultValue) {
|
|
21656
|
-
this.setValue(this.$props.defaultValue, true);
|
|
21704
|
+
if (this.$props.value !== undefined && !isEqual$6(this.$props.value, currentValue)) {
|
|
21705
|
+
this.$emit('change', currentValue);
|
|
21657
21706
|
}
|
|
21658
21707
|
},
|
|
21659
21708
|
watch: {
|
|
@@ -21698,7 +21747,11 @@
|
|
|
21698
21747
|
}
|
|
21699
21748
|
|
|
21700
21749
|
if (!isEqual$6(selectedValue, newVal)) {
|
|
21701
|
-
this.
|
|
21750
|
+
if (this.value === undefined) {
|
|
21751
|
+
this.setValue(newVal, true);
|
|
21752
|
+
} else {
|
|
21753
|
+
this.$emit('change', newVal);
|
|
21754
|
+
}
|
|
21702
21755
|
}
|
|
21703
21756
|
},
|
|
21704
21757
|
defaultQuery: function defaultQuery(newVal, oldVal) {
|
|
@@ -21912,7 +21965,7 @@
|
|
|
21912
21965
|
updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
|
|
21913
21966
|
}
|
|
21914
21967
|
|
|
21915
|
-
this.setQueryOptions(this.internalComponent, defaultQueryOptions);
|
|
21968
|
+
this.setQueryOptions(this.internalComponent, defaultQueryOptions, false);
|
|
21916
21969
|
this.updateQuery({
|
|
21917
21970
|
componentId: this.internalComponent,
|
|
21918
21971
|
query: query,
|
|
@@ -21933,7 +21986,7 @@
|
|
|
21933
21986
|
updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
21934
21987
|
}
|
|
21935
21988
|
|
|
21936
|
-
this.setQueryOptions(props.componentId, customQueryOptions);
|
|
21989
|
+
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
21937
21990
|
this.updateQuery({
|
|
21938
21991
|
componentId: props.componentId,
|
|
21939
21992
|
query: query,
|
|
@@ -21997,7 +22050,7 @@
|
|
|
21997
22050
|
if (value === undefined) {
|
|
21998
22051
|
this.setValue(currentValue);
|
|
21999
22052
|
} else {
|
|
22000
|
-
var values = parseValueArray(value, currentValue);
|
|
22053
|
+
var values = parseValueArray(value || [], currentValue);
|
|
22001
22054
|
this.$emit('change', values);
|
|
22002
22055
|
}
|
|
22003
22056
|
},
|
|
@@ -22218,7 +22271,9 @@
|
|
|
22218
22271
|
single: VueTypes.bool,
|
|
22219
22272
|
small: VueTypes.bool.def(false),
|
|
22220
22273
|
themePreset: types.themePreset,
|
|
22221
|
-
showSearch: VueTypes.bool
|
|
22274
|
+
showSearch: VueTypes.bool,
|
|
22275
|
+
showClear: VueTypes.bool,
|
|
22276
|
+
searchPlaceholder: VueTypes.string.def('Type here to search...')
|
|
22222
22277
|
},
|
|
22223
22278
|
render: function render() {
|
|
22224
22279
|
var _this = this;
|
|
@@ -22267,7 +22322,8 @@
|
|
|
22267
22322
|
isOpen = _ref.isOpen,
|
|
22268
22323
|
highlightedIndex = _ref.highlightedIndex,
|
|
22269
22324
|
getButtonProps = _ref.getButtonProps,
|
|
22270
|
-
getItemEvents = _ref.getItemEvents
|
|
22325
|
+
getItemEvents = _ref.getItemEvents,
|
|
22326
|
+
getInputEvents = _ref.getInputEvents;
|
|
22271
22327
|
return h("div", {
|
|
22272
22328
|
"class": suggestionsContainer
|
|
22273
22329
|
}, [h(Select, {
|
|
@@ -22292,21 +22348,11 @@
|
|
|
22292
22348
|
getItemEvents: getItemEvents
|
|
22293
22349
|
}) : isOpen && itemsToRender.length ? h("ul", {
|
|
22294
22350
|
"class": suggestions$1(themePreset, _this.theme) + " " + (_this.$props.small ? 'small' : '') + " " + getClassName$6(_this.$props.innerClass, 'list')
|
|
22295
|
-
}, [_this.$props.showSearch ?
|
|
22296
|
-
|
|
22297
|
-
|
|
22298
|
-
|
|
22299
|
-
|
|
22300
|
-
"value": _this.$data.searchTerm,
|
|
22301
|
-
"themePreset": themePreset
|
|
22302
|
-
},
|
|
22303
|
-
"style": {
|
|
22304
|
-
border: 0,
|
|
22305
|
-
borderBottom: '1px solid #ddd'
|
|
22306
|
-
},
|
|
22307
|
-
"class": getClassName$6(_this.$props.innerClass, 'input'),
|
|
22308
|
-
"on": {
|
|
22309
|
-
"change": _this.handleInputChange
|
|
22351
|
+
}, [_this.$props.showSearch ? _this.renderSearchbox({
|
|
22352
|
+
on: {
|
|
22353
|
+
input: getInputEvents({
|
|
22354
|
+
onInput: _this.handleInputChange
|
|
22355
|
+
}).input
|
|
22310
22356
|
}
|
|
22311
22357
|
}) : null, !hasCustomRenderer && filteredItemsToRender.length === 0 ? _this.renderNoResult() : filteredItemsToRender.map(function (item, index) {
|
|
22312
22358
|
var selected = _this.$props.multi // MultiDropdownList
|
|
@@ -22361,6 +22407,7 @@
|
|
|
22361
22407
|
|
|
22362
22408
|
if (!this.$props.multi) {
|
|
22363
22409
|
this.isOpen = false;
|
|
22410
|
+
this.searchTerm = '';
|
|
22364
22411
|
}
|
|
22365
22412
|
},
|
|
22366
22413
|
handleStateChange: function handleStateChange(_ref2) {
|
|
@@ -22384,6 +22431,9 @@
|
|
|
22384
22431
|
var value = e.target.value;
|
|
22385
22432
|
this.searchTerm = value;
|
|
22386
22433
|
},
|
|
22434
|
+
clearSearchTerm: function clearSearchTerm() {
|
|
22435
|
+
this.searchTerm = '';
|
|
22436
|
+
},
|
|
22387
22437
|
renderToString: function renderToString(value) {
|
|
22388
22438
|
var _this2 = this;
|
|
22389
22439
|
|
|
@@ -22424,6 +22474,48 @@
|
|
|
22424
22474
|
return h("p", {
|
|
22425
22475
|
"class": getClassName$6(this.$props.innerClass, 'noResults') || null
|
|
22426
22476
|
}, [isFunction$1(renderNoResults) ? renderNoResults() : renderNoResults]);
|
|
22477
|
+
},
|
|
22478
|
+
renderSearchbox: function renderSearchbox(eventObject) {
|
|
22479
|
+
var h = this.$createElement;
|
|
22480
|
+
var _this$$props2 = this.$props,
|
|
22481
|
+
componentId = _this$$props2.componentId,
|
|
22482
|
+
searchPlaceholder = _this$$props2.searchPlaceholder,
|
|
22483
|
+
showClear = _this$$props2.showClear,
|
|
22484
|
+
themePreset = _this$$props2.themePreset,
|
|
22485
|
+
innerClass = _this$$props2.innerClass;
|
|
22486
|
+
var InputComponent = h(Input, helper$1([{
|
|
22487
|
+
"attrs": {
|
|
22488
|
+
"id": componentId + "-input",
|
|
22489
|
+
"showIcon": false,
|
|
22490
|
+
"showClear": showClear,
|
|
22491
|
+
"placeholder": searchPlaceholder,
|
|
22492
|
+
"value": this.$data.searchTerm,
|
|
22493
|
+
"themePreset": themePreset
|
|
22494
|
+
},
|
|
22495
|
+
"style": {
|
|
22496
|
+
border: 0,
|
|
22497
|
+
borderBottom: '1px solid #ddd'
|
|
22498
|
+
},
|
|
22499
|
+
"class": getClassName$6(innerClass, 'input')
|
|
22500
|
+
}, eventObject]));
|
|
22501
|
+
|
|
22502
|
+
if (showClear) {
|
|
22503
|
+
return h(InputWrapper, [InputComponent, this.searchTerm && h(IconGroup, {
|
|
22504
|
+
"attrs": {
|
|
22505
|
+
"groupPosition": "right",
|
|
22506
|
+
"positionType": "absolute"
|
|
22507
|
+
}
|
|
22508
|
+
}, [h(IconWrapper, {
|
|
22509
|
+
"on": {
|
|
22510
|
+
"click": this.clearSearchTerm
|
|
22511
|
+
},
|
|
22512
|
+
"attrs": {
|
|
22513
|
+
"isClearIcon": true
|
|
22514
|
+
}
|
|
22515
|
+
}, [h(CancelSvg)])])]);
|
|
22516
|
+
}
|
|
22517
|
+
|
|
22518
|
+
return InputComponent;
|
|
22427
22519
|
}
|
|
22428
22520
|
}
|
|
22429
22521
|
};
|
|
@@ -22482,10 +22574,12 @@
|
|
|
22482
22574
|
showMissing: VueTypes.bool.def(false),
|
|
22483
22575
|
missingLabel: VueTypes.string.def('N/A'),
|
|
22484
22576
|
showSearch: VueTypes.bool.def(false),
|
|
22577
|
+
showClear: VueTypes.bool.def(false),
|
|
22485
22578
|
showLoadMore: VueTypes.bool.def(false),
|
|
22486
22579
|
loadMoreLabel: VueTypes.oneOfType([VueTypes.string, VueTypes.any]).def('Load More'),
|
|
22487
22580
|
nestedField: types.string,
|
|
22488
|
-
index: VueTypes.string
|
|
22581
|
+
index: VueTypes.string,
|
|
22582
|
+
searchPlaceholder: VueTypes.string.def('Type here to search...')
|
|
22489
22583
|
},
|
|
22490
22584
|
created: function created() {
|
|
22491
22585
|
if (!this.enableAppbase && this.$props.index) {
|
|
@@ -22639,6 +22733,8 @@
|
|
|
22639
22733
|
"renderNoResults": this.$scopedSlots.renderNoResults || this.$props.renderNoResults,
|
|
22640
22734
|
"themePreset": this.themePreset,
|
|
22641
22735
|
"showSearch": this.$props.showSearch,
|
|
22736
|
+
"showClear": this.$props.showClear,
|
|
22737
|
+
"searchPlaceholder": this.$props.searchPlaceholder,
|
|
22642
22738
|
"transformData": this.$props.transformData,
|
|
22643
22739
|
"footer": showLoadMore && !isLastBucket && h("div", {
|
|
22644
22740
|
"attrs": {
|
|
@@ -22698,7 +22794,7 @@
|
|
|
22698
22794
|
updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
|
|
22699
22795
|
}
|
|
22700
22796
|
|
|
22701
|
-
this.setQueryOptions(this.internalComponent, defaultQueryOptions);
|
|
22797
|
+
this.setQueryOptions(this.internalComponent, defaultQueryOptions, false);
|
|
22702
22798
|
this.updateQuery({
|
|
22703
22799
|
componentId: this.internalComponent,
|
|
22704
22800
|
query: query,
|
|
@@ -22719,7 +22815,7 @@
|
|
|
22719
22815
|
updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
22720
22816
|
}
|
|
22721
22817
|
|
|
22722
|
-
this.setQueryOptions(props.componentId, customQueryOptions);
|
|
22818
|
+
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
22723
22819
|
this.updateQuery({
|
|
22724
22820
|
componentId: props.componentId,
|
|
22725
22821
|
query: query,
|
|
@@ -22931,10 +23027,12 @@
|
|
|
22931
23027
|
showMissing: VueTypes.bool.def(false),
|
|
22932
23028
|
missingLabel: VueTypes.string.def('N/A'),
|
|
22933
23029
|
showSearch: VueTypes.bool.def(false),
|
|
23030
|
+
showClear: VueTypes.bool.def(false),
|
|
22934
23031
|
showLoadMore: VueTypes.bool.def(false),
|
|
22935
23032
|
loadMoreLabel: VueTypes.oneOfType([VueTypes.string, VueTypes.any]).def('Load More'),
|
|
22936
23033
|
nestedField: types.string,
|
|
22937
|
-
index: VueTypes.string
|
|
23034
|
+
index: VueTypes.string,
|
|
23035
|
+
searchPlaceholder: VueTypes.string.def('Type here to search...')
|
|
22938
23036
|
},
|
|
22939
23037
|
created: function created() {
|
|
22940
23038
|
if (!this.enableAppbase && this.$props.index) {
|
|
@@ -23062,7 +23160,9 @@
|
|
|
23062
23160
|
if (!this.hasCustomRenderer && this.$data.modifiedOptions.length === 0 && !this.isLoading) {
|
|
23063
23161
|
if (renderNoResults && isFunction$1(renderNoResults)) {
|
|
23064
23162
|
return h("div", [renderNoResults()]);
|
|
23065
|
-
}
|
|
23163
|
+
}
|
|
23164
|
+
|
|
23165
|
+
if (renderNoResults && !isFunction$1(renderNoResults)) {
|
|
23066
23166
|
return renderNoResults;
|
|
23067
23167
|
}
|
|
23068
23168
|
|
|
@@ -23101,6 +23201,8 @@
|
|
|
23101
23201
|
"renderItem": renderItemCalc,
|
|
23102
23202
|
"renderNoResults": this.$scopedSlots.renderNoResults || this.$props.renderNoResults,
|
|
23103
23203
|
"showSearch": this.$props.showSearch,
|
|
23204
|
+
"showClear": this.$props.showClear,
|
|
23205
|
+
"searchPlaceholder": this.$props.searchPlaceholder,
|
|
23104
23206
|
"transformData": this.$props.transformData,
|
|
23105
23207
|
"footer": showLoadMore && !isLastBucket && h("div", {
|
|
23106
23208
|
"attrs": {
|
|
@@ -23192,7 +23294,7 @@
|
|
|
23192
23294
|
}
|
|
23193
23295
|
|
|
23194
23296
|
var performUpdate = function performUpdate() {
|
|
23195
|
-
_this3.currentValue = currentValue;
|
|
23297
|
+
_this3.currentValue = _extends({}, currentValue);
|
|
23196
23298
|
|
|
23197
23299
|
_this3.updateQueryHandler(finalValues, props);
|
|
23198
23300
|
|
|
@@ -23219,7 +23321,7 @@
|
|
|
23219
23321
|
updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
|
|
23220
23322
|
}
|
|
23221
23323
|
|
|
23222
|
-
this.setQueryOptions(this.internalComponent, defaultQueryOptions);
|
|
23324
|
+
this.setQueryOptions(this.internalComponent, defaultQueryOptions, false);
|
|
23223
23325
|
this.updateQuery({
|
|
23224
23326
|
componentId: this.internalComponent,
|
|
23225
23327
|
query: query,
|
|
@@ -23240,7 +23342,7 @@
|
|
|
23240
23342
|
updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
23241
23343
|
}
|
|
23242
23344
|
|
|
23243
|
-
this.setQueryOptions(props.componentId, customQueryOptions);
|
|
23345
|
+
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
23244
23346
|
this.updateQuery({
|
|
23245
23347
|
componentId: props.componentId,
|
|
23246
23348
|
query: query,
|
|
@@ -23605,7 +23707,7 @@
|
|
|
23605
23707
|
var _ref = customQuery(value, props) || {};
|
|
23606
23708
|
|
|
23607
23709
|
query = _ref.query;
|
|
23608
|
-
this.setQueryOptions(props.componentId, getOptionsFromQuery$6(customQuery(value, props)));
|
|
23710
|
+
this.setQueryOptions(props.componentId, getOptionsFromQuery$6(customQuery(value, props)), false);
|
|
23609
23711
|
updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
23610
23712
|
}
|
|
23611
23713
|
|
|
@@ -24134,7 +24236,8 @@
|
|
|
24134
24236
|
innerClass: types.style,
|
|
24135
24237
|
showClearAll: VueTypes.bool.def(true),
|
|
24136
24238
|
title: types.title,
|
|
24137
|
-
resetToDefault: VueTypes.bool.def(false)
|
|
24239
|
+
resetToDefault: VueTypes.bool.def(false),
|
|
24240
|
+
resetToValues: VueTypes.object
|
|
24138
24241
|
},
|
|
24139
24242
|
inject: {
|
|
24140
24243
|
theme: {
|
|
@@ -24187,15 +24290,16 @@
|
|
|
24187
24290
|
this.$emit('clear', component, value);
|
|
24188
24291
|
},
|
|
24189
24292
|
clearValues: function clearValues() {
|
|
24190
|
-
var resetToDefault = this.resetToDefault
|
|
24293
|
+
var resetToDefault = this.resetToDefault,
|
|
24294
|
+
resetToValues = this.resetToValues;
|
|
24191
24295
|
|
|
24192
24296
|
if (resetToDefault) {
|
|
24193
24297
|
this.resetValuesToDefault();
|
|
24194
24298
|
} else {
|
|
24195
|
-
this.clearValuesAction();
|
|
24299
|
+
this.clearValuesAction(resetToValues);
|
|
24196
24300
|
}
|
|
24197
24301
|
|
|
24198
|
-
this.$emit('clear',
|
|
24302
|
+
this.$emit('clear', resetToValues);
|
|
24199
24303
|
},
|
|
24200
24304
|
renderValue: function renderValue(value, isArray) {
|
|
24201
24305
|
var _this2 = this;
|
|
@@ -24430,7 +24534,7 @@
|
|
|
24430
24534
|
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
24431
24535
|
}
|
|
24432
24536
|
|
|
24433
|
-
this.setQueryOptions(props.componentId, customQueryOptions);
|
|
24537
|
+
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
24434
24538
|
this.updateQuery({
|
|
24435
24539
|
componentId: props.componentId,
|
|
24436
24540
|
query: query,
|
|
@@ -24639,7 +24743,7 @@
|
|
|
24639
24743
|
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
24640
24744
|
}
|
|
24641
24745
|
|
|
24642
|
-
this.setQueryOptions(props.componentId, customQueryOptions);
|
|
24746
|
+
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
24643
24747
|
this.updateQuery({
|
|
24644
24748
|
componentId: props.componentId,
|
|
24645
24749
|
query: query,
|
|
@@ -25082,14 +25186,14 @@
|
|
|
25082
25186
|
var vueNoSsr_common = index$2;
|
|
25083
25187
|
|
|
25084
25188
|
var _templateObject$m;
|
|
25085
|
-
var Slider = index$1('div')(_templateObject$m || (_templateObject$m = _taggedTemplateLiteralLoose(["\n\tmargin-top: 30px;\n\tpadding: 10px;\n\n\t/* component style */\n\t.vue-slider-disabled {\n\t\topacity: 0.5;\n\t\tcursor: not-allowed;\n\t}\n\n\t/* rail style */\n\t.vue-slider-rail {\n\t\tbackground-color: #ccc;\n\t\tborder-radius: 15px;\n\t\theight: 4px;\n\t}\n\n\t/* process style */\n\t.vue-slider-process {\n\t\tbackground-color: #0b6aff;\n\t\tborder-radius: 15px;\n\t}\n\n\t/* mark style */\n\t.vue-slider-mark {\n\t\tz-index: 4;\n\t}\n\n\t.vue-slider-mark:first-child .vue-slider-mark-step,\n\t.vue-slider-mark:last-child .vue-slider-mark-step {\n\t\tdisplay: none;\n\t}\n\n\t.vue-slider-mark-step {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tborder-radius: 50%;\n\t\tbackground-color: rgba(0, 0, 0, 0.16);\n\t}\n\n\t.vue-slider-mark-label {\n\t\tfont-size: 14px;\n\t\twhite-space: nowrap;\n\t}\n\n\t/* dot style */\n\t.vue-slider-dot{\n\t\tz-index: 2;\n\t}\n\n\t.vue-slider-dot-handle {\n\t\tcursor: pointer;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tborder-radius: 50%;\n\t\tbackground-color: #fff;\n\t\tbox-sizing: border-box;\n\t\tborder: 1px solid #9a9a9a;\n\t\tz-index: 2;\n\t}\n\n\t.vue-slider-dot-handle-disabled {\n\t\tcursor: not-allowed;\n\t\tbackground-color: #ccc;\n\t}\n\n\t.vue-slider-dot-tooltip-inner {\n\t\tfont-size: 14px;\n\t\twhite-space: nowrap;\n\t\tpadding: 2px 5px;\n\t\tmin-width: 20px;\n\t\ttext-align: center;\n\t\tcolor: #fff;\n\t\tborder-radius: 5px;\n\t\tborder
|
|
25189
|
+
var Slider = index$1('div')(_templateObject$m || (_templateObject$m = _taggedTemplateLiteralLoose(["\n\tmargin-top: 30px;\n\tpadding: 10px;\n\n\t/* component style */\n\t.vue-slider-disabled {\n\t\topacity: 0.5;\n\t\tcursor: not-allowed;\n\t}\n\n\t/* rail style */\n\t.vue-slider-rail {\n\t\tbackground-color: #ccc;\n\t\tborder-radius: 15px;\n\t\theight: 4px;\n\t}\n\n\t/* process style */\n\t.vue-slider-process {\n\t\tbackground-color: #0b6aff;\n\t\tborder-radius: 15px;\n\t}\n\n\t/* mark style */\n\t.vue-slider-mark {\n\t\tz-index: 4;\n\t}\n\n\t.vue-slider-mark:first-child .vue-slider-mark-step,\n\t.vue-slider-mark:last-child .vue-slider-mark-step {\n\t\tdisplay: none;\n\t}\n\n\t.vue-slider-mark-step {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tborder-radius: 50%;\n\t\tbackground-color: rgba(0, 0, 0, 0.16);\n\t}\n\n\t.vue-slider-mark-label {\n\t\tfont-size: 14px;\n\t\twhite-space: nowrap;\n\t}\n\n\t/* dot style */\n\t.vue-slider-dot {\n\t\tz-index: 2;\n\t}\n\n\t.vue-slider-dot-handle {\n\t\tcursor: pointer;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tborder-radius: 50%;\n\t\tbackground-color: #fff;\n\t\tbox-sizing: border-box;\n\t\tborder: 1px solid #9a9a9a;\n\t\tz-index: 2;\n\t\tbox-shadow: 0.5px 0.5px 2px 1px rgb(0 0 0 / 32%);\n\t}\n\n\t.vue-slider-dot-handle-disabled {\n\t\tcursor: not-allowed;\n\t\tbackground-color: #ccc;\n\t}\n\n\t.vue-slider-dot-tooltip-inner {\n\t\tfont-size: 14px;\n\t\twhite-space: nowrap;\n\t\tpadding: 2px 5px;\n\t\tmin-width: 20px;\n\t\ttext-align: center;\n\t\tcolor: #fff;\n\t\tborder-radius: 5px;\n\t\tborder: 1px solid #3498db;\n\t\tbackground-color: #3498db;\n\t\tbox-sizing: content-box;\n\t}\n\n\t.vue-slider-dot-tooltip-inner::after {\n\t\tcontent: '';\n\t\tposition: absolute;\n\t}\n\n\t.vue-slider-dot-tooltip-inner-top::after {\n\t\ttop: 100%;\n\t\tleft: 50%;\n\t\ttransform: translate(-50%, 0);\n\t\theight: 0;\n\t\twidth: 0;\n\t\tborder-color: transparent;\n\t\tborder-style: solid;\n\t\tborder-width: 5px;\n\t\tborder-top-color: inherit;\n\t}\n\n\t.vue-slider-dot-tooltip-inner-bottom::after {\n\t\tbottom: 100%;\n\t\tleft: 50%;\n\t\ttransform: translate(-50%, 0);\n\t\theight: 0;\n\t\twidth: 0;\n\t\tborder-color: transparent;\n\t\tborder-style: solid;\n\t\tborder-width: 5px;\n\t\tborder-bottom-color: inherit;\n\t}\n\n\t.vue-slider-dot-tooltip-inner-left::after {\n\t\tleft: 100%;\n\t\ttop: 50%;\n\t\ttransform: translate(0, -50%);\n\t\theight: 0;\n\t\twidth: 0;\n\t\tborder-color: transparent;\n\t\tborder-style: solid;\n\t\tborder-width: 5px;\n\t\tborder-left-color: inherit;\n\t}\n\n\t.vue-slider-dot-tooltip-inner-right::after {\n\t\tright: 100%;\n\t\ttop: 50%;\n\t\ttransform: translate(0, -50%);\n\t\theight: 0;\n\t\twidth: 0;\n\t\tborder-color: transparent;\n\t\tborder-style: solid;\n\t\tborder-width: 5px;\n\t\tborder-right-color: inherit;\n\t}\n\n\t.vue-slider-dot-tooltip-wrapper {\n\t\topacity: 0;\n\t\ttransition: all 0.3s;\n\t}\n\t.vue-slider-dot-tooltip-wrapper-show {\n\t\topacity: 1;\n\t}\n\n\t.label-container {\n\t\tmargin: 10px 0;\n\t\twidth: 100%;\n\t}\n\n\t.range-label-right {\n\t\tfloat: right;\n\t}\n"])));
|
|
25086
25190
|
|
|
25087
25191
|
/**
|
|
25088
25192
|
* Caution: Please do not change this file without having a discussion with the Team.
|
|
25089
25193
|
* Any change may break the umd build, we're directly replacing the line no: 14
|
|
25090
25194
|
* `
|
|
25091
25195
|
var s = document.createElement("script");
|
|
25092
|
-
s.setAttribute("src","https://cdn.jsdelivr.net/npm/vue-slider-component@2.
|
|
25196
|
+
s.setAttribute("src","https://cdn.jsdelivr.net/npm/vue-slider-component@3.2.15/dist/vue-slider-component.umd.min.js");
|
|
25093
25197
|
s.onload = function(){
|
|
25094
25198
|
var VueSlider = global['vue-slider-component'];
|
|
25095
25199
|
components['vue-slider-component'] = VueSlider;
|
|
@@ -25110,7 +25214,7 @@
|
|
|
25110
25214
|
// eslint-disable-next-line
|
|
25111
25215
|
|
|
25112
25216
|
var s = document.createElement("script");
|
|
25113
|
-
s.setAttribute("src","https://cdn.jsdelivr.net/npm/vue-slider-component@2.
|
|
25217
|
+
s.setAttribute("src","https://cdn.jsdelivr.net/npm/vue-slider-component@3.2.15/dist/vue-slider-component.umd.min.js");
|
|
25114
25218
|
s.onload = function(){
|
|
25115
25219
|
var VueSlider = global$1['vue-slider-component'];
|
|
25116
25220
|
components['vue-slider-component'] = VueSlider;
|
|
@@ -25185,32 +25289,28 @@
|
|
|
25185
25289
|
});
|
|
25186
25290
|
}
|
|
25187
25291
|
},
|
|
25188
|
-
handleSlider: function handleSlider(
|
|
25189
|
-
var
|
|
25190
|
-
|
|
25191
|
-
clearTimeout(this.handleSliderChange._tId);
|
|
25192
|
-
this.handleSliderChange._tId = setTimeout(function () {
|
|
25193
|
-
_this.handleSliderChange(values);
|
|
25194
|
-
}, 100);
|
|
25292
|
+
handleSlider: function handleSlider() {
|
|
25293
|
+
var sliderValues = this.$refs.slider.getValue();
|
|
25294
|
+
this.handleSliderChange(sliderValues);
|
|
25195
25295
|
},
|
|
25196
25296
|
handleChange: function handleChange(currentValue, props) {
|
|
25197
|
-
var
|
|
25297
|
+
var _this = this;
|
|
25198
25298
|
|
|
25199
25299
|
if (props === void 0) {
|
|
25200
25300
|
props = this.$props;
|
|
25201
25301
|
}
|
|
25202
25302
|
|
|
25203
25303
|
var performUpdate = function performUpdate() {
|
|
25204
|
-
|
|
25304
|
+
_this.currentValue = currentValue;
|
|
25205
25305
|
|
|
25206
|
-
|
|
25306
|
+
_this.updateQueryHandler([currentValue[0], currentValue[1]], props);
|
|
25207
25307
|
|
|
25208
|
-
|
|
25308
|
+
_this.$emit('valueChange', {
|
|
25209
25309
|
start: currentValue[0],
|
|
25210
25310
|
end: currentValue[1]
|
|
25211
25311
|
});
|
|
25212
25312
|
|
|
25213
|
-
|
|
25313
|
+
_this.$emit('value-change', {
|
|
25214
25314
|
start: currentValue[0],
|
|
25215
25315
|
end: currentValue[1]
|
|
25216
25316
|
});
|
|
@@ -25242,7 +25342,7 @@
|
|
|
25242
25342
|
currentEnd = value[1]; // check if the slider is at its initial position
|
|
25243
25343
|
|
|
25244
25344
|
var isInitialValue = currentStart === start && currentEnd === end;
|
|
25245
|
-
this.setQueryOptions(props.componentId, customQueryOptions);
|
|
25345
|
+
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
25246
25346
|
this.updateQuery({
|
|
25247
25347
|
componentId: props.componentId,
|
|
25248
25348
|
query: query,
|
|
@@ -25321,12 +25421,13 @@
|
|
|
25321
25421
|
"max": this.$props.range.end,
|
|
25322
25422
|
"dotSize": 20,
|
|
25323
25423
|
"height": 4,
|
|
25324
|
-
"enable-cross": false
|
|
25424
|
+
"enable-cross": false,
|
|
25425
|
+
"tooltip": "always"
|
|
25325
25426
|
},
|
|
25326
|
-
"
|
|
25327
|
-
|
|
25328
|
-
|
|
25329
|
-
})
|
|
25427
|
+
"on": {
|
|
25428
|
+
"drag-end": this.handleSlider
|
|
25429
|
+
},
|
|
25430
|
+
"props": _extends({}, this.$props.sliderOptions)
|
|
25330
25431
|
}), this.$props.rangeLabels && h("div", {
|
|
25331
25432
|
"class": "label-container"
|
|
25332
25433
|
}, [h("label", {
|
|
@@ -25440,7 +25541,8 @@
|
|
|
25440
25541
|
URLParams: VueTypes.bool.def(false),
|
|
25441
25542
|
sliderOptions: VueTypes.object.def({}),
|
|
25442
25543
|
nestedField: types.string,
|
|
25443
|
-
index: VueTypes.string
|
|
25544
|
+
index: VueTypes.string,
|
|
25545
|
+
value: types.range
|
|
25444
25546
|
},
|
|
25445
25547
|
data: function data() {
|
|
25446
25548
|
this.internalRangeComponent = this.$props.componentId + "__range__internal";
|
|
@@ -25486,6 +25588,8 @@
|
|
|
25486
25588
|
components = _this$$$store$getStat.components;
|
|
25487
25589
|
}
|
|
25488
25590
|
|
|
25591
|
+
var value = this.$props.value;
|
|
25592
|
+
|
|
25489
25593
|
if (this.destroyOnUnmount || components.indexOf(this.componentId) === -1) {
|
|
25490
25594
|
this.addComponent(this.componentId);
|
|
25491
25595
|
this.addComponent(this.internalRangeComponent);
|
|
@@ -25494,6 +25598,8 @@
|
|
|
25494
25598
|
this.handleChange(this.selectedValue);
|
|
25495
25599
|
} else if (this.selectedValue) {
|
|
25496
25600
|
this.handleChange(DynamicRangeSlider.parseValue(this.selectedValue, this.$props));
|
|
25601
|
+
} else if (value) {
|
|
25602
|
+
this.handleChange(DynamicRangeSlider.parseValue(value, this.$props));
|
|
25497
25603
|
} // get range before executing other queries
|
|
25498
25604
|
|
|
25499
25605
|
|
|
@@ -25512,6 +25618,13 @@
|
|
|
25512
25618
|
}
|
|
25513
25619
|
},
|
|
25514
25620
|
methods: {
|
|
25621
|
+
isControlled: function isControlled() {
|
|
25622
|
+
if (this.$props.value && this.$listeners) {
|
|
25623
|
+
return true;
|
|
25624
|
+
}
|
|
25625
|
+
|
|
25626
|
+
return false;
|
|
25627
|
+
},
|
|
25515
25628
|
setDefaultValue: function setDefaultValue(_ref) {
|
|
25516
25629
|
var start = _ref.start,
|
|
25517
25630
|
end = _ref.end;
|
|
@@ -25522,6 +25635,8 @@
|
|
|
25522
25635
|
defaultEnd = _this$$props$defaultV.end;
|
|
25523
25636
|
|
|
25524
25637
|
this.handleChange([defaultStart, defaultEnd]);
|
|
25638
|
+
} else if (this.isControlled()) {
|
|
25639
|
+
this.handleChange(DynamicRangeSlider.parseValue(this.$props.value), 'change');
|
|
25525
25640
|
} else {
|
|
25526
25641
|
this.currentValue = [start, end];
|
|
25527
25642
|
}
|
|
@@ -25569,8 +25684,18 @@
|
|
|
25569
25684
|
aggs: aggs
|
|
25570
25685
|
});
|
|
25571
25686
|
},
|
|
25572
|
-
handleSlider: function handleSlider(
|
|
25573
|
-
this.
|
|
25687
|
+
handleSlider: function handleSlider() {
|
|
25688
|
+
var sliderValues = this.$refs.slider.getValue();
|
|
25689
|
+
var value = this.$props.value;
|
|
25690
|
+
|
|
25691
|
+
if (value === undefined) {
|
|
25692
|
+
this.handleChange(sliderValues);
|
|
25693
|
+
} else {
|
|
25694
|
+
this.$emit('change', {
|
|
25695
|
+
start: sliderValues[0],
|
|
25696
|
+
end: sliderValues[1]
|
|
25697
|
+
});
|
|
25698
|
+
}
|
|
25574
25699
|
},
|
|
25575
25700
|
handleChange: function handleChange(currentValue) {
|
|
25576
25701
|
var _this2 = this;
|
|
@@ -25622,7 +25747,7 @@
|
|
|
25622
25747
|
currentEnd = value[1]; // check if the slider is at its initial position
|
|
25623
25748
|
|
|
25624
25749
|
var isInitialValue = currentStart === start && currentEnd === end;
|
|
25625
|
-
this.setQueryOptions(this.$props.componentId, customQueryOptions);
|
|
25750
|
+
this.setQueryOptions(this.$props.componentId, customQueryOptions, false);
|
|
25626
25751
|
this.updateQuery({
|
|
25627
25752
|
componentId: this.$props.componentId,
|
|
25628
25753
|
query: query,
|
|
@@ -25663,6 +25788,7 @@
|
|
|
25663
25788
|
start: this.range.start,
|
|
25664
25789
|
end: this.range.end
|
|
25665
25790
|
};
|
|
25791
|
+
this.$emit('change', value);
|
|
25666
25792
|
this.handleChange(DynamicRangeSlider.parseValue(value, this.$props));
|
|
25667
25793
|
},
|
|
25668
25794
|
range: function range(newValue, oldValue) {
|
|
@@ -25684,6 +25810,11 @@
|
|
|
25684
25810
|
if (!isQueryIdentical(newVal, oldVal, this.$data.currentValue, this.$props)) {
|
|
25685
25811
|
this.updateQueryHandler(this.$data.currentValue);
|
|
25686
25812
|
}
|
|
25813
|
+
},
|
|
25814
|
+
value: function value(newVal, oldVal) {
|
|
25815
|
+
if (!isEqual$e(newVal, oldVal)) {
|
|
25816
|
+
this.handleChange(DynamicRangeSlider.parseValue(newVal, this.$props));
|
|
25817
|
+
}
|
|
25687
25818
|
}
|
|
25688
25819
|
},
|
|
25689
25820
|
render: function render() {
|
|
@@ -25703,13 +25834,15 @@
|
|
|
25703
25834
|
}, [this.$props.title]), h(vueNoSsr_common, [h(Slider, {
|
|
25704
25835
|
"class": getClassName$e(this.$props.innerClass, 'slider')
|
|
25705
25836
|
}, [h("vue-slider-component", {
|
|
25837
|
+
"ref": "slider",
|
|
25706
25838
|
"attrs": {
|
|
25707
25839
|
"value": [Math.max(start, this.currentValue[0]), Math.min(end, this.currentValue[1])],
|
|
25708
25840
|
"min": Math.min(start, this.currentValue[0]),
|
|
25709
25841
|
"max": Math.max(end, this.currentValue[1]),
|
|
25710
25842
|
"dotSize": 20,
|
|
25711
25843
|
"height": 4,
|
|
25712
|
-
"enable-cross": false
|
|
25844
|
+
"enable-cross": false,
|
|
25845
|
+
"tooltip": "always"
|
|
25713
25846
|
},
|
|
25714
25847
|
"on": {
|
|
25715
25848
|
"drag-end": this.handleSlider
|
|
@@ -25755,7 +25888,11 @@
|
|
|
25755
25888
|
};
|
|
25756
25889
|
|
|
25757
25890
|
DynamicRangeSlider.parseValue = function (value) {
|
|
25758
|
-
|
|
25891
|
+
if (value) {
|
|
25892
|
+
return Array.isArray(value) ? value : [value.start, value.end];
|
|
25893
|
+
}
|
|
25894
|
+
|
|
25895
|
+
return [];
|
|
25759
25896
|
};
|
|
25760
25897
|
|
|
25761
25898
|
var mapStateToProps$e = function mapStateToProps(state, props) {
|
|
@@ -25811,6 +25948,10 @@
|
|
|
25811
25948
|
var defaultKeys = ['hits', 'value', 'aggregations', 'error'];
|
|
25812
25949
|
|
|
25813
25950
|
var filterProps = function filterProps(props) {
|
|
25951
|
+
if (props === void 0) {
|
|
25952
|
+
props = {};
|
|
25953
|
+
}
|
|
25954
|
+
|
|
25814
25955
|
return _extends({}, props, {
|
|
25815
25956
|
props: props.componentProps
|
|
25816
25957
|
});
|
|
@@ -25830,7 +25971,7 @@
|
|
|
25830
25971
|
return _ref = {}, _ref[componentIds] = state[componentIds], _ref;
|
|
25831
25972
|
}
|
|
25832
25973
|
|
|
25833
|
-
if (componentIds
|
|
25974
|
+
if (Array.isArray(componentIds)) {
|
|
25834
25975
|
var filteredState = {};
|
|
25835
25976
|
componentIds.forEach(function (componentId) {
|
|
25836
25977
|
filteredState[componentId] = state[componentId];
|
|
@@ -25869,7 +26010,7 @@
|
|
|
25869
26010
|
};
|
|
25870
26011
|
return this.__state;
|
|
25871
26012
|
},
|
|
25872
|
-
|
|
26013
|
+
created: function created() {
|
|
25873
26014
|
this.searchState = filterByKeys(getSearchState(filterProps(this.searchStateProps)), this.includeKeys);
|
|
25874
26015
|
},
|
|
25875
26016
|
computed: {
|
|
@@ -32980,7 +33121,7 @@
|
|
|
32980
33121
|
var react = component.react;
|
|
32981
33122
|
|
|
32982
33123
|
if (isInternalComponentPresent || isResultComponent) {
|
|
32983
|
-
react =
|
|
33124
|
+
react = helper_22(react, internalComponent);
|
|
32984
33125
|
}
|
|
32985
33126
|
|
|
32986
33127
|
dependencyTree = dependencyTreeReducer(dependencyTree, {
|
|
@@ -33026,7 +33167,7 @@
|
|
|
33026
33167
|
|
|
33027
33168
|
componentCollection.forEach(function (component) {
|
|
33028
33169
|
// eslint-disable-next-line
|
|
33029
|
-
var _buildQuery =
|
|
33170
|
+
var _buildQuery = helper_21(component.componentId, dependencyTree, queryList, queryOptions),
|
|
33030
33171
|
queryObj = _buildQuery.queryObj,
|
|
33031
33172
|
options = _buildQuery.options;
|
|
33032
33173
|
|
|
@@ -33235,7 +33376,7 @@
|
|
|
33235
33376
|
});
|
|
33236
33377
|
}
|
|
33237
33378
|
|
|
33238
|
-
var version = "1.16.0-alpha.
|
|
33379
|
+
var version = "1.16.0-alpha.31";
|
|
33239
33380
|
|
|
33240
33381
|
var _templateObject$o, _templateObject2$b;
|
|
33241
33382
|
|
|
@@ -33357,7 +33498,7 @@
|
|
|
33357
33498
|
}
|
|
33358
33499
|
},
|
|
33359
33500
|
handleOnChange: function handleOnChange(value) {
|
|
33360
|
-
this.handleChange(value, 'change');
|
|
33501
|
+
this.handleChange(value || this.$props.range, 'change');
|
|
33361
33502
|
},
|
|
33362
33503
|
handleValueChange: function handleValueChange(value) {
|
|
33363
33504
|
this.handleChange(value, 'value-change');
|
|
@@ -33412,6 +33553,10 @@
|
|
|
33412
33553
|
if (this.$props.defaultValue && this.$props.defaultValue.start && this.$props.defaultValue.end) {
|
|
33413
33554
|
this.handleChange(this.$props.defaultValue);
|
|
33414
33555
|
}
|
|
33556
|
+
|
|
33557
|
+
if (this.isControlled()) {
|
|
33558
|
+
this.handleChange(this.$props.value, 'change');
|
|
33559
|
+
}
|
|
33415
33560
|
},
|
|
33416
33561
|
render: function render() {
|
|
33417
33562
|
var h = arguments[0];
|