@appbaseio/reactivesearch-vue 3.0.0 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
1
1
  import { helper, Actions, causes } from '@appbaseio/reactivecore';
2
- import { SEARCH_COMPONENTS_MODES, AI_TRIGGER_MODES, componentTypes, AI_LOCAL_CACHE_KEY, AI_ROLES, TREELIST_VALUES_PATH_SEPARATOR } from '@appbaseio/reactivecore/lib/utils/constants';
2
+ import { SEARCH_COMPONENTS_MODES, AI_TRIGGER_MODES, AI_LOCAL_CACHE_KEY, componentTypes, AI_ROLES, TREELIST_VALUES_PATH_SEPARATOR } from '@appbaseio/reactivecore/lib/utils/constants';
3
3
  import _transformOn from '@vue/babel-helper-vue-transform-on';
4
4
  import { _ as _taggedTemplateLiteralLoose, a as _extends, b as _objectWithoutPropertiesLoose } from './_rollupPluginBabelHelpers-ded08042.js';
5
5
  import { createVNode, createTextVNode, defineComponent, ref, watch, isVNode, mergeProps, h } from 'vue';
6
6
  import VueTypes from 'vue-types';
7
- import { getQueryOptions, featuredSuggestionsActionTypes, suggestionTypes, getObjectFromLocalStorage, getClassName as getClassName$2, setObjectInLocalStorage, recLookup, updateCustomQuery as updateCustomQuery$1, updateDefaultQuery as updateDefaultQuery$1, transformTreeListLocalStateIntoQueryComptaibleFormat, isEqual as isEqual$1, transformRawTreeListData, setDeep, getComponent as getComponent$1, getOptionsFromQuery, checkValueChange as checkValueChange$1, getAggsQuery, updateInternalQuery, isFunction as isFunction$1 } from '@appbaseio/reactivecore/lib/utils/helper';
7
+ import { getObjectFromLocalStorage, getQueryOptions, featuredSuggestionsActionTypes, suggestionTypes, getClassName as getClassName$2, setObjectInLocalStorage, recLookup, updateCustomQuery as updateCustomQuery$1, updateDefaultQuery as updateDefaultQuery$1, transformTreeListLocalStateIntoQueryComptaibleFormat, isEqual as isEqual$1, transformRawTreeListData, setDeep, getComponent as getComponent$1, getOptionsFromQuery, checkValueChange as checkValueChange$1, getAggsQuery, updateInternalQuery, isFunction as isFunction$1 } from '@appbaseio/reactivecore/lib/utils/helper';
8
8
  import { styled } from '@appbaseio/vue-emotion';
9
9
  import { css, keyframes } from '@emotion/css';
10
10
  import { lighten } from 'polished';
