@appbaseio/reactivesearch-vue 3.0.4 → 3.0.6
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 +166 -148
- package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js +3 -3
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
- package/dist/cjs/{DropDown-989facb5.js → DropDown-1532353d.js} +1 -1
- package/dist/cjs/{Input-c11e13af.js → Input-4279b088.js} +1 -1
- package/dist/cjs/MultiDropdownList.js +2 -2
- package/dist/cjs/MultiList.js +1 -1
- package/dist/cjs/RangeInput.js +1 -1
- package/dist/cjs/SingleDropdownList.js +2 -2
- package/dist/cjs/SingleList.js +1 -1
- package/dist/cjs/index.js +3 -3
- package/dist/cjs/{install-7a65d7ff.js → install-435992f3.js} +166 -148
- package/dist/cjs/install.js +3 -3
- package/dist/cjs/version.js +1 -1
- package/dist/es/{DropDown-0075753d.js → DropDown-6d1dddde.js} +1 -1
- package/dist/es/{Input-a36286ea.js → Input-1f6207bc.js} +1 -1
- package/dist/es/MultiDropdownList.js +2 -2
- package/dist/es/MultiList.js +1 -1
- package/dist/es/RangeInput.js +1 -1
- package/dist/es/SingleDropdownList.js +2 -2
- package/dist/es/SingleList.js +1 -1
- package/dist/es/index.js +4 -4
- package/dist/es/{install-f4b57577.js → install-df2e75f3.js} +166 -148
- package/dist/es/install.js +3 -3
- package/dist/es/version.js +1 -1
- package/package.json +1 -1
|
@@ -23,8 +23,8 @@ import ReactiveBase from './ReactiveBase.js';
|
|
|
23
23
|
import hotkeys from 'hotkeys-js';
|
|
24
24
|
import xss from 'xss';
|
|
25
25
|
import { Remarkable } from 'remarkable';
|
|
26
|
-
import { I as IconWrapper, C as CancelSvg, a as IconGroup, B as ButtonIconWrapper, D as Downshift, b as InputWrapper } from './DropDown-
|
|
27
|
-
import { n as noSuggestions, T as TextArea, I as Input, s as suggestionsContainer, A as Actions$1, a as suggestions, b as searchboxSuggestions } from './Input-
|
|
26
|
+
import { I as IconWrapper, C as CancelSvg, a as IconGroup, B as ButtonIconWrapper, D as Downshift, b as InputWrapper } from './DropDown-6d1dddde.js';
|
|
27
|
+
import { n as noSuggestions, T as TextArea, I as Input, s as suggestionsContainer, A as Actions$1, a as suggestions, b as searchboxSuggestions } from './Input-1f6207bc.js';
|
|
28
28
|
import { C as Container } from './Container-d00219f7.js';
|
|
29
29
|
import Highlight from 'vue-highlight-words';
|
|
30
30
|
import { fetchAIResponse, createAISession } from '@appbaseio/reactivecore/lib/actions/query';
|
|
@@ -1301,7 +1301,23 @@ var SearchBox = defineComponent({
|
|
|
1301
1301
|
AIUIConfig: types.AIUIConfig
|
|
1302
1302
|
},
|
|
1303
1303
|
mounted: function mounted() {
|
|
1304
|
+
var _this = this;
|
|
1304
1305
|
this.listenForFocusShortcuts();
|
|
1306
|
+
var dropdownEle = this.$refs[_dropdownULRef];
|
|
1307
|
+
if (dropdownEle) {
|
|
1308
|
+
var handleScroll = function handleScroll() {
|
|
1309
|
+
var scrollTop = dropdownEle.scrollTop;
|
|
1310
|
+
_this.lastScrollTop = scrollTop;
|
|
1311
|
+
if (scrollTop < _this.lastScrollTop) {
|
|
1312
|
+
// User is scrolling up
|
|
1313
|
+
clearInterval(_this.scrollTimerRef);
|
|
1314
|
+
_this.isUserScrolling = true;
|
|
1315
|
+
}
|
|
1316
|
+
// Update lastScrollTop with the current scroll position
|
|
1317
|
+
_this.lastScrollTop = scrollTop;
|
|
1318
|
+
};
|
|
1319
|
+
dropdownEle.addEventListener('scroll', handleScroll);
|
|
1320
|
+
}
|
|
1305
1321
|
},
|
|
1306
1322
|
updated: function updated() {
|
|
1307
1323
|
if (this.$props.mode === SEARCH_COMPONENTS_MODES.SELECT && this.$options.isTagsMode === true) {
|
|
@@ -1437,9 +1453,10 @@ var SearchBox = defineComponent({
|
|
|
1437
1453
|
}
|
|
1438
1454
|
},
|
|
1439
1455
|
isAITyping: function isAITyping(newVal, oldVal) {
|
|
1440
|
-
var
|
|
1456
|
+
var _this2 = this;
|
|
1441
1457
|
var scrollAIContainer = function scrollAIContainer() {
|
|
1442
|
-
|
|
1458
|
+
if (_this2.isUserScrolling) return;
|
|
1459
|
+
var dropdownEle = _this2.$refs[_dropdownULRef];
|
|
1443
1460
|
if (dropdownEle) {
|
|
1444
1461
|
dropdownEle.scrollTo({
|
|
1445
1462
|
top: dropdownEle.scrollHeight,
|
|
@@ -1448,6 +1465,7 @@ var SearchBox = defineComponent({
|
|
|
1448
1465
|
}
|
|
1449
1466
|
};
|
|
1450
1467
|
if (!newVal && oldVal) {
|
|
1468
|
+
clearInterval(this.scrollTimerRef);
|
|
1451
1469
|
this.showAIScreenFooter = true;
|
|
1452
1470
|
if (this.$props.AIUIConfig && typeof this.$props.AIUIConfig.showFeedback === 'boolean' ? this.$props.AIUIConfig.showFeedback : true) {
|
|
1453
1471
|
this.showFeedbackComponent = true;
|
|
@@ -1456,7 +1474,7 @@ var SearchBox = defineComponent({
|
|
|
1456
1474
|
scrollAIContainer();
|
|
1457
1475
|
}, 500);
|
|
1458
1476
|
} else if (newVal) {
|
|
1459
|
-
this.scrollTimerRef =
|
|
1477
|
+
this.scrollTimerRef = setInterval(function () {
|
|
1460
1478
|
scrollAIContainer();
|
|
1461
1479
|
}, 2000);
|
|
1462
1480
|
}
|
|
@@ -1548,7 +1566,7 @@ var SearchBox = defineComponent({
|
|
|
1548
1566
|
}
|
|
1549
1567
|
},
|
|
1550
1568
|
setValue: function setValue(value, isDefaultValue, props, cause, toggleIsOpen, categoryValue, shouldExecuteQuery) {
|
|
1551
|
-
var
|
|
1569
|
+
var _this3 = this;
|
|
1552
1570
|
if (isDefaultValue === void 0) {
|
|
1553
1571
|
isDefaultValue = false;
|
|
1554
1572
|
}
|
|
@@ -1565,65 +1583,65 @@ var SearchBox = defineComponent({
|
|
|
1565
1583
|
shouldExecuteQuery = true;
|
|
1566
1584
|
}
|
|
1567
1585
|
var performUpdate = function performUpdate() {
|
|
1568
|
-
if (
|
|
1586
|
+
if (_this3.$options.isTagsMode && isEqual(value, _this3.selectedTags)) {
|
|
1569
1587
|
return;
|
|
1570
1588
|
}
|
|
1571
|
-
if (
|
|
1572
|
-
if (Array.isArray(
|
|
1589
|
+
if (_this3.$options.isTagsMode && cause === causes.SUGGESTION_SELECT) {
|
|
1590
|
+
if (Array.isArray(_this3.selectedTags) && _this3.selectedTags.length) {
|
|
1573
1591
|
// check if value already present in selectedTags
|
|
1574
|
-
if (typeof value === 'string' &&
|
|
1575
|
-
|
|
1592
|
+
if (typeof value === 'string' && _this3.selectedTags.includes(value)) {
|
|
1593
|
+
_this3.isOpen = false;
|
|
1576
1594
|
return;
|
|
1577
1595
|
}
|
|
1578
|
-
|
|
1596
|
+
_this3.selectedTags = [].concat(_this3.selectedTags);
|
|
1579
1597
|
if (typeof value === 'string' && !!value) {
|
|
1580
|
-
|
|
1581
|
-
} else if (Array.isArray(value) && !isEqual(
|
|
1582
|
-
|
|
1598
|
+
_this3.selectedTags.push(value);
|
|
1599
|
+
} else if (Array.isArray(value) && !isEqual(_this3.selectedTags, value)) {
|
|
1600
|
+
_this3.selectedTags = value;
|
|
1583
1601
|
}
|
|
1584
1602
|
} else if (value) {
|
|
1585
|
-
|
|
1603
|
+
_this3.selectedTags = typeof value !== 'string' ? value : [].concat(value);
|
|
1586
1604
|
}
|
|
1587
|
-
|
|
1605
|
+
_this3.currentValue = '';
|
|
1588
1606
|
} else {
|
|
1589
|
-
|
|
1607
|
+
_this3.currentValue = decodeHtml(value);
|
|
1590
1608
|
}
|
|
1591
1609
|
var queryHandlerValue = value;
|
|
1592
|
-
if (
|
|
1593
|
-
queryHandlerValue = Array.isArray(
|
|
1610
|
+
if (_this3.$options.isTagsMode && cause === causes.SUGGESTION_SELECT) {
|
|
1611
|
+
queryHandlerValue = Array.isArray(_this3.selectedTags) && _this3.selectedTags.length ? _this3.selectedTags : undefined;
|
|
1594
1612
|
}
|
|
1595
|
-
if ((
|
|
1613
|
+
if ((_this3.faqAnswer || _this3.faqQuestion) && value === '') {
|
|
1596
1614
|
// Empty the previous state
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1615
|
+
_this3.faqAnswer = '';
|
|
1616
|
+
_this3.faqQuestion = '';
|
|
1617
|
+
_this3.showAIScreen = false;
|
|
1600
1618
|
}
|
|
1601
1619
|
if (isDefaultValue) {
|
|
1602
|
-
if (
|
|
1620
|
+
if (_this3.$props.autosuggest) {
|
|
1603
1621
|
if (toggleIsOpen) {
|
|
1604
|
-
|
|
1622
|
+
_this3.isOpen = false;
|
|
1605
1623
|
}
|
|
1606
|
-
if (typeof
|
|
1624
|
+
if (typeof _this3.currentValue === 'string') _this3.triggerDefaultQuery(_this3.currentValue, props.enableAI && _this3.currentTriggerMode === AI_TRIGGER_MODES.QUESTION && _this3.currentValue.endsWith('?') ? {
|
|
1607
1625
|
enableAI: true
|
|
1608
1626
|
} : {}, shouldExecuteQuery);
|
|
1609
1627
|
} // in case of strict selection only SUGGESTION_SELECT should be able
|
|
1610
1628
|
// to set the query otherwise the value should reset
|
|
1611
1629
|
if (props.strictSelection) {
|
|
1612
|
-
if (cause === causes.SUGGESTION_SELECT || (
|
|
1613
|
-
|
|
1630
|
+
if (cause === causes.SUGGESTION_SELECT || (_this3.$options.isTagsMode ? _this3.selectedTags.length === 0 : value === '')) {
|
|
1631
|
+
_this3.triggerCustomQuery(queryHandlerValue, _this3.$options.isTagsMode ? undefined : categoryValue, shouldExecuteQuery);
|
|
1614
1632
|
} else {
|
|
1615
|
-
|
|
1633
|
+
_this3.setValue('', true);
|
|
1616
1634
|
}
|
|
1617
1635
|
} else if (props.value === undefined || cause === causes.SUGGESTION_SELECT || cause === causes.CLEAR_VALUE) {
|
|
1618
|
-
|
|
1619
|
-
|
|
1636
|
+
_this3.showAIScreen = false;
|
|
1637
|
+
_this3.triggerCustomQuery(queryHandlerValue, _this3.$options.isTagsMode ? undefined : categoryValue, shouldExecuteQuery);
|
|
1620
1638
|
}
|
|
1621
1639
|
} else {
|
|
1622
1640
|
// debounce for handling text while typing
|
|
1623
|
-
|
|
1641
|
+
_this3.handleTextChange(value, cause);
|
|
1624
1642
|
}
|
|
1625
|
-
|
|
1626
|
-
|
|
1643
|
+
_this3.$emit('valueChange', value);
|
|
1644
|
+
_this3.$emit('value-change', value);
|
|
1627
1645
|
};
|
|
1628
1646
|
checkValueChange(props.componentId, value, props.beforeValueChange, performUpdate);
|
|
1629
1647
|
},
|
|
@@ -1772,7 +1790,7 @@ var SearchBox = defineComponent({
|
|
|
1772
1790
|
this.$emit('key-down', event, this.triggerQuery);
|
|
1773
1791
|
},
|
|
1774
1792
|
onInputChange: function onInputChange(e) {
|
|
1775
|
-
var
|
|
1793
|
+
var _this4 = this;
|
|
1776
1794
|
var inputValue = e.target.value;
|
|
1777
1795
|
if (!this.$data.isOpen && this.$props.autosuggest) {
|
|
1778
1796
|
this.isOpen = true;
|
|
@@ -1786,7 +1804,7 @@ var SearchBox = defineComponent({
|
|
|
1786
1804
|
} else {
|
|
1787
1805
|
this.$emit('change', inputValue, function (_ref3) {
|
|
1788
1806
|
var isOpen = _ref3.isOpen;
|
|
1789
|
-
return
|
|
1807
|
+
return _this4.triggerQuery({
|
|
1790
1808
|
defaultQuery: true,
|
|
1791
1809
|
customQuery: true,
|
|
1792
1810
|
value: inputValue,
|
|
@@ -1830,7 +1848,7 @@ var SearchBox = defineComponent({
|
|
|
1830
1848
|
}
|
|
1831
1849
|
},
|
|
1832
1850
|
onSuggestionSelected: function onSuggestionSelected(suggestion) {
|
|
1833
|
-
var
|
|
1851
|
+
var _this5 = this;
|
|
1834
1852
|
var value = this.$props.value;
|
|
1835
1853
|
// The state of the suggestion is open by the time it reaches here. i.e. isOpen = true
|
|
1836
1854
|
// handle when FAQ suggestion is clicked
|
|
@@ -1879,10 +1897,10 @@ var SearchBox = defineComponent({
|
|
|
1879
1897
|
this.setValue(emitValue, true, this.$props, causes.SUGGESTION_SELECT, false, suggestion._category);
|
|
1880
1898
|
this.$emit('change', emitValue, function (_ref4) {
|
|
1881
1899
|
var isOpen = _ref4.isOpen;
|
|
1882
|
-
return
|
|
1900
|
+
return _this5.triggerQuery(_extends({
|
|
1883
1901
|
isOpen: isOpen,
|
|
1884
1902
|
value: emitValue
|
|
1885
|
-
}, !
|
|
1903
|
+
}, !_this5.$options.isTagsMode && {
|
|
1886
1904
|
categoryValue: suggestion._category
|
|
1887
1905
|
}));
|
|
1888
1906
|
});
|
|
@@ -1922,7 +1940,7 @@ var SearchBox = defineComponent({
|
|
|
1922
1940
|
return null;
|
|
1923
1941
|
},
|
|
1924
1942
|
renderErrorComponent: function renderErrorComponent(isAIError) {
|
|
1925
|
-
var
|
|
1943
|
+
var _this6 = this;
|
|
1926
1944
|
if (isAIError === void 0) {
|
|
1927
1945
|
isAIError = false;
|
|
1928
1946
|
}
|
|
@@ -1949,7 +1967,7 @@ var SearchBox = defineComponent({
|
|
|
1949
1967
|
"themePreset": this.themePreset
|
|
1950
1968
|
}, {
|
|
1951
1969
|
"default": function _default() {
|
|
1952
|
-
return [isFunction(renderError) ? renderError(
|
|
1970
|
+
return [isFunction(renderError) ? renderError(_this6.error) : renderError];
|
|
1953
1971
|
}
|
|
1954
1972
|
});
|
|
1955
1973
|
}
|
|
@@ -2029,7 +2047,7 @@ var SearchBox = defineComponent({
|
|
|
2029
2047
|
});
|
|
2030
2048
|
},
|
|
2031
2049
|
renderEnterButtonElement: function renderEnterButtonElement() {
|
|
2032
|
-
var
|
|
2050
|
+
var _this7 = this;
|
|
2033
2051
|
var _this$$props2 = this.$props,
|
|
2034
2052
|
enterButton = _this$$props2.enterButton,
|
|
2035
2053
|
innerClass = _this$$props2.innerClass;
|
|
@@ -2037,12 +2055,12 @@ var SearchBox = defineComponent({
|
|
|
2037
2055
|
if (enterButton) {
|
|
2038
2056
|
var getEnterButtonMarkup = function getEnterButtonMarkup() {
|
|
2039
2057
|
if (renderEnterButton) {
|
|
2040
|
-
return renderEnterButton(
|
|
2058
|
+
return renderEnterButton(_this7.enterButtonOnClick);
|
|
2041
2059
|
}
|
|
2042
2060
|
return createVNode(Button, {
|
|
2043
2061
|
"class": "enter-btn " + getClassName$1(innerClass, 'enter-button'),
|
|
2044
2062
|
"primary": true,
|
|
2045
|
-
"onClick":
|
|
2063
|
+
"onClick": _this7.enterButtonOnClick
|
|
2046
2064
|
}, {
|
|
2047
2065
|
"default": function _default() {
|
|
2048
2066
|
return [createTextVNode("Search")];
|
|
@@ -2068,7 +2086,7 @@ var SearchBox = defineComponent({
|
|
|
2068
2086
|
return '/';
|
|
2069
2087
|
},
|
|
2070
2088
|
renderLeftIcons: function renderLeftIcons() {
|
|
2071
|
-
var
|
|
2089
|
+
var _this8 = this;
|
|
2072
2090
|
var _slot3;
|
|
2073
2091
|
var _this$$props3 = this.$props,
|
|
2074
2092
|
iconPosition = _this$$props3.iconPosition,
|
|
@@ -2078,8 +2096,8 @@ var SearchBox = defineComponent({
|
|
|
2078
2096
|
}, {
|
|
2079
2097
|
"default": function _default() {
|
|
2080
2098
|
return [iconPosition === 'left' && showIcon && createVNode(IconWrapper, {
|
|
2081
|
-
"onClick":
|
|
2082
|
-
}, _isSlot(_slot3 =
|
|
2099
|
+
"onClick": _this8.handleSearchIconClick
|
|
2100
|
+
}, _isSlot(_slot3 = _this8.renderIcon()) ? _slot3 : {
|
|
2083
2101
|
"default": function _default() {
|
|
2084
2102
|
return [_slot3];
|
|
2085
2103
|
}
|
|
@@ -2088,7 +2106,7 @@ var SearchBox = defineComponent({
|
|
|
2088
2106
|
})]);
|
|
2089
2107
|
},
|
|
2090
2108
|
renderRightIcons: function renderRightIcons() {
|
|
2091
|
-
var
|
|
2109
|
+
var _this9 = this;
|
|
2092
2110
|
var _slot4, _slot5, _slot6;
|
|
2093
2111
|
var _this$$props4 = this.$props,
|
|
2094
2112
|
iconPosition = _this$$props4.iconPosition,
|
|
@@ -2105,29 +2123,29 @@ var SearchBox = defineComponent({
|
|
|
2105
2123
|
}, {
|
|
2106
2124
|
"default": function _default() {
|
|
2107
2125
|
return [currentValue && showClear && createVNode(IconWrapper, {
|
|
2108
|
-
"onClick":
|
|
2126
|
+
"onClick": _this9.clearValue,
|
|
2109
2127
|
"showIcon": showIcon,
|
|
2110
2128
|
"isClearIcon": true
|
|
2111
|
-
}, _isSlot(_slot4 =
|
|
2129
|
+
}, _isSlot(_slot4 = _this9.renderCancelIcon()) ? _slot4 : {
|
|
2112
2130
|
"default": function _default() {
|
|
2113
2131
|
return [_slot4];
|
|
2114
2132
|
}
|
|
2115
2133
|
}), showFocusShortcutsIcon && createVNode(ButtonIconWrapper, {
|
|
2116
2134
|
"onClick": function onClick(e) {
|
|
2117
|
-
return
|
|
2135
|
+
return _this9.focusSearchBox(e);
|
|
2118
2136
|
}
|
|
2119
|
-
}, _isSlot(_slot5 =
|
|
2137
|
+
}, _isSlot(_slot5 = _this9.renderShortcut()) ? _slot5 : {
|
|
2120
2138
|
"default": function _default() {
|
|
2121
2139
|
return [_slot5];
|
|
2122
2140
|
}
|
|
2123
2141
|
}), showVoiceSearch && createVNode(Mic, {
|
|
2124
2142
|
"getInstance": getMicInstance,
|
|
2125
2143
|
"render": renderMic,
|
|
2126
|
-
"handleResult":
|
|
2144
|
+
"handleResult": _this9.handleVoiceResults,
|
|
2127
2145
|
"className": getClassName$1(innerClass, 'mic') || null
|
|
2128
2146
|
}, null), iconPosition === 'right' && showIcon && createVNode(IconWrapper, {
|
|
2129
|
-
"onClick":
|
|
2130
|
-
}, _isSlot(_slot6 =
|
|
2147
|
+
"onClick": _this9.handleSearchIconClick
|
|
2148
|
+
}, _isSlot(_slot6 = _this9.renderIcon()) ? _slot6 : {
|
|
2131
2149
|
"default": function _default() {
|
|
2132
2150
|
return [_slot6];
|
|
2133
2151
|
}
|
|
@@ -2146,7 +2164,7 @@ var SearchBox = defineComponent({
|
|
|
2146
2164
|
(_this$$refs4 = this.$refs) == null || (_this$$refs4 = _this$$refs4[this.$props.innerRef]) == null || (_this$$refs4 = _this$$refs4.$el) == null ? void 0 : _this$$refs4.focus(); // eslint-disable-line
|
|
2147
2165
|
},
|
|
2148
2166
|
listenForFocusShortcuts: function listenForFocusShortcuts() {
|
|
2149
|
-
var
|
|
2167
|
+
var _this10 = this;
|
|
2150
2168
|
var _this$$props$focusSho = this.$props.focusShortcuts,
|
|
2151
2169
|
focusShortcuts = _this$$props$focusSho === void 0 ? ['/'] : _this$$props$focusSho;
|
|
2152
2170
|
if (isEmpty(focusShortcuts)) {
|
|
@@ -2161,7 +2179,7 @@ var SearchBox = defineComponent({
|
|
|
2161
2179
|
function (event, handler) {
|
|
2162
2180
|
// Prevent the default refresh event under WINDOWS system
|
|
2163
2181
|
event.preventDefault();
|
|
2164
|
-
|
|
2182
|
+
_this10.focusSearchBox(event);
|
|
2165
2183
|
});
|
|
2166
2184
|
|
|
2167
2185
|
// if one of modifier keys are used, they are handled below
|
|
@@ -2171,7 +2189,7 @@ var SearchBox = defineComponent({
|
|
|
2171
2189
|
for (var index = 0; index < modifierKeys.length; index += 1) {
|
|
2172
2190
|
var element = modifierKeys[index];
|
|
2173
2191
|
if (hotkeys[element]) {
|
|
2174
|
-
|
|
2192
|
+
_this10.focusSearchBox(event);
|
|
2175
2193
|
break;
|
|
2176
2194
|
}
|
|
2177
2195
|
}
|
|
@@ -2184,10 +2202,10 @@ var SearchBox = defineComponent({
|
|
|
2184
2202
|
this.triggerDefaultQuery(value);
|
|
2185
2203
|
},
|
|
2186
2204
|
renderActionIcon: function renderActionIcon(suggestion) {
|
|
2187
|
-
var
|
|
2205
|
+
var _this11 = this;
|
|
2188
2206
|
var handleAutoFillClick = function handleAutoFillClick(e) {
|
|
2189
2207
|
e.stopPropagation();
|
|
2190
|
-
|
|
2208
|
+
_this11.onAutofillClick(suggestion);
|
|
2191
2209
|
};
|
|
2192
2210
|
if (suggestion._suggestion_type === suggestionTypes.Featured) {
|
|
2193
2211
|
if (suggestion.action === featuredSuggestionsActionTypes.FUNCTION) {
|
|
@@ -2210,7 +2228,7 @@ var SearchBox = defineComponent({
|
|
|
2210
2228
|
return null;
|
|
2211
2229
|
},
|
|
2212
2230
|
renderTag: function renderTag(item) {
|
|
2213
|
-
var
|
|
2231
|
+
var _this12 = this;
|
|
2214
2232
|
var innerClass = this.$props.innerClass;
|
|
2215
2233
|
return createVNode(TagItem, {
|
|
2216
2234
|
"class": getClassName$1(innerClass, 'selected-tag') || ''
|
|
@@ -2221,7 +2239,7 @@ var SearchBox = defineComponent({
|
|
|
2221
2239
|
"aria-label": "delete-tag",
|
|
2222
2240
|
"class": "close-icon",
|
|
2223
2241
|
"onClick": function onClick() {
|
|
2224
|
-
return
|
|
2242
|
+
return _this12.clearTag(item);
|
|
2225
2243
|
}
|
|
2226
2244
|
}, [createVNode(CancelSvg, null, null)])];
|
|
2227
2245
|
}
|
|
@@ -2244,7 +2262,7 @@ var SearchBox = defineComponent({
|
|
|
2244
2262
|
}
|
|
2245
2263
|
},
|
|
2246
2264
|
renderTags: function renderTags() {
|
|
2247
|
-
var
|
|
2265
|
+
var _this13 = this;
|
|
2248
2266
|
if (!Array.isArray(this.selectedTags)) {
|
|
2249
2267
|
return null;
|
|
2250
2268
|
}
|
|
@@ -2258,16 +2276,16 @@ var SearchBox = defineComponent({
|
|
|
2258
2276
|
}) : createVNode(TagsContainer, null, {
|
|
2259
2277
|
"default": function _default() {
|
|
2260
2278
|
return [tagsList.map(function (item) {
|
|
2261
|
-
return
|
|
2279
|
+
return _this13.renderTag(item);
|
|
2262
2280
|
}), shouldRenderClearAllTag && createVNode(TagItem, {
|
|
2263
|
-
"class": getClassName$1(
|
|
2281
|
+
"class": getClassName$1(_this13.$props.innerClass, 'selected-tag') || ''
|
|
2264
2282
|
}, {
|
|
2265
2283
|
"default": function _default() {
|
|
2266
2284
|
return [createVNode("span", null, [createTextVNode("Clear All")]), createVNode("span", {
|
|
2267
2285
|
"role": "img",
|
|
2268
2286
|
"aria-label": "delete-tag",
|
|
2269
2287
|
"class": "close-icon",
|
|
2270
|
-
"onClick":
|
|
2288
|
+
"onClick": _this13.clearAllTags
|
|
2271
2289
|
}, [createVNode(CancelSvg, null, null)])];
|
|
2272
2290
|
}
|
|
2273
2291
|
})];
|
|
@@ -2275,13 +2293,13 @@ var SearchBox = defineComponent({
|
|
|
2275
2293
|
});
|
|
2276
2294
|
},
|
|
2277
2295
|
getAISourceObjects: function getAISourceObjects() {
|
|
2278
|
-
var
|
|
2296
|
+
var _this14 = this;
|
|
2279
2297
|
var sourceObjects = [];
|
|
2280
2298
|
if (!this.AIResponse) return sourceObjects;
|
|
2281
2299
|
var docIds = this.AIResponse && this.AIResponse.response && this.AIResponse.response.answer && this.AIResponse.response.answer.documentIds || [];
|
|
2282
2300
|
if (this.initialHits) {
|
|
2283
2301
|
docIds.forEach(function (id) {
|
|
2284
|
-
var foundSourceObj =
|
|
2302
|
+
var foundSourceObj = _this14.initialHits.find(function (hit) {
|
|
2285
2303
|
return hit._id === id;
|
|
2286
2304
|
}) || {};
|
|
2287
2305
|
if (foundSourceObj) {
|
|
@@ -2315,7 +2333,7 @@ var SearchBox = defineComponent({
|
|
|
2315
2333
|
},
|
|
2316
2334
|
renderAIScreenFooter: function renderAIScreenFooter() {
|
|
2317
2335
|
var _slot8;
|
|
2318
|
-
var
|
|
2336
|
+
var _this15 = this;
|
|
2319
2337
|
var _this$$props$AIUIConf2 = this.$props.AIUIConfig,
|
|
2320
2338
|
AIUIConfig = _this$$props$AIUIConf2 === void 0 ? {} : _this$$props$AIUIConf2;
|
|
2321
2339
|
var _ref6 = AIUIConfig || {},
|
|
@@ -2324,22 +2342,22 @@ var SearchBox = defineComponent({
|
|
|
2324
2342
|
_ref6$onSourceClick = _ref6.onSourceClick,
|
|
2325
2343
|
onSourceClick = _ref6$onSourceClick === void 0 ? function () {} : _ref6$onSourceClick;
|
|
2326
2344
|
var renderSourceDocumentLabel = function renderSourceDocumentLabel(sourceObj) {
|
|
2327
|
-
if (
|
|
2328
|
-
return
|
|
2345
|
+
if (_this15.$props.AIUIConfig && _this15.$props.AIUIConfig.renderSourceDocument) {
|
|
2346
|
+
return _this15.$props.AIUIConfig.renderSourceDocument(sourceObj);
|
|
2329
2347
|
}
|
|
2330
|
-
if (
|
|
2331
|
-
return
|
|
2348
|
+
if (_this15.$slots.renderSourceDocument) {
|
|
2349
|
+
return _this15.$slots.renderSourceDocument(sourceObj);
|
|
2332
2350
|
}
|
|
2333
2351
|
return sourceObj._id;
|
|
2334
2352
|
};
|
|
2335
|
-
return showSourceDocuments && this.showAIScreenFooter && this.AIResponse && this.AIResponse.response && this.AIResponse.response.answer && this.AIResponse.response.answer.documentIds ? createVNode(Footer, {
|
|
2353
|
+
return showSourceDocuments && this.showAIScreenFooter && this.AIResponse && this.AIResponse.response && this.AIResponse.response.answer && this.AIResponse.response.answer.documentIds && this.AIResponse.response.answer.documentIds.length ? createVNode(Footer, {
|
|
2336
2354
|
"themePreset": this.$props.themePreset
|
|
2337
2355
|
}, {
|
|
2338
2356
|
"default": function _default() {
|
|
2339
|
-
return [createTextVNode("Summary generated using the following sources:"), ' ', createVNode(SourceTags, null, _isSlot(_slot8 =
|
|
2357
|
+
return [createTextVNode("Summary generated using the following sources:"), ' ', createVNode(SourceTags, null, _isSlot(_slot8 = _this15.getAISourceObjects().map(function (el) {
|
|
2340
2358
|
var _slot7;
|
|
2341
2359
|
return createVNode(Button, {
|
|
2342
|
-
"class": "--ai-source-tag " + (getClassName$1(
|
|
2360
|
+
"class": "--ai-source-tag " + (getClassName$1(_this15.$props.innerClass, 'ai-source-tag') || ''),
|
|
2343
2361
|
"info": true,
|
|
2344
2362
|
"onClick": function onClick() {
|
|
2345
2363
|
return onSourceClick && onSourceClick(el);
|
|
@@ -2358,7 +2376,7 @@ var SearchBox = defineComponent({
|
|
|
2358
2376
|
}) : null;
|
|
2359
2377
|
},
|
|
2360
2378
|
renderAIScreen: function renderAIScreen() {
|
|
2361
|
-
var
|
|
2379
|
+
var _this16 = this;
|
|
2362
2380
|
var customAIRenderer = this.$props.renderAIAnswer || this.$slots.renderAIAnswer;
|
|
2363
2381
|
if (customAIRenderer) {
|
|
2364
2382
|
return customAIRenderer({
|
|
@@ -2382,11 +2400,11 @@ var SearchBox = defineComponent({
|
|
|
2382
2400
|
"hideUI": this.isAIResponseLoading || this.isLoading || !this.sessionIdFromStore,
|
|
2383
2401
|
"key": this.sessionIdFromStore,
|
|
2384
2402
|
"onFeedbackSubmit": function onFeedbackSubmit(useful, reason) {
|
|
2385
|
-
|
|
2403
|
+
_this16.feedbackState = {
|
|
2386
2404
|
isRecorded: true,
|
|
2387
2405
|
feedbackType: useful ? 'positive' : 'negative'
|
|
2388
2406
|
};
|
|
2389
|
-
|
|
2407
|
+
_this16.recordAISessionUsefulness(_this16.sessionIdFromStore, {
|
|
2390
2408
|
useful: useful,
|
|
2391
2409
|
reason: reason
|
|
2392
2410
|
});
|
|
@@ -2421,7 +2439,7 @@ var SearchBox = defineComponent({
|
|
|
2421
2439
|
});
|
|
2422
2440
|
},
|
|
2423
2441
|
renderAskButtonElement: function renderAskButtonElement() {
|
|
2424
|
-
var
|
|
2442
|
+
var _this17 = this;
|
|
2425
2443
|
var _this$$props5 = this.$props,
|
|
2426
2444
|
AIUIConfig = _this$$props5.AIUIConfig,
|
|
2427
2445
|
innerClass = _this$$props5.innerClass;
|
|
@@ -2431,12 +2449,12 @@ var SearchBox = defineComponent({
|
|
|
2431
2449
|
if (askButton) {
|
|
2432
2450
|
var getEnterButtonMarkup = function getEnterButtonMarkup() {
|
|
2433
2451
|
if (renderAskButton) {
|
|
2434
|
-
return renderAskButton(
|
|
2452
|
+
return renderAskButton(_this17.askButtonOnClick);
|
|
2435
2453
|
}
|
|
2436
2454
|
return createVNode(Button, {
|
|
2437
2455
|
"class": "enter-btn " + getClassName$1(innerClass, 'ask-button'),
|
|
2438
2456
|
"info": true,
|
|
2439
|
-
"onClick":
|
|
2457
|
+
"onClick": _this17.askButtonOnClick
|
|
2440
2458
|
}, {
|
|
2441
2459
|
"default": function _default() {
|
|
2442
2460
|
return [createTextVNode("Ask")];
|
|
@@ -2451,28 +2469,28 @@ var SearchBox = defineComponent({
|
|
|
2451
2469
|
}
|
|
2452
2470
|
},
|
|
2453
2471
|
render: function render() {
|
|
2454
|
-
var
|
|
2472
|
+
var _this18 = this;
|
|
2455
2473
|
var expandSuggestionsContainer = this.$props.expandSuggestionsContainer;
|
|
2456
2474
|
var _this$$slots = this.$slots,
|
|
2457
2475
|
recentSearchesIcon = _this$$slots.recentSearchesIcon,
|
|
2458
2476
|
popularSearchesIcon = _this$$slots.popularSearchesIcon;
|
|
2459
|
-
var hasSuggestions = Array.isArray(this.
|
|
2477
|
+
var hasSuggestions = Array.isArray(this.parsedSuggestions) && this.parsedSuggestions.length;
|
|
2460
2478
|
var renderItem = this.$slots.renderItem || this.$props.renderItem;
|
|
2461
2479
|
return createVNode(Container, {
|
|
2462
2480
|
"class": this.$props.className
|
|
2463
2481
|
}, {
|
|
2464
2482
|
"default": function _default() {
|
|
2465
|
-
return [
|
|
2466
|
-
"class": getClassName$1(
|
|
2483
|
+
return [_this18.$props.title && createVNode(Title, {
|
|
2484
|
+
"class": getClassName$1(_this18.$props.innerClass, 'title') || ''
|
|
2467
2485
|
}, {
|
|
2468
2486
|
"default": function _default() {
|
|
2469
|
-
return [
|
|
2487
|
+
return [_this18.$props.title];
|
|
2470
2488
|
}
|
|
2471
|
-
}),
|
|
2472
|
-
"id":
|
|
2473
|
-
"handleChange":
|
|
2474
|
-
"handleMouseup":
|
|
2475
|
-
"isOpen":
|
|
2489
|
+
}), _this18.$props.autosuggest ? createVNode(Downshift, {
|
|
2490
|
+
"id": _this18.$props.componentId + "-downshift",
|
|
2491
|
+
"handleChange": _this18.onSuggestionSelected,
|
|
2492
|
+
"handleMouseup": _this18.handleStateChange,
|
|
2493
|
+
"isOpen": _this18.$data.isOpen
|
|
2476
2494
|
}, {
|
|
2477
2495
|
"default": function _default(_ref8) {
|
|
2478
2496
|
var getInputEvents = _ref8.getInputEvents,
|
|
@@ -2528,21 +2546,21 @@ var SearchBox = defineComponent({
|
|
|
2528
2546
|
}
|
|
2529
2547
|
};
|
|
2530
2548
|
var indexOffset = 0;
|
|
2531
|
-
return createVNode("div", null, [
|
|
2549
|
+
return createVNode("div", null, [_this18.hasCustomRenderer && _this18.getComponent({
|
|
2532
2550
|
isOpen: isOpen,
|
|
2533
2551
|
getItemProps: getItemProps,
|
|
2534
2552
|
getItemEvents: getItemEvents,
|
|
2535
2553
|
highlightedIndex: highlightedIndex
|
|
2536
|
-
}),
|
|
2537
|
-
"class": suggestions(
|
|
2554
|
+
}), _this18.renderErrorComponent(), !_this18.hasCustomRenderer && isOpen && hasSuggestions ? createVNode("ul", {
|
|
2555
|
+
"class": suggestions(_this18.themePreset, _this18.theme) + " " + getClassName$1(_this18.$props.innerClass, 'list') + " " + searchboxSuggestions(_this18.themePreset, _this18.theme) + "\n\t\t\t\t\t\t\t\t\t\t\t\t\t",
|
|
2538
2556
|
"ref": _dropdownULRef
|
|
2539
|
-
}, [
|
|
2540
|
-
"themePreset":
|
|
2557
|
+
}, [_this18.showAIScreen && createVNode(SearchBoxAISection, {
|
|
2558
|
+
"themePreset": _this18.$props.themePreset
|
|
2541
2559
|
}, {
|
|
2542
2560
|
"default": function _default() {
|
|
2543
|
-
return [
|
|
2561
|
+
return [_this18.renderAIScreen(), ' ', _this18.renderErrorComponent(true)];
|
|
2544
2562
|
}
|
|
2545
|
-
}), !
|
|
2563
|
+
}), !_this18.showAIScreen && _this18.parsedSuggestions.map(function (item, itemIndex) {
|
|
2546
2564
|
var index = indexOffset + itemIndex;
|
|
2547
2565
|
if (Array.isArray(item)) {
|
|
2548
2566
|
var sectionHtml = xss(item[0].sectionLabel);
|
|
@@ -2551,7 +2569,7 @@ var SearchBox = defineComponent({
|
|
|
2551
2569
|
"key": "section-" + itemIndex,
|
|
2552
2570
|
"class": "section-container"
|
|
2553
2571
|
}, [sectionHtml ? createVNode("div", {
|
|
2554
|
-
"class": "section-header " + getClassName$1(
|
|
2572
|
+
"class": "section-header " + getClassName$1(_this18.$props.innerClass, 'section-label'),
|
|
2555
2573
|
"key": "" + item[0].sectionId,
|
|
2556
2574
|
"innerHTML": sectionHtml
|
|
2557
2575
|
}, null) : null, createVNode("ul", {
|
|
@@ -2571,7 +2589,7 @@ var SearchBox = defineComponent({
|
|
|
2571
2589
|
justifyContent: 'flex-start',
|
|
2572
2590
|
alignItems: 'center'
|
|
2573
2591
|
},
|
|
2574
|
-
"class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$1(
|
|
2592
|
+
"class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$1(_this18.$props.innerClass, 'active-suggestion-item') : "li-item " + getClassName$1(_this18.$props.innerClass, 'suggestion-item'))
|
|
2575
2593
|
}), [renderItem(sectionItem)]);
|
|
2576
2594
|
}
|
|
2577
2595
|
if (sectionItem._suggestion_type === '_internal_a_i_trigger') {
|
|
@@ -2585,9 +2603,9 @@ var SearchBox = defineComponent({
|
|
|
2585
2603
|
justifyContent: 'flex-start',
|
|
2586
2604
|
alignItems: 'center'
|
|
2587
2605
|
},
|
|
2588
|
-
"class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$1(
|
|
2606
|
+
"class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$1(_this18.$props.innerClass, 'active-suggestion-item') : "li-item " + getClassName$1(_this18.$props.innerClass, 'suggestion-item'))
|
|
2589
2607
|
}), [createVNode(SuggestionItem, {
|
|
2590
|
-
"currentValue":
|
|
2608
|
+
"currentValue": _this18.currentValue,
|
|
2591
2609
|
"suggestion": sectionItem
|
|
2592
2610
|
}, null)]);
|
|
2593
2611
|
}
|
|
@@ -2601,7 +2619,7 @@ var SearchBox = defineComponent({
|
|
|
2601
2619
|
justifyContent: 'flex-start',
|
|
2602
2620
|
alignItems: 'center'
|
|
2603
2621
|
},
|
|
2604
|
-
"class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$1(
|
|
2622
|
+
"class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$1(_this18.$props.innerClass, 'active-suggestion-item') : "li-item " + getClassName$1(_this18.$props.innerClass, 'suggestion-item'))
|
|
2605
2623
|
}), [createVNode("div", {
|
|
2606
2624
|
"style": {
|
|
2607
2625
|
padding: '0 10px 0 0',
|
|
@@ -2609,74 +2627,74 @@ var SearchBox = defineComponent({
|
|
|
2609
2627
|
}
|
|
2610
2628
|
}, [createVNode(CustomSvg, {
|
|
2611
2629
|
"key": sectionItem._suggestion_type + "-" + sectionIndex,
|
|
2612
|
-
"className": getClassName$1(
|
|
2630
|
+
"className": getClassName$1(_this18.$props.innerClass, sectionItem._suggestion_type + "-search-icon") || null,
|
|
2613
2631
|
"icon": getIcon(sectionItem._suggestion_type, sectionItem, suggestionsHaveIcon),
|
|
2614
2632
|
"type": sectionItem._suggestion_type + "-search-icon"
|
|
2615
2633
|
}, null)]), createVNode(SuggestionItem, {
|
|
2616
|
-
"currentValue":
|
|
2634
|
+
"currentValue": _this18.currentValue,
|
|
2617
2635
|
"suggestion": sectionItem
|
|
2618
|
-
}, null),
|
|
2636
|
+
}, null), _this18.renderActionIcon(sectionItem)]);
|
|
2619
2637
|
})])]);
|
|
2620
2638
|
}
|
|
2621
2639
|
return createVNode("div", null, [createTextVNode("No suggestions")]);
|
|
2622
|
-
}), !
|
|
2640
|
+
}), !_this18.showAIScreen && _this18.parsedSuggestions.length && _this18.$props.showSuggestionsFooter ? _this18.suggestionsFooter() : null]) : _this18.renderNoSuggestions(_this18.normalizedSuggestions)]);
|
|
2623
2641
|
};
|
|
2624
2642
|
return createVNode("div", {
|
|
2625
2643
|
"class": suggestionsContainer
|
|
2626
2644
|
}, [createVNode(InputGroup, {
|
|
2627
2645
|
"searchBox": true,
|
|
2628
2646
|
"ref": _inputGroupRef,
|
|
2629
|
-
"isOpen":
|
|
2647
|
+
"isOpen": _this18.$data.isOpen
|
|
2630
2648
|
}, {
|
|
2631
2649
|
"default": function _default() {
|
|
2632
2650
|
return [createVNode(Actions$1, null, {
|
|
2633
2651
|
"default": function _default() {
|
|
2634
|
-
return [
|
|
2652
|
+
return [_this18.renderInputAddonBefore(), _this18.renderLeftIcons()];
|
|
2635
2653
|
}
|
|
2636
2654
|
}), createVNode(InputWrapper, null, {
|
|
2637
2655
|
"default": function _default() {
|
|
2638
2656
|
return [createVNode(TextArea, mergeProps(_transformOn(getInputEvents({
|
|
2639
|
-
onInput:
|
|
2657
|
+
onInput: _this18.onInputChange,
|
|
2640
2658
|
onBlur: function onBlur(e) {
|
|
2641
|
-
|
|
2659
|
+
_this18.$emit('blur', e, _this18.triggerQuery);
|
|
2642
2660
|
},
|
|
2643
|
-
onFocus:
|
|
2661
|
+
onFocus: _this18.handleFocus,
|
|
2644
2662
|
onKeyPress: function onKeyPress(e) {
|
|
2645
|
-
|
|
2646
|
-
|
|
2663
|
+
_this18.$emit('keyPress', e, _this18.triggerQuery);
|
|
2664
|
+
_this18.$emit('key-press', e, _this18.triggerQuery);
|
|
2647
2665
|
},
|
|
2648
2666
|
onKeyDown: function onKeyDown(e) {
|
|
2649
|
-
return
|
|
2667
|
+
return _this18.handleKeyDown(e, highlightedIndex);
|
|
2650
2668
|
},
|
|
2651
2669
|
onKeyUp: function onKeyUp(e) {
|
|
2652
|
-
|
|
2653
|
-
|
|
2670
|
+
_this18.$emit('keyUp', e, _this18.triggerQuery);
|
|
2671
|
+
_this18.$emit('key-up', e, _this18.triggerQuery);
|
|
2654
2672
|
},
|
|
2655
2673
|
onClick: function onClick() {
|
|
2656
2674
|
setHighlightedIndex(null);
|
|
2657
2675
|
}
|
|
2658
2676
|
})), {
|
|
2659
2677
|
"searchBox": true,
|
|
2660
|
-
"isOpen":
|
|
2661
|
-
"id":
|
|
2662
|
-
"ref":
|
|
2663
|
-
"class": getClassName$1(
|
|
2664
|
-
"placeholder":
|
|
2665
|
-
"autoFocus":
|
|
2678
|
+
"isOpen": _this18.$data.isOpen,
|
|
2679
|
+
"id": _this18.$props.componentId + "-input",
|
|
2680
|
+
"ref": _this18.$props.innerRef,
|
|
2681
|
+
"class": getClassName$1(_this18.$props.innerClass, 'input'),
|
|
2682
|
+
"placeholder": _this18.$props.placeholder,
|
|
2683
|
+
"autoFocus": _this18.$props.autoFocus
|
|
2666
2684
|
}, getInputProps({
|
|
2667
|
-
value:
|
|
2685
|
+
value: _this18.$data.currentValue === null ? '' : _this18.$data.currentValue
|
|
2668
2686
|
}), {
|
|
2669
|
-
"themePreset":
|
|
2687
|
+
"themePreset": _this18.themePreset,
|
|
2670
2688
|
"autocomplete": "off"
|
|
2671
2689
|
}), null), !expandSuggestionsContainer && renderSuggestionsDropdown()];
|
|
2672
2690
|
}
|
|
2673
2691
|
}), createVNode(Actions$1, null, {
|
|
2674
2692
|
"default": function _default() {
|
|
2675
|
-
return [
|
|
2693
|
+
return [_this18.renderRightIcons(), _this18.renderInputAddonAfter(), _this18.renderAskButtonElement(), _this18.renderEnterButtonElement()];
|
|
2676
2694
|
}
|
|
2677
2695
|
})];
|
|
2678
2696
|
}
|
|
2679
|
-
}), expandSuggestionsContainer && renderSuggestionsDropdown(),
|
|
2697
|
+
}), expandSuggestionsContainer && renderSuggestionsDropdown(), _this18.renderTags()]);
|
|
2680
2698
|
}
|
|
2681
2699
|
}) : createVNode("div", {
|
|
2682
2700
|
"class": suggestionsContainer
|
|
@@ -2687,43 +2705,43 @@ var SearchBox = defineComponent({
|
|
|
2687
2705
|
"default": function _default() {
|
|
2688
2706
|
return [createVNode(Actions$1, null, {
|
|
2689
2707
|
"default": function _default() {
|
|
2690
|
-
return [
|
|
2708
|
+
return [_this18.renderInputAddonBefore(), _this18.renderLeftIcons()];
|
|
2691
2709
|
}
|
|
2692
2710
|
}), createVNode(InputWrapper, null, {
|
|
2693
2711
|
"default": function _default() {
|
|
2694
2712
|
return [createVNode(TextArea, mergeProps(_transformOn({
|
|
2695
2713
|
blur: function blur(e) {
|
|
2696
|
-
|
|
2714
|
+
_this18.$emit('blur', e, _this18.triggerQuery);
|
|
2697
2715
|
},
|
|
2698
2716
|
keypress: function keypress(e) {
|
|
2699
|
-
|
|
2700
|
-
|
|
2717
|
+
_this18.$emit('keyPress', e, _this18.triggerQuery);
|
|
2718
|
+
_this18.$emit('key-press', e, _this18.triggerQuery);
|
|
2701
2719
|
},
|
|
2702
|
-
input:
|
|
2720
|
+
input: _this18.onInputChange,
|
|
2703
2721
|
focus: function focus(e) {
|
|
2704
|
-
|
|
2722
|
+
_this18.$emit('focus', e, _this18.triggerQuery);
|
|
2705
2723
|
},
|
|
2706
|
-
keydown:
|
|
2724
|
+
keydown: _this18.handleKeyDown,
|
|
2707
2725
|
keyup: function keyup(e) {
|
|
2708
|
-
|
|
2709
|
-
|
|
2726
|
+
_this18.$emit('keyUp', e, _this18.triggerQuery);
|
|
2727
|
+
_this18.$emit('key-up', e, _this18.triggerQuery);
|
|
2710
2728
|
}
|
|
2711
2729
|
}), {
|
|
2712
2730
|
"searchBox": true,
|
|
2713
|
-
"class": getClassName$1(
|
|
2714
|
-
"placeholder":
|
|
2715
|
-
"autofocus":
|
|
2716
|
-
"value":
|
|
2717
|
-
"iconPosition":
|
|
2718
|
-
"showIcon":
|
|
2719
|
-
"showClear":
|
|
2720
|
-
"ref":
|
|
2721
|
-
"themePreset":
|
|
2731
|
+
"class": getClassName$1(_this18.$props.innerClass, 'input') || '',
|
|
2732
|
+
"placeholder": _this18.$props.placeholder,
|
|
2733
|
+
"autofocus": _this18.$props.autoFocus,
|
|
2734
|
+
"value": _this18.$data.currentValue ? _this18.$data.currentValue : '',
|
|
2735
|
+
"iconPosition": _this18.$props.iconPosition,
|
|
2736
|
+
"showIcon": _this18.$props.showIcon,
|
|
2737
|
+
"showClear": _this18.$props.showClear,
|
|
2738
|
+
"ref": _this18.$props.innerRef,
|
|
2739
|
+
"themePreset": _this18.themePreset
|
|
2722
2740
|
}), null)];
|
|
2723
2741
|
}
|
|
2724
2742
|
}), createVNode(Actions$1, null, {
|
|
2725
2743
|
"default": function _default() {
|
|
2726
|
-
return [
|
|
2744
|
+
return [_this18.renderRightIcons(), _this18.renderInputAddonAfter(), _this18.renderEnterButtonElement()];
|
|
2727
2745
|
}
|
|
2728
2746
|
})];
|
|
2729
2747
|
}
|