@appbaseio/reactivesearch-vue 1.31.0 → 1.32.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@appbaseio/reactivesearch-vue.umd.js +9797 -330
- package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js +21 -5
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
- package/dist/cjs/{Button-0e2e2c02.js → Button-0673191e.js} +6 -6
- package/dist/cjs/{CancelSvg-c48c1085.js → CancelSvg-9f258f4f.js} +1 -1
- package/dist/cjs/{Card-4fa0f769.js → Card-642547a8.js} +2 -2
- package/dist/cjs/{ComponentWrapper-6909bc2a.js → ComponentWrapper-ad3dad02.js} +2 -2
- package/dist/cjs/{Container-cfd69a34.js → Container-daf30918.js} +1 -1
- package/dist/cjs/{DataSearch-a8fabd77.js → DataSearch-b51a5d0f.js} +128 -114
- package/dist/cjs/DataSearch.js +10 -10
- package/dist/cjs/{DropDown-aa358fff.js → DropDown-c479bbb0.js} +5 -5
- package/dist/cjs/DynamicRangeSlider.js +6 -6
- package/dist/cjs/{Flex-63774e4d.js → Flex-aa517a13.js} +1 -1
- package/dist/cjs/{FormControlList-a9c64bb8.js → FormControlList-c195a592.js} +1 -1
- package/dist/cjs/{Input-43868594.js → Input-e6603a7e.js} +1 -1
- package/dist/cjs/{ListItem-38962297.js → ListItem-8c9e0d68.js} +2 -2
- package/dist/cjs/MultiDropdownList.js +11 -11
- package/dist/cjs/MultiList.js +9 -9
- package/dist/cjs/MultiRange.js +7 -7
- package/dist/cjs/Pagination-3d73e1b3.js +182 -0
- package/dist/cjs/RangeInput.js +9 -9
- package/dist/cjs/RangeSlider.js +7 -7
- package/dist/cjs/ReactiveBase.js +6 -22
- package/dist/cjs/ReactiveComponent.js +4 -4
- package/dist/cjs/ReactiveGoogleMap.js +2363 -0
- package/dist/cjs/ReactiveList.js +19 -191
- package/dist/cjs/ResultCard.js +4 -4
- package/dist/cjs/ResultList.js +4 -4
- package/dist/cjs/SelectedFilters.js +6 -6
- package/dist/cjs/SingleDropdownList.js +11 -11
- package/dist/cjs/SingleList.js +9 -9
- package/dist/cjs/SingleRange.js +7 -7
- package/dist/cjs/StateProvider.js +65 -22
- package/dist/cjs/{Title-26661936.js → Title-1de7d0f4.js} +1 -1
- package/dist/cjs/ToggleButton.js +7 -7
- package/dist/cjs/{_rollupPluginBabelHelpers-91d4b5a6.js → _rollupPluginBabelHelpers-c705cbe6.js} +16 -0
- package/dist/cjs/{index-2e0ea8d8.js → index-6a167fe0.js} +1 -1
- package/dist/cjs/index.js +23 -18
- package/dist/cjs/initReactivesearch.js +8 -4
- package/dist/cjs/{install-27314778.js → install-3ebc879c.js} +10 -10
- package/dist/cjs/install.js +19 -18
- package/dist/cjs/{ssr-949cafb5.js → ssr-3027b848.js} +1 -1
- package/dist/cjs/{utils-0df3cb93.js → utils-d6a52588.js} +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/{vueTypes-3970ff42.js → vueTypes-727b7c63.js} +24 -13
- package/dist/es/{Button-e18ad90f.js → Button-35aa984e.js} +6 -6
- package/dist/es/{CancelSvg-e3b33cdd.js → CancelSvg-4cfae5fd.js} +1 -1
- package/dist/es/{Card-ad6ba09f.js → Card-450683f1.js} +2 -2
- package/dist/es/{ComponentWrapper-ca0354ea.js → ComponentWrapper-424e86fd.js} +2 -2
- package/dist/es/{Container-421450dc.js → Container-ba826e96.js} +1 -1
- package/dist/es/{DataSearch-da9347f7.js → DataSearch-c40e26c7.js} +128 -114
- package/dist/es/DataSearch.js +10 -10
- package/dist/es/{DropDown-604374d2.js → DropDown-05a644a5.js} +5 -5
- package/dist/es/DynamicRangeSlider.js +6 -6
- package/dist/es/{Flex-09d40927.js → Flex-1f0795c3.js} +1 -1
- package/dist/es/{FormControlList-38ffe3d3.js → FormControlList-c22d64f6.js} +1 -1
- package/dist/es/{Input-c9d757bc.js → Input-7a2a9fac.js} +1 -1
- package/dist/es/{ListItem-41d6ddd7.js → ListItem-cad14c5e.js} +2 -2
- package/dist/es/MultiDropdownList.js +11 -11
- package/dist/es/MultiList.js +9 -9
- package/dist/es/MultiRange.js +7 -7
- package/dist/es/Pagination-af9de08f.js +177 -0
- package/dist/es/RangeInput.js +9 -9
- package/dist/es/RangeSlider.js +7 -7
- package/dist/es/ReactiveBase.js +6 -22
- package/dist/es/ReactiveComponent.js +4 -4
- package/dist/es/ReactiveGoogleMap.js +2354 -0
- package/dist/es/ReactiveList.js +18 -190
- package/dist/es/ResultCard.js +4 -4
- package/dist/es/ResultList.js +4 -4
- package/dist/es/SelectedFilters.js +6 -6
- package/dist/es/SingleDropdownList.js +11 -11
- package/dist/es/SingleList.js +9 -9
- package/dist/es/SingleRange.js +7 -7
- package/dist/es/StateProvider.js +65 -22
- package/dist/es/{Title-35edd732.js → Title-3342664a.js} +1 -1
- package/dist/es/ToggleButton.js +7 -7
- package/dist/es/{_rollupPluginBabelHelpers-51ce1182.js → _rollupPluginBabelHelpers-76660dab.js} +16 -1
- package/dist/es/{index-4715798c.js → index-7788a843.js} +1 -1
- package/dist/es/index.js +23 -19
- package/dist/es/initReactivesearch.js +8 -4
- package/dist/es/{install-5d9cb7ed.js → install-c438014c.js} +10 -10
- package/dist/es/install.js +19 -18
- package/dist/es/{ssr-ad57b0ad.js → ssr-b2c0b401.js} +1 -1
- package/dist/es/{utils-9b45e0ab.js → utils-9e68acee.js} +1 -1
- package/dist/es/version.js +1 -1
- package/dist/es/{vueTypes-c0d8b875.js → vueTypes-b8146772.js} +24 -13
- package/package.json +9 -3
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { helper, Actions, causes } from '@appbaseio/reactivecore';
|
|
2
|
-
import { _ as _taggedTemplateLiteralLoose, a as _extends } from './_rollupPluginBabelHelpers-
|
|
2
|
+
import { _ as _taggedTemplateLiteralLoose, a as _extends } from './_rollupPluginBabelHelpers-76660dab.js';
|
|
3
3
|
import VueTypes from 'vue-types';
|
|
4
4
|
import { SEARCH_COMPONENTS_MODES, componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
|
|
5
5
|
import { getQueryOptions } from '@appbaseio/reactivecore/lib/utils/helper';
|
|
6
6
|
import styled, { css, cx, injectGlobal } from '@appbaseio/vue-emotion';
|
|
7
|
-
import { t as types } from './vueTypes-
|
|
8
|
-
import { g as getComponent, h as hasCustomRenderer, f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, j as getQuerySuggestionsComponent, a as isFunction, k as isEmpty, p as parseFocusShortcuts, l as extractModifierKeysFromFocusShortcuts, m as hasQuerySuggestionsRenderer, c as connect } from './index-
|
|
9
|
-
import { C as ComponentWrapper } from './ComponentWrapper-
|
|
10
|
-
import { T as Title } from './Title-
|
|
11
|
-
import { F as Flex } from './Flex-
|
|
7
|
+
import { t as types } from './vueTypes-b8146772.js';
|
|
8
|
+
import { g as getComponent, h as hasCustomRenderer, f as updateCustomQuery, u as updateDefaultQuery, i as isQueryIdentical, j as getQuerySuggestionsComponent, a as isFunction, k as isEmpty, p as parseFocusShortcuts, l as extractModifierKeysFromFocusShortcuts, m as hasQuerySuggestionsRenderer, c as connect } from './index-7788a843.js';
|
|
9
|
+
import { C as ComponentWrapper } from './ComponentWrapper-424e86fd.js';
|
|
10
|
+
import { T as Title } from './Title-3342664a.js';
|
|
11
|
+
import { F as Flex } from './Flex-1f0795c3.js';
|
|
12
12
|
import hotkeys from 'hotkeys-js';
|
|
13
|
-
import { I as IconWrapper, C as CancelSvg, a as IconGroup, D as Downshift, b as InputWrapper } from './CancelSvg-
|
|
14
|
-
import { n as noSuggestions, s as suggestionsContainer, I as Input, a as suggestions } from './Input-
|
|
15
|
-
import { C as Container } from './Container-
|
|
13
|
+
import { I as IconWrapper, C as CancelSvg, a as IconGroup, D as Downshift, b as InputWrapper } from './CancelSvg-4cfae5fd.js';
|
|
14
|
+
import { n as noSuggestions, s as suggestionsContainer, I as Input, a as suggestions } from './Input-7a2a9fac.js';
|
|
15
|
+
import { C as Container } from './Container-ba826e96.js';
|
|
16
16
|
import Highlight from 'vue-highlight-words';
|
|
17
17
|
|
|
18
18
|
var _templateObject;
|
|
@@ -945,8 +945,6 @@ var DataSearch = {
|
|
|
945
945
|
},
|
|
946
946
|
created: function created() {
|
|
947
947
|
var _this$$props = this.$props,
|
|
948
|
-
enableQuerySuggestions = _this$$props.enableQuerySuggestions,
|
|
949
|
-
renderQuerySuggestions = _this$$props.renderQuerySuggestions,
|
|
950
948
|
enableRecentSearches = _this$$props.enableRecentSearches,
|
|
951
949
|
distinctField = _this$$props.distinctField,
|
|
952
950
|
distinctFieldConfig = _this$$props.distinctFieldConfig,
|
|
@@ -955,16 +953,6 @@ var DataSearch = {
|
|
|
955
953
|
|
|
956
954
|
if (mode === SEARCH_COMPONENTS_MODES.TAG) {
|
|
957
955
|
this.$options.isTagsMode = true;
|
|
958
|
-
} // TODO: Remove in 2.0
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
if (enableQuerySuggestions) {
|
|
962
|
-
console.warn('Warning(ReactiveSearch): The `enableQuerySuggestions` prop has been marked as deprecated, please use the `enablePopularSuggestions` prop instead.');
|
|
963
|
-
} // TODO: Remove in 2.0
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
if (renderQuerySuggestions) {
|
|
967
|
-
console.warn('Warning(ReactiveSearch): The `renderQuerySuggestions` prop has been marked as deprecated, please use the `renderPopularSuggestions` prop instead.');
|
|
968
956
|
}
|
|
969
957
|
|
|
970
958
|
if (this.enableAppbase && this.aggregationField && this.aggregationField !== '') {
|
|
@@ -1017,7 +1005,7 @@ var DataSearch = {
|
|
|
1017
1005
|
return [];
|
|
1018
1006
|
}
|
|
1019
1007
|
|
|
1020
|
-
return this.
|
|
1008
|
+
return this.enablePopularSuggestions ? this.normalizedPopularSuggestions : [];
|
|
1021
1009
|
},
|
|
1022
1010
|
normalizedRecentSearches: function normalizedRecentSearches() {
|
|
1023
1011
|
return this.recentSearches || [];
|
|
@@ -1027,7 +1015,7 @@ var DataSearch = {
|
|
|
1027
1015
|
this.currentValue ? this.popularSuggestions : this.defaultPopularSuggestions || [], this.currentValue, this.showDistinctSuggestions);
|
|
1028
1016
|
},
|
|
1029
1017
|
defaultSearchSuggestions: function defaultSearchSuggestions() {
|
|
1030
|
-
var isPopularSuggestionsEnabled = this.
|
|
1018
|
+
var isPopularSuggestionsEnabled = this.enablePopularSuggestions;
|
|
1031
1019
|
|
|
1032
1020
|
if (this.currentValue || !this.enableDefaultSuggestions) {
|
|
1033
1021
|
return [];
|
|
@@ -1081,7 +1069,6 @@ var DataSearch = {
|
|
|
1081
1069
|
value: VueTypes.oneOfType([VueTypes.arrayOf(VueTypes.string), types.value]),
|
|
1082
1070
|
defaultSuggestions: types.suggestions,
|
|
1083
1071
|
enableSynonyms: VueTypes.bool.def(true),
|
|
1084
|
-
enableQuerySuggestions: VueTypes.bool.def(false),
|
|
1085
1072
|
enablePopularSuggestions: VueTypes.bool.def(false),
|
|
1086
1073
|
enableRecentSearches: VueTypes.bool.def(false),
|
|
1087
1074
|
fieldWeights: types.fieldWeights,
|
|
@@ -1095,7 +1082,6 @@ var DataSearch = {
|
|
|
1095
1082
|
innerClass: types.style,
|
|
1096
1083
|
innerRef: VueTypes.string.def('searchInputField'),
|
|
1097
1084
|
render: types.func,
|
|
1098
|
-
renderQuerySuggestions: types.func,
|
|
1099
1085
|
renderPopularSuggestions: types.func,
|
|
1100
1086
|
parseSuggestion: types.func,
|
|
1101
1087
|
renderNoSuggestion: types.title,
|
|
@@ -1181,8 +1167,12 @@ var DataSearch = {
|
|
|
1181
1167
|
this.setValue(newVal, true, this.$props);
|
|
1182
1168
|
},
|
|
1183
1169
|
value: function value(newVal, oldVal) {
|
|
1184
|
-
if (!isEqual(newVal, oldVal)) {
|
|
1185
|
-
this.
|
|
1170
|
+
if (!isEqual(newVal, oldVal) || this.$options.isTagsMode && !isEqual(newVal, this.selectedTags)) {
|
|
1171
|
+
if (this.isPending && this.$options.isTagsMode && Array.isArray(newVal)) {
|
|
1172
|
+
this.isPending = false;
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
this.setValue(newVal, true, this.$props, undefined, false, typeof newVal !== 'string' && this.$options.isTagsMode);
|
|
1186
1176
|
}
|
|
1187
1177
|
},
|
|
1188
1178
|
defaultQuery: function defaultQuery(newVal, oldVal) {
|
|
@@ -1326,7 +1316,7 @@ var DataSearch = {
|
|
|
1326
1316
|
this.onValueSelectedHandler(currentValue, causes.SEARCH_ICON_CLICK);
|
|
1327
1317
|
}
|
|
1328
1318
|
},
|
|
1329
|
-
setValue: function setValue(value, isDefaultValue, props, cause, toggleIsOpen) {
|
|
1319
|
+
setValue: function setValue(value, isDefaultValue, props, cause, toggleIsOpen, isTagsMode) {
|
|
1330
1320
|
var _this = this;
|
|
1331
1321
|
|
|
1332
1322
|
if (isDefaultValue === void 0) {
|
|
@@ -1341,8 +1331,12 @@ var DataSearch = {
|
|
|
1341
1331
|
toggleIsOpen = true;
|
|
1342
1332
|
}
|
|
1343
1333
|
|
|
1334
|
+
if (isTagsMode === void 0) {
|
|
1335
|
+
isTagsMode = this.$options.isTagsMode;
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1344
1338
|
var performUpdate = function performUpdate() {
|
|
1345
|
-
if (
|
|
1339
|
+
if (isTagsMode && isEqual(value, _this.selectedTags)) {
|
|
1346
1340
|
return;
|
|
1347
1341
|
} // Refresh recent searches when value becomes empty
|
|
1348
1342
|
|
|
@@ -1353,7 +1347,7 @@ var DataSearch = {
|
|
|
1353
1347
|
_this.getRecentSearches();
|
|
1354
1348
|
}
|
|
1355
1349
|
|
|
1356
|
-
if (
|
|
1350
|
+
if (isTagsMode) {
|
|
1357
1351
|
if (Array.isArray(_this.selectedTags) && _this.selectedTags.length) {
|
|
1358
1352
|
// check if value already present in selectedTags
|
|
1359
1353
|
if (typeof value === 'string' && _this.selectedTags.includes(value)) {
|
|
@@ -1366,8 +1360,7 @@ var DataSearch = {
|
|
|
1366
1360
|
if (typeof value === 'string' && !!value) {
|
|
1367
1361
|
_this.selectedTags.push(value);
|
|
1368
1362
|
} else if (Array.isArray(value) && !isEqual(_this.selectedTags, value)) {
|
|
1369
|
-
|
|
1370
|
-
_this.selectedTags = mergedArray;
|
|
1363
|
+
_this.selectedTags = value;
|
|
1371
1364
|
}
|
|
1372
1365
|
} else if (value) {
|
|
1373
1366
|
_this.selectedTags = typeof value !== 'string' ? value : [].concat(value);
|
|
@@ -1380,7 +1373,7 @@ var DataSearch = {
|
|
|
1380
1373
|
|
|
1381
1374
|
var queryHandlerValue = value;
|
|
1382
1375
|
|
|
1383
|
-
if (
|
|
1376
|
+
if (isTagsMode) {
|
|
1384
1377
|
queryHandlerValue = Array.isArray(_this.selectedTags) && _this.selectedTags.length ? _this.selectedTags : undefined;
|
|
1385
1378
|
}
|
|
1386
1379
|
|
|
@@ -1558,19 +1551,40 @@ var DataSearch = {
|
|
|
1558
1551
|
this.$emit('key-down', event, this.triggerQuery);
|
|
1559
1552
|
},
|
|
1560
1553
|
onInputChange: function onInputChange(e) {
|
|
1554
|
+
var _this2 = this;
|
|
1555
|
+
|
|
1561
1556
|
var inputValue = e.target.value;
|
|
1562
1557
|
|
|
1563
1558
|
if (!this.$data.isOpen) {
|
|
1564
1559
|
this.isOpen = true;
|
|
1565
1560
|
}
|
|
1566
1561
|
|
|
1567
|
-
var
|
|
1562
|
+
var _this$$props2 = this.$props,
|
|
1563
|
+
value = _this$$props2.value,
|
|
1564
|
+
autosuggest = _this$$props2.autosuggest;
|
|
1568
1565
|
|
|
1569
1566
|
if (value === undefined) {
|
|
1570
|
-
this.setValue(inputValue);
|
|
1567
|
+
this.setValue(inputValue, false, this.$props, undefined, true, false);
|
|
1571
1568
|
} else {
|
|
1572
1569
|
this.isPending = true;
|
|
1573
|
-
this.$emit('change', inputValue,
|
|
1570
|
+
this.$emit('change', inputValue, function (_temp2) {
|
|
1571
|
+
var _ref3 = _temp2 === void 0 ? {} : _temp2,
|
|
1572
|
+
_ref3$isOpen = _ref3.isOpen,
|
|
1573
|
+
isOpen = _ref3$isOpen === void 0 ? false : _ref3$isOpen;
|
|
1574
|
+
|
|
1575
|
+
if (_this2.$options.isTagsMode && autosuggest) {
|
|
1576
|
+
_this2.currentValue = value;
|
|
1577
|
+
_this2.isOpen = isOpen;
|
|
1578
|
+
|
|
1579
|
+
_this2.updateDefaultQueryHandler(_this2.currentValue, _this2.$props);
|
|
1580
|
+
|
|
1581
|
+
return;
|
|
1582
|
+
}
|
|
1583
|
+
|
|
1584
|
+
_this2.triggerQuery({
|
|
1585
|
+
isOpen: isOpen
|
|
1586
|
+
});
|
|
1587
|
+
}, e);
|
|
1574
1588
|
}
|
|
1575
1589
|
},
|
|
1576
1590
|
onSuggestionSelected: function onSuggestionSelected(suggestion) {
|
|
@@ -1665,9 +1679,9 @@ var DataSearch = {
|
|
|
1665
1679
|
}
|
|
1666
1680
|
|
|
1667
1681
|
var h = this.$createElement;
|
|
1668
|
-
var _this$$
|
|
1669
|
-
theme = _this$$
|
|
1670
|
-
innerClass = _this$$
|
|
1682
|
+
var _this$$props3 = this.$props,
|
|
1683
|
+
theme = _this$$props3.theme,
|
|
1684
|
+
innerClass = _this$$props3.innerClass;
|
|
1671
1685
|
var renderNoSuggestion = this.$scopedSlots.renderNoSuggestion || this.$props.renderNoSuggestion;
|
|
1672
1686
|
var renderError = this.$scopedSlots.renderError || this.$props.renderError;
|
|
1673
1687
|
var _this$$data = this.$data,
|
|
@@ -1703,7 +1717,7 @@ var DataSearch = {
|
|
|
1703
1717
|
return null;
|
|
1704
1718
|
},
|
|
1705
1719
|
renderTag: function renderTag(item) {
|
|
1706
|
-
var
|
|
1720
|
+
var _this3 = this;
|
|
1707
1721
|
|
|
1708
1722
|
var h = this.$createElement;
|
|
1709
1723
|
var innerClass = this.$props.innerClass;
|
|
@@ -1717,7 +1731,7 @@ var DataSearch = {
|
|
|
1717
1731
|
"class": "close-icon",
|
|
1718
1732
|
"on": {
|
|
1719
1733
|
"click": function click() {
|
|
1720
|
-
return
|
|
1734
|
+
return _this3.clearTag(item);
|
|
1721
1735
|
}
|
|
1722
1736
|
}
|
|
1723
1737
|
}, [h(CancelSvg)])]);
|
|
@@ -1741,7 +1755,7 @@ var DataSearch = {
|
|
|
1741
1755
|
}
|
|
1742
1756
|
},
|
|
1743
1757
|
renderTags: function renderTags() {
|
|
1744
|
-
var
|
|
1758
|
+
var _this4 = this;
|
|
1745
1759
|
|
|
1746
1760
|
var h = this.$createElement;
|
|
1747
1761
|
|
|
@@ -1757,7 +1771,7 @@ var DataSearch = {
|
|
|
1757
1771
|
handleClear: this.clearTag,
|
|
1758
1772
|
handleClearAll: this.clearAllTags
|
|
1759
1773
|
}) : h(TagsContainer, [tagsList.map(function (item) {
|
|
1760
|
-
return
|
|
1774
|
+
return _this4.renderTag(item);
|
|
1761
1775
|
}), shouldRenderClearAllTag && h(TagItem, {
|
|
1762
1776
|
"class": getClassName$1(this.$props.innerClass, 'selected-tag') || ''
|
|
1763
1777
|
}, [h("span", ["Clear All"]), h("span", {
|
|
@@ -1783,13 +1797,13 @@ var DataSearch = {
|
|
|
1783
1797
|
},
|
|
1784
1798
|
renderIcons: function renderIcons() {
|
|
1785
1799
|
var h = this.$createElement;
|
|
1786
|
-
var _this$$
|
|
1787
|
-
iconPosition = _this$$
|
|
1788
|
-
showClear = _this$$
|
|
1789
|
-
innerClass = _this$$
|
|
1790
|
-
getMicInstance = _this$$
|
|
1791
|
-
showVoiceSearch = _this$$
|
|
1792
|
-
showIcon = _this$$
|
|
1800
|
+
var _this$$props4 = this.$props,
|
|
1801
|
+
iconPosition = _this$$props4.iconPosition,
|
|
1802
|
+
showClear = _this$$props4.showClear,
|
|
1803
|
+
innerClass = _this$$props4.innerClass,
|
|
1804
|
+
getMicInstance = _this$$props4.getMicInstance,
|
|
1805
|
+
showVoiceSearch = _this$$props4.showVoiceSearch,
|
|
1806
|
+
showIcon = _this$$props4.showIcon;
|
|
1793
1807
|
var renderMic = this.$scopedSlots.renderMic || this.$props.renderMic;
|
|
1794
1808
|
var currentValue = this.$data.currentValue;
|
|
1795
1809
|
return h("div", [h(IconGroup, {
|
|
@@ -1841,7 +1855,7 @@ var DataSearch = {
|
|
|
1841
1855
|
(_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
|
|
1842
1856
|
},
|
|
1843
1857
|
listenForFocusShortcuts: function listenForFocusShortcuts() {
|
|
1844
|
-
var
|
|
1858
|
+
var _this5 = this;
|
|
1845
1859
|
|
|
1846
1860
|
var _this$$props$focusSho = this.$props.focusShortcuts,
|
|
1847
1861
|
focusShortcuts = _this$$props$focusSho === void 0 ? ['/'] : _this$$props$focusSho;
|
|
@@ -1859,7 +1873,7 @@ var DataSearch = {
|
|
|
1859
1873
|
// Prevent the default refresh event under WINDOWS system
|
|
1860
1874
|
event.preventDefault();
|
|
1861
1875
|
|
|
1862
|
-
|
|
1876
|
+
_this5.focusSearchBox(event);
|
|
1863
1877
|
}); // if one of modifier keys are used, they are handled below
|
|
1864
1878
|
|
|
1865
1879
|
hotkeys('*', function (event) {
|
|
@@ -1870,7 +1884,7 @@ var DataSearch = {
|
|
|
1870
1884
|
var element = modifierKeys[index];
|
|
1871
1885
|
|
|
1872
1886
|
if (hotkeys[element]) {
|
|
1873
|
-
|
|
1887
|
+
_this5.focusSearchBox(event);
|
|
1874
1888
|
|
|
1875
1889
|
break;
|
|
1876
1890
|
}
|
|
@@ -1879,14 +1893,14 @@ var DataSearch = {
|
|
|
1879
1893
|
}
|
|
1880
1894
|
},
|
|
1881
1895
|
render: function render() {
|
|
1882
|
-
var
|
|
1896
|
+
var _this6 = this;
|
|
1883
1897
|
|
|
1884
1898
|
var h = arguments[0];
|
|
1885
|
-
var _this$$
|
|
1886
|
-
theme = _this$$
|
|
1887
|
-
size = _this$$
|
|
1888
|
-
expandSuggestionsContainer = _this$$
|
|
1889
|
-
enableDefaultSuggestions = _this$$
|
|
1899
|
+
var _this$$props5 = this.$props,
|
|
1900
|
+
theme = _this$$props5.theme,
|
|
1901
|
+
size = _this$$props5.size,
|
|
1902
|
+
expandSuggestionsContainer = _this$$props5.expandSuggestionsContainer,
|
|
1903
|
+
enableDefaultSuggestions = _this$$props5.enableDefaultSuggestions;
|
|
1890
1904
|
var _this$$scopedSlots = this.$scopedSlots,
|
|
1891
1905
|
recentSearchesIcon = _this$$scopedSlots.recentSearchesIcon,
|
|
1892
1906
|
popularSearchesIcon = _this$$scopedSlots.popularSearchesIcon;
|
|
@@ -1908,24 +1922,24 @@ var DataSearch = {
|
|
|
1908
1922
|
"isOpen": this.$data.isOpen
|
|
1909
1923
|
},
|
|
1910
1924
|
"scopedSlots": {
|
|
1911
|
-
"default": function _default(
|
|
1912
|
-
var getInputEvents =
|
|
1913
|
-
getInputProps =
|
|
1914
|
-
getItemProps =
|
|
1915
|
-
getItemEvents =
|
|
1916
|
-
isOpen =
|
|
1917
|
-
highlightedIndex =
|
|
1918
|
-
setHighlightedIndex =
|
|
1925
|
+
"default": function _default(_ref4) {
|
|
1926
|
+
var getInputEvents = _ref4.getInputEvents,
|
|
1927
|
+
getInputProps = _ref4.getInputProps,
|
|
1928
|
+
getItemProps = _ref4.getItemProps,
|
|
1929
|
+
getItemEvents = _ref4.getItemEvents,
|
|
1930
|
+
isOpen = _ref4.isOpen,
|
|
1931
|
+
highlightedIndex = _ref4.highlightedIndex,
|
|
1932
|
+
setHighlightedIndex = _ref4.setHighlightedIndex;
|
|
1919
1933
|
|
|
1920
1934
|
var renderSuggestionsContainer = function renderSuggestionsContainer() {
|
|
1921
|
-
return h("div", [
|
|
1935
|
+
return h("div", [_this6.hasCustomRenderer && _this6.getComponent({
|
|
1922
1936
|
isOpen: isOpen,
|
|
1923
1937
|
getItemProps: getItemProps,
|
|
1924
1938
|
getItemEvents: getItemEvents,
|
|
1925
1939
|
highlightedIndex: highlightedIndex
|
|
1926
|
-
}),
|
|
1927
|
-
"class": suggestions(
|
|
1928
|
-
}, [
|
|
1940
|
+
}), _this6.renderErrorComponent(), !_this6.hasCustomRenderer && isOpen && hasSuggestions ? h("ul", {
|
|
1941
|
+
"class": suggestions(_this6.themePreset, theme) + " " + getClassName$1(_this6.$props.innerClass, 'list')
|
|
1942
|
+
}, [_this6.suggestionsList.slice(0, size || 10).map(function (item, index) {
|
|
1929
1943
|
return h("li", {
|
|
1930
1944
|
"domProps": _extends({}, getItemProps({
|
|
1931
1945
|
item: item
|
|
@@ -1935,15 +1949,15 @@ var DataSearch = {
|
|
|
1935
1949
|
})),
|
|
1936
1950
|
"key": index + 1 + "-" + item.value,
|
|
1937
1951
|
"style": {
|
|
1938
|
-
backgroundColor:
|
|
1952
|
+
backgroundColor: _this6.getBackgroundColor(highlightedIndex, index)
|
|
1939
1953
|
}
|
|
1940
1954
|
}, [h(SuggestionItem, {
|
|
1941
1955
|
"attrs": {
|
|
1942
|
-
"currentValue":
|
|
1956
|
+
"currentValue": _this6.currentValue,
|
|
1943
1957
|
"suggestion": item
|
|
1944
1958
|
}
|
|
1945
1959
|
})]);
|
|
1946
|
-
}),
|
|
1960
|
+
}), _this6.defaultSearchSuggestions.map(function (sugg, index) {
|
|
1947
1961
|
return h("li", {
|
|
1948
1962
|
"domProps": _extends({}, getItemProps({
|
|
1949
1963
|
item: sugg
|
|
@@ -1951,9 +1965,9 @@ var DataSearch = {
|
|
|
1951
1965
|
"on": _extends({}, getItemEvents({
|
|
1952
1966
|
item: sugg
|
|
1953
1967
|
})),
|
|
1954
|
-
"key":
|
|
1968
|
+
"key": _this6.suggestionsList.length + index + 1 + "-" + sugg.value,
|
|
1955
1969
|
"style": {
|
|
1956
|
-
backgroundColor:
|
|
1970
|
+
backgroundColor: _this6.getBackgroundColor(highlightedIndex, _this6.suggestionsList.length + index),
|
|
1957
1971
|
justifyContent: 'flex-start'
|
|
1958
1972
|
}
|
|
1959
1973
|
}, [h("div", {
|
|
@@ -1962,28 +1976,28 @@ var DataSearch = {
|
|
|
1962
1976
|
}
|
|
1963
1977
|
}, [sugg.source && sugg.source._recent_search && h(CustomSvg, {
|
|
1964
1978
|
"attrs": {
|
|
1965
|
-
"className": getClassName$1(
|
|
1979
|
+
"className": getClassName$1(_this6.$props.innerClass, 'recent-search-icon') || null,
|
|
1966
1980
|
"icon": recentSearchesIcon,
|
|
1967
1981
|
"type": "recent-search-icon"
|
|
1968
1982
|
}
|
|
1969
1983
|
}), sugg.source && sugg.source._popular_suggestion && h(CustomSvg, {
|
|
1970
1984
|
"attrs": {
|
|
1971
|
-
"className": getClassName$1(
|
|
1985
|
+
"className": getClassName$1(_this6.$props.innerClass, 'popular-search-icon') || null,
|
|
1972
1986
|
"icon": popularSearchesIcon,
|
|
1973
1987
|
"type": "popular-search-icon"
|
|
1974
1988
|
}
|
|
1975
1989
|
})]), h(SuggestionItem, {
|
|
1976
1990
|
"attrs": {
|
|
1977
|
-
"currentValue":
|
|
1991
|
+
"currentValue": _this6.currentValue,
|
|
1978
1992
|
"suggestion": sugg
|
|
1979
1993
|
}
|
|
1980
1994
|
})]);
|
|
1981
|
-
}), hasQuerySuggestionsRenderer(
|
|
1995
|
+
}), hasQuerySuggestionsRenderer(_this6) ? _this6.getComponent({
|
|
1982
1996
|
isOpen: isOpen,
|
|
1983
1997
|
getItemProps: getItemProps,
|
|
1984
1998
|
getItemEvents: getItemEvents,
|
|
1985
1999
|
highlightedIndex: highlightedIndex
|
|
1986
|
-
}, true) :
|
|
2000
|
+
}, true) : _this6.topSuggestions.map(function (sugg, index) {
|
|
1987
2001
|
return h("li", {
|
|
1988
2002
|
"domProps": _extends({}, getItemProps({
|
|
1989
2003
|
item: sugg
|
|
@@ -1991,9 +2005,9 @@ var DataSearch = {
|
|
|
1991
2005
|
"on": _extends({}, getItemEvents({
|
|
1992
2006
|
item: sugg
|
|
1993
2007
|
})),
|
|
1994
|
-
"key":
|
|
2008
|
+
"key": _this6.suggestionsList.length + index + 1 + "-" + sugg.value,
|
|
1995
2009
|
"style": {
|
|
1996
|
-
backgroundColor:
|
|
2010
|
+
backgroundColor: _this6.getBackgroundColor(highlightedIndex, _this6.suggestionsList.length + index),
|
|
1997
2011
|
justifyContent: 'flex-start'
|
|
1998
2012
|
}
|
|
1999
2013
|
}, [h("div", {
|
|
@@ -2002,61 +2016,61 @@ var DataSearch = {
|
|
|
2002
2016
|
}
|
|
2003
2017
|
}, [h(CustomSvg, {
|
|
2004
2018
|
"attrs": {
|
|
2005
|
-
"className": getClassName$1(
|
|
2019
|
+
"className": getClassName$1(_this6.$props.innerClass, 'popular-search-icon') || null,
|
|
2006
2020
|
"icon": popularSearchesIcon,
|
|
2007
2021
|
"type": "popular-search-icon"
|
|
2008
2022
|
}
|
|
2009
2023
|
})]), h(SuggestionItem, {
|
|
2010
2024
|
"attrs": {
|
|
2011
|
-
"currentValue":
|
|
2025
|
+
"currentValue": _this6.currentValue,
|
|
2012
2026
|
"suggestion": sugg
|
|
2013
2027
|
}
|
|
2014
2028
|
})]);
|
|
2015
|
-
})]) :
|
|
2029
|
+
})]) : _this6.renderNoSuggestions(_this6.suggestionsList)]);
|
|
2016
2030
|
};
|
|
2017
2031
|
|
|
2018
2032
|
return h("div", {
|
|
2019
2033
|
"class": suggestionsContainer
|
|
2020
|
-
}, [h(InputGroup, [
|
|
2034
|
+
}, [h(InputGroup, [_this6.renderInputAddonBefore(), h(InputWrapper, [h(Input, {
|
|
2021
2035
|
"attrs": {
|
|
2022
|
-
"id":
|
|
2023
|
-
"showIcon":
|
|
2024
|
-
"showClear":
|
|
2025
|
-
"iconPosition":
|
|
2026
|
-
"placeholder":
|
|
2027
|
-
"autoFocus":
|
|
2028
|
-
"themePreset":
|
|
2036
|
+
"id": _this6.$props.componentId + "-input",
|
|
2037
|
+
"showIcon": _this6.$props.showIcon,
|
|
2038
|
+
"showClear": _this6.$props.showClear,
|
|
2039
|
+
"iconPosition": _this6.$props.iconPosition,
|
|
2040
|
+
"placeholder": _this6.$props.placeholder,
|
|
2041
|
+
"autoFocus": _this6.$props.autoFocus,
|
|
2042
|
+
"themePreset": _this6.themePreset,
|
|
2029
2043
|
"autocomplete": "off"
|
|
2030
2044
|
},
|
|
2031
|
-
"ref":
|
|
2032
|
-
"class": getClassName$1(
|
|
2045
|
+
"ref": _this6.$props.innerRef,
|
|
2046
|
+
"class": getClassName$1(_this6.$props.innerClass, 'input'),
|
|
2033
2047
|
"on": _extends({}, getInputEvents({
|
|
2034
|
-
onInput:
|
|
2048
|
+
onInput: _this6.onInputChange,
|
|
2035
2049
|
onBlur: function onBlur(e) {
|
|
2036
|
-
|
|
2050
|
+
_this6.$emit('blur', e, _this6.triggerQuery);
|
|
2037
2051
|
},
|
|
2038
|
-
onFocus:
|
|
2052
|
+
onFocus: _this6.handleFocus,
|
|
2039
2053
|
onKeyPress: function onKeyPress(e) {
|
|
2040
|
-
|
|
2054
|
+
_this6.$emit('keyPress', e, _this6.triggerQuery);
|
|
2041
2055
|
|
|
2042
|
-
|
|
2056
|
+
_this6.$emit('key-press', e, _this6.triggerQuery);
|
|
2043
2057
|
},
|
|
2044
2058
|
onKeyDown: function onKeyDown(e) {
|
|
2045
|
-
return
|
|
2059
|
+
return _this6.handleKeyDown(e, highlightedIndex);
|
|
2046
2060
|
},
|
|
2047
2061
|
onKeyUp: function onKeyUp(e) {
|
|
2048
|
-
|
|
2062
|
+
_this6.$emit('keyUp', e, _this6.triggerQuery);
|
|
2049
2063
|
|
|
2050
|
-
|
|
2064
|
+
_this6.$emit('key-up', e, _this6.triggerQuery);
|
|
2051
2065
|
},
|
|
2052
2066
|
onClick: function onClick() {
|
|
2053
2067
|
setHighlightedIndex(null);
|
|
2054
2068
|
}
|
|
2055
2069
|
})),
|
|
2056
2070
|
"domProps": _extends({}, getInputProps({
|
|
2057
|
-
value:
|
|
2071
|
+
value: _this6.$data.currentValue === null ? '' : _this6.$data.currentValue
|
|
2058
2072
|
}))
|
|
2059
|
-
}),
|
|
2073
|
+
}), _this6.renderIcons(), !expandSuggestionsContainer && renderSuggestionsContainer()]), ' ', _this6.renderInputAddonAfter()]), expandSuggestionsContainer && renderSuggestionsContainer(), _this6.renderTags()]);
|
|
2060
2074
|
}
|
|
2061
2075
|
}
|
|
2062
2076
|
}) : h("div", {
|
|
@@ -2072,26 +2086,26 @@ var DataSearch = {
|
|
|
2072
2086
|
},
|
|
2073
2087
|
"on": _extends({}, {
|
|
2074
2088
|
blur: function blur(e) {
|
|
2075
|
-
|
|
2089
|
+
_this6.$emit('blur', e, _this6.triggerQuery);
|
|
2076
2090
|
},
|
|
2077
2091
|
keypress: function keypress(e) {
|
|
2078
|
-
|
|
2092
|
+
_this6.$emit('keyPress', e, _this6.triggerQuery);
|
|
2079
2093
|
|
|
2080
|
-
|
|
2094
|
+
_this6.$emit('key-press', e, _this6.triggerQuery);
|
|
2081
2095
|
},
|
|
2082
2096
|
input: this.onInputChange,
|
|
2083
2097
|
focus: function focus(e) {
|
|
2084
|
-
|
|
2098
|
+
_this6.$emit('focus', e, _this6.triggerQuery);
|
|
2085
2099
|
},
|
|
2086
2100
|
keydown: function keydown(e) {
|
|
2087
|
-
|
|
2101
|
+
_this6.$emit('keyDown', e, _this6.triggerQuery);
|
|
2088
2102
|
|
|
2089
|
-
|
|
2103
|
+
_this6.$emit('key-down', e, _this6.triggerQuery);
|
|
2090
2104
|
},
|
|
2091
2105
|
keyup: function keyup(e) {
|
|
2092
|
-
|
|
2106
|
+
_this6.$emit('keyUp', e, _this6.triggerQuery);
|
|
2093
2107
|
|
|
2094
|
-
|
|
2108
|
+
_this6.$emit('key-up', e, _this6.triggerQuery);
|
|
2095
2109
|
}
|
|
2096
2110
|
}),
|
|
2097
2111
|
"domProps": _extends({}, {
|
package/dist/es/DataSearch.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import '@appbaseio/reactivecore';
|
|
2
|
-
import './_rollupPluginBabelHelpers-
|
|
2
|
+
import './_rollupPluginBabelHelpers-76660dab.js';
|
|
3
3
|
import 'vue-types';
|
|
4
4
|
import '@appbaseio/reactivecore/lib/utils/constants';
|
|
5
5
|
import '@appbaseio/reactivecore/lib/utils/helper';
|
|
6
6
|
import 'emotion';
|
|
7
7
|
import '@appbaseio/vue-emotion';
|
|
8
8
|
import 'polished';
|
|
9
|
-
import './vueTypes-
|
|
9
|
+
import './vueTypes-b8146772.js';
|
|
10
10
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
11
11
|
import 'redux';
|
|
12
|
-
import './index-
|
|
13
|
-
import './ComponentWrapper-
|
|
14
|
-
import './Title-
|
|
15
|
-
import './Flex-
|
|
12
|
+
import './index-7788a843.js';
|
|
13
|
+
import './ComponentWrapper-424e86fd.js';
|
|
14
|
+
import './Title-3342664a.js';
|
|
15
|
+
import './Flex-1f0795c3.js';
|
|
16
16
|
import 'hotkeys-js';
|
|
17
|
-
export { D as default } from './DataSearch-
|
|
18
|
-
import './CancelSvg-
|
|
19
|
-
import './Input-
|
|
17
|
+
export { D as default } from './DataSearch-c40e26c7.js';
|
|
18
|
+
import './CancelSvg-4cfae5fd.js';
|
|
19
|
+
import './Input-7a2a9fac.js';
|
|
20
20
|
import 'compute-scroll-into-view';
|
|
21
|
-
import './Container-
|
|
21
|
+
import './Container-ba826e96.js';
|
|
22
22
|
import 'vue-highlight-words';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { helper } from '@appbaseio/reactivecore';
|
|
2
|
-
import { _ as _taggedTemplateLiteralLoose, a as _extends } from './_rollupPluginBabelHelpers-
|
|
2
|
+
import { _ as _taggedTemplateLiteralLoose, a as _extends } from './_rollupPluginBabelHelpers-76660dab.js';
|
|
3
3
|
import VueTypes from 'vue-types';
|
|
4
4
|
import { css } from 'emotion';
|
|
5
5
|
import styled from '@appbaseio/vue-emotion';
|
|
6
|
-
import { t as types } from './vueTypes-
|
|
7
|
-
import { a as isFunction } from './index-
|
|
6
|
+
import { t as types } from './vueTypes-b8146772.js';
|
|
7
|
+
import { a as isFunction } from './index-7788a843.js';
|
|
8
8
|
import _mergeJSXProps from '@vue/babel-helper-vue-jsx-merge-props';
|
|
9
|
-
import { D as Downshift, b as InputWrapper, a as IconGroup, I as IconWrapper, C as CancelSvg } from './CancelSvg-
|
|
10
|
-
import { s as suggestionsContainer, a as suggestions, I as Input } from './Input-
|
|
9
|
+
import { D as Downshift, b as InputWrapper, a as IconGroup, I as IconWrapper, C as CancelSvg } from './CancelSvg-4cfae5fd.js';
|
|
10
|
+
import { s as suggestionsContainer, a as suggestions, I as Input } from './Input-7a2a9fac.js';
|
|
11
11
|
import { replaceDiacritics } from '@appbaseio/reactivecore/lib/utils/suggestions';
|
|
12
12
|
|
|
13
13
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Actions, helper } from '@appbaseio/reactivecore';
|
|
2
|
-
import { a as _extends } from './_rollupPluginBabelHelpers-
|
|
2
|
+
import { a as _extends } from './_rollupPluginBabelHelpers-76660dab.js';
|
|
3
3
|
import VueTypes from 'vue-types';
|
|
4
4
|
import { componentTypes } from '@appbaseio/reactivecore/lib/utils/constants';
|
|
5
5
|
import '@appbaseio/vue-emotion';
|
|
6
|
-
import { t as types } from './vueTypes-
|
|
6
|
+
import { t as types } from './vueTypes-b8146772.js';
|
|
7
7
|
import 'redux';
|
|
8
|
-
import { f as updateCustomQuery, d as getValidPropsKeys, i as isQueryIdentical, c as connect } from './index-
|
|
9
|
-
import { T as Title } from './Title-
|
|
10
|
-
import { C as Container } from './Container-
|
|
8
|
+
import { f as updateCustomQuery, d as getValidPropsKeys, i as isQueryIdentical, c as connect } from './index-7788a843.js';
|
|
9
|
+
import { T as Title } from './Title-3342664a.js';
|
|
10
|
+
import { C as Container } from './Container-ba826e96.js';
|
|
11
11
|
import NoSSR from 'vue-no-ssr';
|
|
12
|
-
import { g as getComponents, S as Slider } from './ssr-
|
|
12
|
+
import { g as getComponents, S as Slider } from './ssr-b2c0b401.js';
|
|
13
13
|
|
|
14
14
|
var addComponent = Actions.addComponent,
|
|
15
15
|
removeComponent = Actions.removeComponent,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-
|
|
1
|
+
import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-76660dab.js';
|
|
2
2
|
import { css } from 'emotion';
|
|
3
3
|
import styled from '@appbaseio/vue-emotion';
|
|
4
4
|
import { lighten } from 'polished';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-
|
|
1
|
+
import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-76660dab.js';
|
|
2
2
|
import { css } from 'emotion';
|
|
3
3
|
import styled from '@appbaseio/vue-emotion';
|
|
4
4
|
import { lighten } from 'polished';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-
|
|
1
|
+
import { _ as _taggedTemplateLiteralLoose } from './_rollupPluginBabelHelpers-76660dab.js';
|
|
2
2
|
import { css } from 'emotion';
|
|
3
3
|
import styled from '@appbaseio/vue-emotion';
|
|
4
4
|
import { lighten } from 'polished';
|
|
5
|
-
import './Title-
|
|
5
|
+
import './Title-3342664a.js';
|
|
6
6
|
|
|
7
7
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
8
8
|
var container = css(_templateObject || (_templateObject = _taggedTemplateLiteralLoose(["\n\tdisplay: flex;\n\tflex-direction: column;\n\tmargin: 0;\n\tborder-radius: 0.25rem;\n\toverflow: hidden;\n"])));
|