@appbaseio/reactivesearch-vue 3.0.6 → 3.1.0-alpha.1

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.
@@ -97,7 +97,30 @@ var SuggestionItem = {
97
97
  name: 'SuggestionItem',
98
98
  props: {
99
99
  currentValue: types.string,
100
- suggestion: types.any
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();
101
124
  },
102
125
  render: function render() {
103
126
  var _this = this;
@@ -113,7 +136,11 @@ var SuggestionItem = {
113
136
  if (label) {
114
137
  // label has highest precedence
115
138
  return typeof label === 'string' ? createVNode("div", {
116
- "class": "trim"
139
+ "ref": "container",
140
+ "class": "trim",
141
+ "title": this.isOverflowing ? label : ''
142
+ }, [createVNode("div", {
143
+ "ref": "content"
117
144
  }, [(_category ? false : isPredictiveSuggestion
118
145
  // eslint-disable-next-line
119
146
  || !!_suggestion_type) ? createVNode(PredictiveSuggestion, {
@@ -123,7 +150,7 @@ var SuggestionItem = {
123
150
  "textToHighlight": label,
124
151
  "autoEscape": true,
125
152
  "highlightStyle": highlightStyle
126
- }, null)]) : label;
153
+ }, null)])]) : label;
127
154
  }
128
155
  if (title || image || description) {
129
156
  return createVNode(Flex, {
@@ -1074,6 +1101,42 @@ var AIFeedback = defineComponent({
1074
1101
  }
1075
1102
  });
1076
1103
 
1104
+ // eslint-disable-next-line import/prefer-default-export
1105
+ var innerText = function innerText(jsx) {
1106
+ // Empty
1107
+ if (jsx === null || typeof jsx === 'boolean' || typeof jsx === 'undefined') {
1108
+ return '';
1109
+ }
1110
+
1111
+ // Numeric children.
1112
+ if (typeof jsx === 'number') {
1113
+ return jsx.toString();
1114
+ }
1115
+
1116
+ // String literals.
1117
+ if (typeof jsx === 'string') {
1118
+ return jsx;
1119
+ }
1120
+
1121
+ // Array of JSX.
1122
+ if (Array.isArray(jsx)) {
1123
+ // eslint-disable-next-line no-use-before-define
1124
+ return jsx.reduce(reduceJsxToString, '');
1125
+ }
1126
+
1127
+ // Children prop.
1128
+ if (Object.prototype.hasOwnProperty.call(jsx, 'children')) {
1129
+ return innerText(jsx.children);
1130
+ }
1131
+
1132
+ // Default
1133
+ return '';
1134
+ };
1135
+ innerText["default"] = innerText;
1136
+ function reduceJsxToString(previous, current) {
1137
+ return previous + innerText(current);
1138
+ }
1139
+
1077
1140
  var _excluded = ["_source"];
1078
1141
  function _isSlot(s) {
1079
1142
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !isVNode(s);
@@ -1167,6 +1230,7 @@ var SearchBox = defineComponent({
1167
1230
  return this.faqAnswer || this.AIResponse && this.AIResponse.response && this.AIResponse.response.answer && this.AIResponse.response.answer.text;
1168
1231
  },
1169
1232
  parsedSuggestions: function parsedSuggestions() {
1233
+ var _this = this;
1170
1234
  var suggestionsArray = [];
1171
1235
  if (Array.isArray(this.suggestions) && this.suggestions.length) {
1172
1236
  suggestionsArray = [].concat(withClickIds(this.suggestions));
@@ -1185,6 +1249,20 @@ var SearchBox = defineComponent({
1185
1249
  return _extends({}, s, {
1186
1250
  sectionId: s._suggestion_type
1187
1251
  });
1252
+ }).map(function (suggestion) {
1253
+ if (suggestion._suggestion_type === 'document') {
1254
+ // Document suggestions don't have a meaningful label and value
1255
+ var newSuggestion = _extends({}, suggestion);
1256
+ newSuggestion.label = 'For recent document suggestion, please implement a renderItem method to display label.';
1257
+ var renderItem = _this.$slots.renderItem || _this.$props.renderItem;
1258
+ if (typeof renderItem === 'function') {
1259
+ var jsxEl = renderItem(newSuggestion);
1260
+ var innerValue = innerText(jsxEl);
1261
+ newSuggestion.value = xss(innerValue);
1262
+ }
1263
+ return newSuggestion;
1264
+ }
1265
+ return suggestion;
1188
1266
  });
1189
1267
  var sectionsAccumulated = [];
1190
1268
  var sectionisedSuggestions = suggestionsArray.reduce(function (acc, d, currentIndex) {
@@ -1233,6 +1311,12 @@ var SearchBox = defineComponent({
1233
1311
  enablePopularSuggestions: VueTypes.bool.def(false),
1234
1312
  enableRecentSuggestions: VueTypes.bool.def(false),
1235
1313
  enableFAQSuggestions: VueTypes.bool.def(false),
1314
+ enableDocumentSuggestions: VueTypes.bool.def(false),
1315
+ documentSuggestionsConfig: VueTypes.shape({
1316
+ size: VueTypes.number,
1317
+ from: VueTypes.number,
1318
+ maxChars: VueTypes.number
1319
+ }),
1236
1320
  FAQSuggestionsConfig: VueTypes.shape({
1237
1321
  sectionLabel: VueTypes.string,
1238
1322
  size: VueTypes.number
@@ -1301,20 +1385,20 @@ var SearchBox = defineComponent({
1301
1385
  AIUIConfig: types.AIUIConfig
1302
1386
  },
1303
1387
  mounted: function mounted() {
1304
- var _this = this;
1388
+ var _this2 = this;
1305
1389
  this.listenForFocusShortcuts();
1306
1390
  var dropdownEle = this.$refs[_dropdownULRef];
1307
1391
  if (dropdownEle) {
1308
1392
  var handleScroll = function handleScroll() {
1309
1393
  var scrollTop = dropdownEle.scrollTop;
1310
- _this.lastScrollTop = scrollTop;
1311
- if (scrollTop < _this.lastScrollTop) {
1394
+ _this2.lastScrollTop = scrollTop;
1395
+ if (scrollTop < _this2.lastScrollTop) {
1312
1396
  // User is scrolling up
1313
- clearInterval(_this.scrollTimerRef);
1314
- _this.isUserScrolling = true;
1397
+ clearInterval(_this2.scrollTimerRef);
1398
+ _this2.isUserScrolling = true;
1315
1399
  }
1316
1400
  // Update lastScrollTop with the current scroll position
1317
- _this.lastScrollTop = scrollTop;
1401
+ _this2.lastScrollTop = scrollTop;
1318
1402
  };
1319
1403
  dropdownEle.addEventListener('scroll', handleScroll);
1320
1404
  }
@@ -1453,10 +1537,10 @@ var SearchBox = defineComponent({
1453
1537
  }
1454
1538
  },
1455
1539
  isAITyping: function isAITyping(newVal, oldVal) {
1456
- var _this2 = this;
1540
+ var _this3 = this;
1457
1541
  var scrollAIContainer = function scrollAIContainer() {
1458
- if (_this2.isUserScrolling) return;
1459
- var dropdownEle = _this2.$refs[_dropdownULRef];
1542
+ if (_this3.isUserScrolling) return;
1543
+ var dropdownEle = _this3.$refs[_dropdownULRef];
1460
1544
  if (dropdownEle) {
1461
1545
  dropdownEle.scrollTo({
1462
1546
  top: dropdownEle.scrollHeight,
@@ -1566,7 +1650,7 @@ var SearchBox = defineComponent({
1566
1650
  }
1567
1651
  },
1568
1652
  setValue: function setValue(value, isDefaultValue, props, cause, toggleIsOpen, categoryValue, shouldExecuteQuery) {
1569
- var _this3 = this;
1653
+ var _this4 = this;
1570
1654
  if (isDefaultValue === void 0) {
1571
1655
  isDefaultValue = false;
1572
1656
  }
@@ -1583,65 +1667,65 @@ var SearchBox = defineComponent({
1583
1667
  shouldExecuteQuery = true;
1584
1668
  }
1585
1669
  var performUpdate = function performUpdate() {
1586
- if (_this3.$options.isTagsMode && isEqual(value, _this3.selectedTags)) {
1670
+ if (_this4.$options.isTagsMode && isEqual(value, _this4.selectedTags)) {
1587
1671
  return;
1588
1672
  }
1589
- if (_this3.$options.isTagsMode && cause === causes.SUGGESTION_SELECT) {
1590
- if (Array.isArray(_this3.selectedTags) && _this3.selectedTags.length) {
1673
+ if (_this4.$options.isTagsMode && cause === causes.SUGGESTION_SELECT) {
1674
+ if (Array.isArray(_this4.selectedTags) && _this4.selectedTags.length) {
1591
1675
  // check if value already present in selectedTags
1592
- if (typeof value === 'string' && _this3.selectedTags.includes(value)) {
1593
- _this3.isOpen = false;
1676
+ if (typeof value === 'string' && _this4.selectedTags.includes(value)) {
1677
+ _this4.isOpen = false;
1594
1678
  return;
1595
1679
  }
1596
- _this3.selectedTags = [].concat(_this3.selectedTags);
1680
+ _this4.selectedTags = [].concat(_this4.selectedTags);
1597
1681
  if (typeof value === 'string' && !!value) {
1598
- _this3.selectedTags.push(value);
1599
- } else if (Array.isArray(value) && !isEqual(_this3.selectedTags, value)) {
1600
- _this3.selectedTags = value;
1682
+ _this4.selectedTags.push(value);
1683
+ } else if (Array.isArray(value) && !isEqual(_this4.selectedTags, value)) {
1684
+ _this4.selectedTags = value;
1601
1685
  }
1602
1686
  } else if (value) {
1603
- _this3.selectedTags = typeof value !== 'string' ? value : [].concat(value);
1687
+ _this4.selectedTags = typeof value !== 'string' ? value : [].concat(value);
1604
1688
  }
1605
- _this3.currentValue = '';
1689
+ _this4.currentValue = '';
1606
1690
  } else {
1607
- _this3.currentValue = decodeHtml(value);
1691
+ _this4.currentValue = decodeHtml(value);
1608
1692
  }
1609
1693
  var queryHandlerValue = value;
1610
- if (_this3.$options.isTagsMode && cause === causes.SUGGESTION_SELECT) {
1611
- queryHandlerValue = Array.isArray(_this3.selectedTags) && _this3.selectedTags.length ? _this3.selectedTags : undefined;
1694
+ if (_this4.$options.isTagsMode && cause === causes.SUGGESTION_SELECT) {
1695
+ queryHandlerValue = Array.isArray(_this4.selectedTags) && _this4.selectedTags.length ? _this4.selectedTags : undefined;
1612
1696
  }
1613
- if ((_this3.faqAnswer || _this3.faqQuestion) && value === '') {
1697
+ if ((_this4.faqAnswer || _this4.faqQuestion) && value === '') {
1614
1698
  // Empty the previous state
1615
- _this3.faqAnswer = '';
1616
- _this3.faqQuestion = '';
1617
- _this3.showAIScreen = false;
1699
+ _this4.faqAnswer = '';
1700
+ _this4.faqQuestion = '';
1701
+ _this4.showAIScreen = false;
1618
1702
  }
1619
1703
  if (isDefaultValue) {
1620
- if (_this3.$props.autosuggest) {
1704
+ if (_this4.$props.autosuggest) {
1621
1705
  if (toggleIsOpen) {
1622
- _this3.isOpen = false;
1706
+ _this4.isOpen = false;
1623
1707
  }
1624
- if (typeof _this3.currentValue === 'string') _this3.triggerDefaultQuery(_this3.currentValue, props.enableAI && _this3.currentTriggerMode === AI_TRIGGER_MODES.QUESTION && _this3.currentValue.endsWith('?') ? {
1708
+ if (typeof _this4.currentValue === 'string') _this4.triggerDefaultQuery(_this4.currentValue, props.enableAI && _this4.currentTriggerMode === AI_TRIGGER_MODES.QUESTION && _this4.currentValue.endsWith('?') ? {
1625
1709
  enableAI: true
1626
1710
  } : {}, shouldExecuteQuery);
1627
1711
  } // in case of strict selection only SUGGESTION_SELECT should be able
1628
1712
  // to set the query otherwise the value should reset
1629
1713
  if (props.strictSelection) {
1630
- if (cause === causes.SUGGESTION_SELECT || (_this3.$options.isTagsMode ? _this3.selectedTags.length === 0 : value === '')) {
1631
- _this3.triggerCustomQuery(queryHandlerValue, _this3.$options.isTagsMode ? undefined : categoryValue, shouldExecuteQuery);
1714
+ if (cause === causes.SUGGESTION_SELECT || (_this4.$options.isTagsMode ? _this4.selectedTags.length === 0 : value === '')) {
1715
+ _this4.triggerCustomQuery(queryHandlerValue, _this4.$options.isTagsMode ? undefined : categoryValue, shouldExecuteQuery);
1632
1716
  } else {
1633
- _this3.setValue('', true);
1717
+ _this4.setValue('', true);
1634
1718
  }
1635
1719
  } else if (props.value === undefined || cause === causes.SUGGESTION_SELECT || cause === causes.CLEAR_VALUE) {
1636
- _this3.showAIScreen = false;
1637
- _this3.triggerCustomQuery(queryHandlerValue, _this3.$options.isTagsMode ? undefined : categoryValue, shouldExecuteQuery);
1720
+ _this4.showAIScreen = false;
1721
+ _this4.triggerCustomQuery(queryHandlerValue, _this4.$options.isTagsMode ? undefined : categoryValue, shouldExecuteQuery);
1638
1722
  }
1639
1723
  } else {
1640
1724
  // debounce for handling text while typing
1641
- _this3.handleTextChange(value, cause);
1725
+ _this4.handleTextChange(value, cause);
1642
1726
  }
1643
- _this3.$emit('valueChange', value);
1644
- _this3.$emit('value-change', value);
1727
+ _this4.$emit('valueChange', value);
1728
+ _this4.$emit('value-change', value);
1645
1729
  };
1646
1730
  checkValueChange(props.componentId, value, props.beforeValueChange, performUpdate);
1647
1731
  },
@@ -1790,7 +1874,7 @@ var SearchBox = defineComponent({
1790
1874
  this.$emit('key-down', event, this.triggerQuery);
1791
1875
  },
1792
1876
  onInputChange: function onInputChange(e) {
1793
- var _this4 = this;
1877
+ var _this5 = this;
1794
1878
  var inputValue = e.target.value;
1795
1879
  if (!this.$data.isOpen && this.$props.autosuggest) {
1796
1880
  this.isOpen = true;
@@ -1804,7 +1888,7 @@ var SearchBox = defineComponent({
1804
1888
  } else {
1805
1889
  this.$emit('change', inputValue, function (_ref3) {
1806
1890
  var isOpen = _ref3.isOpen;
1807
- return _this4.triggerQuery({
1891
+ return _this5.triggerQuery({
1808
1892
  defaultQuery: true,
1809
1893
  customQuery: true,
1810
1894
  value: inputValue,
@@ -1848,7 +1932,7 @@ var SearchBox = defineComponent({
1848
1932
  }
1849
1933
  },
1850
1934
  onSuggestionSelected: function onSuggestionSelected(suggestion) {
1851
- var _this5 = this;
1935
+ var _this6 = this;
1852
1936
  var value = this.$props.value;
1853
1937
  // The state of the suggestion is open by the time it reaches here. i.e. isOpen = true
1854
1938
  // handle when FAQ suggestion is clicked
@@ -1897,10 +1981,10 @@ var SearchBox = defineComponent({
1897
1981
  this.setValue(emitValue, true, this.$props, causes.SUGGESTION_SELECT, false, suggestion._category);
1898
1982
  this.$emit('change', emitValue, function (_ref4) {
1899
1983
  var isOpen = _ref4.isOpen;
1900
- return _this5.triggerQuery(_extends({
1984
+ return _this6.triggerQuery(_extends({
1901
1985
  isOpen: isOpen,
1902
1986
  value: emitValue
1903
- }, !_this5.$options.isTagsMode && {
1987
+ }, !_this6.$options.isTagsMode && {
1904
1988
  categoryValue: suggestion._category
1905
1989
  }));
1906
1990
  });
@@ -1940,7 +2024,7 @@ var SearchBox = defineComponent({
1940
2024
  return null;
1941
2025
  },
1942
2026
  renderErrorComponent: function renderErrorComponent(isAIError) {
1943
- var _this6 = this;
2027
+ var _this7 = this;
1944
2028
  if (isAIError === void 0) {
1945
2029
  isAIError = false;
1946
2030
  }
@@ -1967,7 +2051,7 @@ var SearchBox = defineComponent({
1967
2051
  "themePreset": this.themePreset
1968
2052
  }, {
1969
2053
  "default": function _default() {
1970
- return [isFunction(renderError) ? renderError(_this6.error) : renderError];
2054
+ return [isFunction(renderError) ? renderError(_this7.error) : renderError];
1971
2055
  }
1972
2056
  });
1973
2057
  }
@@ -2047,7 +2131,7 @@ var SearchBox = defineComponent({
2047
2131
  });
2048
2132
  },
2049
2133
  renderEnterButtonElement: function renderEnterButtonElement() {
2050
- var _this7 = this;
2134
+ var _this8 = this;
2051
2135
  var _this$$props2 = this.$props,
2052
2136
  enterButton = _this$$props2.enterButton,
2053
2137
  innerClass = _this$$props2.innerClass;
@@ -2055,12 +2139,12 @@ var SearchBox = defineComponent({
2055
2139
  if (enterButton) {
2056
2140
  var getEnterButtonMarkup = function getEnterButtonMarkup() {
2057
2141
  if (renderEnterButton) {
2058
- return renderEnterButton(_this7.enterButtonOnClick);
2142
+ return renderEnterButton(_this8.enterButtonOnClick);
2059
2143
  }
2060
2144
  return createVNode(Button, {
2061
2145
  "class": "enter-btn " + getClassName$1(innerClass, 'enter-button'),
2062
2146
  "primary": true,
2063
- "onClick": _this7.enterButtonOnClick
2147
+ "onClick": _this8.enterButtonOnClick
2064
2148
  }, {
2065
2149
  "default": function _default() {
2066
2150
  return [createTextVNode("Search")];
@@ -2086,7 +2170,7 @@ var SearchBox = defineComponent({
2086
2170
  return '/';
2087
2171
  },
2088
2172
  renderLeftIcons: function renderLeftIcons() {
2089
- var _this8 = this;
2173
+ var _this9 = this;
2090
2174
  var _slot3;
2091
2175
  var _this$$props3 = this.$props,
2092
2176
  iconPosition = _this$$props3.iconPosition,
@@ -2096,8 +2180,8 @@ var SearchBox = defineComponent({
2096
2180
  }, {
2097
2181
  "default": function _default() {
2098
2182
  return [iconPosition === 'left' && showIcon && createVNode(IconWrapper, {
2099
- "onClick": _this8.handleSearchIconClick
2100
- }, _isSlot(_slot3 = _this8.renderIcon()) ? _slot3 : {
2183
+ "onClick": _this9.handleSearchIconClick
2184
+ }, _isSlot(_slot3 = _this9.renderIcon()) ? _slot3 : {
2101
2185
  "default": function _default() {
2102
2186
  return [_slot3];
2103
2187
  }
@@ -2106,7 +2190,7 @@ var SearchBox = defineComponent({
2106
2190
  })]);
2107
2191
  },
2108
2192
  renderRightIcons: function renderRightIcons() {
2109
- var _this9 = this;
2193
+ var _this10 = this;
2110
2194
  var _slot4, _slot5, _slot6;
2111
2195
  var _this$$props4 = this.$props,
2112
2196
  iconPosition = _this$$props4.iconPosition,
@@ -2123,29 +2207,29 @@ var SearchBox = defineComponent({
2123
2207
  }, {
2124
2208
  "default": function _default() {
2125
2209
  return [currentValue && showClear && createVNode(IconWrapper, {
2126
- "onClick": _this9.clearValue,
2210
+ "onClick": _this10.clearValue,
2127
2211
  "showIcon": showIcon,
2128
2212
  "isClearIcon": true
2129
- }, _isSlot(_slot4 = _this9.renderCancelIcon()) ? _slot4 : {
2213
+ }, _isSlot(_slot4 = _this10.renderCancelIcon()) ? _slot4 : {
2130
2214
  "default": function _default() {
2131
2215
  return [_slot4];
2132
2216
  }
2133
2217
  }), showFocusShortcutsIcon && createVNode(ButtonIconWrapper, {
2134
2218
  "onClick": function onClick(e) {
2135
- return _this9.focusSearchBox(e);
2219
+ return _this10.focusSearchBox(e);
2136
2220
  }
2137
- }, _isSlot(_slot5 = _this9.renderShortcut()) ? _slot5 : {
2221
+ }, _isSlot(_slot5 = _this10.renderShortcut()) ? _slot5 : {
2138
2222
  "default": function _default() {
2139
2223
  return [_slot5];
2140
2224
  }
2141
2225
  }), showVoiceSearch && createVNode(Mic, {
2142
2226
  "getInstance": getMicInstance,
2143
2227
  "render": renderMic,
2144
- "handleResult": _this9.handleVoiceResults,
2228
+ "handleResult": _this10.handleVoiceResults,
2145
2229
  "className": getClassName$1(innerClass, 'mic') || null
2146
2230
  }, null), iconPosition === 'right' && showIcon && createVNode(IconWrapper, {
2147
- "onClick": _this9.handleSearchIconClick
2148
- }, _isSlot(_slot6 = _this9.renderIcon()) ? _slot6 : {
2231
+ "onClick": _this10.handleSearchIconClick
2232
+ }, _isSlot(_slot6 = _this10.renderIcon()) ? _slot6 : {
2149
2233
  "default": function _default() {
2150
2234
  return [_slot6];
2151
2235
  }
@@ -2164,7 +2248,7 @@ var SearchBox = defineComponent({
2164
2248
  (_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
2165
2249
  },
2166
2250
  listenForFocusShortcuts: function listenForFocusShortcuts() {
2167
- var _this10 = this;
2251
+ var _this11 = this;
2168
2252
  var _this$$props$focusSho = this.$props.focusShortcuts,
2169
2253
  focusShortcuts = _this$$props$focusSho === void 0 ? ['/'] : _this$$props$focusSho;
2170
2254
  if (isEmpty(focusShortcuts)) {
@@ -2179,7 +2263,7 @@ var SearchBox = defineComponent({
2179
2263
  function (event, handler) {
2180
2264
  // Prevent the default refresh event under WINDOWS system
2181
2265
  event.preventDefault();
2182
- _this10.focusSearchBox(event);
2266
+ _this11.focusSearchBox(event);
2183
2267
  });
2184
2268
 
2185
2269
  // if one of modifier keys are used, they are handled below
@@ -2189,7 +2273,7 @@ var SearchBox = defineComponent({
2189
2273
  for (var index = 0; index < modifierKeys.length; index += 1) {
2190
2274
  var element = modifierKeys[index];
2191
2275
  if (hotkeys[element]) {
2192
- _this10.focusSearchBox(event);
2276
+ _this11.focusSearchBox(event);
2193
2277
  break;
2194
2278
  }
2195
2279
  }
@@ -2202,10 +2286,10 @@ var SearchBox = defineComponent({
2202
2286
  this.triggerDefaultQuery(value);
2203
2287
  },
2204
2288
  renderActionIcon: function renderActionIcon(suggestion) {
2205
- var _this11 = this;
2289
+ var _this12 = this;
2206
2290
  var handleAutoFillClick = function handleAutoFillClick(e) {
2207
2291
  e.stopPropagation();
2208
- _this11.onAutofillClick(suggestion);
2292
+ _this12.onAutofillClick(suggestion);
2209
2293
  };
2210
2294
  if (suggestion._suggestion_type === suggestionTypes.Featured) {
2211
2295
  if (suggestion.action === featuredSuggestionsActionTypes.FUNCTION) {
@@ -2228,7 +2312,7 @@ var SearchBox = defineComponent({
2228
2312
  return null;
2229
2313
  },
2230
2314
  renderTag: function renderTag(item) {
2231
- var _this12 = this;
2315
+ var _this13 = this;
2232
2316
  var innerClass = this.$props.innerClass;
2233
2317
  return createVNode(TagItem, {
2234
2318
  "class": getClassName$1(innerClass, 'selected-tag') || ''
@@ -2239,7 +2323,7 @@ var SearchBox = defineComponent({
2239
2323
  "aria-label": "delete-tag",
2240
2324
  "class": "close-icon",
2241
2325
  "onClick": function onClick() {
2242
- return _this12.clearTag(item);
2326
+ return _this13.clearTag(item);
2243
2327
  }
2244
2328
  }, [createVNode(CancelSvg, null, null)])];
2245
2329
  }
@@ -2262,7 +2346,7 @@ var SearchBox = defineComponent({
2262
2346
  }
2263
2347
  },
2264
2348
  renderTags: function renderTags() {
2265
- var _this13 = this;
2349
+ var _this14 = this;
2266
2350
  if (!Array.isArray(this.selectedTags)) {
2267
2351
  return null;
2268
2352
  }
@@ -2276,16 +2360,16 @@ var SearchBox = defineComponent({
2276
2360
  }) : createVNode(TagsContainer, null, {
2277
2361
  "default": function _default() {
2278
2362
  return [tagsList.map(function (item) {
2279
- return _this13.renderTag(item);
2363
+ return _this14.renderTag(item);
2280
2364
  }), shouldRenderClearAllTag && createVNode(TagItem, {
2281
- "class": getClassName$1(_this13.$props.innerClass, 'selected-tag') || ''
2365
+ "class": getClassName$1(_this14.$props.innerClass, 'selected-tag') || ''
2282
2366
  }, {
2283
2367
  "default": function _default() {
2284
2368
  return [createVNode("span", null, [createTextVNode("Clear All")]), createVNode("span", {
2285
2369
  "role": "img",
2286
2370
  "aria-label": "delete-tag",
2287
2371
  "class": "close-icon",
2288
- "onClick": _this13.clearAllTags
2372
+ "onClick": _this14.clearAllTags
2289
2373
  }, [createVNode(CancelSvg, null, null)])];
2290
2374
  }
2291
2375
  })];
@@ -2293,13 +2377,13 @@ var SearchBox = defineComponent({
2293
2377
  });
2294
2378
  },
2295
2379
  getAISourceObjects: function getAISourceObjects() {
2296
- var _this14 = this;
2380
+ var _this15 = this;
2297
2381
  var sourceObjects = [];
2298
2382
  if (!this.AIResponse) return sourceObjects;
2299
2383
  var docIds = this.AIResponse && this.AIResponse.response && this.AIResponse.response.answer && this.AIResponse.response.answer.documentIds || [];
2300
2384
  if (this.initialHits) {
2301
2385
  docIds.forEach(function (id) {
2302
- var foundSourceObj = _this14.initialHits.find(function (hit) {
2386
+ var foundSourceObj = _this15.initialHits.find(function (hit) {
2303
2387
  return hit._id === id;
2304
2388
  }) || {};
2305
2389
  if (foundSourceObj) {
@@ -2333,7 +2417,7 @@ var SearchBox = defineComponent({
2333
2417
  },
2334
2418
  renderAIScreenFooter: function renderAIScreenFooter() {
2335
2419
  var _slot8;
2336
- var _this15 = this;
2420
+ var _this16 = this;
2337
2421
  var _this$$props$AIUIConf2 = this.$props.AIUIConfig,
2338
2422
  AIUIConfig = _this$$props$AIUIConf2 === void 0 ? {} : _this$$props$AIUIConf2;
2339
2423
  var _ref6 = AIUIConfig || {},
@@ -2342,11 +2426,11 @@ var SearchBox = defineComponent({
2342
2426
  _ref6$onSourceClick = _ref6.onSourceClick,
2343
2427
  onSourceClick = _ref6$onSourceClick === void 0 ? function () {} : _ref6$onSourceClick;
2344
2428
  var renderSourceDocumentLabel = function renderSourceDocumentLabel(sourceObj) {
2345
- if (_this15.$props.AIUIConfig && _this15.$props.AIUIConfig.renderSourceDocument) {
2346
- return _this15.$props.AIUIConfig.renderSourceDocument(sourceObj);
2429
+ if (_this16.$props.AIUIConfig && _this16.$props.AIUIConfig.renderSourceDocument) {
2430
+ return _this16.$props.AIUIConfig.renderSourceDocument(sourceObj);
2347
2431
  }
2348
- if (_this15.$slots.renderSourceDocument) {
2349
- return _this15.$slots.renderSourceDocument(sourceObj);
2432
+ if (_this16.$slots.renderSourceDocument) {
2433
+ return _this16.$slots.renderSourceDocument(sourceObj);
2350
2434
  }
2351
2435
  return sourceObj._id;
2352
2436
  };
@@ -2354,10 +2438,10 @@ var SearchBox = defineComponent({
2354
2438
  "themePreset": this.$props.themePreset
2355
2439
  }, {
2356
2440
  "default": function _default() {
2357
- return [createTextVNode("Summary generated using the following sources:"), ' ', createVNode(SourceTags, null, _isSlot(_slot8 = _this15.getAISourceObjects().map(function (el) {
2441
+ return [createTextVNode("Summary generated using the following sources:"), ' ', createVNode(SourceTags, null, _isSlot(_slot8 = _this16.getAISourceObjects().map(function (el) {
2358
2442
  var _slot7;
2359
2443
  return createVNode(Button, {
2360
- "class": "--ai-source-tag " + (getClassName$1(_this15.$props.innerClass, 'ai-source-tag') || ''),
2444
+ "class": "--ai-source-tag " + (getClassName$1(_this16.$props.innerClass, 'ai-source-tag') || ''),
2361
2445
  "info": true,
2362
2446
  "onClick": function onClick() {
2363
2447
  return onSourceClick && onSourceClick(el);
@@ -2376,7 +2460,7 @@ var SearchBox = defineComponent({
2376
2460
  }) : null;
2377
2461
  },
2378
2462
  renderAIScreen: function renderAIScreen() {
2379
- var _this16 = this;
2463
+ var _this17 = this;
2380
2464
  var customAIRenderer = this.$props.renderAIAnswer || this.$slots.renderAIAnswer;
2381
2465
  if (customAIRenderer) {
2382
2466
  return customAIRenderer({
@@ -2400,11 +2484,11 @@ var SearchBox = defineComponent({
2400
2484
  "hideUI": this.isAIResponseLoading || this.isLoading || !this.sessionIdFromStore,
2401
2485
  "key": this.sessionIdFromStore,
2402
2486
  "onFeedbackSubmit": function onFeedbackSubmit(useful, reason) {
2403
- _this16.feedbackState = {
2487
+ _this17.feedbackState = {
2404
2488
  isRecorded: true,
2405
2489
  feedbackType: useful ? 'positive' : 'negative'
2406
2490
  };
2407
- _this16.recordAISessionUsefulness(_this16.sessionIdFromStore, {
2491
+ _this17.recordAISessionUsefulness(_this17.sessionIdFromStore, {
2408
2492
  useful: useful,
2409
2493
  reason: reason
2410
2494
  });
@@ -2439,7 +2523,7 @@ var SearchBox = defineComponent({
2439
2523
  });
2440
2524
  },
2441
2525
  renderAskButtonElement: function renderAskButtonElement() {
2442
- var _this17 = this;
2526
+ var _this18 = this;
2443
2527
  var _this$$props5 = this.$props,
2444
2528
  AIUIConfig = _this$$props5.AIUIConfig,
2445
2529
  innerClass = _this$$props5.innerClass;
@@ -2449,12 +2533,12 @@ var SearchBox = defineComponent({
2449
2533
  if (askButton) {
2450
2534
  var getEnterButtonMarkup = function getEnterButtonMarkup() {
2451
2535
  if (renderAskButton) {
2452
- return renderAskButton(_this17.askButtonOnClick);
2536
+ return renderAskButton(_this18.askButtonOnClick);
2453
2537
  }
2454
2538
  return createVNode(Button, {
2455
2539
  "class": "enter-btn " + getClassName$1(innerClass, 'ask-button'),
2456
2540
  "info": true,
2457
- "onClick": _this17.askButtonOnClick
2541
+ "onClick": _this18.askButtonOnClick
2458
2542
  }, {
2459
2543
  "default": function _default() {
2460
2544
  return [createTextVNode("Ask")];
@@ -2469,7 +2553,7 @@ var SearchBox = defineComponent({
2469
2553
  }
2470
2554
  },
2471
2555
  render: function render() {
2472
- var _this18 = this;
2556
+ var _this19 = this;
2473
2557
  var expandSuggestionsContainer = this.$props.expandSuggestionsContainer;
2474
2558
  var _this$$slots = this.$slots,
2475
2559
  recentSearchesIcon = _this$$slots.recentSearchesIcon,
@@ -2480,17 +2564,17 @@ var SearchBox = defineComponent({
2480
2564
  "class": this.$props.className
2481
2565
  }, {
2482
2566
  "default": function _default() {
2483
- return [_this18.$props.title && createVNode(Title, {
2484
- "class": getClassName$1(_this18.$props.innerClass, 'title') || ''
2567
+ return [_this19.$props.title && createVNode(Title, {
2568
+ "class": getClassName$1(_this19.$props.innerClass, 'title') || ''
2485
2569
  }, {
2486
2570
  "default": function _default() {
2487
- return [_this18.$props.title];
2571
+ return [_this19.$props.title];
2488
2572
  }
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
2573
+ }), _this19.$props.autosuggest ? createVNode(Downshift, {
2574
+ "id": _this19.$props.componentId + "-downshift",
2575
+ "handleChange": _this19.onSuggestionSelected,
2576
+ "handleMouseup": _this19.handleStateChange,
2577
+ "isOpen": _this19.$data.isOpen
2494
2578
  }, {
2495
2579
  "default": function _default(_ref8) {
2496
2580
  var getInputEvents = _ref8.getInputEvents,
@@ -2546,21 +2630,21 @@ var SearchBox = defineComponent({
2546
2630
  }
2547
2631
  };
2548
2632
  var indexOffset = 0;
2549
- return createVNode("div", null, [_this18.hasCustomRenderer && _this18.getComponent({
2633
+ return createVNode("div", null, [_this19.hasCustomRenderer && _this19.getComponent({
2550
2634
  isOpen: isOpen,
2551
2635
  getItemProps: getItemProps,
2552
2636
  getItemEvents: getItemEvents,
2553
2637
  highlightedIndex: highlightedIndex
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",
2638
+ }), _this19.renderErrorComponent(), !_this19.hasCustomRenderer && isOpen && hasSuggestions ? createVNode("ul", {
2639
+ "class": suggestions(_this19.themePreset, _this19.theme) + " " + getClassName$1(_this19.$props.innerClass, 'list') + " " + searchboxSuggestions(_this19.themePreset, _this19.theme) + "\n\t\t\t\t\t\t\t\t\t\t\t\t\t",
2556
2640
  "ref": _dropdownULRef
2557
- }, [_this18.showAIScreen && createVNode(SearchBoxAISection, {
2558
- "themePreset": _this18.$props.themePreset
2641
+ }, [_this19.showAIScreen && createVNode(SearchBoxAISection, {
2642
+ "themePreset": _this19.$props.themePreset
2559
2643
  }, {
2560
2644
  "default": function _default() {
2561
- return [_this18.renderAIScreen(), ' ', _this18.renderErrorComponent(true)];
2645
+ return [_this19.renderAIScreen(), ' ', _this19.renderErrorComponent(true)];
2562
2646
  }
2563
- }), !_this18.showAIScreen && _this18.parsedSuggestions.map(function (item, itemIndex) {
2647
+ }), !_this19.showAIScreen && _this19.parsedSuggestions.map(function (item, itemIndex) {
2564
2648
  var index = indexOffset + itemIndex;
2565
2649
  if (Array.isArray(item)) {
2566
2650
  var sectionHtml = xss(item[0].sectionLabel);
@@ -2569,7 +2653,7 @@ var SearchBox = defineComponent({
2569
2653
  "key": "section-" + itemIndex,
2570
2654
  "class": "section-container"
2571
2655
  }, [sectionHtml ? createVNode("div", {
2572
- "class": "section-header " + getClassName$1(_this18.$props.innerClass, 'section-label'),
2656
+ "class": "section-header " + getClassName$1(_this19.$props.innerClass, 'section-label'),
2573
2657
  "key": "" + item[0].sectionId,
2574
2658
  "innerHTML": sectionHtml
2575
2659
  }, null) : null, createVNode("ul", {
@@ -2589,7 +2673,7 @@ var SearchBox = defineComponent({
2589
2673
  justifyContent: 'flex-start',
2590
2674
  alignItems: 'center'
2591
2675
  },
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'))
2676
+ "class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$1(_this19.$props.innerClass, 'active-suggestion-item') : "li-item " + getClassName$1(_this19.$props.innerClass, 'suggestion-item'))
2593
2677
  }), [renderItem(sectionItem)]);
2594
2678
  }
2595
2679
  if (sectionItem._suggestion_type === '_internal_a_i_trigger') {
@@ -2603,9 +2687,9 @@ var SearchBox = defineComponent({
2603
2687
  justifyContent: 'flex-start',
2604
2688
  alignItems: 'center'
2605
2689
  },
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'))
2690
+ "class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$1(_this19.$props.innerClass, 'active-suggestion-item') : "li-item " + getClassName$1(_this19.$props.innerClass, 'suggestion-item'))
2607
2691
  }), [createVNode(SuggestionItem, {
2608
- "currentValue": _this18.currentValue,
2692
+ "currentValue": _this19.currentValue,
2609
2693
  "suggestion": sectionItem
2610
2694
  }, null)]);
2611
2695
  }
@@ -2619,7 +2703,7 @@ var SearchBox = defineComponent({
2619
2703
  justifyContent: 'flex-start',
2620
2704
  alignItems: 'center'
2621
2705
  },
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'))
2706
+ "class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$1(_this19.$props.innerClass, 'active-suggestion-item') : "li-item " + getClassName$1(_this19.$props.innerClass, 'suggestion-item'))
2623
2707
  }), [createVNode("div", {
2624
2708
  "style": {
2625
2709
  padding: '0 10px 0 0',
@@ -2627,74 +2711,74 @@ var SearchBox = defineComponent({
2627
2711
  }
2628
2712
  }, [createVNode(CustomSvg, {
2629
2713
  "key": sectionItem._suggestion_type + "-" + sectionIndex,
2630
- "className": getClassName$1(_this18.$props.innerClass, sectionItem._suggestion_type + "-search-icon") || null,
2714
+ "className": getClassName$1(_this19.$props.innerClass, sectionItem._suggestion_type + "-search-icon") || null,
2631
2715
  "icon": getIcon(sectionItem._suggestion_type, sectionItem, suggestionsHaveIcon),
2632
2716
  "type": sectionItem._suggestion_type + "-search-icon"
2633
2717
  }, null)]), createVNode(SuggestionItem, {
2634
- "currentValue": _this18.currentValue,
2718
+ "currentValue": _this19.currentValue,
2635
2719
  "suggestion": sectionItem
2636
- }, null), _this18.renderActionIcon(sectionItem)]);
2720
+ }, null), _this19.renderActionIcon(sectionItem)]);
2637
2721
  })])]);
2638
2722
  }
2639
2723
  return createVNode("div", null, [createTextVNode("No suggestions")]);
2640
- }), !_this18.showAIScreen && _this18.parsedSuggestions.length && _this18.$props.showSuggestionsFooter ? _this18.suggestionsFooter() : null]) : _this18.renderNoSuggestions(_this18.normalizedSuggestions)]);
2724
+ }), !_this19.showAIScreen && _this19.parsedSuggestions.length && _this19.$props.showSuggestionsFooter ? _this19.suggestionsFooter() : null]) : _this19.renderNoSuggestions(_this19.normalizedSuggestions)]);
2641
2725
  };
2642
2726
  return createVNode("div", {
2643
2727
  "class": suggestionsContainer
2644
2728
  }, [createVNode(InputGroup, {
2645
2729
  "searchBox": true,
2646
2730
  "ref": _inputGroupRef,
2647
- "isOpen": _this18.$data.isOpen
2731
+ "isOpen": _this19.$data.isOpen
2648
2732
  }, {
2649
2733
  "default": function _default() {
2650
2734
  return [createVNode(Actions$1, null, {
2651
2735
  "default": function _default() {
2652
- return [_this18.renderInputAddonBefore(), _this18.renderLeftIcons()];
2736
+ return [_this19.renderInputAddonBefore(), _this19.renderLeftIcons()];
2653
2737
  }
2654
2738
  }), createVNode(InputWrapper, null, {
2655
2739
  "default": function _default() {
2656
2740
  return [createVNode(TextArea, mergeProps(_transformOn(getInputEvents({
2657
- onInput: _this18.onInputChange,
2741
+ onInput: _this19.onInputChange,
2658
2742
  onBlur: function onBlur(e) {
2659
- _this18.$emit('blur', e, _this18.triggerQuery);
2743
+ _this19.$emit('blur', e, _this19.triggerQuery);
2660
2744
  },
2661
- onFocus: _this18.handleFocus,
2745
+ onFocus: _this19.handleFocus,
2662
2746
  onKeyPress: function onKeyPress(e) {
2663
- _this18.$emit('keyPress', e, _this18.triggerQuery);
2664
- _this18.$emit('key-press', e, _this18.triggerQuery);
2747
+ _this19.$emit('keyPress', e, _this19.triggerQuery);
2748
+ _this19.$emit('key-press', e, _this19.triggerQuery);
2665
2749
  },
2666
2750
  onKeyDown: function onKeyDown(e) {
2667
- return _this18.handleKeyDown(e, highlightedIndex);
2751
+ return _this19.handleKeyDown(e, highlightedIndex);
2668
2752
  },
2669
2753
  onKeyUp: function onKeyUp(e) {
2670
- _this18.$emit('keyUp', e, _this18.triggerQuery);
2671
- _this18.$emit('key-up', e, _this18.triggerQuery);
2754
+ _this19.$emit('keyUp', e, _this19.triggerQuery);
2755
+ _this19.$emit('key-up', e, _this19.triggerQuery);
2672
2756
  },
2673
2757
  onClick: function onClick() {
2674
2758
  setHighlightedIndex(null);
2675
2759
  }
2676
2760
  })), {
2677
2761
  "searchBox": true,
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
2762
+ "isOpen": _this19.$data.isOpen,
2763
+ "id": _this19.$props.componentId + "-input",
2764
+ "ref": _this19.$props.innerRef,
2765
+ "class": getClassName$1(_this19.$props.innerClass, 'input'),
2766
+ "placeholder": _this19.$props.placeholder,
2767
+ "autoFocus": _this19.$props.autoFocus
2684
2768
  }, getInputProps({
2685
- value: _this18.$data.currentValue === null ? '' : _this18.$data.currentValue
2769
+ value: _this19.$data.currentValue === null ? '' : _this19.$data.currentValue
2686
2770
  }), {
2687
- "themePreset": _this18.themePreset,
2771
+ "themePreset": _this19.themePreset,
2688
2772
  "autocomplete": "off"
2689
2773
  }), null), !expandSuggestionsContainer && renderSuggestionsDropdown()];
2690
2774
  }
2691
2775
  }), createVNode(Actions$1, null, {
2692
2776
  "default": function _default() {
2693
- return [_this18.renderRightIcons(), _this18.renderInputAddonAfter(), _this18.renderAskButtonElement(), _this18.renderEnterButtonElement()];
2777
+ return [_this19.renderRightIcons(), _this19.renderInputAddonAfter(), _this19.renderAskButtonElement(), _this19.renderEnterButtonElement()];
2694
2778
  }
2695
2779
  })];
2696
2780
  }
2697
- }), expandSuggestionsContainer && renderSuggestionsDropdown(), _this18.renderTags()]);
2781
+ }), expandSuggestionsContainer && renderSuggestionsDropdown(), _this19.renderTags()]);
2698
2782
  }
2699
2783
  }) : createVNode("div", {
2700
2784
  "class": suggestionsContainer
@@ -2705,43 +2789,43 @@ var SearchBox = defineComponent({
2705
2789
  "default": function _default() {
2706
2790
  return [createVNode(Actions$1, null, {
2707
2791
  "default": function _default() {
2708
- return [_this18.renderInputAddonBefore(), _this18.renderLeftIcons()];
2792
+ return [_this19.renderInputAddonBefore(), _this19.renderLeftIcons()];
2709
2793
  }
2710
2794
  }), createVNode(InputWrapper, null, {
2711
2795
  "default": function _default() {
2712
2796
  return [createVNode(TextArea, mergeProps(_transformOn({
2713
2797
  blur: function blur(e) {
2714
- _this18.$emit('blur', e, _this18.triggerQuery);
2798
+ _this19.$emit('blur', e, _this19.triggerQuery);
2715
2799
  },
2716
2800
  keypress: function keypress(e) {
2717
- _this18.$emit('keyPress', e, _this18.triggerQuery);
2718
- _this18.$emit('key-press', e, _this18.triggerQuery);
2801
+ _this19.$emit('keyPress', e, _this19.triggerQuery);
2802
+ _this19.$emit('key-press', e, _this19.triggerQuery);
2719
2803
  },
2720
- input: _this18.onInputChange,
2804
+ input: _this19.onInputChange,
2721
2805
  focus: function focus(e) {
2722
- _this18.$emit('focus', e, _this18.triggerQuery);
2806
+ _this19.$emit('focus', e, _this19.triggerQuery);
2723
2807
  },
2724
- keydown: _this18.handleKeyDown,
2808
+ keydown: _this19.handleKeyDown,
2725
2809
  keyup: function keyup(e) {
2726
- _this18.$emit('keyUp', e, _this18.triggerQuery);
2727
- _this18.$emit('key-up', e, _this18.triggerQuery);
2810
+ _this19.$emit('keyUp', e, _this19.triggerQuery);
2811
+ _this19.$emit('key-up', e, _this19.triggerQuery);
2728
2812
  }
2729
2813
  }), {
2730
2814
  "searchBox": true,
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
2815
+ "class": getClassName$1(_this19.$props.innerClass, 'input') || '',
2816
+ "placeholder": _this19.$props.placeholder,
2817
+ "autofocus": _this19.$props.autoFocus,
2818
+ "value": _this19.$data.currentValue ? _this19.$data.currentValue : '',
2819
+ "iconPosition": _this19.$props.iconPosition,
2820
+ "showIcon": _this19.$props.showIcon,
2821
+ "showClear": _this19.$props.showClear,
2822
+ "ref": _this19.$props.innerRef,
2823
+ "themePreset": _this19.themePreset
2740
2824
  }), null)];
2741
2825
  }
2742
2826
  }), createVNode(Actions$1, null, {
2743
2827
  "default": function _default() {
2744
- return [_this18.renderRightIcons(), _this18.renderInputAddonAfter(), _this18.renderEnterButtonElement()];
2828
+ return [_this19.renderRightIcons(), _this19.renderInputAddonAfter(), _this19.renderEnterButtonElement()];
2745
2829
  }
2746
2830
  })];
2747
2831
  }