@appbaseio/reactivesearch-vue 1.30.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 +10358 -553
- 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-5cb08414.js → ComponentWrapper-ad3dad02.js} +2 -2
- package/dist/cjs/{Container-cfd69a34.js → Container-daf30918.js} +1 -1
- package/dist/cjs/{DataSearch-e550096e.js → DataSearch-d389fbe7.js} +128 -112
- package/dist/cjs/DataSearch.js +10 -10
- package/dist/cjs/{DropDown-fc59f1ee.js → DropDown-c479bbb0.js} +5 -5
- package/dist/cjs/DynamicRangeSlider.js +8 -7
- 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 +13 -12
- package/dist/cjs/MultiList.js +11 -10
- package/dist/cjs/MultiRange.js +9 -8
- package/dist/cjs/Pagination-3d73e1b3.js +182 -0
- package/dist/cjs/RangeInput.js +11 -10
- package/dist/cjs/RangeSlider.js +9 -8
- package/dist/cjs/ReactiveBase.js +34 -26
- package/dist/cjs/ReactiveComponent.js +6 -5
- package/dist/cjs/ReactiveGoogleMap.js +2363 -0
- package/dist/cjs/ReactiveList.js +21 -187
- package/dist/cjs/ResultCard.js +4 -4
- package/dist/cjs/ResultList.js +4 -4
- package/dist/cjs/SelectedFilters.js +9 -9
- package/dist/cjs/SingleDropdownList.js +13 -12
- package/dist/cjs/SingleList.js +11 -10
- package/dist/cjs/SingleRange.js +9 -8
- package/dist/cjs/StateProvider.js +65 -22
- package/dist/cjs/{Title-26661936.js → Title-1de7d0f4.js} +1 -1
- package/dist/cjs/ToggleButton.js +9 -8
- package/dist/cjs/{_rollupPluginBabelHelpers-91d4b5a6.js → _rollupPluginBabelHelpers-c705cbe6.js} +16 -0
- package/dist/cjs/{index-2cd3650b.js → index-6a167fe0.js} +13 -1
- package/dist/cjs/index.js +23 -18
- package/dist/cjs/initReactivesearch.js +46 -10
- package/dist/cjs/{install-250a14f1.js → install-3b864d8f.js} +18 -16
- 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-57d01f18.js → vueTypes-727b7c63.js} +30 -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-dc92772a.js → ComponentWrapper-424e86fd.js} +2 -2
- package/dist/es/{Container-421450dc.js → Container-ba826e96.js} +1 -1
- package/dist/es/{DataSearch-8e5d0972.js → DataSearch-b88ef6ee.js} +128 -112
- package/dist/es/DataSearch.js +10 -10
- package/dist/es/{DropDown-565fad6f.js → DropDown-05a644a5.js} +5 -5
- package/dist/es/DynamicRangeSlider.js +8 -7
- 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 +13 -12
- package/dist/es/MultiList.js +11 -10
- package/dist/es/MultiRange.js +9 -8
- package/dist/es/Pagination-af9de08f.js +177 -0
- package/dist/es/RangeInput.js +11 -10
- package/dist/es/RangeSlider.js +9 -8
- package/dist/es/ReactiveBase.js +35 -27
- package/dist/es/ReactiveComponent.js +6 -5
- package/dist/es/ReactiveGoogleMap.js +2354 -0
- package/dist/es/ReactiveList.js +20 -186
- package/dist/es/ResultCard.js +4 -4
- package/dist/es/ResultList.js +4 -4
- package/dist/es/SelectedFilters.js +7 -7
- package/dist/es/SingleDropdownList.js +13 -12
- package/dist/es/SingleList.js +11 -10
- package/dist/es/SingleRange.js +9 -8
- package/dist/es/StateProvider.js +65 -22
- package/dist/es/{Title-35edd732.js → Title-3342664a.js} +1 -1
- package/dist/es/ToggleButton.js +9 -8
- package/dist/es/{_rollupPluginBabelHelpers-51ce1182.js → _rollupPluginBabelHelpers-76660dab.js} +16 -1
- package/dist/es/{index-5371a13f.js → index-7788a843.js} +13 -2
- package/dist/es/index.js +23 -19
- package/dist/es/initReactivesearch.js +47 -11
- package/dist/es/{install-9faa87f1.js → install-a1fd08ae.js} +16 -14
- 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-687b2304.js → vueTypes-b8146772.js} +30 -13
- package/package.json +10 -4
|
@@ -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,
|
|
@@ -1129,7 +1115,8 @@ var DataSearch = {
|
|
|
1129
1115
|
index: VueTypes.string,
|
|
1130
1116
|
enableDefaultSuggestions: VueTypes.bool.def(true),
|
|
1131
1117
|
mode: VueTypes.oneOf(['select', 'tag']).def('select'),
|
|
1132
|
-
renderSelectedTags: VueTypes.any
|
|
1118
|
+
renderSelectedTags: VueTypes.any,
|
|
1119
|
+
endpoint: types.endpointConfig
|
|
1133
1120
|
},
|
|
1134
1121
|
beforeMount: function beforeMount() {
|
|
1135
1122
|
if (this.$props.highlight) {
|
|
@@ -1181,7 +1168,11 @@ var DataSearch = {
|
|
|
1181
1168
|
},
|
|
1182
1169
|
value: function value(newVal, oldVal) {
|
|
1183
1170
|
if (!isEqual(newVal, oldVal)) {
|
|
1184
|
-
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);
|
|
1185
1176
|
}
|
|
1186
1177
|
},
|
|
1187
1178
|
defaultQuery: function defaultQuery(newVal, oldVal) {
|
|
@@ -1325,7 +1316,7 @@ var DataSearch = {
|
|
|
1325
1316
|
this.onValueSelectedHandler(currentValue, causes.SEARCH_ICON_CLICK);
|
|
1326
1317
|
}
|
|
1327
1318
|
},
|
|
1328
|
-
setValue: function setValue(value, isDefaultValue, props, cause, toggleIsOpen) {
|
|
1319
|
+
setValue: function setValue(value, isDefaultValue, props, cause, toggleIsOpen, isTagsMode) {
|
|
1329
1320
|
var _this = this;
|
|
1330
1321
|
|
|
1331
1322
|
if (isDefaultValue === void 0) {
|
|
@@ -1340,8 +1331,12 @@ var DataSearch = {
|
|
|
1340
1331
|
toggleIsOpen = true;
|
|
1341
1332
|
}
|
|
1342
1333
|
|
|
1334
|
+
if (isTagsMode === void 0) {
|
|
1335
|
+
isTagsMode = this.$options.isTagsMode;
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1343
1338
|
var performUpdate = function performUpdate() {
|
|
1344
|
-
if (
|
|
1339
|
+
if (isTagsMode && isEqual(value, _this.selectedTags)) {
|
|
1345
1340
|
return;
|
|
1346
1341
|
} // Refresh recent searches when value becomes empty
|
|
1347
1342
|
|
|
@@ -1352,7 +1347,7 @@ var DataSearch = {
|
|
|
1352
1347
|
_this.getRecentSearches();
|
|
1353
1348
|
}
|
|
1354
1349
|
|
|
1355
|
-
if (
|
|
1350
|
+
if (isTagsMode) {
|
|
1356
1351
|
if (Array.isArray(_this.selectedTags) && _this.selectedTags.length) {
|
|
1357
1352
|
// check if value already present in selectedTags
|
|
1358
1353
|
if (typeof value === 'string' && _this.selectedTags.includes(value)) {
|
|
@@ -1379,7 +1374,7 @@ var DataSearch = {
|
|
|
1379
1374
|
|
|
1380
1375
|
var queryHandlerValue = value;
|
|
1381
1376
|
|
|
1382
|
-
if (
|
|
1377
|
+
if (isTagsMode) {
|
|
1383
1378
|
queryHandlerValue = Array.isArray(_this.selectedTags) && _this.selectedTags.length ? _this.selectedTags : undefined;
|
|
1384
1379
|
}
|
|
1385
1380
|
|
|
@@ -1557,19 +1552,40 @@ var DataSearch = {
|
|
|
1557
1552
|
this.$emit('key-down', event, this.triggerQuery);
|
|
1558
1553
|
},
|
|
1559
1554
|
onInputChange: function onInputChange(e) {
|
|
1555
|
+
var _this2 = this;
|
|
1556
|
+
|
|
1560
1557
|
var inputValue = e.target.value;
|
|
1561
1558
|
|
|
1562
1559
|
if (!this.$data.isOpen) {
|
|
1563
1560
|
this.isOpen = true;
|
|
1564
1561
|
}
|
|
1565
1562
|
|
|
1566
|
-
var
|
|
1563
|
+
var _this$$props2 = this.$props,
|
|
1564
|
+
value = _this$$props2.value,
|
|
1565
|
+
autosuggest = _this$$props2.autosuggest;
|
|
1567
1566
|
|
|
1568
1567
|
if (value === undefined) {
|
|
1569
|
-
this.setValue(inputValue);
|
|
1568
|
+
this.setValue(inputValue, false, this.$props, undefined, true, false);
|
|
1570
1569
|
} else {
|
|
1571
1570
|
this.isPending = true;
|
|
1572
|
-
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);
|
|
1573
1589
|
}
|
|
1574
1590
|
},
|
|
1575
1591
|
onSuggestionSelected: function onSuggestionSelected(suggestion) {
|
|
@@ -1664,9 +1680,9 @@ var DataSearch = {
|
|
|
1664
1680
|
}
|
|
1665
1681
|
|
|
1666
1682
|
var h = this.$createElement;
|
|
1667
|
-
var _this$$
|
|
1668
|
-
theme = _this$$
|
|
1669
|
-
innerClass = _this$$
|
|
1683
|
+
var _this$$props3 = this.$props,
|
|
1684
|
+
theme = _this$$props3.theme,
|
|
1685
|
+
innerClass = _this$$props3.innerClass;
|
|
1670
1686
|
var renderNoSuggestion = this.$scopedSlots.renderNoSuggestion || this.$props.renderNoSuggestion;
|
|
1671
1687
|
var renderError = this.$scopedSlots.renderError || this.$props.renderError;
|
|
1672
1688
|
var _this$$data = this.$data,
|
|
@@ -1702,7 +1718,7 @@ var DataSearch = {
|
|
|
1702
1718
|
return null;
|
|
1703
1719
|
},
|
|
1704
1720
|
renderTag: function renderTag(item) {
|
|
1705
|
-
var
|
|
1721
|
+
var _this3 = this;
|
|
1706
1722
|
|
|
1707
1723
|
var h = this.$createElement;
|
|
1708
1724
|
var innerClass = this.$props.innerClass;
|
|
@@ -1716,7 +1732,7 @@ var DataSearch = {
|
|
|
1716
1732
|
"class": "close-icon",
|
|
1717
1733
|
"on": {
|
|
1718
1734
|
"click": function click() {
|
|
1719
|
-
return
|
|
1735
|
+
return _this3.clearTag(item);
|
|
1720
1736
|
}
|
|
1721
1737
|
}
|
|
1722
1738
|
}, [h(CancelSvg)])]);
|
|
@@ -1740,7 +1756,7 @@ var DataSearch = {
|
|
|
1740
1756
|
}
|
|
1741
1757
|
},
|
|
1742
1758
|
renderTags: function renderTags() {
|
|
1743
|
-
var
|
|
1759
|
+
var _this4 = this;
|
|
1744
1760
|
|
|
1745
1761
|
var h = this.$createElement;
|
|
1746
1762
|
|
|
@@ -1756,7 +1772,7 @@ var DataSearch = {
|
|
|
1756
1772
|
handleClear: this.clearTag,
|
|
1757
1773
|
handleClearAll: this.clearAllTags
|
|
1758
1774
|
}) : h(TagsContainer, [tagsList.map(function (item) {
|
|
1759
|
-
return
|
|
1775
|
+
return _this4.renderTag(item);
|
|
1760
1776
|
}), shouldRenderClearAllTag && h(TagItem, {
|
|
1761
1777
|
"class": getClassName$1(this.$props.innerClass, 'selected-tag') || ''
|
|
1762
1778
|
}, [h("span", ["Clear All"]), h("span", {
|
|
@@ -1782,13 +1798,13 @@ var DataSearch = {
|
|
|
1782
1798
|
},
|
|
1783
1799
|
renderIcons: function renderIcons() {
|
|
1784
1800
|
var h = this.$createElement;
|
|
1785
|
-
var _this$$
|
|
1786
|
-
iconPosition = _this$$
|
|
1787
|
-
showClear = _this$$
|
|
1788
|
-
innerClass = _this$$
|
|
1789
|
-
getMicInstance = _this$$
|
|
1790
|
-
showVoiceSearch = _this$$
|
|
1791
|
-
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;
|
|
1792
1808
|
var renderMic = this.$scopedSlots.renderMic || this.$props.renderMic;
|
|
1793
1809
|
var currentValue = this.$data.currentValue;
|
|
1794
1810
|
return h("div", [h(IconGroup, {
|
|
@@ -1840,7 +1856,7 @@ var DataSearch = {
|
|
|
1840
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
|
|
1841
1857
|
},
|
|
1842
1858
|
listenForFocusShortcuts: function listenForFocusShortcuts() {
|
|
1843
|
-
var
|
|
1859
|
+
var _this5 = this;
|
|
1844
1860
|
|
|
1845
1861
|
var _this$$props$focusSho = this.$props.focusShortcuts,
|
|
1846
1862
|
focusShortcuts = _this$$props$focusSho === void 0 ? ['/'] : _this$$props$focusSho;
|
|
@@ -1858,7 +1874,7 @@ var DataSearch = {
|
|
|
1858
1874
|
// Prevent the default refresh event under WINDOWS system
|
|
1859
1875
|
event.preventDefault();
|
|
1860
1876
|
|
|
1861
|
-
|
|
1877
|
+
_this5.focusSearchBox(event);
|
|
1862
1878
|
}); // if one of modifier keys are used, they are handled below
|
|
1863
1879
|
|
|
1864
1880
|
hotkeys('*', function (event) {
|
|
@@ -1869,7 +1885,7 @@ var DataSearch = {
|
|
|
1869
1885
|
var element = modifierKeys[index];
|
|
1870
1886
|
|
|
1871
1887
|
if (hotkeys[element]) {
|
|
1872
|
-
|
|
1888
|
+
_this5.focusSearchBox(event);
|
|
1873
1889
|
|
|
1874
1890
|
break;
|
|
1875
1891
|
}
|
|
@@ -1878,14 +1894,14 @@ var DataSearch = {
|
|
|
1878
1894
|
}
|
|
1879
1895
|
},
|
|
1880
1896
|
render: function render() {
|
|
1881
|
-
var
|
|
1897
|
+
var _this6 = this;
|
|
1882
1898
|
|
|
1883
1899
|
var h = arguments[0];
|
|
1884
|
-
var _this$$
|
|
1885
|
-
theme = _this$$
|
|
1886
|
-
size = _this$$
|
|
1887
|
-
expandSuggestionsContainer = _this$$
|
|
1888
|
-
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;
|
|
1889
1905
|
var _this$$scopedSlots = this.$scopedSlots,
|
|
1890
1906
|
recentSearchesIcon = _this$$scopedSlots.recentSearchesIcon,
|
|
1891
1907
|
popularSearchesIcon = _this$$scopedSlots.popularSearchesIcon;
|
|
@@ -1907,24 +1923,24 @@ var DataSearch = {
|
|
|
1907
1923
|
"isOpen": this.$data.isOpen
|
|
1908
1924
|
},
|
|
1909
1925
|
"scopedSlots": {
|
|
1910
|
-
"default": function _default(
|
|
1911
|
-
var getInputEvents =
|
|
1912
|
-
getInputProps =
|
|
1913
|
-
getItemProps =
|
|
1914
|
-
getItemEvents =
|
|
1915
|
-
isOpen =
|
|
1916
|
-
highlightedIndex =
|
|
1917
|
-
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;
|
|
1918
1934
|
|
|
1919
1935
|
var renderSuggestionsContainer = function renderSuggestionsContainer() {
|
|
1920
|
-
return h("div", [
|
|
1936
|
+
return h("div", [_this6.hasCustomRenderer && _this6.getComponent({
|
|
1921
1937
|
isOpen: isOpen,
|
|
1922
1938
|
getItemProps: getItemProps,
|
|
1923
1939
|
getItemEvents: getItemEvents,
|
|
1924
1940
|
highlightedIndex: highlightedIndex
|
|
1925
|
-
}),
|
|
1926
|
-
"class": suggestions(
|
|
1927
|
-
}, [
|
|
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) {
|
|
1928
1944
|
return h("li", {
|
|
1929
1945
|
"domProps": _extends({}, getItemProps({
|
|
1930
1946
|
item: item
|
|
@@ -1934,15 +1950,15 @@ var DataSearch = {
|
|
|
1934
1950
|
})),
|
|
1935
1951
|
"key": index + 1 + "-" + item.value,
|
|
1936
1952
|
"style": {
|
|
1937
|
-
backgroundColor:
|
|
1953
|
+
backgroundColor: _this6.getBackgroundColor(highlightedIndex, index)
|
|
1938
1954
|
}
|
|
1939
1955
|
}, [h(SuggestionItem, {
|
|
1940
1956
|
"attrs": {
|
|
1941
|
-
"currentValue":
|
|
1957
|
+
"currentValue": _this6.currentValue,
|
|
1942
1958
|
"suggestion": item
|
|
1943
1959
|
}
|
|
1944
1960
|
})]);
|
|
1945
|
-
}),
|
|
1961
|
+
}), _this6.defaultSearchSuggestions.map(function (sugg, index) {
|
|
1946
1962
|
return h("li", {
|
|
1947
1963
|
"domProps": _extends({}, getItemProps({
|
|
1948
1964
|
item: sugg
|
|
@@ -1950,9 +1966,9 @@ var DataSearch = {
|
|
|
1950
1966
|
"on": _extends({}, getItemEvents({
|
|
1951
1967
|
item: sugg
|
|
1952
1968
|
})),
|
|
1953
|
-
"key":
|
|
1969
|
+
"key": _this6.suggestionsList.length + index + 1 + "-" + sugg.value,
|
|
1954
1970
|
"style": {
|
|
1955
|
-
backgroundColor:
|
|
1971
|
+
backgroundColor: _this6.getBackgroundColor(highlightedIndex, _this6.suggestionsList.length + index),
|
|
1956
1972
|
justifyContent: 'flex-start'
|
|
1957
1973
|
}
|
|
1958
1974
|
}, [h("div", {
|
|
@@ -1961,28 +1977,28 @@ var DataSearch = {
|
|
|
1961
1977
|
}
|
|
1962
1978
|
}, [sugg.source && sugg.source._recent_search && h(CustomSvg, {
|
|
1963
1979
|
"attrs": {
|
|
1964
|
-
"className": getClassName$1(
|
|
1980
|
+
"className": getClassName$1(_this6.$props.innerClass, 'recent-search-icon') || null,
|
|
1965
1981
|
"icon": recentSearchesIcon,
|
|
1966
1982
|
"type": "recent-search-icon"
|
|
1967
1983
|
}
|
|
1968
1984
|
}), sugg.source && sugg.source._popular_suggestion && h(CustomSvg, {
|
|
1969
1985
|
"attrs": {
|
|
1970
|
-
"className": getClassName$1(
|
|
1986
|
+
"className": getClassName$1(_this6.$props.innerClass, 'popular-search-icon') || null,
|
|
1971
1987
|
"icon": popularSearchesIcon,
|
|
1972
1988
|
"type": "popular-search-icon"
|
|
1973
1989
|
}
|
|
1974
1990
|
})]), h(SuggestionItem, {
|
|
1975
1991
|
"attrs": {
|
|
1976
|
-
"currentValue":
|
|
1992
|
+
"currentValue": _this6.currentValue,
|
|
1977
1993
|
"suggestion": sugg
|
|
1978
1994
|
}
|
|
1979
1995
|
})]);
|
|
1980
|
-
}), hasQuerySuggestionsRenderer(
|
|
1996
|
+
}), hasQuerySuggestionsRenderer(_this6) ? _this6.getComponent({
|
|
1981
1997
|
isOpen: isOpen,
|
|
1982
1998
|
getItemProps: getItemProps,
|
|
1983
1999
|
getItemEvents: getItemEvents,
|
|
1984
2000
|
highlightedIndex: highlightedIndex
|
|
1985
|
-
}, true) :
|
|
2001
|
+
}, true) : _this6.topSuggestions.map(function (sugg, index) {
|
|
1986
2002
|
return h("li", {
|
|
1987
2003
|
"domProps": _extends({}, getItemProps({
|
|
1988
2004
|
item: sugg
|
|
@@ -1990,9 +2006,9 @@ var DataSearch = {
|
|
|
1990
2006
|
"on": _extends({}, getItemEvents({
|
|
1991
2007
|
item: sugg
|
|
1992
2008
|
})),
|
|
1993
|
-
"key":
|
|
2009
|
+
"key": _this6.suggestionsList.length + index + 1 + "-" + sugg.value,
|
|
1994
2010
|
"style": {
|
|
1995
|
-
backgroundColor:
|
|
2011
|
+
backgroundColor: _this6.getBackgroundColor(highlightedIndex, _this6.suggestionsList.length + index),
|
|
1996
2012
|
justifyContent: 'flex-start'
|
|
1997
2013
|
}
|
|
1998
2014
|
}, [h("div", {
|
|
@@ -2001,61 +2017,61 @@ var DataSearch = {
|
|
|
2001
2017
|
}
|
|
2002
2018
|
}, [h(CustomSvg, {
|
|
2003
2019
|
"attrs": {
|
|
2004
|
-
"className": getClassName$1(
|
|
2020
|
+
"className": getClassName$1(_this6.$props.innerClass, 'popular-search-icon') || null,
|
|
2005
2021
|
"icon": popularSearchesIcon,
|
|
2006
2022
|
"type": "popular-search-icon"
|
|
2007
2023
|
}
|
|
2008
2024
|
})]), h(SuggestionItem, {
|
|
2009
2025
|
"attrs": {
|
|
2010
|
-
"currentValue":
|
|
2026
|
+
"currentValue": _this6.currentValue,
|
|
2011
2027
|
"suggestion": sugg
|
|
2012
2028
|
}
|
|
2013
2029
|
})]);
|
|
2014
|
-
})]) :
|
|
2030
|
+
})]) : _this6.renderNoSuggestions(_this6.suggestionsList)]);
|
|
2015
2031
|
};
|
|
2016
2032
|
|
|
2017
2033
|
return h("div", {
|
|
2018
2034
|
"class": suggestionsContainer
|
|
2019
|
-
}, [h(InputGroup, [
|
|
2035
|
+
}, [h(InputGroup, [_this6.renderInputAddonBefore(), h(InputWrapper, [h(Input, {
|
|
2020
2036
|
"attrs": {
|
|
2021
|
-
"id":
|
|
2022
|
-
"showIcon":
|
|
2023
|
-
"showClear":
|
|
2024
|
-
"iconPosition":
|
|
2025
|
-
"placeholder":
|
|
2026
|
-
"autoFocus":
|
|
2027
|
-
"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,
|
|
2028
2044
|
"autocomplete": "off"
|
|
2029
2045
|
},
|
|
2030
|
-
"ref":
|
|
2031
|
-
"class": getClassName$1(
|
|
2046
|
+
"ref": _this6.$props.innerRef,
|
|
2047
|
+
"class": getClassName$1(_this6.$props.innerClass, 'input'),
|
|
2032
2048
|
"on": _extends({}, getInputEvents({
|
|
2033
|
-
onInput:
|
|
2049
|
+
onInput: _this6.onInputChange,
|
|
2034
2050
|
onBlur: function onBlur(e) {
|
|
2035
|
-
|
|
2051
|
+
_this6.$emit('blur', e, _this6.triggerQuery);
|
|
2036
2052
|
},
|
|
2037
|
-
onFocus:
|
|
2053
|
+
onFocus: _this6.handleFocus,
|
|
2038
2054
|
onKeyPress: function onKeyPress(e) {
|
|
2039
|
-
|
|
2055
|
+
_this6.$emit('keyPress', e, _this6.triggerQuery);
|
|
2040
2056
|
|
|
2041
|
-
|
|
2057
|
+
_this6.$emit('key-press', e, _this6.triggerQuery);
|
|
2042
2058
|
},
|
|
2043
2059
|
onKeyDown: function onKeyDown(e) {
|
|
2044
|
-
return
|
|
2060
|
+
return _this6.handleKeyDown(e, highlightedIndex);
|
|
2045
2061
|
},
|
|
2046
2062
|
onKeyUp: function onKeyUp(e) {
|
|
2047
|
-
|
|
2063
|
+
_this6.$emit('keyUp', e, _this6.triggerQuery);
|
|
2048
2064
|
|
|
2049
|
-
|
|
2065
|
+
_this6.$emit('key-up', e, _this6.triggerQuery);
|
|
2050
2066
|
},
|
|
2051
2067
|
onClick: function onClick() {
|
|
2052
2068
|
setHighlightedIndex(null);
|
|
2053
2069
|
}
|
|
2054
2070
|
})),
|
|
2055
2071
|
"domProps": _extends({}, getInputProps({
|
|
2056
|
-
value:
|
|
2072
|
+
value: _this6.$data.currentValue === null ? '' : _this6.$data.currentValue
|
|
2057
2073
|
}))
|
|
2058
|
-
}),
|
|
2074
|
+
}), _this6.renderIcons(), !expandSuggestionsContainer && renderSuggestionsContainer()]), ' ', _this6.renderInputAddonAfter()]), expandSuggestionsContainer && renderSuggestionsContainer(), _this6.renderTags()]);
|
|
2059
2075
|
}
|
|
2060
2076
|
}
|
|
2061
2077
|
}) : h("div", {
|
|
@@ -2071,26 +2087,26 @@ var DataSearch = {
|
|
|
2071
2087
|
},
|
|
2072
2088
|
"on": _extends({}, {
|
|
2073
2089
|
blur: function blur(e) {
|
|
2074
|
-
|
|
2090
|
+
_this6.$emit('blur', e, _this6.triggerQuery);
|
|
2075
2091
|
},
|
|
2076
2092
|
keypress: function keypress(e) {
|
|
2077
|
-
|
|
2093
|
+
_this6.$emit('keyPress', e, _this6.triggerQuery);
|
|
2078
2094
|
|
|
2079
|
-
|
|
2095
|
+
_this6.$emit('key-press', e, _this6.triggerQuery);
|
|
2080
2096
|
},
|
|
2081
2097
|
input: this.onInputChange,
|
|
2082
2098
|
focus: function focus(e) {
|
|
2083
|
-
|
|
2099
|
+
_this6.$emit('focus', e, _this6.triggerQuery);
|
|
2084
2100
|
},
|
|
2085
2101
|
keydown: function keydown(e) {
|
|
2086
|
-
|
|
2102
|
+
_this6.$emit('keyDown', e, _this6.triggerQuery);
|
|
2087
2103
|
|
|
2088
|
-
|
|
2104
|
+
_this6.$emit('key-down', e, _this6.triggerQuery);
|
|
2089
2105
|
},
|
|
2090
2106
|
keyup: function keyup(e) {
|
|
2091
|
-
|
|
2107
|
+
_this6.$emit('keyUp', e, _this6.triggerQuery);
|
|
2092
2108
|
|
|
2093
|
-
|
|
2109
|
+
_this6.$emit('key-up', e, _this6.triggerQuery);
|
|
2094
2110
|
}
|
|
2095
2111
|
}),
|
|
2096
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,
|
|
@@ -49,7 +49,8 @@ var DynamicRangeSlider = {
|
|
|
49
49
|
sliderOptions: VueTypes.object.def({}),
|
|
50
50
|
nestedField: types.string,
|
|
51
51
|
index: VueTypes.string,
|
|
52
|
-
value: types.range
|
|
52
|
+
value: types.range,
|
|
53
|
+
endpoint: types.endpointConfig
|
|
53
54
|
},
|
|
54
55
|
data: function data() {
|
|
55
56
|
this.internalRangeComponent = this.$props.componentId + "__range__internal";
|
|
@@ -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';
|