@@ -805,7 +805,7 @@ var HorizontalSkeletonLoader = defineComponent({
805
805
 
806
806
  var _templateObject$7, _templateObject2$2, _templateObject3$1, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11;
807
807
  var Chatbox = styled('div')(_templateObject$7 || (_templateObject$7 = _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) {
808
- return props.theme && props.theme.colors ? props.theme.colors.backgroundColor : '#fff';
808
+ return props.theme && props.theme.colors && props.theme.colors.backgroundColor ? lighten(0.1, props.theme.colors.backgroundColor) : '#fff';
809
809
  });
810
810
  var ChatContainer = styled('div')(_templateObject2$2 || (_templateObject2$2 = _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) {
811
811
  return props.showInput ? 'bottom: 48px;' : '';
@@ -837,7 +837,7 @@ var resetCSS = function resetCSS(props) {
837
837
  // eslint-disable-next-line no-nested-ternary
838
838
  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: " + (
839
839
  // eslint-disable-next-line no-nested-ternary
840
- 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";
840
+ 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";
841
841
  };
842
842
  var messageBGColor = function messageBGColor(props) {
843
843
  var finalBGColor;
@@ -1120,7 +1120,8 @@ var SearchBox = defineComponent({
1120
1120
  showFeedbackComponent: false,
1121
1121
  feedbackState: null,
1122
1122
  faqAnswer: '',
1123
- faqQuestion: ''
1123
+ faqQuestion: '',
1124
+ initialHits: null
1124
1125
  };
1125
1126
  this.internalComponent = props.componentId + "__internal";
1126
1127
  return this.__state;
@@ -1176,7 +1177,7 @@ var SearchBox = defineComponent({
1176
1177
  if (Array.isArray(this.suggestions) && this.suggestions.length) {
1177
1178
  suggestionsArray = [].concat(withClickIds(this.suggestions));
1178
1179
  }
1179
- if (this.renderTriggerMessage() && this.currentValue && !this.isLoading) {
1180
+ if (this.renderTriggerMessage() && this.currentValue) {
1180
1181
  suggestionsArray.unshift({
1181
1182
  label: this.renderTriggerMessage(),
1182
1183
  value: 'AI_TRIGGER_MESSAGE',
@@ -1309,6 +1310,17 @@ var SearchBox = defineComponent({
1309
1310
  this.listenForFocusShortcuts();
1310
1311
  },
1311
1312
  watch: {
1313
+ AIResponse: function AIResponse(newVal) {
1314
+ if (newVal) {
1315
+ if (this.$props.AIUIConfig && this.$props.AIUIConfig.showSourceDocuments && newVal.response && newVal.response.answer && Array.isArray(newVal.response.answer.documentIds)) {
1316
+ this.sourceDocIds = newVal.response.answer.documentIds;
1317
+ var localCache = getObjectFromLocalStorage(AI_LOCAL_CACHE_KEY) && getObjectFromLocalStorage(AI_LOCAL_CACHE_KEY)[this.$props.componentId];
1318
+ if (localCache && localCache.meta && localCache.meta.hits && localCache.meta.hits.hits) {
1319
+ this.initialHits = localCache.meta.hits.hits;
1320
+ }
1321
+ }
1322
+ }
1323
+ },
1312
1324
  dataField: function dataField(newVal, oldVal) {
1313
1325
  if (!isEqual(newVal, oldVal)) {
1314
1326
  this.triggerCustomQuery(this.$data.currentValue);
@@ -1383,6 +1395,9 @@ var SearchBox = defineComponent({
1383
1395
  loading: this.isLoading,
1384
1396
  error: this.isError
1385
1397
  });
1398
+ if (newVal && newVal.hits && newVal.hits.hits) {
1399
+ this.initialHits = newVal.hits.hits;
1400
+ }
1386
1401
  },
1387
1402
  aggregationData: function aggregationData(newVal) {
1388
1403
  this.$emit('on-data', {
@@ -2255,13 +2270,13 @@ var SearchBox = defineComponent({
2255
2270
  });
2256
2271
  },
2257
2272
  getAISourceObjects: function getAISourceObjects() {
2258
- var localCache = getObjectFromLocalStorage(AI_LOCAL_CACHE_KEY) && getObjectFromLocalStorage(AI_LOCAL_CACHE_KEY)[this.componentId];
2273
+ var _this13 = this;
2259
2274
  var sourceObjects = [];
2260
2275
  if (!this.AIResponse) return sourceObjects;
2261
2276
  var docIds = this.AIResponse && this.AIResponse.response && this.AIResponse.response.answer && this.AIResponse.response.answer.documentIds || [];
2262
- if (localCache && localCache.meta && localCache.meta.hits && localCache.meta.hits.hits) {
2277
+ if (this.initialHits) {
2263
2278
  docIds.forEach(function (id) {
2264
- var foundSourceObj = localCache.meta.hits.hits.find(function (hit) {
2279
+ var foundSourceObj = _this13.initialHits.find(function (hit) {
2265
2280
  return hit._id === id;
2266
2281
  }) || {};
2267
2282
  if (foundSourceObj) {
@@ -2295,7 +2310,7 @@ var SearchBox = defineComponent({
2295
2310
  },
2296
2311
  renderAIScreenFooter: function renderAIScreenFooter() {
2297
2312
  var _slot8;
2298
- var _this13 = this;
2313
+ var _this14 = this;
2299
2314
  var _this$$props$AIUIConf2 = this.$props.AIUIConfig,
2300
2315
  AIUIConfig = _this$$props$AIUIConf2 === void 0 ? {} : _this$$props$AIUIConf2;
2301
2316
  var _ref6 = AIUIConfig || {},
@@ -2304,11 +2319,11 @@ var SearchBox = defineComponent({
2304
2319
  _ref6$onSourceClick = _ref6.onSourceClick,
2305
2320
  onSourceClick = _ref6$onSourceClick === void 0 ? function () {} : _ref6$onSourceClick;
2306
2321
  var renderSourceDocumentLabel = function renderSourceDocumentLabel(sourceObj) {
2307
- if (_this13.$props.AIUIConfig && _this13.$props.AIUIConfig.renderSourceDocument) {
2308
- return _this13.$props.AIUIConfig.renderSourceDocument(sourceObj);
2322
+ if (_this14.$props.AIUIConfig && _this14.$props.AIUIConfig.renderSourceDocument) {
2323
+ return _this14.$props.AIUIConfig.renderSourceDocument(sourceObj);
2309
2324
  }
2310
- if (_this13.$slots.renderSourceDocument) {
2311
- return _this13.$slots.renderSourceDocument(sourceObj);
2325
+ if (_this14.$slots.renderSourceDocument) {
2326
+ return _this14.$slots.renderSourceDocument(sourceObj);
2312
2327
  }
2313
2328
  return sourceObj._id;
2314
2329
  };
@@ -2316,10 +2331,10 @@ var SearchBox = defineComponent({
2316
2331
  "themePreset": this.$props.themePreset
2317
2332
  }, {
2318
2333
  "default": function _default() {
2319
- return [createTextVNode("Summary generated using the following sources:"), ' ', createVNode(SourceTags, null, _isSlot(_slot8 = _this13.getAISourceObjects().map(function (el) {
2334
+ return [createTextVNode("Summary generated using the following sources:"), ' ', createVNode(SourceTags, null, _isSlot(_slot8 = _this14.getAISourceObjects().map(function (el) {
2320
2335
  var _slot7;
2321
2336
  return createVNode(Button, {
2322
- "class": "--ai-source-tag " + (getClassName$1(_this13.$props.innerClass, 'ai-source-tag') || ''),
2337
+ "class": "--ai-source-tag " + (getClassName$1(_this14.$props.innerClass, 'ai-source-tag') || ''),
2323
2338
  "info": true,
2324
2339
  "onClick": function onClick() {
2325
2340
  return onSourceClick && onSourceClick(el);
@@ -2338,7 +2353,7 @@ var SearchBox = defineComponent({
2338
2353
  }) : null;
2339
2354
  },
2340
2355
  renderAIScreen: function renderAIScreen() {
2341
- var _this14 = this;
2356
+ var _this15 = this;
2342
2357
  var customAIRenderer = this.$props.renderAIAnswer || this.$slots.renderAIAnswer;
2343
2358
  if (customAIRenderer) {
2344
2359
  return customAIRenderer({
@@ -2362,11 +2377,11 @@ var SearchBox = defineComponent({
2362
2377
  "hideUI": this.isAIResponseLoading || this.isLoading || !this.sessionIdFromStore,
2363
2378
  "key": this.sessionIdFromStore,
2364
2379
  "onFeedbackSubmit": function onFeedbackSubmit(useful, reason) {
2365
- _this14.feedbackState = {
2380
+ _this15.feedbackState = {
2366
2381
  isRecorded: true,
2367
2382
  feedbackType: useful ? 'positive' : 'negative'
2368
2383
  };
2369
- _this14.recordAISessionUsefulness(_this14.sessionIdFromStore, {
2384
+ _this15.recordAISessionUsefulness(_this15.sessionIdFromStore, {
2370
2385
  useful: useful,
2371
2386
  reason: reason
2372
2387
  });
@@ -2401,7 +2416,7 @@ var SearchBox = defineComponent({
2401
2416
  });
2402
2417
  },
2403
2418
  renderAskButtonElement: function renderAskButtonElement() {
2404
- var _this15 = this;
2419
+ var _this16 = this;
2405
2420
  var _this$$props5 = this.$props,
2406
2421
  AIUIConfig = _this$$props5.AIUIConfig,
2407
2422
  innerClass = _this$$props5.innerClass;
@@ -2411,12 +2426,12 @@ var SearchBox = defineComponent({
2411
2426
  if (askButton) {
2412
2427
  var getEnterButtonMarkup = function getEnterButtonMarkup() {
2413
2428
  if (renderAskButton) {
2414
- return renderAskButton(_this15.askButtonOnClick);
2429
+ return renderAskButton(_this16.askButtonOnClick);
2415
2430
  }
2416
2431
  return createVNode(Button, {
2417
2432
  "class": "enter-btn " + getClassName$1(innerClass, 'ask-button'),
2418
2433
  "info": true,
2419
- "onClick": _this15.askButtonOnClick
2434
+ "onClick": _this16.askButtonOnClick
2420
2435
  }, {
2421
2436
  "default": function _default() {
2422
2437
  return [createTextVNode("Ask")];
@@ -2431,7 +2446,7 @@ var SearchBox = defineComponent({
2431
2446
  }
2432
2447
  },
2433
2448
  render: function render() {
2434
- var _this16 = this;
2449
+ var _this17 = this;
2435
2450
  var expandSuggestionsContainer = this.$props.expandSuggestionsContainer;
2436
2451
  var _this$$slots = this.$slots,
2437
2452
  recentSearchesIcon = _this$$slots.recentSearchesIcon,
@@ -2442,17 +2457,17 @@ var SearchBox = defineComponent({
2442
2457
  "class": this.$props.className
2443
2458
  }, {
2444
2459
  "default": function _default() {
2445
- return [_this16.$props.title && createVNode(Title, {
2446
- "class": getClassName$1(_this16.$props.innerClass, 'title') || ''
2460
+ return [_this17.$props.title && createVNode(Title, {
2461
+ "class": getClassName$1(_this17.$props.innerClass, 'title') || ''
2447
2462
  }, {
2448
2463
  "default": function _default() {
2449
- return [_this16.$props.title];
2464
+ return [_this17.$props.title];
2450
2465
  }
2451
- }), _this16.$props.autosuggest ? createVNode(Downshift, {
2452
- "id": _this16.$props.componentId + "-downshift",
2453
- "handleChange": _this16.onSuggestionSelected,
2454
- "handleMouseup": _this16.handleStateChange,
2455
- "isOpen": _this16.$data.isOpen
2466
+ }), _this17.$props.autosuggest ? createVNode(Downshift, {
2467
+ "id": _this17.$props.componentId + "-downshift",
2468
+ "handleChange": _this17.onSuggestionSelected,
2469
+ "handleMouseup": _this17.handleStateChange,
2470
+ "isOpen": _this17.$data.isOpen
2456
2471
  }, {
2457
2472
  "default": function _default(_ref8) {
2458
2473
  var getInputEvents = _ref8.getInputEvents,
@@ -2508,21 +2523,21 @@ var SearchBox = defineComponent({
2508
2523
  }
2509
2524
  };
2510
2525
  var indexOffset = 0;
2511
- return createVNode("div", null, [_this16.hasCustomRenderer && _this16.getComponent({
2526
+ return createVNode("div", null, [_this17.hasCustomRenderer && _this17.getComponent({
2512
2527
  isOpen: isOpen,
2513
2528
  getItemProps: getItemProps,
2514
2529
  getItemEvents: getItemEvents,
2515
2530
  highlightedIndex: highlightedIndex
2516
- }), _this16.renderErrorComponent(), !_this16.hasCustomRenderer && isOpen && hasSuggestions ? createVNode("ul", {
2517
- "class": suggestions(_this16.themePreset, _this16.theme) + " " + getClassName$1(_this16.$props.innerClass, 'list') + " " + searchboxSuggestions(_this16.themePreset, _this16.theme) + "\n\t\t\t\t\t\t\t\t\t\t\t\t\t",
2531
+ }), _this17.renderErrorComponent(), !_this17.hasCustomRenderer && isOpen && hasSuggestions ? createVNode("ul", {
2532
+ "class": suggestions(_this17.themePreset, _this17.theme) + " " + getClassName$1(_this17.$props.innerClass, 'list') + " " + searchboxSuggestions(_this17.themePreset, _this17.theme) + "\n\t\t\t\t\t\t\t\t\t\t\t\t\t",
2518
2533
  "ref": _dropdownULRef
2519
- }, [_this16.showAIScreen && createVNode(SearchBoxAISection, {
2520
- "themePreset": _this16.$props.themePreset
2534
+ }, [_this17.showAIScreen && createVNode(SearchBoxAISection, {
2535
+ "themePreset": _this17.$props.themePreset
2521
2536
  }, {
2522
2537
  "default": function _default() {
2523
- return [_this16.renderAIScreen(), ' ', _this16.renderErrorComponent(true)];
2538
+ return [_this17.renderAIScreen(), ' ', _this17.renderErrorComponent(true)];
2524
2539
  }
2525
- }), !_this16.showAIScreen && _this16.parsedSuggestions.map(function (item, itemIndex) {
2540
+ }), !_this17.showAIScreen && _this17.parsedSuggestions.map(function (item, itemIndex) {
2526
2541
  var index = indexOffset + itemIndex;
2527
2542
  if (Array.isArray(item)) {
2528
2543
  var sectionHtml = xss(item[0].sectionLabel);
@@ -2531,7 +2546,7 @@ var SearchBox = defineComponent({
2531
2546
  "key": "section-" + itemIndex,
2532
2547
  "class": "section-container"
2533
2548
  }, [sectionHtml ? createVNode("div", {
2534
- "class": "section-header " + getClassName$1(_this16.$props.innerClass, 'section-label'),
2549
+ "class": "section-header " + getClassName$1(_this17.$props.innerClass, 'section-label'),
2535
2550
  "key": "" + item[0].sectionId,
2536
2551
  "innerHTML": sectionHtml
2537
2552
  }, null) : null, createVNode("ul", {
@@ -2551,7 +2566,7 @@ var SearchBox = defineComponent({
2551
2566
  justifyContent: 'flex-start',
2552
2567
  alignItems: 'center'
2553
2568
  },
2554
- "class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$1(_this16.$props.innerClass, 'active-suggestion-item') : "li-item " + getClassName$1(_this16.$props.innerClass, 'suggestion-item'))
2569
+ "class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$1(_this17.$props.innerClass, 'active-suggestion-item') : "li-item " + getClassName$1(_this17.$props.innerClass, 'suggestion-item'))
2555
2570
  }), [renderItem(sectionItem)]);
2556
2571
  }
2557
2572
  if (sectionItem._suggestion_type === '_internal_a_i_trigger') {
@@ -2565,9 +2580,9 @@ var SearchBox = defineComponent({
2565
2580
  justifyContent: 'flex-start',
2566
2581
  alignItems: 'center'
2567
2582
  },
2568
- "class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$1(_this16.$props.innerClass, 'active-suggestion-item') : "li-item " + getClassName$1(_this16.$props.innerClass, 'suggestion-item'))
2583
+ "class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$1(_this17.$props.innerClass, 'active-suggestion-item') : "li-item " + getClassName$1(_this17.$props.innerClass, 'suggestion-item'))
2569
2584
  }), [createVNode(SuggestionItem, {
2570
- "currentValue": _this16.currentValue,
2585
+ "currentValue": _this17.currentValue,
2571
2586
  "suggestion": sectionItem
2572
2587
  }, null)]);
2573
2588
  }
@@ -2581,7 +2596,7 @@ var SearchBox = defineComponent({
2581
2596
  justifyContent: 'flex-start',
2582
2597
  alignItems: 'center'
2583
2598
  },
2584
- "class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$1(_this16.$props.innerClass, 'active-suggestion-item') : "li-item " + getClassName$1(_this16.$props.innerClass, 'suggestion-item'))
2599
+ "class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$1(_this17.$props.innerClass, 'active-suggestion-item') : "li-item " + getClassName$1(_this17.$props.innerClass, 'suggestion-item'))
2585
2600
  }), [createVNode("div", {
2586
2601
  "style": {
2587
2602
  padding: '0 10px 0 0',
@@ -2589,74 +2604,74 @@ var SearchBox = defineComponent({
2589
2604
  }
2590
2605
  }, [createVNode(CustomSvg, {
2591
2606
  "key": sectionItem._suggestion_type + "-" + sectionIndex,
2592
- "className": getClassName$1(_this16.$props.innerClass, sectionItem._suggestion_type + "-search-icon") || null,
2607
+ "className": getClassName$1(_this17.$props.innerClass, sectionItem._suggestion_type + "-search-icon") || null,
2593
2608
  "icon": getIcon(sectionItem._suggestion_type, sectionItem, suggestionsHaveIcon),
2594
2609
  "type": sectionItem._suggestion_type + "-search-icon"
2595
2610
  }, null)]), createVNode(SuggestionItem, {
2596
- "currentValue": _this16.currentValue,
2611
+ "currentValue": _this17.currentValue,
2597
2612
  "suggestion": sectionItem
2598
- }, null), _this16.renderActionIcon(sectionItem)]);
2613
+ }, null), _this17.renderActionIcon(sectionItem)]);
2599
2614
  })])]);
2600
2615
  }
2601
2616
  return createVNode("div", null, [createTextVNode("No suggestions")]);
2602
- }), !_this16.showAIScreen && _this16.parsedSuggestions.length && _this16.$props.showSuggestionsFooter ? _this16.suggestionsFooter() : null]) : _this16.renderNoSuggestions(_this16.normalizedSuggestions)]);
2617
+ }), !_this17.showAIScreen && _this17.parsedSuggestions.length && _this17.$props.showSuggestionsFooter ? _this17.suggestionsFooter() : null]) : _this17.renderNoSuggestions(_this17.normalizedSuggestions)]);
2603
2618
  };
2604
2619
  return createVNode("div", {
2605
2620
  "class": suggestionsContainer
2606
2621
  }, [createVNode(InputGroup, {
2607
2622
  "searchBox": true,
2608
2623
  "ref": _inputGroupRef,
2609
- "isOpen": _this16.$data.isOpen
2624
+ "isOpen": _this17.$data.isOpen
2610
2625
  }, {
2611
2626
  "default": function _default() {
2612
2627
  return [createVNode(Actions$1, null, {
2613
2628
  "default": function _default() {
2614
- return [_this16.renderInputAddonBefore(), _this16.renderLeftIcons()];
2629
+ return [_this17.renderInputAddonBefore(), _this17.renderLeftIcons()];
2615
2630
  }
2616
2631
  }), createVNode(InputWrapper, null, {
2617
2632
  "default": function _default() {
2618
2633
  return [createVNode(TextArea, mergeProps(_transformOn(getInputEvents({
2619
- onInput: _this16.onInputChange,
2634
+ onInput: _this17.onInputChange,
2620
2635
  onBlur: function onBlur(e) {
2621
- _this16.$emit('blur', e, _this16.triggerQuery);
2636
+ _this17.$emit('blur', e, _this17.triggerQuery);
2622
2637
  },
2623
- onFocus: _this16.handleFocus,
2638
+ onFocus: _this17.handleFocus,
2624
2639
  onKeyPress: function onKeyPress(e) {
2625
- _this16.$emit('keyPress', e, _this16.triggerQuery);
2626
- _this16.$emit('key-press', e, _this16.triggerQuery);
2640
+ _this17.$emit('keyPress', e, _this17.triggerQuery);
2641
+ _this17.$emit('key-press', e, _this17.triggerQuery);
2627
2642
  },
2628
2643
  onKeyDown: function onKeyDown(e) {
2629
- return _this16.handleKeyDown(e, highlightedIndex);
2644
+ return _this17.handleKeyDown(e, highlightedIndex);
2630
2645
  },
2631
2646
  onKeyUp: function onKeyUp(e) {
2632
- _this16.$emit('keyUp', e, _this16.triggerQuery);
2633
- _this16.$emit('key-up', e, _this16.triggerQuery);
2647
+ _this17.$emit('keyUp', e, _this17.triggerQuery);
2648
+ _this17.$emit('key-up', e, _this17.triggerQuery);
2634
2649
  },
2635
2650
  onClick: function onClick() {
2636
2651
  setHighlightedIndex(null);
2637
2652
  }
2638
2653
  })), {
2639
2654
  "searchBox": true,
2640
- "isOpen": _this16.$data.isOpen,
2641
- "id": _this16.$props.componentId + "-input",
2642
- "ref": _this16.$props.innerRef,
2643
- "class": getClassName$1(_this16.$props.innerClass, 'input'),
2644
- "placeholder": _this16.$props.placeholder,
2645
- "autoFocus": _this16.$props.autoFocus
2655
+ "isOpen": _this17.$data.isOpen,
2656
+ "id": _this17.$props.componentId + "-input",
2657
+ "ref": _this17.$props.innerRef,
2658
+ "class": getClassName$1(_this17.$props.innerClass, 'input'),
2659
+ "placeholder": _this17.$props.placeholder,
2660
+ "autoFocus": _this17.$props.autoFocus
2646
2661
  }, getInputProps({
2647
- value: _this16.$data.currentValue === null ? '' : _this16.$data.currentValue
2662
+ value: _this17.$data.currentValue === null ? '' : _this17.$data.currentValue
2648
2663
  }), {
2649
- "themePreset": _this16.themePreset,
2664
+ "themePreset": _this17.themePreset,
2650
2665
  "autocomplete": "off"
2651
2666
  }), null), !expandSuggestionsContainer && renderSuggestionsDropdown()];
2652
2667
  }
2653
2668
  }), createVNode(Actions$1, null, {
2654
2669
  "default": function _default() {
2655
- return [_this16.renderRightIcons(), _this16.renderInputAddonAfter(), _this16.renderAskButtonElement(), _this16.renderEnterButtonElement()];
2670
+ return [_this17.renderRightIcons(), _this17.renderInputAddonAfter(), _this17.renderAskButtonElement(), _this17.renderEnterButtonElement()];
2656
2671
  }
2657
2672
  })];
2658
2673
  }
2659
- }), expandSuggestionsContainer && renderSuggestionsDropdown(), _this16.renderTags()]);
2674
+ }), expandSuggestionsContainer && renderSuggestionsDropdown(), _this17.renderTags()]);
2660
2675
  }
2661
2676
  }) : createVNode("div", {
2662
2677
  "class": suggestionsContainer
@@ -2667,43 +2682,43 @@ var SearchBox = defineComponent({
2667
2682
  "default": function _default() {
2668
2683
  return [createVNode(Actions$1, null, {
2669
2684
  "default": function _default() {
2670
- return [_this16.renderInputAddonBefore(), _this16.renderLeftIcons()];
2685
+ return [_this17.renderInputAddonBefore(), _this17.renderLeftIcons()];
2671
2686
  }
2672
2687
  }), createVNode(InputWrapper, null, {
2673
2688
  "default": function _default() {
2674
2689
  return [createVNode(TextArea, mergeProps(_transformOn({
2675
2690
  blur: function blur(e) {
2676
- _this16.$emit('blur', e, _this16.triggerQuery);
2691
+ _this17.$emit('blur', e, _this17.triggerQuery);
2677
2692
  },
2678
2693
  keypress: function keypress(e) {
2679
- _this16.$emit('keyPress', e, _this16.triggerQuery);
2680
- _this16.$emit('key-press', e, _this16.triggerQuery);
2694
+ _this17.$emit('keyPress', e, _this17.triggerQuery);
2695
+ _this17.$emit('key-press', e, _this17.triggerQuery);
2681
2696
  },
2682
- input: _this16.onInputChange,
2697
+ input: _this17.onInputChange,
2683
2698
  focus: function focus(e) {
2684
- _this16.$emit('focus', e, _this16.triggerQuery);
2699
+ _this17.$emit('focus', e, _this17.triggerQuery);
2685
2700
  },
2686
- keydown: _this16.handleKeyDown,
2701
+ keydown: _this17.handleKeyDown,
2687
2702
  keyup: function keyup(e) {
2688
- _this16.$emit('keyUp', e, _this16.triggerQuery);
2689
- _this16.$emit('key-up', e, _this16.triggerQuery);
2703
+ _this17.$emit('keyUp', e, _this17.triggerQuery);
2704
+ _this17.$emit('key-up', e, _this17.triggerQuery);
2690
2705
  }
2691
2706
  }), {
2692
2707
  "searchBox": true,
2693
- "class": getClassName$1(_this16.$props.innerClass, 'input') || '',
2694
- "placeholder": _this16.$props.placeholder,
2695
- "autofocus": _this16.$props.autoFocus,
2696
- "value": _this16.$data.currentValue ? _this16.$data.currentValue : '',
2697
- "iconPosition": _this16.$props.iconPosition,
2698
- "showIcon": _this16.$props.showIcon,
2699
- "showClear": _this16.$props.showClear,
2700
- "ref": _this16.$props.innerRef,
2701
- "themePreset": _this16.themePreset
2708
+ "class": getClassName$1(_this17.$props.innerClass, 'input') || '',
2709
+ "placeholder": _this17.$props.placeholder,
2710
+ "autofocus": _this17.$props.autoFocus,
2711
+ "value": _this17.$data.currentValue ? _this17.$data.currentValue : '',
2712
+ "iconPosition": _this17.$props.iconPosition,
2713
+ "showIcon": _this17.$props.showIcon,
2714
+ "showClear": _this17.$props.showClear,
2715
+ "ref": _this17.$props.innerRef,
2716
+ "themePreset": _this17.themePreset
2702
2717
  }), null)];
2703
2718
  }
2704
2719
  }), createVNode(Actions$1, null, {
2705
2720
  "default": function _default() {
2706
- return [_this16.renderRightIcons(), _this16.renderInputAddonAfter(), _this16.renderEnterButtonElement()];
2721
+ return [_this17.renderRightIcons(), _this17.renderInputAddonAfter(), _this17.renderEnterButtonElement()];
2707
2722
  }
2708
2723
  })];
2709
2724
  }
@@ -30,7 +30,7 @@ import './ReactiveBase.js';
30
30
  import 'hotkeys-js';
31
31
  import 'xss';
32
32
  import 'remarkable';
33
- export { i as default } from './install-e883f435.js';
33
+ export { i as default } from './install-3af47936.js';
34
34
  import './DropDown-48045fde.js';
35
35
  import './Input-83dee8c5.js';
36
36
  import 'compute-scroll-into-view';
@@ -1,3 +1,3 @@
1
- var version = "3.0.0";
1
+ var version = "3.0.2";
2
2
 
3
3
  export default version;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appbaseio/reactivesearch-vue",
3
- "version": "3.0.0",
3
+ "version": "3.0.2",
4
4
  "private": false,
5
5
  "main": "dist/cjs/index.js",
6
6
  "jsnext:main": "dist/es/index.js",