@appbaseio/reactivesearch-vue 3.0.6 → 3.1.0-alpha

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.
@@ -1191,7 +1191,7 @@
1191
1191
  geo: 'geo',
1192
1192
  suggestion: 'suggestion'
1193
1193
  };
1194
- var validProps = exports.validProps = ['type', 'componentType', 'aggregationField', 'aggregationSize', 'distinctField', 'distinctFieldConfig', 'index', 'aggregations', 'compoundClause', 'dataField', 'includeFields', 'excludeFields', 'size', 'from', 'sortBy', 'sortOptions', 'pagination', 'autoFocus', 'autosuggest', 'debounce', 'defaultValue', 'defaultSuggestions', 'fieldWeights', 'filterLabel', 'fuzziness', 'highlight', 'highlightConfig', 'highlightField', 'nestedField', 'placeholder', 'queryFormat', 'searchOperators', 'enableSynonyms', 'enableQuerySuggestions', 'queryString', 'categoryField', 'strictSelection', 'selectAllLabel', 'showCheckbox', 'showFilter', 'showSearch', 'showCount', 'showLoadMore', 'loadMoreLabel', 'showMissing', 'missingLabel', 'data', 'showRadio', 'multiSelect', 'includeNullValues', 'interval', 'showHistogram', 'snap', 'stepValue', 'range', 'showSlider', 'parseDate', 'calendarInterval', 'unit', 'enablePopularSuggestions', 'enableRecentSuggestions', 'popularSuggestionsConfig', 'recentSuggestionsConfig', 'indexSuggestionsConfig', 'featuredSuggestionsConfig', 'FAQSuggestionsConfig', 'enablePredictiveSuggestions', 'applyStopwords', 'customStopwords', 'enableIndexSuggestions', 'enableFeaturedSuggestions', 'enableFAQSuggestions', 'searchboxId', 'endpoint', 'enableEndpointSuggestions', 'enableAI', 'AIConfig'];
1194
+ var validProps = exports.validProps = ['type', 'componentType', 'aggregationField', 'aggregationSize', 'distinctField', 'distinctFieldConfig', 'index', 'aggregations', 'compoundClause', 'dataField', 'includeFields', 'excludeFields', 'size', 'from', 'sortBy', 'sortOptions', 'pagination', 'autoFocus', 'autosuggest', 'debounce', 'defaultValue', 'defaultSuggestions', 'fieldWeights', 'filterLabel', 'fuzziness', 'highlight', 'highlightConfig', 'highlightField', 'nestedField', 'placeholder', 'queryFormat', 'searchOperators', 'enableSynonyms', 'enableQuerySuggestions', 'queryString', 'categoryField', 'strictSelection', 'selectAllLabel', 'showCheckbox', 'showFilter', 'showSearch', 'showCount', 'showLoadMore', 'loadMoreLabel', 'showMissing', 'missingLabel', 'data', 'showRadio', 'multiSelect', 'includeNullValues', 'interval', 'showHistogram', 'snap', 'stepValue', 'range', 'showSlider', 'parseDate', 'calendarInterval', 'unit', 'enablePopularSuggestions', 'enableRecentSuggestions', 'popularSuggestionsConfig', 'recentSuggestionsConfig', 'indexSuggestionsConfig', 'featuredSuggestionsConfig', 'FAQSuggestionsConfig', 'documentSuggestionsConfig', 'enablePredictiveSuggestions', 'applyStopwords', 'customStopwords', 'enableIndexSuggestions', 'enableFeaturedSuggestions', 'enableFAQSuggestions', 'enableDocumentSuggestions', 'enableEndpointSuggestions', 'searchboxId', 'endpoint', 'enableAI', 'AIConfig'];
1195
1195
  var CLEAR_ALL = exports.CLEAR_ALL = {
1196
1196
  NEVER: 'never',
1197
1197
  ALWAYS: 'always',
@@ -6330,7 +6330,9 @@
6330
6330
  applyStopwords: props.applyStopwords,
6331
6331
  customStopwords: props.customStopwords,
6332
6332
  enablePredictiveSuggestions: props.enablePredictiveSuggestions,
6333
- indexSuggestionsConfig: props.indexSuggestionsConfig
6333
+ indexSuggestionsConfig: props.indexSuggestionsConfig,
6334
+ enableDocumentSuggestions: props.enableDocumentSuggestions,
6335
+ documentSuggestionsConfig: props.enableDocumentSuggestions ? props.documentSuggestionsConfig : undefined
6334
6336
  }, featuredSuggestionsProps, faqSuggestionsProps, {
6335
6337
  enableIndexSuggestions: props.enableIndexSuggestions
6336
6338
  }, props.searchboxId ? {
@@ -9301,7 +9303,10 @@
9301
9303
  if ("executing" === state) throw new Error("Generator is already running");
9302
9304
  if ("completed" === state) {
9303
9305
  if ("throw" === method) throw arg;
9304
- return doneResult();
9306
+ return {
9307
+ value: void 0,
9308
+ done: !0
9309
+ };
9305
9310
  }
9306
9311
  for (context.method = method, context.arg = arg;;) {
9307
9312
  var delegate = context.delegate;
@@ -9354,7 +9359,7 @@
9354
9359
  }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
9355
9360
  }
9356
9361
  function values(iterable) {
9357
- if (iterable) {
9362
+ if (iterable || "" === iterable) {
9358
9363
  var iteratorMethod = iterable[iteratorSymbol];
9359
9364
  if (iteratorMethod) return iteratorMethod.call(iterable);
9360
9365
  if ("function" == typeof iterable.next) return iterable;
@@ -9367,15 +9372,7 @@
9367
9372
  return next.next = next;
9368
9373
  }
9369
9374
  }
9370
- return {
9371
- next: doneResult
9372
- };
9373
- }
9374
- function doneResult() {
9375
- return {
9376
- value: undefined,
9377
- done: !0
9378
- };
9375
+ throw new TypeError(typeof iterable + " is not iterable");
9379
9376
  }
9380
9377
  return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
9381
9378
  value: GeneratorFunctionPrototype,
@@ -17773,7 +17770,7 @@
17773
17770
  };
17774
17771
 
