@appbaseio/reactivesearch-vue 1.16.0-alpha.49 → 1.16.0-alpha.51
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 +1895 -467
- 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-7fd1b95d.js +2181 -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 +1 -1
- 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/install-adbb807a.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-a5aaa29e.js +2168 -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 +1 -1
- 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/install-39865f80.js +1237 -0
- package/dist/es/install.js +23 -32
- package/dist/es/version.js +1 -1
- package/package.json +2 -2
|
@@ -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
|
});
|
|
@@ -5939,6 +6065,76 @@
|
|
|
5939
6065
|
var value_4 = value.patchValue;
|
|
5940
6066
|
var value_5 = value.clearValues;
|
|
5941
6067
|
|
|
6068
|
+
var hits = createCommonjsModule(function (module, exports) {
|
|
6069
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6070
|
+
value: true
|
|
6071
|
+
});
|
|
6072
|
+
exports.updateAggs = updateAggs;
|
|
6073
|
+
exports.updateCompositeAggs = updateCompositeAggs;
|
|
6074
|
+
exports.updateHits = updateHits;
|
|
6075
|
+
exports.saveQueryToHits = saveQueryToHits;
|
|
6076
|
+
exports.mockDataForTesting = mockDataForTesting;
|
|
6077
|
+
|
|
6078
|
+
function updateAggs(component, aggregations) {
|
|
6079
|
+
var append = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
6080
|
+
return {
|
|
6081
|
+
type: constants.UPDATE_AGGS,
|
|
6082
|
+
component: component,
|
|
6083
|
+
aggregations: aggregations,
|
|
6084
|
+
append: append
|
|
6085
|
+
};
|
|
6086
|
+
}
|
|
6087
|
+
|
|
6088
|
+
function updateCompositeAggs(component, aggregations) {
|
|
6089
|
+
var append = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
6090
|
+
return {
|
|
6091
|
+
type: constants.UPDATE_COMPOSITE_AGGS,
|
|
6092
|
+
component: component,
|
|
6093
|
+
aggregations: aggregations,
|
|
6094
|
+
append: append
|
|
6095
|
+
};
|
|
6096
|
+
}
|
|
6097
|
+
|
|
6098
|
+
function updateHits(component, hits, time, hidden) {
|
|
6099
|
+
var append = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
6100
|
+
return {
|
|
6101
|
+
type: constants.UPDATE_HITS,
|
|
6102
|
+
component: component,
|
|
6103
|
+
hits: hits.hits,
|
|
6104
|
+
total: typeof hits.total === 'object' ? hits.total.value : hits.total,
|
|
6105
|
+
hidden: hidden,
|
|
6106
|
+
time: time,
|
|
6107
|
+
append: append
|
|
6108
|
+
};
|
|
6109
|
+
}
|
|
6110
|
+
|
|
6111
|
+
function saveQueryToHits(component, query) {
|
|
6112
|
+
return {
|
|
6113
|
+
type: constants.SET_QUERY_TO_HITS,
|
|
6114
|
+
component: component,
|
|
6115
|
+
query: query
|
|
6116
|
+
};
|
|
6117
|
+
}
|
|
6118
|
+
|
|
6119
|
+
function mockDataForTesting(component, data) {
|
|
6120
|
+
return function (dispatch) {
|
|
6121
|
+
if (data.hasOwnProperty('aggregations')) {
|
|
6122
|
+
dispatch(updateAggs(component, data.aggregations));
|
|
6123
|
+
}
|
|
6124
|
+
|
|
6125
|
+
if (data.hasOwnProperty('hits')) {
|
|
6126
|
+
dispatch(updateHits(component, data, data.time || undefined));
|
|
6127
|
+
}
|
|
6128
|
+
};
|
|
6129
|
+
}
|
|
6130
|
+
});
|
|
6131
|
+
unwrapExports(hits);
|
|
6132
|
+
var hits_1 = hits.updateAggs;
|
|
6133
|
+
var hits_2 = hits.updateCompositeAggs;
|
|
6134
|
+
var hits_3 = hits.updateHits;
|
|
6135
|
+
var hits_4 = hits.saveQueryToHits;
|
|
6136
|
+
var hits_5 = hits.mockDataForTesting;
|
|
6137
|
+
|
|
5942
6138
|
var misc = createCommonjsModule(function (module, exports) {
|
|
5943
6139
|
Object.defineProperty(exports, "__esModule", {
|
|
5944
6140
|
value: true
|
|
@@ -5963,6 +6159,10 @@
|
|
|
5963
6159
|
exports.setCustomData = setCustomData;
|
|
5964
6160
|
exports.setAppliedSettings = setAppliedSettings;
|
|
5965
6161
|
exports.setQueryListener = setQueryListener;
|
|
6162
|
+
exports.setGoogleMapScriptLoading = setGoogleMapScriptLoading;
|
|
6163
|
+
exports.setGoogleMapScriptLoaded = setGoogleMapScriptLoaded;
|
|
6164
|
+
exports.setGoogleMapScriptError = setGoogleMapScriptError;
|
|
6165
|
+
exports.resetStoreForComponent = resetStoreForComponent;
|
|
5966
6166
|
|
|
5967
6167
|
function setRawData(component, response) {
|
|
5968
6168
|
return {
|
|
@@ -6133,6 +6333,43 @@
|
|
|
6133
6333
|
onError: onError
|
|
6134
6334
|
};
|
|
6135
6335
|
}
|
|
6336
|
+
|
|
6337
|
+
function setGoogleMapScriptLoading(bool) {
|
|
6338
|
+
return {
|
|
6339
|
+
type: constants.SET_GOOGLE_MAP_SCRIPT_LOADING,
|
|
6340
|
+
loading: bool
|
|
6341
|
+
};
|
|
6342
|
+
}
|
|
6343
|
+
|
|
6344
|
+
function setGoogleMapScriptLoaded(bool) {
|
|
6345
|
+
return {
|
|
6346
|
+
type: constants.SET_GOOGLE_MAP_SCRIPT_LOADED,
|
|
6347
|
+
loaded: bool
|
|
6348
|
+
};
|
|
6349
|
+
}
|
|
6350
|
+
|
|
6351
|
+
function setGoogleMapScriptError(error) {
|
|
6352
|
+
return {
|
|
6353
|
+
type: constants.SET_GOOGLE_MAP_SCRIPT_ERROR,
|
|
6354
|
+
error: error
|
|
6355
|
+
};
|
|
6356
|
+
}
|
|
6357
|
+
|
|
6358
|
+
function resetStoreForComponent(componentId) {
|
|
6359
|
+
return function (dispatch) {
|
|
6360
|
+
dispatch(setRawData(componentId, null));
|
|
6361
|
+
dispatch(setCustomData(null, componentId));
|
|
6362
|
+
dispatch(setPromotedResults([], componentId));
|
|
6363
|
+
dispatch(setPopularSuggestions([], componentId));
|
|
6364
|
+
dispatch(setDefaultPopularSuggestions([], componentId));
|
|
6365
|
+
dispatch((0, hits.updateAggs)(componentId, null));
|
|
6366
|
+
dispatch((0, hits.updateCompositeAggs)(componentId, {}));
|
|
6367
|
+
dispatch((0, hits.updateHits)(componentId, {
|
|
6368
|
+
hits: [],
|
|
6369
|
+
total: 0
|
|
6370
|
+
}, 0));
|
|
6371
|
+
};
|
|
6372
|
+
}
|
|
6136
6373
|
});
|
|
6137
6374
|
unwrapExports(misc);
|
|
6138
6375
|
var misc_1 = misc.setRawData;
|
|
@@ -6155,76 +6392,10 @@
|
|
|
6155
6392
|
var misc_18 = misc.setCustomData;
|
|
6156
6393
|
var misc_19 = misc.setAppliedSettings;
|
|
6157
6394
|
var misc_20 = misc.setQueryListener;
|
|
6158
|
-
|
|
6159
|
-
var
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
});
|
|
6163
|
-
exports.updateAggs = updateAggs;
|
|
6164
|
-
exports.updateCompositeAggs = updateCompositeAggs;
|
|
6165
|
-
exports.updateHits = updateHits;
|
|
6166
|
-
exports.saveQueryToHits = saveQueryToHits;
|
|
6167
|
-
exports.mockDataForTesting = mockDataForTesting;
|
|
6168
|
-
|
|
6169
|
-
function updateAggs(component, aggregations) {
|
|
6170
|
-
var append = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
6171
|
-
return {
|
|
6172
|
-
type: constants.UPDATE_AGGS,
|
|
6173
|
-
component: component,
|
|
6174
|
-
aggregations: aggregations,
|
|
6175
|
-
append: append
|
|
6176
|
-
};
|
|
6177
|
-
}
|
|
6178
|
-
|
|
6179
|
-
function updateCompositeAggs(component, aggregations) {
|
|
6180
|
-
var append = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
6181
|
-
return {
|
|
6182
|
-
type: constants.UPDATE_COMPOSITE_AGGS,
|
|
6183
|
-
component: component,
|
|
6184
|
-
aggregations: aggregations,
|
|
6185
|
-
append: append
|
|
6186
|
-
};
|
|
6187
|
-
}
|
|
6188
|
-
|
|
6189
|
-
function updateHits(component, hits, time, hidden) {
|
|
6190
|
-
var append = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
6191
|
-
return {
|
|
6192
|
-
type: constants.UPDATE_HITS,
|
|
6193
|
-
component: component,
|
|
6194
|
-
hits: hits.hits,
|
|
6195
|
-
total: typeof hits.total === 'object' ? hits.total.value : hits.total,
|
|
6196
|
-
hidden: hidden,
|
|
6197
|
-
time: time,
|
|
6198
|
-
append: append
|
|
6199
|
-
};
|
|
6200
|
-
}
|
|
6201
|
-
|
|
6202
|
-
function saveQueryToHits(component, query) {
|
|
6203
|
-
return {
|
|
6204
|
-
type: constants.SET_QUERY_TO_HITS,
|
|
6205
|
-
component: component,
|
|
6206
|
-
query: query
|
|
6207
|
-
};
|
|
6208
|
-
}
|
|
6209
|
-
|
|
6210
|
-
function mockDataForTesting(component, data) {
|
|
6211
|
-
return function (dispatch) {
|
|
6212
|
-
if (data.hasOwnProperty('aggregations')) {
|
|
6213
|
-
dispatch(updateAggs(component, data.aggregations));
|
|
6214
|
-
}
|
|
6215
|
-
|
|
6216
|
-
if (data.hasOwnProperty('hits')) {
|
|
6217
|
-
dispatch(updateHits(component, data, data.time || undefined));
|
|
6218
|
-
}
|
|
6219
|
-
};
|
|
6220
|
-
}
|
|
6221
|
-
});
|
|
6222
|
-
unwrapExports(hits);
|
|
6223
|
-
var hits_1 = hits.updateAggs;
|
|
6224
|
-
var hits_2 = hits.updateCompositeAggs;
|
|
6225
|
-
var hits_3 = hits.updateHits;
|
|
6226
|
-
var hits_4 = hits.saveQueryToHits;
|
|
6227
|
-
var hits_5 = hits.mockDataForTesting;
|
|
6395
|
+
var misc_21 = misc.setGoogleMapScriptLoading;
|
|
6396
|
+
var misc_22 = misc.setGoogleMapScriptLoaded;
|
|
6397
|
+
var misc_23 = misc.setGoogleMapScriptError;
|
|
6398
|
+
var misc_24 = misc.resetStoreForComponent;
|
|
6228
6399
|
|
|
6229
6400
|
var xdate = createCommonjsModule(function (module) {
|
|
6230
6401
|
/**
|
|
@@ -12887,7 +13058,7 @@
|
|
|
12887
13058
|
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
13059
|
};
|
|
12889
13060
|
|
|
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) {
|
|
13061
|
+
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
13062
|
var theme = _ref4.theme;
|
|
12892
13063
|
return theme.colors.backgroundColor || '#eee';
|
|
12893
13064
|
}, function (_ref5) {
|
|
@@ -14302,7 +14473,7 @@
|
|
|
14302
14473
|
filteredResults = [].concat(parsedPromotedResults, filteredResults);
|
|
14303
14474
|
}
|
|
14304
14475
|
|
|
14305
|
-
return
|
|
14476
|
+
return helper_8(filteredResults);
|
|
14306
14477
|
}
|
|
14307
14478
|
},
|
|
14308
14479
|
watch: {
|
|
@@ -16753,14 +16924,14 @@
|
|
|
16753
16924
|
this.updateState(this.$props);
|
|
16754
16925
|
},
|
|
16755
16926
|
analyticsConfig: function analyticsConfig(newVal, oldVal) {
|
|
16756
|
-
if (!
|
|
16927
|
+
if (!helper_25(newVal, oldVal)) {
|
|
16757
16928
|
if (this.store) {
|
|
16758
16929
|
this.store.dispatch(analytics_3$1(newVal));
|
|
16759
16930
|
}
|
|
16760
16931
|
}
|
|
16761
16932
|
},
|
|
16762
16933
|
appbaseConfig: function appbaseConfig(newVal, oldVal) {
|
|
16763
|
-
if (!
|
|
16934
|
+
if (!helper_25(newVal, oldVal)) {
|
|
16764
16935
|
if (this.store) {
|
|
16765
16936
|
this.store.dispatch(analytics_3$1(newVal));
|
|
16766
16937
|
}
|
|
@@ -17537,7 +17708,7 @@
|
|
|
17537
17708
|
});
|
|
17538
17709
|
|
|
17539
17710
|
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:
|
|
17711
|
+
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
17712
|
};
|
|
17542
17713
|
|
|
17543
17714
|
var suggestionsContainer = css(_templateObject15 || (_templateObject15 = _taggedTemplateLiteralLoose(["\n\tposition: relative;\n\t.cancel-icon {\n\t\tcursor: pointer;\n\t}\n"])));
|
|
@@ -18577,19 +18748,22 @@
|
|
|
18577
18748
|
title = _this$suggestion.title,
|
|
18578
18749
|
description = _this$suggestion.description,
|
|
18579
18750
|
image = _this$suggestion.image,
|
|
18580
|
-
isPredictiveSuggestion = _this$suggestion.isPredictiveSuggestion
|
|
18751
|
+
isPredictiveSuggestion = _this$suggestion.isPredictiveSuggestion,
|
|
18752
|
+
_suggestion_type = _this$suggestion._suggestion_type,
|
|
18753
|
+
_category = _this$suggestion._category;
|
|
18581
18754
|
|
|
18582
18755
|
if (label) {
|
|
18583
18756
|
// label has highest precedence
|
|
18584
18757
|
return typeof label === 'string' ? h("div", {
|
|
18585
18758
|
"class": "trim"
|
|
18586
|
-
}, [
|
|
18759
|
+
}, [(_category ? false : isPredictiveSuggestion // eslint-disable-next-line
|
|
18760
|
+
|| !!_suggestion_type) ? h(PredictiveSuggestion, {
|
|
18587
18761
|
"domProps": {
|
|
18588
18762
|
"innerHTML": label
|
|
18589
18763
|
}
|
|
18590
18764
|
}) : h(VueHighlightWords, {
|
|
18591
18765
|
"attrs": {
|
|
18592
|
-
"searchWords": this.currentValue.split(' '),
|
|
18766
|
+
"searchWords": _category ? [_category] : this.currentValue.split(' '),
|
|
18593
18767
|
"textToHighlight": label,
|
|
18594
18768
|
"autoEscape": true,
|
|
18595
18769
|
"highlightStyle": highlightStyle
|
|
@@ -18658,17 +18832,22 @@
|
|
|
18658
18832
|
};
|
|
18659
18833
|
|
|
18660
18834
|
var SearchSvg = {
|
|
18661
|
-
|
|
18662
|
-
|
|
18835
|
+
name: 'SearchSvg',
|
|
18836
|
+
props: ['styles'],
|
|
18837
|
+
render: function render() {
|
|
18838
|
+
var h = arguments[0];
|
|
18663
18839
|
return h("svg", {
|
|
18664
18840
|
"attrs": {
|
|
18665
18841
|
"alt": "Search",
|
|
18666
|
-
"height": "
|
|
18667
|
-
"width": "10",
|
|
18842
|
+
"height": "12",
|
|
18668
18843
|
"xmlns": "http://www.w3.org/2000/svg",
|
|
18669
18844
|
"viewBox": "0 0 15 15"
|
|
18670
18845
|
},
|
|
18671
|
-
"class": "search-icon"
|
|
18846
|
+
"class": "search-icon",
|
|
18847
|
+
"style": _extends({
|
|
18848
|
+
transform: 'scale(1.35)',
|
|
18849
|
+
position: 'relative'
|
|
18850
|
+
}, this.$props.styles ? this.$props.styles : {})
|
|
18672
18851
|
}, [h("title", ["Search"]), h("path", {
|
|
18673
18852
|
"attrs": {
|
|
18674
18853
|
"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 +19519,11 @@
|
|
|
19340
19519
|
}, [this.customIcon]);
|
|
19341
19520
|
}
|
|
19342
19521
|
|
|
19343
|
-
if (this.$props.type === '
|
|
19522
|
+
if (this.$props.type === 'recent-search-icon') {
|
|
19344
19523
|
return h("svg", {
|
|
19345
19524
|
"attrs": {
|
|
19346
19525
|
"xmlns": "http://www.w3.org/2000/svg",
|
|
19347
|
-
"alt": "
|
|
19526
|
+
"alt": "Recent Search",
|
|
19348
19527
|
"height": "20",
|
|
19349
19528
|
"width": "20",
|
|
19350
19529
|
"viewBox": "0 0 24 24"
|
|
@@ -19360,14 +19539,36 @@
|
|
|
19360
19539
|
}
|
|
19361
19540
|
}), h("path", {
|
|
19362
19541
|
"attrs": {
|
|
19363
|
-
"d": "
|
|
19542
|
+
"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
19543
|
}
|
|
19365
19544
|
})]);
|
|
19366
|
-
}
|
|
19545
|
+
}
|
|
19546
|
+
|
|
19547
|
+
if (this.$props.type === 'promoted-search-icon') {
|
|
19367
19548
|
return h("svg", {
|
|
19368
19549
|
"attrs": {
|
|
19369
19550
|
"xmlns": "http://www.w3.org/2000/svg",
|
|
19370
|
-
"
|
|
19551
|
+
"width": "20",
|
|
19552
|
+
"alt": "promoted search",
|
|
19553
|
+
"height": "20",
|
|
19554
|
+
"viewBox": "0 0 24 24"
|
|
19555
|
+
},
|
|
19556
|
+
"class": this.$props.className,
|
|
19557
|
+
"style": {
|
|
19558
|
+
fill: '#707070'
|
|
19559
|
+
}
|
|
19560
|
+
}, [h("path", {
|
|
19561
|
+
"attrs": {
|
|
19562
|
+
"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"
|
|
19563
|
+
}
|
|
19564
|
+
})]);
|
|
19565
|
+
}
|
|
19566
|
+
|
|
19567
|
+
if (this.$props.type === 'popular-search-icon') {
|
|
19568
|
+
return h("svg", {
|
|
19569
|
+
"attrs": {
|
|
19570
|
+
"xmlns": "http://www.w3.org/2000/svg",
|
|
19571
|
+
"alt": "Popular Search",
|
|
19371
19572
|
"height": "20",
|
|
19372
19573
|
"width": "20",
|
|
19373
19574
|
"viewBox": "0 0 24 24"
|
|
@@ -19383,10 +19584,21 @@
|
|
|
19383
19584
|
}
|
|
19384
19585
|
}), h("path", {
|
|
19385
19586
|
"attrs": {
|
|
19386
|
-
"d": "
|
|
19587
|
+
"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
19588
|
}
|
|
19388
19589
|
})]);
|
|
19389
19590
|
}
|
|
19591
|
+
|
|
19592
|
+
return h(SearchSvg, {
|
|
19593
|
+
"attrs": {
|
|
19594
|
+
"styles": {
|
|
19595
|
+
position: 'relative',
|
|
19596
|
+
fill: '#707070',
|
|
19597
|
+
left: '3px',
|
|
19598
|
+
marginRight: '8px'
|
|
19599
|
+
}
|
|
19600
|
+
}
|
|
19601
|
+
});
|
|
19390
19602
|
}
|
|
19391
19603
|
};
|
|
19392
19604
|
|
|
@@ -19397,7 +19609,8 @@
|
|
|
19397
19609
|
setCustomHighlightOptions = lib_5.setCustomHighlightOptions,
|
|
19398
19610
|
recordSuggestionClick = lib_5.recordSuggestionClick,
|
|
19399
19611
|
loadPopularSuggestions = lib_5.loadPopularSuggestions,
|
|
19400
|
-
getRecentSearches = lib_5.getRecentSearches
|
|
19612
|
+
getRecentSearches = lib_5.getRecentSearches,
|
|
19613
|
+
resetStoreForComponent = lib_5.resetStoreForComponent;
|
|
19401
19614
|
var debounce$1 = lib_8.debounce,
|
|
19402
19615
|
checkValueChange = lib_8.checkValueChange,
|
|
19403
19616
|
getClassName$3 = lib_8.getClassName,
|
|
@@ -19458,11 +19671,15 @@
|
|
|
19458
19671
|
console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
|
|
19459
19672
|
}
|
|
19460
19673
|
|
|
19461
|
-
this.loadPopularSuggestions(this.$props.componentId);
|
|
19462
19674
|
this.currentValue = this.selectedValue || '';
|
|
19675
|
+
var shouldFetchInitialSuggestions = this.$props.enableDefaultSuggestions || this.currentValue;
|
|
19463
19676
|
|
|
19464
|
-
if (
|
|
19465
|
-
this.
|
|
19677
|
+
if (shouldFetchInitialSuggestions) {
|
|
19678
|
+
this.loadPopularSuggestions(this.$props.componentId);
|
|
19679
|
+
|
|
19680
|
+
if (enableRecentSearches) {
|
|
19681
|
+
this.getRecentSearches();
|
|
19682
|
+
}
|
|
19466
19683
|
}
|
|
19467
19684
|
|
|
19468
19685
|
this.handleTextChange = debounce$1(this.handleText, this.$props.debounce); // Set custom and default queries in store
|
|
@@ -19499,7 +19716,7 @@
|
|
|
19499
19716
|
defaultSearchSuggestions: function defaultSearchSuggestions() {
|
|
19500
19717
|
var isPopularSuggestionsEnabled = this.enableQuerySuggestions || this.enablePopularSuggestions;
|
|
19501
19718
|
|
|
19502
|
-
if (this.currentValue) {
|
|
19719
|
+
if (this.currentValue || !this.enableDefaultSuggestions) {
|
|
19503
19720
|
return [];
|
|
19504
19721
|
}
|
|
19505
19722
|
|
|
@@ -19596,7 +19813,8 @@
|
|
|
19596
19813
|
addonBefore: VueTypes.any,
|
|
19597
19814
|
addonAfter: VueTypes.any,
|
|
19598
19815
|
expandSuggestionsContainer: VueTypes.bool.def(true),
|
|
19599
|
-
index: VueTypes.string
|
|
19816
|
+
index: VueTypes.string,
|
|
19817
|
+
enableDefaultSuggestions: VueTypes.bool.def(true)
|
|
19600
19818
|
},
|
|
19601
19819
|
beforeMount: function beforeMount() {
|
|
19602
19820
|
if (this.$props.highlight) {
|
|
@@ -19764,7 +19982,7 @@
|
|
|
19764
19982
|
// returns size and aggs property
|
|
19765
19983
|
getBasicQueryOptions: function getBasicQueryOptions() {
|
|
19766
19984
|
var aggregationField = this.$props.aggregationField;
|
|
19767
|
-
var queryOptions =
|
|
19985
|
+
var queryOptions = helper_28(this.$props);
|
|
19768
19986
|
|
|
19769
19987
|
if (aggregationField) {
|
|
19770
19988
|
queryOptions.aggs = getCompositeAggsQuery$1({
|
|
@@ -19804,7 +20022,9 @@
|
|
|
19804
20022
|
|
|
19805
20023
|
var performUpdate = function performUpdate() {
|
|
19806
20024
|
// Refresh recent searches when value becomes empty
|
|
19807
|
-
if (!value &&
|
|
20025
|
+
if (!value && props.enableDefaultSuggestions === false) {
|
|
20026
|
+
_this.resetStoreForComponent(props.componentId);
|
|
20027
|
+
} else if (!value && _this.currentValue && _this.enableRecentSearches) {
|
|
19808
20028
|
_this.getRecentSearches();
|
|
19809
20029
|
}
|
|
19810
20030
|
|
|
@@ -19855,6 +20075,12 @@
|
|
|
19855
20075
|
checkValueChange(props.componentId, value, props.beforeValueChange, performUpdate);
|
|
19856
20076
|
},
|
|
19857
20077
|
updateDefaultQueryHandler: function updateDefaultQueryHandler(value, props) {
|
|
20078
|
+
if (!value && props.enableDefaultSuggestions === false) {
|
|
20079
|
+
// clear Component data from store
|
|
20080
|
+
this.resetStoreForComponent(props.componentId);
|
|
20081
|
+
return;
|
|
20082
|
+
}
|
|
20083
|
+
|
|
19858
20084
|
var defaultQueryOptions;
|
|
19859
20085
|
var query = DataSearch.defaultQuery(value, props);
|
|
19860
20086
|
|
|
@@ -20223,11 +20449,17 @@
|
|
|
20223
20449
|
var _this$$props4 = this.$props,
|
|
20224
20450
|
theme = _this$$props4.theme,
|
|
20225
20451
|
size = _this$$props4.size,
|
|
20226
|
-
expandSuggestionsContainer = _this$$props4.expandSuggestionsContainer
|
|
20452
|
+
expandSuggestionsContainer = _this$$props4.expandSuggestionsContainer,
|
|
20453
|
+
enableDefaultSuggestions = _this$$props4.enableDefaultSuggestions;
|
|
20227
20454
|
var _this$$scopedSlots = this.$scopedSlots,
|
|
20228
20455
|
recentSearchesIcon = _this$$scopedSlots.recentSearchesIcon,
|
|
20229
20456
|
popularSearchesIcon = _this$$scopedSlots.popularSearchesIcon;
|
|
20230
20457
|
var hasSuggestions = this.currentValue ? this.suggestionsList.length || this.topSuggestions.length : this.defaultSearchSuggestions.length;
|
|
20458
|
+
|
|
20459
|
+
if (enableDefaultSuggestions === false && !this.currentValue) {
|
|
20460
|
+
hasSuggestions = false;
|
|
20461
|
+
}
|
|
20462
|
+
|
|
20231
20463
|
return h(Container, {
|
|
20232
20464
|
"class": this.$props.className
|
|
20233
20465
|
}, [this.$props.title && h(Title, {
|
|
@@ -20554,95 +20786,1290 @@
|
|
|
20554
20786
|
return finalQuery;
|
|
20555
20787
|
};
|
|
20556
20788
|
|
|
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) {
|
|
20789
|
+
DataSearch.highlightQuery = function (props) {
|
|
20790
|
+
if (props.customHighlight) {
|
|
20791
|
+
return props.customHighlight(props);
|
|
20792
|
+
}
|
|
20793
|
+
|
|
20794
|
+
if (!props.highlight) {
|
|
20795
|
+
return null;
|
|
20796
|
+
}
|
|
20797
|
+
|
|
20798
|
+
var fields = {};
|
|
20799
|
+
var highlightField = props.highlightField ? props.highlightField : props.dataField;
|
|
20800
|
+
|
|
20801
|
+
if (typeof highlightField === 'string') {
|
|
20802
|
+
fields[highlightField] = {};
|
|
20803
|
+
} else if (Array.isArray(highlightField)) {
|
|
20804
|
+
highlightField.forEach(function (item) {
|
|
20805
|
+
fields[item] = {};
|
|
20806
|
+
});
|
|
20807
|
+
}
|
|
20808
|
+
|
|
20809
|
+
return {
|
|
20810
|
+
highlight: _extends({
|
|
20811
|
+
pre_tags: ['<mark>'],
|
|
20812
|
+
post_tags: ['</mark>'],
|
|
20813
|
+
fields: fields
|
|
20814
|
+
}, props.highlightField && {
|
|
20815
|
+
require_field_match: false
|
|
20816
|
+
})
|
|
20817
|
+
};
|
|
20818
|
+
};
|
|
20819
|
+
|
|
20820
|
+
DataSearch.hasInternalComponent = function () {
|
|
20821
|
+
return true;
|
|
20822
|
+
};
|
|
20823
|
+
|
|
20824
|
+
var mapStateToProps$3 = function mapStateToProps(state, props) {
|
|
20825
|
+
return {
|
|
20826
|
+
selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || null,
|
|
20827
|
+
suggestions: state.hits[props.componentId] && state.hits[props.componentId].hits,
|
|
20828
|
+
rawData: state.rawData[props.componentId],
|
|
20829
|
+
aggregationData: state.compositeAggregations[props.componentId] || [],
|
|
20830
|
+
isLoading: !!state.isLoading[props.componentId + "_active"],
|
|
20831
|
+
themePreset: state.config.themePreset,
|
|
20832
|
+
error: state.error[props.componentId],
|
|
20833
|
+
analytics: state.analytics,
|
|
20834
|
+
enableAppbase: state.config.enableAppbase,
|
|
20835
|
+
headers: state.appbaseRef.headers,
|
|
20836
|
+
promotedResults: state.promotedResults[props.componentId] || [],
|
|
20837
|
+
customData: state.customData[props.componentId],
|
|
20838
|
+
time: state.hits[props.componentId] && state.hits[props.componentId].time || 0,
|
|
20839
|
+
total: state.hits[props.componentId] && state.hits[props.componentId].total,
|
|
20840
|
+
hidden: state.hits[props.componentId] && state.hits[props.componentId].hidden,
|
|
20841
|
+
popularSuggestions: state.querySuggestions[props.componentId],
|
|
20842
|
+
defaultPopularSuggestions: state.defaultPopularSuggestions[props.componentId],
|
|
20843
|
+
componentProps: state.props[props.componentId],
|
|
20844
|
+
lastUsedQuery: state.queryToHits[props.componentId],
|
|
20845
|
+
recentSearches: state.recentSearches.data
|
|
20846
|
+
};
|
|
20847
|
+
};
|
|
20848
|
+
|
|
20849
|
+
var mapDispatchToProps$2 = {
|
|
20850
|
+
setQueryOptions: setQueryOptions$1,
|
|
20851
|
+
updateQuery: updateQuery$1,
|
|
20852
|
+
setCustomQuery: setCustomQuery,
|
|
20853
|
+
setDefaultQuery: setDefaultQuery$1,
|
|
20854
|
+
setCustomHighlightOptions: setCustomHighlightOptions,
|
|
20855
|
+
recordSuggestionClick: recordSuggestionClick,
|
|
20856
|
+
loadPopularSuggestions: loadPopularSuggestions,
|
|
20857
|
+
getRecentSearches: getRecentSearches,
|
|
20858
|
+
resetStoreForComponent: resetStoreForComponent
|
|
20859
|
+
};
|
|
20860
|
+
var DSConnected = ComponentWrapper$1(connect(mapStateToProps$3, mapDispatchToProps$2)(DataSearch), {
|
|
20861
|
+
componentType: constants_1$1.dataSearch,
|
|
20862
|
+
internalComponent: DataSearch.hasInternalComponent()
|
|
20863
|
+
});
|
|
20864
|
+
|
|
20865
|
+
DataSearch.install = function (Vue) {
|
|
20866
|
+
Vue.component(DataSearch.name, DSConnected);
|
|
20867
|
+
}; // Add componentType for SSR
|
|
20868
|
+
|
|
20869
|
+
|
|
20870
|
+
DataSearch.componentType = constants_1$1.dataSearch;
|
|
20871
|
+
|
|
20872
|
+
var _templateObject$j;
|
|
20873
|
+
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"])));
|
|
20874
|
+
var AutoFillSvg = {
|
|
20875
|
+
name: 'AutoFillSvg',
|
|
20876
|
+
render: function render() {
|
|
20877
|
+
var h = arguments[0];
|
|
20878
|
+
return h(AutofillSvgIcon, {
|
|
20879
|
+
"on": {
|
|
20880
|
+
"click": this.$listeners.click
|
|
20881
|
+
}
|
|
20882
|
+
}, [h("svg", {
|
|
20883
|
+
"attrs": {
|
|
20884
|
+
"viewBox": "0 0 24 24"
|
|
20885
|
+
}
|
|
20886
|
+
}, [h("path", {
|
|
20887
|
+
"attrs": {
|
|
20888
|
+
"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"
|
|
20889
|
+
}
|
|
20890
|
+
})])]);
|
|
20891
|
+
},
|
|
20892
|
+
methods: {
|
|
20893
|
+
clicked: function clicked(e) {
|
|
20894
|
+
e.stopPropagation();
|
|
20895
|
+
window.console.log('hey', e);
|
|
20896
|
+
}
|
|
20897
|
+
}
|
|
20898
|
+
};
|
|
20899
|
+
|
|
20900
|
+
var updateQuery$2 = lib_5.updateQuery,
|
|
20901
|
+
setCustomQuery$1 = lib_5.setCustomQuery,
|
|
20902
|
+
setDefaultQuery$2 = lib_5.setDefaultQuery,
|
|
20903
|
+
recordSuggestionClick$1 = lib_5.recordSuggestionClick;
|
|
20904
|
+
var _debounce = lib_8.debounce,
|
|
20905
|
+
checkValueChange$1 = lib_8.checkValueChange,
|
|
20906
|
+
getClassName$4 = lib_8.getClassName,
|
|
20907
|
+
isEqual$5 = lib_8.isEqual,
|
|
20908
|
+
getCompositeAggsQuery$2 = lib_8.getCompositeAggsQuery,
|
|
20909
|
+
withClickIds$1 = lib_8.withClickIds,
|
|
20910
|
+
getResultStats$2 = lib_8.getResultStats,
|
|
20911
|
+
normalizeDataField$1 = lib_8.normalizeDataField;
|
|
20912
|
+
var SearchBox = {
|
|
20913
|
+
name: 'SearchBox',
|
|
20914
|
+
data: function data() {
|
|
20915
|
+
var props = this.$props;
|
|
20916
|
+
this.__state = {
|
|
20917
|
+
currentValue: '',
|
|
20918
|
+
isOpen: false,
|
|
20919
|
+
normalizedSuggestions: []
|
|
20920
|
+
};
|
|
20921
|
+
this.internalComponent = props.componentId + "__internal";
|
|
20922
|
+
return this.__state;
|
|
20923
|
+
},
|
|
20924
|
+
inject: {
|
|
20925
|
+
theme: {
|
|
20926
|
+
from: 'theme_reactivesearch'
|
|
20927
|
+
}
|
|
20928
|
+
},
|
|
20929
|
+
created: function created() {
|
|
20930
|
+
var _this$$props = this.$props,
|
|
20931
|
+
distinctField = _this$$props.distinctField,
|
|
20932
|
+
distinctFieldConfig = _this$$props.distinctFieldConfig,
|
|
20933
|
+
index = _this$$props.index;
|
|
20934
|
+
|
|
20935
|
+
if (this.enableAppbase && this.aggregationField && this.aggregationField !== '') {
|
|
20936
|
+
console.warn('Warning(ReactiveSearch): The `aggregationField` prop has been marked as deprecated, please use the `distinctField` prop instead.');
|
|
20937
|
+
}
|
|
20938
|
+
|
|
20939
|
+
if (!this.enableAppbase && (distinctField || distinctFieldConfig)) {
|
|
20940
|
+
console.warn('Warning(ReactiveSearch): In order to use the `distinctField` and `distinctFieldConfig` props, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
|
|
20941
|
+
}
|
|
20942
|
+
|
|
20943
|
+
if (!this.enableAppbase && index) {
|
|
20944
|
+
console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
|
|
20945
|
+
}
|
|
20946
|
+
|
|
20947
|
+
this.currentValue = this.selectedValue || this.value || this.defaultValue || '';
|
|
20948
|
+
this.handleTextChange = _debounce(this.handleText, this.$props.debounce);
|
|
20949
|
+
this.setValue(this.currentValue, true, this.$props, undefined, false, this.selectedCategory); // Set custom and default queries in store
|
|
20950
|
+
|
|
20951
|
+
this.triggerCustomQuery(this.currentValue, this.selectedCategory);
|
|
20952
|
+
this.triggerDefaultQuery(this.currentValue);
|
|
20953
|
+
},
|
|
20954
|
+
computed: {
|
|
20955
|
+
hasCustomRenderer: function hasCustomRenderer$1() {
|
|
20956
|
+
return hasCustomRenderer(this);
|
|
20957
|
+
},
|
|
20958
|
+
stats: function stats() {
|
|
20959
|
+
return getResultStats$2(this);
|
|
20960
|
+
}
|
|
20961
|
+
},
|
|
20962
|
+
props: {
|
|
20963
|
+
autoFocus: VueTypes.bool,
|
|
20964
|
+
autosuggest: VueTypes.bool.def(true),
|
|
20965
|
+
beforeValueChange: types.func,
|
|
20966
|
+
className: VueTypes.string.def(''),
|
|
20967
|
+
clearIcon: types.children,
|
|
20968
|
+
componentId: types.stringRequired,
|
|
20969
|
+
customHighlight: types.func,
|
|
20970
|
+
customQuery: types.func,
|
|
20971
|
+
defaultQuery: types.func,
|
|
20972
|
+
dataField: VueTypes.oneOfType([VueTypes.string, VueTypes.shape({
|
|
20973
|
+
field: VueTypes.string,
|
|
20974
|
+
weight: VueTypes.number
|
|
20975
|
+
}), VueTypes.arrayOf(VueTypes.string), VueTypes.arrayOf({
|
|
20976
|
+
field: VueTypes.string,
|
|
20977
|
+
weight: VueTypes.number
|
|
20978
|
+
})]),
|
|
20979
|
+
aggregationField: types.string,
|
|
20980
|
+
aggregationSize: VueTypes.number,
|
|
20981
|
+
size: VueTypes.number,
|
|
20982
|
+
debounce: VueTypes.number.def(0),
|
|
20983
|
+
defaultValue: types.string,
|
|
20984
|
+
excludeFields: types.excludeFields,
|
|
20985
|
+
value: types.value,
|
|
20986
|
+
defaultSuggestions: types.suggestions,
|
|
20987
|
+
enableSynonyms: VueTypes.bool.def(true),
|
|
20988
|
+
enableQuerySuggestions: VueTypes.bool.def(false),
|
|
20989
|
+
enablePopularSuggestions: VueTypes.bool.def(false),
|
|
20990
|
+
enableRecentSuggestions: VueTypes.bool.def(false),
|
|
20991
|
+
fieldWeights: types.fieldWeights,
|
|
20992
|
+
filterLabel: types.string,
|
|
20993
|
+
fuzziness: types.fuzziness,
|
|
20994
|
+
highlight: VueTypes.bool,
|
|
20995
|
+
highlightField: types.stringOrArray,
|
|
20996
|
+
icon: types.children,
|
|
20997
|
+
iconPosition: VueTypes.oneOf(['left', 'right']).def('left'),
|
|
20998
|
+
includeFields: types.includeFields,
|
|
20999
|
+
innerClass: types.style,
|
|
21000
|
+
innerRef: VueTypes.string.def('searchInputField'),
|
|
21001
|
+
render: types.func,
|
|
21002
|
+
renderNoSuggestion: types.title,
|
|
21003
|
+
renderError: types.title,
|
|
21004
|
+
placeholder: VueTypes.string.def('Search'),
|
|
21005
|
+
queryFormat: VueTypes.oneOf(['and', 'or']).def('or'),
|
|
21006
|
+
react: types.react,
|
|
21007
|
+
showClear: VueTypes.bool.def(true),
|
|
21008
|
+
showDistinctSuggestions: VueTypes.bool.def(true),
|
|
21009
|
+
showFilter: VueTypes.bool.def(true),
|
|
21010
|
+
showIcon: VueTypes.bool.def(true),
|
|
21011
|
+
title: types.title,
|
|
21012
|
+
theme: types.style,
|
|
21013
|
+
URLParams: VueTypes.bool.def(false),
|
|
21014
|
+
strictSelection: VueTypes.bool.def(false),
|
|
21015
|
+
nestedField: types.string,
|
|
21016
|
+
enablePredictiveSuggestions: VueTypes.bool.def(false),
|
|
21017
|
+
recentSearchesIcon: VueTypes.any,
|
|
21018
|
+
popularSearchesIcon: VueTypes.any,
|
|
21019
|
+
// mic props
|
|
21020
|
+
showVoiceSearch: VueTypes.bool.def(false),
|
|
21021
|
+
getMicInstance: types.func,
|
|
21022
|
+
renderMic: types.func,
|
|
21023
|
+
distinctField: types.string,
|
|
21024
|
+
distinctFieldConfig: types.props,
|
|
21025
|
+
//
|
|
21026
|
+
focusShortcuts: VueTypes.arrayOf(VueTypes.oneOfType([VueTypes.string, VueTypes.number])).def(['/']),
|
|
21027
|
+
addonBefore: VueTypes.any,
|
|
21028
|
+
addonAfter: VueTypes.any,
|
|
21029
|
+
expandSuggestionsContainer: VueTypes.bool.def(true),
|
|
21030
|
+
index: VueTypes.string,
|
|
21031
|
+
popularSuggestionsConfig: VueTypes.object,
|
|
21032
|
+
recentSuggestionsConfig: VueTypes.object,
|
|
21033
|
+
applyStopwords: VueTypes.bool,
|
|
21034
|
+
customStopwords: types.stringArray,
|
|
21035
|
+
onData: types.func,
|
|
21036
|
+
renderItem: types.func,
|
|
21037
|
+
enterButton: VueTypes.bool.def(false),
|
|
21038
|
+
renderEnterButton: VueTypes.any
|
|
21039
|
+
},
|
|
21040
|
+
mounted: function mounted() {
|
|
21041
|
+
this.listenForFocusShortcuts();
|
|
21042
|
+
},
|
|
21043
|
+
watch: {
|
|
21044
|
+
dataField: function dataField(newVal, oldVal) {
|
|
21045
|
+
if (!isEqual$5(newVal, oldVal)) {
|
|
21046
|
+
this.triggerCustomQuery(this.$data.currentValue);
|
|
21047
|
+
}
|
|
21048
|
+
},
|
|
21049
|
+
fieldWeights: function fieldWeights() {
|
|
21050
|
+
this.triggerCustomQuery(this.$data.currentValue);
|
|
21051
|
+
},
|
|
21052
|
+
fuzziness: function fuzziness() {
|
|
21053
|
+
this.triggerCustomQuery(this.$data.currentValue);
|
|
21054
|
+
},
|
|
21055
|
+
queryFormat: function queryFormat() {
|
|
21056
|
+
this.triggerCustomQuery(this.$data.currentValue);
|
|
21057
|
+
},
|
|
21058
|
+
defaultValue: function defaultValue(newVal) {
|
|
21059
|
+
this.setValue(newVal, true, this.$props);
|
|
21060
|
+
},
|
|
21061
|
+
value: function value(newVal, oldVal) {
|
|
21062
|
+
if (!isEqual$5(newVal, oldVal)) {
|
|
21063
|
+
this.setValue(newVal, true, this.$props, newVal === '' ? lib_7.CLEAR_VALUE : undefined, false);
|
|
21064
|
+
}
|
|
21065
|
+
},
|
|
21066
|
+
defaultQuery: function defaultQuery(newVal, oldVal) {
|
|
21067
|
+
if (!isQueryIdentical(newVal, oldVal, this.$data.currentValue, this.$props)) {
|
|
21068
|
+
this.triggerDefaultQuery(this.$data.currentValue);
|
|
21069
|
+
}
|
|
21070
|
+
},
|
|
21071
|
+
customQuery: function customQuery(newVal, oldVal) {
|
|
21072
|
+
if (!isQueryIdentical(newVal, oldVal, this.$data.currentValue, this.$props)) {
|
|
21073
|
+
this.triggerCustomQuery(this.$data.currentValue);
|
|
21074
|
+
}
|
|
21075
|
+
},
|
|
21076
|
+
suggestions: function suggestions(newVal) {
|
|
21077
|
+
var suggestionsList = [];
|
|
21078
|
+
|
|
21079
|
+
if (Array.isArray(newVal) && newVal.length) {
|
|
21080
|
+
suggestionsList = [].concat(withClickIds$1(newVal));
|
|
21081
|
+
} else if (Array.isArray(this.$props.defaultSuggestions) && this.$props.defaultSuggestions.length) {
|
|
21082
|
+
suggestionsList = [].concat(withClickIds$1(this.$props.defaultSuggestions));
|
|
21083
|
+
}
|
|
21084
|
+
|
|
21085
|
+
this.normalizedSuggestions = suggestionsList;
|
|
21086
|
+
},
|
|
21087
|
+
selectedValue: function selectedValue(newVal, oldVal) {
|
|
21088
|
+
if (oldVal !== newVal && this.$data.currentValue !== newVal) {
|
|
21089
|
+
if (!newVal && this.$data.currentValue) {
|
|
21090
|
+
// selected value is cleared, call onValueSelected
|
|
21091
|
+
this.onValueSelectedHandler('', lib_7.CLEAR_VALUE);
|
|
21092
|
+
}
|
|
21093
|
+
|
|
21094
|
+
if (this.$props.value === undefined) {
|
|
21095
|
+
this.setValue(newVal || '', true, this.$props);
|
|
21096
|
+
}
|
|
21097
|
+
}
|
|
21098
|
+
},
|
|
21099
|
+
focusShortcuts: function focusShortcuts() {
|
|
21100
|
+
this.listenForFocusShortcuts();
|
|
21101
|
+
},
|
|
21102
|
+
rawData: function rawData(newVal) {
|
|
21103
|
+
this.$emit('on-data', {
|
|
21104
|
+
data: this.normalizedSuggestions,
|
|
21105
|
+
rawData: newVal,
|
|
21106
|
+
aggregationData: this.aggregationData,
|
|
21107
|
+
loading: this.isLoading,
|
|
21108
|
+
error: this.isError
|
|
21109
|
+
});
|
|
21110
|
+
},
|
|
21111
|
+
aggregationData: function aggregationData(newVal) {
|
|
21112
|
+
this.$emit('on-data', {
|
|
21113
|
+
data: this.normalizedSuggestions,
|
|
21114
|
+
rawData: this.rawData,
|
|
21115
|
+
aggregationData: newVal,
|
|
21116
|
+
loading: this.isLoading,
|
|
21117
|
+
error: this.isError
|
|
21118
|
+
});
|
|
21119
|
+
},
|
|
21120
|
+
loading: function loading(newVal) {
|
|
21121
|
+
this.$emit('on-data', {
|
|
21122
|
+
data: this.normalizedSuggestions,
|
|
21123
|
+
rawData: this.rawData,
|
|
21124
|
+
aggregationData: this.aggregationData,
|
|
21125
|
+
loading: newVal,
|
|
21126
|
+
error: this.isError
|
|
21127
|
+
});
|
|
21128
|
+
},
|
|
21129
|
+
error: function error(newVal) {
|
|
21130
|
+
this.$emit('on-data', {
|
|
21131
|
+
data: this.normalizedSuggestions,
|
|
21132
|
+
rawData: this.rawData,
|
|
21133
|
+
aggregationData: this.aggregationData,
|
|
21134
|
+
loading: this.isLoading,
|
|
21135
|
+
error: newVal
|
|
21136
|
+
});
|
|
21137
|
+
},
|
|
21138
|
+
debounce: function debounce(newVal, oldVal) {
|
|
21139
|
+
if (!isEqual$5(newVal, oldVal)) {
|
|
21140
|
+
this.handleTextChange = _debounce(this.handleText, newVal);
|
|
21141
|
+
}
|
|
21142
|
+
}
|
|
21143
|
+
},
|
|
21144
|
+
methods: {
|
|
21145
|
+
handleText: function handleText(value, cause) {
|
|
21146
|
+
if (cause === lib_7.CLEAR_VALUE) {
|
|
21147
|
+
this.triggerCustomQuery(value);
|
|
21148
|
+
this.triggerDefaultQuery(value);
|
|
21149
|
+
} else if (this.$props.autosuggest) {
|
|
21150
|
+
this.triggerDefaultQuery(value);
|
|
21151
|
+
} else if (!this.$props.enterButton) {
|
|
21152
|
+
this.triggerCustomQuery(value);
|
|
21153
|
+
}
|
|
21154
|
+
},
|
|
21155
|
+
validateDataField: function validateDataField() {
|
|
21156
|
+
var propName = 'dataField';
|
|
21157
|
+
var componentName = SearchBox.name;
|
|
21158
|
+
var props = this.$props;
|
|
21159
|
+
var requiredError = propName + " supplied to " + componentName + " is required. Validation failed.";
|
|
21160
|
+
var propValue = props[propName];
|
|
21161
|
+
|
|
21162
|
+
if (!this.enableAppbase) {
|
|
21163
|
+
if (!propValue) {
|
|
21164
|
+
console.error(requiredError);
|
|
21165
|
+
return;
|
|
21166
|
+
}
|
|
21167
|
+
|
|
21168
|
+
if (typeof propValue !== 'string' && typeof propValue !== 'object' && !Array.isArray(propValue)) {
|
|
21169
|
+
console.error("Invalid " + propName + " supplied to " + componentName + ". Validation failed.");
|
|
21170
|
+
return;
|
|
21171
|
+
}
|
|
21172
|
+
|
|
21173
|
+
if (Array.isArray(propValue) && propValue.length === 0) {
|
|
21174
|
+
console.error(requiredError);
|
|
21175
|
+
}
|
|
21176
|
+
}
|
|
21177
|
+
},
|
|
21178
|
+
getComponent: function getComponent$1(downshiftProps) {
|
|
21179
|
+
if (downshiftProps === void 0) {
|
|
21180
|
+
downshiftProps = {};
|
|
21181
|
+
}
|
|
21182
|
+
|
|
21183
|
+
var currentValue = this.$data.currentValue;
|
|
21184
|
+
var data = {
|
|
21185
|
+
error: this.error,
|
|
21186
|
+
loading: this.isLoading,
|
|
21187
|
+
downshiftProps: downshiftProps,
|
|
21188
|
+
data: this.normalizedSuggestions,
|
|
21189
|
+
rawData: this.rawData,
|
|
21190
|
+
value: currentValue,
|
|
21191
|
+
resultStats: this.stats
|
|
21192
|
+
};
|
|
21193
|
+
return getComponent(data, this);
|
|
21194
|
+
},
|
|
21195
|
+
// returns size and aggs property
|
|
21196
|
+
getBasicQueryOptions: function getBasicQueryOptions() {
|
|
21197
|
+
var aggregationField = this.$props.aggregationField;
|
|
21198
|
+
var queryOptions = helper_28(this.$props);
|
|
21199
|
+
|
|
21200
|
+
if (aggregationField) {
|
|
21201
|
+
queryOptions.aggs = getCompositeAggsQuery$2({
|
|
21202
|
+
props: this.$props,
|
|
21203
|
+
showTopHits: true
|
|
21204
|
+
}).aggs;
|
|
21205
|
+
}
|
|
21206
|
+
|
|
21207
|
+
return queryOptions;
|
|
21208
|
+
},
|
|
21209
|
+
handleSearchIconClick: function handleSearchIconClick() {
|
|
21210
|
+
var currentValue = this.currentValue;
|
|
21211
|
+
|
|
21212
|
+
if (currentValue.trim()) {
|
|
21213
|
+
this.setValue(currentValue, true);
|
|
21214
|
+
this.onValueSelectedHandler(currentValue, lib_7.SEARCH_ICON_CLICK);
|
|
21215
|
+
}
|
|
21216
|
+
},
|
|
21217
|
+
setValue: function setValue(value, isDefaultValue, props, cause, toggleIsOpen, categoryValue) {
|
|
21218
|
+
var _this = this;
|
|
21219
|
+
|
|
21220
|
+
if (isDefaultValue === void 0) {
|
|
21221
|
+
isDefaultValue = false;
|
|
21222
|
+
}
|
|
21223
|
+
|
|
21224
|
+
if (props === void 0) {
|
|
21225
|
+
props = this.$props;
|
|
21226
|
+
}
|
|
21227
|
+
|
|
21228
|
+
if (toggleIsOpen === void 0) {
|
|
21229
|
+
toggleIsOpen = true;
|
|
21230
|
+
}
|
|
21231
|
+
|
|
21232
|
+
if (categoryValue === void 0) {
|
|
21233
|
+
categoryValue = undefined;
|
|
21234
|
+
}
|
|
21235
|
+
|
|
21236
|
+
var performUpdate = function performUpdate() {
|
|
21237
|
+
_this.currentValue = value;
|
|
21238
|
+
|
|
21239
|
+
if (isDefaultValue) {
|
|
21240
|
+
if (_this.$props.autosuggest) {
|
|
21241
|
+
if (toggleIsOpen) {
|
|
21242
|
+
_this.isOpen = false;
|
|
21243
|
+
}
|
|
21244
|
+
|
|
21245
|
+
_this.triggerDefaultQuery(value);
|
|
21246
|
+
} // in case of strict selection only SUGGESTION_SELECT should be able
|
|
21247
|
+
// to set the query otherwise the value should reset
|
|
21248
|
+
|
|
21249
|
+
|
|
21250
|
+
if (props.strictSelection) {
|
|
21251
|
+
if (cause === lib_7.SUGGESTION_SELECT || value === '') {
|
|
21252
|
+
_this.triggerCustomQuery(value, categoryValue);
|
|
21253
|
+
} else {
|
|
21254
|
+
_this.setValue('', true);
|
|
21255
|
+
}
|
|
21256
|
+
} else if (props.value === undefined) {
|
|
21257
|
+
_this.triggerCustomQuery(value, categoryValue);
|
|
21258
|
+
}
|
|
21259
|
+
} else {
|
|
21260
|
+
// debounce for handling text while typing
|
|
21261
|
+
_this.handleTextChange(value, cause);
|
|
21262
|
+
}
|
|
21263
|
+
|
|
21264
|
+
_this.$emit('valueChange', value);
|
|
21265
|
+
|
|
21266
|
+
_this.$emit('value-change', value);
|
|
21267
|
+
};
|
|
21268
|
+
|
|
21269
|
+
checkValueChange$1(props.componentId, value, props.beforeValueChange, performUpdate);
|
|
21270
|
+
},
|
|
21271
|
+
triggerDefaultQuery: function triggerDefaultQuery(paramValue) {
|
|
21272
|
+
if (!this.$props.autosuggest) {
|
|
21273
|
+
return;
|
|
21274
|
+
}
|
|
21275
|
+
|
|
21276
|
+
var value = typeof paramValue !== 'string' ? this.currentValue : paramValue;
|
|
21277
|
+
var query = SearchBox.defaultQuery(value, this.$props);
|
|
21278
|
+
|
|
21279
|
+
if (this.defaultQuery) {
|
|
21280
|
+
var defaultQueryToBeSet = this.defaultQuery(value, this.$props) || {};
|
|
21281
|
+
|
|
21282
|
+
if (defaultQueryToBeSet.query) {
|
|
21283
|
+
query = defaultQueryToBeSet.query;
|
|
21284
|
+
} // Update calculated default query in store
|
|
21285
|
+
|
|
21286
|
+
|
|
21287
|
+
updateDefaultQuery(this.$props.componentId, this.setDefaultQuery, this.$props, value);
|
|
21288
|
+
}
|
|
21289
|
+
|
|
21290
|
+
this.updateQuery({
|
|
21291
|
+
componentId: this.internalComponent,
|
|
21292
|
+
query: query,
|
|
21293
|
+
value: value,
|
|
21294
|
+
componentType: constants_1$1.searchBox
|
|
21295
|
+
});
|
|
21296
|
+
},
|
|
21297
|
+
triggerCustomQuery: function triggerCustomQuery(paramValue, categoryValue) {
|
|
21298
|
+
if (categoryValue === void 0) {
|
|
21299
|
+
categoryValue = undefined;
|
|
21300
|
+
}
|
|
21301
|
+
|
|
21302
|
+
var _this$$props2 = this.$props,
|
|
21303
|
+
customQuery = _this$$props2.customQuery,
|
|
21304
|
+
filterLabel = _this$$props2.filterLabel,
|
|
21305
|
+
showFilter = _this$$props2.showFilter,
|
|
21306
|
+
URLParams = _this$$props2.URLParams;
|
|
21307
|
+
var value = typeof paramValue !== 'string' ? this.$data.currentValue : paramValue;
|
|
21308
|
+
var defaultQueryTobeSet = SearchBox.defaultQuery("" + value + (categoryValue ? " in " + categoryValue : ''), this.$props);
|
|
21309
|
+
var query = defaultQueryTobeSet;
|
|
21310
|
+
|
|
21311
|
+
if (customQuery) {
|
|
21312
|
+
var customQueryTobeSet = customQuery(value, this.$props);
|
|
21313
|
+
var queryTobeSet = customQueryTobeSet.query;
|
|
21314
|
+
|
|
21315
|
+
if (queryTobeSet) {
|
|
21316
|
+
query = queryTobeSet;
|
|
21317
|
+
}
|
|
21318
|
+
|
|
21319
|
+
updateCustomQuery(this.$props.componentId, this.setCustomQuery, this.$props, value);
|
|
21320
|
+
}
|
|
21321
|
+
|
|
21322
|
+
this.updateQuery({
|
|
21323
|
+
componentId: this.$props.componentId,
|
|
21324
|
+
query: query,
|
|
21325
|
+
value: value,
|
|
21326
|
+
label: filterLabel,
|
|
21327
|
+
showFilter: showFilter,
|
|
21328
|
+
URLParams: URLParams,
|
|
21329
|
+
componentType: constants_1$1.searchBox,
|
|
21330
|
+
category: categoryValue
|
|
21331
|
+
});
|
|
21332
|
+
},
|
|
21333
|
+
handleFocus: function handleFocus(event) {
|
|
21334
|
+
if (this.$props.autosuggest) {
|
|
21335
|
+
this.isOpen = true;
|
|
21336
|
+
}
|
|
21337
|
+
|
|
21338
|
+
this.$emit('focus', event);
|
|
21339
|
+
},
|
|
21340
|
+
handleVoiceResults: function handleVoiceResults(_ref) {
|
|
21341
|
+
var results = _ref.results;
|
|
21342
|
+
|
|
21343
|
+
if (results && results[0] && results[0].isFinal && results[0][0] && results[0][0].transcript && results[0][0].transcript.trim()) {
|
|
21344
|
+
this.setValue(results[0][0].transcript.trim(), true);
|
|
21345
|
+
}
|
|
21346
|
+
},
|
|
21347
|
+
triggerQuery: function triggerQuery(_ref2) {
|
|
21348
|
+
var _ref2$isOpen = _ref2.isOpen,
|
|
21349
|
+
isOpen = _ref2$isOpen === void 0 ? undefined : _ref2$isOpen,
|
|
21350
|
+
_ref2$customQuery = _ref2.customQuery,
|
|
21351
|
+
customQuery = _ref2$customQuery === void 0 ? true : _ref2$customQuery,
|
|
21352
|
+
_ref2$defaultQuery = _ref2.defaultQuery,
|
|
21353
|
+
defaultQuery = _ref2$defaultQuery === void 0 ? true : _ref2$defaultQuery,
|
|
21354
|
+
_ref2$value = _ref2.value,
|
|
21355
|
+
value = _ref2$value === void 0 ? undefined : _ref2$value,
|
|
21356
|
+
_ref2$categoryValue = _ref2.categoryValue,
|
|
21357
|
+
categoryValue = _ref2$categoryValue === void 0 ? undefined : _ref2$categoryValue;
|
|
21358
|
+
|
|
21359
|
+
if (typeof isOpen === 'boolean') {
|
|
21360
|
+
this.isOpen = isOpen;
|
|
21361
|
+
}
|
|
21362
|
+
|
|
21363
|
+
if (customQuery) {
|
|
21364
|
+
this.triggerCustomQuery(value, categoryValue);
|
|
21365
|
+
}
|
|
21366
|
+
|
|
21367
|
+
if (defaultQuery) {
|
|
21368
|
+
this.triggerDefaultQuery(value);
|
|
21369
|
+
}
|
|
21370
|
+
},
|
|
21371
|
+
triggerClickAnalytics: function triggerClickAnalytics(searchPosition, documentId) {
|
|
21372
|
+
// click analytics would only work client side and after javascript loads
|
|
21373
|
+
var docId = documentId;
|
|
21374
|
+
|
|
21375
|
+
if (!docId) {
|
|
21376
|
+
var hitData = this.normalizedSuggestions.find(function (hit) {
|
|
21377
|
+
return hit._click_id === searchPosition;
|
|
21378
|
+
});
|
|
21379
|
+
|
|
21380
|
+
if (hitData && hitData.source && hitData.source._id) {
|
|
21381
|
+
docId = hitData.source._id;
|
|
21382
|
+
}
|
|
21383
|
+
}
|
|
21384
|
+
|
|
21385
|
+
this.recordSuggestionClick(searchPosition, docId);
|
|
21386
|
+
},
|
|
21387
|
+
clearValue: function clearValue() {
|
|
21388
|
+
this.setValue('', false, this.$props, lib_7.CLEAR_VALUE, false);
|
|
21389
|
+
this.onValueSelectedHandler('', lib_7.CLEAR_VALUE);
|
|
21390
|
+
},
|
|
21391
|
+
handleKeyDown: function handleKeyDown(event, highlightedIndex) {
|
|
21392
|
+
// if a suggestion was selected, delegate the handling to suggestion handler
|
|
21393
|
+
if (event.key === 'Enter' && highlightedIndex === null) {
|
|
21394
|
+
this.setValue(event.target.value, true);
|
|
21395
|
+
this.onValueSelectedHandler(event.target.value, lib_7.ENTER_PRESS);
|
|
21396
|
+
} // Need to review
|
|
21397
|
+
|
|
21398
|
+
|
|
21399
|
+
this.$emit('keyDown', event, this.triggerQuery);
|
|
21400
|
+
this.$emit('key-down', event, this.triggerQuery);
|
|
21401
|
+
},
|
|
21402
|
+
onInputChange: function onInputChange(e) {
|
|
21403
|
+
var _this2 = this;
|
|
21404
|
+
|
|
21405
|
+
var inputValue = e.target.value;
|
|
21406
|
+
|
|
21407
|
+
if (!this.$data.isOpen && this.$props.autosuggest) {
|
|
21408
|
+
this.isOpen = true;
|
|
21409
|
+
}
|
|
21410
|
+
|
|
21411
|
+
var value = this.$props.value;
|
|
21412
|
+
|
|
21413
|
+
if (value === undefined) {
|
|
21414
|
+
this.setValue(inputValue, false, this.$props, inputValue === '' ? lib_7.CLEAR_VALUE : undefined);
|
|
21415
|
+
} else {
|
|
21416
|
+
this.$emit('change', inputValue, function (_ref3) {
|
|
21417
|
+
var isOpen = _ref3.isOpen;
|
|
21418
|
+
return _this2.triggerQuery({
|
|
21419
|
+
defaultQuery: true,
|
|
21420
|
+
customQuery: true,
|
|
21421
|
+
value: inputValue,
|
|
21422
|
+
isOpen: isOpen
|
|
21423
|
+
});
|
|
21424
|
+
}, e);
|
|
21425
|
+
}
|
|
21426
|
+
},
|
|
21427
|
+
onSuggestionSelected: function onSuggestionSelected(suggestion) {
|
|
21428
|
+
var _this3 = this;
|
|
21429
|
+
|
|
21430
|
+
this.isOpen = false;
|
|
21431
|
+
var value = this.$props.value; // Record analytics for selected suggestions
|
|
21432
|
+
|
|
21433
|
+
this.triggerClickAnalytics(suggestion._click_id);
|
|
21434
|
+
|
|
21435
|
+
if (value === undefined) {
|
|
21436
|
+
this.setValue(suggestion.value, true, this.$props, lib_7.SUGGESTION_SELECT, false, suggestion._category);
|
|
21437
|
+
} else {
|
|
21438
|
+
this.$emit('change', suggestion.value, function (_ref4) {
|
|
21439
|
+
var isOpen = _ref4.isOpen;
|
|
21440
|
+
return _this3.triggerQuery({
|
|
21441
|
+
isOpen: isOpen,
|
|
21442
|
+
value: suggestion.value,
|
|
21443
|
+
categoryValue: suggestion._category
|
|
21444
|
+
});
|
|
21445
|
+
});
|
|
21446
|
+
}
|
|
21447
|
+
|
|
21448
|
+
this.onValueSelectedHandler(suggestion.value, lib_7.SUGGESTION_SELECT, suggestion.source);
|
|
21449
|
+
},
|
|
21450
|
+
onValueSelectedHandler: function onValueSelectedHandler(currentValue) {
|
|
21451
|
+
if (currentValue === void 0) {
|
|
21452
|
+
currentValue = this.$data.currentValue;
|
|
21453
|
+
}
|
|
21454
|
+
|
|
21455
|
+
for (var _len = arguments.length, cause = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
21456
|
+
cause[_key - 1] = arguments[_key];
|
|
21457
|
+
}
|
|
21458
|
+
|
|
21459
|
+
this.$emit.apply(this, ['valueSelected', currentValue].concat(cause));
|
|
21460
|
+
this.$emit.apply(this, ['value-selected', currentValue].concat(cause));
|
|
21461
|
+
},
|
|
21462
|
+
handleStateChange: function handleStateChange(changes) {
|
|
21463
|
+
var isOpen = changes.isOpen;
|
|
21464
|
+
this.isOpen = isOpen;
|
|
21465
|
+
},
|
|
21466
|
+
getBackgroundColor: function getBackgroundColor(highlightedIndex, index) {
|
|
21467
|
+
var isDark = this.themePreset === 'dark';
|
|
21468
|
+
|
|
21469
|
+
if (isDark) {
|
|
21470
|
+
return highlightedIndex === index ? '#555' : '#424242';
|
|
21471
|
+
}
|
|
21472
|
+
|
|
21473
|
+
return highlightedIndex === index ? '#eee' : '#fff';
|
|
21474
|
+
},
|
|
21475
|
+
renderIcon: function renderIcon() {
|
|
21476
|
+
var h = this.$createElement;
|
|
21477
|
+
|
|
21478
|
+
if (this.$props.showIcon) {
|
|
21479
|
+
return this.$props.icon || h(SearchSvg);
|
|
21480
|
+
}
|
|
21481
|
+
|
|
21482
|
+
return null;
|
|
21483
|
+
},
|
|
21484
|
+
renderErrorComponent: function renderErrorComponent() {
|
|
21485
|
+
var h = this.$createElement;
|
|
21486
|
+
var renderError = this.$scopedSlots.renderError || this.$props.renderError;
|
|
21487
|
+
|
|
21488
|
+
if (this.error && renderError && this.$data.currentValue && !this.isLoading) {
|
|
21489
|
+
return h(SuggestionWrapper, {
|
|
21490
|
+
"attrs": {
|
|
21491
|
+
"innerClass": this.$props.innerClass,
|
|
21492
|
+
"innerClassName": "error",
|
|
21493
|
+
"theme": this.theme,
|
|
21494
|
+
"themePreset": this.themePreset
|
|
21495
|
+
}
|
|
21496
|
+
}, [isFunction$1(renderError) ? renderError(this.error) : renderError]);
|
|
21497
|
+
}
|
|
21498
|
+
|
|
21499
|
+
return null;
|
|
21500
|
+
},
|
|
21501
|
+
renderCancelIcon: function renderCancelIcon() {
|
|
21502
|
+
var h = this.$createElement;
|
|
21503
|
+
|
|
21504
|
+
if (this.$props.showClear) {
|
|
21505
|
+
return this.$props.clearIcon || h(CancelSvg);
|
|
21506
|
+
}
|
|
21507
|
+
|
|
21508
|
+
return null;
|
|
21509
|
+
},
|
|
21510
|
+
renderNoSuggestions: function renderNoSuggestions(finalSuggestionsList) {
|
|
21511
|
+
if (finalSuggestionsList === void 0) {
|
|
21512
|
+
finalSuggestionsList = [];
|
|
21513
|
+
}
|
|
21514
|
+
|
|
21515
|
+
var h = this.$createElement;
|
|
21516
|
+
var _this$$props3 = this.$props,
|
|
21517
|
+
theme = _this$$props3.theme,
|
|
21518
|
+
innerClass = _this$$props3.innerClass;
|
|
21519
|
+
var renderNoSuggestion = this.$scopedSlots.renderNoSuggestion || this.$props.renderNoSuggestion;
|
|
21520
|
+
var renderError = this.$scopedSlots.renderError || this.$props.renderError;
|
|
21521
|
+
var _this$$data = this.$data,
|
|
21522
|
+
isOpen = _this$$data.isOpen,
|
|
21523
|
+
currentValue = _this$$data.currentValue;
|
|
21524
|
+
|
|
21525
|
+
if (renderNoSuggestion && isOpen && !finalSuggestionsList.length && !this.isLoading && currentValue && !(renderError && this.error)) {
|
|
21526
|
+
return h(SuggestionWrapper, {
|
|
21527
|
+
"attrs": {
|
|
21528
|
+
"innerClass": innerClass,
|
|
21529
|
+
"themePreset": this.themePreset,
|
|
21530
|
+
"theme": theme,
|
|
21531
|
+
"innerClassName": "noSuggestion"
|
|
21532
|
+
},
|
|
21533
|
+
"scopedSlots": {
|
|
21534
|
+
"default": function _default() {
|
|
21535
|
+
return typeof renderNoSuggestion === 'function' ? renderNoSuggestion(currentValue) : renderNoSuggestion;
|
|
21536
|
+
}
|
|
21537
|
+
}
|
|
21538
|
+
});
|
|
21539
|
+
}
|
|
21540
|
+
|
|
21541
|
+
return null;
|
|
21542
|
+
},
|
|
21543
|
+
renderInputAddonBefore: function renderInputAddonBefore() {
|
|
21544
|
+
var h = this.$createElement;
|
|
21545
|
+
var addonBefore = this.$scopedSlots.addonBefore;
|
|
21546
|
+
|
|
21547
|
+
if (addonBefore) {
|
|
21548
|
+
return h(InputAddon, {
|
|
21549
|
+
"class": "addon-before"
|
|
21550
|
+
}, [addonBefore()]);
|
|
21551
|
+
}
|
|
21552
|
+
|
|
21553
|
+
return null;
|
|
21554
|
+
},
|
|
21555
|
+
renderInputAddonAfter: function renderInputAddonAfter() {
|
|
21556
|
+
var h = this.$createElement;
|
|
21557
|
+
var addonAfter = this.$scopedSlots.addonAfter;
|
|
21558
|
+
|
|
21559
|
+
if (addonAfter) {
|
|
21560
|
+
return h(InputAddon, {
|
|
21561
|
+
"class": "addon-after"
|
|
21562
|
+
}, [addonAfter()]);
|
|
21563
|
+
}
|
|
21564
|
+
|
|
21565
|
+
return null;
|
|
21566
|
+
},
|
|
21567
|
+
renderEnterButtonElement: function renderEnterButtonElement() {
|
|
21568
|
+
var _this4 = this;
|
|
21569
|
+
|
|
21570
|
+
var h = this.$createElement;
|
|
21571
|
+
var _this$$props4 = this.$props,
|
|
21572
|
+
enterButton = _this$$props4.enterButton,
|
|
21573
|
+
innerClass = _this$$props4.innerClass;
|
|
21574
|
+
var renderEnterButton = this.$scopedSlots.renderEnterButton;
|
|
21575
|
+
|
|
21576
|
+
var enterButtonOnClick = function enterButtonOnClick() {
|
|
21577
|
+
return _this4.triggerQuery({
|
|
21578
|
+
isOpen: false,
|
|
21579
|
+
value: _this4.currentValue,
|
|
21580
|
+
customQuery: true
|
|
21581
|
+
});
|
|
21582
|
+
};
|
|
21583
|
+
|
|
21584
|
+
if (enterButton) {
|
|
21585
|
+
var getEnterButtonMarkup = function getEnterButtonMarkup() {
|
|
21586
|
+
if (renderEnterButton) {
|
|
21587
|
+
return renderEnterButton(enterButtonOnClick);
|
|
21588
|
+
}
|
|
21589
|
+
|
|
21590
|
+
return h(Button, {
|
|
21591
|
+
"class": "enter-btn " + getClassName$4(innerClass, 'enterButton'),
|
|
21592
|
+
"attrs": {
|
|
21593
|
+
"primary": true
|
|
21594
|
+
},
|
|
21595
|
+
"on": {
|
|
21596
|
+
"click": enterButtonOnClick
|
|
21597
|
+
}
|
|
21598
|
+
}, ["Search"]);
|
|
21599
|
+
};
|
|
21600
|
+
|
|
21601
|
+
return h("div", {
|
|
21602
|
+
"class": "enter-button-wrapper"
|
|
21603
|
+
}, [getEnterButtonMarkup()]);
|
|
21604
|
+
}
|
|
21605
|
+
|
|
21606
|
+
return null;
|
|
21607
|
+
},
|
|
21608
|
+
renderIcons: function renderIcons() {
|
|
21609
|
+
var h = this.$createElement;
|
|
21610
|
+
var _this$$props5 = this.$props,
|
|
21611
|
+
iconPosition = _this$$props5.iconPosition,
|
|
21612
|
+
showClear = _this$$props5.showClear,
|
|
21613
|
+
innerClass = _this$$props5.innerClass,
|
|
21614
|
+
getMicInstance = _this$$props5.getMicInstance,
|
|
21615
|
+
showVoiceSearch = _this$$props5.showVoiceSearch,
|
|
21616
|
+
showIcon = _this$$props5.showIcon;
|
|
21617
|
+
var renderMic = this.$scopedSlots.renderMic || this.$props.renderMic;
|
|
21618
|
+
var currentValue = this.$data.currentValue;
|
|
21619
|
+
return h("div", [h(IconGroup, {
|
|
21620
|
+
"attrs": {
|
|
21621
|
+
"groupPosition": "right",
|
|
21622
|
+
"positionType": "absolute"
|
|
21623
|
+
}
|
|
21624
|
+
}, [currentValue && showClear && h(IconWrapper, {
|
|
21625
|
+
"on": {
|
|
21626
|
+
"click": this.clearValue
|
|
21627
|
+
},
|
|
21628
|
+
"attrs": {
|
|
21629
|
+
"showIcon": showIcon,
|
|
21630
|
+
"isClearIcon": true
|
|
21631
|
+
}
|
|
21632
|
+
}, [this.renderCancelIcon()]), showVoiceSearch && h(Mic, {
|
|
21633
|
+
"attrs": {
|
|
21634
|
+
"getInstance": getMicInstance,
|
|
21635
|
+
"render": renderMic,
|
|
21636
|
+
"handleResult": this.handleVoiceResults,
|
|
21637
|
+
"className": getClassName$4(innerClass, 'mic') || null
|
|
21638
|
+
}
|
|
21639
|
+
}), iconPosition === 'right' && showIcon && h(IconWrapper, {
|
|
21640
|
+
"on": {
|
|
21641
|
+
"click": this.handleSearchIconClick
|
|
21642
|
+
}
|
|
21643
|
+
}, [this.renderIcon()])]), h(IconGroup, {
|
|
21644
|
+
"attrs": {
|
|
21645
|
+
"groupPosition": "left",
|
|
21646
|
+
"positionType": "absolute"
|
|
21647
|
+
}
|
|
21648
|
+
}, [iconPosition === 'left' && showIcon && h(IconWrapper, {
|
|
21649
|
+
"on": {
|
|
21650
|
+
"click": this.handleSearchIconClick
|
|
21651
|
+
}
|
|
21652
|
+
}, [this.renderIcon()])])]);
|
|
21653
|
+
},
|
|
21654
|
+
focusSearchBox: function focusSearchBox(event) {
|
|
21655
|
+
var _this$$refs, _this$$refs$this$$pro;
|
|
21656
|
+
|
|
21657
|
+
var elt = event.target || event.srcElement;
|
|
21658
|
+
var tagName = elt.tagName;
|
|
21659
|
+
|
|
21660
|
+
if (elt.isContentEditable || tagName === 'INPUT' || tagName === 'SELECT' || tagName === 'TEXTAREA') {
|
|
21661
|
+
// already in an input
|
|
21662
|
+
return;
|
|
21663
|
+
}
|
|
21664
|
+
|
|
21665
|
+
(_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
|
|
21666
|
+
},
|
|
21667
|
+
listenForFocusShortcuts: function listenForFocusShortcuts() {
|
|
21668
|
+
var _this5 = this;
|
|
21669
|
+
|
|
21670
|
+
var _this$$props$focusSho = this.$props.focusShortcuts,
|
|
21671
|
+
focusShortcuts = _this$$props$focusSho === void 0 ? ['/'] : _this$$props$focusSho;
|
|
21672
|
+
|
|
21673
|
+
if (isEmpty(focusShortcuts)) {
|
|
21674
|
+
return;
|
|
21675
|
+
}
|
|
21676
|
+
|
|
21677
|
+
var shortcutsString = parseFocusShortcuts(focusShortcuts).join(','); // handler for alphabets and other key combinations
|
|
21678
|
+
|
|
21679
|
+
hotkeys(shortcutsString, // eslint-disable-next-line no-unused-vars
|
|
21680
|
+
|
|
21681
|
+
/* eslint-disable no-shadow */
|
|
21682
|
+
function (event, handler) {
|
|
21683
|
+
// Prevent the default refresh event under WINDOWS system
|
|
21684
|
+
event.preventDefault();
|
|
21685
|
+
|
|
21686
|
+
_this5.focusSearchBox(event);
|
|
21687
|
+
}); // if one of modifier keys are used, they are handled below
|
|
21688
|
+
|
|
21689
|
+
hotkeys('*', function (event) {
|
|
21690
|
+
var modifierKeys = extractModifierKeysFromFocusShortcuts(focusShortcuts);
|
|
21691
|
+
if (modifierKeys.length === 0) return;
|
|
21692
|
+
|
|
21693
|
+
for (var index = 0; index < modifierKeys.length; index += 1) {
|
|
21694
|
+
var element = modifierKeys[index];
|
|
21695
|
+
|
|
21696
|
+
if (hotkeys[element]) {
|
|
21697
|
+
_this5.focusSearchBox(event);
|
|
21698
|
+
|
|
21699
|
+
break;
|
|
21700
|
+
}
|
|
21701
|
+
}
|
|
21702
|
+
});
|
|
21703
|
+
},
|
|
21704
|
+
onAutofillClick: function onAutofillClick(suggestion) {
|
|
21705
|
+
var value = suggestion.value;
|
|
21706
|
+
this.isOpen = true;
|
|
21707
|
+
this.currentValue = value;
|
|
21708
|
+
this.triggerDefaultQuery(value);
|
|
21709
|
+
},
|
|
21710
|
+
renderAutoFill: function renderAutoFill(suggestion) {
|
|
21711
|
+
var _this6 = this;
|
|
21712
|
+
|
|
21713
|
+
var h = this.$createElement;
|
|
21714
|
+
|
|
21715
|
+
var handleAutoFillClick = function handleAutoFillClick(e) {
|
|
21716
|
+
e.stopPropagation();
|
|
21717
|
+
|
|
21718
|
+
_this6.onAutofillClick(suggestion);
|
|
21719
|
+
};
|
|
21720
|
+
/* 👇 avoid showing autofill for category suggestions👇 */
|
|
21721
|
+
|
|
21722
|
+
|
|
21723
|
+
return suggestion._category ? null : h(AutoFillSvg, {
|
|
21724
|
+
"on": {
|
|
21725
|
+
"click": handleAutoFillClick
|
|
21726
|
+
}
|
|
21727
|
+
});
|
|
21728
|
+
}
|
|
21729
|
+
},
|
|
21730
|
+
render: function render() {
|
|
21731
|
+
var _this7 = this;
|
|
21732
|
+
|
|
21733
|
+
var h = arguments[0];
|
|
21734
|
+
var _this$$props6 = this.$props,
|
|
21735
|
+
theme = _this$$props6.theme,
|
|
21736
|
+
expandSuggestionsContainer = _this$$props6.expandSuggestionsContainer;
|
|
21737
|
+
var _this$$scopedSlots = this.$scopedSlots,
|
|
21738
|
+
recentSearchesIcon = _this$$scopedSlots.recentSearchesIcon,
|
|
21739
|
+
popularSearchesIcon = _this$$scopedSlots.popularSearchesIcon;
|
|
21740
|
+
var hasSuggestions = Array.isArray(this.normalizedSuggestions) && this.normalizedSuggestions.length;
|
|
21741
|
+
var renderItem = this.$scopedSlots.renderItem || this.$props.renderItem;
|
|
21742
|
+
return h(Container, {
|
|
21743
|
+
"class": this.$props.className
|
|
21744
|
+
}, [this.$props.title && h(Title, {
|
|
21745
|
+
"class": getClassName$4(this.$props.innerClass, 'title') || ''
|
|
21746
|
+
}, [this.$props.title]), this.$props.autosuggest ? h(Downshift, {
|
|
21747
|
+
"attrs": {
|
|
21748
|
+
"id": this.$props.componentId + "-downshift",
|
|
21749
|
+
"handleChange": this.onSuggestionSelected,
|
|
21750
|
+
"handleMouseup": this.handleStateChange,
|
|
21751
|
+
"isOpen": this.$data.isOpen
|
|
21752
|
+
},
|
|
21753
|
+
"scopedSlots": {
|
|
21754
|
+
"default": function _default(_ref5) {
|
|
21755
|
+
var getInputEvents = _ref5.getInputEvents,
|
|
21756
|
+
getInputProps = _ref5.getInputProps,
|
|
21757
|
+
getItemProps = _ref5.getItemProps,
|
|
21758
|
+
getItemEvents = _ref5.getItemEvents,
|
|
21759
|
+
isOpen = _ref5.isOpen,
|
|
21760
|
+
highlightedIndex = _ref5.highlightedIndex,
|
|
21761
|
+
setHighlightedIndex = _ref5.setHighlightedIndex;
|
|
21762
|
+
|
|
21763
|
+
var renderSuggestionsDropdown = function renderSuggestionsDropdown() {
|
|
21764
|
+
var getIcon = function getIcon(iconType) {
|
|
21765
|
+
switch (iconType) {
|
|
21766
|
+
case helper_6.Recent:
|
|
21767
|
+
return recentSearchesIcon;
|
|
21768
|
+
|
|
21769
|
+
case helper_6.Popular:
|
|
21770
|
+
return popularSearchesIcon;
|
|
21771
|
+
|
|
21772
|
+
default:
|
|
21773
|
+
return null;
|
|
21774
|
+
}
|
|
21775
|
+
};
|
|
21776
|
+
|
|
21777
|
+
return h("div", [_this7.hasCustomRenderer && _this7.getComponent({
|
|
21778
|
+
isOpen: isOpen,
|
|
21779
|
+
getItemProps: getItemProps,
|
|
21780
|
+
getItemEvents: getItemEvents,
|
|
21781
|
+
highlightedIndex: highlightedIndex
|
|
21782
|
+
}), _this7.renderErrorComponent(), !_this7.hasCustomRenderer && isOpen && hasSuggestions ? h("ul", {
|
|
21783
|
+
"class": suggestions$1(_this7.themePreset, theme) + " " + getClassName$4(_this7.$props.innerClass, 'list')
|
|
21784
|
+
}, [_this7.normalizedSuggestions.map(function (item, index) {
|
|
21785
|
+
return renderItem ? h("li", {
|
|
21786
|
+
"domProps": _extends({}, getItemProps({
|
|
21787
|
+
item: item
|
|
21788
|
+
})),
|
|
21789
|
+
"on": _extends({}, getItemEvents({
|
|
21790
|
+
item: item
|
|
21791
|
+
})),
|
|
21792
|
+
"key": index + 1 + "-" + item.value,
|
|
21793
|
+
"style": {
|
|
21794
|
+
backgroundColor: _this7.getBackgroundColor(highlightedIndex, index),
|
|
21795
|
+
justifyContent: 'flex-start',
|
|
21796
|
+
alignItems: 'center'
|
|
21797
|
+
}
|
|
21798
|
+
}, [renderItem(item)]) : h("li", {
|
|
21799
|
+
"domProps": _extends({}, getItemProps({
|
|
21800
|
+
item: item
|
|
21801
|
+
})),
|
|
21802
|
+
"on": _extends({}, getItemEvents({
|
|
21803
|
+
item: item
|
|
21804
|
+
})),
|
|
21805
|
+
"key": index + 1 + "-" + item.value,
|
|
21806
|
+
"style": {
|
|
21807
|
+
backgroundColor: _this7.getBackgroundColor(highlightedIndex, index),
|
|
21808
|
+
justifyContent: 'flex-start',
|
|
21809
|
+
alignItems: 'center'
|
|
21810
|
+
}
|
|
21811
|
+
}, [h("div", {
|
|
21812
|
+
"style": {
|
|
21813
|
+
padding: '0 10px 0 0',
|
|
21814
|
+
display: 'flex'
|
|
21815
|
+
}
|
|
21816
|
+
}, [h(CustomSvg, {
|
|
21817
|
+
"attrs": {
|
|
21818
|
+
"className": getClassName$4(_this7.$props.innerClass, item._suggestion_type + "-search-icon") || null,
|
|
21819
|
+
"icon": getIcon(item._suggestion_type),
|
|
21820
|
+
"type": item._suggestion_type + "-search-icon"
|
|
21821
|
+
}
|
|
21822
|
+
})]), h(SuggestionItem, {
|
|
21823
|
+
"attrs": {
|
|
21824
|
+
"currentValue": _this7.currentValue,
|
|
21825
|
+
"suggestion": item
|
|
21826
|
+
}
|
|
21827
|
+
}), _this7.renderAutoFill(item)]);
|
|
21828
|
+
})]) : _this7.renderNoSuggestions(_this7.normalizedSuggestions)]);
|
|
21829
|
+
};
|
|
21830
|
+
|
|
21831
|
+
return h("div", {
|
|
21832
|
+
"class": suggestionsContainer
|
|
21833
|
+
}, [h(InputGroup, [_this7.renderInputAddonBefore(), h(InputWrapper, [h(Input, {
|
|
21834
|
+
"attrs": {
|
|
21835
|
+
"id": _this7.$props.componentId + "-input",
|
|
21836
|
+
"showIcon": _this7.$props.showIcon,
|
|
21837
|
+
"showClear": _this7.$props.showClear,
|
|
21838
|
+
"iconPosition": _this7.$props.iconPosition,
|
|
21839
|
+
"placeholder": _this7.$props.placeholder,
|
|
21840
|
+
"autoFocus": _this7.$props.autoFocus,
|
|
21841
|
+
"themePreset": _this7.themePreset,
|
|
21842
|
+
"autocomplete": "off"
|
|
21843
|
+
},
|
|
21844
|
+
"ref": _this7.$props.innerRef,
|
|
21845
|
+
"class": getClassName$4(_this7.$props.innerClass, 'input'),
|
|
21846
|
+
"on": _extends({}, getInputEvents({
|
|
21847
|
+
onInput: _this7.onInputChange,
|
|
21848
|
+
onBlur: function onBlur(e) {
|
|
21849
|
+
_this7.$emit('blur', e, _this7.triggerQuery);
|
|
21850
|
+
},
|
|
21851
|
+
onFocus: _this7.handleFocus,
|
|
21852
|
+
onKeyPress: function onKeyPress(e) {
|
|
21853
|
+
_this7.$emit('keyPress', e, _this7.triggerQuery);
|
|
21854
|
+
|
|
21855
|
+
_this7.$emit('key-press', e, _this7.triggerQuery);
|
|
21856
|
+
},
|
|
21857
|
+
onKeyDown: function onKeyDown(e) {
|
|
21858
|
+
return _this7.handleKeyDown(e, highlightedIndex);
|
|
21859
|
+
},
|
|
21860
|
+
onKeyUp: function onKeyUp(e) {
|
|
21861
|
+
_this7.$emit('keyUp', e, _this7.triggerQuery);
|
|
21862
|
+
|
|
21863
|
+
_this7.$emit('key-up', e, _this7.triggerQuery);
|
|
21864
|
+
},
|
|
21865
|
+
onClick: function onClick() {
|
|
21866
|
+
setHighlightedIndex(null);
|
|
21867
|
+
}
|
|
21868
|
+
})),
|
|
21869
|
+
"domProps": _extends({}, getInputProps({
|
|
21870
|
+
value: _this7.$data.currentValue === null ? '' : _this7.$data.currentValue
|
|
21871
|
+
}))
|
|
21872
|
+
}), _this7.renderIcons(), !expandSuggestionsContainer && renderSuggestionsDropdown()]), _this7.renderInputAddonAfter(), _this7.renderEnterButtonElement()]), expandSuggestionsContainer && renderSuggestionsDropdown()]);
|
|
21873
|
+
}
|
|
21874
|
+
}
|
|
21875
|
+
}) : h("div", {
|
|
21876
|
+
"class": suggestionsContainer
|
|
21877
|
+
}, [h(InputGroup, [this.renderInputAddonBefore(), h(InputWrapper, [h(Input, {
|
|
21878
|
+
"class": getClassName$4(this.$props.innerClass, 'input') || '',
|
|
21879
|
+
"attrs": {
|
|
21880
|
+
"placeholder": this.$props.placeholder,
|
|
21881
|
+
"iconPosition": this.$props.iconPosition,
|
|
21882
|
+
"showIcon": this.$props.showIcon,
|
|
21883
|
+
"showClear": this.$props.showClear,
|
|
21884
|
+
"themePreset": this.themePreset
|
|
21885
|
+
},
|
|
21886
|
+
"on": _extends({}, {
|
|
21887
|
+
blur: function blur(e) {
|
|
21888
|
+
_this7.$emit('blur', e, _this7.triggerQuery);
|
|
21889
|
+
},
|
|
21890
|
+
keypress: function keypress(e) {
|
|
21891
|
+
_this7.$emit('keyPress', e, _this7.triggerQuery);
|
|
21892
|
+
|
|
21893
|
+
_this7.$emit('key-press', e, _this7.triggerQuery);
|
|
21894
|
+
},
|
|
21895
|
+
input: this.onInputChange,
|
|
21896
|
+
focus: function focus(e) {
|
|
21897
|
+
_this7.$emit('focus', e, _this7.triggerQuery);
|
|
21898
|
+
},
|
|
21899
|
+
keydown: function keydown(e) {
|
|
21900
|
+
_this7.$emit('keyDown', e, _this7.triggerQuery);
|
|
21901
|
+
|
|
21902
|
+
_this7.$emit('key-down', e, _this7.triggerQuery);
|
|
21903
|
+
},
|
|
21904
|
+
keyup: function keyup(e) {
|
|
21905
|
+
_this7.$emit('keyUp', e, _this7.triggerQuery);
|
|
21906
|
+
|
|
21907
|
+
_this7.$emit('key-up', e, _this7.triggerQuery);
|
|
21908
|
+
}
|
|
21909
|
+
}),
|
|
21910
|
+
"domProps": _extends({}, {
|
|
21911
|
+
autofocus: this.$props.autoFocus,
|
|
21912
|
+
value: this.$data.currentValue ? this.$data.currentValue : ''
|
|
21913
|
+
}),
|
|
21914
|
+
"ref": this.$props.innerRef
|
|
21915
|
+
}), this.renderIcons()]), this.renderInputAddonAfter(), this.renderEnterButtonElement()])])]);
|
|
21916
|
+
},
|
|
21917
|
+
destroyed: function destroyed() {
|
|
21918
|
+
document.removeEventListener('keydown', this.onKeyDown);
|
|
21919
|
+
}
|
|
21920
|
+
};
|
|
21921
|
+
|
|
21922
|
+
SearchBox.defaultQuery = function (value, props) {
|
|
21923
|
+
var finalQuery = null;
|
|
21924
|
+
var fields = normalizeDataField$1(props.dataField, props.fieldWeights);
|
|
21925
|
+
finalQuery = {
|
|
21926
|
+
bool: {
|
|
21927
|
+
should: SearchBox.shouldQuery(value, fields, props),
|
|
21928
|
+
minimum_should_match: '1'
|
|
21929
|
+
}
|
|
21930
|
+
};
|
|
21931
|
+
|
|
21932
|
+
if (finalQuery && props.nestedField) {
|
|
21933
|
+
return {
|
|
21934
|
+
query: {
|
|
21935
|
+
nested: {
|
|
21936
|
+
path: props.nestedField,
|
|
21937
|
+
query: finalQuery
|
|
21938
|
+
}
|
|
21939
|
+
}
|
|
21940
|
+
};
|
|
21941
|
+
}
|
|
21942
|
+
|
|
21943
|
+
return finalQuery;
|
|
21944
|
+
};
|
|
21945
|
+
|
|
21946
|
+
SearchBox.shouldQuery = function (value, dataFields, props) {
|
|
21947
|
+
var finalQuery = [];
|
|
21948
|
+
var phrasePrefixFields = [];
|
|
21949
|
+
var fields = dataFields.map(function (dataField) {
|
|
21950
|
+
var queryField = "" + dataField.field + (dataField.weight ? "^" + dataField.weight : '');
|
|
21951
|
+
|
|
21952
|
+
if (!(dataField.field.endsWith('.keyword') || dataField.field.endsWith('.autosuggest') || dataField.field.endsWith('.search'))) {
|
|
21953
|
+
phrasePrefixFields.push(queryField);
|
|
21954
|
+
}
|
|
21955
|
+
|
|
21956
|
+
return queryField;
|
|
21957
|
+
});
|
|
21958
|
+
|
|
21959
|
+
if (props.searchOperators || props.queryString) {
|
|
21960
|
+
return {
|
|
21961
|
+
query: value,
|
|
21962
|
+
fields: fields,
|
|
21963
|
+
default_operator: props.queryFormat
|
|
21964
|
+
};
|
|
21965
|
+
}
|
|
21966
|
+
|
|
21967
|
+
if (props.queryFormat === 'and') {
|
|
21968
|
+
finalQuery.push({
|
|
21969
|
+
multi_match: {
|
|
21970
|
+
query: value,
|
|
21971
|
+
fields: fields,
|
|
21972
|
+
type: 'cross_fields',
|
|
21973
|
+
operator: 'and'
|
|
21974
|
+
}
|
|
21975
|
+
});
|
|
21976
|
+
finalQuery.push({
|
|
21977
|
+
multi_match: {
|
|
21978
|
+
query: value,
|
|
21979
|
+
fields: fields,
|
|
21980
|
+
type: 'phrase',
|
|
21981
|
+
operator: 'and'
|
|
21982
|
+
}
|
|
21983
|
+
});
|
|
21984
|
+
|
|
21985
|
+
if (phrasePrefixFields.length > 0) {
|
|
21986
|
+
finalQuery.push({
|
|
21987
|
+
multi_match: {
|
|
21988
|
+
query: value,
|
|
21989
|
+
fields: phrasePrefixFields,
|
|
21990
|
+
type: 'phrase_prefix',
|
|
21991
|
+
operator: 'and'
|
|
21992
|
+
}
|
|
21993
|
+
});
|
|
21994
|
+
}
|
|
21995
|
+
|
|
21996
|
+
return finalQuery;
|
|
21997
|
+
}
|
|
21998
|
+
|
|
21999
|
+
finalQuery.push({
|
|
22000
|
+
multi_match: {
|
|
22001
|
+
query: value,
|
|
22002
|
+
fields: fields,
|
|
22003
|
+
type: 'best_fields',
|
|
22004
|
+
operator: 'or',
|
|
22005
|
+
fuzziness: props.fuzziness ? props.fuzziness : 0
|
|
22006
|
+
}
|
|
22007
|
+
});
|
|
22008
|
+
finalQuery.push({
|
|
22009
|
+
multi_match: {
|
|
22010
|
+
query: value,
|
|
22011
|
+
fields: fields,
|
|
22012
|
+
type: 'phrase',
|
|
22013
|
+
operator: 'or'
|
|
22014
|
+
}
|
|
22015
|
+
});
|
|
22016
|
+
|
|
22017
|
+
if (phrasePrefixFields.length > 0) {
|
|
22018
|
+
finalQuery.push({
|
|
22019
|
+
multi_match: {
|
|
22020
|
+
query: value,
|
|
22021
|
+
fields: phrasePrefixFields,
|
|
22022
|
+
type: 'phrase_prefix',
|
|
22023
|
+
operator: 'or'
|
|
22024
|
+
}
|
|
22025
|
+
});
|
|
22026
|
+
}
|
|
22027
|
+
|
|
22028
|
+
return finalQuery;
|
|
22029
|
+
};
|
|
22030
|
+
|
|
22031
|
+
var mapStateToProps$4 = function mapStateToProps(state, props) {
|
|
20593
22032
|
return {
|
|
20594
22033
|
selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || null,
|
|
22034
|
+
selectedCategory: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].category || null,
|
|
20595
22035
|
suggestions: state.hits[props.componentId] && state.hits[props.componentId].hits,
|
|
20596
22036
|
rawData: state.rawData[props.componentId],
|
|
20597
22037
|
aggregationData: state.compositeAggregations[props.componentId] || [],
|
|
20598
|
-
isLoading: !!state.isLoading[props.componentId + "_active"],
|
|
20599
22038
|
themePreset: state.config.themePreset,
|
|
22039
|
+
isLoading: !!state.isLoading[props.componentId + "_active"],
|
|
20600
22040
|
error: state.error[props.componentId],
|
|
20601
|
-
analytics: state.analytics,
|
|
20602
22041
|
enableAppbase: state.config.enableAppbase,
|
|
20603
|
-
headers: state.appbaseRef.headers,
|
|
20604
|
-
promotedResults: state.promotedResults[props.componentId] || [],
|
|
20605
|
-
customData: state.customData[props.componentId],
|
|
20606
22042
|
time: state.hits[props.componentId] && state.hits[props.componentId].time || 0,
|
|
20607
22043
|
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
|
|
22044
|
+
hidden: state.hits[props.componentId] && state.hits[props.componentId].hidden
|
|
20614
22045
|
};
|
|
20615
22046
|
};
|
|
20616
22047
|
|
|
20617
|
-
var mapDispatchToProps$
|
|
20618
|
-
|
|
20619
|
-
|
|
20620
|
-
|
|
20621
|
-
|
|
20622
|
-
setCustomHighlightOptions: setCustomHighlightOptions,
|
|
20623
|
-
recordSuggestionClick: recordSuggestionClick,
|
|
20624
|
-
loadPopularSuggestions: loadPopularSuggestions,
|
|
20625
|
-
getRecentSearches: getRecentSearches
|
|
22048
|
+
var mapDispatchToProps$3 = {
|
|
22049
|
+
updateQuery: updateQuery$2,
|
|
22050
|
+
setCustomQuery: setCustomQuery$1,
|
|
22051
|
+
setDefaultQuery: setDefaultQuery$2,
|
|
22052
|
+
recordSuggestionClick: recordSuggestionClick$1
|
|
20626
22053
|
};
|
|
20627
|
-
var DSConnected = ComponentWrapper$1(connect(mapStateToProps$
|
|
20628
|
-
componentType: constants_1$1.
|
|
20629
|
-
internalComponent:
|
|
22054
|
+
var DSConnected$1 = ComponentWrapper$1(connect(mapStateToProps$4, mapDispatchToProps$3)(SearchBox), {
|
|
22055
|
+
componentType: constants_1$1.searchBox,
|
|
22056
|
+
internalComponent: true
|
|
20630
22057
|
});
|
|
20631
22058
|
|
|
20632
|
-
|
|
20633
|
-
Vue.component(
|
|
22059
|
+
SearchBox.install = function (Vue) {
|
|
22060
|
+
Vue.component(SearchBox.name, DSConnected$1);
|
|
20634
22061
|
}; // Add componentType for SSR
|
|
20635
22062
|
|
|
20636
22063
|
|
|
20637
|
-
|
|
22064
|
+
SearchBox.componentType = constants_1$1.searchBox;
|
|
20638
22065
|
|
|
20639
|
-
var _templateObject$
|
|
22066
|
+
var _templateObject$k, _templateObject2$7, _templateObject3$6, _templateObject4$5, _templateObject5$3, _templateObject6$3;
|
|
20640
22067
|
var item = {
|
|
20641
22068
|
width: '15px',
|
|
20642
22069
|
height: '15px',
|
|
20643
22070
|
scale: '4px'
|
|
20644
22071
|
};
|
|
20645
|
-
var vh = css(_templateObject$
|
|
22072
|
+
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
22073
|
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
22074
|
|
|
20648
22075
|
var formItem = function formItem(_ref) {
|
|
@@ -20727,14 +22154,14 @@
|
|
|
20727
22154
|
return _extends({}, clonedQuery, extractQuery(props));
|
|
20728
22155
|
};
|
|
20729
22156
|
|
|
20730
|
-
var updateQuery$
|
|
22157
|
+
var updateQuery$3 = lib_5.updateQuery,
|
|
20731
22158
|
setQueryOptions$2 = lib_5.setQueryOptions,
|
|
20732
|
-
setCustomQuery$
|
|
20733
|
-
setDefaultQuery$
|
|
22159
|
+
setCustomQuery$2 = lib_5.setCustomQuery,
|
|
22160
|
+
setDefaultQuery$3 = lib_5.setDefaultQuery;
|
|
20734
22161
|
var getQueryOptions$1 = lib_8.getQueryOptions,
|
|
20735
|
-
checkValueChange$
|
|
20736
|
-
getClassName$
|
|
20737
|
-
isEqual$
|
|
22162
|
+
checkValueChange$2 = lib_8.checkValueChange,
|
|
22163
|
+
getClassName$5 = lib_8.getClassName,
|
|
22164
|
+
isEqual$6 = lib_8.isEqual,
|
|
20738
22165
|
extractQueryFromCustomQuery$2 = lib_8.extractQueryFromCustomQuery,
|
|
20739
22166
|
getOptionsForCustomQuery$2 = lib_8.getOptionsForCustomQuery;
|
|
20740
22167
|
var SingleList = {
|
|
@@ -20823,7 +22250,7 @@
|
|
|
20823
22250
|
this.setValue(newVal);
|
|
20824
22251
|
},
|
|
20825
22252
|
value: function value(newVal, oldVal) {
|
|
20826
|
-
if (!isEqual$
|
|
22253
|
+
if (!isEqual$6(newVal, oldVal)) {
|
|
20827
22254
|
this.setValue(newVal);
|
|
20828
22255
|
}
|
|
20829
22256
|
},
|
|
@@ -20886,14 +22313,14 @@
|
|
|
20886
22313
|
return h(Container, {
|
|
20887
22314
|
"class": this.$props.className
|
|
20888
22315
|
}, [this.$props.title && h(Title, {
|
|
20889
|
-
"class": getClassName$
|
|
22316
|
+
"class": getClassName$5(this.$props.innerClass, 'title') || ''
|
|
20890
22317
|
}, [this.$props.title]), this.renderSearch(), this.hasCustomRenderer ? this.getComponent() : h(UL, {
|
|
20891
|
-
"class": getClassName$
|
|
22318
|
+
"class": getClassName$5(this.$props.innerClass, 'list') || ''
|
|
20892
22319
|
}, [selectAllLabel ? h("li", {
|
|
20893
22320
|
"key": selectAllLabel,
|
|
20894
22321
|
"class": "" + (this.$data.currentValue === selectAllLabel ? 'active' : '')
|
|
20895
22322
|
}, [h(Radio, {
|
|
20896
|
-
"class": getClassName$
|
|
22323
|
+
"class": getClassName$5(this.$props.innerClass, 'radio'),
|
|
20897
22324
|
"attrs": {
|
|
20898
22325
|
"id": this.$props.componentId + "-" + selectAllLabel,
|
|
20899
22326
|
"name": this.$props.componentId,
|
|
@@ -20908,7 +22335,7 @@
|
|
|
20908
22335
|
checked: this.$data.currentValue === selectAllLabel
|
|
20909
22336
|
})
|
|
20910
22337
|
}), h("label", {
|
|
20911
|
-
"class": getClassName$
|
|
22338
|
+
"class": getClassName$5(this.$props.innerClass, 'label') || null,
|
|
20912
22339
|
"attrs": {
|
|
20913
22340
|
"for": this.$props.componentId + "-" + selectAllLabel
|
|
20914
22341
|
}
|
|
@@ -20917,7 +22344,7 @@
|
|
|
20917
22344
|
"key": item.key,
|
|
20918
22345
|
"class": "" + (_this.currentValue === String(item.key) ? 'active' : '')
|
|
20919
22346
|
}, [h(Radio, {
|
|
20920
|
-
"class": getClassName$
|
|
22347
|
+
"class": getClassName$5(_this.$props.innerClass, 'radio'),
|
|
20921
22348
|
"attrs": {
|
|
20922
22349
|
"id": _this.$props.componentId + "-" + item.key,
|
|
20923
22350
|
"name": _this.$props.componentId,
|
|
@@ -20933,7 +22360,7 @@
|
|
|
20933
22360
|
checked: _this.currentValue === String(item.key)
|
|
20934
22361
|
})
|
|
20935
22362
|
}), h("label", {
|
|
20936
|
-
"class": getClassName$
|
|
22363
|
+
"class": getClassName$5(_this.$props.innerClass, 'label') || null,
|
|
20937
22364
|
"attrs": {
|
|
20938
22365
|
"for": _this.$props.componentId + "-" + item.key
|
|
20939
22366
|
}
|
|
@@ -20942,7 +22369,7 @@
|
|
|
20942
22369
|
count: item.doc_count,
|
|
20943
22370
|
isChecked: _this.currentValue === String(item.key)
|
|
20944
22371
|
}) : h("span", [item.key, _this.$props.showCount && h("span", {
|
|
20945
|
-
"class": getClassName$
|
|
22372
|
+
"class": getClassName$5(_this.$props.innerClass, 'count') || null
|
|
20946
22373
|
}, ["\xA0(", item.doc_count, ")"])])])]);
|
|
20947
22374
|
})])]);
|
|
20948
22375
|
},
|
|
@@ -20970,7 +22397,7 @@
|
|
|
20970
22397
|
_this2.$emit('value-change', value);
|
|
20971
22398
|
};
|
|
20972
22399
|
|
|
20973
|
-
checkValueChange$
|
|
22400
|
+
checkValueChange$2(props.componentId, value, props.beforeValueChange, performUpdate);
|
|
20974
22401
|
},
|
|
20975
22402
|
updateDefaultQueryHandler: function updateDefaultQueryHandler(value, props) {
|
|
20976
22403
|
var query = SingleList.defaultQuery(value, props);
|
|
@@ -21042,7 +22469,7 @@
|
|
|
21042
22469
|
|
|
21043
22470
|
if (this.$props.showSearch) {
|
|
21044
22471
|
return h(Input, {
|
|
21045
|
-
"class": getClassName$
|
|
22472
|
+
"class": getClassName$5(this.$props.innerClass, 'input') || '',
|
|
21046
22473
|
"on": {
|
|
21047
22474
|
"input": this.handleInputChange
|
|
21048
22475
|
},
|
|
@@ -21105,7 +22532,7 @@
|
|
|
21105
22532
|
var h = this.$createElement;
|
|
21106
22533
|
var renderNoResults = this.$scopedSlots.renderNoResults || this.$props.renderNoResults;
|
|
21107
22534
|
return h("p", {
|
|
21108
|
-
"class": getClassName$
|
|
22535
|
+
"class": getClassName$5(this.$props.innerClass, 'noResults') || null
|
|
21109
22536
|
}, [isFunction$1(renderNoResults) ? renderNoResults() : renderNoResults]);
|
|
21110
22537
|
}
|
|
21111
22538
|
},
|
|
@@ -21176,7 +22603,7 @@
|
|
|
21176
22603
|
return true;
|
|
21177
22604
|
};
|
|
21178
22605
|
|
|
21179
|
-
var mapStateToProps$
|
|
22606
|
+
var mapStateToProps$5 = function mapStateToProps(state, props) {
|
|
21180
22607
|
return {
|
|
21181
22608
|
options: props.nestedField && state.aggregations[props.componentId] ? state.aggregations[props.componentId].reactivesearch_nested : state.aggregations[props.componentId],
|
|
21182
22609
|
rawData: state.rawData[props.componentId],
|
|
@@ -21191,11 +22618,11 @@
|
|
|
21191
22618
|
|
|
21192
22619
|
var mapDispatchtoProps$2 = {
|
|
21193
22620
|
setQueryOptions: setQueryOptions$2,
|
|
21194
|
-
updateQuery: updateQuery$
|
|
21195
|
-
setCustomQuery: setCustomQuery$
|
|
21196
|
-
setDefaultQuery: setDefaultQuery$
|
|
22621
|
+
updateQuery: updateQuery$3,
|
|
22622
|
+
setCustomQuery: setCustomQuery$2,
|
|
22623
|
+
setDefaultQuery: setDefaultQuery$3
|
|
21197
22624
|
};
|
|
21198
|
-
var ListConnected = ComponentWrapper$1(connect(mapStateToProps$
|
|
22625
|
+
var ListConnected = ComponentWrapper$1(connect(mapStateToProps$5, mapDispatchtoProps$2)(SingleList), {
|
|
21199
22626
|
componentType: constants_1$1.singleList,
|
|
21200
22627
|
internalComponent: SingleList.hasInternalComponent()
|
|
21201
22628
|
});
|
|
@@ -21207,14 +22634,14 @@
|
|
|
21207
22634
|
|
|
21208
22635
|
SingleList.componentType = constants_1$1.singleList;
|
|
21209
22636
|
|
|
21210
|
-
var updateQuery$
|
|
22637
|
+
var updateQuery$4 = lib_5.updateQuery,
|
|
21211
22638
|
setQueryOptions$3 = lib_5.setQueryOptions,
|
|
21212
|
-
setCustomQuery$
|
|
21213
|
-
setDefaultQuery$
|
|
21214
|
-
var isEqual$
|
|
22639
|
+
setCustomQuery$3 = lib_5.setCustomQuery,
|
|
22640
|
+
setDefaultQuery$4 = lib_5.setDefaultQuery;
|
|
22641
|
+
var isEqual$7 = lib_8.isEqual,
|
|
21215
22642
|
getQueryOptions$2 = lib_8.getQueryOptions,
|
|
21216
|
-
checkValueChange$
|
|
21217
|
-
getClassName$
|
|
22643
|
+
checkValueChange$3 = lib_8.checkValueChange,
|
|
22644
|
+
getClassName$6 = lib_8.getClassName,
|
|
21218
22645
|
extractQueryFromCustomQuery$3 = lib_8.extractQueryFromCustomQuery,
|
|
21219
22646
|
getOptionsForCustomQuery$3 = lib_8.getOptionsForCustomQuery;
|
|
21220
22647
|
var MultiList = {
|
|
@@ -21281,7 +22708,7 @@
|
|
|
21281
22708
|
mounted: function mounted() {
|
|
21282
22709
|
var currentValue = Object.keys(this.$data.currentValue);
|
|
21283
22710
|
|
|
21284
|
-
if (this.$props.value !== undefined && !isEqual$
|
|
22711
|
+
if (this.$props.value !== undefined && !isEqual$7(this.$props.value, currentValue)) {
|
|
21285
22712
|
this.$emit('change', currentValue);
|
|
21286
22713
|
}
|
|
21287
22714
|
},
|
|
@@ -21302,12 +22729,12 @@
|
|
|
21302
22729
|
this.updateQueryHandler(this.$data.currentValue, this.$props);
|
|
21303
22730
|
},
|
|
21304
22731
|
value: function value(newVal, oldVal) {
|
|
21305
|
-
if (!isEqual$
|
|
22732
|
+
if (!isEqual$7(oldVal, newVal)) {
|
|
21306
22733
|
this.setValue(newVal, true);
|
|
21307
22734
|
}
|
|
21308
22735
|
},
|
|
21309
22736
|
defaultValue: function defaultValue(newVal, oldVal) {
|
|
21310
|
-
if (!isEqual$
|
|
22737
|
+
if (!isEqual$7(oldVal, newVal)) {
|
|
21311
22738
|
this.setValue(newVal, true);
|
|
21312
22739
|
}
|
|
21313
22740
|
},
|
|
@@ -21326,7 +22753,7 @@
|
|
|
21326
22753
|
}
|
|
21327
22754
|
}
|
|
21328
22755
|
|
|
21329
|
-
if (!isEqual$
|
|
22756
|
+
if (!isEqual$7(selectedValue, newVal)) {
|
|
21330
22757
|
if (this.value === undefined) {
|
|
21331
22758
|
this.setValue(newVal, true);
|
|
21332
22759
|
} else {
|
|
@@ -21388,9 +22815,9 @@
|
|
|
21388
22815
|
return h(Container, {
|
|
21389
22816
|
"class": this.$props.className
|
|
21390
22817
|
}, [this.$props.title && h(Title, {
|
|
21391
|
-
"class": getClassName$
|
|
22818
|
+
"class": getClassName$6(this.$props.innerClass, 'title')
|
|
21392
22819
|
}, [this.$props.title]), this.renderSearch(), this.hasCustomRenderer ? this.getComponent() : h(UL, {
|
|
21393
|
-
"class": getClassName$
|
|
22820
|
+
"class": getClassName$6(this.$props.innerClass, 'list')
|
|
21394
22821
|
}, [selectAllLabel ? h("li", {
|
|
21395
22822
|
"key": selectAllLabel,
|
|
21396
22823
|
"class": "" + (this.currentValue[selectAllLabel] ? 'active' : '')
|
|
@@ -21402,7 +22829,7 @@
|
|
|
21402
22829
|
"value": selectAllLabel,
|
|
21403
22830
|
"show": this.$props.showCheckbox
|
|
21404
22831
|
},
|
|
21405
|
-
"class": getClassName$
|
|
22832
|
+
"class": getClassName$6(this.$props.innerClass, 'checkbox'),
|
|
21406
22833
|
"on": {
|
|
21407
22834
|
"click": this.handleClick
|
|
21408
22835
|
},
|
|
@@ -21410,7 +22837,7 @@
|
|
|
21410
22837
|
checked: !!this.currentValue[selectAllLabel]
|
|
21411
22838
|
})
|
|
21412
22839
|
}), h("label", {
|
|
21413
|
-
"class": getClassName$
|
|
22840
|
+
"class": getClassName$6(this.$props.innerClass, 'label'),
|
|
21414
22841
|
"attrs": {
|
|
21415
22842
|
"for": this.$props.componentId + "-" + selectAllLabel
|
|
21416
22843
|
}
|
|
@@ -21426,7 +22853,7 @@
|
|
|
21426
22853
|
"value": item.key,
|
|
21427
22854
|
"show": _this2.$props.showCheckbox
|
|
21428
22855
|
},
|
|
21429
|
-
"class": getClassName$
|
|
22856
|
+
"class": getClassName$6(_this2.$props.innerClass, 'checkbox'),
|
|
21430
22857
|
"on": {
|
|
21431
22858
|
"click": _this2.handleClick
|
|
21432
22859
|
},
|
|
@@ -21434,7 +22861,7 @@
|
|
|
21434
22861
|
checked: !!_this2.$data.currentValue[item.key]
|
|
21435
22862
|
})
|
|
21436
22863
|
}), h("label", {
|
|
21437
|
-
"class": getClassName$
|
|
22864
|
+
"class": getClassName$6(_this2.$props.innerClass, 'label'),
|
|
21438
22865
|
"attrs": {
|
|
21439
22866
|
"for": _this2.$props.componentId + "-" + item.key
|
|
21440
22867
|
}
|
|
@@ -21443,7 +22870,7 @@
|
|
|
21443
22870
|
count: item.doc_count,
|
|
21444
22871
|
isChecked: !!_this2.$data.currentValue[item.key]
|
|
21445
22872
|
}) : h("span", [item.key, _this2.$props.showCount && h("span", {
|
|
21446
|
-
"class": getClassName$
|
|
22873
|
+
"class": getClassName$6(_this2.$props.innerClass, 'count')
|
|
21447
22874
|
}, ["\xA0(", item.doc_count, ")"])])])]);
|
|
21448
22875
|
})])]);
|
|
21449
22876
|
},
|
|
@@ -21527,7 +22954,7 @@
|
|
|
21527
22954
|
_this3.$emit('value-change', finalValues);
|
|
21528
22955
|
};
|
|
21529
22956
|
|
|
21530
|
-
checkValueChange$
|
|
22957
|
+
checkValueChange$3(props.componentId, finalValues, props.beforeValueChange, performUpdate);
|
|
21531
22958
|
},
|
|
21532
22959
|
updateDefaultQueryHandler: function updateDefaultQueryHandler(value, props) {
|
|
21533
22960
|
var query = MultiList.defaultQuery(value, props);
|
|
@@ -21599,7 +23026,7 @@
|
|
|
21599
23026
|
|
|
21600
23027
|
if (this.$props.showSearch) {
|
|
21601
23028
|
return h(Input, {
|
|
21602
|
-
"class": getClassName$
|
|
23029
|
+
"class": getClassName$6(this.$props.innerClass, 'input') || '',
|
|
21603
23030
|
"on": {
|
|
21604
23031
|
"input": this.handleInputChange
|
|
21605
23032
|
},
|
|
@@ -21657,7 +23084,7 @@
|
|
|
21657
23084
|
var h = this.$createElement;
|
|
21658
23085
|
var renderNoResults = this.$scopedSlots.renderNoResults || this.$props.renderNoResults;
|
|
21659
23086
|
return h("p", {
|
|
21660
|
-
"class": getClassName$
|
|
23087
|
+
"class": getClassName$6(this.$props.innerClass, 'noResults') || null
|
|
21661
23088
|
}, [isFunction$1(renderNoResults) ? renderNoResults() : renderNoResults]);
|
|
21662
23089
|
}
|
|
21663
23090
|
},
|
|
@@ -21764,7 +23191,7 @@
|
|
|
21764
23191
|
return getAggsQuery(queryOptions, props);
|
|
21765
23192
|
};
|
|
21766
23193
|
|
|
21767
|
-
var mapStateToProps$
|
|
23194
|
+
var mapStateToProps$6 = function mapStateToProps(state, props) {
|
|
21768
23195
|
return {
|
|
21769
23196
|
options: props.nestedField && state.aggregations[props.componentId] ? state.aggregations[props.componentId].reactivesearch_nested : state.aggregations[props.componentId],
|
|
21770
23197
|
rawData: state.rawData[props.componentId],
|
|
@@ -21779,16 +23206,16 @@
|
|
|
21779
23206
|
|
|
21780
23207
|
var mapDispatchtoProps$3 = {
|
|
21781
23208
|
setQueryOptions: setQueryOptions$3,
|
|
21782
|
-
updateQuery: updateQuery$
|
|
21783
|
-
setCustomQuery: setCustomQuery$
|
|
21784
|
-
setDefaultQuery: setDefaultQuery$
|
|
23209
|
+
updateQuery: updateQuery$4,
|
|
23210
|
+
setCustomQuery: setCustomQuery$3,
|
|
23211
|
+
setDefaultQuery: setDefaultQuery$4
|
|
21785
23212
|
};
|
|
21786
23213
|
|
|
21787
23214
|
MultiList.hasInternalComponent = function () {
|
|
21788
23215
|
return true;
|
|
21789
23216
|
};
|
|
21790
23217
|
|
|
21791
|
-
var ListConnected$1 = ComponentWrapper$1(connect(mapStateToProps$
|
|
23218
|
+
var ListConnected$1 = ComponentWrapper$1(connect(mapStateToProps$6, mapDispatchtoProps$3)(MultiList), {
|
|
21792
23219
|
componentType: constants_1$1.multiList,
|
|
21793
23220
|
internalComponent: MultiList.hasInternalComponent()
|
|
21794
23221
|
});
|
|
@@ -21800,8 +23227,8 @@
|
|
|
21800
23227
|
|
|
21801
23228
|
MultiList.componentType = constants_1$1.multiList;
|
|
21802
23229
|
|
|
21803
|
-
var _templateObject$
|
|
21804
|
-
var small = css(_templateObject$
|
|
23230
|
+
var _templateObject$l, _templateObject2$8, _templateObject3$7, _templateObject4$6;
|
|
23231
|
+
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
23232
|
|
|
21806
23233
|
var dark$2 = function dark(_ref) {
|
|
21807
23234
|
var theme = _ref.theme;
|
|
@@ -21819,13 +23246,13 @@
|
|
|
21819
23246
|
return theme.colors.primaryColor;
|
|
21820
23247
|
});
|
|
21821
23248
|
|
|
21822
|
-
var _templateObject$
|
|
21823
|
-
var open = css(_templateObject$
|
|
23249
|
+
var _templateObject$m, _templateObject2$9;
|
|
23250
|
+
var open = css(_templateObject$m || (_templateObject$m = _taggedTemplateLiteralLoose(["\n\ttop: 0.55em;\n\ttransform: rotate(-45deg);\n"])));
|
|
21824
23251
|
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
23252
|
return props.open ? open : null;
|
|
21826
23253
|
});
|
|
21827
23254
|
|
|
21828
|
-
var getClassName$
|
|
23255
|
+
var getClassName$7 = lib_8.getClassName;
|
|
21829
23256
|
var Dropdown = {
|
|
21830
23257
|
data: function data() {
|
|
21831
23258
|
this.__state = {
|
|
@@ -21919,7 +23346,7 @@
|
|
|
21919
23346
|
"on": _extends({}, _extends({}, getButtonProps({
|
|
21920
23347
|
onClick: _this.toggle
|
|
21921
23348
|
}))),
|
|
21922
|
-
"class": getClassName$
|
|
23349
|
+
"class": getClassName$7(_this.$props.innerClass, 'select') || '',
|
|
21923
23350
|
"attrs": {
|
|
21924
23351
|
"title": selectedItem ? _this.renderToString(selectedItem) : placeholder,
|
|
21925
23352
|
"small": _this.$props.small,
|
|
@@ -21936,7 +23363,7 @@
|
|
|
21936
23363
|
getButtonProps: getButtonProps,
|
|
21937
23364
|
getItemEvents: getItemEvents
|
|
21938
23365
|
}) : isOpen && itemsToRender.length ? h("ul", {
|
|
21939
|
-
"class": suggestions$1(themePreset, _this.theme) + " " + (_this.$props.small ? 'small' : '') + " " + getClassName$
|
|
23366
|
+
"class": suggestions$1(themePreset, _this.theme) + " " + (_this.$props.small ? 'small' : '') + " " + getClassName$7(_this.$props.innerClass, 'list')
|
|
21940
23367
|
}, [_this.$props.showSearch ? _this.renderSearchbox({
|
|
21941
23368
|
on: {
|
|
21942
23369
|
input: getInputEvents({
|
|
@@ -21971,9 +23398,9 @@
|
|
|
21971
23398
|
"innerHTML": item[labelField]
|
|
21972
23399
|
}
|
|
21973
23400
|
}) : item[labelField], _this.$props.showCount && item.doc_count && h("span", {
|
|
21974
|
-
"class": getClassName$
|
|
23401
|
+
"class": getClassName$7(_this.$props.innerClass, 'count') || ''
|
|
21975
23402
|
}, ["\xA0(", item.doc_count, ")"])]), selected && _this.$props.multi ? h(Tick, {
|
|
21976
|
-
"class": getClassName$
|
|
23403
|
+
"class": getClassName$7(_this.$props.innerClass, 'icon') || ''
|
|
21977
23404
|
}) : null]);
|
|
21978
23405
|
}), footer]) : null]);
|
|
21979
23406
|
}
|
|
@@ -22061,7 +23488,7 @@
|
|
|
22061
23488
|
var h = this.$createElement;
|
|
22062
23489
|
var renderNoResults = this.$scopedSlots.renderNoResults || this.$props.renderNoResults;
|
|
22063
23490
|
return h("p", {
|
|
22064
|
-
"class": getClassName$
|
|
23491
|
+
"class": getClassName$7(this.$props.innerClass, 'noResults') || null
|
|
22065
23492
|
}, [isFunction$1(renderNoResults) ? renderNoResults() : renderNoResults]);
|
|
22066
23493
|
},
|
|
22067
23494
|
renderSearchbox: function renderSearchbox(eventObject) {
|
|
@@ -22085,7 +23512,7 @@
|
|
|
22085
23512
|
border: 0,
|
|
22086
23513
|
borderBottom: '1px solid #ddd'
|
|
22087
23514
|
},
|
|
22088
|
-
"class": getClassName$
|
|
23515
|
+
"class": getClassName$7(innerClass, 'input')
|
|
22089
23516
|
}, eventObject]));
|
|
22090
23517
|
|
|
22091
23518
|
if (showClear) {
|
|
@@ -22109,16 +23536,16 @@
|
|
|
22109
23536
|
}
|
|
22110
23537
|
};
|
|
22111
23538
|
|
|
22112
|
-
var updateQuery$
|
|
23539
|
+
var updateQuery$5 = lib_5.updateQuery,
|
|
22113
23540
|
setQueryOptions$4 = lib_5.setQueryOptions,
|
|
22114
|
-
setCustomQuery$
|
|
22115
|
-
setDefaultQuery$
|
|
23541
|
+
setCustomQuery$4 = lib_5.setCustomQuery,
|
|
23542
|
+
setDefaultQuery$5 = lib_5.setDefaultQuery;
|
|
22116
23543
|
var getQueryOptions$3 = lib_8.getQueryOptions,
|
|
22117
|
-
checkValueChange$
|
|
23544
|
+
checkValueChange$4 = lib_8.checkValueChange,
|
|
22118
23545
|
checkPropChange$1 = lib_8.checkPropChange,
|
|
22119
|
-
getClassName$
|
|
22120
|
-
isEqual$
|
|
22121
|
-
getCompositeAggsQuery$
|
|
23546
|
+
getClassName$8 = lib_8.getClassName,
|
|
23547
|
+
isEqual$8 = lib_8.isEqual,
|
|
23548
|
+
getCompositeAggsQuery$3 = lib_8.getCompositeAggsQuery,
|
|
22122
23549
|
extractQueryFromCustomQuery$4 = lib_8.extractQueryFromCustomQuery,
|
|
22123
23550
|
getOptionsForCustomQuery$4 = lib_8.getOptionsForCustomQuery;
|
|
22124
23551
|
var SingleDropdownList = {
|
|
@@ -22241,7 +23668,7 @@
|
|
|
22241
23668
|
this.setValue(newVal);
|
|
22242
23669
|
},
|
|
22243
23670
|
value: function value(newVal, oldVal) {
|
|
22244
|
-
if (!isEqual$
|
|
23671
|
+
if (!isEqual$8(newVal, oldVal)) {
|
|
22245
23672
|
this.setValue(newVal);
|
|
22246
23673
|
}
|
|
22247
23674
|
},
|
|
@@ -22301,7 +23728,7 @@
|
|
|
22301
23728
|
return h(Container, {
|
|
22302
23729
|
"class": this.$props.className
|
|
22303
23730
|
}, [this.$props.title && h(Title, {
|
|
22304
|
-
"class": getClassName$
|
|
23731
|
+
"class": getClassName$8(this.$props.innerClass, 'title') || ''
|
|
22305
23732
|
}, [this.$props.title]), h(Dropdown, {
|
|
22306
23733
|
"attrs": {
|
|
22307
23734
|
"innerClass": this.$props.innerClass,
|
|
@@ -22357,7 +23784,7 @@
|
|
|
22357
23784
|
_this2.$emit('value-change', value);
|
|
22358
23785
|
};
|
|
22359
23786
|
|
|
22360
|
-
checkValueChange$
|
|
23787
|
+
checkValueChange$4(props.componentId, value, props.beforeValueChange, performUpdate);
|
|
22361
23788
|
},
|
|
22362
23789
|
handleChange: function handleChange(item) {
|
|
22363
23790
|
var value = this.$props.value;
|
|
@@ -22416,7 +23843,7 @@
|
|
|
22416
23843
|
},
|
|
22417
23844
|
generateQueryOptions: function generateQueryOptions(props, after) {
|
|
22418
23845
|
var queryOptions = getQueryOptions$3(props);
|
|
22419
|
-
return props.showLoadMore ? getCompositeAggsQuery$
|
|
23846
|
+
return props.showLoadMore ? getCompositeAggsQuery$3({
|
|
22420
23847
|
query: queryOptions,
|
|
22421
23848
|
props: props,
|
|
22422
23849
|
after: after
|
|
@@ -22522,7 +23949,7 @@
|
|
|
22522
23949
|
|
|
22523
23950
|
SingleDropdownList.generateQueryOptions = function (props, after) {
|
|
22524
23951
|
var queryOptions = getQueryOptions$3(props);
|
|
22525
|
-
return props.showLoadMore ? getCompositeAggsQuery$
|
|
23952
|
+
return props.showLoadMore ? getCompositeAggsQuery$3({
|
|
22526
23953
|
query: queryOptions,
|
|
22527
23954
|
props: props,
|
|
22528
23955
|
after: after
|
|
@@ -22533,7 +23960,7 @@
|
|
|
22533
23960
|
return true;
|
|
22534
23961
|
};
|
|
22535
23962
|
|
|
22536
|
-
var mapStateToProps$
|
|
23963
|
+
var mapStateToProps$7 = function mapStateToProps(state, props) {
|
|
22537
23964
|
return {
|
|
22538
23965
|
options: props.nestedField && state.aggregations[props.componentId] ? state.aggregations[props.componentId].reactivesearch_nested : state.aggregations[props.componentId],
|
|
22539
23966
|
rawData: state.rawData[props.componentId],
|
|
@@ -22548,11 +23975,11 @@
|
|
|
22548
23975
|
|
|
22549
23976
|
var mapDispatchtoProps$4 = {
|
|
22550
23977
|
setQueryOptions: setQueryOptions$4,
|
|
22551
|
-
updateQuery: updateQuery$
|
|
22552
|
-
setCustomQuery: setCustomQuery$
|
|
22553
|
-
setDefaultQuery: setDefaultQuery$
|
|
23978
|
+
updateQuery: updateQuery$5,
|
|
23979
|
+
setCustomQuery: setCustomQuery$4,
|
|
23980
|
+
setDefaultQuery: setDefaultQuery$5
|
|
22554
23981
|
};
|
|
22555
|
-
var ListConnected$2 = ComponentWrapper$1(connect(mapStateToProps$
|
|
23982
|
+
var ListConnected$2 = ComponentWrapper$1(connect(mapStateToProps$7, mapDispatchtoProps$4)(SingleDropdownList), {
|
|
22556
23983
|
componentType: constants_1$1.singleDropdownList,
|
|
22557
23984
|
internalComponent: SingleDropdownList.hasInternalComponent()
|
|
22558
23985
|
});
|
|
@@ -22564,16 +23991,16 @@
|
|
|
22564
23991
|
|
|
22565
23992
|
SingleDropdownList.componentType = constants_1$1.singleDropdownList;
|
|
22566
23993
|
|
|
22567
|
-
var updateQuery$
|
|
23994
|
+
var updateQuery$6 = lib_5.updateQuery,
|
|
22568
23995
|
setQueryOptions$5 = lib_5.setQueryOptions,
|
|
22569
|
-
setCustomQuery$
|
|
22570
|
-
setDefaultQuery$
|
|
22571
|
-
var isEqual$
|
|
23996
|
+
setCustomQuery$5 = lib_5.setCustomQuery,
|
|
23997
|
+
setDefaultQuery$6 = lib_5.setDefaultQuery;
|
|
23998
|
+
var isEqual$9 = lib_8.isEqual,
|
|
22572
23999
|
getQueryOptions$4 = lib_8.getQueryOptions,
|
|
22573
|
-
checkValueChange$
|
|
24000
|
+
checkValueChange$5 = lib_8.checkValueChange,
|
|
22574
24001
|
checkPropChange$2 = lib_8.checkPropChange,
|
|
22575
|
-
getClassName$
|
|
22576
|
-
getCompositeAggsQuery$
|
|
24002
|
+
getClassName$9 = lib_8.getClassName,
|
|
24003
|
+
getCompositeAggsQuery$4 = lib_8.getCompositeAggsQuery,
|
|
22577
24004
|
extractQueryFromCustomQuery$5 = lib_8.extractQueryFromCustomQuery,
|
|
22578
24005
|
getOptionsForCustomQuery$5 = lib_8.getOptionsForCustomQuery;
|
|
22579
24006
|
var MultiDropdownList = {
|
|
@@ -22665,7 +24092,7 @@
|
|
|
22665
24092
|
}
|
|
22666
24093
|
}
|
|
22667
24094
|
|
|
22668
|
-
if (!isEqual$
|
|
24095
|
+
if (!isEqual$9(selectedValue, newVal)) {
|
|
22669
24096
|
this.setValue(newVal || [], true);
|
|
22670
24097
|
}
|
|
22671
24098
|
},
|
|
@@ -22716,7 +24143,7 @@
|
|
|
22716
24143
|
this.setValue(newVal, true);
|
|
22717
24144
|
},
|
|
22718
24145
|
value: function value(newVal, oldVal) {
|
|
22719
|
-
if (!isEqual$
|
|
24146
|
+
if (!isEqual$9(newVal, oldVal)) {
|
|
22720
24147
|
this.setValue(newVal, true);
|
|
22721
24148
|
}
|
|
22722
24149
|
},
|
|
@@ -22771,7 +24198,7 @@
|
|
|
22771
24198
|
return h(Container, {
|
|
22772
24199
|
"class": this.$props.className
|
|
22773
24200
|
}, [this.$props.title && h(Title, {
|
|
22774
|
-
"class": getClassName$
|
|
24201
|
+
"class": getClassName$9(this.$props.innerClass, 'title') || ''
|
|
22775
24202
|
}, [this.$props.title]), h(Dropdown, {
|
|
22776
24203
|
"attrs": {
|
|
22777
24204
|
"innerClass": this.$props.innerClass,
|
|
@@ -22896,7 +24323,7 @@
|
|
|
22896
24323
|
_this3.$emit('value-change', finalValues);
|
|
22897
24324
|
};
|
|
22898
24325
|
|
|
22899
|
-
checkValueChange$
|
|
24326
|
+
checkValueChange$5(props.componentId, finalValues, props.beforeValueChange, performUpdate);
|
|
22900
24327
|
},
|
|
22901
24328
|
updateDefaultQueryHandler: function updateDefaultQueryHandler(value, props) {
|
|
22902
24329
|
var query = MultiDropdownList.defaultQuery(value, props);
|
|
@@ -22946,7 +24373,7 @@
|
|
|
22946
24373
|
},
|
|
22947
24374
|
generateQueryOptions: function generateQueryOptions(props, after) {
|
|
22948
24375
|
var queryOptions = getQueryOptions$4(props);
|
|
22949
|
-
return props.showLoadMore ? getCompositeAggsQuery$
|
|
24376
|
+
return props.showLoadMore ? getCompositeAggsQuery$4({
|
|
22950
24377
|
query: queryOptions,
|
|
22951
24378
|
props: props,
|
|
22952
24379
|
after: after
|
|
@@ -23094,7 +24521,7 @@
|
|
|
23094
24521
|
|
|
23095
24522
|
MultiDropdownList.generateQueryOptions = function (props, after) {
|
|
23096
24523
|
var queryOptions = getQueryOptions$4(props);
|
|
23097
|
-
return props.showLoadMore ? getCompositeAggsQuery$
|
|
24524
|
+
return props.showLoadMore ? getCompositeAggsQuery$4({
|
|
23098
24525
|
query: queryOptions,
|
|
23099
24526
|
props: props,
|
|
23100
24527
|
after: after
|
|
@@ -23105,7 +24532,7 @@
|
|
|
23105
24532
|
return true;
|
|
23106
24533
|
};
|
|
23107
24534
|
|
|
23108
|
-
var mapStateToProps$
|
|
24535
|
+
var mapStateToProps$8 = function mapStateToProps(state, props) {
|
|
23109
24536
|
return {
|
|
23110
24537
|
options: props.nestedField && state.aggregations[props.componentId] ? state.aggregations[props.componentId].reactivesearch_nested : state.aggregations[props.componentId],
|
|
23111
24538
|
rawData: state.rawData[props.componentId],
|
|
@@ -23120,11 +24547,11 @@
|
|
|
23120
24547
|
|
|
23121
24548
|
var mapDispatchtoProps$5 = {
|
|
23122
24549
|
setQueryOptions: setQueryOptions$5,
|
|
23123
|
-
updateQuery: updateQuery$
|
|
23124
|
-
setCustomQuery: setCustomQuery$
|
|
23125
|
-
setDefaultQuery: setDefaultQuery$
|
|
24550
|
+
updateQuery: updateQuery$6,
|
|
24551
|
+
setCustomQuery: setCustomQuery$5,
|
|
24552
|
+
setDefaultQuery: setDefaultQuery$6
|
|
23126
24553
|
};
|
|
23127
|
-
var ListConnected$3 = ComponentWrapper$1(connect(mapStateToProps$
|
|
24554
|
+
var ListConnected$3 = ComponentWrapper$1(connect(mapStateToProps$8, mapDispatchtoProps$5)(MultiDropdownList), {
|
|
23128
24555
|
componentType: constants_1$1.multiDropdownList,
|
|
23129
24556
|
internalComponent: MultiDropdownList.hasInternalComponent()
|
|
23130
24557
|
});
|
|
@@ -23136,12 +24563,12 @@
|
|
|
23136
24563
|
|
|
23137
24564
|
MultiDropdownList.componentType = constants_1$1.multiDropdownList;
|
|
23138
24565
|
|
|
23139
|
-
var updateQuery$
|
|
24566
|
+
var updateQuery$7 = lib_5.updateQuery,
|
|
23140
24567
|
setQueryOptions$6 = lib_5.setQueryOptions,
|
|
23141
|
-
setCustomQuery$
|
|
23142
|
-
var isEqual$
|
|
23143
|
-
checkValueChange$
|
|
23144
|
-
getClassName$
|
|
24568
|
+
setCustomQuery$6 = lib_5.setCustomQuery;
|
|
24569
|
+
var isEqual$a = lib_8.isEqual,
|
|
24570
|
+
checkValueChange$6 = lib_8.checkValueChange,
|
|
24571
|
+
getClassName$a = lib_8.getClassName,
|
|
23145
24572
|
getOptionsFromQuery = lib_8.getOptionsFromQuery,
|
|
23146
24573
|
handleA11yAction$1 = lib_8.handleA11yAction;
|
|
23147
24574
|
var ToggleButton = {
|
|
@@ -23200,21 +24627,21 @@
|
|
|
23200
24627
|
this.updateQuery(this.$data.currentValue, this.$props);
|
|
23201
24628
|
},
|
|
23202
24629
|
value: function value(newVal, oldVal) {
|
|
23203
|
-
if (!isEqual$
|
|
24630
|
+
if (!isEqual$a(newVal, oldVal)) {
|
|
23204
24631
|
this.handleToggle(newVal, true, this.$props);
|
|
23205
24632
|
}
|
|
23206
24633
|
},
|
|
23207
24634
|
selectedValue: function selectedValue(newVal, oldVal) {
|
|
23208
24635
|
if (this.$props.multiSelect) {
|
|
23209
24636
|
// for multiselect selectedValue will be an array
|
|
23210
|
-
if (!isEqual$
|
|
24637
|
+
if (!isEqual$a(this.$data.currentValue, newVal) && !isEqual$a(oldVal, newVal)) {
|
|
23211
24638
|
this.handleToggle(newVal || [], true, this.$props);
|
|
23212
24639
|
}
|
|
23213
24640
|
} else {
|
|
23214
24641
|
// else selectedValue will be a string
|
|
23215
24642
|
var currentValue = this.$data.currentValue[0] ? this.$data.currentValue[0].value : null;
|
|
23216
24643
|
|
|
23217
|
-
if (!isEqual$
|
|
24644
|
+
if (!isEqual$a(currentValue, this.selectedValue) && !isEqual$a(oldVal, this.selectedValue)) {
|
|
23218
24645
|
this.handleToggle(this.selectedValue || [], true, this.$props);
|
|
23219
24646
|
}
|
|
23220
24647
|
}
|
|
@@ -23292,7 +24719,7 @@
|
|
|
23292
24719
|
}
|
|
23293
24720
|
};
|
|
23294
24721
|
|
|
23295
|
-
checkValueChange$
|
|
24722
|
+
checkValueChange$6(props.componentId, props.multiSelect ? value : value[0], props.beforeValueChange, performUpdate);
|
|
23296
24723
|
},
|
|
23297
24724
|
updateQuery: function updateQuery(value, props) {
|
|
23298
24725
|
var filterValue = value;
|
|
@@ -23329,7 +24756,7 @@
|
|
|
23329
24756
|
multiSelect = _this$$props.multiSelect;
|
|
23330
24757
|
|
|
23331
24758
|
if (enableStrictSelection && !multiSelect && this.$data.currentValue.find(function (stateItem) {
|
|
23332
|
-
return isEqual$
|
|
24759
|
+
return isEqual$a(item, stateItem);
|
|
23333
24760
|
})) {
|
|
23334
24761
|
return false;
|
|
23335
24762
|
}
|
|
@@ -23359,7 +24786,7 @@
|
|
|
23359
24786
|
return _this2.handleClick(item);
|
|
23360
24787
|
}
|
|
23361
24788
|
}) : h(Button, {
|
|
23362
|
-
"class": getClassName$
|
|
24789
|
+
"class": getClassName$a(this.$props.innerClass, 'button') + " " + (isSelected ? 'active' : ''),
|
|
23363
24790
|
"on": {
|
|
23364
24791
|
"click": function click() {
|
|
23365
24792
|
return _this2.handleClick(item);
|
|
@@ -23386,7 +24813,7 @@
|
|
|
23386
24813
|
return h(Container, {
|
|
23387
24814
|
"class": toggleButtons
|
|
23388
24815
|
}, [this.$props.title && h(Title, {
|
|
23389
|
-
"class": getClassName$
|
|
24816
|
+
"class": getClassName$a(this.$props.innerClass, 'title')
|
|
23390
24817
|
}, [this.$props.title]), this.$props.data.map(function (item) {
|
|
23391
24818
|
return _this3.renderButton(item);
|
|
23392
24819
|
})]);
|
|
@@ -23442,7 +24869,7 @@
|
|
|
23442
24869
|
return query;
|
|
23443
24870
|
};
|
|
23444
24871
|
|
|
23445
|
-
var mapStateToProps$
|
|
24872
|
+
var mapStateToProps$9 = function mapStateToProps(state, props) {
|
|
23446
24873
|
return {
|
|
23447
24874
|
selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || null,
|
|
23448
24875
|
componentProps: state.props[props.componentId],
|
|
@@ -23451,11 +24878,11 @@
|
|
|
23451
24878
|
};
|
|
23452
24879
|
|
|
23453
24880
|
var mapDispatchtoProps$6 = {
|
|
23454
|
-
updateQueryHandler: updateQuery$
|
|
24881
|
+
updateQueryHandler: updateQuery$7,
|
|
23455
24882
|
setQueryOptions: setQueryOptions$6,
|
|
23456
|
-
setCustomQuery: setCustomQuery$
|
|
24883
|
+
setCustomQuery: setCustomQuery$6
|
|
23457
24884
|
};
|
|
23458
|
-
var RcConnected = ComponentWrapper$1(connect(mapStateToProps$
|
|
24885
|
+
var RcConnected = ComponentWrapper$1(connect(mapStateToProps$9, mapDispatchtoProps$6)(ToggleButton), {
|
|
23459
24886
|
componentType: constants_1$1.toggleButton
|
|
23460
24887
|
});
|
|
23461
24888
|
|
|
@@ -23467,14 +24894,14 @@
|
|
|
23467
24894
|
ToggleButton.componentType = constants_1$1.toggleButton;
|
|
23468
24895
|
|
|
23469
24896
|
var _excluded = ["options"];
|
|
23470
|
-
var updateQuery$
|
|
24897
|
+
var updateQuery$8 = lib_5.updateQuery,
|
|
23471
24898
|
setQueryOptions$7 = lib_5.setQueryOptions,
|
|
23472
|
-
setCustomQuery$
|
|
23473
|
-
setDefaultQuery$
|
|
24899
|
+
setCustomQuery$7 = lib_5.setCustomQuery,
|
|
24900
|
+
setDefaultQuery$7 = lib_5.setDefaultQuery;
|
|
23474
24901
|
var parseHits$1 = lib_8.parseHits,
|
|
23475
|
-
isEqual$
|
|
23476
|
-
getCompositeAggsQuery$
|
|
23477
|
-
getResultStats$
|
|
24902
|
+
isEqual$b = lib_8.isEqual,
|
|
24903
|
+
getCompositeAggsQuery$5 = lib_8.getCompositeAggsQuery,
|
|
24904
|
+
getResultStats$3 = lib_8.getResultStats,
|
|
23478
24905
|
extractQueryFromCustomQuery$6 = lib_8.extractQueryFromCustomQuery,
|
|
23479
24906
|
getOptionsForCustomQuery$6 = lib_8.getOptionsForCustomQuery;
|
|
23480
24907
|
var ReactiveComponent = {
|
|
@@ -23602,42 +25029,42 @@
|
|
|
23602
25029
|
},
|
|
23603
25030
|
watch: {
|
|
23604
25031
|
hits: function hits(newVal, oldVal) {
|
|
23605
|
-
if (!isEqual$
|
|
25032
|
+
if (!isEqual$b(newVal, oldVal)) {
|
|
23606
25033
|
this.$emit('data', this.getData());
|
|
23607
25034
|
}
|
|
23608
25035
|
},
|
|
23609
25036
|
rawData: function rawData(newVal, oldVal) {
|
|
23610
|
-
if (!isEqual$
|
|
25037
|
+
if (!isEqual$b(newVal, oldVal)) {
|
|
23611
25038
|
this.$emit('data', this.getData());
|
|
23612
25039
|
}
|
|
23613
25040
|
},
|
|
23614
25041
|
aggregations: function aggregations(newVal, oldVal) {
|
|
23615
|
-
if (!isEqual$
|
|
25042
|
+
if (!isEqual$b(newVal, oldVal)) {
|
|
23616
25043
|
this.$emit('data', this.getData());
|
|
23617
25044
|
}
|
|
23618
25045
|
},
|
|
23619
25046
|
aggregationData: function aggregationData(newVal, oldVal) {
|
|
23620
|
-
if (!isEqual$
|
|
25047
|
+
if (!isEqual$b(newVal, oldVal)) {
|
|
23621
25048
|
this.$emit('data', this.getData());
|
|
23622
25049
|
}
|
|
23623
25050
|
},
|
|
23624
25051
|
promotedResults: function promotedResults(newVal, oldVal) {
|
|
23625
|
-
if (!isEqual$
|
|
25052
|
+
if (!isEqual$b(newVal, oldVal)) {
|
|
23626
25053
|
this.$emit('data', this.getData());
|
|
23627
25054
|
}
|
|
23628
25055
|
},
|
|
23629
25056
|
hidden: function hidden(newVal, oldVal) {
|
|
23630
|
-
if (!isEqual$
|
|
25057
|
+
if (!isEqual$b(newVal, oldVal)) {
|
|
23631
25058
|
this.$emit('data', this.getData());
|
|
23632
25059
|
}
|
|
23633
25060
|
},
|
|
23634
25061
|
total: function total(newVal, oldVal) {
|
|
23635
|
-
if (!isEqual$
|
|
25062
|
+
if (!isEqual$b(newVal, oldVal)) {
|
|
23636
25063
|
this.$emit('data', this.getData());
|
|
23637
25064
|
}
|
|
23638
25065
|
},
|
|
23639
25066
|
time: function time(newVal, oldVal) {
|
|
23640
|
-
if (!isEqual$
|
|
25067
|
+
if (!isEqual$b(newVal, oldVal)) {
|
|
23641
25068
|
this.$emit('data', this.getData());
|
|
23642
25069
|
}
|
|
23643
25070
|
},
|
|
@@ -23705,7 +25132,7 @@
|
|
|
23705
25132
|
getAggsQuery: function getAggsQuery() {
|
|
23706
25133
|
if (this.aggregationField) {
|
|
23707
25134
|
return {
|
|
23708
|
-
aggs: getCompositeAggsQuery$
|
|
25135
|
+
aggs: getCompositeAggsQuery$5({
|
|
23709
25136
|
props: this.$props,
|
|
23710
25137
|
showTopHits: true,
|
|
23711
25138
|
value: this.selectedValue
|
|
@@ -23749,7 +25176,7 @@
|
|
|
23749
25176
|
},
|
|
23750
25177
|
computed: {
|
|
23751
25178
|
stats: function stats() {
|
|
23752
|
-
return getResultStats$
|
|
25179
|
+
return getResultStats$3(this);
|
|
23753
25180
|
}
|
|
23754
25181
|
}
|
|
23755
25182
|
};
|
|
@@ -23758,7 +25185,7 @@
|
|
|
23758
25185
|
return !!props.defaultQuery;
|
|
23759
25186
|
};
|
|
23760
25187
|
|
|
23761
|
-
var mapStateToProps$
|
|
25188
|
+
var mapStateToProps$a = function mapStateToProps(state, props) {
|
|
23762
25189
|
return {
|
|
23763
25190
|
aggregations: state.aggregations[props.componentId] && state.aggregations[props.componentId] || null,
|
|
23764
25191
|
aggregationData: state.compositeAggregations[props.componentId] || [],
|
|
@@ -23778,11 +25205,11 @@
|
|
|
23778
25205
|
|
|
23779
25206
|
var mapDispatchtoProps$7 = {
|
|
23780
25207
|
setQueryOptions: setQueryOptions$7,
|
|
23781
|
-
updateQuery: updateQuery$
|
|
23782
|
-
setCustomQuery: setCustomQuery$
|
|
23783
|
-
setDefaultQuery: setDefaultQuery$
|
|
25208
|
+
updateQuery: updateQuery$8,
|
|
25209
|
+
setCustomQuery: setCustomQuery$7,
|
|
25210
|
+
setDefaultQuery: setDefaultQuery$7
|
|
23784
25211
|
};
|
|
23785
|
-
var RcConnected$1 = ComponentWrapper$1(connect(mapStateToProps$
|
|
25212
|
+
var RcConnected$1 = ComponentWrapper$1(connect(mapStateToProps$a, mapDispatchtoProps$7)(ReactiveComponent), {
|
|
23786
25213
|
componentType: constants_1$1.reactiveComponent
|
|
23787
25214
|
});
|
|
23788
25215
|
|
|
@@ -23796,7 +25223,7 @@
|
|
|
23796
25223
|
var setValue$2 = lib_5.setValue,
|
|
23797
25224
|
clearValues = lib_5.clearValues,
|
|
23798
25225
|
resetValuesToDefault = lib_5.resetValuesToDefault;
|
|
23799
|
-
var getClassName$
|
|
25226
|
+
var getClassName$b = lib_8.getClassName,
|
|
23800
25227
|
handleA11yAction$2 = lib_8.handleA11yAction;
|
|
23801
25228
|
var SelectedFilters = {
|
|
23802
25229
|
name: 'SelectedFilters',
|
|
@@ -23835,9 +25262,9 @@
|
|
|
23835
25262
|
return h(Container, {
|
|
23836
25263
|
"class": filters(this.theme) + " " + (this.$props.className || '')
|
|
23837
25264
|
}, [this.$props.title && hasValues && h(Title, {
|
|
23838
|
-
"class": getClassName$
|
|
25265
|
+
"class": getClassName$b(this.$props.innerClass, 'title') || ''
|
|
23839
25266
|
}, [this.$props.title]), filtersToRender, this.$props.showClearAll && hasValues ? h(Button, {
|
|
23840
|
-
"class": getClassName$
|
|
25267
|
+
"class": getClassName$b(this.$props.innerClass, 'button') || '',
|
|
23841
25268
|
"on": _extends({}, {
|
|
23842
25269
|
click: this.clearValues,
|
|
23843
25270
|
keypress: function keypress(event) {
|
|
@@ -23913,7 +25340,7 @@
|
|
|
23913
25340
|
var valueToRender = _this3.renderValue(value, isArray);
|
|
23914
25341
|
|
|
23915
25342
|
return h(Button, {
|
|
23916
|
-
"class": getClassName$
|
|
25343
|
+
"class": getClassName$b(_this3.$props.innerClass, 'button') || '',
|
|
23917
25344
|
"key": component + "-" + (index + 1),
|
|
23918
25345
|
"on": _extends({}, {
|
|
23919
25346
|
click: function click() {
|
|
@@ -23942,7 +25369,7 @@
|
|
|
23942
25369
|
}
|
|
23943
25370
|
};
|
|
23944
25371
|
|
|
23945
|
-
var mapStateToProps$
|
|
25372
|
+
var mapStateToProps$b = function mapStateToProps(state) {
|
|
23946
25373
|
return {
|
|
23947
25374
|
components: state.components,
|
|
23948
25375
|
selectedValues: state.selectedValues
|
|
@@ -23954,18 +25381,18 @@
|
|
|
23954
25381
|
setValue: setValue$2,
|
|
23955
25382
|
resetValuesToDefault: resetValuesToDefault
|
|
23956
25383
|
};
|
|
23957
|
-
var RcConnected$2 = connect(mapStateToProps$
|
|
25384
|
+
var RcConnected$2 = connect(mapStateToProps$b, mapDispatchtoProps$8)(SelectedFilters);
|
|
23958
25385
|
|
|
23959
25386
|
SelectedFilters.install = function (Vue) {
|
|
23960
25387
|
Vue.component(SelectedFilters.name, RcConnected$2);
|
|
23961
25388
|
};
|
|
23962
25389
|
|
|
23963
|
-
var updateQuery$
|
|
25390
|
+
var updateQuery$9 = lib_5.updateQuery,
|
|
23964
25391
|
setQueryOptions$8 = lib_5.setQueryOptions,
|
|
23965
|
-
setCustomQuery$
|
|
23966
|
-
var isEqual$
|
|
23967
|
-
checkValueChange$
|
|
23968
|
-
getClassName$
|
|
25392
|
+
setCustomQuery$8 = lib_5.setCustomQuery;
|
|
25393
|
+
var isEqual$c = lib_8.isEqual,
|
|
25394
|
+
checkValueChange$7 = lib_8.checkValueChange,
|
|
25395
|
+
getClassName$c = lib_8.getClassName,
|
|
23969
25396
|
getOptionsFromQuery$1 = lib_8.getOptionsFromQuery;
|
|
23970
25397
|
var SingleRange = {
|
|
23971
25398
|
name: 'SingleRange',
|
|
@@ -24020,12 +25447,12 @@
|
|
|
24020
25447
|
this.setValue(newVal);
|
|
24021
25448
|
},
|
|
24022
25449
|
value: function value(newVal, oldVal) {
|
|
24023
|
-
if (!isEqual$
|
|
25450
|
+
if (!isEqual$c(newVal, oldVal)) {
|
|
24024
25451
|
this.setValue(newVal);
|
|
24025
25452
|
}
|
|
24026
25453
|
},
|
|
24027
25454
|
selectedValue: function selectedValue(newVal) {
|
|
24028
|
-
if (!isEqual$
|
|
25455
|
+
if (!isEqual$c(this.$data.currentValue, newVal)) {
|
|
24029
25456
|
this.setValue(newVal);
|
|
24030
25457
|
}
|
|
24031
25458
|
},
|
|
@@ -24042,16 +25469,16 @@
|
|
|
24042
25469
|
return h(Container, {
|
|
24043
25470
|
"class": this.$props.className
|
|
24044
25471
|
}, [this.$props.title && h(Title, {
|
|
24045
|
-
"class": getClassName$
|
|
25472
|
+
"class": getClassName$c(this.$props.innerClass, 'title')
|
|
24046
25473
|
}, [this.$props.title]), h(UL, {
|
|
24047
|
-
"class": getClassName$
|
|
25474
|
+
"class": getClassName$c(this.$props.innerClass, 'list')
|
|
24048
25475
|
}, [this.$props.data.map(function (item) {
|
|
24049
25476
|
var selected = !!_this.$data.currentValue && _this.$data.currentValue.label === item.label;
|
|
24050
25477
|
return h("li", {
|
|
24051
25478
|
"key": item.label,
|
|
24052
25479
|
"class": "" + (selected ? 'active' : '')
|
|
24053
25480
|
}, [h(Radio, {
|
|
24054
|
-
"class": getClassName$
|
|
25481
|
+
"class": getClassName$c(_this.$props.innerClass, 'radio'),
|
|
24055
25482
|
"attrs": {
|
|
24056
25483
|
"id": _this.$props.componentId + "-" + item.label,
|
|
24057
25484
|
"name": _this.$props.componentId,
|
|
@@ -24064,7 +25491,7 @@
|
|
|
24064
25491
|
"change": _this.handleChange
|
|
24065
25492
|
}
|
|
24066
25493
|
}), h("label", {
|
|
24067
|
-
"class": getClassName$
|
|
25494
|
+
"class": getClassName$c(_this.$props.innerClass, 'label'),
|
|
24068
25495
|
"attrs": {
|
|
24069
25496
|
"for": _this.$props.componentId + "-" + item.label
|
|
24070
25497
|
}
|
|
@@ -24091,7 +25518,7 @@
|
|
|
24091
25518
|
_this2.$emit('value-change', currentValue);
|
|
24092
25519
|
};
|
|
24093
25520
|
|
|
24094
|
-
checkValueChange$
|
|
25521
|
+
checkValueChange$7(props.componentId, currentValue, props.beforeValueChange, performUpdate);
|
|
24095
25522
|
},
|
|
24096
25523
|
updateQueryHandler: function updateQueryHandler(value, props) {
|
|
24097
25524
|
var customQuery = props.customQuery;
|
|
@@ -24163,7 +25590,7 @@
|
|
|
24163
25590
|
return query;
|
|
24164
25591
|
};
|
|
24165
25592
|
|
|
24166
|
-
var mapStateToProps$
|
|
25593
|
+
var mapStateToProps$c = function mapStateToProps(state, props) {
|
|
24167
25594
|
return {
|
|
24168
25595
|
selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || null,
|
|
24169
25596
|
componentProps: state.props[props.componentId],
|
|
@@ -24172,11 +25599,11 @@
|
|
|
24172
25599
|
};
|
|
24173
25600
|
|
|
24174
25601
|
var mapDispatchtoProps$9 = {
|
|
24175
|
-
updateQuery: updateQuery$
|
|
25602
|
+
updateQuery: updateQuery$9,
|
|
24176
25603
|
setQueryOptions: setQueryOptions$8,
|
|
24177
|
-
setCustomQuery: setCustomQuery$
|
|
25604
|
+
setCustomQuery: setCustomQuery$8
|
|
24178
25605
|
};
|
|
24179
|
-
var RangeConnected = ComponentWrapper$1(connect(mapStateToProps$
|
|
25606
|
+
var RangeConnected = ComponentWrapper$1(connect(mapStateToProps$c, mapDispatchtoProps$9)(SingleRange), {
|
|
24180
25607
|
componentType: constants_1$1.singleRange
|
|
24181
25608
|
});
|
|
24182
25609
|
|
|
@@ -24187,12 +25614,12 @@
|
|
|
24187
25614
|
|
|
24188
25615
|
SingleRange.componentType = constants_1$1.singleRange;
|
|
24189
25616
|
|
|
24190
|
-
var updateQuery$
|
|
25617
|
+
var updateQuery$a = lib_5.updateQuery,
|
|
24191
25618
|
setQueryOptions$9 = lib_5.setQueryOptions,
|
|
24192
|
-
setCustomQuery$
|
|
24193
|
-
var isEqual$
|
|
24194
|
-
checkValueChange$
|
|
24195
|
-
getClassName$
|
|
25619
|
+
setCustomQuery$9 = lib_5.setCustomQuery;
|
|
25620
|
+
var isEqual$d = lib_8.isEqual,
|
|
25621
|
+
checkValueChange$8 = lib_8.checkValueChange,
|
|
25622
|
+
getClassName$d = lib_8.getClassName,
|
|
24196
25623
|
getOptionsFromQuery$2 = lib_8.getOptionsFromQuery;
|
|
24197
25624
|
var MultiRange = {
|
|
24198
25625
|
name: 'MultiRange',
|
|
@@ -24299,7 +25726,7 @@
|
|
|
24299
25726
|
_this.$emit('value-change', Object.keys(selectedValues));
|
|
24300
25727
|
};
|
|
24301
25728
|
|
|
24302
|
-
checkValueChange$
|
|
25729
|
+
checkValueChange$8(props.componentId, currentValue, props.beforeValueChange, performUpdate);
|
|
24303
25730
|
},
|
|
24304
25731
|
updateQueryHandler: function updateQueryHandler(value, props) {
|
|
24305
25732
|
var customQuery = props.customQuery;
|
|
@@ -24333,12 +25760,12 @@
|
|
|
24333
25760
|
this.selectItem(newVal, true, undefined, true);
|
|
24334
25761
|
},
|
|
24335
25762
|
value: function value(newVal, oldVal) {
|
|
24336
|
-
if (!isEqual$
|
|
25763
|
+
if (!isEqual$d(newVal, oldVal)) {
|
|
24337
25764
|
this.selectItem(newVal, true, undefined, true);
|
|
24338
25765
|
}
|
|
24339
25766
|
},
|
|
24340
25767
|
selectedValue: function selectedValue(newVal) {
|
|
24341
|
-
if (!isEqual$
|
|
25768
|
+
if (!isEqual$d(this.$data.currentValue, newVal)) {
|
|
24342
25769
|
this.selectItem(newVal, true, undefined, true);
|
|
24343
25770
|
}
|
|
24344
25771
|
},
|
|
@@ -24372,16 +25799,16 @@
|
|
|
24372
25799
|
return h(Container, {
|
|
24373
25800
|
"class": this.$props.className
|
|
24374
25801
|
}, [this.$props.title && h(Title, {
|
|
24375
|
-
"class": getClassName$
|
|
25802
|
+
"class": getClassName$d(this.$props.innerClass, 'title')
|
|
24376
25803
|
}, [this.$props.title]), h(UL, {
|
|
24377
|
-
"class": getClassName$
|
|
25804
|
+
"class": getClassName$d(this.$props.innerClass, 'list')
|
|
24378
25805
|
}, [this.$props.data.map(function (item) {
|
|
24379
25806
|
var selected = !!_this2.$data.currentValue && _this2.$data.currentValue.label === item.label;
|
|
24380
25807
|
return h("li", {
|
|
24381
25808
|
"key": item.label,
|
|
24382
25809
|
"class": "" + (selected ? 'active' : '')
|
|
24383
25810
|
}, [h(Checkbox, {
|
|
24384
|
-
"class": getClassName$
|
|
25811
|
+
"class": getClassName$d(_this2.$props.innerClass, 'checkbox'),
|
|
24385
25812
|
"attrs": {
|
|
24386
25813
|
"id": _this2.$props.componentId + "-" + item.label,
|
|
24387
25814
|
"name": _this2.$props.componentId,
|
|
@@ -24396,7 +25823,7 @@
|
|
|
24396
25823
|
click: _this2.handleClick
|
|
24397
25824
|
})
|
|
24398
25825
|
}), h("label", {
|
|
24399
|
-
"class": getClassName$
|
|
25826
|
+
"class": getClassName$d(_this2.$props.innerClass, 'label'),
|
|
24400
25827
|
"attrs": {
|
|
24401
25828
|
"for": _this2.$props.componentId + "-" + item.label
|
|
24402
25829
|
}
|
|
@@ -24456,7 +25883,7 @@
|
|
|
24456
25883
|
return query;
|
|
24457
25884
|
};
|
|
24458
25885
|
|
|
24459
|
-
var mapStateToProps$
|
|
25886
|
+
var mapStateToProps$d = function mapStateToProps(state, props) {
|
|
24460
25887
|
return {
|
|
24461
25888
|
selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || null,
|
|
24462
25889
|
componentProps: state.props[props.componentId],
|
|
@@ -24465,11 +25892,11 @@
|
|
|
24465
25892
|
};
|
|
24466
25893
|
|
|
24467
25894
|
var mapDispatchtoProps$a = {
|
|
24468
|
-
updateQuery: updateQuery$
|
|
25895
|
+
updateQuery: updateQuery$a,
|
|
24469
25896
|
setQueryOptions: setQueryOptions$9,
|
|
24470
|
-
setCustomQuery: setCustomQuery$
|
|
25897
|
+
setCustomQuery: setCustomQuery$9
|
|
24471
25898
|
};
|
|
24472
|
-
var RangeConnected$1 = ComponentWrapper$1(connect(mapStateToProps$
|
|
25899
|
+
var RangeConnected$1 = ComponentWrapper$1(connect(mapStateToProps$d, mapDispatchtoProps$a)(MultiRange), {
|
|
24473
25900
|
componentType: constants_1$1.multiRange
|
|
24474
25901
|
});
|
|
24475
25902
|
|
|
@@ -24755,8 +26182,8 @@
|
|
|
24755
26182
|
};
|
|
24756
26183
|
var vueNoSsr_common = index$2;
|
|
24757
26184
|
|
|
24758
|
-
var _templateObject$
|
|
24759
|
-
var Slider = index$1('div')(_templateObject$
|
|
26185
|
+
var _templateObject$n;
|
|
26186
|
+
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"])));
|
|
24760
26187
|
|
|
24761
26188
|
/**
|
|
24762
26189
|
* Caution: Please do not change this file without having a discussion with the Team.
|
|
@@ -24799,13 +26226,13 @@
|
|
|
24799
26226
|
return components;
|
|
24800
26227
|
};
|
|
24801
26228
|
|
|
24802
|
-
var updateQuery$
|
|
26229
|
+
var updateQuery$b = lib_5.updateQuery,
|
|
24803
26230
|
setQueryOptions$a = lib_5.setQueryOptions,
|
|
24804
|
-
setCustomQuery$
|
|
24805
|
-
var checkValueChange$
|
|
24806
|
-
getClassName$
|
|
26231
|
+
setCustomQuery$a = lib_5.setCustomQuery;
|
|
26232
|
+
var checkValueChange$9 = lib_8.checkValueChange,
|
|
26233
|
+
getClassName$e = lib_8.getClassName,
|
|
24807
26234
|
getOptionsFromQuery$3 = lib_8.getOptionsFromQuery,
|
|
24808
|
-
isEqual$
|
|
26235
|
+
isEqual$e = lib_8.isEqual;
|
|
24809
26236
|
var RangeSlider = {
|
|
24810
26237
|
name: 'RangeSlider',
|
|
24811
26238
|
components: getComponents(),
|
|
@@ -24886,7 +26313,7 @@
|
|
|
24886
26313
|
});
|
|
24887
26314
|
};
|
|
24888
26315
|
|
|
24889
|
-
checkValueChange$
|
|
26316
|
+
checkValueChange$9(props.componentId, {
|
|
24890
26317
|
start: currentValue[0],
|
|
24891
26318
|
end: currentValue[1]
|
|
24892
26319
|
}, props.beforeValueChange, performUpdate);
|
|
@@ -24928,12 +26355,12 @@
|
|
|
24928
26355
|
this.handleChange(RangeSlider.parseValue(newVal, this.$props));
|
|
24929
26356
|
},
|
|
24930
26357
|
value: function value(newVal, oldVal) {
|
|
24931
|
-
if (!isEqual$
|
|
26358
|
+
if (!isEqual$e(newVal, oldVal)) {
|
|
24932
26359
|
this.handleChange(RangeSlider.parseValue(newVal, this.$props));
|
|
24933
26360
|
}
|
|
24934
26361
|
},
|
|
24935
26362
|
selectedValue: function selectedValue(newVal) {
|
|
24936
|
-
if (!isEqual$
|
|
26363
|
+
if (!isEqual$e(this.$data.currentValue, newVal)) {
|
|
24937
26364
|
this.handleChange(RangeSlider.parseValue(newVal, this.$props));
|
|
24938
26365
|
this.$emit('change', newVal);
|
|
24939
26366
|
}
|
|
@@ -24979,9 +26406,9 @@
|
|
|
24979
26406
|
return h(Container, {
|
|
24980
26407
|
"class": this.$props.className
|
|
24981
26408
|
}, [this.$props.title && h(Title, {
|
|
24982
|
-
"class": getClassName$
|
|
26409
|
+
"class": getClassName$e(this.$props.innerClass, 'title')
|
|
24983
26410
|
}, [this.$props.title]), this.$props.range ? h(vueNoSsr_common, [h(Slider, {
|
|
24984
|
-
"class": getClassName$
|
|
26411
|
+
"class": getClassName$e(this.$props.innerClass, 'slider')
|
|
24985
26412
|
}, [h("vue-slider-component", {
|
|
24986
26413
|
"ref": "slider",
|
|
24987
26414
|
"attrs": {
|
|
@@ -25000,9 +26427,9 @@
|
|
|
25000
26427
|
}), this.$props.rangeLabels && h("div", {
|
|
25001
26428
|
"class": "label-container"
|
|
25002
26429
|
}, [h("label", {
|
|
25003
|
-
"class": getClassName$
|
|
26430
|
+
"class": getClassName$e(this.$props.innerClass, 'label') || 'range-label-left'
|
|
25004
26431
|
}, [this.$props.rangeLabels.start]), h("label", {
|
|
25005
|
-
"class": getClassName$
|
|
26432
|
+
"class": getClassName$e(this.$props.innerClass, 'label') || 'range-label-right'
|
|
25006
26433
|
}, [this.$props.rangeLabels.end])])])]) : null]);
|
|
25007
26434
|
}
|
|
25008
26435
|
};
|
|
@@ -25048,7 +26475,7 @@
|
|
|
25048
26475
|
return [];
|
|
25049
26476
|
};
|
|
25050
26477
|
|
|
25051
|
-
var mapStateToProps$
|
|
26478
|
+
var mapStateToProps$e = function mapStateToProps(state, props) {
|
|
25052
26479
|
return {
|
|
25053
26480
|
options: state.aggregations[props.componentId] ? state.aggregations[props.componentId][props.dataField] && state.aggregations[props.componentId][props.dataField].buckets // eslint-disable-line
|
|
25054
26481
|
: [],
|
|
@@ -25059,11 +26486,11 @@
|
|
|
25059
26486
|
};
|
|
25060
26487
|
|
|
25061
26488
|
var mapDispatchtoProps$b = {
|
|
25062
|
-
updateQuery: updateQuery$
|
|
26489
|
+
updateQuery: updateQuery$b,
|
|
25063
26490
|
setQueryOptions: setQueryOptions$a,
|
|
25064
|
-
setCustomQuery: setCustomQuery$
|
|
26491
|
+
setCustomQuery: setCustomQuery$a
|
|
25065
26492
|
};
|
|
25066
|
-
var RangeConnected$2 = ComponentWrapper$1(connect(mapStateToProps$
|
|
26493
|
+
var RangeConnected$2 = ComponentWrapper$1(connect(mapStateToProps$e, mapDispatchtoProps$b)(RangeSlider), {
|
|
25067
26494
|
componentType: constants_1$1.rangeSlider
|
|
25068
26495
|
});
|
|
25069
26496
|
|
|
@@ -25077,15 +26504,15 @@
|
|
|
25077
26504
|
var addComponent$1 = lib_5.addComponent,
|
|
25078
26505
|
removeComponent$1 = lib_5.removeComponent,
|
|
25079
26506
|
watchComponent$1 = lib_5.watchComponent,
|
|
25080
|
-
updateQuery$
|
|
26507
|
+
updateQuery$c = lib_5.updateQuery,
|
|
25081
26508
|
setQueryListener$1 = lib_5.setQueryListener,
|
|
25082
26509
|
setQueryOptions$b = lib_5.setQueryOptions,
|
|
25083
26510
|
setComponentProps$1 = lib_5.setComponentProps,
|
|
25084
|
-
setCustomQuery$
|
|
26511
|
+
setCustomQuery$b = lib_5.setCustomQuery,
|
|
25085
26512
|
updateComponentProps$2 = lib_5.updateComponentProps;
|
|
25086
|
-
var checkValueChange$
|
|
25087
|
-
getClassName$
|
|
25088
|
-
isEqual$
|
|
26513
|
+
var checkValueChange$a = lib_8.checkValueChange,
|
|
26514
|
+
getClassName$f = lib_8.getClassName,
|
|
26515
|
+
isEqual$f = lib_8.isEqual,
|
|
25089
26516
|
checkSomePropChange$1 = lib_8.checkSomePropChange,
|
|
25090
26517
|
extractQueryFromCustomQuery$7 = lib_8.extractQueryFromCustomQuery,
|
|
25091
26518
|
getOptionsForCustomQuery$7 = lib_8.getOptionsForCustomQuery;
|
|
@@ -25289,7 +26716,7 @@
|
|
|
25289
26716
|
});
|
|
25290
26717
|
};
|
|
25291
26718
|
|
|
25292
|
-
checkValueChange$
|
|
26719
|
+
checkValueChange$a(this.$props.componentId, {
|
|
25293
26720
|
start: normalizedValue[0],
|
|
25294
26721
|
end: normalizedValue[1]
|
|
25295
26722
|
}, this.$props.beforeValueChange, performUpdate);
|
|
@@ -25356,7 +26783,7 @@
|
|
|
25356
26783
|
this.setReact();
|
|
25357
26784
|
},
|
|
25358
26785
|
selectedValue: function selectedValue(newValue) {
|
|
25359
|
-
if (isEqual$
|
|
26786
|
+
if (isEqual$f(newValue, this.currentValue)) return;
|
|
25360
26787
|
var value = newValue || {
|
|
25361
26788
|
start: this.range.start,
|
|
25362
26789
|
end: this.range.end
|
|
@@ -25365,7 +26792,7 @@
|
|
|
25365
26792
|
this.handleChange(DynamicRangeSlider.parseValue(value, this.$props));
|
|
25366
26793
|
},
|
|
25367
26794
|
range: function range(newValue, oldValue) {
|
|
25368
|
-
if (isEqual$
|
|
26795
|
+
if (isEqual$f(newValue, oldValue) || !this.currentValue) return;
|
|
25369
26796
|
|
|
25370
26797
|
var _ref3 = this.currentValue || [],
|
|
25371
26798
|
currentStart = _ref3[0],
|
|
@@ -25385,7 +26812,7 @@
|
|
|
25385
26812
|
}
|
|
25386
26813
|
},
|
|
25387
26814
|
value: function value(newVal, oldVal) {
|
|
25388
|
-
if (!isEqual$
|
|
26815
|
+
if (!isEqual$f(newVal, oldVal)) {
|
|
25389
26816
|
this.handleChange(DynamicRangeSlider.parseValue(newVal, this.$props));
|
|
25390
26817
|
}
|
|
25391
26818
|
}
|
|
@@ -25403,9 +26830,9 @@
|
|
|
25403
26830
|
return h(Container, {
|
|
25404
26831
|
"class": this.$props.className
|
|
25405
26832
|
}, [this.$props.title && h(Title, {
|
|
25406
|
-
"class": getClassName$
|
|
26833
|
+
"class": getClassName$f(this.$props.innerClass, 'title')
|
|
25407
26834
|
}, [this.$props.title]), h(vueNoSsr_common, [h(Slider, {
|
|
25408
|
-
"class": getClassName$
|
|
26835
|
+
"class": getClassName$f(this.$props.innerClass, 'slider')
|
|
25409
26836
|
}, [h("vue-slider-component", {
|
|
25410
26837
|
"ref": "slider",
|
|
25411
26838
|
"attrs": {
|
|
@@ -25424,9 +26851,9 @@
|
|
|
25424
26851
|
}), this.labels ? h("div", {
|
|
25425
26852
|
"class": "label-container"
|
|
25426
26853
|
}, [h("label", {
|
|
25427
|
-
"class": getClassName$
|
|
26854
|
+
"class": getClassName$f(this.$props.innerClass, 'label') || 'range-label-left'
|
|
25428
26855
|
}, [this.labels.start]), h("label", {
|
|
25429
|
-
"class": getClassName$
|
|
26856
|
+
"class": getClassName$f(this.$props.innerClass, 'label') || 'range-label-right'
|
|
25430
26857
|
}, [this.labels.end])]) : null])])]);
|
|
25431
26858
|
}
|
|
25432
26859
|
};
|
|
@@ -25472,7 +26899,7 @@
|
|
|
25472
26899
|
return true;
|
|
25473
26900
|
};
|
|
25474
26901
|
|
|
25475
|
-
var mapStateToProps$
|
|
26902
|
+
var mapStateToProps$f = function mapStateToProps(state, props) {
|
|
25476
26903
|
var componentId = state.aggregations[props.componentId];
|
|
25477
26904
|
var internalRange = state.aggregations[props.componentId + "__range__internal"];
|
|
25478
26905
|
var options = componentId && componentId[props.dataField];
|
|
@@ -25504,15 +26931,15 @@
|
|
|
25504
26931
|
var mapDispatchtoProps$c = {
|
|
25505
26932
|
addComponent: addComponent$1,
|
|
25506
26933
|
removeComponent: removeComponent$1,
|
|
25507
|
-
updateQuery: updateQuery$
|
|
26934
|
+
updateQuery: updateQuery$c,
|
|
25508
26935
|
watchComponent: watchComponent$1,
|
|
25509
26936
|
setQueryListener: setQueryListener$1,
|
|
25510
26937
|
setQueryOptions: setQueryOptions$b,
|
|
25511
26938
|
setComponentProps: setComponentProps$1,
|
|
25512
|
-
setCustomQuery: setCustomQuery$
|
|
26939
|
+
setCustomQuery: setCustomQuery$b,
|
|
25513
26940
|
updateComponentProps: updateComponentProps$2
|
|
25514
26941
|
};
|
|
25515
|
-
var RangeConnected$3 = connect(mapStateToProps$
|
|
26942
|
+
var RangeConnected$3 = connect(mapStateToProps$f, mapDispatchtoProps$c)(DynamicRangeSlider);
|
|
25516
26943
|
|
|
25517
26944
|
DynamicRangeSlider.install = function (Vue) {
|
|
25518
26945
|
Vue.component(DynamicRangeSlider.name, RangeConnected$3);
|
|
@@ -25674,7 +27101,7 @@
|
|
|
25674
27101
|
}
|
|
25675
27102
|
};
|
|
25676
27103
|
|
|
25677
|
-
var mapStateToProps$
|
|
27104
|
+
var mapStateToProps$g = function mapStateToProps(state, props) {
|
|
25678
27105
|
return {
|
|
25679
27106
|
selectedValues: filterByComponentIds(state.selectedValues, props),
|
|
25680
27107
|
queryLog: filterByComponentIds(state.queryLog, props),
|
|
@@ -25691,7 +27118,7 @@
|
|
|
25691
27118
|
};
|
|
25692
27119
|
};
|
|
25693
27120
|
|
|
25694
|
-
var StateProviderConnected = connect(mapStateToProps$
|
|
27121
|
+
var StateProviderConnected = connect(mapStateToProps$g, {})(StateProvider);
|
|
25695
27122
|
|
|
25696
27123
|
StateProvider.install = function (Vue) {
|
|
25697
27124
|
Vue.component(StateProvider.name, StateProviderConnected);
|
|
@@ -28805,19 +30232,19 @@
|
|
|
28805
30232
|
|
|
28806
30233
|
var setStreaming = lib_5.setStreaming,
|
|
28807
30234
|
setQueryOptions$c = lib_5.setQueryOptions,
|
|
28808
|
-
updateQuery$
|
|
30235
|
+
updateQuery$d = lib_5.updateQuery,
|
|
28809
30236
|
loadMore$1 = lib_5.loadMore,
|
|
28810
30237
|
setValue$3 = lib_5.setValue,
|
|
28811
30238
|
updateComponentProps$3 = lib_5.updateComponentProps,
|
|
28812
|
-
setDefaultQuery$
|
|
30239
|
+
setDefaultQuery$8 = lib_5.setDefaultQuery,
|
|
28813
30240
|
recordResultClick$1 = lib_5.recordResultClick,
|
|
28814
30241
|
setMapData = lib_5.setMapData;
|
|
28815
|
-
var isEqual$
|
|
30242
|
+
var isEqual$g = lib_8.isEqual,
|
|
28816
30243
|
getQueryOptions$5 = lib_8.getQueryOptions,
|
|
28817
|
-
getClassName$
|
|
30244
|
+
getClassName$g = lib_8.getClassName,
|
|
28818
30245
|
parseHits$2 = lib_8.parseHits,
|
|
28819
30246
|
getOptionsFromQuery$4 = lib_8.getOptionsFromQuery,
|
|
28820
|
-
getResultStats$
|
|
30247
|
+
getResultStats$4 = lib_8.getResultStats; // default map center
|
|
28821
30248
|
|
|
28822
30249
|
var MAP_CENTER = {
|
|
28823
30250
|
lat: 37.7749,
|
|
@@ -28955,7 +30382,7 @@
|
|
|
28955
30382
|
var _this$getAllData = this.getAllData(),
|
|
28956
30383
|
resultsToRender = _this$getAllData.resultsToRender;
|
|
28957
30384
|
|
|
28958
|
-
return _extends({}, getResultStats$
|
|
30385
|
+
return _extends({}, getResultStats$4(this), {
|
|
28959
30386
|
currentPage: this.currentPageState,
|
|
28960
30387
|
displayedResults: resultsToRender.length
|
|
28961
30388
|
});
|
|
@@ -29008,17 +30435,17 @@
|
|
|
29008
30435
|
}
|
|
29009
30436
|
},
|
|
29010
30437
|
promotedResults: function promotedResults(newVal, oldVal) {
|
|
29011
|
-
if (!isEqual$
|
|
30438
|
+
if (!isEqual$g(newVal, oldVal)) {
|
|
29012
30439
|
this.$emit('data', this.getData());
|
|
29013
30440
|
}
|
|
29014
30441
|
},
|
|
29015
30442
|
hidden: function hidden(newVal, oldVal) {
|
|
29016
|
-
if (!isEqual$
|
|
30443
|
+
if (!isEqual$g(newVal, oldVal)) {
|
|
29017
30444
|
this.$emit('data', this.getData());
|
|
29018
30445
|
}
|
|
29019
30446
|
},
|
|
29020
30447
|
time: function time(newVal, oldVal) {
|
|
29021
|
-
if (!isEqual$
|
|
30448
|
+
if (!isEqual$g(newVal, oldVal)) {
|
|
29022
30449
|
this.$emit('data', this.getData());
|
|
29023
30450
|
}
|
|
29024
30451
|
},
|
|
@@ -29035,7 +30462,7 @@
|
|
|
29035
30462
|
rawData: function rawData(newVal, oldVal) {
|
|
29036
30463
|
var _this = this;
|
|
29037
30464
|
|
|
29038
|
-
if (!isEqual$
|
|
30465
|
+
if (!isEqual$g(newVal, oldVal)) {
|
|
29039
30466
|
var promotedResults = this.promotedResults,
|
|
29040
30467
|
hits = this.hits;
|
|
29041
30468
|
var results = parseHits$2(hits) || [];
|
|
@@ -29076,7 +30503,7 @@
|
|
|
29076
30503
|
}
|
|
29077
30504
|
},
|
|
29078
30505
|
center: function center(newVal, oldVal) {
|
|
29079
|
-
if (!isEqual$
|
|
30506
|
+
if (!isEqual$g(newVal, oldVal)) {
|
|
29080
30507
|
var persistMapQuery = !!this.center; // we need to forceExecute the query because the center has changed
|
|
29081
30508
|
|
|
29082
30509
|
var forceExecute = true;
|
|
@@ -29510,7 +30937,7 @@
|
|
|
29510
30937
|
zIndex: 10000
|
|
29511
30938
|
},
|
|
29512
30939
|
"attrs": {
|
|
29513
|
-
"className": getClassName$
|
|
30940
|
+
"className": getClassName$g(this.innerClass, 'checkboxContainer') || null
|
|
29514
30941
|
}
|
|
29515
30942
|
}, [h(Checkbox, {
|
|
29516
30943
|
"attrs": {
|
|
@@ -29519,13 +30946,13 @@
|
|
|
29519
30946
|
"checked": this.searchAsMove,
|
|
29520
30947
|
"show": true
|
|
29521
30948
|
},
|
|
29522
|
-
"class": getClassName$
|
|
30949
|
+
"class": getClassName$g(this.$props.innerClass, 'checkbox'),
|
|
29523
30950
|
"on": {
|
|
29524
30951
|
"click": this.toggleSearchAsMove
|
|
29525
30952
|
}
|
|
29526
30953
|
}), h("label", {
|
|
29527
30954
|
"attrs": {
|
|
29528
|
-
"className": getClassName$
|
|
30955
|
+
"className": getClassName$g(this.innerClass, 'label') || null,
|
|
29529
30956
|
"for": this.$props.componentId + "-searchasmove"
|
|
29530
30957
|
}
|
|
29531
30958
|
}, [this.searchAsMoveLabel])]);
|
|
@@ -29639,7 +31066,7 @@
|
|
|
29639
31066
|
}
|
|
29640
31067
|
};
|
|
29641
31068
|
|
|
29642
|
-
var mapStateToProps$
|
|
31069
|
+
var mapStateToProps$h = function mapStateToProps(state, props) {
|
|
29643
31070
|
return {
|
|
29644
31071
|
defaultPage: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value - 1 || -1,
|
|
29645
31072
|
error: state.error[props.componentId],
|
|
@@ -29654,18 +31081,18 @@
|
|
|
29654
31081
|
};
|
|
29655
31082
|
};
|
|
29656
31083
|
|
|
29657
|
-
var mapDispatchToProps$
|
|
31084
|
+
var mapDispatchToProps$4 = {
|
|
29658
31085
|
loadMoreAction: loadMore$1,
|
|
29659
31086
|
setPageURL: setValue$3,
|
|
29660
31087
|
setQueryOptions: setQueryOptions$c,
|
|
29661
31088
|
setStreaming: setStreaming,
|
|
29662
|
-
updateQuery: updateQuery$
|
|
31089
|
+
updateQuery: updateQuery$d,
|
|
29663
31090
|
updateComponentProps: updateComponentProps$3,
|
|
29664
|
-
setDefaultQuery: setDefaultQuery$
|
|
31091
|
+
setDefaultQuery: setDefaultQuery$8,
|
|
29665
31092
|
recordResultClick: recordResultClick$1,
|
|
29666
31093
|
setMapData: setMapData
|
|
29667
31094
|
};
|
|
29668
|
-
var RMConnected = ComponentWrapper$1(connect(mapStateToProps$
|
|
31095
|
+
var RMConnected = ComponentWrapper$1(connect(mapStateToProps$h, mapDispatchToProps$4)(ReactiveMap), {
|
|
29669
31096
|
componentType: constants_1$1.reactiveMap,
|
|
29670
31097
|
internalComponent: true
|
|
29671
31098
|
});
|
|
@@ -31945,8 +33372,8 @@
|
|
|
31945
33372
|
}
|
|
31946
33373
|
};
|
|
31947
33374
|
|
|
31948
|
-
var _templateObject$
|
|
31949
|
-
var MapPin = index$1('div')(_templateObject$
|
|
33375
|
+
var _templateObject$o, _templateObject2$a, _templateObject3$8;
|
|
33376
|
+
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"])));
|
|
31950
33377
|
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"])));
|
|
31951
33378
|
var mapPinWrapper = css(_templateObject3$8 || (_templateObject3$8 = _taggedTemplateLiteralLoose(["\n\t&:hover,\n\t&:focus {\n\t\tz-index: 200;\n\t}\n"])));
|
|
31952
33379
|
|
|
@@ -32180,12 +33607,12 @@
|
|
|
32180
33607
|
}, [renderPopover ? this.renderPopoverClick(marker) : null]);
|
|
32181
33608
|
}
|
|
32182
33609
|
};
|
|
32183
|
-
var mapDispatchToProps$
|
|
33610
|
+
var mapDispatchToProps$5 = {
|
|
32184
33611
|
recordResultClick: recordResultClick$2
|
|
32185
33612
|
};
|
|
32186
33613
|
var GoogleMapMarker$1 = connect(function () {
|
|
32187
33614
|
return null;
|
|
32188
|
-
}, mapDispatchToProps$
|
|
33615
|
+
}, mapDispatchToProps$5)(GoogleMapMarker);
|
|
32189
33616
|
|
|
32190
33617
|
var GoogleMapMarkers = {
|
|
32191
33618
|
name: 'GoogleMapMarkers',
|
|
@@ -32537,8 +33964,8 @@
|
|
|
32537
33964
|
if (component.defaultQuery) {
|
|
32538
33965
|
var defaultQuery = component.defaultQuery(currentValue, component);
|
|
32539
33966
|
return _extends({
|
|
32540
|
-
query:
|
|
32541
|
-
},
|
|
33967
|
+
query: helper_14(defaultQuery)
|
|
33968
|
+
}, helper_15(defaultQuery));
|
|
32542
33969
|
}
|
|
32543
33970
|
|
|
32544
33971
|
return component.source.defaultQuery ? {
|
|
@@ -32554,8 +33981,8 @@
|
|
|
32554
33981
|
if (component.customQuery) {
|
|
32555
33982
|
var customQuery = component.customQuery(currentValue, component);
|
|
32556
33983
|
return _extends({
|
|
32557
|
-
query:
|
|
32558
|
-
},
|
|
33984
|
+
query: helper_14(customQuery)
|
|
33985
|
+
}, helper_15(customQuery));
|
|
32559
33986
|
}
|
|
32560
33987
|
|
|
32561
33988
|
return component.source.defaultQuery ? {
|
|
@@ -32719,7 +34146,7 @@
|
|
|
32719
34146
|
var react = component.react;
|
|
32720
34147
|
|
|
32721
34148
|
if (isInternalComponentPresent || isResultComponent) {
|
|
32722
|
-
react =
|
|
34149
|
+
react = helper_30(react, internalComponent);
|
|
32723
34150
|
}
|
|
32724
34151
|
|
|
32725
34152
|
dependencyTree = dependencyTreeReducer(dependencyTree, {
|
|
@@ -32782,7 +34209,7 @@
|
|
|
32782
34209
|
|
|
32783
34210
|
componentCollection.forEach(function (component) {
|
|
32784
34211
|
// eslint-disable-next-line
|
|
32785
|
-
var _buildQuery =
|
|
34212
|
+
var _buildQuery = helper_29(component.componentId, dependencyTree, queryList, queryOptions),
|
|
32786
34213
|
queryObj = _buildQuery.queryObj,
|
|
32787
34214
|
options = _buildQuery.options;
|
|
32788
34215
|
|
|
@@ -32992,21 +34419,21 @@
|
|
|
32992
34419
|
});
|
|
32993
34420
|
}
|
|
32994
34421
|
|
|
32995
|
-
var version = "1.16.0-alpha.
|
|
34422
|
+
var version = "1.16.0-alpha.51";
|
|
32996
34423
|
|
|
32997
|
-
var _templateObject$
|
|
34424
|
+
var _templateObject$p, _templateObject2$b;
|
|
32998
34425
|
|
|
32999
34426
|
var alert = function alert(_ref) {
|
|
33000
34427
|
var theme = _ref.theme;
|
|
33001
|
-
return css(_templateObject$
|
|
34428
|
+
return css(_templateObject$p || (_templateObject$p = _taggedTemplateLiteralLoose(["\n\tcolor: ", ";\n"])), theme.colors.alertColor);
|
|
33002
34429
|
};
|
|
33003
34430
|
|
|
33004
34431
|
var Content = index$1('div')(_templateObject2$b || (_templateObject2$b = _taggedTemplateLiteralLoose(["\n\t", ";\n\tfont-size: 13px;\n\tmargin: 8px;\n"])), function (props) {
|
|
33005
34432
|
return props.alert && alert;
|
|
33006
34433
|
});
|
|
33007
34434
|
|
|
33008
|
-
var getClassName$
|
|
33009
|
-
isEqual$
|
|
34435
|
+
var getClassName$h = lib_8.getClassName,
|
|
34436
|
+
isEqual$h = lib_8.isEqual;
|
|
33010
34437
|
var RangeInput = {
|
|
33011
34438
|
name: 'RangeInput',
|
|
33012
34439
|
components: {
|
|
@@ -33088,7 +34515,7 @@
|
|
|
33088
34515
|
handleChange: function handleChange(value, event) {
|
|
33089
34516
|
var currentValue = value;
|
|
33090
34517
|
|
|
33091
|
-
if (this.shouldUpdate(value) && !isEqual$
|
|
34518
|
+
if (this.shouldUpdate(value) && !isEqual$h(value, this.currentValue)) {
|
|
33092
34519
|
switch (event) {
|
|
33093
34520
|
case 'change':
|
|
33094
34521
|
if (!value) {
|
|
@@ -33158,7 +34585,7 @@
|
|
|
33158
34585
|
}
|
|
33159
34586
|
},
|
|
33160
34587
|
value: function value(newVal, oldVal) {
|
|
33161
|
-
if (!isEqual$
|
|
34588
|
+
if (!isEqual$h(newVal, oldVal)) {
|
|
33162
34589
|
if (this.isControlled()) {
|
|
33163
34590
|
this.handleChange(newVal, 'change');
|
|
33164
34591
|
}
|
|
@@ -33229,7 +34656,7 @@
|
|
|
33229
34656
|
"value-change": this.handleValueChange
|
|
33230
34657
|
}
|
|
33231
34658
|
}), h(Flex, {
|
|
33232
|
-
"class": getClassName$
|
|
34659
|
+
"class": getClassName$h(innerClass, 'input-container') || ''
|
|
33233
34660
|
}, [h(Flex, {
|
|
33234
34661
|
"attrs": {
|
|
33235
34662
|
"direction": "column",
|
|
@@ -33249,7 +34676,7 @@
|
|
|
33249
34676
|
"on": {
|
|
33250
34677
|
"change": this.handleInputChange
|
|
33251
34678
|
},
|
|
33252
|
-
"class": getClassName$
|
|
34679
|
+
"class": getClassName$h(innerClass, 'input') || '',
|
|
33253
34680
|
"domProps": _extends({}, {
|
|
33254
34681
|
value: this.currentValue.start
|
|
33255
34682
|
})
|
|
@@ -33282,7 +34709,7 @@
|
|
|
33282
34709
|
"on": {
|
|
33283
34710
|
"change": this.handleInputChange
|
|
33284
34711
|
},
|
|
33285
|
-
"class": getClassName$
|
|
34712
|
+
"class": getClassName$h(innerClass, 'input') || '',
|
|
33286
34713
|
"domProps": _extends({}, {
|
|
33287
34714
|
value: this.currentValue.end
|
|
33288
34715
|
})
|
|
@@ -33294,13 +34721,13 @@
|
|
|
33294
34721
|
}
|
|
33295
34722
|
};
|
|
33296
34723
|
|
|
33297
|
-
var mapStateToProps$
|
|
34724
|
+
var mapStateToProps$i = function mapStateToProps(state) {
|
|
33298
34725
|
return {
|
|
33299
34726
|
themePreset: state.config.themePreset
|
|
33300
34727
|
};
|
|
33301
34728
|
};
|
|
33302
34729
|
|
|
33303
|
-
var RangeConnected$4 = ComponentWrapper$1(connect(mapStateToProps$
|
|
34730
|
+
var RangeConnected$4 = ComponentWrapper$1(connect(mapStateToProps$i, {})(RangeInput), {
|
|
33304
34731
|
componentType: constants_1$1.rangeInput
|
|
33305
34732
|
});
|
|
33306
34733
|
|
|
@@ -33311,7 +34738,7 @@
|
|
|
33311
34738
|
|
|
33312
34739
|
RangeInput.componentType = constants_1$1.rangeInput;
|
|
33313
34740
|
|
|
33314
|
-
var components = [ReactiveList, ResultCard, ResultList, ReactiveBase, DataSearch, SingleList, MultiList, SingleRange, MultiRange, RangeSlider, DynamicRangeSlider, ReactiveComponent, SelectedFilters, ToggleButton, SingleDropdownList, MultiDropdownList, StateProvider, RangeInput];
|
|
34741
|
+
var components = [ReactiveList, ResultCard, ResultList, ReactiveBase, DataSearch, SearchBox, SingleList, MultiList, SingleRange, MultiRange, RangeSlider, DynamicRangeSlider, ReactiveComponent, SelectedFilters, ToggleButton, SingleDropdownList, MultiDropdownList, StateProvider, RangeInput];
|
|
33315
34742
|
function install (Vue) {
|
|
33316
34743
|
components.map(function (component) {
|
|
33317
34744
|
Vue.use(component);
|
|
@@ -33342,6 +34769,7 @@
|
|
|
33342
34769
|
exports.ReactiveList = ReactiveList;
|
|
33343
34770
|
exports.ResultCard = ResultCard;
|
|
33344
34771
|
exports.ResultList = ResultList;
|
|
34772
|
+
exports.SearchBox = SearchBox;
|
|
33345
34773
|
exports.SelectedFilters = SelectedFilters;
|
|
33346
34774
|
exports.SingleDropdownList = SingleDropdownList;
|
|
33347
34775
|
exports.SingleList = SingleList;
|