@appbaseio/reactivesearch-vue 1.16.0-alpha.27 → 1.16.0-alpha.30
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 +358 -243
- 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/DataSearch.js +31 -82
- package/dist/cjs/{DropDown-3c343026.js → DropDown-0359da33.js} +56 -21
- package/dist/cjs/DynamicRangeSlider.js +9 -6
- package/dist/cjs/MultiDropdownList.js +13 -7
- package/dist/cjs/MultiList.js +4 -4
- package/dist/cjs/MultiRange.js +2 -2
- package/dist/cjs/{Pagination-0b9ec0fc.js → Pagination-1b2320a7.js} +1 -1
- package/dist/cjs/RangeInput.js +3 -3
- package/dist/cjs/RangeSlider.js +17 -20
- package/dist/cjs/ReactiveBase.js +5 -3
- package/dist/cjs/ReactiveComponent.js +1 -1
- package/dist/cjs/ReactiveGoogleMap.js +2 -2
- package/dist/cjs/ReactiveList.js +6 -10
- package/dist/cjs/ResultCard.js +1 -1
- package/dist/cjs/ResultList.js +1 -1
- package/dist/cjs/SelectedFilters.js +7 -5
- package/dist/cjs/SingleDropdownList.js +13 -7
- package/dist/cjs/SingleList.js +5 -5
- package/dist/cjs/SingleRange.js +2 -2
- package/dist/cjs/StateProvider.js +6 -2
- package/dist/cjs/ToggleButton.js +2 -2
- package/dist/cjs/index.js +7 -5
- package/dist/cjs/initReactivesearch.js +19 -0
- package/dist/cjs/install.js +5 -5
- 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/DataSearch.js +21 -72
- package/dist/es/{DropDown-c5ab660f.js → DropDown-168b60f6.js} +55 -20
- package/dist/es/DynamicRangeSlider.js +9 -6
- package/dist/es/MultiDropdownList.js +13 -7
- package/dist/es/MultiList.js +4 -4
- package/dist/es/MultiRange.js +2 -2
- package/dist/es/{Pagination-e8216949.js → Pagination-b3e4054a.js} +1 -1
- package/dist/es/RangeInput.js +3 -3
- package/dist/es/RangeSlider.js +17 -20
- package/dist/es/ReactiveBase.js +5 -3
- package/dist/es/ReactiveComponent.js +1 -1
- package/dist/es/ReactiveGoogleMap.js +2 -2
- package/dist/es/ReactiveList.js +6 -10
- package/dist/es/ResultCard.js +1 -1
- package/dist/es/ResultList.js +1 -1
- package/dist/es/SelectedFilters.js +7 -5
- package/dist/es/SingleDropdownList.js +13 -7
- package/dist/es/SingleList.js +5 -5
- package/dist/es/SingleRange.js +2 -2
- package/dist/es/StateProvider.js +6 -2
- package/dist/es/ToggleButton.js +2 -2
- package/dist/es/index.js +7 -5
- package/dist/es/initReactivesearch.js +19 -0
- package/dist/es/install.js +5 -5
- 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
|
{
|
|
@@ -2756,7 +2767,12 @@
|
|
|
2756
2767
|
var aggsResponse = Object.values(action.aggregations) && Object.values(action.aggregations)[0];
|
|
2757
2768
|
var fieldName = Object.keys(action.aggregations)[0];
|
|
2758
2769
|
if (!aggsResponse) return state;
|
|
2759
|
-
var buckets =
|
|
2770
|
+
var buckets = [];
|
|
2771
|
+
|
|
2772
|
+
if (aggsResponse.buckets && Array.isArray(aggsResponse.buckets)) {
|
|
2773
|
+
buckets = aggsResponse.buckets;
|
|
2774
|
+
}
|
|
2775
|
+
|
|
2760
2776
|
var parsedAggs = buckets.map(function (bucket) {
|
|
2761
2777
|
var doc_count = bucket.doc_count,
|
|
2762
2778
|
key = bucket.key,
|
|
@@ -2782,7 +2798,7 @@
|
|
|
2782
2798
|
return state;
|
|
2783
2799
|
}
|
|
2784
2800
|
});
|
|
2785
|
-
unwrapExports(compositeAggsReducer_1);
|
|
2801
|
+
var compositeAggsReducer = unwrapExports(compositeAggsReducer_1);
|
|
2786
2802
|
|
|
2787
2803
|
var appliedSettingsReducer_1 = createCommonjsModule(function (module, exports) {
|
|
2788
2804
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4849,7 +4865,7 @@
|
|
|
4849
4865
|
Object.defineProperty(exports, "__esModule", {
|
|
4850
4866
|
value: true
|
|
4851
4867
|
});
|
|
4852
|
-
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;
|
|
4853
4869
|
|
|
4854
4870
|
var _extends = Object.assign || function (target) {
|
|
4855
4871
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -5663,37 +5679,45 @@
|
|
|
5663
5679
|
function isValidDateRangeQueryFormat(queryFormat) {
|
|
5664
5680
|
return Object.keys(_dateFormats2["default"]).includes(queryFormat);
|
|
5665
5681
|
}
|
|
5682
|
+
|
|
5683
|
+
var suggestionTypes = exports.suggestionTypes = {
|
|
5684
|
+
Popular: 'popular',
|
|
5685
|
+
Index: 'index',
|
|
5686
|
+
Recent: 'recent',
|
|
5687
|
+
Promoted: 'promoted'
|
|
5688
|
+
};
|
|
5666
5689
|
});
|
|
5667
5690
|
unwrapExports(helper);
|
|
5668
|
-
var helper_1 = helper.
|
|
5669
|
-
var helper_2 = helper.
|
|
5670
|
-
var helper_3 = helper.
|
|
5671
|
-
var helper_4 = helper.
|
|
5672
|
-
var helper_5 = helper.
|
|
5673
|
-
var helper_6 = helper.
|
|
5674
|
-
var helper_7 = helper.
|
|
5675
|
-
var helper_8 = helper.
|
|
5676
|
-
var helper_9 = helper.
|
|
5677
|
-
var helper_10 = helper.
|
|
5678
|
-
var helper_11 = helper.
|
|
5679
|
-
var helper_12 = helper.
|
|
5680
|
-
var helper_13 = helper.
|
|
5681
|
-
var helper_14 = helper.
|
|
5682
|
-
var helper_15 = helper.
|
|
5683
|
-
var helper_16 = helper.
|
|
5684
|
-
var helper_17 = helper.
|
|
5685
|
-
var helper_18 = helper.
|
|
5686
|
-
var helper_19 = helper.
|
|
5687
|
-
var helper_20 = helper.
|
|
5688
|
-
var helper_21 = helper.
|
|
5689
|
-
var helper_22 = helper.
|
|
5690
|
-
var helper_23 = helper.
|
|
5691
|
-
var helper_24 = helper.
|
|
5692
|
-
var helper_25 = helper.
|
|
5693
|
-
var helper_26 = helper.
|
|
5694
|
-
var helper_27 = helper.
|
|
5695
|
-
var helper_28 = helper.
|
|
5696
|
-
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;
|
|
5697
5721
|
|
|
5698
5722
|
var value = createCommonjsModule(function (module, exports) {
|
|
5699
5723
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5815,8 +5839,10 @@
|
|
|
5815
5839
|
}
|
|
5816
5840
|
|
|
5817
5841
|
function clearValues() {
|
|
5842
|
+
var resetValues = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
5818
5843
|
return {
|
|
5819
|
-
type: constants.CLEAR_VALUES
|
|
5844
|
+
type: constants.CLEAR_VALUES,
|
|
5845
|
+
resetValues: resetValues
|
|
5820
5846
|
};
|
|
5821
5847
|
}
|
|
5822
5848
|
});
|
|
@@ -6044,6 +6070,76 @@
|
|
|
6044
6070
|
var misc_19 = misc.setAppliedSettings;
|
|
6045
6071
|
var misc_20 = misc.setQueryListener;
|
|
6046
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
|
+
|
|
6047
6143
|
var xdate = createCommonjsModule(function (module) {
|
|
6048
6144
|
/**
|
|
6049
6145
|
* @preserve XDate v@VERSION
|
|
@@ -7313,7 +7409,8 @@
|
|
|
7313
7409
|
execute = true;
|
|
7314
7410
|
}
|
|
7315
7411
|
|
|
7316
|
-
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 ? {
|
|
7317
7414
|
type: constants$1.queryTypes.search
|
|
7318
7415
|
} : {}, calcValues.category ? {
|
|
7319
7416
|
categoryValue: calcValues.category
|
|
@@ -7344,79 +7441,6 @@
|
|
|
7344
7441
|
var transform_13 = transform.componentToTypeMap;
|
|
7345
7442
|
var transform_14 = transform.flatReactProp;
|
|
7346
7443
|
|
|
7347
|
-
var hits = createCommonjsModule(function (module, exports) {
|
|
7348
|
-
Object.defineProperty(exports, "__esModule", {
|
|
7349
|
-
value: true
|
|
7350
|
-
});
|
|
7351
|
-
exports.updateAggs = updateAggs;
|
|
7352
|
-
exports.updateCompositeAggs = updateCompositeAggs;
|
|
7353
|
-
exports.updateHits = updateHits;
|
|
7354
|
-
exports.saveQueryToHits = saveQueryToHits;
|
|
7355
|
-
exports.mockDataForTesting = mockDataForTesting;
|
|
7356
|
-
|
|
7357
|
-
function updateAggs(component, aggregations) {
|
|
7358
|
-
var append = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
7359
|
-
return {
|
|
7360
|
-
type: constants.UPDATE_AGGS,
|
|
7361
|
-
component: component,
|
|
7362
|
-
aggregations: aggregations,
|
|
7363
|
-
append: append
|
|
7364
|
-
};
|
|
7365
|
-
}
|
|
7366
|
-
|
|
7367
|
-
function updateCompositeAggs(component, aggregations) {
|
|
7368
|
-
var append = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
7369
|
-
return {
|
|
7370
|
-
type: constants.UPDATE_COMPOSITE_AGGS,
|
|
7371
|
-
component: component,
|
|
7372
|
-
aggregations: aggregations,
|
|
7373
|
-
append: append
|
|
7374
|
-
};
|
|
7375
|
-
}
|
|
7376
|
-
|
|
7377
|
-
function updateHits(component, hits, time, hidden) {
|
|
7378
|
-
var append = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
7379
|
-
return {
|
|
7380
|
-
type: constants.UPDATE_HITS,
|
|
7381
|
-
component: component,
|
|
7382
|
-
hits: hits.hits,
|
|
7383
|
-
total: typeof hits.total === 'object' ? hits.total.value : hits.total,
|
|
7384
|
-
hidden: hidden,
|
|
7385
|
-
time: time,
|
|
7386
|
-
append: append
|
|
7387
|
-
};
|
|
7388
|
-
}
|
|
7389
|
-
|
|
7390
|
-
function saveQueryToHits(component, query) {
|
|
7391
|
-
return {
|
|
7392
|
-
type: constants.SET_QUERY_TO_HITS,
|
|
7393
|
-
component: component,
|
|
7394
|
-
query: query
|
|
7395
|
-
};
|
|
7396
|
-
}
|
|
7397
|
-
|
|
7398
|
-
function mockDataForTesting(component, data) {
|
|
7399
|
-
return function (dispatch, getState) {
|
|
7400
|
-
var _getState = getState(),
|
|
7401
|
-
props = _getState.props;
|
|
7402
|
-
|
|
7403
|
-
var componentProps = props[component];
|
|
7404
|
-
|
|
7405
|
-
if (transform.componentToTypeMap[componentProps.componentType] === 'term') {
|
|
7406
|
-
dispatch(updateAggs(component, data));
|
|
7407
|
-
} else {
|
|
7408
|
-
dispatch(updateHits(component, data));
|
|
7409
|
-
}
|
|
7410
|
-
};
|
|
7411
|
-
}
|
|
7412
|
-
});
|
|
7413
|
-
unwrapExports(hits);
|
|
7414
|
-
var hits_1 = hits.updateAggs;
|
|
7415
|
-
var hits_2 = hits.updateCompositeAggs;
|
|
7416
|
-
var hits_3 = hits.updateHits;
|
|
7417
|
-
var hits_4 = hits.saveQueryToHits;
|
|
7418
|
-
var hits_5 = hits.mockDataForTesting;
|
|
7419
|
-
|
|
7420
7444
|
var utils = createCommonjsModule(function (module, exports) {
|
|
7421
7445
|
Object.defineProperty(exports, "__esModule", {
|
|
7422
7446
|
value: true
|
|
@@ -8361,6 +8385,20 @@
|
|
|
8361
8385
|
value: true
|
|
8362
8386
|
});
|
|
8363
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
|
+
|
|
8364
8402
|
var _crossFetch2 = _interopRequireDefault(browserPonyfill);
|
|
8365
8403
|
|
|
8366
8404
|
function _interopRequireDefault(obj) {
|
|
@@ -8369,20 +8407,26 @@
|
|
|
8369
8407
|
};
|
|
8370
8408
|
}
|
|
8371
8409
|
|
|
8372
|
-
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;
|
|
8373
8417
|
var fetchUrl = credentials ? url.replace('//', '//' + credentials + '@') : url;
|
|
8374
8418
|
return (0, _crossFetch2["default"])(graphQLUrl, {
|
|
8375
8419
|
method: 'POST',
|
|
8376
|
-
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) {
|
|
8377
8421
|
return JSON.stringify(item);
|
|
8378
8422
|
})) + '\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t}\n\t\t',
|
|
8379
|
-
headers: {
|
|
8423
|
+
headers: _extends({}, headers, {
|
|
8380
8424
|
'Content-Type': 'application/graphql'
|
|
8381
|
-
}
|
|
8425
|
+
})
|
|
8382
8426
|
}).then(function (res) {
|
|
8383
8427
|
return res.json();
|
|
8384
8428
|
}).then(function (jsonRes) {
|
|
8385
|
-
return jsonRes.data.
|
|
8429
|
+
return jsonRes.data.elastic77.msearch;
|
|
8386
8430
|
})["catch"](function (error) {
|
|
8387
8431
|
console.error(error);
|
|
8388
8432
|
});
|
|
@@ -8492,6 +8536,15 @@
|
|
|
8492
8536
|
};
|
|
8493
8537
|
}
|
|
8494
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
|
+
|
|
8495
8548
|
function msearch(query, orderOfQueries) {
|
|
8496
8549
|
var appendToHits = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
8497
8550
|
var isInternalComponent = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
@@ -8542,14 +8595,6 @@
|
|
|
8542
8595
|
}
|
|
8543
8596
|
}
|
|
8544
8597
|
|
|
8545
|
-
if (config.analyticsConfig.searchStateHeader) {
|
|
8546
|
-
var searchState = (0, helper.getSearchState)(getState(), true);
|
|
8547
|
-
|
|
8548
|
-
if (searchState && Object.keys(searchState).length) {
|
|
8549
|
-
searchHeaders['X-Search-State'] = JSON.stringify(searchState);
|
|
8550
|
-
}
|
|
8551
|
-
}
|
|
8552
|
-
|
|
8553
8598
|
if (config.analyticsConfig.userId) {
|
|
8554
8599
|
searchHeaders['X-User-Id'] = config.analyticsConfig.userId;
|
|
8555
8600
|
}
|
|
@@ -8565,14 +8610,29 @@
|
|
|
8565
8610
|
});
|
|
8566
8611
|
|
|
8567
8612
|
if (config.graphQLUrl) {
|
|
8568
|
-
|
|
8569
|
-
|
|
8570
|
-
|
|
8571
|
-
|
|
8572
|
-
|
|
8573
|
-
|
|
8574
|
-
|
|
8575
|
-
|
|
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
|
+
});
|
|
8576
8636
|
})["catch"](function (err) {
|
|
8577
8637
|
(0, utils.handleError)({
|
|
8578
8638
|
orderOfQueries: orderOfQueries,
|
|
@@ -8769,7 +8829,7 @@
|
|
|
8769
8829
|
var isInternalComponent = componentId.endsWith('__internal');
|
|
8770
8830
|
var mainComponentProps = props[componentId];
|
|
8771
8831
|
|
|
8772
|
-
if (isInternalComponent && (0, transform.isSearchComponent)(mainComponentProps.componentType)) {
|
|
8832
|
+
if (isInternalComponent && mainComponentProps && (0, transform.isSearchComponent)(mainComponentProps.componentType)) {
|
|
8773
8833
|
value$1 = internalValues[componentId] && internalValues[componentId].value;
|
|
8774
8834
|
}
|
|
8775
8835
|
|
|
@@ -12875,19 +12935,19 @@
|
|
|
12875
12935
|
unit: VueTypes.oneOf(['mi', 'miles', 'yd', 'yards', 'ft', 'feet', 'in', 'inch', 'km', 'kilometers', 'm', 'meters', 'cm', 'centimeters', 'mm', 'millimeters', 'NM', 'nmi', 'nauticalmiles']),
|
|
12876
12936
|
value: VueTypes.string.def(undefined),
|
|
12877
12937
|
analyticsConfig: VueTypes.shape({
|
|
12878
|
-
searchStateHeader: VueTypes.bool,
|
|
12879
12938
|
emptyQuery: VueTypes.bool,
|
|
12880
12939
|
suggestionAnalytics: VueTypes.bool,
|
|
12881
12940
|
userId: VueTypes.string,
|
|
12882
12941
|
customEvents: VueTypes.object
|
|
12883
12942
|
}),
|
|
12884
12943
|
appbaseConfig: VueTypes.shape({
|
|
12885
|
-
enableQueryRules: VueTypes.bool,
|
|
12886
12944
|
recordAnalytics: VueTypes.bool,
|
|
12887
|
-
searchStateHeader: VueTypes.bool,
|
|
12888
12945
|
emptyQuery: VueTypes.bool,
|
|
12889
12946
|
suggestionAnalytics: VueTypes.bool,
|
|
12947
|
+
enableQueryRules: VueTypes.bool,
|
|
12948
|
+
enableSearchRelevancy: VueTypes.bool,
|
|
12890
12949
|
userId: VueTypes.string,
|
|
12950
|
+
useCache: VueTypes.bool,
|
|
12891
12951
|
customEvents: VueTypes.object,
|
|
12892
12952
|
enableTelemetry: VueTypes.bool.def(true)
|
|
12893
12953
|
}).def({}),
|
|
@@ -14062,7 +14122,7 @@
|
|
|
14062
14122
|
},
|
|
14063
14123
|
props: {
|
|
14064
14124
|
currentPage: VueTypes.number.def(0),
|
|
14065
|
-
includeFields: types.includeFields
|
|
14125
|
+
includeFields: types.includeFields,
|
|
14066
14126
|
// component props
|
|
14067
14127
|
className: types.string,
|
|
14068
14128
|
componentId: types.stringRequired,
|
|
@@ -14071,7 +14131,7 @@
|
|
|
14071
14131
|
aggregationSize: VueTypes.number,
|
|
14072
14132
|
defaultQuery: types.func,
|
|
14073
14133
|
defaultSortOption: types.string,
|
|
14074
|
-
excludeFields: types.excludeFields
|
|
14134
|
+
excludeFields: types.excludeFields,
|
|
14075
14135
|
innerClass: types.style,
|
|
14076
14136
|
listClass: VueTypes.string.def(''),
|
|
14077
14137
|
loader: types.title,
|
|
@@ -14083,7 +14143,7 @@
|
|
|
14083
14143
|
pages: VueTypes.number.def(5),
|
|
14084
14144
|
pagination: VueTypes.bool.def(false),
|
|
14085
14145
|
infiniteScroll: VueTypes.bool.def(true),
|
|
14086
|
-
paginationAt:
|
|
14146
|
+
paginationAt: VueTypes.oneOf(['top', 'bottom', 'both']).def('bottom'),
|
|
14087
14147
|
react: types.react,
|
|
14088
14148
|
scrollOnChange: VueTypes.bool.def(true),
|
|
14089
14149
|
showResultStats: VueTypes.bool.def(true),
|
|
@@ -14143,7 +14203,7 @@
|
|
|
14143
14203
|
filteredResults = [].concat(parsedPromotedResults, filteredResults);
|
|
14144
14204
|
}
|
|
14145
14205
|
|
|
14146
|
-
return
|
|
14206
|
+
return helper_3(filteredResults);
|
|
14147
14207
|
}
|
|
14148
14208
|
},
|
|
14149
14209
|
watch: {
|
|
@@ -14711,11 +14771,7 @@
|
|
|
14711
14771
|
}; // Only used for SSR
|
|
14712
14772
|
|
|
14713
14773
|
ReactiveList.generateQueryOptions = function (props) {
|
|
14714
|
-
|
|
14715
|
-
var options = getQueryOptions(_extends({
|
|
14716
|
-
includeFields: ['*'],
|
|
14717
|
-
excludeFields: []
|
|
14718
|
-
}, props));
|
|
14774
|
+
var options = getQueryOptions(props);
|
|
14719
14775
|
var size = props.size,
|
|
14720
14776
|
dataField = props.dataField,
|
|
14721
14777
|
defaultSortOption = props.defaultSortOption,
|
|
@@ -16797,7 +16853,7 @@
|
|
|
16797
16853
|
headers: types.headers,
|
|
16798
16854
|
getSearchParams: types.func,
|
|
16799
16855
|
setSearchParams: types.func,
|
|
16800
|
-
as:
|
|
16856
|
+
as: VueTypes.string.def('div')
|
|
16801
16857
|
},
|
|
16802
16858
|
mounted: function mounted() {
|
|
16803
16859
|
var _this = this;
|
|
@@ -16945,7 +17001,9 @@
|
|
|
16945
17001
|
return value.map(function (item) {
|
|
16946
17002
|
return _this3.getValue(item);
|
|
16947
17003
|
});
|
|
16948
|
-
}
|
|
17004
|
+
}
|
|
17005
|
+
|
|
17006
|
+
if (value && typeof value === 'object') {
|
|
16949
17007
|
// TODO: support for NestedList
|
|
16950
17008
|
if (value.location) return value;
|
|
16951
17009
|
if (value.category) return value;
|
|
@@ -17119,14 +17177,14 @@
|
|
|
17119
17177
|
this.updateState(this.$props);
|
|
17120
17178
|
},
|
|
17121
17179
|
analyticsConfig: function analyticsConfig(newVal, oldVal) {
|
|
17122
|
-
if (!
|
|
17180
|
+
if (!helper_18(newVal, oldVal)) {
|
|
17123
17181
|
if (this.store) {
|
|
17124
17182
|
this.store.dispatch(analytics_3$1(newVal));
|
|
17125
17183
|
}
|
|
17126
17184
|
}
|
|
17127
17185
|
},
|
|
17128
17186
|
appbaseConfig: function appbaseConfig(newVal, oldVal) {
|
|
17129
|
-
if (!
|
|
17187
|
+
if (!helper_18(newVal, oldVal)) {
|
|
17130
17188
|
if (this.store) {
|
|
17131
17189
|
this.store.dispatch(analytics_3$1(newVal));
|
|
17132
17190
|
}
|
|
@@ -18059,8 +18117,7 @@
|
|
|
18059
18117
|
internal_isOpen: false,
|
|
18060
18118
|
internal_inputValue: '',
|
|
18061
18119
|
internal_selectedItem: null,
|
|
18062
|
-
internal_highlightedIndex: null
|
|
18063
|
-
internal_eventsCalled: {}
|
|
18120
|
+
internal_highlightedIndex: null
|
|
18064
18121
|
};
|
|
18065
18122
|
},
|
|
18066
18123
|
computed: {
|
|
@@ -18245,23 +18302,11 @@
|
|
|
18245
18302
|
}
|
|
18246
18303
|
|
|
18247
18304
|
var vm = this;
|
|
18248
|
-
setTimeout(function () {
|
|
18249
|
-
vm.internal_eventsCalled[index] = false;
|
|
18250
|
-
}, 0);
|
|
18251
18305
|
return {
|
|
18252
18306
|
mouseenter: function mouseenter() {
|
|
18253
18307
|
vm.setHighlightedIndex(newIndex);
|
|
18254
18308
|
},
|
|
18255
|
-
// for browsers not supporting click event (e.g. firefox android)
|
|
18256
|
-
mousedown: function mousedown(event) {
|
|
18257
|
-
if (vm.internal_eventsCalled[index]) return;
|
|
18258
|
-
vm.internal_eventsCalled[index] = true;
|
|
18259
|
-
event.stopPropagation();
|
|
18260
|
-
vm.selectItemAtIndex(newIndex);
|
|
18261
|
-
},
|
|
18262
18309
|
click: function click(event) {
|
|
18263
|
-
if (vm.internal_eventsCalled[index]) return;
|
|
18264
|
-
vm.internal_eventsCalled[index] = true;
|
|
18265
18310
|
event.stopPropagation();
|
|
18266
18311
|
vm.selectItemAtIndex(newIndex);
|
|
18267
18312
|
}
|
|
@@ -19509,8 +19554,8 @@
|
|
|
19509
19554
|
name: 'Mic',
|
|
19510
19555
|
props: {
|
|
19511
19556
|
children: types.title,
|
|
19512
|
-
lang:
|
|
19513
|
-
iconPosition:
|
|
19557
|
+
lang: VueTypes.string.def('en-US'),
|
|
19558
|
+
iconPosition: VueTypes.string.def('left'),
|
|
19514
19559
|
handleResult: types.func,
|
|
19515
19560
|
onNoMatch: types.func,
|
|
19516
19561
|
onError: types.func,
|
|
@@ -19922,10 +19967,10 @@
|
|
|
19922
19967
|
})]),
|
|
19923
19968
|
aggregationField: types.string,
|
|
19924
19969
|
aggregationSize: VueTypes.number,
|
|
19925
|
-
size: VueTypes.number
|
|
19970
|
+
size: VueTypes.number,
|
|
19926
19971
|
debounce: VueTypes.number.def(0),
|
|
19927
19972
|
defaultValue: types.string,
|
|
19928
|
-
excludeFields: types.excludeFields
|
|
19973
|
+
excludeFields: types.excludeFields,
|
|
19929
19974
|
value: types.value,
|
|
19930
19975
|
defaultSuggestions: types.suggestions,
|
|
19931
19976
|
enableSynonyms: VueTypes.bool.def(true),
|
|
@@ -19939,9 +19984,9 @@
|
|
|
19939
19984
|
highlightField: types.stringOrArray,
|
|
19940
19985
|
icon: types.children,
|
|
19941
19986
|
iconPosition: VueTypes.oneOf(['left', 'right']).def('left'),
|
|
19942
|
-
includeFields: types.includeFields
|
|
19987
|
+
includeFields: types.includeFields,
|
|
19943
19988
|
innerClass: types.style,
|
|
19944
|
-
innerRef:
|
|
19989
|
+
innerRef: VueTypes.string.def('searchInputField'),
|
|
19945
19990
|
render: types.func,
|
|
19946
19991
|
renderQuerySuggestions: types.func,
|
|
19947
19992
|
renderPopularSuggestions: types.func,
|
|
@@ -19973,7 +20018,7 @@
|
|
|
19973
20018
|
focusShortcuts: VueTypes.arrayOf(VueTypes.oneOfType([VueTypes.string, VueTypes.number])).def(['/']),
|
|
19974
20019
|
addonBefore: VueTypes.any,
|
|
19975
20020
|
addonAfter: VueTypes.any,
|
|
19976
|
-
expandSuggestionsContainer:
|
|
20021
|
+
expandSuggestionsContainer: VueTypes.bool.def(true),
|
|
19977
20022
|
index: VueTypes.string
|
|
19978
20023
|
},
|
|
19979
20024
|
beforeMount: function beforeMount() {
|
|
@@ -20142,7 +20187,7 @@
|
|
|
20142
20187
|
// returns size and aggs property
|
|
20143
20188
|
getBasicQueryOptions: function getBasicQueryOptions() {
|
|
20144
20189
|
var aggregationField = this.$props.aggregationField;
|
|
20145
|
-
var queryOptions =
|
|
20190
|
+
var queryOptions = helper_20(this.$props);
|
|
20146
20191
|
|
|
20147
20192
|
if (aggregationField) {
|
|
20148
20193
|
queryOptions.aggs = getCompositeAggsQuery$1({
|
|
@@ -20248,7 +20293,7 @@
|
|
|
20248
20293
|
updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
|
|
20249
20294
|
}
|
|
20250
20295
|
|
|
20251
|
-
this.setQueryOptions(this.internalComponent, _extends({}, this.queryOptions, defaultQueryOptions));
|
|
20296
|
+
this.setQueryOptions(this.internalComponent, _extends({}, this.queryOptions, defaultQueryOptions), false);
|
|
20252
20297
|
this.updateQuery({
|
|
20253
20298
|
componentId: this.internalComponent,
|
|
20254
20299
|
query: query,
|
|
@@ -20275,7 +20320,7 @@
|
|
|
20275
20320
|
|
|
20276
20321
|
customQueryOptions = getOptionsFromQuery$1(customQueryTobeSet);
|
|
20277
20322
|
updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
20278
|
-
this.setQueryOptions(componentId, _extends({}, this.queryOptions, customQueryOptions));
|
|
20323
|
+
this.setQueryOptions(componentId, _extends({}, this.queryOptions, customQueryOptions), false);
|
|
20279
20324
|
}
|
|
20280
20325
|
|
|
20281
20326
|
if (!this.isPending) {
|
|
@@ -20634,7 +20679,7 @@
|
|
|
20634
20679
|
highlightedIndex: highlightedIndex
|
|
20635
20680
|
}), _this3.renderErrorComponent(), !_this3.hasCustomRenderer && isOpen && hasSuggestions ? h("ul", {
|
|
20636
20681
|
"class": suggestions$1(_this3.themePreset, theme) + " " + getClassName$3(_this3.$props.innerClass, 'list')
|
|
20637
|
-
}, [_this3.suggestionsList.slice(0, size).map(function (item, index) {
|
|
20682
|
+
}, [_this3.suggestionsList.slice(0, size || 10).map(function (item, index) {
|
|
20638
20683
|
return h("li", {
|
|
20639
20684
|
"domProps": _extends({}, getItemProps({
|
|
20640
20685
|
item: item
|
|
@@ -21113,7 +21158,7 @@
|
|
|
21113
21158
|
name: 'SingleList',
|
|
21114
21159
|
props: {
|
|
21115
21160
|
beforeValueChange: types.func,
|
|
21116
|
-
className:
|
|
21161
|
+
className: VueTypes.string.def(''),
|
|
21117
21162
|
componentId: types.stringRequired,
|
|
21118
21163
|
customQuery: types.func,
|
|
21119
21164
|
dataField: types.stringRequired,
|
|
@@ -21133,7 +21178,7 @@
|
|
|
21133
21178
|
showFilter: VueTypes.bool.def(true),
|
|
21134
21179
|
showRadio: VueTypes.bool.def(true),
|
|
21135
21180
|
showSearch: VueTypes.bool.def(true),
|
|
21136
|
-
size: VueTypes.number
|
|
21181
|
+
size: VueTypes.number,
|
|
21137
21182
|
sortBy: VueTypes.oneOf(['asc', 'desc', 'count']).def('count'),
|
|
21138
21183
|
title: types.title,
|
|
21139
21184
|
URLParams: VueTypes.bool.def(false),
|
|
@@ -21360,7 +21405,7 @@
|
|
|
21360
21405
|
updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
|
|
21361
21406
|
}
|
|
21362
21407
|
|
|
21363
|
-
this.setQueryOptions(this.internalComponent, defaultQueryOptions);
|
|
21408
|
+
this.setQueryOptions(this.internalComponent, defaultQueryOptions, false);
|
|
21364
21409
|
this.updateQuery({
|
|
21365
21410
|
componentId: this.internalComponent,
|
|
21366
21411
|
query: query,
|
|
@@ -21381,7 +21426,7 @@
|
|
|
21381
21426
|
updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
21382
21427
|
}
|
|
21383
21428
|
|
|
21384
|
-
this.setQueryOptions(props.componentId, customQueryOptions);
|
|
21429
|
+
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
21385
21430
|
this.updateQuery({
|
|
21386
21431
|
componentId: props.componentId,
|
|
21387
21432
|
query: query,
|
|
@@ -21594,7 +21639,7 @@
|
|
|
21594
21639
|
queryFormat: VueTypes.oneOf(['and', 'or']).def('or'),
|
|
21595
21640
|
showCheckbox: VueTypes.bool.def(true),
|
|
21596
21641
|
beforeValueChange: types.func,
|
|
21597
|
-
className:
|
|
21642
|
+
className: VueTypes.string.def(''),
|
|
21598
21643
|
componentId: types.stringRequired,
|
|
21599
21644
|
customQuery: types.func,
|
|
21600
21645
|
dataField: types.stringRequired,
|
|
@@ -21909,7 +21954,7 @@
|
|
|
21909
21954
|
updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
|
|
21910
21955
|
}
|
|
21911
21956
|
|
|
21912
|
-
this.setQueryOptions(this.internalComponent, defaultQueryOptions);
|
|
21957
|
+
this.setQueryOptions(this.internalComponent, defaultQueryOptions, false);
|
|
21913
21958
|
this.updateQuery({
|
|
21914
21959
|
componentId: this.internalComponent,
|
|
21915
21960
|
query: query,
|
|
@@ -21930,7 +21975,7 @@
|
|
|
21930
21975
|
updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
21931
21976
|
}
|
|
21932
21977
|
|
|
21933
|
-
this.setQueryOptions(props.componentId, customQueryOptions);
|
|
21978
|
+
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
21934
21979
|
this.updateQuery({
|
|
21935
21980
|
componentId: props.componentId,
|
|
21936
21981
|
query: query,
|
|
@@ -22215,7 +22260,9 @@
|
|
|
22215
22260
|
single: VueTypes.bool,
|
|
22216
22261
|
small: VueTypes.bool.def(false),
|
|
22217
22262
|
themePreset: types.themePreset,
|
|
22218
|
-
showSearch: VueTypes.bool
|
|
22263
|
+
showSearch: VueTypes.bool,
|
|
22264
|
+
showClear: VueTypes.bool,
|
|
22265
|
+
searchPlaceholder: VueTypes.string.def('Type here to search...')
|
|
22219
22266
|
},
|
|
22220
22267
|
render: function render() {
|
|
22221
22268
|
var _this = this;
|
|
@@ -22289,23 +22336,7 @@
|
|
|
22289
22336
|
getItemEvents: getItemEvents
|
|
22290
22337
|
}) : isOpen && itemsToRender.length ? h("ul", {
|
|
22291
22338
|
"class": suggestions$1(themePreset, _this.theme) + " " + (_this.$props.small ? 'small' : '') + " " + getClassName$6(_this.$props.innerClass, 'list')
|
|
22292
|
-
}, [_this.$props.showSearch ?
|
|
22293
|
-
"attrs": {
|
|
22294
|
-
"id": _this.$props.componentId + "-input",
|
|
22295
|
-
"showIcon": false,
|
|
22296
|
-
"placeholder": "Type here to search...",
|
|
22297
|
-
"value": _this.$data.searchTerm,
|
|
22298
|
-
"themePreset": themePreset
|
|
22299
|
-
},
|
|
22300
|
-
"style": {
|
|
22301
|
-
border: 0,
|
|
22302
|
-
borderBottom: '1px solid #ddd'
|
|
22303
|
-
},
|
|
22304
|
-
"class": getClassName$6(_this.$props.innerClass, 'input'),
|
|
22305
|
-
"on": {
|
|
22306
|
-
"change": _this.handleInputChange
|
|
22307
|
-
}
|
|
22308
|
-
}) : null, !hasCustomRenderer && filteredItemsToRender.length === 0 ? _this.renderNoResult() : filteredItemsToRender.map(function (item, index) {
|
|
22339
|
+
}, [_this.$props.showSearch ? _this.renderSearchbox() : null, !hasCustomRenderer && filteredItemsToRender.length === 0 ? _this.renderNoResult() : filteredItemsToRender.map(function (item, index) {
|
|
22309
22340
|
var selected = _this.$props.multi // MultiDropdownList
|
|
22310
22341
|
&& (selectedItem && !!selectedItem[item[keyField]] // MultiDropdownRange
|
|
22311
22342
|
|| Array.isArray(selectedItem) && selectedItem.find(function (value) {
|
|
@@ -22358,6 +22389,7 @@
|
|
|
22358
22389
|
|
|
22359
22390
|
if (!this.$props.multi) {
|
|
22360
22391
|
this.isOpen = false;
|
|
22392
|
+
this.searchTerm = '';
|
|
22361
22393
|
}
|
|
22362
22394
|
},
|
|
22363
22395
|
handleStateChange: function handleStateChange(_ref2) {
|
|
@@ -22381,6 +22413,9 @@
|
|
|
22381
22413
|
var value = e.target.value;
|
|
22382
22414
|
this.searchTerm = value;
|
|
22383
22415
|
},
|
|
22416
|
+
clearSearchTerm: function clearSearchTerm() {
|
|
22417
|
+
this.searchTerm = '';
|
|
22418
|
+
},
|
|
22384
22419
|
renderToString: function renderToString(value) {
|
|
22385
22420
|
var _this2 = this;
|
|
22386
22421
|
|
|
@@ -22421,6 +22456,51 @@
|
|
|
22421
22456
|
return h("p", {
|
|
22422
22457
|
"class": getClassName$6(this.$props.innerClass, 'noResults') || null
|
|
22423
22458
|
}, [isFunction$1(renderNoResults) ? renderNoResults() : renderNoResults]);
|
|
22459
|
+
},
|
|
22460
|
+
renderSearchbox: function renderSearchbox() {
|
|
22461
|
+
var h = this.$createElement;
|
|
22462
|
+
var _this$$props2 = this.$props,
|
|
22463
|
+
componentId = _this$$props2.componentId,
|
|
22464
|
+
searchPlaceholder = _this$$props2.searchPlaceholder,
|
|
22465
|
+
showClear = _this$$props2.showClear,
|
|
22466
|
+
themePreset = _this$$props2.themePreset,
|
|
22467
|
+
innerClass = _this$$props2.innerClass;
|
|
22468
|
+
var InputComponent = h(Input, {
|
|
22469
|
+
"attrs": {
|
|
22470
|
+
"id": componentId + "-input",
|
|
22471
|
+
"showIcon": false,
|
|
22472
|
+
"showClear": showClear,
|
|
22473
|
+
"placeholder": searchPlaceholder,
|
|
22474
|
+
"value": this.$data.searchTerm,
|
|
22475
|
+
"themePreset": themePreset
|
|
22476
|
+
},
|
|
22477
|
+
"style": {
|
|
22478
|
+
border: 0,
|
|
22479
|
+
borderBottom: '1px solid #ddd'
|
|
22480
|
+
},
|
|
22481
|
+
"class": getClassName$6(innerClass, 'input'),
|
|
22482
|
+
"on": {
|
|
22483
|
+
"change": this.handleInputChange
|
|
22484
|
+
}
|
|
22485
|
+
});
|
|
22486
|
+
|
|
22487
|
+
if (showClear) {
|
|
22488
|
+
return h(InputWrapper, [InputComponent, this.searchTerm && h(IconGroup, {
|
|
22489
|
+
"attrs": {
|
|
22490
|
+
"groupPosition": "right",
|
|
22491
|
+
"positionType": "absolute"
|
|
22492
|
+
}
|
|
22493
|
+
}, [h(IconWrapper, {
|
|
22494
|
+
"on": {
|
|
22495
|
+
"click": this.clearSearchTerm
|
|
22496
|
+
},
|
|
22497
|
+
"attrs": {
|
|
22498
|
+
"isClearIcon": true
|
|
22499
|
+
}
|
|
22500
|
+
}, [h(CancelSvg)])])]);
|
|
22501
|
+
}
|
|
22502
|
+
|
|
22503
|
+
return InputComponent;
|
|
22424
22504
|
}
|
|
22425
22505
|
}
|
|
22426
22506
|
};
|
|
@@ -22479,10 +22559,12 @@
|
|
|
22479
22559
|
showMissing: VueTypes.bool.def(false),
|
|
22480
22560
|
missingLabel: VueTypes.string.def('N/A'),
|
|
22481
22561
|
showSearch: VueTypes.bool.def(false),
|
|
22562
|
+
showClear: VueTypes.bool.def(false),
|
|
22482
22563
|
showLoadMore: VueTypes.bool.def(false),
|
|
22483
22564
|
loadMoreLabel: VueTypes.oneOfType([VueTypes.string, VueTypes.any]).def('Load More'),
|
|
22484
22565
|
nestedField: types.string,
|
|
22485
|
-
index: VueTypes.string
|
|
22566
|
+
index: VueTypes.string,
|
|
22567
|
+
searchPlaceholder: VueTypes.string.def('Type here to search...')
|
|
22486
22568
|
},
|
|
22487
22569
|
created: function created() {
|
|
22488
22570
|
if (!this.enableAppbase && this.$props.index) {
|
|
@@ -22596,7 +22678,9 @@
|
|
|
22596
22678
|
if (!this.hasCustomRenderer && this.$data.modifiedOptions.length === 0 && !this.isLoading) {
|
|
22597
22679
|
if (renderNoResults && isFunction$1(renderNoResults)) {
|
|
22598
22680
|
return h("div", [renderNoResults()]);
|
|
22599
|
-
}
|
|
22681
|
+
}
|
|
22682
|
+
|
|
22683
|
+
if (renderNoResults && !isFunction$1(renderNoResults)) {
|
|
22600
22684
|
return renderNoResults;
|
|
22601
22685
|
}
|
|
22602
22686
|
|
|
@@ -22634,6 +22718,8 @@
|
|
|
22634
22718
|
"renderNoResults": this.$scopedSlots.renderNoResults || this.$props.renderNoResults,
|
|
22635
22719
|
"themePreset": this.themePreset,
|
|
22636
22720
|
"showSearch": this.$props.showSearch,
|
|
22721
|
+
"showClear": this.$props.showClear,
|
|
22722
|
+
"searchPlaceholder": this.$props.searchPlaceholder,
|
|
22637
22723
|
"transformData": this.$props.transformData,
|
|
22638
22724
|
"footer": showLoadMore && !isLastBucket && h("div", {
|
|
22639
22725
|
"attrs": {
|
|
@@ -22693,7 +22779,7 @@
|
|
|
22693
22779
|
updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
|
|
22694
22780
|
}
|
|
22695
22781
|
|
|
22696
|
-
this.setQueryOptions(this.internalComponent, defaultQueryOptions);
|
|
22782
|
+
this.setQueryOptions(this.internalComponent, defaultQueryOptions, false);
|
|
22697
22783
|
this.updateQuery({
|
|
22698
22784
|
componentId: this.internalComponent,
|
|
22699
22785
|
query: query,
|
|
@@ -22714,7 +22800,7 @@
|
|
|
22714
22800
|
updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
22715
22801
|
}
|
|
22716
22802
|
|
|
22717
|
-
this.setQueryOptions(props.componentId, customQueryOptions);
|
|
22803
|
+
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
22718
22804
|
this.updateQuery({
|
|
22719
22805
|
componentId: props.componentId,
|
|
22720
22806
|
query: query,
|
|
@@ -22926,10 +23012,12 @@
|
|
|
22926
23012
|
showMissing: VueTypes.bool.def(false),
|
|
22927
23013
|
missingLabel: VueTypes.string.def('N/A'),
|
|
22928
23014
|
showSearch: VueTypes.bool.def(false),
|
|
23015
|
+
showClear: VueTypes.bool.def(false),
|
|
22929
23016
|
showLoadMore: VueTypes.bool.def(false),
|
|
22930
23017
|
loadMoreLabel: VueTypes.oneOfType([VueTypes.string, VueTypes.any]).def('Load More'),
|
|
22931
23018
|
nestedField: types.string,
|
|
22932
|
-
index: VueTypes.string
|
|
23019
|
+
index: VueTypes.string,
|
|
23020
|
+
searchPlaceholder: VueTypes.string.def('Type here to search...')
|
|
22933
23021
|
},
|
|
22934
23022
|
created: function created() {
|
|
22935
23023
|
if (!this.enableAppbase && this.$props.index) {
|
|
@@ -23057,7 +23145,9 @@
|
|
|
23057
23145
|
if (!this.hasCustomRenderer && this.$data.modifiedOptions.length === 0 && !this.isLoading) {
|
|
23058
23146
|
if (renderNoResults && isFunction$1(renderNoResults)) {
|
|
23059
23147
|
return h("div", [renderNoResults()]);
|
|
23060
|
-
}
|
|
23148
|
+
}
|
|
23149
|
+
|
|
23150
|
+
if (renderNoResults && !isFunction$1(renderNoResults)) {
|
|
23061
23151
|
return renderNoResults;
|
|
23062
23152
|
}
|
|
23063
23153
|
|
|
@@ -23096,6 +23186,8 @@
|
|
|
23096
23186
|
"renderItem": renderItemCalc,
|
|
23097
23187
|
"renderNoResults": this.$scopedSlots.renderNoResults || this.$props.renderNoResults,
|
|
23098
23188
|
"showSearch": this.$props.showSearch,
|
|
23189
|
+
"showClear": this.$props.showClear,
|
|
23190
|
+
"searchPlaceholder": this.$props.searchPlaceholder,
|
|
23099
23191
|
"transformData": this.$props.transformData,
|
|
23100
23192
|
"footer": showLoadMore && !isLastBucket && h("div", {
|
|
23101
23193
|
"attrs": {
|
|
@@ -23214,7 +23306,7 @@
|
|
|
23214
23306
|
updateDefaultQuery(props.componentId, this.setDefaultQuery, props, value);
|
|
23215
23307
|
}
|
|
23216
23308
|
|
|
23217
|
-
this.setQueryOptions(this.internalComponent, defaultQueryOptions);
|
|
23309
|
+
this.setQueryOptions(this.internalComponent, defaultQueryOptions, false);
|
|
23218
23310
|
this.updateQuery({
|
|
23219
23311
|
componentId: this.internalComponent,
|
|
23220
23312
|
query: query,
|
|
@@ -23235,7 +23327,7 @@
|
|
|
23235
23327
|
updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
23236
23328
|
}
|
|
23237
23329
|
|
|
23238
|
-
this.setQueryOptions(props.componentId, customQueryOptions);
|
|
23330
|
+
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
23239
23331
|
this.updateQuery({
|
|
23240
23332
|
componentId: props.componentId,
|
|
23241
23333
|
query: query,
|
|
@@ -23600,7 +23692,7 @@
|
|
|
23600
23692
|
var _ref = customQuery(value, props) || {};
|
|
23601
23693
|
|
|
23602
23694
|
query = _ref.query;
|
|
23603
|
-
this.setQueryOptions(props.componentId, getOptionsFromQuery$6(customQuery(value, props)));
|
|
23695
|
+
this.setQueryOptions(props.componentId, getOptionsFromQuery$6(customQuery(value, props)), false);
|
|
23604
23696
|
updateCustomQuery(props.componentId, this.setCustomQuery, props, value);
|
|
23605
23697
|
}
|
|
23606
23698
|
|
|
@@ -24129,7 +24221,8 @@
|
|
|
24129
24221
|
innerClass: types.style,
|
|
24130
24222
|
showClearAll: VueTypes.bool.def(true),
|
|
24131
24223
|
title: types.title,
|
|
24132
|
-
resetToDefault: VueTypes.bool.def(false)
|
|
24224
|
+
resetToDefault: VueTypes.bool.def(false),
|
|
24225
|
+
resetToValues: VueTypes.object
|
|
24133
24226
|
},
|
|
24134
24227
|
inject: {
|
|
24135
24228
|
theme: {
|
|
@@ -24182,15 +24275,16 @@
|
|
|
24182
24275
|
this.$emit('clear', component, value);
|
|
24183
24276
|
},
|
|
24184
24277
|
clearValues: function clearValues() {
|
|
24185
|
-
var resetToDefault = this.resetToDefault
|
|
24278
|
+
var resetToDefault = this.resetToDefault,
|
|
24279
|
+
resetToValues = this.resetToValues;
|
|
24186
24280
|
|
|
24187
24281
|
if (resetToDefault) {
|
|
24188
24282
|
this.resetValuesToDefault();
|
|
24189
24283
|
} else {
|
|
24190
|
-
this.clearValuesAction();
|
|
24284
|
+
this.clearValuesAction(resetToValues);
|
|
24191
24285
|
}
|
|
24192
24286
|
|
|
24193
|
-
this.$emit('clear',
|
|
24287
|
+
this.$emit('clear', resetToValues);
|
|
24194
24288
|
},
|
|
24195
24289
|
renderValue: function renderValue(value, isArray) {
|
|
24196
24290
|
var _this2 = this;
|
|
@@ -24425,7 +24519,7 @@
|
|
|
24425
24519
|
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
24426
24520
|
}
|
|
24427
24521
|
|
|
24428
|
-
this.setQueryOptions(props.componentId, customQueryOptions);
|
|
24522
|
+
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
24429
24523
|
this.updateQuery({
|
|
24430
24524
|
componentId: props.componentId,
|
|
24431
24525
|
query: query,
|
|
@@ -24634,7 +24728,7 @@
|
|
|
24634
24728
|
updateCustomQuery(this.componentId, this.setCustomQuery, this.$props, this.currentValue);
|
|
24635
24729
|
}
|
|
24636
24730
|
|
|
24637
|
-
this.setQueryOptions(props.componentId, customQueryOptions);
|
|
24731
|
+
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
24638
24732
|
this.updateQuery({
|
|
24639
24733
|
componentId: props.componentId,
|
|
24640
24734
|
query: query,
|
|
@@ -25077,14 +25171,14 @@
|
|
|
25077
25171
|
var vueNoSsr_common = index$2;
|
|
25078
25172
|
|
|
25079
25173
|
var _templateObject$m;
|
|
25080
|
-
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
|
|
25174
|
+
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"])));
|
|
25081
25175
|
|
|
25082
25176
|
/**
|
|
25083
25177
|
* Caution: Please do not change this file without having a discussion with the Team.
|
|
25084
25178
|
* Any change may break the umd build, we're directly replacing the line no: 14
|
|
25085
25179
|
* `
|
|
25086
25180
|
var s = document.createElement("script");
|
|
25087
|
-
s.setAttribute("src","https://cdn.jsdelivr.net/npm/vue-slider-component@2.
|
|
25181
|
+
s.setAttribute("src","https://cdn.jsdelivr.net/npm/vue-slider-component@3.2.15/dist/vue-slider-component.umd.min.js");
|
|
25088
25182
|
s.onload = function(){
|
|
25089
25183
|
var VueSlider = global['vue-slider-component'];
|
|
25090
25184
|
components['vue-slider-component'] = VueSlider;
|
|
@@ -25105,7 +25199,7 @@
|
|
|
25105
25199
|
// eslint-disable-next-line
|
|
25106
25200
|
|
|
25107
25201
|
var s = document.createElement("script");
|
|
25108
|
-
s.setAttribute("src","https://cdn.jsdelivr.net/npm/vue-slider-component@2.
|
|
25202
|
+
s.setAttribute("src","https://cdn.jsdelivr.net/npm/vue-slider-component@3.2.15/dist/vue-slider-component.umd.min.js");
|
|
25109
25203
|
s.onload = function(){
|
|
25110
25204
|
var VueSlider = global$1['vue-slider-component'];
|
|
25111
25205
|
components['vue-slider-component'] = VueSlider;
|
|
@@ -25180,32 +25274,28 @@
|
|
|
25180
25274
|
});
|
|
25181
25275
|
}
|
|
25182
25276
|
},
|
|
25183
|
-
handleSlider: function handleSlider(
|
|
25184
|
-
var
|
|
25185
|
-
|
|
25186
|
-
clearTimeout(this.handleSliderChange._tId);
|
|
25187
|
-
this.handleSliderChange._tId = setTimeout(function () {
|
|
25188
|
-
_this.handleSliderChange(values);
|
|
25189
|
-
}, 100);
|
|
25277
|
+
handleSlider: function handleSlider() {
|
|
25278
|
+
var sliderValues = this.$refs.slider.getValue();
|
|
25279
|
+
this.handleSliderChange(sliderValues);
|
|
25190
25280
|
},
|
|
25191
25281
|
handleChange: function handleChange(currentValue, props) {
|
|
25192
|
-
var
|
|
25282
|
+
var _this = this;
|
|
25193
25283
|
|
|
25194
25284
|
if (props === void 0) {
|
|
25195
25285
|
props = this.$props;
|
|
25196
25286
|
}
|
|
25197
25287
|
|
|
25198
25288
|
var performUpdate = function performUpdate() {
|
|
25199
|
-
|
|
25289
|
+
_this.currentValue = currentValue;
|
|
25200
25290
|
|
|
25201
|
-
|
|
25291
|
+
_this.updateQueryHandler([currentValue[0], currentValue[1]], props);
|
|
25202
25292
|
|
|
25203
|
-
|
|
25293
|
+
_this.$emit('valueChange', {
|
|
25204
25294
|
start: currentValue[0],
|
|
25205
25295
|
end: currentValue[1]
|
|
25206
25296
|
});
|
|
25207
25297
|
|
|
25208
|
-
|
|
25298
|
+
_this.$emit('value-change', {
|
|
25209
25299
|
start: currentValue[0],
|
|
25210
25300
|
end: currentValue[1]
|
|
25211
25301
|
});
|
|
@@ -25237,7 +25327,7 @@
|
|
|
25237
25327
|
currentEnd = value[1]; // check if the slider is at its initial position
|
|
25238
25328
|
|
|
25239
25329
|
var isInitialValue = currentStart === start && currentEnd === end;
|
|
25240
|
-
this.setQueryOptions(props.componentId, customQueryOptions);
|
|
25330
|
+
this.setQueryOptions(props.componentId, customQueryOptions, false);
|
|
25241
25331
|
this.updateQuery({
|
|
25242
25332
|
componentId: props.componentId,
|
|
25243
25333
|
query: query,
|
|
@@ -25316,12 +25406,13 @@
|
|
|
25316
25406
|
"max": this.$props.range.end,
|
|
25317
25407
|
"dotSize": 20,
|
|
25318
25408
|
"height": 4,
|
|
25319
|
-
"enable-cross": false
|
|
25409
|
+
"enable-cross": false,
|
|
25410
|
+
"tooltip": "always"
|
|
25320
25411
|
},
|
|
25321
|
-
"
|
|
25322
|
-
|
|
25323
|
-
|
|
25324
|
-
})
|
|
25412
|
+
"on": {
|
|
25413
|
+
"drag-end": this.handleSlider
|
|
25414
|
+
},
|
|
25415
|
+
"props": _extends({}, this.$props.sliderOptions)
|
|
25325
25416
|
}), this.$props.rangeLabels && h("div", {
|
|
25326
25417
|
"class": "label-container"
|
|
25327
25418
|
}, [h("label", {
|
|
@@ -25564,8 +25655,9 @@
|
|
|
25564
25655
|
aggs: aggs
|
|
25565
25656
|
});
|
|
25566
25657
|
},
|
|
25567
|
-
handleSlider: function handleSlider(
|
|
25568
|
-
this.
|
|
25658
|
+
handleSlider: function handleSlider() {
|
|
25659
|
+
var sliderValues = this.$refs.slider.getValue();
|
|
25660
|
+
this.handleChange(sliderValues);
|
|
25569
25661
|
},
|
|
25570
25662
|
handleChange: function handleChange(currentValue) {
|
|
25571
25663
|
var _this2 = this;
|
|
@@ -25617,7 +25709,7 @@
|
|
|
25617
25709
|
currentEnd = value[1]; // check if the slider is at its initial position
|
|
25618
25710
|
|
|
25619
25711
|
var isInitialValue = currentStart === start && currentEnd === end;
|
|
25620
|
-
this.setQueryOptions(this.$props.componentId, customQueryOptions);
|
|
25712
|
+
this.setQueryOptions(this.$props.componentId, customQueryOptions, false);
|
|
25621
25713
|
this.updateQuery({
|
|
25622
25714
|
componentId: this.$props.componentId,
|
|
25623
25715
|
query: query,
|
|
@@ -25698,13 +25790,15 @@
|
|
|
25698
25790
|
}, [this.$props.title]), h(vueNoSsr_common, [h(Slider, {
|
|
25699
25791
|
"class": getClassName$e(this.$props.innerClass, 'slider')
|
|
25700
25792
|
}, [h("vue-slider-component", {
|
|
25793
|
+
"ref": "slider",
|
|
25701
25794
|
"attrs": {
|
|
25702
25795
|
"value": [Math.max(start, this.currentValue[0]), Math.min(end, this.currentValue[1])],
|
|
25703
25796
|
"min": Math.min(start, this.currentValue[0]),
|
|
25704
25797
|
"max": Math.max(end, this.currentValue[1]),
|
|
25705
25798
|
"dotSize": 20,
|
|
25706
25799
|
"height": 4,
|
|
25707
|
-
"enable-cross": false
|
|
25800
|
+
"enable-cross": false,
|
|
25801
|
+
"tooltip": "always"
|
|
25708
25802
|
},
|
|
25709
25803
|
"on": {
|
|
25710
25804
|
"drag-end": this.handleSlider
|
|
@@ -25806,6 +25900,10 @@
|
|
|
25806
25900
|
var defaultKeys = ['hits', 'value', 'aggregations', 'error'];
|
|
25807
25901
|
|
|
25808
25902
|
var filterProps = function filterProps(props) {
|
|
25903
|
+
if (props === void 0) {
|
|
25904
|
+
props = {};
|
|
25905
|
+
}
|
|
25906
|
+
|
|
25809
25907
|
return _extends({}, props, {
|
|
25810
25908
|
props: props.componentProps
|
|
25811
25909
|
});
|
|
@@ -25825,7 +25923,7 @@
|
|
|
25825
25923
|
return _ref = {}, _ref[componentIds] = state[componentIds], _ref;
|
|
25826
25924
|
}
|
|
25827
25925
|
|
|
25828
|
-
if (componentIds
|
|
25926
|
+
if (Array.isArray(componentIds)) {
|
|
25829
25927
|
var filteredState = {};
|
|
25830
25928
|
componentIds.forEach(function (componentId) {
|
|
25831
25929
|
filteredState[componentId] = state[componentId];
|
|
@@ -25864,7 +25962,7 @@
|
|
|
25864
25962
|
};
|
|
25865
25963
|
return this.__state;
|
|
25866
25964
|
},
|
|
25867
|
-
|
|
25965
|
+
created: function created() {
|
|
25868
25966
|
this.searchState = filterByKeys(getSearchState(filterProps(this.searchStateProps)), this.includeKeys);
|
|
25869
25967
|
},
|
|
25870
25968
|
computed: {
|
|
@@ -32852,6 +32950,7 @@
|
|
|
32852
32950
|
var orderOfQueries = [];
|
|
32853
32951
|
var hits = {};
|
|
32854
32952
|
var aggregations = {};
|
|
32953
|
+
var compositeAggregations = {};
|
|
32855
32954
|
var state = {};
|
|
32856
32955
|
var customQueries = {};
|
|
32857
32956
|
var defaultQueries = {};
|
|
@@ -32974,7 +33073,7 @@
|
|
|
32974
33073
|
var react = component.react;
|
|
32975
33074
|
|
|
32976
33075
|
if (isInternalComponentPresent || isResultComponent) {
|
|
32977
|
-
react =
|
|
33076
|
+
react = helper_22(react, internalComponent);
|
|
32978
33077
|
}
|
|
32979
33078
|
|
|
32980
33079
|
dependencyTree = dependencyTreeReducer(dependencyTree, {
|
|
@@ -33020,7 +33119,7 @@
|
|
|
33020
33119
|
|
|
33021
33120
|
componentCollection.forEach(function (component) {
|
|
33022
33121
|
// eslint-disable-next-line
|
|
33023
|
-
var _buildQuery =
|
|
33122
|
+
var _buildQuery = helper_21(component.componentId, dependencyTree, queryList, queryOptions),
|
|
33024
33123
|
queryObj = _buildQuery.queryObj,
|
|
33025
33124
|
options = _buildQuery.options;
|
|
33026
33125
|
|
|
@@ -33086,6 +33185,11 @@
|
|
|
33086
33185
|
var _extends4;
|
|
33087
33186
|
|
|
33088
33187
|
aggregations = _extends({}, aggregations, (_extends4 = {}, _extends4[component] = response.aggregations, _extends4));
|
|
33188
|
+
compositeAggregations = compositeAggsReducer(compositeAggregations, {
|
|
33189
|
+
type: constants_9,
|
|
33190
|
+
aggregations: response.aggregations,
|
|
33191
|
+
append: false
|
|
33192
|
+
});
|
|
33089
33193
|
}
|
|
33090
33194
|
|
|
33091
33195
|
hits = _extends({}, hits, (_extends5 = {}, _extends5[component] = {
|
|
@@ -33112,6 +33216,8 @@
|
|
|
33112
33216
|
var promotedResults = {};
|
|
33113
33217
|
var rawData = {};
|
|
33114
33218
|
var customData = {};
|
|
33219
|
+
var settingsResponse = {};
|
|
33220
|
+
var timestamp = {};
|
|
33115
33221
|
var allPromises = orderOfQueries.map(function (component) {
|
|
33116
33222
|
return new Promise(function (responseResolve, responseReject) {
|
|
33117
33223
|
handleTransformResponse(res[component], component).then(function (response) {
|
|
@@ -33130,6 +33236,11 @@
|
|
|
33130
33236
|
|
|
33131
33237
|
if (response.customData) {
|
|
33132
33238
|
customData[component] = response.customData;
|
|
33239
|
+
} // Update settings
|
|
33240
|
+
|
|
33241
|
+
|
|
33242
|
+
if (response.settings) {
|
|
33243
|
+
settingsResponse[component] = response.settings;
|
|
33133
33244
|
}
|
|
33134
33245
|
|
|
33135
33246
|
if (response.aggregations) {
|
|
@@ -33138,6 +33249,7 @@
|
|
|
33138
33249
|
aggregations = _extends({}, aggregations, (_extends6 = {}, _extends6[component] = response.aggregations, _extends6));
|
|
33139
33250
|
}
|
|
33140
33251
|
|
|
33252
|
+
timestamp[component] = res._timestamp;
|
|
33141
33253
|
hits = _extends({}, hits, (_extends7 = {}, _extends7[component] = {
|
|
33142
33254
|
hits: response.hits.hits,
|
|
33143
33255
|
total: typeof response.hits.total === 'object' ? response.hits.total.value : response.hits.total,
|
|
@@ -33153,8 +33265,11 @@
|
|
|
33153
33265
|
Promise.all(allPromises).then(function () {
|
|
33154
33266
|
state = _extends({}, state, {
|
|
33155
33267
|
hits: hits,
|
|
33268
|
+
timestamp: timestamp,
|
|
33156
33269
|
aggregations: aggregations,
|
|
33270
|
+
compositeAggregations: compositeAggregations,
|
|
33157
33271
|
promotedResults: promotedResults,
|
|
33272
|
+
settings: settingsResponse,
|
|
33158
33273
|
customData: customData,
|
|
33159
33274
|
rawData: rawData
|
|
33160
33275
|
});
|
|
@@ -33213,7 +33328,7 @@
|
|
|
33213
33328
|
});
|
|
33214
33329
|
}
|
|
33215
33330
|
|
|
33216
|
-
var version = "1.16.0-alpha.
|
|
33331
|
+
var version = "1.16.0-alpha.30";
|
|
33217
33332
|
|
|
33218
33333
|
var _templateObject$o, _templateObject2$b;
|
|
33219
33334
|
|
|
@@ -33335,7 +33450,7 @@
|
|
|
33335
33450
|
}
|
|
33336
33451
|
},
|
|
33337
33452
|
handleOnChange: function handleOnChange(value) {
|
|
33338
|
-
this.handleChange(value, 'change');
|
|
33453
|
+
this.handleChange(value || this.$props.range, 'change');
|
|
33339
33454
|
},
|
|
33340
33455
|
handleValueChange: function handleValueChange(value) {
|
|
33341
33456
|
this.handleChange(value, 'value-change');
|