@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
|
@@ -101,30 +101,7 @@ var SuggestionItem = {
|
|
|
101
101
|
name: 'SuggestionItem',
|
|
102
102
|
props: {
|
|
103
103
|
currentValue: vueTypes.types.string,
|
|
104
|
-
suggestion: vueTypes.types.any
|
|
105
|
-
innerHTML: vueTypes.types.string.isRequired
|
|
106
|
-
},
|
|
107
|
-
data: function data() {
|
|
108
|
-
return {
|
|
109
|
-
isOverflowing: false
|
|
110
|
-
};
|
|
111
|
-
},
|
|
112
|
-
methods: {
|
|
113
|
-
updateOverflowing: function updateOverflowing() {
|
|
114
|
-
if (this.$refs.container && this.$refs.content) {
|
|
115
|
-
var _this$$refs = this.$refs,
|
|
116
|
-
container = _this$$refs.container,
|
|
117
|
-
content = _this$$refs.content;
|
|
118
|
-
var containerWidth = container.offsetWidth;
|
|
119
|
-
var contentWidth = content.scrollWidth;
|
|
120
|
-
this.isOverflowing = contentWidth > containerWidth;
|
|
121
|
-
} else {
|
|
122
|
-
this.isOverflowing = false;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
},
|
|
126
|
-
mounted: function mounted() {
|
|
127
|
-
this.updateOverflowing();
|
|
104
|
+
suggestion: vueTypes.types.any
|
|
128
105
|
},
|
|
129
106
|
render: function render() {
|
|
130
107
|
var _this = this;
|
|
@@ -140,11 +117,7 @@ var SuggestionItem = {
|
|
|
140
117
|
if (label) {
|
|
141
118
|
// label has highest precedence
|
|
142
119
|
return typeof label === 'string' ? vue.createVNode("div", {
|
|
143
|
-
"
|
|
144
|
-
"class": "trim",
|
|
145
|
-
"title": this.isOverflowing ? label : ''
|
|
146
|
-
}, [vue.createVNode("div", {
|
|
147
|
-
"ref": "content"
|
|
120
|
+
"class": "trim"
|
|
148
121
|
}, [(_category ? false : isPredictiveSuggestion
|
|
149
122
|
// eslint-disable-next-line
|
|
150
123
|
|| !!_suggestion_type) ? vue.createVNode(PredictiveSuggestion, {
|
|
@@ -154,7 +127,7 @@ var SuggestionItem = {
|
|
|
154
127
|
"textToHighlight": label,
|
|
155
128
|
"autoEscape": true,
|
|
156
129
|
"highlightStyle": highlightStyle
|
|
157
|
-
}, null)])
|
|
130
|
+
}, null)]) : label;
|
|
158
131
|
}
|
|
159
132
|
if (title || image || description) {
|
|
160
133
|
return vue.createVNode(Flex.Flex, {
|
|
@@ -1111,42 +1084,6 @@ var AIFeedback = vue.defineComponent({
|
|
|
1111
1084
|
}
|
|
1112
1085
|
});
|
|
1113
1086
|
|
|
1114
|
-
// eslint-disable-next-line import/prefer-default-export
|
|
1115
|
-
var innerText = function innerText(jsx) {
|
|
1116
|
-
// Empty
|
|
1117
|
-
if (jsx === null || typeof jsx === 'boolean' || typeof jsx === 'undefined') {
|
|
1118
|
-
return '';
|
|
1119
|
-
}
|
|
1120
|
-
|
|
1121
|
-
// Numeric children.
|
|
1122
|
-
if (typeof jsx === 'number') {
|
|
1123
|
-
return jsx.toString();
|
|
1124
|
-
}
|
|
1125
|
-
|
|
1126
|
-
// String literals.
|
|
1127
|
-
if (typeof jsx === 'string') {
|
|
1128
|
-
return jsx;
|
|
1129
|
-
}
|
|
1130
|
-
|
|
1131
|
-
// Array of JSX.
|
|
1132
|
-
if (Array.isArray(jsx)) {
|
|
1133
|
-
// eslint-disable-next-line no-use-before-define
|
|
1134
|
-
return jsx.reduce(reduceJsxToString, '');
|
|
1135
|
-
}
|
|
1136
|
-
|
|
1137
|
-
// Children prop.
|
|
1138
|
-
if (Object.prototype.hasOwnProperty.call(jsx, 'children')) {
|
|
1139
|
-
return innerText(jsx.children);
|
|
1140
|
-
}
|
|
1141
|
-
|
|
1142
|
-
// Default
|
|
1143
|
-
return '';
|
|
1144
|
-
};
|
|
1145
|
-
innerText["default"] = innerText;
|
|
1146
|
-
function reduceJsxToString(previous, current) {
|
|
1147
|
-
return previous + innerText(current);
|
|
1148
|
-
}
|
|
1149
|
-
|
|
1150
1087
|
var _excluded = ["_source"];
|
|
1151
1088
|
function _isSlot(s) {
|
|
1152
1089
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
|
|
@@ -1239,7 +1176,6 @@ var SearchBox = vue.defineComponent({
|
|
|
1239
1176
|
return this.faqAnswer || this.AIResponse && this.AIResponse.response && this.AIResponse.response.answer && this.AIResponse.response.answer.text;
|
|
1240
1177
|
},
|
|
1241
1178
|
parsedSuggestions: function parsedSuggestions() {
|
|
1242
|
-
var _this = this;
|
|
1243
1179
|
var suggestionsArray = [];
|
|
1244
1180
|
if (Array.isArray(this.suggestions) && this.suggestions.length) {
|
|
1245
1181
|
suggestionsArray = [].concat(withClickIds(this.suggestions));
|
|
@@ -1258,20 +1194,6 @@ var SearchBox = vue.defineComponent({
|
|
|
1258
1194
|
return _rollupPluginBabelHelpers._extends({}, s, {
|
|
1259
1195
|
sectionId: s._suggestion_type
|
|
1260
1196
|
});
|
|
1261
|
-
}).map(function (suggestion) {
|
|
1262
|
-
if (suggestion._suggestion_type === 'document') {
|
|
1263
|
-
// Document suggestions don't have a meaningful label and value
|
|
1264
|
-
var newSuggestion = _rollupPluginBabelHelpers._extends({}, suggestion);
|
|
1265
|
-
newSuggestion.label = 'For recent document suggestion, please implement a renderItem method to display label.';
|
|
1266
|
-
var renderItem = _this.$slots.renderItem || _this.$props.renderItem;
|
|
1267
|
-
if (typeof renderItem === 'function') {
|
|
1268
|
-
var jsxEl = renderItem(newSuggestion);
|
|
1269
|
-
var innerValue = innerText(jsxEl);
|
|
1270
|
-
newSuggestion.value = xss(innerValue);
|
|
1271
|
-
}
|
|
1272
|
-
return newSuggestion;
|
|
1273
|
-
}
|
|
1274
|
-
return suggestion;
|
|
1275
1197
|
});
|
|
1276
1198
|
var sectionsAccumulated = [];
|
|
1277
1199
|
var sectionisedSuggestions = suggestionsArray.reduce(function (acc, d, currentIndex) {
|
|
@@ -1320,12 +1242,6 @@ var SearchBox = vue.defineComponent({
|
|
|
1320
1242
|
enablePopularSuggestions: VueTypes.bool.def(false),
|
|
1321
1243
|
enableRecentSuggestions: VueTypes.bool.def(false),
|
|
1322
1244
|
enableFAQSuggestions: VueTypes.bool.def(false),
|
|
1323
|
-
enableDocumentSuggestions: VueTypes.bool.def(false),
|
|
1324
|
-
documentSuggestionsConfig: VueTypes.shape({
|
|
1325
|
-
size: VueTypes.number,
|
|
1326
|
-
from: VueTypes.number,
|
|
1327
|
-
maxChars: VueTypes.number
|
|
1328
|
-
}),
|
|
1329
1245
|
FAQSuggestionsConfig: VueTypes.shape({
|
|
1330
1246
|
sectionLabel: VueTypes.string,
|
|
1331
1247
|
size: VueTypes.number
|
|
@@ -1505,9 +1421,9 @@ var SearchBox = vue.defineComponent({
|
|
|
1505
1421
|
}
|
|
1506
1422
|
},
|
|
1507
1423
|
isAITyping: function isAITyping(newVal, oldVal) {
|
|
1508
|
-
var
|
|
1424
|
+
var _this = this;
|
|
1509
1425
|
var scrollAIContainer = function scrollAIContainer() {
|
|
1510
|
-
var dropdownEle =
|
|
1426
|
+
var dropdownEle = _this.$refs[_dropdownULRef];
|
|
1511
1427
|
if (dropdownEle) {
|
|
1512
1428
|
dropdownEle.scrollTo({
|
|
1513
1429
|
top: dropdownEle.scrollHeight,
|
|
@@ -1616,7 +1532,7 @@ var SearchBox = vue.defineComponent({
|
|
|
1616
1532
|
}
|
|
1617
1533
|
},
|
|
1618
1534
|
setValue: function setValue(value, isDefaultValue, props, cause, toggleIsOpen, categoryValue, shouldExecuteQuery) {
|
|
1619
|
-
var
|
|
1535
|
+
var _this2 = this;
|
|
1620
1536
|
if (isDefaultValue === void 0) {
|
|
1621
1537
|
isDefaultValue = false;
|
|
1622
1538
|
}
|
|
@@ -1633,65 +1549,65 @@ var SearchBox = vue.defineComponent({
|
|
|
1633
1549
|
shouldExecuteQuery = true;
|
|
1634
1550
|
}
|
|
1635
1551
|
var performUpdate = function performUpdate() {
|
|
1636
|
-
if (
|
|
1552
|
+
if (_this2.$options.isTagsMode && isEqual(value, _this2.selectedTags)) {
|
|
1637
1553
|
return;
|
|
1638
1554
|
}
|
|
1639
|
-
if (
|
|
1640
|
-
if (Array.isArray(
|
|
1555
|
+
if (_this2.$options.isTagsMode && cause === reactivecore.causes.SUGGESTION_SELECT) {
|
|
1556
|
+
if (Array.isArray(_this2.selectedTags) && _this2.selectedTags.length) {
|
|
1641
1557
|
// check if value already present in selectedTags
|
|
1642
|
-
if (typeof value === 'string' &&
|
|
1643
|
-
|
|
1558
|
+
if (typeof value === 'string' && _this2.selectedTags.includes(value)) {
|
|
1559
|
+
_this2.isOpen = false;
|
|
1644
1560
|
return;
|
|
1645
1561
|
}
|
|
1646
|
-
|
|
1562
|
+
_this2.selectedTags = [].concat(_this2.selectedTags);
|
|
1647
1563
|
if (typeof value === 'string' && !!value) {
|
|
1648
|
-
|
|
1649
|
-
} else if (Array.isArray(value) && !isEqual(
|
|
1650
|
-
|
|
1564
|
+
_this2.selectedTags.push(value);
|
|
1565
|
+
} else if (Array.isArray(value) && !isEqual(_this2.selectedTags, value)) {
|
|
1566
|
+
_this2.selectedTags = value;
|
|
1651
1567
|
}
|
|
1652
1568
|
} else if (value) {
|
|
1653
|
-
|
|
1569
|
+
_this2.selectedTags = typeof value !== 'string' ? value : [].concat(value);
|
|
1654
1570
|
}
|
|
1655
|
-
|
|
1571
|
+
_this2.currentValue = '';
|
|
1656
1572
|
} else {
|
|
1657
|
-
|
|
1573
|
+
_this2.currentValue = index.decodeHtml(value);
|
|
1658
1574
|
}
|
|
1659
1575
|
var queryHandlerValue = value;
|
|
1660
|
-
if (
|
|
1661
|
-
queryHandlerValue = Array.isArray(
|
|
1576
|
+
if (_this2.$options.isTagsMode && cause === reactivecore.causes.SUGGESTION_SELECT) {
|
|
1577
|
+
queryHandlerValue = Array.isArray(_this2.selectedTags) && _this2.selectedTags.length ? _this2.selectedTags : undefined;
|
|
1662
1578
|
}
|
|
1663
|
-
if ((
|
|
1579
|
+
if ((_this2.faqAnswer || _this2.faqQuestion) && value === '') {
|
|
1664
1580
|
// Empty the previous state
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1581
|
+
_this2.faqAnswer = '';
|
|
1582
|
+
_this2.faqQuestion = '';
|
|
1583
|
+
_this2.showAIScreen = false;
|
|
1668
1584
|
}
|
|
1669
1585
|
if (isDefaultValue) {
|
|
1670
|
-
if (
|
|
1586
|
+
if (_this2.$props.autosuggest) {
|
|
1671
1587
|
if (toggleIsOpen) {
|
|
1672
|
-
|
|
1588
|
+
_this2.isOpen = false;
|
|
1673
1589
|
}
|
|
1674
|
-
if (typeof
|
|
1590
|
+
if (typeof _this2.currentValue === 'string') _this2.triggerDefaultQuery(_this2.currentValue, props.enableAI && _this2.currentTriggerMode === constants.AI_TRIGGER_MODES.QUESTION && _this2.currentValue.endsWith('?') ? {
|
|
1675
1591
|
enableAI: true
|
|
1676
1592
|
} : {}, shouldExecuteQuery);
|
|
1677
1593
|
} // in case of strict selection only SUGGESTION_SELECT should be able
|
|
1678
1594
|
// to set the query otherwise the value should reset
|
|
1679
1595
|
if (props.strictSelection) {
|
|
1680
|
-
if (cause === reactivecore.causes.SUGGESTION_SELECT || (
|
|
1681
|
-
|
|
1596
|
+
if (cause === reactivecore.causes.SUGGESTION_SELECT || (_this2.$options.isTagsMode ? _this2.selectedTags.length === 0 : value === '')) {
|
|
1597
|
+
_this2.triggerCustomQuery(queryHandlerValue, _this2.$options.isTagsMode ? undefined : categoryValue, shouldExecuteQuery);
|
|
1682
1598
|
} else {
|
|
1683
|
-
|
|
1599
|
+
_this2.setValue('', true);
|
|
1684
1600
|
}
|
|
1685
1601
|
} else if (props.value === undefined || cause === reactivecore.causes.SUGGESTION_SELECT || cause === reactivecore.causes.CLEAR_VALUE) {
|
|
1686
|
-
|
|
1687
|
-
|
|
1602
|
+
_this2.showAIScreen = false;
|
|
1603
|
+
_this2.triggerCustomQuery(queryHandlerValue, _this2.$options.isTagsMode ? undefined : categoryValue, shouldExecuteQuery);
|
|
1688
1604
|
}
|
|
1689
1605
|
} else {
|
|
1690
1606
|
// debounce for handling text while typing
|
|
1691
|
-
|
|
1607
|
+
_this2.handleTextChange(value, cause);
|
|
1692
1608
|
}
|
|
1693
|
-
|
|
1694
|
-
|
|
1609
|
+
_this2.$emit('valueChange', value);
|
|
1610
|
+
_this2.$emit('value-change', value);
|
|
1695
1611
|
};
|
|
1696
1612
|
checkValueChange(props.componentId, value, props.beforeValueChange, performUpdate);
|
|
1697
1613
|
},
|
|
@@ -1840,7 +1756,7 @@ var SearchBox = vue.defineComponent({
|
|
|
1840
1756
|
this.$emit('key-down', event, this.triggerQuery);
|
|
1841
1757
|
},
|
|
1842
1758
|
onInputChange: function onInputChange(e) {
|
|
1843
|
-
var
|
|
1759
|
+
var _this3 = this;
|
|
1844
1760
|
var inputValue = e.target.value;
|
|
1845
1761
|
if (!this.$data.isOpen && this.$props.autosuggest) {
|
|
1846
1762
|
this.isOpen = true;
|
|
@@ -1854,7 +1770,7 @@ var SearchBox = vue.defineComponent({
|
|
|
1854
1770
|
} else {
|
|
1855
1771
|
this.$emit('change', inputValue, function (_ref3) {
|
|
1856
1772
|
var isOpen = _ref3.isOpen;
|
|
1857
|
-
return
|
|
1773
|
+
return _this3.triggerQuery({
|
|
1858
1774
|
defaultQuery: true,
|
|
1859
1775
|
customQuery: true,
|
|
1860
1776
|
value: inputValue,
|
|
@@ -1898,7 +1814,7 @@ var SearchBox = vue.defineComponent({
|
|
|
1898
1814
|
}
|
|
1899
1815
|
},
|
|
1900
1816
|
onSuggestionSelected: function onSuggestionSelected(suggestion) {
|
|
1901
|
-
var
|
|
1817
|
+
var _this4 = this;
|
|
1902
1818
|
var value = this.$props.value;
|
|
1903
1819
|
// The state of the suggestion is open by the time it reaches here. i.e. isOpen = true
|
|
1904
1820
|
// handle when FAQ suggestion is clicked
|
|
@@ -1947,10 +1863,10 @@ var SearchBox = vue.defineComponent({
|
|
|
1947
1863
|
this.setValue(emitValue, true, this.$props, reactivecore.causes.SUGGESTION_SELECT, false, suggestion._category);
|
|
1948
1864
|
this.$emit('change', emitValue, function (_ref4) {
|
|
1949
1865
|
var isOpen = _ref4.isOpen;
|
|
1950
|
-
return
|
|
1866
|
+
return _this4.triggerQuery(_rollupPluginBabelHelpers._extends({
|
|
1951
1867
|
isOpen: isOpen,
|
|
1952
1868
|
value: emitValue
|
|
1953
|
-
}, !
|
|
1869
|
+
}, !_this4.$options.isTagsMode && {
|
|
1954
1870
|
categoryValue: suggestion._category
|
|
1955
1871
|
}));
|
|
1956
1872
|
});
|
|
@@ -1990,7 +1906,7 @@ var SearchBox = vue.defineComponent({
|
|
|
1990
1906
|
return null;
|
|
1991
1907
|
},
|
|
1992
1908
|
renderErrorComponent: function renderErrorComponent(isAIError) {
|
|
1993
|
-
var
|
|
1909
|
+
var _this5 = this;
|
|
1994
1910
|
if (isAIError === void 0) {
|
|
1995
1911
|
isAIError = false;
|
|
1996
1912
|
}
|
|
@@ -2017,7 +1933,7 @@ var SearchBox = vue.defineComponent({
|
|
|
2017
1933
|
"themePreset": this.themePreset
|
|
2018
1934
|
}, {
|
|
2019
1935
|
"default": function _default() {
|
|
2020
|
-
return [index.isFunction(renderError) ? renderError(
|
|
1936
|
+
return [index.isFunction(renderError) ? renderError(_this5.error) : renderError];
|
|
2021
1937
|
}
|
|
2022
1938
|
});
|
|
2023
1939
|
}
|
|
@@ -2097,7 +2013,7 @@ var SearchBox = vue.defineComponent({
|
|
|
2097
2013
|
});
|
|
2098
2014
|
},
|
|
2099
2015
|
renderEnterButtonElement: function renderEnterButtonElement() {
|
|
2100
|
-
var
|
|
2016
|
+
var _this6 = this;
|
|
2101
2017
|
var _this$$props2 = this.$props,
|
|
2102
2018
|
enterButton = _this$$props2.enterButton,
|
|
2103
2019
|
innerClass = _this$$props2.innerClass;
|
|
@@ -2105,12 +2021,12 @@ var SearchBox = vue.defineComponent({
|
|
|
2105
2021
|
if (enterButton) {
|
|
2106
2022
|
var getEnterButtonMarkup = function getEnterButtonMarkup() {
|
|
2107
2023
|
if (renderEnterButton) {
|
|
2108
|
-
return renderEnterButton(
|
|
2024
|
+
return renderEnterButton(_this6.enterButtonOnClick);
|
|
2109
2025
|
}
|
|
2110
2026
|
return vue.createVNode(Button.Button, {
|
|
2111
2027
|
"class": "enter-btn " + getClassName$1(innerClass, 'enter-button'),
|
|
2112
2028
|
"primary": true,
|
|
2113
|
-
"onClick":
|
|
2029
|
+
"onClick": _this6.enterButtonOnClick
|
|
2114
2030
|
}, {
|
|
2115
2031
|
"default": function _default() {
|
|
2116
2032
|
return [vue.createTextVNode("Search")];
|
|
@@ -2136,7 +2052,7 @@ var SearchBox = vue.defineComponent({
|
|
|
2136
2052
|
return '/';
|
|
2137
2053
|
},
|
|
2138
2054
|
renderLeftIcons: function renderLeftIcons() {
|
|
2139
|
-
var
|
|
2055
|
+
var _this7 = this;
|
|
2140
2056
|
var _slot3;
|
|
2141
2057
|
var _this$$props3 = this.$props,
|
|
2142
2058
|
iconPosition = _this$$props3.iconPosition,
|
|
@@ -2146,8 +2062,8 @@ var SearchBox = vue.defineComponent({
|
|
|
2146
2062
|
}, {
|
|
2147
2063
|
"default": function _default() {
|
|
2148
2064
|
return [iconPosition === 'left' && showIcon && vue.createVNode(DropDown.IconWrapper, {
|
|
2149
|
-
"onClick":
|
|
2150
|
-
}, _isSlot(_slot3 =
|
|
2065
|
+
"onClick": _this7.handleSearchIconClick
|
|
2066
|
+
}, _isSlot(_slot3 = _this7.renderIcon()) ? _slot3 : {
|
|
2151
2067
|
"default": function _default() {
|
|
2152
2068
|
return [_slot3];
|
|
2153
2069
|
}
|
|
@@ -2156,7 +2072,7 @@ var SearchBox = vue.defineComponent({
|
|
|
2156
2072
|
})]);
|
|
2157
2073
|
},
|
|
2158
2074
|
renderRightIcons: function renderRightIcons() {
|
|
2159
|
-
var
|
|
2075
|
+
var _this8 = this;
|
|
2160
2076
|
var _slot4, _slot5, _slot6;
|
|
2161
2077
|
var _this$$props4 = this.$props,
|
|
2162
2078
|
iconPosition = _this$$props4.iconPosition,
|
|
@@ -2173,29 +2089,29 @@ var SearchBox = vue.defineComponent({
|
|
|
2173
2089
|
}, {
|
|
2174
2090
|
"default": function _default() {
|
|
2175
2091
|
return [currentValue && showClear && vue.createVNode(DropDown.IconWrapper, {
|
|
2176
|
-
"onClick":
|
|
2092
|
+
"onClick": _this8.clearValue,
|
|
2177
2093
|
"showIcon": showIcon,
|
|
2178
2094
|
"isClearIcon": true
|
|
2179
|
-
}, _isSlot(_slot4 =
|
|
2095
|
+
}, _isSlot(_slot4 = _this8.renderCancelIcon()) ? _slot4 : {
|
|
2180
2096
|
"default": function _default() {
|
|
2181
2097
|
return [_slot4];
|
|
2182
2098
|
}
|
|
2183
2099
|
}), showFocusShortcutsIcon && vue.createVNode(DropDown.ButtonIconWrapper, {
|
|
2184
2100
|
"onClick": function onClick(e) {
|
|
2185
|
-
return
|
|
2101
|
+
return _this8.focusSearchBox(e);
|
|
2186
2102
|
}
|
|
2187
|
-
}, _isSlot(_slot5 =
|
|
2103
|
+
}, _isSlot(_slot5 = _this8.renderShortcut()) ? _slot5 : {
|
|
2188
2104
|
"default": function _default() {
|
|
2189
2105
|
return [_slot5];
|
|
2190
2106
|
}
|
|
2191
2107
|
}), showVoiceSearch && vue.createVNode(Mic, {
|
|
2192
2108
|
"getInstance": getMicInstance,
|
|
2193
2109
|
"render": renderMic,
|
|
2194
|
-
"handleResult":
|
|
2110
|
+
"handleResult": _this8.handleVoiceResults,
|
|
2195
2111
|
"className": getClassName$1(innerClass, 'mic') || null
|
|
2196
2112
|
}, null), iconPosition === 'right' && showIcon && vue.createVNode(DropDown.IconWrapper, {
|
|
2197
|
-
"onClick":
|
|
2198
|
-
}, _isSlot(_slot6 =
|
|
2113
|
+
"onClick": _this8.handleSearchIconClick
|
|
2114
|
+
}, _isSlot(_slot6 = _this8.renderIcon()) ? _slot6 : {
|
|
2199
2115
|
"default": function _default() {
|
|
2200
2116
|
return [_slot6];
|
|
2201
2117
|
}
|
|
@@ -2214,7 +2130,7 @@ var SearchBox = vue.defineComponent({
|
|
|
2214
2130
|
(_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
|
|
2215
2131
|
},
|
|
2216
2132
|
listenForFocusShortcuts: function listenForFocusShortcuts() {
|
|
2217
|
-
var
|
|
2133
|
+
var _this9 = this;
|
|
2218
2134
|
var _this$$props$focusSho = this.$props.focusShortcuts,
|
|
2219
2135
|
focusShortcuts = _this$$props$focusSho === void 0 ? ['/'] : _this$$props$focusSho;
|
|
2220
2136
|
if (index.isEmpty(focusShortcuts)) {
|
|
@@ -2229,7 +2145,7 @@ var SearchBox = vue.defineComponent({
|
|
|
2229
2145
|
function (event, handler) {
|
|
2230
2146
|
// Prevent the default refresh event under WINDOWS system
|
|
2231
2147
|
event.preventDefault();
|
|
2232
|
-
|
|
2148
|
+
_this9.focusSearchBox(event);
|
|
2233
2149
|
});
|
|
2234
2150
|
|
|
2235
2151
|
// if one of modifier keys are used, they are handled below
|
|
@@ -2239,7 +2155,7 @@ var SearchBox = vue.defineComponent({
|
|
|
2239
2155
|
for (var index$1 = 0; index$1 < modifierKeys.length; index$1 += 1) {
|
|
2240
2156
|
var element = modifierKeys[index$1];
|
|
2241
2157
|
if (hotkeys[element]) {
|
|
2242
|
-
|
|
2158
|
+
_this9.focusSearchBox(event);
|
|
2243
2159
|
break;
|
|
2244
2160
|
}
|
|
2245
2161
|
}
|
|
@@ -2252,10 +2168,10 @@ var SearchBox = vue.defineComponent({
|
|
|
2252
2168
|
this.triggerDefaultQuery(value);
|
|
2253
2169
|
},
|
|
2254
2170
|
renderActionIcon: function renderActionIcon(suggestion) {
|
|
2255
|
-
var
|
|
2171
|
+
var _this10 = this;
|
|
2256
2172
|
var handleAutoFillClick = function handleAutoFillClick(e) {
|
|
2257
2173
|
e.stopPropagation();
|
|
2258
|
-
|
|
2174
|
+
_this10.onAutofillClick(suggestion);
|
|
2259
2175
|
};
|
|
2260
2176
|
if (suggestion._suggestion_type === helper.suggestionTypes.Featured) {
|
|
2261
2177
|
if (suggestion.action === helper.featuredSuggestionsActionTypes.FUNCTION) {
|
|
@@ -2278,7 +2194,7 @@ var SearchBox = vue.defineComponent({
|
|
|
2278
2194
|
return null;
|
|
2279
2195
|
},
|
|
2280
2196
|
renderTag: function renderTag(item) {
|
|
2281
|
-
var
|
|
2197
|
+
var _this11 = this;
|
|
2282
2198
|
var innerClass = this.$props.innerClass;
|
|
2283
2199
|
return vue.createVNode(TagItem, {
|
|
2284
2200
|
"class": getClassName$1(innerClass, 'selected-tag') || ''
|
|
@@ -2289,7 +2205,7 @@ var SearchBox = vue.defineComponent({
|
|
|
2289
2205
|
"aria-label": "delete-tag",
|
|
2290
2206
|
"class": "close-icon",
|
|
2291
2207
|
"onClick": function onClick() {
|
|
2292
|
-
return
|
|
2208
|
+
return _this11.clearTag(item);
|
|
2293
2209
|
}
|
|
2294
2210
|
}, [vue.createVNode(DropDown.CancelSvg, null, null)])];
|
|
2295
2211
|
}
|
|
@@ -2312,7 +2228,7 @@ var SearchBox = vue.defineComponent({
|
|
|
2312
2228
|
}
|
|
2313
2229
|
},
|
|
2314
2230
|
renderTags: function renderTags() {
|
|
2315
|
-
var
|
|
2231
|
+
var _this12 = this;
|
|
2316
2232
|
if (!Array.isArray(this.selectedTags)) {
|
|
2317
2233
|
return null;
|
|
2318
2234
|
}
|
|
@@ -2326,16 +2242,16 @@ var SearchBox = vue.defineComponent({
|
|
|
2326
2242
|
}) : vue.createVNode(TagsContainer, null, {
|
|
2327
2243
|
"default": function _default() {
|
|
2328
2244
|
return [tagsList.map(function (item) {
|
|
2329
|
-
return
|
|
2245
|
+
return _this12.renderTag(item);
|
|
2330
2246
|
}), shouldRenderClearAllTag && vue.createVNode(TagItem, {
|
|
2331
|
-
"class": getClassName$1(
|
|
2247
|
+
"class": getClassName$1(_this12.$props.innerClass, 'selected-tag') || ''
|
|
2332
2248
|
}, {
|
|
2333
2249
|
"default": function _default() {
|
|
2334
2250
|
return [vue.createVNode("span", null, [vue.createTextVNode("Clear All")]), vue.createVNode("span", {
|
|
2335
2251
|
"role": "img",
|
|
2336
2252
|
"aria-label": "delete-tag",
|
|
2337
2253
|
"class": "close-icon",
|
|
2338
|
-
"onClick":
|
|
2254
|
+
"onClick": _this12.clearAllTags
|
|
2339
2255
|
}, [vue.createVNode(DropDown.CancelSvg, null, null)])];
|
|
2340
2256
|
}
|
|
2341
2257
|
})];
|
|
@@ -2383,7 +2299,7 @@ var SearchBox = vue.defineComponent({
|
|
|
2383
2299
|
},
|
|
2384
2300
|
renderAIScreenFooter: function renderAIScreenFooter() {
|
|
2385
2301
|
var _slot8;
|
|
2386
|
-
var
|
|
2302
|
+
var _this13 = this;
|
|
2387
2303
|
var _this$$props$AIUIConf2 = this.$props.AIUIConfig,
|
|
2388
2304
|
AIUIConfig = _this$$props$AIUIConf2 === void 0 ? {} : _this$$props$AIUIConf2;
|
|
2389
2305
|
var _ref6 = AIUIConfig || {},
|
|
@@ -2392,11 +2308,11 @@ var SearchBox = vue.defineComponent({
|
|
|
2392
2308
|
_ref6$onSourceClick = _ref6.onSourceClick,
|
|
2393
2309
|
onSourceClick = _ref6$onSourceClick === void 0 ? function () {} : _ref6$onSourceClick;
|
|
2394
2310
|
var renderSourceDocumentLabel = function renderSourceDocumentLabel(sourceObj) {
|
|
2395
|
-
if (
|
|
2396
|
-
return
|
|
2311
|
+
if (_this13.$props.AIUIConfig && _this13.$props.AIUIConfig.renderSourceDocument) {
|
|
2312
|
+
return _this13.$props.AIUIConfig.renderSourceDocument(sourceObj);
|
|
2397
2313
|
}
|
|
2398
|
-
if (
|
|
2399
|
-
return
|
|
2314
|
+
if (_this13.$slots.renderSourceDocument) {
|
|
2315
|
+
return _this13.$slots.renderSourceDocument(sourceObj);
|
|
2400
2316
|
}
|
|
2401
2317
|
return sourceObj._id;
|
|
2402
2318
|
};
|
|
@@ -2404,10 +2320,10 @@ var SearchBox = vue.defineComponent({
|
|
|
2404
2320
|
"themePreset": this.$props.themePreset
|
|
2405
2321
|
}, {
|
|
2406
2322
|
"default": function _default() {
|
|
2407
|
-
return [vue.createTextVNode("Summary generated using the following sources:"), ' ', vue.createVNode(SourceTags, null, _isSlot(_slot8 =
|
|
2323
|
+
return [vue.createTextVNode("Summary generated using the following sources:"), ' ', vue.createVNode(SourceTags, null, _isSlot(_slot8 = _this13.getAISourceObjects().map(function (el) {
|
|
2408
2324
|
var _slot7;
|
|
2409
2325
|
return vue.createVNode(Button.Button, {
|
|
2410
|
-
"class": "--ai-source-tag " + (getClassName$1(
|
|
2326
|
+
"class": "--ai-source-tag " + (getClassName$1(_this13.$props.innerClass, 'ai-source-tag') || ''),
|
|
2411
2327
|
"info": true,
|
|
2412
2328
|
"onClick": function onClick() {
|
|
2413
2329
|
return onSourceClick && onSourceClick(el);
|
|
@@ -2426,7 +2342,7 @@ var SearchBox = vue.defineComponent({
|
|
|
2426
2342
|
}) : null;
|
|
2427
2343
|
},
|
|
2428
2344
|
renderAIScreen: function renderAIScreen() {
|
|
2429
|
-
var
|
|
2345
|
+
var _this14 = this;
|
|
2430
2346
|
var customAIRenderer = this.$props.renderAIAnswer || this.$slots.renderAIAnswer;
|
|
2431
2347
|
if (customAIRenderer) {
|
|
2432
2348
|
return customAIRenderer({
|
|
@@ -2450,11 +2366,11 @@ var SearchBox = vue.defineComponent({
|
|
|
2450
2366
|
"hideUI": this.isAIResponseLoading || this.isLoading || !this.sessionIdFromStore,
|
|
2451
2367
|
"key": this.sessionIdFromStore,
|
|
2452
2368
|
"onFeedbackSubmit": function onFeedbackSubmit(useful, reason) {
|
|
2453
|
-
|
|
2369
|
+
_this14.feedbackState = {
|
|
2454
2370
|
isRecorded: true,
|
|
2455
2371
|
feedbackType: useful ? 'positive' : 'negative'
|
|
2456
2372
|
};
|
|
2457
|
-
|
|
2373
|
+
_this14.recordAISessionUsefulness(_this14.sessionIdFromStore, {
|
|
2458
2374
|
useful: useful,
|
|
2459
2375
|
reason: reason
|
|
2460
2376
|
});
|
|
@@ -2489,7 +2405,7 @@ var SearchBox = vue.defineComponent({
|
|
|
2489
2405
|
});
|
|
2490
2406
|
},
|
|
2491
2407
|
renderAskButtonElement: function renderAskButtonElement() {
|
|
2492
|
-
var
|
|
2408
|
+
var _this15 = this;
|
|
2493
2409
|
var _this$$props5 = this.$props,
|
|
2494
2410
|
AIUIConfig = _this$$props5.AIUIConfig,
|
|
2495
2411
|
innerClass = _this$$props5.innerClass;
|
|
@@ -2499,12 +2415,12 @@ var SearchBox = vue.defineComponent({
|
|
|
2499
2415
|
if (askButton) {
|
|
2500
2416
|
var getEnterButtonMarkup = function getEnterButtonMarkup() {
|
|
2501
2417
|
if (renderAskButton) {
|
|
2502
|
-
return renderAskButton(
|
|
2418
|
+
return renderAskButton(_this15.askButtonOnClick);
|
|
2503
2419
|
}
|
|
2504
2420
|
return vue.createVNode(Button.Button, {
|
|
2505
2421
|
"class": "enter-btn " + getClassName$1(innerClass, 'ask-button'),
|
|
2506
2422
|
"info": true,
|
|
2507
|
-
"onClick":
|
|
2423
|
+
"onClick": _this15.askButtonOnClick
|
|
2508
2424
|
}, {
|
|
2509
2425
|
"default": function _default() {
|
|
2510
2426
|
return [vue.createTextVNode("Ask")];
|
|
@@ -2519,7 +2435,7 @@ var SearchBox = vue.defineComponent({
|
|
|
2519
2435
|
}
|
|
2520
2436
|
},
|
|
2521
2437
|
render: function render() {
|
|
2522
|
-
var
|
|
2438
|
+
var _this16 = this;
|
|
2523
2439
|
var expandSuggestionsContainer = this.$props.expandSuggestionsContainer;
|
|
2524
2440
|
var _this$$slots = this.$slots,
|
|
2525
2441
|
recentSearchesIcon = _this$$slots.recentSearchesIcon,
|
|
@@ -2530,17 +2446,17 @@ var SearchBox = vue.defineComponent({
|
|
|
2530
2446
|
"class": this.$props.className
|
|
2531
2447
|
}, {
|
|
2532
2448
|
"default": function _default() {
|
|
2533
|
-
return [
|
|
2534
|
-
"class": getClassName$1(
|
|
2449
|
+
return [_this16.$props.title && vue.createVNode(Title.Title, {
|
|
2450
|
+
"class": getClassName$1(_this16.$props.innerClass, 'title') || ''
|
|
2535
2451
|
}, {
|
|
2536
2452
|
"default": function _default() {
|
|
2537
|
-
return [
|
|
2453
|
+
return [_this16.$props.title];
|
|
2538
2454
|
}
|
|
2539
|
-
}),
|
|
2540
|
-
"id":
|
|
2541
|
-
"handleChange":
|
|
2542
|
-
"handleMouseup":
|
|
2543
|
-
"isOpen":
|
|
2455
|
+
}), _this16.$props.autosuggest ? vue.createVNode(DropDown.Downshift, {
|
|
2456
|
+
"id": _this16.$props.componentId + "-downshift",
|
|
2457
|
+
"handleChange": _this16.onSuggestionSelected,
|
|
2458
|
+
"handleMouseup": _this16.handleStateChange,
|
|
2459
|
+
"isOpen": _this16.$data.isOpen
|
|
2544
2460
|
}, {
|
|
2545
2461
|
"default": function _default(_ref8) {
|
|
2546
2462
|
var getInputEvents = _ref8.getInputEvents,
|
|
@@ -2596,21 +2512,21 @@ var SearchBox = vue.defineComponent({
|
|
|
2596
2512
|
}
|
|
2597
2513
|
};
|
|
2598
2514
|
var indexOffset = 0;
|
|
2599
|
-
return vue.createVNode("div", null, [
|
|
2515
|
+
return vue.createVNode("div", null, [_this16.hasCustomRenderer && _this16.getComponent({
|
|
2600
2516
|
isOpen: isOpen,
|
|
2601
2517
|
getItemProps: getItemProps,
|
|
2602
2518
|
getItemEvents: getItemEvents,
|
|
2603
2519
|
highlightedIndex: highlightedIndex
|
|
2604
|
-
}),
|
|
2605
|
-
"class": Input.suggestions(
|
|
2520
|
+
}), _this16.renderErrorComponent(), !_this16.hasCustomRenderer && isOpen && hasSuggestions ? vue.createVNode("ul", {
|
|
2521
|
+
"class": Input.suggestions(_this16.themePreset, _this16.theme) + " " + getClassName$1(_this16.$props.innerClass, 'list') + " " + Input.searchboxSuggestions(_this16.themePreset, _this16.theme) + "\n\t\t\t\t\t\t\t\t\t\t\t\t\t",
|
|
2606
2522
|
"ref": _dropdownULRef
|
|
2607
|
-
}, [
|
|
2608
|
-
"themePreset":
|
|
2523
|
+
}, [_this16.showAIScreen && vue.createVNode(SearchBoxAISection, {
|
|
2524
|
+
"themePreset": _this16.$props.themePreset
|
|
2609
2525
|
}, {
|
|
2610
2526
|
"default": function _default() {
|
|
2611
|
-
return [
|
|
2527
|
+
return [_this16.renderAIScreen(), ' ', _this16.renderErrorComponent(true)];
|
|
2612
2528
|
}
|
|
2613
|
-
}), !
|
|
2529
|
+
}), !_this16.showAIScreen && _this16.parsedSuggestions.map(function (item, itemIndex) {
|
|
2614
2530
|
var index = indexOffset + itemIndex;
|
|
2615
2531
|
if (Array.isArray(item)) {
|
|
2616
2532
|
var sectionHtml = xss(item[0].sectionLabel);
|
|
@@ -2619,7 +2535,7 @@ var SearchBox = vue.defineComponent({
|
|
|
2619
2535
|
"key": "section-" + itemIndex,
|
|
2620
2536
|
"class": "section-container"
|
|
2621
2537
|
}, [sectionHtml ? vue.createVNode("div", {
|
|
2622
|
-
"class": "section-header " + getClassName$1(
|
|
2538
|
+
"class": "section-header " + getClassName$1(_this16.$props.innerClass, 'section-label'),
|
|
2623
2539
|
"key": "" + item[0].sectionId,
|
|
2624
2540
|
"innerHTML": sectionHtml
|
|
2625
2541
|
}, null) : null, vue.createVNode("ul", {
|
|
@@ -2639,7 +2555,7 @@ var SearchBox = vue.defineComponent({
|
|
|
2639
2555
|
justifyContent: 'flex-start',
|
|
2640
2556
|
alignItems: 'center'
|
|
2641
2557
|
},
|
|
2642
|
-
"class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$1(
|
|
2558
|
+
"class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$1(_this16.$props.innerClass, 'active-suggestion-item') : "li-item " + getClassName$1(_this16.$props.innerClass, 'suggestion-item'))
|
|
2643
2559
|
}), [renderItem(sectionItem)]);
|
|
2644
2560
|
}
|
|
2645
2561
|
if (sectionItem._suggestion_type === '_internal_a_i_trigger') {
|
|
@@ -2653,9 +2569,9 @@ var SearchBox = vue.defineComponent({
|
|
|
2653
2569
|
justifyContent: 'flex-start',
|
|
2654
2570
|
alignItems: 'center'
|
|
2655
2571
|
},
|
|
2656
|
-
"class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$1(
|
|
2572
|
+
"class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$1(_this16.$props.innerClass, 'active-suggestion-item') : "li-item " + getClassName$1(_this16.$props.innerClass, 'suggestion-item'))
|
|
2657
2573
|
}), [vue.createVNode(SuggestionItem, {
|
|
2658
|
-
"currentValue":
|
|
2574
|
+
"currentValue": _this16.currentValue,
|
|
2659
2575
|
"suggestion": sectionItem
|
|
2660
2576
|
}, null)]);
|
|
2661
2577
|
}
|
|
@@ -2669,7 +2585,7 @@ var SearchBox = vue.defineComponent({
|
|
|
2669
2585
|
justifyContent: 'flex-start',
|
|
2670
2586
|
alignItems: 'center'
|
|
2671
2587
|
},
|
|
2672
|
-
"class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$1(
|
|
2588
|
+
"class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$1(_this16.$props.innerClass, 'active-suggestion-item') : "li-item " + getClassName$1(_this16.$props.innerClass, 'suggestion-item'))
|
|
2673
2589
|
}), [vue.createVNode("div", {
|
|
2674
2590
|
"style": {
|
|
2675
2591
|
padding: '0 10px 0 0',
|
|
@@ -2677,74 +2593,74 @@ var SearchBox = vue.defineComponent({
|
|
|
2677
2593
|
}
|
|
2678
2594
|
}, [vue.createVNode(CustomSvg, {
|
|
2679
2595
|
"key": sectionItem._suggestion_type + "-" + sectionIndex,
|
|
2680
|
-
"className": getClassName$1(
|
|
2596
|
+
"className": getClassName$1(_this16.$props.innerClass, sectionItem._suggestion_type + "-search-icon") || null,
|
|
2681
2597
|
"icon": getIcon(sectionItem._suggestion_type, sectionItem, suggestionsHaveIcon),
|
|
2682
2598
|
"type": sectionItem._suggestion_type + "-search-icon"
|
|
2683
2599
|
}, null)]), vue.createVNode(SuggestionItem, {
|
|
2684
|
-
"currentValue":
|
|
2600
|
+
"currentValue": _this16.currentValue,
|
|
2685
2601
|
"suggestion": sectionItem
|
|
2686
|
-
}, null),
|
|
2602
|
+
}, null), _this16.renderActionIcon(sectionItem)]);
|
|
2687
2603
|
})])]);
|
|
2688
2604
|
}
|
|
2689
2605
|
return vue.createVNode("div", null, [vue.createTextVNode("No suggestions")]);
|
|
2690
|
-
}), !
|
|
2606
|
+
}), !_this16.showAIScreen && _this16.parsedSuggestions.length && _this16.$props.showSuggestionsFooter ? _this16.suggestionsFooter() : null]) : _this16.renderNoSuggestions(_this16.normalizedSuggestions)]);
|
|
2691
2607
|
};
|
|
2692
2608
|
return vue.createVNode("div", {
|
|
2693
2609
|
"class": Input.suggestionsContainer
|
|
2694
2610
|
}, [vue.createVNode(InputGroup, {
|
|
2695
2611
|
"searchBox": true,
|
|
2696
2612
|
"ref": _inputGroupRef,
|
|
2697
|
-
"isOpen":
|
|
2613
|
+
"isOpen": _this16.$data.isOpen
|
|
2698
2614
|
}, {
|
|
2699
2615
|
"default": function _default() {
|
|
2700
2616
|
return [vue.createVNode(Input.Actions, null, {
|
|
2701
2617
|
"default": function _default() {
|
|
2702
|
-
return [
|
|
2618
|
+
return [_this16.renderInputAddonBefore(), _this16.renderLeftIcons()];
|
|
2703
2619
|
}
|
|
2704
2620
|
}), vue.createVNode(DropDown.InputWrapper, null, {
|
|
2705
2621
|
"default": function _default() {
|
|
2706
2622
|
return [vue.createVNode(Input.TextArea, vue.mergeProps(_transformOn(getInputEvents({
|
|
2707
|
-
onInput:
|
|
2623
|
+
onInput: _this16.onInputChange,
|
|
2708
2624
|
onBlur: function onBlur(e) {
|
|
2709
|
-
|
|
2625
|
+
_this16.$emit('blur', e, _this16.triggerQuery);
|
|
2710
2626
|
},
|
|
2711
|
-
onFocus:
|
|
2627
|
+
onFocus: _this16.handleFocus,
|
|
2712
2628
|
onKeyPress: function onKeyPress(e) {
|
|
2713
|
-
|
|
2714
|
-
|
|
2629
|
+
_this16.$emit('keyPress', e, _this16.triggerQuery);
|
|
2630
|
+
_this16.$emit('key-press', e, _this16.triggerQuery);
|
|
2715
2631
|
},
|
|
2716
2632
|
onKeyDown: function onKeyDown(e) {
|
|
2717
|
-
return
|
|
2633
|
+
return _this16.handleKeyDown(e, highlightedIndex);
|
|
2718
2634
|
},
|
|
2719
2635
|
onKeyUp: function onKeyUp(e) {
|
|
2720
|
-
|
|
2721
|
-
|
|
2636
|
+
_this16.$emit('keyUp', e, _this16.triggerQuery);
|
|
2637
|
+
_this16.$emit('key-up', e, _this16.triggerQuery);
|
|
2722
2638
|
},
|
|
2723
2639
|
onClick: function onClick() {
|
|
2724
2640
|
setHighlightedIndex(null);
|
|
2725
2641
|
}
|
|
2726
2642
|
})), {
|
|
2727
2643
|
"searchBox": true,
|
|
2728
|
-
"isOpen":
|
|
2729
|
-
"id":
|
|
2730
|
-
"ref":
|
|
2731
|
-
"class": getClassName$1(
|
|
2732
|
-
"placeholder":
|
|
2733
|
-
"autoFocus":
|
|
2644
|
+
"isOpen": _this16.$data.isOpen,
|
|
2645
|
+
"id": _this16.$props.componentId + "-input",
|
|
2646
|
+
"ref": _this16.$props.innerRef,
|
|
2647
|
+
"class": getClassName$1(_this16.$props.innerClass, 'input'),
|
|
2648
|
+
"placeholder": _this16.$props.placeholder,
|
|
2649
|
+
"autoFocus": _this16.$props.autoFocus
|
|
2734
2650
|
}, getInputProps({
|
|
2735
|
-
value:
|
|
2651
|
+
value: _this16.$data.currentValue === null ? '' : _this16.$data.currentValue
|
|
2736
2652
|
}), {
|
|
2737
|
-
"themePreset":
|
|
2653
|
+
"themePreset": _this16.themePreset,
|
|
2738
2654
|
"autocomplete": "off"
|
|
2739
2655
|
}), null), !expandSuggestionsContainer && renderSuggestionsDropdown()];
|
|
2740
2656
|
}
|
|
2741
2657
|
}), vue.createVNode(Input.Actions, null, {
|
|
2742
2658
|
"default": function _default() {
|
|
2743
|
-
return [
|
|
2659
|
+
return [_this16.renderRightIcons(), _this16.renderInputAddonAfter(), _this16.renderAskButtonElement(), _this16.renderEnterButtonElement()];
|
|
2744
2660
|
}
|
|
2745
2661
|
})];
|
|
2746
2662
|
}
|
|
2747
|
-
}), expandSuggestionsContainer && renderSuggestionsDropdown(),
|
|
2663
|
+
}), expandSuggestionsContainer && renderSuggestionsDropdown(), _this16.renderTags()]);
|
|
2748
2664
|
}
|
|
2749
2665
|
}) : vue.createVNode("div", {
|
|
2750
2666
|
"class": Input.suggestionsContainer
|
|
@@ -2755,43 +2671,43 @@ var SearchBox = vue.defineComponent({
|
|
|
2755
2671
|
"default": function _default() {
|
|
2756
2672
|
return [vue.createVNode(Input.Actions, null, {
|
|
2757
2673
|
"default": function _default() {
|
|
2758
|
-
return [
|
|
2674
|
+
return [_this16.renderInputAddonBefore(), _this16.renderLeftIcons()];
|
|
2759
2675
|
}
|
|
2760
2676
|
}), vue.createVNode(DropDown.InputWrapper, null, {
|
|
2761
2677
|
"default": function _default() {
|
|
2762
2678
|
return [vue.createVNode(Input.TextArea, vue.mergeProps(_transformOn({
|
|
2763
2679
|
blur: function blur(e) {
|
|
2764
|
-
|
|
2680
|
+
_this16.$emit('blur', e, _this16.triggerQuery);
|
|
2765
2681
|
},
|
|
2766
2682
|
keypress: function keypress(e) {
|
|
2767
|
-
|
|
2768
|
-
|
|
2683
|
+
_this16.$emit('keyPress', e, _this16.triggerQuery);
|
|
2684
|
+
_this16.$emit('key-press', e, _this16.triggerQuery);
|
|
2769
2685
|
},
|
|
2770
|
-
input:
|
|
2686
|
+
input: _this16.onInputChange,
|
|
2771
2687
|
focus: function focus(e) {
|
|
2772
|
-
|
|
2688
|
+
_this16.$emit('focus', e, _this16.triggerQuery);
|
|
2773
2689
|
},
|
|
2774
|
-
keydown:
|
|
2690
|
+
keydown: _this16.handleKeyDown,
|
|
2775
2691
|
keyup: function keyup(e) {
|
|
2776
|
-
|
|
2777
|
-
|
|
2692
|
+
_this16.$emit('keyUp', e, _this16.triggerQuery);
|
|
2693
|
+
_this16.$emit('key-up', e, _this16.triggerQuery);
|
|
2778
2694
|
}
|
|
2779
2695
|
}), {
|
|
2780
2696
|
"searchBox": true,
|
|
2781
|
-
"class": getClassName$1(
|
|
2782
|
-
"placeholder":
|
|
2783
|
-
"autofocus":
|
|
2784
|
-
"value":
|
|
2785
|
-
"iconPosition":
|
|
2786
|
-
"showIcon":
|
|
2787
|
-
"showClear":
|
|
2788
|
-
"ref":
|
|
2789
|
-
"themePreset":
|
|
2697
|
+
"class": getClassName$1(_this16.$props.innerClass, 'input') || '',
|
|
2698
|
+
"placeholder": _this16.$props.placeholder,
|
|
2699
|
+
"autofocus": _this16.$props.autoFocus,
|
|
2700
|
+
"value": _this16.$data.currentValue ? _this16.$data.currentValue : '',
|
|
2701
|
+
"iconPosition": _this16.$props.iconPosition,
|
|
2702
|
+
"showIcon": _this16.$props.showIcon,
|
|
2703
|
+
"showClear": _this16.$props.showClear,
|
|
2704
|
+
"ref": _this16.$props.innerRef,
|
|
2705
|
+
"themePreset": _this16.themePreset
|
|
2790
2706
|
}), null)];
|
|
2791
2707
|
}
|
|
2792
2708
|
}), vue.createVNode(Input.Actions, null, {
|
|
2793
2709
|
"default": function _default() {
|
|
2794
|
-
return [
|
|
2710
|
+
return [_this16.renderRightIcons(), _this16.renderInputAddonAfter(), _this16.renderEnterButtonElement()];
|
|
2795
2711
|
}
|
|
2796
2712
|
})];
|
|
2797
2713
|
}
|