@appbaseio/reactivesearch-vue 3.1.0-alpha → 3.1.0-alpha.2
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 +461 -781
- 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/DynamicRangeSlider.js +3 -2
- package/dist/cjs/RangeInput.js +3 -2
- package/dist/cjs/RangeSlider.js +3 -2
- package/dist/cjs/index.js +4 -3
- package/dist/cjs/{install-22854c15.js → install-26ae88c8.js} +144 -228
- package/dist/cjs/install.js +4 -3
- package/dist/cjs/version.js +1 -1
- package/dist/components/search/SearchBox.d.ts +0 -4
- package/dist/es/DynamicRangeSlider.js +3 -2
- package/dist/es/RangeInput.js +3 -2
- package/dist/es/RangeSlider.js +3 -2
- package/dist/es/index.js +5 -4
- package/dist/es/{install-7615abec.js → install-924d0354.js} +144 -228
- package/dist/es/install.js +4 -3
- package/dist/es/version.js +1 -1
- package/dist/types.ts +0 -12
- package/package.json +92 -91
|
@@ -97,30 +97,7 @@ var SuggestionItem = {
|
|
|
97
97
|
name: 'SuggestionItem',
|
|
98
98
|
props: {
|
|
99
99
|
currentValue: types.string,
|
|
100
|
-
suggestion: types.any
|
|
101
|
-
innerHTML: types.string.isRequired
|
|
102
|
-
},
|
|
103
|
-
data: function data() {
|
|
104
|
-
return {
|
|
105
|
-
isOverflowing: false
|
|
106
|
-
};
|
|
107
|
-
},
|
|
108
|
-
methods: {
|
|
109
|
-
updateOverflowing: function updateOverflowing() {
|
|
110
|
-
if (this.$refs.container && this.$refs.content) {
|
|
111
|
-
var _this$$refs = this.$refs,
|
|
112
|
-
container = _this$$refs.container,
|
|
113
|
-
content = _this$$refs.content;
|
|
114
|
-
var containerWidth = container.offsetWidth;
|
|
115
|
-
var contentWidth = content.scrollWidth;
|
|
116
|
-
this.isOverflowing = contentWidth > containerWidth;
|
|
117
|
-
} else {
|
|
118
|
-
this.isOverflowing = false;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
|
-
mounted: function mounted() {
|
|
123
|
-
this.updateOverflowing();
|
|
100
|
+
suggestion: types.any
|
|
124
101
|
},
|
|
125
102
|
render: function render() {
|
|
126
103
|
var _this = this;
|
|
@@ -136,11 +113,7 @@ var SuggestionItem = {
|
|
|
136
113
|
if (label) {
|
|
137
114
|
// label has highest precedence
|
|
138
115
|
return typeof label === 'string' ? createVNode("div", {
|
|
139
|
-
"
|
|
140
|
-
"class": "trim",
|
|
141
|
-
"title": this.isOverflowing ? label : ''
|
|
142
|
-
}, [createVNode("div", {
|
|
143
|
-
"ref": "content"
|
|
116
|
+
"class": "trim"
|
|
144
117
|
}, [(_category ? false : isPredictiveSuggestion
|
|
145
118
|
// eslint-disable-next-line
|
|
146
119
|
|| !!_suggestion_type) ? createVNode(PredictiveSuggestion, {
|
|
@@ -150,7 +123,7 @@ var SuggestionItem = {
|
|
|
150
123
|
"textToHighlight": label,
|
|
151
124
|
"autoEscape": true,
|
|
152
125
|
"highlightStyle": highlightStyle
|
|
153
|
-
}, null)])
|
|
126
|
+
}, null)]) : label;
|
|
154
127
|
}
|
|
155
128
|
if (title || image || description) {
|
|
156
129
|
return createVNode(Flex, {
|
|
@@ -1107,42 +1080,6 @@ var AIFeedback = defineComponent({
|
|
|
1107
1080
|
}
|
|
1108
1081
|
});
|
|
1109
1082
|
|
|
1110
|
-
// eslint-disable-next-line import/prefer-default-export
|
|
1111
|
-
var innerText = function innerText(jsx) {
|
|
1112
|
-
// Empty
|
|
1113
|
-
if (jsx === null || typeof jsx === 'boolean' || typeof jsx === 'undefined') {
|
|
1114
|
-
return '';
|
|
1115
|
-
}
|
|
1116
|
-
|
|
1117
|
-
// Numeric children.
|
|
1118
|
-
if (typeof jsx === 'number') {
|
|
1119
|
-
return jsx.toString();
|
|
1120
|
-
}
|
|
1121
|
-
|
|
1122
|
-
// String literals.
|
|
1123
|
-
if (typeof jsx === 'string') {
|
|
1124
|
-
return jsx;
|
|
1125
|
-
}
|
|
1126
|
-
|
|
1127
|
-
// Array of JSX.
|
|
1128
|
-
if (Array.isArray(jsx)) {
|
|
1129
|
-
// eslint-disable-next-line no-use-before-define
|
|
1130
|
-
return jsx.reduce(reduceJsxToString, '');
|
|
1131
|
-
}
|
|
1132
|
-
|
|
1133
|
-
// Children prop.
|
|
1134
|
-
if (Object.prototype.hasOwnProperty.call(jsx, 'children')) {
|
|
1135
|
-
return innerText(jsx.children);
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
|
-
// Default
|
|
1139
|
-
return '';
|
|
1140
|
-
};
|
|
1141
|
-
innerText["default"] = innerText;
|
|
1142
|
-
function reduceJsxToString(previous, current) {
|
|
1143
|
-
return previous + innerText(current);
|
|
1144
|
-
}
|
|
1145
|
-
|
|
1146
1083
|
var _excluded = ["_source"];
|
|
1147
1084
|
function _isSlot(s) {
|
|
1148
1085
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
|
|
@@ -1235,7 +1172,6 @@ var SearchBox = defineComponent({
|
|
|
1235
1172
|
return this.faqAnswer || this.AIResponse && this.AIResponse.response && this.AIResponse.response.answer && this.AIResponse.response.answer.text;
|
|
1236
1173
|
},
|
|
1237
1174
|
parsedSuggestions: function parsedSuggestions() {
|
|
1238
|
-
var _this = this;
|
|
1239
1175
|
var suggestionsArray = [];
|
|
1240
1176
|
if (Array.isArray(this.suggestions) && this.suggestions.length) {
|
|
1241
1177
|
suggestionsArray = [].concat(withClickIds(this.suggestions));
|
|
@@ -1254,20 +1190,6 @@ var SearchBox = defineComponent({
|
|
|
1254
1190
|
return _extends({}, s, {
|
|
1255
1191
|
sectionId: s._suggestion_type
|
|
1256
1192
|
});
|
|
1257
|
-
}).map(function (suggestion) {
|
|
1258
|
-
if (suggestion._suggestion_type === 'document') {
|
|
1259
|
-
// Document suggestions don't have a meaningful label and value
|
|
1260
|
-
var newSuggestion = _extends({}, suggestion);
|
|
1261
|
-
newSuggestion.label = 'For recent document suggestion, please implement a renderItem method to display label.';
|
|
1262
|
-
var renderItem = _this.$slots.renderItem || _this.$props.renderItem;
|
|
1263
|
-
if (typeof renderItem === 'function') {
|
|
1264
|
-
var jsxEl = renderItem(newSuggestion);
|
|
1265
|
-
var innerValue = innerText(jsxEl);
|
|
1266
|
-
newSuggestion.value = xss(innerValue);
|
|
1267
|
-
}
|
|
1268
|
-
return newSuggestion;
|
|
1269
|
-
}
|
|
1270
|
-
return suggestion;
|
|
1271
1193
|
});
|
|
1272
1194
|
var sectionsAccumulated = [];
|
|
1273
1195
|
var sectionisedSuggestions = suggestionsArray.reduce(function (acc, d, currentIndex) {
|
|
@@ -1316,12 +1238,6 @@ var SearchBox = defineComponent({
|
|
|
1316
1238
|
enablePopularSuggestions: VueTypes.bool.def(false),
|
|
1317
1239
|
enableRecentSuggestions: VueTypes.bool.def(false),
|
|
1318
1240
|
enableFAQSuggestions: VueTypes.bool.def(false),
|
|
1319
|
-
enableDocumentSuggestions: VueTypes.bool.def(false),
|
|
1320
|
-
documentSuggestionsConfig: VueTypes.shape({
|
|
1321
|
-
size: VueTypes.number,
|
|
1322
|
-
from: VueTypes.number,
|
|
1323
|
-
maxChars: VueTypes.number
|
|
1324
|
-
}),
|
|
1325
1241
|
FAQSuggestionsConfig: VueTypes.shape({
|
|
1326
1242
|
sectionLabel: VueTypes.string,
|
|
1327
1243
|
size: VueTypes.number
|
|
@@ -1501,9 +1417,9 @@ var SearchBox = defineComponent({
|
|
|
1501
1417
|
}
|
|
1502
1418
|
},
|
|
1503
1419
|
isAITyping: function isAITyping(newVal, oldVal) {
|
|
1504
|
-
var
|
|
1420
|
+
var _this = this;
|
|
1505
1421
|
var scrollAIContainer = function scrollAIContainer() {
|
|
1506
|
-
var dropdownEle =
|
|
1422
|
+
var dropdownEle = _this.$refs[_dropdownULRef];
|
|
1507
1423
|
if (dropdownEle) {
|
|
1508
1424
|
dropdownEle.scrollTo({
|
|
1509
1425
|
top: dropdownEle.scrollHeight,
|
|
@@ -1612,7 +1528,7 @@ var SearchBox = defineComponent({
|
|
|
1612
1528
|
}
|
|
1613
1529
|
},
|
|
1614
1530
|
setValue: function setValue(value, isDefaultValue, props, cause, toggleIsOpen, categoryValue, shouldExecuteQuery) {
|
|
1615
|
-
var
|
|
1531
|
+
var _this2 = this;
|
|
1616
1532
|
if (isDefaultValue === void 0) {
|
|
1617
1533
|
isDefaultValue = false;
|
|
1618
1534
|
}
|
|
@@ -1629,65 +1545,65 @@ var SearchBox = defineComponent({
|
|
|
1629
1545
|
shouldExecuteQuery = true;
|
|
1630
1546
|
}
|
|
1631
1547
|
var performUpdate = function performUpdate() {
|
|
1632
|
-
if (
|
|
1548
|
+
if (_this2.$options.isTagsMode && isEqual(value, _this2.selectedTags)) {
|
|
1633
1549
|
return;
|
|
1634
1550
|
}
|
|
1635
|
-
if (
|
|
1636
|
-
if (Array.isArray(
|
|
1551
|
+
if (_this2.$options.isTagsMode && cause === causes.SUGGESTION_SELECT) {
|
|
1552
|
+
if (Array.isArray(_this2.selectedTags) && _this2.selectedTags.length) {
|
|
1637
1553
|
// check if value already present in selectedTags
|
|
1638
|
-
if (typeof value === 'string' &&
|
|
1639
|
-
|
|
1554
|
+
if (typeof value === 'string' && _this2.selectedTags.includes(value)) {
|
|
1555
|
+
_this2.isOpen = false;
|
|
1640
1556
|
return;
|
|
1641
1557
|
}
|
|
1642
|
-
|
|
1558
|
+
_this2.selectedTags = [].concat(_this2.selectedTags);
|
|
1643
1559
|
if (typeof value === 'string' && !!value) {
|
|
1644
|
-
|
|
1645
|
-
} else if (Array.isArray(value) && !isEqual(
|
|
1646
|
-
|
|
1560
|
+
_this2.selectedTags.push(value);
|
|
1561
|
+
} else if (Array.isArray(value) && !isEqual(_this2.selectedTags, value)) {
|
|
1562
|
+
_this2.selectedTags = value;
|
|
1647
1563
|
}
|
|
1648
1564
|
} else if (value) {
|
|
1649
|
-
|
|
1565
|
+
_this2.selectedTags = typeof value !== 'string' ? value : [].concat(value);
|
|
1650
1566
|
}
|
|
1651
|
-
|
|
1567
|
+
_this2.currentValue = '';
|
|
1652
1568
|
} else {
|
|
1653
|
-
|
|
1569
|
+
_this2.currentValue = decodeHtml(value);
|
|
1654
1570
|
}
|
|
1655
1571
|
var queryHandlerValue = value;
|
|
1656
|
-
if (
|
|
1657
|
-
queryHandlerValue = Array.isArray(
|
|
1572
|
+
if (_this2.$options.isTagsMode && cause === causes.SUGGESTION_SELECT) {
|
|
1573
|
+
queryHandlerValue = Array.isArray(_this2.selectedTags) && _this2.selectedTags.length ? _this2.selectedTags : undefined;
|
|
1658
1574
|
}
|
|
1659
|
-
if ((
|
|
1575
|
+
if ((_this2.faqAnswer || _this2.faqQuestion) && value === '') {
|
|
1660
1576
|
// Empty the previous state
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1577
|
+
_this2.faqAnswer = '';
|
|
1578
|
+
_this2.faqQuestion = '';
|
|
1579
|
+
_this2.showAIScreen = false;
|
|
1664
1580
|
}
|
|
1665
1581
|
if (isDefaultValue) {
|
|
1666
|
-
if (
|
|
1582
|
+
if (_this2.$props.autosuggest) {
|
|
1667
1583
|
if (toggleIsOpen) {
|
|
1668
|
-
|
|
1584
|
+
_this2.isOpen = false;
|
|
1669
1585
|
}
|
|
1670
|
-
if (typeof
|
|
1586
|
+
if (typeof _this2.currentValue === 'string') _this2.triggerDefaultQuery(_this2.currentValue, props.enableAI && _this2.currentTriggerMode === AI_TRIGGER_MODES.QUESTION && _this2.currentValue.endsWith('?') ? {
|
|
1671
1587
|
enableAI: true
|
|
1672
1588
|
} : {}, shouldExecuteQuery);
|
|
1673
1589
|
} // in case of strict selection only SUGGESTION_SELECT should be able
|
|
1674
1590
|
// to set the query otherwise the value should reset
|
|
1675
1591
|
if (props.strictSelection) {
|
|
1676
|
-
if (cause === causes.SUGGESTION_SELECT || (
|
|
1677
|
-
|
|
1592
|
+
if (cause === causes.SUGGESTION_SELECT || (_this2.$options.isTagsMode ? _this2.selectedTags.length === 0 : value === '')) {
|
|
1593
|
+
_this2.triggerCustomQuery(queryHandlerValue, _this2.$options.isTagsMode ? undefined : categoryValue, shouldExecuteQuery);
|
|
1678
1594
|
} else {
|
|
1679
|
-
|
|
1595
|
+
_this2.setValue('', true);
|
|
1680
1596
|
}
|
|
1681
1597
|
} else if (props.value === undefined || cause === causes.SUGGESTION_SELECT || cause === causes.CLEAR_VALUE) {
|
|
1682
|
-
|
|
1683
|
-
|
|
1598
|
+
_this2.showAIScreen = false;
|
|
1599
|
+
_this2.triggerCustomQuery(queryHandlerValue, _this2.$options.isTagsMode ? undefined : categoryValue, shouldExecuteQuery);
|
|
1684
1600
|
}
|
|
1685
1601
|
} else {
|
|
1686
1602
|
// debounce for handling text while typing
|
|
1687
|
-
|
|
1603
|
+
_this2.handleTextChange(value, cause);
|
|
1688
1604
|
}
|
|
1689
|
-
|
|
1690
|
-
|
|
1605
|
+
_this2.$emit('valueChange', value);
|
|
1606
|
+
_this2.$emit('value-change', value);
|
|
1691
1607
|
};
|
|
1692
1608
|
checkValueChange(props.componentId, value, props.beforeValueChange, performUpdate);
|
|
1693
1609
|
},
|
|
@@ -1836,7 +1752,7 @@ var SearchBox = defineComponent({
|
|
|
1836
1752
|
this.$emit('key-down', event, this.triggerQuery);
|
|
1837
1753
|
},
|
|
1838
1754
|
onInputChange: function onInputChange(e) {
|
|
1839
|
-
var
|
|
1755
|
+
var _this3 = this;
|
|
1840
1756
|
var inputValue = e.target.value;
|
|
1841
1757
|
if (!this.$data.isOpen && this.$props.autosuggest) {
|
|
1842
1758
|
this.isOpen = true;
|
|
@@ -1850,7 +1766,7 @@ var SearchBox = defineComponent({
|
|
|
1850
1766
|
} else {
|
|
1851
1767
|
this.$emit('change', inputValue, function (_ref3) {
|
|
1852
1768
|
var isOpen = _ref3.isOpen;
|
|
1853
|
-
return
|
|
1769
|
+
return _this3.triggerQuery({
|
|
1854
1770
|
defaultQuery: true,
|
|
1855
1771
|
customQuery: true,
|
|
1856
1772
|
value: inputValue,
|
|
@@ -1894,7 +1810,7 @@ var SearchBox = defineComponent({
|
|
|
1894
1810
|
}
|
|
1895
1811
|
},
|
|
1896
1812
|
onSuggestionSelected: function onSuggestionSelected(suggestion) {
|
|
1897
|
-
var
|
|
1813
|
+
var _this4 = this;
|
|
1898
1814
|
var value = this.$props.value;
|
|
1899
1815
|
// The state of the suggestion is open by the time it reaches here. i.e. isOpen = true
|
|
1900
1816
|
// handle when FAQ suggestion is clicked
|
|
@@ -1943,10 +1859,10 @@ var SearchBox = defineComponent({
|
|
|
1943
1859
|
this.setValue(emitValue, true, this.$props, causes.SUGGESTION_SELECT, false, suggestion._category);
|
|
1944
1860
|
this.$emit('change', emitValue, function (_ref4) {
|
|
1945
1861
|
var isOpen = _ref4.isOpen;
|
|
1946
|
-
return
|
|
1862
|
+
return _this4.triggerQuery(_extends({
|
|
1947
1863
|
isOpen: isOpen,
|
|
1948
1864
|
value: emitValue
|
|
1949
|
-
}, !
|
|
1865
|
+
}, !_this4.$options.isTagsMode && {
|
|
1950
1866
|
categoryValue: suggestion._category
|
|
1951
1867
|
}));
|
|
1952
1868
|
});
|
|
@@ -1986,7 +1902,7 @@ var SearchBox = defineComponent({
|
|
|
1986
1902
|
return null;
|
|
1987
1903
|
},
|
|
1988
1904
|
renderErrorComponent: function renderErrorComponent(isAIError) {
|
|
1989
|
-
var
|
|
1905
|
+
var _this5 = this;
|
|
1990
1906
|
if (isAIError === void 0) {
|
|
1991
1907
|
isAIError = false;
|
|
1992
1908
|
}
|
|
@@ -2013,7 +1929,7 @@ var SearchBox = defineComponent({
|
|
|
2013
1929
|
"themePreset": this.themePreset
|
|
2014
1930
|
}, {
|
|
2015
1931
|
"default": function _default() {
|
|
2016
|
-
return [isFunction(renderError) ? renderError(
|
|
1932
|
+
return [isFunction(renderError) ? renderError(_this5.error) : renderError];
|
|
2017
1933
|
}
|
|
2018
1934
|
});
|
|
2019
1935
|
}
|
|
@@ -2093,7 +2009,7 @@ var SearchBox = defineComponent({
|
|
|
2093
2009
|
});
|
|
2094
2010
|
},
|
|
2095
2011
|
renderEnterButtonElement: function renderEnterButtonElement() {
|
|
2096
|
-
var
|
|
2012
|
+
var _this6 = this;
|
|
2097
2013
|
var _this$$props2 = this.$props,
|
|
2098
2014
|
enterButton = _this$$props2.enterButton,
|
|
2099
2015
|
innerClass = _this$$props2.innerClass;
|
|
@@ -2101,12 +2017,12 @@ var SearchBox = defineComponent({
|
|
|
2101
2017
|
if (enterButton) {
|
|
2102
2018
|
var getEnterButtonMarkup = function getEnterButtonMarkup() {
|
|
2103
2019
|
if (renderEnterButton) {
|
|
2104
|
-
return renderEnterButton(
|
|
2020
|
+
return renderEnterButton(_this6.enterButtonOnClick);
|
|
2105
2021
|
}
|
|
2106
2022
|
return createVNode(Button, {
|
|
2107
2023
|
"class": "enter-btn " + getClassName$1(innerClass, 'enter-button'),
|
|
2108
2024
|
"primary": true,
|
|
2109
|
-
"onClick":
|
|
2025
|
+
"onClick": _this6.enterButtonOnClick
|
|
2110
2026
|
}, {
|
|
2111
2027
|
"default": function _default() {
|
|
2112
2028
|
return [createTextVNode("Search")];
|
|
@@ -2132,7 +2048,7 @@ var SearchBox = defineComponent({
|
|
|
2132
2048
|
return '/';
|
|
2133
2049
|
},
|
|
2134
2050
|
renderLeftIcons: function renderLeftIcons() {
|
|
2135
|
-
var
|
|
2051
|
+
var _this7 = this;
|
|
2136
2052
|
var _slot3;
|
|
2137
2053
|
var _this$$props3 = this.$props,
|
|
2138
2054
|
iconPosition = _this$$props3.iconPosition,
|
|
@@ -2142,8 +2058,8 @@ var SearchBox = defineComponent({
|
|
|
2142
2058
|
}, {
|
|
2143
2059
|
"default": function _default() {
|
|
2144
2060
|
return [iconPosition === 'left' && showIcon && createVNode(IconWrapper, {
|
|
2145
|
-
"onClick":
|
|
2146
|
-
}, _isSlot(_slot3 =
|
|
2061
|
+
"onClick": _this7.handleSearchIconClick
|
|
2062
|
+
}, _isSlot(_slot3 = _this7.renderIcon()) ? _slot3 : {
|
|
2147
2063
|
"default": function _default() {
|
|
2148
2064
|
return [_slot3];
|
|
2149
2065
|
}
|
|
@@ -2152,7 +2068,7 @@ var SearchBox = defineComponent({
|
|
|
2152
2068
|
})]);
|
|
2153
2069
|
},
|
|
2154
2070
|
renderRightIcons: function renderRightIcons() {
|
|
2155
|
-
var
|
|
2071
|
+
var _this8 = this;
|
|
2156
2072
|
var _slot4, _slot5, _slot6;
|
|
2157
2073
|
var _this$$props4 = this.$props,
|
|
2158
2074
|
iconPosition = _this$$props4.iconPosition,
|
|
@@ -2169,29 +2085,29 @@ var SearchBox = defineComponent({
|
|
|
2169
2085
|
}, {
|
|
2170
2086
|
"default": function _default() {
|
|
2171
2087
|
return [currentValue && showClear && createVNode(IconWrapper, {
|
|
2172
|
-
"onClick":
|
|
2088
|
+
"onClick": _this8.clearValue,
|
|
2173
2089
|
"showIcon": showIcon,
|
|
2174
2090
|
"isClearIcon": true
|
|
2175
|
-
}, _isSlot(_slot4 =
|
|
2091
|
+
}, _isSlot(_slot4 = _this8.renderCancelIcon()) ? _slot4 : {
|
|
2176
2092
|
"default": function _default() {
|
|
2177
2093
|
return [_slot4];
|
|
2178
2094
|
}
|
|
2179
2095
|
}), showFocusShortcutsIcon && createVNode(ButtonIconWrapper, {
|
|
2180
2096
|
"onClick": function onClick(e) {
|
|
2181
|
-
return
|
|
2097
|
+
return _this8.focusSearchBox(e);
|
|
2182
2098
|
}
|
|
2183
|
-
}, _isSlot(_slot5 =
|
|
2099
|
+
}, _isSlot(_slot5 = _this8.renderShortcut()) ? _slot5 : {
|
|
2184
2100
|
"default": function _default() {
|
|
2185
2101
|
return [_slot5];
|
|
2186
2102
|
}
|
|
2187
2103
|
}), showVoiceSearch && createVNode(Mic, {
|
|
2188
2104
|
"getInstance": getMicInstance,
|
|
2189
2105
|
"render": renderMic,
|
|
2190
|
-
"handleResult":
|
|
2106
|
+
"handleResult": _this8.handleVoiceResults,
|
|
2191
2107
|
"className": getClassName$1(innerClass, 'mic') || null
|
|
2192
2108
|
}, null), iconPosition === 'right' && showIcon && createVNode(IconWrapper, {
|
|
2193
|
-
"onClick":
|
|
2194
|
-
}, _isSlot(_slot6 =
|
|
2109
|
+
"onClick": _this8.handleSearchIconClick
|
|
2110
|
+
}, _isSlot(_slot6 = _this8.renderIcon()) ? _slot6 : {
|
|
2195
2111
|
"default": function _default() {
|
|
2196
2112
|
return [_slot6];
|
|
2197
2113
|
}
|
|
@@ -2210,7 +2126,7 @@ var SearchBox = defineComponent({
|
|
|
2210
2126
|
(_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
|
|
2211
2127
|
},
|
|
2212
2128
|
listenForFocusShortcuts: function listenForFocusShortcuts() {
|
|
2213
|
-
var
|
|
2129
|
+
var _this9 = this;
|
|
2214
2130
|
var _this$$props$focusSho = this.$props.focusShortcuts,
|
|
2215
2131
|
focusShortcuts = _this$$props$focusSho === void 0 ? ['/'] : _this$$props$focusSho;
|
|
2216
2132
|
if (isEmpty(focusShortcuts)) {
|
|
@@ -2225,7 +2141,7 @@ var SearchBox = defineComponent({
|
|
|
2225
2141
|
function (event, handler) {
|
|
2226
2142
|
// Prevent the default refresh event under WINDOWS system
|
|
2227
2143
|
event.preventDefault();
|
|
2228
|
-
|
|
2144
|
+
_this9.focusSearchBox(event);
|
|
2229
2145
|
});
|
|
2230
2146
|
|
|
2231
2147
|
// if one of modifier keys are used, they are handled below
|
|
@@ -2235,7 +2151,7 @@ var SearchBox = defineComponent({
|
|
|
2235
2151
|
for (var index = 0; index < modifierKeys.length; index += 1) {
|
|
2236
2152
|
var element = modifierKeys[index];
|
|
2237
2153
|
if (hotkeys[element]) {
|
|
2238
|
-
|
|
2154
|
+
_this9.focusSearchBox(event);
|
|
2239
2155
|
break;
|
|
2240
2156
|
}
|
|
2241
2157
|
}
|
|
@@ -2248,10 +2164,10 @@ var SearchBox = defineComponent({
|
|
|
2248
2164
|
this.triggerDefaultQuery(value);
|
|
2249
2165
|
},
|
|
2250
2166
|
renderActionIcon: function renderActionIcon(suggestion) {
|
|
2251
|
-
var
|
|
2167
|
+
var _this10 = this;
|
|
2252
2168
|
var handleAutoFillClick = function handleAutoFillClick(e) {
|
|
2253
2169
|
e.stopPropagation();
|
|
2254
|
-
|
|
2170
|
+
_this10.onAutofillClick(suggestion);
|
|
2255
2171
|
};
|
|
2256
2172
|
if (suggestion._suggestion_type === suggestionTypes.Featured) {
|
|
2257
2173
|
if (suggestion.action === featuredSuggestionsActionTypes.FUNCTION) {
|
|
@@ -2274,7 +2190,7 @@ var SearchBox = defineComponent({
|
|
|
2274
2190
|
return null;
|
|
2275
2191
|
},
|
|
2276
2192
|
renderTag: function renderTag(item) {
|
|
2277
|
-
var
|
|
2193
|
+
var _this11 = this;
|
|
2278
2194
|
var innerClass = this.$props.innerClass;
|
|
2279
2195
|
return createVNode(TagItem, {
|
|
2280
2196
|
"class": getClassName$1(innerClass, 'selected-tag') || ''
|
|
@@ -2285,7 +2201,7 @@ var SearchBox = defineComponent({
|
|
|
2285
2201
|
"aria-label": "delete-tag",
|
|
2286
2202
|
"class": "close-icon",
|
|
2287
2203
|
"onClick": function onClick() {
|
|
2288
|
-
return
|
|
2204
|
+
return _this11.clearTag(item);
|
|
2289
2205
|
}
|
|
2290
2206
|
}, [createVNode(CancelSvg, null, null)])];
|
|
2291
2207
|
}
|
|
@@ -2308,7 +2224,7 @@ var SearchBox = defineComponent({
|
|
|
2308
2224
|
}
|
|
2309
2225
|
},
|
|
2310
2226
|
renderTags: function renderTags() {
|
|
2311
|
-
var
|
|
2227
|
+
var _this12 = this;
|
|
2312
2228
|
if (!Array.isArray(this.selectedTags)) {
|
|
2313
2229
|
return null;
|
|
2314
2230
|
}
|
|
@@ -2322,16 +2238,16 @@ var SearchBox = defineComponent({
|
|
|
2322
2238
|
}) : createVNode(TagsContainer, null, {
|
|
2323
2239
|
"default": function _default() {
|
|
2324
2240
|
return [tagsList.map(function (item) {
|
|
2325
|
-
return
|
|
2241
|
+
return _this12.renderTag(item);
|
|
2326
2242
|
}), shouldRenderClearAllTag && createVNode(TagItem, {
|
|
2327
|
-
"class": getClassName$1(
|
|
2243
|
+
"class": getClassName$1(_this12.$props.innerClass, 'selected-tag') || ''
|
|
2328
2244
|
}, {
|
|
2329
2245
|
"default": function _default() {
|
|
2330
2246
|
return [createVNode("span", null, [createTextVNode("Clear All")]), createVNode("span", {
|
|
2331
2247
|
"role": "img",
|
|
2332
2248
|
"aria-label": "delete-tag",
|
|
2333
2249
|
"class": "close-icon",
|
|
2334
|
-
"onClick":
|
|
2250
|
+
"onClick": _this12.clearAllTags
|
|
2335
2251
|
}, [createVNode(CancelSvg, null, null)])];
|
|
2336
2252
|
}
|
|
2337
2253
|
})];
|
|
@@ -2379,7 +2295,7 @@ var SearchBox = defineComponent({
|
|
|
2379
2295
|
},
|
|
2380
2296
|
renderAIScreenFooter: function renderAIScreenFooter() {
|
|
2381
2297
|
var _slot8;
|
|
2382
|
-
var
|
|
2298
|
+
var _this13 = this;
|
|
2383
2299
|
var _this$$props$AIUIConf2 = this.$props.AIUIConfig,
|
|
2384
2300
|
AIUIConfig = _this$$props$AIUIConf2 === void 0 ? {} : _this$$props$AIUIConf2;
|
|
2385
2301
|
var _ref6 = AIUIConfig || {},
|
|
@@ -2388,11 +2304,11 @@ var SearchBox = defineComponent({
|
|
|
2388
2304
|
_ref6$onSourceClick = _ref6.onSourceClick,
|
|
2389
2305
|
onSourceClick = _ref6$onSourceClick === void 0 ? function () {} : _ref6$onSourceClick;
|
|
2390
2306
|
var renderSourceDocumentLabel = function renderSourceDocumentLabel(sourceObj) {
|
|
2391
|
-
if (
|
|
2392
|
-
return
|
|
2307
|
+
if (_this13.$props.AIUIConfig && _this13.$props.AIUIConfig.renderSourceDocument) {
|
|
2308
|
+
return _this13.$props.AIUIConfig.renderSourceDocument(sourceObj);
|
|
2393
2309
|
}
|
|
2394
|
-
if (
|
|
2395
|
-
return
|
|
2310
|
+
if (_this13.$slots.renderSourceDocument) {
|
|
2311
|
+
return _this13.$slots.renderSourceDocument(sourceObj);
|
|
2396
2312
|
}
|
|
2397
2313
|
return sourceObj._id;
|
|
2398
2314
|
};
|
|
@@ -2400,10 +2316,10 @@ var SearchBox = defineComponent({
|
|
|
2400
2316
|
"themePreset": this.$props.themePreset
|
|
2401
2317
|
}, {
|
|
2402
2318
|
"default": function _default() {
|
|
2403
|
-
return [createTextVNode("Summary generated using the following sources:"), ' ', createVNode(SourceTags, null, _isSlot(_slot8 =
|
|
2319
|
+
return [createTextVNode("Summary generated using the following sources:"), ' ', createVNode(SourceTags, null, _isSlot(_slot8 = _this13.getAISourceObjects().map(function (el) {
|
|
2404
2320
|
var _slot7;
|
|
2405
2321
|
return createVNode(Button, {
|
|
2406
|
-
"class": "--ai-source-tag " + (getClassName$1(
|
|
2322
|
+
"class": "--ai-source-tag " + (getClassName$1(_this13.$props.innerClass, 'ai-source-tag') || ''),
|
|
2407
2323
|
"info": true,
|
|
2408
2324
|
"onClick": function onClick() {
|
|
2409
2325
|
return onSourceClick && onSourceClick(el);
|
|
@@ -2422,7 +2338,7 @@ var SearchBox = defineComponent({
|
|
|
2422
2338
|
}) : null;
|
|
2423
2339
|
},
|
|
2424
2340
|
renderAIScreen: function renderAIScreen() {
|
|
2425
|
-
var
|
|
2341
|
+
var _this14 = this;
|
|
2426
2342
|
var customAIRenderer = this.$props.renderAIAnswer || this.$slots.renderAIAnswer;
|
|
2427
2343
|
if (customAIRenderer) {
|
|
2428
2344
|
return customAIRenderer({
|
|
@@ -2446,11 +2362,11 @@ var SearchBox = defineComponent({
|
|
|
2446
2362
|
"hideUI": this.isAIResponseLoading || this.isLoading || !this.sessionIdFromStore,
|
|
2447
2363
|
"key": this.sessionIdFromStore,
|
|
2448
2364
|
"onFeedbackSubmit": function onFeedbackSubmit(useful, reason) {
|
|
2449
|
-
|
|
2365
|
+
_this14.feedbackState = {
|
|
2450
2366
|
isRecorded: true,
|
|
2451
2367
|
feedbackType: useful ? 'positive' : 'negative'
|
|
2452
2368
|
};
|
|
2453
|
-
|
|
2369
|
+
_this14.recordAISessionUsefulness(_this14.sessionIdFromStore, {
|
|
2454
2370
|
useful: useful,
|
|
2455
2371
|
reason: reason
|
|
2456
2372
|
});
|
|
@@ -2485,7 +2401,7 @@ var SearchBox = defineComponent({
|
|
|
2485
2401
|
});
|
|
2486
2402
|
},
|
|
2487
2403
|
renderAskButtonElement: function renderAskButtonElement() {
|
|
2488
|
-
var
|
|
2404
|
+
var _this15 = this;
|
|
2489
2405
|
var _this$$props5 = this.$props,
|
|
2490
2406
|
AIUIConfig = _this$$props5.AIUIConfig,
|
|
2491
2407
|
innerClass = _this$$props5.innerClass;
|
|
@@ -2495,12 +2411,12 @@ var SearchBox = defineComponent({
|
|
|
2495
2411
|
if (askButton) {
|
|
2496
2412
|
var getEnterButtonMarkup = function getEnterButtonMarkup() {
|
|
2497
2413
|
if (renderAskButton) {
|
|
2498
|
-
return renderAskButton(
|
|
2414
|
+
return renderAskButton(_this15.askButtonOnClick);
|
|
2499
2415
|
}
|
|
2500
2416
|
return createVNode(Button, {
|
|
2501
2417
|
"class": "enter-btn " + getClassName$1(innerClass, 'ask-button'),
|
|
2502
2418
|
"info": true,
|
|
2503
|
-
"onClick":
|
|
2419
|
+
"onClick": _this15.askButtonOnClick
|
|
2504
2420
|
}, {
|
|
2505
2421
|
"default": function _default() {
|
|
2506
2422
|
return [createTextVNode("Ask")];
|
|
@@ -2515,7 +2431,7 @@ var SearchBox = defineComponent({
|
|
|
2515
2431
|
}
|
|
2516
2432
|
},
|
|
2517
2433
|
render: function render() {
|
|
2518
|
-
var
|
|
2434
|
+
var _this16 = this;
|
|
2519
2435
|
var expandSuggestionsContainer = this.$props.expandSuggestionsContainer;
|
|
2520
2436
|
var _this$$slots = this.$slots,
|
|
2521
2437
|
recentSearchesIcon = _this$$slots.recentSearchesIcon,
|
|
@@ -2526,17 +2442,17 @@ var SearchBox = defineComponent({
|
|
|
2526
2442
|
"class": this.$props.className
|
|
2527
2443
|
}, {
|
|
2528
2444
|
"default": function _default() {
|
|
2529
|
-
return [
|
|
2530
|
-
"class": getClassName$1(
|
|
2445
|
+
return [_this16.$props.title && createVNode(Title, {
|
|
2446
|
+
"class": getClassName$1(_this16.$props.innerClass, 'title') || ''
|
|
2531
2447
|
}, {
|
|
2532
2448
|
"default": function _default() {
|
|
2533
|
-
return [
|
|
2449
|
+
return [_this16.$props.title];
|
|
2534
2450
|
}
|
|
2535
|
-
}),
|
|
2536
|
-
"id":
|
|
2537
|
-
"handleChange":
|
|
2538
|
-
"handleMouseup":
|
|
2539
|
-
"isOpen":
|
|
2451
|
+
}), _this16.$props.autosuggest ? createVNode(Downshift, {
|
|
2452
|
+
"id": _this16.$props.componentId + "-downshift",
|
|
2453
|
+
"handleChange": _this16.onSuggestionSelected,
|
|
2454
|
+
"handleMouseup": _this16.handleStateChange,
|
|
2455
|
+
"isOpen": _this16.$data.isOpen
|
|
2540
2456
|
}, {
|
|
2541
2457
|
"default": function _default(_ref8) {
|
|
2542
2458
|
var getInputEvents = _ref8.getInputEvents,
|
|
@@ -2592,21 +2508,21 @@ var SearchBox = defineComponent({
|
|
|
2592
2508
|
}
|
|
2593
2509
|
};
|
|
2594
2510
|
var indexOffset = 0;
|
|
2595
|
-
return createVNode("div", null, [
|
|
2511
|
+
return createVNode("div", null, [_this16.hasCustomRenderer && _this16.getComponent({
|
|
2596
2512
|
isOpen: isOpen,
|
|
2597
2513
|
getItemProps: getItemProps,
|
|
2598
2514
|
getItemEvents: getItemEvents,
|
|
2599
2515
|
highlightedIndex: highlightedIndex
|
|
2600
|
-
}),
|
|
2601
|
-
"class": suggestions(
|
|
2516
|
+
}), _this16.renderErrorComponent(), !_this16.hasCustomRenderer && isOpen && hasSuggestions ? createVNode("ul", {
|
|
2517
|
+
"class": suggestions(_this16.themePreset, _this16.theme) + " " + getClassName$1(_this16.$props.innerClass, 'list') + " " + searchboxSuggestions(_this16.themePreset, _this16.theme) + "\n\t\t\t\t\t\t\t\t\t\t\t\t\t",
|
|
2602
2518
|
"ref": _dropdownULRef
|
|
2603
|
-
}, [
|
|
2604
|
-
"themePreset":
|
|
2519
|
+
}, [_this16.showAIScreen && createVNode(SearchBoxAISection, {
|
|
2520
|
+
"themePreset": _this16.$props.themePreset
|
|
2605
2521
|
}, {
|
|
2606
2522
|
"default": function _default() {
|
|
2607
|
-
return [
|
|
2523
|
+
return [_this16.renderAIScreen(), ' ', _this16.renderErrorComponent(true)];
|
|
2608
2524
|
}
|
|
2609
|
-
}), !
|
|
2525
|
+
}), !_this16.showAIScreen && _this16.parsedSuggestions.map(function (item, itemIndex) {
|
|
2610
2526
|
var index = indexOffset + itemIndex;
|
|
2611
2527
|
if (Array.isArray(item)) {
|
|
2612
2528
|
var sectionHtml = xss(item[0].sectionLabel);
|
|
@@ -2615,7 +2531,7 @@ var SearchBox = defineComponent({
|
|
|
2615
2531
|
"key": "section-" + itemIndex,
|
|
2616
2532
|
"class": "section-container"
|
|
2617
2533
|
}, [sectionHtml ? createVNode("div", {
|
|
2618
|
-
"class": "section-header " + getClassName$1(
|
|
2534
|
+
"class": "section-header " + getClassName$1(_this16.$props.innerClass, 'section-label'),
|
|
2619
2535
|
"key": "" + item[0].sectionId,
|
|
2620
2536
|
"innerHTML": sectionHtml
|
|
2621
2537
|
}, null) : null, createVNode("ul", {
|
|
@@ -2635,7 +2551,7 @@ var SearchBox = defineComponent({
|
|
|
2635
2551
|
justifyContent: 'flex-start',
|
|
2636
2552
|
alignItems: 'center'
|
|
2637
2553
|
},
|
|
2638
|
-
"class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$1(
|
|
2554
|
+
"class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$1(_this16.$props.innerClass, 'active-suggestion-item') : "li-item " + getClassName$1(_this16.$props.innerClass, 'suggestion-item'))
|
|
2639
2555
|
}), [renderItem(sectionItem)]);
|
|
2640
2556
|
}
|
|
2641
2557
|
if (sectionItem._suggestion_type === '_internal_a_i_trigger') {
|
|
@@ -2649,9 +2565,9 @@ var SearchBox = defineComponent({
|
|
|
2649
2565
|
justifyContent: 'flex-start',
|
|
2650
2566
|
alignItems: 'center'
|
|
2651
2567
|
},
|
|
2652
|
-
"class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$1(
|
|
2568
|
+
"class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$1(_this16.$props.innerClass, 'active-suggestion-item') : "li-item " + getClassName$1(_this16.$props.innerClass, 'suggestion-item'))
|
|
2653
2569
|
}), [createVNode(SuggestionItem, {
|
|
2654
|
-
"currentValue":
|
|
2570
|
+
"currentValue": _this16.currentValue,
|
|
2655
2571
|
"suggestion": sectionItem
|
|
2656
2572
|
}, null)]);
|
|
2657
2573
|
}
|
|
@@ -2665,7 +2581,7 @@ var SearchBox = defineComponent({
|
|
|
2665
2581
|
justifyContent: 'flex-start',
|
|
2666
2582
|
alignItems: 'center'
|
|
2667
2583
|
},
|
|
2668
|
-
"class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$1(
|
|
2584
|
+
"class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$1(_this16.$props.innerClass, 'active-suggestion-item') : "li-item " + getClassName$1(_this16.$props.innerClass, 'suggestion-item'))
|
|
2669
2585
|
}), [createVNode("div", {
|
|
2670
2586
|
"style": {
|
|
2671
2587
|
padding: '0 10px 0 0',
|
|
@@ -2673,74 +2589,74 @@ var SearchBox = defineComponent({
|
|
|
2673
2589
|
}
|
|
2674
2590
|
}, [createVNode(CustomSvg, {
|
|
2675
2591
|
"key": sectionItem._suggestion_type + "-" + sectionIndex,
|
|
2676
|
-
"className": getClassName$1(
|
|
2592
|
+
"className": getClassName$1(_this16.$props.innerClass, sectionItem._suggestion_type + "-search-icon") || null,
|
|
2677
2593
|
"icon": getIcon(sectionItem._suggestion_type, sectionItem, suggestionsHaveIcon),
|
|
2678
2594
|
"type": sectionItem._suggestion_type + "-search-icon"
|
|
2679
2595
|
}, null)]), createVNode(SuggestionItem, {
|
|
2680
|
-
"currentValue":
|
|
2596
|
+
"currentValue": _this16.currentValue,
|
|
2681
2597
|
"suggestion": sectionItem
|
|
2682
|
-
}, null),
|
|
2598
|
+
}, null), _this16.renderActionIcon(sectionItem)]);
|
|
2683
2599
|
})])]);
|
|
2684
2600
|
}
|
|
2685
2601
|
return createVNode("div", null, [createTextVNode("No suggestions")]);
|
|
2686
|
-
}), !
|
|
2602
|
+
}), !_this16.showAIScreen && _this16.parsedSuggestions.length && _this16.$props.showSuggestionsFooter ? _this16.suggestionsFooter() : null]) : _this16.renderNoSuggestions(_this16.normalizedSuggestions)]);
|
|
2687
2603
|
};
|
|
2688
2604
|
return createVNode("div", {
|
|
2689
2605
|
"class": suggestionsContainer
|
|
2690
2606
|
}, [createVNode(InputGroup, {
|
|
2691
2607
|
"searchBox": true,
|
|
2692
2608
|
"ref": _inputGroupRef,
|
|
2693
|
-
"isOpen":
|
|
2609
|
+
"isOpen": _this16.$data.isOpen
|
|
2694
2610
|
}, {
|
|
2695
2611
|
"default": function _default() {
|
|
2696
2612
|
return [createVNode(Actions$1, null, {
|
|
2697
2613
|
"default": function _default() {
|
|
2698
|
-
return [
|
|
2614
|
+
return [_this16.renderInputAddonBefore(), _this16.renderLeftIcons()];
|
|
2699
2615
|
}
|
|
2700
2616
|
}), createVNode(InputWrapper, null, {
|
|
2701
2617
|
"default": function _default() {
|
|
2702
2618
|
return [createVNode(TextArea, mergeProps(_transformOn(getInputEvents({
|
|
2703
|
-
onInput:
|
|
2619
|
+
onInput: _this16.onInputChange,
|
|
2704
2620
|
onBlur: function onBlur(e) {
|
|
2705
|
-
|
|
2621
|
+
_this16.$emit('blur', e, _this16.triggerQuery);
|
|
2706
2622
|
},
|
|
2707
|
-
onFocus:
|
|
2623
|
+
onFocus: _this16.handleFocus,
|
|
2708
2624
|
onKeyPress: function onKeyPress(e) {
|
|
2709
|
-
|
|
2710
|
-
|
|
2625
|
+
_this16.$emit('keyPress', e, _this16.triggerQuery);
|
|
2626
|
+
_this16.$emit('key-press', e, _this16.triggerQuery);
|
|
2711
2627
|
},
|
|
2712
2628
|
onKeyDown: function onKeyDown(e) {
|
|
2713
|
-
return
|
|
2629
|
+
return _this16.handleKeyDown(e, highlightedIndex);
|
|
2714
2630
|
},
|
|
2715
2631
|
onKeyUp: function onKeyUp(e) {
|
|
2716
|
-
|
|
2717
|
-
|
|
2632
|
+
_this16.$emit('keyUp', e, _this16.triggerQuery);
|
|
2633
|
+
_this16.$emit('key-up', e, _this16.triggerQuery);
|
|
2718
2634
|
},
|
|
2719
2635
|
onClick: function onClick() {
|
|
2720
2636
|
setHighlightedIndex(null);
|
|
2721
2637
|
}
|
|
2722
2638
|
})), {
|
|
2723
2639
|
"searchBox": true,
|
|
2724
|
-
"isOpen":
|
|
2725
|
-
"id":
|
|
2726
|
-
"ref":
|
|
2727
|
-
"class": getClassName$1(
|
|
2728
|
-
"placeholder":
|
|
2729
|
-
"autoFocus":
|
|
2640
|
+
"isOpen": _this16.$data.isOpen,
|
|
2641
|
+
"id": _this16.$props.componentId + "-input",
|
|
2642
|
+
"ref": _this16.$props.innerRef,
|
|
2643
|
+
"class": getClassName$1(_this16.$props.innerClass, 'input'),
|
|
2644
|
+
"placeholder": _this16.$props.placeholder,
|
|
2645
|
+
"autoFocus": _this16.$props.autoFocus
|
|
2730
2646
|
}, getInputProps({
|
|
2731
|
-
value:
|
|
2647
|
+
value: _this16.$data.currentValue === null ? '' : _this16.$data.currentValue
|
|
2732
2648
|
}), {
|
|
2733
|
-
"themePreset":
|
|
2649
|
+
"themePreset": _this16.themePreset,
|
|
2734
2650
|
"autocomplete": "off"
|
|
2735
2651
|
}), null), !expandSuggestionsContainer && renderSuggestionsDropdown()];
|
|
2736
2652
|
}
|
|
2737
2653
|
}), createVNode(Actions$1, null, {
|
|
2738
2654
|
"default": function _default() {
|
|
2739
|
-
return [
|
|
2655
|
+
return [_this16.renderRightIcons(), _this16.renderInputAddonAfter(), _this16.renderAskButtonElement(), _this16.renderEnterButtonElement()];
|
|
2740
2656
|
}
|
|
2741
2657
|
})];
|
|
2742
2658
|
}
|
|
2743
|
-
}), expandSuggestionsContainer && renderSuggestionsDropdown(),
|
|
2659
|
+
}), expandSuggestionsContainer && renderSuggestionsDropdown(), _this16.renderTags()]);
|
|
2744
2660
|
}
|
|
2745
2661
|
}) : createVNode("div", {
|
|
2746
2662
|
"class": suggestionsContainer
|
|
@@ -2751,43 +2667,43 @@ var SearchBox = defineComponent({
|
|
|
2751
2667
|
"default": function _default() {
|
|
2752
2668
|
return [createVNode(Actions$1, null, {
|
|
2753
2669
|
"default": function _default() {
|
|
2754
|
-
return [
|
|
2670
|
+
return [_this16.renderInputAddonBefore(), _this16.renderLeftIcons()];
|
|
2755
2671
|
}
|
|
2756
2672
|
}), createVNode(InputWrapper, null, {
|
|
2757
2673
|
"default": function _default() {
|
|
2758
2674
|
return [createVNode(TextArea, mergeProps(_transformOn({
|
|
2759
2675
|
blur: function blur(e) {
|
|
2760
|
-
|
|
2676
|
+
_this16.$emit('blur', e, _this16.triggerQuery);
|
|
2761
2677
|
},
|
|
2762
2678
|
keypress: function keypress(e) {
|
|
2763
|
-
|
|
2764
|
-
|
|
2679
|
+
_this16.$emit('keyPress', e, _this16.triggerQuery);
|
|
2680
|
+
_this16.$emit('key-press', e, _this16.triggerQuery);
|
|
2765
2681
|
},
|
|
2766
|
-
input:
|
|
2682
|
+
input: _this16.onInputChange,
|
|
2767
2683
|
focus: function focus(e) {
|
|
2768
|
-
|
|
2684
|
+
_this16.$emit('focus', e, _this16.triggerQuery);
|
|
2769
2685
|
},
|
|
2770
|
-
keydown:
|
|
2686
|
+
keydown: _this16.handleKeyDown,
|
|
2771
2687
|
keyup: function keyup(e) {
|
|
2772
|
-
|
|
2773
|
-
|
|
2688
|
+
_this16.$emit('keyUp', e, _this16.triggerQuery);
|
|
2689
|
+
_this16.$emit('key-up', e, _this16.triggerQuery);
|
|
2774
2690
|
}
|
|
2775
2691
|
}), {
|
|
2776
2692
|
"searchBox": true,
|
|
2777
|
-
"class": getClassName$1(
|
|
2778
|
-
"placeholder":
|
|
2779
|
-
"autofocus":
|
|
2780
|
-
"value":
|
|
2781
|
-
"iconPosition":
|
|
2782
|
-
"showIcon":
|
|
2783
|
-
"showClear":
|
|
2784
|
-
"ref":
|
|
2785
|
-
"themePreset":
|
|
2693
|
+
"class": getClassName$1(_this16.$props.innerClass, 'input') || '',
|
|
2694
|
+
"placeholder": _this16.$props.placeholder,
|
|
2695
|
+
"autofocus": _this16.$props.autoFocus,
|
|
2696
|
+
"value": _this16.$data.currentValue ? _this16.$data.currentValue : '',
|
|
2697
|
+
"iconPosition": _this16.$props.iconPosition,
|
|
2698
|
+
"showIcon": _this16.$props.showIcon,
|
|
2699
|
+
"showClear": _this16.$props.showClear,
|
|
2700
|
+
"ref": _this16.$props.innerRef,
|
|
2701
|
+
"themePreset": _this16.themePreset
|
|
2786
2702
|
}), null)];
|
|
2787
2703
|
}
|
|
2788
2704
|
}), createVNode(Actions$1, null, {
|
|
2789
2705
|
"default": function _default() {
|
|
2790
|
-
return [
|
|
2706
|
+
return [_this16.renderRightIcons(), _this16.renderInputAddonAfter(), _this16.renderEnterButtonElement()];
|
|
2791
2707
|
}
|
|
2792
2708
|
})];
|
|
2793
2709
|
}
|