@appbaseio/reactivesearch-vue 3.0.0-rc.6.1 → 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.
- package/dist/@appbaseio/reactivesearch-vue.umd.js +961 -735
- package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js +5 -5
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
- package/dist/cjs/MultiDropdownList.js +1 -1
- package/dist/cjs/{Pagination-58a0cf3f.js → Pagination-bcf8af5f.js} +1 -1
- package/dist/cjs/ReactiveGoogleMap.js +2 -2
- package/dist/cjs/ReactiveList.js +2 -2
- package/dist/cjs/SelectedFilters.js +1 -1
- package/dist/cjs/SingleDropdownList.js +1 -1
- package/dist/cjs/ToggleButton.js +1 -1
- package/dist/cjs/index.js +3 -3
- package/dist/cjs/{install-7fb595b8.js → install-547d13b9.js} +37 -15
- package/dist/cjs/install.js +3 -3
- package/dist/cjs/version.js +1 -1
- package/dist/es/MultiDropdownList.js +1 -1
- package/dist/es/{Pagination-ae401c33.js → Pagination-50fc3ef5.js} +1 -1
- package/dist/es/ReactiveGoogleMap.js +2 -2
- package/dist/es/ReactiveList.js +2 -2
- package/dist/es/SelectedFilters.js +1 -1
- package/dist/es/SingleDropdownList.js +1 -1
- package/dist/es/ToggleButton.js +1 -1
- package/dist/es/index.js +4 -4
- package/dist/es/{install-3f345819.js → install-b0a1fd33.js} +37 -15
- package/dist/es/install.js +3 -3
- package/dist/es/version.js +1 -1
- package/package.json +89 -89
- package/dist/cjs/{Button-9e179864.js → Button-f96a0570.js} +2 -2
- package/dist/es/{Button-c2ff5178.js → Button-5c2cf399.js} +2 -2
|
@@ -14,7 +14,7 @@ require('@appbaseio/reactivecore/lib/utils/helper');
|
|
|
14
14
|
require('@appbaseio/vue-emotion');
|
|
15
15
|
require('@emotion/css');
|
|
16
16
|
require('polished');
|
|
17
|
-
var Button = require('./Button-
|
|
17
|
+
var Button = require('./Button-f96a0570.js');
|
|
18
18
|
var vueTypes = require('./vueTypes-a5f1745e.js');
|
|
19
19
|
require('@appbaseio/reactivecore/lib/utils/transform');
|
|
20
20
|
require('redux');
|
|
@@ -6,7 +6,7 @@ var reactivecore = require('@appbaseio/reactivecore');
|
|
|
6
6
|
var _transformOn = _interopDefault(require('@vue/babel-helper-vue-transform-on'));
|
|
7
7
|
var vue = require('vue');
|
|
8
8
|
var VueTypes = _interopDefault(require('vue-types'));
|
|
9
|
-
var Button = require('./Button-
|
|
9
|
+
var Button = require('./Button-f96a0570.js');
|
|
10
10
|
var vueTypes = require('./vueTypes-a5f1745e.js');
|
|
11
11
|
|
|
12
12
|
function _isSlot(s) {
|
|
@@ -14,9 +14,9 @@ require('@appbaseio/reactivecore/lib/utils/helper');
|
|
|
14
14
|
var vueEmotion = require('@appbaseio/vue-emotion');
|
|
15
15
|
var css = require('@emotion/css');
|
|
16
16
|
require('polished');
|
|
17
|
-
require('./Button-
|
|
17
|
+
require('./Button-f96a0570.js');
|
|
18
18
|
var vueTypes = require('./vueTypes-a5f1745e.js');
|
|
19
|
-
var Pagination = require('./Pagination-
|
|
19
|
+
var Pagination = require('./Pagination-bcf8af5f.js');
|
|
20
20
|
require('@appbaseio/reactivecore/lib/utils/transform');
|
|
21
21
|
require('redux');
|
|
22
22
|
var index = require('./index-779ed366.js');
|
package/dist/cjs/ReactiveList.js
CHANGED
|
@@ -14,9 +14,9 @@ var helper = require('@appbaseio/reactivecore/lib/utils/helper');
|
|
|
14
14
|
var vueEmotion = require('@appbaseio/vue-emotion');
|
|
15
15
|
var css = require('@emotion/css');
|
|
16
16
|
require('polished');
|
|
17
|
-
require('./Button-
|
|
17
|
+
require('./Button-f96a0570.js');
|
|
18
18
|
var vueTypes = require('./vueTypes-a5f1745e.js');
|
|
19
|
-
var Pagination = require('./Pagination-
|
|
19
|
+
var Pagination = require('./Pagination-bcf8af5f.js');
|
|
20
20
|
require('@appbaseio/reactivecore/lib/utils/transform');
|
|
21
21
|
require('redux');
|
|
22
22
|
var index = require('./index-779ed366.js');
|
|
@@ -14,7 +14,7 @@ require('@appbaseio/reactivecore/lib/utils/helper');
|
|
|
14
14
|
require('@appbaseio/vue-emotion');
|
|
15
15
|
require('@emotion/css');
|
|
16
16
|
require('polished');
|
|
17
|
-
var Button = require('./Button-
|
|
17
|
+
var Button = require('./Button-f96a0570.js');
|
|
18
18
|
var vueTypes = require('./vueTypes-a5f1745e.js');
|
|
19
19
|
require('redux');
|
|
20
20
|
var index = require('./index-779ed366.js');
|
|
@@ -14,7 +14,7 @@ require('@appbaseio/reactivecore/lib/utils/helper');
|
|
|
14
14
|
require('@appbaseio/vue-emotion');
|
|
15
15
|
require('@emotion/css');
|
|
16
16
|
require('polished');
|
|
17
|
-
var Button = require('./Button-
|
|
17
|
+
var Button = require('./Button-f96a0570.js');
|
|
18
18
|
var vueTypes = require('./vueTypes-a5f1745e.js');
|
|
19
19
|
require('@appbaseio/reactivecore/lib/utils/transform');
|
|
20
20
|
require('redux');
|
package/dist/cjs/ToggleButton.js
CHANGED
|
@@ -13,7 +13,7 @@ require('@appbaseio/reactivecore/lib/utils/helper');
|
|
|
13
13
|
require('@appbaseio/vue-emotion');
|
|
14
14
|
require('@emotion/css');
|
|
15
15
|
require('polished');
|
|
16
|
-
var Button = require('./Button-
|
|
16
|
+
var Button = require('./Button-f96a0570.js');
|
|
17
17
|
var vueTypes = require('./vueTypes-a5f1745e.js');
|
|
18
18
|
require('@appbaseio/reactivecore/lib/utils/transform');
|
|
19
19
|
require('redux');
|
package/dist/cjs/index.js
CHANGED
|
@@ -12,9 +12,9 @@ require('@appbaseio/reactivecore/lib/utils/helper');
|
|
|
12
12
|
require('@appbaseio/vue-emotion');
|
|
13
13
|
require('@emotion/css');
|
|
14
14
|
require('polished');
|
|
15
|
-
require('./Button-
|
|
15
|
+
require('./Button-f96a0570.js');
|
|
16
16
|
require('./vueTypes-a5f1745e.js');
|
|
17
|
-
require('./Pagination-
|
|
17
|
+
require('./Pagination-bcf8af5f.js');
|
|
18
18
|
var ReactiveList = require('./ReactiveList.js');
|
|
19
19
|
require('@appbaseio/reactivecore/lib/utils/transform');
|
|
20
20
|
require('redux');
|
|
@@ -33,7 +33,7 @@ require('url-search-params-polyfill');
|
|
|
33
33
|
var ReactiveBase = require('./ReactiveBase.js');
|
|
34
34
|
require('hotkeys-js');
|
|
35
35
|
require('remarkable');
|
|
36
|
-
var install = require('./install-
|
|
36
|
+
var install = require('./install-547d13b9.js');
|
|
37
37
|
require('./DropDown-aef75c14.js');
|
|
38
38
|
require('./Input-56eba499.js');
|
|
39
39
|
require('compute-scroll-into-view');
|
|
@@ -12,7 +12,7 @@ var helper = require('@appbaseio/reactivecore/lib/utils/helper');
|
|
|
12
12
|
var vueEmotion = require('@appbaseio/vue-emotion');
|
|
13
13
|
var css = require('@emotion/css');
|
|
14
14
|
var polished = require('polished');
|
|
15
|
-
var Button = require('./Button-
|
|
15
|
+
var Button = require('./Button-f96a0570.js');
|
|
16
16
|
var vueTypes = require('./vueTypes-a5f1745e.js');
|
|
17
17
|
var ReactiveList = require('./ReactiveList.js');
|
|
18
18
|
var transform = require('@appbaseio/reactivecore/lib/utils/transform');
|
|
@@ -870,7 +870,7 @@ var MessageInput = vueEmotion.styled(Input.TextArea)(_templateObject9 || (_templ
|
|
|
870
870
|
var enterButton = _ref.enterButton;
|
|
871
871
|
return enterButton && "\n\t\t border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n\t";
|
|
872
872
|
});
|
|
873
|
-
var SendButton = vueEmotion.styled(Button.Button)(_templateObject10 || (_templateObject10 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tborder: none;\n\tcolor: #ffffff;\n\tcursor: pointer;\n\tfont-size: 16px;\n\tmargin-left: 8px;\n\toutline: none;\n\tpadding: 10px;\n\ttext-align: center;\n"])));
|
|
873
|
+
var SendButton = vueEmotion.styled(Button.Button)(_templateObject10 || (_templateObject10 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\tborder: none;\n\tcolor: #ffffff;\n\tcursor: pointer;\n\tfont-size: 16px;\n\tmargin-left: 8px;\n\toutline: none;\n\tpadding: 10px;\n\ttext-align: center;\n\n\t&:disabled {\n\t\tcursor: not-allowed;\n\t}\n"])));
|
|
874
874
|
var AIFeedbackContainer = vueEmotion.styled('div')(_templateObject11 || (_templateObject11 = _rollupPluginBabelHelpers._taggedTemplateLiteralLoose(["\n\t.--feedback-svgs-wrapper {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: flex-end;\n\t\tgap: 5px;\n\n\t\tsvg {\n\t\t\tcursor: pointer;\n\t\t\ttransition: all ease-in 0.1s;\n\t\t\t&.selected {\n\t\t\t\ttransform: scale(1.1);\n\t\t\t\tcursor: default;\n\t\t\t}\n\n\t\t\t&:hover {\n\t\t\t\ttransform: scale(1.1);\n\t\t\t}\n\t\t}\n\t}\n\n\t.--feedback-input-wrapper {\n\t\tdisplay: flex;\n\t\tgap: 7px;\n\t}\n"])));
|
|
875
875
|
|
|
876
876
|
var _templateObject$7, _templateObject2$3, _templateObject3$2, _templateObject4$1, _templateObject5$1, _templateObject6$1, _templateObject7$1;
|
|
@@ -2506,6 +2506,9 @@ var AIAnswer = vue.defineComponent({
|
|
|
2506
2506
|
},
|
|
2507
2507
|
shouldShowComponent: function shouldShowComponent() {
|
|
2508
2508
|
return this.showComponent;
|
|
2509
|
+
},
|
|
2510
|
+
errorMessageForMissingSessionId: function errorMessageForMissingSessionId() {
|
|
2511
|
+
return "AISessionId for " + this.$props.componentId + " is missing! AIAnswer component requires an AISessionId to function. Try reloading the App.";
|
|
2509
2512
|
}
|
|
2510
2513
|
},
|
|
2511
2514
|
props: {
|
|
@@ -2542,7 +2545,8 @@ var AIAnswer = vue.defineComponent({
|
|
|
2542
2545
|
renderError: vueTypes.types.title,
|
|
2543
2546
|
isLoading: vueTypes.types.boolRequired,
|
|
2544
2547
|
sessionIdFromStore: VueTypes.string,
|
|
2545
|
-
showComponent: vueTypes.types.boolRequired
|
|
2548
|
+
showComponent: vueTypes.types.boolRequired,
|
|
2549
|
+
style: vueTypes.types.style
|
|
2546
2550
|
},
|
|
2547
2551
|
mounted: function mounted() {},
|
|
2548
2552
|
watch: {
|
|
@@ -2563,9 +2567,15 @@ var AIAnswer = vue.defineComponent({
|
|
|
2563
2567
|
finalMessages.push.apply(finalMessages, messagesHistory.filter(function (msg) {
|
|
2564
2568
|
return msg.role !== constants.AI_ROLES.SYSTEM;
|
|
2565
2569
|
}));
|
|
2570
|
+
} else if (response && response.answer && response.answer.text) {
|
|
2571
|
+
finalMessages.push({
|
|
2572
|
+
role: constants.AI_ROLES.ASSISTANT,
|
|
2573
|
+
content: response.answer.text
|
|
2574
|
+
});
|
|
2575
|
+
this.error = {
|
|
2576
|
+
message: this.errorMessageForMissingSessionId
|
|
2577
|
+
};
|
|
2566
2578
|
}
|
|
2567
|
-
// fresh response
|
|
2568
|
-
if (response && response.answer) ;
|
|
2569
2579
|
this.messages = finalMessages;
|
|
2570
2580
|
} else if (!newVal && !this.error) {
|
|
2571
2581
|
this.messages = [];
|
|
@@ -2584,7 +2594,7 @@ var AIAnswer = vue.defineComponent({
|
|
|
2584
2594
|
this.$emit('on-data', {
|
|
2585
2595
|
data: this.messages,
|
|
2586
2596
|
rawData: this.$props.rawData,
|
|
2587
|
-
loading: newVal || this
|
|
2597
|
+
loading: newVal || this.isLoading,
|
|
2588
2598
|
error: this.$props.AIResponseError
|
|
2589
2599
|
});
|
|
2590
2600
|
},
|
|
@@ -2593,7 +2603,7 @@ var AIAnswer = vue.defineComponent({
|
|
|
2593
2603
|
this.$emit('on-data', {
|
|
2594
2604
|
data: this.messages,
|
|
2595
2605
|
rawData: this.$props.rawData,
|
|
2596
|
-
loading: newVal || this
|
|
2606
|
+
loading: newVal || this.isAIResponseLoading,
|
|
2597
2607
|
error: this.$props.AIResponseError
|
|
2598
2608
|
});
|
|
2599
2609
|
},
|
|
@@ -2605,10 +2615,17 @@ var AIAnswer = vue.defineComponent({
|
|
|
2605
2615
|
AIResponseError: function AIResponseError(newVal) {
|
|
2606
2616
|
this.error = newVal;
|
|
2607
2617
|
this.AISessionId = ((helper.getObjectFromLocalStorage(constants.AI_LOCAL_CACHE_KEY) || {})[this.$props.componentId] || {}).sessionId || null;
|
|
2618
|
+
if (this.error && !this.AISessionId) {
|
|
2619
|
+
var errorMessage = this.errorMessageForMissingSessionId;
|
|
2620
|
+
this.error = {
|
|
2621
|
+
message: errorMessage
|
|
2622
|
+
};
|
|
2623
|
+
console.error(errorMessage);
|
|
2624
|
+
}
|
|
2608
2625
|
this.$emit('on-data', {
|
|
2609
2626
|
data: this.messages,
|
|
2610
2627
|
rawData: this.$props.rawData,
|
|
2611
|
-
loading: this
|
|
2628
|
+
loading: this.isAIResponseLoading || this.isLoading,
|
|
2612
2629
|
error: newVal
|
|
2613
2630
|
});
|
|
2614
2631
|
},
|
|
@@ -2653,9 +2670,9 @@ var AIAnswer = vue.defineComponent({
|
|
|
2653
2670
|
}]);
|
|
2654
2671
|
this.getAIResponse(this.AISessionId, this.componentId, text);
|
|
2655
2672
|
} else {
|
|
2656
|
-
console.error(
|
|
2673
|
+
console.error(this.errorMessageForMissingSessionId);
|
|
2657
2674
|
this.error = {
|
|
2658
|
-
message: "AISessionId for " + this.$props.componentId + " is missing! AIAnswer component requires an
|
|
2675
|
+
message: "AISessionId for " + this.$props.componentId + " is missing! AIAnswer component requires an AISessionId to function. Trying reloading the App."
|
|
2659
2676
|
};
|
|
2660
2677
|
}
|
|
2661
2678
|
this.inputMessage = '';
|
|
@@ -2669,7 +2686,7 @@ var AIAnswer = vue.defineComponent({
|
|
|
2669
2686
|
this.getAIResponse(this.AISessionId, this.componentId, lastUserRequestMessage);
|
|
2670
2687
|
this.inputMessage = '';
|
|
2671
2688
|
} else {
|
|
2672
|
-
console.error("AISessionId for " + this.componentId + " is missing! AIAnswer component requires an
|
|
2689
|
+
console.error("AISessionId for " + this.componentId + " is missing! AIAnswer component requires an AISessionId to function. Try reloading the App.");
|
|
2673
2690
|
}
|
|
2674
2691
|
}
|
|
2675
2692
|
},
|
|
@@ -2752,7 +2769,7 @@ var AIAnswer = vue.defineComponent({
|
|
|
2752
2769
|
"positionType": "absolute"
|
|
2753
2770
|
}, {
|
|
2754
2771
|
"default": function _default() {
|
|
2755
|
-
return [_this2.shouldMicRender(showVoiceInput) && vue.createVNode(Mic, {
|
|
2772
|
+
return [!_this2.isLoadingState && _this2.AISessionId && _this2.shouldMicRender(showVoiceInput) && vue.createVNode(Mic, {
|
|
2756
2773
|
"getInstance": getMicInstance,
|
|
2757
2774
|
"render": renderMic,
|
|
2758
2775
|
"handleResult": _this2.handleVoiceResults,
|
|
@@ -2797,7 +2814,8 @@ var AIAnswer = vue.defineComponent({
|
|
|
2797
2814
|
"tabIndex": 0,
|
|
2798
2815
|
"onClick": _this3.handleSendMessage,
|
|
2799
2816
|
"onKeyPress": _this3.handleKeyPress,
|
|
2800
|
-
"class": "
|
|
2817
|
+
"class": "ask-btn " + helper.getClassName(innerClass, 'ai-enter-button'),
|
|
2818
|
+
"disabled": _this3.isLoadingState || !_this3.AISessionId
|
|
2801
2819
|
}, {
|
|
2802
2820
|
"default": function _default() {
|
|
2803
2821
|
return [vue.createTextVNode("Send")];
|
|
@@ -2860,7 +2878,10 @@ var AIAnswer = vue.defineComponent({
|
|
|
2860
2878
|
if (!this.shouldShowComponent) {
|
|
2861
2879
|
return null;
|
|
2862
2880
|
}
|
|
2863
|
-
return vue.createVNode(Chatbox,
|
|
2881
|
+
return vue.createVNode(Chatbox, {
|
|
2882
|
+
"style": props.style,
|
|
2883
|
+
"class": "--ai-chat-box-wrapper"
|
|
2884
|
+
}, {
|
|
2864
2885
|
"default": function _default() {
|
|
2865
2886
|
return [_this4.$props.title && vue.createVNode(Title.Title, {
|
|
2866
2887
|
"class": helper.getClassName(_this4.$props.innerClass, 'title') || ''
|
|
@@ -2869,6 +2890,7 @@ var AIAnswer = vue.defineComponent({
|
|
|
2869
2890
|
return [_this4.$props.title];
|
|
2870
2891
|
}
|
|
2871
2892
|
}), vue.createVNode(ChatContainer, {
|
|
2893
|
+
"class": "--ai-chat-container",
|
|
2872
2894
|
"theme": props.theme,
|
|
2873
2895
|
"showInput": props.showInput
|
|
2874
2896
|
}, {
|
|
@@ -2956,7 +2978,7 @@ var AIAnswer = vue.defineComponent({
|
|
|
2956
2978
|
"showIcon": props.showIcon,
|
|
2957
2979
|
"iconPosition": props.iconPosition,
|
|
2958
2980
|
"themePreset": _this4.themePreset,
|
|
2959
|
-
"disabled": _this4.isLoadingState,
|
|
2981
|
+
"disabled": _this4.isLoadingState || !_this4.AISessionId,
|
|
2960
2982
|
"class": helper.getClassName(props.innerClass, 'ai-input') || null
|
|
2961
2983
|
}, null), ' ', _this4.renderIcons()];
|
|
2962
2984
|
}
|
package/dist/cjs/install.js
CHANGED
|
@@ -12,9 +12,9 @@ require('@appbaseio/reactivecore/lib/utils/helper');
|
|
|
12
12
|
require('@appbaseio/vue-emotion');
|
|
13
13
|
require('@emotion/css');
|
|
14
14
|
require('polished');
|
|
15
|
-
require('./Button-
|
|
15
|
+
require('./Button-f96a0570.js');
|
|
16
16
|
require('./vueTypes-a5f1745e.js');
|
|
17
|
-
require('./Pagination-
|
|
17
|
+
require('./Pagination-bcf8af5f.js');
|
|
18
18
|
require('./ReactiveList.js');
|
|
19
19
|
require('@appbaseio/reactivecore/lib/utils/transform');
|
|
20
20
|
require('redux');
|
|
@@ -33,7 +33,7 @@ require('url-search-params-polyfill');
|
|
|
33
33
|
require('./ReactiveBase.js');
|
|
34
34
|
require('hotkeys-js');
|
|
35
35
|
require('remarkable');
|
|
36
|
-
var install = require('./install-
|
|
36
|
+
var install = require('./install-547d13b9.js');
|
|
37
37
|
require('./DropDown-aef75c14.js');
|
|
38
38
|
require('./Input-56eba499.js');
|
|
39
39
|
require('compute-scroll-into-view');
|
package/dist/cjs/version.js
CHANGED
|
@@ -8,7 +8,7 @@ import '@appbaseio/reactivecore/lib/utils/helper';
|
|
|
8
8
|
import '@appbaseio/vue-emotion';
|
|
9
9
|
import '@emotion/css';
|
|
10
10
|
import 'polished';
|
|
11
|
-
import { l as loadMoreContainer, B as Button } from './Button-
|
|
11
|
+
import { l as loadMoreContainer, B as Button } from './Button-5c2cf399.js';
|
|
12
12
|
import { t as types } from './vueTypes-09cab4d3.js';
|
|
13
13
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
14
14
|
import 'redux';
|
|
@@ -2,7 +2,7 @@ import { helper } from '@appbaseio/reactivecore';
|
|
|
2
2
|
import _transformOn from '@vue/babel-helper-vue-transform-on';
|
|
3
3
|
import { createVNode, mergeProps, createTextVNode, isVNode } from 'vue';
|
|
4
4
|
import VueTypes from 'vue-types';
|
|
5
|
-
import { p as pagination, B as Button } from './Button-
|
|
5
|
+
import { p as pagination, B as Button } from './Button-5c2cf399.js';
|
|
6
6
|
import { t as types } from './vueTypes-09cab4d3.js';
|
|
7
7
|
|
|
8
8
|
function _isSlot(s) {
|
|
@@ -8,9 +8,9 @@ import '@appbaseio/reactivecore/lib/utils/helper';
|
|
|
8
8
|
import { styled } from '@appbaseio/vue-emotion';
|
|
9
9
|
import { css } from '@emotion/css';
|
|
10
10
|
import 'polished';
|
|
11
|
-
import './Button-
|
|
11
|
+
import './Button-5c2cf399.js';
|
|
12
12
|
import { t as types } from './vueTypes-09cab4d3.js';
|
|
13
|
-
import { P as Pagination } from './Pagination-
|
|
13
|
+
import { P as Pagination } from './Pagination-50fc3ef5.js';
|
|
14
14
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
15
15
|
import 'redux';
|
|
16
16
|
import { h as hasCustomRenderer, i as isQueryIdentical, g as getComponent, a as isFunction, c as connect } from './index-882489e1.js';
|
package/dist/es/ReactiveList.js
CHANGED
|
@@ -8,9 +8,9 @@ import { withClickIds } from '@appbaseio/reactivecore/lib/utils/helper';
|
|
|
8
8
|
import { styled } from '@appbaseio/vue-emotion';
|
|
9
9
|
import { css } from '@emotion/css';
|
|
10
10
|
import 'polished';
|
|
11
|
-
import './Button-
|
|
11
|
+
import './Button-5c2cf399.js';
|
|
12
12
|
import { t as types } from './vueTypes-09cab4d3.js';
|
|
13
|
-
import { P as Pagination } from './Pagination-
|
|
13
|
+
import { P as Pagination } from './Pagination-50fc3ef5.js';
|
|
14
14
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
15
15
|
import 'redux';
|
|
16
16
|
import { c as connect, h as hasCustomRenderer, i as isQueryIdentical, u as updateDefaultQuery, a as isFunction, g as getComponent } from './index-882489e1.js';
|
|
@@ -8,7 +8,7 @@ import '@appbaseio/reactivecore/lib/utils/helper';
|
|
|
8
8
|
import '@appbaseio/vue-emotion';
|
|
9
9
|
import '@emotion/css';
|
|
10
10
|
import 'polished';
|
|
11
|
-
import { f as filters, B as Button } from './Button-
|
|
11
|
+
import { f as filters, B as Button } from './Button-5c2cf399.js';
|
|
12
12
|
import { t as types } from './vueTypes-09cab4d3.js';
|
|
13
13
|
import 'redux';
|
|
14
14
|
import { f as decodeHtml, c as connect } from './index-882489e1.js';
|
|
@@ -8,7 +8,7 @@ import '@appbaseio/reactivecore/lib/utils/helper';
|
|
|
8
8
|
import '@appbaseio/vue-emotion';
|
|
9
9
|
import '@emotion/css';
|
|
10
10
|
import 'polished';
|
|
11
|
-
import { l as loadMoreContainer, B as Button } from './Button-
|
|
11
|
+
import { l as loadMoreContainer, B as Button } from './Button-5c2cf399.js';
|
|
12
12
|
import { t as types } from './vueTypes-09cab4d3.js';
|
|
13
13
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
14
14
|
import 'redux';
|
package/dist/es/ToggleButton.js
CHANGED
|
@@ -7,7 +7,7 @@ import '@appbaseio/reactivecore/lib/utils/helper';
|
|
|
7
7
|
import '@appbaseio/vue-emotion';
|
|
8
8
|
import '@emotion/css';
|
|
9
9
|
import 'polished';
|
|
10
|
-
import { B as Button, t as toggleButtons } from './Button-
|
|
10
|
+
import { B as Button, t as toggleButtons } from './Button-5c2cf399.js';
|
|
11
11
|
import { t as types } from './vueTypes-09cab4d3.js';
|
|
12
12
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
13
13
|
import 'redux';
|
package/dist/es/index.js
CHANGED
|
@@ -8,9 +8,9 @@ import '@appbaseio/reactivecore/lib/utils/helper';
|
|
|
8
8
|
import '@appbaseio/vue-emotion';
|
|
9
9
|
import '@emotion/css';
|
|
10
10
|
import 'polished';
|
|
11
|
-
import './Button-
|
|
11
|
+
import './Button-5c2cf399.js';
|
|
12
12
|
import './vueTypes-09cab4d3.js';
|
|
13
|
-
import './Pagination-
|
|
13
|
+
import './Pagination-50fc3ef5.js';
|
|
14
14
|
export { default as ReactiveList } from './ReactiveList.js';
|
|
15
15
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
16
16
|
import 'redux';
|
|
@@ -29,8 +29,8 @@ import 'url-search-params-polyfill';
|
|
|
29
29
|
export { default as ReactiveBase } from './ReactiveBase.js';
|
|
30
30
|
import 'hotkeys-js';
|
|
31
31
|
import 'remarkable';
|
|
32
|
-
import { i as install } from './install-
|
|
33
|
-
export { A as AIAnswer, R as ReactiveComponentPrivate, S as SearchBox, T as TreeList, i as install } from './install-
|
|
32
|
+
import { i as install } from './install-b0a1fd33.js';
|
|
33
|
+
export { A as AIAnswer, R as ReactiveComponentPrivate, S as SearchBox, T as TreeList, i as install } from './install-b0a1fd33.js';
|
|
34
34
|
import './DropDown-39fedff8.js';
|
|
35
35
|
import './Input-11d211d2.js';
|
|
36
36
|
import 'compute-scroll-into-view';
|
|
@@ -8,7 +8,7 @@ import { getQueryOptions, getObjectFromLocalStorage, suggestionTypes, getClassNa
|
|
|
8
8
|
import { styled } from '@appbaseio/vue-emotion';
|
|
9
9
|
import { css, keyframes } from '@emotion/css';
|
|
10
10
|
import { lighten } from 'polished';
|
|
11
|
-
import { B as Button } from './Button-
|
|
11
|
+
import { B as Button } from './Button-5c2cf399.js';
|
|
12
12
|
import { t as types } from './vueTypes-09cab4d3.js';
|
|
13
13
|
import { RLConnected as ReactiveList } from './ReactiveList.js';
|
|
14
14
|
import { getInternalComponentID } from '@appbaseio/reactivecore/lib/utils/transform';
|
|
@@ -866,7 +866,7 @@ var MessageInput = styled(TextArea)(_templateObject9 || (_templateObject9 = _tag
|
|
|
866
866
|
var enterButton = _ref.enterButton;
|
|
867
867
|
return enterButton && "\n\t\t border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n\t";
|
|
868
868
|
});
|
|
869
|
-
var SendButton = styled(Button)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteralLoose(["\n\tborder: none;\n\tcolor: #ffffff;\n\tcursor: pointer;\n\tfont-size: 16px;\n\tmargin-left: 8px;\n\toutline: none;\n\tpadding: 10px;\n\ttext-align: center;\n"])));
|
|
869
|
+
var SendButton = styled(Button)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteralLoose(["\n\tborder: none;\n\tcolor: #ffffff;\n\tcursor: pointer;\n\tfont-size: 16px;\n\tmargin-left: 8px;\n\toutline: none;\n\tpadding: 10px;\n\ttext-align: center;\n\n\t&:disabled {\n\t\tcursor: not-allowed;\n\t}\n"])));
|
|
870
870
|
var AIFeedbackContainer = styled('div')(_templateObject11 || (_templateObject11 = _taggedTemplateLiteralLoose(["\n\t.--feedback-svgs-wrapper {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: flex-end;\n\t\tgap: 5px;\n\n\t\tsvg {\n\t\t\tcursor: pointer;\n\t\t\ttransition: all ease-in 0.1s;\n\t\t\t&.selected {\n\t\t\t\ttransform: scale(1.1);\n\t\t\t\tcursor: default;\n\t\t\t}\n\n\t\t\t&:hover {\n\t\t\t\ttransform: scale(1.1);\n\t\t\t}\n\t\t}\n\t}\n\n\t.--feedback-input-wrapper {\n\t\tdisplay: flex;\n\t\tgap: 7px;\n\t}\n"])));
|
|
871
871
|
|
|
872
872
|
var _templateObject$7, _templateObject2$3, _templateObject3$2, _templateObject4$1, _templateObject5$1, _templateObject6$1, _templateObject7$1;
|
|
@@ -2502,6 +2502,9 @@ var AIAnswer = defineComponent({
|
|
|
2502
2502
|
},
|
|
2503
2503
|
shouldShowComponent: function shouldShowComponent() {
|
|
2504
2504
|
return this.showComponent;
|
|
2505
|
+
},
|
|
2506
|
+
errorMessageForMissingSessionId: function errorMessageForMissingSessionId() {
|
|
2507
|
+
return "AISessionId for " + this.$props.componentId + " is missing! AIAnswer component requires an AISessionId to function. Try reloading the App.";
|
|
2505
2508
|
}
|
|
2506
2509
|
},
|
|
2507
2510
|
props: {
|
|
@@ -2538,7 +2541,8 @@ var AIAnswer = defineComponent({
|
|
|
2538
2541
|
renderError: types.title,
|
|
2539
2542
|
isLoading: types.boolRequired,
|
|
2540
2543
|
sessionIdFromStore: VueTypes.string,
|
|
2541
|
-
showComponent: types.boolRequired
|
|
2544
|
+
showComponent: types.boolRequired,
|
|
2545
|
+
style: types.style
|
|
2542
2546
|
},
|
|
2543
2547
|
mounted: function mounted() {},
|
|
2544
2548
|
watch: {
|
|
@@ -2559,9 +2563,15 @@ var AIAnswer = defineComponent({
|
|
|
2559
2563
|
finalMessages.push.apply(finalMessages, messagesHistory.filter(function (msg) {
|
|
2560
2564
|
return msg.role !== AI_ROLES.SYSTEM;
|
|
2561
2565
|
}));
|
|
2566
|
+
} else if (response && response.answer && response.answer.text) {
|
|
2567
|
+
finalMessages.push({
|
|
2568
|
+
role: AI_ROLES.ASSISTANT,
|
|
2569
|
+
content: response.answer.text
|
|
2570
|
+
});
|
|
2571
|
+
this.error = {
|
|
2572
|
+
message: this.errorMessageForMissingSessionId
|
|
2573
|
+
};
|
|
2562
2574
|
}
|
|
2563
|
-
// fresh response
|
|
2564
|
-
if (response && response.answer) ;
|
|
2565
2575
|
this.messages = finalMessages;
|
|
2566
2576
|
} else if (!newVal && !this.error) {
|
|
2567
2577
|
this.messages = [];
|
|
@@ -2580,7 +2590,7 @@ var AIAnswer = defineComponent({
|
|
|
2580
2590
|
this.$emit('on-data', {
|
|
2581
2591
|
data: this.messages,
|
|
2582
2592
|
rawData: this.$props.rawData,
|
|
2583
|
-
loading: newVal || this
|
|
2593
|
+
loading: newVal || this.isLoading,
|
|
2584
2594
|
error: this.$props.AIResponseError
|
|
2585
2595
|
});
|
|
2586
2596
|
},
|
|
@@ -2589,7 +2599,7 @@ var AIAnswer = defineComponent({
|
|
|
2589
2599
|
this.$emit('on-data', {
|
|
2590
2600
|
data: this.messages,
|
|
2591
2601
|
rawData: this.$props.rawData,
|
|
2592
|
-
loading: newVal || this
|
|
2602
|
+
loading: newVal || this.isAIResponseLoading,
|
|
2593
2603
|
error: this.$props.AIResponseError
|
|
2594
2604
|
});
|
|
2595
2605
|
},
|
|
@@ -2601,10 +2611,17 @@ var AIAnswer = defineComponent({
|
|
|
2601
2611
|
AIResponseError: function AIResponseError(newVal) {
|
|
2602
2612
|
this.error = newVal;
|
|
2603
2613
|
this.AISessionId = ((getObjectFromLocalStorage(AI_LOCAL_CACHE_KEY) || {})[this.$props.componentId] || {}).sessionId || null;
|
|
2614
|
+
if (this.error && !this.AISessionId) {
|
|
2615
|
+
var errorMessage = this.errorMessageForMissingSessionId;
|
|
2616
|
+
this.error = {
|
|
2617
|
+
message: errorMessage
|
|
2618
|
+
};
|
|
2619
|
+
console.error(errorMessage);
|
|
2620
|
+
}
|
|
2604
2621
|
this.$emit('on-data', {
|
|
2605
2622
|
data: this.messages,
|
|
2606
2623
|
rawData: this.$props.rawData,
|
|
2607
|
-
loading: this
|
|
2624
|
+
loading: this.isAIResponseLoading || this.isLoading,
|
|
2608
2625
|
error: newVal
|
|
2609
2626
|
});
|
|
2610
2627
|
},
|
|
@@ -2649,9 +2666,9 @@ var AIAnswer = defineComponent({
|
|
|
2649
2666
|
}]);
|
|
2650
2667
|
this.getAIResponse(this.AISessionId, this.componentId, text);
|
|
2651
2668
|
} else {
|
|
2652
|
-
console.error(
|
|
2669
|
+
console.error(this.errorMessageForMissingSessionId);
|
|
2653
2670
|
this.error = {
|
|
2654
|
-
message: "AISessionId for " + this.$props.componentId + " is missing! AIAnswer component requires an
|
|
2671
|
+
message: "AISessionId for " + this.$props.componentId + " is missing! AIAnswer component requires an AISessionId to function. Trying reloading the App."
|
|
2655
2672
|
};
|
|
2656
2673
|
}
|
|
2657
2674
|
this.inputMessage = '';
|
|
@@ -2665,7 +2682,7 @@ var AIAnswer = defineComponent({
|
|
|
2665
2682
|
this.getAIResponse(this.AISessionId, this.componentId, lastUserRequestMessage);
|
|
2666
2683
|
this.inputMessage = '';
|
|
2667
2684
|
} else {
|
|
2668
|
-
console.error("AISessionId for " + this.componentId + " is missing! AIAnswer component requires an
|
|
2685
|
+
console.error("AISessionId for " + this.componentId + " is missing! AIAnswer component requires an AISessionId to function. Try reloading the App.");
|
|
2669
2686
|
}
|
|
2670
2687
|
}
|
|
2671
2688
|
},
|
|
@@ -2748,7 +2765,7 @@ var AIAnswer = defineComponent({
|
|
|
2748
2765
|
"positionType": "absolute"
|
|
2749
2766
|
}, {
|
|
2750
2767
|
"default": function _default() {
|
|
2751
|
-
return [_this2.shouldMicRender(showVoiceInput) && createVNode(Mic, {
|
|
2768
|
+
return [!_this2.isLoadingState && _this2.AISessionId && _this2.shouldMicRender(showVoiceInput) && createVNode(Mic, {
|
|
2752
2769
|
"getInstance": getMicInstance,
|
|
2753
2770
|
"render": renderMic,
|
|
2754
2771
|
"handleResult": _this2.handleVoiceResults,
|
|
@@ -2793,7 +2810,8 @@ var AIAnswer = defineComponent({
|
|
|
2793
2810
|
"tabIndex": 0,
|
|
2794
2811
|
"onClick": _this3.handleSendMessage,
|
|
2795
2812
|
"onKeyPress": _this3.handleKeyPress,
|
|
2796
|
-
"class": "
|
|
2813
|
+
"class": "ask-btn " + getClassName$2(innerClass, 'ai-enter-button'),
|
|
2814
|
+
"disabled": _this3.isLoadingState || !_this3.AISessionId
|
|
2797
2815
|
}, {
|
|
2798
2816
|
"default": function _default() {
|
|
2799
2817
|
return [createTextVNode("Send")];
|
|
@@ -2856,7 +2874,10 @@ var AIAnswer = defineComponent({
|
|
|
2856
2874
|
if (!this.shouldShowComponent) {
|
|
2857
2875
|
return null;
|
|
2858
2876
|
}
|
|
2859
|
-
return createVNode(Chatbox,
|
|
2877
|
+
return createVNode(Chatbox, {
|
|
2878
|
+
"style": props.style,
|
|
2879
|
+
"class": "--ai-chat-box-wrapper"
|
|
2880
|
+
}, {
|
|
2860
2881
|
"default": function _default() {
|
|
2861
2882
|
return [_this4.$props.title && createVNode(Title, {
|
|
2862
2883
|
"class": getClassName$2(_this4.$props.innerClass, 'title') || ''
|
|
@@ -2865,6 +2886,7 @@ var AIAnswer = defineComponent({
|
|
|
2865
2886
|
return [_this4.$props.title];
|
|
2866
2887
|
}
|
|
2867
2888
|
}), createVNode(ChatContainer, {
|
|
2889
|
+
"class": "--ai-chat-container",
|
|
2868
2890
|
"theme": props.theme,
|
|
2869
2891
|
"showInput": props.showInput
|
|
2870
2892
|
}, {
|
|
@@ -2952,7 +2974,7 @@ var AIAnswer = defineComponent({
|
|
|
2952
2974
|
"showIcon": props.showIcon,
|
|
2953
2975
|
"iconPosition": props.iconPosition,
|
|
2954
2976
|
"themePreset": _this4.themePreset,
|
|
2955
|
-
"disabled": _this4.isLoadingState,
|
|
2977
|
+
"disabled": _this4.isLoadingState || !_this4.AISessionId,
|
|
2956
2978
|
"class": getClassName$2(props.innerClass, 'ai-input') || null
|
|
2957
2979
|
}, null), ' ', _this4.renderIcons()];
|
|
2958
2980
|
}
|
package/dist/es/install.js
CHANGED
|
@@ -8,9 +8,9 @@ import '@appbaseio/reactivecore/lib/utils/helper';
|
|
|
8
8
|
import '@appbaseio/vue-emotion';
|
|
9
9
|
import '@emotion/css';
|
|
10
10
|
import 'polished';
|
|
11
|
-
import './Button-
|
|
11
|
+
import './Button-5c2cf399.js';
|
|
12
12
|
import './vueTypes-09cab4d3.js';
|
|
13
|
-
import './Pagination-
|
|
13
|
+
import './Pagination-50fc3ef5.js';
|
|
14
14
|
import './ReactiveList.js';
|
|
15
15
|
import '@appbaseio/reactivecore/lib/utils/transform';
|
|
16
16
|
import 'redux';
|
|
@@ -29,7 +29,7 @@ import 'url-search-params-polyfill';
|
|
|
29
29
|
import './ReactiveBase.js';
|
|
30
30
|
import 'hotkeys-js';
|
|
31
31
|
import 'remarkable';
|
|
32
|
-
export { i as default } from './install-
|
|
32
|
+
export { i as default } from './install-b0a1fd33.js';
|
|
33
33
|
import './DropDown-39fedff8.js';
|
|
34
34
|
import './Input-11d211d2.js';
|
|
35
35
|
import 'compute-scroll-into-view';
|
package/dist/es/version.js
CHANGED