@appbaseio/reactivesearch-vue 3.0.0-rc.6.2 → 3.0.0-rc.6.3

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.
@@ -7294,17 +7294,7 @@
7294
7294
  dispatch((0, misc.setPromotedResults)([], component));
7295
7295
  }
7296
7296
  dispatch((0, misc.setRawData)(component, response));
7297
- if (response.AISessionId) {
7298
- var localCache = ((0, helper.getObjectFromLocalStorage)(constants$1.AI_LOCAL_CACHE_KEY) || {})[props.componentId];
7299
- if (localCache && localCache.sessionId && localCache.sessionId === response.AISessionId) {
7300
- dispatch((0, misc.setAIResponse)(component, localCache));
7301
- } else {
7302
- (0, helper.setObjectInLocalStorage)('AISessions', _defineProperty({}, component, {}));
7303
- dispatch((0, query.fetchAIResponse)(response.AISessionId, component, '', {
7304
- hits: response.hits || {}
7305
- }, props[component].componentType === constants$1.componentTypes.searchBox));
7306
- }
7307
- } else if (response.AIAnswer) {
7297
+ if (response.AIAnswer) {
7308
7298
  if (response.AIAnswer.error) {
7309
7299
  dispatch((0, misc.setAIResponseError)(component, {
7310
7300
  message: response.AIAnswer.error
@@ -7320,11 +7310,25 @@
7320
7310
  text: input.choices[0].message.content
7321
7311
  }
7322
7312
  };
7323
- dispatch((0, misc.setAIResponse)(component, {
7313
+ var finalResponseObj = {
7324
7314
  response: finalResponse,
7325
7315
  meta: response.hits,
7326
7316
  isTyping: false
7327
- }));
7317
+ };
7318
+ if (response.AISessionId) {
7319
+ finalResponseObj.sessionId = response.AISessionId;
7320
+ }
7321
+ dispatch((0, misc.setAIResponse)(component, finalResponseObj));
7322
+ } else if (response.AISessionId) {
7323
+ var localCache = ((0, helper.getObjectFromLocalStorage)(constants$1.AI_LOCAL_CACHE_KEY) || {})[props.componentId];
7324
+ if (localCache && localCache.sessionId && localCache.sessionId === response.AISessionId) {
7325
+ dispatch((0, misc.setAIResponse)(component, localCache));
7326
+ } else {
7327
+ (0, helper.setObjectInLocalStorage)('AISessions', _defineProperty({}, component, {}));
7328
+ dispatch((0, query.fetchAIResponse)(response.AISessionId, component, '', {
7329
+ hits: response.hits || {}
7330
+ }, props[component].componentType === constants$1.componentTypes.searchBox));
7331
+ }
7328
7332
  }
7329
7333
  dispatch((0, misc.setCustomData)(response.customData, component));
7330
7334
  if (response.hits && !((response.AIAnswer || response.AISessionId) && props[component].componentType === constants$1.componentTypes.searchBox)) {
@@ -26494,7 +26498,8 @@
26494
26498
  renderError: types.title,
26495
26499
  isLoading: types.boolRequired,
26496
26500
  sessionIdFromStore: Q.string,
26497
- showComponent: types.boolRequired
26501
+ showComponent: types.boolRequired,
26502
+ style: types.style
26498
26503
  },
26499
26504
  mounted: function mounted() {},
26500
26505
  watch: {
@@ -26762,7 +26767,7 @@
26762
26767
  "tabIndex": 0,
26763
26768
  "onClick": _this3.handleSendMessage,
26764
26769
  "onKeyPress": _this3.handleKeyPress,
26765
- "class": "enter-btn " + helper_31(innerClass, 'ai-enter-button'),
26770
+ "class": "ask-btn " + helper_31(innerClass, 'ai-enter-button'),
26766
26771
  "disabled": _this3.isLoadingState || !_this3.AISessionId
26767
26772
  }, {
26768
26773
  "default": function _default() {
@@ -26826,7 +26831,10 @@
26826
26831
  if (!this.shouldShowComponent) {
26827
26832
  return null;
26828
26833
  }
26829
- return vue.createVNode(Chatbox, null, {
26834
+ return vue.createVNode(Chatbox, {
26835
+ "style": props.style,
26836
+ "class": "--ai-chat-box-wrapper"
26837
+ }, {
26830
26838
  "default": function _default() {
26831
26839
  return [_this4.$props.title && vue.createVNode(Title, {
26832
26840
  "class": helper_31(_this4.$props.innerClass, 'title') || ''
@@ -26835,6 +26843,7 @@
26835
26843
  return [_this4.$props.title];
26836
26844
  }
26837
26845
  }), vue.createVNode(ChatContainer, {
26846
+ "class": "--ai-chat-container",
26838
26847
  "theme": props.theme,
26839
26848
  "showInput": props.showInput
26840
26849
  }, {
@@ -39941,7 +39950,7 @@
39941
39950
  }, queryString, renderFunction);
39942
39951
  }
39943
39952
 
39944
- var version = "3.0.0-rc.6.2";
39953
+ var version = "3.0.0-rc.6.3";
39945
39954
 
39946
39955
  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];
39947
39956
  function install$1 (Vue) {