@xapp/chat-widget 1.29.2 → 1.32.1
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/components/ChatMedia/ChatMedia.d.ts +4 -1
- package/dist/components/Input/Input.d.ts +5 -5
- package/dist/components/Input/Input.stories.d.ts +2 -1
- package/dist/components/Input/index.d.ts +1 -1
- package/dist/components/SendButton/SendButton.d.ts +1 -0
- package/dist/components/Suggestions/Suggestions.d.ts +5 -4
- package/dist/components/Suggestions/Suggestions.stories.d.ts +0 -1
- package/dist/components/Suggestions/data.d.ts +2 -23
- package/dist/components/WidgetStylesheet/WidgetStylesheet.d.ts +1 -0
- package/dist/index.css +1 -1
- package/dist/index.es.js +1123 -717
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +1224 -818
- package/dist/index.js.map +1 -1
- package/dist/store/ChatStore.d.ts +1 -1
- package/dist/storybook/RichTextValues.d.ts +2 -0
- package/dist/utils/useDimensions.d.ts +2 -2
- package/dist/utils/useSuggestions.d.ts +4 -4
- package/dist/utils/useSuggestionsFetch.d.ts +2 -19
- package/package.json +25 -24
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Store } from "redux";
|
|
2
2
|
import { ServerConfig } from "..";
|
|
3
3
|
import { ActionType } from "./ChatAction";
|
|
4
|
-
export declare function createChatStore(config: ServerConfig): Store<unknown, ActionType>;
|
|
4
|
+
export declare function createChatStore(config: ServerConfig, dataStorage?: Storage): Store<unknown, ActionType>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function useDimensions<TNode extends HTMLElement>(): [
|
|
1
|
+
import { RefObject } from "react";
|
|
2
|
+
export declare function useDimensions<TNode extends HTMLElement>(): [RefObject<TNode>, DOMRect | undefined];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { SuggestionsGroupData, SuggestionsItemData } from "@xapp/chat-widget-core";
|
|
2
|
+
import { SuggestionCommand } from "../components/Input";
|
|
3
3
|
export declare function useSuggestions(search: string, context: readonly string[]): SuggestionsState;
|
|
4
4
|
export interface SuggestionsState {
|
|
5
|
-
readonly suggestions:
|
|
5
|
+
readonly suggestions: readonly SuggestionsGroupData[] | undefined;
|
|
6
6
|
readonly index: number;
|
|
7
|
-
readonly item:
|
|
7
|
+
readonly item: SuggestionsItemData | undefined;
|
|
8
8
|
execute(cmd: SuggestionCommand): void;
|
|
9
9
|
}
|
|
@@ -1,19 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
readonly formattedSuggestion: string;
|
|
4
|
-
readonly format: readonly SuggestionsResponseItemFormat[];
|
|
5
|
-
readonly type: string;
|
|
6
|
-
readonly answer: string;
|
|
7
|
-
readonly truncatedAnswer: string;
|
|
8
|
-
}
|
|
9
|
-
export declare type SuggestionsResponseItemFormat = {
|
|
10
|
-
readonly [type in SuggestionsResponseFormatType]?: {
|
|
11
|
-
readonly start: number;
|
|
12
|
-
readonly end: number;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
export declare type SuggestionsResponseFormatType = "bold";
|
|
16
|
-
export interface SuggestionsResponse {
|
|
17
|
-
readonly suggestions: readonly SuggestionsResponseItem[];
|
|
18
|
-
}
|
|
19
|
-
export declare function useSuggestionsFetch(search: string, context: readonly string[] | undefined): SuggestionsResponse | undefined;
|
|
1
|
+
import { JsonFetchResponse, SuggestionsResponse } from "@xapp/chat-widget-core";
|
|
2
|
+
export declare function useSuggestionsFetch(search: string, context: readonly string[] | undefined): JsonFetchResponse<SuggestionsResponse>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xapp/chat-widget",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.32.1",
|
|
4
4
|
"description": "XAPP Chat Widget",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"clean": "rm -rf ./lib/* && rm -rf ./dist/*",
|
|
@@ -31,24 +31,24 @@
|
|
|
31
31
|
"Chat",
|
|
32
32
|
"Widget"
|
|
33
33
|
],
|
|
34
|
-
"author": "
|
|
34
|
+
"author": "XAPP AI",
|
|
35
35
|
"license": "Apache-2.0",
|
|
36
36
|
"bugs": {
|
|
37
37
|
"url": "https://github.com/XappMedia/chat-widget/issues"
|
|
38
38
|
},
|
|
39
39
|
"homepage": "https://github.com/XappMedia/chat-widget#readme",
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@babel/core": "7.16.
|
|
41
|
+
"@babel/core": "7.16.5",
|
|
42
42
|
"@rollup/plugin-commonjs": "21.0.1",
|
|
43
|
-
"@rollup/plugin-node-resolve": "13.
|
|
44
|
-
"@storybook/addon-actions": "6.
|
|
45
|
-
"@storybook/addon-essentials": "6.
|
|
46
|
-
"@storybook/addon-links": "6.
|
|
47
|
-
"@storybook/react": "6.
|
|
48
|
-
"@testing-library/jest-dom": "5.
|
|
43
|
+
"@rollup/plugin-node-resolve": "13.1.1",
|
|
44
|
+
"@storybook/addon-actions": "6.4.9",
|
|
45
|
+
"@storybook/addon-essentials": "6.4.9",
|
|
46
|
+
"@storybook/addon-links": "6.4.9",
|
|
47
|
+
"@storybook/react": "6.4.9",
|
|
48
|
+
"@testing-library/jest-dom": "5.16.1",
|
|
49
49
|
"@types/enzyme": "3.10.10",
|
|
50
50
|
"@types/enzyme-adapter-react-16": "1.0.6",
|
|
51
|
-
"@types/jest": "
|
|
51
|
+
"@types/jest": "27.0.3",
|
|
52
52
|
"@types/react": "17.0.37",
|
|
53
53
|
"@types/react-redux": "7.1.20",
|
|
54
54
|
"@types/react-transition-group": "4.4.4",
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
"@typescript-eslint/eslint-plugin": "4.33.0",
|
|
58
58
|
"@typescript-eslint/parser": "4.33.0",
|
|
59
59
|
"babel-eslint": "10.1.0",
|
|
60
|
+
"babel-jest": "27.4.5",
|
|
60
61
|
"babel-loader": "8.2.3",
|
|
61
62
|
"enzyme": "3.11.0",
|
|
62
63
|
"enzyme-adapter-react-16": "1.15.6",
|
|
@@ -68,24 +69,23 @@
|
|
|
68
69
|
"eslint-plugin-jsx-a11y": "6.5.1",
|
|
69
70
|
"eslint-plugin-react": "7.27.1",
|
|
70
71
|
"eslint-plugin-react-hooks": "4.3.0",
|
|
71
|
-
"jest": "
|
|
72
|
+
"jest": "27.4.5",
|
|
72
73
|
"prettier": "2.4.1",
|
|
73
74
|
"react": "16.14.0",
|
|
74
75
|
"react-dom": "16.14.0",
|
|
75
76
|
"react-redux": "7.2.6",
|
|
76
|
-
"redux": "4.1.
|
|
77
|
-
"redux-thunk": "2.4.
|
|
78
|
-
"rollup": "2.
|
|
77
|
+
"redux": "4.1.2",
|
|
78
|
+
"redux-thunk": "2.4.1",
|
|
79
|
+
"rollup": "2.61.1",
|
|
79
80
|
"rollup-plugin-inject-process-env": "1.3.1",
|
|
80
81
|
"rollup-plugin-peer-deps-external": "2.2.4",
|
|
81
82
|
"rollup-plugin-scss": "3.0.0",
|
|
82
83
|
"rollup-plugin-terser": "7.0.2",
|
|
83
|
-
"rollup-plugin-typescript2": "0.
|
|
84
|
-
"sass": "1.
|
|
84
|
+
"rollup-plugin-typescript2": "0.31.1",
|
|
85
|
+
"sass": "1.45.0",
|
|
85
86
|
"sass-loader": "10.2.0",
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"typescript": "4.4.4"
|
|
87
|
+
"ts-jest": "27.1.1",
|
|
88
|
+
"typescript": "4.5.4"
|
|
89
89
|
},
|
|
90
90
|
"files": [
|
|
91
91
|
"dist"
|
|
@@ -100,12 +100,13 @@
|
|
|
100
100
|
},
|
|
101
101
|
"dependencies": {
|
|
102
102
|
"@rollup/plugin-replace": "^3.0.0",
|
|
103
|
-
"@xapp/
|
|
103
|
+
"@xapp/chat-widget-core": "1.32.1",
|
|
104
|
+
"@xapp/stentor-chat-widget": "1.32.0",
|
|
104
105
|
"react-transition-group": "4.4.2",
|
|
105
|
-
"socket.io-client": "4.
|
|
106
|
-
"stentor-models": "1.
|
|
106
|
+
"socket.io-client": "4.4.0",
|
|
107
|
+
"stentor-models": "1.X",
|
|
107
108
|
"store": "2.0.12",
|
|
108
|
-
"tslib": "
|
|
109
|
+
"tslib": "2.3.1"
|
|
109
110
|
},
|
|
110
|
-
"gitHead": "
|
|
111
|
+
"gitHead": "cf9ac5a73c47b53d63280e7a531289660b7001e2"
|
|
111
112
|
}
|