@appbaseio/reactivesearch-vue 1.28.0 → 1.29.0-preview.1
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 +1759 -371
- 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-11307285.js → Button-e0b7c1f6.js} +1 -1
- package/dist/cjs/DataSearch-eec21890.js +2171 -0
- package/dist/cjs/DataSearch.js +18 -2107
- package/dist/cjs/{DropDown-7aa3d0d2.js → DropDown-e4381fcc.js} +1 -1
- package/dist/cjs/{Input-3cc3fa59.js → Input-0d7b25ad.js} +1 -1
- package/dist/cjs/MultiDropdownList.js +3 -3
- package/dist/cjs/MultiList.js +1 -1
- package/dist/cjs/RangeInput.js +1 -1
- package/dist/cjs/ReactiveList.js +1 -1
- 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 +10 -9
- package/dist/cjs/install-b05fef06.js +1247 -0
- package/dist/cjs/install.js +24 -29
- package/dist/cjs/version.js +1 -1
- package/dist/es/{Button-91561391.js → Button-33de88e6.js} +1 -1
- package/dist/es/DataSearch-42f547cd.js +2158 -0
- package/dist/es/DataSearch.js +17 -2106
- package/dist/es/{DropDown-60a426a2.js → DropDown-ff6ad982.js} +1 -1
- package/dist/es/{Input-08bb1bcf.js → Input-e339e63a.js} +1 -1
- package/dist/es/MultiDropdownList.js +3 -3
- package/dist/es/MultiList.js +1 -1
- package/dist/es/RangeInput.js +1 -1
- package/dist/es/ReactiveList.js +1 -1
- 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 +6 -6
- package/dist/es/install-bd448c02.js +1240 -0
- package/dist/es/install.js +22 -31
- package/dist/es/version.js +1 -1
- package/package.json +3 -3
|
@@ -820,6 +820,9 @@
|
|
|
820
820
|
var RECENT_SEARCHES_ERROR = exports.RECENT_SEARCHES_ERROR = 'RECENT_SEARCHES_ERROR';
|
|
821
821
|
var SET_VALUE = exports.SET_VALUE = 'SET_VALUE';
|
|
822
822
|
var RESET_TO_DEFAULT = exports.RESET_TO_DEFAULT = 'RESET_TO_DEFAULT';
|
|
823
|
+
var SET_GOOGLE_MAP_SCRIPT_LOADING = exports.SET_GOOGLE_MAP_SCRIPT_LOADING = 'SET_GOOGLE_MAP_SCRIPT_LOADING';
|
|
824
|
+
var SET_GOOGLE_MAP_SCRIPT_LOADED = exports.SET_GOOGLE_MAP_SCRIPT_LOADED = 'SET_GOOGLE_MAP_SCRIPT_LOADED';
|
|
825
|
+
var SET_GOOGLE_MAP_SCRIPT_ERROR = exports.SET_GOOGLE_MAP_SCRIPT_ERROR = 'SET_GOOGLE_MAP_SCRIPT_ERROR';
|
|
823
826
|
});
|
|
824
827
|
unwrapExports(constants);
|
|
825
828
|
var constants_1 = constants.ADD_COMPONENT;
|
|
@@ -867,6 +870,9 @@
|
|
|
867
870
|
var constants_43 = constants.RECENT_SEARCHES_ERROR;
|
|
868
871
|
var constants_44 = constants.SET_VALUE;
|
|
869
872
|
var constants_45 = constants.RESET_TO_DEFAULT;
|
|
873
|
+
var constants_46 = constants.SET_GOOGLE_MAP_SCRIPT_LOADING;
|
|
874
|
+
var constants_47 = constants.SET_GOOGLE_MAP_SCRIPT_LOADED;
|
|
875
|
+
var constants_48 = constants.SET_GOOGLE_MAP_SCRIPT_ERROR;
|
|
870
876
|
|
|
871
877
|
var componentsReducer_1 = createCommonjsModule(function (module, exports) {
|
|
872
878
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -3198,6 +3204,59 @@
|
|
|
3198
3204
|
});
|
|
3199
3205
|
unwrapExports(recentSearches);
|
|
3200
3206
|
|
|
3207
|
+
var googleMapScriptReducer_1 = createCommonjsModule(function (module, exports) {
|
|
3208
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3209
|
+
value: true
|
|
3210
|
+
});
|
|
3211
|
+
|
|
3212
|
+
var _extends = Object.assign || function (target) {
|
|
3213
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
3214
|
+
var source = arguments[i];
|
|
3215
|
+
|
|
3216
|
+
for (var key in source) {
|
|
3217
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
3218
|
+
target[key] = source[key];
|
|
3219
|
+
}
|
|
3220
|
+
}
|
|
3221
|
+
}
|
|
3222
|
+
|
|
3223
|
+
return target;
|
|
3224
|
+
};
|
|
3225
|
+
|
|
3226
|
+
exports["default"] = googleMapScriptReducer;
|
|
3227
|
+
var INITIAL_STATE = {
|
|
3228
|
+
loading: false,
|
|
3229
|
+
loaded: false,
|
|
3230
|
+
error: null
|
|
3231
|
+
};
|
|
3232
|
+
|
|
3233
|
+
function googleMapScriptReducer() {
|
|
3234
|
+
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : INITIAL_STATE;
|
|
3235
|
+
var action = arguments[1];
|
|
3236
|
+
var type = action.type,
|
|
3237
|
+
loading = action.loading,
|
|
3238
|
+
loaded = action.loaded,
|
|
3239
|
+
error = action.error;
|
|
3240
|
+
|
|
3241
|
+
if (type === constants.SET_GOOGLE_MAP_SCRIPT_LOADING) {
|
|
3242
|
+
return _extends({}, INITIAL_STATE, {
|
|
3243
|
+
loading: loading
|
|
3244
|
+
});
|
|
3245
|
+
} else if (type === constants.SET_GOOGLE_MAP_SCRIPT_LOADED) {
|
|
3246
|
+
return _extends({}, INITIAL_STATE, {
|
|
3247
|
+
loaded: loaded
|
|
3248
|
+
});
|
|
3249
|
+
} else if (type === constants.SET_GOOGLE_MAP_SCRIPT_ERROR) {
|
|
3250
|
+
return _extends({}, INITIAL_STATE, {
|
|
3251
|
+
error: error
|
|
3252
|
+
});
|
|
3253
|
+
}
|
|
3254
|
+
|
|
3255
|
+
return state;
|
|
3256
|
+
}
|
|
3257
|
+
});
|
|
3258
|
+
unwrapExports(googleMapScriptReducer_1);
|
|
3259
|
+
|
|
3201
3260
|
var reducers = createCommonjsModule(function (module, exports) {
|
|
3202
3261
|
Object.defineProperty(exports, "__esModule", {
|
|
3203
3262
|
value: true
|
|
@@ -3269,6 +3328,8 @@
|
|
|
3269
3328
|
|
|
3270
3329
|
var _recentSearches2 = _interopRequireDefault(recentSearches);
|
|
3271
3330
|
|
|
3331
|
+
var _googleMapScriptReducer2 = _interopRequireDefault(googleMapScriptReducer_1);
|
|
3332
|
+
|
|
3272
3333
|
function _interopRequireDefault(obj) {
|
|
3273
3334
|
return obj && obj.__esModule ? obj : {
|
|
3274
3335
|
"default": obj
|
|
@@ -3312,7 +3373,8 @@
|
|
|
3312
3373
|
urlValues: function urlValues() {
|
|
3313
3374
|
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
3314
3375
|
return state;
|
|
3315
|
-
}
|
|
3376
|
+
},
|
|
3377
|
+
googleMapScriptStatus: _googleMapScriptReducer2["default"]
|
|
3316
3378
|
});
|
|
3317
3379
|
});
|
|
3318
3380
|
unwrapExports(reducers);
|
|
@@ -4892,7 +4954,7 @@
|
|
|
4892
4954
|
Object.defineProperty(exports, "__esModule", {
|
|
4893
4955
|
value: true
|
|
4894
4956
|
});
|
|
4895
|
-
exports.getCalendarIntervalErrorMessage = exports.queryFormatMillisecondsMap = exports.suggestionTypes = exports.getTopSuggestions = exports.withClickIds = exports.getCompositeAggsQuery = exports.getAggsQuery = exports.extractQueryFromDefaultQuery = exports.updateInternalQuery = exports.getSearchState = exports.extractQueryFromCustomQuery = exports.getOptionsForCustomQuery = exports.getOptionsFromQuery = exports.parseHits = exports.handleA11yAction = exports.getInnerKey = exports.getClassName = exports.checkSomePropChange = exports.checkPropChange = exports.updateDefaultQuery = exports.updateCustomQuery = undefined;
|
|
4957
|
+
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;
|
|
4896
4958
|
|
|
4897
4959
|
var _extends = Object.assign || function (target) {
|
|
4898
4960
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -5794,43 +5856,74 @@
|
|
|
5794
5856
|
calculatedCalendarInterval: 'year'
|
|
5795
5857
|
};
|
|
5796
5858
|
};
|
|
5859
|
+
|
|
5860
|
+
var isFunction = exports.isFunction = function isFunction(element) {
|
|
5861
|
+
return typeof element === 'function';
|
|
5862
|
+
};
|
|
5863
|
+
|
|
5864
|
+
var getComponent = exports.getComponent = function getComponent() {
|
|
5865
|
+
var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
5866
|
+
var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
5867
|
+
var children = props.children,
|
|
5868
|
+
render = props.render;
|
|
5869
|
+
|
|
5870
|
+
if (isFunction(children)) {
|
|
5871
|
+
return children(data);
|
|
5872
|
+
}
|
|
5873
|
+
|
|
5874
|
+
if (isFunction(render)) {
|
|
5875
|
+
return render(data);
|
|
5876
|
+
}
|
|
5877
|
+
|
|
5878
|
+
return null;
|
|
5879
|
+
};
|
|
5880
|
+
|
|
5881
|
+
var hasCustomRenderer = exports.hasCustomRenderer = function hasCustomRenderer() {
|
|
5882
|
+
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
5883
|
+
var render = props.render,
|
|
5884
|
+
children = props.children;
|
|
5885
|
+
return isFunction(children) || isFunction(render);
|
|
5886
|
+
};
|
|
5797
5887
|
});
|
|
5798
5888
|
unwrapExports(helper);
|
|
5799
|
-
var helper_1 = helper.
|
|
5800
|
-
var helper_2 = helper.
|
|
5801
|
-
var helper_3 = helper.
|
|
5802
|
-
var helper_4 = helper.
|
|
5803
|
-
var helper_5 = helper.
|
|
5804
|
-
var helper_6 = helper.
|
|
5805
|
-
var helper_7 = helper.
|
|
5806
|
-
var helper_8 = helper.
|
|
5807
|
-
var helper_9 = helper.
|
|
5808
|
-
var helper_10 = helper.
|
|
5809
|
-
var helper_11 = helper.
|
|
5810
|
-
var helper_12 = helper.
|
|
5811
|
-
var helper_13 = helper.
|
|
5812
|
-
var helper_14 = helper.
|
|
5813
|
-
var helper_15 = helper.
|
|
5814
|
-
var helper_16 = helper.
|
|
5815
|
-
var helper_17 = helper.
|
|
5816
|
-
var helper_18 = helper.
|
|
5817
|
-
var helper_19 = helper.
|
|
5818
|
-
var helper_20 = helper.
|
|
5819
|
-
var helper_21 = helper.
|
|
5820
|
-
var helper_22 = helper.
|
|
5821
|
-
var helper_23 = helper.
|
|
5822
|
-
var helper_24 = helper.
|
|
5823
|
-
var helper_25 = helper.
|
|
5824
|
-
var helper_26 = helper.
|
|
5825
|
-
var helper_27 = helper.
|
|
5826
|
-
var helper_28 = helper.
|
|
5827
|
-
var helper_29 = helper.
|
|
5828
|
-
var helper_30 = helper.
|
|
5829
|
-
var helper_31 = helper.
|
|
5830
|
-
var helper_32 = helper.
|
|
5831
|
-
var helper_33 = helper.
|
|
5832
|
-
var helper_34 = helper.
|
|
5833
|
-
var helper_35 = helper.
|
|
5889
|
+
var helper_1 = helper.hasCustomRenderer;
|
|
5890
|
+
var helper_2 = helper.getComponent;
|
|
5891
|
+
var helper_3 = helper.isFunction;
|
|
5892
|
+
var helper_4 = helper.getCalendarIntervalErrorMessage;
|
|
5893
|
+
var helper_5 = helper.queryFormatMillisecondsMap;
|
|
5894
|
+
var helper_6 = helper.suggestionTypes;
|
|
5895
|
+
var helper_7 = helper.getTopSuggestions;
|
|
5896
|
+
var helper_8 = helper.withClickIds;
|
|
5897
|
+
var helper_9 = helper.getCompositeAggsQuery;
|
|
5898
|
+
var helper_10 = helper.getAggsQuery;
|
|
5899
|
+
var helper_11 = helper.extractQueryFromDefaultQuery;
|
|
5900
|
+
var helper_12 = helper.updateInternalQuery;
|
|
5901
|
+
var helper_13 = helper.getSearchState;
|
|
5902
|
+
var helper_14 = helper.extractQueryFromCustomQuery;
|
|
5903
|
+
var helper_15 = helper.getOptionsForCustomQuery;
|
|
5904
|
+
var helper_16 = helper.getOptionsFromQuery;
|
|
5905
|
+
var helper_17 = helper.parseHits;
|
|
5906
|
+
var helper_18 = helper.handleA11yAction;
|
|
5907
|
+
var helper_19 = helper.getInnerKey;
|
|
5908
|
+
var helper_20 = helper.getClassName;
|
|
5909
|
+
var helper_21 = helper.checkSomePropChange;
|
|
5910
|
+
var helper_22 = helper.checkPropChange;
|
|
5911
|
+
var helper_23 = helper.updateDefaultQuery;
|
|
5912
|
+
var helper_24 = helper.updateCustomQuery;
|
|
5913
|
+
var helper_25 = helper.isEqual;
|
|
5914
|
+
var helper_26 = helper.compareQueries;
|
|
5915
|
+
var helper_27 = helper.debounce;
|
|
5916
|
+
var helper_28 = helper.getQueryOptions;
|
|
5917
|
+
var helper_29 = helper.buildQuery;
|
|
5918
|
+
var helper_30 = helper.pushToAndClause;
|
|
5919
|
+
var helper_31 = helper.checkValueChange;
|
|
5920
|
+
var helper_32 = helper.getAggsOrder;
|
|
5921
|
+
var helper_33 = helper.formatDate;
|
|
5922
|
+
var helper_34 = helper.getResultStats;
|
|
5923
|
+
var helper_35 = helper.extractFieldsFromSource;
|
|
5924
|
+
var helper_36 = helper.normalizeDataField;
|
|
5925
|
+
var helper_37 = helper.handleOnSuggestions;
|
|
5926
|
+
var helper_38 = helper.isValidDateRangeQueryFormat;
|
|
5834
5927
|
|
|
5835
5928
|
var value = createCommonjsModule(function (module, exports) {
|
|
5836
5929
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5968,6 +6061,76 @@
|
|
|
5968
6061
|
var value_4 = value.patchValue;
|
|
5969
6062
|
var value_5 = value.clearValues;
|
|
5970
6063
|
|
|
6064
|
+
var hits = createCommonjsModule(function (module, exports) {
|
|
6065
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6066
|
+
value: true
|
|
6067
|
+
});
|
|
6068
|
+
exports.updateAggs = updateAggs;
|
|
6069
|
+
exports.updateCompositeAggs = updateCompositeAggs;
|
|
6070
|
+
exports.updateHits = updateHits;
|
|
6071
|
+
exports.saveQueryToHits = saveQueryToHits;
|
|
6072
|
+
exports.mockDataForTesting = mockDataForTesting;
|
|
6073
|
+
|
|
6074
|
+
function updateAggs(component, aggregations) {
|
|
6075
|
+
var append = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
6076
|
+
return {
|
|
6077
|
+
type: constants.UPDATE_AGGS,
|
|
6078
|
+
component: component,
|
|
6079
|
+
aggregations: aggregations,
|
|
6080
|
+
append: append
|
|
6081
|
+
};
|
|
6082
|
+
}
|
|
6083
|
+
|
|
6084
|
+
function updateCompositeAggs(component, aggregations) {
|
|
6085
|
+
var append = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
6086
|
+
return {
|
|
6087
|
+
type: constants.UPDATE_COMPOSITE_AGGS,
|
|
6088
|
+
component: component,
|
|
6089
|
+
aggregations: aggregations,
|
|
6090
|
+
append: append
|
|
6091
|
+
};
|
|
6092
|
+
}
|
|
6093
|
+
|
|
6094
|
+
function updateHits(component, hits, time, hidden) {
|
|
6095
|
+
var append = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
6096
|
+
return {
|
|
6097
|
+
type: constants.UPDATE_HITS,
|
|
6098
|
+
component: component,
|
|
6099
|
+
hits: hits.hits,
|
|
6100
|
+
total: typeof hits.total === 'object' ? hits.total.value : hits.total,
|
|
6101
|
+
hidden: hidden,
|
|
6102
|
+
time: time,
|
|
6103
|
+
append: append
|
|
6104
|
+
};
|
|
6105
|
+
}
|
|
6106
|
+
|
|
6107
|
+
function saveQueryToHits(component, query) {
|
|
6108
|
+
return {
|
|
6109
|
+
type: constants.SET_QUERY_TO_HITS,
|
|
6110
|
+
component: component,
|
|
6111
|
+
query: query
|
|
6112
|
+
};
|
|
6113
|
+
}
|
|
6114
|
+
|
|
6115
|
+
function mockDataForTesting(component, data) {
|
|
6116
|
+
return function (dispatch) {
|
|
6117
|
+
if (data.hasOwnProperty('aggregations')) {
|
|
6118
|
+
dispatch(updateAggs(component, data.aggregations));
|
|
6119
|
+
}
|
|
6120
|
+
|
|
6121
|
+
if (data.hasOwnProperty('hits')) {
|
|
6122
|
+
dispatch(updateHits(component, data, data.time || undefined));
|
|
6123
|
+
}
|
|
6124
|
+
};
|
|
6125
|
+
}
|
|
6126
|
+
});
|
|
6127
|
+
unwrapExports(hits);
|
|
6128
|
+
var hits_1 = hits.updateAggs;
|
|
6129
|
+
var hits_2 = hits.updateCompositeAggs;
|
|
6130
|
+
var hits_3 = hits.updateHits;
|
|
6131
|
+
var hits_4 = hits.saveQueryToHits;
|
|
6132
|
+
var hits_5 = hits.mockDataForTesting;
|
|
6133
|
+
|
|
5971
6134
|
var misc = createCommonjsModule(function (module, exports) {
|
|
5972
6135
|
Object.defineProperty(exports, "__esModule", {
|
|
5973
6136
|
value: true
|
|
@@ -5992,6 +6155,10 @@
|
|
|
5992
6155
|
exports.setCustomData = setCustomData;
|
|
5993
6156
|
exports.setAppliedSettings = setAppliedSettings;
|
|
5994
6157
|
exports.setQueryListener = setQueryListener;
|
|
6158
|
+
exports.setGoogleMapScriptLoading = setGoogleMapScriptLoading;
|
|
6159
|
+
exports.setGoogleMapScriptLoaded = setGoogleMapScriptLoaded;
|
|
6160
|
+
exports.setGoogleMapScriptError = setGoogleMapScriptError;
|
|
6161
|
+
exports.resetStoreForComponent = resetStoreForComponent;
|
|
5995
6162
|
|
|
5996
6163
|
function setRawData(component, response) {
|
|
5997
6164
|
return {
|
|
@@ -6162,6 +6329,43 @@
|
|
|
6162
6329
|
onError: onError
|
|
6163
6330
|
};
|
|
6164
6331
|
}
|
|
6332
|
+
|
|
6333
|
+
function setGoogleMapScriptLoading(bool) {
|
|
6334
|
+
return {
|
|
6335
|
+
type: constants.SET_GOOGLE_MAP_SCRIPT_LOADING,
|
|
6336
|
+
loading: bool
|
|
6337
|
+
};
|
|
6338
|
+
}
|
|
6339
|
+
|
|
6340
|
+
function setGoogleMapScriptLoaded(bool) {
|
|
6341
|
+
return {
|
|
6342
|
+
type: constants.SET_GOOGLE_MAP_SCRIPT_LOADED,
|
|
6343
|
+
loaded: bool
|
|
6344
|
+
};
|
|
6345
|
+
}
|
|
6346
|
+
|
|
6347
|
+
function setGoogleMapScriptError(error) {
|
|
6348
|
+
return {
|
|
6349
|
+
type: constants.SET_GOOGLE_MAP_SCRIPT_ERROR,
|
|
6350
|
+
error: error
|
|
6351
|
+
};
|
|
6352
|
+
}
|
|
6353
|
+
|
|
6354
|
+
function resetStoreForComponent(componentId) {
|
|
6355
|
+
return function (dispatch) {
|
|
6356
|
+
dispatch(setRawData(componentId, null));
|
|
6357
|
+
dispatch(setCustomData(null, componentId));
|
|
6358
|
+
dispatch(setPromotedResults([], componentId));
|
|
6359
|
+
dispatch(setPopularSuggestions([], componentId));
|
|
6360
|
+
dispatch(setDefaultPopularSuggestions([], componentId));
|
|
6361
|
+
dispatch((0, hits.updateAggs)(componentId, null));
|
|
6362
|
+
dispatch((0, hits.updateCompositeAggs)(componentId, {}));
|
|
6363
|
+
dispatch((0, hits.updateHits)(componentId, {
|
|
6364
|
+
hits: [],
|
|
6365
|
+
total: 0
|
|
6366
|
+
}, 0));
|
|
6367
|
+
};
|
|
6368
|
+
}
|
|
6165
6369
|
});
|
|
6166
6370
|
unwrapExports(misc);
|
|
6167
6371
|
var misc_1 = misc.setRawData;
|
|
@@ -6184,76 +6388,10 @@
|
|
|
6184
6388
|
var misc_18 = misc.setCustomData;
|
|
6185
6389
|
var misc_19 = misc.setAppliedSettings;
|
|
6186
6390
|
var misc_20 = misc.setQueryListener;
|
|
6187
|
-
|
|
6188
|
-
var
|
|
6189
|
-
|
|
6190
|
-
|
|
6191
|
-
});
|
|
6192
|
-
exports.updateAggs = updateAggs;
|
|
6193
|
-
exports.updateCompositeAggs = updateCompositeAggs;
|
|
6194
|
-
exports.updateHits = updateHits;
|
|
6195
|
-
exports.saveQueryToHits = saveQueryToHits;
|
|
6196
|
-
exports.mockDataForTesting = mockDataForTesting;
|
|
6197
|
-
|
|
6198
|
-
function updateAggs(component, aggregations) {
|
|
6199
|
-
var append = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
6200
|
-
return {
|
|
6201
|
-
type: constants.UPDATE_AGGS,
|
|
6202
|
-
component: component,
|
|
6203
|
-
aggregations: aggregations,
|
|
6204
|
-
append: append
|
|
6205
|
-
};
|
|
6206
|
-
}
|
|
6207
|
-
|
|
6208
|
-
function updateCompositeAggs(component, aggregations) {
|
|
6209
|
-
var append = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
6210
|
-
return {
|
|
6211
|
-
type: constants.UPDATE_COMPOSITE_AGGS,
|
|
6212
|
-
component: component,
|
|
6213
|
-
aggregations: aggregations,
|
|
6214
|
-
append: append
|
|
6215
|
-
};
|
|
6216
|
-
}
|
|
6217
|
-
|
|
6218
|
-
function updateHits(component, hits, time, hidden) {
|
|
6219
|
-
var append = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
6220
|
-
return {
|
|
6221
|
-
type: constants.UPDATE_HITS,
|
|
6222
|
-
component: component,
|
|
6223
|
-
hits: hits.hits,
|
|
6224
|
-
total: typeof hits.total === 'object' ? hits.total.value : hits.total,
|
|
6225
|
-
hidden: hidden,
|
|
6226
|
-
time: time,
|
|
6227
|
-
append: append
|
|
6228
|
-
};
|
|
6229
|
-
}
|
|
6230
|
-
|
|
6231
|
-
function saveQueryToHits(component, query) {
|
|
6232
|
-
return {
|
|
6233
|
-
type: constants.SET_QUERY_TO_HITS,
|
|
6234
|
-
component: component,
|
|
6235
|
-
query: query
|
|
6236
|
-
};
|
|
6237
|
-
}
|
|
6238
|
-
|
|
6239
|
-
function mockDataForTesting(component, data) {
|
|
6240
|
-
return function (dispatch) {
|
|
6241
|
-
if (data.hasOwnProperty('aggregations')) {
|
|
6242
|
-
dispatch(updateAggs(component, data.aggregations));
|
|
6243
|
-
}
|
|
6244
|
-
|
|
6245
|
-
if (data.hasOwnProperty('hits')) {
|
|
6246
|
-
dispatch(updateHits(component, data, data.time || undefined));
|
|
6247
|
-
}
|
|
6248
|
-
};
|
|
6249
|
-
}
|
|
6250
|
-
});
|
|
6251
|
-
unwrapExports(hits);
|
|
6252
|
-
var hits_1 = hits.updateAggs;
|
|
6253
|
-
var hits_2 = hits.updateCompositeAggs;
|
|
6254
|
-
var hits_3 = hits.updateHits;
|
|
6255
|
-
var hits_4 = hits.saveQueryToHits;
|
|
6256
|
-
var hits_5 = hits.mockDataForTesting;
|
|
6391
|
+
var misc_21 = misc.setGoogleMapScriptLoading;
|
|
6392
|
+
var misc_22 = misc.setGoogleMapScriptLoaded;
|
|
6393
|
+
var misc_23 = misc.setGoogleMapScriptError;
|
|
6394
|
+
var misc_24 = misc.resetStoreForComponent;
|
|
6257
6395
|
|
|
6258
6396
|
var xdate = createCommonjsModule(function (module) {
|
|
6259
6397
|
/**
|
|
@@ -12900,7 +13038,7 @@
|
|
|
12900
13038
|
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');
|
|
12901
13039
|
};
|
|
12902
13040
|
|
|
12903
|
-
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) {
|
|
13041
|
+
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) {
|
|
12904
13042
|
var theme = _ref4.theme;
|
|
12905
13043
|
return theme.colors.backgroundColor || '#eee';
|
|
12906
13044
|
}, function (_ref5) {
|
|
@@ -14304,7 +14442,7 @@
|
|
|
14304
14442
|
filteredResults = [].concat(parsedPromotedResults, filteredResults);
|
|
14305
14443
|
}
|
|
14306
14444
|
|
|
14307
|
-
return
|
|
14445
|
+
return helper_8(filteredResults);
|
|
14308
14446
|
}
|
|
14309
14447
|
},
|
|
14310
14448
|
watch: {
|
|
@@ -16754,14 +16892,14 @@
|
|
|
16754
16892
|
this.updateState(this.$props);
|
|
16755
16893
|
},
|
|
16756
16894
|
analyticsConfig: function analyticsConfig(newVal, oldVal) {
|
|
16757
|
-
if (!
|
|
16895
|
+
if (!helper_25(newVal, oldVal)) {
|
|
16758
16896
|
if (this.store) {
|
|
16759
16897
|
this.store.dispatch(analytics_3$1(newVal));
|
|
16760
16898
|
}
|
|
16761
16899
|
}
|
|
16762
16900
|
},
|
|
16763
16901
|
appbaseConfig: function appbaseConfig(newVal, oldVal) {
|
|
16764
|
-
if (!
|
|
16902
|
+
if (!helper_25(newVal, oldVal)) {
|
|
16765
16903
|
if (this.store) {
|
|
16766
16904
|
this.store.dispatch(analytics_3$1(newVal));
|
|
16767
16905
|
}
|
|
@@ -17538,7 +17676,7 @@
|
|
|
17538
17676
|
});
|
|
17539
17677
|
|
|
17540
17678
|
var suggestions$1 = function suggestions(themePreset, theme) {
|
|
17541
|
-
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:
|
|
17679
|
+
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));
|
|
17542
17680
|
};
|
|
17543
17681
|
|
|
17544
17682
|
var suggestionsContainer = css(_templateObject15 || (_templateObject15 = _taggedTemplateLiteralLoose(["\n\tposition: relative;\n\t.cancel-icon {\n\t\tcursor: pointer;\n\t}\n"])));
|
|
@@ -18578,19 +18716,22 @@
|
|
|
18578
18716
|
title = _this$suggestion.title,
|
|
18579
18717
|
description = _this$suggestion.description,
|
|
18580
18718
|
image = _this$suggestion.image,
|
|
18581
|
-
isPredictiveSuggestion = _this$suggestion.isPredictiveSuggestion
|
|
18719
|
+
isPredictiveSuggestion = _this$suggestion.isPredictiveSuggestion,
|
|
18720
|
+
_suggestion_type = _this$suggestion._suggestion_type,
|
|
18721
|
+
_category = _this$suggestion._category;
|
|
18582
18722
|
|
|
18583
18723
|
if (label) {
|
|
18584
18724
|
// label has highest precedence
|
|
18585
18725
|
return typeof label === 'string' ? h("div", {
|
|
18586
18726
|
"class": "trim"
|
|
18587
|
-
}, [
|
|
18727
|
+
}, [(_category ? false : isPredictiveSuggestion // eslint-disable-next-line
|
|
18728
|
+
|| !!_suggestion_type) ? h(PredictiveSuggestion, {
|
|
18588
18729
|
"domProps": {
|
|
18589
18730
|
"innerHTML": label
|
|
18590
18731
|
}
|
|
18591
18732
|
}) : h(VueHighlightWords, {
|
|
18592
18733
|
"attrs": {
|
|
18593
|
-
"searchWords": this.currentValue.split(' '),
|
|
18734
|
+
"searchWords": _category ? [_category] : this.currentValue.split(' '),
|
|
18594
18735
|
"textToHighlight": label,
|
|
18595
18736
|
"autoEscape": true,
|
|
18596
18737
|
"highlightStyle": highlightStyle
|
|
@@ -18659,17 +18800,22 @@
|
|
|
18659
18800
|
};
|
|
18660
18801
|
|
|
18661
18802
|
var SearchSvg = {
|
|
18662
|
-
|
|
18663
|
-
|
|
18803
|
+
name: 'SearchSvg',
|
|
18804
|
+
props: ['styles'],
|
|
18805
|
+
render: function render() {
|
|
18806
|
+
var h = arguments[0];
|
|
18664
18807
|
return h("svg", {
|
|
18665
18808
|
"attrs": {
|
|
18666
18809
|
"alt": "Search",
|
|
18667
|
-
"height": "
|
|
18668
|
-
"width": "10",
|
|
18810
|
+
"height": "12",
|
|
18669
18811
|
"xmlns": "http://www.w3.org/2000/svg",
|
|
18670
18812
|
"viewBox": "0 0 15 15"
|
|
18671
18813
|
},
|
|
18672
|
-
"class": "search-icon"
|
|
18814
|
+
"class": "search-icon",
|
|
18815
|
+
"style": _extends({
|
|
18816
|
+
transform: 'scale(1.35)',
|
|
18817
|
+
position: 'relative'
|
|
18818
|
+
}, this.$props.styles ? this.$props.styles : {})
|
|
18673
18819
|
}, [h("title", ["Search"]), h("path", {
|
|
18674
18820
|
"attrs": {
|
|
18675
18821
|
"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'
|
|
@@ -19341,11 +19487,11 @@
|
|
|
19341
19487
|
}, [this.customIcon]);
|
|
19342
19488
|
}
|
|
19343
19489
|
|
|
19344
|
-
if (this.$props.type === '
|
|
19490
|
+
if (this.$props.type === 'recent-search-icon') {
|
|
19345
19491
|
return h("svg", {
|
|
19346
19492
|
"attrs": {
|
|
19347
19493
|
"xmlns": "http://www.w3.org/2000/svg",
|
|
19348
|
-
"alt": "
|
|
19494
|
+
"alt": "Recent Search",
|
|
19349
19495
|
"height": "20",
|
|
19350
19496
|
"width": "20",
|
|
19351
19497
|
"viewBox": "0 0 24 24"
|
|
@@ -19361,14 +19507,36 @@
|
|
|
19361
19507
|
}
|
|
19362
19508
|
}), h("path", {
|
|
19363
19509
|
"attrs": {
|
|
19364
|
-
"d": "
|
|
19510
|
+
"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"
|
|
19365
19511
|
}
|
|
19366
19512
|
})]);
|
|
19367
|
-
}
|
|
19513
|
+
}
|
|
19514
|
+
|
|
19515
|
+
if (this.$props.type === 'promoted-search-icon') {
|
|
19516
|
+
return h("svg", {
|
|
19517
|
+
"attrs": {
|
|
19518
|
+
"xmlns": "http://www.w3.org/2000/svg",
|
|
19519
|
+
"width": "20",
|
|
19520
|
+
"alt": "promoted search",
|
|
19521
|
+
"height": "20",
|
|
19522
|
+
"viewBox": "0 0 24 24"
|
|
19523
|
+
},
|
|
19524
|
+
"class": this.$props.className,
|
|
19525
|
+
"style": {
|
|
19526
|
+
fill: '#707070'
|
|
19527
|
+
}
|
|
19528
|
+
}, [h("path", {
|
|
19529
|
+
"attrs": {
|
|
19530
|
+
"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"
|
|
19531
|
+
}
|
|
19532
|
+
})]);
|
|
19533
|
+
}
|
|
19534
|
+
|
|
19535
|
+
if (this.$props.type === 'popular-search-icon') {
|
|
19368
19536
|
return h("svg", {
|
|
19369
19537
|
"attrs": {
|
|
19370
19538
|
"xmlns": "http://www.w3.org/2000/svg",
|
|
19371
|
-
"alt": "
|
|
19539
|
+
"alt": "Popular Search",
|
|
19372
19540
|
"height": "20",
|
|
19373
19541
|
"width": "20",
|
|
19374
19542
|
"viewBox": "0 0 24 24"
|
|
@@ -19384,10 +19552,21 @@
|
|
|
19384
19552
|
}
|
|
19385
19553
|
}), h("path", {
|
|
19386
19554
|
"attrs": {
|
|
19387
|
-
"d": "
|
|
19555
|
+
"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"
|
|
19388
19556
|
}
|
|
19389
19557
|
})]);
|
|
19390
19558
|
}
|
|
19559
|
+
|
|
19560
|
+
return h(SearchSvg, {
|
|
19561
|
+
"attrs": {
|
|
19562
|
+
"styles": {
|
|
19563
|
+
position: 'relative',
|
|
19564
|
+
fill: '#707070',
|
|
19565
|
+
left: '3px',
|
|
19566
|
+
marginRight: '8px'
|
|
19567
|
+
}
|
|
19568
|
+
}
|
|
19569
|
+
});
|
|
19391
19570
|
}
|
|
19392
19571
|
};
|
|
19393
19572
|
|
|
@@ -19459,11 +19638,15 @@
|
|
|
19459
19638
|
console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
|
|
19460
19639
|
}
|
|
19461
19640
|
|
|
19462
|
-
this.loadPopularSuggestions(this.$props.componentId);
|
|
19463
19641
|
this.currentValue = this.selectedValue || '';
|
|
19642
|
+
var shouldFetchInitialSuggestions = this.$props.enableDefaultSuggestions || this.currentValue;
|
|
19643
|
+
|
|
19644
|
+
if (shouldFetchInitialSuggestions) {
|
|
19645
|
+
this.loadPopularSuggestions(this.$props.componentId);
|
|
19464
19646
|
|
|
19465
|
-
|
|
19466
|
-
|
|
19647
|
+
if (enableRecentSearches) {
|
|
19648
|
+
this.getRecentSearches();
|
|
19649
|
+
}
|
|
19467
19650
|
}
|
|
19468
19651
|
|
|
19469
19652
|
this.handleTextChange = debounce$1(this.handleText, this.$props.debounce); // Set custom and default queries in store
|
|
@@ -19500,7 +19683,7 @@
|
|
|
19500
19683
|
defaultSearchSuggestions: function defaultSearchSuggestions() {
|
|
19501
19684
|
var isPopularSuggestionsEnabled = this.enableQuerySuggestions || this.enablePopularSuggestions;
|
|
19502
19685
|
|
|
19503
|
-
if (this.currentValue) {
|
|
19686
|
+
if (this.currentValue || !this.enableDefaultSuggestions) {
|
|
19504
19687
|
return [];
|
|
19505
19688
|
}
|
|
19506
19689
|
|
|
@@ -19597,7 +19780,8 @@
|
|
|
19597
19780
|
addonBefore: VueTypes.any,
|
|
19598
19781
|
addonAfter: VueTypes.any,
|
|
19599
19782
|
expandSuggestionsContainer: VueTypes.bool.def(true),
|
|
19600
|
-
index: VueTypes.string
|
|
19783
|
+
index: VueTypes.string,
|
|
19784
|
+
enableDefaultSuggestions: VueTypes.bool.def(true)
|
|
19601
19785
|
},
|
|
19602
19786
|
beforeMount: function beforeMount() {
|
|
19603
19787
|
if (this.$props.highlight) {
|
|
@@ -19765,7 +19949,7 @@
|
|
|
19765
19949
|
// returns size and aggs property
|
|
19766
19950
|
getBasicQueryOptions: function getBasicQueryOptions() {
|
|
19767
19951
|
var aggregationField = this.$props.aggregationField;
|
|
19768
|
-
var queryOptions =
|
|
19952
|
+
var queryOptions = helper_28(this.$props);
|
|
19769
19953
|
|
|
19770
19954
|
if (aggregationField) {
|
|
19771
19955
|
queryOptions.aggs = getCompositeAggsQuery$1({
|
|
@@ -20224,11 +20408,17 @@
|
|
|
20224
20408
|
var _this$$props4 = this.$props,
|
|
20225
20409
|
theme = _this$$props4.theme,
|
|
20226
20410
|
size = _this$$props4.size,
|
|
20227
|
-
expandSuggestionsContainer = _this$$props4.expandSuggestionsContainer
|
|
20411
|
+
expandSuggestionsContainer = _this$$props4.expandSuggestionsContainer,
|
|
20412
|
+
enableDefaultSuggestions = _this$$props4.enableDefaultSuggestions;
|
|
20228
20413
|
var _this$$scopedSlots = this.$scopedSlots,
|
|
20229
20414
|
recentSearchesIcon = _this$$scopedSlots.recentSearchesIcon,
|
|
20230
20415
|
popularSearchesIcon = _this$$scopedSlots.popularSearchesIcon;
|
|
20231
20416
|
var hasSuggestions = this.currentValue ? this.suggestionsList.length || this.topSuggestions.length : this.defaultSearchSuggestions.length;
|
|
20417
|
+
|
|
20418
|
+
if (enableDefaultSuggestions === false && !this.currentValue) {
|
|
20419
|
+
hasSuggestions = false;
|
|
20420
|
+
}
|
|
20421
|
+
|
|
20232
20422
|
return h(Container, {
|
|
20233
20423
|
"class": this.$props.className
|
|
20234
20424
|
}, [this.$props.title && h(Title, {
|
|
@@ -20637,20 +20827,1217 @@
|
|
|
20637
20827
|
|
|
20638
20828
|
DataSearch.componentType = constants_1$1.dataSearch;
|
|
20639
20829
|
|
|
20640
|
-
var _templateObject$j
|
|
20641
|
-
var
|
|
20642
|
-
|
|
20643
|
-
|
|
20644
|
-
|
|
20645
|
-
|
|
20646
|
-
|
|
20647
|
-
|
|
20648
|
-
|
|
20649
|
-
|
|
20650
|
-
|
|
20651
|
-
|
|
20652
|
-
|
|
20653
|
-
|
|
20830
|
+
var _templateObject$j;
|
|
20831
|
+
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"])));
|
|
20832
|
+
var AutoFillSvg = {
|
|
20833
|
+
name: 'AutoFillSvg',
|
|
20834
|
+
render: function render() {
|
|
20835
|
+
var h = arguments[0];
|
|
20836
|
+
return h(AutofillSvgIcon, {
|
|
20837
|
+
"on": {
|
|
20838
|
+
"click": this.$listeners.click
|
|
20839
|
+
}
|
|
20840
|
+
}, [h("svg", {
|
|
20841
|
+
"attrs": {
|
|
20842
|
+
"viewBox": "0 0 24 24"
|
|
20843
|
+
}
|
|
20844
|
+
}, [h("path", {
|
|
20845
|
+
"attrs": {
|
|
20846
|
+
"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"
|
|
20847
|
+
}
|
|
20848
|
+
})])]);
|
|
20849
|
+
},
|
|
20850
|
+
methods: {
|
|
20851
|
+
clicked: function clicked(e) {
|
|
20852
|
+
e.stopPropagation();
|
|
20853
|
+
window.console.log('hey', e);
|
|
20854
|
+
}
|
|
20855
|
+
}
|
|
20856
|
+
};
|
|
20857
|
+
|
|
20858
|
+
var updateQuery$2 = lib_5.updateQuery,
|
|
20859
|
+
setCustomQuery$1 = lib_5.setCustomQuery,
|
|
20860
|
+
setDefaultQuery$2 = lib_5.setDefaultQuery,
|
|
20861
|
+
recordSuggestionClick$1 = lib_5.recordSuggestionClick;
|
|
20862
|
+
var _debounce = lib_8.debounce,
|
|
20863
|
+
checkValueChange$1 = lib_8.checkValueChange,
|
|
20864
|
+
getClassName$4 = lib_8.getClassName,
|
|
20865
|
+
isEqual$5 = lib_8.isEqual,
|
|
20866
|
+
getCompositeAggsQuery$2 = lib_8.getCompositeAggsQuery,
|
|
20867
|
+
withClickIds$1 = lib_8.withClickIds,
|
|
20868
|
+
getResultStats$2 = lib_8.getResultStats,
|
|
20869
|
+
normalizeDataField$1 = lib_8.normalizeDataField;
|
|
20870
|
+
var SearchBox = {
|
|
20871
|
+
name: 'SearchBox',
|
|
20872
|
+
data: function data() {
|
|
20873
|
+
var props = this.$props;
|
|
20874
|
+
this.__state = {
|
|
20875
|
+
currentValue: '',
|
|
20876
|
+
isOpen: false,
|
|
20877
|
+
normalizedSuggestions: []
|
|
20878
|
+
};
|
|
20879
|
+
this.internalComponent = props.componentId + "__internal";
|
|
20880
|
+
return this.__state;
|
|
20881
|
+
},
|
|
20882
|
+
inject: {
|
|
20883
|
+
theme: {
|
|
20884
|
+
from: 'theme_reactivesearch'
|
|
20885
|
+
}
|
|
20886
|
+
},
|
|
20887
|
+
created: function created() {
|
|
20888
|
+
var _this$$props = this.$props,
|
|
20889
|
+
distinctField = _this$$props.distinctField,
|
|
20890
|
+
distinctFieldConfig = _this$$props.distinctFieldConfig,
|
|
20891
|
+
index = _this$$props.index;
|
|
20892
|
+
|
|
20893
|
+
if (this.enableAppbase && this.aggregationField && this.aggregationField !== '') {
|
|
20894
|
+
console.warn('Warning(ReactiveSearch): The `aggregationField` prop has been marked as deprecated, please use the `distinctField` prop instead.');
|
|
20895
|
+
}
|
|
20896
|
+
|
|
20897
|
+
if (!this.enableAppbase && (distinctField || distinctFieldConfig)) {
|
|
20898
|
+
console.warn('Warning(ReactiveSearch): In order to use the `distinctField` and `distinctFieldConfig` props, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
|
|
20899
|
+
}
|
|
20900
|
+
|
|
20901
|
+
if (!this.enableAppbase && index) {
|
|
20902
|
+
console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
|
|
20903
|
+
}
|
|
20904
|
+
|
|
20905
|
+
this.currentValue = this.selectedValue || this.value || this.defaultValue || '';
|
|
20906
|
+
this.handleTextChange = _debounce(this.handleText, this.$props.debounce);
|
|
20907
|
+
this.setValue(this.currentValue, true, this.$props, undefined, false, this.selectedCategory); // Set custom and default queries in store
|
|
20908
|
+
|
|
20909
|
+
this.triggerCustomQuery(this.currentValue, this.selectedCategory);
|
|
20910
|
+
this.triggerDefaultQuery(this.currentValue);
|
|
20911
|
+
},
|
|
20912
|
+
computed: {
|
|
20913
|
+
hasCustomRenderer: function hasCustomRenderer$1() {
|
|
20914
|
+
return hasCustomRenderer(this);
|
|
20915
|
+
},
|
|
20916
|
+
stats: function stats() {
|
|
20917
|
+
return getResultStats$2(this);
|
|
20918
|
+
}
|
|
20919
|
+
},
|
|
20920
|
+
props: {
|
|
20921
|
+
autoFocus: VueTypes.bool,
|
|
20922
|
+
autosuggest: VueTypes.bool.def(true),
|
|
20923
|
+
beforeValueChange: types.func,
|
|
20924
|
+
className: VueTypes.string.def(''),
|
|
20925
|
+
clearIcon: types.children,
|
|
20926
|
+
componentId: types.stringRequired,
|
|
20927
|
+
customHighlight: types.func,
|
|
20928
|
+
customQuery: types.func,
|
|
20929
|
+
defaultQuery: types.func,
|
|
20930
|
+
dataField: VueTypes.oneOfType([VueTypes.string, VueTypes.shape({
|
|
20931
|
+
field: VueTypes.string,
|
|
20932
|
+
weight: VueTypes.number
|
|
20933
|
+
}), VueTypes.arrayOf(VueTypes.string), VueTypes.arrayOf({
|
|
20934
|
+
field: VueTypes.string,
|
|
20935
|
+
weight: VueTypes.number
|
|
20936
|
+
})]),
|
|
20937
|
+
aggregationField: types.string,
|
|
20938
|
+
aggregationSize: VueTypes.number,
|
|
20939
|
+
size: VueTypes.number,
|
|
20940
|
+
debounce: VueTypes.number.def(0),
|
|
20941
|
+
defaultValue: types.string,
|
|
20942
|
+
excludeFields: types.excludeFields,
|
|
20943
|
+
value: types.value,
|
|
20944
|
+
defaultSuggestions: types.suggestions,
|
|
20945
|
+
enableSynonyms: VueTypes.bool.def(true),
|
|
20946
|
+
enableQuerySuggestions: VueTypes.bool.def(false),
|
|
20947
|
+
enablePopularSuggestions: VueTypes.bool.def(false),
|
|
20948
|
+
enableRecentSuggestions: VueTypes.bool.def(false),
|
|
20949
|
+
fieldWeights: types.fieldWeights,
|
|
20950
|
+
filterLabel: types.string,
|
|
20951
|
+
fuzziness: types.fuzziness,
|
|
20952
|
+
highlight: VueTypes.bool,
|
|
20953
|
+
highlightField: types.stringOrArray,
|
|
20954
|
+
icon: types.children,
|
|
20955
|
+
iconPosition: VueTypes.oneOf(['left', 'right']).def('left'),
|
|
20956
|
+
includeFields: types.includeFields,
|
|
20957
|
+
innerClass: types.style,
|
|
20958
|
+
innerRef: VueTypes.string.def('searchInputField'),
|
|
20959
|
+
render: types.func,
|
|
20960
|
+
renderNoSuggestion: types.title,
|
|
20961
|
+
renderError: types.title,
|
|
20962
|
+
placeholder: VueTypes.string.def('Search'),
|
|
20963
|
+
queryFormat: VueTypes.oneOf(['and', 'or']).def('or'),
|
|
20964
|
+
react: types.react,
|
|
20965
|
+
showClear: VueTypes.bool.def(true),
|
|
20966
|
+
showDistinctSuggestions: VueTypes.bool.def(true),
|
|
20967
|
+
showFilter: VueTypes.bool.def(true),
|
|
20968
|
+
showIcon: VueTypes.bool.def(true),
|
|
20969
|
+
title: types.title,
|
|
20970
|
+
theme: types.style,
|
|
20971
|
+
URLParams: VueTypes.bool.def(false),
|
|
20972
|
+
strictSelection: VueTypes.bool.def(false),
|
|
20973
|
+
nestedField: types.string,
|
|
20974
|
+
enablePredictiveSuggestions: VueTypes.bool.def(false),
|
|
20975
|
+
recentSearchesIcon: VueTypes.any,
|
|
20976
|
+
popularSearchesIcon: VueTypes.any,
|
|
20977
|
+
// mic props
|
|
20978
|
+
showVoiceSearch: VueTypes.bool.def(false),
|
|
20979
|
+
getMicInstance: types.func,
|
|
20980
|
+
renderMic: types.func,
|
|
20981
|
+
distinctField: types.string,
|
|
20982
|
+
distinctFieldConfig: types.props,
|
|
20983
|
+
//
|
|
20984
|
+
focusShortcuts: VueTypes.arrayOf(VueTypes.oneOfType([VueTypes.string, VueTypes.number])).def(['/']),
|
|
20985
|
+
addonBefore: VueTypes.any,
|
|
20986
|
+
addonAfter: VueTypes.any,
|
|
20987
|
+
expandSuggestionsContainer: VueTypes.bool.def(true),
|
|
20988
|
+
index: VueTypes.string,
|
|
20989
|
+
popularSuggestionsConfig: VueTypes.object,
|
|
20990
|
+
recentSuggestionsConfig: VueTypes.object,
|
|
20991
|
+
applyStopwords: VueTypes.bool,
|
|
20992
|
+
customStopwords: types.stringArray,
|
|
20993
|
+
onData: types.func,
|
|
20994
|
+
renderItem: types.func,
|
|
20995
|
+
enterButton: VueTypes.bool.def(false),
|
|
20996
|
+
renderEnterButton: VueTypes.any
|
|
20997
|
+
},
|
|
20998
|
+
mounted: function mounted() {
|
|
20999
|
+
this.listenForFocusShortcuts();
|
|
21000
|
+
},
|
|
21001
|
+
watch: {
|
|
21002
|
+
dataField: function dataField(newVal, oldVal) {
|
|
21003
|
+
if (!isEqual$5(newVal, oldVal)) {
|
|
21004
|
+
this.triggerCustomQuery(this.$data.currentValue);
|
|
21005
|
+
}
|
|
21006
|
+
},
|
|
21007
|
+
fieldWeights: function fieldWeights() {
|
|
21008
|
+
this.triggerCustomQuery(this.$data.currentValue);
|
|
21009
|
+
},
|
|
21010
|
+
fuzziness: function fuzziness() {
|
|
21011
|
+
this.triggerCustomQuery(this.$data.currentValue);
|
|
21012
|
+
},
|
|
21013
|
+
queryFormat: function queryFormat() {
|
|
21014
|
+
this.triggerCustomQuery(this.$data.currentValue);
|
|
21015
|
+
},
|
|
21016
|
+
defaultValue: function defaultValue(newVal) {
|
|
21017
|
+
this.setValue(newVal, true, this.$props);
|
|
21018
|
+
},
|
|
21019
|
+
value: function value(newVal, oldVal) {
|
|
21020
|
+
if (!isEqual$5(newVal, oldVal)) {
|
|
21021
|
+
this.setValue(newVal, true, this.$props, newVal === '' ? lib_7.CLEAR_VALUE : undefined, false);
|
|
21022
|
+
}
|
|
21023
|
+
},
|
|
21024
|
+
defaultQuery: function defaultQuery(newVal, oldVal) {
|
|
21025
|
+
if (!isQueryIdentical(newVal, oldVal, this.$data.currentValue, this.$props)) {
|
|
21026
|
+
this.triggerDefaultQuery(this.$data.currentValue);
|
|
21027
|
+
}
|
|
21028
|
+
},
|
|
21029
|
+
customQuery: function customQuery(newVal, oldVal) {
|
|
21030
|
+
if (!isQueryIdentical(newVal, oldVal, this.$data.currentValue, this.$props)) {
|
|
21031
|
+
this.triggerCustomQuery(this.$data.currentValue);
|
|
21032
|
+
}
|
|
21033
|
+
},
|
|
21034
|
+
suggestions: function suggestions(newVal) {
|
|
21035
|
+
var suggestionsList = [];
|
|
21036
|
+
|
|
21037
|
+
if (Array.isArray(newVal) && newVal.length) {
|
|
21038
|
+
suggestionsList = [].concat(withClickIds$1(newVal));
|
|
21039
|
+
} else if (Array.isArray(this.$props.defaultSuggestions) && this.$props.defaultSuggestions.length) {
|
|
21040
|
+
suggestionsList = [].concat(withClickIds$1(this.$props.defaultSuggestions));
|
|
21041
|
+
}
|
|
21042
|
+
|
|
21043
|
+
this.normalizedSuggestions = suggestionsList;
|
|
21044
|
+
},
|
|
21045
|
+
selectedValue: function selectedValue(newVal, oldVal) {
|
|
21046
|
+
if (oldVal !== newVal && this.$data.currentValue !== newVal) {
|
|
21047
|
+
if (!newVal && this.$data.currentValue) {
|
|
21048
|
+
// selected value is cleared, call onValueSelected
|
|
21049
|
+
this.onValueSelectedHandler('', lib_7.CLEAR_VALUE);
|
|
21050
|
+
}
|
|
21051
|
+
|
|
21052
|
+
if (this.$props.value === undefined) {
|
|
21053
|
+
this.setValue(newVal || '', true, this.$props);
|
|
21054
|
+
}
|
|
21055
|
+
}
|
|
21056
|
+
},
|
|
21057
|
+
focusShortcuts: function focusShortcuts() {
|
|
21058
|
+
this.listenForFocusShortcuts();
|
|
21059
|
+
},
|
|
21060
|
+
rawData: function rawData(newVal) {
|
|
21061
|
+
this.$emit('on-data', {
|
|
21062
|
+
data: this.normalizedSuggestions,
|
|
21063
|
+
rawData: newVal,
|
|
21064
|
+
aggregationData: this.aggregationData,
|
|
21065
|
+
loading: this.isLoading,
|
|
21066
|
+
error: this.isError
|
|
21067
|
+
});
|
|
21068
|
+
},
|
|
21069
|
+
aggregationData: function aggregationData(newVal) {
|
|
21070
|
+
this.$emit('on-data', {
|
|
21071
|
+
data: this.normalizedSuggestions,
|
|
21072
|
+
rawData: this.rawData,
|
|
21073
|
+
aggregationData: newVal,
|
|
21074
|
+
loading: this.isLoading,
|
|
21075
|
+
error: this.isError
|
|
21076
|
+
});
|
|
21077
|
+
},
|
|
21078
|
+
loading: function loading(newVal) {
|
|
21079
|
+
this.$emit('on-data', {
|
|
21080
|
+
data: this.normalizedSuggestions,
|
|
21081
|
+
rawData: this.rawData,
|
|
21082
|
+
aggregationData: this.aggregationData,
|
|
21083
|
+
loading: newVal,
|
|
21084
|
+
error: this.isError
|
|
21085
|
+
});
|
|
21086
|
+
},
|
|
21087
|
+
error: function error(newVal) {
|
|
21088
|
+
this.$emit('on-data', {
|
|
21089
|
+
data: this.normalizedSuggestions,
|
|
21090
|
+
rawData: this.rawData,
|
|
21091
|
+
aggregationData: this.aggregationData,
|
|
21092
|
+
loading: this.isLoading,
|
|
21093
|
+
error: newVal
|
|
21094
|
+
});
|
|
21095
|
+
},
|
|
21096
|
+
debounce: function debounce(newVal, oldVal) {
|
|
21097
|
+
if (!isEqual$5(newVal, oldVal)) {
|
|
21098
|
+
this.handleTextChange = _debounce(this.handleText, newVal);
|
|
21099
|
+
}
|
|
21100
|
+
}
|
|
21101
|
+
},
|
|
21102
|
+
methods: {
|
|
21103
|
+
handleText: function handleText(value, cause) {
|
|
21104
|
+
if (cause === lib_7.CLEAR_VALUE) {
|
|
21105
|
+
this.triggerCustomQuery(value);
|
|
21106
|
+
this.triggerDefaultQuery(value);
|
|
21107
|
+
} else if (this.$props.autosuggest) {
|
|
21108
|
+
this.triggerDefaultQuery(value);
|
|
21109
|
+
} else if (!this.$props.enterButton) {
|
|
21110
|
+
this.triggerCustomQuery(value);
|
|
21111
|
+
}
|
|
21112
|
+
},
|
|
21113
|
+
validateDataField: function validateDataField() {
|
|
21114
|
+
var propName = 'dataField';
|
|
21115
|
+
var componentName = SearchBox.name;
|
|
21116
|
+
var props = this.$props;
|
|
21117
|
+
var requiredError = propName + " supplied to " + componentName + " is required. Validation failed.";
|
|
21118
|
+
var propValue = props[propName];
|
|
21119
|
+
|
|
21120
|
+
if (!this.enableAppbase) {
|
|
21121
|
+
if (!propValue) {
|
|
21122
|
+
console.error(requiredError);
|
|
21123
|
+
return;
|
|
21124
|
+
}
|
|
21125
|
+
|
|
21126
|
+
if (typeof propValue !== 'string' && typeof propValue !== 'object' && !Array.isArray(propValue)) {
|
|
21127
|
+
console.error("Invalid " + propName + " supplied to " + componentName + ". Validation failed.");
|
|
21128
|
+
return;
|
|
21129
|
+
}
|
|
21130
|
+
|
|
21131
|
+
if (Array.isArray(propValue) && propValue.length === 0) {
|
|
21132
|
+
console.error(requiredError);
|
|
21133
|
+
}
|
|
21134
|
+
}
|
|
21135
|
+
},
|
|
21136
|
+
getComponent: function getComponent$1(downshiftProps) {
|
|
21137
|
+
if (downshiftProps === void 0) {
|
|
21138
|
+
downshiftProps = {};
|
|
21139
|
+
}
|
|
21140
|
+
|
|
21141
|
+
var currentValue = this.$data.currentValue;
|
|
21142
|
+
var data = {
|
|
21143
|
+
error: this.error,
|
|
21144
|
+
loading: this.isLoading,
|
|
21145
|
+
downshiftProps: downshiftProps,
|
|
21146
|
+
data: this.normalizedSuggestions,
|
|
21147
|
+
rawData: this.rawData,
|
|
21148
|
+
value: currentValue,
|
|
21149
|
+
resultStats: this.stats
|
|
21150
|
+
};
|
|
21151
|
+
return getComponent(data, this);
|
|
21152
|
+
},
|
|
21153
|
+
// returns size and aggs property
|
|
21154
|
+
getBasicQueryOptions: function getBasicQueryOptions() {
|
|
21155
|
+
var aggregationField = this.$props.aggregationField;
|
|
21156
|
+
var queryOptions = helper_28(this.$props);
|
|
21157
|
+
|
|
21158
|
+
if (aggregationField) {
|
|
21159
|
+
queryOptions.aggs = getCompositeAggsQuery$2({
|
|
21160
|
+
props: this.$props,
|
|
21161
|
+
showTopHits: true
|
|
21162
|
+
}).aggs;
|
|
21163
|
+
}
|
|
21164
|
+
|
|
21165
|
+
return queryOptions;
|
|
21166
|
+
},
|
|
21167
|
+
handleSearchIconClick: function handleSearchIconClick() {
|
|
21168
|
+
var currentValue = this.currentValue;
|
|
21169
|
+
|
|
21170
|
+
if (currentValue.trim()) {
|
|
21171
|
+
this.setValue(currentValue, true);
|
|
21172
|
+
this.onValueSelectedHandler(currentValue, lib_7.SEARCH_ICON_CLICK);
|
|
21173
|
+
}
|
|
21174
|
+
},
|
|
21175
|
+
setValue: function setValue(value, isDefaultValue, props, cause, toggleIsOpen, categoryValue) {
|
|
21176
|
+
var _this = this;
|
|
21177
|
+
|
|
21178
|
+
if (isDefaultValue === void 0) {
|
|
21179
|
+
isDefaultValue = false;
|
|
21180
|
+
}
|
|
21181
|
+
|
|
21182
|
+
if (props === void 0) {
|
|
21183
|
+
props = this.$props;
|
|
21184
|
+
}
|
|
21185
|
+
|
|
21186
|
+
if (toggleIsOpen === void 0) {
|
|
21187
|
+
toggleIsOpen = true;
|
|
21188
|
+
}
|
|
21189
|
+
|
|
21190
|
+
if (categoryValue === void 0) {
|
|
21191
|
+
categoryValue = undefined;
|
|
21192
|
+
}
|
|
21193
|
+
|
|
21194
|
+
var performUpdate = function performUpdate() {
|
|
21195
|
+
_this.currentValue = value;
|
|
21196
|
+
|
|
21197
|
+
if (isDefaultValue) {
|
|
21198
|
+
if (_this.$props.autosuggest) {
|
|
21199
|
+
if (toggleIsOpen) {
|
|
21200
|
+
_this.isOpen = false;
|
|
21201
|
+
}
|
|
21202
|
+
|
|
21203
|
+
_this.triggerDefaultQuery(value);
|
|
21204
|
+
} // in case of strict selection only SUGGESTION_SELECT should be able
|
|
21205
|
+
// to set the query otherwise the value should reset
|
|
21206
|
+
|
|
21207
|
+
|
|
21208
|
+
if (props.strictSelection) {
|
|
21209
|
+
if (cause === lib_7.SUGGESTION_SELECT || value === '') {
|
|
21210
|
+
_this.triggerCustomQuery(value, categoryValue);
|
|
21211
|
+
} else {
|
|
21212
|
+
_this.setValue('', true);
|
|
21213
|
+
}
|
|
21214
|
+
} else if (props.value === undefined) {
|
|
21215
|
+
_this.triggerCustomQuery(value, categoryValue);
|
|
21216
|
+
}
|
|
21217
|
+
} else {
|
|
21218
|
+
// debounce for handling text while typing
|
|
21219
|
+
_this.handleTextChange(value, cause);
|
|
21220
|
+
}
|
|
21221
|
+
|
|
21222
|
+
_this.$emit('valueChange', value);
|
|
21223
|
+
|
|
21224
|
+
_this.$emit('value-change', value);
|
|
21225
|
+
};
|
|
21226
|
+
|
|
21227
|
+
checkValueChange$1(props.componentId, value, props.beforeValueChange, performUpdate);
|
|
21228
|
+
},
|
|
21229
|
+
triggerDefaultQuery: function triggerDefaultQuery(paramValue) {
|
|
21230
|
+
if (!this.$props.autosuggest) {
|
|
21231
|
+
return;
|
|
21232
|
+
}
|
|
21233
|
+
|
|
21234
|
+
var value = typeof paramValue !== 'string' ? this.currentValue : paramValue;
|
|
21235
|
+
var query = SearchBox.defaultQuery(value, this.$props);
|
|
21236
|
+
|
|
21237
|
+
if (this.defaultQuery) {
|
|
21238
|
+
var defaultQueryToBeSet = this.defaultQuery(value, this.$props) || {};
|
|
21239
|
+
|
|
21240
|
+
if (defaultQueryToBeSet.query) {
|
|
21241
|
+
query = defaultQueryToBeSet.query;
|
|
21242
|
+
} // Update calculated default query in store
|
|
21243
|
+
|
|
21244
|
+
|
|
21245
|
+
updateDefaultQuery(this.$props.componentId, this.setDefaultQuery, this.$props, value);
|
|
21246
|
+
}
|
|
21247
|
+
|
|
21248
|
+
this.updateQuery({
|
|
21249
|
+
componentId: this.internalComponent,
|
|
21250
|
+
query: query,
|
|
21251
|
+
value: value,
|
|
21252
|
+
componentType: constants_1$1.searchBox
|
|
21253
|
+
});
|
|
21254
|
+
},
|
|
21255
|
+
triggerCustomQuery: function triggerCustomQuery(paramValue, categoryValue) {
|
|
21256
|
+
if (categoryValue === void 0) {
|
|
21257
|
+
categoryValue = undefined;
|
|
21258
|
+
}
|
|
21259
|
+
|
|
21260
|
+
var _this$$props2 = this.$props,
|
|
21261
|
+
customQuery = _this$$props2.customQuery,
|
|
21262
|
+
filterLabel = _this$$props2.filterLabel,
|
|
21263
|
+
showFilter = _this$$props2.showFilter,
|
|
21264
|
+
URLParams = _this$$props2.URLParams;
|
|
21265
|
+
var value = typeof paramValue !== 'string' ? this.$data.currentValue : paramValue;
|
|
21266
|
+
var defaultQueryTobeSet = SearchBox.defaultQuery("" + value + (categoryValue ? " in " + categoryValue : ''), this.$props);
|
|
21267
|
+
var query = defaultQueryTobeSet;
|
|
21268
|
+
|
|
21269
|
+
if (customQuery) {
|
|
21270
|
+
var customQueryTobeSet = customQuery(value, this.$props);
|
|
21271
|
+
var queryTobeSet = customQueryTobeSet.query;
|
|
21272
|
+
|
|
21273
|
+
if (queryTobeSet) {
|
|
21274
|
+
query = queryTobeSet;
|
|
21275
|
+
}
|
|
21276
|
+
|
|
21277
|
+
updateCustomQuery(this.$props.componentId, this.setCustomQuery, this.$props, value);
|
|
21278
|
+
}
|
|
21279
|
+
|
|
21280
|
+
this.updateQuery({
|
|
21281
|
+
componentId: this.$props.componentId,
|
|
21282
|
+
query: query,
|
|
21283
|
+
value: value,
|
|
21284
|
+
label: filterLabel,
|
|
21285
|
+
showFilter: showFilter,
|
|
21286
|
+
URLParams: URLParams,
|
|
21287
|
+
componentType: constants_1$1.searchBox,
|
|
21288
|
+
category: categoryValue
|
|
21289
|
+
});
|
|
21290
|
+
},
|
|
21291
|
+
handleFocus: function handleFocus(event) {
|
|
21292
|
+
if (this.$props.autosuggest) {
|
|
21293
|
+
this.isOpen = true;
|
|
21294
|
+
}
|
|
21295
|
+
|
|
21296
|
+
this.$emit('focus', event);
|
|
21297
|
+
},
|
|
21298
|
+
handleVoiceResults: function handleVoiceResults(_ref) {
|
|
21299
|
+
var results = _ref.results;
|
|
21300
|
+
|
|
21301
|
+
if (results && results[0] && results[0].isFinal && results[0][0] && results[0][0].transcript && results[0][0].transcript.trim()) {
|
|
21302
|
+
this.setValue(results[0][0].transcript.trim(), true);
|
|
21303
|
+
}
|
|
21304
|
+
},
|
|
21305
|
+
triggerQuery: function triggerQuery(_ref2) {
|
|
21306
|
+
var _ref2$isOpen = _ref2.isOpen,
|
|
21307
|
+
isOpen = _ref2$isOpen === void 0 ? undefined : _ref2$isOpen,
|
|
21308
|
+
_ref2$customQuery = _ref2.customQuery,
|
|
21309
|
+
customQuery = _ref2$customQuery === void 0 ? true : _ref2$customQuery,
|
|
21310
|
+
_ref2$defaultQuery = _ref2.defaultQuery,
|
|
21311
|
+
defaultQuery = _ref2$defaultQuery === void 0 ? true : _ref2$defaultQuery,
|
|
21312
|
+
_ref2$value = _ref2.value,
|
|
21313
|
+
value = _ref2$value === void 0 ? undefined : _ref2$value,
|
|
21314
|
+
_ref2$categoryValue = _ref2.categoryValue,
|
|
21315
|
+
categoryValue = _ref2$categoryValue === void 0 ? undefined : _ref2$categoryValue;
|
|
21316
|
+
|
|
21317
|
+
if (typeof isOpen === 'boolean') {
|
|
21318
|
+
this.isOpen = isOpen;
|
|
21319
|
+
}
|
|
21320
|
+
|
|
21321
|
+
if (customQuery) {
|
|
21322
|
+
this.triggerCustomQuery(value, categoryValue);
|
|
21323
|
+
}
|
|
21324
|
+
|
|
21325
|
+
if (defaultQuery) {
|
|
21326
|
+
this.triggerDefaultQuery(value);
|
|
21327
|
+
}
|
|
21328
|
+
},
|
|
21329
|
+
triggerClickAnalytics: function triggerClickAnalytics(searchPosition, documentId) {
|
|
21330
|
+
// click analytics would only work client side and after javascript loads
|
|
21331
|
+
var docId = documentId;
|
|
21332
|
+
|
|
21333
|
+
if (!docId) {
|
|
21334
|
+
var hitData = this.normalizedSuggestions.find(function (hit) {
|
|
21335
|
+
return hit._click_id === searchPosition;
|
|
21336
|
+
});
|
|
21337
|
+
|
|
21338
|
+
if (hitData && hitData.source && hitData.source._id) {
|
|
21339
|
+
docId = hitData.source._id;
|
|
21340
|
+
}
|
|
21341
|
+
}
|
|
21342
|
+
|
|
21343
|
+
this.recordSuggestionClick(searchPosition, docId);
|
|
21344
|
+
},
|
|
21345
|
+
clearValue: function clearValue() {
|
|
21346
|
+
this.setValue('', false, this.$props, lib_7.CLEAR_VALUE, false);
|
|
21347
|
+
this.onValueSelectedHandler('', lib_7.CLEAR_VALUE);
|
|
21348
|
+
},
|
|
21349
|
+
handleKeyDown: function handleKeyDown(event, highlightedIndex) {
|
|
21350
|
+
if (highlightedIndex === void 0) {
|
|
21351
|
+
highlightedIndex = null;
|
|
21352
|
+
}
|
|
21353
|
+
|
|
21354
|
+
// if a suggestion was selected, delegate the handling to suggestion handler
|
|
21355
|
+
if (event.key === 'Enter') {
|
|
21356
|
+
if (this.$props.autosuggest === false) {
|
|
21357
|
+
this.enterButtonOnClick();
|
|
21358
|
+
} else if (highlightedIndex === null) {
|
|
21359
|
+
this.setValue(event.target.value, true);
|
|
21360
|
+
this.onValueSelectedHandler(event.target.value, lib_7.ENTER_PRESS);
|
|
21361
|
+
}
|
|
21362
|
+
} // Need to review
|
|
21363
|
+
|
|
21364
|
+
|
|
21365
|
+
this.$emit('keyDown', event, this.triggerQuery);
|
|
21366
|
+
this.$emit('key-down', event, this.triggerQuery);
|
|
21367
|
+
},
|
|
21368
|
+
onInputChange: function onInputChange(e) {
|
|
21369
|
+
var _this2 = this;
|
|
21370
|
+
|
|
21371
|
+
var inputValue = e.target.value;
|
|
21372
|
+
|
|
21373
|
+
if (!this.$data.isOpen && this.$props.autosuggest) {
|
|
21374
|
+
this.isOpen = true;
|
|
21375
|
+
}
|
|
21376
|
+
|
|
21377
|
+
var value = this.$props.value;
|
|
21378
|
+
|
|
21379
|
+
if (value === undefined) {
|
|
21380
|
+
this.setValue(inputValue, false, this.$props, inputValue === '' ? lib_7.CLEAR_VALUE : undefined);
|
|
21381
|
+
} else {
|
|
21382
|
+
this.$emit('change', inputValue, function (_ref3) {
|
|
21383
|
+
var isOpen = _ref3.isOpen;
|
|
21384
|
+
return _this2.triggerQuery({
|
|
21385
|
+
defaultQuery: true,
|
|
21386
|
+
customQuery: true,
|
|
21387
|
+
value: inputValue,
|
|
21388
|
+
isOpen: isOpen
|
|
21389
|
+
});
|
|
21390
|
+
}, e);
|
|
21391
|
+
}
|
|
21392
|
+
},
|
|
21393
|
+
onSuggestionSelected: function onSuggestionSelected(suggestion) {
|
|
21394
|
+
var _this3 = this;
|
|
21395
|
+
|
|
21396
|
+
this.isOpen = false;
|
|
21397
|
+
var value = this.$props.value; // Record analytics for selected suggestions
|
|
21398
|
+
|
|
21399
|
+
this.triggerClickAnalytics(suggestion._click_id);
|
|
21400
|
+
|
|
21401
|
+
if (value === undefined) {
|
|
21402
|
+
this.setValue(suggestion.value, true, this.$props, lib_7.SUGGESTION_SELECT, false, suggestion._category);
|
|
21403
|
+
} else {
|
|
21404
|
+
this.$emit('change', suggestion.value, function (_ref4) {
|
|
21405
|
+
var isOpen = _ref4.isOpen;
|
|
21406
|
+
return _this3.triggerQuery({
|
|
21407
|
+
isOpen: isOpen,
|
|
21408
|
+
value: suggestion.value,
|
|
21409
|
+
categoryValue: suggestion._category
|
|
21410
|
+
});
|
|
21411
|
+
});
|
|
21412
|
+
}
|
|
21413
|
+
|
|
21414
|
+
this.onValueSelectedHandler(suggestion.value, lib_7.SUGGESTION_SELECT, suggestion.source);
|
|
21415
|
+
},
|
|
21416
|
+
onValueSelectedHandler: function onValueSelectedHandler(currentValue) {
|
|
21417
|
+
if (currentValue === void 0) {
|
|
21418
|
+
currentValue = this.$data.currentValue;
|
|
21419
|
+
}
|
|
21420
|
+
|
|
21421
|
+
for (var _len = arguments.length, cause = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
21422
|
+
cause[_key - 1] = arguments[_key];
|
|
21423
|
+
}
|
|
21424
|
+
|
|
21425
|
+
this.$emit.apply(this, ['valueSelected', currentValue].concat(cause));
|
|
21426
|
+
this.$emit.apply(this, ['value-selected', currentValue].concat(cause));
|
|
21427
|
+
},
|
|
21428
|
+
handleStateChange: function handleStateChange(changes) {
|
|
21429
|
+
var isOpen = changes.isOpen;
|
|
21430
|
+
this.isOpen = isOpen;
|
|
21431
|
+
},
|
|
21432
|
+
getBackgroundColor: function getBackgroundColor(highlightedIndex, index) {
|
|
21433
|
+
var isDark = this.themePreset === 'dark';
|
|
21434
|
+
|
|
21435
|
+
if (isDark) {
|
|
21436
|
+
return highlightedIndex === index ? '#555' : '#424242';
|
|
21437
|
+
}
|
|
21438
|
+
|
|
21439
|
+
return highlightedIndex === index ? '#eee' : '#fff';
|
|
21440
|
+
},
|
|
21441
|
+
renderIcon: function renderIcon() {
|
|
21442
|
+
var h = this.$createElement;
|
|
21443
|
+
|
|
21444
|
+
if (this.$props.showIcon) {
|
|
21445
|
+
return this.$props.icon || h(SearchSvg);
|
|
21446
|
+
}
|
|
21447
|
+
|
|
21448
|
+
return null;
|
|
21449
|
+
},
|
|
21450
|
+
renderErrorComponent: function renderErrorComponent() {
|
|
21451
|
+
var h = this.$createElement;
|
|
21452
|
+
var renderError = this.$scopedSlots.renderError || this.$props.renderError;
|
|
21453
|
+
|
|
21454
|
+
if (this.error && renderError && this.$data.currentValue && !this.isLoading) {
|
|
21455
|
+
return h(SuggestionWrapper, {
|
|
21456
|
+
"attrs": {
|
|
21457
|
+
"innerClass": this.$props.innerClass,
|
|
21458
|
+
"innerClassName": "error",
|
|
21459
|
+
"theme": this.theme,
|
|
21460
|
+
"themePreset": this.themePreset
|
|
21461
|
+
}
|
|
21462
|
+
}, [isFunction$1(renderError) ? renderError(this.error) : renderError]);
|
|
21463
|
+
}
|
|
21464
|
+
|
|
21465
|
+
return null;
|
|
21466
|
+
},
|
|
21467
|
+
renderCancelIcon: function renderCancelIcon() {
|
|
21468
|
+
var h = this.$createElement;
|
|
21469
|
+
|
|
21470
|
+
if (this.$props.showClear) {
|
|
21471
|
+
return this.$props.clearIcon || h(CancelSvg);
|
|
21472
|
+
}
|
|
21473
|
+
|
|
21474
|
+
return null;
|
|
21475
|
+
},
|
|
21476
|
+
renderNoSuggestions: function renderNoSuggestions(finalSuggestionsList) {
|
|
21477
|
+
if (finalSuggestionsList === void 0) {
|
|
21478
|
+
finalSuggestionsList = [];
|
|
21479
|
+
}
|
|
21480
|
+
|
|
21481
|
+
var h = this.$createElement;
|
|
21482
|
+
var _this$$props3 = this.$props,
|
|
21483
|
+
theme = _this$$props3.theme,
|
|
21484
|
+
innerClass = _this$$props3.innerClass;
|
|
21485
|
+
var renderNoSuggestion = this.$scopedSlots.renderNoSuggestion || this.$props.renderNoSuggestion;
|
|
21486
|
+
var renderError = this.$scopedSlots.renderError || this.$props.renderError;
|
|
21487
|
+
var _this$$data = this.$data,
|
|
21488
|
+
isOpen = _this$$data.isOpen,
|
|
21489
|
+
currentValue = _this$$data.currentValue;
|
|
21490
|
+
|
|
21491
|
+
if (renderNoSuggestion && isOpen && !finalSuggestionsList.length && !this.isLoading && currentValue && !(renderError && this.error)) {
|
|
21492
|
+
return h(SuggestionWrapper, {
|
|
21493
|
+
"attrs": {
|
|
21494
|
+
"innerClass": innerClass,
|
|
21495
|
+
"themePreset": this.themePreset,
|
|
21496
|
+
"theme": theme,
|
|
21497
|
+
"innerClassName": "noSuggestion"
|
|
21498
|
+
},
|
|
21499
|
+
"scopedSlots": {
|
|
21500
|
+
"default": function _default() {
|
|
21501
|
+
return typeof renderNoSuggestion === 'function' ? renderNoSuggestion(currentValue) : renderNoSuggestion;
|
|
21502
|
+
}
|
|
21503
|
+
}
|
|
21504
|
+
});
|
|
21505
|
+
}
|
|
21506
|
+
|
|
21507
|
+
return null;
|
|
21508
|
+
},
|
|
21509
|
+
renderInputAddonBefore: function renderInputAddonBefore() {
|
|
21510
|
+
var h = this.$createElement;
|
|
21511
|
+
var addonBefore = this.$scopedSlots.addonBefore;
|
|
21512
|
+
|
|
21513
|
+
if (addonBefore) {
|
|
21514
|
+
return h(InputAddon, {
|
|
21515
|
+
"class": "addon-before"
|
|
21516
|
+
}, [addonBefore()]);
|
|
21517
|
+
}
|
|
21518
|
+
|
|
21519
|
+
return null;
|
|
21520
|
+
},
|
|
21521
|
+
renderInputAddonAfter: function renderInputAddonAfter() {
|
|
21522
|
+
var h = this.$createElement;
|
|
21523
|
+
var addonAfter = this.$scopedSlots.addonAfter;
|
|
21524
|
+
|
|
21525
|
+
if (addonAfter) {
|
|
21526
|
+
return h(InputAddon, {
|
|
21527
|
+
"class": "addon-after"
|
|
21528
|
+
}, [addonAfter()]);
|
|
21529
|
+
}
|
|
21530
|
+
|
|
21531
|
+
return null;
|
|
21532
|
+
},
|
|
21533
|
+
enterButtonOnClick: function enterButtonOnClick() {
|
|
21534
|
+
this.triggerQuery({
|
|
21535
|
+
isOpen: false,
|
|
21536
|
+
value: this.currentValue,
|
|
21537
|
+
customQuery: true
|
|
21538
|
+
});
|
|
21539
|
+
},
|
|
21540
|
+
renderEnterButtonElement: function renderEnterButtonElement() {
|
|
21541
|
+
var _this4 = this;
|
|
21542
|
+
|
|
21543
|
+
var h = this.$createElement;
|
|
21544
|
+
var _this$$props4 = this.$props,
|
|
21545
|
+
enterButton = _this$$props4.enterButton,
|
|
21546
|
+
innerClass = _this$$props4.innerClass;
|
|
21547
|
+
var renderEnterButton = this.$scopedSlots.renderEnterButton;
|
|
21548
|
+
|
|
21549
|
+
if (enterButton) {
|
|
21550
|
+
var getEnterButtonMarkup = function getEnterButtonMarkup() {
|
|
21551
|
+
if (renderEnterButton) {
|
|
21552
|
+
return renderEnterButton(_this4.enterButtonOnClick);
|
|
21553
|
+
}
|
|
21554
|
+
|
|
21555
|
+
return h(Button, {
|
|
21556
|
+
"class": "enter-btn " + getClassName$4(innerClass, 'enterButton'),
|
|
21557
|
+
"attrs": {
|
|
21558
|
+
"primary": true
|
|
21559
|
+
},
|
|
21560
|
+
"on": {
|
|
21561
|
+
"click": _this4.enterButtonOnClick
|
|
21562
|
+
}
|
|
21563
|
+
}, ["Search"]);
|
|
21564
|
+
};
|
|
21565
|
+
|
|
21566
|
+
return h("div", {
|
|
21567
|
+
"class": "enter-button-wrapper"
|
|
21568
|
+
}, [getEnterButtonMarkup()]);
|
|
21569
|
+
}
|
|
21570
|
+
|
|
21571
|
+
return null;
|
|
21572
|
+
},
|
|
21573
|
+
renderIcons: function renderIcons() {
|
|
21574
|
+
var h = this.$createElement;
|
|
21575
|
+
var _this$$props5 = this.$props,
|
|
21576
|
+
iconPosition = _this$$props5.iconPosition,
|
|
21577
|
+
showClear = _this$$props5.showClear,
|
|
21578
|
+
innerClass = _this$$props5.innerClass,
|
|
21579
|
+
getMicInstance = _this$$props5.getMicInstance,
|
|
21580
|
+
showVoiceSearch = _this$$props5.showVoiceSearch,
|
|
21581
|
+
showIcon = _this$$props5.showIcon;
|
|
21582
|
+
var renderMic = this.$scopedSlots.renderMic || this.$props.renderMic;
|
|
21583
|
+
var currentValue = this.$data.currentValue;
|
|
21584
|
+
return h("div", [h(IconGroup, {
|
|
21585
|
+
"attrs": {
|
|
21586
|
+
"groupPosition": "right",
|
|
21587
|
+
"positionType": "absolute"
|
|
21588
|
+
}
|
|
21589
|
+
}, [currentValue && showClear && h(IconWrapper, {
|
|
21590
|
+
"on": {
|
|
21591
|
+
"click": this.clearValue
|
|
21592
|
+
},
|
|
21593
|
+
"attrs": {
|
|
21594
|
+
"showIcon": showIcon,
|
|
21595
|
+
"isClearIcon": true
|
|
21596
|
+
}
|
|
21597
|
+
}, [this.renderCancelIcon()]), showVoiceSearch && h(Mic, {
|
|
21598
|
+
"attrs": {
|
|
21599
|
+
"getInstance": getMicInstance,
|
|
21600
|
+
"render": renderMic,
|
|
21601
|
+
"handleResult": this.handleVoiceResults,
|
|
21602
|
+
"className": getClassName$4(innerClass, 'mic') || null
|
|
21603
|
+
}
|
|
21604
|
+
}), iconPosition === 'right' && showIcon && h(IconWrapper, {
|
|
21605
|
+
"on": {
|
|
21606
|
+
"click": this.handleSearchIconClick
|
|
21607
|
+
}
|
|
21608
|
+
}, [this.renderIcon()])]), h(IconGroup, {
|
|
21609
|
+
"attrs": {
|
|
21610
|
+
"groupPosition": "left",
|
|
21611
|
+
"positionType": "absolute"
|
|
21612
|
+
}
|
|
21613
|
+
}, [iconPosition === 'left' && showIcon && h(IconWrapper, {
|
|
21614
|
+
"on": {
|
|
21615
|
+
"click": this.handleSearchIconClick
|
|
21616
|
+
}
|
|
21617
|
+
}, [this.renderIcon()])])]);
|
|
21618
|
+
},
|
|
21619
|
+
focusSearchBox: function focusSearchBox(event) {
|
|
21620
|
+
var _this$$refs, _this$$refs$this$$pro;
|
|
21621
|
+
|
|
21622
|
+
var elt = event.target || event.srcElement;
|
|
21623
|
+
var tagName = elt.tagName;
|
|
21624
|
+
|
|
21625
|
+
if (elt.isContentEditable || tagName === 'INPUT' || tagName === 'SELECT' || tagName === 'TEXTAREA') {
|
|
21626
|
+
// already in an input
|
|
21627
|
+
return;
|
|
21628
|
+
}
|
|
21629
|
+
|
|
21630
|
+
(_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
|
|
21631
|
+
},
|
|
21632
|
+
listenForFocusShortcuts: function listenForFocusShortcuts() {
|
|
21633
|
+
var _this5 = this;
|
|
21634
|
+
|
|
21635
|
+
var _this$$props$focusSho = this.$props.focusShortcuts,
|
|
21636
|
+
focusShortcuts = _this$$props$focusSho === void 0 ? ['/'] : _this$$props$focusSho;
|
|
21637
|
+
|
|
21638
|
+
if (isEmpty(focusShortcuts)) {
|
|
21639
|
+
return;
|
|
21640
|
+
}
|
|
21641
|
+
|
|
21642
|
+
var shortcutsString = parseFocusShortcuts(focusShortcuts).join(','); // handler for alphabets and other key combinations
|
|
21643
|
+
|
|
21644
|
+
hotkeys(shortcutsString, // eslint-disable-next-line no-unused-vars
|
|
21645
|
+
|
|
21646
|
+
/* eslint-disable no-shadow */
|
|
21647
|
+
function (event, handler) {
|
|
21648
|
+
// Prevent the default refresh event under WINDOWS system
|
|
21649
|
+
event.preventDefault();
|
|
21650
|
+
|
|
21651
|
+
_this5.focusSearchBox(event);
|
|
21652
|
+
}); // if one of modifier keys are used, they are handled below
|
|
21653
|
+
|
|
21654
|
+
hotkeys('*', function (event) {
|
|
21655
|
+
var modifierKeys = extractModifierKeysFromFocusShortcuts(focusShortcuts);
|
|
21656
|
+
if (modifierKeys.length === 0) return;
|
|
21657
|
+
|
|
21658
|
+
for (var index = 0; index < modifierKeys.length; index += 1) {
|
|
21659
|
+
var element = modifierKeys[index];
|
|
21660
|
+
|
|
21661
|
+
if (hotkeys[element]) {
|
|
21662
|
+
_this5.focusSearchBox(event);
|
|
21663
|
+
|
|
21664
|
+
break;
|
|
21665
|
+
}
|
|
21666
|
+
}
|
|
21667
|
+
});
|
|
21668
|
+
},
|
|
21669
|
+
onAutofillClick: function onAutofillClick(suggestion) {
|
|
21670
|
+
var value = suggestion.value;
|
|
21671
|
+
this.isOpen = true;
|
|
21672
|
+
this.currentValue = value;
|
|
21673
|
+
this.triggerDefaultQuery(value);
|
|
21674
|
+
},
|
|
21675
|
+
renderAutoFill: function renderAutoFill(suggestion) {
|
|
21676
|
+
var _this6 = this;
|
|
21677
|
+
|
|
21678
|
+
var h = this.$createElement;
|
|
21679
|
+
|
|
21680
|
+
var handleAutoFillClick = function handleAutoFillClick(e) {
|
|
21681
|
+
e.stopPropagation();
|
|
21682
|
+
|
|
21683
|
+
_this6.onAutofillClick(suggestion);
|
|
21684
|
+
};
|
|
21685
|
+
/* 👇 avoid showing autofill for category suggestions👇 */
|
|
21686
|
+
|
|
21687
|
+
|
|
21688
|
+
return suggestion._category ? null : h(AutoFillSvg, {
|
|
21689
|
+
"on": {
|
|
21690
|
+
"click": handleAutoFillClick
|
|
21691
|
+
}
|
|
21692
|
+
});
|
|
21693
|
+
}
|
|
21694
|
+
},
|
|
21695
|
+
render: function render() {
|
|
21696
|
+
var _this7 = this;
|
|
21697
|
+
|
|
21698
|
+
var h = arguments[0];
|
|
21699
|
+
var _this$$props6 = this.$props,
|
|
21700
|
+
theme = _this$$props6.theme,
|
|
21701
|
+
expandSuggestionsContainer = _this$$props6.expandSuggestionsContainer;
|
|
21702
|
+
var _this$$scopedSlots = this.$scopedSlots,
|
|
21703
|
+
recentSearchesIcon = _this$$scopedSlots.recentSearchesIcon,
|
|
21704
|
+
popularSearchesIcon = _this$$scopedSlots.popularSearchesIcon;
|
|
21705
|
+
var hasSuggestions = Array.isArray(this.normalizedSuggestions) && this.normalizedSuggestions.length;
|
|
21706
|
+
var renderItem = this.$scopedSlots.renderItem || this.$props.renderItem;
|
|
21707
|
+
return h(Container, {
|
|
21708
|
+
"class": this.$props.className
|
|
21709
|
+
}, [this.$props.title && h(Title, {
|
|
21710
|
+
"class": getClassName$4(this.$props.innerClass, 'title') || ''
|
|
21711
|
+
}, [this.$props.title]), this.$props.autosuggest ? h(Downshift, {
|
|
21712
|
+
"attrs": {
|
|
21713
|
+
"id": this.$props.componentId + "-downshift",
|
|
21714
|
+
"handleChange": this.onSuggestionSelected,
|
|
21715
|
+
"handleMouseup": this.handleStateChange,
|
|
21716
|
+
"isOpen": this.$data.isOpen
|
|
21717
|
+
},
|
|
21718
|
+
"scopedSlots": {
|
|
21719
|
+
"default": function _default(_ref5) {
|
|
21720
|
+
var getInputEvents = _ref5.getInputEvents,
|
|
21721
|
+
getInputProps = _ref5.getInputProps,
|
|
21722
|
+
getItemProps = _ref5.getItemProps,
|
|
21723
|
+
getItemEvents = _ref5.getItemEvents,
|
|
21724
|
+
isOpen = _ref5.isOpen,
|
|
21725
|
+
highlightedIndex = _ref5.highlightedIndex,
|
|
21726
|
+
setHighlightedIndex = _ref5.setHighlightedIndex;
|
|
21727
|
+
|
|
21728
|
+
var renderSuggestionsDropdown = function renderSuggestionsDropdown() {
|
|
21729
|
+
var getIcon = function getIcon(iconType) {
|
|
21730
|
+
switch (iconType) {
|
|
21731
|
+
case helper_6.Recent:
|
|
21732
|
+
return recentSearchesIcon;
|
|
21733
|
+
|
|
21734
|
+
case helper_6.Popular:
|
|
21735
|
+
return popularSearchesIcon;
|
|
21736
|
+
|
|
21737
|
+
default:
|
|
21738
|
+
return null;
|
|
21739
|
+
}
|
|
21740
|
+
};
|
|
21741
|
+
|
|
21742
|
+
return h("div", [_this7.hasCustomRenderer && _this7.getComponent({
|
|
21743
|
+
isOpen: isOpen,
|
|
21744
|
+
getItemProps: getItemProps,
|
|
21745
|
+
getItemEvents: getItemEvents,
|
|
21746
|
+
highlightedIndex: highlightedIndex
|
|
21747
|
+
}), _this7.renderErrorComponent(), !_this7.hasCustomRenderer && isOpen && hasSuggestions ? h("ul", {
|
|
21748
|
+
"class": suggestions$1(_this7.themePreset, theme) + " " + getClassName$4(_this7.$props.innerClass, 'list')
|
|
21749
|
+
}, [_this7.normalizedSuggestions.map(function (item, index) {
|
|
21750
|
+
return renderItem ? h("li", {
|
|
21751
|
+
"domProps": _extends({}, getItemProps({
|
|
21752
|
+
item: item
|
|
21753
|
+
})),
|
|
21754
|
+
"on": _extends({}, getItemEvents({
|
|
21755
|
+
item: item
|
|
21756
|
+
})),
|
|
21757
|
+
"key": index + 1 + "-" + item.value,
|
|
21758
|
+
"style": {
|
|
21759
|
+
backgroundColor: _this7.getBackgroundColor(highlightedIndex, index),
|
|
21760
|
+
justifyContent: 'flex-start',
|
|
21761
|
+
alignItems: 'center'
|
|
21762
|
+
}
|
|
21763
|
+
}, [renderItem(item)]) : h("li", {
|
|
21764
|
+
"domProps": _extends({}, getItemProps({
|
|
21765
|
+
item: item
|
|
21766
|
+
})),
|
|
21767
|
+
"on": _extends({}, getItemEvents({
|
|
21768
|
+
item: item
|
|
21769
|
+
})),
|
|
21770
|
+
"key": index + 1 + "-" + item.value,
|
|
21771
|
+
"style": {
|
|
21772
|
+
backgroundColor: _this7.getBackgroundColor(highlightedIndex, index),
|
|
21773
|
+
justifyContent: 'flex-start',
|
|
21774
|
+
alignItems: 'center'
|
|
21775
|
+
}
|
|
21776
|
+
}, [h("div", {
|
|
21777
|
+
"style": {
|
|
21778
|
+
padding: '0 10px 0 0',
|
|
21779
|
+
display: 'flex'
|
|
21780
|
+
}
|
|
21781
|
+
}, [h(CustomSvg, {
|
|
21782
|
+
"attrs": {
|
|
21783
|
+
"className": getClassName$4(_this7.$props.innerClass, item._suggestion_type + "-search-icon") || null,
|
|
21784
|
+
"icon": getIcon(item._suggestion_type),
|
|
21785
|
+
"type": item._suggestion_type + "-search-icon"
|
|
21786
|
+
}
|
|
21787
|
+
})]), h(SuggestionItem, {
|
|
21788
|
+
"attrs": {
|
|
21789
|
+
"currentValue": _this7.currentValue,
|
|
21790
|
+
"suggestion": item
|
|
21791
|
+
}
|
|
21792
|
+
}), _this7.renderAutoFill(item)]);
|
|
21793
|
+
})]) : _this7.renderNoSuggestions(_this7.normalizedSuggestions)]);
|
|
21794
|
+
};
|
|
21795
|
+
|
|
21796
|
+
return h("div", {
|
|
21797
|
+
"class": suggestionsContainer
|
|
21798
|
+
}, [h(InputGroup, [_this7.renderInputAddonBefore(), h(InputWrapper, [h(Input, {
|
|
21799
|
+
"attrs": {
|
|
21800
|
+
"id": _this7.$props.componentId + "-input",
|
|
21801
|
+
"showIcon": _this7.$props.showIcon,
|
|
21802
|
+
"showClear": _this7.$props.showClear,
|
|
21803
|
+
"iconPosition": _this7.$props.iconPosition,
|
|
21804
|
+
"placeholder": _this7.$props.placeholder,
|
|
21805
|
+
"autoFocus": _this7.$props.autoFocus,
|
|
21806
|
+
"themePreset": _this7.themePreset,
|
|
21807
|
+
"autocomplete": "off"
|
|
21808
|
+
},
|
|
21809
|
+
"ref": _this7.$props.innerRef,
|
|
21810
|
+
"class": getClassName$4(_this7.$props.innerClass, 'input'),
|
|
21811
|
+
"on": _extends({}, getInputEvents({
|
|
21812
|
+
onInput: _this7.onInputChange,
|
|
21813
|
+
onBlur: function onBlur(e) {
|
|
21814
|
+
_this7.$emit('blur', e, _this7.triggerQuery);
|
|
21815
|
+
},
|
|
21816
|
+
onFocus: _this7.handleFocus,
|
|
21817
|
+
onKeyPress: function onKeyPress(e) {
|
|
21818
|
+
_this7.$emit('keyPress', e, _this7.triggerQuery);
|
|
21819
|
+
|
|
21820
|
+
_this7.$emit('key-press', e, _this7.triggerQuery);
|
|
21821
|
+
},
|
|
21822
|
+
onKeyDown: function onKeyDown(e) {
|
|
21823
|
+
return _this7.handleKeyDown(e, highlightedIndex);
|
|
21824
|
+
},
|
|
21825
|
+
onKeyUp: function onKeyUp(e) {
|
|
21826
|
+
_this7.$emit('keyUp', e, _this7.triggerQuery);
|
|
21827
|
+
|
|
21828
|
+
_this7.$emit('key-up', e, _this7.triggerQuery);
|
|
21829
|
+
},
|
|
21830
|
+
onClick: function onClick() {
|
|
21831
|
+
setHighlightedIndex(null);
|
|
21832
|
+
}
|
|
21833
|
+
})),
|
|
21834
|
+
"domProps": _extends({}, getInputProps({
|
|
21835
|
+
value: _this7.$data.currentValue === null ? '' : _this7.$data.currentValue
|
|
21836
|
+
}))
|
|
21837
|
+
}), _this7.renderIcons(), !expandSuggestionsContainer && renderSuggestionsDropdown()]), _this7.renderInputAddonAfter(), _this7.renderEnterButtonElement()]), expandSuggestionsContainer && renderSuggestionsDropdown()]);
|
|
21838
|
+
}
|
|
21839
|
+
}
|
|
21840
|
+
}) : h("div", {
|
|
21841
|
+
"class": suggestionsContainer
|
|
21842
|
+
}, [h(InputGroup, [this.renderInputAddonBefore(), h(InputWrapper, [h(Input, {
|
|
21843
|
+
"class": getClassName$4(this.$props.innerClass, 'input') || '',
|
|
21844
|
+
"attrs": {
|
|
21845
|
+
"placeholder": this.$props.placeholder,
|
|
21846
|
+
"iconPosition": this.$props.iconPosition,
|
|
21847
|
+
"showIcon": this.$props.showIcon,
|
|
21848
|
+
"showClear": this.$props.showClear,
|
|
21849
|
+
"themePreset": this.themePreset
|
|
21850
|
+
},
|
|
21851
|
+
"on": _extends({}, {
|
|
21852
|
+
blur: function blur(e) {
|
|
21853
|
+
_this7.$emit('blur', e, _this7.triggerQuery);
|
|
21854
|
+
},
|
|
21855
|
+
keypress: function keypress(e) {
|
|
21856
|
+
_this7.$emit('keyPress', e, _this7.triggerQuery);
|
|
21857
|
+
|
|
21858
|
+
_this7.$emit('key-press', e, _this7.triggerQuery);
|
|
21859
|
+
},
|
|
21860
|
+
input: this.onInputChange,
|
|
21861
|
+
focus: function focus(e) {
|
|
21862
|
+
_this7.$emit('focus', e, _this7.triggerQuery);
|
|
21863
|
+
},
|
|
21864
|
+
keydown: this.handleKeyDown,
|
|
21865
|
+
keyup: function keyup(e) {
|
|
21866
|
+
_this7.$emit('keyUp', e, _this7.triggerQuery);
|
|
21867
|
+
|
|
21868
|
+
_this7.$emit('key-up', e, _this7.triggerQuery);
|
|
21869
|
+
}
|
|
21870
|
+
}),
|
|
21871
|
+
"domProps": _extends({}, {
|
|
21872
|
+
autofocus: this.$props.autoFocus,
|
|
21873
|
+
value: this.$data.currentValue ? this.$data.currentValue : ''
|
|
21874
|
+
}),
|
|
21875
|
+
"ref": this.$props.innerRef
|
|
21876
|
+
}), this.renderIcons()]), this.renderInputAddonAfter(), this.renderEnterButtonElement()])])]);
|
|
21877
|
+
},
|
|
21878
|
+
destroyed: function destroyed() {
|
|
21879
|
+
document.removeEventListener('keydown', this.onKeyDown);
|
|
21880
|
+
}
|
|
21881
|
+
};
|
|
21882
|
+
|
|
21883
|
+
SearchBox.defaultQuery = function (value, props) {
|
|
21884
|
+
var finalQuery = null;
|
|
21885
|
+
var fields = normalizeDataField$1(props.dataField, props.fieldWeights);
|
|
21886
|
+
finalQuery = {
|
|
21887
|
+
bool: {
|
|
21888
|
+
should: SearchBox.shouldQuery(value, fields, props),
|
|
21889
|
+
minimum_should_match: '1'
|
|
21890
|
+
}
|
|
21891
|
+
};
|
|
21892
|
+
|
|
21893
|
+
if (finalQuery && props.nestedField) {
|
|
21894
|
+
return {
|
|
21895
|
+
query: {
|
|
21896
|
+
nested: {
|
|
21897
|
+
path: props.nestedField,
|
|
21898
|
+
query: finalQuery
|
|
21899
|
+
}
|
|
21900
|
+
}
|
|
21901
|
+
};
|
|
21902
|
+
}
|
|
21903
|
+
|
|
21904
|
+
return finalQuery;
|
|
21905
|
+
};
|
|
21906
|
+
|
|
21907
|
+
SearchBox.shouldQuery = function (value, dataFields, props) {
|
|
21908
|
+
var finalQuery = [];
|
|
21909
|
+
var phrasePrefixFields = [];
|
|
21910
|
+
var fields = dataFields.map(function (dataField) {
|
|
21911
|
+
var queryField = "" + dataField.field + (dataField.weight ? "^" + dataField.weight : '');
|
|
21912
|
+
|
|
21913
|
+
if (!(dataField.field.endsWith('.keyword') || dataField.field.endsWith('.autosuggest') || dataField.field.endsWith('.search'))) {
|
|
21914
|
+
phrasePrefixFields.push(queryField);
|
|
21915
|
+
}
|
|
21916
|
+
|
|
21917
|
+
return queryField;
|
|
21918
|
+
});
|
|
21919
|
+
|
|
21920
|
+
if (props.searchOperators || props.queryString) {
|
|
21921
|
+
return {
|
|
21922
|
+
query: value,
|
|
21923
|
+
fields: fields,
|
|
21924
|
+
default_operator: props.queryFormat
|
|
21925
|
+
};
|
|
21926
|
+
}
|
|
21927
|
+
|
|
21928
|
+
if (props.queryFormat === 'and') {
|
|
21929
|
+
finalQuery.push({
|
|
21930
|
+
multi_match: {
|
|
21931
|
+
query: value,
|
|
21932
|
+
fields: fields,
|
|
21933
|
+
type: 'cross_fields',
|
|
21934
|
+
operator: 'and'
|
|
21935
|
+
}
|
|
21936
|
+
});
|
|
21937
|
+
finalQuery.push({
|
|
21938
|
+
multi_match: {
|
|
21939
|
+
query: value,
|
|
21940
|
+
fields: fields,
|
|
21941
|
+
type: 'phrase',
|
|
21942
|
+
operator: 'and'
|
|
21943
|
+
}
|
|
21944
|
+
});
|
|
21945
|
+
|
|
21946
|
+
if (phrasePrefixFields.length > 0) {
|
|
21947
|
+
finalQuery.push({
|
|
21948
|
+
multi_match: {
|
|
21949
|
+
query: value,
|
|
21950
|
+
fields: phrasePrefixFields,
|
|
21951
|
+
type: 'phrase_prefix',
|
|
21952
|
+
operator: 'and'
|
|
21953
|
+
}
|
|
21954
|
+
});
|
|
21955
|
+
}
|
|
21956
|
+
|
|
21957
|
+
return finalQuery;
|
|
21958
|
+
}
|
|
21959
|
+
|
|
21960
|
+
finalQuery.push({
|
|
21961
|
+
multi_match: {
|
|
21962
|
+
query: value,
|
|
21963
|
+
fields: fields,
|
|
21964
|
+
type: 'best_fields',
|
|
21965
|
+
operator: 'or',
|
|
21966
|
+
fuzziness: props.fuzziness ? props.fuzziness : 0
|
|
21967
|
+
}
|
|
21968
|
+
});
|
|
21969
|
+
finalQuery.push({
|
|
21970
|
+
multi_match: {
|
|
21971
|
+
query: value,
|
|
21972
|
+
fields: fields,
|
|
21973
|
+
type: 'phrase',
|
|
21974
|
+
operator: 'or'
|
|
21975
|
+
}
|
|
21976
|
+
});
|
|
21977
|
+
|
|
21978
|
+
if (phrasePrefixFields.length > 0) {
|
|
21979
|
+
finalQuery.push({
|
|
21980
|
+
multi_match: {
|
|
21981
|
+
query: value,
|
|
21982
|
+
fields: phrasePrefixFields,
|
|
21983
|
+
type: 'phrase_prefix',
|
|
21984
|
+
operator: 'or'
|
|
21985
|
+
}
|
|
21986
|
+
});
|
|
21987
|
+
}
|
|
21988
|
+
|
|
21989
|
+
return finalQuery;
|
|
21990
|
+
};
|
|
21991
|
+
|
|
21992
|
+
var mapStateToProps$4 = function mapStateToProps(state, props) {
|
|
21993
|
+
return {
|
|
21994
|
+
selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || null,
|
|
21995
|
+
selectedCategory: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].category || null,
|
|
21996
|
+
suggestions: state.hits[props.componentId] && state.hits[props.componentId].hits,
|
|
21997
|
+
rawData: state.rawData[props.componentId],
|
|
21998
|
+
aggregationData: state.compositeAggregations[props.componentId] || [],
|
|
21999
|
+
themePreset: state.config.themePreset,
|
|
22000
|
+
isLoading: !!state.isLoading[props.componentId + "_active"],
|
|
22001
|
+
error: state.error[props.componentId],
|
|
22002
|
+
enableAppbase: state.config.enableAppbase,
|
|
22003
|
+
time: state.hits[props.componentId] && state.hits[props.componentId].time || 0,
|
|
22004
|
+
total: state.hits[props.componentId] && state.hits[props.componentId].total,
|
|
22005
|
+
hidden: state.hits[props.componentId] && state.hits[props.componentId].hidden
|
|
22006
|
+
};
|
|
22007
|
+
};
|
|
22008
|
+
|
|
22009
|
+
var mapDispatchToProps$3 = {
|
|
22010
|
+
updateQuery: updateQuery$2,
|
|
22011
|
+
setCustomQuery: setCustomQuery$1,
|
|
22012
|
+
setDefaultQuery: setDefaultQuery$2,
|
|
22013
|
+
recordSuggestionClick: recordSuggestionClick$1
|
|
22014
|
+
};
|
|
22015
|
+
var DSConnected$1 = ComponentWrapper$1(connect(mapStateToProps$4, mapDispatchToProps$3)(SearchBox), {
|
|
22016
|
+
componentType: constants_1$1.searchBox,
|
|
22017
|
+
internalComponent: true
|
|
22018
|
+
});
|
|
22019
|
+
|
|
22020
|
+
SearchBox.install = function (Vue) {
|
|
22021
|
+
Vue.component(SearchBox.name, DSConnected$1);
|
|
22022
|
+
}; // Add componentType for SSR
|
|
22023
|
+
|
|
22024
|
+
|
|
22025
|
+
SearchBox.componentType = constants_1$1.searchBox;
|
|
22026
|
+
|
|
22027
|
+
var _templateObject$k, _templateObject2$7, _templateObject3$6, _templateObject4$5, _templateObject5$3, _templateObject6$3;
|
|
22028
|
+
var item = {
|
|
22029
|
+
width: '15px',
|
|
22030
|
+
height: '15px',
|
|
22031
|
+
scale: '4px'
|
|
22032
|
+
};
|
|
22033
|
+
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"])));
|
|
22034
|
+
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"])));
|
|
22035
|
+
|
|
22036
|
+
var formItem = function formItem(_ref) {
|
|
22037
|
+
var theme = _ref.theme;
|
|
22038
|
+
return css(_templateObject3$6 || (_templateObject3$6 = _taggedTemplateLiteralLoose(["\n\t", ";\n\n\t&:focus {\n\t\t+ label {\n\t\t\t&::before {\n\t\t\t\tbox-shadow: 0 0 0 2px ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t&:hover {\n\t\t+ label {\n\t\t\t&::before {\n\t\t\t\tborder-color: ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t&:active {\n\t\t+ label {\n\t\t\t&::before {\n\t\t\t\ttransition-duration: 0;\n\t\t\t}\n\t\t}\n\t}\n\n\t+ label {\n\t\tposition: relative;\n\t\tuser-select: none;\n\t\tdisplay: flex;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\talign-items: center;\n\t\tcursor: pointer;\n\n\t\t&::before {\n\t\t\tbackground-color: #fff;\n\t\t\tborder: 1px solid ", ";\n\t\t\tbox-sizing: content-box;\n\t\t\tcontent: '';\n\t\t\tcolor: ", ";\n\t\t\tmargin-right: calc(", " * 0.5);\n\t\t\ttop: 50%;\n\t\t\tleft: 0;\n\t\t\twidth: ", ";\n\t\t\theight: ", ";\n\t\t\tdisplay: inline-block;\n\t\t\tvertical-align: middle;\n\t\t}\n\n\t\t&::after {\n\t\t\tbox-sizing: content-box;\n\t\t\tcontent: '';\n\t\t\tbackground-color: ", ";\n\t\t\tposition: absolute;\n\t\t\ttop: 50%;\n\t\t\tleft: calc(1px + ", " / 2);\n\t\t\twidth: calc(", " - ", ");\n\t\t\theight: calc(", " - ", ");\n\t\t\tmargin-top: calc(", " / -2 - ", " / -2);\n\t\t\ttransform: scale(0);\n\t\t\ttransform-origin: 50%;\n\t\t\ttransition: transform 200ms ease-out;\n\t\t}\n\t}\n"])), vh, curriedLighten(0.4, theme.colors.primaryColor), theme.colors.primaryColor, theme.colors.borderColor || curriedLighten(0.1, theme.colors.textColor), theme.colors.primaryColor, item.width, item.width, item.height, theme.colors.primaryColor, item.scale, item.width, item.scale, item.height, item.scale, item.height, item.scale);
|
|
22039
|
+
};
|
|
22040
|
+
|
|
20654
22041
|
var Radio = index$1('input')(_templateObject4$5 || (_templateObject4$5 = _taggedTemplateLiteralLoose(["\n\t", ";\n\t", ";\n\n\t+ label {\n\t\t&::before,\n\t\t&::after {\n\t\t\tborder-radius: 50%;\n\t\t}\n\t}\n\n\t&:checked {\n\t\t&:active,\n\t\t&:focus {\n\t\t\t+ label {\n\t\t\t\tcolor: ", ";\n\n\t\t\t\t&::before {\n\t\t\t\t\tanimation: none;\n\t\t\t\t\tfilter: none;\n\t\t\t\t\ttransition: none;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t+ label {\n\t\t\t&::before {\n\t\t\t\tanimation: none;\n\t\t\t\tbackground-color: #fff;\n\t\t\t\tborder-color: ", ";\n\t\t}\n\n\t\t&::after {\n\t\t\ttransform: scale(1);\n\t\t}\n\t}\n"])), formItem, function (props) {
|
|
20655
22042
|
return props.show ? null : hideInputControl;
|
|
20656
22043
|
}, function (_ref2) {
|
|
@@ -20728,14 +22115,14 @@
|
|
|
20728
22115
|
return _extends({}, clonedQuery, extractQuery(props));
|
|
20729
22116
|
};
|
|
20730
22117
|
|
|
20731
|
-
var updateQuery$
|
|
22118
|
+
var updateQuery$3 = lib_5.updateQuery,
|
|
20732
22119
|
setQueryOptions$2 = lib_5.setQueryOptions,
|
|
20733
|
-
setCustomQuery$
|
|
20734
|
-
setDefaultQuery$
|
|
22120
|
+
setCustomQuery$2 = lib_5.setCustomQuery,
|
|
22121
|
+
setDefaultQuery$3 = lib_5.setDefaultQuery;
|
|
20735
22122
|
var getQueryOptions$1 = lib_8.getQueryOptions,
|
|
20736
|
-
checkValueChange$
|
|
20737
|
-
getClassName$
|
|
20738
|
-
isEqual$
|
|
22123
|
+
checkValueChange$2 = lib_8.checkValueChange,
|
|
22124
|
+
getClassName$5 = lib_8.getClassName,
|
|
22125
|
+
isEqual$6 = lib_8.isEqual,
|
|
20739
22126
|
extractQueryFromCustomQuery$2 = lib_8.extractQueryFromCustomQuery,
|
|
20740
22127
|
getOptionsForCustomQuery$2 = lib_8.getOptionsForCustomQuery;
|
|
20741
22128
|
var SingleList = {
|
|
@@ -20824,7 +22211,7 @@
|
|
|
20824
22211
|
this.setValue(newVal);
|
|
20825
22212
|
},
|
|
20826
22213
|
value: function value(newVal, oldVal) {
|
|
20827
|
-
if (!isEqual$
|
|
22214
|
+
if (!isEqual$6(newVal, oldVal)) {
|
|
20828
22215
|
this.setValue(newVal);
|
|
20829
22216
|
}
|
|
20830
22217
|
},
|
|
@@ -20887,14 +22274,14 @@
|
|
|
20887
22274
|
return h(Container, {
|
|
20888
22275
|
"class": this.$props.className
|
|
20889
22276
|
}, [this.$props.title && h(Title, {
|
|
20890
|
-
"class": getClassName$
|
|
22277
|
+
"class": getClassName$5(this.$props.innerClass, 'title') || ''
|
|
20891
22278
|
}, [this.$props.title]), this.renderSearch(), this.hasCustomRenderer ? this.getComponent() : h(UL, {
|
|
20892
|
-
"class": getClassName$
|
|
22279
|
+
"class": getClassName$5(this.$props.innerClass, 'list') || ''
|
|
20893
22280
|
}, [selectAllLabel ? h("li", {
|
|
20894
22281
|
"key": selectAllLabel,
|
|
20895
22282
|
"class": "" + (this.$data.currentValue === selectAllLabel ? 'active' : '')
|
|
20896
22283
|
}, [h(Radio, {
|
|
20897
|
-
"class": getClassName$
|
|
22284
|
+
"class": getClassName$5(this.$props.innerClass, 'radio'),
|
|
20898
22285
|
"attrs": {
|
|
20899
22286
|
"id": this.$props.componentId + "-" + selectAllLabel,
|
|
20900
22287
|
"name": this.$props.componentId,
|
|
@@ -20909,7 +22296,7 @@
|
|
|
20909
22296
|
checked: this.$data.currentValue === selectAllLabel
|
|
20910
22297
|
})
|
|
20911
22298
|
}), h("label", {
|
|
20912
|
-
"class": getClassName$
|
|
22299
|
+
"class": getClassName$5(this.$props.innerClass, 'label') || null,
|
|
20913
22300
|
"attrs": {
|
|
20914
22301
|
"for": this.$props.componentId + "-" + selectAllLabel
|
|
20915
22302
|
}
|
|
@@ -20918,7 +22305,7 @@
|
|
|
20918
22305
|
"key": item.key,
|
|
20919
22306
|
"class": "" + (_this.currentValue === String(item.key) ? 'active' : '')
|
|
20920
22307
|
}, [h(Radio, {
|
|
20921
|
-
"class": getClassName$
|
|
22308
|
+
"class": getClassName$5(_this.$props.innerClass, 'radio'),
|
|
20922
22309
|
"attrs": {
|
|
20923
22310
|
"id": _this.$props.componentId + "-" + item.key,
|
|
20924
22311
|
"name": _this.$props.componentId,
|
|
@@ -20934,7 +22321,7 @@
|
|
|
20934
22321
|
checked: _this.currentValue === String(item.key)
|
|
20935
22322
|
})
|
|
20936
22323
|
}), h("label", {
|
|
20937
|
-
"class": getClassName$
|
|
22324
|
+
"class": getClassName$5(_this.$props.innerClass, 'label') || null,
|
|
20938
22325
|
"attrs": {
|
|
20939
22326
|
"for": _this.$props.componentId + "-" + item.key
|
|
20940
22327
|
}
|
|
@@ -20943,7 +22330,7 @@
|
|
|
20943
22330
|
count: item.doc_count,
|
|
20944
22331
|
isChecked: _this.currentValue === String(item.key)
|
|
20945
22332
|
}) : h("span", [item.key, _this.$props.showCount && h("span", {
|
|
20946
|
-
"class": getClassName$
|
|
22333
|
+
"class": getClassName$5(_this.$props.innerClass, 'count') || null
|
|
20947
22334
|
}, ["\xA0(", item.doc_count, ")"])])])]);
|
|
20948
22335
|
})])]);
|
|
20949
22336
|
},
|
|
@@ -20971,7 +22358,7 @@
|
|
|
20971
22358
|
_this2.$emit('value-change', value);
|
|
20972
22359
|
};
|
|
20973
22360
|
|
|
20974
|
-
checkValueChange$
|
|
22361
|
+
checkValueChange$2(props.componentId, value, props.beforeValueChange, performUpdate);
|
|
20975
22362
|
},
|
|
20976
22363
|
updateDefaultQueryHandler: function updateDefaultQueryHandler(value, props) {
|
|
20977
22364
|
var query = SingleList.defaultQuery(value, props);
|
|
@@ -21043,7 +22430,7 @@
|
|
|
21043
22430
|
|
|
21044
22431
|
if (this.$props.showSearch) {
|
|
21045
22432
|
return h(Input, {
|
|
21046
|
-
"class": getClassName$
|
|
22433
|
+
"class": getClassName$5(this.$props.innerClass, 'input') || '',
|
|
21047
22434
|
"on": {
|
|
21048
22435
|
"input": this.handleInputChange
|
|
21049
22436
|
},
|
|
@@ -21106,7 +22493,7 @@
|
|
|
21106
22493
|
var h = this.$createElement;
|
|
21107
22494
|
var renderNoResults = this.$scopedSlots.renderNoResults || this.$props.renderNoResults;
|
|
21108
22495
|
return h("p", {
|
|
21109
|
-
"class": getClassName$
|
|
22496
|
+
"class": getClassName$5(this.$props.innerClass, 'noResults') || null
|
|
21110
22497
|
}, [isFunction$1(renderNoResults) ? renderNoResults() : renderNoResults]);
|
|
21111
22498
|
}
|
|
21112
22499
|
},
|
|
@@ -21177,7 +22564,7 @@
|
|
|
21177
22564
|
return true;
|
|
21178
22565
|
};
|
|
21179
22566
|
|
|
21180
|
-
var mapStateToProps$
|
|
22567
|
+
var mapStateToProps$5 = function mapStateToProps(state, props) {
|
|
21181
22568
|
return {
|
|
21182
22569
|
options: props.nestedField && state.aggregations[props.componentId] ? state.aggregations[props.componentId].reactivesearch_nested : state.aggregations[props.componentId],
|
|
21183
22570
|
rawData: state.rawData[props.componentId],
|
|
@@ -21192,11 +22579,11 @@
|
|
|
21192
22579
|
|
|
21193
22580
|
var mapDispatchtoProps$2 = {
|
|
21194
22581
|
setQueryOptions: setQueryOptions$2,
|
|
21195
|
-
updateQuery: updateQuery$
|
|
21196
|
-
setCustomQuery: setCustomQuery$
|
|
21197
|
-
setDefaultQuery: setDefaultQuery$
|
|
22582
|
+
updateQuery: updateQuery$3,
|
|
22583
|
+
setCustomQuery: setCustomQuery$2,
|
|
22584
|
+
setDefaultQuery: setDefaultQuery$3
|
|
21198
22585
|
};
|
|
21199
|
-
var ListConnected = ComponentWrapper$1(connect(mapStateToProps$
|
|
22586
|
+
var ListConnected = ComponentWrapper$1(connect(mapStateToProps$5, mapDispatchtoProps$2)(SingleList), {
|
|
21200
22587
|
componentType: constants_1$1.singleList,
|
|
21201
22588
|
internalComponent: SingleList.hasInternalComponent()
|
|
21202
22589
|
});
|
|
@@ -21208,14 +22595,14 @@
|
|
|
21208
22595
|
|
|
21209
22596
|
SingleList.componentType = constants_1$1.singleList;
|
|
21210
22597
|
|
|
21211
|
-
var updateQuery$
|
|
22598
|
+
var updateQuery$4 = lib_5.updateQuery,
|
|
21212
22599
|
setQueryOptions$3 = lib_5.setQueryOptions,
|
|
21213
|
-
setCustomQuery$
|
|
21214
|
-
setDefaultQuery$
|
|
21215
|
-
var isEqual$
|
|
22600
|
+
setCustomQuery$3 = lib_5.setCustomQuery,
|
|
22601
|
+
setDefaultQuery$4 = lib_5.setDefaultQuery;
|
|
22602
|
+
var isEqual$7 = lib_8.isEqual,
|
|
21216
22603
|
getQueryOptions$2 = lib_8.getQueryOptions,
|
|
21217
|
-
checkValueChange$
|
|
21218
|
-
getClassName$
|
|
22604
|
+
checkValueChange$3 = lib_8.checkValueChange,
|
|
22605
|
+
getClassName$6 = lib_8.getClassName,
|
|
21219
22606
|
extractQueryFromCustomQuery$3 = lib_8.extractQueryFromCustomQuery,
|
|
21220
22607
|
getOptionsForCustomQuery$3 = lib_8.getOptionsForCustomQuery;
|
|
21221
22608
|
var MultiList = {
|
|
@@ -21282,7 +22669,7 @@
|
|
|
21282
22669
|
mounted: function mounted() {
|
|
21283
22670
|
var currentValue = Object.keys(this.$data.currentValue);
|
|
21284
22671
|
|
|
21285
|
-
if (this.$props.value !== undefined && !isEqual$
|
|
22672
|
+
if (this.$props.value !== undefined && !isEqual$7(this.$props.value, currentValue)) {
|
|
21286
22673
|
this.$emit('change', currentValue);
|
|
21287
22674
|
}
|
|
21288
22675
|
},
|
|
@@ -21303,12 +22690,12 @@
|
|
|
21303
22690
|
this.updateQueryHandler(this.$data.currentValue, this.$props);
|
|
21304
22691
|
},
|
|
21305
22692
|
value: function value(newVal, oldVal) {
|
|
21306
|
-
if (!isEqual$
|
|
22693
|
+
if (!isEqual$7(oldVal, newVal)) {
|
|
21307
22694
|
this.setValue(newVal, true);
|
|
21308
22695
|
}
|
|
21309
22696
|
},
|
|
21310
22697
|
defaultValue: function defaultValue(newVal, oldVal) {
|
|
21311
|
-
if (!isEqual$
|
|
22698
|
+
if (!isEqual$7(oldVal, newVal)) {
|
|
21312
22699
|
this.setValue(newVal, true);
|
|
21313
22700
|
}
|
|
21314
22701
|
},
|
|
@@ -21327,7 +22714,7 @@
|
|
|
21327
22714
|
}
|
|
21328
22715
|
}
|
|
21329
22716
|
|
|
21330
|
-
if (!isEqual$
|
|
22717
|
+
if (!isEqual$7(selectedValue, newVal)) {
|
|
21331
22718
|
if (this.value === undefined) {
|
|
21332
22719
|
this.setValue(newVal, true);
|
|
21333
22720
|
} else {
|
|
@@ -21389,9 +22776,9 @@
|
|
|
21389
22776
|
return h(Container, {
|
|
21390
22777
|
"class": this.$props.className
|
|
21391
22778
|
}, [this.$props.title && h(Title, {
|
|
21392
|
-
"class": getClassName$
|
|
22779
|
+
"class": getClassName$6(this.$props.innerClass, 'title')
|
|
21393
22780
|
}, [this.$props.title]), this.renderSearch(), this.hasCustomRenderer ? this.getComponent() : h(UL, {
|
|
21394
|
-
"class": getClassName$
|
|
22781
|
+
"class": getClassName$6(this.$props.innerClass, 'list')
|
|
21395
22782
|
}, [selectAllLabel ? h("li", {
|
|
21396
22783
|
"key": selectAllLabel,
|
|
21397
22784
|
"class": "" + (this.currentValue[selectAllLabel] ? 'active' : '')
|
|
@@ -21403,7 +22790,7 @@
|
|
|
21403
22790
|
"value": selectAllLabel,
|
|
21404
22791
|
"show": this.$props.showCheckbox
|
|
21405
22792
|
},
|
|
21406
|
-
"class": getClassName$
|
|
22793
|
+
"class": getClassName$6(this.$props.innerClass, 'checkbox'),
|
|
21407
22794
|
"on": {
|
|
21408
22795
|
"click": this.handleClick
|
|
21409
22796
|
},
|
|
@@ -21411,7 +22798,7 @@
|
|
|
21411
22798
|
checked: !!this.currentValue[selectAllLabel]
|
|
21412
22799
|
})
|
|
21413
22800
|
}), h("label", {
|
|
21414
|
-
"class": getClassName$
|
|
22801
|
+
"class": getClassName$6(this.$props.innerClass, 'label'),
|
|
21415
22802
|
"attrs": {
|
|
21416
22803
|
"for": this.$props.componentId + "-" + selectAllLabel
|
|
21417
22804
|
}
|
|
@@ -21427,7 +22814,7 @@
|
|
|
21427
22814
|
"value": item.key,
|
|
21428
22815
|
"show": _this2.$props.showCheckbox
|
|
21429
22816
|
},
|
|
21430
|
-
"class": getClassName$
|
|
22817
|
+
"class": getClassName$6(_this2.$props.innerClass, 'checkbox'),
|
|
21431
22818
|
"on": {
|
|
21432
22819
|
"click": _this2.handleClick
|
|
21433
22820
|
},
|
|
@@ -21435,7 +22822,7 @@
|
|
|
21435
22822
|
checked: !!_this2.$data.currentValue[item.key]
|
|
21436
22823
|
})
|
|
21437
22824
|
}), h("label", {
|
|
21438
|
-
"class": getClassName$
|
|
22825
|
+
"class": getClassName$6(_this2.$props.innerClass, 'label'),
|
|
21439
22826
|
"attrs": {
|
|
21440
22827
|
"for": _this2.$props.componentId + "-" + item.key
|
|
21441
22828
|
}
|
|
@@ -21444,7 +22831,7 @@
|
|
|
21444
22831
|
count: item.doc_count,
|
|
21445
22832
|
isChecked: !!_this2.$data.currentValue[item.key]
|
|
21446
22833
|
}) : h("span", [item.key, _this2.$props.showCount && h("span", {
|
|
21447
|
-
"class": getClassName$
|
|
22834
|
+
"class": getClassName$6(_this2.$props.innerClass, 'count')
|
|
21448
22835
|
}, ["\xA0(", item.doc_count, ")"])])])]);
|
|
21449
22836
|
})])]);
|
|
21450
22837
|
},
|
|
@@ -21528,7 +22915,7 @@
|
|
|
21528
22915
|
_this3.$emit('value-change', finalValues);
|
|
21529
22916
|
};
|
|
21530
22917
|
|
|
21531
|
-
checkValueChange$
|
|
22918
|
+
checkValueChange$3(props.componentId, finalValues, props.beforeValueChange, performUpdate);
|
|
21532
22919
|
},
|
|
21533
22920
|
updateDefaultQueryHandler: function updateDefaultQueryHandler(value, props) {
|
|
21534
22921
|
var query = MultiList.defaultQuery(value, props);
|
|
@@ -21600,7 +22987,7 @@
|
|
|
21600
22987
|
|
|
21601
22988
|
if (this.$props.showSearch) {
|
|
21602
22989
|
return h(Input, {
|
|
21603
|
-
"class": getClassName$
|
|
22990
|
+
"class": getClassName$6(this.$props.innerClass, 'input') || '',
|
|
21604
22991
|
"on": {
|
|
21605
22992
|
"input": this.handleInputChange
|
|
21606
22993
|
},
|
|
@@ -21658,7 +23045,7 @@
|
|
|
21658
23045
|
var h = this.$createElement;
|
|
21659
23046
|
var renderNoResults = this.$scopedSlots.renderNoResults || this.$props.renderNoResults;
|
|
21660
23047
|
return h("p", {
|
|
21661
|
-
"class": getClassName$
|
|
23048
|
+
"class": getClassName$6(this.$props.innerClass, 'noResults') || null
|
|
21662
23049
|
}, [isFunction$1(renderNoResults) ? renderNoResults() : renderNoResults]);
|
|
21663
23050
|
}
|
|
21664
23051
|
},
|
|
@@ -21765,7 +23152,7 @@
|
|
|
21765
23152
|
return getAggsQuery(queryOptions, props);
|
|
21766
23153
|
};
|
|
21767
23154
|
|
|
21768
|
-
var mapStateToProps$
|
|
23155
|
+
var mapStateToProps$6 = function mapStateToProps(state, props) {
|
|
21769
23156
|
return {
|
|
21770
23157
|
options: props.nestedField && state.aggregations[props.componentId] ? state.aggregations[props.componentId].reactivesearch_nested : state.aggregations[props.componentId],
|
|
21771
23158
|
rawData: state.rawData[props.componentId],
|
|
@@ -21780,16 +23167,16 @@
|
|
|
21780
23167
|
|
|
21781
23168
|
var mapDispatchtoProps$3 = {
|
|
21782
23169
|
setQueryOptions: setQueryOptions$3,
|
|
21783
|
-
updateQuery: updateQuery$
|
|
21784
|
-
setCustomQuery: setCustomQuery$
|
|
21785
|
-
setDefaultQuery: setDefaultQuery$
|
|
23170
|
+
updateQuery: updateQuery$4,
|
|
23171
|
+
setCustomQuery: setCustomQuery$3,
|
|
23172
|
+
setDefaultQuery: setDefaultQuery$4
|
|
21786
23173
|
};
|
|
21787
23174
|
|
|
21788
23175
|
MultiList.hasInternalComponent = function () {
|
|
21789
23176
|
return true;
|
|
21790
23177
|
};
|
|
21791
23178
|
|
|
21792
|
-
var ListConnected$1 = ComponentWrapper$1(connect(mapStateToProps$
|
|
23179
|
+
var ListConnected$1 = ComponentWrapper$1(connect(mapStateToProps$6, mapDispatchtoProps$3)(MultiList), {
|
|
21793
23180
|
componentType: constants_1$1.multiList,
|
|
21794
23181
|
internalComponent: MultiList.hasInternalComponent()
|
|
21795
23182
|
});
|
|
@@ -21801,8 +23188,8 @@
|
|
|
21801
23188
|
|
|
21802
23189
|
MultiList.componentType = constants_1$1.multiList;
|
|
21803
23190
|
|
|
21804
|
-
var _templateObject$
|
|
21805
|
-
var small = css(_templateObject$
|
|
23191
|
+
var _templateObject$l, _templateObject2$8, _templateObject3$7, _templateObject4$6;
|
|
23192
|
+
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"])));
|
|
21806
23193
|
|
|
21807
23194
|
var dark$2 = function dark(_ref) {
|
|
21808
23195
|
var theme = _ref.theme;
|
|
@@ -21820,13 +23207,13 @@
|
|
|
21820
23207
|
return theme.colors.primaryColor;
|
|
21821
23208
|
});
|
|
21822
23209
|
|
|
21823
|
-
var _templateObject$
|
|
21824
|
-
var open = css(_templateObject$
|
|
23210
|
+
var _templateObject$m, _templateObject2$9;
|
|
23211
|
+
var open = css(_templateObject$m || (_templateObject$m = _taggedTemplateLiteralLoose(["\n\ttop: 0.55em;\n\ttransform: rotate(-45deg);\n"])));
|
|
21825
23212
|
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) {
|
|
21826
23213
|
return props.open ? open : null;
|
|
21827
23214
|
});
|
|
21828
23215
|
|
|
21829
|
-
var getClassName$
|
|
23216
|
+
var getClassName$7 = lib_8.getClassName;
|
|
21830
23217
|
var Dropdown = {
|
|
21831
23218
|
data: function data() {
|
|
21832
23219
|
this.__state = {
|
|
@@ -21920,7 +23307,7 @@
|
|
|
21920
23307
|
"on": _extends({}, _extends({}, getButtonProps({
|
|
21921
23308
|
onClick: _this.toggle
|
|
21922
23309
|
}))),
|
|
21923
|
-
"class": getClassName$
|
|
23310
|
+
"class": getClassName$7(_this.$props.innerClass, 'select') || '',
|
|
21924
23311
|
"attrs": {
|
|
21925
23312
|
"title": selectedItem ? _this.renderToString(selectedItem) : placeholder,
|
|
21926
23313
|
"small": _this.$props.small,
|
|
@@ -21937,7 +23324,7 @@
|
|
|
21937
23324
|
getButtonProps: getButtonProps,
|
|
21938
23325
|
getItemEvents: getItemEvents
|
|
21939
23326
|
}) : isOpen && itemsToRender.length ? h("ul", {
|
|
21940
|
-
"class": suggestions$1(themePreset, _this.theme) + " " + (_this.$props.small ? 'small' : '') + " " + getClassName$
|
|
23327
|
+
"class": suggestions$1(themePreset, _this.theme) + " " + (_this.$props.small ? 'small' : '') + " " + getClassName$7(_this.$props.innerClass, 'list')
|
|
21941
23328
|
}, [_this.$props.showSearch ? _this.renderSearchbox({
|
|
21942
23329
|
on: {
|
|
21943
23330
|
input: getInputEvents({
|
|
@@ -21972,9 +23359,9 @@
|
|
|
21972
23359
|
"innerHTML": item[labelField]
|
|
21973
23360
|
}
|
|
21974
23361
|
}) : item[labelField], _this.$props.showCount && item.doc_count && h("span", {
|
|
21975
|
-
"class": getClassName$
|
|
23362
|
+
"class": getClassName$7(_this.$props.innerClass, 'count') || ''
|
|
21976
23363
|
}, ["\xA0(", item.doc_count, ")"])]), selected && _this.$props.multi ? h(Tick, {
|
|
21977
|
-
"class": getClassName$
|
|
23364
|
+
"class": getClassName$7(_this.$props.innerClass, 'icon') || ''
|
|
21978
23365
|
}) : null]);
|
|
21979
23366
|
}), footer]) : null]);
|
|
21980
23367
|
}
|
|
@@ -22062,7 +23449,7 @@
|
|
|
22062
23449
|
var h = this.$createElement;
|
|
22063
23450
|
var renderNoResults = this.$scopedSlots.renderNoResults || this.$props.renderNoResults;
|
|
22064
23451
|
return h("p", {
|
|
22065
|
-
"class": getClassName$
|
|
23452
|
+
"class": getClassName$7(this.$props.innerClass, 'noResults') || null
|
|
22066
23453
|
}, [isFunction$1(renderNoResults) ? renderNoResults() : renderNoResults]);
|
|
22067
23454
|
},
|
|
22068
23455
|
renderSearchbox: function renderSearchbox(eventObject) {
|
|
@@ -22086,7 +23473,7 @@
|
|
|
22086
23473
|
border: 0,
|
|
22087
23474
|
borderBottom: '1px solid #ddd'
|
|
22088
23475
|
},
|
|
22089
|
-
"class": getClassName$
|
|
23476
|
+
"class": getClassName$7(innerClass, 'input')
|
|
22090
23477
|
}, eventObject]));
|
|
22091
23478
|
|
|
22092
23479
|
if (showClear) {
|
|
@@ -22110,16 +23497,16 @@
|
|
|
22110
23497
|
}
|
|
22111
23498
|
};
|
|
22112
23499
|
|
|
22113
|
-
var updateQuery$
|
|
23500
|
+
var updateQuery$5 = lib_5.updateQuery,
|
|
22114
23501
|
setQueryOptions$4 = lib_5.setQueryOptions,
|
|
22115
|
-
setCustomQuery$
|
|
22116
|
-
setDefaultQuery$
|
|
23502
|
+
setCustomQuery$4 = lib_5.setCustomQuery,
|
|
23503
|
+
setDefaultQuery$5 = lib_5.setDefaultQuery;
|
|
22117
23504
|
var getQueryOptions$3 = lib_8.getQueryOptions,
|
|
22118
|
-
checkValueChange$
|
|
23505
|
+
checkValueChange$4 = lib_8.checkValueChange,
|
|
22119
23506
|
checkPropChange$1 = lib_8.checkPropChange,
|
|
22120
|
-
getClassName$
|
|
22121
|
-
isEqual$
|
|
22122
|
-
getCompositeAggsQuery$
|
|
23507
|
+
getClassName$8 = lib_8.getClassName,
|
|
23508
|
+
isEqual$8 = lib_8.isEqual,
|
|
23509
|
+
getCompositeAggsQuery$3 = lib_8.getCompositeAggsQuery,
|
|
22123
23510
|
extractQueryFromCustomQuery$4 = lib_8.extractQueryFromCustomQuery,
|
|
22124
23511
|
getOptionsForCustomQuery$4 = lib_8.getOptionsForCustomQuery;
|
|
22125
23512
|
var SingleDropdownList = {
|
|
@@ -22242,7 +23629,7 @@
|
|
|
22242
23629
|
this.setValue(newVal);
|
|
22243
23630
|
},
|
|
22244
23631
|
value: function value(newVal, oldVal) {
|
|
22245
|
-
if (!isEqual$
|
|
23632
|
+
if (!isEqual$8(newVal, oldVal)) {
|
|
22246
23633
|
this.setValue(newVal);
|
|
22247
23634
|
}
|
|
22248
23635
|
},
|
|
@@ -22302,7 +23689,7 @@
|
|
|
22302
23689
|
return h(Container, {
|
|
22303
23690
|
"class": this.$props.className
|
|
22304
23691
|
}, [this.$props.title && h(Title, {
|
|
22305
|
-
"class": getClassName$
|
|
23692
|
+
"class": getClassName$8(this.$props.innerClass, 'title') || ''
|
|
22306
23693
|
}, [this.$props.title]), h(Dropdown, {
|
|
22307
23694
|
"attrs": {
|
|
22308
23695
|
"innerClass": this.$props.innerClass,
|
|
@@ -22358,7 +23745,7 @@
|
|
|
22358
23745
|
_this2.$emit('value-change', value);
|
|
22359
23746
|
};
|
|
22360
23747
|
|
|
22361
|
-
checkValueChange$
|
|
23748
|
+
checkValueChange$4(props.componentId, value, props.beforeValueChange, performUpdate);
|
|
22362
23749
|
},
|
|
22363
23750
|
handleChange: function handleChange(item) {
|
|
22364
23751
|
var value = this.$props.value;
|
|
@@ -22417,7 +23804,7 @@
|
|
|
22417
23804
|
},
|
|
22418
23805
|
generateQueryOptions: function generateQueryOptions(props, after) {
|
|
22419
23806
|
var queryOptions = getQueryOptions$3(props);
|
|
22420
|
-
return props.showLoadMore ? getCompositeAggsQuery$
|
|
23807
|
+
return props.showLoadMore ? getCompositeAggsQuery$3({
|
|
22421
23808
|
query: queryOptions,
|
|
22422
23809
|
props: props,
|
|
22423
23810
|
after: after
|
|
@@ -22523,7 +23910,7 @@
|
|
|
22523
23910
|
|
|
22524
23911
|
SingleDropdownList.generateQueryOptions = function (props, after) {
|
|
22525
23912
|
var queryOptions = getQueryOptions$3(props);
|
|
22526
|
-
return props.showLoadMore ? getCompositeAggsQuery$
|
|
23913
|
+
return props.showLoadMore ? getCompositeAggsQuery$3({
|
|
22527
23914
|
query: queryOptions,
|
|
22528
23915
|
props: props,
|
|
22529
23916
|
after: after
|
|
@@ -22534,7 +23921,7 @@
|
|
|
22534
23921
|
return true;
|
|
22535
23922
|
};
|
|
22536
23923
|
|
|
22537
|
-
var mapStateToProps$
|
|
23924
|
+
var mapStateToProps$7 = function mapStateToProps(state, props) {
|
|
22538
23925
|
return {
|
|
22539
23926
|
options: props.nestedField && state.aggregations[props.componentId] ? state.aggregations[props.componentId].reactivesearch_nested : state.aggregations[props.componentId],
|
|
22540
23927
|
rawData: state.rawData[props.componentId],
|
|
@@ -22549,11 +23936,11 @@
|
|
|
22549
23936
|
|
|
22550
23937
|
var mapDispatchtoProps$4 = {
|
|
22551
23938
|
setQueryOptions: setQueryOptions$4,
|
|
22552
|
-
updateQuery: updateQuery$
|
|
22553
|
-
setCustomQuery: setCustomQuery$
|
|
22554
|
-
setDefaultQuery: setDefaultQuery$
|
|
23939
|
+
updateQuery: updateQuery$5,
|
|
23940
|
+
setCustomQuery: setCustomQuery$4,
|
|
23941
|
+
setDefaultQuery: setDefaultQuery$5
|
|
22555
23942
|
};
|
|
22556
|
-
var ListConnected$2 = ComponentWrapper$1(connect(mapStateToProps$
|
|
23943
|
+
var ListConnected$2 = ComponentWrapper$1(connect(mapStateToProps$7, mapDispatchtoProps$4)(SingleDropdownList), {
|
|
22557
23944
|
componentType: constants_1$1.singleDropdownList,
|
|
22558
23945
|
internalComponent: SingleDropdownList.hasInternalComponent()
|
|
22559
23946
|
});
|
|
@@ -22565,16 +23952,16 @@
|
|
|
22565
23952
|
|
|
22566
23953
|
SingleDropdownList.componentType = constants_1$1.singleDropdownList;
|
|
22567
23954
|
|
|
22568
|
-
var updateQuery$
|
|
23955
|
+
var updateQuery$6 = lib_5.updateQuery,
|
|
22569
23956
|
setQueryOptions$5 = lib_5.setQueryOptions,
|
|
22570
|
-
setCustomQuery$
|
|
22571
|
-
setDefaultQuery$
|
|
22572
|
-
var isEqual$
|
|
23957
|
+
setCustomQuery$5 = lib_5.setCustomQuery,
|
|
23958
|
+
setDefaultQuery$6 = lib_5.setDefaultQuery;
|
|
23959
|
+
var isEqual$9 = lib_8.isEqual,
|
|
22573
23960
|
getQueryOptions$4 = lib_8.getQueryOptions,
|
|
22574
|
-
checkValueChange$
|
|
23961
|
+
checkValueChange$5 = lib_8.checkValueChange,
|
|
22575
23962
|
checkPropChange$2 = lib_8.checkPropChange,
|
|
22576
|
-
getClassName$
|
|
22577
|
-
getCompositeAggsQuery$
|
|
23963
|
+
getClassName$9 = lib_8.getClassName,
|
|
23964
|
+
getCompositeAggsQuery$4 = lib_8.getCompositeAggsQuery,
|
|
22578
23965
|
extractQueryFromCustomQuery$5 = lib_8.extractQueryFromCustomQuery,
|
|
22579
23966
|
getOptionsForCustomQuery$5 = lib_8.getOptionsForCustomQuery;
|
|
22580
23967
|
var MultiDropdownList = {
|
|
@@ -22666,7 +24053,7 @@
|
|
|
22666
24053
|
}
|
|
22667
24054
|
}
|
|
22668
24055
|
|
|
22669
|
-
if (!isEqual$
|
|
24056
|
+
if (!isEqual$9(selectedValue, newVal)) {
|
|
22670
24057
|
this.setValue(newVal || [], true);
|
|
22671
24058
|
}
|
|
22672
24059
|
},
|
|
@@ -22717,7 +24104,7 @@
|
|
|
22717
24104
|
this.setValue(newVal, true);
|
|
22718
24105
|
},
|
|
22719
24106
|
value: function value(newVal, oldVal) {
|
|
22720
|
-
if (!isEqual$
|
|
24107
|
+
if (!isEqual$9(newVal, oldVal)) {
|
|
22721
24108
|
this.setValue(newVal, true);
|
|
22722
24109
|
}
|
|
22723
24110
|
},
|
|
@@ -22772,7 +24159,7 @@
|
|
|
22772
24159
|
return h(Container, {
|
|
22773
24160
|
"class": this.$props.className
|
|
22774
24161
|
}, [this.$props.title && h(Title, {
|
|
22775
|
-
"class": getClassName$
|
|
24162
|
+
"class": getClassName$9(this.$props.innerClass, 'title') || ''
|
|
22776
24163
|
}, [this.$props.title]), h(Dropdown, {
|
|
22777
24164
|
"attrs": {
|
|
22778
24165
|
"innerClass": this.$props.innerClass,
|
|
@@ -22897,7 +24284,7 @@
|
|
|
22897
24284
|
_this3.$emit('value-change', finalValues);
|
|
22898
24285
|
};
|
|
22899
24286
|
|
|
22900
|
-
checkValueChange$
|
|
24287
|
+
checkValueChange$5(props.componentId, finalValues, props.beforeValueChange, performUpdate);
|
|
22901
24288
|
},
|
|
22902
24289
|
updateDefaultQueryHandler: function updateDefaultQueryHandler(value, props) {
|
|
22903
24290
|
var query = MultiDropdownList.defaultQuery(value, props);
|
|
@@ -22947,7 +24334,7 @@
|
|
|
22947
24334
|
},
|
|
22948
24335
|
generateQueryOptions: function generateQueryOptions(props, after) {
|
|
22949
24336
|
var queryOptions = getQueryOptions$4(props);
|
|
22950
|
-
return props.showLoadMore ? getCompositeAggsQuery$
|
|
24337
|
+
return props.showLoadMore ? getCompositeAggsQuery$4({
|
|
22951
24338
|
query: queryOptions,
|
|
22952
24339
|
props: props,
|
|
22953
24340
|
after: after
|
|
@@ -23095,7 +24482,7 @@
|
|
|
23095
24482
|
|
|
23096
24483
|
MultiDropdownList.generateQueryOptions = function (props, after) {
|
|
23097
24484
|
var queryOptions = getQueryOptions$4(props);
|
|
23098
|
-
return props.showLoadMore ? getCompositeAggsQuery$
|
|
24485
|
+
return props.showLoadMore ? getCompositeAggsQuery$4({
|
|
23099
24486
|
query: queryOptions,
|
|
23100
24487
|
props: props,
|
|
23101
24488
|
after: after
|
|
@@ -23106,7 +24493,7 @@
|
|
|
23106
24493
|
return true;
|
|
23107
24494
|
};
|
|
23108
24495
|
|
|
23109
|
-
var mapStateToProps$
|
|
24496
|
+
var mapStateToProps$8 = function mapStateToProps(state, props) {
|
|
23110
24497
|
return {
|
|
23111
24498
|
options: props.nestedField && state.aggregations[props.componentId] ? state.aggregations[props.componentId].reactivesearch_nested : state.aggregations[props.componentId],
|
|
23112
24499
|
rawData: state.rawData[props.componentId],
|
|
@@ -23121,11 +24508,11 @@
|
|
|
23121
24508
|
|
|
23122
24509
|
var mapDispatchtoProps$5 = {
|
|
23123
24510
|
setQueryOptions: setQueryOptions$5,
|
|
23124
|
-
updateQuery: updateQuery$
|
|
23125
|
-
setCustomQuery: setCustomQuery$
|
|
23126
|
-
setDefaultQuery: setDefaultQuery$
|
|
24511
|
+
updateQuery: updateQuery$6,
|
|
24512
|
+
setCustomQuery: setCustomQuery$5,
|
|
24513
|
+
setDefaultQuery: setDefaultQuery$6
|
|
23127
24514
|
};
|
|
23128
|
-
var ListConnected$3 = ComponentWrapper$1(connect(mapStateToProps$
|
|
24515
|
+
var ListConnected$3 = ComponentWrapper$1(connect(mapStateToProps$8, mapDispatchtoProps$5)(MultiDropdownList), {
|
|
23129
24516
|
componentType: constants_1$1.multiDropdownList,
|
|
23130
24517
|
internalComponent: MultiDropdownList.hasInternalComponent()
|
|
23131
24518
|
});
|
|
@@ -23137,12 +24524,12 @@
|
|
|
23137
24524
|
|
|
23138
24525
|
MultiDropdownList.componentType = constants_1$1.multiDropdownList;
|
|
23139
24526
|
|
|
23140
|
-
var updateQuery$
|
|
24527
|
+
var updateQuery$7 = lib_5.updateQuery,
|
|
23141
24528
|
setQueryOptions$6 = lib_5.setQueryOptions,
|
|
23142
|
-
setCustomQuery$
|
|
23143
|
-
var isEqual$
|
|
23144
|
-
checkValueChange$
|
|
23145
|
-
getClassName$
|
|
24529
|
+
setCustomQuery$6 = lib_5.setCustomQuery;
|
|
24530
|
+
var isEqual$a = lib_8.isEqual,
|
|
24531
|
+
checkValueChange$6 = lib_8.checkValueChange,
|
|
24532
|
+
getClassName$a = lib_8.getClassName,
|
|
23146
24533
|
getOptionsFromQuery = lib_8.getOptionsFromQuery,
|
|
23147
24534
|
handleA11yAction$1 = lib_8.handleA11yAction;
|
|
23148
24535
|
var ToggleButton = {
|
|
@@ -23201,21 +24588,21 @@
|
|
|
23201
24588
|
this.updateQuery(this.$data.currentValue, this.$props);
|
|
23202
24589
|
},
|
|
23203
24590
|
value: function value(newVal, oldVal) {
|
|
23204
|
-
if (!isEqual$
|
|
24591
|
+
if (!isEqual$a(newVal, oldVal)) {
|
|
23205
24592
|
this.handleToggle(newVal, true, this.$props);
|
|
23206
24593
|
}
|
|
23207
24594
|
},
|
|
23208
24595
|
selectedValue: function selectedValue(newVal, oldVal) {
|
|
23209
24596
|
if (this.$props.multiSelect) {
|
|
23210
24597
|
// for multiselect selectedValue will be an array
|
|
23211
|
-
if (!isEqual$
|
|
24598
|
+
if (!isEqual$a(this.$data.currentValue, newVal) && !isEqual$a(oldVal, newVal)) {
|
|
23212
24599
|
this.handleToggle(newVal || [], true, this.$props);
|
|
23213
24600
|
}
|
|
23214
24601
|
} else {
|
|
23215
24602
|
// else selectedValue will be a string
|
|
23216
24603
|
var currentValue = this.$data.currentValue[0] ? this.$data.currentValue[0].value : null;
|
|
23217
24604
|
|
|
23218
|
-
if (!isEqual$
|
|
24605
|
+
if (!isEqual$a(currentValue, this.selectedValue) && !isEqual$a(oldVal, this.selectedValue)) {
|
|
23219
24606
|
this.handleToggle(this.selectedValue || [], true, this.$props);
|
|
23220
24607
|
}
|
|
23221
24608
|
}
|
|
@@ -23293,7 +24680,7 @@
|
|
|
23293
24680
|
}
|
|
23294
24681
|
};
|
|
23295
24682
|
|
|
23296
|
-
checkValueChange$
|
|
24683
|
+
checkValueChange$6(props.componentId, props.multiSelect ? value : value[0], props.beforeValueChange, performUpdate);
|
|
23297
24684
|
},
|
|
23298
24685
|
updateQuery: function updateQuery(value, props) {
|
|
23299
24686
|
var filterValue = value;
|
|
@@ -23330,7 +24717,7 @@
|
|
|
23330
24717
|
multiSelect = _this$$props.multiSelect;
|
|
23331
24718
|
|
|
23332
24719
|
if (enableStrictSelection && !multiSelect && this.$data.currentValue.find(function (stateItem) {
|
|
23333
|
-
return isEqual$
|
|
24720
|
+
return isEqual$a(item, stateItem);
|
|
23334
24721
|
})) {
|
|
23335
24722
|
return false;
|
|
23336
24723
|
}
|
|
@@ -23360,7 +24747,7 @@
|
|
|
23360
24747
|
return _this2.handleClick(item);
|
|
23361
24748
|
}
|
|
23362
24749
|
}) : h(Button, {
|
|
23363
|
-
"class": getClassName$
|
|
24750
|
+
"class": getClassName$a(this.$props.innerClass, 'button') + " " + (isSelected ? 'active' : ''),
|
|
23364
24751
|
"on": {
|
|
23365
24752
|
"click": function click() {
|
|
23366
24753
|
return _this2.handleClick(item);
|
|
@@ -23387,7 +24774,7 @@
|
|
|
23387
24774
|
return h(Container, {
|
|
23388
24775
|
"class": toggleButtons
|
|
23389
24776
|
}, [this.$props.title && h(Title, {
|
|
23390
|
-
"class": getClassName$
|
|
24777
|
+
"class": getClassName$a(this.$props.innerClass, 'title')
|
|
23391
24778
|
}, [this.$props.title]), this.$props.data.map(function (item) {
|
|
23392
24779
|
return _this3.renderButton(item);
|
|
23393
24780
|
})]);
|
|
@@ -23443,7 +24830,7 @@
|
|
|
23443
24830
|
return query;
|
|
23444
24831
|
};
|
|
23445
24832
|
|
|
23446
|
-
var mapStateToProps$
|
|
24833
|
+
var mapStateToProps$9 = function mapStateToProps(state, props) {
|
|
23447
24834
|
return {
|
|
23448
24835
|
selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || null,
|
|
23449
24836
|
componentProps: state.props[props.componentId],
|
|
@@ -23452,11 +24839,11 @@
|
|
|
23452
24839
|
};
|
|
23453
24840
|
|
|
23454
24841
|
var mapDispatchtoProps$6 = {
|
|
23455
|
-
updateQueryHandler: updateQuery$
|
|
24842
|
+
updateQueryHandler: updateQuery$7,
|
|
23456
24843
|
setQueryOptions: setQueryOptions$6,
|
|
23457
|
-
setCustomQuery: setCustomQuery$
|
|
24844
|
+
setCustomQuery: setCustomQuery$6
|
|
23458
24845
|
};
|
|
23459
|
-
var RcConnected = ComponentWrapper$1(connect(mapStateToProps$
|
|
24846
|
+
var RcConnected = ComponentWrapper$1(connect(mapStateToProps$9, mapDispatchtoProps$6)(ToggleButton), {
|
|
23460
24847
|
componentType: constants_1$1.toggleButton
|
|
23461
24848
|
});
|
|
23462
24849
|
|
|
@@ -23468,14 +24855,14 @@
|
|
|
23468
24855
|
ToggleButton.componentType = constants_1$1.toggleButton;
|
|
23469
24856
|
|
|
23470
24857
|
var _excluded = ["options"];
|
|
23471
|
-
var updateQuery$
|
|
24858
|
+
var updateQuery$8 = lib_5.updateQuery,
|
|
23472
24859
|
setQueryOptions$7 = lib_5.setQueryOptions,
|
|
23473
|
-
setCustomQuery$
|
|
23474
|
-
setDefaultQuery$
|
|
24860
|
+
setCustomQuery$7 = lib_5.setCustomQuery,
|
|
24861
|
+
setDefaultQuery$7 = lib_5.setDefaultQuery;
|
|
23475
24862
|
var parseHits$1 = lib_8.parseHits,
|
|
23476
|
-
isEqual$
|
|
23477
|
-
getCompositeAggsQuery$
|
|
23478
|
-
getResultStats$
|
|
24863
|
+
isEqual$b = lib_8.isEqual,
|
|
24864
|
+
getCompositeAggsQuery$5 = lib_8.getCompositeAggsQuery,
|
|
24865
|
+
getResultStats$3 = lib_8.getResultStats,
|
|
23479
24866
|
extractQueryFromCustomQuery$6 = lib_8.extractQueryFromCustomQuery,
|
|
23480
24867
|
getOptionsForCustomQuery$6 = lib_8.getOptionsForCustomQuery;
|
|
23481
24868
|
var ReactiveComponent = {
|
|
@@ -23603,42 +24990,42 @@
|
|
|
23603
24990
|
},
|
|
23604
24991
|
watch: {
|
|
23605
24992
|
hits: function hits(newVal, oldVal) {
|
|
23606
|
-
if (!isEqual$
|
|
24993
|
+
if (!isEqual$b(newVal, oldVal)) {
|
|
23607
24994
|
this.$emit('data', this.getData());
|
|
23608
24995
|
}
|
|
23609
24996
|
},
|
|
23610
24997
|
rawData: function rawData(newVal, oldVal) {
|
|
23611
|
-
if (!isEqual$
|
|
24998
|
+
if (!isEqual$b(newVal, oldVal)) {
|
|
23612
24999
|
this.$emit('data', this.getData());
|
|
23613
25000
|
}
|
|
23614
25001
|
},
|
|
23615
25002
|
aggregations: function aggregations(newVal, oldVal) {
|
|
23616
|
-
if (!isEqual$
|
|
25003
|
+
if (!isEqual$b(newVal, oldVal)) {
|
|
23617
25004
|
this.$emit('data', this.getData());
|
|
23618
25005
|
}
|
|
23619
25006
|
},
|
|
23620
25007
|
aggregationData: function aggregationData(newVal, oldVal) {
|
|
23621
|
-
if (!isEqual$
|
|
25008
|
+
if (!isEqual$b(newVal, oldVal)) {
|
|
23622
25009
|
this.$emit('data', this.getData());
|
|
23623
25010
|
}
|
|
23624
25011
|
},
|
|
23625
25012
|
promotedResults: function promotedResults(newVal, oldVal) {
|
|
23626
|
-
if (!isEqual$
|
|
25013
|
+
if (!isEqual$b(newVal, oldVal)) {
|
|
23627
25014
|
this.$emit('data', this.getData());
|
|
23628
25015
|
}
|
|
23629
25016
|
},
|
|
23630
25017
|
hidden: function hidden(newVal, oldVal) {
|
|
23631
|
-
if (!isEqual$
|
|
25018
|
+
if (!isEqual$b(newVal, oldVal)) {
|
|
23632
25019
|
this.$emit('data', this.getData());
|
|
23633
25020
|
}
|
|
23634
25021
|
},
|
|
23635
25022
|
total: function total(newVal, oldVal) {
|
|
23636
|
-
if (!isEqual$
|
|
25023
|
+
if (!isEqual$b(newVal, oldVal)) {
|
|
23637
25024
|
this.$emit('data', this.getData());
|
|
23638
25025
|
}
|
|
23639
25026
|
},
|
|
23640
25027
|
time: function time(newVal, oldVal) {
|
|
23641
|
-
if (!isEqual$
|
|
25028
|
+
if (!isEqual$b(newVal, oldVal)) {
|
|
23642
25029
|
this.$emit('data', this.getData());
|
|
23643
25030
|
}
|
|
23644
25031
|
},
|
|
@@ -23706,7 +25093,7 @@
|
|
|
23706
25093
|
getAggsQuery: function getAggsQuery() {
|
|
23707
25094
|
if (this.aggregationField) {
|
|
23708
25095
|
return {
|
|
23709
|
-
aggs: getCompositeAggsQuery$
|
|
25096
|
+
aggs: getCompositeAggsQuery$5({
|
|
23710
25097
|
props: this.$props,
|
|
23711
25098
|
showTopHits: true,
|
|
23712
25099
|
value: this.selectedValue
|
|
@@ -23750,7 +25137,7 @@
|
|
|
23750
25137
|
},
|
|
23751
25138
|
computed: {
|
|
23752
25139
|
stats: function stats() {
|
|
23753
|
-
return getResultStats$
|
|
25140
|
+
return getResultStats$3(this);
|
|
23754
25141
|
}
|
|
23755
25142
|
}
|
|
23756
25143
|
};
|
|
@@ -23759,7 +25146,7 @@
|
|
|
23759
25146
|
return !!props.defaultQuery;
|
|
23760
25147
|
};
|
|
23761
25148
|
|
|
23762
|
-
var mapStateToProps$
|
|
25149
|
+
var mapStateToProps$a = function mapStateToProps(state, props) {
|
|
23763
25150
|
return {
|
|
23764
25151
|
aggregations: state.aggregations[props.componentId] && state.aggregations[props.componentId] || null,
|
|
23765
25152
|
aggregationData: state.compositeAggregations[props.componentId] || [],
|
|
@@ -23779,11 +25166,11 @@
|
|
|
23779
25166
|
|
|
23780
25167
|
var mapDispatchtoProps$7 = {
|
|
23781
25168
|
setQueryOptions: setQueryOptions$7,
|
|
23782
|
-
updateQuery: updateQuery$
|
|
23783
|
-
setCustomQuery: setCustomQuery$
|
|
23784
|
-
setDefaultQuery: setDefaultQuery$
|
|
25169
|
+
updateQuery: updateQuery$8,
|
|
25170
|
+
setCustomQuery: setCustomQuery$7,
|
|
25171
|
+
setDefaultQuery: setDefaultQuery$7
|
|
23785
25172
|
};
|
|
23786
|
-
var RcConnected$1 = ComponentWrapper$1(connect(mapStateToProps$
|
|
25173
|
+
var RcConnected$1 = ComponentWrapper$1(connect(mapStateToProps$a, mapDispatchtoProps$7)(ReactiveComponent), {
|
|
23787
25174
|
componentType: constants_1$1.reactiveComponent
|
|
23788
25175
|
});
|
|
23789
25176
|
|
|
@@ -23797,7 +25184,7 @@
|
|
|
23797
25184
|
var setValue$2 = lib_5.setValue,
|
|
23798
25185
|
clearValues = lib_5.clearValues,
|
|
23799
25186
|
resetValuesToDefault = lib_5.resetValuesToDefault;
|
|
23800
|
-
var getClassName$
|
|
25187
|
+
var getClassName$b = lib_8.getClassName,
|
|
23801
25188
|
handleA11yAction$2 = lib_8.handleA11yAction;
|
|
23802
25189
|
var SelectedFilters = {
|
|
23803
25190
|
name: 'SelectedFilters',
|
|
@@ -23836,9 +25223,9 @@
|
|
|
23836
25223
|
return h(Container, {
|
|
23837
25224
|
"class": filters(this.theme) + " " + (this.$props.className || '')
|
|
23838
25225
|
}, [this.$props.title && hasValues && h(Title, {
|
|
23839
|
-
"class": getClassName$
|
|
25226
|
+
"class": getClassName$b(this.$props.innerClass, 'title') || ''
|
|
23840
25227
|
}, [this.$props.title]), filtersToRender, this.$props.showClearAll && hasValues ? h(Button, {
|
|
23841
|
-
"class": getClassName$
|
|
25228
|
+
"class": getClassName$b(this.$props.innerClass, 'button') || '',
|
|
23842
25229
|
"on": _extends({}, {
|
|
23843
25230
|
click: this.clearValues,
|
|
23844
25231
|
keypress: function keypress(event) {
|
|
@@ -23914,7 +25301,7 @@
|
|
|
23914
25301
|
var valueToRender = _this3.renderValue(value, isArray);
|
|
23915
25302
|
|
|
23916
25303
|
return h(Button, {
|
|
23917
|
-
"class": getClassName$
|
|
25304
|
+
"class": getClassName$b(_this3.$props.innerClass, 'button') || '',
|
|
23918
25305
|
"key": component + "-" + (index + 1),
|
|
23919
25306
|
"on": _extends({}, {
|
|
23920
25307
|
click: function click() {
|
|
@@ -23943,7 +25330,7 @@
|
|
|
23943
25330
|
}
|
|
23944
25331
|
};
|
|
23945
25332
|
|
|
23946
|
-
var mapStateToProps$
|
|
25333
|
+
var mapStateToProps$b = function mapStateToProps(state) {
|
|
23947
25334
|
return {
|
|
23948
25335
|
components: state.components,
|
|
23949
25336
|
selectedValues: state.selectedValues
|
|
@@ -23955,18 +25342,18 @@
|
|
|
23955
25342
|
setValue: setValue$2,
|
|
23956
25343
|
resetValuesToDefault: resetValuesToDefault
|
|
23957
25344
|
};
|
|
23958
|
-
var RcConnected$2 = connect(mapStateToProps$
|
|
25345
|
+
var RcConnected$2 = connect(mapStateToProps$b, mapDispatchtoProps$8)(SelectedFilters);
|
|
23959
25346
|
|
|
23960
25347
|
SelectedFilters.install = function (Vue) {
|
|
23961
25348
|
Vue.component(SelectedFilters.name, RcConnected$2);
|
|
23962
25349
|
};
|
|
23963
25350
|
|
|
23964
|
-
var updateQuery$
|
|
25351
|
+
var updateQuery$9 = lib_5.updateQuery,
|
|
23965
25352
|
setQueryOptions$8 = lib_5.setQueryOptions,
|
|
23966
|
-
setCustomQuery$
|
|
23967
|
-
var isEqual$
|
|
23968
|
-
checkValueChange$
|
|
23969
|
-
getClassName$
|
|
25353
|
+
setCustomQuery$8 = lib_5.setCustomQuery;
|
|
25354
|
+
var isEqual$c = lib_8.isEqual,
|
|
25355
|
+
checkValueChange$7 = lib_8.checkValueChange,
|
|
25356
|
+
getClassName$c = lib_8.getClassName,
|
|
23970
25357
|
getOptionsFromQuery$1 = lib_8.getOptionsFromQuery;
|
|
23971
25358
|
var SingleRange = {
|
|
23972
25359
|
name: 'SingleRange',
|
|
@@ -24021,12 +25408,12 @@
|
|
|
24021
25408
|
this.setValue(newVal);
|
|
24022
25409
|
},
|
|
24023
25410
|
value: function value(newVal, oldVal) {
|
|
24024
|
-
if (!isEqual$
|
|
25411
|
+
if (!isEqual$c(newVal, oldVal)) {
|
|
24025
25412
|
this.setValue(newVal);
|
|
24026
25413
|
}
|
|
24027
25414
|
},
|
|
24028
25415
|
selectedValue: function selectedValue(newVal) {
|
|
24029
|
-
if (!isEqual$
|
|
25416
|
+
if (!isEqual$c(this.$data.currentValue, newVal)) {
|
|
24030
25417
|
this.setValue(newVal);
|
|
24031
25418
|
}
|
|
24032
25419
|
},
|
|
@@ -24043,16 +25430,16 @@
|
|
|
24043
25430
|
return h(Container, {
|
|
24044
25431
|
"class": this.$props.className
|
|
24045
25432
|
}, [this.$props.title && h(Title, {
|
|
24046
|
-
"class": getClassName$
|
|
25433
|
+
"class": getClassName$c(this.$props.innerClass, 'title')
|
|
24047
25434
|
}, [this.$props.title]), h(UL, {
|
|
24048
|
-
"class": getClassName$
|
|
25435
|
+
"class": getClassName$c(this.$props.innerClass, 'list')
|
|
24049
25436
|
}, [this.$props.data.map(function (item) {
|
|
24050
25437
|
var selected = !!_this.$data.currentValue && _this.$data.currentValue.label === item.label;
|
|
24051
25438
|
return h("li", {
|
|
24052
25439
|
"key": item.label,
|
|
24053
25440
|
"class": "" + (selected ? 'active' : '')
|
|
24054
25441
|
}, [h(Radio, {
|
|
24055
|
-
"class": getClassName$
|
|
25442
|
+
"class": getClassName$c(_this.$props.innerClass, 'radio'),
|
|
24056
25443
|
"attrs": {
|
|
24057
25444
|
"id": _this.$props.componentId + "-" + item.label,
|
|
24058
25445
|
"name": _this.$props.componentId,
|
|
@@ -24065,7 +25452,7 @@
|
|
|
24065
25452
|
"change": _this.handleChange
|
|
24066
25453
|
}
|
|
24067
25454
|
}), h("label", {
|
|
24068
|
-
"class": getClassName$
|
|
25455
|
+
"class": getClassName$c(_this.$props.innerClass, 'label'),
|
|
24069
25456
|
"attrs": {
|
|
24070
25457
|
"for": _this.$props.componentId + "-" + item.label
|
|
24071
25458
|
}
|
|
@@ -24092,7 +25479,7 @@
|
|
|
24092
25479
|
_this2.$emit('value-change', currentValue);
|
|
24093
25480
|
};
|
|
24094
25481
|
|
|
24095
|
-
checkValueChange$
|
|
25482
|
+
checkValueChange$7(props.componentId, currentValue, props.beforeValueChange, performUpdate);
|
|
24096
25483
|
},
|
|
24097
25484
|
updateQueryHandler: function updateQueryHandler(value, props) {
|
|
24098
25485
|
var customQuery = props.customQuery;
|
|
@@ -24164,7 +25551,7 @@
|
|
|
24164
25551
|
return query;
|
|
24165
25552
|
};
|
|
24166
25553
|
|
|
24167
|
-
var mapStateToProps$
|
|
25554
|
+
var mapStateToProps$c = function mapStateToProps(state, props) {
|
|
24168
25555
|
return {
|
|
24169
25556
|
selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || null,
|
|
24170
25557
|
componentProps: state.props[props.componentId],
|
|
@@ -24173,11 +25560,11 @@
|
|
|
24173
25560
|
};
|
|
24174
25561
|
|
|
24175
25562
|
var mapDispatchtoProps$9 = {
|
|
24176
|
-
updateQuery: updateQuery$
|
|
25563
|
+
updateQuery: updateQuery$9,
|
|
24177
25564
|
setQueryOptions: setQueryOptions$8,
|
|
24178
|
-
setCustomQuery: setCustomQuery$
|
|
25565
|
+
setCustomQuery: setCustomQuery$8
|
|
24179
25566
|
};
|
|
24180
|
-
var RangeConnected = ComponentWrapper$1(connect(mapStateToProps$
|
|
25567
|
+
var RangeConnected = ComponentWrapper$1(connect(mapStateToProps$c, mapDispatchtoProps$9)(SingleRange), {
|
|
24181
25568
|
componentType: constants_1$1.singleRange
|
|
24182
25569
|
});
|
|
24183
25570
|
|
|
@@ -24188,12 +25575,12 @@
|
|
|
24188
25575
|
|
|
24189
25576
|
SingleRange.componentType = constants_1$1.singleRange;
|
|
24190
25577
|
|
|
24191
|
-
var updateQuery$
|
|
25578
|
+
var updateQuery$a = lib_5.updateQuery,
|
|
24192
25579
|
setQueryOptions$9 = lib_5.setQueryOptions,
|
|
24193
|
-
setCustomQuery$
|
|
24194
|
-
var isEqual$
|
|
24195
|
-
checkValueChange$
|
|
24196
|
-
getClassName$
|
|
25580
|
+
setCustomQuery$9 = lib_5.setCustomQuery;
|
|
25581
|
+
var isEqual$d = lib_8.isEqual,
|
|
25582
|
+
checkValueChange$8 = lib_8.checkValueChange,
|
|
25583
|
+
getClassName$d = lib_8.getClassName,
|
|
24197
25584
|
getOptionsFromQuery$2 = lib_8.getOptionsFromQuery;
|
|
24198
25585
|
var MultiRange = {
|
|
24199
25586
|
name: 'MultiRange',
|
|
@@ -24300,7 +25687,7 @@
|
|
|
24300
25687
|
_this.$emit('value-change', Object.keys(selectedValues));
|
|
24301
25688
|
};
|
|
24302
25689
|
|
|
24303
|
-
checkValueChange$
|
|
25690
|
+
checkValueChange$8(props.componentId, currentValue, props.beforeValueChange, performUpdate);
|
|
24304
25691
|
},
|
|
24305
25692
|
updateQueryHandler: function updateQueryHandler(value, props) {
|
|
24306
25693
|
var customQuery = props.customQuery;
|
|
@@ -24334,12 +25721,12 @@
|
|
|
24334
25721
|
this.selectItem(newVal, true, undefined, true);
|
|
24335
25722
|
},
|
|
24336
25723
|
value: function value(newVal, oldVal) {
|
|
24337
|
-
if (!isEqual$
|
|
25724
|
+
if (!isEqual$d(newVal, oldVal)) {
|
|
24338
25725
|
this.selectItem(newVal, true, undefined, true);
|
|
24339
25726
|
}
|
|
24340
25727
|
},
|
|
24341
25728
|
selectedValue: function selectedValue(newVal) {
|
|
24342
|
-
if (!isEqual$
|
|
25729
|
+
if (!isEqual$d(this.$data.currentValue, newVal)) {
|
|
24343
25730
|
this.selectItem(newVal, true, undefined, true);
|
|
24344
25731
|
}
|
|
24345
25732
|
},
|
|
@@ -24373,16 +25760,16 @@
|
|
|
24373
25760
|
return h(Container, {
|
|
24374
25761
|
"class": this.$props.className
|
|
24375
25762
|
}, [this.$props.title && h(Title, {
|
|
24376
|
-
"class": getClassName$
|
|
25763
|
+
"class": getClassName$d(this.$props.innerClass, 'title')
|
|
24377
25764
|
}, [this.$props.title]), h(UL, {
|
|
24378
|
-
"class": getClassName$
|
|
25765
|
+
"class": getClassName$d(this.$props.innerClass, 'list')
|
|
24379
25766
|
}, [this.$props.data.map(function (item) {
|
|
24380
25767
|
var selected = !!_this2.$data.currentValue && _this2.$data.currentValue.label === item.label;
|
|
24381
25768
|
return h("li", {
|
|
24382
25769
|
"key": item.label,
|
|
24383
25770
|
"class": "" + (selected ? 'active' : '')
|
|
24384
25771
|
}, [h(Checkbox, {
|
|
24385
|
-
"class": getClassName$
|
|
25772
|
+
"class": getClassName$d(_this2.$props.innerClass, 'checkbox'),
|
|
24386
25773
|
"attrs": {
|
|
24387
25774
|
"id": _this2.$props.componentId + "-" + item.label,
|
|
24388
25775
|
"name": _this2.$props.componentId,
|
|
@@ -24397,7 +25784,7 @@
|
|
|
24397
25784
|
click: _this2.handleClick
|
|
24398
25785
|
})
|
|
24399
25786
|
}), h("label", {
|
|
24400
|
-
"class": getClassName$
|
|
25787
|
+
"class": getClassName$d(_this2.$props.innerClass, 'label'),
|
|
24401
25788
|
"attrs": {
|
|
24402
25789
|
"for": _this2.$props.componentId + "-" + item.label
|
|
24403
25790
|
}
|
|
@@ -24457,7 +25844,7 @@
|
|
|
24457
25844
|
return query;
|
|
24458
25845
|
};
|
|
24459
25846
|
|
|
24460
|
-
var mapStateToProps$
|
|
25847
|
+
var mapStateToProps$d = function mapStateToProps(state, props) {
|
|
24461
25848
|
return {
|
|
24462
25849
|
selectedValue: state.selectedValues[props.componentId] && state.selectedValues[props.componentId].value || null,
|
|
24463
25850
|
componentProps: state.props[props.componentId],
|
|
@@ -24466,11 +25853,11 @@
|
|
|
24466
25853
|
};
|
|
24467
25854
|
|
|
24468
25855
|
var mapDispatchtoProps$a = {
|
|
24469
|
-
updateQuery: updateQuery$
|
|
25856
|
+
updateQuery: updateQuery$a,
|
|
24470
25857
|
setQueryOptions: setQueryOptions$9,
|
|
24471
|
-
setCustomQuery: setCustomQuery$
|
|
25858
|
+
setCustomQuery: setCustomQuery$9
|
|
24472
25859
|
};
|
|
24473
|
-
var RangeConnected$1 = ComponentWrapper$1(connect(mapStateToProps$
|
|
25860
|
+
var RangeConnected$1 = ComponentWrapper$1(connect(mapStateToProps$d, mapDispatchtoProps$a)(MultiRange), {
|
|
24474
25861
|
componentType: constants_1$1.multiRange
|
|
24475
25862
|
});
|
|
24476
25863
|
|
|
@@ -24756,8 +26143,8 @@
|
|
|
24756
26143
|
};
|
|
24757
26144
|
var vueNoSsr_common = index$2;
|
|
24758
26145
|
|
|
24759
|
-
var _templateObject$
|
|
24760
|
-
var Slider = index$1('div')(_templateObject$
|
|
26146
|
+
var _templateObject$n;
|
|
26147
|
+
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"])));
|
|
24761
26148
|
|
|
24762
26149
|
/**
|
|
24763
26150
|
* Caution: Please do not change this file without having a discussion with the Team.
|
|
@@ -24800,13 +26187,13 @@
|
|
|
24800
26187
|
return components;
|
|
24801
26188
|
};
|
|
24802
26189
|
|
|
24803
|
-
var updateQuery$
|
|
26190
|
+
var updateQuery$b = lib_5.updateQuery,
|
|
24804
26191
|
setQueryOptions$a = lib_5.setQueryOptions,
|
|
24805
|
-
setCustomQuery$
|
|
24806
|
-
var checkValueChange$
|
|
24807
|
-
getClassName$
|
|
26192
|
+
setCustomQuery$a = lib_5.setCustomQuery;
|
|
26193
|
+
var checkValueChange$9 = lib_8.checkValueChange,
|
|
26194
|
+
getClassName$e = lib_8.getClassName,
|
|
24808
26195
|
getOptionsFromQuery$3 = lib_8.getOptionsFromQuery,
|
|
24809
|
-
isEqual$
|
|
26196
|
+
isEqual$e = lib_8.isEqual;
|
|
24810
26197
|
var RangeSlider = {
|
|
24811
26198
|
name: 'RangeSlider',
|
|
24812
26199
|
components: getComponents(),
|
|
@@ -24887,7 +26274,7 @@
|
|
|
24887
26274
|
});
|
|
24888
26275
|
};
|
|
24889
26276
|
|
|
24890
|
-
checkValueChange$
|
|
26277
|
+
checkValueChange$9(props.componentId, {
|
|
24891
26278
|
start: currentValue[0],
|
|
24892
26279
|
end: currentValue[1]
|
|
24893
26280
|
}, props.beforeValueChange, performUpdate);
|
|
@@ -24929,12 +26316,12 @@
|
|
|
24929
26316
|
this.handleChange(RangeSlider.parseValue(newVal, this.$props));
|
|
24930
26317
|
},
|
|
24931
26318
|
value: function value(newVal, oldVal) {
|
|
24932
|
-
if (!isEqual$
|
|
26319
|
+
if (!isEqual$e(newVal, oldVal)) {
|
|
24933
26320
|
this.handleChange(RangeSlider.parseValue(newVal, this.$props));
|
|
24934
26321
|
}
|
|
24935
26322
|
},
|
|
24936
26323
|
selectedValue: function selectedValue(newVal) {
|
|
24937
|
-
if (!isEqual$
|
|
26324
|
+
if (!isEqual$e(this.$data.currentValue, newVal)) {
|
|
24938
26325
|
this.handleChange(RangeSlider.parseValue(newVal, this.$props));
|
|
24939
26326
|
this.$emit('change', newVal);
|
|
24940
26327
|
}
|
|
@@ -24980,9 +26367,9 @@
|
|
|
24980
26367
|
return h(Container, {
|
|
24981
26368
|
"class": this.$props.className
|
|
24982
26369
|
}, [this.$props.title && h(Title, {
|
|
24983
|
-
"class": getClassName$
|
|
26370
|
+
"class": getClassName$e(this.$props.innerClass, 'title')
|
|
24984
26371
|
}, [this.$props.title]), this.$props.range ? h(vueNoSsr_common, [h(Slider, {
|
|
24985
|
-
"class": getClassName$
|
|
26372
|
+
"class": getClassName$e(this.$props.innerClass, 'slider')
|
|
24986
26373
|
}, [h("vue-slider-component", {
|
|
24987
26374
|
"ref": "slider",
|
|
24988
26375
|
"attrs": {
|
|
@@ -25001,9 +26388,9 @@
|
|
|
25001
26388
|
}), this.$props.rangeLabels && h("div", {
|
|
25002
26389
|
"class": "label-container"
|
|
25003
26390
|
}, [h("label", {
|
|
25004
|
-
"class": getClassName$
|
|
26391
|
+
"class": getClassName$e(this.$props.innerClass, 'label') || 'range-label-left'
|
|
25005
26392
|
}, [this.$props.rangeLabels.start]), h("label", {
|
|
25006
|
-
"class": getClassName$
|
|
26393
|
+
"class": getClassName$e(this.$props.innerClass, 'label') || 'range-label-right'
|
|
25007
26394
|
}, [this.$props.rangeLabels.end])])])]) : null]);
|
|
25008
26395
|
}
|
|
25009
26396
|
};
|
|
@@ -25049,7 +26436,7 @@
|
|
|
25049
26436
|
return [];
|
|
25050
26437
|
};
|
|
25051
26438
|
|
|
25052
|
-
var mapStateToProps$
|
|
26439
|
+
var mapStateToProps$e = function mapStateToProps(state, props) {
|
|
25053
26440
|
return {
|
|
25054
26441
|
options: state.aggregations[props.componentId] ? state.aggregations[props.componentId][props.dataField] && state.aggregations[props.componentId][props.dataField].buckets // eslint-disable-line
|
|
25055
26442
|
: [],
|
|
@@ -25060,11 +26447,11 @@
|
|
|
25060
26447
|
};
|
|
25061
26448
|
|
|
25062
26449
|
var mapDispatchtoProps$b = {
|
|
25063
|
-
updateQuery: updateQuery$
|
|
26450
|
+
updateQuery: updateQuery$b,
|
|
25064
26451
|
setQueryOptions: setQueryOptions$a,
|
|
25065
|
-
setCustomQuery: setCustomQuery$
|
|
26452
|
+
setCustomQuery: setCustomQuery$a
|
|
25066
26453
|
};
|
|
25067
|
-
var RangeConnected$2 = ComponentWrapper$1(connect(mapStateToProps$
|
|
26454
|
+
var RangeConnected$2 = ComponentWrapper$1(connect(mapStateToProps$e, mapDispatchtoProps$b)(RangeSlider), {
|
|
25068
26455
|
componentType: constants_1$1.rangeSlider
|
|
25069
26456
|
});
|
|
25070
26457
|
|
|
@@ -25078,15 +26465,15 @@
|
|
|
25078
26465
|
var addComponent$1 = lib_5.addComponent,
|
|
25079
26466
|
removeComponent$1 = lib_5.removeComponent,
|
|
25080
26467
|
watchComponent$1 = lib_5.watchComponent,
|
|
25081
|
-
updateQuery$
|
|
26468
|
+
updateQuery$c = lib_5.updateQuery,
|
|
25082
26469
|
setQueryListener$1 = lib_5.setQueryListener,
|
|
25083
26470
|
setQueryOptions$b = lib_5.setQueryOptions,
|
|
25084
26471
|
setComponentProps$1 = lib_5.setComponentProps,
|
|
25085
|
-
setCustomQuery$
|
|
26472
|
+
setCustomQuery$b = lib_5.setCustomQuery,
|
|
25086
26473
|
updateComponentProps$2 = lib_5.updateComponentProps;
|
|
25087
|
-
var checkValueChange$
|
|
25088
|
-
getClassName$
|
|
25089
|
-
isEqual$
|
|
26474
|
+
var checkValueChange$a = lib_8.checkValueChange,
|
|
26475
|
+
getClassName$f = lib_8.getClassName,
|
|
26476
|
+
isEqual$f = lib_8.isEqual,
|
|
25090
26477
|
checkSomePropChange$1 = lib_8.checkSomePropChange,
|
|
25091
26478
|
extractQueryFromCustomQuery$7 = lib_8.extractQueryFromCustomQuery,
|
|
25092
26479
|
getOptionsForCustomQuery$7 = lib_8.getOptionsForCustomQuery;
|
|
@@ -25290,7 +26677,7 @@
|
|
|
25290
26677
|
});
|
|
25291
26678
|
};
|
|
25292
26679
|
|
|
25293
|
-
checkValueChange$
|
|
26680
|
+
checkValueChange$a(this.$props.componentId, {
|
|
25294
26681
|
start: normalizedValue[0],
|
|
25295
26682
|
end: normalizedValue[1]
|
|
25296
26683
|
}, this.$props.beforeValueChange, performUpdate);
|
|
@@ -25357,7 +26744,7 @@
|
|
|
25357
26744
|
this.setReact();
|
|
25358
26745
|
},
|
|
25359
26746
|
selectedValue: function selectedValue(newValue) {
|
|
25360
|
-
if (isEqual$
|
|
26747
|
+
if (isEqual$f(newValue, this.currentValue)) return;
|
|
25361
26748
|
var value = newValue || {
|
|
25362
26749
|
start: this.range.start,
|
|
25363
26750
|
end: this.range.end
|
|
@@ -25366,7 +26753,7 @@
|
|
|
25366
26753
|
this.handleChange(DynamicRangeSlider.parseValue(value, this.$props));
|
|
25367
26754
|
},
|
|
25368
26755
|
range: function range(newValue, oldValue) {
|
|
25369
|
-
if (isEqual$
|
|
26756
|
+
if (isEqual$f(newValue, oldValue) || !this.currentValue) return;
|
|
25370
26757
|
|
|
25371
26758
|
var _ref3 = this.currentValue || [],
|
|
25372
26759
|
currentStart = _ref3[0],
|
|
@@ -25386,7 +26773,7 @@
|
|
|
25386
26773
|
}
|
|
25387
26774
|
},
|
|
25388
26775
|
value: function value(newVal, oldVal) {
|
|
25389
|
-
if (!isEqual$
|
|
26776
|
+
if (!isEqual$f(newVal, oldVal)) {
|
|
25390
26777
|
this.handleChange(DynamicRangeSlider.parseValue(newVal, this.$props));
|
|
25391
26778
|
}
|
|
25392
26779
|
}
|
|
@@ -25404,9 +26791,9 @@
|
|
|
25404
26791
|
return h(Container, {
|
|
25405
26792
|
"class": this.$props.className
|
|
25406
26793
|
}, [this.$props.title && h(Title, {
|
|
25407
|
-
"class": getClassName$
|
|
26794
|
+
"class": getClassName$f(this.$props.innerClass, 'title')
|
|
25408
26795
|
}, [this.$props.title]), h(vueNoSsr_common, [h(Slider, {
|
|
25409
|
-
"class": getClassName$
|
|
26796
|
+
"class": getClassName$f(this.$props.innerClass, 'slider')
|
|
25410
26797
|
}, [h("vue-slider-component", {
|
|
25411
26798
|
"ref": "slider",
|
|
25412
26799
|
"attrs": {
|
|
@@ -25425,9 +26812,9 @@
|
|
|
25425
26812
|
}), this.labels ? h("div", {
|
|
25426
26813
|
"class": "label-container"
|
|
25427
26814
|
}, [h("label", {
|
|
25428
|
-
"class": getClassName$
|
|
26815
|
+
"class": getClassName$f(this.$props.innerClass, 'label') || 'range-label-left'
|
|
25429
26816
|
}, [this.labels.start]), h("label", {
|
|
25430
|
-
"class": getClassName$
|
|
26817
|
+
"class": getClassName$f(this.$props.innerClass, 'label') || 'range-label-right'
|
|
25431
26818
|
}, [this.labels.end])]) : null])])]);
|
|
25432
26819
|
}
|
|
25433
26820
|
};
|
|
@@ -25473,7 +26860,7 @@
|
|
|
25473
26860
|
return true;
|
|
25474
26861
|
};
|
|
25475
26862
|
|
|
25476
|
-
var mapStateToProps$
|
|
26863
|
+
var mapStateToProps$f = function mapStateToProps(state, props) {
|
|
25477
26864
|
var componentId = state.aggregations[props.componentId];
|
|
25478
26865
|
var internalRange = state.aggregations[props.componentId + "__range__internal"];
|
|
25479
26866
|
var options = componentId && componentId[props.dataField];
|
|
@@ -25505,15 +26892,15 @@
|
|
|
25505
26892
|
var mapDispatchtoProps$c = {
|
|
25506
26893
|
addComponent: addComponent$1,
|
|
25507
26894
|
removeComponent: removeComponent$1,
|
|
25508
|
-
updateQuery: updateQuery$
|
|
26895
|
+
updateQuery: updateQuery$c,
|
|
25509
26896
|
watchComponent: watchComponent$1,
|
|
25510
26897
|
setQueryListener: setQueryListener$1,
|
|
25511
26898
|
setQueryOptions: setQueryOptions$b,
|
|
25512
26899
|
setComponentProps: setComponentProps$1,
|
|
25513
|
-
setCustomQuery: setCustomQuery$
|
|
26900
|
+
setCustomQuery: setCustomQuery$b,
|
|
25514
26901
|
updateComponentProps: updateComponentProps$2
|
|
25515
26902
|
};
|
|
25516
|
-
var RangeConnected$3 = connect(mapStateToProps$
|
|
26903
|
+
var RangeConnected$3 = connect(mapStateToProps$f, mapDispatchtoProps$c)(DynamicRangeSlider);
|
|
25517
26904
|
|
|
25518
26905
|
DynamicRangeSlider.install = function (Vue) {
|
|
25519
26906
|
Vue.component(DynamicRangeSlider.name, RangeConnected$3);
|
|
@@ -25675,7 +27062,7 @@
|
|
|
25675
27062
|
}
|
|
25676
27063
|
};
|
|
25677
27064
|
|
|
25678
|
-
var mapStateToProps$
|
|
27065
|
+
var mapStateToProps$g = function mapStateToProps(state, props) {
|
|
25679
27066
|
return {
|
|
25680
27067
|
selectedValues: filterByComponentIds(state.selectedValues, props),
|
|
25681
27068
|
queryLog: filterByComponentIds(state.queryLog, props),
|
|
@@ -25692,7 +27079,7 @@
|
|
|
25692
27079
|
};
|
|
25693
27080
|
};
|
|
25694
27081
|
|
|
25695
|
-
var StateProviderConnected = connect(mapStateToProps$
|
|
27082
|
+
var StateProviderConnected = connect(mapStateToProps$g, {})(StateProvider);
|
|
25696
27083
|
|
|
25697
27084
|
StateProvider.install = function (Vue) {
|
|
25698
27085
|
Vue.component(StateProvider.name, StateProviderConnected);
|
|
@@ -25745,8 +27132,8 @@
|
|
|
25745
27132
|
if (component.defaultQuery) {
|
|
25746
27133
|
var defaultQuery = component.defaultQuery(currentValue, component);
|
|
25747
27134
|
return _extends({
|
|
25748
|
-
query:
|
|
25749
|
-
},
|
|
27135
|
+
query: helper_14(defaultQuery)
|
|
27136
|
+
}, helper_15(defaultQuery));
|
|
25750
27137
|
}
|
|
25751
27138
|
|
|
25752
27139
|
return component.source.defaultQuery ? {
|
|
@@ -25762,8 +27149,8 @@
|
|
|
25762
27149
|
if (component.customQuery) {
|
|
25763
27150
|
var customQuery = component.customQuery(currentValue, component);
|
|
25764
27151
|
return _extends({
|
|
25765
|
-
query:
|
|
25766
|
-
},
|
|
27152
|
+
query: helper_14(customQuery)
|
|
27153
|
+
}, helper_15(customQuery));
|
|
25767
27154
|
}
|
|
25768
27155
|
|
|
25769
27156
|
return component.source.defaultQuery ? {
|
|
@@ -25927,7 +27314,7 @@
|
|
|
25927
27314
|
var react = component.react;
|
|
25928
27315
|
|
|
25929
27316
|
if (isInternalComponentPresent || isResultComponent) {
|
|
25930
|
-
react =
|
|
27317
|
+
react = helper_30(react, internalComponent);
|
|
25931
27318
|
}
|
|
25932
27319
|
|
|
25933
27320
|
dependencyTree = dependencyTreeReducer(dependencyTree, {
|
|
@@ -25990,7 +27377,7 @@
|
|
|
25990
27377
|
|
|
25991
27378
|
componentCollection.forEach(function (component) {
|
|
25992
27379
|
// eslint-disable-next-line
|
|
25993
|
-
var _buildQuery =
|
|
27380
|
+
var _buildQuery = helper_29(component.componentId, dependencyTree, queryList, queryOptions),
|
|
25994
27381
|
queryObj = _buildQuery.queryObj,
|
|
25995
27382
|
options = _buildQuery.options;
|
|
25996
27383
|
|
|
@@ -26200,21 +27587,21 @@
|
|
|
26200
27587
|
});
|
|
26201
27588
|
}
|
|
26202
27589
|
|
|
26203
|
-
var version = "1.
|
|
27590
|
+
var version = "1.29.0-preview.1";
|
|
26204
27591
|
|
|
26205
|
-
var _templateObject$
|
|
27592
|
+
var _templateObject$o, _templateObject2$a;
|
|
26206
27593
|
|
|
26207
27594
|
var alert = function alert(_ref) {
|
|
26208
27595
|
var theme = _ref.theme;
|
|
26209
|
-
return css(_templateObject$
|
|
27596
|
+
return css(_templateObject$o || (_templateObject$o = _taggedTemplateLiteralLoose(["\n\tcolor: ", ";\n"])), theme.colors.alertColor);
|
|
26210
27597
|
};
|
|
26211
27598
|
|
|
26212
27599
|
var Content = index$1('div')(_templateObject2$a || (_templateObject2$a = _taggedTemplateLiteralLoose(["\n\t", ";\n\tfont-size: 13px;\n\tmargin: 8px;\n"])), function (props) {
|
|
26213
27600
|
return props.alert && alert;
|
|
26214
27601
|
});
|
|
26215
27602
|
|
|
26216
|
-
var getClassName$
|
|
26217
|
-
isEqual$
|
|
27603
|
+
var getClassName$g = lib_8.getClassName,
|
|
27604
|
+
isEqual$g = lib_8.isEqual;
|
|
26218
27605
|
var RangeInput = {
|
|
26219
27606
|
name: 'RangeInput',
|
|
26220
27607
|
components: {
|
|
@@ -26296,7 +27683,7 @@
|
|
|
26296
27683
|
handleChange: function handleChange(value, event) {
|
|
26297
27684
|
var currentValue = value;
|
|
26298
27685
|
|
|
26299
|
-
if (this.shouldUpdate(value) && !isEqual$
|
|
27686
|
+
if (this.shouldUpdate(value) && !isEqual$g(value, this.currentValue)) {
|
|
26300
27687
|
switch (event) {
|
|
26301
27688
|
case 'change':
|
|
26302
27689
|
if (!value) {
|
|
@@ -26366,7 +27753,7 @@
|
|
|
26366
27753
|
}
|
|
26367
27754
|
},
|
|
26368
27755
|
value: function value(newVal, oldVal) {
|
|
26369
|
-
if (!isEqual$
|
|
27756
|
+
if (!isEqual$g(newVal, oldVal)) {
|
|
26370
27757
|
if (this.isControlled()) {
|
|
26371
27758
|
this.handleChange(newVal, 'change');
|
|
26372
27759
|
}
|
|
@@ -26437,7 +27824,7 @@
|
|
|
26437
27824
|
"value-change": this.handleValueChange
|
|
26438
27825
|
}
|
|
26439
27826
|
}), h(Flex, {
|
|
26440
|
-
"class": getClassName$
|
|
27827
|
+
"class": getClassName$g(innerClass, 'input-container') || ''
|
|
26441
27828
|
}, [h(Flex, {
|
|
26442
27829
|
"attrs": {
|
|
26443
27830
|
"direction": "column",
|
|
@@ -26457,7 +27844,7 @@
|
|
|
26457
27844
|
"on": {
|
|
26458
27845
|
"change": this.handleInputChange
|
|
26459
27846
|
},
|
|
26460
|
-
"class": getClassName$
|
|
27847
|
+
"class": getClassName$g(innerClass, 'input') || '',
|
|
26461
27848
|
"domProps": _extends({}, {
|
|
26462
27849
|
value: this.currentValue.start
|
|
26463
27850
|
})
|
|
@@ -26490,7 +27877,7 @@
|
|
|
26490
27877
|
"on": {
|
|
26491
27878
|
"change": this.handleInputChange
|
|
26492
27879
|
},
|
|
26493
|
-
"class": getClassName$
|
|
27880
|
+
"class": getClassName$g(innerClass, 'input') || '',
|
|
26494
27881
|
"domProps": _extends({}, {
|
|
26495
27882
|
value: this.currentValue.end
|
|
26496
27883
|
})
|
|
@@ -26502,13 +27889,13 @@
|
|
|
26502
27889
|
}
|
|
26503
27890
|
};
|
|
26504
27891
|
|
|
26505
|
-
var mapStateToProps$
|
|
27892
|
+
var mapStateToProps$h = function mapStateToProps(state) {
|
|
26506
27893
|
return {
|
|
26507
27894
|
themePreset: state.config.themePreset
|
|
26508
27895
|
};
|
|
26509
27896
|
};
|
|
26510
27897
|
|
|
26511
|
-
var RangeConnected$4 = ComponentWrapper$1(connect(mapStateToProps$
|
|
27898
|
+
var RangeConnected$4 = ComponentWrapper$1(connect(mapStateToProps$h, {})(RangeInput), {
|
|
26512
27899
|
componentType: constants_1$1.rangeInput
|
|
26513
27900
|
});
|
|
26514
27901
|
|
|
@@ -26519,7 +27906,7 @@
|
|
|
26519
27906
|
|
|
26520
27907
|
RangeInput.componentType = constants_1$1.rangeInput;
|
|
26521
27908
|
|
|
26522
|
-
var components = [ReactiveList, ResultCard, ResultList, ReactiveBase, DataSearch, SingleList, MultiList, SingleRange, MultiRange, RangeSlider, DynamicRangeSlider, ReactiveComponent, SelectedFilters, ToggleButton, SingleDropdownList, MultiDropdownList, StateProvider, RangeInput];
|
|
27909
|
+
var components = [ReactiveList, ResultCard, ResultList, ReactiveBase, DataSearch, SearchBox, SingleList, MultiList, SingleRange, MultiRange, RangeSlider, DynamicRangeSlider, ReactiveComponent, SelectedFilters, ToggleButton, SingleDropdownList, MultiDropdownList, StateProvider, RangeInput];
|
|
26523
27910
|
function install (Vue) {
|
|
26524
27911
|
components.map(function (component) {
|
|
26525
27912
|
Vue.use(component);
|
|
@@ -26549,6 +27936,7 @@
|
|
|
26549
27936
|
exports.ReactiveList = ReactiveList;
|
|
26550
27937
|
exports.ResultCard = ResultCard;
|
|
26551
27938
|
exports.ResultList = ResultList;
|
|
27939
|
+
exports.SearchBox = SearchBox;
|
|
26552
27940
|
exports.SelectedFilters = SelectedFilters;
|
|
26553
27941
|
exports.SingleDropdownList = SingleDropdownList;
|
|
26554
27942
|
exports.SingleList = SingleList;
|