17775
17772
  /**!
17776
- * hotkeys-js v3.11.2
17773
+ * hotkeys-js v3.12.0
17777
17774
  * A simple micro-library for defining and dispatching keyboard shortcuts. It has no dependencies.
17778
17775
  *
17779
17776
  * Copyright (c) 2023 kenny wong <wowohoo@qq.com>
@@ -17960,6 +17957,26 @@
17960
17957
  return getKey(c) || getModifier(c) || String.fromCharCode(c);
17961
17958
  });
17962
17959
  }
17960
+ function getAllKeyCodes() {
17961
+ var result = [];
17962
+ Object.keys(_handlers).forEach(function (k) {
17963
+ _handlers[k].forEach(function (_ref) {
17964
+ var key = _ref.key,
17965
+ scope = _ref.scope,
17966
+ mods = _ref.mods,
17967
+ shortcut = _ref.shortcut;
17968
+ result.push({
17969
+ scope: scope,
17970
+ shortcut: shortcut,
17971
+ mods: mods,
17972
+ keys: key.split('+').map(function (v) {
17973
+ return code(v);
17974
+ })
17975
+ });
17976
+ });
17977
+ });
17978
+ return result;
17979
+ }
17963
17980
 
17964
17981
  // 表单控件控件判断 返回 Boolean
17965
17982
  // hotkey is effective only when filter return true
@@ -18062,12 +18079,12 @@
18062
18079
  }
18063
18080
 
18064
18081
  // 解除绑定某个范围的快捷键
18065
- var eachUnbind = function eachUnbind(_ref) {
18066
- var key = _ref.key,
18067
- scope = _ref.scope,
18068
- method = _ref.method,
18069
- _ref$splitKey = _ref.splitKey,
18070
- splitKey = _ref$splitKey === void 0 ? '+' : _ref$splitKey;
18082
+ var eachUnbind = function eachUnbind(_ref2) {
18083
+ var key = _ref2.key,
18084
+ scope = _ref2.scope,
18085
+ method = _ref2.method,
18086
+ _ref2$splitKey = _ref2.splitKey,
18087
+ splitKey = _ref2$splitKey === void 0 ? '+' : _ref2$splitKey;
18071
18088
  var multipleKeys = getKeys(key);
18072
18089
  multipleKeys.forEach(function (originKey) {
18073
18090
  var unbindKeys = originKey.split(splitKey);
@@ -18319,6 +18336,7 @@
18319
18336
  getScope: getScope,
18320
18337
  deleteScope: deleteScope,
18321
18338
  getPressedKeyCodes: getPressedKeyCodes,
18339
+ getAllKeyCodes: getAllKeyCodes,
18322
18340
  isPressed: isPressed,
18323
18341
  filter: filter,
18324
18342
  trigger: trigger,
@@ -24897,7 +24915,7 @@
24897
24915
  var InputWrapper = styled('span')(_templateObject$9 || (_templateObject$9 = _taggedTemplateLiteralLoose(["\n\tflex: 1;\n\tposition: relative;\n\theight: 42px;\n"])));
24898
24916
 
24899
24917
  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 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"])));
24918
+ 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 #ccc;\n border-radius: 2px;\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
24919
  InputAddon.defaultProps = {
24902
24920
  className: 'input-addon'
24903
24921
  };
@@ -24969,9 +24987,9 @@
24969
24987
  };
24970
24988
  var suggestionsContainer = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteralLoose(["\n\tposition: relative;\n\t.cancel-icon {\n\t\tcursor: pointer;\n\t}\n"])));
24971
24989
  var noSuggestions = function noSuggestions(themePreset, theme) {
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));
24990
+ return css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteralLoose(["\n\tdisplay: block;\n\twidth: 100%;\n\tborder: 1px solid #ccc;\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\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
24991
  };
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) {
24992
+ 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) {
24975
24993
  return input(props.searchBox);
24976
24994
  }, function (_ref4) {
24977
24995
  var themePreset = _ref4.themePreset,
@@ -25809,7 +25827,30 @@
25809
25827
  name: 'SuggestionItem',
25810
25828
  props: {
25811
25829
  currentValue: types.string,
25812
- suggestion: types.any
25830
+ suggestion: types.any,
25831
+ innerHTML: types.string.isRequired
25832
+ },
25833
+ data: function data() {
25834
+ return {
25835
+ isOverflowing: false
25836
+ };
25837
+ },
25838
+ methods: {
25839
+ updateOverflowing: function updateOverflowing() {
25840
+ if (this.$refs.container && this.$refs.content) {
25841
+ var _this$$refs = this.$refs,
25842
+ container = _this$$refs.container,
25843
+ content = _this$$refs.content;
25844
+ var containerWidth = container.offsetWidth;
25845
+ var contentWidth = content.scrollWidth;
25846
+ this.isOverflowing = contentWidth > containerWidth;
25847
+ } else {
25848
+ this.isOverflowing = false;
25849
+ }
25850
+ }
25851
+ },
25852
+ mounted: function mounted() {
25853
+ this.updateOverflowing();
25813
25854
  },
25814
25855
  render: function render() {
25815
25856
  var _this = this;
@@ -25825,7 +25866,11 @@
25825
25866
  if (label) {
25826
25867
  // label has highest precedence
25827
25868
  return typeof label === 'string' ? vue.createVNode("div", {
25828
- "class": "trim"
25869
+ "ref": "container",
25870
+ "class": "trim",
25871
+ "title": this.isOverflowing ? label : ''
25872
+ }, [vue.createVNode("div", {
25873
+ "ref": "content"
25829
25874
  }, [(_category ? false : isPredictiveSuggestion
25830
25875
  // eslint-disable-next-line
25831
25876
  || !!_suggestion_type) ? vue.createVNode(PredictiveSuggestion, {
@@ -25835,7 +25880,7 @@
25835
25880
  "textToHighlight": label,
25836
25881
  "autoEscape": true,
25837
25882
  "highlightStyle": highlightStyle
25838
- }, null)]) : label;
25883
+ }, null)])]) : label;
25839
25884
  }
25840
25885
  if (title || image || description) {
25841
25886
  return vue.createVNode(Flex, {
@@ -26524,7 +26569,7 @@
26524
26569
 
26525
26570
  var _templateObject$k, _templateObject2$8, _templateObject3$5, _templateObject4$2, _templateObject5$2, _templateObject6$1, _templateObject7$1, _templateObject8$1, _templateObject9$1, _templateObject10, _templateObject11;
26526
26571
  var Chatbox = styled('div')(_templateObject$k || (_templateObject$k = _taggedTemplateLiteralLoose(["\n\tposition: relative;\n\tmargin: 0 auto;\n\tpadding: 10px;\n\tbackground-color: #fafafa;\n\twidth: 100%;\n\tbox-shadow: rgb(0 0 0 / 20%) 0px 0px 6px;\n\tborder-radius: 6px;\n\tmargin-bottom: 20px;\n\tbackground-color: ", ";\n\n\t.--trigger-message-wrapper {\n\t\tcursor: pointer;\n\t}\n"])), function (props) {
26527
- return props.theme && props.theme.colors && props.theme.colors.backgroundColor ? curriedLighten(0.1, props.theme.colors.backgroundColor) : '#fff';
26572
+ return props.theme && props.theme.colors ? props.theme.colors.backgroundColor : '#fff';
26528
26573
  });
26529
26574
  var ChatContainer = styled('div')(_templateObject2$8 || (_templateObject2$8 = _taggedTemplateLiteralLoose(["\n\tdisplay: flex;\n\tflex-direction: column;\n\theight: 100%;\n\tposition: relative;\n\t.--ai-answer-error-container {\n\t\ttext-align: center;\n\t\tposition: absolute;\n\t\tbottom: 0px;\n\t\t", ";\n\t\tz-index: 1;\n\t\tleft: 50%;\n\t\ttransform: translateX(-50%);\n\t\twidth: 100%;\n\n\t\t.--default-error-element {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\talign-items: center;\n\t\t\tpadding: 10px;\n\t\t\tbackground-color: ", ";\n\t\t\tbox-shadow: 0 -5px 5px -2px\n\t\t\t\t", ";\n\n\t\t\tspan {\n\t\t\t\tmargin-bottom: 5px;\n\t\t\t}\n\n\t\t\tbutton {\n\t\t\t}\n\t\t}\n\t}\n\n\t", ";\n"])), function (props) {
26530
26575
  return props.showInput ? 'bottom: 48px;' : '';
@@ -26556,7 +26601,7 @@
26556
26601
  // eslint-disable-next-line no-nested-ternary
26557
26602
  props.isSender ? props.themePreset !== 'dark' ? props.theme.colors.primaryTextColor : props.theme.colors.textColor : props.theme.colors.primaryTextColor) + ";\n\t\tborder-radius: 3px;\n\t\tfont-size: 85%;\n\t\tpadding: 0.2em 0.4em;\n\t\tmargin-top: 5px;\n\t\tdisplay: inline-block;\n\t\toverflow: auto;\n\t\twidth: fit-content;\n\t\tmax-width: 100%;\n\t}\n\ncode[class*='language-'],\n\tpre[class*='language-'] {\n\t\tcolor: " + (
26558
26603
  // eslint-disable-next-line no-nested-ternary
26559
- props.isSender ? props.themePreset !== 'dark' ? props.theme.colors.primaryTextColor : props.theme.colors.textColor : props.theme.colors.primaryTextColor) + ";\n\t\ttext-shadow: none;\n\t}\n\n\tul,\n\tol {\n\t\tlist-style-position: inside;\n\t\tpadding-left: 10px;\n\n\t}\n\n\tli{\n\t\tdisplay: list-item;\n\t\tcursor: default;\n\t\tpadding: initial;\n\n\t\t&:hover{\n\t\t\tbackground-color: initial;\n\t\t}\n\t}\n\tp {\n\t\tmargin: inherit;\n\t}\n\n\t" + (props.themePreset === 'dark' && "a{\n\t\tcolor: cornflowerblue\n\t\t}") + ";\n";
26604
+ props.isSender ? props.themePreset !== 'dark' ? props.theme.colors.primaryTextColor : props.theme.colors.textColor : props.theme.colors.primaryTextColor) + ";\n\t\ttext-shadow: none;\n\t}\n\n\tul,\n\tol {\n\t\tlist-style-position: inside;\n\t\tpadding-left: 10px;\n\n\t}\n\n\tli{\n\t\tdisplay: list-item;\n\t\tcursor: default;\n\t\tpadding: initial;\n\n\t\t&:hover{\n\t\t\tbackground-color: initial;\n\t\t}\n\t}\n\tp {\n\t\tmargin: inherit;\n\t}\n";
26560
26605
  };
26561
26606
  var messageBGColor = function messageBGColor(props) {
26562
26607
  var finalBGColor;
@@ -26585,10 +26630,16 @@
26585
26630
  return resetCSS(props);
26586
26631
  });
26587
26632
  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", "\n\tpadding-left: 35px;\n"])), function (props) {
26633
+ 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::placeholder {\n\t\tcolor: ", ";\n\t}\n\n\t:-ms-input-placeholder {\n\t\tcolor: ", ";\n\t}\n\n\t::-ms-input-placeholder {\n\t\tcolor: ", ";\n\t}\n\t", "\n\tpadding-left: 35px;\n"])), function (props) {
26589
26634
  return props.themePreset === 'dark' ? props.theme.colors.borderColor : '#fff';
26590
26635
  }, function (props) {
26591
26636
  return props.themePreset === 'dark' ? props.theme.colors.titleColor : props.theme.colors.textColor;
26637
+ }, function (props) {
26638
+ return props.theme.colors.textColor;
26639
+ }, function (props) {
26640
+ return props.theme.colors.textColor;
26641
+ }, function (props) {
26642
+ return props.theme.colors.textColor;
26592
26643
  }, function (_ref) {
26593
26644
  var enterButton = _ref.enterButton;
26594
26645
  return enterButton && "\n\t\t border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n\t";
@@ -26793,6 +26844,42 @@
26793
26844
  }
26794
26845
  });
26795
26846
 
26847
+ // eslint-disable-next-line import/prefer-default-export
26848
+ var innerText = function innerText(jsx) {
26849
+ // Empty
26850
+ if (jsx === null || typeof jsx === 'boolean' || typeof jsx === 'undefined') {
26851
+ return '';
26852
+ }
26853
+
26854
+ // Numeric children.
26855
+ if (typeof jsx === 'number') {
26856
+ return jsx.toString();
26857
+ }
26858
+
26859
+ // String literals.
26860
+ if (typeof jsx === 'string') {
26861
+ return jsx;
26862
+ }
26863
+
26864
+ // Array of JSX.
26865
+ if (Array.isArray(jsx)) {
26866
+ // eslint-disable-next-line no-use-before-define
26867
+ return jsx.reduce(reduceJsxToString, '');
26868
+ }
26869
+
26870
+ // Children prop.
26871
+ if (Object.prototype.hasOwnProperty.call(jsx, 'children')) {
26872
+ return innerText(jsx.children);
26873
+ }
26874
+
26875
+ // Default
26876
+ return '';
26877
+ };
26878
+ innerText["default"] = innerText;
26879
+ function reduceJsxToString(previous, current) {
26880
+ return previous + innerText(current);
26881
+ }
26882
+
26796
26883
  var _excluded$1 = ["_source"];
26797
26884
  function _isSlot$5(s) {
26798
26885
  return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !vue.isVNode(s);
@@ -26833,8 +26920,7 @@
26833
26920
  showFeedbackComponent: false,
26834
26921
  feedbackState: null,
26835
26922
  faqAnswer: '',
26836
- faqQuestion: '',
26837
- initialHits: null
26923
+ faqQuestion: ''
26838
26924
  };
26839
26925
  this.internalComponent = props.componentId + "__internal";
26840
26926
  return this.__state;
@@ -26886,11 +26972,12 @@
26886
26972
  return this.faqAnswer || this.AIResponse && this.AIResponse.response && this.AIResponse.response.answer && this.AIResponse.response.answer.text;
26887
26973
  },
26888
26974
  parsedSuggestions: function parsedSuggestions() {
26975
+ var _this = this;
26889
26976
  var suggestionsArray = [];
26890
26977
  if (Array.isArray(this.suggestions) && this.suggestions.length) {
26891
26978
  suggestionsArray = [].concat(withClickIds(this.suggestions));
26892
26979
  }
26893
- if (this.renderTriggerMessage() && this.currentValue) {
26980
+ if (this.renderTriggerMessage() && this.currentValue && !this.isLoading) {
26894
26981
  suggestionsArray.unshift({
26895
26982
  label: this.renderTriggerMessage(),
26896
26983
  value: 'AI_TRIGGER_MESSAGE',
@@ -26904,6 +26991,20 @@
26904
26991
  return _extends({}, s, {
26905
26992
  sectionId: s._suggestion_type
26906
26993
  });
26994
+ }).map(function (suggestion) {
26995
+ if (suggestion._suggestion_type === 'document') {
26996
+ // Document suggestions don't have a meaningful label and value
26997
+ var newSuggestion = _extends({}, suggestion);
26998
+ newSuggestion.label = 'For recent document suggestion, please implement a renderItem method to display label.';
26999
+ var renderItem = _this.$slots.renderItem || _this.$props.renderItem;
27000
+ if (typeof renderItem === 'function') {
27001
+ var jsxEl = renderItem(newSuggestion);
27002
+ var innerValue = innerText(jsxEl);
27003
+ newSuggestion.value = lib$2(innerValue);
27004
+ }
27005
+ return newSuggestion;
27006
+ }
27007
+ return suggestion;
26907
27008
  });
26908
27009
  var sectionsAccumulated = [];
26909
27010
  var sectionisedSuggestions = suggestionsArray.reduce(function (acc, d, currentIndex) {
@@ -26952,6 +27053,12 @@
26952
27053
  enablePopularSuggestions: Q.bool.def(false),
26953
27054
  enableRecentSuggestions: Q.bool.def(false),
26954
27055
  enableFAQSuggestions: Q.bool.def(false),
27056
+ enableDocumentSuggestions: Q.bool.def(false),
27057
+ documentSuggestionsConfig: Q.shape({
27058
+ size: Q.number,
27059
+ from: Q.number,
27060
+ maxChars: Q.number
27061
+ }),
26955
27062
  FAQSuggestionsConfig: Q.shape({
26956
27063
  sectionLabel: Q.string,
26957
27064
  size: Q.number
@@ -27020,47 +27127,9 @@
27020
27127
  AIUIConfig: types.AIUIConfig
27021
27128
  },
27022
27129
  mounted: function mounted() {
27023
- var _this = this;
27024
27130
  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
- }
27040
- },
27041
- updated: function updated() {
27042
- if (this.$props.mode === constants_5$1.SELECT && this.$options.isTagsMode === true) {
27043
- this.$options.isTagsMode = false;
27044
- this.selectedTags = [];
27045
- } else if (this.$props.mode === constants_5$1.TAG && this.$options.isTagsMode === false) {
27046
- this.$options.isTagsMode = true;
27047
- }
27048
27131
  },
27049
27132
  watch: {
27050
- AIResponse: function AIResponse(newVal) {
27051
- if (newVal) {
27052
- if (this.$props.AIUIConfig && this.$props.AIUIConfig.showSourceDocuments && newVal.response && newVal.response.answer && Array.isArray(newVal.response.answer.documentIds)) {
27053
- this.sourceDocIds = newVal.response.answer.documentIds;
27054
- var localCache = helper_2(constants_8$1) && helper_2(constants_8$1)[this.$props.componentId];
27055
- if (localCache && localCache.meta && localCache.meta.hits && localCache.meta.hits.hits) {
27056
- this.initialHits = localCache.meta.hits.hits;
27057
- }
27058
- if (!this.showAIScreenFooter) {
27059
- this.showAIScreenFooter = true;
27060
- }
27061
- }
27062
- }
27063
- },
27064
27133
  dataField: function dataField(newVal, oldVal) {
27065
27134
  if (!isEqual$4(newVal, oldVal)) {
27066
27135
  this.triggerCustomQuery(this.$data.currentValue);
@@ -27135,9 +27204,6 @@
27135
27204
  loading: this.isLoading,
27136
27205
  error: this.isError
27137
27206
  });
27138
- if (newVal && newVal.hits && newVal.hits.hits) {
27139
- this.initialHits = newVal.hits.hits;
27140
- }
27141
27207
  },
27142
27208
  aggregationData: function aggregationData(newVal) {
27143
27209
  this.$emit('on-data', {
@@ -27174,7 +27240,6 @@
27174
27240
  isAITyping: function isAITyping(newVal, oldVal) {
27175
27241
  var _this2 = this;
27176
27242
  var scrollAIContainer = function scrollAIContainer() {
27177
- if (_this2.isUserScrolling) return;
27178
27243
  var dropdownEle = _this2.$refs[_dropdownULRef];
27179
27244
  if (dropdownEle) {
27180
27245
  dropdownEle.scrollTo({
@@ -27184,7 +27249,6 @@
27184
27249
  }
27185
27250
  };
27186
27251
  if (!newVal && oldVal) {
27187
- clearInterval(this.scrollTimerRef);
27188
27252
  this.showAIScreenFooter = true;
27189
27253
  if (this.$props.AIUIConfig && typeof this.$props.AIUIConfig.showFeedback === 'boolean' ? this.$props.AIUIConfig.showFeedback : true) {
27190
27254
  this.showFeedbackComponent = true;
@@ -27193,7 +27257,7 @@
27193
27257
  scrollAIContainer();
27194
27258
  }, 500);
27195
27259
  } else if (newVal) {
27196
- this.scrollTimerRef = setInterval(function () {
27260
+ this.scrollTimerRef = setTimeout(function () {
27197
27261
  scrollAIContainer();
27198
27262
  }, 2000);
27199
27263
  }
@@ -27210,7 +27274,7 @@
27210
27274
  }
27211
27275
  },
27212
27276
  currentValue: function currentValue() {
27213
- this.$nextTick(this.handleTextAreaHeightChange);
27277
+ this.handleTextAreaHeightChange();
27214
27278
  }
27215
27279
  },
27216
27280
  methods: {
@@ -28012,13 +28076,13 @@
28012
28076
  });
28013
28077
  },
28014
28078
  getAISourceObjects: function getAISourceObjects() {
28015
- var _this14 = this;
28079
+ var localCache = helper_2(constants_8$1) && helper_2(constants_8$1)[this.componentId];
28016
28080
  var sourceObjects = [];
28017
28081
  if (!this.AIResponse) return sourceObjects;
28018
28082
  var docIds = this.AIResponse && this.AIResponse.response && this.AIResponse.response.answer && this.AIResponse.response.answer.documentIds || [];
28019
- if (this.initialHits) {
28083
+ if (localCache && localCache.meta && localCache.meta.hits && localCache.meta.hits.hits) {
28020
28084
  docIds.forEach(function (id) {
28021
- var foundSourceObj = _this14.initialHits.find(function (hit) {
28085
+ var foundSourceObj = localCache.meta.hits.hits.find(function (hit) {
28022
28086
  return hit._id === id;
28023
28087
  }) || {};
28024
28088
  if (foundSourceObj) {
@@ -28052,31 +28116,31 @@
28052
28116
  },
28053
28117
  renderAIScreenFooter: function renderAIScreenFooter() {
28054
28118
  var _slot8;
28055
- var _this15 = this;
28119
+ var _this14 = this;
28056
28120
  var _this$$props$AIUIConf2 = this.$props.AIUIConfig,
28057
28121
  AIUIConfig = _this$$props$AIUIConf2 === void 0 ? {} : _this$$props$AIUIConf2;
28058
28122
  var _ref6 = AIUIConfig || {},
28059
28123
  _ref6$showSourceDocum = _ref6.showSourceDocuments,
28060
- showSourceDocuments = _ref6$showSourceDocum === void 0 ? false : _ref6$showSourceDocum,
28124
+ showSourceDocuments = _ref6$showSourceDocum === void 0 ? true : _ref6$showSourceDocum,
28061
28125
  _ref6$onSourceClick = _ref6.onSourceClick,
28062
28126
  onSourceClick = _ref6$onSourceClick === void 0 ? function () {} : _ref6$onSourceClick;
28063
28127
  var renderSourceDocumentLabel = function renderSourceDocumentLabel(sourceObj) {
28064
- if (_this15.$props.AIUIConfig && _this15.$props.AIUIConfig.renderSourceDocument) {
28065
- return _this15.$props.AIUIConfig.renderSourceDocument(sourceObj);
28128
+ if (_this14.$props.AIUIConfig && _this14.$props.AIUIConfig.renderSourceDocument) {
28129
+ return _this14.$props.AIUIConfig.renderSourceDocument(sourceObj);
28066
28130
  }
28067
- if (_this15.$slots.renderSourceDocument) {
28068
- return _this15.$slots.renderSourceDocument(sourceObj);
28131
+ if (_this14.$slots.renderSourceDocument) {
28132
+ return _this14.$slots.renderSourceDocument(sourceObj);
28069
28133
  }
28070
28134
  return sourceObj._id;
28071
28135
  };
28072
- return showSourceDocuments && this.showAIScreenFooter && this.AIResponse && this.AIResponse.response && this.AIResponse.response.answer && this.AIResponse.response.answer.documentIds && this.AIResponse.response.answer.documentIds.length ? vue.createVNode(Footer, {
28136
+ return showSourceDocuments && this.showAIScreenFooter && this.AIResponse && this.AIResponse.response && this.AIResponse.response.answer && this.AIResponse.response.answer.documentIds ? vue.createVNode(Footer, {
28073
28137
  "themePreset": this.$props.themePreset
28074
28138
  }, {
28075
28139
  "default": function _default() {
28076
- return [vue.createTextVNode("Summary generated using the following sources:"), ' ', vue.createVNode(SourceTags, null, _isSlot$5(_slot8 = _this15.getAISourceObjects().map(function (el) {
28140
+ return [vue.createTextVNode("Summary generated using the following sources:"), ' ', vue.createVNode(SourceTags, null, _isSlot$5(_slot8 = _this14.getAISourceObjects().map(function (el) {
28077
28141
  var _slot7;
28078
28142
  return vue.createVNode(Button, {
28079
- "class": "--ai-source-tag " + (getClassName$3(_this15.$props.innerClass, 'ai-source-tag') || ''),
28143
+ "class": "--ai-source-tag " + (getClassName$3(_this14.$props.innerClass, 'ai-source-tag') || ''),
28080
28144
  "info": true,
28081
28145
  "onClick": function onClick() {
28082
28146
  return onSourceClick && onSourceClick(el);
@@ -28095,7 +28159,7 @@
28095
28159
  }) : null;
28096
28160
  },
28097
28161
  renderAIScreen: function renderAIScreen() {
28098
- var _this16 = this;
28162
+ var _this15 = this;
28099
28163
  var customAIRenderer = this.$props.renderAIAnswer || this.$slots.renderAIAnswer;
28100
28164
  if (customAIRenderer) {
28101
28165
  return customAIRenderer({
@@ -28119,11 +28183,11 @@
28119
28183
  "hideUI": this.isAIResponseLoading || this.isLoading || !this.sessionIdFromStore,
28120
28184
  "key": this.sessionIdFromStore,
28121
28185
  "onFeedbackSubmit": function onFeedbackSubmit(useful, reason) {
28122
- _this16.feedbackState = {
28186
+ _this15.feedbackState = {
28123
28187
  isRecorded: true,
28124
28188
  feedbackType: useful ? 'positive' : 'negative'
28125
28189
  };
28126
- _this16.recordAISessionUsefulness(_this16.sessionIdFromStore, {
28190
+ _this15.recordAISessionUsefulness(_this15.sessionIdFromStore, {
28127
28191
  useful: useful,
28128
28192
  reason: reason
28129
28193
  });
@@ -28158,7 +28222,7 @@
28158
28222
  });
28159
28223
  },
28160
28224
  renderAskButtonElement: function renderAskButtonElement() {
28161
- var _this17 = this;
28225
+ var _this16 = this;
28162
28226
  var _this$$props5 = this.$props,
28163
28227
  AIUIConfig = _this$$props5.AIUIConfig,
28164
28228
  innerClass = _this$$props5.innerClass;
@@ -28168,12 +28232,12 @@
28168
28232
  if (askButton) {
28169
28233
  var getEnterButtonMarkup = function getEnterButtonMarkup() {
28170
28234
  if (renderAskButton) {
28171
- return renderAskButton(_this17.askButtonOnClick);
28235
+ return renderAskButton(_this16.askButtonOnClick);
28172
28236
  }
28173
28237
  return vue.createVNode(Button, {
28174
28238
  "class": "enter-btn " + getClassName$3(innerClass, 'ask-button'),
28175
28239
  "info": true,
28176
- "onClick": _this17.askButtonOnClick
28240
+ "onClick": _this16.askButtonOnClick
28177
28241
  }, {
28178
28242
  "default": function _default() {
28179
28243
  return [vue.createTextVNode("Ask")];
@@ -28188,28 +28252,28 @@
28188
28252
  }
28189
28253
  },
28190
28254
  render: function render() {
28191
- var _this18 = this;
28255
+ var _this17 = this;
28192
28256
  var expandSuggestionsContainer = this.$props.expandSuggestionsContainer;
28193
28257
  var _this$$slots = this.$slots,
28194
28258
  recentSearchesIcon = _this$$slots.recentSearchesIcon,
28195
28259
  popularSearchesIcon = _this$$slots.popularSearchesIcon;
28196
- var hasSuggestions = Array.isArray(this.parsedSuggestions) && this.parsedSuggestions.length;
28260
+ var hasSuggestions = Array.isArray(this.normalizedSuggestions) && this.normalizedSuggestions.length;
28197
28261
  var renderItem = this.$slots.renderItem || this.$props.renderItem;
28198
28262
  return vue.createVNode(Container, {
28199
28263
  "class": this.$props.className
28200
28264
  }, {
28201
28265
  "default": function _default() {
28202
- return [_this18.$props.title && vue.createVNode(Title, {
28203
- "class": getClassName$3(_this18.$props.innerClass, 'title') || ''
28266
+ return [_this17.$props.title && vue.createVNode(Title, {
28267
+ "class": getClassName$3(_this17.$props.innerClass, 'title') || ''
28204
28268
  }, {
28205
28269
  "default": function _default() {
28206
- return [_this18.$props.title];
28270
+ return [_this17.$props.title];
28207
28271
  }
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
28272
+ }), _this17.$props.autosuggest ? vue.createVNode(Downshift, {
28273
+ "id": _this17.$props.componentId + "-downshift",
28274
+ "handleChange": _this17.onSuggestionSelected,
28275
+ "handleMouseup": _this17.handleStateChange,
28276
+ "isOpen": _this17.$data.isOpen
28213
28277
  }, {
28214
28278
  "default": function _default(_ref8) {
28215
28279
  var getInputEvents = _ref8.getInputEvents,
@@ -28265,21 +28329,21 @@
28265
28329
  }
28266
28330
  };
28267
28331
  var indexOffset = 0;
28268
- return vue.createVNode("div", null, [_this18.hasCustomRenderer && _this18.getComponent({
28332
+ return vue.createVNode("div", null, [_this17.hasCustomRenderer && _this17.getComponent({
28269
28333
  isOpen: isOpen,
28270
28334
  getItemProps: getItemProps,
28271
28335
  getItemEvents: getItemEvents,
28272
28336
  highlightedIndex: highlightedIndex
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",
28337
+ }), _this17.renderErrorComponent(), !_this17.hasCustomRenderer && isOpen && hasSuggestions ? vue.createVNode("ul", {
28338
+ "class": suggestions$1(_this17.themePreset, _this17.theme) + " " + getClassName$3(_this17.$props.innerClass, 'list') + " " + searchboxSuggestions(_this17.themePreset, _this17.theme) + "\n\t\t\t\t\t\t\t\t\t\t\t\t\t",
28275
28339
  "ref": _dropdownULRef
28276
- }, [_this18.showAIScreen && vue.createVNode(SearchBoxAISection, {
28277
- "themePreset": _this18.$props.themePreset
28340
+ }, [_this17.showAIScreen && vue.createVNode(SearchBoxAISection, {
28341
+ "themePreset": _this17.$props.themePreset
28278
28342
  }, {
28279
28343
  "default": function _default() {
28280
- return [_this18.renderAIScreen(), ' ', _this18.renderErrorComponent(true)];
28344
+ return [_this17.renderAIScreen(), ' ', _this17.renderErrorComponent(true)];
28281
28345
  }
28282
- }), !_this18.showAIScreen && _this18.parsedSuggestions.map(function (item, itemIndex) {
28346
+ }), !_this17.showAIScreen && _this17.parsedSuggestions.map(function (item, itemIndex) {
28283
28347
  var index = indexOffset + itemIndex;
28284
28348
  if (Array.isArray(item)) {
28285
28349
  var sectionHtml = lib$2(item[0].sectionLabel);
@@ -28288,7 +28352,7 @@
28288
28352
  "key": "section-" + itemIndex,
28289
28353
  "class": "section-container"
28290
28354
  }, [sectionHtml ? vue.createVNode("div", {
28291
- "class": "section-header " + getClassName$3(_this18.$props.innerClass, 'section-label'),
28355
+ "class": "section-header " + getClassName$3(_this17.$props.innerClass, 'section-label'),
28292
28356
  "key": "" + item[0].sectionId,
28293
28357
  "innerHTML": sectionHtml
28294
28358
  }, null) : null, vue.createVNode("ul", {
@@ -28308,7 +28372,7 @@
28308
28372
  justifyContent: 'flex-start',
28309
28373
  alignItems: 'center'
28310
28374
  },
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'))
28375
+ "class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$3(_this17.$props.innerClass, 'active-suggestion-item') : "li-item " + getClassName$3(_this17.$props.innerClass, 'suggestion-item'))
28312
28376
  }), [renderItem(sectionItem)]);
28313
28377
  }
28314
28378
  if (sectionItem._suggestion_type === '_internal_a_i_trigger') {
@@ -28322,9 +28386,9 @@
28322
28386
  justifyContent: 'flex-start',
28323
28387
  alignItems: 'center'
28324
28388
  },
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'))
28389
+ "class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$3(_this17.$props.innerClass, 'active-suggestion-item') : "li-item " + getClassName$3(_this17.$props.innerClass, 'suggestion-item'))
28326
28390
  }), [vue.createVNode(SuggestionItem, {
28327
- "currentValue": _this18.currentValue,
28391
+ "currentValue": _this17.currentValue,
28328
28392
  "suggestion": sectionItem
28329
28393
  }, null)]);
28330
28394
  }
@@ -28338,7 +28402,7 @@
28338
28402
  justifyContent: 'flex-start',
28339
28403
  alignItems: 'center'
28340
28404
  },
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'))
28405
+ "class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$3(_this17.$props.innerClass, 'active-suggestion-item') : "li-item " + getClassName$3(_this17.$props.innerClass, 'suggestion-item'))
28342
28406
  }), [vue.createVNode("div", {
28343
28407
  "style": {
28344
28408
  padding: '0 10px 0 0',
@@ -28346,74 +28410,74 @@
28346
28410
  }
28347
28411
  }, [vue.createVNode(CustomSvg, {
28348
28412
  "key": sectionItem._suggestion_type + "-" + sectionIndex,
28349
- "className": getClassName$3(_this18.$props.innerClass, sectionItem._suggestion_type + "-search-icon") || null,
28413
+ "className": getClassName$3(_this17.$props.innerClass, sectionItem._suggestion_type + "-search-icon") || null,
28350
28414
  "icon": getIcon(sectionItem._suggestion_type, sectionItem, suggestionsHaveIcon),
28351
28415
  "type": sectionItem._suggestion_type + "-search-icon"
28352
28416
  }, null)]), vue.createVNode(SuggestionItem, {
28353
- "currentValue": _this18.currentValue,
28417
+ "currentValue": _this17.currentValue,
28354
28418
  "suggestion": sectionItem
28355
- }, null), _this18.renderActionIcon(sectionItem)]);
28419
+ }, null), _this17.renderActionIcon(sectionItem)]);
28356
28420
  })])]);
28357
28421
  }
28358
28422
  return vue.createVNode("div", null, [vue.createTextVNode("No suggestions")]);
28359
- }), !_this18.showAIScreen && _this18.parsedSuggestions.length && _this18.$props.showSuggestionsFooter ? _this18.suggestionsFooter() : null]) : _this18.renderNoSuggestions(_this18.normalizedSuggestions)]);
28423
+ }), !_this17.showAIScreen && _this17.parsedSuggestions.length && _this17.$props.showSuggestionsFooter ? _this17.suggestionsFooter() : null]) : _this17.renderNoSuggestions(_this17.normalizedSuggestions)]);
28360
28424
  };
28361
28425
  return vue.createVNode("div", {
28362
28426
  "class": suggestionsContainer
28363
28427
  }, [vue.createVNode(InputGroup, {
28364
28428
  "searchBox": true,
28365
28429
  "ref": _inputGroupRef,
28366
- "isOpen": _this18.$data.isOpen
28430
+ "isOpen": _this17.$data.isOpen
28367
28431
  }, {
28368
28432
  "default": function _default() {
28369
28433
  return [vue.createVNode(Actions, null, {
28370
28434
  "default": function _default() {
28371
- return [_this18.renderInputAddonBefore(), _this18.renderLeftIcons()];
28435
+ return [_this17.renderInputAddonBefore(), _this17.renderLeftIcons()];
28372
28436
  }
28373
28437
  }), vue.createVNode(InputWrapper, null, {
28374
28438
  "default": function _default() {
28375
28439
  return [vue.createVNode(TextArea, vue.mergeProps(babelHelperVueTransformOn(getInputEvents({
28376
- onInput: _this18.onInputChange,
28440
+ onInput: _this17.onInputChange,
28377
28441
  onBlur: function onBlur(e) {
28378
- _this18.$emit('blur', e, _this18.triggerQuery);
28442
+ _this17.$emit('blur', e, _this17.triggerQuery);
28379
28443
  },
28380
- onFocus: _this18.handleFocus,
28444
+ onFocus: _this17.handleFocus,
28381
28445
  onKeyPress: function onKeyPress(e) {
28382
- _this18.$emit('keyPress', e, _this18.triggerQuery);
28383
- _this18.$emit('key-press', e, _this18.triggerQuery);
28446
+ _this17.$emit('keyPress', e, _this17.triggerQuery);
28447
+ _this17.$emit('key-press', e, _this17.triggerQuery);
28384
28448
  },
28385
28449
  onKeyDown: function onKeyDown(e) {
28386
- return _this18.handleKeyDown(e, highlightedIndex);
28450
+ return _this17.handleKeyDown(e, highlightedIndex);
28387
28451
  },
28388
28452
  onKeyUp: function onKeyUp(e) {
28389
- _this18.$emit('keyUp', e, _this18.triggerQuery);
28390
- _this18.$emit('key-up', e, _this18.triggerQuery);
28453
+ _this17.$emit('keyUp', e, _this17.triggerQuery);
28454
+ _this17.$emit('key-up', e, _this17.triggerQuery);
28391
28455
  },
28392
28456
  onClick: function onClick() {
28393
28457
  setHighlightedIndex(null);
28394
28458
  }
28395
28459
  })), {
28396
28460
  "searchBox": true,
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
28461
+ "isOpen": _this17.$data.isOpen,
28462
+ "id": _this17.$props.componentId + "-input",
28463
+ "ref": _this17.$props.innerRef,
28464
+ "class": getClassName$3(_this17.$props.innerClass, 'input'),
28465
+ "placeholder": _this17.$props.placeholder,
28466
+ "autoFocus": _this17.$props.autoFocus
28403
28467
  }, getInputProps({
28404
- value: _this18.$data.currentValue === null ? '' : _this18.$data.currentValue
28468
+ value: _this17.$data.currentValue === null ? '' : _this17.$data.currentValue
28405
28469
  }), {
28406
- "themePreset": _this18.themePreset,
28470
+ "themePreset": _this17.themePreset,
28407
28471
  "autocomplete": "off"
28408
28472
  }), null), !expandSuggestionsContainer && renderSuggestionsDropdown()];
28409
28473
  }
28410
28474
  }), vue.createVNode(Actions, null, {
28411
28475
  "default": function _default() {
28412
- return [_this18.renderRightIcons(), _this18.renderInputAddonAfter(), _this18.renderAskButtonElement(), _this18.renderEnterButtonElement()];
28476
+ return [_this17.renderRightIcons(), _this17.renderInputAddonAfter(), _this17.renderAskButtonElement(), _this17.renderEnterButtonElement()];
28413
28477
  }
28414
28478
  })];
28415
28479
  }
28416
- }), expandSuggestionsContainer && renderSuggestionsDropdown(), _this18.renderTags()]);
28480
+ }), expandSuggestionsContainer && renderSuggestionsDropdown(), _this17.renderTags()]);
28417
28481
  }
28418
28482
  }) : vue.createVNode("div", {
28419
28483
  "class": suggestionsContainer
@@ -28424,43 +28488,43 @@
28424
28488
  "default": function _default() {
28425
28489
  return [vue.createVNode(Actions, null, {
28426
28490
  "default": function _default() {
28427
- return [_this18.renderInputAddonBefore(), _this18.renderLeftIcons()];
28491
+ return [_this17.renderInputAddonBefore(), _this17.renderLeftIcons()];
28428
28492
  }
28429
28493
  }), vue.createVNode(InputWrapper, null, {
28430
28494
  "default": function _default() {
28431
28495
  return [vue.createVNode(TextArea, vue.mergeProps(babelHelperVueTransformOn({
28432
28496
  blur: function blur(e) {
28433
- _this18.$emit('blur', e, _this18.triggerQuery);
28497
+ _this17.$emit('blur', e, _this17.triggerQuery);
28434
28498
  },
28435
28499
  keypress: function keypress(e) {
28436
- _this18.$emit('keyPress', e, _this18.triggerQuery);
28437
- _this18.$emit('key-press', e, _this18.triggerQuery);
28500
+ _this17.$emit('keyPress', e, _this17.triggerQuery);
28501
+ _this17.$emit('key-press', e, _this17.triggerQuery);
28438
28502
  },
28439
- input: _this18.onInputChange,
28503
+ input: _this17.onInputChange,
28440
28504
  focus: function focus(e) {
28441
- _this18.$emit('focus', e, _this18.triggerQuery);
28505
+ _this17.$emit('focus', e, _this17.triggerQuery);
28442
28506
  },
28443
- keydown: _this18.handleKeyDown,
28507
+ keydown: _this17.handleKeyDown,
28444
28508
  keyup: function keyup(e) {
28445
- _this18.$emit('keyUp', e, _this18.triggerQuery);
28446
- _this18.$emit('key-up', e, _this18.triggerQuery);
28509
+ _this17.$emit('keyUp', e, _this17.triggerQuery);
28510
+ _this17.$emit('key-up', e, _this17.triggerQuery);
28447
28511
  }
28448
28512
  }), {
28449
28513
  "searchBox": true,
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
28514
+ "class": getClassName$3(_this17.$props.innerClass, 'input') || '',
28515
+ "placeholder": _this17.$props.placeholder,
28516
+ "autofocus": _this17.$props.autoFocus,
28517
+ "value": _this17.$data.currentValue ? _this17.$data.currentValue : '',
28518
+ "iconPosition": _this17.$props.iconPosition,
28519
+ "showIcon": _this17.$props.showIcon,
28520
+ "showClear": _this17.$props.showClear,
28521
+ "ref": _this17.$props.innerRef,
28522
+ "themePreset": _this17.themePreset
28459
28523
  }), null)];
28460
28524
  }
28461
28525
  }), vue.createVNode(Actions, null, {
28462
28526
  "default": function _default() {
28463
- return [_this18.renderRightIcons(), _this18.renderInputAddonAfter(), _this18.renderEnterButtonElement()];
28527
+ return [_this17.renderRightIcons(), _this17.renderInputAddonAfter(), _this17.renderEnterButtonElement()];
28464
28528
  }
28465
28529
  })];
28466
28530
  }
@@ -28675,14 +28739,12 @@
28675
28739
  message: response.error
28676
28740
  };
28677
28741
  }
28742
+
28678
28743
  // pushing message history so far
28679
28744
  if (messagesHistory && Array.isArray(messagesHistory)) {
28680
28745
  finalMessages.push.apply(finalMessages, messagesHistory.filter(function (msg) {
28681
28746
  return msg.role !== constants_7$1.SYSTEM;
28682
28747
  }));
28683
- if (finalMessages[0].role === constants_7$1.USER) {
28684
- finalMessages.shift();
28685
- }
28686
28748
  } else if (response && response.answer && response.answer.text) {
28687
28749
  finalMessages.push({
28688
28750
  role: constants_7$1.ASSISTANT,
@@ -38024,7 +38086,7 @@
38024
38086
  type = _props$attribute.type,
38025
38087
  trackProperties = _props$attribute.trackProperties,
38026
38088
  noBind = _props$attribute.noBind;
38027
- if (noBind) return "continue";
38089
+ if (noBind) return 1; // continue
38028
38090
  var setMethodName = 'set' + Str.capitalizeFirstLetter(attribute);
38029
38091
  var getMethodName = 'get' + Str.capitalizeFirstLetter(attribute);
38030
38092
  var eventName = attribute.toLowerCase() + '_changed';
@@ -38060,8 +38122,7 @@
38060
38122
  }
38061
38123
  };
38062
38124
  for (var attribute in props) {
38063
- var _ret = _loop(attribute);
38064
- if (_ret === "continue") continue;
38125
+ if (_loop(attribute)) continue;
38065
38126
  }
38066
38127
  }
38067
38128
 
@@ -44253,7 +44314,7 @@
44253
44314
  }, queryString, renderFunction);
44254
44315
  }
44255
44316
 
44256
- var version = "3.0.6";
44317
+ var version = "3.1.0-alpha";
44257
44318
 
44258
44319
  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];
44259
44320
  function install$1 (Vue) {