@kindly/react-chat 2.37.0 → 2.38.0
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/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/package.json +6 -4
- package/stories/screens.stories/Chat.stories.jsx +4 -5
- package/stories/screens.stories/ClosedButton.stories.jsx +3 -3
- package/stories/screens.stories/Feedback.stories.jsx +2 -2
- package/stories/screens.stories/Nudge.stories.jsx +3 -3
- package/stories/screens.stories/Options.stories.jsx +2 -2
- package/stories/screens.stories/StartChat.stories.jsx +2 -2
- package/jsconfig.json +0 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kindly/react-chat",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.38.0",
|
|
4
4
|
"description": "Kindly Chat react component",
|
|
5
5
|
"repository": "https://github.com/kindly-ai/kindly-chat/tree/main/packages/react-chat",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"react-dom": ">=16.9.0"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@babel/core": "^7.18.
|
|
62
|
+
"@babel/core": "^7.18.13",
|
|
63
63
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
64
64
|
"@babel/plugin-transform-runtime": "^7.18.10",
|
|
65
65
|
"@babel/preset-env": "^7.18.10",
|
|
@@ -75,13 +75,15 @@
|
|
|
75
75
|
"@storybook/testing-library": "^0.0.13",
|
|
76
76
|
"@testing-library/jest-dom": "^5.16.5",
|
|
77
77
|
"@testing-library/react": "^11.2.7",
|
|
78
|
+
"@types/react": "^16.14.31",
|
|
79
|
+
"@types/react-dom": "^16.9.16",
|
|
78
80
|
"babel-jest": "^26.6.3",
|
|
79
81
|
"babel-loader": "^8.2.5",
|
|
80
82
|
"babel-plugin-styled-components": "^1.13.3",
|
|
81
83
|
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
|
|
82
84
|
"babel-plugin-transform-remove-console": "^6.9.4",
|
|
83
85
|
"browserslist": "^4.21.3",
|
|
84
|
-
"chromatic": "^6.
|
|
86
|
+
"chromatic": "^6.8.0",
|
|
85
87
|
"clean-webpack-plugin": "^3.0.0",
|
|
86
88
|
"compression": "1.7.4",
|
|
87
89
|
"dotenv": "8.6.0",
|
|
@@ -115,5 +117,5 @@
|
|
|
115
117
|
"silent": true,
|
|
116
118
|
"webpackConfig": "./webpack.config.js"
|
|
117
119
|
},
|
|
118
|
-
"gitHead": "
|
|
120
|
+
"gitHead": "d58bb8e70b1359a91ea0700f52feefd7f83f9ce3"
|
|
119
121
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
2
2
|
/* eslint-disable react/prop-types */
|
|
3
|
-
import { expect } from '@storybook/jest';
|
|
4
3
|
import { screen, userEvent } from '@storybook/testing-library';
|
|
5
4
|
import React from 'react';
|
|
6
5
|
import withFetchMock from 'storybook-addon-mock';
|
|
@@ -20,9 +19,9 @@ const defaultBotSettings = {
|
|
|
20
19
|
...settingsJSON,
|
|
21
20
|
};
|
|
22
21
|
|
|
23
|
-
|
|
22
|
+
function Template(args, context) {
|
|
24
23
|
return <KindlyChatButton {...args} {...context} />;
|
|
25
|
-
}
|
|
24
|
+
}
|
|
26
25
|
|
|
27
26
|
export default {
|
|
28
27
|
title: 'Screen/Chat',
|
|
@@ -329,10 +328,10 @@ HandoverRequested.parameters = {
|
|
|
329
328
|
export const HandoverCancelled = Template.bind({});
|
|
330
329
|
HandoverCancelled.parameters = HandoverRequested.parameters;
|
|
331
330
|
HandoverCancelled.play = async () => {
|
|
332
|
-
|
|
331
|
+
await screen.findByText(defaultBotSettings.text.takeover_queue_text.en);
|
|
333
332
|
const leaveQueueButton = await screen.findByText(defaultBotSettings.text.takeover_queue_link.en);
|
|
334
333
|
await userEvent.click(leaveQueueButton);
|
|
335
|
-
|
|
334
|
+
await screen.findByText(defaultBotSettings.text.leave_queue_text.en);
|
|
336
335
|
};
|
|
337
336
|
|
|
338
337
|
export const Checkbox = Template.bind({});
|
|
@@ -16,9 +16,9 @@ const mockSettings = (response = settings) => ({
|
|
|
16
16
|
],
|
|
17
17
|
});
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
return <KindlyChat botKey=
|
|
21
|
-
}
|
|
19
|
+
function Template({ options, ...args }) {
|
|
20
|
+
return <KindlyChat botKey="1234" options={options || {}} {...args} />;
|
|
21
|
+
}
|
|
22
22
|
|
|
23
23
|
export default {
|
|
24
24
|
title: 'Screen/Button',
|
|
@@ -18,9 +18,9 @@ const defaultBotSettings = {
|
|
|
18
18
|
...settingsJSON,
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
function Template(args, context) {
|
|
22
22
|
return <KindlyChatButton {...args} {...context} />;
|
|
23
|
-
}
|
|
23
|
+
}
|
|
24
24
|
|
|
25
25
|
export default {
|
|
26
26
|
title: 'Screen/Feedback',
|
|
@@ -16,10 +16,10 @@ const mockSettings = (response = settings) => ({
|
|
|
16
16
|
],
|
|
17
17
|
});
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
function Template({ slug, nudgeLayout, trackEvent, options, ...args }) {
|
|
20
20
|
return (
|
|
21
21
|
<KindlyChat
|
|
22
|
-
botKey=
|
|
22
|
+
botKey="1234"
|
|
23
23
|
options={options || {}}
|
|
24
24
|
{...args}
|
|
25
25
|
setKindlyChatRef={(api) => {
|
|
@@ -31,7 +31,7 @@ const Template = ({ slug, nudgeLayout, trackEvent, options, ...args }) => {
|
|
|
31
31
|
}}
|
|
32
32
|
/>
|
|
33
33
|
);
|
|
34
|
-
}
|
|
34
|
+
}
|
|
35
35
|
|
|
36
36
|
export default {
|
|
37
37
|
title: 'Screen/Nudges',
|
|
@@ -17,9 +17,9 @@ const defaultBotSettings = {
|
|
|
17
17
|
...settingsJSON,
|
|
18
18
|
};
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
function Template(args, context) {
|
|
21
21
|
return <KindlyChatButton {...args} {...context} />;
|
|
22
|
-
}
|
|
22
|
+
}
|
|
23
23
|
|
|
24
24
|
export default {
|
|
25
25
|
title: 'Screen/Options',
|
|
@@ -15,9 +15,9 @@ const defaultBotSettings = {
|
|
|
15
15
|
...settingsJSON,
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
function Template(args, context) {
|
|
19
19
|
return <KindlyChatButton {...args} {...context} />;
|
|
20
|
-
}
|
|
20
|
+
}
|
|
21
21
|
|
|
22
22
|
export default {
|
|
23
23
|
title: 'Screen/StartChat',
|