@appbaseio/reactivesearch-vue 3.0.3 → 3.0.5
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 +177 -159
- package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js +3 -3
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
- package/dist/cjs/{DropDown-26666911.js → DropDown-1532353d.js} +1 -1
- package/dist/cjs/{Input-3ecdb905.js → Input-4279b088.js} +2 -2
- package/dist/cjs/MultiDropdownList.js +2 -2
- package/dist/cjs/MultiList.js +1 -1
- package/dist/cjs/RangeInput.js +1 -1
- package/dist/cjs/SingleDropdownList.js +2 -2
- package/dist/cjs/SingleList.js +1 -1
- package/dist/cjs/index.js +3 -3
- package/dist/cjs/{install-aa24bd30.js → install-3b1b24b2.js} +176 -158
- package/dist/cjs/install.js +3 -3
- package/dist/cjs/version.js +1 -1
- package/dist/es/{DropDown-48045fde.js → DropDown-6d1dddde.js} +1 -1
- package/dist/es/{Input-83dee8c5.js → Input-1f6207bc.js} +2 -2
- package/dist/es/MultiDropdownList.js +2 -2
- package/dist/es/MultiList.js +1 -1
- package/dist/es/RangeInput.js +1 -1
- package/dist/es/SingleDropdownList.js +2 -2
- package/dist/es/SingleList.js +1 -1
- package/dist/es/index.js +4 -4
- package/dist/es/{install-37ef0fb5.js → install-49240941.js} +176 -158
- package/dist/es/install.js +3 -3
- package/dist/es/version.js +1 -1
- package/package.json +1 -1
|
@@ -24897,7 +24897,7 @@
|
|
|
24897
24897
|
var InputWrapper = styled('span')(_templateObject$9 || (_templateObject$9 = _taggedTemplateLiteralLoose(["\n\tflex: 1;\n\tposition: relative;\n\theight: 42px;\n"])));
|
|
24898
24898
|
|
|
24899
24899
|
var _templateObject$a;
|
|
24900
|
-
var InputAddon = styled('span')(_templateObject$a || (_templateObject$a = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: #fafafa;\n border: 1px solid
|
|
24900
|
+
var InputAddon = styled('span')(_templateObject$a || (_templateObject$a = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: #fafafa;\n border: 1px solid transparent;\n border-radius: 6px;\n color: rgba(0, 0, 0, 0.85);\n font-size: 14px;\n font-weight: 400;\n padding: 0 11px;\n position: relative;\n transition: all 0.3s;\n box-sizing: border-box;\n overflow: hidden;\n\n &:first-of-type {\n border-right: none;\n }\n &:last-of-type {\n border-left: none;\n }\n"])));
|
|
24901
24901
|
InputAddon.defaultProps = {
|
|
24902
24902
|
className: 'input-addon'
|
|
24903
24903
|
};
|
|
@@ -24969,9 +24969,9 @@
|
|
|
24969
24969
|
};
|
|
24970
24970
|
var suggestionsContainer = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteralLoose(["\n\tposition: relative;\n\t.cancel-icon {\n\t\tcursor: pointer;\n\t}\n"])));
|
|
24971
24971
|
var noSuggestions = function noSuggestions(themePreset, theme) {
|
|
24972
|
-
return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteralLoose(["\n\tdisplay: block;\n\twidth: 100%;\n\tborder
|
|
24972
|
+
return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteralLoose(["\n\tdisplay: block;\n\twidth: 100%;\n\tborder-top: none;\n\tbackground-color: #fff;\n\tfont-size: 0.9rem;\n\tz-index: 3;\n\tposition: absolute;\n\tmargin: 0;\n\tpadding: 0;\n\tlist-style: none;\n\tmax-height: 260px;\n\toverflow-y: auto;\n border-radius: 6px;\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n box-shadow: rgb(0 0 0 / 20%) 0px 10px 15px;\n border-top: 1px solid #f2f0f0;\n\n\t&.small {\n\t\ttop: 30px;\n\t}\n\n\tli {\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\tpadding: 10px;\n\t\tuser-select: none;\n\n\t\t& > .trim {\n\t\t\tdisplay: -webkit-box;\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t\tmax-height: 2.3rem;\n\t\t\tline-height: 1.2rem;\n\t\t\t-webkit-line-clamp: 2;\n\t\t\t-webkit-box-orient: vertical;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t\twhite-space: nowrap;\n\t\t}\n\t}\n\n\t", "\n"])), themePreset === 'dark' && theme && dark$1(theme));
|
|
24973
24973
|
};
|
|
24974
|
-
var TextArea = styled('textarea')(_templateObject8 || (_templateObject8 = _taggedTemplateLiteralLoose(["\n\t", ";\n\t", ";\n\n\t", ";\n\t", ";\n\t&::-webkit-search-decoration,\n\t&::-webkit-search-cancel-button,\n\t&::-webkit-search-results-button,\n\t&::-webkit-search-results-decoration {\n\t\tdisplay: none;\n\t}\n\tresize: none;\n\toverflow: hidden;\n\theight: 42px;\n\tpadding-left: 0;\n\tpadding-right: 0;\n"])), function (props) {
|
|
24974
|
+
var TextArea = styled('textarea')(_templateObject8 || (_templateObject8 = _taggedTemplateLiteralLoose(["\n\t", ";\n\t", ";\n\n\t", ";\n\t", ";\n\t&::-webkit-search-decoration,\n\t&::-webkit-search-cancel-button,\n\t&::-webkit-search-results-button,\n\t&::-webkit-search-results-decoration {\n\t\tdisplay: none;\n\t}\n\tresize: none;\n\toverflow: hidden;\n\theight: 42px;\n\tpadding-left: 0;\n\tpadding-right: 0;\n\tborder-color: transparent;\n\n"])), function (props) {
|
|
24975
24975
|
return input(props.searchBox);
|
|
24976
24976
|
}, function (_ref4) {
|
|
24977
24977
|
var themePreset = _ref4.themePreset,
|
|
@@ -26585,16 +26585,10 @@
|
|
|
26585
26585
|
return resetCSS(props);
|
|
26586
26586
|
});
|
|
26587
26587
|
var MessageInputContainer = styled('form')(_templateObject8$1 || (_templateObject8$1 = _taggedTemplateLiteralLoose(["\n\tdisplay: flex;\n\tpadding-top: 12px;\n\talign-items: stretch;\n\tmargin-top: 10px;\n\t.ai-enter-button-wrapper {\n\t\talign-self: baseline;\n\t\theight: 41px;\n\t}\n"])));
|
|
26588
|
-
var MessageInput = styled(TextArea)(_templateObject9$1 || (_templateObject9$1 = _taggedTemplateLiteralLoose(["\n\twidth: 100%;\n\tborder-radius: 5px;\n\tborder: 1px solid #ccc;\n\tbackground-color: ", ";\n\tcolor: ", ";\n\n\t
|
|
26588
|
+
var MessageInput = styled(TextArea)(_templateObject9$1 || (_templateObject9$1 = _taggedTemplateLiteralLoose(["\n\twidth: 100%;\n\tborder-radius: 5px;\n\tborder: 1px solid #ccc;\n\tbackground-color: ", ";\n\tcolor: ", ";\n\n\t", "\n\tpadding-left: 35px;\n"])), function (props) {
|
|
26589
26589
|
return props.themePreset === 'dark' ? props.theme.colors.borderColor : '#fff';
|
|
26590
26590
|
}, function (props) {
|
|
26591
26591
|
return props.themePreset === 'dark' ? props.theme.colors.titleColor : props.theme.colors.textColor;
|
|
26592
|
-
}, function (props) {
|
|
26593
|
-
return props.theme.colors.textColor;
|
|
26594
|
-
}, function (props) {
|
|
26595
|
-
return props.theme.colors.textColor;
|
|
26596
|
-
}, function (props) {
|
|
26597
|
-
return props.theme.colors.textColor;
|
|
26598
26592
|
}, function (_ref) {
|
|
26599
26593
|
var enterButton = _ref.enterButton;
|
|
26600
26594
|
return enterButton && "\n\t\t border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n\t";
|
|
@@ -27026,7 +27020,23 @@
|
|
|
27026
27020
|
AIUIConfig: types.AIUIConfig
|
|
27027
27021
|
},
|
|
27028
27022
|
mounted: function mounted() {
|
|
27023
|
+
var _this = this;
|
|
27029
27024
|
this.listenForFocusShortcuts();
|
|
27025
|
+
var dropdownEle = this.$refs[_dropdownULRef];
|
|
27026
|
+
if (dropdownEle) {
|
|
27027
|
+
var handleScroll = function handleScroll() {
|
|
27028
|
+
var scrollTop = dropdownEle.scrollTop;
|
|
27029
|
+
_this.lastScrollTop = scrollTop;
|
|
27030
|
+
if (scrollTop < _this.lastScrollTop) {
|
|
27031
|
+
// User is scrolling up
|
|
27032
|
+
clearInterval(_this.scrollTimerRef);
|
|
27033
|
+
_this.isUserScrolling = true;
|
|
27034
|
+
}
|
|
27035
|
+
// Update lastScrollTop with the current scroll position
|
|
27036
|
+
_this.lastScrollTop = scrollTop;
|
|
27037
|
+
};
|
|
27038
|
+
dropdownEle.addEventListener('scroll', handleScroll);
|
|
27039
|
+
}
|
|
27030
27040
|
},
|
|
27031
27041
|
updated: function updated() {
|
|
27032
27042
|
if (this.$props.mode === constants_5$1.SELECT && this.$options.isTagsMode === true) {
|
|
@@ -27045,6 +27055,9 @@
|
|
|
27045
27055
|
if (localCache && localCache.meta && localCache.meta.hits && localCache.meta.hits.hits) {
|
|
27046
27056
|
this.initialHits = localCache.meta.hits.hits;
|
|
27047
27057
|
}
|
|
27058
|
+
if (!this.showAIScreenFooter) {
|
|
27059
|
+
this.showAIScreenFooter = true;
|
|
27060
|
+
}
|
|
27048
27061
|
}
|
|
27049
27062
|
}
|
|
27050
27063
|
},
|
|
@@ -27159,9 +27172,10 @@
|
|
|
27159
27172
|
}
|
|
27160
27173
|
},
|
|
27161
27174
|
isAITyping: function isAITyping(newVal, oldVal) {
|
|
27162
|
-
var
|
|
27175
|
+
var _this2 = this;
|
|
27163
27176
|
var scrollAIContainer = function scrollAIContainer() {
|
|
27164
|
-
|
|
27177
|
+
if (_this2.isUserScrolling) return;
|
|
27178
|
+
var dropdownEle = _this2.$refs[_dropdownULRef];
|
|
27165
27179
|
if (dropdownEle) {
|
|
27166
27180
|
dropdownEle.scrollTo({
|
|
27167
27181
|
top: dropdownEle.scrollHeight,
|
|
@@ -27170,6 +27184,7 @@
|
|
|
27170
27184
|
}
|
|
27171
27185
|
};
|
|
27172
27186
|
if (!newVal && oldVal) {
|
|
27187
|
+
clearInterval(this.scrollTimerRef);
|
|
27173
27188
|
this.showAIScreenFooter = true;
|
|
27174
27189
|
if (this.$props.AIUIConfig && typeof this.$props.AIUIConfig.showFeedback === 'boolean' ? this.$props.AIUIConfig.showFeedback : true) {
|
|
27175
27190
|
this.showFeedbackComponent = true;
|
|
@@ -27178,7 +27193,7 @@
|
|
|
27178
27193
|
scrollAIContainer();
|
|
27179
27194
|
}, 500);
|
|
27180
27195
|
} else if (newVal) {
|
|
27181
|
-
this.scrollTimerRef =
|
|
27196
|
+
this.scrollTimerRef = setInterval(function () {
|
|
27182
27197
|
scrollAIContainer();
|
|
27183
27198
|
}, 2000);
|
|
27184
27199
|
}
|
|
@@ -27195,7 +27210,7 @@
|
|
|
27195
27210
|
}
|
|
27196
27211
|
},
|
|
27197
27212
|
currentValue: function currentValue() {
|
|
27198
|
-
this.handleTextAreaHeightChange
|
|
27213
|
+
this.$nextTick(this.handleTextAreaHeightChange);
|
|
27199
27214
|
}
|
|
27200
27215
|
},
|
|
27201
27216
|
methods: {
|
|
@@ -27270,7 +27285,7 @@
|
|
|
27270
27285
|
}
|
|
27271
27286
|
},
|
|
27272
27287
|
setValue: function setValue(value, isDefaultValue, props, cause, toggleIsOpen, categoryValue, shouldExecuteQuery) {
|
|
27273
|
-
var
|
|
27288
|
+
var _this3 = this;
|
|
27274
27289
|
if (isDefaultValue === void 0) {
|
|
27275
27290
|
isDefaultValue = false;
|
|
27276
27291
|
}
|
|
@@ -27287,65 +27302,65 @@
|
|
|
27287
27302
|
shouldExecuteQuery = true;
|
|
27288
27303
|
}
|
|
27289
27304
|
var performUpdate = function performUpdate() {
|
|
27290
|
-
if (
|
|
27305
|
+
if (_this3.$options.isTagsMode && isEqual$4(value, _this3.selectedTags)) {
|
|
27291
27306
|
return;
|
|
27292
27307
|
}
|
|
27293
|
-
if (
|
|
27294
|
-
if (Array.isArray(
|
|
27308
|
+
if (_this3.$options.isTagsMode && cause === lib_7.SUGGESTION_SELECT) {
|
|
27309
|
+
if (Array.isArray(_this3.selectedTags) && _this3.selectedTags.length) {
|
|
27295
27310
|
// check if value already present in selectedTags
|
|
27296
|
-
if (typeof value === 'string' &&
|
|
27297
|
-
|
|
27311
|
+
if (typeof value === 'string' && _this3.selectedTags.includes(value)) {
|
|
27312
|
+
_this3.isOpen = false;
|
|
27298
27313
|
return;
|
|
27299
27314
|
}
|
|
27300
|
-
|
|
27315
|
+
_this3.selectedTags = [].concat(_this3.selectedTags);
|
|
27301
27316
|
if (typeof value === 'string' && !!value) {
|
|
27302
|
-
|
|
27303
|
-
} else if (Array.isArray(value) && !isEqual$4(
|
|
27304
|
-
|
|
27317
|
+
_this3.selectedTags.push(value);
|
|
27318
|
+
} else if (Array.isArray(value) && !isEqual$4(_this3.selectedTags, value)) {
|
|
27319
|
+
_this3.selectedTags = value;
|
|
27305
27320
|
}
|
|
27306
27321
|
} else if (value) {
|
|
27307
|
-
|
|
27322
|
+
_this3.selectedTags = typeof value !== 'string' ? value : [].concat(value);
|
|
27308
27323
|
}
|
|
27309
|
-
|
|
27324
|
+
_this3.currentValue = '';
|
|
27310
27325
|
} else {
|
|
27311
|
-
|
|
27326
|
+
_this3.currentValue = decodeHtml(value);
|
|
27312
27327
|
}
|
|
27313
27328
|
var queryHandlerValue = value;
|
|
27314
|
-
if (
|
|
27315
|
-
queryHandlerValue = Array.isArray(
|
|
27329
|
+
if (_this3.$options.isTagsMode && cause === lib_7.SUGGESTION_SELECT) {
|
|
27330
|
+
queryHandlerValue = Array.isArray(_this3.selectedTags) && _this3.selectedTags.length ? _this3.selectedTags : undefined;
|
|
27316
27331
|
}
|
|
27317
|
-
if ((
|
|
27332
|
+
if ((_this3.faqAnswer || _this3.faqQuestion) && value === '') {
|
|
27318
27333
|
// Empty the previous state
|
|
27319
|
-
|
|
27320
|
-
|
|
27321
|
-
|
|
27334
|
+
_this3.faqAnswer = '';
|
|
27335
|
+
_this3.faqQuestion = '';
|
|
27336
|
+
_this3.showAIScreen = false;
|
|
27322
27337
|
}
|
|
27323
27338
|
if (isDefaultValue) {
|
|
27324
|
-
if (
|
|
27339
|
+
if (_this3.$props.autosuggest) {
|
|
27325
27340
|
if (toggleIsOpen) {
|
|
27326
|
-
|
|
27341
|
+
_this3.isOpen = false;
|
|
27327
27342
|
}
|
|
27328
|
-
if (typeof
|
|
27343
|
+
if (typeof _this3.currentValue === 'string') _this3.triggerDefaultQuery(_this3.currentValue, props.enableAI && _this3.currentTriggerMode === constants_9$1.QUESTION && _this3.currentValue.endsWith('?') ? {
|
|
27329
27344
|
enableAI: true
|
|
27330
27345
|
} : {}, shouldExecuteQuery);
|
|
27331
27346
|
} // in case of strict selection only SUGGESTION_SELECT should be able
|
|
27332
27347
|
// to set the query otherwise the value should reset
|
|
27333
27348
|
if (props.strictSelection) {
|
|
27334
|
-
if (cause === lib_7.SUGGESTION_SELECT || (
|
|
27335
|
-
|
|
27349
|
+
if (cause === lib_7.SUGGESTION_SELECT || (_this3.$options.isTagsMode ? _this3.selectedTags.length === 0 : value === '')) {
|
|
27350
|
+
_this3.triggerCustomQuery(queryHandlerValue, _this3.$options.isTagsMode ? undefined : categoryValue, shouldExecuteQuery);
|
|
27336
27351
|
} else {
|
|
27337
|
-
|
|
27352
|
+
_this3.setValue('', true);
|
|
27338
27353
|
}
|
|
27339
27354
|
} else if (props.value === undefined || cause === lib_7.SUGGESTION_SELECT || cause === lib_7.CLEAR_VALUE) {
|
|
27340
|
-
|
|
27341
|
-
|
|
27355
|
+
_this3.showAIScreen = false;
|
|
27356
|
+
_this3.triggerCustomQuery(queryHandlerValue, _this3.$options.isTagsMode ? undefined : categoryValue, shouldExecuteQuery);
|
|
27342
27357
|
}
|
|
27343
27358
|
} else {
|
|
27344
27359
|
// debounce for handling text while typing
|
|
27345
|
-
|
|
27360
|
+
_this3.handleTextChange(value, cause);
|
|
27346
27361
|
}
|
|
27347
|
-
|
|
27348
|
-
|
|
27362
|
+
_this3.$emit('valueChange', value);
|
|
27363
|
+
_this3.$emit('value-change', value);
|
|
27349
27364
|
};
|
|
27350
27365
|
checkValueChange(props.componentId, value, props.beforeValueChange, performUpdate);
|
|
27351
27366
|
},
|
|
@@ -27494,7 +27509,7 @@
|
|
|
27494
27509
|
this.$emit('key-down', event, this.triggerQuery);
|
|
27495
27510
|
},
|
|
27496
27511
|
onInputChange: function onInputChange(e) {
|
|
27497
|
-
var
|
|
27512
|
+
var _this4 = this;
|
|
27498
27513
|
var inputValue = e.target.value;
|
|
27499
27514
|
if (!this.$data.isOpen && this.$props.autosuggest) {
|
|
27500
27515
|
this.isOpen = true;
|
|
@@ -27508,7 +27523,7 @@
|
|
|
27508
27523
|
} else {
|
|
27509
27524
|
this.$emit('change', inputValue, function (_ref3) {
|
|
27510
27525
|
var isOpen = _ref3.isOpen;
|
|
27511
|
-
return
|
|
27526
|
+
return _this4.triggerQuery({
|
|
27512
27527
|
defaultQuery: true,
|
|
27513
27528
|
customQuery: true,
|
|
27514
27529
|
value: inputValue,
|
|
@@ -27552,7 +27567,7 @@
|
|
|
27552
27567
|
}
|
|
27553
27568
|
},
|
|
27554
27569
|
onSuggestionSelected: function onSuggestionSelected(suggestion) {
|
|
27555
|
-
var
|
|
27570
|
+
var _this5 = this;
|
|
27556
27571
|
var value = this.$props.value;
|
|
27557
27572
|
// The state of the suggestion is open by the time it reaches here. i.e. isOpen = true
|
|
27558
27573
|
// handle when FAQ suggestion is clicked
|
|
@@ -27601,10 +27616,10 @@
|
|
|
27601
27616
|
this.setValue(emitValue, true, this.$props, lib_7.SUGGESTION_SELECT, false, suggestion._category);
|
|
27602
27617
|
this.$emit('change', emitValue, function (_ref4) {
|
|
27603
27618
|
var isOpen = _ref4.isOpen;
|
|
27604
|
-
return
|
|
27619
|
+
return _this5.triggerQuery(_extends({
|
|
27605
27620
|
isOpen: isOpen,
|
|
27606
27621
|
value: emitValue
|
|
27607
|
-
}, !
|
|
27622
|
+
}, !_this5.$options.isTagsMode && {
|
|
27608
27623
|
categoryValue: suggestion._category
|
|
27609
27624
|
}));
|
|
27610
27625
|
});
|
|
@@ -27644,7 +27659,7 @@
|
|
|
27644
27659
|
return null;
|
|
27645
27660
|
},
|
|
27646
27661
|
renderErrorComponent: function renderErrorComponent(isAIError) {
|
|
27647
|
-
var
|
|
27662
|
+
var _this6 = this;
|
|
27648
27663
|
if (isAIError === void 0) {
|
|
27649
27664
|
isAIError = false;
|
|
27650
27665
|
}
|
|
@@ -27671,7 +27686,7 @@
|
|
|
27671
27686
|
"themePreset": this.themePreset
|
|
27672
27687
|
}, {
|
|
27673
27688
|
"default": function _default() {
|
|
27674
|
-
return [isFunction(renderError) ? renderError(
|
|
27689
|
+
return [isFunction(renderError) ? renderError(_this6.error) : renderError];
|
|
27675
27690
|
}
|
|
27676
27691
|
});
|
|
27677
27692
|
}
|
|
@@ -27751,7 +27766,7 @@
|
|
|
27751
27766
|
});
|
|
27752
27767
|
},
|
|
27753
27768
|
renderEnterButtonElement: function renderEnterButtonElement() {
|
|
27754
|
-
var
|
|
27769
|
+
var _this7 = this;
|
|
27755
27770
|
var _this$$props2 = this.$props,
|
|
27756
27771
|
enterButton = _this$$props2.enterButton,
|
|
27757
27772
|
innerClass = _this$$props2.innerClass;
|
|
@@ -27759,12 +27774,12 @@
|
|
|
27759
27774
|
if (enterButton) {
|
|
27760
27775
|
var getEnterButtonMarkup = function getEnterButtonMarkup() {
|
|
27761
27776
|
if (renderEnterButton) {
|
|
27762
|
-
return renderEnterButton(
|
|
27777
|
+
return renderEnterButton(_this7.enterButtonOnClick);
|
|
27763
27778
|
}
|
|
27764
27779
|
return vue.createVNode(Button, {
|
|
27765
27780
|
"class": "enter-btn " + getClassName$3(innerClass, 'enter-button'),
|
|
27766
27781
|
"primary": true,
|
|
27767
|
-
"onClick":
|
|
27782
|
+
"onClick": _this7.enterButtonOnClick
|
|
27768
27783
|
}, {
|
|
27769
27784
|
"default": function _default() {
|
|
27770
27785
|
return [vue.createTextVNode("Search")];
|
|
@@ -27790,7 +27805,7 @@
|
|
|
27790
27805
|
return '/';
|
|
27791
27806
|
},
|
|
27792
27807
|
renderLeftIcons: function renderLeftIcons() {
|
|
27793
|
-
var
|
|
27808
|
+
var _this8 = this;
|
|
27794
27809
|
var _slot3;
|
|
27795
27810
|
var _this$$props3 = this.$props,
|
|
27796
27811
|
iconPosition = _this$$props3.iconPosition,
|
|
@@ -27800,8 +27815,8 @@
|
|
|
27800
27815
|
}, {
|
|
27801
27816
|
"default": function _default() {
|
|
27802
27817
|
return [iconPosition === 'left' && showIcon && vue.createVNode(IconWrapper, {
|
|
27803
|
-
"onClick":
|
|
27804
|
-
}, _isSlot$5(_slot3 =
|
|
27818
|
+
"onClick": _this8.handleSearchIconClick
|
|
27819
|
+
}, _isSlot$5(_slot3 = _this8.renderIcon()) ? _slot3 : {
|
|
27805
27820
|
"default": function _default() {
|
|
27806
27821
|
return [_slot3];
|
|
27807
27822
|
}
|
|
@@ -27810,7 +27825,7 @@
|
|
|
27810
27825
|
})]);
|
|
27811
27826
|
},
|
|
27812
27827
|
renderRightIcons: function renderRightIcons() {
|
|
27813
|
-
var
|
|
27828
|
+
var _this9 = this;
|
|
27814
27829
|
var _slot4, _slot5, _slot6;
|
|
27815
27830
|
var _this$$props4 = this.$props,
|
|
27816
27831
|
iconPosition = _this$$props4.iconPosition,
|
|
@@ -27827,29 +27842,29 @@
|
|
|
27827
27842
|
}, {
|
|
27828
27843
|
"default": function _default() {
|
|
27829
27844
|
return [currentValue && showClear && vue.createVNode(IconWrapper, {
|
|
27830
|
-
"onClick":
|
|
27845
|
+
"onClick": _this9.clearValue,
|
|
27831
27846
|
"showIcon": showIcon,
|
|
27832
27847
|
"isClearIcon": true
|
|
27833
|
-
}, _isSlot$5(_slot4 =
|
|
27848
|
+
}, _isSlot$5(_slot4 = _this9.renderCancelIcon()) ? _slot4 : {
|
|
27834
27849
|
"default": function _default() {
|
|
27835
27850
|
return [_slot4];
|
|
27836
27851
|
}
|
|
27837
27852
|
}), showFocusShortcutsIcon && vue.createVNode(ButtonIconWrapper, {
|
|
27838
27853
|
"onClick": function onClick(e) {
|
|
27839
|
-
return
|
|
27854
|
+
return _this9.focusSearchBox(e);
|
|
27840
27855
|
}
|
|
27841
|
-
}, _isSlot$5(_slot5 =
|
|
27856
|
+
}, _isSlot$5(_slot5 = _this9.renderShortcut()) ? _slot5 : {
|
|
27842
27857
|
"default": function _default() {
|
|
27843
27858
|
return [_slot5];
|
|
27844
27859
|
}
|
|
27845
27860
|
}), showVoiceSearch && vue.createVNode(Mic, {
|
|
27846
27861
|
"getInstance": getMicInstance,
|
|
27847
27862
|
"render": renderMic,
|
|
27848
|
-
"handleResult":
|
|
27863
|
+
"handleResult": _this9.handleVoiceResults,
|
|
27849
27864
|
"className": getClassName$3(innerClass, 'mic') || null
|
|
27850
27865
|
}, null), iconPosition === 'right' && showIcon && vue.createVNode(IconWrapper, {
|
|
27851
|
-
"onClick":
|
|
27852
|
-
}, _isSlot$5(_slot6 =
|
|
27866
|
+
"onClick": _this9.handleSearchIconClick
|
|
27867
|
+
}, _isSlot$5(_slot6 = _this9.renderIcon()) ? _slot6 : {
|
|
27853
27868
|
"default": function _default() {
|
|
27854
27869
|
return [_slot6];
|
|
27855
27870
|
}
|
|
@@ -27868,7 +27883,7 @@
|
|
|
27868
27883
|
(_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
|
|
27869
27884
|
},
|
|
27870
27885
|
listenForFocusShortcuts: function listenForFocusShortcuts() {
|
|
27871
|
-
var
|
|
27886
|
+
var _this10 = this;
|
|
27872
27887
|
var _this$$props$focusSho = this.$props.focusShortcuts,
|
|
27873
27888
|
focusShortcuts = _this$$props$focusSho === void 0 ? ['/'] : _this$$props$focusSho;
|
|
27874
27889
|
if (isEmpty(focusShortcuts)) {
|
|
@@ -27883,7 +27898,7 @@
|
|
|
27883
27898
|
function (event, handler) {
|
|
27884
27899
|
// Prevent the default refresh event under WINDOWS system
|
|
27885
27900
|
event.preventDefault();
|
|
27886
|
-
|
|
27901
|
+
_this10.focusSearchBox(event);
|
|
27887
27902
|
});
|
|
27888
27903
|
|
|
27889
27904
|
// if one of modifier keys are used, they are handled below
|
|
@@ -27893,7 +27908,7 @@
|
|
|
27893
27908
|
for (var index = 0; index < modifierKeys.length; index += 1) {
|
|
27894
27909
|
var element = modifierKeys[index];
|
|
27895
27910
|
if (hotkeys[element]) {
|
|
27896
|
-
|
|
27911
|
+
_this10.focusSearchBox(event);
|
|
27897
27912
|
break;
|
|
27898
27913
|
}
|
|
27899
27914
|
}
|
|
@@ -27906,10 +27921,10 @@
|
|
|
27906
27921
|
this.triggerDefaultQuery(value);
|
|
27907
27922
|
},
|
|
27908
27923
|
renderActionIcon: function renderActionIcon(suggestion) {
|
|
27909
|
-
var
|
|
27924
|
+
var _this11 = this;
|
|
27910
27925
|
var handleAutoFillClick = function handleAutoFillClick(e) {
|
|
27911
27926
|
e.stopPropagation();
|
|
27912
|
-
|
|
27927
|
+
_this11.onAutofillClick(suggestion);
|
|
27913
27928
|
};
|
|
27914
27929
|
if (suggestion._suggestion_type === helper_16.Featured) {
|
|
27915
27930
|
if (suggestion.action === helper_15.FUNCTION) {
|
|
@@ -27932,7 +27947,7 @@
|
|
|
27932
27947
|
return null;
|
|
27933
27948
|
},
|
|
27934
27949
|
renderTag: function renderTag(item) {
|
|
27935
|
-
var
|
|
27950
|
+
var _this12 = this;
|
|
27936
27951
|
var innerClass = this.$props.innerClass;
|
|
27937
27952
|
return vue.createVNode(TagItem, {
|
|
27938
27953
|
"class": getClassName$3(innerClass, 'selected-tag') || ''
|
|
@@ -27943,7 +27958,7 @@
|
|
|
27943
27958
|
"aria-label": "delete-tag",
|
|
27944
27959
|
"class": "close-icon",
|
|
27945
27960
|
"onClick": function onClick() {
|
|
27946
|
-
return
|
|
27961
|
+
return _this12.clearTag(item);
|
|
27947
27962
|
}
|
|
27948
27963
|
}, [vue.createVNode(CancelSvg, null, null)])];
|
|
27949
27964
|
}
|
|
@@ -27966,7 +27981,7 @@
|
|
|
27966
27981
|
}
|
|
27967
27982
|
},
|
|
27968
27983
|
renderTags: function renderTags() {
|
|
27969
|
-
var
|
|
27984
|
+
var _this13 = this;
|
|
27970
27985
|
if (!Array.isArray(this.selectedTags)) {
|
|
27971
27986
|
return null;
|
|
27972
27987
|
}
|
|
@@ -27980,16 +27995,16 @@
|
|
|
27980
27995
|
}) : vue.createVNode(TagsContainer, null, {
|
|
27981
27996
|
"default": function _default() {
|
|
27982
27997
|
return [tagsList.map(function (item) {
|
|
27983
|
-
return
|
|
27998
|
+
return _this13.renderTag(item);
|
|
27984
27999
|
}), shouldRenderClearAllTag && vue.createVNode(TagItem, {
|
|
27985
|
-
"class": getClassName$3(
|
|
28000
|
+
"class": getClassName$3(_this13.$props.innerClass, 'selected-tag') || ''
|
|
27986
28001
|
}, {
|
|
27987
28002
|
"default": function _default() {
|
|
27988
28003
|
return [vue.createVNode("span", null, [vue.createTextVNode("Clear All")]), vue.createVNode("span", {
|
|
27989
28004
|
"role": "img",
|
|
27990
28005
|
"aria-label": "delete-tag",
|
|
27991
28006
|
"class": "close-icon",
|
|
27992
|
-
"onClick":
|
|
28007
|
+
"onClick": _this13.clearAllTags
|
|
27993
28008
|
}, [vue.createVNode(CancelSvg, null, null)])];
|
|
27994
28009
|
}
|
|
27995
28010
|
})];
|
|
@@ -27997,13 +28012,13 @@
|
|
|
27997
28012
|
});
|
|
27998
28013
|
},
|
|
27999
28014
|
getAISourceObjects: function getAISourceObjects() {
|
|
28000
|
-
var
|
|
28015
|
+
var _this14 = this;
|
|
28001
28016
|
var sourceObjects = [];
|
|
28002
28017
|
if (!this.AIResponse) return sourceObjects;
|
|
28003
28018
|
var docIds = this.AIResponse && this.AIResponse.response && this.AIResponse.response.answer && this.AIResponse.response.answer.documentIds || [];
|
|
28004
28019
|
if (this.initialHits) {
|
|
28005
28020
|
docIds.forEach(function (id) {
|
|
28006
|
-
var foundSourceObj =
|
|
28021
|
+
var foundSourceObj = _this14.initialHits.find(function (hit) {
|
|
28007
28022
|
return hit._id === id;
|
|
28008
28023
|
}) || {};
|
|
28009
28024
|
if (foundSourceObj) {
|
|
@@ -28037,20 +28052,20 @@
|
|
|
28037
28052
|
},
|
|
28038
28053
|
renderAIScreenFooter: function renderAIScreenFooter() {
|
|
28039
28054
|
var _slot8;
|
|
28040
|
-
var
|
|
28055
|
+
var _this15 = this;
|
|
28041
28056
|
var _this$$props$AIUIConf2 = this.$props.AIUIConfig,
|
|
28042
28057
|
AIUIConfig = _this$$props$AIUIConf2 === void 0 ? {} : _this$$props$AIUIConf2;
|
|
28043
28058
|
var _ref6 = AIUIConfig || {},
|
|
28044
28059
|
_ref6$showSourceDocum = _ref6.showSourceDocuments,
|
|
28045
|
-
showSourceDocuments = _ref6$showSourceDocum === void 0 ?
|
|
28060
|
+
showSourceDocuments = _ref6$showSourceDocum === void 0 ? false : _ref6$showSourceDocum,
|
|
28046
28061
|
_ref6$onSourceClick = _ref6.onSourceClick,
|
|
28047
28062
|
onSourceClick = _ref6$onSourceClick === void 0 ? function () {} : _ref6$onSourceClick;
|
|
28048
28063
|
var renderSourceDocumentLabel = function renderSourceDocumentLabel(sourceObj) {
|
|
28049
|
-
if (
|
|
28050
|
-
return
|
|
28064
|
+
if (_this15.$props.AIUIConfig && _this15.$props.AIUIConfig.renderSourceDocument) {
|
|
28065
|
+
return _this15.$props.AIUIConfig.renderSourceDocument(sourceObj);
|
|
28051
28066
|
}
|
|
28052
|
-
if (
|
|
28053
|
-
return
|
|
28067
|
+
if (_this15.$slots.renderSourceDocument) {
|
|
28068
|
+
return _this15.$slots.renderSourceDocument(sourceObj);
|
|
28054
28069
|
}
|
|
28055
28070
|
return sourceObj._id;
|
|
28056
28071
|
};
|
|
@@ -28058,10 +28073,10 @@
|
|
|
28058
28073
|
"themePreset": this.$props.themePreset
|
|
28059
28074
|
}, {
|
|
28060
28075
|
"default": function _default() {
|
|
28061
|
-
return [vue.createTextVNode("Summary generated using the following sources:"), ' ', vue.createVNode(SourceTags, null, _isSlot$5(_slot8 =
|
|
28076
|
+
return [vue.createTextVNode("Summary generated using the following sources:"), ' ', vue.createVNode(SourceTags, null, _isSlot$5(_slot8 = _this15.getAISourceObjects().map(function (el) {
|
|
28062
28077
|
var _slot7;
|
|
28063
28078
|
return vue.createVNode(Button, {
|
|
28064
|
-
"class": "--ai-source-tag " + (getClassName$3(
|
|
28079
|
+
"class": "--ai-source-tag " + (getClassName$3(_this15.$props.innerClass, 'ai-source-tag') || ''),
|
|
28065
28080
|
"info": true,
|
|
28066
28081
|
"onClick": function onClick() {
|
|
28067
28082
|
return onSourceClick && onSourceClick(el);
|
|
@@ -28080,7 +28095,7 @@
|
|
|
28080
28095
|
}) : null;
|
|
28081
28096
|
},
|
|
28082
28097
|
renderAIScreen: function renderAIScreen() {
|
|
28083
|
-
var
|
|
28098
|
+
var _this16 = this;
|
|
28084
28099
|
var customAIRenderer = this.$props.renderAIAnswer || this.$slots.renderAIAnswer;
|
|
28085
28100
|
if (customAIRenderer) {
|
|
28086
28101
|
return customAIRenderer({
|
|
@@ -28104,11 +28119,11 @@
|
|
|
28104
28119
|
"hideUI": this.isAIResponseLoading || this.isLoading || !this.sessionIdFromStore,
|
|
28105
28120
|
"key": this.sessionIdFromStore,
|
|
28106
28121
|
"onFeedbackSubmit": function onFeedbackSubmit(useful, reason) {
|
|
28107
|
-
|
|
28122
|
+
_this16.feedbackState = {
|
|
28108
28123
|
isRecorded: true,
|
|
28109
28124
|
feedbackType: useful ? 'positive' : 'negative'
|
|
28110
28125
|
};
|
|
28111
|
-
|
|
28126
|
+
_this16.recordAISessionUsefulness(_this16.sessionIdFromStore, {
|
|
28112
28127
|
useful: useful,
|
|
28113
28128
|
reason: reason
|
|
28114
28129
|
});
|
|
@@ -28143,7 +28158,7 @@
|
|
|
28143
28158
|
});
|
|
28144
28159
|
},
|
|
28145
28160
|
renderAskButtonElement: function renderAskButtonElement() {
|
|
28146
|
-
var
|
|
28161
|
+
var _this17 = this;
|
|
28147
28162
|
var _this$$props5 = this.$props,
|
|
28148
28163
|
AIUIConfig = _this$$props5.AIUIConfig,
|
|
28149
28164
|
innerClass = _this$$props5.innerClass;
|
|
@@ -28153,12 +28168,12 @@
|
|
|
28153
28168
|
if (askButton) {
|
|
28154
28169
|
var getEnterButtonMarkup = function getEnterButtonMarkup() {
|
|
28155
28170
|
if (renderAskButton) {
|
|
28156
|
-
return renderAskButton(
|
|
28171
|
+
return renderAskButton(_this17.askButtonOnClick);
|
|
28157
28172
|
}
|
|
28158
28173
|
return vue.createVNode(Button, {
|
|
28159
28174
|
"class": "enter-btn " + getClassName$3(innerClass, 'ask-button'),
|
|
28160
28175
|
"info": true,
|
|
28161
|
-
"onClick":
|
|
28176
|
+
"onClick": _this17.askButtonOnClick
|
|
28162
28177
|
}, {
|
|
28163
28178
|
"default": function _default() {
|
|
28164
28179
|
return [vue.createTextVNode("Ask")];
|
|
@@ -28173,28 +28188,28 @@
|
|
|
28173
28188
|
}
|
|
28174
28189
|
},
|
|
28175
28190
|
render: function render() {
|
|
28176
|
-
var
|
|
28191
|
+
var _this18 = this;
|
|
28177
28192
|
var expandSuggestionsContainer = this.$props.expandSuggestionsContainer;
|
|
28178
28193
|
var _this$$slots = this.$slots,
|
|
28179
28194
|
recentSearchesIcon = _this$$slots.recentSearchesIcon,
|
|
28180
28195
|
popularSearchesIcon = _this$$slots.popularSearchesIcon;
|
|
28181
|
-
var hasSuggestions = Array.isArray(this.
|
|
28196
|
+
var hasSuggestions = Array.isArray(this.parsedSuggestions) && this.parsedSuggestions.length;
|
|
28182
28197
|
var renderItem = this.$slots.renderItem || this.$props.renderItem;
|
|
28183
28198
|
return vue.createVNode(Container, {
|
|
28184
28199
|
"class": this.$props.className
|
|
28185
28200
|
}, {
|
|
28186
28201
|
"default": function _default() {
|
|
28187
|
-
return [
|
|
28188
|
-
"class": getClassName$3(
|
|
28202
|
+
return [_this18.$props.title && vue.createVNode(Title, {
|
|
28203
|
+
"class": getClassName$3(_this18.$props.innerClass, 'title') || ''
|
|
28189
28204
|
}, {
|
|
28190
28205
|
"default": function _default() {
|
|
28191
|
-
return [
|
|
28206
|
+
return [_this18.$props.title];
|
|
28192
28207
|
}
|
|
28193
|
-
}),
|
|
28194
|
-
"id":
|
|
28195
|
-
"handleChange":
|
|
28196
|
-
"handleMouseup":
|
|
28197
|
-
"isOpen":
|
|
28208
|
+
}), _this18.$props.autosuggest ? vue.createVNode(Downshift, {
|
|
28209
|
+
"id": _this18.$props.componentId + "-downshift",
|
|
28210
|
+
"handleChange": _this18.onSuggestionSelected,
|
|
28211
|
+
"handleMouseup": _this18.handleStateChange,
|
|
28212
|
+
"isOpen": _this18.$data.isOpen
|
|
28198
28213
|
}, {
|
|
28199
28214
|
"default": function _default(_ref8) {
|
|
28200
28215
|
var getInputEvents = _ref8.getInputEvents,
|
|
@@ -28250,21 +28265,21 @@
|
|
|
28250
28265
|
}
|
|
28251
28266
|
};
|
|
28252
28267
|
var indexOffset = 0;
|
|
28253
|
-
return vue.createVNode("div", null, [
|
|
28268
|
+
return vue.createVNode("div", null, [_this18.hasCustomRenderer && _this18.getComponent({
|
|
28254
28269
|
isOpen: isOpen,
|
|
28255
28270
|
getItemProps: getItemProps,
|
|
28256
28271
|
getItemEvents: getItemEvents,
|
|
28257
28272
|
highlightedIndex: highlightedIndex
|
|
28258
|
-
}),
|
|
28259
|
-
"class": suggestions$1(
|
|
28273
|
+
}), _this18.renderErrorComponent(), !_this18.hasCustomRenderer && isOpen && hasSuggestions ? vue.createVNode("ul", {
|
|
28274
|
+
"class": suggestions$1(_this18.themePreset, _this18.theme) + " " + getClassName$3(_this18.$props.innerClass, 'list') + " " + searchboxSuggestions(_this18.themePreset, _this18.theme) + "\n\t\t\t\t\t\t\t\t\t\t\t\t\t",
|
|
28260
28275
|
"ref": _dropdownULRef
|
|
28261
|
-
}, [
|
|
28262
|
-
"themePreset":
|
|
28276
|
+
}, [_this18.showAIScreen && vue.createVNode(SearchBoxAISection, {
|
|
28277
|
+
"themePreset": _this18.$props.themePreset
|
|
28263
28278
|
}, {
|
|
28264
28279
|
"default": function _default() {
|
|
28265
|
-
return [
|
|
28280
|
+
return [_this18.renderAIScreen(), ' ', _this18.renderErrorComponent(true)];
|
|
28266
28281
|
}
|
|
28267
|
-
}), !
|
|
28282
|
+
}), !_this18.showAIScreen && _this18.parsedSuggestions.map(function (item, itemIndex) {
|
|
28268
28283
|
var index = indexOffset + itemIndex;
|
|
28269
28284
|
if (Array.isArray(item)) {
|
|
28270
28285
|
var sectionHtml = lib$2(item[0].sectionLabel);
|
|
@@ -28273,7 +28288,7 @@
|
|
|
28273
28288
|
"key": "section-" + itemIndex,
|
|
28274
28289
|
"class": "section-container"
|
|
28275
28290
|
}, [sectionHtml ? vue.createVNode("div", {
|
|
28276
|
-
"class": "section-header " + getClassName$3(
|
|
28291
|
+
"class": "section-header " + getClassName$3(_this18.$props.innerClass, 'section-label'),
|
|
28277
28292
|
"key": "" + item[0].sectionId,
|
|
28278
28293
|
"innerHTML": sectionHtml
|
|
28279
28294
|
}, null) : null, vue.createVNode("ul", {
|
|
@@ -28293,7 +28308,7 @@
|
|
|
28293
28308
|
justifyContent: 'flex-start',
|
|
28294
28309
|
alignItems: 'center'
|
|
28295
28310
|
},
|
|
28296
|
-
"class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$3(
|
|
28311
|
+
"class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$3(_this18.$props.innerClass, 'active-suggestion-item') : "li-item " + getClassName$3(_this18.$props.innerClass, 'suggestion-item'))
|
|
28297
28312
|
}), [renderItem(sectionItem)]);
|
|
28298
28313
|
}
|
|
28299
28314
|
if (sectionItem._suggestion_type === '_internal_a_i_trigger') {
|
|
@@ -28307,9 +28322,9 @@
|
|
|
28307
28322
|
justifyContent: 'flex-start',
|
|
28308
28323
|
alignItems: 'center'
|
|
28309
28324
|
},
|
|
28310
|
-
"class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$3(
|
|
28325
|
+
"class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$3(_this18.$props.innerClass, 'active-suggestion-item') : "li-item " + getClassName$3(_this18.$props.innerClass, 'suggestion-item'))
|
|
28311
28326
|
}), [vue.createVNode(SuggestionItem, {
|
|
28312
|
-
"currentValue":
|
|
28327
|
+
"currentValue": _this18.currentValue,
|
|
28313
28328
|
"suggestion": sectionItem
|
|
28314
28329
|
}, null)]);
|
|
28315
28330
|
}
|
|
@@ -28323,7 +28338,7 @@
|
|
|
28323
28338
|
justifyContent: 'flex-start',
|
|
28324
28339
|
alignItems: 'center'
|
|
28325
28340
|
},
|
|
28326
|
-
"class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$3(
|
|
28341
|
+
"class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$3(_this18.$props.innerClass, 'active-suggestion-item') : "li-item " + getClassName$3(_this18.$props.innerClass, 'suggestion-item'))
|
|
28327
28342
|
}), [vue.createVNode("div", {
|
|
28328
28343
|
"style": {
|
|
28329
28344
|
padding: '0 10px 0 0',
|
|
@@ -28331,74 +28346,74 @@
|
|
|
28331
28346
|
}
|
|
28332
28347
|
}, [vue.createVNode(CustomSvg, {
|
|
28333
28348
|
"key": sectionItem._suggestion_type + "-" + sectionIndex,
|
|
28334
|
-
"className": getClassName$3(
|
|
28349
|
+
"className": getClassName$3(_this18.$props.innerClass, sectionItem._suggestion_type + "-search-icon") || null,
|
|
28335
28350
|
"icon": getIcon(sectionItem._suggestion_type, sectionItem, suggestionsHaveIcon),
|
|
28336
28351
|
"type": sectionItem._suggestion_type + "-search-icon"
|
|
28337
28352
|
}, null)]), vue.createVNode(SuggestionItem, {
|
|
28338
|
-
"currentValue":
|
|
28353
|
+
"currentValue": _this18.currentValue,
|
|
28339
28354
|
"suggestion": sectionItem
|
|
28340
|
-
}, null),
|
|
28355
|
+
}, null), _this18.renderActionIcon(sectionItem)]);
|
|
28341
28356
|
})])]);
|
|
28342
28357
|
}
|
|
28343
28358
|
return vue.createVNode("div", null, [vue.createTextVNode("No suggestions")]);
|
|
28344
|
-
}), !
|
|
28359
|
+
}), !_this18.showAIScreen && _this18.parsedSuggestions.length && _this18.$props.showSuggestionsFooter ? _this18.suggestionsFooter() : null]) : _this18.renderNoSuggestions(_this18.normalizedSuggestions)]);
|
|
28345
28360
|
};
|
|
28346
28361
|
return vue.createVNode("div", {
|
|
28347
28362
|
"class": suggestionsContainer
|
|
28348
28363
|
}, [vue.createVNode(InputGroup, {
|
|
28349
28364
|
"searchBox": true,
|
|
28350
28365
|
"ref": _inputGroupRef,
|
|
28351
|
-
"isOpen":
|
|
28366
|
+
"isOpen": _this18.$data.isOpen
|
|
28352
28367
|
}, {
|
|
28353
28368
|
"default": function _default() {
|
|
28354
28369
|
return [vue.createVNode(Actions, null, {
|
|
28355
28370
|
"default": function _default() {
|
|
28356
|
-
return [
|
|
28371
|
+
return [_this18.renderInputAddonBefore(), _this18.renderLeftIcons()];
|
|
28357
28372
|
}
|
|
28358
28373
|
}), vue.createVNode(InputWrapper, null, {
|
|
28359
28374
|
"default": function _default() {
|
|
28360
28375
|
return [vue.createVNode(TextArea, vue.mergeProps(babelHelperVueTransformOn(getInputEvents({
|
|
28361
|
-
onInput:
|
|
28376
|
+
onInput: _this18.onInputChange,
|
|
28362
28377
|
onBlur: function onBlur(e) {
|
|
28363
|
-
|
|
28378
|
+
_this18.$emit('blur', e, _this18.triggerQuery);
|
|
28364
28379
|
},
|
|
28365
|
-
onFocus:
|
|
28380
|
+
onFocus: _this18.handleFocus,
|
|
28366
28381
|
onKeyPress: function onKeyPress(e) {
|
|
28367
|
-
|
|
28368
|
-
|
|
28382
|
+
_this18.$emit('keyPress', e, _this18.triggerQuery);
|
|
28383
|
+
_this18.$emit('key-press', e, _this18.triggerQuery);
|
|
28369
28384
|
},
|
|
28370
28385
|
onKeyDown: function onKeyDown(e) {
|
|
28371
|
-
return
|
|
28386
|
+
return _this18.handleKeyDown(e, highlightedIndex);
|
|
28372
28387
|
},
|
|
28373
28388
|
onKeyUp: function onKeyUp(e) {
|
|
28374
|
-
|
|
28375
|
-
|
|
28389
|
+
_this18.$emit('keyUp', e, _this18.triggerQuery);
|
|
28390
|
+
_this18.$emit('key-up', e, _this18.triggerQuery);
|
|
28376
28391
|
},
|
|
28377
28392
|
onClick: function onClick() {
|
|
28378
28393
|
setHighlightedIndex(null);
|
|
28379
28394
|
}
|
|
28380
28395
|
})), {
|
|
28381
28396
|
"searchBox": true,
|
|
28382
|
-
"isOpen":
|
|
28383
|
-
"id":
|
|
28384
|
-
"ref":
|
|
28385
|
-
"class": getClassName$3(
|
|
28386
|
-
"placeholder":
|
|
28387
|
-
"autoFocus":
|
|
28397
|
+
"isOpen": _this18.$data.isOpen,
|
|
28398
|
+
"id": _this18.$props.componentId + "-input",
|
|
28399
|
+
"ref": _this18.$props.innerRef,
|
|
28400
|
+
"class": getClassName$3(_this18.$props.innerClass, 'input'),
|
|
28401
|
+
"placeholder": _this18.$props.placeholder,
|
|
28402
|
+
"autoFocus": _this18.$props.autoFocus
|
|
28388
28403
|
}, getInputProps({
|
|
28389
|
-
value:
|
|
28404
|
+
value: _this18.$data.currentValue === null ? '' : _this18.$data.currentValue
|
|
28390
28405
|
}), {
|
|
28391
|
-
"themePreset":
|
|
28406
|
+
"themePreset": _this18.themePreset,
|
|
28392
28407
|
"autocomplete": "off"
|
|
28393
28408
|
}), null), !expandSuggestionsContainer && renderSuggestionsDropdown()];
|
|
28394
28409
|
}
|
|
28395
28410
|
}), vue.createVNode(Actions, null, {
|
|
28396
28411
|
"default": function _default() {
|
|
28397
|
-
return [
|
|
28412
|
+
return [_this18.renderRightIcons(), _this18.renderInputAddonAfter(), _this18.renderAskButtonElement(), _this18.renderEnterButtonElement()];
|
|
28398
28413
|
}
|
|
28399
28414
|
})];
|
|
28400
28415
|
}
|
|
28401
|
-
}), expandSuggestionsContainer && renderSuggestionsDropdown(),
|
|
28416
|
+
}), expandSuggestionsContainer && renderSuggestionsDropdown(), _this18.renderTags()]);
|
|
28402
28417
|
}
|
|
28403
28418
|
}) : vue.createVNode("div", {
|
|
28404
28419
|
"class": suggestionsContainer
|
|
@@ -28409,43 +28424,43 @@
|
|
|
28409
28424
|
"default": function _default() {
|
|
28410
28425
|
return [vue.createVNode(Actions, null, {
|
|
28411
28426
|
"default": function _default() {
|
|
28412
|
-
return [
|
|
28427
|
+
return [_this18.renderInputAddonBefore(), _this18.renderLeftIcons()];
|
|
28413
28428
|
}
|
|
28414
28429
|
}), vue.createVNode(InputWrapper, null, {
|
|
28415
28430
|
"default": function _default() {
|
|
28416
28431
|
return [vue.createVNode(TextArea, vue.mergeProps(babelHelperVueTransformOn({
|
|
28417
28432
|
blur: function blur(e) {
|
|
28418
|
-
|
|
28433
|
+
_this18.$emit('blur', e, _this18.triggerQuery);
|
|
28419
28434
|
},
|
|
28420
28435
|
keypress: function keypress(e) {
|
|
28421
|
-
|
|
28422
|
-
|
|
28436
|
+
_this18.$emit('keyPress', e, _this18.triggerQuery);
|
|
28437
|
+
_this18.$emit('key-press', e, _this18.triggerQuery);
|
|
28423
28438
|
},
|
|
28424
|
-
input:
|
|
28439
|
+
input: _this18.onInputChange,
|
|
28425
28440
|
focus: function focus(e) {
|
|
28426
|
-
|
|
28441
|
+
_this18.$emit('focus', e, _this18.triggerQuery);
|
|
28427
28442
|
},
|
|
28428
|
-
keydown:
|
|
28443
|
+
keydown: _this18.handleKeyDown,
|
|
28429
28444
|
keyup: function keyup(e) {
|
|
28430
|
-
|
|
28431
|
-
|
|
28445
|
+
_this18.$emit('keyUp', e, _this18.triggerQuery);
|
|
28446
|
+
_this18.$emit('key-up', e, _this18.triggerQuery);
|
|
28432
28447
|
}
|
|
28433
28448
|
}), {
|
|
28434
28449
|
"searchBox": true,
|
|
28435
|
-
"class": getClassName$3(
|
|
28436
|
-
"placeholder":
|
|
28437
|
-
"autofocus":
|
|
28438
|
-
"value":
|
|
28439
|
-
"iconPosition":
|
|
28440
|
-
"showIcon":
|
|
28441
|
-
"showClear":
|
|
28442
|
-
"ref":
|
|
28443
|
-
"themePreset":
|
|
28450
|
+
"class": getClassName$3(_this18.$props.innerClass, 'input') || '',
|
|
28451
|
+
"placeholder": _this18.$props.placeholder,
|
|
28452
|
+
"autofocus": _this18.$props.autoFocus,
|
|
28453
|
+
"value": _this18.$data.currentValue ? _this18.$data.currentValue : '',
|
|
28454
|
+
"iconPosition": _this18.$props.iconPosition,
|
|
28455
|
+
"showIcon": _this18.$props.showIcon,
|
|
28456
|
+
"showClear": _this18.$props.showClear,
|
|
28457
|
+
"ref": _this18.$props.innerRef,
|
|
28458
|
+
"themePreset": _this18.themePreset
|
|
28444
28459
|
}), null)];
|
|
28445
28460
|
}
|
|
28446
28461
|
}), vue.createVNode(Actions, null, {
|
|
28447
28462
|
"default": function _default() {
|
|
28448
|
-
return [
|
|
28463
|
+
return [_this18.renderRightIcons(), _this18.renderInputAddonAfter(), _this18.renderEnterButtonElement()];
|
|
28449
28464
|
}
|
|
28450
28465
|
})];
|
|
28451
28466
|
}
|
|
@@ -28664,7 +28679,10 @@
|
|
|
28664
28679
|
if (messagesHistory && Array.isArray(messagesHistory)) {
|
|
28665
28680
|
finalMessages.push.apply(finalMessages, messagesHistory.filter(function (msg) {
|
|
28666
28681
|
return msg.role !== constants_7$1.SYSTEM;
|
|
28667
|
-
})
|
|
28682
|
+
}));
|
|
28683
|
+
if (finalMessages[0].role === constants_7$1.USER) {
|
|
28684
|
+
finalMessages.shift();
|
|
28685
|
+
}
|
|
28668
28686
|
} else if (response && response.answer && response.answer.text) {
|
|
28669
28687
|
finalMessages.push({
|
|
28670
28688
|
role: constants_7$1.ASSISTANT,
|
|
@@ -44235,7 +44253,7 @@
|
|
|
44235
44253
|
}, queryString, renderFunction);
|
|
44236
44254
|
}
|
|
44237
44255
|
|
|
44238
|
-
var version = "3.0.
|
|
44256
|
+
var version = "3.0.5";
|
|
44239
44257
|
|
|
44240
44258
|
var components = [RLConnected, ResultCard, ResultList, ReactiveBase, SBConnected, ListConnected, ListConnected$1, RangeConnected$1, RangeConnected$2, RangeConnected$3, RangeConnected, RcConnected, RcConnected$1, RcConnected$2, TBConnected, ListConnected$2, ListConnected$3, StateProviderConnected, RangeConnected$4, TreeListConnected, AIConnected];
|
|
44241
44259
|
function install$1 (Vue) {
|