@appbaseio/reactivesearch-vue 1.29.0 → 1.30.0
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 +1238 -545
- 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-e0b7c1f6.js → Button-0e2e2c02.js} +1 -1
- package/dist/cjs/{CancelSvg-4aa35935.js → CancelSvg-c48c1085.js} +1 -1
- package/dist/cjs/{Card-fd94ef07.js → Card-4fa0f769.js} +2 -2
- package/dist/cjs/{ComponentWrapper-10bad289.js → ComponentWrapper-5cb08414.js} +2 -2
- package/dist/cjs/{Container-526efa6a.js → Container-cfd69a34.js} +1 -1
- package/dist/cjs/{DataSearch-eec21890.js → DataSearch-e550096e.js} +234 -83
- package/dist/cjs/DataSearch.js +9 -9
- package/dist/cjs/{DropDown-e4381fcc.js → DropDown-fc59f1ee.js} +4 -4
- package/dist/cjs/DynamicRangeSlider.js +5 -5
- package/dist/cjs/{Flex-f146cdad.js → Flex-63774e4d.js} +1 -1
- package/dist/cjs/{FormControlList-808dbcef.js → FormControlList-a9c64bb8.js} +1 -1
- package/dist/cjs/{Input-0d7b25ad.js → Input-43868594.js} +1 -1
- package/dist/cjs/{ListItem-b40adb04.js → ListItem-38962297.js} +2 -2
- package/dist/cjs/MultiDropdownList.js +10 -10
- package/dist/cjs/MultiList.js +8 -8
- package/dist/cjs/MultiRange.js +6 -6
- package/dist/cjs/RangeInput.js +8 -8
- package/dist/cjs/RangeSlider.js +6 -6
- package/dist/cjs/ReactiveBase.js +34 -24
- package/dist/cjs/ReactiveComponent.js +3 -3
- package/dist/cjs/ReactiveList.js +9 -8
- package/dist/cjs/ResultCard.js +3 -3
- package/dist/cjs/ResultList.js +3 -3
- package/dist/cjs/SelectedFilters.js +44 -27
- package/dist/cjs/SingleDropdownList.js +10 -10
- package/dist/cjs/SingleList.js +8 -8
- package/dist/cjs/SingleRange.js +7 -7
- package/dist/cjs/StateProvider.js +30 -5
- package/dist/cjs/{Title-584a8cc8.js → Title-26661936.js} +1 -1
- package/dist/cjs/ToggleButton.js +7 -6
- package/dist/cjs/{_rollupPluginBabelHelpers-f127c8b7.js → _rollupPluginBabelHelpers-91d4b5a6.js} +1 -2
- package/dist/cjs/{index-4509aa45.js → index-2cd3650b.js} +1 -1
- package/dist/cjs/index.js +18 -17
- package/dist/cjs/initReactivesearch.js +2 -2
- package/dist/cjs/{install-4886582d.js → install-250a14f1.js} +246 -83
- package/dist/cjs/install.js +18 -17
- package/dist/cjs/{ssr-0ee35a09.js → ssr-949cafb5.js} +1 -1
- package/dist/cjs/{utils-1219e1fe.js → utils-0df3cb93.js} +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/es/{Button-33de88e6.js → Button-e18ad90f.js} +1 -1
- package/dist/es/{CancelSvg-c2c03a35.js → CancelSvg-e3b33cdd.js} +1 -1
- package/dist/es/{Card-6446f1b7.js → Card-ad6ba09f.js} +2 -2
- package/dist/es/{ComponentWrapper-0f3431d1.js → ComponentWrapper-dc92772a.js} +2 -2
- package/dist/es/{Container-18b03fde.js → Container-421450dc.js} +1 -1
- package/dist/es/{DataSearch-42f547cd.js → DataSearch-8e5d0972.js} +234 -85
- package/dist/es/DataSearch.js +9 -9
- package/dist/es/{DropDown-ff6ad982.js → DropDown-565fad6f.js} +4 -4
- package/dist/es/DynamicRangeSlider.js +5 -5
- package/dist/es/{Flex-8770345d.js → Flex-09d40927.js} +1 -1
- package/dist/es/{FormControlList-704f8dee.js → FormControlList-38ffe3d3.js} +1 -1
- package/dist/es/{Input-e339e63a.js → Input-c9d757bc.js} +1 -1
- package/dist/es/{ListItem-8e8fb535.js → ListItem-41d6ddd7.js} +2 -2
- package/dist/es/MultiDropdownList.js +10 -10
- package/dist/es/MultiList.js +8 -8
- package/dist/es/MultiRange.js +6 -6
- package/dist/es/RangeInput.js +8 -8
- package/dist/es/RangeSlider.js +6 -6
- package/dist/es/ReactiveBase.js +34 -24
- package/dist/es/ReactiveComponent.js +3 -3
- package/dist/es/ReactiveList.js +9 -8
- package/dist/es/ResultCard.js +3 -3
- package/dist/es/ResultList.js +3 -3
- package/dist/es/SelectedFilters.js +44 -27
- package/dist/es/SingleDropdownList.js +10 -10
- package/dist/es/SingleList.js +8 -8
- package/dist/es/SingleRange.js +7 -7
- package/dist/es/StateProvider.js +30 -5
- package/dist/es/{Title-3522ff56.js → Title-35edd732.js} +1 -1
- package/dist/es/ToggleButton.js +7 -6
- package/dist/es/{_rollupPluginBabelHelpers-0f24d612.js → _rollupPluginBabelHelpers-51ce1182.js} +1 -2
- package/dist/es/{index-78920565.js → index-5371a13f.js} +1 -1
- package/dist/es/index.js +19 -18
- package/dist/es/initReactivesearch.js +2 -2
- package/dist/es/{install-54ebd72e.js → install-9faa87f1.js} +247 -84
- package/dist/es/install.js +18 -17
- package/dist/es/{ssr-a41dfea9.js → ssr-ad57b0ad.js} +1 -1
- package/dist/es/{utils-64a2e5f0.js → utils-9b45e0ab.js} +1 -1
- package/dist/es/version.js +1 -1
- package/package.json +3 -3
|
@@ -779,12 +779,14 @@
|
|
|
779
779
|
var REMOVE_COMPONENT = exports.REMOVE_COMPONENT = 'REMOVE_COMPONENT';
|
|
780
780
|
var WATCH_COMPONENT = exports.WATCH_COMPONENT = 'WATCH_COMPONENT';
|
|
781
781
|
var SET_QUERY = exports.SET_QUERY = 'SET_QUERY';
|
|
782
|
+
var SET_APPBASE_QUERY = exports.SET_APPBASE_QUERY = 'SET_APPBASE_QUERY';
|
|
782
783
|
var SET_QUERY_OPTIONS = exports.SET_QUERY_OPTIONS = 'SET_QUERY_OPTIONS';
|
|
783
784
|
var EXECUTE_QUERY = exports.EXECUTE_QUERY = 'EXECUTE_QUERY';
|
|
784
785
|
var UPDATE_HITS = exports.UPDATE_HITS = 'UPDATE_HITS';
|
|
785
786
|
var UPDATE_AGGS = exports.UPDATE_AGGS = 'UPDATE_AGGS';
|
|
786
787
|
var UPDATE_COMPOSITE_AGGS = exports.UPDATE_COMPOSITE_AGGS = 'UPDATE_COMPOSITE_AGGS';
|
|
787
788
|
var ADD_CONFIG = exports.ADD_CONFIG = 'ADD_CONFIG';
|
|
789
|
+
var UPDATE_CONFIG = exports.UPDATE_CONFIG = 'UPDATE_CONFIG';
|
|
788
790
|
var ADD_APPBASE_REF = exports.ADD_APPBASE_REF = 'ADD_APPBASE_REF';
|
|
789
791
|
var LOG_QUERY = exports.LOG_QUERY = 'LOG_QUERY';
|
|
790
792
|
var LOG_COMBINED_QUERY = exports.LOG_COMBINED_QUERY = 'LOG_COMBINED_QUERY';
|
|
@@ -819,6 +821,7 @@
|
|
|
819
821
|
var RECENT_SEARCHES_SUCCESS = exports.RECENT_SEARCHES_SUCCESS = 'RECENT_SEARCHES_SUCCESS';
|
|
820
822
|
var RECENT_SEARCHES_ERROR = exports.RECENT_SEARCHES_ERROR = 'RECENT_SEARCHES_ERROR';
|
|
821
823
|
var SET_VALUE = exports.SET_VALUE = 'SET_VALUE';
|
|
824
|
+
var SET_VALUES = exports.SET_VALUES = 'SET_VALUES';
|
|
822
825
|
var RESET_TO_DEFAULT = exports.RESET_TO_DEFAULT = 'RESET_TO_DEFAULT';
|
|
823
826
|
var SET_GOOGLE_MAP_SCRIPT_LOADING = exports.SET_GOOGLE_MAP_SCRIPT_LOADING = 'SET_GOOGLE_MAP_SCRIPT_LOADING';
|
|
824
827
|
var SET_GOOGLE_MAP_SCRIPT_LOADED = exports.SET_GOOGLE_MAP_SCRIPT_LOADED = 'SET_GOOGLE_MAP_SCRIPT_LOADED';
|
|
@@ -829,50 +832,53 @@
|
|
|
829
832
|
var constants_2 = constants.REMOVE_COMPONENT;
|
|
830
833
|
var constants_3 = constants.WATCH_COMPONENT;
|
|
831
834
|
var constants_4 = constants.SET_QUERY;
|
|
832
|
-
var constants_5 = constants.
|
|
833
|
-
var constants_6 = constants.
|
|
834
|
-
var constants_7 = constants.
|
|
835
|
-
var constants_8 = constants.
|
|
836
|
-
var constants_9 = constants.
|
|
837
|
-
var constants_10 = constants.
|
|
838
|
-
var constants_11 = constants.
|
|
839
|
-
var constants_12 = constants.
|
|
840
|
-
var constants_13 = constants.
|
|
841
|
-
var constants_14 = constants.
|
|
842
|
-
var constants_15 = constants.
|
|
843
|
-
var constants_16 = constants.
|
|
844
|
-
var constants_17 = constants.
|
|
845
|
-
var constants_18 = constants.
|
|
846
|
-
var constants_19 = constants.
|
|
847
|
-
var constants_20 = constants.
|
|
848
|
-
var constants_21 = constants.
|
|
849
|
-
var constants_22 = constants.
|
|
850
|
-
var constants_23 = constants.
|
|
851
|
-
var constants_24 = constants.
|
|
852
|
-
var constants_25 = constants.
|
|
853
|
-
var constants_26 = constants.
|
|
854
|
-
var constants_27 = constants.
|
|
855
|
-
var constants_28 = constants.
|
|
856
|
-
var constants_29 = constants.
|
|
857
|
-
var constants_30 = constants.
|
|
858
|
-
var constants_31 = constants.
|
|
859
|
-
var constants_32 = constants.
|
|
860
|
-
var constants_33 = constants.
|
|
861
|
-
var constants_34 = constants.
|
|
862
|
-
var constants_35 = constants.
|
|
863
|
-
var constants_36 = constants.
|
|
864
|
-
var constants_37 = constants.
|
|
865
|
-
var constants_38 = constants.
|
|
866
|
-
var constants_39 = constants.
|
|
867
|
-
var constants_40 = constants.
|
|
868
|
-
var constants_41 = constants.
|
|
869
|
-
var constants_42 = constants.
|
|
870
|
-
var constants_43 = constants.
|
|
871
|
-
var constants_44 = constants.
|
|
872
|
-
var constants_45 = constants.
|
|
873
|
-
var constants_46 = constants.
|
|
874
|
-
var constants_47 = constants.
|
|
875
|
-
var constants_48 = constants.
|
|
835
|
+
var constants_5 = constants.SET_APPBASE_QUERY;
|
|
836
|
+
var constants_6 = constants.SET_QUERY_OPTIONS;
|
|
837
|
+
var constants_7 = constants.EXECUTE_QUERY;
|
|
838
|
+
var constants_8 = constants.UPDATE_HITS;
|
|
839
|
+
var constants_9 = constants.UPDATE_AGGS;
|
|
840
|
+
var constants_10 = constants.UPDATE_COMPOSITE_AGGS;
|
|
841
|
+
var constants_11 = constants.ADD_CONFIG;
|
|
842
|
+
var constants_12 = constants.UPDATE_CONFIG;
|
|
843
|
+
var constants_13 = constants.ADD_APPBASE_REF;
|
|
844
|
+
var constants_14 = constants.LOG_QUERY;
|
|
845
|
+
var constants_15 = constants.LOG_COMBINED_QUERY;
|
|
846
|
+
var constants_16 = constants.SET_INTERNAL_VALUE;
|
|
847
|
+
var constants_17 = constants.PATCH_VALUE;
|
|
848
|
+
var constants_18 = constants.CLEAR_VALUES;
|
|
849
|
+
var constants_19 = constants.SET_LOADING;
|
|
850
|
+
var constants_20 = constants.SET_ERROR;
|
|
851
|
+
var constants_21 = constants.SET_TIMESTAMP;
|
|
852
|
+
var constants_22 = constants.SET_HEADERS;
|
|
853
|
+
var constants_23 = constants.SET_MAP_DATA;
|
|
854
|
+
var constants_24 = constants.SET_QUERY_LISTENER;
|
|
855
|
+
var constants_25 = constants.STORE_KEY;
|
|
856
|
+
var constants_26 = constants.SET_SEARCH_ID;
|
|
857
|
+
var constants_27 = constants.SET_PROMOTED_RESULTS;
|
|
858
|
+
var constants_28 = constants.SET_DEFAULT_QUERY;
|
|
859
|
+
var constants_29 = constants.SET_CUSTOM_QUERY;
|
|
860
|
+
var constants_30 = constants.SET_CUSTOM_HIGHLIGHT_OPTIONS;
|
|
861
|
+
var constants_31 = constants.SET_CUSTOM_DATA;
|
|
862
|
+
var constants_32 = constants.SET_APPLIED_SETTINGS;
|
|
863
|
+
var constants_33 = constants.SET_PROPS;
|
|
864
|
+
var constants_34 = constants.UPDATE_PROPS;
|
|
865
|
+
var constants_35 = constants.REMOVE_PROPS;
|
|
866
|
+
var constants_36 = constants.SET_SUGGESTIONS_SEARCH_VALUE;
|
|
867
|
+
var constants_37 = constants.CLEAR_SUGGESTIONS_SEARCH_VALUE;
|
|
868
|
+
var constants_38 = constants.SET_SUGGESTIONS_SEARCH_ID;
|
|
869
|
+
var constants_39 = constants.UPDATE_ANALYTICS_CONFIG;
|
|
870
|
+
var constants_40 = constants.SET_RAW_DATA;
|
|
871
|
+
var constants_41 = constants.SET_POPULAR_SUGGESTIONS;
|
|
872
|
+
var constants_42 = constants.SET_DEFAULT_POPULAR_SUGGESTIONS;
|
|
873
|
+
var constants_43 = constants.SET_QUERY_TO_HITS;
|
|
874
|
+
var constants_44 = constants.RECENT_SEARCHES_SUCCESS;
|
|
875
|
+
var constants_45 = constants.RECENT_SEARCHES_ERROR;
|
|
876
|
+
var constants_46 = constants.SET_VALUE;
|
|
877
|
+
var constants_47 = constants.SET_VALUES;
|
|
878
|
+
var constants_48 = constants.RESET_TO_DEFAULT;
|
|
879
|
+
var constants_49 = constants.SET_GOOGLE_MAP_SCRIPT_LOADING;
|
|
880
|
+
var constants_50 = constants.SET_GOOGLE_MAP_SCRIPT_LOADED;
|
|
881
|
+
var constants_51 = constants.SET_GOOGLE_MAP_SCRIPT_ERROR;
|
|
876
882
|
|
|
877
883
|
var componentsReducer_1 = createCommonjsModule(function (module, exports) {
|
|
878
884
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -1126,6 +1132,40 @@
|
|
|
1126
1132
|
});
|
|
1127
1133
|
var queryReducer = unwrapExports(queryReducer_1);
|
|
1128
1134
|
|
|
1135
|
+
var appbaseQueryReducer_1 = createCommonjsModule(function (module, exports) {
|
|
1136
|
+
Object.defineProperty(exports, "__esModule", {
|
|
1137
|
+
value: true
|
|
1138
|
+
});
|
|
1139
|
+
|
|
1140
|
+
var _extends = Object.assign || function (target) {
|
|
1141
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
1142
|
+
var source = arguments[i];
|
|
1143
|
+
|
|
1144
|
+
for (var key in source) {
|
|
1145
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
1146
|
+
target[key] = source[key];
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
return target;
|
|
1152
|
+
};
|
|
1153
|
+
|
|
1154
|
+
exports["default"] = appbaseQueryReducer;
|
|
1155
|
+
|
|
1156
|
+
function appbaseQueryReducer() {
|
|
1157
|
+
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1158
|
+
var action = arguments[1];
|
|
1159
|
+
|
|
1160
|
+
if (action.type === constants.SET_APPBASE_QUERY) {
|
|
1161
|
+
return _extends({}, state, action.query);
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
return state;
|
|
1165
|
+
}
|
|
1166
|
+
});
|
|
1167
|
+
unwrapExports(appbaseQueryReducer_1);
|
|
1168
|
+
|
|
1129
1169
|
var queryOptionsReducer_1 = createCommonjsModule(function (module, exports) {
|
|
1130
1170
|
Object.defineProperty(exports, "__esModule", {
|
|
1131
1171
|
value: true
|
|
@@ -1200,10 +1240,11 @@
|
|
|
1200
1240
|
reactiveList: 'REACTIVELIST',
|
|
1201
1241
|
dataSearch: 'DATASEARCH',
|
|
1202
1242
|
categorySearch: 'CATEGORYSEARCH',
|
|
1203
|
-
searchBox: '
|
|
1243
|
+
searchBox: 'SEARCHBOX',
|
|
1204
1244
|
singleList: 'SINGLELIST',
|
|
1205
1245
|
multiList: 'MULTILIST',
|
|
1206
1246
|
singleDataList: 'SINGLEDATALIST',
|
|
1247
|
+
tabDataList: 'TABDATALIST',
|
|
1207
1248
|
singleDropdownList: 'SINGLEDROPDOWNLIST',
|
|
1208
1249
|
multiDataList: 'MULTIDATALIST',
|
|
1209
1250
|
multiDropdownList: 'MULTIDROPDOWNLIST',
|
|
@@ -1223,7 +1264,8 @@
|
|
|
1223
1264
|
rangeInput: 'RANGEINPUT',
|
|
1224
1265
|
geoDistanceDropdown: 'GEO_DISTANCE_DROPDOWN',
|
|
1225
1266
|
geoDistanceSlider: 'GEO_DISTANCE_SLIDER',
|
|
1226
|
-
reactiveMap: 'REACTIVE_MAP'
|
|
1267
|
+
reactiveMap: 'REACTIVE_MAP',
|
|
1268
|
+
reactiveChart: 'REACTIVE_CHART'
|
|
1227
1269
|
};
|
|
1228
1270
|
var queryTypes = exports.queryTypes = {
|
|
1229
1271
|
search: 'search',
|
|
@@ -1232,18 +1274,23 @@
|
|
|
1232
1274
|
geo: 'geo',
|
|
1233
1275
|
suggestion: 'suggestion'
|
|
1234
1276
|
};
|
|
1235
|
-
var validProps = exports.validProps = ['componentType', 'aggregationField', 'aggregationSize', 'distinctField', 'distinctFieldConfig', 'index', 'dataField', 'includeFields', 'excludeFields', 'size', 'from', 'sortBy', 'sortOptions', 'pagination', 'autoFocus', 'autosuggest', 'debounce', 'defaultValue', 'defaultSuggestions', 'fieldWeights', 'filterLabel', 'fuzziness', 'highlight', 'highlightField', 'nestedField', 'placeholder', 'queryFormat', 'searchOperators', 'enableSynonyms', 'enableQuerySuggestions', 'enablePopularSuggestions', 'queryString', 'categoryField', 'strictSelection', 'selectAllLabel', 'showCheckbox', 'showFilter', 'showSearch', 'showCount', 'showLoadMore', 'loadMoreLabel', 'showMissing', 'missingLabel', 'data', 'showRadio', 'multiSelect', 'includeNullValues', 'interval', 'showHistogram', 'snap', 'stepValue', 'range', 'showSlider', 'parseDate', 'calendarInterval', 'unit', 'enablePopularSuggestions', '
|
|
1277
|
+
var validProps = exports.validProps = ['type', 'componentType', 'aggregationField', 'aggregationSize', 'distinctField', 'distinctFieldConfig', 'index', 'aggregations', 'dataField', 'includeFields', 'excludeFields', 'size', 'from', 'sortBy', 'sortOptions', 'pagination', 'autoFocus', 'autosuggest', 'debounce', 'defaultValue', 'defaultSuggestions', 'fieldWeights', 'filterLabel', 'fuzziness', 'highlight', 'highlightField', 'nestedField', 'placeholder', 'queryFormat', 'searchOperators', 'enableSynonyms', 'enableQuerySuggestions', 'enablePopularSuggestions', 'queryString', 'categoryField', 'strictSelection', 'selectAllLabel', 'showCheckbox', 'showFilter', 'showSearch', 'showCount', 'showLoadMore', 'loadMoreLabel', 'showMissing', 'missingLabel', 'data', 'showRadio', 'multiSelect', 'includeNullValues', 'interval', 'showHistogram', 'snap', 'stepValue', 'range', 'showSlider', 'parseDate', 'calendarInterval', 'unit', 'enablePopularSuggestions', 'enableRecentSuggestions', 'popularSuggestionsConfig', 'recentSuggestionsConfig', 'indexSuggestionsConfig', 'featuredSuggestionsConfig', 'enablePredictiveSuggestions', 'applyStopwords', 'customStopwords', 'enableIndexSuggestions', 'enableFeaturedSuggestions'];
|
|
1236
1278
|
var CLEAR_ALL = exports.CLEAR_ALL = {
|
|
1237
1279
|
NEVER: 'never',
|
|
1238
1280
|
ALWAYS: 'always',
|
|
1239
1281
|
DEFAULT: 'default'
|
|
1240
1282
|
};
|
|
1283
|
+
var SEARCH_COMPONENTS_MODES = exports.SEARCH_COMPONENTS_MODES = {
|
|
1284
|
+
SELECT: 'select',
|
|
1285
|
+
TAG: 'tag'
|
|
1286
|
+
};
|
|
1241
1287
|
});
|
|
1242
1288
|
unwrapExports(constants$1);
|
|
1243
1289
|
var constants_1$1 = constants$1.componentTypes;
|
|
1244
1290
|
var constants_2$1 = constants$1.queryTypes;
|
|
1245
1291
|
var constants_3$1 = constants$1.validProps;
|
|
1246
1292
|
var constants_4$1 = constants$1.CLEAR_ALL;
|
|
1293
|
+
var constants_5$1 = constants$1.SEARCH_COMPONENTS_MODES;
|
|
1247
1294
|
|
|
1248
1295
|
var analytics = createCommonjsModule(function (module, exports) {
|
|
1249
1296
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -1415,6 +1462,8 @@
|
|
|
1415
1462
|
return _extends({}, state, {
|
|
1416
1463
|
analyticsConfig: _extends({}, state.analyticsConfig, action.analyticsConfig)
|
|
1417
1464
|
});
|
|
1465
|
+
} else if (action.type === constants.UPDATE_CONFIG) {
|
|
1466
|
+
return _extends({}, state, action.config);
|
|
1418
1467
|
}
|
|
1419
1468
|
|
|
1420
1469
|
return state;
|
|
@@ -1719,16 +1768,41 @@
|
|
|
1719
1768
|
|
|
1720
1769
|
switch (action.type) {
|
|
1721
1770
|
case constants.SET_VALUE:
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1771
|
+
{
|
|
1772
|
+
var newState = {};
|
|
1773
|
+
Object.keys(action.componentsToReset || {}).forEach(function (id) {
|
|
1774
|
+
newState[id] = _extends({}, state[id], {
|
|
1775
|
+
value: action.componentsToReset[id]
|
|
1776
|
+
});
|
|
1777
|
+
});
|
|
1778
|
+
return _extends({}, state, newState, _defineProperty({}, action.component, {
|
|
1779
|
+
value: action.value,
|
|
1780
|
+
label: action.label || action.component,
|
|
1781
|
+
showFilter: action.showFilter,
|
|
1782
|
+
URLParams: action.URLParams,
|
|
1783
|
+
componentType: action.componentType,
|
|
1784
|
+
category: action.category,
|
|
1785
|
+
meta: action.meta,
|
|
1786
|
+
reference: action.reference
|
|
1787
|
+
}));
|
|
1788
|
+
}
|
|
1789
|
+
|
|
1790
|
+
case constants.SET_VALUES:
|
|
1791
|
+
{
|
|
1792
|
+
var componentKeys = action.componentsValues ? Object.keys(action.componentsValues) : [];
|
|
1793
|
+
|
|
1794
|
+
if (componentKeys.length) {
|
|
1795
|
+
var _newState = {};
|
|
1796
|
+
componentKeys.forEach(function (component) {
|
|
1797
|
+
_newState[component] = _extends({}, state[component], {
|
|
1798
|
+
value: action.componentsValues[component]
|
|
1799
|
+
});
|
|
1800
|
+
});
|
|
1801
|
+
return _extends({}, state, _newState);
|
|
1802
|
+
}
|
|
1803
|
+
|
|
1804
|
+
return state;
|
|
1805
|
+
}
|
|
1732
1806
|
|
|
1733
1807
|
case constants.PATCH_VALUE:
|
|
1734
1808
|
return _extends({}, state, _defineProperty({}, action.component, _extends({}, state[action.component], action.payload)));
|
|
@@ -3270,6 +3344,8 @@
|
|
|
3270
3344
|
|
|
3271
3345
|
var _queryReducer2 = _interopRequireDefault(queryReducer_1);
|
|
3272
3346
|
|
|
3347
|
+
var _appbaseQueryReducer2 = _interopRequireDefault(appbaseQueryReducer_1);
|
|
3348
|
+
|
|
3273
3349
|
var _queryOptionsReducer2 = _interopRequireDefault(queryOptionsReducer_1);
|
|
3274
3350
|
|
|
3275
3351
|
var _configReducer2 = _interopRequireDefault(configReducer_1);
|
|
@@ -3374,7 +3450,8 @@
|
|
|
3374
3450
|
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
3375
3451
|
return state;
|
|
3376
3452
|
},
|
|
3377
|
-
googleMapScriptStatus: _googleMapScriptReducer2["default"]
|
|
3453
|
+
googleMapScriptStatus: _googleMapScriptReducer2["default"],
|
|
3454
|
+
lastUsedAppbaseQuery: _appbaseQueryReducer2["default"]
|
|
3378
3455
|
});
|
|
3379
3456
|
});
|
|
3380
3457
|
unwrapExports(reducers);
|
|
@@ -4954,7 +5031,7 @@
|
|
|
4954
5031
|
Object.defineProperty(exports, "__esModule", {
|
|
4955
5032
|
value: true
|
|
4956
5033
|
});
|
|
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;
|
|
5034
|
+
exports.flatten = exports.saveDataAsFile = exports.hasCustomRenderer = exports.getComponent = exports.isFunction = exports.getCalendarIntervalErrorMessage = exports.queryFormatMillisecondsMap = exports.featuredSuggestionsActionTypes = 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;
|
|
4958
5035
|
|
|
4959
5036
|
var _extends = Object.assign || function (target) {
|
|
4960
5037
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -5524,7 +5601,7 @@
|
|
|
5524
5601
|
var updateInternalQuery = exports.updateInternalQuery = function updateInternalQuery(componentId, queryOptions, value, props, defaultQueryToExecute, queryParams) {
|
|
5525
5602
|
var defaultQuery = props.defaultQuery;
|
|
5526
5603
|
var defaultQueryOptions = void 0;
|
|
5527
|
-
var query =
|
|
5604
|
+
var query = defaultQueryToExecute;
|
|
5528
5605
|
|
|
5529
5606
|
if (defaultQuery) {
|
|
5530
5607
|
var queryTobeSet = defaultQuery(value, props);
|
|
@@ -5536,14 +5613,15 @@
|
|
|
5536
5613
|
updateDefaultQuery(componentId, props, value);
|
|
5537
5614
|
}
|
|
5538
5615
|
|
|
5539
|
-
props.setQueryOptions(componentId, _extends({}, defaultQueryOptions, queryOptions || defaultQueryToExecute));
|
|
5540
|
-
|
|
5541
5616
|
if (query) {
|
|
5617
|
+
props.setQueryOptions(componentId, _extends({}, defaultQueryOptions, queryOptions || defaultQueryToExecute));
|
|
5542
5618
|
props.updateQuery(_extends({
|
|
5543
5619
|
componentId: componentId,
|
|
5544
5620
|
query: query,
|
|
5545
5621
|
value: value
|
|
5546
5622
|
}, queryParams));
|
|
5623
|
+
} else {
|
|
5624
|
+
props.setQueryOptions(componentId, _extends({}, defaultQueryOptions, queryOptions || defaultQueryToExecute));
|
|
5547
5625
|
}
|
|
5548
5626
|
};
|
|
5549
5627
|
|
|
@@ -5678,7 +5756,7 @@
|
|
|
5678
5756
|
} : null, {
|
|
5679
5757
|
time: time || 0,
|
|
5680
5758
|
hidden: hidden,
|
|
5681
|
-
promoted: promotedResults
|
|
5759
|
+
promoted: promotedResults ? promotedResults.length : 0
|
|
5682
5760
|
});
|
|
5683
5761
|
}
|
|
5684
5762
|
|
|
@@ -5816,7 +5894,12 @@
|
|
|
5816
5894
|
Popular: 'popular',
|
|
5817
5895
|
Index: 'index',
|
|
5818
5896
|
Recent: 'recent',
|
|
5819
|
-
Promoted: 'promoted'
|
|
5897
|
+
Promoted: 'promoted',
|
|
5898
|
+
Featured: 'featured'
|
|
5899
|
+
};
|
|
5900
|
+
var featuredSuggestionsActionTypes = exports.featuredSuggestionsActionTypes = {
|
|
5901
|
+
NAVIGATE: 'navigate',
|
|
5902
|
+
FUNCTION: 'function'
|
|
5820
5903
|
};
|
|
5821
5904
|
var queryFormatMillisecondsMap = exports.queryFormatMillisecondsMap = {
|
|
5822
5905
|
minute: 60000,
|
|
@@ -5884,182 +5967,177 @@
|
|
|
5884
5967
|
children = props.children;
|
|
5885
5968
|
return isFunction(children) || isFunction(render);
|
|
5886
5969
|
};
|
|
5887
|
-
});
|
|
5888
|
-
unwrapExports(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;
|
|
5927
5970
|
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
|
|
5971
|
+
var saveDataAsFile = exports.saveDataAsFile = function saveDataAsFile() {
|
|
5972
|
+
var filename = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'exportedData';
|
|
5973
|
+
var data = arguments[1];
|
|
5974
|
+
var format = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'csv';
|
|
5975
|
+
var dataToWrite = data;
|
|
5976
|
+
var dataType = 'text/' + format;
|
|
5932
5977
|
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
var source = arguments[i];
|
|
5936
|
-
|
|
5937
|
-
for (var key in source) {
|
|
5938
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
5939
|
-
target[key] = source[key];
|
|
5940
|
-
}
|
|
5941
|
-
}
|
|
5978
|
+
if (format === 'json') {
|
|
5979
|
+
dataToWrite = JSON.stringify(dataToWrite, 0, 4);
|
|
5942
5980
|
}
|
|
5943
5981
|
|
|
5944
|
-
|
|
5982
|
+
var blob = new Blob([dataToWrite], {
|
|
5983
|
+
type: dataType
|
|
5984
|
+
});
|
|
5985
|
+
var link = document.createElement('a');
|
|
5986
|
+
link.download = filename + '.' + format;
|
|
5987
|
+
link.href = window.URL.createObjectURL(blob);
|
|
5988
|
+
link.dataset.downloadurl = [dataType, link.download, link.href].join(':');
|
|
5989
|
+
var evt = new MouseEvent('click', {
|
|
5990
|
+
view: window,
|
|
5991
|
+
bubbles: true,
|
|
5992
|
+
cancelable: true
|
|
5993
|
+
});
|
|
5994
|
+
link.dispatchEvent(evt);
|
|
5995
|
+
link.remove();
|
|
5945
5996
|
};
|
|
5946
5997
|
|
|
5947
|
-
exports.
|
|
5948
|
-
|
|
5949
|
-
exports.setInternalValue = setInternalValue;
|
|
5950
|
-
exports.patchValue = patchValue;
|
|
5951
|
-
exports.clearValues = clearValues;
|
|
5998
|
+
var flatten = exports.flatten = function flatten(data) {
|
|
5999
|
+
var result = {};
|
|
5952
6000
|
|
|
5953
|
-
|
|
5954
|
-
|
|
5955
|
-
Object.defineProperty(obj, key, {
|
|
5956
|
-
value: value,
|
|
5957
|
-
enumerable: true,
|
|
5958
|
-
configurable: true,
|
|
5959
|
-
writable: true
|
|
5960
|
-
});
|
|
5961
|
-
} else {
|
|
5962
|
-
obj[key] = value;
|
|
5963
|
-
}
|
|
6001
|
+
function recurse(cur) {
|
|
6002
|
+
var prop = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
5964
6003
|
|
|
5965
|
-
|
|
5966
|
-
|
|
6004
|
+
if (Object(cur) !== cur) {
|
|
6005
|
+
result[prop] = cur;
|
|
6006
|
+
} else if (Array.isArray(cur)) {
|
|
6007
|
+
result[prop] = JSON.stringify(cur);
|
|
6008
|
+
} else {
|
|
6009
|
+
var isEmpty = true;
|
|
6010
|
+
Object.keys(cur).forEach(function (p) {
|
|
6011
|
+
isEmpty = false;
|
|
6012
|
+
recurse(cur[p], prop ? prop + '.' + p : p);
|
|
6013
|
+
});
|
|
5967
6014
|
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
|
|
5971
|
-
|
|
6015
|
+
if (isEmpty && prop) {
|
|
6016
|
+
result[prop] = {};
|
|
6017
|
+
}
|
|
6018
|
+
}
|
|
6019
|
+
}
|
|
5972
6020
|
|
|
5973
|
-
|
|
6021
|
+
recurse(data);
|
|
6022
|
+
return result;
|
|
6023
|
+
};
|
|
6024
|
+
});
|
|
6025
|
+
unwrapExports(helper);
|
|
6026
|
+
var helper_1 = helper.flatten;
|
|
6027
|
+
var helper_2 = helper.saveDataAsFile;
|
|
6028
|
+
var helper_3 = helper.hasCustomRenderer;
|
|
6029
|
+
var helper_4 = helper.getComponent;
|
|
6030
|
+
var helper_5 = helper.isFunction;
|
|
6031
|
+
var helper_6 = helper.getCalendarIntervalErrorMessage;
|
|
6032
|
+
var helper_7 = helper.queryFormatMillisecondsMap;
|
|
6033
|
+
var helper_8 = helper.featuredSuggestionsActionTypes;
|
|
6034
|
+
var helper_9 = helper.suggestionTypes;
|
|
6035
|
+
var helper_10 = helper.getTopSuggestions;
|
|
6036
|
+
var helper_11 = helper.withClickIds;
|
|
6037
|
+
var helper_12 = helper.getCompositeAggsQuery;
|
|
6038
|
+
var helper_13 = helper.getAggsQuery;
|
|
6039
|
+
var helper_14 = helper.extractQueryFromDefaultQuery;
|
|
6040
|
+
var helper_15 = helper.updateInternalQuery;
|
|
6041
|
+
var helper_16 = helper.getSearchState;
|
|
6042
|
+
var helper_17 = helper.extractQueryFromCustomQuery;
|
|
6043
|
+
var helper_18 = helper.getOptionsForCustomQuery;
|
|
6044
|
+
var helper_19 = helper.getOptionsFromQuery;
|
|
6045
|
+
var helper_20 = helper.parseHits;
|
|
6046
|
+
var helper_21 = helper.handleA11yAction;
|
|
6047
|
+
var helper_22 = helper.getInnerKey;
|
|
6048
|
+
var helper_23 = helper.getClassName;
|
|
6049
|
+
var helper_24 = helper.checkSomePropChange;
|
|
6050
|
+
var helper_25 = helper.checkPropChange;
|
|
6051
|
+
var helper_26 = helper.updateDefaultQuery;
|
|
6052
|
+
var helper_27 = helper.updateCustomQuery;
|
|
6053
|
+
var helper_28 = helper.isEqual;
|
|
6054
|
+
var helper_29 = helper.compareQueries;
|
|
6055
|
+
var helper_30 = helper.debounce;
|
|
6056
|
+
var helper_31 = helper.getQueryOptions;
|
|
6057
|
+
var helper_32 = helper.buildQuery;
|
|
6058
|
+
var helper_33 = helper.pushToAndClause;
|
|
6059
|
+
var helper_34 = helper.checkValueChange;
|
|
6060
|
+
var helper_35 = helper.getAggsOrder;
|
|
6061
|
+
var helper_36 = helper.formatDate;
|
|
6062
|
+
var helper_37 = helper.getResultStats;
|
|
6063
|
+
var helper_38 = helper.extractFieldsFromSource;
|
|
6064
|
+
var helper_39 = helper.normalizeDataField;
|
|
6065
|
+
var helper_40 = helper.handleOnSuggestions;
|
|
6066
|
+
var helper_41 = helper.isValidDateRangeQueryFormat;
|
|
5974
6067
|
|
|
5975
|
-
|
|
5976
|
-
|
|
5977
|
-
|
|
6068
|
+
var hits = createCommonjsModule(function (module, exports) {
|
|
6069
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6070
|
+
value: true
|
|
6071
|
+
});
|
|
6072
|
+
exports.updateAggs = updateAggs;
|
|
6073
|
+
exports.updateCompositeAggs = updateCompositeAggs;
|
|
6074
|
+
exports.updateHits = updateHits;
|
|
6075
|
+
exports.saveQueryToHits = saveQueryToHits;
|
|
6076
|
+
exports.mockDataForTesting = mockDataForTesting;
|
|
5978
6077
|
|
|
5979
|
-
|
|
5980
|
-
|
|
5981
|
-
|
|
5982
|
-
|
|
5983
|
-
|
|
5984
|
-
|
|
5985
|
-
|
|
5986
|
-
URLParams: URLParams,
|
|
5987
|
-
componentType: componentType,
|
|
5988
|
-
category: category,
|
|
5989
|
-
meta: meta
|
|
5990
|
-
});
|
|
6078
|
+
function updateAggs(component, aggregations) {
|
|
6079
|
+
var append = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
6080
|
+
return {
|
|
6081
|
+
type: constants.UPDATE_AGGS,
|
|
6082
|
+
component: component,
|
|
6083
|
+
aggregations: aggregations,
|
|
6084
|
+
append: append
|
|
5991
6085
|
};
|
|
5992
6086
|
}
|
|
5993
6087
|
|
|
5994
|
-
function
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
|
|
5998
|
-
|
|
5999
|
-
|
|
6000
|
-
|
|
6001
|
-
var valueToSet = void 0;
|
|
6002
|
-
Object.keys(selectedValues).forEach(function (component) {
|
|
6003
|
-
if (!(Array.isArray(clearAllBlacklistComponents) && clearAllBlacklistComponents.includes(component))) {
|
|
6004
|
-
if (!componentProps[component] || !componentProps[component].componentType || !componentProps[component].defaultValue) {
|
|
6005
|
-
valueToSet = null;
|
|
6006
|
-
} else if ([constants$1.componentTypes.rangeSlider, constants$1.componentTypes.rangeInput, constants$1.componentTypes.ratingsFilter, constants$1.componentTypes.dateRange].includes(componentProps[component].componentType)) {
|
|
6007
|
-
valueToSet = typeof componentProps[component].defaultValue === 'object' ? [componentProps[component].defaultValue.start, componentProps[component].defaultValue.end] : null;
|
|
6008
|
-
} else if ([constants$1.componentTypes.multiDropdownList, constants$1.componentTypes.multiDataList, constants$1.componentTypes.multiList, constants$1.componentTypes.singleDataList, constants$1.componentTypes.singleDropdownList, constants$1.componentTypes.singleList, constants$1.componentTypes.tagCloud, constants$1.componentTypes.toggleButton, constants$1.componentTypes.multiDropdownRange, constants$1.componentTypes.multiRange, constants$1.componentTypes.singleDropdownRange, constants$1.componentTypes.singleRange, constants$1.componentTypes.dataSearch, constants$1.componentTypes.datePicker].includes(componentProps[component].componentType)) {
|
|
6009
|
-
valueToSet = componentProps[component].defaultValue;
|
|
6010
|
-
} else if ([constants$1.componentTypes.categorySearch].includes(componentProps[component].componentType)) {
|
|
6011
|
-
valueToSet = componentProps[component].defaultValue ? componentProps[component].defaultValue.term : '';
|
|
6012
|
-
}
|
|
6013
|
-
|
|
6014
|
-
if (!(0, helper.isEqual)(selectedValues[component].value, valueToSet)) {
|
|
6015
|
-
defaultValues = _extends({}, defaultValues, _defineProperty({}, component, _extends({}, selectedValues[component], {
|
|
6016
|
-
value: valueToSet
|
|
6017
|
-
})));
|
|
6018
|
-
}
|
|
6019
|
-
}
|
|
6020
|
-
});
|
|
6021
|
-
dispatch({
|
|
6022
|
-
type: constants.RESET_TO_DEFAULT,
|
|
6023
|
-
defaultValues: defaultValues
|
|
6024
|
-
});
|
|
6088
|
+
function updateCompositeAggs(component, aggregations) {
|
|
6089
|
+
var append = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
6090
|
+
return {
|
|
6091
|
+
type: constants.UPDATE_COMPOSITE_AGGS,
|
|
6092
|
+
component: component,
|
|
6093
|
+
aggregations: aggregations,
|
|
6094
|
+
append: append
|
|
6025
6095
|
};
|
|
6026
6096
|
}
|
|
6027
6097
|
|
|
6028
|
-
function
|
|
6098
|
+
function updateHits(component, hits, time, hidden) {
|
|
6099
|
+
var append = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
6029
6100
|
return {
|
|
6030
|
-
type: constants.
|
|
6101
|
+
type: constants.UPDATE_HITS,
|
|
6031
6102
|
component: component,
|
|
6032
|
-
|
|
6033
|
-
|
|
6034
|
-
|
|
6035
|
-
|
|
6103
|
+
hits: hits.hits,
|
|
6104
|
+
total: typeof hits.total === 'object' ? hits.total.value : hits.total,
|
|
6105
|
+
hidden: hidden,
|
|
6106
|
+
time: time,
|
|
6107
|
+
append: append
|
|
6036
6108
|
};
|
|
6037
6109
|
}
|
|
6038
6110
|
|
|
6039
|
-
function
|
|
6111
|
+
function saveQueryToHits(component, query) {
|
|
6040
6112
|
return {
|
|
6041
|
-
type: constants.
|
|
6113
|
+
type: constants.SET_QUERY_TO_HITS,
|
|
6042
6114
|
component: component,
|
|
6043
|
-
|
|
6115
|
+
query: query
|
|
6044
6116
|
};
|
|
6045
6117
|
}
|
|
6046
6118
|
|
|
6047
|
-
function
|
|
6048
|
-
|
|
6049
|
-
|
|
6050
|
-
|
|
6051
|
-
|
|
6052
|
-
|
|
6053
|
-
|
|
6119
|
+
function mockDataForTesting(component, data) {
|
|
6120
|
+
return function (dispatch) {
|
|
6121
|
+
if (data.hasOwnProperty('error')) {
|
|
6122
|
+
dispatch((0, misc.setError)(component, data.error));
|
|
6123
|
+
}
|
|
6124
|
+
|
|
6125
|
+
if (data.hasOwnProperty('aggregations')) {
|
|
6126
|
+
dispatch(updateAggs(component, data.aggregations));
|
|
6127
|
+
}
|
|
6128
|
+
|
|
6129
|
+
if (data.hasOwnProperty('hits')) {
|
|
6130
|
+
dispatch(updateHits(component, data, data.time || undefined));
|
|
6131
|
+
}
|
|
6054
6132
|
};
|
|
6055
6133
|
}
|
|
6056
6134
|
});
|
|
6057
|
-
unwrapExports(
|
|
6058
|
-
var
|
|
6059
|
-
var
|
|
6060
|
-
var
|
|
6061
|
-
var
|
|
6062
|
-
var
|
|
6135
|
+
unwrapExports(hits);
|
|
6136
|
+
var hits_1 = hits.updateAggs;
|
|
6137
|
+
var hits_2 = hits.updateCompositeAggs;
|
|
6138
|
+
var hits_3 = hits.updateHits;
|
|
6139
|
+
var hits_4 = hits.saveQueryToHits;
|
|
6140
|
+
var hits_5 = hits.mockDataForTesting;
|
|
6063
6141
|
|
|
6064
6142
|
var misc = createCommonjsModule(function (module, exports) {
|
|
6065
6143
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6088,6 +6166,8 @@
|
|
|
6088
6166
|
exports.setGoogleMapScriptLoading = setGoogleMapScriptLoading;
|
|
6089
6167
|
exports.setGoogleMapScriptLoaded = setGoogleMapScriptLoaded;
|
|
6090
6168
|
exports.setGoogleMapScriptError = setGoogleMapScriptError;
|
|
6169
|
+
exports.resetStoreForComponent = resetStoreForComponent;
|
|
6170
|
+
exports.setLastUsedAppbaseQuery = setLastUsedAppbaseQuery;
|
|
6091
6171
|
|
|
6092
6172
|
function setRawData(component, response) {
|
|
6093
6173
|
return {
|
|
@@ -6279,6 +6359,29 @@
|
|
|
6279
6359
|
error: error
|
|
6280
6360
|
};
|
|
6281
6361
|
}
|
|
6362
|
+
|
|
6363
|
+
function resetStoreForComponent(componentId) {
|
|
6364
|
+
return function (dispatch) {
|
|
6365
|
+
dispatch(setRawData(componentId, null));
|
|
6366
|
+
dispatch(setCustomData(null, componentId));
|
|
6367
|
+
dispatch(setPromotedResults([], componentId));
|
|
6368
|
+
dispatch(setPopularSuggestions([], componentId));
|
|
6369
|
+
dispatch(setDefaultPopularSuggestions([], componentId));
|
|
6370
|
+
dispatch((0, hits.updateAggs)(componentId, null));
|
|
6371
|
+
dispatch((0, hits.updateCompositeAggs)(componentId, {}));
|
|
6372
|
+
dispatch((0, hits.updateHits)(componentId, {
|
|
6373
|
+
hits: [],
|
|
6374
|
+
total: 0
|
|
6375
|
+
}, 0));
|
|
6376
|
+
};
|
|
6377
|
+
}
|
|
6378
|
+
|
|
6379
|
+
function setLastUsedAppbaseQuery(query) {
|
|
6380
|
+
return {
|
|
6381
|
+
type: constants.SET_APPBASE_QUERY,
|
|
6382
|
+
query: query
|
|
6383
|
+
};
|
|
6384
|
+
}
|
|
6282
6385
|
});
|
|
6283
6386
|
unwrapExports(misc);
|
|
6284
6387
|
var misc_1 = misc.setRawData;
|
|
@@ -6304,76 +6407,8 @@
|
|
|
6304
6407
|
var misc_21 = misc.setGoogleMapScriptLoading;
|
|
6305
6408
|
var misc_22 = misc.setGoogleMapScriptLoaded;
|
|
6306
6409
|
var misc_23 = misc.setGoogleMapScriptError;
|
|
6307
|
-
|
|
6308
|
-
var
|
|
6309
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6310
|
-
value: true
|
|
6311
|
-
});
|
|
6312
|
-
exports.updateAggs = updateAggs;
|
|
6313
|
-
exports.updateCompositeAggs = updateCompositeAggs;
|
|
6314
|
-
exports.updateHits = updateHits;
|
|
6315
|
-
exports.saveQueryToHits = saveQueryToHits;
|
|
6316
|
-
exports.mockDataForTesting = mockDataForTesting;
|
|
6317
|
-
|
|
6318
|
-
function updateAggs(component, aggregations) {
|
|
6319
|
-
var append = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
6320
|
-
return {
|
|
6321
|
-
type: constants.UPDATE_AGGS,
|
|
6322
|
-
component: component,
|
|
6323
|
-
aggregations: aggregations,
|
|
6324
|
-
append: append
|
|
6325
|
-
};
|
|
6326
|
-
}
|
|
6327
|
-
|
|
6328
|
-
function updateCompositeAggs(component, aggregations) {
|
|
6329
|
-
var append = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
6330
|
-
return {
|
|
6331
|
-
type: constants.UPDATE_COMPOSITE_AGGS,
|
|
6332
|
-
component: component,
|
|
6333
|
-
aggregations: aggregations,
|
|
6334
|
-
append: append
|
|
6335
|
-
};
|
|
6336
|
-
}
|
|
6337
|
-
|
|
6338
|
-
function updateHits(component, hits, time, hidden) {
|
|
6339
|
-
var append = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
6340
|
-
return {
|
|
6341
|
-
type: constants.UPDATE_HITS,
|
|
6342
|
-
component: component,
|
|
6343
|
-
hits: hits.hits,
|
|
6344
|
-
total: typeof hits.total === 'object' ? hits.total.value : hits.total,
|
|
6345
|
-
hidden: hidden,
|
|
6346
|
-
time: time,
|
|
6347
|
-
append: append
|
|
6348
|
-
};
|
|
6349
|
-
}
|
|
6350
|
-
|
|
6351
|
-
function saveQueryToHits(component, query) {
|
|
6352
|
-
return {
|
|
6353
|
-
type: constants.SET_QUERY_TO_HITS,
|
|
6354
|
-
component: component,
|
|
6355
|
-
query: query
|
|
6356
|
-
};
|
|
6357
|
-
}
|
|
6358
|
-
|
|
6359
|
-
function mockDataForTesting(component, data) {
|
|
6360
|
-
return function (dispatch) {
|
|
6361
|
-
if (data.hasOwnProperty('aggregations')) {
|
|
6362
|
-
dispatch(updateAggs(component, data.aggregations));
|
|
6363
|
-
}
|
|
6364
|
-
|
|
6365
|
-
if (data.hasOwnProperty('hits')) {
|
|
6366
|
-
dispatch(updateHits(component, data, data.time || undefined));
|
|
6367
|
-
}
|
|
6368
|
-
};
|
|
6369
|
-
}
|
|
6370
|
-
});
|
|
6371
|
-
unwrapExports(hits);
|
|
6372
|
-
var hits_1 = hits.updateAggs;
|
|
6373
|
-
var hits_2 = hits.updateCompositeAggs;
|
|
6374
|
-
var hits_3 = hits.updateHits;
|
|
6375
|
-
var hits_4 = hits.saveQueryToHits;
|
|
6376
|
-
var hits_5 = hits.mockDataForTesting;
|
|
6410
|
+
var misc_24 = misc.resetStoreForComponent;
|
|
6411
|
+
var misc_25 = misc.setLastUsedAppbaseQuery;
|
|
6377
6412
|
|
|
6378
6413
|
var xdate = createCommonjsModule(function (module) {
|
|
6379
6414
|
/**
|
|
@@ -7236,7 +7271,7 @@
|
|
|
7236
7271
|
return obj;
|
|
7237
7272
|
}
|
|
7238
7273
|
|
|
7239
|
-
var componentToTypeMap = exports.componentToTypeMap = (_componentToTypeMap = {}, _defineProperty(_componentToTypeMap, constants$1.componentTypes.reactiveList, constants$1.queryTypes.search), _defineProperty(_componentToTypeMap, constants$1.componentTypes.dataSearch, constants$1.queryTypes.search), _defineProperty(_componentToTypeMap, constants$1.componentTypes.categorySearch, constants$1.queryTypes.search), _defineProperty(_componentToTypeMap, constants$1.componentTypes.searchBox, constants$1.queryTypes.suggestion), _defineProperty(_componentToTypeMap, constants$1.componentTypes.singleList, constants$1.queryTypes.term), _defineProperty(_componentToTypeMap, constants$1.componentTypes.multiList, constants$1.queryTypes.term), _defineProperty(_componentToTypeMap, constants$1.componentTypes.singleDataList, constants$1.queryTypes.term), _defineProperty(_componentToTypeMap, constants$1.componentTypes.singleDropdownList, constants$1.queryTypes.term), _defineProperty(_componentToTypeMap, constants$1.componentTypes.multiDataList, constants$1.queryTypes.term), _defineProperty(_componentToTypeMap, constants$1.componentTypes.multiDropdownList, constants$1.queryTypes.term), _defineProperty(_componentToTypeMap, constants$1.componentTypes.tagCloud, constants$1.queryTypes.term), _defineProperty(_componentToTypeMap, constants$1.componentTypes.toggleButton, constants$1.queryTypes.term), _defineProperty(_componentToTypeMap, constants$1.componentTypes.numberBox, constants$1.queryTypes.term), _defineProperty(_componentToTypeMap, constants$1.componentTypes.datePicker, constants$1.queryTypes.range), _defineProperty(_componentToTypeMap, constants$1.componentTypes.dateRange, constants$1.queryTypes.range), _defineProperty(_componentToTypeMap, constants$1.componentTypes.dynamicRangeSlider, constants$1.queryTypes.range), _defineProperty(_componentToTypeMap, constants$1.componentTypes.singleDropdownRange, constants$1.queryTypes.range), _defineProperty(_componentToTypeMap, constants$1.componentTypes.multiDropdownRange, constants$1.queryTypes.range), _defineProperty(_componentToTypeMap, constants$1.componentTypes.singleRange, constants$1.queryTypes.range), _defineProperty(_componentToTypeMap, constants$1.componentTypes.multiRange, constants$1.queryTypes.range), _defineProperty(_componentToTypeMap, constants$1.componentTypes.rangeSlider, constants$1.queryTypes.range), _defineProperty(_componentToTypeMap, constants$1.componentTypes.ratingsFilter, constants$1.queryTypes.range), _defineProperty(_componentToTypeMap, constants$1.componentTypes.rangeInput, constants$1.queryTypes.range), _defineProperty(_componentToTypeMap, constants$1.componentTypes.geoDistanceDropdown, constants$1.queryTypes.geo), _defineProperty(_componentToTypeMap, constants$1.componentTypes.geoDistanceSlider, constants$1.queryTypes.geo), _defineProperty(_componentToTypeMap, constants$1.componentTypes.reactiveMap, constants$1.queryTypes.geo), _componentToTypeMap);
|
|
7274
|
+
var componentToTypeMap = exports.componentToTypeMap = (_componentToTypeMap = {}, _defineProperty(_componentToTypeMap, constants$1.componentTypes.reactiveList, constants$1.queryTypes.search), _defineProperty(_componentToTypeMap, constants$1.componentTypes.dataSearch, constants$1.queryTypes.search), _defineProperty(_componentToTypeMap, constants$1.componentTypes.categorySearch, constants$1.queryTypes.search), _defineProperty(_componentToTypeMap, constants$1.componentTypes.searchBox, constants$1.queryTypes.suggestion), _defineProperty(_componentToTypeMap, constants$1.componentTypes.singleList, constants$1.queryTypes.term), _defineProperty(_componentToTypeMap, constants$1.componentTypes.multiList, constants$1.queryTypes.term), _defineProperty(_componentToTypeMap, constants$1.componentTypes.singleDataList, constants$1.queryTypes.term), _defineProperty(_componentToTypeMap, constants$1.componentTypes.singleDropdownList, constants$1.queryTypes.term), _defineProperty(_componentToTypeMap, constants$1.componentTypes.multiDataList, constants$1.queryTypes.term), _defineProperty(_componentToTypeMap, constants$1.componentTypes.multiDropdownList, constants$1.queryTypes.term), _defineProperty(_componentToTypeMap, constants$1.componentTypes.tagCloud, constants$1.queryTypes.term), _defineProperty(_componentToTypeMap, constants$1.componentTypes.toggleButton, constants$1.queryTypes.term), _defineProperty(_componentToTypeMap, constants$1.componentTypes.reactiveChart, constants$1.queryTypes.term), _defineProperty(_componentToTypeMap, constants$1.componentTypes.numberBox, constants$1.queryTypes.term), _defineProperty(_componentToTypeMap, constants$1.componentTypes.datePicker, constants$1.queryTypes.range), _defineProperty(_componentToTypeMap, constants$1.componentTypes.dateRange, constants$1.queryTypes.range), _defineProperty(_componentToTypeMap, constants$1.componentTypes.dynamicRangeSlider, constants$1.queryTypes.range), _defineProperty(_componentToTypeMap, constants$1.componentTypes.singleDropdownRange, constants$1.queryTypes.range), _defineProperty(_componentToTypeMap, constants$1.componentTypes.multiDropdownRange, constants$1.queryTypes.range), _defineProperty(_componentToTypeMap, constants$1.componentTypes.singleRange, constants$1.queryTypes.range), _defineProperty(_componentToTypeMap, constants$1.componentTypes.multiRange, constants$1.queryTypes.range), _defineProperty(_componentToTypeMap, constants$1.componentTypes.rangeSlider, constants$1.queryTypes.range), _defineProperty(_componentToTypeMap, constants$1.componentTypes.ratingsFilter, constants$1.queryTypes.range), _defineProperty(_componentToTypeMap, constants$1.componentTypes.rangeInput, constants$1.queryTypes.range), _defineProperty(_componentToTypeMap, constants$1.componentTypes.geoDistanceDropdown, constants$1.queryTypes.geo), _defineProperty(_componentToTypeMap, constants$1.componentTypes.geoDistanceSlider, constants$1.queryTypes.geo), _defineProperty(_componentToTypeMap, constants$1.componentTypes.reactiveMap, constants$1.queryTypes.geo), _componentToTypeMap);
|
|
7240
7275
|
var multiRangeComponents = [constants$1.componentTypes.multiRange, constants$1.componentTypes.multiDropdownRange];
|
|
7241
7276
|
var dateRangeComponents = [constants$1.componentTypes.dateRange, constants$1.componentTypes.datePicker];
|
|
7242
7277
|
var searchComponents = [constants$1.componentTypes.categorySearch, constants$1.componentTypes.dataSearch, constants$1.componentTypes.searchBox];
|
|
@@ -7341,7 +7376,11 @@
|
|
|
7341
7376
|
recentSuggestionsConfig: props.recentSuggestionsConfig,
|
|
7342
7377
|
applyStopwords: props.applyStopwords,
|
|
7343
7378
|
customStopwords: props.customStopwords,
|
|
7344
|
-
enablePredictiveSuggestions: props.enablePredictiveSuggestions
|
|
7379
|
+
enablePredictiveSuggestions: props.enablePredictiveSuggestions,
|
|
7380
|
+
featuredSuggestionsConfig: props.featuredSuggestionsConfig,
|
|
7381
|
+
indexSuggestionsConfig: props.indexSuggestionsConfig,
|
|
7382
|
+
enableFeaturedSuggestions: props.enableFeaturedSuggestions,
|
|
7383
|
+
enableIndexSuggestions: props.enableIndexSuggestions
|
|
7345
7384
|
} : {}, {
|
|
7346
7385
|
calendarInterval: props.calendarInterval
|
|
7347
7386
|
});
|
|
@@ -7370,15 +7409,15 @@
|
|
|
7370
7409
|
return null;
|
|
7371
7410
|
}
|
|
7372
7411
|
|
|
7373
|
-
var queryType = componentToTypeMap[componentProps.componentType];
|
|
7412
|
+
var queryType = componentProps.type ? componentProps.type : componentToTypeMap[componentProps.componentType];
|
|
7374
7413
|
var calcValues = store.selectedValues[component] || store.internalValues[component];
|
|
7375
7414
|
var value = calcValues !== undefined && calcValues !== null ? calcValues.value : undefined;
|
|
7376
7415
|
var queryFormat = componentProps.queryFormat;
|
|
7377
7416
|
var calendarInterval = void 0;
|
|
7378
7417
|
var interval = componentProps.interval;
|
|
7379
|
-
var type =
|
|
7418
|
+
var type = queryType;
|
|
7380
7419
|
var dataField = componentProps.dataField;
|
|
7381
|
-
var aggregations =
|
|
7420
|
+
var aggregations = componentProps.aggregations;
|
|
7382
7421
|
var pagination = void 0;
|
|
7383
7422
|
var from = componentProps.from;
|
|
7384
7423
|
|
|
@@ -7582,6 +7621,14 @@
|
|
|
7582
7621
|
value = undefined;
|
|
7583
7622
|
}
|
|
7584
7623
|
|
|
7624
|
+
var queryValue = value || undefined;
|
|
7625
|
+
|
|
7626
|
+
if (componentProps.componentType === constants$1.componentTypes.searchBox) {
|
|
7627
|
+
if (Array.isArray(queryValue)) {
|
|
7628
|
+
queryValue = undefined;
|
|
7629
|
+
}
|
|
7630
|
+
}
|
|
7631
|
+
|
|
7585
7632
|
return _extends({}, componentProps, {
|
|
7586
7633
|
calendarInterval: calendarInterval,
|
|
7587
7634
|
dataField: dataField,
|
|
@@ -7594,7 +7641,7 @@
|
|
|
7594
7641
|
defaultQuery: store.defaultQueries ? store.defaultQueries[component] : undefined,
|
|
7595
7642
|
customHighlight: store.customHighlightOptions ? store.customHighlightOptions[component] : undefined,
|
|
7596
7643
|
categoryValue: store.internalValues[component] ? store.internalValues[component].category : undefined,
|
|
7597
|
-
value:
|
|
7644
|
+
value: queryValue,
|
|
7598
7645
|
pagination: pagination,
|
|
7599
7646
|
from: from
|
|
7600
7647
|
}, customOptions);
|
|
@@ -7649,6 +7696,8 @@
|
|
|
7649
7696
|
type: constants$1.queryTypes.search
|
|
7650
7697
|
} : {}, calcValues.category ? {
|
|
7651
7698
|
categoryValue: calcValues.category
|
|
7699
|
+
} : {}, calcValues.value ? {
|
|
7700
|
+
value: calcValues.value
|
|
7652
7701
|
} : {}) : {})), execute);
|
|
7653
7702
|
|
|
7654
7703
|
if (dependentQuery) {
|
|
@@ -7697,6 +7746,22 @@
|
|
|
7697
7746
|
};
|
|
7698
7747
|
|
|
7699
7748
|
exports.executeQueryListener = executeQueryListener;
|
|
7749
|
+
exports.updateStoreConfig = updateStoreConfig;
|
|
7750
|
+
|
|
7751
|
+
function _defineProperty(obj, key, value) {
|
|
7752
|
+
if (key in obj) {
|
|
7753
|
+
Object.defineProperty(obj, key, {
|
|
7754
|
+
value: value,
|
|
7755
|
+
enumerable: true,
|
|
7756
|
+
configurable: true,
|
|
7757
|
+
writable: true
|
|
7758
|
+
});
|
|
7759
|
+
} else {
|
|
7760
|
+
obj[key] = value;
|
|
7761
|
+
}
|
|
7762
|
+
|
|
7763
|
+
return obj;
|
|
7764
|
+
}
|
|
7700
7765
|
|
|
7701
7766
|
var handleTransformResponse = exports.handleTransformResponse = function handleTransformResponse() {
|
|
7702
7767
|
var res = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
@@ -7772,7 +7837,8 @@
|
|
|
7772
7837
|
_ref2$appendToAggs = _ref2.appendToAggs,
|
|
7773
7838
|
appendToAggs = _ref2$appendToAggs === undefined ? false : _ref2$appendToAggs,
|
|
7774
7839
|
_ref2$isSuggestionsQu = _ref2.isSuggestionsQuery,
|
|
7775
|
-
isSuggestionsQuery = _ref2$isSuggestionsQu === undefined ? false : _ref2$isSuggestionsQu
|
|
7840
|
+
isSuggestionsQuery = _ref2$isSuggestionsQu === undefined ? false : _ref2$isSuggestionsQu,
|
|
7841
|
+
query = _ref2.query;
|
|
7776
7842
|
|
|
7777
7843
|
var getState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};
|
|
7778
7844
|
var dispatch = arguments[2];
|
|
@@ -7800,7 +7866,8 @@
|
|
|
7800
7866
|
handleTransformResponse(res[component], config, component).then(function (response) {
|
|
7801
7867
|
if (response) {
|
|
7802
7868
|
var _getState4 = getState(),
|
|
7803
|
-
timestamp = _getState4.timestamp
|
|
7869
|
+
timestamp = _getState4.timestamp,
|
|
7870
|
+
props = _getState4.props;
|
|
7804
7871
|
|
|
7805
7872
|
if (timestamp[component] === undefined || timestamp[component] < res._timestamp) {
|
|
7806
7873
|
var promotedResults = response.promoted;
|
|
@@ -7821,6 +7888,13 @@
|
|
|
7821
7888
|
|
|
7822
7889
|
if (response.hits) {
|
|
7823
7890
|
dispatch((0, misc.setTimestamp)(component, res._timestamp));
|
|
7891
|
+
|
|
7892
|
+
if (props[component].componentType === constants$1.componentTypes.reactiveList && query.find(function (queryItem) {
|
|
7893
|
+
return queryItem.id === component;
|
|
7894
|
+
}).execute) {
|
|
7895
|
+
dispatch((0, misc.setLastUsedAppbaseQuery)(_defineProperty({}, component, query)));
|
|
7896
|
+
}
|
|
7897
|
+
|
|
7824
7898
|
dispatch((0, hits.updateHits)(component, response.hits, response.took, response.hits && response.hits.hidden, appendToHits));
|
|
7825
7899
|
var internalComponentID = (0, transform.getInternalComponentID)(component);
|
|
7826
7900
|
|
|
@@ -7987,17 +8061,221 @@
|
|
|
7987
8061
|
listener.onQueryChange(oldQuery, newQuery);
|
|
7988
8062
|
}
|
|
7989
8063
|
}
|
|
8064
|
+
|
|
8065
|
+
function updateStoreConfig(payload) {
|
|
8066
|
+
return function (dispatch) {
|
|
8067
|
+
dispatch({
|
|
8068
|
+
type: constants.UPDATE_CONFIG,
|
|
8069
|
+
config: payload
|
|
8070
|
+
});
|
|
8071
|
+
};
|
|
8072
|
+
}
|
|
8073
|
+
});
|
|
8074
|
+
unwrapExports(utils);
|
|
8075
|
+
var utils_1 = utils.getSuggestionQuery;
|
|
8076
|
+
var utils_2 = utils.isPropertyDefined;
|
|
8077
|
+
var utils_3 = utils.handleResponseMSearch;
|
|
8078
|
+
var utils_4 = utils.handleResponse;
|
|
8079
|
+
var utils_5 = utils.handleError;
|
|
8080
|
+
var utils_6 = utils.getQuerySuggestionsId;
|
|
8081
|
+
var utils_7 = utils.isComponentActive;
|
|
8082
|
+
var utils_8 = utils.handleTransformResponse;
|
|
8083
|
+
var utils_9 = utils.executeQueryListener;
|
|
8084
|
+
var utils_10 = utils.updateStoreConfig;
|
|
8085
|
+
|
|
8086
|
+
var value = createCommonjsModule(function (module, exports) {
|
|
8087
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8088
|
+
value: true
|
|
8089
|
+
});
|
|
8090
|
+
|
|
8091
|
+
var _extends = Object.assign || function (target) {
|
|
8092
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
8093
|
+
var source = arguments[i];
|
|
8094
|
+
|
|
8095
|
+
for (var key in source) {
|
|
8096
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
8097
|
+
target[key] = source[key];
|
|
8098
|
+
}
|
|
8099
|
+
}
|
|
8100
|
+
}
|
|
8101
|
+
|
|
8102
|
+
return target;
|
|
8103
|
+
};
|
|
8104
|
+
|
|
8105
|
+
exports.setValue = setValue;
|
|
8106
|
+
exports.resetValuesToDefault = resetValuesToDefault;
|
|
8107
|
+
exports.setInternalValue = setInternalValue;
|
|
8108
|
+
exports.patchValue = patchValue;
|
|
8109
|
+
exports.clearValues = clearValues;
|
|
8110
|
+
exports.setValues = setValues;
|
|
8111
|
+
|
|
8112
|
+
function _defineProperty(obj, key, value) {
|
|
8113
|
+
if (key in obj) {
|
|
8114
|
+
Object.defineProperty(obj, key, {
|
|
8115
|
+
value: value,
|
|
8116
|
+
enumerable: true,
|
|
8117
|
+
configurable: true,
|
|
8118
|
+
writable: true
|
|
8119
|
+
});
|
|
8120
|
+
} else {
|
|
8121
|
+
obj[key] = value;
|
|
8122
|
+
}
|
|
8123
|
+
|
|
8124
|
+
return obj;
|
|
8125
|
+
}
|
|
8126
|
+
|
|
8127
|
+
function _toConsumableArray(arr) {
|
|
8128
|
+
if (Array.isArray(arr)) {
|
|
8129
|
+
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {
|
|
8130
|
+
arr2[i] = arr[i];
|
|
8131
|
+
}
|
|
8132
|
+
|
|
8133
|
+
return arr2;
|
|
8134
|
+
} else {
|
|
8135
|
+
return Array.from(arr);
|
|
8136
|
+
}
|
|
8137
|
+
}
|
|
8138
|
+
|
|
8139
|
+
function setValue(component, value, label, showFilter, URLParams, componentType, category, meta, updateSource) {
|
|
8140
|
+
return function (dispatch, getState) {
|
|
8141
|
+
var _getState = getState(),
|
|
8142
|
+
urlValues = _getState.urlValues,
|
|
8143
|
+
selectedValues = _getState.selectedValues,
|
|
8144
|
+
watchMan = _getState.watchMan,
|
|
8145
|
+
props = _getState.props;
|
|
8146
|
+
|
|
8147
|
+
var reference = updateSource;
|
|
8148
|
+
|
|
8149
|
+
if ((0, helper.isEqual)(urlValues[component], value)) {
|
|
8150
|
+
reference = 'URL';
|
|
8151
|
+
}
|
|
8152
|
+
|
|
8153
|
+
var componentsToReset = {};
|
|
8154
|
+
var isResultComponent = [constants$1.componentTypes.reactiveList, constants$1.componentTypes.reactiveMap].includes(props[component] && props[component].componentType);
|
|
8155
|
+
var previousValue = selectedValues[component] && selectedValues[component].value;
|
|
8156
|
+
|
|
8157
|
+
if (!(0, helper.isEqual)(previousValue, value) && props[component] && !isResultComponent) {
|
|
8158
|
+
var componentList = [component];
|
|
8159
|
+
var watchList = watchMan[component] || [];
|
|
8160
|
+
componentList = [].concat(_toConsumableArray(componentList), _toConsumableArray(watchList));
|
|
8161
|
+
componentList.forEach(function (comp) {
|
|
8162
|
+
var componentProps = props[comp];
|
|
8163
|
+
|
|
8164
|
+
if (reference !== 'URL' && componentProps && [constants$1.componentTypes.reactiveList, constants$1.componentTypes.reactiveMap].includes(componentProps.componentType)) {
|
|
8165
|
+
if (selectedValues[comp] !== null) {
|
|
8166
|
+
componentsToReset[comp] = null;
|
|
8167
|
+
}
|
|
8168
|
+
}
|
|
8169
|
+
});
|
|
8170
|
+
}
|
|
8171
|
+
|
|
8172
|
+
if (isResultComponent) {
|
|
8173
|
+
if (value < 2 && (!previousValue || previousValue < 2)) {
|
|
8174
|
+
return;
|
|
8175
|
+
}
|
|
8176
|
+
}
|
|
8177
|
+
|
|
8178
|
+
dispatch({
|
|
8179
|
+
type: constants.SET_VALUE,
|
|
8180
|
+
component: component,
|
|
8181
|
+
reference: reference,
|
|
8182
|
+
value: value,
|
|
8183
|
+
label: label,
|
|
8184
|
+
showFilter: showFilter,
|
|
8185
|
+
URLParams: URLParams,
|
|
8186
|
+
componentType: componentType,
|
|
8187
|
+
category: category,
|
|
8188
|
+
meta: meta,
|
|
8189
|
+
componentsToReset: componentsToReset
|
|
8190
|
+
});
|
|
8191
|
+
};
|
|
8192
|
+
}
|
|
8193
|
+
|
|
8194
|
+
function resetValuesToDefault(clearAllBlacklistComponents) {
|
|
8195
|
+
return function (dispatch, getState) {
|
|
8196
|
+
var _getState2 = getState(),
|
|
8197
|
+
selectedValues = _getState2.selectedValues,
|
|
8198
|
+
componentProps = _getState2.props;
|
|
8199
|
+
|
|
8200
|
+
var defaultValues = {};
|
|
8201
|
+
var valueToSet = void 0;
|
|
8202
|
+
Object.keys(selectedValues).forEach(function (component) {
|
|
8203
|
+
if (!(Array.isArray(clearAllBlacklistComponents) && clearAllBlacklistComponents.includes(component))) {
|
|
8204
|
+
if (!componentProps[component] || !componentProps[component].componentType || !componentProps[component].defaultValue) {
|
|
8205
|
+
valueToSet = null;
|
|
8206
|
+
} else if ([constants$1.componentTypes.rangeSlider, constants$1.componentTypes.rangeInput, constants$1.componentTypes.ratingsFilter, constants$1.componentTypes.dateRange].includes(componentProps[component].componentType)) {
|
|
8207
|
+
valueToSet = typeof componentProps[component].defaultValue === 'object' ? [componentProps[component].defaultValue.start, componentProps[component].defaultValue.end] : null;
|
|
8208
|
+
} else if ([constants$1.componentTypes.multiDropdownList, constants$1.componentTypes.multiDataList, constants$1.componentTypes.multiList, constants$1.componentTypes.singleDataList, constants$1.componentTypes.singleDropdownList, constants$1.componentTypes.singleList, constants$1.componentTypes.tagCloud, constants$1.componentTypes.toggleButton, constants$1.componentTypes.multiDropdownRange, constants$1.componentTypes.multiRange, constants$1.componentTypes.singleDropdownRange, constants$1.componentTypes.singleRange, constants$1.componentTypes.dataSearch, constants$1.componentTypes.datePicker].includes(componentProps[component].componentType)) {
|
|
8209
|
+
valueToSet = componentProps[component].defaultValue;
|
|
8210
|
+
} else if ([constants$1.componentTypes.categorySearch].includes(componentProps[component].componentType)) {
|
|
8211
|
+
valueToSet = componentProps[component].defaultValue ? componentProps[component].defaultValue.term : '';
|
|
8212
|
+
}
|
|
8213
|
+
|
|
8214
|
+
if (!(0, helper.isEqual)(selectedValues[component].value, valueToSet)) {
|
|
8215
|
+
defaultValues = _extends({}, defaultValues, _defineProperty({}, component, _extends({}, selectedValues[component], {
|
|
8216
|
+
value: valueToSet
|
|
8217
|
+
})));
|
|
8218
|
+
}
|
|
8219
|
+
}
|
|
8220
|
+
});
|
|
8221
|
+
dispatch({
|
|
8222
|
+
type: constants.RESET_TO_DEFAULT,
|
|
8223
|
+
defaultValues: defaultValues
|
|
8224
|
+
});
|
|
8225
|
+
};
|
|
8226
|
+
}
|
|
8227
|
+
|
|
8228
|
+
function setInternalValue(component, value, componentType, category, meta) {
|
|
8229
|
+
return {
|
|
8230
|
+
type: constants.SET_INTERNAL_VALUE,
|
|
8231
|
+
component: component,
|
|
8232
|
+
value: value,
|
|
8233
|
+
componentType: componentType,
|
|
8234
|
+
category: category,
|
|
8235
|
+
meta: meta
|
|
8236
|
+
};
|
|
8237
|
+
}
|
|
8238
|
+
|
|
8239
|
+
function patchValue(component, payload) {
|
|
8240
|
+
return {
|
|
8241
|
+
type: constants.PATCH_VALUE,
|
|
8242
|
+
component: component,
|
|
8243
|
+
payload: payload
|
|
8244
|
+
};
|
|
8245
|
+
}
|
|
8246
|
+
|
|
8247
|
+
function clearValues() {
|
|
8248
|
+
var resetValues = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
8249
|
+
var clearAllBlacklistComponents = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
8250
|
+
return {
|
|
8251
|
+
type: constants.CLEAR_VALUES,
|
|
8252
|
+
resetValues: resetValues,
|
|
8253
|
+
clearAllBlacklistComponents: clearAllBlacklistComponents
|
|
8254
|
+
};
|
|
8255
|
+
}
|
|
8256
|
+
|
|
8257
|
+
function setValues(componentsValues) {
|
|
8258
|
+
return function (dispatch) {
|
|
8259
|
+
dispatch((0, utils.updateStoreConfig)({
|
|
8260
|
+
queryLockConfig: {
|
|
8261
|
+
initialTimestamp: new Date().getTime(),
|
|
8262
|
+
lockTime: 300
|
|
8263
|
+
}
|
|
8264
|
+
}));
|
|
8265
|
+
dispatch({
|
|
8266
|
+
type: constants.SET_VALUES,
|
|
8267
|
+
componentsValues: componentsValues
|
|
8268
|
+
});
|
|
8269
|
+
};
|
|
8270
|
+
}
|
|
7990
8271
|
});
|
|
7991
|
-
unwrapExports(
|
|
7992
|
-
var
|
|
7993
|
-
var
|
|
7994
|
-
var
|
|
7995
|
-
var
|
|
7996
|
-
var
|
|
7997
|
-
var
|
|
7998
|
-
var utils_7 = utils.isComponentActive;
|
|
7999
|
-
var utils_8 = utils.handleTransformResponse;
|
|
8000
|
-
var utils_9 = utils.executeQueryListener;
|
|
8272
|
+
unwrapExports(value);
|
|
8273
|
+
var value_1 = value.setValue;
|
|
8274
|
+
var value_2 = value.resetValuesToDefault;
|
|
8275
|
+
var value_3 = value.setInternalValue;
|
|
8276
|
+
var value_4 = value.patchValue;
|
|
8277
|
+
var value_5 = value.clearValues;
|
|
8278
|
+
var value_6 = value.setValues;
|
|
8001
8279
|
|
|
8002
8280
|
var maps = createCommonjsModule(function (module, exports) {
|
|
8003
8281
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -8695,6 +8973,7 @@
|
|
|
8695
8973
|
exports.setQueryOptions = setQueryOptions;
|
|
8696
8974
|
exports.updateQuery = updateQuery;
|
|
8697
8975
|
exports.loadMore = loadMore;
|
|
8976
|
+
exports.loadDataToExport = loadDataToExport;
|
|
8698
8977
|
|
|
8699
8978
|
var _analytics2 = _interopRequireDefault(analytics);
|
|
8700
8979
|
|
|
@@ -8954,7 +9233,8 @@
|
|
|
8954
9233
|
res: res,
|
|
8955
9234
|
orderOfQueries: orderOfQueries,
|
|
8956
9235
|
appendToHits: appendToHits,
|
|
8957
|
-
appendToAggs: appendToAggs
|
|
9236
|
+
appendToAggs: appendToAggs,
|
|
9237
|
+
query: query
|
|
8958
9238
|
}, getState, dispatch);
|
|
8959
9239
|
})["catch"](function (err) {
|
|
8960
9240
|
(0, utils.handleError)({
|
|
@@ -8984,11 +9264,16 @@
|
|
|
8984
9264
|
queryOptions = _getState4.queryOptions,
|
|
8985
9265
|
queryListener = _getState4.queryListener,
|
|
8986
9266
|
props = _getState4.props,
|
|
8987
|
-
selectedValues = _getState4.selectedValues,
|
|
8988
9267
|
internalValues = _getState4.internalValues;
|
|
8989
9268
|
|
|
8990
9269
|
var lockTime = config.initialQueriesSyncTime;
|
|
8991
9270
|
var initialTimestamp = config.initialTimestamp;
|
|
9271
|
+
|
|
9272
|
+
if (config.queryLockConfig instanceof Object) {
|
|
9273
|
+
lockTime = config.queryLockConfig.lockTime;
|
|
9274
|
+
initialTimestamp = config.queryLockConfig.initialTimestamp;
|
|
9275
|
+
}
|
|
9276
|
+
|
|
8992
9277
|
var componentList = [componentId];
|
|
8993
9278
|
var finalQuery = [];
|
|
8994
9279
|
var appbaseQuery = {};
|
|
@@ -9004,12 +9289,6 @@
|
|
|
9004
9289
|
match_all: {}
|
|
9005
9290
|
};
|
|
9006
9291
|
componentList.forEach(function (component) {
|
|
9007
|
-
var componentProps = props[component];
|
|
9008
|
-
|
|
9009
|
-
if (selectedValues[componentId] && selectedValues[componentId].reference !== 'URL' && componentProps && [constants$1.componentTypes.reactiveList, constants$1.componentTypes.reactiveMap].includes(componentProps.componentType)) {
|
|
9010
|
-
dispatch((0, value.setValue)(component, null));
|
|
9011
|
-
}
|
|
9012
|
-
|
|
9013
9292
|
var _buildQuery = (0, helper.buildQuery)(component, dependencyTree, queryList, queryOptions),
|
|
9014
9293
|
queryObj = _buildQuery.queryObj,
|
|
9015
9294
|
options = _buildQuery.options;
|
|
@@ -9060,16 +9339,16 @@
|
|
|
9060
9339
|
(0, utils.executeQueryListener)(queryListener[component], oldQuery, currentQuery);
|
|
9061
9340
|
|
|
9062
9341
|
if (isAppbaseEnabled) {
|
|
9063
|
-
var value
|
|
9342
|
+
var value = void 0;
|
|
9064
9343
|
var isInternalComponent = componentId.endsWith('__internal');
|
|
9065
9344
|
var mainComponentProps = props[componentId];
|
|
9066
9345
|
|
|
9067
9346
|
if (isInternalComponent && mainComponentProps && (0, transform.isSearchComponent)(mainComponentProps.componentType)) {
|
|
9068
|
-
value
|
|
9347
|
+
value = internalValues[componentId] && internalValues[componentId].value;
|
|
9069
9348
|
}
|
|
9070
9349
|
|
|
9071
|
-
var query = (0, transform.getRSQuery)(component, (0, transform.extractPropsFromState)(getState(), component, _extends({}, value
|
|
9072
|
-
value: value
|
|
9350
|
+
var query = (0, transform.getRSQuery)(component, (0, transform.extractPropsFromState)(getState(), component, _extends({}, value ? {
|
|
9351
|
+
value: value
|
|
9073
9352
|
} : null, metaOptions ? {
|
|
9074
9353
|
from: metaOptions.from
|
|
9075
9354
|
} : null)));
|
|
@@ -9114,7 +9393,7 @@
|
|
|
9114
9393
|
var currentTime = new Date().getTime();
|
|
9115
9394
|
|
|
9116
9395
|
if (currentTime - initialTimestamp < lockTime) {
|
|
9117
|
-
if (!lock) {
|
|
9396
|
+
if (!lock || config.queryLockConfig) {
|
|
9118
9397
|
setTimeout(function () {
|
|
9119
9398
|
var finalOrderOfQueries = [];
|
|
9120
9399
|
var finalIsSuggestionsQuery = false;
|
|
@@ -9169,6 +9448,9 @@
|
|
|
9169
9448
|
}
|
|
9170
9449
|
|
|
9171
9450
|
requestStack = [];
|
|
9451
|
+
dispatch((0, utils.updateStoreConfig)({
|
|
9452
|
+
queryLockConfig: undefined
|
|
9453
|
+
}));
|
|
9172
9454
|
}, lockTime);
|
|
9173
9455
|
}
|
|
9174
9456
|
|
|
@@ -9222,6 +9504,7 @@
|
|
|
9222
9504
|
_ref2$meta = _ref2.meta,
|
|
9223
9505
|
meta = _ref2$meta === undefined ? {} : _ref2$meta;
|
|
9224
9506
|
var execute = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
9507
|
+
var shouldSetInternalValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
9225
9508
|
return function (dispatch) {
|
|
9226
9509
|
var queryToDispatch = query;
|
|
9227
9510
|
|
|
@@ -9232,10 +9515,12 @@
|
|
|
9232
9515
|
if (!componentId.endsWith('__internal')) {
|
|
9233
9516
|
dispatch((0, value.setValue)(componentId, value$1, label, showFilter, URLParams, componentType, category, meta));
|
|
9234
9517
|
|
|
9235
|
-
if (
|
|
9236
|
-
|
|
9237
|
-
|
|
9238
|
-
|
|
9518
|
+
if (shouldSetInternalValue) {
|
|
9519
|
+
if (componentType === constants$1.componentTypes.dynamicRangeSlider) {
|
|
9520
|
+
dispatch((0, value.setInternalValue)((0, transform.getHistogramComponentID)(componentId), value$1, componentType, category, meta));
|
|
9521
|
+
} else {
|
|
9522
|
+
dispatch((0, value.setInternalValue)(componentId + '__internal', value$1, componentType, category, meta));
|
|
9523
|
+
}
|
|
9239
9524
|
}
|
|
9240
9525
|
} else {
|
|
9241
9526
|
dispatch((0, value.setInternalValue)(componentId, value$1, componentType, category, meta));
|
|
@@ -9306,6 +9591,50 @@
|
|
|
9306
9591
|
}
|
|
9307
9592
|
};
|
|
9308
9593
|
}
|
|
9594
|
+
|
|
9595
|
+
function loadDataToExport(componentId) {
|
|
9596
|
+
var deepPaginationCursor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
9597
|
+
var totalResults = arguments[2];
|
|
9598
|
+
var data = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
|
|
9599
|
+
return function (dispatch, getState) {
|
|
9600
|
+
var _getState6 = getState(),
|
|
9601
|
+
appbaseRef = _getState6.appbaseRef,
|
|
9602
|
+
lastUsedAppbaseQuery = _getState6.lastUsedAppbaseQuery;
|
|
9603
|
+
|
|
9604
|
+
var queryFromStore = lastUsedAppbaseQuery[componentId];
|
|
9605
|
+
|
|
9606
|
+
if (queryFromStore) {
|
|
9607
|
+
var query = queryFromStore.map(function (queryItem) {
|
|
9608
|
+
if (queryItem.id === componentId) {
|
|
9609
|
+
return _extends({}, queryItem, {
|
|
9610
|
+
deepPaginationConfig: {
|
|
9611
|
+
cursor: deepPaginationCursor
|
|
9612
|
+
},
|
|
9613
|
+
deepPagination: true,
|
|
9614
|
+
size: totalResults < 1000 ? totalResults : 1000,
|
|
9615
|
+
sortField: '_id',
|
|
9616
|
+
sortBy: 'asc'
|
|
9617
|
+
});
|
|
9618
|
+
}
|
|
9619
|
+
|
|
9620
|
+
return queryItem;
|
|
9621
|
+
});
|
|
9622
|
+
|
|
9623
|
+
if (totalResults && Array.isArray(data) && totalResults <= data.length) {
|
|
9624
|
+
return data;
|
|
9625
|
+
}
|
|
9626
|
+
|
|
9627
|
+
return appbaseRef.reactiveSearchv3(query).then(function (res) {
|
|
9628
|
+
var newDataChunk = res[componentId].hits.hits;
|
|
9629
|
+
return dispatch(loadDataToExport(componentId, newDataChunk[newDataChunk.length - 1]._id, res[componentId].hits.total.value, [].concat(_toConsumableArray(data), _toConsumableArray(newDataChunk))));
|
|
9630
|
+
})["catch"](function (err) {
|
|
9631
|
+
console.error('Error fetching data to export! ', err);
|
|
9632
|
+
});
|
|
9633
|
+
}
|
|
9634
|
+
|
|
9635
|
+
return console.error('Error fetching data to export!');
|
|
9636
|
+
};
|
|
9637
|
+
}
|
|
9309
9638
|
});
|
|
9310
9639
|
unwrapExports(query);
|
|
9311
9640
|
var query_1 = query.loadPopularSuggestions;
|
|
@@ -9313,6 +9642,7 @@
|
|
|
9313
9642
|
var query_3 = query.setQueryOptions;
|
|
9314
9643
|
var query_4 = query.updateQuery;
|
|
9315
9644
|
var query_5 = query.loadMore;
|
|
9645
|
+
var query_6 = query.loadDataToExport;
|
|
9316
9646
|
|
|
9317
9647
|
var component = createCommonjsModule(function (module, exports) {
|
|
9318
9648
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -10007,7 +10337,7 @@
|
|
|
10007
10337
|
var lib_8 = lib.helper;
|
|
10008
10338
|
|
|
10009
10339
|
function _extends() {
|
|
10010
|
-
_extends = Object.assign
|
|
10340
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
10011
10341
|
for (var i = 1; i < arguments.length; i++) {
|
|
10012
10342
|
var source = arguments[i];
|
|
10013
10343
|
|
|
@@ -10020,7 +10350,6 @@
|
|
|
10020
10350
|
|
|
10021
10351
|
return target;
|
|
10022
10352
|
};
|
|
10023
|
-
|
|
10024
10353
|
return _extends.apply(this, arguments);
|
|
10025
10354
|
}
|
|
10026
10355
|
|
|
@@ -14424,7 +14753,7 @@
|
|
|
14424
14753
|
filteredResults = [].concat(parsedPromotedResults, filteredResults);
|
|
14425
14754
|
}
|
|
14426
14755
|
|
|
14427
|
-
return
|
|
14756
|
+
return helper_11(filteredResults);
|
|
14428
14757
|
}
|
|
14429
14758
|
},
|
|
14430
14759
|
watch: {
|
|
@@ -14682,6 +15011,7 @@
|
|
|
14682
15011
|
}, [this.data.map(function (item, index) {
|
|
14683
15012
|
return renderItem({
|
|
14684
15013
|
item: item,
|
|
15014
|
+
count: _this2.currentPageState * size + index + 1,
|
|
14685
15015
|
triggerClickAnalytics: function triggerClickAnalytics() {
|
|
14686
15016
|
return _this2.triggerClickAnalytics(_this2.currentPageState * size + index);
|
|
14687
15017
|
}
|
|
@@ -16565,7 +16895,7 @@
|
|
|
16565
16895
|
Object.keys(_this.currentSelectedState).filter(function (item) {
|
|
16566
16896
|
return !activeComponents.includes(item);
|
|
16567
16897
|
}).forEach(function (component) {
|
|
16568
|
-
_this.setValue(component, null);
|
|
16898
|
+
_this.setValue(component, null, undefined, undefined, undefined, undefined, undefined, undefined, 'URL');
|
|
16569
16899
|
}); // update active components in selectedValues
|
|
16570
16900
|
|
|
16571
16901
|
Array.from(_this.params.entries()).forEach(function (item) {
|
|
@@ -16580,7 +16910,7 @@
|
|
|
16580
16910
|
showFilter = _ref.showFilter,
|
|
16581
16911
|
URLParams = _ref.URLParams;
|
|
16582
16912
|
|
|
16583
|
-
_this.setValue(component, JSON.parse(value), label, showFilter, URLParams);
|
|
16913
|
+
_this.setValue(component, JSON.parse(value), label, showFilter, URLParams, undefined, undefined, undefined, 'URL');
|
|
16584
16914
|
} catch (e) {
|
|
16585
16915
|
// Do not set value if JSON parsing fails.
|
|
16586
16916
|
console.error(e);
|
|
@@ -16598,39 +16928,45 @@
|
|
|
16598
16928
|
selectedValues: function selectedValues(newVal, oldVal) {
|
|
16599
16929
|
var _this2 = this;
|
|
16600
16930
|
|
|
16601
|
-
this.currentSelectedState = newVal;
|
|
16602
|
-
|
|
16603
16931
|
if (!isEqual$3(newVal, oldVal)) {
|
|
16604
16932
|
this.searchString = this.$props.getSearchParams ? this.$props.getSearchParams() : window.location.search;
|
|
16605
16933
|
this.params = new URLSearchParams(this.searchString);
|
|
16606
16934
|
var currentComponents = Object.keys(newVal);
|
|
16607
16935
|
var urlComponents = Array.from(this.params.keys());
|
|
16936
|
+
var shouldPushHistory = false;
|
|
16608
16937
|
currentComponents.filter(function (component) {
|
|
16609
16938
|
return newVal[component].URLParams;
|
|
16610
16939
|
}).forEach(function (component) {
|
|
16611
|
-
// prevents empty history pollution on initial load
|
|
16612
|
-
if (_this2.hasValidValue(newVal[component]) || _this2.hasValidValue(oldVal[component])) {
|
|
16613
|
-
var selectedValues = newVal[component];
|
|
16940
|
+
var selectedValues = newVal[component]; // prevents empty history pollution on initial load
|
|
16614
16941
|
|
|
16942
|
+
if (_this2.hasValidValue(newVal[component]) || _this2.hasValidValue(oldVal[component])) {
|
|
16615
16943
|
if (selectedValues.URLParams) {
|
|
16616
16944
|
if (selectedValues.category) {
|
|
16617
|
-
_this2.setURL(component, _this2.getValue({
|
|
16945
|
+
var shouldUpdateHistory = _this2.setURL(component, _this2.getValue({
|
|
16618
16946
|
category: selectedValues.category,
|
|
16619
16947
|
value: selectedValues.value
|
|
16620
16948
|
}));
|
|
16949
|
+
|
|
16950
|
+
if (shouldUpdateHistory) {
|
|
16951
|
+
shouldPushHistory = true;
|
|
16952
|
+
}
|
|
16621
16953
|
} else {
|
|
16622
|
-
_this2.setURL(component, _this2.getValue(selectedValues.value));
|
|
16954
|
+
var _shouldUpdateHistory = _this2.setURL(component, _this2.getValue(selectedValues.value));
|
|
16955
|
+
|
|
16956
|
+
if (_shouldUpdateHistory) {
|
|
16957
|
+
shouldPushHistory = true;
|
|
16958
|
+
}
|
|
16623
16959
|
}
|
|
16624
16960
|
} else {
|
|
16625
16961
|
_this2.params["delete"](component);
|
|
16626
16962
|
|
|
16627
|
-
|
|
16963
|
+
shouldPushHistory = true;
|
|
16628
16964
|
}
|
|
16629
16965
|
} else if (!_this2.hasValidValue(newVal[component]) && urlComponents.includes(component)) {
|
|
16630
16966
|
// doesn't have a valid value, but the url has a (stale) valid value set
|
|
16631
16967
|
_this2.params["delete"](component);
|
|
16632
16968
|
|
|
16633
|
-
|
|
16969
|
+
shouldPushHistory = true;
|
|
16634
16970
|
}
|
|
16635
16971
|
}); // remove unmounted components
|
|
16636
16972
|
|
|
@@ -16639,15 +16975,20 @@
|
|
|
16639
16975
|
}).forEach(function (component) {
|
|
16640
16976
|
_this2.params["delete"](component);
|
|
16641
16977
|
|
|
16642
|
-
|
|
16978
|
+
shouldPushHistory = true;
|
|
16643
16979
|
});
|
|
16644
16980
|
|
|
16645
16981
|
if (!currentComponents.length) {
|
|
16646
16982
|
Array.from(this.params.keys()).forEach(function (item) {
|
|
16647
16983
|
if (_this2.searchComponents && _this2.searchComponents.includes(item)) {
|
|
16648
16984
|
_this2.params["delete"](item);
|
|
16985
|
+
|
|
16986
|
+
shouldPushHistory = true;
|
|
16649
16987
|
}
|
|
16650
16988
|
});
|
|
16989
|
+
}
|
|
16990
|
+
|
|
16991
|
+
if (shouldPushHistory) {
|
|
16651
16992
|
this.pushToHistory();
|
|
16652
16993
|
}
|
|
16653
16994
|
}
|
|
@@ -16710,20 +17051,19 @@
|
|
|
16710
17051
|
return value;
|
|
16711
17052
|
},
|
|
16712
17053
|
setURL: function setURL(component, value) {
|
|
16713
|
-
this.searchString = this.$props.getSearchParams ? this.$props.getSearchParams() : window.location.search;
|
|
16714
|
-
this.params = new URLSearchParams(this.searchString);
|
|
16715
|
-
|
|
16716
17054
|
if (!value || typeof value === 'string' && value.trim() === '' || Array.isArray(value) && value.length === 0) {
|
|
16717
17055
|
this.params["delete"](component);
|
|
16718
|
-
|
|
16719
|
-
}
|
|
16720
|
-
var data = JSON.stringify(this.getValue(value));
|
|
17056
|
+
return true;
|
|
17057
|
+
}
|
|
16721
17058
|
|
|
16722
|
-
|
|
16723
|
-
|
|
16724
|
-
|
|
16725
|
-
|
|
17059
|
+
var data = JSON.stringify(value);
|
|
17060
|
+
|
|
17061
|
+
if (data !== this.params.get(component)) {
|
|
17062
|
+
this.params.set(component, data);
|
|
17063
|
+
return true;
|
|
16726
17064
|
}
|
|
17065
|
+
|
|
17066
|
+
return false;
|
|
16727
17067
|
},
|
|
16728
17068
|
pushToHistory: function pushToHistory() {
|
|
16729
17069
|
var paramsSting = this.params.toString() ? "?" + this.params.toString() : '';
|
|
@@ -16874,14 +17214,14 @@
|
|
|
16874
17214
|
this.updateState(this.$props);
|
|
16875
17215
|
},
|
|
16876
17216
|
analyticsConfig: function analyticsConfig(newVal, oldVal) {
|
|
16877
|
-
if (!
|
|
17217
|
+
if (!helper_28(newVal, oldVal)) {
|
|
16878
17218
|
if (this.store) {
|
|
16879
17219
|
this.store.dispatch(analytics_3$1(newVal));
|
|
16880
17220
|
}
|
|
16881
17221
|
}
|
|
16882
17222
|
},
|
|
16883
17223
|
appbaseConfig: function appbaseConfig(newVal, oldVal) {
|
|
16884
|
-
if (!
|
|
17224
|
+
if (!helper_28(newVal, oldVal)) {
|
|
16885
17225
|
if (this.store) {
|
|
16886
17226
|
this.store.dispatch(analytics_3$1(newVal));
|
|
16887
17227
|
}
|
|
@@ -19552,6 +19892,10 @@
|
|
|
19552
19892
|
}
|
|
19553
19893
|
};
|
|
19554
19894
|
|
|
19895
|
+
var _templateObject$j, _templateObject2$7;
|
|
19896
|
+
var TagsContainer = index$1('div')(_templateObject$j || (_templateObject$j = _taggedTemplateLiteralLoose(["\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\tmargin-top: 10px;\n\twidth: 100%;\n"])));
|
|
19897
|
+
var TagItem = index$1('span')(_templateObject2$7 || (_templateObject2$7 = _taggedTemplateLiteralLoose(["\n\tcursor: default;\n\tbox-sizing: border-box;\n\tmargin: 0 4px 4px 0;\n\tcolor: #000000d9;\n\tfont-size: 14px;\n\tfont-variant: tabular-nums;\n\tline-height: 1.5715;\n\tlist-style: none;\n\tfont-feature-settings: 'tnum';\n\tdisplay: inline-block;\n\theight: auto;\n\tpadding: 0 2px 0 7px;\n\tfont-size: 12px;\n\tline-height: 22px;\n\twhite-space: nowrap;\n\tbackground: #fafafa;\n\tborder: 1px solid #d9d9d9;\n\tborder-radius: 2px;\n\topacity: 1;\n\ttransition: all 0.3s;\n\n\tspan.close-icon {\n\t\tsvg {\n\t\t\tcursor: pointer;\n\t\t\theight: 15px;\n\t\t\tposition: relative;\n\t\t\ttop: 4px;\n\t\t\tfill: #262626;\n\t\t}\n\t}\n"])));
|
|
19898
|
+
|
|
19555
19899
|
var updateQuery$1 = lib_5.updateQuery,
|
|
19556
19900
|
setQueryOptions$1 = lib_5.setQueryOptions,
|
|
19557
19901
|
setCustomQuery = lib_5.setCustomQuery,
|
|
@@ -19559,7 +19903,8 @@
|
|
|
19559
19903
|
setCustomHighlightOptions = lib_5.setCustomHighlightOptions,
|
|
19560
19904
|
recordSuggestionClick = lib_5.recordSuggestionClick,
|
|
19561
19905
|
loadPopularSuggestions = lib_5.loadPopularSuggestions,
|
|
19562
|
-
getRecentSearches = lib_5.getRecentSearches
|
|
19906
|
+
getRecentSearches = lib_5.getRecentSearches,
|
|
19907
|
+
resetStoreForComponent = lib_5.resetStoreForComponent;
|
|
19563
19908
|
var debounce$1 = lib_8.debounce,
|
|
19564
19909
|
checkValueChange = lib_8.checkValueChange,
|
|
19565
19910
|
getClassName$3 = lib_8.getClassName,
|
|
@@ -19574,10 +19919,12 @@
|
|
|
19574
19919
|
normalizeDataField = lib_8.normalizeDataField;
|
|
19575
19920
|
var DataSearch = {
|
|
19576
19921
|
name: 'DataSearch',
|
|
19922
|
+
isTagsMode: false,
|
|
19577
19923
|
data: function data() {
|
|
19578
19924
|
var props = this.$props;
|
|
19579
19925
|
this.__state = {
|
|
19580
19926
|
currentValue: '',
|
|
19927
|
+
selectedTags: [],
|
|
19581
19928
|
isOpen: false,
|
|
19582
19929
|
normalizedSuggestions: [],
|
|
19583
19930
|
isPending: false
|
|
@@ -19597,7 +19944,13 @@
|
|
|
19597
19944
|
enableRecentSearches = _this$$props.enableRecentSearches,
|
|
19598
19945
|
distinctField = _this$$props.distinctField,
|
|
19599
19946
|
distinctFieldConfig = _this$$props.distinctFieldConfig,
|
|
19600
|
-
index = _this$$props.index
|
|
19947
|
+
index = _this$$props.index,
|
|
19948
|
+
mode = _this$$props.mode;
|
|
19949
|
+
|
|
19950
|
+
if (mode === constants_5$1.TAG) {
|
|
19951
|
+
this.$options.isTagsMode = true;
|
|
19952
|
+
} // TODO: Remove in 2.0
|
|
19953
|
+
|
|
19601
19954
|
|
|
19602
19955
|
if (enableQuerySuggestions) {
|
|
19603
19956
|
console.warn('Warning(ReactiveSearch): The `enableQuerySuggestions` prop has been marked as deprecated, please use the `enablePopularSuggestions` prop instead.');
|
|
@@ -19620,7 +19973,12 @@
|
|
|
19620
19973
|
console.warn('Warning(ReactiveSearch): In order to use the `index` prop, the `enableAppbase` prop must be set to true in `ReactiveBase`.');
|
|
19621
19974
|
}
|
|
19622
19975
|
|
|
19623
|
-
this.currentValue =
|
|
19976
|
+
this.currentValue = '';
|
|
19977
|
+
|
|
19978
|
+
if (this.$options.isTagsMode) {
|
|
19979
|
+
this.currentValue = '';
|
|
19980
|
+
}
|
|
19981
|
+
|
|
19624
19982
|
var shouldFetchInitialSuggestions = this.$props.enableDefaultSuggestions || this.currentValue;
|
|
19625
19983
|
|
|
19626
19984
|
if (shouldFetchInitialSuggestions) {
|
|
@@ -19714,7 +20072,7 @@
|
|
|
19714
20072
|
debounce: VueTypes.number.def(0),
|
|
19715
20073
|
defaultValue: types.string,
|
|
19716
20074
|
excludeFields: types.excludeFields,
|
|
19717
|
-
value: types.value,
|
|
20075
|
+
value: VueTypes.oneOfType([VueTypes.arrayOf(VueTypes.string), types.value]),
|
|
19718
20076
|
defaultSuggestions: types.suggestions,
|
|
19719
20077
|
enableSynonyms: VueTypes.bool.def(true),
|
|
19720
20078
|
enableQuerySuggestions: VueTypes.bool.def(false),
|
|
@@ -19763,7 +20121,9 @@
|
|
|
19763
20121
|
addonAfter: VueTypes.any,
|
|
19764
20122
|
expandSuggestionsContainer: VueTypes.bool.def(true),
|
|
19765
20123
|
index: VueTypes.string,
|
|
19766
|
-
enableDefaultSuggestions: VueTypes.bool.def(true)
|
|
20124
|
+
enableDefaultSuggestions: VueTypes.bool.def(true),
|
|
20125
|
+
mode: VueTypes.oneOf(['select', 'tag']).def('select'),
|
|
20126
|
+
renderSelectedTags: VueTypes.any
|
|
19767
20127
|
},
|
|
19768
20128
|
beforeMount: function beforeMount() {
|
|
19769
20129
|
if (this.$props.highlight) {
|
|
@@ -19780,11 +20140,11 @@
|
|
|
19780
20140
|
}
|
|
19781
20141
|
|
|
19782
20142
|
if (this.selectedValue) {
|
|
19783
|
-
this.setValue(this.selectedValue, true);
|
|
20143
|
+
this.setValue(this.selectedValue, true, this.$props, this.$options.isTagsMode ? lib_7.SUGGESTION_SELECT : undefined);
|
|
19784
20144
|
} else if (this.$props.value) {
|
|
19785
|
-
this.setValue(this.$props.value, true);
|
|
20145
|
+
this.setValue(this.$props.value, true, this.$props, this.$options.isTagsMode ? lib_7.SUGGESTION_SELECT : undefined);
|
|
19786
20146
|
} else if (this.$props.defaultValue) {
|
|
19787
|
-
this.setValue(this.$props.defaultValue, true);
|
|
20147
|
+
this.setValue(this.$props.defaultValue, true, this.$props, this.$options.isTagsMode ? lib_7.SUGGESTION_SELECT : undefined);
|
|
19788
20148
|
}
|
|
19789
20149
|
},
|
|
19790
20150
|
mounted: function mounted() {
|
|
@@ -19796,19 +20156,19 @@
|
|
|
19796
20156
|
},
|
|
19797
20157
|
dataField: function dataField() {
|
|
19798
20158
|
this.updateQueryOptions();
|
|
19799
|
-
this.updateQueryHandler(this.$props.componentId, this.$data.currentValue, this.$props);
|
|
20159
|
+
this.updateQueryHandler(this.$props.componentId, this.$options.isTagsMode ? this.$data.selectedTags : this.$data.currentValue, this.$props);
|
|
19800
20160
|
},
|
|
19801
20161
|
highlightField: function highlightField() {
|
|
19802
20162
|
this.updateQueryOptions();
|
|
19803
20163
|
},
|
|
19804
20164
|
fieldWeights: function fieldWeights() {
|
|
19805
|
-
this.updateQueryHandler(this.$props.componentId, this.$data.currentValue, this.$props);
|
|
20165
|
+
this.updateQueryHandler(this.$props.componentId, this.$options.isTagsMode ? this.$data.selectedTags : this.$data.currentValue, this.$props);
|
|
19806
20166
|
},
|
|
19807
20167
|
fuzziness: function fuzziness() {
|
|
19808
|
-
this.updateQueryHandler(this.$props.componentId, this.$data.currentValue, this.$props);
|
|
20168
|
+
this.updateQueryHandler(this.$props.componentId, this.$options.isTagsMode ? this.$data.selectedTags : this.$data.currentValue, this.$props);
|
|
19809
20169
|
},
|
|
19810
20170
|
queryFormat: function queryFormat() {
|
|
19811
|
-
this.updateQueryHandler(this.$props.componentId, this.$data.currentValue, this.$props);
|
|
20171
|
+
this.updateQueryHandler(this.$props.componentId, this.$options.isTagsMode ? this.$data.selectedTags : this.$data.currentValue, this.$props);
|
|
19812
20172
|
},
|
|
19813
20173
|
defaultValue: function defaultValue(newVal) {
|
|
19814
20174
|
this.setValue(newVal, true, this.$props);
|
|
@@ -19837,13 +20197,18 @@
|
|
|
19837
20197
|
}
|
|
19838
20198
|
},
|
|
19839
20199
|
selectedValue: function selectedValue(newVal, oldVal) {
|
|
19840
|
-
if (oldVal
|
|
20200
|
+
if (!isEqual$4(newVal, oldVal) && (this.$options.isTagsMode ? !isEqual$4(this.$data.selectedTags, newVal) : this.$data.currentValue !== newVal)) {
|
|
19841
20201
|
if (!newVal && this.$data.currentValue) {
|
|
19842
20202
|
// selected value is cleared, call onValueSelected
|
|
19843
20203
|
this.onValueSelectedHandler('', lib_7.CLEAR_VALUE);
|
|
19844
20204
|
}
|
|
19845
20205
|
|
|
19846
|
-
|
|
20206
|
+
if (this.$options.isTagsMode) {
|
|
20207
|
+
// handling reset of tags through SelectedFilters or URL
|
|
20208
|
+
this.selectedTags = [];
|
|
20209
|
+
}
|
|
20210
|
+
|
|
20211
|
+
this.setValue(newVal || '', true, this.$props, this.$options.isTagsMode ? lib_7.SUGGESTION_SELECT : undefined);
|
|
19847
20212
|
}
|
|
19848
20213
|
},
|
|
19849
20214
|
focusShortcuts: function focusShortcuts() {
|
|
@@ -19931,7 +20296,7 @@
|
|
|
19931
20296
|
// returns size and aggs property
|
|
19932
20297
|
getBasicQueryOptions: function getBasicQueryOptions() {
|
|
19933
20298
|
var aggregationField = this.$props.aggregationField;
|
|
19934
|
-
var queryOptions =
|
|
20299
|
+
var queryOptions = helper_31(this.$props);
|
|
19935
20300
|
|
|
19936
20301
|
if (aggregationField) {
|
|
19937
20302
|
queryOptions.aggs = getCompositeAggsQuery$1({
|
|
@@ -19970,12 +20335,47 @@
|
|
|
19970
20335
|
}
|
|
19971
20336
|
|
|
19972
20337
|
var performUpdate = function performUpdate() {
|
|
19973
|
-
|
|
19974
|
-
|
|
20338
|
+
if (_this.$options.isTagsMode && isEqual$4(value, _this.selectedTags)) {
|
|
20339
|
+
return;
|
|
20340
|
+
} // Refresh recent searches when value becomes empty
|
|
20341
|
+
|
|
20342
|
+
|
|
20343
|
+
if (!value && props.enableDefaultSuggestions === false) {
|
|
20344
|
+
_this.resetStoreForComponent(props.componentId);
|
|
20345
|
+
} else if (!value && _this.currentValue && _this.enableRecentSearches) {
|
|
19975
20346
|
_this.getRecentSearches();
|
|
19976
20347
|
}
|
|
19977
20348
|
|
|
19978
|
-
_this.
|
|
20349
|
+
if (_this.$options.isTagsMode && cause === lib_7.SUGGESTION_SELECT) {
|
|
20350
|
+
if (Array.isArray(_this.selectedTags) && _this.selectedTags.length) {
|
|
20351
|
+
// check if value already present in selectedTags
|
|
20352
|
+
if (typeof value === 'string' && _this.selectedTags.includes(value)) {
|
|
20353
|
+
_this.isOpen = false;
|
|
20354
|
+
return;
|
|
20355
|
+
}
|
|
20356
|
+
|
|
20357
|
+
_this.selectedTags = [].concat(_this.selectedTags);
|
|
20358
|
+
|
|
20359
|
+
if (typeof value === 'string' && !!value) {
|
|
20360
|
+
_this.selectedTags.push(value);
|
|
20361
|
+
} else if (Array.isArray(value) && !isEqual$4(_this.selectedTags, value)) {
|
|
20362
|
+
var mergedArray = Array.from(new Set([].concat(_this.selectedTags, value)));
|
|
20363
|
+
_this.selectedTags = mergedArray;
|
|
20364
|
+
}
|
|
20365
|
+
} else if (value) {
|
|
20366
|
+
_this.selectedTags = typeof value !== 'string' ? value : [].concat(value);
|
|
20367
|
+
}
|
|
20368
|
+
|
|
20369
|
+
_this.currentValue = '';
|
|
20370
|
+
} else {
|
|
20371
|
+
_this.currentValue = value;
|
|
20372
|
+
}
|
|
20373
|
+
|
|
20374
|
+
var queryHandlerValue = value;
|
|
20375
|
+
|
|
20376
|
+
if (_this.$options.isTagsMode && cause === lib_7.SUGGESTION_SELECT) {
|
|
20377
|
+
queryHandlerValue = Array.isArray(_this.selectedTags) && _this.selectedTags.length ? _this.selectedTags : undefined;
|
|
20378
|
+
}
|
|
19979
20379
|
|
|
19980
20380
|
if (isDefaultValue) {
|
|
19981
20381
|
if (_this.$props.autosuggest) {
|
|
@@ -19983,19 +20383,19 @@
|
|
|
19983
20383
|
_this.isOpen = false;
|
|
19984
20384
|
}
|
|
19985
20385
|
|
|
19986
|
-
_this.updateDefaultQueryHandler(value, _this.$props);
|
|
20386
|
+
if (typeof value === 'string') _this.updateDefaultQueryHandler(value, _this.$props);
|
|
19987
20387
|
} // in case of strict selection only SUGGESTION_SELECT should be able
|
|
19988
20388
|
// to set the query otherwise the value should reset
|
|
19989
20389
|
|
|
19990
20390
|
|
|
19991
20391
|
if (props.strictSelection) {
|
|
19992
|
-
if (cause === lib_7.SUGGESTION_SELECT || value === '') {
|
|
19993
|
-
_this.updateQueryHandler(props.componentId,
|
|
20392
|
+
if (cause === lib_7.SUGGESTION_SELECT || (_this.$options.isTagsMode ? _this.selectedTags.length === 0 : value === '')) {
|
|
20393
|
+
_this.updateQueryHandler(props.componentId, queryHandlerValue, props);
|
|
19994
20394
|
} else {
|
|
19995
20395
|
_this.setValue('', true);
|
|
19996
20396
|
}
|
|
19997
20397
|
} else {
|
|
19998
|
-
_this.updateQueryHandler(props.componentId,
|
|
20398
|
+
_this.updateQueryHandler(props.componentId, queryHandlerValue, props);
|
|
19999
20399
|
}
|
|
20000
20400
|
} else {
|
|
20001
20401
|
// debounce for handling text while typing
|
|
@@ -20022,6 +20422,12 @@
|
|
|
20022
20422
|
checkValueChange(props.componentId, value, props.beforeValueChange, performUpdate);
|
|
20023
20423
|
},
|
|
20024
20424
|
updateDefaultQueryHandler: function updateDefaultQueryHandler(value, props) {
|
|
20425
|
+
if (!value && props.enableDefaultSuggestions === false) {
|
|
20426
|
+
// clear Component data from store
|
|
20427
|
+
this.resetStoreForComponent(props.componentId);
|
|
20428
|
+
return;
|
|
20429
|
+
}
|
|
20430
|
+
|
|
20025
20431
|
var defaultQueryOptions;
|
|
20026
20432
|
var query = DataSearch.defaultQuery(value, props);
|
|
20027
20433
|
|
|
@@ -20135,7 +20541,8 @@
|
|
|
20135
20541
|
|
|
20136
20542
|
|
|
20137
20543
|
if (event.key === 'Enter' && highlightedIndex === null) {
|
|
20138
|
-
this.setValue(event.target.value, true
|
|
20544
|
+
this.setValue(event.target.value, true, this.$props, this.$options.isTagsMode ? lib_7.SUGGESTION_SELECT : undefined // to handle tags
|
|
20545
|
+
);
|
|
20139
20546
|
this.onValueSelectedHandler(event.target.value, lib_7.ENTER_PRESS);
|
|
20140
20547
|
} // Need to review
|
|
20141
20548
|
|
|
@@ -20166,11 +20573,23 @@
|
|
|
20166
20573
|
|
|
20167
20574
|
if (value === undefined) {
|
|
20168
20575
|
this.setValue(suggestion.value, true, this.$props, lib_7.SUGGESTION_SELECT);
|
|
20576
|
+
} else if (this.$options.isTagsMode) {
|
|
20577
|
+
var emitValue = Array.isArray(this.selectedTags) ? [].concat(this.selectedTags) : [];
|
|
20578
|
+
|
|
20579
|
+
if (this.selectedTags.includes(suggestion.value)) {
|
|
20580
|
+
// avoid duplicates in tags array
|
|
20581
|
+
this.isOpen = false;
|
|
20582
|
+
return;
|
|
20583
|
+
}
|
|
20584
|
+
|
|
20585
|
+
emitValue.push(suggestion.value);
|
|
20586
|
+
this.setValue(emitValue, true, this.$props, lib_7.SUGGESTION_SELECT, true);
|
|
20587
|
+
this.$emit('change', emitValue, this.triggerQuery);
|
|
20169
20588
|
} else {
|
|
20170
|
-
this.isPending = false;
|
|
20171
20589
|
this.$emit('change', suggestion.value, this.triggerQuery);
|
|
20172
20590
|
}
|
|
20173
20591
|
|
|
20592
|
+
this.isPending = false;
|
|
20174
20593
|
this.onValueSelectedHandler(suggestion.value, lib_7.SUGGESTION_SELECT, suggestion.source);
|
|
20175
20594
|
},
|
|
20176
20595
|
onValueSelectedHandler: function onValueSelectedHandler(currentValue) {
|
|
@@ -20276,6 +20695,75 @@
|
|
|
20276
20695
|
|
|
20277
20696
|
return null;
|
|
20278
20697
|
},
|
|
20698
|
+
renderTag: function renderTag(item) {
|
|
20699
|
+
var _this2 = this;
|
|
20700
|
+
|
|
20701
|
+
var h = this.$createElement;
|
|
20702
|
+
var innerClass = this.$props.innerClass;
|
|
20703
|
+
return h(TagItem, {
|
|
20704
|
+
"class": getClassName$3(innerClass, 'selected-tag') || ''
|
|
20705
|
+
}, [h("span", [item]), h("span", {
|
|
20706
|
+
"attrs": {
|
|
20707
|
+
"role": "img",
|
|
20708
|
+
"aria-label": "delete-tag"
|
|
20709
|
+
},
|
|
20710
|
+
"class": "close-icon",
|
|
20711
|
+
"on": {
|
|
20712
|
+
"click": function click() {
|
|
20713
|
+
return _this2.clearTag(item);
|
|
20714
|
+
}
|
|
20715
|
+
}
|
|
20716
|
+
}, [h(CancelSvg)])]);
|
|
20717
|
+
},
|
|
20718
|
+
clearAllTags: function clearAllTags() {
|
|
20719
|
+
this.selectedTags = [];
|
|
20720
|
+
this.setValue('', true, this.$props, lib_7.SUGGESTION_SELECT);
|
|
20721
|
+
|
|
20722
|
+
if (this.$props.value !== undefined) {
|
|
20723
|
+
this.$emit('change', this.selectedTags, this.triggerQuery);
|
|
20724
|
+
}
|
|
20725
|
+
},
|
|
20726
|
+
clearTag: function clearTag(tagValue) {
|
|
20727
|
+
this.selectedTags = [].concat(this.selectedTags.filter(function (tag) {
|
|
20728
|
+
return tag !== tagValue;
|
|
20729
|
+
}));
|
|
20730
|
+
this.setValue('', true, this.$props, lib_7.SUGGESTION_SELECT);
|
|
20731
|
+
|
|
20732
|
+
if (this.$props.value !== undefined) {
|
|
20733
|
+
this.$emit('change', this.selectedTags, this.triggerQuery);
|
|
20734
|
+
}
|
|
20735
|
+
},
|
|
20736
|
+
renderTags: function renderTags() {
|
|
20737
|
+
var _this3 = this;
|
|
20738
|
+
|
|
20739
|
+
var h = this.$createElement;
|
|
20740
|
+
|
|
20741
|
+
if (!Array.isArray(this.selectedTags)) {
|
|
20742
|
+
return null;
|
|
20743
|
+
}
|
|
20744
|
+
|
|
20745
|
+
var tagsList = [].concat(this.selectedTags);
|
|
20746
|
+
var shouldRenderClearAllTag = tagsList.length > 1;
|
|
20747
|
+
var renderSelectedTags = this.$scopedSlots.renderSelectedTags || this.$props.renderSelectedTags;
|
|
20748
|
+
return renderSelectedTags ? renderSelectedTags({
|
|
20749
|
+
values: this.selectedTags,
|
|
20750
|
+
handleClear: this.clearTag,
|
|
20751
|
+
handleClearAll: this.clearAllTags
|
|
20752
|
+
}) : h(TagsContainer, [tagsList.map(function (item) {
|
|
20753
|
+
return _this3.renderTag(item);
|
|
20754
|
+
}), shouldRenderClearAllTag && h(TagItem, {
|
|
20755
|
+
"class": getClassName$3(this.$props.innerClass, 'selected-tag') || ''
|
|
20756
|
+
}, [h("span", ["Clear All"]), h("span", {
|
|
20757
|
+
"attrs": {
|
|
20758
|
+
"role": "img",
|
|
20759
|
+
"aria-label": "delete-tag"
|
|
20760
|
+
},
|
|
20761
|
+
"class": "close-icon",
|
|
20762
|
+
"on": {
|
|
20763
|
+
"click": this.clearAllTags
|
|
20764
|
+
}
|
|
20765
|
+
}, [h(CancelSvg)])])]);
|
|
20766
|
+
},
|
|
20279
20767
|
renderInputAddonAfter: function renderInputAddonAfter() {
|
|
20280
20768
|
var h = this.$createElement;
|
|
20281
20769
|
var addonAfter = this.$scopedSlots.addonAfter;
|
|
@@ -20346,7 +20834,7 @@
|
|
|
20346
20834
|
(_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
|
|
20347
20835
|
},
|
|
20348
20836
|
listenForFocusShortcuts: function listenForFocusShortcuts() {
|
|
20349
|
-
var
|
|
20837
|
+
var _this4 = this;
|
|
20350
20838
|
|
|
20351
20839
|
var _this$$props$focusSho = this.$props.focusShortcuts,
|
|
20352
20840
|
focusShortcuts = _this$$props$focusSho === void 0 ? ['/'] : _this$$props$focusSho;
|
|
@@ -20364,7 +20852,7 @@
|
|
|
20364
20852
|
// Prevent the default refresh event under WINDOWS system
|
|
20365
20853
|
event.preventDefault();
|
|
20366
20854
|
|
|
20367
|
-
|
|
20855
|
+
_this4.focusSearchBox(event);
|
|
20368
20856
|
}); // if one of modifier keys are used, they are handled below
|
|
20369
20857
|
|
|
20370
20858
|
hotkeys('*', function (event) {
|
|
@@ -20375,7 +20863,7 @@
|
|
|
20375
20863
|
var element = modifierKeys[index];
|
|
20376
20864
|
|
|
20377
20865
|
if (hotkeys[element]) {
|
|
20378
|
-
|
|
20866
|
+
_this4.focusSearchBox(event);
|
|
20379
20867
|
|
|
20380
20868
|
break;
|
|
20381
20869
|
}
|
|
@@ -20384,7 +20872,7 @@
|
|
|
20384
20872
|
}
|
|
20385
20873
|
},
|
|
20386
20874
|
render: function render() {
|
|
20387
|
-
var
|
|
20875
|
+
var _this5 = this;
|
|
20388
20876
|
|
|
20389
20877
|
var h = arguments[0];
|
|
20390
20878
|
var _this$$props4 = this.$props,
|
|
@@ -20423,14 +20911,14 @@
|
|
|
20423
20911
|
setHighlightedIndex = _ref3.setHighlightedIndex;
|
|
20424
20912
|
|
|
20425
20913
|
var renderSuggestionsContainer = function renderSuggestionsContainer() {
|
|
20426
|
-
return h("div", [
|
|
20914
|
+
return h("div", [_this5.hasCustomRenderer && _this5.getComponent({
|
|
20427
20915
|
isOpen: isOpen,
|
|
20428
20916
|
getItemProps: getItemProps,
|
|
20429
20917
|
getItemEvents: getItemEvents,
|
|
20430
20918
|
highlightedIndex: highlightedIndex
|
|
20431
|
-
}),
|
|
20432
|
-
"class": suggestions$1(
|
|
20433
|
-
}, [
|
|
20919
|
+
}), _this5.renderErrorComponent(), !_this5.hasCustomRenderer && isOpen && hasSuggestions ? h("ul", {
|
|
20920
|
+
"class": suggestions$1(_this5.themePreset, theme) + " " + getClassName$3(_this5.$props.innerClass, 'list')
|
|
20921
|
+
}, [_this5.suggestionsList.slice(0, size || 10).map(function (item, index) {
|
|
20434
20922
|
return h("li", {
|
|
20435
20923
|
"domProps": _extends({}, getItemProps({
|
|
20436
20924
|
item: item
|
|
@@ -20440,15 +20928,15 @@
|
|
|
20440
20928
|
})),
|
|
20441
20929
|
"key": index + 1 + "-" + item.value,
|
|
20442
20930
|
"style": {
|
|
20443
|
-
backgroundColor:
|
|
20931
|
+
backgroundColor: _this5.getBackgroundColor(highlightedIndex, index)
|
|
20444
20932
|
}
|
|
20445
20933
|
}, [h(SuggestionItem, {
|
|
20446
20934
|
"attrs": {
|
|
20447
|
-
"currentValue":
|
|
20935
|
+
"currentValue": _this5.currentValue,
|
|
20448
20936
|
"suggestion": item
|
|
20449
20937
|
}
|
|
20450
20938
|
})]);
|
|
20451
|
-
}),
|
|
20939
|
+
}), _this5.defaultSearchSuggestions.map(function (sugg, index) {
|
|
20452
20940
|
return h("li", {
|
|
20453
20941
|
"domProps": _extends({}, getItemProps({
|
|
20454
20942
|
item: sugg
|
|
@@ -20456,9 +20944,9 @@
|
|
|
20456
20944
|
"on": _extends({}, getItemEvents({
|
|
20457
20945
|
item: sugg
|
|
20458
20946
|
})),
|
|
20459
|
-
"key":
|
|
20947
|
+
"key": _this5.suggestionsList.length + index + 1 + "-" + sugg.value,
|
|
20460
20948
|
"style": {
|
|
20461
|
-
backgroundColor:
|
|
20949
|
+
backgroundColor: _this5.getBackgroundColor(highlightedIndex, _this5.suggestionsList.length + index),
|
|
20462
20950
|
justifyContent: 'flex-start'
|
|
20463
20951
|
}
|
|
20464
20952
|
}, [h("div", {
|
|
@@ -20467,28 +20955,28 @@
|
|
|
20467
20955
|
}
|
|
20468
20956
|
}, [sugg.source && sugg.source._recent_search && h(CustomSvg, {
|
|
20469
20957
|
"attrs": {
|
|
20470
|
-
"className": getClassName$3(
|
|
20958
|
+
"className": getClassName$3(_this5.$props.innerClass, 'recent-search-icon') || null,
|
|
20471
20959
|
"icon": recentSearchesIcon,
|
|
20472
20960
|
"type": "recent-search-icon"
|
|
20473
20961
|
}
|
|
20474
20962
|
}), sugg.source && sugg.source._popular_suggestion && h(CustomSvg, {
|
|
20475
20963
|
"attrs": {
|
|
20476
|
-
"className": getClassName$3(
|
|
20964
|
+
"className": getClassName$3(_this5.$props.innerClass, 'popular-search-icon') || null,
|
|
20477
20965
|
"icon": popularSearchesIcon,
|
|
20478
20966
|
"type": "popular-search-icon"
|
|
20479
20967
|
}
|
|
20480
20968
|
})]), h(SuggestionItem, {
|
|
20481
20969
|
"attrs": {
|
|
20482
|
-
"currentValue":
|
|
20970
|
+
"currentValue": _this5.currentValue,
|
|
20483
20971
|
"suggestion": sugg
|
|
20484
20972
|
}
|
|
20485
20973
|
})]);
|
|
20486
|
-
}), hasQuerySuggestionsRenderer(
|
|
20974
|
+
}), hasQuerySuggestionsRenderer(_this5) ? _this5.getComponent({
|
|
20487
20975
|
isOpen: isOpen,
|
|
20488
20976
|
getItemProps: getItemProps,
|
|
20489
20977
|
getItemEvents: getItemEvents,
|
|
20490
20978
|
highlightedIndex: highlightedIndex
|
|
20491
|
-
}, true) :
|
|
20979
|
+
}, true) : _this5.topSuggestions.map(function (sugg, index) {
|
|
20492
20980
|
return h("li", {
|
|
20493
20981
|
"domProps": _extends({}, getItemProps({
|
|
20494
20982
|
item: sugg
|
|
@@ -20496,9 +20984,9 @@
|
|
|
20496
20984
|
"on": _extends({}, getItemEvents({
|
|
20497
20985
|
item: sugg
|
|
20498
20986
|
})),
|
|
20499
|
-
"key":
|
|
20987
|
+
"key": _this5.suggestionsList.length + index + 1 + "-" + sugg.value,
|
|
20500
20988
|
"style": {
|
|
20501
|
-
backgroundColor:
|
|
20989
|
+
backgroundColor: _this5.getBackgroundColor(highlightedIndex, _this5.suggestionsList.length + index),
|
|
20502
20990
|
justifyContent: 'flex-start'
|
|
20503
20991
|
}
|
|
20504
20992
|
}, [h("div", {
|
|
@@ -20507,61 +20995,61 @@
|
|
|
20507
20995
|
}
|
|
20508
20996
|
}, [h(CustomSvg, {
|
|
20509
20997
|
"attrs": {
|
|
20510
|
-
"className": getClassName$3(
|
|
20998
|
+
"className": getClassName$3(_this5.$props.innerClass, 'popular-search-icon') || null,
|
|
20511
20999
|
"icon": popularSearchesIcon,
|
|
20512
21000
|
"type": "popular-search-icon"
|
|
20513
21001
|
}
|
|
20514
21002
|
})]), h(SuggestionItem, {
|
|
20515
21003
|
"attrs": {
|
|
20516
|
-
"currentValue":
|
|
21004
|
+
"currentValue": _this5.currentValue,
|
|
20517
21005
|
"suggestion": sugg
|
|
20518
21006
|
}
|
|
20519
21007
|
})]);
|
|
20520
|
-
})]) :
|
|
21008
|
+
})]) : _this5.renderNoSuggestions(_this5.suggestionsList)]);
|
|
20521
21009
|
};
|
|
20522
21010
|
|
|
20523
21011
|
return h("div", {
|
|
20524
21012
|
"class": suggestionsContainer
|
|
20525
|
-
}, [h(InputGroup, [
|
|
21013
|
+
}, [h(InputGroup, [_this5.renderInputAddonBefore(), h(InputWrapper, [h(Input, {
|
|
20526
21014
|
"attrs": {
|
|
20527
|
-
"id":
|
|
20528
|
-
"showIcon":
|
|
20529
|
-
"showClear":
|
|
20530
|
-
"iconPosition":
|
|
20531
|
-
"placeholder":
|
|
20532
|
-
"autoFocus":
|
|
20533
|
-
"themePreset":
|
|
21015
|
+
"id": _this5.$props.componentId + "-input",
|
|
21016
|
+
"showIcon": _this5.$props.showIcon,
|
|
21017
|
+
"showClear": _this5.$props.showClear,
|
|
21018
|
+
"iconPosition": _this5.$props.iconPosition,
|
|
21019
|
+
"placeholder": _this5.$props.placeholder,
|
|
21020
|
+
"autoFocus": _this5.$props.autoFocus,
|
|
21021
|
+
"themePreset": _this5.themePreset,
|
|
20534
21022
|
"autocomplete": "off"
|
|
20535
21023
|
},
|
|
20536
|
-
"ref":
|
|
20537
|
-
"class": getClassName$3(
|
|
21024
|
+
"ref": _this5.$props.innerRef,
|
|
21025
|
+
"class": getClassName$3(_this5.$props.innerClass, 'input'),
|
|
20538
21026
|
"on": _extends({}, getInputEvents({
|
|
20539
|
-
onInput:
|
|
21027
|
+
onInput: _this5.onInputChange,
|
|
20540
21028
|
onBlur: function onBlur(e) {
|
|
20541
|
-
|
|
21029
|
+
_this5.$emit('blur', e, _this5.triggerQuery);
|
|
20542
21030
|
},
|
|
20543
|
-
onFocus:
|
|
21031
|
+
onFocus: _this5.handleFocus,
|
|
20544
21032
|
onKeyPress: function onKeyPress(e) {
|
|
20545
|
-
|
|
21033
|
+
_this5.$emit('keyPress', e, _this5.triggerQuery);
|
|
20546
21034
|
|
|
20547
|
-
|
|
21035
|
+
_this5.$emit('key-press', e, _this5.triggerQuery);
|
|
20548
21036
|
},
|
|
20549
21037
|
onKeyDown: function onKeyDown(e) {
|
|
20550
|
-
return
|
|
21038
|
+
return _this5.handleKeyDown(e, highlightedIndex);
|
|
20551
21039
|
},
|
|
20552
21040
|
onKeyUp: function onKeyUp(e) {
|
|
20553
|
-
|
|
21041
|
+
_this5.$emit('keyUp', e, _this5.triggerQuery);
|
|
20554
21042
|
|
|
20555
|
-
|
|
21043
|
+
_this5.$emit('key-up', e, _this5.triggerQuery);
|
|
20556
21044
|
},
|
|
20557
21045
|
onClick: function onClick() {
|
|
20558
21046
|
setHighlightedIndex(null);
|
|
20559
21047
|
}
|
|
20560
21048
|
})),
|
|
20561
21049
|
"domProps": _extends({}, getInputProps({
|
|
20562
|
-
value:
|
|
21050
|
+
value: _this5.$data.currentValue === null ? '' : _this5.$data.currentValue
|
|
20563
21051
|
}))
|
|
20564
|
-
}),
|
|
21052
|
+
}), _this5.renderIcons(), !expandSuggestionsContainer && renderSuggestionsContainer()]), ' ', _this5.renderInputAddonAfter()]), expandSuggestionsContainer && renderSuggestionsContainer(), _this5.renderTags()]);
|
|
20565
21053
|
}
|
|
20566
21054
|
}
|
|
20567
21055
|
}) : h("div", {
|
|
@@ -20577,26 +21065,26 @@
|
|
|
20577
21065
|
},
|
|
20578
21066
|
"on": _extends({}, {
|
|
20579
21067
|
blur: function blur(e) {
|
|
20580
|
-
|
|
21068
|
+
_this5.$emit('blur', e, _this5.triggerQuery);
|
|
20581
21069
|
},
|
|
20582
21070
|
keypress: function keypress(e) {
|
|
20583
|
-
|
|
21071
|
+
_this5.$emit('keyPress', e, _this5.triggerQuery);
|
|
20584
21072
|
|
|
20585
|
-
|
|
21073
|
+
_this5.$emit('key-press', e, _this5.triggerQuery);
|
|
20586
21074
|
},
|
|
20587
21075
|
input: this.onInputChange,
|
|
20588
21076
|
focus: function focus(e) {
|
|
20589
|
-
|
|
21077
|
+
_this5.$emit('focus', e, _this5.triggerQuery);
|
|
20590
21078
|
},
|
|
20591
21079
|
keydown: function keydown(e) {
|
|
20592
|
-
|
|
21080
|
+
_this5.$emit('keyDown', e, _this5.triggerQuery);
|
|
20593
21081
|
|
|
20594
|
-
|
|
21082
|
+
_this5.$emit('key-down', e, _this5.triggerQuery);
|
|
20595
21083
|
},
|
|
20596
21084
|
keyup: function keyup(e) {
|
|
20597
|
-
|
|
21085
|
+
_this5.$emit('keyUp', e, _this5.triggerQuery);
|
|
20598
21086
|
|
|
20599
|
-
|
|
21087
|
+
_this5.$emit('key-up', e, _this5.triggerQuery);
|
|
20600
21088
|
}
|
|
20601
21089
|
}),
|
|
20602
21090
|
"domProps": _extends({}, {
|
|
@@ -20795,7 +21283,8 @@
|
|
|
20795
21283
|
setCustomHighlightOptions: setCustomHighlightOptions,
|
|
20796
21284
|
recordSuggestionClick: recordSuggestionClick,
|
|
20797
21285
|
loadPopularSuggestions: loadPopularSuggestions,
|
|
20798
|
-
getRecentSearches: getRecentSearches
|
|
21286
|
+
getRecentSearches: getRecentSearches,
|
|
21287
|
+
resetStoreForComponent: resetStoreForComponent
|
|
20799
21288
|
};
|
|
20800
21289
|
var DSConnected = ComponentWrapper$1(connect(mapStateToProps$3, mapDispatchToProps$2)(DataSearch), {
|
|
20801
21290
|
componentType: constants_1$1.dataSearch,
|
|
@@ -20809,8 +21298,8 @@
|
|
|
20809
21298
|
|
|
20810
21299
|
DataSearch.componentType = constants_1$1.dataSearch;
|
|
20811
21300
|
|
|
20812
|
-
var _templateObject$
|
|
20813
|
-
var AutofillSvgIcon = index$1('button')(_templateObject$
|
|
21301
|
+
var _templateObject$k;
|
|
21302
|
+
var AutofillSvgIcon = index$1('button')(_templateObject$k || (_templateObject$k = _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"])));
|
|
20814
21303
|
var AutoFillSvg = {
|
|
20815
21304
|
name: 'AutoFillSvg',
|
|
20816
21305
|
render: function render() {
|
|
@@ -20851,10 +21340,12 @@
|
|
|
20851
21340
|
normalizeDataField$1 = lib_8.normalizeDataField;
|
|
20852
21341
|
var SearchBox = {
|
|
20853
21342
|
name: 'SearchBox',
|
|
21343
|
+
isTagsMode: false,
|
|
20854
21344
|
data: function data() {
|
|
20855
21345
|
var props = this.$props;
|
|
20856
21346
|
this.__state = {
|
|
20857
21347
|
currentValue: '',
|
|
21348
|
+
selectedTags: [],
|
|
20858
21349
|
isOpen: false,
|
|
20859
21350
|
normalizedSuggestions: []
|
|
20860
21351
|
};
|
|
@@ -20870,7 +21361,16 @@
|
|
|
20870
21361
|
var _this$$props = this.$props,
|
|
20871
21362
|
distinctField = _this$$props.distinctField,
|
|
20872
21363
|
distinctFieldConfig = _this$$props.distinctFieldConfig,
|
|
20873
|
-
index = _this$$props.index
|
|
21364
|
+
index = _this$$props.index,
|
|
21365
|
+
mode = _this$$props.mode;
|
|
21366
|
+
|
|
21367
|
+
if (mode === constants_5$1.TAG) {
|
|
21368
|
+
this.$options.isTagsMode = true;
|
|
21369
|
+
}
|
|
21370
|
+
|
|
21371
|
+
if (this.$options.isTagsMode) {
|
|
21372
|
+
console.warn('Warning(ReactiveSearch): The `categoryField` prop is not supported when `mode` prop is set to `tag`');
|
|
21373
|
+
}
|
|
20874
21374
|
|
|
20875
21375
|
if (this.enableAppbase && this.aggregationField && this.aggregationField !== '') {
|
|
20876
21376
|
console.warn('Warning(ReactiveSearch): The `aggregationField` prop has been marked as deprecated, please use the `distinctField` prop instead.');
|
|
@@ -20885,8 +21385,12 @@
|
|
|
20885
21385
|
}
|
|
20886
21386
|
|
|
20887
21387
|
this.currentValue = this.selectedValue || this.value || this.defaultValue || '';
|
|
20888
|
-
|
|
20889
|
-
|
|
21388
|
+
|
|
21389
|
+
if (this.$options.isTagsMode) {
|
|
21390
|
+
this.currentValue = '';
|
|
21391
|
+
}
|
|
21392
|
+
|
|
21393
|
+
this.handleTextChange = _debounce(this.handleText, this.$props.debounce); // Set custom and default queries in store
|
|
20890
21394
|
|
|
20891
21395
|
this.triggerCustomQuery(this.currentValue, this.selectedCategory);
|
|
20892
21396
|
this.triggerDefaultQuery(this.currentValue);
|
|
@@ -20922,7 +21426,7 @@
|
|
|
20922
21426
|
debounce: VueTypes.number.def(0),
|
|
20923
21427
|
defaultValue: types.string,
|
|
20924
21428
|
excludeFields: types.excludeFields,
|
|
20925
|
-
value: types.value,
|
|
21429
|
+
value: VueTypes.oneOfType([VueTypes.arrayOf(VueTypes.string), types.value]),
|
|
20926
21430
|
defaultSuggestions: types.suggestions,
|
|
20927
21431
|
enableSynonyms: VueTypes.bool.def(true),
|
|
20928
21432
|
enableQuerySuggestions: VueTypes.bool.def(false),
|
|
@@ -20975,7 +21479,18 @@
|
|
|
20975
21479
|
onData: types.func,
|
|
20976
21480
|
renderItem: types.func,
|
|
20977
21481
|
enterButton: VueTypes.bool.def(false),
|
|
20978
|
-
renderEnterButton: VueTypes.any
|
|
21482
|
+
renderEnterButton: VueTypes.any,
|
|
21483
|
+
mode: VueTypes.oneOf(['select', 'tag']).def('select'),
|
|
21484
|
+
renderSelectedTags: VueTypes.any
|
|
21485
|
+
},
|
|
21486
|
+
beforeMount: function beforeMount() {
|
|
21487
|
+
if (this.selectedValue) {
|
|
21488
|
+
this.setValue(this.selectedValue, true, this.$props, this.$options.isTagsMode ? lib_7.SUGGESTION_SELECT : undefined);
|
|
21489
|
+
} else if (this.$props.value) {
|
|
21490
|
+
this.setValue(this.$props.value, true, this.$props, this.$options.isTagsMode ? lib_7.SUGGESTION_SELECT : undefined);
|
|
21491
|
+
} else if (this.$props.defaultValue) {
|
|
21492
|
+
this.setValue(this.$props.defaultValue, true, this.$props, this.$options.isTagsMode ? lib_7.SUGGESTION_SELECT : undefined);
|
|
21493
|
+
}
|
|
20979
21494
|
},
|
|
20980
21495
|
mounted: function mounted() {
|
|
20981
21496
|
this.listenForFocusShortcuts();
|
|
@@ -21025,15 +21540,25 @@
|
|
|
21025
21540
|
this.normalizedSuggestions = suggestionsList;
|
|
21026
21541
|
},
|
|
21027
21542
|
selectedValue: function selectedValue(newVal, oldVal) {
|
|
21028
|
-
if (oldVal
|
|
21543
|
+
if (!isEqual$5(newVal, oldVal) && (this.$options.isTagsMode ? !isEqual$5(this.$data.selectedTags, newVal) : this.$data.currentValue !== newVal)) {
|
|
21029
21544
|
if (!newVal && this.$data.currentValue) {
|
|
21030
21545
|
// selected value is cleared, call onValueSelected
|
|
21031
21546
|
this.onValueSelectedHandler('', lib_7.CLEAR_VALUE);
|
|
21547
|
+
} // if (this.$props.value === undefined) {
|
|
21548
|
+
|
|
21549
|
+
|
|
21550
|
+
if (this.$options.isTagsMode) {
|
|
21551
|
+
// handling reset of tags through SelectedFilters or URL
|
|
21552
|
+
this.selectedTags = [];
|
|
21032
21553
|
}
|
|
21033
21554
|
|
|
21034
|
-
|
|
21035
|
-
|
|
21555
|
+
var cause = !newVal ? lib_7.CLEAR_VALUE : undefined;
|
|
21556
|
+
|
|
21557
|
+
if (this.$options.isTagsMode) {
|
|
21558
|
+
cause = lib_7.SUGGESTION_SELECT;
|
|
21036
21559
|
}
|
|
21560
|
+
|
|
21561
|
+
this.setValue(newVal || '', true, this.$props, cause); // }
|
|
21037
21562
|
}
|
|
21038
21563
|
},
|
|
21039
21564
|
focusShortcuts: function focusShortcuts() {
|
|
@@ -21135,7 +21660,7 @@
|
|
|
21135
21660
|
// returns size and aggs property
|
|
21136
21661
|
getBasicQueryOptions: function getBasicQueryOptions() {
|
|
21137
21662
|
var aggregationField = this.$props.aggregationField;
|
|
21138
|
-
var queryOptions =
|
|
21663
|
+
var queryOptions = helper_31(this.$props);
|
|
21139
21664
|
|
|
21140
21665
|
if (aggregationField) {
|
|
21141
21666
|
queryOptions.aggs = getCompositeAggsQuery$2({
|
|
@@ -21174,7 +21699,40 @@
|
|
|
21174
21699
|
}
|
|
21175
21700
|
|
|
21176
21701
|
var performUpdate = function performUpdate() {
|
|
21177
|
-
_this.
|
|
21702
|
+
if (_this.$options.isTagsMode && isEqual$5(value, _this.selectedTags)) {
|
|
21703
|
+
return;
|
|
21704
|
+
}
|
|
21705
|
+
|
|
21706
|
+
if (_this.$options.isTagsMode && cause === lib_7.SUGGESTION_SELECT) {
|
|
21707
|
+
if (Array.isArray(_this.selectedTags) && _this.selectedTags.length) {
|
|
21708
|
+
// check if value already present in selectedTags
|
|
21709
|
+
if (typeof value === 'string' && _this.selectedTags.includes(value)) {
|
|
21710
|
+
_this.isOpen = false;
|
|
21711
|
+
return;
|
|
21712
|
+
}
|
|
21713
|
+
|
|
21714
|
+
_this.selectedTags = [].concat(_this.selectedTags);
|
|
21715
|
+
|
|
21716
|
+
if (typeof value === 'string' && !!value) {
|
|
21717
|
+
_this.selectedTags.push(value);
|
|
21718
|
+
} else if (Array.isArray(value) && !isEqual$5(_this.selectedTags, value)) {
|
|
21719
|
+
var mergedArray = Array.from(new Set([].concat(_this.selectedTags, value)));
|
|
21720
|
+
_this.selectedTags = mergedArray;
|
|
21721
|
+
}
|
|
21722
|
+
} else if (value) {
|
|
21723
|
+
_this.selectedTags = typeof value !== 'string' ? value : [].concat(value);
|
|
21724
|
+
}
|
|
21725
|
+
|
|
21726
|
+
_this.currentValue = '';
|
|
21727
|
+
} else {
|
|
21728
|
+
_this.currentValue = value;
|
|
21729
|
+
}
|
|
21730
|
+
|
|
21731
|
+
var queryHandlerValue = value;
|
|
21732
|
+
|
|
21733
|
+
if (_this.$options.isTagsMode && cause === lib_7.SUGGESTION_SELECT) {
|
|
21734
|
+
queryHandlerValue = Array.isArray(_this.selectedTags) && _this.selectedTags.length ? _this.selectedTags : undefined;
|
|
21735
|
+
}
|
|
21178
21736
|
|
|
21179
21737
|
if (isDefaultValue) {
|
|
21180
21738
|
if (_this.$props.autosuggest) {
|
|
@@ -21182,19 +21740,19 @@
|
|
|
21182
21740
|
_this.isOpen = false;
|
|
21183
21741
|
}
|
|
21184
21742
|
|
|
21185
|
-
_this.triggerDefaultQuery(
|
|
21743
|
+
if (typeof _this.currentValue === 'string') _this.triggerDefaultQuery(_this.currentValue);
|
|
21186
21744
|
} // in case of strict selection only SUGGESTION_SELECT should be able
|
|
21187
21745
|
// to set the query otherwise the value should reset
|
|
21188
21746
|
|
|
21189
21747
|
|
|
21190
21748
|
if (props.strictSelection) {
|
|
21191
|
-
if (cause === lib_7.SUGGESTION_SELECT || value === '') {
|
|
21192
|
-
_this.triggerCustomQuery(
|
|
21749
|
+
if (cause === lib_7.SUGGESTION_SELECT || (_this.$options.isTagsMode ? _this.selectedTags.length === 0 : value === '')) {
|
|
21750
|
+
_this.triggerCustomQuery(queryHandlerValue, _this.$options.isTagsMode ? undefined : categoryValue);
|
|
21193
21751
|
} else {
|
|
21194
21752
|
_this.setValue('', true);
|
|
21195
21753
|
}
|
|
21196
|
-
} else if (props.value === undefined) {
|
|
21197
|
-
_this.triggerCustomQuery(
|
|
21754
|
+
} else if (props.value === undefined || cause === lib_7.SUGGESTION_SELECT || cause === lib_7.CLEAR_VALUE) {
|
|
21755
|
+
_this.triggerCustomQuery(queryHandlerValue, _this.$options.isTagsMode ? undefined : categoryValue);
|
|
21198
21756
|
}
|
|
21199
21757
|
} else {
|
|
21200
21758
|
// debounce for handling text while typing
|
|
@@ -21245,6 +21803,11 @@
|
|
|
21245
21803
|
showFilter = _this$$props2.showFilter,
|
|
21246
21804
|
URLParams = _this$$props2.URLParams;
|
|
21247
21805
|
var value = typeof paramValue !== 'string' ? this.$data.currentValue : paramValue;
|
|
21806
|
+
|
|
21807
|
+
if (this.$options.isTagsMode) {
|
|
21808
|
+
value = paramValue;
|
|
21809
|
+
}
|
|
21810
|
+
|
|
21248
21811
|
var defaultQueryTobeSet = SearchBox.defaultQuery("" + value + (categoryValue ? " in " + categoryValue : ''), this.$props);
|
|
21249
21812
|
var query = defaultQueryTobeSet;
|
|
21250
21813
|
|
|
@@ -21329,10 +21892,19 @@
|
|
|
21329
21892
|
this.onValueSelectedHandler('', lib_7.CLEAR_VALUE);
|
|
21330
21893
|
},
|
|
21331
21894
|
handleKeyDown: function handleKeyDown(event, highlightedIndex) {
|
|
21895
|
+
if (highlightedIndex === void 0) {
|
|
21896
|
+
highlightedIndex = null;
|
|
21897
|
+
}
|
|
21898
|
+
|
|
21332
21899
|
// if a suggestion was selected, delegate the handling to suggestion handler
|
|
21333
|
-
if (event.key === 'Enter'
|
|
21334
|
-
this.
|
|
21335
|
-
|
|
21900
|
+
if (event.key === 'Enter') {
|
|
21901
|
+
if (this.$props.autosuggest === false) {
|
|
21902
|
+
this.enterButtonOnClick();
|
|
21903
|
+
} else if (highlightedIndex === null) {
|
|
21904
|
+
this.setValue(event.target.value, true, this.$props, this.$options.isTagsMode ? lib_7.SUGGESTION_SELECT : undefined // to handle tags
|
|
21905
|
+
);
|
|
21906
|
+
this.onValueSelectedHandler(event.target.value, lib_7.ENTER_PRESS);
|
|
21907
|
+
}
|
|
21336
21908
|
} // Need to review
|
|
21337
21909
|
|
|
21338
21910
|
|
|
@@ -21375,13 +21947,29 @@
|
|
|
21375
21947
|
if (value === undefined) {
|
|
21376
21948
|
this.setValue(suggestion.value, true, this.$props, lib_7.SUGGESTION_SELECT, false, suggestion._category);
|
|
21377
21949
|
} else {
|
|
21378
|
-
|
|
21950
|
+
var emitValue = suggestion.value;
|
|
21951
|
+
|
|
21952
|
+
if (this.$options.isTagsMode) {
|
|
21953
|
+
emitValue = Array.isArray(this.selectedTags) ? [].concat(this.selectedTags) : [];
|
|
21954
|
+
|
|
21955
|
+
if (this.selectedTags.includes(suggestion.value)) {
|
|
21956
|
+
// avoid duplicates in tags array
|
|
21957
|
+
this.isOpen = false;
|
|
21958
|
+
return;
|
|
21959
|
+
}
|
|
21960
|
+
|
|
21961
|
+
emitValue.push(suggestion.value);
|
|
21962
|
+
}
|
|
21963
|
+
|
|
21964
|
+
this.setValue(emitValue, true, this.$props, lib_7.SUGGESTION_SELECT, false, suggestion._category);
|
|
21965
|
+
this.$emit('change', emitValue, function (_ref4) {
|
|
21379
21966
|
var isOpen = _ref4.isOpen;
|
|
21380
|
-
return _this3.triggerQuery({
|
|
21967
|
+
return _this3.triggerQuery(_extends({
|
|
21381
21968
|
isOpen: isOpen,
|
|
21382
|
-
value:
|
|
21969
|
+
value: emitValue
|
|
21970
|
+
}, !_this3.$options.isTagsMode && {
|
|
21383
21971
|
categoryValue: suggestion._category
|
|
21384
|
-
});
|
|
21972
|
+
}));
|
|
21385
21973
|
});
|
|
21386
21974
|
}
|
|
21387
21975
|
|
|
@@ -21504,6 +22092,13 @@
|
|
|
21504
22092
|
|
|
21505
22093
|
return null;
|
|
21506
22094
|
},
|
|
22095
|
+
enterButtonOnClick: function enterButtonOnClick() {
|
|
22096
|
+
this.triggerQuery({
|
|
22097
|
+
isOpen: false,
|
|
22098
|
+
value: this.currentValue,
|
|
22099
|
+
customQuery: true
|
|
22100
|
+
});
|
|
22101
|
+
},
|
|
21507
22102
|
renderEnterButtonElement: function renderEnterButtonElement() {
|
|
21508
22103
|
var _this4 = this;
|
|
21509
22104
|
|
|
@@ -21513,27 +22108,19 @@
|
|
|
21513
22108
|
innerClass = _this$$props4.innerClass;
|
|
21514
22109
|
var renderEnterButton = this.$scopedSlots.renderEnterButton;
|
|
21515
22110
|
|
|
21516
|
-
var enterButtonOnClick = function enterButtonOnClick() {
|
|
21517
|
-
return _this4.triggerQuery({
|
|
21518
|
-
isOpen: false,
|
|
21519
|
-
value: _this4.currentValue,
|
|
21520
|
-
customQuery: true
|
|
21521
|
-
});
|
|
21522
|
-
};
|
|
21523
|
-
|
|
21524
22111
|
if (enterButton) {
|
|
21525
22112
|
var getEnterButtonMarkup = function getEnterButtonMarkup() {
|
|
21526
22113
|
if (renderEnterButton) {
|
|
21527
|
-
return renderEnterButton(enterButtonOnClick);
|
|
22114
|
+
return renderEnterButton(_this4.enterButtonOnClick);
|
|
21528
22115
|
}
|
|
21529
22116
|
|
|
21530
22117
|
return h(Button, {
|
|
21531
|
-
"class": "enter-btn " + getClassName$4(innerClass, '
|
|
22118
|
+
"class": "enter-btn " + getClassName$4(innerClass, 'enter-button'),
|
|
21532
22119
|
"attrs": {
|
|
21533
22120
|
"primary": true
|
|
21534
22121
|
},
|
|
21535
22122
|
"on": {
|
|
21536
|
-
"click": enterButtonOnClick
|
|
22123
|
+
"click": _this4.enterButtonOnClick
|
|
21537
22124
|
}
|
|
21538
22125
|
}, ["Search"]);
|
|
21539
22126
|
};
|
|
@@ -21665,10 +22252,79 @@
|
|
|
21665
22252
|
"click": handleAutoFillClick
|
|
21666
22253
|
}
|
|
21667
22254
|
});
|
|
22255
|
+
},
|
|
22256
|
+
renderTag: function renderTag(item) {
|
|
22257
|
+
var _this7 = this;
|
|
22258
|
+
|
|
22259
|
+
var h = this.$createElement;
|
|
22260
|
+
var innerClass = this.$props.innerClass;
|
|
22261
|
+
return h(TagItem, {
|
|
22262
|
+
"class": getClassName$4(innerClass, 'selected-tag') || ''
|
|
22263
|
+
}, [h("span", [item]), h("span", {
|
|
22264
|
+
"attrs": {
|
|
22265
|
+
"role": "img",
|
|
22266
|
+
"aria-label": "delete-tag"
|
|
22267
|
+
},
|
|
22268
|
+
"class": "close-icon",
|
|
22269
|
+
"on": {
|
|
22270
|
+
"click": function click() {
|
|
22271
|
+
return _this7.clearTag(item);
|
|
22272
|
+
}
|
|
22273
|
+
}
|
|
22274
|
+
}, [h(CancelSvg)])]);
|
|
22275
|
+
},
|
|
22276
|
+
clearAllTags: function clearAllTags() {
|
|
22277
|
+
this.selectedTags = [];
|
|
22278
|
+
this.setValue('', true, this.$props, lib_7.SUGGESTION_SELECT);
|
|
22279
|
+
|
|
22280
|
+
if (this.$props.value !== undefined) {
|
|
22281
|
+
this.$emit('change', this.selectedTags, this.triggerQuery);
|
|
22282
|
+
}
|
|
22283
|
+
},
|
|
22284
|
+
clearTag: function clearTag(tagValue) {
|
|
22285
|
+
this.selectedTags = [].concat(this.selectedTags.filter(function (tag) {
|
|
22286
|
+
return tag !== tagValue;
|
|
22287
|
+
}));
|
|
22288
|
+
this.setValue('', true, this.$props, lib_7.SUGGESTION_SELECT);
|
|
22289
|
+
|
|
22290
|
+
if (this.$props.value !== undefined) {
|
|
22291
|
+
this.$emit('change', this.selectedTags, this.triggerQuery);
|
|
22292
|
+
}
|
|
22293
|
+
},
|
|
22294
|
+
renderTags: function renderTags() {
|
|
22295
|
+
var _this8 = this;
|
|
22296
|
+
|
|
22297
|
+
var h = this.$createElement;
|
|
22298
|
+
|
|
22299
|
+
if (!Array.isArray(this.selectedTags)) {
|
|
22300
|
+
return null;
|
|
22301
|
+
}
|
|
22302
|
+
|
|
22303
|
+
var tagsList = [].concat(this.selectedTags);
|
|
22304
|
+
var shouldRenderClearAllTag = tagsList.length > 1;
|
|
22305
|
+
var renderSelectedTags = this.$scopedSlots.renderSelectedTags || this.$props.renderSelectedTags;
|
|
22306
|
+
return renderSelectedTags ? renderSelectedTags({
|
|
22307
|
+
values: this.selectedTags,
|
|
22308
|
+
handleClear: this.clearTag,
|
|
22309
|
+
handleClearAll: this.clearAllTags
|
|
22310
|
+
}) : h(TagsContainer, [tagsList.map(function (item) {
|
|
22311
|
+
return _this8.renderTag(item);
|
|
22312
|
+
}), shouldRenderClearAllTag && h(TagItem, {
|
|
22313
|
+
"class": getClassName$4(this.$props.innerClass, 'selected-tag') || ''
|
|
22314
|
+
}, [h("span", ["Clear All"]), h("span", {
|
|
22315
|
+
"attrs": {
|
|
22316
|
+
"role": "img",
|
|
22317
|
+
"aria-label": "delete-tag"
|
|
22318
|
+
},
|
|
22319
|
+
"class": "close-icon",
|
|
22320
|
+
"on": {
|
|
22321
|
+
"click": this.clearAllTags
|
|
22322
|
+
}
|
|
22323
|
+
}, [h(CancelSvg)])])]);
|
|
21668
22324
|
}
|
|
21669
22325
|
},
|
|
21670
22326
|
render: function render() {
|
|
21671
|
-
var
|
|
22327
|
+
var _this9 = this;
|
|
21672
22328
|
|
|
21673
22329
|
var h = arguments[0];
|
|
21674
22330
|
var _this$$props6 = this.$props,
|
|
@@ -21703,10 +22359,10 @@
|
|
|
21703
22359
|
var renderSuggestionsDropdown = function renderSuggestionsDropdown() {
|
|
21704
22360
|
var getIcon = function getIcon(iconType) {
|
|
21705
22361
|
switch (iconType) {
|
|
21706
|
-
case
|
|
22362
|
+
case helper_9.Recent:
|
|
21707
22363
|
return recentSearchesIcon;
|
|
21708
22364
|
|
|
21709
|
-
case
|
|
22365
|
+
case helper_9.Popular:
|
|
21710
22366
|
return popularSearchesIcon;
|
|
21711
22367
|
|
|
21712
22368
|
default:
|
|
@@ -21714,14 +22370,14 @@
|
|
|
21714
22370
|
}
|
|
21715
22371
|
};
|
|
21716
22372
|
|
|
21717
|
-
return h("div", [
|
|
22373
|
+
return h("div", [_this9.hasCustomRenderer && _this9.getComponent({
|
|
21718
22374
|
isOpen: isOpen,
|
|
21719
22375
|
getItemProps: getItemProps,
|
|
21720
22376
|
getItemEvents: getItemEvents,
|
|
21721
22377
|
highlightedIndex: highlightedIndex
|
|
21722
|
-
}),
|
|
21723
|
-
"class": suggestions$1(
|
|
21724
|
-
}, [
|
|
22378
|
+
}), _this9.renderErrorComponent(), !_this9.hasCustomRenderer && isOpen && hasSuggestions ? h("ul", {
|
|
22379
|
+
"class": suggestions$1(_this9.themePreset, theme) + " " + getClassName$4(_this9.$props.innerClass, 'list')
|
|
22380
|
+
}, [_this9.normalizedSuggestions.map(function (item, index) {
|
|
21725
22381
|
return renderItem ? h("li", {
|
|
21726
22382
|
"domProps": _extends({}, getItemProps({
|
|
21727
22383
|
item: item
|
|
@@ -21731,7 +22387,7 @@
|
|
|
21731
22387
|
})),
|
|
21732
22388
|
"key": index + 1 + "-" + item.value,
|
|
21733
22389
|
"style": {
|
|
21734
|
-
backgroundColor:
|
|
22390
|
+
backgroundColor: _this9.getBackgroundColor(highlightedIndex, index),
|
|
21735
22391
|
justifyContent: 'flex-start',
|
|
21736
22392
|
alignItems: 'center'
|
|
21737
22393
|
}
|
|
@@ -21744,7 +22400,7 @@
|
|
|
21744
22400
|
})),
|
|
21745
22401
|
"key": index + 1 + "-" + item.value,
|
|
21746
22402
|
"style": {
|
|
21747
|
-
backgroundColor:
|
|
22403
|
+
backgroundColor: _this9.getBackgroundColor(highlightedIndex, index),
|
|
21748
22404
|
justifyContent: 'flex-start',
|
|
21749
22405
|
alignItems: 'center'
|
|
21750
22406
|
}
|
|
@@ -21755,61 +22411,61 @@
|
|
|
21755
22411
|
}
|
|
21756
22412
|
}, [h(CustomSvg, {
|
|
21757
22413
|
"attrs": {
|
|
21758
|
-
"className": getClassName$4(
|
|
22414
|
+
"className": getClassName$4(_this9.$props.innerClass, item._suggestion_type + "-search-icon") || null,
|
|
21759
22415
|
"icon": getIcon(item._suggestion_type),
|
|
21760
22416
|
"type": item._suggestion_type + "-search-icon"
|
|
21761
22417
|
}
|
|
21762
22418
|
})]), h(SuggestionItem, {
|
|
21763
22419
|
"attrs": {
|
|
21764
|
-
"currentValue":
|
|
22420
|
+
"currentValue": _this9.currentValue,
|
|
21765
22421
|
"suggestion": item
|
|
21766
22422
|
}
|
|
21767
|
-
}),
|
|
21768
|
-
})]) :
|
|
22423
|
+
}), _this9.renderAutoFill(item)]);
|
|
22424
|
+
})]) : _this9.renderNoSuggestions(_this9.normalizedSuggestions)]);
|
|
21769
22425
|
};
|
|
21770
22426
|
|
|
21771
22427
|
return h("div", {
|
|
21772
22428
|
"class": suggestionsContainer
|
|
21773
|
-
}, [h(InputGroup, [
|
|
22429
|
+
}, [h(InputGroup, [_this9.renderInputAddonBefore(), h(InputWrapper, [h(Input, {
|
|
21774
22430
|
"attrs": {
|
|
21775
|
-
"id":
|
|
21776
|
-
"showIcon":
|
|
21777
|
-
"showClear":
|
|
21778
|
-
"iconPosition":
|
|
21779
|
-
"placeholder":
|
|
21780
|
-
"autoFocus":
|
|
21781
|
-
"themePreset":
|
|
22431
|
+
"id": _this9.$props.componentId + "-input",
|
|
22432
|
+
"showIcon": _this9.$props.showIcon,
|
|
22433
|
+
"showClear": _this9.$props.showClear,
|
|
22434
|
+
"iconPosition": _this9.$props.iconPosition,
|
|
22435
|
+
"placeholder": _this9.$props.placeholder,
|
|
22436
|
+
"autoFocus": _this9.$props.autoFocus,
|
|
22437
|
+
"themePreset": _this9.themePreset,
|
|
21782
22438
|
"autocomplete": "off"
|
|
21783
22439
|
},
|
|
21784
|
-
"ref":
|
|
21785
|
-
"class": getClassName$4(
|
|
22440
|
+
"ref": _this9.$props.innerRef,
|
|
22441
|
+
"class": getClassName$4(_this9.$props.innerClass, 'input'),
|
|
21786
22442
|
"on": _extends({}, getInputEvents({
|
|
21787
|
-
onInput:
|
|
22443
|
+
onInput: _this9.onInputChange,
|
|
21788
22444
|
onBlur: function onBlur(e) {
|
|
21789
|
-
|
|
22445
|
+
_this9.$emit('blur', e, _this9.triggerQuery);
|
|
21790
22446
|
},
|
|
21791
|
-
onFocus:
|
|
22447
|
+
onFocus: _this9.handleFocus,
|
|
21792
22448
|
onKeyPress: function onKeyPress(e) {
|
|
21793
|
-
|
|
22449
|
+
_this9.$emit('keyPress', e, _this9.triggerQuery);
|
|
21794
22450
|
|
|
21795
|
-
|
|
22451
|
+
_this9.$emit('key-press', e, _this9.triggerQuery);
|
|
21796
22452
|
},
|
|
21797
22453
|
onKeyDown: function onKeyDown(e) {
|
|
21798
|
-
return
|
|
22454
|
+
return _this9.handleKeyDown(e, highlightedIndex);
|
|
21799
22455
|
},
|
|
21800
22456
|
onKeyUp: function onKeyUp(e) {
|
|
21801
|
-
|
|
22457
|
+
_this9.$emit('keyUp', e, _this9.triggerQuery);
|
|
21802
22458
|
|
|
21803
|
-
|
|
22459
|
+
_this9.$emit('key-up', e, _this9.triggerQuery);
|
|
21804
22460
|
},
|
|
21805
22461
|
onClick: function onClick() {
|
|
21806
22462
|
setHighlightedIndex(null);
|
|
21807
22463
|
}
|
|
21808
22464
|
})),
|
|
21809
22465
|
"domProps": _extends({}, getInputProps({
|
|
21810
|
-
value:
|
|
22466
|
+
value: _this9.$data.currentValue === null ? '' : _this9.$data.currentValue
|
|
21811
22467
|
}))
|
|
21812
|
-
}),
|
|
22468
|
+
}), _this9.renderIcons(), !expandSuggestionsContainer && renderSuggestionsDropdown()]), _this9.renderInputAddonAfter(), _this9.renderEnterButtonElement()]), expandSuggestionsContainer && renderSuggestionsDropdown(), _this9.renderTags()]);
|
|
21813
22469
|
}
|
|
21814
22470
|
}
|
|
21815
22471
|
}) : h("div", {
|
|
@@ -21825,26 +22481,22 @@
|
|
|
21825
22481
|
},
|
|
21826
22482
|
"on": _extends({}, {
|
|
21827
22483
|
blur: function blur(e) {
|
|
21828
|
-
|
|
22484
|
+
_this9.$emit('blur', e, _this9.triggerQuery);
|
|
21829
22485
|
},
|
|
21830
22486
|
keypress: function keypress(e) {
|
|
21831
|
-
|
|
22487
|
+
_this9.$emit('keyPress', e, _this9.triggerQuery);
|
|
21832
22488
|
|
|
21833
|
-
|
|
22489
|
+
_this9.$emit('key-press', e, _this9.triggerQuery);
|
|
21834
22490
|
},
|
|
21835
22491
|
input: this.onInputChange,
|
|
21836
22492
|
focus: function focus(e) {
|
|
21837
|
-
|
|
21838
|
-
},
|
|
21839
|
-
keydown: function keydown(e) {
|
|
21840
|
-
_this7.$emit('keyDown', e, _this7.triggerQuery);
|
|
21841
|
-
|
|
21842
|
-
_this7.$emit('key-down', e, _this7.triggerQuery);
|
|
22493
|
+
_this9.$emit('focus', e, _this9.triggerQuery);
|
|
21843
22494
|
},
|
|
22495
|
+
keydown: this.handleKeyDown,
|
|
21844
22496
|
keyup: function keyup(e) {
|
|
21845
|
-
|
|
22497
|
+
_this9.$emit('keyUp', e, _this9.triggerQuery);
|
|
21846
22498
|
|
|
21847
|
-
|
|
22499
|
+
_this9.$emit('key-up', e, _this9.triggerQuery);
|
|
21848
22500
|
}
|
|
21849
22501
|
}),
|
|
21850
22502
|
"domProps": _extends({}, {
|
|
@@ -22003,14 +22655,14 @@
|
|
|
22003
22655
|
|
|
22004
22656
|
SearchBox.componentType = constants_1$1.searchBox;
|
|
22005
22657
|
|
|
22006
|
-
var _templateObject$
|
|
22658
|
+
var _templateObject$l, _templateObject2$8, _templateObject3$6, _templateObject4$5, _templateObject5$3, _templateObject6$3;
|
|
22007
22659
|
var item = {
|
|
22008
22660
|
width: '15px',
|
|
22009
22661
|
height: '15px',
|
|
22010
22662
|
scale: '4px'
|
|
22011
22663
|
};
|
|
22012
|
-
var vh = css(_templateObject$
|
|
22013
|
-
var hideInputControl = css(_templateObject2$
|
|
22664
|
+
var vh = css(_templateObject$l || (_templateObject$l = _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"])));
|
|
22665
|
+
var hideInputControl = css(_templateObject2$8 || (_templateObject2$8 = _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"])));
|
|
22014
22666
|
|
|
22015
22667
|
var formItem = function formItem(_ref) {
|
|
22016
22668
|
var theme = _ref.theme;
|
|
@@ -23167,12 +23819,12 @@
|
|
|
23167
23819
|
|
|
23168
23820
|
MultiList.componentType = constants_1$1.multiList;
|
|
23169
23821
|
|
|
23170
|
-
var _templateObject$
|
|
23171
|
-
var small = css(_templateObject$
|
|
23822
|
+
var _templateObject$m, _templateObject2$9, _templateObject3$7, _templateObject4$6;
|
|
23823
|
+
var small = css(_templateObject$m || (_templateObject$m = _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"])));
|
|
23172
23824
|
|
|
23173
23825
|
var dark$2 = function dark(_ref) {
|
|
23174
23826
|
var theme = _ref.theme;
|
|
23175
|
-
return css(_templateObject2$
|
|
23827
|
+
return css(_templateObject2$9 || (_templateObject2$9 = _taggedTemplateLiteralLoose(["\n\tbackground-color: ", ";\n\tborder-color: ", ";\n\tcolor: ", ";\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: ", ";\n\t}\n"])), theme.colors.backgroundColor, theme.colors.borderColor, theme.colors.textColor, theme.colors.backgroundColor);
|
|
23176
23828
|
};
|
|
23177
23829
|
|
|
23178
23830
|
var Select = index$1('button')(_templateObject3$7 || (_templateObject3$7 = _taggedTemplateLiteralLoose(["\n\twidth: 100%;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: space-between;\n\tmin-height: 42px;\n\tborder-radius: 0;\n\toutline: none;\n\tpadding: 5px 12px;\n\tfont-size: 0.9rem;\n\tline-height: 1.2rem;\n\tbackground-color: #fff;\n\tborder: 1px solid #ccc;\n\tcolor: #424242;\n\tcursor: pointer;\n\tuser-select: none;\n\ttransition: all 0.3s ease;\n\n\t", ";\n\n\t& > div {\n\t\twidth: calc(100% - 24px);\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\ttext-align: left;\n\t}\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: #fcfcfc;\n\t}\n\n\t", ";\n"])), function (props) {
|
|
@@ -23186,9 +23838,9 @@
|
|
|
23186
23838
|
return theme.colors.primaryColor;
|
|
23187
23839
|
});
|
|
23188
23840
|
|
|
23189
|
-
var _templateObject$
|
|
23190
|
-
var open = css(_templateObject$
|
|
23191
|
-
var Chevron = index$1('span')(_templateObject2$
|
|
23841
|
+
var _templateObject$n, _templateObject2$a;
|
|
23842
|
+
var open = css(_templateObject$n || (_templateObject$n = _taggedTemplateLiteralLoose(["\n\ttop: 0.55em;\n\ttransform: rotate(-45deg);\n"])));
|
|
23843
|
+
var Chevron = index$1('span')(_templateObject2$a || (_templateObject2$a = _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) {
|
|
23192
23844
|
return props.open ? open : null;
|
|
23193
23845
|
});
|
|
23194
23846
|
|
|
@@ -24515,6 +25167,7 @@
|
|
|
24515
25167
|
name: 'ToggleButton',
|
|
24516
25168
|
props: {
|
|
24517
25169
|
componentId: types.stringRequired,
|
|
25170
|
+
customQuery: types.func,
|
|
24518
25171
|
data: types.data,
|
|
24519
25172
|
dataField: types.stringRequired,
|
|
24520
25173
|
defaultValue: types.any,
|
|
@@ -25192,6 +25845,7 @@
|
|
|
25192
25845
|
components: this.components,
|
|
25193
25846
|
selectedValues: this.selectedValues,
|
|
25194
25847
|
clearValues: this.clearValues,
|
|
25848
|
+
clearValue: this.clearValue,
|
|
25195
25849
|
setValue: this.setValue,
|
|
25196
25850
|
resetValuesToDefault: this.resetValuesToDefault
|
|
25197
25851
|
});
|
|
@@ -25203,7 +25857,7 @@
|
|
|
25203
25857
|
"class": filters(this.theme) + " " + (this.$props.className || '')
|
|
25204
25858
|
}, [this.$props.title && hasValues && h(Title, {
|
|
25205
25859
|
"class": getClassName$b(this.$props.innerClass, 'title') || ''
|
|
25206
|
-
}, [this.$props.title]), filtersToRender, this.$props.showClearAll && hasValues ? h(Button, {
|
|
25860
|
+
}, [this.$props.title]), filtersToRender, this.$props.showClearAll && hasValues && filtersToRender.length > 1 ? h(Button, {
|
|
25207
25861
|
"class": getClassName$b(this.$props.innerClass, 'button') || '',
|
|
25208
25862
|
"on": _extends({}, {
|
|
25209
25863
|
click: this.clearValues,
|
|
@@ -25240,6 +25894,20 @@
|
|
|
25240
25894
|
|
|
25241
25895
|
this.$emit('clear', resetToValues);
|
|
25242
25896
|
},
|
|
25897
|
+
clearValue: function clearValue(componentId) {
|
|
25898
|
+
var resetToDefault = this.resetToDefault,
|
|
25899
|
+
resetToValues = this.resetToValues;
|
|
25900
|
+
|
|
25901
|
+
if (resetToDefault) {
|
|
25902
|
+
this.resetValuesToDefault(this.components.filter(function (component) {
|
|
25903
|
+
return component !== componentId;
|
|
25904
|
+
}));
|
|
25905
|
+
} else {
|
|
25906
|
+
this.setValue(componentId, (resetToValues == null ? void 0 : resetToValues[componentId]) || null);
|
|
25907
|
+
}
|
|
25908
|
+
|
|
25909
|
+
this.$emit('clear', resetToValues == null ? void 0 : resetToValues[componentId]);
|
|
25910
|
+
},
|
|
25243
25911
|
renderValue: function renderValue(value, isArray) {
|
|
25244
25912
|
var _this2 = this;
|
|
25245
25913
|
|
|
@@ -25263,39 +25931,41 @@
|
|
|
25263
25931
|
|
|
25264
25932
|
return value;
|
|
25265
25933
|
},
|
|
25934
|
+
renderFilterButton: function renderFilterButton(component, keyProp, handleRemove, label) {
|
|
25935
|
+
var h = this.$createElement;
|
|
25936
|
+
return h(Button, {
|
|
25937
|
+
"class": getClassName$b(this.$props.innerClass, 'button') || '',
|
|
25938
|
+
"key": keyProp,
|
|
25939
|
+
"on": _extends({}, {
|
|
25940
|
+
click: handleRemove,
|
|
25941
|
+
keypress: function keypress(event) {
|
|
25942
|
+
return handleA11yAction$2(event, handleRemove);
|
|
25943
|
+
}
|
|
25944
|
+
}),
|
|
25945
|
+
"attrs": {
|
|
25946
|
+
"tabIndex": "0"
|
|
25947
|
+
}
|
|
25948
|
+
}, [h("span", [label]), h("span", ["\u2715"])]);
|
|
25949
|
+
},
|
|
25266
25950
|
renderFilters: function renderFilters() {
|
|
25267
25951
|
var _this3 = this;
|
|
25268
25952
|
|
|
25269
|
-
var h = this.$createElement;
|
|
25270
25953
|
var selectedValues = this.selectedValues;
|
|
25271
|
-
|
|
25954
|
+
var filterComponents = Object.keys(selectedValues).filter(function (id) {
|
|
25272
25955
|
return _this3.components.includes(id) && selectedValues[id].showFilter;
|
|
25273
|
-
})
|
|
25956
|
+
});
|
|
25957
|
+
return filterComponents.map(function (component, index) {
|
|
25274
25958
|
var _selectedValues$compo = selectedValues[component],
|
|
25275
25959
|
label = _selectedValues$compo.label,
|
|
25276
25960
|
value = _selectedValues$compo.value;
|
|
25277
|
-
var isArray = Array.isArray(value);
|
|
25961
|
+
var isArray = Array.isArray(value); // default behaviour
|
|
25278
25962
|
|
|
25279
25963
|
if (label && (isArray && value.length || !isArray && value)) {
|
|
25280
25964
|
var valueToRender = _this3.renderValue(value, isArray);
|
|
25281
25965
|
|
|
25282
|
-
return
|
|
25283
|
-
|
|
25284
|
-
|
|
25285
|
-
"on": _extends({}, {
|
|
25286
|
-
click: function click() {
|
|
25287
|
-
return _this3.remove(component, value);
|
|
25288
|
-
},
|
|
25289
|
-
keypress: function keypress(event) {
|
|
25290
|
-
return handleA11yAction$2(event, function () {
|
|
25291
|
-
return _this3.remove(component, value);
|
|
25292
|
-
});
|
|
25293
|
-
}
|
|
25294
|
-
}),
|
|
25295
|
-
"attrs": {
|
|
25296
|
-
"tabIndex": "0"
|
|
25297
|
-
}
|
|
25298
|
-
}, [h("span", [selectedValues[component].label, ": ", valueToRender]), h("span", ["\u2715"])]);
|
|
25966
|
+
return _this3.renderFilterButton(component, component + "-" + (index + 1), function () {
|
|
25967
|
+
return _this3.remove(component, value);
|
|
25968
|
+
}, selectedValues[component].label + ": " + valueToRender);
|
|
25299
25969
|
}
|
|
25300
25970
|
|
|
25301
25971
|
return null;
|
|
@@ -25446,7 +26116,7 @@
|
|
|
25446
26116
|
props = this.$props;
|
|
25447
26117
|
}
|
|
25448
26118
|
|
|
25449
|
-
var currentValue = SingleRange.parseValue(value, props);
|
|
26119
|
+
var currentValue = typeof value === 'string' ? SingleRange.parseValue(value, props) : value;
|
|
25450
26120
|
|
|
25451
26121
|
var performUpdate = function performUpdate() {
|
|
25452
26122
|
_this2.currentValue = currentValue;
|
|
@@ -26122,8 +26792,8 @@
|
|
|
26122
26792
|
};
|
|
26123
26793
|
var vueNoSsr_common = index$2;
|
|
26124
26794
|
|
|
26125
|
-
var _templateObject$
|
|
26126
|
-
var Slider = index$1('div')(_templateObject$
|
|
26795
|
+
var _templateObject$o;
|
|
26796
|
+
var Slider = index$1('div')(_templateObject$o || (_templateObject$o = _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"])));
|
|
26127
26797
|
|
|
26128
26798
|
/**
|
|
26129
26799
|
* Caution: Please do not change this file without having a discussion with the Team.
|
|
@@ -27030,13 +27700,32 @@
|
|
|
27030
27700
|
if (this.isStateChanged(newVal, oldVal)) {
|
|
27031
27701
|
this.searchState = filterByKeys(getSearchState(filterProps(this.searchStateProps)), this.includeKeys);
|
|
27032
27702
|
}
|
|
27703
|
+
},
|
|
27704
|
+
setSearchState: function setSearchState(valuesMap) {
|
|
27705
|
+
if (valuesMap === void 0) {
|
|
27706
|
+
valuesMap = {};
|
|
27707
|
+
}
|
|
27708
|
+
|
|
27709
|
+
var components = this.components;
|
|
27710
|
+
var computedValuesMap = {};
|
|
27711
|
+
components.filter(function (component) {
|
|
27712
|
+
return !transform_11(component);
|
|
27713
|
+
}).forEach(function (component) {
|
|
27714
|
+
if (component in valuesMap) {
|
|
27715
|
+
computedValuesMap[component] = valuesMap[component];
|
|
27716
|
+
} else {
|
|
27717
|
+
computedValuesMap[component] = null;
|
|
27718
|
+
}
|
|
27719
|
+
});
|
|
27720
|
+
this.setValues(computedValuesMap);
|
|
27033
27721
|
}
|
|
27034
27722
|
},
|
|
27035
27723
|
render: function render() {
|
|
27036
27724
|
var searchState = this.searchState;
|
|
27037
27725
|
var dom = this.$scopedSlots["default"];
|
|
27038
27726
|
return dom ? dom({
|
|
27039
|
-
searchState: searchState
|
|
27727
|
+
searchState: searchState,
|
|
27728
|
+
setSearchState: this.setSearchState
|
|
27040
27729
|
}) : null;
|
|
27041
27730
|
}
|
|
27042
27731
|
};
|
|
@@ -27054,11 +27743,15 @@
|
|
|
27054
27743
|
promotedResults: filterByComponentIds(state.promotedResults, props),
|
|
27055
27744
|
customData: filterByComponentIds(state.customData, props),
|
|
27056
27745
|
settings: filterByComponentIds(state.settings, props),
|
|
27057
|
-
rawData: filterByComponentIds(state.rawData, props)
|
|
27746
|
+
rawData: filterByComponentIds(state.rawData, props),
|
|
27747
|
+
components: filterByComponentIds(state.components, props)
|
|
27058
27748
|
};
|
|
27059
27749
|
};
|
|
27060
27750
|
|
|
27061
|
-
var
|
|
27751
|
+
var mapDispatchtoProps$d = {
|
|
27752
|
+
setValues: value_6
|
|
27753
|
+
};
|
|
27754
|
+
var StateProviderConnected = connect(mapStateToProps$g, mapDispatchtoProps$d)(StateProvider);
|
|
27062
27755
|
|
|
27063
27756
|
StateProvider.install = function (Vue) {
|
|
27064
27757
|
Vue.component(StateProvider.name, StateProviderConnected);
|
|
@@ -27111,8 +27804,8 @@
|
|
|
27111
27804
|
if (component.defaultQuery) {
|
|
27112
27805
|
var defaultQuery = component.defaultQuery(currentValue, component);
|
|
27113
27806
|
return _extends({
|
|
27114
|
-
query:
|
|
27115
|
-
},
|
|
27807
|
+
query: helper_17(defaultQuery)
|
|
27808
|
+
}, helper_18(defaultQuery));
|
|
27116
27809
|
}
|
|
27117
27810
|
|
|
27118
27811
|
return component.source.defaultQuery ? {
|
|
@@ -27128,8 +27821,8 @@
|
|
|
27128
27821
|
if (component.customQuery) {
|
|
27129
27822
|
var customQuery = component.customQuery(currentValue, component);
|
|
27130
27823
|
return _extends({
|
|
27131
|
-
query:
|
|
27132
|
-
},
|
|
27824
|
+
query: helper_17(customQuery)
|
|
27825
|
+
}, helper_18(customQuery));
|
|
27133
27826
|
}
|
|
27134
27827
|
|
|
27135
27828
|
return component.source.defaultQuery ? {
|
|
@@ -27293,7 +27986,7 @@
|
|
|
27293
27986
|
var react = component.react;
|
|
27294
27987
|
|
|
27295
27988
|
if (isInternalComponentPresent || isResultComponent) {
|
|
27296
|
-
react =
|
|
27989
|
+
react = helper_33(react, internalComponent);
|
|
27297
27990
|
}
|
|
27298
27991
|
|
|
27299
27992
|
dependencyTree = dependencyTreeReducer(dependencyTree, {
|
|
@@ -27356,7 +28049,7 @@
|
|
|
27356
28049
|
|
|
27357
28050
|
componentCollection.forEach(function (component) {
|
|
27358
28051
|
// eslint-disable-next-line
|
|
27359
|
-
var _buildQuery =
|
|
28052
|
+
var _buildQuery = helper_32(component.componentId, dependencyTree, queryList, queryOptions),
|
|
27360
28053
|
queryObj = _buildQuery.queryObj,
|
|
27361
28054
|
options = _buildQuery.options;
|
|
27362
28055
|
|
|
@@ -27383,7 +28076,7 @@
|
|
|
27383
28076
|
queryLog = _extends({}, queryLog, (_extends2 = {}, _extends2[component.componentId] = currentQuery, _extends2));
|
|
27384
28077
|
|
|
27385
28078
|
if (settings.enableAppbase) {
|
|
27386
|
-
var query = transform_4(component.componentId, transform_2(state, component.componentId, queryOptions && queryOptions[component.componentId] ? {
|
|
28079
|
+
var query = transform_4(component.componentId, transform_2(state, component.componentId, queryOptions && Object.keys(queryOptions[component.componentId]).length ? {
|
|
27387
28080
|
from: queryOptions[component.componentId].from
|
|
27388
28081
|
} : null));
|
|
27389
28082
|
|
|
@@ -27424,7 +28117,7 @@
|
|
|
27424
28117
|
|
|
27425
28118
|
aggregations = _extends({}, aggregations, (_extends4 = {}, _extends4[component] = response.aggregations, _extends4));
|
|
27426
28119
|
compositeAggregations = compositeAggsReducer(compositeAggregations, {
|
|
27427
|
-
type:
|
|
28120
|
+
type: constants_10,
|
|
27428
28121
|
aggregations: response.aggregations,
|
|
27429
28122
|
append: false
|
|
27430
28123
|
});
|
|
@@ -27566,16 +28259,16 @@
|
|
|
27566
28259
|
});
|
|
27567
28260
|
}
|
|
27568
28261
|
|
|
27569
|
-
var version = "1.
|
|
28262
|
+
var version = "1.30.0";
|
|
27570
28263
|
|
|
27571
|
-
var _templateObject$
|
|
28264
|
+
var _templateObject$p, _templateObject2$b;
|
|
27572
28265
|
|
|
27573
28266
|
var alert = function alert(_ref) {
|
|
27574
28267
|
var theme = _ref.theme;
|
|
27575
|
-
return css(_templateObject$
|
|
28268
|
+
return css(_templateObject$p || (_templateObject$p = _taggedTemplateLiteralLoose(["\n\tcolor: ", ";\n"])), theme.colors.alertColor);
|
|
27576
28269
|
};
|
|
27577
28270
|
|
|
27578
|
-
var Content = index$1('div')(_templateObject2$
|
|
28271
|
+
var Content = index$1('div')(_templateObject2$b || (_templateObject2$b = _taggedTemplateLiteralLoose(["\n\t", ";\n\tfont-size: 13px;\n\tmargin: 8px;\n"])), function (props) {
|
|
27579
28272
|
return props.alert && alert;
|
|
27580
28273
|
});
|
|
27581
28274
|
|