@appbaseio/reactivesearch-vue 1.16.0-alpha.48 → 1.16.0-alpha.50
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 +1800 -405
- 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/{Button-d2f1aeda.js → Button-10e5cf51.js} +1 -1
- package/dist/cjs/DataSearch-deda2e96.js +2171 -0
- package/dist/cjs/DataSearch.js +18 -2107
- package/dist/cjs/{DropDown-c46d8b0c.js → DropDown-16a2a728.js} +1 -1
- package/dist/cjs/{Input-c6f181d5.js → Input-64087a69.js} +1 -1
- package/dist/cjs/MultiDropdownList.js +3 -3
- package/dist/cjs/MultiList.js +1 -1
- package/dist/cjs/{Pagination-1b2320a7.js → Pagination-e0654529.js} +1 -1
- package/dist/cjs/RangeInput.js +1 -1
- package/dist/cjs/ReactiveGoogleMap.js +2 -2
- package/dist/cjs/ReactiveList.js +2 -2
- package/dist/cjs/SelectedFilters.js +6 -4
- package/dist/cjs/SingleDropdownList.js +3 -3
- package/dist/cjs/SingleList.js +1 -1
- package/dist/cjs/ToggleButton.js +1 -1
- package/dist/cjs/index.js +11 -10
- package/dist/cjs/initReactivesearch.js +0 -7
- package/dist/cjs/install-d0645b5f.js +1244 -0
- package/dist/cjs/install.js +25 -30
- package/dist/cjs/version.js +1 -1
- package/dist/es/{Button-799185e2.js → Button-8b211174.js} +1 -1
- package/dist/es/DataSearch-7a8a9368.js +2158 -0
- package/dist/es/DataSearch.js +17 -2106
- package/dist/es/{DropDown-4edaa621.js → DropDown-7639f223.js} +1 -1
- package/dist/es/{Input-d8519224.js → Input-d1bb4868.js} +1 -1
- package/dist/es/MultiDropdownList.js +3 -3
- package/dist/es/MultiList.js +1 -1
- package/dist/es/{Pagination-b3e4054a.js → Pagination-3c50d4ba.js} +1 -1
- package/dist/es/RangeInput.js +1 -1
- package/dist/es/ReactiveGoogleMap.js +2 -2
- package/dist/es/ReactiveList.js +2 -2
- package/dist/es/SelectedFilters.js +6 -4
- package/dist/es/SingleDropdownList.js +3 -3
- package/dist/es/SingleList.js +1 -1
- package/dist/es/ToggleButton.js +1 -1
- package/dist/es/index.js +7 -7
- package/dist/es/initReactivesearch.js +0 -7
- package/dist/es/install-183f5d19.js +1237 -0
- package/dist/es/install.js +23 -32
- package/dist/es/version.js +1 -1
- package/package.json +4 -4
|
@@ -824,6 +824,9 @@
|
|
|
824
824
|
var RECENT_SEARCHES_ERROR = exports.RECENT_SEARCHES_ERROR = 'RECENT_SEARCHES_ERROR';
|
|
825
825
|
var SET_VALUE = exports.SET_VALUE = 'SET_VALUE';
|
|
826
826
|
var RESET_TO_DEFAULT = exports.RESET_TO_DEFAULT = 'RESET_TO_DEFAULT';
|
|
827
|
+
var SET_GOOGLE_MAP_SCRIPT_LOADING = exports.SET_GOOGLE_MAP_SCRIPT_LOADING = 'SET_GOOGLE_MAP_SCRIPT_LOADING';
|
|
828
|
+
var SET_GOOGLE_MAP_SCRIPT_LOADED = exports.SET_GOOGLE_MAP_SCRIPT_LOADED = 'SET_GOOGLE_MAP_SCRIPT_LOADED';
|
|
829
|
+
var SET_GOOGLE_MAP_SCRIPT_ERROR = exports.SET_GOOGLE_MAP_SCRIPT_ERROR = 'SET_GOOGLE_MAP_SCRIPT_ERROR';
|
|
827
830
|
});
|
|
828
831
|
unwrapExports(constants);
|
|
829
832
|
var constants_1 = constants.ADD_COMPONENT;
|
|
@@ -871,6 +874,9 @@
|
|
|
871
874
|
var constants_43 = constants.RECENT_SEARCHES_ERROR;
|
|
872
875
|
var constants_44 = constants.SET_VALUE;
|
|
873
876
|
var constants_45 = constants.RESET_TO_DEFAULT;
|
|
877
|
+
var constants_46 = constants.SET_GOOGLE_MAP_SCRIPT_LOADING;
|
|
878
|
+
var constants_47 = constants.SET_GOOGLE_MAP_SCRIPT_LOADED;
|
|
879
|
+
var constants_48 = constants.SET_GOOGLE_MAP_SCRIPT_ERROR;
|
|
874
880
|
|
|
875
881
|
var componentsReducer_1 = createCommonjsModule(function (module, exports) {
|
|
876
882
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -1733,17 +1739,25 @@
|
|
|
1733
1739
|
|
|
1734
1740
|
case constants.CLEAR_VALUES:
|
|
1735
1741
|
{
|
|
1742
|
+
var nextState = {};
|
|
1743
|
+
|
|
1736
1744
|
if (action.resetValues) {
|
|
1737
|
-
var nextState = {};
|
|
1738
1745
|
Object.keys(action.resetValues).forEach(function (componentId) {
|
|
1739
1746
|
nextState[componentId] = _extends({}, state[componentId], {
|
|
1740
1747
|
value: action.resetValues[componentId]
|
|
1741
1748
|
});
|
|
1742
1749
|
});
|
|
1743
|
-
return nextState;
|
|
1744
1750
|
}
|
|
1745
1751
|
|
|
1746
|
-
|
|
1752
|
+
if (Array.isArray(action.clearAllBlacklistComponents)) {
|
|
1753
|
+
Object.keys(state).forEach(function (componentId) {
|
|
1754
|
+
if (action.clearAllBlacklistComponents.includes(componentId)) {
|
|
1755
|
+
nextState[componentId] = state[componentId];
|
|
1756
|
+
}
|
|
1757
|
+
});
|
|
1758
|
+
}
|
|
1759
|
+
|
|
1760
|
+
return nextState;
|
|
1747
1761
|
}
|
|
1748
1762
|
|
|
1749
1763
|
case constants.REMOVE_COMPONENT:
|
|
@@ -1826,7 +1840,30 @@
|
|
|
1826
1840
|
}));
|
|
1827
1841
|
|
|
1828
1842
|
case constants.CLEAR_VALUES:
|
|
1829
|
-
|
|
1843
|
+
{
|
|
1844
|
+
var nextState = {};
|
|
1845
|
+
|
|
1846
|
+
if (action.resetValues) {
|
|
1847
|
+
Object.keys(action.resetValues).forEach(function (componentId) {
|
|
1848
|
+
nextState[componentId] = _extends({}, state[componentId], {
|
|
1849
|
+
value: action.resetValues[componentId]
|
|
1850
|
+
});
|
|
1851
|
+
});
|
|
1852
|
+
}
|
|
1853
|
+
|
|
1854
|
+
if (Array.isArray(action.clearAllBlacklistComponents)) {
|
|
1855
|
+
Object.keys(state).forEach(function (componentId) {
|
|
1856
|
+
if (action.clearAllBlacklistComponents.includes(componentId)) {
|
|
1857
|
+
nextState[componentId] = state[componentId];
|
|
1858
|
+
}
|
|
1859
|
+
});
|
|
1860
|
+
}
|
|
1861
|
+
|
|
1862
|
+
return nextState;
|
|
1863
|
+
}
|
|
1864
|
+
|
|
1865
|
+
case constants.RESET_TO_DEFAULT:
|
|
1866
|
+
return _extends({}, state, action.defaultValues);
|
|
1830
1867
|
|
|
1831
1868
|
case constants.REMOVE_COMPONENT:
|
|
1832
1869
|
{
|
|
@@ -3171,6 +3208,59 @@
|
|
|
3171
3208
|
});
|
|
3172
3209
|
unwrapExports(recentSearches);
|
|
3173
3210
|
|
|
3211
|
+
var googleMapScriptReducer_1 = createCommonjsModule(function (module, exports) {
|
|
3212
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3213
|
+
value: true
|
|
3214
|
+
});
|
|
3215
|
+
|
|
3216
|
+
var _extends = Object.assign || function (target) {
|
|
3217
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
3218
|
+
var source = arguments[i];
|
|
3219
|
+
|
|
3220
|
+
for (var key in source) {
|
|
3221
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
3222
|
+
target[key] = source[key];
|
|
3223
|
+
}
|
|
3224
|
+
}
|
|
3225
|
+
}
|
|
3226
|
+
|
|
3227
|
+
return target;
|
|
3228
|
+
};
|
|
3229
|
+
|
|
3230
|
+
exports["default"] = googleMapScriptReducer;
|
|
3231
|
+
var INITIAL_STATE = {
|
|
3232
|
+
loading: false,
|
|
3233
|
+
loaded: false,
|
|
3234
|
+
error: null
|
|
3235
|
+
};
|
|
3236
|
+
|
|
3237
|
+
function googleMapScriptReducer() {
|
|
3238
|
+
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : INITIAL_STATE;
|
|
3239
|
+
var action = arguments[1];
|
|
3240
|
+
var type = action.type,
|
|
3241
|
+
loading = action.loading,
|
|
3242
|
+
loaded = action.loaded,
|
|
3243
|
+
error = action.error;
|
|
3244
|
+
|
|
3245
|
+
if (type === constants.SET_GOOGLE_MAP_SCRIPT_LOADING) {
|
|
3246
|
+
return _extends({}, INITIAL_STATE, {
|
|
3247
|
+
loading: loading
|
|
3248
|
+
});
|
|
3249
|
+
} else if (type === constants.SET_GOOGLE_MAP_SCRIPT_LOADED) {
|
|
3250
|
+
return _extends({}, INITIAL_STATE, {
|
|
3251
|
+
loaded: loaded
|
|
3252
|
+
});
|
|
3253
|
+
} else if (type === constants.SET_GOOGLE_MAP_SCRIPT_ERROR) {
|
|
3254
|
+
return _extends({}, INITIAL_STATE, {
|
|
3255
|
+
error: error
|
|
3256
|
+
});
|
|
3257
|
+
}
|
|
3258
|
+
|
|
3259
|
+
return state;
|
|
3260
|
+
}
|
|
3261
|
+
});
|
|
3262
|
+
unwrapExports(googleMapScriptReducer_1);
|
|
3263
|
+
|
|
3174
3264
|
var reducers = createCommonjsModule(function (module, exports) {
|
|
3175
3265
|
Object.defineProperty(exports, "__esModule", {
|
|
3176
3266
|
value: true
|
|
@@ -3242,6 +3332,8 @@
|
|
|
3242
3332
|
|
|
3243
3333
|
var _recentSearches2 = _interopRequireDefault(recentSearches);
|
|
3244
3334
|
|
|
3335
|
+
var _googleMapScriptReducer2 = _interopRequireDefault(googleMapScriptReducer_1);
|
|
3336
|
+
|
|
3245
3337
|
function _interopRequireDefault(obj) {
|
|
3246
3338
|
return obj && obj.__esModule ? obj : {
|
|
3247
3339
|
"default": obj
|
|
@@ -3285,7 +3377,8 @@
|
|
|
3285
3377
|
urlValues: function urlValues() {
|
|
3286
3378
|
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
3287
3379
|
return state;
|
|
3288
|
-
}
|
|
3380
|
+
},
|
|
3381
|
+
googleMapScriptStatus: _googleMapScriptReducer2["default"]
|
|
3289
3382
|
});
|
|
3290
3383
|
});
|
|
3291
3384
|
unwrapExports(reducers);
|
|
@@ -4865,7 +4958,7 @@
|
|
|
4865
4958
|
Object.defineProperty(exports, "__esModule", {
|
|
4866
4959
|
value: true
|
|
4867
4960
|
});
|
|
4868
|
-
exports.getCalendarIntervalErrorMessage = exports.queryFormatMillisecondsMap = exports.suggestionTypes = exports.getTopSuggestions = exports.withClickIds = exports.getCompositeAggsQuery = exports.getAggsQuery = exports.extractQueryFromDefaultQuery = exports.updateInternalQuery = exports.getSearchState = exports.extractQueryFromCustomQuery = exports.getOptionsForCustomQuery = exports.getOptionsFromQuery = exports.parseHits = exports.handleA11yAction = exports.getInnerKey = exports.getClassName = exports.checkSomePropChange = exports.checkPropChange = exports.updateDefaultQuery = exports.updateCustomQuery = undefined;
|
|
4961
|
+
exports.hasCustomRenderer = exports.getComponent = exports.isFunction = exports.getCalendarIntervalErrorMessage = exports.queryFormatMillisecondsMap = exports.suggestionTypes = exports.getTopSuggestions = exports.withClickIds = exports.getCompositeAggsQuery = exports.getAggsQuery = exports.extractQueryFromDefaultQuery = exports.updateInternalQuery = exports.getSearchState = exports.extractQueryFromCustomQuery = exports.getOptionsForCustomQuery = exports.getOptionsFromQuery = exports.parseHits = exports.handleA11yAction = exports.getInnerKey = exports.getClassName = exports.checkSomePropChange = exports.checkPropChange = exports.updateDefaultQuery = exports.updateCustomQuery = undefined;
|
|
4869
4962
|
|
|
4870
4963
|
var _extends = Object.assign || function (target) {
|
|
4871
4964
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -5767,43 +5860,74 @@
|
|
|
5767
5860
|
calculatedCalendarInterval: 'year'
|
|
5768
5861
|
};
|
|
5769
5862
|
};
|
|
5863
|
+
|
|
5864
|
+
var isFunction = exports.isFunction = function isFunction(element) {
|
|
5865
|
+
return typeof element === 'function';
|
|
5866
|
+
};
|
|
5867
|
+
|
|
5868
|
+
var getComponent = exports.getComponent = function getComponent() {
|
|
5869
|
+
var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
5870
|
+
var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
5871
|
+
var children = props.children,
|
|
5872
|
+
render = props.render;
|
|
5873
|
+
|
|
5874
|
+
if (isFunction(children)) {
|
|
5875
|
+
return children(data);
|
|
5876
|
+
}
|
|
5877
|
+
|
|
5878
|
+
if (isFunction(render)) {
|
|
5879
|
+
return render(data);
|
|
5880
|
+
}
|
|
5881
|
+
|
|
5882
|
+
return null;
|
|
5883
|
+
};
|
|
5884
|
+
|
|
5885
|
+
var hasCustomRenderer = exports.hasCustomRenderer = function hasCustomRenderer() {
|
|
5886
|
+
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
5887
|
+
var render = props.render,
|
|
5888
|
+
children = props.children;
|
|
5889
|
+
return isFunction(children) || isFunction(render);
|
|
5890
|
+
};
|
|
5770
5891
|
});
|
|
5771
5892
|
unwrapExports(helper);
|
|
5772
|
-
var helper_1 = helper.
|
|
5773
|
-
var helper_2 = helper.
|
|
5774
|
-
var helper_3 = helper.
|
|
5775
|
-
var helper_4 = helper.
|
|
5776
|
-
var helper_5 = helper.
|
|
5777
|
-
var helper_6 = helper.
|
|
5778
|
-
var helper_7 = helper.
|
|
5779
|
-
var helper_8 = helper.
|
|
5780
|
-
var helper_9 = helper.
|
|
5781
|
-
var helper_10 = helper.
|
|
5782
|
-
var helper_11 = helper.
|
|
5783
|
-
var helper_12 = helper.
|
|
5784
|
-
var helper_13 = helper.
|
|
5785
|
-
var helper_14 = helper.
|
|
5786
|
-
var helper_15 = helper.
|
|
5787
|
-
var helper_16 = helper.
|
|
5788
|
-
var helper_17 = helper.
|
|
5789
|
-
var helper_18 = helper.
|
|
5790
|
-
var helper_19 = helper.
|
|
5791
|
-
var helper_20 = helper.
|
|
5792
|
-
var helper_21 = helper.
|
|
5793
|
-
var helper_22 = helper.
|
|
5794
|
-
var helper_23 = helper.
|
|
5795
|
-
var helper_24 = helper.
|
|
5796
|
-
var helper_25 = helper.
|
|
5797
|
-
var helper_26 = helper.
|
|
5798
|
-
var helper_27 = helper.
|
|
5799
|
-
var helper_28 = helper.
|
|
5800
|
-
var helper_29 = helper.
|
|
5801
|
-
var helper_30 = helper.
|
|
5802
|
-
var helper_31 = helper.
|
|
5803
|
-
var helper_32 = helper.
|
|
5804
|
-
var helper_33 = helper.
|
|
5805
|
-
var helper_34 = helper.
|
|
5806
|
-
var helper_35 = helper.
|
|
5893
|
+
var helper_1 = helper.hasCustomRenderer;
|
|
5894
|
+
var helper_2 = helper.getComponent;
|
|
5895
|
+
var helper_3 = helper.isFunction;
|
|
5896
|
+
var helper_4 = helper.getCalendarIntervalErrorMessage;
|
|
5897
|
+
var helper_5 = helper.queryFormatMillisecondsMap;
|
|
5898
|
+
var helper_6 = helper.suggestionTypes;
|
|
5899
|
+
var helper_7 = helper.getTopSuggestions;
|
|
5900
|
+
var helper_8 = helper.withClickIds;
|
|
5901
|
+
var helper_9 = helper.getCompositeAggsQuery;
|
|
5902
|
+
var helper_10 = helper.getAggsQuery;
|
|
5903
|
+
var helper_11 = helper.extractQueryFromDefaultQuery;
|
|
5904
|
+
var helper_12 = helper.updateInternalQuery;
|
|
5905
|
+
var helper_13 = helper.getSearchState;
|
|
5906
|
+
var helper_14 = helper.extractQueryFromCustomQuery;
|
|
5907
|
+
var helper_15 = helper.getOptionsForCustomQuery;
|
|
5908
|
+
var helper_16 = helper.getOptionsFromQuery;
|
|
5909
|
+
var helper_17 = helper.parseHits;
|
|
5910
|
+
var helper_18 = helper.handleA11yAction;
|
|
5911
|
+
var helper_19 = helper.getInnerKey;
|
|
5912
|
+
var helper_20 = helper.getClassName;
|
|
5913
|
+
var helper_21 = helper.checkSomePropChange;
|
|
5914
|
+
var helper_22 = helper.checkPropChange;
|
|
5915
|
+
var helper_23 = helper.updateDefaultQuery;
|
|
5916
|
+
var helper_24 = helper.updateCustomQuery;
|
|
5917
|
+
var helper_25 = helper.isEqual;
|
|
5918
|
+
var helper_26 = helper.compareQueries;
|
|
5919
|
+
var helper_27 = helper.debounce;
|
|
5920
|
+
var helper_28 = helper.getQueryOptions;
|
|
5921
|
+
var helper_29 = helper.buildQuery;
|
|
5922
|
+
var helper_30 = helper.pushToAndClause;
|
|
5923
|
+
var helper_31 = helper.checkValueChange;
|
|
5924
|
+
var helper_32 = helper.getAggsOrder;
|
|
5925
|
+
var helper_33 = helper.formatDate;
|
|
5926
|
+
var helper_34 = helper.getResultStats;
|
|
5927
|
+
var helper_35 = helper.extractFieldsFromSource;
|
|
5928
|
+
var helper_36 = helper.normalizeDataField;
|
|
5929
|
+
var helper_37 = helper.handleOnSuggestions;
|
|
5930
|
+
var helper_38 = helper.isValidDateRangeQueryFormat;
|
|
5807
5931
|
|
|
5808
5932
|
var value = createCommonjsModule(function (module, exports) {
|
|
5809
5933
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5871,7 +5995,7 @@
|
|
|
5871
5995
|
};
|
|
5872
5996
|
}
|
|
5873
5997
|
|
|
5874
|
-
function resetValuesToDefault() {
|
|
5998
|
+
function resetValuesToDefault(clearAllBlacklistComponents) {
|
|
5875
5999
|
return function (dispatch, getState) {
|
|
5876
6000
|
var _getState2 = getState(),
|
|
5877
6001
|
selectedValues = _getState2.selectedValues,
|
|
@@ -5880,23 +6004,23 @@
|
|
|
5880
6004
|
var defaultValues = {};
|
|
5881
6005
|
var valueToSet = void 0;
|
|
5882
6006
|
Object.keys(selectedValues).forEach(function (component) {
|
|
5883
|
-
if (!
|
|
5884
|
-
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
|
|
5888
|
-
|
|
5889
|
-
|
|
5890
|
-
|
|
5891
|
-
|
|
6007
|
+
if (!(Array.isArray(clearAllBlacklistComponents) && clearAllBlacklistComponents.includes(component))) {
|
|
6008
|
+
if (!componentProps[component] || !componentProps[component].componentType || !componentProps[component].defaultValue) {
|
|
6009
|
+
valueToSet = null;
|
|
6010
|
+
} else if ([constants$1.componentTypes.rangeSlider, constants$1.componentTypes.rangeInput, constants$1.componentTypes.ratingsFilter, constants$1.componentTypes.dateRange].includes(componentProps[component].componentType)) {
|
|
6011
|
+
valueToSet = typeof componentProps[component].defaultValue === 'object' ? [componentProps[component].defaultValue.start, componentProps[component].defaultValue.end] : null;
|
|
6012
|
+
} else if ([constants$1.componentTypes.multiDropdownList, constants$1.componentTypes.multiDataList, constants$1.componentTypes.multiList, constants$1.componentTypes.singleDataList, constants$1.componentTypes.singleDropdownList, constants$1.componentTypes.singleList, constants$1.componentTypes.tagCloud, constants$1.componentTypes.toggleButton, constants$1.componentTypes.multiDropdownRange, constants$1.componentTypes.multiRange, constants$1.componentTypes.singleDropdownRange, constants$1.componentTypes.singleRange, constants$1.componentTypes.dataSearch, constants$1.componentTypes.datePicker].includes(componentProps[component].componentType)) {
|
|
6013
|
+
valueToSet = componentProps[component].defaultValue;
|
|
6014
|
+
} else if ([constants$1.componentTypes.categorySearch].includes(componentProps[component].componentType)) {
|
|
6015
|
+
valueToSet = componentProps[component].defaultValue ? componentProps[component].defaultValue.term : '';
|
|
6016
|
+
}
|
|
5892
6017
|
|
|
5893
|
-
|
|
5894
|
-
|
|
5895
|
-
|
|
5896
|
-
|
|
6018
|
+
if (!(0, helper.isEqual)(selectedValues[component].value, valueToSet)) {
|
|
6019
|
+
defaultValues = _extends({}, defaultValues, _defineProperty({}, component, _extends({}, selectedValues[component], {
|
|
6020
|
+
value: valueToSet
|
|
6021
|
+
})));
|
|
6022
|
+
}
|
|
5897
6023
|
}
|
|
5898
|
-
|
|
5899
|
-
return true;
|
|
5900
6024
|
});
|
|
5901
6025
|
dispatch({
|
|
5902
6026
|
type: constants.RESET_TO_DEFAULT,
|
|
@@ -5926,9 +6050,11 @@
|
|
|
5926
6050
|
|
|
5927
6051
|
function clearValues() {
|
|
5928
6052
|
var resetValues = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
6053
|
+
var clearAllBlacklistComponents = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
5929
6054
|
return {
|
|
5930
6055
|
type: constants.CLEAR_VALUES,
|
|
5931
|
-
resetValues: resetValues
|
|
6056
|
+
resetValues: resetValues,
|
|
6057
|
+
clearAllBlacklistComponents: clearAllBlacklistComponents
|
|
5932
6058
|
};
|
|
5933
6059
|
}
|
|
5934
6060
|
});
|
|
@@ -5963,6 +6089,9 @@
|
|
|
5963
6089
|
exports.setCustomData = setCustomData;
|
|
5964
6090
|
exports.setAppliedSettings = setAppliedSettings;
|
|
5965
6091
|
exports.setQueryListener = setQueryListener;
|
|
6092
|
+
exports.setGoogleMapScriptLoading = setGoogleMapScriptLoading;
|
|
6093
|
+
exports.setGoogleMapScriptLoaded = setGoogleMapScriptLoaded;
|
|
6094
|
+
exports.setGoogleMapScriptError = setGoogleMapScriptError;
|
|
5966
6095
|
|
|
5967
6096
|
function setRawData(component, response) {
|
|
5968
6097
|
return {
|
|
@@ -6133,6 +6262,27 @@
|
|
|
6133
6262
|
onError: onError
|
|
6134
6263
|
};
|
|
6135
6264
|
}
|
|
6265
|
+
|
|
6266
|
+
function setGoogleMapScriptLoading(bool) {
|
|
6267
|
+
return {
|
|
6268
|
+
type: constants.SET_GOOGLE_MAP_SCRIPT_LOADING,
|
|
6269
|
+
loading: bool
|
|
6270
|
+
};
|
|
6271
|
+
}
|
|
6272
|
+
|
|
6273
|
+
function setGoogleMapScriptLoaded(bool) {
|
|
6274
|
+
return {
|
|
6275
|
+
type: constants.SET_GOOGLE_MAP_SCRIPT_LOADED,
|
|
6276
|
+
loaded: bool
|
|
6277
|
+
};
|
|
6278
|
+
}
|
|
6279
|
+
|
|
6280
|
+
function setGoogleMapScriptError(error) {
|
|
6281
|
+
return {
|
|
6282
|
+
type: constants.SET_GOOGLE_MAP_SCRIPT_ERROR,
|
|
6283
|
+
error: error
|
|
6284
|
+
};
|
|
6285
|
+
}
|
|
6136
6286
|
});
|
|
6137
6287
|
unwrapExports(misc);
|
|
6138
6288
|
var misc_1 = misc.setRawData;
|
|
@@ -6155,6 +6305,9 @@
|
|
|
6155
6305
|
var misc_18 = misc.setCustomData;
|
|
6156
6306
|
var misc_19 = misc.setAppliedSettings;
|
|
6157
6307
|
var misc_20 = misc.setQueryListener;
|
|
6308
|
+
var misc_21 = misc.setGoogleMapScriptLoading;
|
|
6309
|
+
var misc_22 = misc.setGoogleMapScriptLoaded;
|
|
6310
|
+
var misc_23 = misc.setGoogleMapScriptError;
|
|
6158
6311
|
|
|
6159
6312
|
var hits = createCommonjsModule(function (module, exports) {
|
|
6160
6313
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -12887,7 +13040,7 @@
|
|
|
12887
13040
|
return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteralLoose(["\n\tbackground-color: ", ";\n\tcolor: #ccc;\n\tcursor: not-allowed;\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: ", ";\n\t}\n"])), theme.colors.backgroundColor ? curriedLighten(0.1, theme.colors.backgroundColor) : '#fafafa', theme.colors.backgroundColor ? curriedLighten(0.2, theme.colors.backgroundColor) : '#fafafa');
|
|
12888
13041
|
};
|
|
12889
13042
|
|
|
12890
|
-
var Button = index$1('a')(_templateObject8 || (_templateObject8 = _taggedTemplateLiteralLoose(["\n\tdisplay: inline-flex;\n\tjustify-content: center;\n\talign-items: center;\n\tborder-radius: 3px;\n\tborder: 1px solid transparent;\n\tmin-height: 30px;\n\tword-wrap: break-word;\n\tpadding: 5px 12px;\n\tline-height: 1.2rem;\n\tbackground-color: ", ";\n\tcolor: ", ";\n\tcursor: pointer;\n\tuser-select: none;\n\ttransition: all 0.3s ease;\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: ", ";\n\t}\n\n\t&:focus {\n\t\toutline: 0;\n\t\tborder-color: ", ";\n\t\tbox-shadow: ", ";\n\t}\n\n\t", ";\n\t", ";\n\t", ";\n"])), function (_ref4) {
|
|
13043
|
+
var Button = index$1('a')(_templateObject8 || (_templateObject8 = _taggedTemplateLiteralLoose(["\n\tdisplay: inline-flex;\n\tjustify-content: center;\n\talign-items: center;\n\tborder-radius: 3px;\n\tborder: 1px solid transparent;\n\tmin-height: 30px;\n\tword-wrap: break-word;\n\tpadding: 5px 12px;\n\tline-height: 1.2rem;\n\tbackground-color: ", ";\n\tcolor: ", ";\n\tcursor: pointer;\n\tuser-select: none;\n\ttransition: all 0.3s ease;\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: ", ";\n\t}\n\n\t&:focus {\n\t\toutline: 0;\n\t\tborder-color: ", ";\n\t\tbox-shadow: ", ";\n\t}\n\n\t", ";\n\t", ";\n\t", ";\n\n\t&.enter-btn {\n\t\tborder-top-left-radius: 0px;\n\t\tborder-bottom-left-radius: 0px;\n\t\theight: 100%;\n\t}\n"])), function (_ref4) {
|
|
12891
13044
|
var theme = _ref4.theme;
|
|
12892
13045
|
return theme.colors.backgroundColor || '#eee';
|
|
12893
13046
|
}, function (_ref5) {
|
|
@@ -14302,7 +14455,7 @@
|
|
|
14302
14455
|
filteredResults = [].concat(parsedPromotedResults, filteredResults);
|
|
14303
14456
|
}
|
|
14304
14457
|
|
|
14305
|
-
return
|
|
14458
|
+
return helper_8(filteredResults);
|
|
14306
14459
|
}
|
|
14307
14460
|
},
|
|
14308
14461
|
watch: {
|
|
@@ -16753,14 +16906,14 @@
|
|
|
16753
16906
|
this.updateState(this.$props);
|
|
16754
16907
|
},
|
|
16755
16908
|
analyticsConfig: function analyticsConfig(newVal, oldVal) {
|
|
16756
|
-
if (!
|
|
16909
|
+
if (!helper_25(newVal, oldVal)) {
|
|
16757
16910
|
if (this.store) {
|
|
16758
16911
|
this.store.dispatch(analytics_3$1(newVal));
|
|
16759
16912
|
}
|
|
16760
16913
|
}
|
|
16761
16914
|
},
|
|
16762
16915
|
appbaseConfig: function appbaseConfig(newVal, oldVal) {
|
|
16763
|
-
if (!
|
|
16916
|
+
if (!helper_25(newVal, oldVal)) {
|
|
16764
16917
|
if (this.store) {
|
|
16765
16918
|
this.store.dispatch(analytics_3$1(newVal));
|
|
16766
16919
|
}
|
|
@@ -17537,7 +17690,7 @@
|
|
|
17537
17690
|
});
|
|
17538
17691
|
|
|
17539
17692
|
var suggestions$1 = function suggestions(themePreset, theme) {
|
|
17540
|
-
return css(_templateObject14 || (_templateObject14 = _taggedTemplateLiteralLoose(["\n\tdisplay: block;\n\twidth: 100%;\n\tborder: 1px solid #ccc;\n\tborder-top: none;\n\tbackground-color: #fff;\n\tfont-size: 0.9rem;\n\tz-index: 3;\n\tposition: absolute;\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n\tmax-height:
|
|
17693
|
+
return css(_templateObject14 || (_templateObject14 = _taggedTemplateLiteralLoose(["\n\tdisplay: block;\n\twidth: 100%;\n\tborder: 1px solid #ccc;\n\tborder-top: none;\n\tbackground-color: #fff;\n\tfont-size: 0.9rem;\n\tz-index: 3;\n\tposition: absolute;\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n\tmax-height: min(100vh, 402px);\n\toverflow-y: auto;\n\n\t&.small {\n\t\ttop: 30px;\n\t}\n\n\tli {\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\tcursor: pointer;\n\t\tpadding: 10px;\n\t\tuser-select: none;\n\n\t\t& > .trim {\n\t\t\tdisplay: -webkit-box;\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t\tmax-height: 2.3rem;\n\t\t\tline-height: 1.2rem;\n\t\t\t-webkit-line-clamp: 2;\n\t\t\t-webkit-box-orient: vertical;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\twhite-space: nowrap;\n\t\t}\n\n\t\t&:hover,\n\t\t&:focus {\n\t\t\tbackground-color: #eee;\n\t\t}\n\t}\n\n\t", ";\n"])), themePreset === 'dark' && theme && dark$1(theme));
|
|
17541
17694
|
};
|
|
17542
17695
|
|
|
17543
17696
|
var suggestionsContainer = css(_templateObject15 || (_templateObject15 = _taggedTemplateLiteralLoose(["\n\tposition: relative;\n\t.cancel-icon {\n\t\tcursor: pointer;\n\t}\n"])));
|
|
@@ -18577,19 +18730,22 @@
|
|
|
18577
18730
|
title = _this$suggestion.title,
|
|
18578
18731
|
description = _this$suggestion.description,
|
|
18579
18732
|
image = _this$suggestion.image,
|
|
18580
|
-
isPredictiveSuggestion = _this$suggestion.isPredictiveSuggestion
|
|
18733
|
+
isPredictiveSuggestion = _this$suggestion.isPredictiveSuggestion,
|
|
18734
|
+
_suggestion_type = _this$suggestion._suggestion_type,
|
|
18735
|
+
_category = _this$suggestion._category;
|
|
18581
18736
|
|
|
18582
18737
|
if (label) {
|
|
18583
18738
|
// label has highest precedence
|
|
18584
18739
|
return typeof label === 'string' ? h("div", {
|
|
18585
18740
|
"class": "trim"
|
|
18586
|
-
}, [
|
|
18741
|
+
}, [(_category ? false : isPredictiveSuggestion // eslint-disable-next-line
|
|
18742
|
+
|| !!_suggestion_type) ? h(PredictiveSuggestion, {
|
|
18587
18743
|
"domProps": {
|
|
18588
18744
|
"innerHTML": label
|
|
18589
18745
|
}
|
|
18590
18746
|
}) : h(VueHighlightWords, {
|
|
18591
18747
|
"attrs": {
|
|
18592
|
-
"searchWords": this.currentValue.split(' '),
|
|
18748
|
+
"searchWords": _category ? [_category] : this.currentValue.split(' '),
|
|
18593
18749
|
"textToHighlight": label,
|
|
18594
18750
|
"autoEscape": true,
|
|
18595
18751
|
"highlightStyle": highlightStyle
|
|
@@ -18658,17 +18814,22 @@
|
|
|
18658
18814
|
};
|
|
18659
18815
|
|
|
18660
18816
|
var SearchSvg = {
|
|
18661
|
-
|
|
18662
|
-
|
|
18817
|
+
name: 'SearchSvg',
|
|
18818
|
+
props: ['styles'],
|
|
18819
|
+
render: function render() {
|
|
18820
|
+
var h = arguments[0];
|
|
18663
18821
|
return h("svg", {
|
|
18664
18822
|
"attrs": {
|
|
18665
18823
|
"alt": "Search",
|
|
18666
|
-
"height": "
|
|
18667
|
-
"width": "10",
|
|
18824
|
+
"height": "12",
|
|
18668
18825
|
"xmlns": "http://www.w3.org/2000/svg",
|
|
18669
18826
|
"viewBox": "0 0 15 15"
|
|
18670
18827
|
},
|
|
18671
|
-
"class": "search-icon"
|
|
18828
|
+
"class": "search-icon",
|
|
18829
|
+
"style": _extends({
|
|
18830
|
+
transform: 'scale(1.35)',
|
|
18831
|
+
position: 'relative'
|
|
18832
|
+
}, this.$props.styles ? this.$props.styles : {})
|
|
18672
18833
|
}, [h("title", ["Search"]), h("path", {
|
|
18673
18834
|
"attrs": {
|
|
18674
18835
|
"d": 'M6.02945,10.20327a4.17382,4.17382,0,1,1,4.17382-4.17382A4.15609,4.15609,0,0,1,6.02945,10.20327Zm9.69195,4.2199L10.8989,9.59979A5.88021,5.88021,0,0,0,12.058,6.02856,6.00467,6.00467,0,1,0,9.59979,10.8989l4.82338,4.82338a.89729.89729,0,0,0,1.29912,0,.89749.89749,0,0,0-.00087-1.29909Z'
|
|
@@ -19340,11 +19501,11 @@
|
|
|
19340
19501
|
}, [this.customIcon]);
|
|
19341
19502
|
}
|
|
19342
19503
|
|
|
19343
|
-
if (this.$props.type === '
|
|
19504
|
+
if (this.$props.type === 'recent-search-icon') {
|
|
19344
19505
|
return h("svg", {
|
|
19345
19506
|
"attrs": {
|
|
19346
19507
|
"xmlns": "http://www.w3.org/2000/svg",
|
|
19347
|
-
"alt": "
|
|
19508
|
+
"alt": "Recent Search",
|
|
19348
19509
|
"height": "20",
|
|
19349
19510
|
"width": "20",
|
|
19350
19511
|
"viewBox": "0 0 24 24"
|
|
@@ -19360,14 +19521,36 @@
|
|
|
19360
19521
|
}
|
|
19361
19522
|
}), h("path", {
|
|
19362
19523
|
"attrs": {
|
|
19363
|
-
"d": "
|
|
19524
|
+
"d": "M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"
|
|
19364
19525
|
}
|
|
19365
19526
|
})]);
|
|
19366
|
-
}
|
|
19527
|
+
}
|
|
19528
|
+
|
|
19529
|
+
if (this.$props.type === 'promoted-search-icon') {
|
|
19530
|
+
return h("svg", {
|
|
19531
|
+
"attrs": {
|
|
19532
|
+
"xmlns": "http://www.w3.org/2000/svg",
|
|
19533
|
+
"width": "20",
|
|
19534
|
+
"alt": "promoted search",
|
|
19535
|
+
"height": "20",
|
|
19536
|
+
"viewBox": "0 0 24 24"
|
|
19537
|
+
},
|
|
19538
|
+
"class": this.$props.className,
|
|
19539
|
+
"style": {
|
|
19540
|
+
fill: '#707070'
|
|
19541
|
+
}
|
|
19542
|
+
}, [h("path", {
|
|
19543
|
+
"attrs": {
|
|
19544
|
+
"d": "M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"
|
|
19545
|
+
}
|
|
19546
|
+
})]);
|
|
19547
|
+
}
|
|
19548
|
+
|
|
19549
|
+
if (this.$props.type === 'popular-search-icon') {
|
|
19367
19550
|
return h("svg", {
|
|
19368
19551
|
"attrs": {
|
|
19369
19552
|
"xmlns": "http://www.w3.org/2000/svg",
|
|
19370
|
-
"alt": "
|
|
19553
|
+
"alt": "Popular Search",
|
|
19371
19554
|
"height": "20",
|
|
19372
19555
|
"width": "20",
|
|
19373
19556
|
"viewBox": "0 0 24 24"
|
|
@@ -19383,10 +19566,21 @@
|
|
|
19383
19566
|
}
|
|
19384
19567
|
}), h("path", {
|
|
19385
19568
|
"attrs": {
|
|
19386
|
-
"d": "
|
|
19569
|
+
"d": "M16 6l2.29 2.29-4.88 4.88-4-4L2 16.59 3.41 18l6-6 4 4 6.3-6.29L22 12V6z"
|
|
19387
19570
|
}
|
|
19388
19571
|
})]);
|
|
19389
19572
|
}
|
|
19573
|
+
|
|
19574
|
+
return h(SearchSvg, {
|
|
19575
|
+
"attrs": {
|
|
19576
|
+
"styles": {
|
|
19577
|
+
position: 'relative',
|
|
19578
|
+
fill: '#707070',
|
|
19579
|
+
left: '3px',
|
|
19580
|
+
marginRight: '8px'
|
|
19581
|
+
}
|
|
19582
|
+
}
|
|
19583
|
+
});
|
|
19390
19584
|
}
|
|
19391
19585
|
};
|
|
19392
19586
|
|
|
@@ -19458,11 +19652,15 @@
|
|
|
19458
19652
|
console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
|
|
19459
19653
|
}
|
|
19460
19654
|
|
|
19461
|
-
this.loadPopularSuggestions(this.$props.componentId);
|
|
19462
19655
|
this.currentValue = this.selectedValue || '';
|
|
19656
|
+
var shouldFetchInitialSuggestions = this.$props.enableDefaultSuggestions || this.currentValue;
|
|
19657
|
+
|
|
19658
|
+
if (shouldFetchInitialSuggestions) {
|
|
19659
|
+
this.loadPopularSuggestions(this.$props.componentId);
|
|
19463
19660
|
|
|
19464
|
-
|
|
19465
|
-
|
|
19661
|
+
if (enableRecentSearches) {
|
|
19662
|
+
this.getRecentSearches();
|
|
19663
|
+
}
|
|
19466
19664
|
}
|
|
19467
19665
|
|
|
19468
19666
|
this.handleTextChange = debounce$1(this.handleText, this.$props.debounce); // Set custom and default queries in store
|
|
@@ -19499,7 +19697,7 @@
|
|
|
19499
19697
|
defaultSearchSuggestions: function defaultSearchSuggestions() {
|
|
19500
19698
|
var isPopularSuggestionsEnabled = this.enableQuerySuggestions || this.enablePopularSuggestions;
|
|
19501
19699
|
|
|
19502
|
-
if (this.currentValue) {
|
|
19700
|
+
if (this.currentValue || !this.enableDefaultSuggestions) {
|
|
19503
19701
|
return [];
|
|
19504
19702
|
}
|
|
19505
19703
|
|
|
@@ -19596,7 +19794,8 @@
|
|
|
19596
19794
|
addonBefore: VueTypes.any,
|
|
19597
19795
|
addonAfter: VueTypes.any,
|
|
19598
19796
|
expandSuggestionsContainer: VueTypes.bool.def(true),
|
|
19599
|
-
index: VueTypes.string
|
|
19797
|
+
index: VueTypes.string,
|
|
19798
|
+
enableDefaultSuggestions: VueTypes.bool.def(true)
|
|
19600
19799
|
},
|
|
19601
19800
|
beforeMount: function beforeMount() {
|
|
19602
19801
|
if (this.$props.highlight) {
|
|
@@ -19764,7 +19963,7 @@
|
|
|
19764
19963
|
// returns size and aggs property
|
|
19765
19964
|
getBasicQueryOptions: function getBasicQueryOptions() {
|
|
19766
19965
|
var aggregationField = this.$props.aggregationField;
|
|
19767
|
-
var queryOptions =
|
|
19966
|
+
var queryOptions = helper_28(this.$props);
|
|
19768
19967
|
|
|
19769
19968
|
if (aggregationField) {
|
|
19770
19969
|
queryOptions.aggs = getCompositeAggsQuery$1({
|
|
@@ -20223,11 +20422,17 @@
|
|
|
20223
20422
|
var _this$$props4 = this.$props,
|
|
20224
20423
|
theme = _this$$props4.theme,
|
|
20225
20424
|
size = _this$$props4.size,
|
|
20226
|
-
expandSuggestionsContainer = _this$$props4.expandSuggestionsContainer
|
|
20425
|
+
expandSuggestionsContainer = _this$$props4.expandSuggestionsContainer,
|
|
20426
|
+
enableDefaultSuggestions = _this$$props4.enableDefaultSuggestions;
|
|
20227
20427
|
var _this$$scopedSlots = this.$scopedSlots,
|
|
20228
20428
|
recentSearchesIcon = _this$$scopedSlots.recentSearchesIcon,
|
|
20229
20429
|
popularSearchesIcon = _this$$scopedSlots.popularSearchesIcon;
|
|
20230
20430
|
var hasSuggestions = this.currentValue ? this.suggestionsList.length || this.topSuggestions.length : this.defaultSearchSuggestions.length;
|
|
20431
|
+
|
|
20432
|
+
if (enableDefaultSuggestions === false && !this.currentValue) {
|
|
20433
|
+
hasSuggestions = false;
|
|
20434
|
+
}
|
|
20435
|
+
|
|
20231
20436
|
return h(Container, {
|
|
20232
20437
|
"class": this.$props.className
|
|
20233
20438
|
}, [this.$props.title && h(Title, {
|
|
@@ -20554,95 +20759,1289 @@
|
|
|
20554
20759
|
return finalQuery;
|
|
20555
20760
|
};
|
|
20556
20761
|
|
|
20557
|
-
DataSearch.highlightQuery = function (props) {
|
|
20558
|
-
if (props.customHighlight) {
|
|
20559
|
-
return props.customHighlight(props);
|
|
20560
|
-
}
|
|
20561
|
-
|
|
20562
|
-
if (!props.highlight) {
|
|
20563
|
-
return null;
|
|
20564
|
-
}
|
|
20565
|
-
|
|
20566
|
-
var fields = {};
|
|
20567
|
-
var highlightField = props.highlightField ? props.highlightField : props.dataField;
|
|
20568
|
-
|
|
20569
|
-
if (typeof highlightField === 'string') {
|
|
20570
|
-
fields[highlightField] = {};
|
|
20571
|
-
} else if (Array.isArray(highlightField)) {
|
|
20572
|
-
highlightField.forEach(function (item) {
|
|
20573
|
-
fields[item] = {};
|
|
20574
|
-
});
|
|
20575
|
-
}
|
|
20576
|
-
|
|
20577
|
-
return {
|
|
20578
|
-
highlight: _extends({
|
|
20579
|
-
pre_tags: ['<mark>'],
|
|
20580
|
-
post_tags: ['</mark>'],
|
|
20581
|
-
fields: fields
|
|
20582
|
-
}, props.highlightField && {
|
|
20583
|
-
require_field_match: false
|
|
20584
|
-
})
|
|
20585
|
-
};
|
|
20586
|
-
};
|
|
20587
|
-
|
|
20588
|
-
DataSearch.hasInternalComponent = function () {
|
|
20589
|
-
return true;
|
|
20590
|
-
};
|
|
20591
|
-
|
|
20592
|
-
var mapStateToProps$3 = function mapStateToProps(state, props) {
|
|
20762
|
+
DataSearch.highlightQuery = function (props) {
|
|
20763
|
+
if (props.customHighlight) {
|
|
20764
|
+
return props.customHighlight(props);
|
|
20765
|
+
}
|
|
20766
|
+
|
|
20767
|
+
if (!props.highlight) {
|
|
20768
|
+
return null;
|
|
20769
|
+
}
|
|
20770
|
+
|
|
20771
|
+
var fields = {};
|
|
20772
|
+
var highlightField = props.highlightField ? props.highlightField : props.dataField;
|
|
20773
|
+
|
|
20774
|
+
if (typeof highlightField === 'string') {
|
|
20775
|
+
fields[highlightField] = {};
|
|
20776
|
+
} else if (Array.isArray(highlightField)) {
|
|
20777
|
+
highlightField.forEach(function (item) {
|
|
20778
|
+
fields[item] = {};
|
|
20779
|
+
});
|
|
20780
|
+
}
|
|
20781
|
+
|
|
20782
|
+
return {
|
|
20783
|
+
highlight: _extends({
|
|
20784
|
+
pre_tags: ['<mark>'],
|
|
20785
|
+
post_tags: ['</mark>'],
|
|
20786
|
+
fields: fields
|
|
20787
|
+
}, props.highlightField && {
|
|
20788
|
+
require_field_match: false
|
|
20789
|
+
})
|
|
20790
|
+
};
|
|
20791
|
+
};
|
|
20792
|
+
|
|
20793
|
+
DataSearch.hasInternalComponent = function () {
|
|
20794
|
+
return true;
|
|
20795
|
+
};
|
|
20796
|
+
|
|
20797
|
+
var mapStateToProps$3 = function mapStateToProps(state, props) {
|
|
20798
|
+
return {
|
|
20799
|
+
selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || null,
|
|
20800
|
+
suggestions: state.hits[props.componentId] && state.hits[props.componentId].hits,
|
|
20801
|
+
rawData: state.rawData[props.componentId],
|
|
20802
|
+
aggregationData: state.compositeAggregations[props.componentId] || [],
|
|
20803
|
+
isLoading: !!state.isLoading[props.componentId + "_active"],
|
|
20804
|
+
themePreset: state.config.themePreset,
|
|
20805
|
+
error: state.error[props.componentId],
|
|
20806
|
+
analytics: state.analytics,
|
|
20807
|
+
enableAppbase: state.config.enableAppbase,
|
|
20808
|
+
headers: state.appbaseRef.headers,
|
|
20809
|
+
promotedResults: state.promotedResults[props.componentId] || [],
|
|
20810
|
+
customData: state.customData[props.componentId],
|
|
20811
|
+
time: state.hits[props.componentId] && state.hits[props.componentId].time || 0,
|
|
20812
|
+
total: state.hits[props.componentId] && state.hits[props.componentId].total,
|
|
20813
|
+
hidden: state.hits[props.componentId] && state.hits[props.componentId].hidden,
|
|
20814
|
+
popularSuggestions: state.querySuggestions[props.componentId],
|
|
20815
|
+
defaultPopularSuggestions: state.defaultPopularSuggestions[props.componentId],
|
|
20816
|
+
componentProps: state.props[props.componentId],
|
|
20817
|
+
lastUsedQuery: state.queryToHits[props.componentId],
|
|
20818
|
+
recentSearches: state.recentSearches.data
|
|
20819
|
+
};
|
|
20820
|
+
};
|
|
20821
|
+
|
|
20822
|
+
var mapDispatchToProps$2 = {
|
|
20823
|
+
setQueryOptions: setQueryOptions$1,
|
|
20824
|
+
updateQuery: updateQuery$1,
|
|
20825
|
+
setCustomQuery: setCustomQuery,
|
|
20826
|
+
setDefaultQuery: setDefaultQuery$1,
|
|
20827
|
+
setCustomHighlightOptions: setCustomHighlightOptions,
|
|
20828
|
+
recordSuggestionClick: recordSuggestionClick,
|
|
20829
|
+
loadPopularSuggestions: loadPopularSuggestions,
|
|
20830
|
+
getRecentSearches: getRecentSearches
|
|
20831
|
+
};
|
|
20832
|
+
var DSConnected = ComponentWrapper$1(connect(mapStateToProps$3, mapDispatchToProps$2)(DataSearch), {
|
|
20833
|
+
componentType: constants_1$1.dataSearch,
|
|
20834
|
+
internalComponent: DataSearch.hasInternalComponent()
|
|
20835
|
+
});
|
|
20836
|
+
|
|
20837
|
+
DataSearch.install = function (Vue) {
|
|
20838
|
+
Vue.component(DataSearch.name, DSConnected);
|
|
20839
|
+
}; // Add componentType for SSR
|
|
20840
|
+
|
|
20841
|
+
|
|
20842
|
+
DataSearch.componentType = constants_1$1.dataSearch;
|
|
20843
|
+
|
|
20844
|
+
var _templateObject$j;
|
|
20845
|
+
var AutofillSvgIcon = index$1('button')(_templateObject$j || (_templateObject$j = _taggedTemplateLiteralLoose(["\n\tdisplay: flex;\n\tmargin-left: auto;\n\tposition: relative;\n\tright: -3px;\n\tborder: none;\n\toutline: none;\n\tbackground: transparent;\n\tpadding: 0;\n\tz-index: 111000;\n\n\tsvg {\n\t\tcursor: pointer;\n\t\tfill: #707070;\n\t\theight: 20px;\n\t}\n\n\t&:hover {\n\t\tsvg {\n\t\t\tfill: #1c1a1a;\n\t\t}\n\t}\n"])));
|
|
20846
|
+
var AutoFillSvg = {
|
|
20847
|
+
name: 'AutoFillSvg',
|
|
20848
|
+
render: function render() {
|
|
20849
|
+
var h = arguments[0];
|
|
20850
|
+
return h(AutofillSvgIcon, {
|
|
20851
|
+
"on": {
|
|
20852
|
+
"click": this.$listeners.click
|
|
20853
|
+
}
|
|
20854
|
+
}, [h("svg", {
|
|
20855
|
+
"attrs": {
|
|
20856
|
+
"viewBox": "0 0 24 24"
|
|
20857
|
+
}
|
|
20858
|
+
}, [h("path", {
|
|
20859
|
+
"attrs": {
|
|
20860
|
+
"d": "M8 17v-7.586l8.293 8.293c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414l-8.293-8.293h7.586c0.552 0 1-0.448 1-1s-0.448-1-1-1h-10c-0.552 0-1 0.448-1 1v10c0 0.552 0.448 1 1 1s1-0.448 1-1z"
|
|
20861
|
+
}
|
|
20862
|
+
})])]);
|
|
20863
|
+
},
|
|
20864
|
+
methods: {
|
|
20865
|
+
clicked: function clicked(e) {
|
|
20866
|
+
e.stopPropagation();
|
|
20867
|
+
window.console.log('hey', e);
|
|
20868
|
+
}
|
|
20869
|
+
}
|
|
20870
|
+
};
|
|
20871
|
+
|
|
20872
|
+
var updateQuery$2 = lib_5.updateQuery,
|
|
20873
|
+
setCustomQuery$1 = lib_5.setCustomQuery,
|
|
20874
|
+
setDefaultQuery$2 = lib_5.setDefaultQuery,
|
|
20875
|
+
recordSuggestionClick$1 = lib_5.recordSuggestionClick;
|
|
20876
|
+
var _debounce = lib_8.debounce,
|
|
20877
|
+
checkValueChange$1 = lib_8.checkValueChange,
|
|
20878
|
+
getClassName$4 = lib_8.getClassName,
|
|
20879
|
+
isEqual$5 = lib_8.isEqual,
|
|
20880
|
+
getCompositeAggsQuery$2 = lib_8.getCompositeAggsQuery,
|
|
20881
|
+
withClickIds$1 = lib_8.withClickIds,
|
|
20882
|
+
getResultStats$2 = lib_8.getResultStats,
|
|
20883
|
+
normalizeDataField$1 = lib_8.normalizeDataField;
|
|
20884
|
+
var SearchBox = {
|
|
20885
|
+
name: 'SearchBox',
|
|
20886
|
+
data: function data() {
|
|
20887
|
+
var props = this.$props;
|
|
20888
|
+
this.__state = {
|
|
20889
|
+
currentValue: '',
|
|
20890
|
+
isOpen: false,
|
|
20891
|
+
normalizedSuggestions: []
|
|
20892
|
+
};
|
|
20893
|
+
this.internalComponent = props.componentId + "__internal";
|
|
20894
|
+
return this.__state;
|
|
20895
|
+
},
|
|
20896
|
+
inject: {
|
|
20897
|
+
theme: {
|
|
20898
|
+
from: 'theme_reactivesearch'
|
|
20899
|
+
}
|
|
20900
|
+
},
|
|
20901
|
+
created: function created() {
|
|
20902
|
+
var _this$$props = this.$props,
|
|
20903
|
+
distinctField = _this$$props.distinctField,
|
|
20904
|
+
distinctFieldConfig = _this$$props.distinctFieldConfig,
|
|
20905
|
+
index = _this$$props.index;
|
|
20906
|
+
|
|
20907
|
+
if (this.enableAppbase && this.aggregationField && this.aggregationField !== '') {
|
|
20908
|
+
console.warn('Warning(ReactiveSearch): The `aggregationField` prop has been marked as deprecated, please use the `distinctField` prop instead.');
|
|
20909
|
+
}
|
|
20910
|
+
|
|
20911
|
+
if (!this.enableAppbase && (distinctField || distinctFieldConfig)) {
|
|
20912
|
+
console.warn('Warning(ReactiveSearch): In order to use the `distinctField` and `distinctFieldConfig` props, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
|
|
20913
|
+
}
|
|
20914
|
+
|
|
20915
|
+
if (!this.enableAppbase && index) {
|
|
20916
|
+
console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
|
|
20917
|
+
}
|
|
20918
|
+
|
|
20919
|
+
this.currentValue = this.selectedValue || this.value || this.defaultValue || '';
|
|
20920
|
+
this.handleTextChange = _debounce(this.handleText, this.$props.debounce);
|
|
20921
|
+
this.setValue(this.currentValue, true, this.$props, undefined, false, this.selectedCategory); // Set custom and default queries in store
|
|
20922
|
+
|
|
20923
|
+
this.triggerCustomQuery(this.currentValue, this.selectedCategory);
|
|
20924
|
+
this.triggerDefaultQuery(this.currentValue);
|
|
20925
|
+
},
|
|
20926
|
+
computed: {
|
|
20927
|
+
hasCustomRenderer: function hasCustomRenderer$1() {
|
|
20928
|
+
return hasCustomRenderer(this);
|
|
20929
|
+
},
|
|
20930
|
+
stats: function stats() {
|
|
20931
|
+
return getResultStats$2(this);
|
|
20932
|
+
}
|
|
20933
|
+
},
|
|
20934
|
+
props: {
|
|
20935
|
+
autoFocus: VueTypes.bool,
|
|
20936
|
+
autosuggest: VueTypes.bool.def(true),
|
|
20937
|
+
beforeValueChange: types.func,
|
|
20938
|
+
className: VueTypes.string.def(''),
|
|
20939
|
+
clearIcon: types.children,
|
|
20940
|
+
componentId: types.stringRequired,
|
|
20941
|
+
customHighlight: types.func,
|
|
20942
|
+
customQuery: types.func,
|
|
20943
|
+
defaultQuery: types.func,
|
|
20944
|
+
dataField: VueTypes.oneOfType([VueTypes.string, VueTypes.shape({
|
|
20945
|
+
field: VueTypes.string,
|
|
20946
|
+
weight: VueTypes.number
|
|
20947
|
+
}), VueTypes.arrayOf(VueTypes.string), VueTypes.arrayOf({
|
|
20948
|
+
field: VueTypes.string,
|
|
20949
|
+
weight: VueTypes.number
|
|
20950
|
+
})]),
|
|
20951
|
+
aggregationField: types.string,
|
|
20952
|
+
aggregationSize: VueTypes.number,
|
|
20953
|
+
size: VueTypes.number,
|
|
20954
|
+
debounce: VueTypes.number.def(0),
|
|
20955
|
+
defaultValue: types.string,
|
|
20956
|
+
excludeFields: types.excludeFields,
|
|
20957
|
+
value: types.value,
|
|
20958
|
+
defaultSuggestions: types.suggestions,
|
|
20959
|
+
enableSynonyms: VueTypes.bool.def(true),
|
|
20960
|
+
enableQuerySuggestions: VueTypes.bool.def(false),
|
|
20961
|
+
enablePopularSuggestions: VueTypes.bool.def(false),
|
|
20962
|
+
enableRecentSuggestions: VueTypes.bool.def(false),
|
|
20963
|
+
fieldWeights: types.fieldWeights,
|
|
20964
|
+
filterLabel: types.string,
|
|
20965
|
+
fuzziness: types.fuzziness,
|
|
20966
|
+
highlight: VueTypes.bool,
|
|
20967
|
+
highlightField: types.stringOrArray,
|
|
20968
|
+
icon: types.children,
|
|
20969
|
+
iconPosition: VueTypes.oneOf(['left', 'right']).def('left'),
|
|
20970
|
+
includeFields: types.includeFields,
|
|
20971
|
+
innerClass: types.style,
|
|
20972
|
+
innerRef: VueTypes.string.def('searchInputField'),
|
|
20973
|
+
render: types.func,
|
|
20974
|
+
renderNoSuggestion: types.title,
|
|
20975
|
+
renderError: types.title,
|
|
20976
|
+
placeholder: VueTypes.string.def('Search'),
|
|
20977
|
+
queryFormat: VueTypes.oneOf(['and', 'or']).def('or'),
|
|
20978
|
+
react: types.react,
|
|
20979
|
+
showClear: VueTypes.bool.def(true),
|
|
20980
|
+
showDistinctSuggestions: VueTypes.bool.def(true),
|
|
20981
|
+
showFilter: VueTypes.bool.def(true),
|
|
20982
|
+
showIcon: VueTypes.bool.def(true),
|
|
20983
|
+
title: types.title,
|
|
20984
|
+
theme: types.style,
|
|
20985
|
+
URLParams: VueTypes.bool.def(false),
|
|
20986
|
+
strictSelection: VueTypes.bool.def(false),
|
|
20987
|
+
nestedField: types.string,
|
|
20988
|
+
enablePredictiveSuggestions: VueTypes.bool.def(false),
|
|
20989
|
+
recentSearchesIcon: VueTypes.any,
|
|
20990
|
+
popularSearchesIcon: VueTypes.any,
|
|
20991
|
+
// mic props
|
|
20992
|
+
showVoiceSearch: VueTypes.bool.def(false),
|
|
20993
|
+
getMicInstance: types.func,
|
|
20994
|
+
renderMic: types.func,
|
|
20995
|
+
distinctField: types.string,
|
|
20996
|
+
distinctFieldConfig: types.props,
|
|
20997
|
+
//
|
|
20998
|
+
focusShortcuts: VueTypes.arrayOf(VueTypes.oneOfType([VueTypes.string, VueTypes.number])).def(['/']),
|
|
20999
|
+
addonBefore: VueTypes.any,
|
|
21000
|
+
addonAfter: VueTypes.any,
|
|
21001
|
+
expandSuggestionsContainer: VueTypes.bool.def(true),
|
|
21002
|
+
index: VueTypes.string,
|
|
21003
|
+
popularSuggestionsConfig: VueTypes.object,
|
|
21004
|
+
recentSuggestionsConfig: VueTypes.object,
|
|
21005
|
+
applyStopwords: VueTypes.bool,
|
|
21006
|
+
customStopwords: types.stringArray,
|
|
21007
|
+
onData: types.func,
|
|
21008
|
+
renderItem: types.func,
|
|
21009
|
+
enterButton: VueTypes.bool.def(false),
|
|
21010
|
+
renderEnterButton: VueTypes.any
|
|
21011
|
+
},
|
|
21012
|
+
mounted: function mounted() {
|
|
21013
|
+
this.listenForFocusShortcuts();
|
|
21014
|
+
},
|
|
21015
|
+
watch: {
|
|
21016
|
+
dataField: function dataField(newVal, oldVal) {
|
|
21017
|
+
if (!isEqual$5(newVal, oldVal)) {
|
|
21018
|
+
this.triggerCustomQuery(this.$data.currentValue);
|
|
21019
|
+
}
|
|
21020
|
+
},
|
|
21021
|
+
fieldWeights: function fieldWeights() {
|
|
21022
|
+
this.triggerCustomQuery(this.$data.currentValue);
|
|
21023
|
+
},
|
|
21024
|
+
fuzziness: function fuzziness() {
|
|
21025
|
+
this.triggerCustomQuery(this.$data.currentValue);
|
|
21026
|
+
},
|
|
21027
|
+
queryFormat: function queryFormat() {
|
|
21028
|
+
this.triggerCustomQuery(this.$data.currentValue);
|
|
21029
|
+
},
|
|
21030
|
+
defaultValue: function defaultValue(newVal) {
|
|
21031
|
+
this.setValue(newVal, true, this.$props);
|
|
21032
|
+
},
|
|
21033
|
+
value: function value(newVal, oldVal) {
|
|
21034
|
+
if (!isEqual$5(newVal, oldVal)) {
|
|
21035
|
+
this.setValue(newVal, true, this.$props, newVal === '' ? lib_7.CLEAR_VALUE : undefined, false);
|
|
21036
|
+
}
|
|
21037
|
+
},
|
|
21038
|
+
defaultQuery: function defaultQuery(newVal, oldVal) {
|
|
21039
|
+
if (!isQueryIdentical(newVal, oldVal, this.$data.currentValue, this.$props)) {
|
|
21040
|
+
this.triggerDefaultQuery(this.$data.currentValue);
|
|
21041
|
+
}
|
|
21042
|
+
},
|
|
21043
|
+
customQuery: function customQuery(newVal, oldVal) {
|
|
21044
|
+
if (!isQueryIdentical(newVal, oldVal, this.$data.currentValue, this.$props)) {
|
|
21045
|
+
this.triggerCustomQuery(this.$data.currentValue);
|
|
21046
|
+
}
|
|
21047
|
+
},
|
|
21048
|
+
suggestions: function suggestions(newVal) {
|
|
21049
|
+
var suggestionsList = [];
|
|
21050
|
+
|
|
21051
|
+
if (Array.isArray(newVal) && newVal.length) {
|
|
21052
|
+
suggestionsList = [].concat(withClickIds$1(newVal));
|
|
21053
|
+
} else if (Array.isArray(this.$props.defaultSuggestions) && this.$props.defaultSuggestions.length) {
|
|
21054
|
+
suggestionsList = [].concat(withClickIds$1(this.$props.defaultSuggestions));
|
|
21055
|
+
}
|
|
21056
|
+
|
|
21057
|
+
this.normalizedSuggestions = suggestionsList;
|
|
21058
|
+
},
|
|
21059
|
+
selectedValue: function selectedValue(newVal, oldVal) {
|
|
21060
|
+
if (oldVal !== newVal && this.$data.currentValue !== newVal) {
|
|
21061
|
+
if (!newVal && this.$data.currentValue) {
|
|
21062
|
+
// selected value is cleared, call onValueSelected
|
|
21063
|
+
this.onValueSelectedHandler('', lib_7.CLEAR_VALUE);
|
|
21064
|
+
}
|
|
21065
|
+
|
|
21066
|
+
if (this.$props.value === undefined) {
|
|
21067
|
+
this.setValue(newVal || '', true, this.$props);
|
|
21068
|
+
}
|
|
21069
|
+
}
|
|
21070
|
+
},
|
|
21071
|
+
focusShortcuts: function focusShortcuts() {
|
|
21072
|
+
this.listenForFocusShortcuts();
|
|
21073
|
+
},
|
|
21074
|
+
rawData: function rawData(newVal) {
|
|
21075
|
+
this.$emit('on-data', {
|
|
21076
|
+
data: this.normalizedSuggestions,
|
|
21077
|
+
rawData: newVal,
|
|
21078
|
+
aggregationData: this.aggregationData,
|
|
21079
|
+
loading: this.isLoading,
|
|
21080
|
+
error: this.isError
|
|
21081
|
+
});
|
|
21082
|
+
},
|
|
21083
|
+
aggregationData: function aggregationData(newVal) {
|
|
21084
|
+
this.$emit('on-data', {
|
|
21085
|
+
data: this.normalizedSuggestions,
|
|
21086
|
+
rawData: this.rawData,
|
|
21087
|
+
aggregationData: newVal,
|
|
21088
|
+
loading: this.isLoading,
|
|
21089
|
+
error: this.isError
|
|
21090
|
+
});
|
|
21091
|
+
},
|
|
21092
|
+
loading: function loading(newVal) {
|
|
21093
|
+
this.$emit('on-data', {
|
|
21094
|
+
data: this.normalizedSuggestions,
|
|
21095
|
+
rawData: this.rawData,
|
|
21096
|
+
aggregationData: this.aggregationData,
|
|
21097
|
+
loading: newVal,
|
|
21098
|
+
error: this.isError
|
|
21099
|
+
});
|
|
21100
|
+
},
|
|
21101
|
+
error: function error(newVal) {
|
|
21102
|
+
this.$emit('on-data', {
|
|
21103
|
+
data: this.normalizedSuggestions,
|
|
21104
|
+
rawData: this.rawData,
|
|
21105
|
+
aggregationData: this.aggregationData,
|
|
21106
|
+
loading: this.isLoading,
|
|
21107
|
+
error: newVal
|
|
21108
|
+
});
|
|
21109
|
+
},
|
|
21110
|
+
debounce: function debounce(newVal, oldVal) {
|
|
21111
|
+
if (!isEqual$5(newVal, oldVal)) {
|
|
21112
|
+
this.handleTextChange = _debounce(this.handleText, newVal);
|
|
21113
|
+
}
|
|
21114
|
+
}
|
|
21115
|
+
},
|
|
21116
|
+
methods: {
|
|
21117
|
+
handleText: function handleText(value, cause) {
|
|
21118
|
+
if (cause === lib_7.CLEAR_VALUE) {
|
|
21119
|
+
this.triggerCustomQuery(value);
|
|
21120
|
+
this.triggerDefaultQuery(value);
|
|
21121
|
+
} else if (this.$props.autosuggest) {
|
|
21122
|
+
this.triggerDefaultQuery(value);
|
|
21123
|
+
} else if (!this.$props.enterButton) {
|
|
21124
|
+
this.triggerCustomQuery(value);
|
|
21125
|
+
}
|
|
21126
|
+
},
|
|
21127
|
+
validateDataField: function validateDataField() {
|
|
21128
|
+
var propName = 'dataField';
|
|
21129
|
+
var componentName = SearchBox.name;
|
|
21130
|
+
var props = this.$props;
|
|
21131
|
+
var requiredError = propName + " supplied to " + componentName + " is required. Validation failed.";
|
|
21132
|
+
var propValue = props[propName];
|
|
21133
|
+
|
|
21134
|
+
if (!this.enableAppbase) {
|
|
21135
|
+
if (!propValue) {
|
|
21136
|
+
console.error(requiredError);
|
|
21137
|
+
return;
|
|
21138
|
+
}
|
|
21139
|
+
|
|
21140
|
+
if (typeof propValue !== 'string' && typeof propValue !== 'object' && !Array.isArray(propValue)) {
|
|
21141
|
+
console.error("Invalid " + propName + " supplied to " + componentName + ". Validation failed.");
|
|
21142
|
+
return;
|
|
21143
|
+
}
|
|
21144
|
+
|
|
21145
|
+
if (Array.isArray(propValue) && propValue.length === 0) {
|
|
21146
|
+
console.error(requiredError);
|
|
21147
|
+
}
|
|
21148
|
+
}
|
|
21149
|
+
},
|
|
21150
|
+
getComponent: function getComponent$1(downshiftProps) {
|
|
21151
|
+
if (downshiftProps === void 0) {
|
|
21152
|
+
downshiftProps = {};
|
|
21153
|
+
}
|
|
21154
|
+
|
|
21155
|
+
var currentValue = this.$data.currentValue;
|
|
21156
|
+
var data = {
|
|
21157
|
+
error: this.error,
|
|
21158
|
+
loading: this.isLoading,
|
|
21159
|
+
downshiftProps: downshiftProps,
|
|
21160
|
+
data: this.normalizedSuggestions,
|
|
21161
|
+
rawData: this.rawData,
|
|
21162
|
+
value: currentValue,
|
|
21163
|
+
resultStats: this.stats
|
|
21164
|
+
};
|
|
21165
|
+
return getComponent(data, this);
|
|
21166
|
+
},
|
|
21167
|
+
// returns size and aggs property
|
|
21168
|
+
getBasicQueryOptions: function getBasicQueryOptions() {
|
|
21169
|
+
var aggregationField = this.$props.aggregationField;
|
|
21170
|
+
var queryOptions = helper_28(this.$props);
|
|
21171
|
+
|
|
21172
|
+
if (aggregationField) {
|
|
21173
|
+
queryOptions.aggs = getCompositeAggsQuery$2({
|
|
21174
|
+
props: this.$props,
|
|
21175
|
+
showTopHits: true
|
|
21176
|
+
}).aggs;
|
|
21177
|
+
}
|
|
21178
|
+
|
|
21179
|
+
return queryOptions;
|
|
21180
|
+
},
|
|
21181
|
+
handleSearchIconClick: function handleSearchIconClick() {
|
|
21182
|
+
var currentValue = this.currentValue;
|
|
21183
|
+
|
|
21184
|
+
if (currentValue.trim()) {
|
|
21185
|
+
this.setValue(currentValue, true);
|
|
21186
|
+
this.onValueSelectedHandler(currentValue, lib_7.SEARCH_ICON_CLICK);
|
|
21187
|
+
}
|
|
21188
|
+
},
|
|
21189
|
+
setValue: function setValue(value, isDefaultValue, props, cause, toggleIsOpen, categoryValue) {
|
|
21190
|
+
var _this = this;
|
|
21191
|
+
|
|
21192
|
+
if (isDefaultValue === void 0) {
|
|
21193
|
+
isDefaultValue = false;
|
|
21194
|
+
}
|
|
21195
|
+
|
|
21196
|
+
if (props === void 0) {
|
|
21197
|
+
props = this.$props;
|
|
21198
|
+
}
|
|
21199
|
+
|
|
21200
|
+
if (toggleIsOpen === void 0) {
|
|
21201
|
+
toggleIsOpen = true;
|
|
21202
|
+
}
|
|
21203
|
+
|
|
21204
|
+
if (categoryValue === void 0) {
|
|
21205
|
+
categoryValue = undefined;
|
|
21206
|
+
}
|
|
21207
|
+
|
|
21208
|
+
var performUpdate = function performUpdate() {
|
|
21209
|
+
_this.currentValue = value;
|
|
21210
|
+
|
|
21211
|
+
if (isDefaultValue) {
|
|
21212
|
+
if (_this.$props.autosuggest) {
|
|
21213
|
+
if (toggleIsOpen) {
|
|
21214
|
+
_this.isOpen = false;
|
|
21215
|
+
}
|
|
21216
|
+
|
|
21217
|
+
_this.triggerDefaultQuery(value);
|
|
21218
|
+
} // in case of strict selection only SUGGESTION_SELECT should be able
|
|
21219
|
+
// to set the query otherwise the value should reset
|
|
21220
|
+
|
|
21221
|
+
|
|
21222
|
+
if (props.strictSelection) {
|
|
21223
|
+
if (cause === lib_7.SUGGESTION_SELECT || value === '') {
|
|
21224
|
+
_this.triggerCustomQuery(value, categoryValue);
|
|
21225
|
+
} else {
|
|
21226
|
+
_this.setValue('', true);
|
|
21227
|
+
}
|
|
21228
|
+
} else if (props.value === undefined) {
|
|
21229
|
+
_this.triggerCustomQuery(value, categoryValue);
|
|
21230
|
+
}
|
|
21231
|
+
} else {
|
|
21232
|
+
// debounce for handling text while typing
|
|
21233
|
+
_this.handleTextChange(value, cause);
|
|
21234
|
+
}
|
|
21235
|
+
|
|
21236
|
+
_this.$emit('valueChange', value);
|
|
21237
|
+
|
|
21238
|
+
_this.$emit('value-change', value);
|
|
21239
|
+
};
|
|
21240
|
+
|
|
21241
|
+
checkValueChange$1(props.componentId, value, props.beforeValueChange, performUpdate);
|
|
21242
|
+
},
|
|
21243
|
+
triggerDefaultQuery: function triggerDefaultQuery(paramValue) {
|
|
21244
|
+
if (!this.$props.autosuggest) {
|
|
21245
|
+
return;
|
|
21246
|
+
}
|
|
21247
|
+
|
|
21248
|
+
var value = typeof paramValue !== 'string' ? this.currentValue : paramValue;
|
|
21249
|
+
var query = SearchBox.defaultQuery(value, this.$props);
|
|
21250
|
+
|
|
21251
|
+
if (this.defaultQuery) {
|
|
21252
|
+
var defaultQueryToBeSet = this.defaultQuery(value, this.$props) || {};
|
|
21253
|
+
|
|
21254
|
+
if (defaultQueryToBeSet.query) {
|
|
21255
|
+
query = defaultQueryToBeSet.query;
|
|
21256
|
+
} // Update calculated default query in store
|
|
21257
|
+
|
|
21258
|
+
|
|
21259
|
+
updateDefaultQuery(this.$props.componentId, this.setDefaultQuery, this.$props, value);
|
|
21260
|
+
}
|
|
21261
|
+
|
|
21262
|
+
this.updateQuery({
|
|
21263
|
+
componentId: this.internalComponent,
|
|
21264
|
+
query: query,
|
|
21265
|
+
value: value,
|
|
21266
|
+
componentType: constants_1$1.searchBox
|
|
21267
|
+
});
|
|
21268
|
+
},
|
|
21269
|
+
triggerCustomQuery: function triggerCustomQuery(paramValue, categoryValue) {
|
|
21270
|
+
if (categoryValue === void 0) {
|
|
21271
|
+
categoryValue = undefined;
|
|
21272
|
+
}
|
|
21273
|
+
|
|
21274
|
+
var _this$$props2 = this.$props,
|
|
21275
|
+
customQuery = _this$$props2.customQuery,
|
|
21276
|
+
filterLabel = _this$$props2.filterLabel,
|
|
21277
|
+
showFilter = _this$$props2.showFilter,
|
|
21278
|
+
URLParams = _this$$props2.URLParams;
|
|
21279
|
+
var value = typeof paramValue !== 'string' ? this.$data.currentValue : paramValue;
|
|
21280
|
+
var defaultQueryTobeSet = SearchBox.defaultQuery("" + value + (categoryValue ? " in " + categoryValue : ''), this.$props);
|
|
21281
|
+
var query = defaultQueryTobeSet;
|
|
21282
|
+
|
|
21283
|
+
if (customQuery) {
|
|
21284
|
+
var customQueryTobeSet = customQuery(value, this.$props);
|
|
21285
|
+
var queryTobeSet = customQueryTobeSet.query;
|
|
21286
|
+
|
|
21287
|
+
if (queryTobeSet) {
|
|
21288
|
+
query = queryTobeSet;
|
|
21289
|
+
}
|
|
21290
|
+
|
|
21291
|
+
updateCustomQuery(this.$props.componentId, this.setCustomQuery, this.$props, value);
|
|
21292
|
+
}
|
|
21293
|
+
|
|
21294
|
+
this.updateQuery({
|
|
21295
|
+
componentId: this.$props.componentId,
|
|
21296
|
+
query: query,
|
|
21297
|
+
value: value,
|
|
21298
|
+
label: filterLabel,
|
|
21299
|
+
showFilter: showFilter,
|
|
21300
|
+
URLParams: URLParams,
|
|
21301
|
+
componentType: constants_1$1.searchBox,
|
|
21302
|
+
category: categoryValue
|
|
21303
|
+
});
|
|
21304
|
+
},
|
|
21305
|
+
handleFocus: function handleFocus(event) {
|
|
21306
|
+
if (this.$props.autosuggest) {
|
|
21307
|
+
this.isOpen = true;
|
|
21308
|
+
}
|
|
21309
|
+
|
|
21310
|
+
this.$emit('focus', event);
|
|
21311
|
+
},
|
|
21312
|
+
handleVoiceResults: function handleVoiceResults(_ref) {
|
|
21313
|
+
var results = _ref.results;
|
|
21314
|
+
|
|
21315
|
+
if (results && results[0] && results[0].isFinal && results[0][0] && results[0][0].transcript && results[0][0].transcript.trim()) {
|
|
21316
|
+
this.setValue(results[0][0].transcript.trim(), true);
|
|
21317
|
+
}
|
|
21318
|
+
},
|
|
21319
|
+
triggerQuery: function triggerQuery(_ref2) {
|
|
21320
|
+
var _ref2$isOpen = _ref2.isOpen,
|
|
21321
|
+
isOpen = _ref2$isOpen === void 0 ? undefined : _ref2$isOpen,
|
|
21322
|
+
_ref2$customQuery = _ref2.customQuery,
|
|
21323
|
+
customQuery = _ref2$customQuery === void 0 ? true : _ref2$customQuery,
|
|
21324
|
+
_ref2$defaultQuery = _ref2.defaultQuery,
|
|
21325
|
+
defaultQuery = _ref2$defaultQuery === void 0 ? true : _ref2$defaultQuery,
|
|
21326
|
+
_ref2$value = _ref2.value,
|
|
21327
|
+
value = _ref2$value === void 0 ? undefined : _ref2$value,
|
|
21328
|
+
_ref2$categoryValue = _ref2.categoryValue,
|
|
21329
|
+
categoryValue = _ref2$categoryValue === void 0 ? undefined : _ref2$categoryValue;
|
|
21330
|
+
|
|
21331
|
+
if (typeof isOpen === 'boolean') {
|
|
21332
|
+
this.isOpen = isOpen;
|
|
21333
|
+
}
|
|
21334
|
+
|
|
21335
|
+
if (customQuery) {
|
|
21336
|
+
this.triggerCustomQuery(value, categoryValue);
|
|
21337
|
+
}
|
|
21338
|
+
|
|
21339
|
+
if (defaultQuery) {
|
|
21340
|
+
this.triggerDefaultQuery(value);
|
|
21341
|
+
}
|
|
21342
|
+
},
|
|
21343
|
+
triggerClickAnalytics: function triggerClickAnalytics(searchPosition, documentId) {
|
|
21344
|
+
// click analytics would only work client side and after javascript loads
|
|
21345
|
+
var docId = documentId;
|
|
21346
|
+
|
|
21347
|
+
if (!docId) {
|
|
21348
|
+
var hitData = this.normalizedSuggestions.find(function (hit) {
|
|
21349
|
+
return hit._click_id === searchPosition;
|
|
21350
|
+
});
|
|
21351
|
+
|
|
21352
|
+
if (hitData && hitData.source && hitData.source._id) {
|
|
21353
|
+
docId = hitData.source._id;
|
|
21354
|
+
}
|
|
21355
|
+
}
|
|
21356
|
+
|
|
21357
|
+
this.recordSuggestionClick(searchPosition, docId);
|
|
21358
|
+
},
|
|
21359
|
+
clearValue: function clearValue() {
|
|
21360
|
+
this.setValue('', false, this.$props, lib_7.CLEAR_VALUE, false);
|
|
21361
|
+
this.onValueSelectedHandler('', lib_7.CLEAR_VALUE);
|
|
21362
|
+
},
|
|
21363
|
+
handleKeyDown: function handleKeyDown(event, highlightedIndex) {
|
|
21364
|
+
// if a suggestion was selected, delegate the handling to suggestion handler
|
|
21365
|
+
if (event.key === 'Enter' && highlightedIndex === null) {
|
|
21366
|
+
this.setValue(event.target.value, true);
|
|
21367
|
+
this.onValueSelectedHandler(event.target.value, lib_7.ENTER_PRESS);
|
|
21368
|
+
} // Need to review
|
|
21369
|
+
|
|
21370
|
+
|
|
21371
|
+
this.$emit('keyDown', event, this.triggerQuery);
|
|
21372
|
+
this.$emit('key-down', event, this.triggerQuery);
|
|
21373
|
+
},
|
|
21374
|
+
onInputChange: function onInputChange(e) {
|
|
21375
|
+
var _this2 = this;
|
|
21376
|
+
|
|
21377
|
+
var inputValue = e.target.value;
|
|
21378
|
+
|
|
21379
|
+
if (!this.$data.isOpen && this.$props.autosuggest) {
|
|
21380
|
+
this.isOpen = true;
|
|
21381
|
+
}
|
|
21382
|
+
|
|
21383
|
+
var value = this.$props.value;
|
|
21384
|
+
|
|
21385
|
+
if (value === undefined) {
|
|
21386
|
+
this.setValue(inputValue, false, this.$props, inputValue === '' ? lib_7.CLEAR_VALUE : undefined);
|
|
21387
|
+
} else {
|
|
21388
|
+
this.$emit('change', inputValue, function (_ref3) {
|
|
21389
|
+
var isOpen = _ref3.isOpen;
|
|
21390
|
+
return _this2.triggerQuery({
|
|
21391
|
+
defaultQuery: true,
|
|
21392
|
+
customQuery: true,
|
|
21393
|
+
value: inputValue,
|
|
21394
|
+
isOpen: isOpen
|
|
21395
|
+
});
|
|
21396
|
+
}, e);
|
|
21397
|
+
}
|
|
21398
|
+
},
|
|
21399
|
+
onSuggestionSelected: function onSuggestionSelected(suggestion) {
|
|
21400
|
+
var _this3 = this;
|
|
21401
|
+
|
|
21402
|
+
this.isOpen = false;
|
|
21403
|
+
var value = this.$props.value; // Record analytics for selected suggestions
|
|
21404
|
+
|
|
21405
|
+
this.triggerClickAnalytics(suggestion._click_id);
|
|
21406
|
+
|
|
21407
|
+
if (value === undefined) {
|
|
21408
|
+
this.setValue(suggestion.value, true, this.$props, lib_7.SUGGESTION_SELECT, false, suggestion._category);
|
|
21409
|
+
} else {
|
|
21410
|
+
this.$emit('change', suggestion.value, function (_ref4) {
|
|
21411
|
+
var isOpen = _ref4.isOpen;
|
|
21412
|
+
return _this3.triggerQuery({
|
|
21413
|
+
isOpen: isOpen,
|
|
21414
|
+
value: suggestion.value,
|
|
21415
|
+
categoryValue: suggestion._category
|
|
21416
|
+
});
|
|
21417
|
+
});
|
|
21418
|
+
}
|
|
21419
|
+
|
|
21420
|
+
this.onValueSelectedHandler(suggestion.value, lib_7.SUGGESTION_SELECT, suggestion.source);
|
|
21421
|
+
},
|
|
21422
|
+
onValueSelectedHandler: function onValueSelectedHandler(currentValue) {
|
|
21423
|
+
if (currentValue === void 0) {
|
|
21424
|
+
currentValue = this.$data.currentValue;
|
|
21425
|
+
}
|
|
21426
|
+
|
|
21427
|
+
for (var _len = arguments.length, cause = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
21428
|
+
cause[_key - 1] = arguments[_key];
|
|
21429
|
+
}
|
|
21430
|
+
|
|
21431
|
+
this.$emit.apply(this, ['valueSelected', currentValue].concat(cause));
|
|
21432
|
+
this.$emit.apply(this, ['value-selected', currentValue].concat(cause));
|
|
21433
|
+
},
|
|
21434
|
+
handleStateChange: function handleStateChange(changes) {
|
|
21435
|
+
var isOpen = changes.isOpen;
|
|
21436
|
+
this.isOpen = isOpen;
|
|
21437
|
+
},
|
|
21438
|
+
getBackgroundColor: function getBackgroundColor(highlightedIndex, index) {
|
|
21439
|
+
var isDark = this.themePreset === 'dark';
|
|
21440
|
+
|
|
21441
|
+
if (isDark) {
|
|
21442
|
+
return highlightedIndex === index ? '#555' : '#424242';
|
|
21443
|
+
}
|
|
21444
|
+
|
|
21445
|
+
return highlightedIndex === index ? '#eee' : '#fff';
|
|
21446
|
+
},
|
|
21447
|
+
renderIcon: function renderIcon() {
|
|
21448
|
+
var h = this.$createElement;
|
|
21449
|
+
|
|
21450
|
+
if (this.$props.showIcon) {
|
|
21451
|
+
return this.$props.icon || h(SearchSvg);
|
|
21452
|
+
}
|
|
21453
|
+
|
|
21454
|
+
return null;
|
|
21455
|
+
},
|
|
21456
|
+
renderErrorComponent: function renderErrorComponent() {
|
|
21457
|
+
var h = this.$createElement;
|
|
21458
|
+
var renderError = this.$scopedSlots.renderError || this.$props.renderError;
|
|
21459
|
+
|
|
21460
|
+
if (this.error && renderError && this.$data.currentValue && !this.isLoading) {
|
|
21461
|
+
return h(SuggestionWrapper, {
|
|
21462
|
+
"attrs": {
|
|
21463
|
+
"innerClass": this.$props.innerClass,
|
|
21464
|
+
"innerClassName": "error",
|
|
21465
|
+
"theme": this.theme,
|
|
21466
|
+
"themePreset": this.themePreset
|
|
21467
|
+
}
|
|
21468
|
+
}, [isFunction$1(renderError) ? renderError(this.error) : renderError]);
|
|
21469
|
+
}
|
|
21470
|
+
|
|
21471
|
+
return null;
|
|
21472
|
+
},
|
|
21473
|
+
renderCancelIcon: function renderCancelIcon() {
|
|
21474
|
+
var h = this.$createElement;
|
|
21475
|
+
|
|
21476
|
+
if (this.$props.showClear) {
|
|
21477
|
+
return this.$props.clearIcon || h(CancelSvg);
|
|
21478
|
+
}
|
|
21479
|
+
|
|
21480
|
+
return null;
|
|
21481
|
+
},
|
|
21482
|
+
renderNoSuggestions: function renderNoSuggestions(finalSuggestionsList) {
|
|
21483
|
+
if (finalSuggestionsList === void 0) {
|
|
21484
|
+
finalSuggestionsList = [];
|
|
21485
|
+
}
|
|
21486
|
+
|
|
21487
|
+
var h = this.$createElement;
|
|
21488
|
+
var _this$$props3 = this.$props,
|
|
21489
|
+
theme = _this$$props3.theme,
|
|
21490
|
+
innerClass = _this$$props3.innerClass;
|
|
21491
|
+
var renderNoSuggestion = this.$scopedSlots.renderNoSuggestion || this.$props.renderNoSuggestion;
|
|
21492
|
+
var renderError = this.$scopedSlots.renderError || this.$props.renderError;
|
|
21493
|
+
var _this$$data = this.$data,
|
|
21494
|
+
isOpen = _this$$data.isOpen,
|
|
21495
|
+
currentValue = _this$$data.currentValue;
|
|
21496
|
+
|
|
21497
|
+
if (renderNoSuggestion && isOpen && !finalSuggestionsList.length && !this.isLoading && currentValue && !(renderError && this.error)) {
|
|
21498
|
+
return h(SuggestionWrapper, {
|
|
21499
|
+
"attrs": {
|
|
21500
|
+
"innerClass": innerClass,
|
|
21501
|
+
"themePreset": this.themePreset,
|
|
21502
|
+
"theme": theme,
|
|
21503
|
+
"innerClassName": "noSuggestion"
|
|
21504
|
+
},
|
|
21505
|
+
"scopedSlots": {
|
|
21506
|
+
"default": function _default() {
|
|
21507
|
+
return typeof renderNoSuggestion === 'function' ? renderNoSuggestion(currentValue) : renderNoSuggestion;
|
|
21508
|
+
}
|
|
21509
|
+
}
|
|
21510
|
+
});
|
|
21511
|
+
}
|
|
21512
|
+
|
|
21513
|
+
return null;
|
|
21514
|
+
},
|
|
21515
|
+
renderInputAddonBefore: function renderInputAddonBefore() {
|
|
21516
|
+
var h = this.$createElement;
|
|
21517
|
+
var addonBefore = this.$scopedSlots.addonBefore;
|
|
21518
|
+
|
|
21519
|
+
if (addonBefore) {
|
|
21520
|
+
return h(InputAddon, {
|
|
21521
|
+
"class": "addon-before"
|
|
21522
|
+
}, [addonBefore()]);
|
|
21523
|
+
}
|
|
21524
|
+
|
|
21525
|
+
return null;
|
|
21526
|
+
},
|
|
21527
|
+
renderInputAddonAfter: function renderInputAddonAfter() {
|
|
21528
|
+
var h = this.$createElement;
|
|
21529
|
+
var addonAfter = this.$scopedSlots.addonAfter;
|
|
21530
|
+
|
|
21531
|
+
if (addonAfter) {
|
|
21532
|
+
return h(InputAddon, {
|
|
21533
|
+
"class": "addon-after"
|
|
21534
|
+
}, [addonAfter()]);
|
|
21535
|
+
}
|
|
21536
|
+
|
|
21537
|
+
return null;
|
|
21538
|
+
},
|
|
21539
|
+
renderEnterButtonElement: function renderEnterButtonElement() {
|
|
21540
|
+
var _this4 = this;
|
|
21541
|
+
|
|
21542
|
+
var h = this.$createElement;
|
|
21543
|
+
var _this$$props4 = this.$props,
|
|
21544
|
+
enterButton = _this$$props4.enterButton,
|
|
21545
|
+
innerClass = _this$$props4.innerClass;
|
|
21546
|
+
var renderEnterButton = this.$scopedSlots.renderEnterButton;
|
|
21547
|
+
|
|
21548
|
+
var enterButtonOnClick = function enterButtonOnClick() {
|
|
21549
|
+
return _this4.triggerQuery({
|
|
21550
|
+
isOpen: false,
|
|
21551
|
+
value: _this4.currentValue,
|
|
21552
|
+
customQuery: true
|
|
21553
|
+
});
|
|
21554
|
+
};
|
|
21555
|
+
|
|
21556
|
+
if (enterButton) {
|
|
21557
|
+
var getEnterButtonMarkup = function getEnterButtonMarkup() {
|
|
21558
|
+
if (renderEnterButton) {
|
|
21559
|
+
return renderEnterButton(enterButtonOnClick);
|
|
21560
|
+
}
|
|
21561
|
+
|
|
21562
|
+
return h(Button, {
|
|
21563
|
+
"class": "enter-btn " + getClassName$4(innerClass, 'enterButton'),
|
|
21564
|
+
"attrs": {
|
|
21565
|
+
"primary": true
|
|
21566
|
+
},
|
|
21567
|
+
"on": {
|
|
21568
|
+
"click": enterButtonOnClick
|
|
21569
|
+
}
|
|
21570
|
+
}, ["Search"]);
|
|
21571
|
+
};
|
|
21572
|
+
|
|
21573
|
+
return h("div", {
|
|
21574
|
+
"class": "enter-button-wrapper"
|
|
21575
|
+
}, [getEnterButtonMarkup()]);
|
|
21576
|
+
}
|
|
21577
|
+
|
|
21578
|
+
return null;
|
|
21579
|
+
},
|
|
21580
|
+
renderIcons: function renderIcons() {
|
|
21581
|
+
var h = this.$createElement;
|
|
21582
|
+
var _this$$props5 = this.$props,
|
|
21583
|
+
iconPosition = _this$$props5.iconPosition,
|
|
21584
|
+
showClear = _this$$props5.showClear,
|
|
21585
|
+
innerClass = _this$$props5.innerClass,
|
|
21586
|
+
getMicInstance = _this$$props5.getMicInstance,
|
|
21587
|
+
showVoiceSearch = _this$$props5.showVoiceSearch,
|
|
21588
|
+
showIcon = _this$$props5.showIcon;
|
|
21589
|
+
var renderMic = this.$scopedSlots.renderMic || this.$props.renderMic;
|
|
21590
|
+
var currentValue = this.$data.currentValue;
|
|
21591
|
+
return h("div", [h(IconGroup, {
|
|
21592
|
+
"attrs": {
|
|
21593
|
+
"groupPosition": "right",
|
|
21594
|
+
"positionType": "absolute"
|
|
21595
|
+
}
|
|
21596
|
+
}, [currentValue && showClear && h(IconWrapper, {
|
|
21597
|
+
"on": {
|
|
21598
|
+
"click": this.clearValue
|
|
21599
|
+
},
|
|
21600
|
+
"attrs": {
|
|
21601
|
+
"showIcon": showIcon,
|
|
21602
|
+
"isClearIcon": true
|
|
21603
|
+
}
|
|
21604
|
+
}, [this.renderCancelIcon()]), showVoiceSearch && h(Mic, {
|
|
21605
|
+
"attrs": {
|
|
21606
|
+
"getInstance": getMicInstance,
|
|
21607
|
+
"render": renderMic,
|
|
21608
|
+
"handleResult": this.handleVoiceResults,
|
|
21609
|
+
"className": getClassName$4(innerClass, 'mic') || null
|
|
21610
|
+
}
|
|
21611
|
+
}), iconPosition === 'right' && showIcon && h(IconWrapper, {
|
|
21612
|
+
"on": {
|
|
21613
|
+
"click": this.handleSearchIconClick
|
|
21614
|
+
}
|
|
21615
|
+
}, [this.renderIcon()])]), h(IconGroup, {
|
|
21616
|
+
"attrs": {
|
|
21617
|
+
"groupPosition": "left",
|
|
21618
|
+
"positionType": "absolute"
|
|
21619
|
+
}
|
|
21620
|
+
}, [iconPosition === 'left' && showIcon && h(IconWrapper, {
|
|
21621
|
+
"on": {
|
|
21622
|
+
"click": this.handleSearchIconClick
|
|
21623
|
+
}
|
|
21624
|
+
}, [this.renderIcon()])])]);
|
|
21625
|
+
},
|
|
21626
|
+
focusSearchBox: function focusSearchBox(event) {
|
|
21627
|
+
var _this$$refs, _this$$refs$this$$pro;
|
|
21628
|
+
|
|
21629
|
+
var elt = event.target || event.srcElement;
|
|
21630
|
+
var tagName = elt.tagName;
|
|
21631
|
+
|
|
21632
|
+
if (elt.isContentEditable || tagName === 'INPUT' || tagName === 'SELECT' || tagName === 'TEXTAREA') {
|
|
21633
|
+
// already in an input
|
|
21634
|
+
return;
|
|
21635
|
+
}
|
|
21636
|
+
|
|
21637
|
+
(_this$$refs = this.$refs) == null ? void 0 : (_this$$refs$this$$pro = _this$$refs[this.$props.innerRef]) == null ? void 0 : _this$$refs$this$$pro.focus(); // eslint-disable-line
|
|
21638
|
+
},
|
|
21639
|
+
listenForFocusShortcuts: function listenForFocusShortcuts() {
|
|
21640
|
+
var _this5 = this;
|
|
21641
|
+
|
|
21642
|
+
var _this$$props$focusSho = this.$props.focusShortcuts,
|
|
21643
|
+
focusShortcuts = _this$$props$focusSho === void 0 ? ['/'] : _this$$props$focusSho;
|
|
21644
|
+
|
|
21645
|
+
if (isEmpty(focusShortcuts)) {
|
|
21646
|
+
return;
|
|
21647
|
+
}
|
|
21648
|
+
|
|
21649
|
+
var shortcutsString = parseFocusShortcuts(focusShortcuts).join(','); // handler for alphabets and other key combinations
|
|
21650
|
+
|
|
21651
|
+
hotkeys(shortcutsString, // eslint-disable-next-line no-unused-vars
|
|
21652
|
+
|
|
21653
|
+
/* eslint-disable no-shadow */
|
|
21654
|
+
function (event, handler) {
|
|
21655
|
+
// Prevent the default refresh event under WINDOWS system
|
|
21656
|
+
event.preventDefault();
|
|
21657
|
+
|
|
21658
|
+
_this5.focusSearchBox(event);
|
|
21659
|
+
}); // if one of modifier keys are used, they are handled below
|
|
21660
|
+
|
|
21661
|
+
hotkeys('*', function (event) {
|
|
21662
|
+
var modifierKeys = extractModifierKeysFromFocusShortcuts(focusShortcuts);
|
|
21663
|
+
if (modifierKeys.length === 0) return;
|
|
21664
|
+
|
|
21665
|
+
for (var index = 0; index < modifierKeys.length; index += 1) {
|
|
21666
|
+
var element = modifierKeys[index];
|
|
21667
|
+
|
|
21668
|
+
if (hotkeys[element]) {
|
|
21669
|
+
_this5.focusSearchBox(event);
|
|
21670
|
+
|
|
21671
|
+
break;
|
|
21672
|
+
}
|
|
21673
|
+
}
|
|
21674
|
+
});
|
|
21675
|
+
},
|
|
21676
|
+
onAutofillClick: function onAutofillClick(suggestion) {
|
|
21677
|
+
var value = suggestion.value;
|
|
21678
|
+
this.isOpen = true;
|
|
21679
|
+
this.currentValue = value;
|
|
21680
|
+
this.triggerDefaultQuery(value);
|
|
21681
|
+
},
|
|
21682
|
+
renderAutoFill: function renderAutoFill(suggestion) {
|
|
21683
|
+
var _this6 = this;
|
|
21684
|
+
|
|
21685
|
+
var h = this.$createElement;
|
|
21686
|
+
|
|
21687
|
+
var handleAutoFillClick = function handleAutoFillClick(e) {
|
|
21688
|
+
e.stopPropagation();
|
|
21689
|
+
|
|
21690
|
+
_this6.onAutofillClick(suggestion);
|
|
21691
|
+
};
|
|
21692
|
+
/* 👇 avoid showing autofill for category suggestions👇 */
|
|
21693
|
+
|
|
21694
|
+
|
|
21695
|
+
return suggestion._category ? null : h(AutoFillSvg, {
|
|
21696
|
+
"on": {
|
|
21697
|
+
"click": handleAutoFillClick
|
|
21698
|
+
}
|
|
21699
|
+
});
|
|
21700
|
+
}
|
|
21701
|
+
},
|
|
21702
|
+
render: function render() {
|
|
21703
|
+
var _this7 = this;
|
|
21704
|
+
|
|
21705
|
+
var h = arguments[0];
|
|
21706
|
+
var _this$$props6 = this.$props,
|
|
21707
|
+
theme = _this$$props6.theme,
|
|
21708
|
+
expandSuggestionsContainer = _this$$props6.expandSuggestionsContainer;
|
|
21709
|
+
var _this$$scopedSlots = this.$scopedSlots,
|
|
21710
|
+
recentSearchesIcon = _this$$scopedSlots.recentSearchesIcon,
|
|
21711
|
+
popularSearchesIcon = _this$$scopedSlots.popularSearchesIcon;
|
|
21712
|
+
var hasSuggestions = Array.isArray(this.normalizedSuggestions) && this.normalizedSuggestions.length;
|
|
21713
|
+
var renderItem = this.$scopedSlots.renderItem || this.$props.renderItem;
|
|
21714
|
+
return h(Container, {
|
|
21715
|
+
"class": this.$props.className
|
|
21716
|
+
}, [this.$props.title && h(Title, {
|
|
21717
|
+
"class": getClassName$4(this.$props.innerClass, 'title') || ''
|
|
21718
|
+
}, [this.$props.title]), this.$props.autosuggest ? h(Downshift, {
|
|
21719
|
+
"attrs": {
|
|
21720
|
+
"id": this.$props.componentId + "-downshift",
|
|
21721
|
+
"handleChange": this.onSuggestionSelected,
|
|
21722
|
+
"handleMouseup": this.handleStateChange,
|
|
21723
|
+
"isOpen": this.$data.isOpen
|
|
21724
|
+
},
|
|
21725
|
+
"scopedSlots": {
|
|
21726
|
+
"default": function _default(_ref5) {
|
|
21727
|
+
var getInputEvents = _ref5.getInputEvents,
|
|
21728
|
+
getInputProps = _ref5.getInputProps,
|
|
21729
|
+
getItemProps = _ref5.getItemProps,
|
|
21730
|
+
getItemEvents = _ref5.getItemEvents,
|
|
21731
|
+
isOpen = _ref5.isOpen,
|
|
21732
|
+
highlightedIndex = _ref5.highlightedIndex,
|
|
21733
|
+
setHighlightedIndex = _ref5.setHighlightedIndex;
|
|
21734
|
+
|
|
21735
|
+
var renderSuggestionsDropdown = function renderSuggestionsDropdown() {
|
|
21736
|
+
var getIcon = function getIcon(iconType) {
|
|
21737
|
+
switch (iconType) {
|
|
21738
|
+
case helper_6.Recent:
|
|
21739
|
+
return recentSearchesIcon;
|
|
21740
|
+
|
|
21741
|
+
case helper_6.Popular:
|
|
21742
|
+
return popularSearchesIcon;
|
|
21743
|
+
|
|
21744
|
+
default:
|
|
21745
|
+
return null;
|
|
21746
|
+
}
|
|
21747
|
+
};
|
|
21748
|
+
|
|
21749
|
+
return h("div", [_this7.hasCustomRenderer && _this7.getComponent({
|
|
21750
|
+
isOpen: isOpen,
|
|
21751
|
+
getItemProps: getItemProps,
|
|
21752
|
+
getItemEvents: getItemEvents,
|
|
21753
|
+
highlightedIndex: highlightedIndex
|
|
21754
|
+
}), _this7.renderErrorComponent(), !_this7.hasCustomRenderer && isOpen && hasSuggestions ? h("ul", {
|
|
21755
|
+
"class": suggestions$1(_this7.themePreset, theme) + " " + getClassName$4(_this7.$props.innerClass, 'list')
|
|
21756
|
+
}, [_this7.normalizedSuggestions.map(function (item, index) {
|
|
21757
|
+
return renderItem ? h("li", {
|
|
21758
|
+
"domProps": _extends({}, getItemProps({
|
|
21759
|
+
item: item
|
|
21760
|
+
})),
|
|
21761
|
+
"on": _extends({}, getItemEvents({
|
|
21762
|
+
item: item
|
|
21763
|
+
})),
|
|
21764
|
+
"key": index + 1 + "-" + item.value,
|
|
21765
|
+
"style": {
|
|
21766
|
+
backgroundColor: _this7.getBackgroundColor(highlightedIndex, index),
|
|
21767
|
+
justifyContent: 'flex-start',
|
|
21768
|
+
alignItems: 'center'
|
|
21769
|
+
}
|
|
21770
|
+
}, [renderItem(item)]) : h("li", {
|
|
21771
|
+
"domProps": _extends({}, getItemProps({
|
|
21772
|
+
item: item
|
|
21773
|
+
})),
|
|
21774
|
+
"on": _extends({}, getItemEvents({
|
|
21775
|
+
item: item
|
|
21776
|
+
})),
|
|
21777
|
+
"key": index + 1 + "-" + item.value,
|
|
21778
|
+
"style": {
|
|
21779
|
+
backgroundColor: _this7.getBackgroundColor(highlightedIndex, index),
|
|
21780
|
+
justifyContent: 'flex-start',
|
|
21781
|
+
alignItems: 'center'
|
|
21782
|
+
}
|
|
21783
|
+
}, [h("div", {
|
|
21784
|
+
"style": {
|
|
21785
|
+
padding: '0 10px 0 0',
|
|
21786
|
+
display: 'flex'
|
|
21787
|
+
}
|
|
21788
|
+
}, [h(CustomSvg, {
|
|
21789
|
+
"attrs": {
|
|
21790
|
+
"className": getClassName$4(_this7.$props.innerClass, item._suggestion_type + "-search-icon") || null,
|
|
21791
|
+
"icon": getIcon(item._suggestion_type),
|
|
21792
|
+
"type": item._suggestion_type + "-search-icon"
|
|
21793
|
+
}
|
|
21794
|
+
})]), h(SuggestionItem, {
|
|
21795
|
+
"attrs": {
|
|
21796
|
+
"currentValue": _this7.currentValue,
|
|
21797
|
+
"suggestion": item
|
|
21798
|
+
}
|
|
21799
|
+
}), _this7.renderAutoFill(item)]);
|
|
21800
|
+
})]) : _this7.renderNoSuggestions(_this7.normalizedSuggestions)]);
|
|
21801
|
+
};
|
|
21802
|
+
|
|
21803
|
+
return h("div", {
|
|
21804
|
+
"class": suggestionsContainer
|
|
21805
|
+
}, [h(InputGroup, [_this7.renderInputAddonBefore(), h(InputWrapper, [h(Input, {
|
|
21806
|
+
"attrs": {
|
|
21807
|
+
"id": _this7.$props.componentId + "-input",
|
|
21808
|
+
"showIcon": _this7.$props.showIcon,
|
|
21809
|
+
"showClear": _this7.$props.showClear,
|
|
21810
|
+
"iconPosition": _this7.$props.iconPosition,
|
|
21811
|
+
"placeholder": _this7.$props.placeholder,
|
|
21812
|
+
"autoFocus": _this7.$props.autoFocus,
|
|
21813
|
+
"themePreset": _this7.themePreset,
|
|
21814
|
+
"autocomplete": "off"
|
|
21815
|
+
},
|
|
21816
|
+
"ref": _this7.$props.innerRef,
|
|
21817
|
+
"class": getClassName$4(_this7.$props.innerClass, 'input'),
|
|
21818
|
+
"on": _extends({}, getInputEvents({
|
|
21819
|
+
onInput: _this7.onInputChange,
|
|
21820
|
+
onBlur: function onBlur(e) {
|
|
21821
|
+
_this7.$emit('blur', e, _this7.triggerQuery);
|
|
21822
|
+
},
|
|
21823
|
+
onFocus: _this7.handleFocus,
|
|
21824
|
+
onKeyPress: function onKeyPress(e) {
|
|
21825
|
+
_this7.$emit('keyPress', e, _this7.triggerQuery);
|
|
21826
|
+
|
|
21827
|
+
_this7.$emit('key-press', e, _this7.triggerQuery);
|
|
21828
|
+
},
|
|
21829
|
+
onKeyDown: function onKeyDown(e) {
|
|
21830
|
+
return _this7.handleKeyDown(e, highlightedIndex);
|
|
21831
|
+
},
|
|
21832
|
+
onKeyUp: function onKeyUp(e) {
|
|
21833
|
+
_this7.$emit('keyUp', e, _this7.triggerQuery);
|
|
21834
|
+
|
|
21835
|
+
_this7.$emit('key-up', e, _this7.triggerQuery);
|
|
21836
|
+
},
|
|
21837
|
+
onClick: function onClick() {
|
|
21838
|
+
setHighlightedIndex(null);
|
|
21839
|
+
}
|
|
21840
|
+
})),
|
|
21841
|
+
"domProps": _extends({}, getInputProps({
|
|
21842
|
+
value: _this7.$data.currentValue === null ? '' : _this7.$data.currentValue
|
|
21843
|
+
}))
|
|
21844
|
+
}), _this7.renderIcons(), !expandSuggestionsContainer && renderSuggestionsDropdown()]), _this7.renderInputAddonAfter(), _this7.renderEnterButtonElement()]), expandSuggestionsContainer && renderSuggestionsDropdown()]);
|
|
21845
|
+
}
|
|
21846
|
+
}
|
|
21847
|
+
}) : h("div", {
|
|
21848
|
+
"class": suggestionsContainer
|
|
21849
|
+
}, [h(InputGroup, [this.renderInputAddonBefore(), h(InputWrapper, [h(Input, {
|
|
21850
|
+
"class": getClassName$4(this.$props.innerClass, 'input') || '',
|
|
21851
|
+
"attrs": {
|
|
21852
|
+
"placeholder": this.$props.placeholder,
|
|
21853
|
+
"iconPosition": this.$props.iconPosition,
|
|
21854
|
+
"showIcon": this.$props.showIcon,
|
|
21855
|
+
"showClear": this.$props.showClear,
|
|
21856
|
+
"themePreset": this.themePreset
|
|
21857
|
+
},
|
|
21858
|
+
"on": _extends({}, {
|
|
21859
|
+
blur: function blur(e) {
|
|
21860
|
+
_this7.$emit('blur', e, _this7.triggerQuery);
|
|
21861
|
+
},
|
|
21862
|
+
keypress: function keypress(e) {
|
|
21863
|
+
_this7.$emit('keyPress', e, _this7.triggerQuery);
|
|
21864
|
+
|
|
21865
|
+
_this7.$emit('key-press', e, _this7.triggerQuery);
|
|
21866
|
+
},
|
|
21867
|
+
input: this.onInputChange,
|
|
21868
|
+
focus: function focus(e) {
|
|
21869
|
+
_this7.$emit('focus', e, _this7.triggerQuery);
|
|
21870
|
+
},
|
|
21871
|
+
keydown: function keydown(e) {
|
|
21872
|
+
_this7.$emit('keyDown', e, _this7.triggerQuery);
|
|
21873
|
+
|
|
21874
|
+
_this7.$emit('key-down', e, _this7.triggerQuery);
|
|
21875
|
+
},
|
|
21876
|
+
keyup: function keyup(e) {
|
|
21877
|
+
_this7.$emit('keyUp', e, _this7.triggerQuery);
|
|
21878
|
+
|
|
21879
|
+
_this7.$emit('key-up', e, _this7.triggerQuery);
|
|
21880
|
+
}
|
|
21881
|
+
}),
|
|
21882
|
+
"domProps": _extends({}, {
|
|
21883
|
+
autofocus: this.$props.autoFocus,
|
|
21884
|
+
value: this.$data.currentValue ? this.$data.currentValue : ''
|
|
21885
|
+
}),
|
|
21886
|
+
"ref": this.$props.innerRef
|
|
21887
|
+
}), this.renderIcons()]), this.renderInputAddonAfter(), this.renderEnterButtonElement()])])]);
|
|
21888
|
+
},
|
|
21889
|
+
destroyed: function destroyed() {
|
|
21890
|
+
document.removeEventListener('keydown', this.onKeyDown);
|
|
21891
|
+
}
|
|
21892
|
+
};
|
|
21893
|
+
|
|
21894
|
+
SearchBox.defaultQuery = function (value, props) {
|
|
21895
|
+
var finalQuery = null;
|
|
21896
|
+
var fields = normalizeDataField$1(props.dataField, props.fieldWeights);
|
|
21897
|
+
finalQuery = {
|
|
21898
|
+
bool: {
|
|
21899
|
+
should: SearchBox.shouldQuery(value, fields, props),
|
|
21900
|
+
minimum_should_match: '1'
|
|
21901
|
+
}
|
|
21902
|
+
};
|
|
21903
|
+
|
|
21904
|
+
if (finalQuery && props.nestedField) {
|
|
21905
|
+
return {
|
|
21906
|
+
query: {
|
|
21907
|
+
nested: {
|
|
21908
|
+
path: props.nestedField,
|
|
21909
|
+
query: finalQuery
|
|
21910
|
+
}
|
|
21911
|
+
}
|
|
21912
|
+
};
|
|
21913
|
+
}
|
|
21914
|
+
|
|
21915
|
+
return finalQuery;
|
|
21916
|
+
};
|
|
21917
|
+
|
|
21918
|
+
SearchBox.shouldQuery = function (value, dataFields, props) {
|
|
21919
|
+
var finalQuery = [];
|
|
21920
|
+
var phrasePrefixFields = [];
|
|
21921
|
+
var fields = dataFields.map(function (dataField) {
|
|
21922
|
+
var queryField = "" + dataField.field + (dataField.weight ? "^" + dataField.weight : '');
|
|
21923
|
+
|
|
21924
|
+
if (!(dataField.field.endsWith('.keyword') || dataField.field.endsWith('.autosuggest') || dataField.field.endsWith('.search'))) {
|
|
21925
|
+
phrasePrefixFields.push(queryField);
|
|
21926
|
+
}
|
|
21927
|
+
|
|
21928
|
+
return queryField;
|
|
21929
|
+
});
|
|
21930
|
+
|
|
21931
|
+
if (props.searchOperators || props.queryString) {
|
|
21932
|
+
return {
|
|
21933
|
+
query: value,
|
|
21934
|
+
fields: fields,
|
|
21935
|
+
default_operator: props.queryFormat
|
|
21936
|
+
};
|
|
21937
|
+
}
|
|
21938
|
+
|
|
21939
|
+
if (props.queryFormat === 'and') {
|
|
21940
|
+
finalQuery.push({
|
|
21941
|
+
multi_match: {
|
|
21942
|
+
query: value,
|
|
21943
|
+
fields: fields,
|
|
21944
|
+
type: 'cross_fields',
|
|
21945
|
+
operator: 'and'
|
|
21946
|
+
}
|
|
21947
|
+
});
|
|
21948
|
+
finalQuery.push({
|
|
21949
|
+
multi_match: {
|
|
21950
|
+
query: value,
|
|
21951
|
+
fields: fields,
|
|
21952
|
+
type: 'phrase',
|
|
21953
|
+
operator: 'and'
|
|
21954
|
+
}
|
|
21955
|
+
});
|
|
21956
|
+
|
|
21957
|
+
if (phrasePrefixFields.length > 0) {
|
|
21958
|
+
finalQuery.push({
|
|
21959
|
+
multi_match: {
|
|
21960
|
+
query: value,
|
|
21961
|
+
fields: phrasePrefixFields,
|
|
21962
|
+
type: 'phrase_prefix',
|
|
21963
|
+
operator: 'and'
|
|
21964
|
+
}
|
|
21965
|
+
});
|
|
21966
|
+
}
|
|
21967
|
+
|
|
21968
|
+
return finalQuery;
|
|
21969
|
+
}
|
|
21970
|
+
|
|
21971
|
+
finalQuery.push({
|
|
21972
|
+
multi_match: {
|
|
21973
|
+
query: value,
|
|
21974
|
+
fields: fields,
|
|
21975
|
+
type: 'best_fields',
|
|
21976
|
+
operator: 'or',
|
|
21977
|
+
fuzziness: props.fuzziness ? props.fuzziness : 0
|
|
21978
|
+
}
|
|
21979
|
+
});
|
|
21980
|
+
finalQuery.push({
|
|
21981
|
+
multi_match: {
|
|
21982
|
+
query: value,
|
|
21983
|
+
fields: fields,
|
|
21984
|
+
type: 'phrase',
|
|
21985
|
+
operator: 'or'
|
|
21986
|
+
}
|
|
21987
|
+
});
|
|
21988
|
+
|
|
21989
|
+
if (phrasePrefixFields.length > 0) {
|
|
21990
|
+
finalQuery.push({
|
|
21991
|
+
multi_match: {
|
|
21992
|
+
query: value,
|
|
21993
|
+
fields: phrasePrefixFields,
|
|
21994
|
+
type: 'phrase_prefix',
|
|
21995
|
+
operator: 'or'
|
|
21996
|
+
}
|
|
21997
|
+
});
|
|
21998
|
+
}
|
|
21999
|
+
|
|
22000
|
+
return finalQuery;
|
|
22001
|
+
};
|
|
22002
|
+
|
|
22003
|
+
var mapStateToProps$4 = function mapStateToProps(state, props) {
|
|
20593
22004
|
return {
|
|
20594
22005
|
selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || null,
|
|
22006
|
+
selectedCategory: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].category || null,
|
|
20595
22007
|
suggestions: state.hits[props.componentId] && state.hits[props.componentId].hits,
|
|
20596
22008
|
rawData: state.rawData[props.componentId],
|
|
20597
22009
|
aggregationData: state.compositeAggregations[props.componentId] || [],
|
|
20598
|
-
isLoading: !!state.isLoading[props.componentId + "_active"],
|
|
20599
22010
|
themePreset: state.config.themePreset,
|
|
22011
|
+
isLoading: !!state.isLoading[props.componentId + "_active"],
|
|
20600
22012
|
error: state.error[props.componentId],
|
|
20601
|
-
analytics: state.analytics,
|
|
20602
22013
|
enableAppbase: state.config.enableAppbase,
|
|
20603
|
-
headers: state.appbaseRef.headers,
|
|
20604
|
-
promotedResults: state.promotedResults[props.componentId] || [],
|
|
20605
|
-
customData: state.customData[props.componentId],
|
|
20606
22014
|
time: state.hits[props.componentId] && state.hits[props.componentId].time || 0,
|
|
20607
22015
|
total: state.hits[props.componentId] && state.hits[props.componentId].total,
|
|
20608
|
-
hidden: state.hits[props.componentId] && state.hits[props.componentId].hidden
|
|
20609
|
-
popularSuggestions: state.querySuggestions[props.componentId],
|
|
20610
|
-
defaultPopularSuggestions: state.defaultPopularSuggestions[props.componentId],
|
|
20611
|
-
componentProps: state.props[props.componentId],
|
|
20612
|
-
lastUsedQuery: state.queryToHits[props.componentId],
|
|
20613
|
-
recentSearches: state.recentSearches.data
|
|
22016
|
+
hidden: state.hits[props.componentId] && state.hits[props.componentId].hidden
|
|
20614
22017
|
};
|
|
20615
22018
|
};
|
|
20616
22019
|
|
|
20617
|
-
var mapDispatchToProps$
|
|
20618
|
-
|
|
20619
|
-
|
|
20620
|
-
|
|
20621
|
-
|
|
20622
|
-
setCustomHighlightOptions: setCustomHighlightOptions,
|
|
20623
|
-
recordSuggestionClick: recordSuggestionClick,
|
|
20624
|
-
loadPopularSuggestions: loadPopularSuggestions,
|
|
20625
|
-
getRecentSearches: getRecentSearches
|
|
22020
|
+
var mapDispatchToProps$3 = {
|
|
22021
|
+
updateQuery: updateQuery$2,
|
|
22022
|
+
setCustomQuery: setCustomQuery$1,
|
|
22023
|
+
setDefaultQuery: setDefaultQuery$2,
|
|
22024
|
+
recordSuggestionClick: recordSuggestionClick$1
|
|
20626
22025
|
};
|
|
20627
|
-
var DSConnected = ComponentWrapper$1(connect(mapStateToProps$
|
|
20628
|
-
componentType: constants_1$1.
|
|
20629
|
-
internalComponent:
|
|
22026
|
+
var DSConnected$1 = ComponentWrapper$1(connect(mapStateToProps$4, mapDispatchToProps$3)(SearchBox), {
|
|
22027
|
+
componentType: constants_1$1.searchBox,
|
|
22028
|
+
internalComponent: true
|
|
20630
22029
|
});
|
|
20631
22030
|
|
|
20632
|
-
|
|
20633
|
-
Vue.component(
|
|
22031
|
+
SearchBox.install = function (Vue) {
|
|
22032
|
+
Vue.component(SearchBox.name, DSConnected$1);
|
|
20634
22033
|
}; // Add componentType for SSR
|
|
20635
22034
|
|
|
20636
22035
|
|
|
20637
|
-
|
|
22036
|
+
SearchBox.componentType = constants_1$1.searchBox;
|
|
20638
22037
|
|
|
20639
|
-
var _templateObject$
|
|
22038
|
+
var _templateObject$k, _templateObject2$7, _templateObject3$6, _templateObject4$5, _templateObject5$3, _templateObject6$3;
|
|
20640
22039
|
var item = {
|
|
20641
22040
|
width: '15px',
|
|
20642
22041
|
height: '15px',
|
|
20643
22042
|
scale: '4px'
|
|
20644
22043
|
};
|
|
20645
|
-
var vh = css(_templateObject$
|
|
22044
|
+
var vh = css(_templateObject$k || (_templateObject$k = _taggedTemplateLiteralLoose(["\n\tborder: 0;\n\tclip: rect(1px, 1px, 1px, 1px);\n\tclip-path: inset(50%);\n\theight: 1px;\n\toverflow: hidden;\n\tpadding: 0;\n\tposition: absolute;\n\twidth: 1px;\n\twhite-space: nowrap;\n"])));
|
|
20646
22045
|
var hideInputControl = css(_templateObject2$7 || (_templateObject2$7 = _taggedTemplateLiteralLoose(["\n\t+ label {\n\t\tpadding-left: 0;\n\n\t\t&::before,\n\t\t&::after {\n\t\t\twidth: 0;\n\t\t\theight: 0;\n\t\t\tborder: 0;\n\t\t\tmargin: 0;\n\t\t\tvisibility: hidden;\n\t\t}\n\t}\n\n\t&:checked {\n\t\t+ label {\n\t\t\tfont-weight: bold;\n\t\t}\n\t}\n"])));
|
|
20647
22046
|
|
|
20648
22047
|
var formItem = function formItem(_ref) {
|
|
@@ -20727,14 +22126,14 @@
|
|
|
20727
22126
|
return _extends({}, clonedQuery, extractQuery(props));
|
|
20728
22127
|
};
|
|
20729
22128
|
|
|
20730
|
-
var updateQuery$
|
|
22129
|
+
var updateQuery$3 = lib_5.updateQuery,
|
|
20731
22130
|
setQueryOptions$2 = lib_5.setQueryOptions,
|
|
20732
|
-
setCustomQuery$
|
|
20733
|
-
setDefaultQuery$
|
|
22131
|
+
setCustomQuery$2 = lib_5.setCustomQuery,
|
|
22132
|
+
setDefaultQuery$3 = lib_5.setDefaultQuery;
|
|
20734
22133
|
var getQueryOptions$1 = lib_8.getQueryOptions,
|
|
20735
|
-
checkValueChange$
|
|
20736
|
-
getClassName$
|
|
20737
|
-
isEqual$
|
|
22134
|
+
checkValueChange$2 = lib_8.checkValueChange,
|
|
22135
|
+
getClassName$5 = lib_8.getClassName,
|
|
22136
|
+
isEqual$6 = lib_8.isEqual,
|
|
20738
22137
|
extractQueryFromCustomQuery$2 = lib_8.extractQueryFromCustomQuery,
|
|
20739
22138
|
getOptionsForCustomQuery$2 = lib_8.getOptionsForCustomQuery;
|
|
20740
22139
|
var SingleList = {
|
|
@@ -20823,7 +22222,7 @@
|
|
|
20823
22222
|
this.setValue(newVal);
|
|
20824
22223
|
},
|
|
20825
22224
|
value: function value(newVal, oldVal) {
|
|
20826
|
-
if (!isEqual$
|
|
22225
|
+
if (!isEqual$6(newVal, oldVal)) {
|
|
20827
22226
|
this.setValue(newVal);
|
|
20828
22227
|
}
|
|
20829
22228
|
},
|
|
@@ -20886,14 +22285,14 @@
|
|
|
20886
22285
|
return h(Container, {
|
|
20887
22286
|
"class": this.$props.className
|
|
20888
22287
|
}, [this.$props.title && h(Title, {
|
|
20889
|
-
"class": getClassName$
|
|
22288
|
+
"class": getClassName$5(this.$props.innerClass, 'title') || ''
|
|
20890
22289
|
}, [this.$props.title]), this.renderSearch(), this.hasCustomRenderer ? this.getComponent() : h(UL, {
|
|
20891
|
-
"class": getClassName$
|
|
22290
|
+
"class": getClassName$5(this.$props.innerClass, 'list') || ''
|
|
20892
22291
|
}, [selectAllLabel ? h("li", {
|
|
20893
22292
|
"key": selectAllLabel,
|
|
20894
22293
|
"class": "" + (this.$data.currentValue === selectAllLabel ? 'active' : '')
|
|
20895
22294
|
}, [h(Radio, {
|
|
20896
|
-
"class": getClassName$
|
|
22295
|
+
"class": getClassName$5(this.$props.innerClass, 'radio'),
|
|
20897
22296
|
"attrs": {
|
|
20898
22297
|
"id": this.$props.componentId + "-" + selectAllLabel,
|
|
20899
22298
|
"name": this.$props.componentId,
|
|
@@ -20908,7 +22307,7 @@
|
|
|
20908
22307
|
checked: this.$data.currentValue === selectAllLabel
|
|
20909
22308
|
})
|
|
20910
22309
|
}), h("label", {
|
|
20911
|
-
"class": getClassName$
|
|
22310
|
+
"class": getClassName$5(this.$props.innerClass, 'label') || null,
|
|
20912
22311
|
"attrs": {
|
|
20913
22312
|
"for": this.$props.componentId + "-" + selectAllLabel
|
|
20914
22313
|
}
|
|
@@ -20917,7 +22316,7 @@
|
|
|
20917
22316
|
"key": item.key,
|
|
20918
22317
|
"class": "" + (_this.currentValue === String(item.key) ? 'active' : '')
|
|
20919
22318
|
}, [h(Radio, {
|
|
20920
|
-
"class": getClassName$
|
|
22319
|
+
"class": getClassName$5(_this.$props.innerClass, 'radio'),
|
|
20921
22320
|
"attrs": {
|
|
20922
22321
|
"id": _this.$props.componentId + "-" + item.key,
|
|
20923
22322
|
"name": _this.$props.componentId,
|
|
@@ -20933,7 +22332,7 @@
|
|
|
20933
22332
|
checked: _this.currentValue === String(item.key)
|
|
20934
22333
|
})
|
|
20935
22334
|
}), h("label", {
|
|
20936
|
-
"class": getClassName$
|
|
22335
|
+
"class": getClassName$5(_this.$props.innerClass, 'label') || null,
|
|
20937
22336
|
"attrs": {
|
|
20938
22337
|
"for": _this.$props.componentId + "-" + item.key
|
|
20939
22338
|
}
|
|
@@ -20942,7 +22341,7 @@
|
|
|
20942
22341
|
count: item.doc_count,
|
|
20943
22342
|
isChecked: _this.currentValue === String(item.key)
|
|
20944
22343
|
}) : h("span", [item.key, _this.$props.showCount && h("span", {
|
|
20945
|
-
"class": getClassName$
|
|
22344
|
+
"class": getClassName$5(_this.$props.innerClass, 'count') || null
|
|
20946
22345
|
}, ["\xA0(", item.doc_count, ")"])])])]);
|
|
20947
22346
|
})])]);
|
|
20948
22347
|
},
|
|
@@ -20970,7 +22369,7 @@
|
|
|
20970
22369
|
_this2.$emit('value-change', value);
|
|
20971
22370
|
};
|
|
20972
22371
|
|
|
20973
|
-
checkValueChange$
|
|
22372
|
+
checkValueChange$2(props.componentId, value, props.beforeValueChange, performUpdate);
|
|
20974
22373
|
},
|
|
20975
22374
|
updateDefaultQueryHandler: function updateDefaultQueryHandler(value, props) {
|
|
20976
22375
|
var query = SingleList.defaultQuery(value, props);
|
|
@@ -21042,7 +22441,7 @@
|
|
|
21042
22441
|
|
|
21043
22442
|
if (this.$props.showSearch) {
|
|
21044
22443
|
return h(Input, {
|
|
21045
|
-
"class": getClassName$
|
|
22444
|
+
"class": getClassName$5(this.$props.innerClass, 'input') || '',
|
|
21046
22445
|
"on": {
|
|
21047
22446
|
"input": this.handleInputChange
|
|
21048
22447
|
},
|
|
@@ -21105,7 +22504,7 @@
|
|
|
21105
22504
|
var h = this.$createElement;
|
|
21106
22505
|
var renderNoResults = this.$scopedSlots.renderNoResults || this.$props.renderNoResults;
|
|
21107
22506
|
return h("p", {
|
|
21108
|
-
"class": getClassName$
|
|
22507
|
+
"class": getClassName$5(this.$props.innerClass, 'noResults') || null
|
|
21109
22508
|
}, [isFunction$1(renderNoResults) ? renderNoResults() : renderNoResults]);
|
|
21110
22509
|
}
|
|
21111
22510
|
},
|
|
@@ -21176,7 +22575,7 @@
|
|
|
21176
22575
|
return true;
|
|
21177
22576
|
};
|
|
21178
22577
|
|
|
21179
|
-
var mapStateToProps$
|
|
22578
|
+
var mapStateToProps$5 = function mapStateToProps(state, props) {
|
|
21180
22579
|
return {
|
|
21181
22580
|
options: props.nestedField && state.aggregations[props.componentId] ? state.aggregations[props.componentId].reactivesearch_nested : state.aggregations[props.componentId],
|
|
21182
22581
|
rawData: state.rawData[props.componentId],
|
|
@@ -21191,11 +22590,11 @@
|
|
|
21191
22590
|
|
|
21192
22591
|
var mapDispatchtoProps$2 = {
|
|
21193
22592
|
setQueryOptions: setQueryOptions$2,
|
|
21194
|
-
updateQuery: updateQuery$
|
|
21195
|
-
setCustomQuery: setCustomQuery$
|
|
21196
|
-
setDefaultQuery: setDefaultQuery$
|
|
22593
|
+
updateQuery: updateQuery$3,
|
|
22594
|
+
setCustomQuery: setCustomQuery$2,
|
|
22595
|
+
setDefaultQuery: setDefaultQuery$3
|
|
21197
22596
|
};
|
|
21198
|
-
var ListConnected = ComponentWrapper$1(connect(mapStateToProps$
|
|
22597
|
+
var ListConnected = ComponentWrapper$1(connect(mapStateToProps$5, mapDispatchtoProps$2)(SingleList), {
|
|
21199
22598
|
componentType: constants_1$1.singleList,
|
|
21200
22599
|
internalComponent: SingleList.hasInternalComponent()
|
|
21201
22600
|
});
|
|
@@ -21207,14 +22606,14 @@
|
|
|
21207
22606
|
|
|
21208
22607
|
SingleList.componentType = constants_1$1.singleList;
|
|
21209
22608
|
|
|
21210
|
-
var updateQuery$
|
|
22609
|
+
var updateQuery$4 = lib_5.updateQuery,
|
|
21211
22610
|
setQueryOptions$3 = lib_5.setQueryOptions,
|
|
21212
|
-
setCustomQuery$
|
|
21213
|
-
setDefaultQuery$
|
|
21214
|
-
var isEqual$
|
|
22611
|
+
setCustomQuery$3 = lib_5.setCustomQuery,
|
|
22612
|
+
setDefaultQuery$4 = lib_5.setDefaultQuery;
|
|
22613
|
+
var isEqual$7 = lib_8.isEqual,
|
|
21215
22614
|
getQueryOptions$2 = lib_8.getQueryOptions,
|
|
21216
|
-
checkValueChange$
|
|
21217
|
-
getClassName$
|
|
22615
|
+
checkValueChange$3 = lib_8.checkValueChange,
|
|
22616
|
+
getClassName$6 = lib_8.getClassName,
|
|
21218
22617
|
extractQueryFromCustomQuery$3 = lib_8.extractQueryFromCustomQuery,
|
|
21219
22618
|
getOptionsForCustomQuery$3 = lib_8.getOptionsForCustomQuery;
|
|
21220
22619
|
var MultiList = {
|
|
@@ -21281,7 +22680,7 @@
|
|
|
21281
22680
|
mounted: function mounted() {
|
|
21282
22681
|
var currentValue = Object.keys(this.$data.currentValue);
|
|
21283
22682
|
|
|
21284
|
-
if (this.$props.value !== undefined && !isEqual$
|
|
22683
|
+
if (this.$props.value !== undefined && !isEqual$7(this.$props.value, currentValue)) {
|
|
21285
22684
|
this.$emit('change', currentValue);
|
|
21286
22685
|
}
|
|
21287
22686
|
},
|
|
@@ -21302,12 +22701,12 @@
|
|
|
21302
22701
|
this.updateQueryHandler(this.$data.currentValue, this.$props);
|
|
21303
22702
|
},
|
|
21304
22703
|
value: function value(newVal, oldVal) {
|
|
21305
|
-
if (!isEqual$
|
|
22704
|
+
if (!isEqual$7(oldVal, newVal)) {
|
|
21306
22705
|
this.setValue(newVal, true);
|
|
21307
22706
|
}
|
|
21308
22707
|
},
|
|
21309
22708
|
defaultValue: function defaultValue(newVal, oldVal) {
|
|
21310
|
-
if (!isEqual$
|
|
22709
|
+
if (!isEqual$7(oldVal, newVal)) {
|
|
21311
22710
|
this.setValue(newVal, true);
|
|
21312
22711
|
}
|
|
21313
22712
|
},
|
|
@@ -21326,7 +22725,7 @@
|
|
|
21326
22725
|
}
|
|
21327
22726
|
}
|
|
21328
22727
|
|
|
21329
|
-
if (!isEqual$
|
|
22728
|
+
if (!isEqual$7(selectedValue, newVal)) {
|
|
21330
22729
|
if (this.value === undefined) {
|
|
21331
22730
|
this.setValue(newVal, true);
|
|
21332
22731
|
} else {
|
|
@@ -21388,9 +22787,9 @@
|
|
|
21388
22787
|
return h(Container, {
|
|
21389
22788
|
"class": this.$props.className
|
|
21390
22789
|
}, [this.$props.title && h(Title, {
|
|
21391
|
-
"class": getClassName$
|
|
22790
|
+
"class": getClassName$6(this.$props.innerClass, 'title')
|
|
21392
22791
|
}, [this.$props.title]), this.renderSearch(), this.hasCustomRenderer ? this.getComponent() : h(UL, {
|
|
21393
|
-
"class": getClassName$
|
|
22792
|
+
"class": getClassName$6(this.$props.innerClass, 'list')
|
|
21394
22793
|
}, [selectAllLabel ? h("li", {
|
|
21395
22794
|
"key": selectAllLabel,
|
|
21396
22795
|
"class": "" + (this.currentValue[selectAllLabel] ? 'active' : '')
|
|
@@ -21402,7 +22801,7 @@
|
|
|
21402
22801
|
"value": selectAllLabel,
|
|
21403
22802
|
"show": this.$props.showCheckbox
|
|
21404
22803
|
},
|
|
21405
|
-
"class": getClassName$
|
|
22804
|
+
"class": getClassName$6(this.$props.innerClass, 'checkbox'),
|
|
21406
22805
|
"on": {
|
|
21407
22806
|
"click": this.handleClick
|
|
21408
22807
|
},
|
|
@@ -21410,7 +22809,7 @@
|
|
|
21410
22809
|
checked: !!this.currentValue[selectAllLabel]
|
|
21411
22810
|
})
|
|
21412
22811
|
}), h("label", {
|
|
21413
|
-
"class": getClassName$
|
|
22812
|
+
"class": getClassName$6(this.$props.innerClass, 'label'),
|
|
21414
22813
|
"attrs": {
|
|
21415
22814
|
"for": this.$props.componentId + "-" + selectAllLabel
|
|
21416
22815
|
}
|
|
@@ -21426,7 +22825,7 @@
|
|
|
21426
22825
|
"value": item.key,
|
|
21427
22826
|
"show": _this2.$props.showCheckbox
|
|
21428
22827
|
},
|
|
21429
|
-
"class": getClassName$
|
|
22828
|
+
"class": getClassName$6(_this2.$props.innerClass, 'checkbox'),
|
|
21430
22829
|
"on": {
|
|
21431
22830
|
"click": _this2.handleClick
|
|
21432
22831
|
},
|
|
@@ -21434,7 +22833,7 @@
|
|
|
21434
22833
|
checked: !!_this2.$data.currentValue[item.key]
|
|
21435
22834
|
})
|
|
21436
22835
|
}), h("label", {
|
|
21437
|
-
"class": getClassName$
|
|
22836
|
+
"class": getClassName$6(_this2.$props.innerClass, 'label'),
|
|
21438
22837
|
"attrs": {
|
|
21439
22838
|
"for": _this2.$props.componentId + "-" + item.key
|
|
21440
22839
|
}
|
|
@@ -21443,7 +22842,7 @@
|
|
|
21443
22842
|
count: item.doc_count,
|
|
21444
22843
|
isChecked: !!_this2.$data.currentValue[item.key]
|
|
21445
22844
|
}) : h("span", [item.key, _this2.$props.showCount && h("span", {
|
|
21446
|
-
"class": getClassName$
|
|
22845
|
+
"class": getClassName$6(_this2.$props.innerClass, 'count')
|
|
21447
22846
|
}, ["\xA0(", item.doc_count, ")"])])])]);
|
|
21448
22847
|
})])]);
|
|
21449
22848
|
},
|
|
@@ -21527,7 +22926,7 @@
|
|
|
21527
22926
|
_this3.$emit('value-change', finalValues);
|
|
21528
22927
|
};
|
|
21529
22928
|
|
|
21530
|
-
checkValueChange$
|
|
22929
|
+
checkValueChange$3(props.componentId, finalValues, props.beforeValueChange, performUpdate);
|
|
21531
22930
|
},
|
|
21532
22931
|
updateDefaultQueryHandler: function updateDefaultQueryHandler(value, props) {
|
|
21533
22932
|
var query = MultiList.defaultQuery(value, props);
|
|
@@ -21599,7 +22998,7 @@
|
|
|
21599
22998
|
|
|
21600
22999
|
if (this.$props.showSearch) {
|
|
21601
23000
|
return h(Input, {
|
|
21602
|
-
"class": getClassName$
|
|
23001
|
+
"class": getClassName$6(this.$props.innerClass, 'input') || '',
|
|
21603
23002
|
"on": {
|
|
21604
23003
|
"input": this.handleInputChange
|
|
21605
23004
|
},
|
|
@@ -21657,7 +23056,7 @@
|
|
|
21657
23056
|
var h = this.$createElement;
|
|
21658
23057
|
var renderNoResults = this.$scopedSlots.renderNoResults || this.$props.renderNoResults;
|
|
21659
23058
|
return h("p", {
|
|
21660
|
-
"class": getClassName$
|
|
23059
|
+
"class": getClassName$6(this.$props.innerClass, 'noResults') || null
|
|
21661
23060
|
}, [isFunction$1(renderNoResults) ? renderNoResults() : renderNoResults]);
|
|
21662
23061
|
}
|
|
21663
23062
|
},
|
|
@@ -21764,7 +23163,7 @@
|
|
|
21764
23163
|
return getAggsQuery(queryOptions, props);
|
|
21765
23164
|
};
|
|
21766
23165
|
|
|
21767
|
-
var mapStateToProps$
|
|
23166
|
+
var mapStateToProps$6 = function mapStateToProps(state, props) {
|
|
21768
23167
|
return {
|
|
21769
23168
|
options: props.nestedField && state.aggregations[props.componentId] ? state.aggregations[props.componentId].reactivesearch_nested : state.aggregations[props.componentId],
|
|
21770
23169
|
rawData: state.rawData[props.componentId],
|
|
@@ -21779,16 +23178,16 @@
|
|
|
21779
23178
|
|
|
21780
23179
|
var mapDispatchtoProps$3 = {
|
|
21781
23180
|
setQueryOptions: setQueryOptions$3,
|
|
21782
|
-
updateQuery: updateQuery$
|
|
21783
|
-
setCustomQuery: setCustomQuery$
|
|
21784
|
-
setDefaultQuery: setDefaultQuery$
|
|
23181
|
+
updateQuery: updateQuery$4,
|
|
23182
|
+
setCustomQuery: setCustomQuery$3,
|
|
23183
|
+
setDefaultQuery: setDefaultQuery$4
|
|
21785
23184
|
};
|
|
21786
23185
|
|
|
21787
23186
|
MultiList.hasInternalComponent = function () {
|
|
21788
23187
|
return true;
|
|
21789
23188
|
};
|
|
21790
23189
|
|
|
21791
|
-
var ListConnected$1 = ComponentWrapper$1(connect(mapStateToProps$
|
|
23190
|
+
var ListConnected$1 = ComponentWrapper$1(connect(mapStateToProps$6, mapDispatchtoProps$3)(MultiList), {
|
|
21792
23191
|
componentType: constants_1$1.multiList,
|
|
21793
23192
|
internalComponent: MultiList.hasInternalComponent()
|
|
21794
23193
|
});
|
|
@@ -21800,8 +23199,8 @@
|
|
|
21800
23199
|
|
|
21801
23200
|
MultiList.componentType = constants_1$1.multiList;
|
|
21802
23201
|
|
|
21803
|
-
var _templateObject$
|
|
21804
|
-
var small = css(_templateObject$
|
|
23202
|
+
var _templateObject$l, _templateObject2$8, _templateObject3$7, _templateObject4$6;
|
|
23203
|
+
var small = css(_templateObject$l || (_templateObject$l = _taggedTemplateLiteralLoose(["\n\tmin-height: 0;\n\theight: 30px;\n\tborder: 0;\n\tbox-shadow: rgba(0, 0, 0, 0.3) 0px 1px 4px -1px;\n\tborder-radius: 2px;\n"])));
|
|
21805
23204
|
|
|
21806
23205
|
var dark$2 = function dark(_ref) {
|
|
21807
23206
|
var theme = _ref.theme;
|
|
@@ -21819,13 +23218,13 @@
|
|
|
21819
23218
|
return theme.colors.primaryColor;
|
|
21820
23219
|
});
|
|
21821
23220
|
|
|
21822
|
-
var _templateObject$
|
|
21823
|
-
var open = css(_templateObject$
|
|
23221
|
+
var _templateObject$m, _templateObject2$9;
|
|
23222
|
+
var open = css(_templateObject$m || (_templateObject$m = _taggedTemplateLiteralLoose(["\n\ttop: 0.55em;\n\ttransform: rotate(-45deg);\n"])));
|
|
21824
23223
|
var Chevron = index$1('span')(_templateObject2$9 || (_templateObject2$9 = _taggedTemplateLiteralLoose(["\n\t&::before {\n\t\tcontent: '';\n\t\tborder-style: solid;\n\t\tborder-width: 0.15em 0.15em 0 0;\n\t\tdisplay: inline-block;\n\t\theight: 0.45em;\n\t\tposition: relative;\n\t\ttop: 0.35em;\n\t\tleft: 0;\n\t\ttransform: rotate(135deg);\n\t\tvertical-align: top;\n\t\twidth: 0.45em;\n\n\t\t", ";\n\t}\n"])), function (props) {
|
|
21825
23224
|
return props.open ? open : null;
|
|
21826
23225
|
});
|
|
21827
23226
|
|
|
21828
|
-
var getClassName$
|
|
23227
|
+
var getClassName$7 = lib_8.getClassName;
|
|
21829
23228
|
var Dropdown = {
|
|
21830
23229
|
data: function data() {
|
|
21831
23230
|
this.__state = {
|
|
@@ -21919,7 +23318,7 @@
|
|
|
21919
23318
|
"on": _extends({}, _extends({}, getButtonProps({
|
|
21920
23319
|
onClick: _this.toggle
|
|
21921
23320
|
}))),
|
|
21922
|
-
"class": getClassName$
|
|
23321
|
+
"class": getClassName$7(_this.$props.innerClass, 'select') || '',
|
|
21923
23322
|
"attrs": {
|
|
21924
23323
|
"title": selectedItem ? _this.renderToString(selectedItem) : placeholder,
|
|
21925
23324
|
"small": _this.$props.small,
|
|
@@ -21936,7 +23335,7 @@
|
|
|
21936
23335
|
getButtonProps: getButtonProps,
|
|
21937
23336
|
getItemEvents: getItemEvents
|
|
21938
23337
|
}) : isOpen && itemsToRender.length ? h("ul", {
|
|
21939
|
-
"class": suggestions$1(themePreset, _this.theme) + " " + (_this.$props.small ? 'small' : '') + " " + getClassName$
|
|
23338
|
+
"class": suggestions$1(themePreset, _this.theme) + " " + (_this.$props.small ? 'small' : '') + " " + getClassName$7(_this.$props.innerClass, 'list')
|
|
21940
23339
|
}, [_this.$props.showSearch ? _this.renderSearchbox({
|
|
21941
23340
|
on: {
|
|
21942
23341
|
input: getInputEvents({
|
|
@@ -21971,9 +23370,9 @@
|
|
|
21971
23370
|
"innerHTML": item[labelField]
|
|
21972
23371
|
}
|
|
21973
23372
|
}) : item[labelField], _this.$props.showCount && item.doc_count && h("span", {
|
|
21974
|
-
"class": getClassName$
|
|
23373
|
+
"class": getClassName$7(_this.$props.innerClass, 'count') || ''
|
|
21975
23374
|
}, ["\xA0(", item.doc_count, ")"])]), selected && _this.$props.multi ? h(Tick, {
|
|
21976
|
-
"class": getClassName$
|
|
23375
|
+
"class": getClassName$7(_this.$props.innerClass, 'icon') || ''
|
|
21977
23376
|
}) : null]);
|
|
21978
23377
|
}), footer]) : null]);
|
|
21979
23378
|
}
|
|
@@ -22061,7 +23460,7 @@
|
|
|
22061
23460
|
var h = this.$createElement;
|
|
22062
23461
|
var renderNoResults = this.$scopedSlots.renderNoResults || this.$props.renderNoResults;
|
|
22063
23462
|
return h("p", {
|
|
22064
|
-
"class": getClassName$
|
|
23463
|
+
"class": getClassName$7(this.$props.innerClass, 'noResults') || null
|
|
22065
23464
|
}, [isFunction$1(renderNoResults) ? renderNoResults() : renderNoResults]);
|
|
22066
23465
|
},
|
|
22067
23466
|
renderSearchbox: function renderSearchbox(eventObject) {
|
|
@@ -22085,7 +23484,7 @@
|
|
|
22085
23484
|
border: 0,
|
|
22086
23485
|
borderBottom: '1px solid #ddd'
|
|
22087
23486
|
},
|
|
22088
|
-
"class": getClassName$
|
|
23487
|
+
"class": getClassName$7(innerClass, 'input')
|
|
22089
23488
|
}, eventObject]));
|
|
22090
23489
|
|
|
22091
23490
|
if (showClear) {
|
|
@@ -22109,16 +23508,16 @@
|
|
|
22109
23508
|
}
|
|
22110
23509
|
};
|
|
22111
23510
|
|
|
22112
|
-
var updateQuery$
|
|
23511
|
+
var updateQuery$5 = lib_5.updateQuery,
|
|
22113
23512
|
setQueryOptions$4 = lib_5.setQueryOptions,
|
|
22114
|
-
setCustomQuery$
|
|
22115
|
-
setDefaultQuery$
|
|
23513
|
+
setCustomQuery$4 = lib_5.setCustomQuery,
|
|
23514
|
+
setDefaultQuery$5 = lib_5.setDefaultQuery;
|
|
22116
23515
|
var getQueryOptions$3 = lib_8.getQueryOptions,
|
|
22117
|
-
checkValueChange$
|
|
23516
|
+
checkValueChange$4 = lib_8.checkValueChange,
|
|
22118
23517
|
checkPropChange$1 = lib_8.checkPropChange,
|
|
22119
|
-
getClassName$
|
|
22120
|
-
isEqual$
|
|
22121
|
-
getCompositeAggsQuery$
|
|
23518
|
+
getClassName$8 = lib_8.getClassName,
|
|
23519
|
+
isEqual$8 = lib_8.isEqual,
|
|
23520
|
+
getCompositeAggsQuery$3 = lib_8.getCompositeAggsQuery,
|
|
22122
23521
|
extractQueryFromCustomQuery$4 = lib_8.extractQueryFromCustomQuery,
|
|
22123
23522
|
getOptionsForCustomQuery$4 = lib_8.getOptionsForCustomQuery;
|
|
22124
23523
|
var SingleDropdownList = {
|
|
@@ -22241,7 +23640,7 @@
|
|
|
22241
23640
|
this.setValue(newVal);
|
|
22242
23641
|
},
|
|
22243
23642
|
value: function value(newVal, oldVal) {
|
|
22244
|
-
if (!isEqual$
|
|
23643
|
+
if (!isEqual$8(newVal, oldVal)) {
|
|
22245
23644
|
this.setValue(newVal);
|
|
22246
23645
|
}
|
|
22247
23646
|
},
|
|
@@ -22301,7 +23700,7 @@
|
|
|
22301
23700
|
return h(Container, {
|
|
22302
23701
|
"class": this.$props.className
|
|
22303
23702
|
}, [this.$props.title && h(Title, {
|
|
22304
|
-
"class": getClassName$
|
|
23703
|
+
"class": getClassName$8(this.$props.innerClass, 'title') || ''
|
|
22305
23704
|
}, [this.$props.title]), h(Dropdown, {
|
|
22306
23705
|
"attrs": {
|
|
22307
23706
|
"innerClass": this.$props.innerClass,
|
|
@@ -22357,7 +23756,7 @@
|
|
|
22357
23756
|
_this2.$emit('value-change', value);
|
|
22358
23757
|
};
|
|
22359
23758
|
|
|
22360
|
-
checkValueChange$
|
|
23759
|
+
checkValueChange$4(props.componentId, value, props.beforeValueChange, performUpdate);
|
|
22361
23760
|
},
|
|
22362
23761
|
handleChange: function handleChange(item) {
|
|
22363
23762
|
var value = this.$props.value;
|
|
@@ -22416,7 +23815,7 @@
|
|
|
22416
23815
|
},
|
|
22417
23816
|
generateQueryOptions: function generateQueryOptions(props, after) {
|
|
22418
23817
|
var queryOptions = getQueryOptions$3(props);
|
|
22419
|
-
return props.showLoadMore ? getCompositeAggsQuery$
|
|
23818
|
+
return props.showLoadMore ? getCompositeAggsQuery$3({
|
|
22420
23819
|
query: queryOptions,
|
|
22421
23820
|
props: props,
|
|
22422
23821
|
after: after
|
|
@@ -22522,7 +23921,7 @@
|
|
|
22522
23921
|
|
|
22523
23922
|
SingleDropdownList.generateQueryOptions = function (props, after) {
|
|
22524
23923
|
var queryOptions = getQueryOptions$3(props);
|
|
22525
|
-
return props.showLoadMore ? getCompositeAggsQuery$
|
|
23924
|
+
return props.showLoadMore ? getCompositeAggsQuery$3({
|
|
22526
23925
|
query: queryOptions,
|
|
22527
23926
|
props: props,
|
|
22528
23927
|
after: after
|
|
@@ -22533,7 +23932,7 @@
|
|
|
22533
23932
|
return true;
|
|
22534
23933
|
};
|
|
22535
23934
|
|
|
22536
|
-
var mapStateToProps$
|
|
23935
|
+
var mapStateToProps$7 = function mapStateToProps(state, props) {
|
|
22537
23936
|
return {
|
|
22538
23937
|
options: props.nestedField && state.aggregations[props.componentId] ? state.aggregations[props.componentId].reactivesearch_nested : state.aggregations[props.componentId],
|
|
22539
23938
|
rawData: state.rawData[props.componentId],
|
|
@@ -22548,11 +23947,11 @@
|
|
|
22548
23947
|
|
|
22549
23948
|
var mapDispatchtoProps$4 = {
|
|
22550
23949
|
setQueryOptions: setQueryOptions$4,
|
|
22551
|
-
updateQuery: updateQuery$
|
|
22552
|
-
setCustomQuery: setCustomQuery$
|
|
22553
|
-
setDefaultQuery: setDefaultQuery$
|
|
23950
|
+
updateQuery: updateQuery$5,
|
|
23951
|
+
setCustomQuery: setCustomQuery$4,
|
|
23952
|
+
setDefaultQuery: setDefaultQuery$5
|
|
22554
23953
|
};
|
|
22555
|
-
var ListConnected$2 = ComponentWrapper$1(connect(mapStateToProps$
|
|
23954
|
+
var ListConnected$2 = ComponentWrapper$1(connect(mapStateToProps$7, mapDispatchtoProps$4)(SingleDropdownList), {
|
|
22556
23955
|
componentType: constants_1$1.singleDropdownList,
|
|
22557
23956
|
internalComponent: SingleDropdownList.hasInternalComponent()
|
|
22558
23957
|
});
|
|
@@ -22564,16 +23963,16 @@
|
|
|
22564
23963
|
|
|
22565
23964
|
SingleDropdownList.componentType = constants_1$1.singleDropdownList;
|
|
22566
23965
|
|
|
22567
|
-
var updateQuery$
|
|
23966
|
+
var updateQuery$6 = lib_5.updateQuery,
|
|
22568
23967
|
setQueryOptions$5 = lib_5.setQueryOptions,
|
|
22569
|
-
setCustomQuery$
|
|
22570
|
-
setDefaultQuery$
|
|
22571
|
-
var isEqual$
|
|
23968
|
+
setCustomQuery$5 = lib_5.setCustomQuery,
|
|
23969
|
+
setDefaultQuery$6 = lib_5.setDefaultQuery;
|
|
23970
|
+
var isEqual$9 = lib_8.isEqual,
|
|
22572
23971
|
getQueryOptions$4 = lib_8.getQueryOptions,
|
|
22573
|
-
checkValueChange$
|
|
23972
|
+
checkValueChange$5 = lib_8.checkValueChange,
|
|
22574
23973
|
checkPropChange$2 = lib_8.checkPropChange,
|
|
22575
|
-
getClassName$
|
|
22576
|
-
getCompositeAggsQuery$
|
|
23974
|
+
getClassName$9 = lib_8.getClassName,
|
|
23975
|
+
getCompositeAggsQuery$4 = lib_8.getCompositeAggsQuery,
|
|
22577
23976
|
extractQueryFromCustomQuery$5 = lib_8.extractQueryFromCustomQuery,
|
|
22578
23977
|
getOptionsForCustomQuery$5 = lib_8.getOptionsForCustomQuery;
|
|
22579
23978
|
var MultiDropdownList = {
|
|
@@ -22665,7 +24064,7 @@
|
|
|
22665
24064
|
}
|
|
22666
24065
|
}
|
|
22667
24066
|
|
|
22668
|
-
if (!isEqual$
|
|
24067
|
+
if (!isEqual$9(selectedValue, newVal)) {
|
|
22669
24068
|
this.setValue(newVal || [], true);
|
|
22670
24069
|
}
|
|
22671
24070
|
},
|
|
@@ -22716,7 +24115,7 @@
|
|
|
22716
24115
|
this.setValue(newVal, true);
|
|
22717
24116
|
},
|
|
22718
24117
|
value: function value(newVal, oldVal) {
|
|
22719
|
-
if (!isEqual$
|
|
24118
|
+
if (!isEqual$9(newVal, oldVal)) {
|
|
22720
24119
|
this.setValue(newVal, true);
|
|
22721
24120
|
}
|
|
22722
24121
|
},
|
|
@@ -22771,7 +24170,7 @@
|
|
|
22771
24170
|
return h(Container, {
|
|
22772
24171
|
"class": this.$props.className
|
|
22773
24172
|
}, [this.$props.title && h(Title, {
|
|
22774
|
-
"class": getClassName$
|
|
24173
|
+
"class": getClassName$9(this.$props.innerClass, 'title') || ''
|
|
22775
24174
|
}, [this.$props.title]), h(Dropdown, {
|
|
22776
24175
|
"attrs": {
|
|
22777
24176
|
"innerClass": this.$props.innerClass,
|
|
@@ -22896,7 +24295,7 @@
|
|
|
22896
24295
|
_this3.$emit('value-change', finalValues);
|
|
22897
24296
|
};
|
|
22898
24297
|
|
|
22899
|
-
checkValueChange$
|
|
24298
|
+
checkValueChange$5(props.componentId, finalValues, props.beforeValueChange, performUpdate);
|
|
22900
24299
|
},
|
|
22901
24300
|
updateDefaultQueryHandler: function updateDefaultQueryHandler(value, props) {
|
|
22902
24301
|
var query = MultiDropdownList.defaultQuery(value, props);
|
|
@@ -22946,7 +24345,7 @@
|
|
|
22946
24345
|
},
|
|
22947
24346
|
generateQueryOptions: function generateQueryOptions(props, after) {
|
|
22948
24347
|
var queryOptions = getQueryOptions$4(props);
|
|
22949
|
-
return props.showLoadMore ? getCompositeAggsQuery$
|
|
24348
|
+
return props.showLoadMore ? getCompositeAggsQuery$4({
|
|
22950
24349
|
query: queryOptions,
|
|
22951
24350
|
props: props,
|
|
22952
24351
|
after: after
|
|
@@ -23094,7 +24493,7 @@
|
|
|
23094
24493
|
|
|
23095
24494
|
MultiDropdownList.generateQueryOptions = function (props, after) {
|
|
23096
24495
|
var queryOptions = getQueryOptions$4(props);
|
|
23097
|
-
return props.showLoadMore ? getCompositeAggsQuery$
|
|
24496
|
+
return props.showLoadMore ? getCompositeAggsQuery$4({
|
|
23098
24497
|
query: queryOptions,
|
|
23099
24498
|
props: props,
|
|
23100
24499
|
after: after
|
|
@@ -23105,7 +24504,7 @@
|
|
|
23105
24504
|
return true;
|
|
23106
24505
|
};
|
|
23107
24506
|
|
|
23108
|
-
var mapStateToProps$
|
|
24507
|
+
var mapStateToProps$8 = function mapStateToProps(state, props) {
|
|
23109
24508
|
return {
|
|
23110
24509
|
options: props.nestedField && state.aggregations[props.componentId] ? state.aggregations[props.componentId].reactivesearch_nested : state.aggregations[props.componentId],
|
|
23111
24510
|
rawData: state.rawData[props.componentId],
|
|
@@ -23120,11 +24519,11 @@
|
|
|
23120
24519
|
|
|
23121
24520
|
var mapDispatchtoProps$5 = {
|
|
23122
24521
|
setQueryOptions: setQueryOptions$5,
|
|
23123
|
-
updateQuery: updateQuery$
|
|
23124
|
-
setCustomQuery: setCustomQuery$
|
|
23125
|
-
setDefaultQuery: setDefaultQuery$
|
|
24522
|
+
updateQuery: updateQuery$6,
|
|
24523
|
+
setCustomQuery: setCustomQuery$5,
|
|
24524
|
+
setDefaultQuery: setDefaultQuery$6
|
|
23126
24525
|
};
|
|
23127
|
-
var ListConnected$3 = ComponentWrapper$1(connect(mapStateToProps$
|
|
24526
|
+
var ListConnected$3 = ComponentWrapper$1(connect(mapStateToProps$8, mapDispatchtoProps$5)(MultiDropdownList), {
|
|
23128
24527
|
componentType: constants_1$1.multiDropdownList,
|
|
23129
24528
|
internalComponent: MultiDropdownList.hasInternalComponent()
|
|
23130
24529
|
});
|
|
@@ -23136,12 +24535,12 @@
|
|
|
23136
24535
|
|
|
23137
24536
|
MultiDropdownList.componentType = constants_1$1.multiDropdownList;
|
|
23138
24537
|
|
|
23139
|
-
var updateQuery$
|
|
24538
|
+
var updateQuery$7 = lib_5.updateQuery,
|
|
23140
24539
|
setQueryOptions$6 = lib_5.setQueryOptions,
|
|
23141
|
-
setCustomQuery$
|
|
23142
|
-
var isEqual$
|
|
23143
|
-
checkValueChange$
|
|
23144
|
-
getClassName$
|
|
24540
|
+
setCustomQuery$6 = lib_5.setCustomQuery;
|
|
24541
|
+
var isEqual$a = lib_8.isEqual,
|
|
24542
|
+
checkValueChange$6 = lib_8.checkValueChange,
|
|
24543
|
+
getClassName$a = lib_8.getClassName,
|
|
23145
24544
|
getOptionsFromQuery = lib_8.getOptionsFromQuery,
|
|
23146
24545
|
handleA11yAction$1 = lib_8.handleA11yAction;
|
|
23147
24546
|
var ToggleButton = {
|
|
@@ -23200,21 +24599,21 @@
|
|
|
23200
24599
|
this.updateQuery(this.$data.currentValue, this.$props);
|
|
23201
24600
|
},
|
|
23202
24601
|
value: function value(newVal, oldVal) {
|
|
23203
|
-
if (!isEqual$
|
|
24602
|
+
if (!isEqual$a(newVal, oldVal)) {
|
|
23204
24603
|
this.handleToggle(newVal, true, this.$props);
|
|
23205
24604
|
}
|
|
23206
24605
|
},
|
|
23207
24606
|
selectedValue: function selectedValue(newVal, oldVal) {
|
|
23208
24607
|
if (this.$props.multiSelect) {
|
|
23209
24608
|
// for multiselect selectedValue will be an array
|
|
23210
|
-
if (!isEqual$
|
|
24609
|
+
if (!isEqual$a(this.$data.currentValue, newVal) && !isEqual$a(oldVal, newVal)) {
|
|
23211
24610
|
this.handleToggle(newVal || [], true, this.$props);
|
|
23212
24611
|
}
|
|
23213
24612
|
} else {
|
|
23214
24613
|
// else selectedValue will be a string
|
|
23215
24614
|
var currentValue = this.$data.currentValue[0] ? this.$data.currentValue[0].value : null;
|
|
23216
24615
|
|
|
23217
|
-
if (!isEqual$
|
|
24616
|
+
if (!isEqual$a(currentValue, this.selectedValue) && !isEqual$a(oldVal, this.selectedValue)) {
|
|
23218
24617
|
this.handleToggle(this.selectedValue || [], true, this.$props);
|
|
23219
24618
|
}
|
|
23220
24619
|
}
|
|
@@ -23292,7 +24691,7 @@
|
|
|
23292
24691
|
}
|
|
23293
24692
|
};
|
|
23294
24693
|
|
|
23295
|
-
checkValueChange$
|
|
24694
|
+
checkValueChange$6(props.componentId, props.multiSelect ? value : value[0], props.beforeValueChange, performUpdate);
|
|
23296
24695
|
},
|
|
23297
24696
|
updateQuery: function updateQuery(value, props) {
|
|
23298
24697
|
var filterValue = value;
|
|
@@ -23329,7 +24728,7 @@
|
|
|
23329
24728
|
multiSelect = _this$$props.multiSelect;
|
|
23330
24729
|
|
|
23331
24730
|
if (enableStrictSelection && !multiSelect && this.$data.currentValue.find(function (stateItem) {
|
|
23332
|
-
return isEqual$
|
|
24731
|
+
return isEqual$a(item, stateItem);
|
|
23333
24732
|
})) {
|
|
23334
24733
|
return false;
|
|
23335
24734
|
}
|
|
@@ -23359,7 +24758,7 @@
|
|
|
23359
24758
|
return _this2.handleClick(item);
|
|
23360
24759
|
}
|
|
23361
24760
|
}) : h(Button, {
|
|
23362
|
-
"class": getClassName$
|
|
24761
|
+
"class": getClassName$a(this.$props.innerClass, 'button') + " " + (isSelected ? 'active' : ''),
|
|
23363
24762
|
"on": {
|
|
23364
24763
|
"click": function click() {
|
|
23365
24764
|
return _this2.handleClick(item);
|
|
@@ -23386,7 +24785,7 @@
|
|
|
23386
24785
|
return h(Container, {
|
|
23387
24786
|
"class": toggleButtons
|
|
23388
24787
|
}, [this.$props.title && h(Title, {
|
|
23389
|
-
"class": getClassName$
|
|
24788
|
+
"class": getClassName$a(this.$props.innerClass, 'title')
|
|
23390
24789
|
}, [this.$props.title]), this.$props.data.map(function (item) {
|
|
23391
24790
|
return _this3.renderButton(item);
|
|
23392
24791
|
})]);
|
|
@@ -23442,7 +24841,7 @@
|
|
|
23442
24841
|
return query;
|
|
23443
24842
|
};
|
|
23444
24843
|
|
|
23445
|
-
var mapStateToProps$
|
|
24844
|
+
var mapStateToProps$9 = function mapStateToProps(state, props) {
|
|
23446
24845
|
return {
|
|
23447
24846
|
selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || null,
|
|
23448
24847
|
componentProps: state.props[props.componentId],
|
|
@@ -23451,11 +24850,11 @@
|
|
|
23451
24850
|
};
|
|
23452
24851
|
|
|
23453
24852
|
var mapDispatchtoProps$6 = {
|
|
23454
|
-
updateQueryHandler: updateQuery$
|
|
24853
|
+
updateQueryHandler: updateQuery$7,
|
|
23455
24854
|
setQueryOptions: setQueryOptions$6,
|
|
23456
|
-
setCustomQuery: setCustomQuery$
|
|
24855
|
+
setCustomQuery: setCustomQuery$6
|
|
23457
24856
|
};
|
|
23458
|
-
var RcConnected = ComponentWrapper$1(connect(mapStateToProps$
|
|
24857
|
+
var RcConnected = ComponentWrapper$1(connect(mapStateToProps$9, mapDispatchtoProps$6)(ToggleButton), {
|
|
23459
24858
|
componentType: constants_1$1.toggleButton
|
|
23460
24859
|
});
|
|
23461
24860
|
|
|
@@ -23467,14 +24866,14 @@
|
|
|
23467
24866
|
ToggleButton.componentType = constants_1$1.toggleButton;
|
|
23468
24867
|
|
|
23469
24868
|
var _excluded = ["options"];
|
|
23470
|
-
var updateQuery$
|
|
24869
|
+
var updateQuery$8 = lib_5.updateQuery,
|
|
23471
24870
|
setQueryOptions$7 = lib_5.setQueryOptions,
|
|
23472
|
-
setCustomQuery$
|
|
23473
|
-
setDefaultQuery$
|
|
24871
|
+
setCustomQuery$7 = lib_5.setCustomQuery,
|
|
24872
|
+
setDefaultQuery$7 = lib_5.setDefaultQuery;
|
|
23474
24873
|
var parseHits$1 = lib_8.parseHits,
|
|
23475
|
-
isEqual$
|
|
23476
|
-
getCompositeAggsQuery$
|
|
23477
|
-
getResultStats$
|
|
24874
|
+
isEqual$b = lib_8.isEqual,
|
|
24875
|
+
getCompositeAggsQuery$5 = lib_8.getCompositeAggsQuery,
|
|
24876
|
+
getResultStats$3 = lib_8.getResultStats,
|
|
23478
24877
|
extractQueryFromCustomQuery$6 = lib_8.extractQueryFromCustomQuery,
|
|
23479
24878
|
getOptionsForCustomQuery$6 = lib_8.getOptionsForCustomQuery;
|
|
23480
24879
|
var ReactiveComponent = {
|
|
@@ -23602,42 +25001,42 @@
|
|
|
23602
25001
|
},
|
|
23603
25002
|
watch: {
|
|
23604
25003
|
hits: function hits(newVal, oldVal) {
|
|
23605
|
-
if (!isEqual$
|
|
25004
|
+
if (!isEqual$b(newVal, oldVal)) {
|
|
23606
25005
|
this.$emit('data', this.getData());
|
|
23607
25006
|
}
|
|
23608
25007
|
},
|
|
23609
25008
|
rawData: function rawData(newVal, oldVal) {
|
|
23610
|
-
if (!isEqual$
|
|
25009
|
+
if (!isEqual$b(newVal, oldVal)) {
|
|
23611
25010
|
this.$emit('data', this.getData());
|
|
23612
25011
|
}
|
|
23613
25012
|
},
|
|
23614
25013
|
aggregations: function aggregations(newVal, oldVal) {
|
|
23615
|
-
if (!isEqual$
|
|
25014
|
+
if (!isEqual$b(newVal, oldVal)) {
|
|
23616
25015
|
this.$emit('data', this.getData());
|
|
23617
25016
|
}
|
|
23618
25017
|
},
|
|
23619
25018
|
aggregationData: function aggregationData(newVal, oldVal) {
|
|
23620
|
-
if (!isEqual$
|
|
25019
|
+
if (!isEqual$b(newVal, oldVal)) {
|
|
23621
25020
|
this.$emit('data', this.getData());
|
|
23622
25021
|
}
|
|
23623
25022
|
},
|
|
23624
25023
|
promotedResults: function promotedResults(newVal, oldVal) {
|
|
23625
|
-
if (!isEqual$
|
|
25024
|
+
if (!isEqual$b(newVal, oldVal)) {
|
|
23626
25025
|
this.$emit('data', this.getData());
|
|
23627
25026
|
}
|
|
23628
25027
|
},
|
|
23629
25028
|
hidden: function hidden(newVal, oldVal) {
|
|
23630
|
-
if (!isEqual$
|
|
25029
|
+
if (!isEqual$b(newVal, oldVal)) {
|
|
23631
25030
|
this.$emit('data', this.getData());
|
|
23632
25031
|
}
|
|
23633
25032
|
},
|
|
23634
25033
|
total: function total(newVal, oldVal) {
|
|
23635
|
-
if (!isEqual$
|
|
25034
|
+
if (!isEqual$b(newVal, oldVal)) {
|
|
23636
25035
|
this.$emit('data', this.getData());
|
|
23637
25036
|
}
|
|
23638
25037
|
},
|
|
23639
25038
|
time: function time(newVal, oldVal) {
|
|
23640
|
-
if (!isEqual$
|
|
25039
|
+
if (!isEqual$b(newVal, oldVal)) {
|
|
23641
25040
|
this.$emit('data', this.getData());
|
|
23642
25041
|
}
|
|
23643
25042
|
},
|
|
@@ -23705,7 +25104,7 @@
|
|
|
23705
25104
|
getAggsQuery: function getAggsQuery() {
|
|
23706
25105
|
if (this.aggregationField) {
|
|
23707
25106
|
return {
|
|
23708
|
-
aggs: getCompositeAggsQuery$
|
|
25107
|
+
aggs: getCompositeAggsQuery$5({
|
|
23709
25108
|
props: this.$props,
|
|
23710
25109
|
showTopHits: true,
|
|
23711
25110
|
value: this.selectedValue
|
|
@@ -23749,7 +25148,7 @@
|
|
|
23749
25148
|
},
|
|
23750
25149
|
computed: {
|
|
23751
25150
|
stats: function stats() {
|
|
23752
|
-
return getResultStats$
|
|
25151
|
+
return getResultStats$3(this);
|
|
23753
25152
|
}
|
|
23754
25153
|
}
|
|
23755
25154
|
};
|
|
@@ -23758,7 +25157,7 @@
|
|
|
23758
25157
|
return !!props.defaultQuery;
|
|
23759
25158
|
};
|
|
23760
25159
|
|
|
23761
|
-
var mapStateToProps$
|
|
25160
|
+
var mapStateToProps$a = function mapStateToProps(state, props) {
|
|
23762
25161
|
return {
|
|
23763
25162
|
aggregations: state.aggregations[props.componentId] && state.aggregations[props.componentId] || null,
|
|
23764
25163
|
aggregationData: state.compositeAggregations[props.componentId] || [],
|
|
@@ -23778,11 +25177,11 @@
|
|
|
23778
25177
|
|
|
23779
25178
|
var mapDispatchtoProps$7 = {
|
|
23780
25179
|
setQueryOptions: setQueryOptions$7,
|
|
23781
|
-
updateQuery: updateQuery$
|
|
23782
|
-
setCustomQuery: setCustomQuery$
|
|
23783
|
-
setDefaultQuery: setDefaultQuery$
|
|
25180
|
+
updateQuery: updateQuery$8,
|
|
25181
|
+
setCustomQuery: setCustomQuery$7,
|
|
25182
|
+
setDefaultQuery: setDefaultQuery$7
|
|
23784
25183
|
};
|
|
23785
|
-
var RcConnected$1 = ComponentWrapper$1(connect(mapStateToProps$
|
|
25184
|
+
var RcConnected$1 = ComponentWrapper$1(connect(mapStateToProps$a, mapDispatchtoProps$7)(ReactiveComponent), {
|
|
23786
25185
|
componentType: constants_1$1.reactiveComponent
|
|
23787
25186
|
});
|
|
23788
25187
|
|
|
@@ -23796,7 +25195,7 @@
|
|
|
23796
25195
|
var setValue$2 = lib_5.setValue,
|
|
23797
25196
|
clearValues = lib_5.clearValues,
|
|
23798
25197
|
resetValuesToDefault = lib_5.resetValuesToDefault;
|
|
23799
|
-
var getClassName$
|
|
25198
|
+
var getClassName$b = lib_8.getClassName,
|
|
23800
25199
|
handleA11yAction$2 = lib_8.handleA11yAction;
|
|
23801
25200
|
var SelectedFilters = {
|
|
23802
25201
|
name: 'SelectedFilters',
|
|
@@ -23807,6 +25206,7 @@
|
|
|
23807
25206
|
showClearAll: VueTypes.bool.def(true),
|
|
23808
25207
|
title: types.title,
|
|
23809
25208
|
resetToDefault: VueTypes.bool.def(false),
|
|
25209
|
+
clearAllBlacklistComponents: VueTypes.array,
|
|
23810
25210
|
resetToValues: VueTypes.object
|
|
23811
25211
|
},
|
|
23812
25212
|
inject: {
|
|
@@ -23834,9 +25234,9 @@
|
|
|
23834
25234
|
return h(Container, {
|
|
23835
25235
|
"class": filters(this.theme) + " " + (this.$props.className || '')
|
|
23836
25236
|
}, [this.$props.title && hasValues && h(Title, {
|
|
23837
|
-
"class": getClassName$
|
|
25237
|
+
"class": getClassName$b(this.$props.innerClass, 'title') || ''
|
|
23838
25238
|
}, [this.$props.title]), filtersToRender, this.$props.showClearAll && hasValues ? h(Button, {
|
|
23839
|
-
"class": getClassName$
|
|
25239
|
+
"class": getClassName$b(this.$props.innerClass, 'button') || '',
|
|
23840
25240
|
"on": _extends({}, {
|
|
23841
25241
|
click: this.clearValues,
|
|
23842
25242
|
keypress: function keypress(event) {
|
|
@@ -23861,12 +25261,13 @@
|
|
|
23861
25261
|
},
|
|
23862
25262
|
clearValues: function clearValues() {
|
|
23863
25263
|
var resetToDefault = this.resetToDefault,
|
|
23864
|
-
resetToValues = this.resetToValues
|
|
25264
|
+
resetToValues = this.resetToValues,
|
|
25265
|
+
clearAllBlacklistComponents = this.clearAllBlacklistComponents;
|
|
23865
25266
|
|
|
23866
25267
|
if (resetToDefault) {
|
|
23867
|
-
this.resetValuesToDefault();
|
|
25268
|
+
this.resetValuesToDefault(clearAllBlacklistComponents);
|
|
23868
25269
|
} else {
|
|
23869
|
-
this.clearValuesAction(resetToValues);
|
|
25270
|
+
this.clearValuesAction(resetToValues, clearAllBlacklistComponents);
|
|
23870
25271
|
}
|
|
23871
25272
|
|
|
23872
25273
|
this.$emit('clear', resetToValues);
|
|
@@ -23911,7 +25312,7 @@
|
|
|
23911
25312
|
var valueToRender = _this3.renderValue(value, isArray);
|
|
23912
25313
|
|
|
23913
25314
|
return h(Button, {
|
|
23914
|
-
"class": getClassName$
|
|
25315
|
+
"class": getClassName$b(_this3.$props.innerClass, 'button') || '',
|
|
23915
25316
|
"key": component + "-" + (index + 1),
|
|
23916
25317
|
"on": _extends({}, {
|
|
23917
25318
|
click: function click() {
|
|
@@ -23940,7 +25341,7 @@
|
|
|
23940
25341
|
}
|
|
23941
25342
|
};
|
|
23942
25343
|
|
|
23943
|
-
var mapStateToProps$
|
|
25344
|
+
var mapStateToProps$b = function mapStateToProps(state) {
|
|
23944
25345
|
return {
|
|
23945
25346
|
components: state.components,
|
|
23946
25347
|
selectedValues: state.selectedValues
|
|
@@ -23952,18 +25353,18 @@
|
|
|
23952
25353
|
setValue: setValue$2,
|
|
23953
25354
|
resetValuesToDefault: resetValuesToDefault
|
|
23954
25355
|
};
|
|
23955
|
-
var RcConnected$2 = connect(mapStateToProps$
|
|
25356
|
+
var RcConnected$2 = connect(mapStateToProps$b, mapDispatchtoProps$8)(SelectedFilters);
|
|
23956
25357
|
|
|
23957
25358
|
SelectedFilters.install = function (Vue) {
|
|
23958
25359
|
Vue.component(SelectedFilters.name, RcConnected$2);
|
|
23959
25360
|
};
|
|
23960
25361
|
|
|
23961
|
-
var updateQuery$
|
|
25362
|
+
var updateQuery$9 = lib_5.updateQuery,
|
|
23962
25363
|
setQueryOptions$8 = lib_5.setQueryOptions,
|
|
23963
|
-
setCustomQuery$
|
|
23964
|
-
var isEqual$
|
|
23965
|
-
checkValueChange$
|
|
23966
|
-
getClassName$
|
|
25364
|
+
setCustomQuery$8 = lib_5.setCustomQuery;
|
|
25365
|
+
var isEqual$c = lib_8.isEqual,
|
|
25366
|
+
checkValueChange$7 = lib_8.checkValueChange,
|
|
25367
|
+
getClassName$c = lib_8.getClassName,
|
|
23967
25368
|
getOptionsFromQuery$1 = lib_8.getOptionsFromQuery;
|
|
23968
25369
|
var SingleRange = {
|
|
23969
25370
|
name: 'SingleRange',
|
|
@@ -24018,12 +25419,12 @@
|
|
|
24018
25419
|
this.setValue(newVal);
|
|
24019
25420
|
},
|
|
24020
25421
|
value: function value(newVal, oldVal) {
|
|
24021
|
-
if (!isEqual$
|
|
25422
|
+
if (!isEqual$c(newVal, oldVal)) {
|
|
24022
25423
|
this.setValue(newVal);
|
|
24023
25424
|
}
|
|
24024
25425
|
},
|
|
24025
25426
|
selectedValue: function selectedValue(newVal) {
|
|
24026
|
-
if (!isEqual$
|
|
25427
|
+
if (!isEqual$c(this.$data.currentValue, newVal)) {
|
|
24027
25428
|
this.setValue(newVal);
|
|
24028
25429
|
}
|
|
24029
25430
|
},
|
|
@@ -24040,16 +25441,16 @@
|
|
|
24040
25441
|
return h(Container, {
|
|
24041
25442
|
"class": this.$props.className
|
|
24042
25443
|
}, [this.$props.title && h(Title, {
|
|
24043
|
-
"class": getClassName$
|
|
25444
|
+
"class": getClassName$c(this.$props.innerClass, 'title')
|
|
24044
25445
|
}, [this.$props.title]), h(UL, {
|
|
24045
|
-
"class": getClassName$
|
|
25446
|
+
"class": getClassName$c(this.$props.innerClass, 'list')
|
|
24046
25447
|
}, [this.$props.data.map(function (item) {
|
|
24047
25448
|
var selected = !!_this.$data.currentValue && _this.$data.currentValue.label === item.label;
|
|
24048
25449
|
return h("li", {
|
|
24049
25450
|
"key": item.label,
|
|
24050
25451
|
"class": "" + (selected ? 'active' : '')
|
|
24051
25452
|
}, [h(Radio, {
|
|
24052
|
-
"class": getClassName$
|
|
25453
|
+
"class": getClassName$c(_this.$props.innerClass, 'radio'),
|
|
24053
25454
|
"attrs": {
|
|
24054
25455
|
"id": _this.$props.componentId + "-" + item.label,
|
|
24055
25456
|
"name": _this.$props.componentId,
|
|
@@ -24062,7 +25463,7 @@
|
|
|
24062
25463
|
"change": _this.handleChange
|
|
24063
25464
|
}
|
|
24064
25465
|
}), h("label", {
|
|
24065
|
-
"class": getClassName$
|
|
25466
|
+
"class": getClassName$c(_this.$props.innerClass, 'label'),
|
|
24066
25467
|
"attrs": {
|
|
24067
25468
|
"for": _this.$props.componentId + "-" + item.label
|
|
24068
25469
|
}
|
|
@@ -24089,7 +25490,7 @@
|
|
|
24089
25490
|
_this2.$emit('value-change', currentValue);
|
|
24090
25491
|
};
|
|
24091
25492
|
|
|
24092
|
-
checkValueChange$
|
|
25493
|
+
checkValueChange$7(props.componentId, currentValue, props.beforeValueChange, performUpdate);
|
|
24093
25494
|
},
|
|
24094
25495
|
updateQueryHandler: function updateQueryHandler(value, props) {
|
|
24095
25496
|
var customQuery = props.customQuery;
|
|
@@ -24161,7 +25562,7 @@
|
|
|
24161
25562
|
return query;
|
|
24162
25563
|
};
|
|
24163
25564
|
|
|
24164
|
-
var mapStateToProps$
|
|
25565
|
+
var mapStateToProps$c = function mapStateToProps(state, props) {
|
|
24165
25566
|
return {
|
|
24166
25567
|
selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || null,
|
|
24167
25568
|
componentProps: state.props[props.componentId],
|
|
@@ -24170,11 +25571,11 @@
|
|
|
24170
25571
|
};
|
|
24171
25572
|
|
|
24172
25573
|
var mapDispatchtoProps$9 = {
|
|
24173
|
-
updateQuery: updateQuery$
|
|
25574
|
+
updateQuery: updateQuery$9,
|
|
24174
25575
|
setQueryOptions: setQueryOptions$8,
|
|
24175
|
-
setCustomQuery: setCustomQuery$
|
|
25576
|
+
setCustomQuery: setCustomQuery$8
|
|
24176
25577
|
};
|
|
24177
|
-
var RangeConnected = ComponentWrapper$1(connect(mapStateToProps$
|
|
25578
|
+
var RangeConnected = ComponentWrapper$1(connect(mapStateToProps$c, mapDispatchtoProps$9)(SingleRange), {
|
|
24178
25579
|
componentType: constants_1$1.singleRange
|
|
24179
25580
|
});
|
|
24180
25581
|
|
|
@@ -24185,12 +25586,12 @@
|
|
|
24185
25586
|
|
|
24186
25587
|
SingleRange.componentType = constants_1$1.singleRange;
|
|
24187
25588
|
|
|
24188
|
-
var updateQuery$
|
|
25589
|
+
var updateQuery$a = lib_5.updateQuery,
|
|
24189
25590
|
setQueryOptions$9 = lib_5.setQueryOptions,
|
|
24190
|
-
setCustomQuery$
|
|
24191
|
-
var isEqual$
|
|
24192
|
-
checkValueChange$
|
|
24193
|
-
getClassName$
|
|
25591
|
+
setCustomQuery$9 = lib_5.setCustomQuery;
|
|
25592
|
+
var isEqual$d = lib_8.isEqual,
|
|
25593
|
+
checkValueChange$8 = lib_8.checkValueChange,
|
|
25594
|
+
getClassName$d = lib_8.getClassName,
|
|
24194
25595
|
getOptionsFromQuery$2 = lib_8.getOptionsFromQuery;
|
|
24195
25596
|
var MultiRange = {
|
|
24196
25597
|
name: 'MultiRange',
|
|
@@ -24297,7 +25698,7 @@
|
|
|
24297
25698
|
_this.$emit('value-change', Object.keys(selectedValues));
|
|
24298
25699
|
};
|
|
24299
25700
|
|
|
24300
|
-
checkValueChange$
|
|
25701
|
+
checkValueChange$8(props.componentId, currentValue, props.beforeValueChange, performUpdate);
|
|
24301
25702
|
},
|
|
24302
25703
|
updateQueryHandler: function updateQueryHandler(value, props) {
|
|
24303
25704
|
var customQuery = props.customQuery;
|
|
@@ -24331,12 +25732,12 @@
|
|
|
24331
25732
|
this.selectItem(newVal, true, undefined, true);
|
|
24332
25733
|
},
|
|
24333
25734
|
value: function value(newVal, oldVal) {
|
|
24334
|
-
if (!isEqual$
|
|
25735
|
+
if (!isEqual$d(newVal, oldVal)) {
|
|
24335
25736
|
this.selectItem(newVal, true, undefined, true);
|
|
24336
25737
|
}
|
|
24337
25738
|
},
|
|
24338
25739
|
selectedValue: function selectedValue(newVal) {
|
|
24339
|
-
if (!isEqual$
|
|
25740
|
+
if (!isEqual$d(this.$data.currentValue, newVal)) {
|
|
24340
25741
|
this.selectItem(newVal, true, undefined, true);
|
|
24341
25742
|
}
|
|
24342
25743
|
},
|
|
@@ -24370,16 +25771,16 @@
|
|
|
24370
25771
|
return h(Container, {
|
|
24371
25772
|
"class": this.$props.className
|
|
24372
25773
|
}, [this.$props.title && h(Title, {
|
|
24373
|
-
"class": getClassName$
|
|
25774
|
+
"class": getClassName$d(this.$props.innerClass, 'title')
|
|
24374
25775
|
}, [this.$props.title]), h(UL, {
|
|
24375
|
-
"class": getClassName$
|
|
25776
|
+
"class": getClassName$d(this.$props.innerClass, 'list')
|
|
24376
25777
|
}, [this.$props.data.map(function (item) {
|
|
24377
25778
|
var selected = !!_this2.$data.currentValue && _this2.$data.currentValue.label === item.label;
|
|
24378
25779
|
return h("li", {
|
|
24379
25780
|
"key": item.label,
|
|
24380
25781
|
"class": "" + (selected ? 'active' : '')
|
|
24381
25782
|
}, [h(Checkbox, {
|
|
24382
|
-
"class": getClassName$
|
|
25783
|
+
"class": getClassName$d(_this2.$props.innerClass, 'checkbox'),
|
|
24383
25784
|
"attrs": {
|
|
24384
25785
|
"id": _this2.$props.componentId + "-" + item.label,
|
|
24385
25786
|
"name": _this2.$props.componentId,
|
|
@@ -24394,7 +25795,7 @@
|
|
|
24394
25795
|
click: _this2.handleClick
|
|
24395
25796
|
})
|
|
24396
25797
|
}), h("label", {
|
|
24397
|
-
"class": getClassName$
|
|
25798
|
+
"class": getClassName$d(_this2.$props.innerClass, 'label'),
|
|
24398
25799
|
"attrs": {
|
|
24399
25800
|
"for": _this2.$props.componentId + "-" + item.label
|
|
24400
25801
|
}
|
|
@@ -24454,7 +25855,7 @@
|
|
|
24454
25855
|
return query;
|
|
24455
25856
|
};
|
|
24456
25857
|
|
|
24457
|
-
var mapStateToProps$
|
|
25858
|
+
var mapStateToProps$d = function mapStateToProps(state, props) {
|
|
24458
25859
|
return {
|
|
24459
25860
|
selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || null,
|
|
24460
25861
|
componentProps: state.props[props.componentId],
|
|
@@ -24463,11 +25864,11 @@
|
|
|
24463
25864
|
};
|
|
24464
25865
|
|
|
24465
25866
|
var mapDispatchtoProps$a = {
|
|
24466
|
-
updateQuery: updateQuery$
|
|
25867
|
+
updateQuery: updateQuery$a,
|
|
24467
25868
|
setQueryOptions: setQueryOptions$9,
|
|
24468
|
-
setCustomQuery: setCustomQuery$
|
|
25869
|
+
setCustomQuery: setCustomQuery$9
|
|
24469
25870
|
};
|
|
24470
|
-
var RangeConnected$1 = ComponentWrapper$1(connect(mapStateToProps$
|
|
25871
|
+
var RangeConnected$1 = ComponentWrapper$1(connect(mapStateToProps$d, mapDispatchtoProps$a)(MultiRange), {
|
|
24471
25872
|
componentType: constants_1$1.multiRange
|
|
24472
25873
|
});
|
|
24473
25874
|
|
|
@@ -24753,8 +26154,8 @@
|
|
|
24753
26154
|
};
|
|
24754
26155
|
var vueNoSsr_common = index$2;
|
|
24755
26156
|
|
|
24756
|
-
var _templateObject$
|
|
24757
|
-
var Slider = index$1('div')(_templateObject$
|
|
26157
|
+
var _templateObject$n;
|
|
26158
|
+
var Slider = index$1('div')(_templateObject$n || (_templateObject$n = _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"])));
|
|
24758
26159
|
|
|
24759
26160
|
/**
|
|
24760
26161
|
* Caution: Please do not change this file without having a discussion with the Team.
|
|
@@ -24797,13 +26198,13 @@
|
|
|
24797
26198
|
return components;
|
|
24798
26199
|
};
|
|
24799
26200
|
|
|
24800
|
-
var updateQuery$
|
|
26201
|
+
var updateQuery$b = lib_5.updateQuery,
|
|
24801
26202
|
setQueryOptions$a = lib_5.setQueryOptions,
|
|
24802
|
-
setCustomQuery$
|
|
24803
|
-
var checkValueChange$
|
|
24804
|
-
getClassName$
|
|
26203
|
+
setCustomQuery$a = lib_5.setCustomQuery;
|
|
26204
|
+
var checkValueChange$9 = lib_8.checkValueChange,
|
|
26205
|
+
getClassName$e = lib_8.getClassName,
|
|
24805
26206
|
getOptionsFromQuery$3 = lib_8.getOptionsFromQuery,
|
|
24806
|
-
isEqual$
|
|
26207
|
+
isEqual$e = lib_8.isEqual;
|
|
24807
26208
|
var RangeSlider = {
|
|
24808
26209
|
name: 'RangeSlider',
|
|
24809
26210
|
components: getComponents(),
|
|
@@ -24884,7 +26285,7 @@
|
|
|
24884
26285
|
});
|
|
24885
26286
|
};
|
|
24886
26287
|
|
|
24887
|
-
checkValueChange$
|
|
26288
|
+
checkValueChange$9(props.componentId, {
|
|
24888
26289
|
start: currentValue[0],
|
|
24889
26290
|
end: currentValue[1]
|
|
24890
26291
|
}, props.beforeValueChange, performUpdate);
|
|
@@ -24926,12 +26327,12 @@
|
|
|
24926
26327
|
this.handleChange(RangeSlider.parseValue(newVal, this.$props));
|
|
24927
26328
|
},
|
|
24928
26329
|
value: function value(newVal, oldVal) {
|
|
24929
|
-
if (!isEqual$
|
|
26330
|
+
if (!isEqual$e(newVal, oldVal)) {
|
|
24930
26331
|
this.handleChange(RangeSlider.parseValue(newVal, this.$props));
|
|
24931
26332
|
}
|
|
24932
26333
|
},
|
|
24933
26334
|
selectedValue: function selectedValue(newVal) {
|
|
24934
|
-
if (!isEqual$
|
|
26335
|
+
if (!isEqual$e(this.$data.currentValue, newVal)) {
|
|
24935
26336
|
this.handleChange(RangeSlider.parseValue(newVal, this.$props));
|
|
24936
26337
|
this.$emit('change', newVal);
|
|
24937
26338
|
}
|
|
@@ -24977,9 +26378,9 @@
|
|
|
24977
26378
|
return h(Container, {
|
|
24978
26379
|
"class": this.$props.className
|
|
24979
26380
|
}, [this.$props.title && h(Title, {
|
|
24980
|
-
"class": getClassName$
|
|
26381
|
+
"class": getClassName$e(this.$props.innerClass, 'title')
|
|
24981
26382
|
}, [this.$props.title]), this.$props.range ? h(vueNoSsr_common, [h(Slider, {
|
|
24982
|
-
"class": getClassName$
|
|
26383
|
+
"class": getClassName$e(this.$props.innerClass, 'slider')
|
|
24983
26384
|
}, [h("vue-slider-component", {
|
|
24984
26385
|
"ref": "slider",
|
|
24985
26386
|
"attrs": {
|
|
@@ -24998,9 +26399,9 @@
|
|
|
24998
26399
|
}), this.$props.rangeLabels && h("div", {
|
|
24999
26400
|
"class": "label-container"
|
|
25000
26401
|
}, [h("label", {
|
|
25001
|
-
"class": getClassName$
|
|
26402
|
+
"class": getClassName$e(this.$props.innerClass, 'label') || 'range-label-left'
|
|
25002
26403
|
}, [this.$props.rangeLabels.start]), h("label", {
|
|
25003
|
-
"class": getClassName$
|
|
26404
|
+
"class": getClassName$e(this.$props.innerClass, 'label') || 'range-label-right'
|
|
25004
26405
|
}, [this.$props.rangeLabels.end])])])]) : null]);
|
|
25005
26406
|
}
|
|
25006
26407
|
};
|
|
@@ -25046,7 +26447,7 @@
|
|
|
25046
26447
|
return [];
|
|
25047
26448
|
};
|
|
25048
26449
|
|
|
25049
|
-
var mapStateToProps$
|
|
26450
|
+
var mapStateToProps$e = function mapStateToProps(state, props) {
|
|
25050
26451
|
return {
|
|
25051
26452
|
options: state.aggregations[props.componentId] ? state.aggregations[props.componentId][props.dataField] && state.aggregations[props.componentId][props.dataField].buckets // eslint-disable-line
|
|
25052
26453
|
: [],
|
|
@@ -25057,11 +26458,11 @@
|
|
|
25057
26458
|
};
|
|
25058
26459
|
|
|
25059
26460
|
var mapDispatchtoProps$b = {
|
|
25060
|
-
updateQuery: updateQuery$
|
|
26461
|
+
updateQuery: updateQuery$b,
|
|
25061
26462
|
setQueryOptions: setQueryOptions$a,
|
|
25062
|
-
setCustomQuery: setCustomQuery$
|
|
26463
|
+
setCustomQuery: setCustomQuery$a
|
|
25063
26464
|
};
|
|
25064
|
-
var RangeConnected$2 = ComponentWrapper$1(connect(mapStateToProps$
|
|
26465
|
+
var RangeConnected$2 = ComponentWrapper$1(connect(mapStateToProps$e, mapDispatchtoProps$b)(RangeSlider), {
|
|
25065
26466
|
componentType: constants_1$1.rangeSlider
|
|
25066
26467
|
});
|
|
25067
26468
|
|
|
@@ -25075,15 +26476,15 @@
|
|
|
25075
26476
|
var addComponent$1 = lib_5.addComponent,
|
|
25076
26477
|
removeComponent$1 = lib_5.removeComponent,
|
|
25077
26478
|
watchComponent$1 = lib_5.watchComponent,
|
|
25078
|
-
updateQuery$
|
|
26479
|
+
updateQuery$c = lib_5.updateQuery,
|
|
25079
26480
|
setQueryListener$1 = lib_5.setQueryListener,
|
|
25080
26481
|
setQueryOptions$b = lib_5.setQueryOptions,
|
|
25081
26482
|
setComponentProps$1 = lib_5.setComponentProps,
|
|
25082
|
-
setCustomQuery$
|
|
26483
|
+
setCustomQuery$b = lib_5.setCustomQuery,
|
|
25083
26484
|
updateComponentProps$2 = lib_5.updateComponentProps;
|
|
25084
|
-
var checkValueChange$
|
|
25085
|
-
getClassName$
|
|
25086
|
-
isEqual$
|
|
26485
|
+
var checkValueChange$a = lib_8.checkValueChange,
|
|
26486
|
+
getClassName$f = lib_8.getClassName,
|
|
26487
|
+
isEqual$f = lib_8.isEqual,
|
|
25087
26488
|
checkSomePropChange$1 = lib_8.checkSomePropChange,
|
|
25088
26489
|
extractQueryFromCustomQuery$7 = lib_8.extractQueryFromCustomQuery,
|
|
25089
26490
|
getOptionsForCustomQuery$7 = lib_8.getOptionsForCustomQuery;
|
|
@@ -25287,7 +26688,7 @@
|
|
|
25287
26688
|
});
|
|
25288
26689
|
};
|
|
25289
26690
|
|
|
25290
|
-
checkValueChange$
|
|
26691
|
+
checkValueChange$a(this.$props.componentId, {
|
|
25291
26692
|
start: normalizedValue[0],
|
|
25292
26693
|
end: normalizedValue[1]
|
|
25293
26694
|
}, this.$props.beforeValueChange, performUpdate);
|
|
@@ -25354,7 +26755,7 @@
|
|
|
25354
26755
|
this.setReact();
|
|
25355
26756
|
},
|
|
25356
26757
|
selectedValue: function selectedValue(newValue) {
|
|
25357
|
-
if (isEqual$
|
|
26758
|
+
if (isEqual$f(newValue, this.currentValue)) return;
|
|
25358
26759
|
var value = newValue || {
|
|
25359
26760
|
start: this.range.start,
|
|
25360
26761
|
end: this.range.end
|
|
@@ -25363,7 +26764,7 @@
|
|
|
25363
26764
|
this.handleChange(DynamicRangeSlider.parseValue(value, this.$props));
|
|
25364
26765
|
},
|
|
25365
26766
|
range: function range(newValue, oldValue) {
|
|
25366
|
-
if (isEqual$
|
|
26767
|
+
if (isEqual$f(newValue, oldValue) || !this.currentValue) return;
|
|
25367
26768
|
|
|
25368
26769
|
var _ref3 = this.currentValue || [],
|
|
25369
26770
|
currentStart = _ref3[0],
|
|
@@ -25383,7 +26784,7 @@
|
|
|
25383
26784
|
}
|
|
25384
26785
|
},
|
|
25385
26786
|
value: function value(newVal, oldVal) {
|
|
25386
|
-
if (!isEqual$
|
|
26787
|
+
if (!isEqual$f(newVal, oldVal)) {
|
|
25387
26788
|
this.handleChange(DynamicRangeSlider.parseValue(newVal, this.$props));
|
|
25388
26789
|
}
|
|
25389
26790
|
}
|
|
@@ -25401,9 +26802,9 @@
|
|
|
25401
26802
|
return h(Container, {
|
|
25402
26803
|
"class": this.$props.className
|
|
25403
26804
|
}, [this.$props.title && h(Title, {
|
|
25404
|
-
"class": getClassName$
|
|
26805
|
+
"class": getClassName$f(this.$props.innerClass, 'title')
|
|
25405
26806
|
}, [this.$props.title]), h(vueNoSsr_common, [h(Slider, {
|
|
25406
|
-
"class": getClassName$
|
|
26807
|
+
"class": getClassName$f(this.$props.innerClass, 'slider')
|
|
25407
26808
|
}, [h("vue-slider-component", {
|
|
25408
26809
|
"ref": "slider",
|
|
25409
26810
|
"attrs": {
|
|
@@ -25422,9 +26823,9 @@
|
|
|
25422
26823
|
}), this.labels ? h("div", {
|
|
25423
26824
|
"class": "label-container"
|
|
25424
26825
|
}, [h("label", {
|
|
25425
|
-
"class": getClassName$
|
|
26826
|
+
"class": getClassName$f(this.$props.innerClass, 'label') || 'range-label-left'
|
|
25426
26827
|
}, [this.labels.start]), h("label", {
|
|
25427
|
-
"class": getClassName$
|
|
26828
|
+
"class": getClassName$f(this.$props.innerClass, 'label') || 'range-label-right'
|
|
25428
26829
|
}, [this.labels.end])]) : null])])]);
|
|
25429
26830
|
}
|
|
25430
26831
|
};
|
|
@@ -25470,7 +26871,7 @@
|
|
|
25470
26871
|
return true;
|
|
25471
26872
|
};
|
|
25472
26873
|
|
|
25473
|
-
var mapStateToProps$
|
|
26874
|
+
var mapStateToProps$f = function mapStateToProps(state, props) {
|
|
25474
26875
|
var componentId = state.aggregations[props.componentId];
|
|
25475
26876
|
var internalRange = state.aggregations[props.componentId + "__range__internal"];
|
|
25476
26877
|
var options = componentId && componentId[props.dataField];
|
|
@@ -25502,15 +26903,15 @@
|
|
|
25502
26903
|
var mapDispatchtoProps$c = {
|
|
25503
26904
|
addComponent: addComponent$1,
|
|
25504
26905
|
removeComponent: removeComponent$1,
|
|
25505
|
-
updateQuery: updateQuery$
|
|
26906
|
+
updateQuery: updateQuery$c,
|
|
25506
26907
|
watchComponent: watchComponent$1,
|
|
25507
26908
|
setQueryListener: setQueryListener$1,
|
|
25508
26909
|
setQueryOptions: setQueryOptions$b,
|
|
25509
26910
|
setComponentProps: setComponentProps$1,
|
|
25510
|
-
setCustomQuery: setCustomQuery$
|
|
26911
|
+
setCustomQuery: setCustomQuery$b,
|
|
25511
26912
|
updateComponentProps: updateComponentProps$2
|
|
25512
26913
|
};
|
|
25513
|
-
var RangeConnected$3 = connect(mapStateToProps$
|
|
26914
|
+
var RangeConnected$3 = connect(mapStateToProps$f, mapDispatchtoProps$c)(DynamicRangeSlider);
|
|
25514
26915
|
|
|
25515
26916
|
DynamicRangeSlider.install = function (Vue) {
|
|
25516
26917
|
Vue.component(DynamicRangeSlider.name, RangeConnected$3);
|
|
@@ -25672,7 +27073,7 @@
|
|
|
25672
27073
|
}
|
|
25673
27074
|
};
|
|
25674
27075
|
|
|
25675
|
-
var mapStateToProps$
|
|
27076
|
+
var mapStateToProps$g = function mapStateToProps(state, props) {
|
|
25676
27077
|
return {
|
|
25677
27078
|
selectedValues: filterByComponentIds(state.selectedValues, props),
|
|
25678
27079
|
queryLog: filterByComponentIds(state.queryLog, props),
|
|
@@ -25689,7 +27090,7 @@
|
|
|
25689
27090
|
};
|
|
25690
27091
|
};
|
|
25691
27092
|
|
|
25692
|
-
var StateProviderConnected = connect(mapStateToProps$
|
|
27093
|
+
var StateProviderConnected = connect(mapStateToProps$g, {})(StateProvider);
|
|
25693
27094
|
|
|
25694
27095
|
StateProvider.install = function (Vue) {
|
|
25695
27096
|
Vue.component(StateProvider.name, StateProviderConnected);
|
|
@@ -28803,19 +30204,19 @@
|
|
|
28803
30204
|
|
|
28804
30205
|
var setStreaming = lib_5.setStreaming,
|
|
28805
30206
|
setQueryOptions$c = lib_5.setQueryOptions,
|
|
28806
|
-
updateQuery$
|
|
30207
|
+
updateQuery$d = lib_5.updateQuery,
|
|
28807
30208
|
loadMore$1 = lib_5.loadMore,
|
|
28808
30209
|
setValue$3 = lib_5.setValue,
|
|
28809
30210
|
updateComponentProps$3 = lib_5.updateComponentProps,
|
|
28810
|
-
setDefaultQuery$
|
|
30211
|
+
setDefaultQuery$8 = lib_5.setDefaultQuery,
|
|
28811
30212
|
recordResultClick$1 = lib_5.recordResultClick,
|
|
28812
30213
|
setMapData = lib_5.setMapData;
|
|
28813
|
-
var isEqual$
|
|
30214
|
+
var isEqual$g = lib_8.isEqual,
|
|
28814
30215
|
getQueryOptions$5 = lib_8.getQueryOptions,
|
|
28815
|
-
getClassName$
|
|
30216
|
+
getClassName$g = lib_8.getClassName,
|
|
28816
30217
|
parseHits$2 = lib_8.parseHits,
|
|
28817
30218
|
getOptionsFromQuery$4 = lib_8.getOptionsFromQuery,
|
|
28818
|
-
getResultStats$
|
|
30219
|
+
getResultStats$4 = lib_8.getResultStats; // default map center
|
|
28819
30220
|
|
|
28820
30221
|
var MAP_CENTER = {
|
|
28821
30222
|
lat: 37.7749,
|
|
@@ -28953,7 +30354,7 @@
|
|
|
28953
30354
|
var _this$getAllData = this.getAllData(),
|
|
28954
30355
|
resultsToRender = _this$getAllData.resultsToRender;
|
|
28955
30356
|
|
|
28956
|
-
return _extends({}, getResultStats$
|
|
30357
|
+
return _extends({}, getResultStats$4(this), {
|
|
28957
30358
|
currentPage: this.currentPageState,
|
|
28958
30359
|
displayedResults: resultsToRender.length
|
|
28959
30360
|
});
|
|
@@ -29006,17 +30407,17 @@
|
|
|
29006
30407
|
}
|
|
29007
30408
|
},
|
|
29008
30409
|
promotedResults: function promotedResults(newVal, oldVal) {
|
|
29009
|
-
if (!isEqual$
|
|
30410
|
+
if (!isEqual$g(newVal, oldVal)) {
|
|
29010
30411
|
this.$emit('data', this.getData());
|
|
29011
30412
|
}
|
|
29012
30413
|
},
|
|
29013
30414
|
hidden: function hidden(newVal, oldVal) {
|
|
29014
|
-
if (!isEqual$
|
|
30415
|
+
if (!isEqual$g(newVal, oldVal)) {
|
|
29015
30416
|
this.$emit('data', this.getData());
|
|
29016
30417
|
}
|
|
29017
30418
|
},
|
|
29018
30419
|
time: function time(newVal, oldVal) {
|
|
29019
|
-
if (!isEqual$
|
|
30420
|
+
if (!isEqual$g(newVal, oldVal)) {
|
|
29020
30421
|
this.$emit('data', this.getData());
|
|
29021
30422
|
}
|
|
29022
30423
|
},
|
|
@@ -29033,7 +30434,7 @@
|
|
|
29033
30434
|
rawData: function rawData(newVal, oldVal) {
|
|
29034
30435
|
var _this = this;
|
|
29035
30436
|
|
|
29036
|
-
if (!isEqual$
|
|
30437
|
+
if (!isEqual$g(newVal, oldVal)) {
|
|
29037
30438
|
var promotedResults = this.promotedResults,
|
|
29038
30439
|
hits = this.hits;
|
|
29039
30440
|
var results = parseHits$2(hits) || [];
|
|
@@ -29074,7 +30475,7 @@
|
|
|
29074
30475
|
}
|
|
29075
30476
|
},
|
|
29076
30477
|
center: function center(newVal, oldVal) {
|
|
29077
|
-
if (!isEqual$
|
|
30478
|
+
if (!isEqual$g(newVal, oldVal)) {
|
|
29078
30479
|
var persistMapQuery = !!this.center; // we need to forceExecute the query because the center has changed
|
|
29079
30480
|
|
|
29080
30481
|
var forceExecute = true;
|
|
@@ -29508,7 +30909,7 @@
|
|
|
29508
30909
|
zIndex: 10000
|
|
29509
30910
|
},
|
|
29510
30911
|
"attrs": {
|
|
29511
|
-
"className": getClassName$
|
|
30912
|
+
"className": getClassName$g(this.innerClass, 'checkboxContainer') || null
|
|
29512
30913
|
}
|
|
29513
30914
|
}, [h(Checkbox, {
|
|
29514
30915
|
"attrs": {
|
|
@@ -29517,13 +30918,13 @@
|
|
|
29517
30918
|
"checked": this.searchAsMove,
|
|
29518
30919
|
"show": true
|
|
29519
30920
|
},
|
|
29520
|
-
"class": getClassName$
|
|
30921
|
+
"class": getClassName$g(this.$props.innerClass, 'checkbox'),
|
|
29521
30922
|
"on": {
|
|
29522
30923
|
"click": this.toggleSearchAsMove
|
|
29523
30924
|
}
|
|
29524
30925
|
}), h("label", {
|
|
29525
30926
|
"attrs": {
|
|
29526
|
-
"className": getClassName$
|
|
30927
|
+
"className": getClassName$g(this.innerClass, 'label') || null,
|
|
29527
30928
|
"for": this.$props.componentId + "-searchasmove"
|
|
29528
30929
|
}
|
|
29529
30930
|
}, [this.searchAsMoveLabel])]);
|
|
@@ -29637,7 +31038,7 @@
|
|
|
29637
31038
|
}
|
|
29638
31039
|
};
|
|
29639
31040
|
|
|
29640
|
-
var mapStateToProps$
|
|
31041
|
+
var mapStateToProps$h = function mapStateToProps(state, props) {
|
|
29641
31042
|
return {
|
|
29642
31043
|
defaultPage: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value - 1 || -1,
|
|
29643
31044
|
error: state.error[props.componentId],
|
|
@@ -29652,18 +31053,18 @@
|
|
|
29652
31053
|
};
|
|
29653
31054
|
};
|
|
29654
31055
|
|
|
29655
|
-
var mapDispatchToProps$
|
|
31056
|
+
var mapDispatchToProps$4 = {
|
|
29656
31057
|
loadMoreAction: loadMore$1,
|
|
29657
31058
|
setPageURL: setValue$3,
|
|
29658
31059
|
setQueryOptions: setQueryOptions$c,
|
|
29659
31060
|
setStreaming: setStreaming,
|
|
29660
|
-
updateQuery: updateQuery$
|
|
31061
|
+
updateQuery: updateQuery$d,
|
|
29661
31062
|
updateComponentProps: updateComponentProps$3,
|
|
29662
|
-
setDefaultQuery: setDefaultQuery$
|
|
31063
|
+
setDefaultQuery: setDefaultQuery$8,
|
|
29663
31064
|
recordResultClick: recordResultClick$1,
|
|
29664
31065
|
setMapData: setMapData
|
|
29665
31066
|
};
|
|
29666
|
-
var RMConnected = ComponentWrapper$1(connect(mapStateToProps$
|
|
31067
|
+
var RMConnected = ComponentWrapper$1(connect(mapStateToProps$h, mapDispatchToProps$4)(ReactiveMap), {
|
|
29667
31068
|
componentType: constants_1$1.reactiveMap,
|
|
29668
31069
|
internalComponent: true
|
|
29669
31070
|
});
|
|
@@ -31943,8 +33344,8 @@
|
|
|
31943
33344
|
}
|
|
31944
33345
|
};
|
|
31945
33346
|
|
|
31946
|
-
var _templateObject$
|
|
31947
|
-
var MapPin = index$1('div')(_templateObject$
|
|
33347
|
+
var _templateObject$o, _templateObject2$a, _templateObject3$8;
|
|
33348
|
+
var MapPin = index$1('div')(_templateObject$o || (_templateObject$o = _taggedTemplateLiteralLoose(["\n\theight: 24px;\n\twidth: auto;\n\tbackground-color: #fff;\n\tborder-radius: 2px;\n\tcolor: #222;\n\tbox-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.15);\n\tpadding: 3px 6px;\n\tfont-size: 15px;\n"])));
|
|
31948
33349
|
var MapPinArrow = index$1('div')(_templateObject2$a || (_templateObject2$a = _taggedTemplateLiteralLoose(["\n\tborder-color: rgba(0, 0, 0, 0.2);\n\tborder-style: solid;\n\tborder-width: 0 1px 1px 0;\n\tmargin-left: -6px;\n\tbackground-color: #fff;\n\tmargin-top: -6px;\n\twidth: 12px;\n\theight: 12px;\n\t-webkit-transform: rotate(45deg);\n\t-ms-transform: rotate(45deg);\n\ttransform: rotate(45deg);\n"])));
|
|
31949
33350
|
var mapPinWrapper = css(_templateObject3$8 || (_templateObject3$8 = _taggedTemplateLiteralLoose(["\n\t&:hover,\n\t&:focus {\n\t\tz-index: 200;\n\t}\n"])));
|
|
31950
33351
|
|
|
@@ -32178,12 +33579,12 @@
|
|
|
32178
33579
|
}, [renderPopover ? this.renderPopoverClick(marker) : null]);
|
|
32179
33580
|
}
|
|
32180
33581
|
};
|
|
32181
|
-
var mapDispatchToProps$
|
|
33582
|
+
var mapDispatchToProps$5 = {
|
|
32182
33583
|
recordResultClick: recordResultClick$2
|
|
32183
33584
|
};
|
|
32184
33585
|
var GoogleMapMarker$1 = connect(function () {
|
|
32185
33586
|
return null;
|
|
32186
|
-
}, mapDispatchToProps$
|
|
33587
|
+
}, mapDispatchToProps$5)(GoogleMapMarker);
|
|
32187
33588
|
|
|
32188
33589
|
var GoogleMapMarkers = {
|
|
32189
33590
|
name: 'GoogleMapMarkers',
|
|
@@ -32535,8 +33936,8 @@
|
|
|
32535
33936
|
if (component.defaultQuery) {
|
|
32536
33937
|
var defaultQuery = component.defaultQuery(currentValue, component);
|
|
32537
33938
|
return _extends({
|
|
32538
|
-
query:
|
|
32539
|
-
},
|
|
33939
|
+
query: helper_14(defaultQuery)
|
|
33940
|
+
}, helper_15(defaultQuery));
|
|
32540
33941
|
}
|
|
32541
33942
|
|
|
32542
33943
|
return component.source.defaultQuery ? {
|
|
@@ -32552,8 +33953,8 @@
|
|
|
32552
33953
|
if (component.customQuery) {
|
|
32553
33954
|
var customQuery = component.customQuery(currentValue, component);
|
|
32554
33955
|
return _extends({
|
|
32555
|
-
query:
|
|
32556
|
-
},
|
|
33956
|
+
query: helper_14(customQuery)
|
|
33957
|
+
}, helper_15(customQuery));
|
|
32557
33958
|
}
|
|
32558
33959
|
|
|
32559
33960
|
return component.source.defaultQuery ? {
|
|
@@ -32717,7 +34118,7 @@
|
|
|
32717
34118
|
var react = component.react;
|
|
32718
34119
|
|
|
32719
34120
|
if (isInternalComponentPresent || isResultComponent) {
|
|
32720
|
-
react =
|
|
34121
|
+
react = helper_30(react, internalComponent);
|
|
32721
34122
|
}
|
|
32722
34123
|
|
|
32723
34124
|
dependencyTree = dependencyTreeReducer(dependencyTree, {
|
|
@@ -32780,7 +34181,7 @@
|
|
|
32780
34181
|
|
|
32781
34182
|
componentCollection.forEach(function (component) {
|
|
32782
34183
|
// eslint-disable-next-line
|
|
32783
|
-
var _buildQuery =
|
|
34184
|
+
var _buildQuery = helper_29(component.componentId, dependencyTree, queryList, queryOptions),
|
|
32784
34185
|
queryObj = _buildQuery.queryObj,
|
|
32785
34186
|
options = _buildQuery.options;
|
|
32786
34187
|
|
|
@@ -32972,13 +34373,6 @@
|
|
|
32972
34373
|
rsAPISettings.customEvents = utils_2(config.analyticsConfig.customEvents) ? config.analyticsConfig.customEvents : undefined;
|
|
32973
34374
|
}
|
|
32974
34375
|
|
|
32975
|
-
console.log('APPBASE REF', JSON.stringify({
|
|
32976
|
-
index: appbaseRef.app,
|
|
32977
|
-
url: appbaseRef.url,
|
|
32978
|
-
credentials: appbaseRef.credentials
|
|
32979
|
-
}));
|
|
32980
|
-
console.log('FINAL QUERY', JSON.stringify(finalQuery));
|
|
32981
|
-
console.log('RS API SETTINGS', JSON.stringify(rsAPISettings));
|
|
32982
34376
|
appbaseRef.reactiveSearchv3(finalQuery, rsAPISettings).then(function (res) {
|
|
32983
34377
|
handleRSResponse(res);
|
|
32984
34378
|
})["catch"](function (err) {
|
|
@@ -32997,21 +34391,21 @@
|
|
|
32997
34391
|
});
|
|
32998
34392
|
}
|
|
32999
34393
|
|
|
33000
|
-
var version = "1.16.0-alpha.
|
|
34394
|
+
var version = "1.16.0-alpha.50";
|
|
33001
34395
|
|
|
33002
|
-
var _templateObject$
|
|
34396
|
+
var _templateObject$p, _templateObject2$b;
|
|
33003
34397
|
|
|
33004
34398
|
var alert = function alert(_ref) {
|
|
33005
34399
|
var theme = _ref.theme;
|
|
33006
|
-
return css(_templateObject$
|
|
34400
|
+
return css(_templateObject$p || (_templateObject$p = _taggedTemplateLiteralLoose(["\n\tcolor: ", ";\n"])), theme.colors.alertColor);
|
|
33007
34401
|
};
|
|
33008
34402
|
|
|
33009
34403
|
var Content = index$1('div')(_templateObject2$b || (_templateObject2$b = _taggedTemplateLiteralLoose(["\n\t", ";\n\tfont-size: 13px;\n\tmargin: 8px;\n"])), function (props) {
|
|
33010
34404
|
return props.alert && alert;
|
|
33011
34405
|
});
|
|
33012
34406
|
|
|
33013
|
-
var getClassName$
|
|
33014
|
-
isEqual$
|
|
34407
|
+
var getClassName$h = lib_8.getClassName,
|
|
34408
|
+
isEqual$h = lib_8.isEqual;
|
|
33015
34409
|
var RangeInput = {
|
|
33016
34410
|
name: 'RangeInput',
|
|
33017
34411
|
components: {
|
|
@@ -33093,7 +34487,7 @@
|
|
|
33093
34487
|
handleChange: function handleChange(value, event) {
|
|
33094
34488
|
var currentValue = value;
|
|
33095
34489
|
|
|
33096
|
-
if (this.shouldUpdate(value) && !isEqual$
|
|
34490
|
+
if (this.shouldUpdate(value) && !isEqual$h(value, this.currentValue)) {
|
|
33097
34491
|
switch (event) {
|
|
33098
34492
|
case 'change':
|
|
33099
34493
|
if (!value) {
|
|
@@ -33163,7 +34557,7 @@
|
|
|
33163
34557
|
}
|
|
33164
34558
|
},
|
|
33165
34559
|
value: function value(newVal, oldVal) {
|
|
33166
|
-
if (!isEqual$
|
|
34560
|
+
if (!isEqual$h(newVal, oldVal)) {
|
|
33167
34561
|
if (this.isControlled()) {
|
|
33168
34562
|
this.handleChange(newVal, 'change');
|
|
33169
34563
|
}
|
|
@@ -33234,7 +34628,7 @@
|
|
|
33234
34628
|
"value-change": this.handleValueChange
|
|
33235
34629
|
}
|
|
33236
34630
|
}), h(Flex, {
|
|
33237
|
-
"class": getClassName$
|
|
34631
|
+
"class": getClassName$h(innerClass, 'input-container') || ''
|
|
33238
34632
|
}, [h(Flex, {
|
|
33239
34633
|
"attrs": {
|
|
33240
34634
|
"direction": "column",
|
|
@@ -33254,7 +34648,7 @@
|
|
|
33254
34648
|
"on": {
|
|
33255
34649
|
"change": this.handleInputChange
|
|
33256
34650
|
},
|
|
33257
|
-
"class": getClassName$
|
|
34651
|
+
"class": getClassName$h(innerClass, 'input') || '',
|
|
33258
34652
|
"domProps": _extends({}, {
|
|
33259
34653
|
value: this.currentValue.start
|
|
33260
34654
|
})
|
|
@@ -33287,7 +34681,7 @@
|
|
|
33287
34681
|
"on": {
|
|
33288
34682
|
"change": this.handleInputChange
|
|
33289
34683
|
},
|
|
33290
|
-
"class": getClassName$
|
|
34684
|
+
"class": getClassName$h(innerClass, 'input') || '',
|
|
33291
34685
|
"domProps": _extends({}, {
|
|
33292
34686
|
value: this.currentValue.end
|
|
33293
34687
|
})
|
|
@@ -33299,13 +34693,13 @@
|
|
|
33299
34693
|
}
|
|
33300
34694
|
};
|
|
33301
34695
|
|
|
33302
|
-
var mapStateToProps$
|
|
34696
|
+
var mapStateToProps$i = function mapStateToProps(state) {
|
|
33303
34697
|
return {
|
|
33304
34698
|
themePreset: state.config.themePreset
|
|
33305
34699
|
};
|
|
33306
34700
|
};
|
|
33307
34701
|
|
|
33308
|
-
var RangeConnected$4 = ComponentWrapper$1(connect(mapStateToProps$
|
|
34702
|
+
var RangeConnected$4 = ComponentWrapper$1(connect(mapStateToProps$i, {})(RangeInput), {
|
|
33309
34703
|
componentType: constants_1$1.rangeInput
|
|
33310
34704
|
});
|
|
33311
34705
|
|
|
@@ -33316,7 +34710,7 @@
|
|
|
33316
34710
|
|
|
33317
34711
|
RangeInput.componentType = constants_1$1.rangeInput;
|
|
33318
34712
|
|
|
33319
|
-
var components = [ReactiveList, ResultCard, ResultList, ReactiveBase, DataSearch, SingleList, MultiList, SingleRange, MultiRange, RangeSlider, DynamicRangeSlider, ReactiveComponent, SelectedFilters, ToggleButton, SingleDropdownList, MultiDropdownList, StateProvider, RangeInput];
|
|
34713
|
+
var components = [ReactiveList, ResultCard, ResultList, ReactiveBase, DataSearch, SearchBox, SingleList, MultiList, SingleRange, MultiRange, RangeSlider, DynamicRangeSlider, ReactiveComponent, SelectedFilters, ToggleButton, SingleDropdownList, MultiDropdownList, StateProvider, RangeInput];
|
|
33320
34714
|
function install (Vue) {
|
|
33321
34715
|
components.map(function (component) {
|
|
33322
34716
|
Vue.use(component);
|
|
@@ -33347,6 +34741,7 @@
|
|
|
33347
34741
|
exports.ReactiveList = ReactiveList;
|
|
33348
34742
|
exports.ResultCard = ResultCard;
|
|
33349
34743
|
exports.ResultList = ResultList;
|
|
34744
|
+
exports.SearchBox = SearchBox;
|
|
33350
34745
|
exports.SelectedFilters = SelectedFilters;
|
|
33351
34746
|
exports.SingleDropdownList = SingleDropdownList;
|
|
33352
34747
|
exports.SingleList = SingleList;
|