@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.
- package/dist/@appbaseio/reactivesearch-vue.umd.js +100 -85
- package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js +2 -2
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/{install-08b8d6e7.js → install-f7d9b812.js} +99 -84
- package/dist/cjs/install.js +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/es/index.js +2 -2
- package/dist/es/{install-e883f435.js → install-3af47936.js} +101 -86
- package/dist/es/install.js +1 -1
- package/dist/es/version.js +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -34,7 +34,7 @@ var ReactiveBase = require('./ReactiveBase.js');
|
|
|
34
34
|
require('hotkeys-js');
|
|
35
35
|
require('xss');
|
|
36
36
|
require('remarkable');
|
|
37
|
-
var install = require('./install-
|
|
37
|
+
var install = require('./install-f7d9b812.js');
|
|
38
38
|
require('./DropDown-26666911.js');
|
|
39
39
|
require('./Input-3ecdb905.js');
|
|
40
40
|
require('compute-scroll-into-view');
|
|
@@ -809,7 +809,7 @@ var HorizontalSkeletonLoader = vue.defineComponent({
|
|
|
809
809
|
|
|
810
810
|
var _templateObject$7, _templateObject2$2, _templateObject3$1, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11;
|
|
811
811
|
var Chatbox = vueEmotion.styled('div')(_templateObject$7 || (_templateObject$7 = _rollupPluginBabelHelpers._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) {
|
|
812
|
-
return props.theme && props.theme.colors ? props.theme.colors.backgroundColor : '#fff';
|
|
812
|
+
return props.theme && props.theme.colors && props.theme.colors.backgroundColor ? polished.lighten(0.1, props.theme.colors.backgroundColor) : '#fff';
|
|
813
813
|
});
|
|
814
814
|
var ChatContainer = vueEmotion.styled('div')(_templateObject2$2 || (_templateObject2$2 = _rollupPluginBabelHelpers._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) {
|
|
815
815
|
return props.showInput ? 'bottom: 48px;' : '';
|
|
@@ -841,7 +841,7 @@ var resetCSS = function resetCSS(props) {
|
|
|
841
841
|
// eslint-disable-next-line no-nested-ternary
|
|
842
842
|
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: " + (
|
|
843
843
|
// eslint-disable-next-line no-nested-ternary
|
|
844
|
-
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";
|
|
844
|
+
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";
|
|
845
845
|
};
|
|
846
846
|
var messageBGColor = function messageBGColor(props) {
|
|
847
847
|
var finalBGColor;
|
|
@@ -1124,7 +1124,8 @@ var SearchBox = vue.defineComponent({
|
|
|
1124
1124
|
showFeedbackComponent: false,
|
|
1125
1125
|
feedbackState: null,
|
|
1126
1126
|
faqAnswer: '',
|
|
1127
|
-
faqQuestion: ''
|
|
1127
|
+
faqQuestion: '',
|
|
1128
|
+
initialHits: null
|
|
1128
1129
|
};
|
|
1129
1130
|
this.internalComponent = props.componentId + "__internal";
|
|
1130
1131
|
return this.__state;
|
|
@@ -1180,7 +1181,7 @@ var SearchBox = vue.defineComponent({
|
|
|
1180
1181
|
if (Array.isArray(this.suggestions) && this.suggestions.length) {
|
|
1181
1182
|
suggestionsArray = [].concat(withClickIds(this.suggestions));
|
|
1182
1183
|
}
|
|
1183
|
-
if (this.renderTriggerMessage() && this.currentValue
|
|
1184
|
+
if (this.renderTriggerMessage() && this.currentValue) {
|
|
1184
1185
|
suggestionsArray.unshift({
|
|
1185
1186
|
label: this.renderTriggerMessage(),
|
|
1186
1187
|
value: 'AI_TRIGGER_MESSAGE',
|
|
@@ -1313,6 +1314,17 @@ var SearchBox = vue.defineComponent({
|
|
|
1313
1314
|
this.listenForFocusShortcuts();
|
|
1314
1315
|
},
|
|
1315
1316
|
watch: {
|
|
1317
|
+
AIResponse: function AIResponse(newVal) {
|
|
1318
|
+
if (newVal) {
|
|
1319
|
+
if (this.$props.AIUIConfig && this.$props.AIUIConfig.showSourceDocuments && newVal.response && newVal.response.answer && Array.isArray(newVal.response.answer.documentIds)) {
|
|
1320
|
+
this.sourceDocIds = newVal.response.answer.documentIds;
|
|
1321
|
+
var localCache = helper.getObjectFromLocalStorage(constants.AI_LOCAL_CACHE_KEY) && helper.getObjectFromLocalStorage(constants.AI_LOCAL_CACHE_KEY)[this.$props.componentId];
|
|
1322
|
+
if (localCache && localCache.meta && localCache.meta.hits && localCache.meta.hits.hits) {
|
|
1323
|
+
this.initialHits = localCache.meta.hits.hits;
|
|
1324
|
+
}
|
|
1325
|
+
}
|
|
1326
|
+
}
|
|
1327
|
+
},
|
|
1316
1328
|
dataField: function dataField(newVal, oldVal) {
|
|
1317
1329
|
if (!isEqual(newVal, oldVal)) {
|
|
1318
1330
|
this.triggerCustomQuery(this.$data.currentValue);
|
|
@@ -1387,6 +1399,9 @@ var SearchBox = vue.defineComponent({
|
|
|
1387
1399
|
loading: this.isLoading,
|
|
1388
1400
|
error: this.isError
|
|
1389
1401
|
});
|
|
1402
|
+
if (newVal && newVal.hits && newVal.hits.hits) {
|
|
1403
|
+
this.initialHits = newVal.hits.hits;
|
|
1404
|
+
}
|
|
1390
1405
|
},
|
|
1391
1406
|
aggregationData: function aggregationData(newVal) {
|
|
1392
1407
|
this.$emit('on-data', {
|
|
@@ -2259,13 +2274,13 @@ var SearchBox = vue.defineComponent({
|
|
|
2259
2274
|
});
|
|
2260
2275
|
},
|
|
2261
2276
|
getAISourceObjects: function getAISourceObjects() {
|
|
2262
|
-
var
|
|
2277
|
+
var _this13 = this;
|
|
2263
2278
|
var sourceObjects = [];
|
|
2264
2279
|
if (!this.AIResponse) return sourceObjects;
|
|
2265
2280
|
var docIds = this.AIResponse && this.AIResponse.response && this.AIResponse.response.answer && this.AIResponse.response.answer.documentIds || [];
|
|
2266
|
-
if (
|
|
2281
|
+
if (this.initialHits) {
|
|
2267
2282
|
docIds.forEach(function (id) {
|
|
2268
|
-
var foundSourceObj =
|
|
2283
|
+
var foundSourceObj = _this13.initialHits.find(function (hit) {
|
|
2269
2284
|
return hit._id === id;
|
|
2270
2285
|
}) || {};
|
|
2271
2286
|
if (foundSourceObj) {
|
|
@@ -2299,7 +2314,7 @@ var SearchBox = vue.defineComponent({
|
|
|
2299
2314
|
},
|
|
2300
2315
|
renderAIScreenFooter: function renderAIScreenFooter() {
|
|
2301
2316
|
var _slot8;
|
|
2302
|
-
var
|
|
2317
|
+
var _this14 = this;
|
|
2303
2318
|
var _this$$props$AIUIConf2 = this.$props.AIUIConfig,
|
|
2304
2319
|
AIUIConfig = _this$$props$AIUIConf2 === void 0 ? {} : _this$$props$AIUIConf2;
|
|
2305
2320
|
var _ref6 = AIUIConfig || {},
|
|
@@ -2308,11 +2323,11 @@ var SearchBox = vue.defineComponent({
|
|
|
2308
2323
|
_ref6$onSourceClick = _ref6.onSourceClick,
|
|
2309
2324
|
onSourceClick = _ref6$onSourceClick === void 0 ? function () {} : _ref6$onSourceClick;
|
|
2310
2325
|
var renderSourceDocumentLabel = function renderSourceDocumentLabel(sourceObj) {
|
|
2311
|
-
if (
|
|
2312
|
-
return
|
|
2326
|
+
if (_this14.$props.AIUIConfig && _this14.$props.AIUIConfig.renderSourceDocument) {
|
|
2327
|
+
return _this14.$props.AIUIConfig.renderSourceDocument(sourceObj);
|
|
2313
2328
|
}
|
|
2314
|
-
if (
|
|
2315
|
-
return
|
|
2329
|
+
if (_this14.$slots.renderSourceDocument) {
|
|
2330
|
+
return _this14.$slots.renderSourceDocument(sourceObj);
|
|
2316
2331
|
}
|
|
2317
2332
|
return sourceObj._id;
|
|
2318
2333
|
};
|
|
@@ -2320,10 +2335,10 @@ var SearchBox = vue.defineComponent({
|
|
|
2320
2335
|
"themePreset": this.$props.themePreset
|
|
2321
2336
|
}, {
|
|
2322
2337
|
"default": function _default() {
|
|
2323
|
-
return [vue.createTextVNode("Summary generated using the following sources:"), ' ', vue.createVNode(SourceTags, null, _isSlot(_slot8 =
|
|
2338
|
+
return [vue.createTextVNode("Summary generated using the following sources:"), ' ', vue.createVNode(SourceTags, null, _isSlot(_slot8 = _this14.getAISourceObjects().map(function (el) {
|
|
2324
2339
|
var _slot7;
|
|
2325
2340
|
return vue.createVNode(Button.Button, {
|
|
2326
|
-
"class": "--ai-source-tag " + (getClassName$1(
|
|
2341
|
+
"class": "--ai-source-tag " + (getClassName$1(_this14.$props.innerClass, 'ai-source-tag') || ''),
|
|
2327
2342
|
"info": true,
|
|
2328
2343
|
"onClick": function onClick() {
|
|
2329
2344
|
return onSourceClick && onSourceClick(el);
|
|
@@ -2342,7 +2357,7 @@ var SearchBox = vue.defineComponent({
|
|
|
2342
2357
|
}) : null;
|
|
2343
2358
|
},
|
|
2344
2359
|
renderAIScreen: function renderAIScreen() {
|
|
2345
|
-
var
|
|
2360
|
+
var _this15 = this;
|
|
2346
2361
|
var customAIRenderer = this.$props.renderAIAnswer || this.$slots.renderAIAnswer;
|
|
2347
2362
|
if (customAIRenderer) {
|
|
2348
2363
|
return customAIRenderer({
|
|
@@ -2366,11 +2381,11 @@ var SearchBox = vue.defineComponent({
|
|
|
2366
2381
|
"hideUI": this.isAIResponseLoading || this.isLoading || !this.sessionIdFromStore,
|
|
2367
2382
|
"key": this.sessionIdFromStore,
|
|
2368
2383
|
"onFeedbackSubmit": function onFeedbackSubmit(useful, reason) {
|
|
2369
|
-
|
|
2384
|
+
_this15.feedbackState = {
|
|
2370
2385
|
isRecorded: true,
|
|
2371
2386
|
feedbackType: useful ? 'positive' : 'negative'
|
|
2372
2387
|
};
|
|
2373
|
-
|
|
2388
|
+
_this15.recordAISessionUsefulness(_this15.sessionIdFromStore, {
|
|
2374
2389
|
useful: useful,
|
|
2375
2390
|
reason: reason
|
|
2376
2391
|
});
|
|
@@ -2405,7 +2420,7 @@ var SearchBox = vue.defineComponent({
|
|
|
2405
2420
|
});
|
|
2406
2421
|
},
|
|
2407
2422
|
renderAskButtonElement: function renderAskButtonElement() {
|
|
2408
|
-
var
|
|
2423
|
+
var _this16 = this;
|
|
2409
2424
|
var _this$$props5 = this.$props,
|
|
2410
2425
|
AIUIConfig = _this$$props5.AIUIConfig,
|
|
2411
2426
|
innerClass = _this$$props5.innerClass;
|
|
@@ -2415,12 +2430,12 @@ var SearchBox = vue.defineComponent({
|
|
|
2415
2430
|
if (askButton) {
|
|
2416
2431
|
var getEnterButtonMarkup = function getEnterButtonMarkup() {
|
|
2417
2432
|
if (renderAskButton) {
|
|
2418
|
-
return renderAskButton(
|
|
2433
|
+
return renderAskButton(_this16.askButtonOnClick);
|
|
2419
2434
|
}
|
|
2420
2435
|
return vue.createVNode(Button.Button, {
|
|
2421
2436
|
"class": "enter-btn " + getClassName$1(innerClass, 'ask-button'),
|
|
2422
2437
|
"info": true,
|
|
2423
|
-
"onClick":
|
|
2438
|
+
"onClick": _this16.askButtonOnClick
|
|
2424
2439
|
}, {
|
|
2425
2440
|
"default": function _default() {
|
|
2426
2441
|
return [vue.createTextVNode("Ask")];
|
|
@@ -2435,7 +2450,7 @@ var SearchBox = vue.defineComponent({
|
|
|
2435
2450
|
}
|
|
2436
2451
|
},
|
|
2437
2452
|
render: function render() {
|
|
2438
|
-
var
|
|
2453
|
+
var _this17 = this;
|
|
2439
2454
|
var expandSuggestionsContainer = this.$props.expandSuggestionsContainer;
|
|
2440
2455
|
var _this$$slots = this.$slots,
|
|
2441
2456
|
recentSearchesIcon = _this$$slots.recentSearchesIcon,
|
|
@@ -2446,17 +2461,17 @@ var SearchBox = vue.defineComponent({
|
|
|
2446
2461
|
"class": this.$props.className
|
|
2447
2462
|
}, {
|
|
2448
2463
|
"default": function _default() {
|
|
2449
|
-
return [
|
|
2450
|
-
"class": getClassName$1(
|
|
2464
|
+
return [_this17.$props.title && vue.createVNode(Title.Title, {
|
|
2465
|
+
"class": getClassName$1(_this17.$props.innerClass, 'title') || ''
|
|
2451
2466
|
}, {
|
|
2452
2467
|
"default": function _default() {
|
|
2453
|
-
return [
|
|
2468
|
+
return [_this17.$props.title];
|
|
2454
2469
|
}
|
|
2455
|
-
}),
|
|
2456
|
-
"id":
|
|
2457
|
-
"handleChange":
|
|
2458
|
-
"handleMouseup":
|
|
2459
|
-
"isOpen":
|
|
2470
|
+
}), _this17.$props.autosuggest ? vue.createVNode(DropDown.Downshift, {
|
|
2471
|
+
"id": _this17.$props.componentId + "-downshift",
|
|
2472
|
+
"handleChange": _this17.onSuggestionSelected,
|
|
2473
|
+
"handleMouseup": _this17.handleStateChange,
|
|
2474
|
+
"isOpen": _this17.$data.isOpen
|
|
2460
2475
|
}, {
|
|
2461
2476
|
"default": function _default(_ref8) {
|
|
2462
2477
|
var getInputEvents = _ref8.getInputEvents,
|
|
@@ -2512,21 +2527,21 @@ var SearchBox = vue.defineComponent({
|
|
|
2512
2527
|
}
|
|
2513
2528
|
};
|
|
2514
2529
|
var indexOffset = 0;
|
|
2515
|
-
return vue.createVNode("div", null, [
|
|
2530
|
+
return vue.createVNode("div", null, [_this17.hasCustomRenderer && _this17.getComponent({
|
|
2516
2531
|
isOpen: isOpen,
|
|
2517
2532
|
getItemProps: getItemProps,
|
|
2518
2533
|
getItemEvents: getItemEvents,
|
|
2519
2534
|
highlightedIndex: highlightedIndex
|
|
2520
|
-
}),
|
|
2521
|
-
"class": Input.suggestions(
|
|
2535
|
+
}), _this17.renderErrorComponent(), !_this17.hasCustomRenderer && isOpen && hasSuggestions ? vue.createVNode("ul", {
|
|
2536
|
+
"class": Input.suggestions(_this17.themePreset, _this17.theme) + " " + getClassName$1(_this17.$props.innerClass, 'list') + " " + Input.searchboxSuggestions(_this17.themePreset, _this17.theme) + "\n\t\t\t\t\t\t\t\t\t\t\t\t\t",
|
|
2522
2537
|
"ref": _dropdownULRef
|
|
2523
|
-
}, [
|
|
2524
|
-
"themePreset":
|
|
2538
|
+
}, [_this17.showAIScreen && vue.createVNode(SearchBoxAISection, {
|
|
2539
|
+
"themePreset": _this17.$props.themePreset
|
|
2525
2540
|
}, {
|
|
2526
2541
|
"default": function _default() {
|
|
2527
|
-
return [
|
|
2542
|
+
return [_this17.renderAIScreen(), ' ', _this17.renderErrorComponent(true)];
|
|
2528
2543
|
}
|
|
2529
|
-
}), !
|
|
2544
|
+
}), !_this17.showAIScreen && _this17.parsedSuggestions.map(function (item, itemIndex) {
|
|
2530
2545
|
var index = indexOffset + itemIndex;
|
|
2531
2546
|
if (Array.isArray(item)) {
|
|
2532
2547
|
var sectionHtml = xss(item[0].sectionLabel);
|
|
@@ -2535,7 +2550,7 @@ var SearchBox = vue.defineComponent({
|
|
|
2535
2550
|
"key": "section-" + itemIndex,
|
|
2536
2551
|
"class": "section-container"
|
|
2537
2552
|
}, [sectionHtml ? vue.createVNode("div", {
|
|
2538
|
-
"class": "section-header " + getClassName$1(
|
|
2553
|
+
"class": "section-header " + getClassName$1(_this17.$props.innerClass, 'section-label'),
|
|
2539
2554
|
"key": "" + item[0].sectionId,
|
|
2540
2555
|
"innerHTML": sectionHtml
|
|
2541
2556
|
}, null) : null, vue.createVNode("ul", {
|
|
@@ -2555,7 +2570,7 @@ var SearchBox = vue.defineComponent({
|
|
|
2555
2570
|
justifyContent: 'flex-start',
|
|
2556
2571
|
alignItems: 'center'
|
|
2557
2572
|
},
|
|
2558
|
-
"class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$1(
|
|
2573
|
+
"class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$1(_this17.$props.innerClass, 'active-suggestion-item') : "li-item " + getClassName$1(_this17.$props.innerClass, 'suggestion-item'))
|
|
2559
2574
|
}), [renderItem(sectionItem)]);
|
|
2560
2575
|
}
|
|
2561
2576
|
if (sectionItem._suggestion_type === '_internal_a_i_trigger') {
|
|
@@ -2569,9 +2584,9 @@ var SearchBox = vue.defineComponent({
|
|
|
2569
2584
|
justifyContent: 'flex-start',
|
|
2570
2585
|
alignItems: 'center'
|
|
2571
2586
|
},
|
|
2572
|
-
"class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$1(
|
|
2587
|
+
"class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$1(_this17.$props.innerClass, 'active-suggestion-item') : "li-item " + getClassName$1(_this17.$props.innerClass, 'suggestion-item'))
|
|
2573
2588
|
}), [vue.createVNode(SuggestionItem, {
|
|
2574
|
-
"currentValue":
|
|
2589
|
+
"currentValue": _this17.currentValue,
|
|
2575
2590
|
"suggestion": sectionItem
|
|
2576
2591
|
}, null)]);
|
|
2577
2592
|
}
|
|
@@ -2585,7 +2600,7 @@ var SearchBox = vue.defineComponent({
|
|
|
2585
2600
|
justifyContent: 'flex-start',
|
|
2586
2601
|
alignItems: 'center'
|
|
2587
2602
|
},
|
|
2588
|
-
"class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$1(
|
|
2603
|
+
"class": "" + (highlightedIndex === index + sectionIndex ? "active-li-item " + getClassName$1(_this17.$props.innerClass, 'active-suggestion-item') : "li-item " + getClassName$1(_this17.$props.innerClass, 'suggestion-item'))
|
|
2589
2604
|
}), [vue.createVNode("div", {
|
|
2590
2605
|
"style": {
|
|
2591
2606
|
padding: '0 10px 0 0',
|
|
@@ -2593,74 +2608,74 @@ var SearchBox = vue.defineComponent({
|
|
|
2593
2608
|
}
|
|
2594
2609
|
}, [vue.createVNode(CustomSvg, {
|
|
2595
2610
|
"key": sectionItem._suggestion_type + "-" + sectionIndex,
|
|
2596
|
-
"className": getClassName$1(
|
|
2611
|
+
"className": getClassName$1(_this17.$props.innerClass, sectionItem._suggestion_type + "-search-icon") || null,
|
|
2597
2612
|
"icon": getIcon(sectionItem._suggestion_type, sectionItem, suggestionsHaveIcon),
|
|
2598
2613
|
"type": sectionItem._suggestion_type + "-search-icon"
|
|
2599
2614
|
}, null)]), vue.createVNode(SuggestionItem, {
|
|
2600
|
-
"currentValue":
|
|
2615
|
+
"currentValue": _this17.currentValue,
|
|
2601
2616
|
"suggestion": sectionItem
|
|
2602
|
-
}, null),
|
|
2617
|
+
}, null), _this17.renderActionIcon(sectionItem)]);
|
|
2603
2618
|
})])]);
|
|
2604
2619
|
}
|
|
2605
2620
|
return vue.createVNode("div", null, [vue.createTextVNode("No suggestions")]);
|
|
2606
|
-
}), !
|
|
2621
|
+
}), !_this17.showAIScreen && _this17.parsedSuggestions.length && _this17.$props.showSuggestionsFooter ? _this17.suggestionsFooter() : null]) : _this17.renderNoSuggestions(_this17.normalizedSuggestions)]);
|
|
2607
2622
|
};
|
|
2608
2623
|
return vue.createVNode("div", {
|
|
2609
2624
|
"class": Input.suggestionsContainer
|
|
2610
2625
|
}, [vue.createVNode(InputGroup, {
|
|
2611
2626
|
"searchBox": true,
|
|
2612
2627
|
"ref": _inputGroupRef,
|
|
2613
|
-
"isOpen":
|
|
2628
|
+
"isOpen": _this17.$data.isOpen
|
|
2614
2629
|
}, {
|
|
2615
2630
|
"default": function _default() {
|
|
2616
2631
|
return [vue.createVNode(Input.Actions, null, {
|
|
2617
2632
|
"default": function _default() {
|
|
2618
|
-
return [
|
|
2633
|
+
return [_this17.renderInputAddonBefore(), _this17.renderLeftIcons()];
|
|
2619
2634
|
}
|
|
2620
2635
|
}), vue.createVNode(DropDown.InputWrapper, null, {
|
|
2621
2636
|
"default": function _default() {
|
|
2622
2637
|
return [vue.createVNode(Input.TextArea, vue.mergeProps(_transformOn(getInputEvents({
|
|
2623
|
-
onInput:
|
|
2638
|
+
onInput: _this17.onInputChange,
|
|
2624
2639
|
onBlur: function onBlur(e) {
|
|
2625
|
-
|
|
2640
|
+
_this17.$emit('blur', e, _this17.triggerQuery);
|
|
2626
2641
|
},
|
|
2627
|
-
onFocus:
|
|
2642
|
+
onFocus: _this17.handleFocus,
|
|
2628
2643
|
onKeyPress: function onKeyPress(e) {
|
|
2629
|
-
|
|
2630
|
-
|
|
2644
|
+
_this17.$emit('keyPress', e, _this17.triggerQuery);
|
|
2645
|
+
_this17.$emit('key-press', e, _this17.triggerQuery);
|
|
2631
2646
|
},
|
|
2632
2647
|
onKeyDown: function onKeyDown(e) {
|
|
2633
|
-
return
|
|
2648
|
+
return _this17.handleKeyDown(e, highlightedIndex);
|
|
2634
2649
|
},
|
|
2635
2650
|
onKeyUp: function onKeyUp(e) {
|
|
2636
|
-
|
|
2637
|
-
|
|
2651
|
+
_this17.$emit('keyUp', e, _this17.triggerQuery);
|
|
2652
|
+
_this17.$emit('key-up', e, _this17.triggerQuery);
|
|
2638
2653
|
},
|
|
2639
2654
|
onClick: function onClick() {
|
|
2640
2655
|
setHighlightedIndex(null);
|
|
2641
2656
|
}
|
|
2642
2657
|
})), {
|
|
2643
2658
|
"searchBox": true,
|
|
2644
|
-
"isOpen":
|
|
2645
|
-
"id":
|
|
2646
|
-
"ref":
|
|
2647
|
-
"class": getClassName$1(
|
|
2648
|
-
"placeholder":
|
|
2649
|
-
"autoFocus":
|
|
2659
|
+
"isOpen": _this17.$data.isOpen,
|
|
2660
|
+
"id": _this17.$props.componentId + "-input",
|
|
2661
|
+
"ref": _this17.$props.innerRef,
|
|
2662
|
+
"class": getClassName$1(_this17.$props.innerClass, 'input'),
|
|
2663
|
+
"placeholder": _this17.$props.placeholder,
|
|
2664
|
+
"autoFocus": _this17.$props.autoFocus
|
|
2650
2665
|
}, getInputProps({
|
|
2651
|
-
value:
|
|
2666
|
+
value: _this17.$data.currentValue === null ? '' : _this17.$data.currentValue
|
|
2652
2667
|
}), {
|
|
2653
|
-
"themePreset":
|
|
2668
|
+
"themePreset": _this17.themePreset,
|
|
2654
2669
|
"autocomplete": "off"
|
|
2655
2670
|
}), null), !expandSuggestionsContainer && renderSuggestionsDropdown()];
|
|
2656
2671
|
}
|
|
2657
2672
|
}), vue.createVNode(Input.Actions, null, {
|
|
2658
2673
|
"default": function _default() {
|
|
2659
|
-
return [
|
|
2674
|
+
return [_this17.renderRightIcons(), _this17.renderInputAddonAfter(), _this17.renderAskButtonElement(), _this17.renderEnterButtonElement()];
|
|
2660
2675
|
}
|
|
2661
2676
|
})];
|
|
2662
2677
|
}
|
|
2663
|
-
}), expandSuggestionsContainer && renderSuggestionsDropdown(),
|
|
2678
|
+
}), expandSuggestionsContainer && renderSuggestionsDropdown(), _this17.renderTags()]);
|
|
2664
2679
|
}
|
|
2665
2680
|
}) : vue.createVNode("div", {
|
|
2666
2681
|
"class": Input.suggestionsContainer
|
|
@@ -2671,43 +2686,43 @@ var SearchBox = vue.defineComponent({
|
|
|
2671
2686
|
"default": function _default() {
|
|
2672
2687
|
return [vue.createVNode(Input.Actions, null, {
|
|
2673
2688
|
"default": function _default() {
|
|
2674
|
-
return [
|
|
2689
|
+
return [_this17.renderInputAddonBefore(), _this17.renderLeftIcons()];
|
|
2675
2690
|
}
|
|
2676
2691
|
}), vue.createVNode(DropDown.InputWrapper, null, {
|
|
2677
2692
|
"default": function _default() {
|
|
2678
2693
|
return [vue.createVNode(Input.TextArea, vue.mergeProps(_transformOn({
|
|
2679
2694
|
blur: function blur(e) {
|
|
2680
|
-
|
|
2695
|
+
_this17.$emit('blur', e, _this17.triggerQuery);
|
|
2681
2696
|
},
|
|
2682
2697
|
keypress: function keypress(e) {
|
|
2683
|
-
|
|
2684
|
-
|
|
2698
|
+
_this17.$emit('keyPress', e, _this17.triggerQuery);
|
|
2699
|
+
_this17.$emit('key-press', e, _this17.triggerQuery);
|
|
2685
2700
|
},
|
|
2686
|
-
input:
|
|
2701
|
+
input: _this17.onInputChange,
|
|
2687
2702
|
focus: function focus(e) {
|
|
2688
|
-
|
|
2703
|
+
_this17.$emit('focus', e, _this17.triggerQuery);
|
|
2689
2704
|
},
|
|
2690
|
-
keydown:
|
|
2705
|
+
keydown: _this17.handleKeyDown,
|
|
2691
2706
|
keyup: function keyup(e) {
|
|
2692
|
-
|
|
2693
|
-
|
|
2707
|
+
_this17.$emit('keyUp', e, _this17.triggerQuery);
|
|
2708
|
+
_this17.$emit('key-up', e, _this17.triggerQuery);
|
|
2694
2709
|
}
|
|
2695
2710
|
}), {
|
|
2696
2711
|
"searchBox": true,
|
|
2697
|
-
"class": getClassName$1(
|
|
2698
|
-
"placeholder":
|
|
2699
|
-
"autofocus":
|
|
2700
|
-
"value":
|
|
2701
|
-
"iconPosition":
|
|
2702
|
-
"showIcon":
|
|
2703
|
-
"showClear":
|
|
2704
|
-
"ref":
|
|
2705
|
-
"themePreset":
|
|
2712
|
+
"class": getClassName$1(_this17.$props.innerClass, 'input') || '',
|
|
2713
|
+
"placeholder": _this17.$props.placeholder,
|
|
2714
|
+
"autofocus": _this17.$props.autoFocus,
|
|
2715
|
+
"value": _this17.$data.currentValue ? _this17.$data.currentValue : '',
|
|
2716
|
+
"iconPosition": _this17.$props.iconPosition,
|
|
2717
|
+
"showIcon": _this17.$props.showIcon,
|
|
2718
|
+
"showClear": _this17.$props.showClear,
|
|
2719
|
+
"ref": _this17.$props.innerRef,
|
|
2720
|
+
"themePreset": _this17.themePreset
|
|
2706
2721
|
}), null)];
|
|
2707
2722
|
}
|
|
2708
2723
|
}), vue.createVNode(Input.Actions, null, {
|
|
2709
2724
|
"default": function _default() {
|
|
2710
|
-
return [
|
|
2725
|
+
return [_this17.renderRightIcons(), _this17.renderInputAddonAfter(), _this17.renderEnterButtonElement()];
|
|
2711
2726
|
}
|
|
2712
2727
|
})];
|
|
2713
2728
|
}
|
package/dist/cjs/install.js
CHANGED
|
@@ -34,7 +34,7 @@ require('./ReactiveBase.js');
|
|
|
34
34
|
require('hotkeys-js');
|
|
35
35
|
require('xss');
|
|
36
36
|
require('remarkable');
|
|
37
|
-
var install = require('./install-
|
|
37
|
+
var install = require('./install-f7d9b812.js');
|
|
38
38
|
require('./DropDown-26666911.js');
|
|
39
39
|
require('./Input-3ecdb905.js');
|
|
40
40
|
require('compute-scroll-into-view');
|
package/dist/cjs/version.js
CHANGED
package/dist/es/index.js
CHANGED
|
@@ -30,8 +30,8 @@ export { default as ReactiveBase } from './ReactiveBase.js';
|
|
|
30
30
|
import 'hotkeys-js';
|
|
31
31
|
import 'xss';
|
|
32
32
|
import 'remarkable';
|
|
33
|
-
import { i as install } from './install-
|
|
34
|
-
export { A as AIAnswer, R as ReactiveComponentPrivate, S as SearchBox, T as TreeList, i as install } from './install-
|
|
33
|
+
import { i as install } from './install-3af47936.js';
|
|
34
|
+
export { A as AIAnswer, R as ReactiveComponentPrivate, S as SearchBox, T as TreeList, i as install } from './install-3af47936.js';
|
|
35
35
|
import './DropDown-48045fde.js';
|
|
36
36
|
import './Input-83dee8c5.js';
|
|
37
37
|
import 'compute-scroll-into-view';
|