@appbaseio/reactivesearch-vue 1.31.0 → 1.32.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 +9763 -316
- 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-d389fbe7.js} +126 -111
- 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-3b864d8f.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-b88ef6ee.js} +126 -111
- 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-a1fd08ae.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,
|
|
@@ -1182,7 +1168,11 @@ var DataSearch = {
|
|
|
1182
1168
|
},
|
|
1183
1169
|
value: function value(newVal, oldVal) {
|
|
1184
1170
|
if (!isEqual(newVal, oldVal)) {
|
|
1185
|
-
this.
|
|
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)) {
|
|
@@ -1380,7 +1374,7 @@ var DataSearch = {
|
|
|
1380
1374
|
|
|
1381
1375
|
var queryHandlerValue = value;
|
|
1382
1376
|
|
|
1383
|
-
if (
|
|
1377
|
+
if (isTagsMode) {
|
|
1384
1378
|
queryHandlerValue = Array.isArray(_this.selectedTags) && _this.selectedTags.length ? _this.selectedTags : undefined;
|
|
1385
1379
|
}
|
|
1386
1380
|
|
|
@@ -1558,19 +1552,40 @@ var DataSearch = {
|
|
|
1558
1552
|
this.$emit('key-down', event, this.triggerQuery);
|
|
1559
1553
|
},
|
|
1560
1554
|
onInputChange: function onInputChange(e) {
|
|
1555
|
+
var _this2 = this;
|
|
1556
|
+
|
|
1561
1557
|
var inputValue = e.target.value;
|
|
1562
1558
|
|
|
1563
1559
|
if (!this.$data.isOpen) {
|
|
1564
1560
|
this.isOpen = true;
|
|
1565
1561
|
}
|
|
1566
1562
|
|
|
1567
|
-
var
|
|
1563
|
+
var _this$$props2 = this.$props,
|
|
1564
|
+
value = _this$$props2.value,
|
|
1565
|
+
autosuggest = _this$$props2.autosuggest;
|
|
1568
1566
|
|
|
1569
1567
|
if (value === undefined) {
|
|
1570
|
-
this.setValue(inputValue);
|
|
1568
|
+
this.setValue(inputValue, false, this.$props, undefined, true, false);
|
|
1571
1569
|
} else {
|
|
1572
1570
|
this.isPending = true;
|
|
1573
|
-
this.$emit('change', inputValue,
|
|
1571
|
+
this.$emit('change', inputValue, function (_temp2) {
|
|
1572
|
+
var _ref3 = _temp2 === void 0 ? {} : _temp2,
|
|
1573
|
+
_ref3$isOpen = _ref3.isOpen,
|
|
1574
|
+
isOpen = _ref3$isOpen === void 0 ? false : _ref3$isOpen;
|
|
1575
|
+
|
|
1576
|
+
if (_this2.$options.isTagsMode && autosuggest) {
|
|
1577
|
+
_this2.currentValue = value;
|
|
1578
|
+
_this2.isOpen = isOpen;
|
|
1579
|
+
|
|
1580
|
+
_this2.updateDefaultQueryHandler(_this2.currentValue, _this2.$props);
|
|
1581
|
+
|
|
1582
|
+
return;
|
|
1583
|
+
}
|
|
1584
|
+
|
|
1585
|
+
_this2.triggerQuery({
|
|
1586
|
+
isOpen: isOpen
|
|
1587
|
+
});
|
|
1588
|
+
}, e);
|
|
1574
1589
|
}
|
|
1575
1590
|
},
|
|
1576
1591
|
onSuggestionSelected: function onSuggestionSelected(suggestion) {
|
|
@@ -1665,9 +1680,9 @@ var DataSearch = {
|
|
|
1665
1680
|
}
|
|
1666
1681
|
|
|
1667
1682
|
var h = this.$createElement;
|
|
1668
|
-
var _this$$
|
|
1669
|
-
theme = _this$$
|
|
1670
|
-
innerClass = _this$$
|
|
1683
|
+
var _this$$props3 = this.$props,
|
|
1684
|
+
theme = _this$$props3.theme,
|
|
1685
|
+
innerClass = _this$$props3.innerClass;
|
|
1671
1686
|
var renderNoSuggestion = this.$scopedSlots.renderNoSuggestion || this.$props.renderNoSuggestion;
|
|
1672
1687
|
var renderError = this.$scopedSlots.renderError || this.$props.renderError;
|
|
1673
1688
|
var _this$$data = this.$data,
|
|
@@ -1703,7 +1718,7 @@ var DataSearch = {
|
|
|
1703
1718
|
return null;
|
|
1704
1719
|
},
|
|
1705
1720
|
renderTag: function renderTag(item) {
|
|
1706
|
-
var
|
|
1721
|
+
var _this3 = this;
|
|
1707
1722
|
|
|
1708
1723
|
var h = this.$createElement;
|
|
1709
1724
|
var innerClass = this.$props.innerClass;
|
|
@@ -1717,7 +1732,7 @@ var DataSearch = {
|
|
|
1717
1732
|
"class": "close-icon",
|
|
1718
1733
|
"on": {
|
|
1719
1734
|
"click": function click() {
|
|
1720
|
-
return
|
|
1735
|
+
return _this3.clearTag(item);
|
|
1721
1736
|
}
|
|
1722
1737
|
}
|
|
1723
1738
|
}, [h(CancelSvg)])]);
|
|
@@ -1741,7 +1756,7 @@ var DataSearch = {
|
|
|
1741
1756
|
}
|
|
1742
1757
|
},
|
|
1743
1758
|
renderTags: function renderTags() {
|
|
1744
|
-
var
|
|
1759
|
+
var _this4 = this;
|
|
1745
1760
|
|
|
1746
1761
|
var h = this.$createElement;
|
|
1747
1762
|
|
|
@@ -1757,7 +1772,7 @@ var DataSearch = {
|
|
|
1757
1772
|
handleClear: this.clearTag,
|
|
1758
1773
|
handleClearAll: this.clearAllTags
|
|
1759
1774
|
}) : h(TagsContainer, [tagsList.map(function (item) {
|
|
1760
|
-
return
|
|
1775
|
+
return _this4.renderTag(item);
|
|
1761
1776
|
}), shouldRenderClearAllTag && h(TagItem, {
|
|
1762
1777
|
"class": getClassName$1(this.$props.innerClass, 'selected-tag') || ''
|
|
1763
1778
|
}, [h("span", ["Clear All"]), h("span", {
|
|
@@ -1783,13 +1798,13 @@ var DataSearch = {
|
|
|
1783
1798
|
},
|
|
1784
1799
|
renderIcons: function renderIcons() {
|
|
1785
1800
|
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$$
|
|
1801
|
+
var _this$$props4 = this.$props,
|
|
1802
|
+
iconPosition = _this$$props4.iconPosition,
|
|
1803
|
+
showClear = _this$$props4.showClear,
|
|
1804
|
+
innerClass = _this$$props4.innerClass,
|
|
1805
|
+
getMicInstance = _this$$props4.getMicInstance,
|
|
1806
|
+
showVoiceSearch = _this$$props4.showVoiceSearch,
|
|
1807
|
+
showIcon = _this$$props4.showIcon;
|
|
1793
1808
|
var renderMic = this.$scopedSlots.renderMic || this.$props.renderMic;
|
|
1794
1809
|
var currentValue = this.$data.currentValue;
|
|
1795
1810
|
return h("div", [h(IconGroup, {
|
|
@@ -1841,7 +1856,7 @@ var DataSearch = {
|
|
|
1841
1856
|
(_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
1857
|
},
|
|
1843
1858
|
listenForFocusShortcuts: function listenForFocusShortcuts() {
|
|
1844
|
-
var
|
|
1859
|
+
var _this5 = this;
|
|
1845
1860
|
|
|
1846
1861
|
var _this$$props$focusSho = this.$props.focusShortcuts,
|
|
1847
1862
|
focusShortcuts = _this$$props$focusSho === void 0 ? ['/'] : _this$$props$focusSho;
|
|
@@ -1859,7 +1874,7 @@ var DataSearch = {
|
|
|
1859
1874
|
// Prevent the default refresh event under WINDOWS system
|
|
1860
1875
|
event.preventDefault();
|
|
1861
1876
|
|
|
1862
|
-
|
|
1877
|
+
_this5.focusSearchBox(event);
|
|
1863
1878
|
}); // if one of modifier keys are used, they are handled below
|
|
1864
1879
|
|
|
1865
1880
|
hotkeys('*', function (event) {
|
|
@@ -1870,7 +1885,7 @@ var DataSearch = {
|
|
|
1870
1885
|
var element = modifierKeys[index];
|
|
1871
1886
|
|
|
1872
1887
|
if (hotkeys[element]) {
|
|
1873
|
-
|
|
1888
|
+
_this5.focusSearchBox(event);
|
|
1874
1889
|
|
|
1875
1890
|
break;
|
|
1876
1891
|
}
|
|
@@ -1879,14 +1894,14 @@ var DataSearch = {
|
|
|
1879
1894
|
}
|
|
1880
1895
|
},
|
|
1881
1896
|
render: function render() {
|
|
1882
|
-
var
|
|
1897
|
+
var _this6 = this;
|
|
1883
1898
|
|
|
1884
1899
|
var h = arguments[0];
|
|
1885
|
-
var _this$$
|
|
1886
|
-
theme = _this$$
|
|
1887
|
-
size = _this$$
|
|
1888
|
-
expandSuggestionsContainer = _this$$
|
|
1889
|
-
enableDefaultSuggestions = _this$$
|
|
1900
|
+
var _this$$props5 = this.$props,
|
|
1901
|
+
theme = _this$$props5.theme,
|
|
1902
|
+
size = _this$$props5.size,
|
|
1903
|
+
expandSuggestionsContainer = _this$$props5.expandSuggestionsContainer,
|
|
1904
|
+
enableDefaultSuggestions = _this$$props5.enableDefaultSuggestions;
|
|
1890
1905
|
var _this$$scopedSlots = this.$scopedSlots,
|
|
1891
1906
|
recentSearchesIcon = _this$$scopedSlots.recentSearchesIcon,
|
|
1892
1907
|
popularSearchesIcon = _this$$scopedSlots.popularSearchesIcon;
|
|
@@ -1908,24 +1923,24 @@ var DataSearch = {
|
|
|
1908
1923
|
"isOpen": this.$data.isOpen
|
|
1909
1924
|
},
|
|
1910
1925
|
"scopedSlots": {
|
|
1911
|
-
"default": function _default(
|
|
1912
|
-
var getInputEvents =
|
|
1913
|
-
getInputProps =
|
|
1914
|
-
getItemProps =
|
|
1915
|
-
getItemEvents =
|
|
1916
|
-
isOpen =
|
|
1917
|
-
highlightedIndex =
|
|
1918
|
-
setHighlightedIndex =
|
|
1926
|
+
"default": function _default(_ref4) {
|
|
1927
|
+
var getInputEvents = _ref4.getInputEvents,
|
|
1928
|
+
getInputProps = _ref4.getInputProps,
|
|
1929
|
+
getItemProps = _ref4.getItemProps,
|
|
1930
|
+
getItemEvents = _ref4.getItemEvents,
|
|
1931
|
+
isOpen = _ref4.isOpen,
|
|
1932
|
+
highlightedIndex = _ref4.highlightedIndex,
|
|
1933
|
+
setHighlightedIndex = _ref4.setHighlightedIndex;
|
|
1919
1934
|
|
|
1920
1935
|
var renderSuggestionsContainer = function renderSuggestionsContainer() {
|
|
1921
|
-
return h("div", [
|
|
1936
|
+
return h("div", [_this6.hasCustomRenderer && _this6.getComponent({
|
|
1922
1937
|
isOpen: isOpen,
|
|
1923
1938
|
getItemProps: getItemProps,
|
|
1924
1939
|
getItemEvents: getItemEvents,
|
|
1925
1940
|
highlightedIndex: highlightedIndex
|
|
1926
|
-
}),
|
|
1927
|
-
"class": suggestions(
|
|
1928
|
-
}, [
|
|
1941
|
+
}), _this6.renderErrorComponent(), !_this6.hasCustomRenderer && isOpen && hasSuggestions ? h("ul", {
|
|
1942
|
+
"class": suggestions(_this6.themePreset, theme) + " " + getClassName$1(_this6.$props.innerClass, 'list')
|
|
1943
|
+
}, [_this6.suggestionsList.slice(0, size || 10).map(function (item, index) {
|
|
1929
1944
|
return h("li", {
|
|
1930
1945
|
"domProps": _extends({}, getItemProps({
|
|
1931
1946
|
item: item
|
|
@@ -1935,15 +1950,15 @@ var DataSearch = {
|
|
|
1935
1950
|
})),
|
|
1936
1951
|
"key": index + 1 + "-" + item.value,
|
|
1937
1952
|
"style": {
|
|
1938
|
-
backgroundColor:
|
|
1953
|
+
backgroundColor: _this6.getBackgroundColor(highlightedIndex, index)
|
|
1939
1954
|
}
|
|
1940
1955
|
}, [h(SuggestionItem, {
|
|
1941
1956
|
"attrs": {
|
|
1942
|
-
"currentValue":
|
|
1957
|
+
"currentValue": _this6.currentValue,
|
|
1943
1958
|
"suggestion": item
|
|
1944
1959
|
}
|
|
1945
1960
|
})]);
|
|
1946
|
-
}),
|
|
1961
|
+
}), _this6.defaultSearchSuggestions.map(function (sugg, index) {
|
|
1947
1962
|
return h("li", {
|
|
1948
1963
|
"domProps": _extends({}, getItemProps({
|
|
1949
1964
|
item: sugg
|
|
@@ -1951,9 +1966,9 @@ var DataSearch = {
|
|
|
1951
1966
|
"on": _extends({}, getItemEvents({
|
|
1952
1967
|
item: sugg
|
|
1953
1968
|
})),
|
|
1954
|
-
"key":
|
|
1969
|
+
"key": _this6.suggestionsList.length + index + 1 + "-" + sugg.value,
|
|
1955
1970
|
"style": {
|
|
1956
|
-
backgroundColor:
|
|
1971
|
+
backgroundColor: _this6.getBackgroundColor(highlightedIndex, _this6.suggestionsList.length + index),
|
|
1957
1972
|
justifyContent: 'flex-start'
|
|
1958
1973
|
}
|
|
1959
1974
|
}, [h("div", {
|
|
@@ -1962,28 +1977,28 @@ var DataSearch = {
|
|
|
1962
1977
|
}
|
|
1963
1978
|
}, [sugg.source && sugg.source._recent_search && h(CustomSvg, {
|
|
1964
1979
|
"attrs": {
|
|
1965
|
-
"className": getClassName$1(
|
|
1980
|
+
"className": getClassName$1(_this6.$props.innerClass, 'recent-search-icon') || null,
|
|
1966
1981
|
"icon": recentSearchesIcon,
|
|
1967
1982
|
"type": "recent-search-icon"
|
|
1968
1983
|
}
|
|
1969
1984
|
}), sugg.source && sugg.source._popular_suggestion && h(CustomSvg, {
|
|
1970
1985
|
"attrs": {
|
|
1971
|
-
"className": getClassName$1(
|
|
1986
|
+
"className": getClassName$1(_this6.$props.innerClass, 'popular-search-icon') || null,
|
|
1972
1987
|
"icon": popularSearchesIcon,
|
|
1973
1988
|
"type": "popular-search-icon"
|
|
1974
1989
|
}
|
|
1975
1990
|
})]), h(SuggestionItem, {
|
|
1976
1991
|
"attrs": {
|
|
1977
|
-
"currentValue":
|
|
1992
|
+
"currentValue": _this6.currentValue,
|
|
1978
1993
|
"suggestion": sugg
|
|
1979
1994
|
}
|
|
1980
1995
|
})]);
|
|
1981
|
-
}), hasQuerySuggestionsRenderer(
|
|
1996
|
+
}), hasQuerySuggestionsRenderer(_this6) ? _this6.getComponent({
|
|
1982
1997
|
isOpen: isOpen,
|
|
1983
1998
|
getItemProps: getItemProps,
|
|
1984
1999
|
getItemEvents: getItemEvents,
|
|
1985
2000
|
highlightedIndex: highlightedIndex
|
|
1986
|
-
}, true) :
|
|
2001
|
+
}, true) : _this6.topSuggestions.map(function (sugg, index) {
|
|
1987
2002
|
return h("li", {
|
|
1988
2003
|
"domProps": _extends({}, getItemProps({
|
|
1989
2004
|
item: sugg
|
|
@@ -1991,9 +2006,9 @@ var DataSearch = {
|
|
|
1991
2006
|
"on": _extends({}, getItemEvents({
|
|
1992
2007
|
item: sugg
|
|
1993
2008
|
})),
|
|
1994
|
-
"key":
|
|
2009
|
+
"key": _this6.suggestionsList.length + index + 1 + "-" + sugg.value,
|
|
1995
2010
|
"style": {
|
|
1996
|
-
backgroundColor:
|
|
2011
|
+
backgroundColor: _this6.getBackgroundColor(highlightedIndex, _this6.suggestionsList.length + index),
|
|
1997
2012
|
justifyContent: 'flex-start'
|
|
1998
2013
|
}
|
|
1999
2014
|
}, [h("div", {
|
|
@@ -2002,61 +2017,61 @@ var DataSearch = {
|
|
|
2002
2017
|
}
|
|
2003
2018
|
}, [h(CustomSvg, {
|
|
2004
2019
|
"attrs": {
|
|
2005
|
-
"className": getClassName$1(
|
|
2020
|
+
"className": getClassName$1(_this6.$props.innerClass, 'popular-search-icon') || null,
|
|
2006
2021
|
"icon": popularSearchesIcon,
|
|
2007
2022
|
"type": "popular-search-icon"
|
|
2008
2023
|
}
|
|
2009
2024
|
})]), h(SuggestionItem, {
|
|
2010
2025
|
"attrs": {
|
|
2011
|
-
"currentValue":
|
|
2026
|
+
"currentValue": _this6.currentValue,
|
|
2012
2027
|
"suggestion": sugg
|
|
2013
2028
|
}
|
|
2014
2029
|
})]);
|
|
2015
|
-
})]) :
|
|
2030
|
+
})]) : _this6.renderNoSuggestions(_this6.suggestionsList)]);
|
|
2016
2031
|
};
|
|
2017
2032
|
|
|
2018
2033
|
return h("div", {
|
|
2019
2034
|
"class": suggestionsContainer
|
|
2020
|
-
}, [h(InputGroup, [
|
|
2035
|
+
}, [h(InputGroup, [_this6.renderInputAddonBefore(), h(InputWrapper, [h(Input, {
|
|
2021
2036
|
"attrs": {
|
|
2022
|
-
"id":
|
|
2023
|
-
"showIcon":
|
|
2024
|
-
"showClear":
|
|
2025
|
-
"iconPosition":
|
|
2026
|
-
"placeholder":
|
|
2027
|
-
"autoFocus":
|
|
2028
|
-
"themePreset":
|
|
2037
|
+
"id": _this6.$props.componentId + "-input",
|
|
2038
|
+
"showIcon": _this6.$props.showIcon,
|
|
2039
|
+
"showClear": _this6.$props.showClear,
|
|
2040
|
+
"iconPosition": _this6.$props.iconPosition,
|
|
2041
|
+
"placeholder": _this6.$props.placeholder,
|
|
2042
|
+
"autoFocus": _this6.$props.autoFocus,
|
|
2043
|
+
"themePreset": _this6.themePreset,
|
|
2029
2044
|
"autocomplete": "off"
|
|
2030
2045
|
},
|
|
2031
|
-
"ref":
|
|
2032
|
-
"class": getClassName$1(
|
|
2046
|
+
"ref": _this6.$props.innerRef,
|
|
2047
|
+
"class": getClassName$1(_this6.$props.innerClass, 'input'),
|
|
2033
2048
|
"on": _extends({}, getInputEvents({
|
|
2034
|
-
onInput:
|
|
2049
|
+
onInput: _this6.onInputChange,
|
|
2035
2050
|
onBlur: function onBlur(e) {
|
|
2036
|
-
|
|
2051
|
+
_this6.$emit('blur', e, _this6.triggerQuery);
|
|
2037
2052
|
},
|
|
2038
|
-
onFocus:
|
|
2053
|
+
onFocus: _this6.handleFocus,
|
|
2039
2054
|
onKeyPress: function onKeyPress(e) {
|
|
2040
|
-
|
|
2055
|
+
_this6.$emit('keyPress', e, _this6.triggerQuery);
|
|
2041
2056
|
|
|
2042
|
-
|
|
2057
|
+
_this6.$emit('key-press', e, _this6.triggerQuery);
|
|
2043
2058
|
},
|
|
2044
2059
|
onKeyDown: function onKeyDown(e) {
|
|
2045
|
-
return
|
|
2060
|
+
return _this6.handleKeyDown(e, highlightedIndex);
|
|
2046
2061
|
},
|
|
2047
2062
|
onKeyUp: function onKeyUp(e) {
|
|
2048
|
-
|
|
2063
|
+
_this6.$emit('keyUp', e, _this6.triggerQuery);
|
|
2049
2064
|
|
|
2050
|
-
|
|
2065
|
+
_this6.$emit('key-up', e, _this6.triggerQuery);
|
|
2051
2066
|
},
|
|
2052
2067
|
onClick: function onClick() {
|
|
2053
2068
|
setHighlightedIndex(null);
|
|
2054
2069
|
}
|
|
2055
2070
|
})),
|
|
2056
2071
|
"domProps": _extends({}, getInputProps({
|
|
2057
|
-
value:
|
|
2072
|
+
value: _this6.$data.currentValue === null ? '' : _this6.$data.currentValue
|
|
2058
2073
|
}))
|
|
2059
|
-
}),
|
|
2074
|
+
}), _this6.renderIcons(), !expandSuggestionsContainer && renderSuggestionsContainer()]), ' ', _this6.renderInputAddonAfter()]), expandSuggestionsContainer && renderSuggestionsContainer(), _this6.renderTags()]);
|
|
2060
2075
|
}
|
|
2061
2076
|
}
|
|
2062
2077
|
}) : h("div", {
|
|
@@ -2072,26 +2087,26 @@ var DataSearch = {
|
|
|
2072
2087
|
},
|
|
2073
2088
|
"on": _extends({}, {
|
|
2074
2089
|
blur: function blur(e) {
|
|
2075
|
-
|
|
2090
|
+
_this6.$emit('blur', e, _this6.triggerQuery);
|
|
2076
2091
|
},
|
|
2077
2092
|
keypress: function keypress(e) {
|
|
2078
|
-
|
|
2093
|
+
_this6.$emit('keyPress', e, _this6.triggerQuery);
|
|
2079
2094
|
|
|
2080
|
-
|
|
2095
|
+
_this6.$emit('key-press', e, _this6.triggerQuery);
|
|
2081
2096
|
},
|
|
2082
2097
|
input: this.onInputChange,
|
|
2083
2098
|
focus: function focus(e) {
|
|
2084
|
-
|
|
2099
|
+
_this6.$emit('focus', e, _this6.triggerQuery);
|
|
2085
2100
|
},
|
|
2086
2101
|
keydown: function keydown(e) {
|
|
2087
|
-
|
|
2102
|
+
_this6.$emit('keyDown', e, _this6.triggerQuery);
|
|
2088
2103
|
|
|
2089
|
-
|
|
2104
|
+
_this6.$emit('key-down', e, _this6.triggerQuery);
|
|
2090
2105
|
},
|
|
2091
2106
|
keyup: function keyup(e) {
|
|
2092
|
-
|
|
2107
|
+
_this6.$emit('keyUp', e, _this6.triggerQuery);
|
|
2093
2108
|
|
|
2094
|
-
|
|
2109
|
+
_this6.$emit('key-up', e, _this6.triggerQuery);
|
|
2095
2110
|
}
|
|
2096
2111
|
}),
|
|
2097
2112
|
"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-b88ef6ee.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"])));
|