@kindly/react-chat 2.40.5 → 2.41.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/.storybook/main.js +6 -11
- package/dist/index.js +2 -26
- package/dist/index.js.LICENSE.txt +25 -0
- package/dist/index.js.map +1 -1
- package/package.json +50 -47
- package/stories/screens.stories/Chat/FormStates.stories.jsx +1 -2
- package/stories/screens.stories/Chat/index.stories.jsx +1 -2
- package/stories/screens.stories/ClosedButton.stories.jsx +1 -2
- package/stories/screens.stories/Feedback.stories.jsx +1 -2
- package/stories/screens.stories/Nudge.stories.jsx +0 -2
- package/stories/screens.stories/Options.stories.jsx +1 -2
- package/stories/screens.stories/PushGreeting.stories.jsx +1 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kindly/react-chat",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.41.1",
|
|
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",
|
|
@@ -8,11 +8,12 @@
|
|
|
8
8
|
"scripts": {
|
|
9
9
|
"start": "webpack-dev-server",
|
|
10
10
|
"start:linked": "WRITETODISK=1 BABEL_ENV=production webpack-dev-server --config=webpack.prod.js",
|
|
11
|
-
"start:
|
|
12
|
-
"
|
|
13
|
-
"build
|
|
14
|
-
"build:
|
|
15
|
-
"build:
|
|
11
|
+
"start:dev": "webpack-dev-server --env envConfig=development",
|
|
12
|
+
"start:prod": "webpack-dev-server --env envConfig=production",
|
|
13
|
+
"build": "webpack --env envConfig=production --config=webpack.prod.js",
|
|
14
|
+
"build:dev": "webpack --env envConfig=development --config=webpack.prod.js",
|
|
15
|
+
"build:staging": "webpack --env envConfig=staging --config=webpack.prod.js",
|
|
16
|
+
"build:local": "webpack",
|
|
16
17
|
"prepublishOnly": "npm run build",
|
|
17
18
|
"test": "jest src",
|
|
18
19
|
"test:storybook": "test-storybook",
|
|
@@ -47,84 +48,86 @@
|
|
|
47
48
|
"react-hook-form": "^7.32.2",
|
|
48
49
|
"react-idle-timer": "^4.2.12",
|
|
49
50
|
"react-redux": "^7.1.1",
|
|
50
|
-
"react-shadow": "^
|
|
51
|
+
"react-shadow": "^20.0.0",
|
|
51
52
|
"react-textarea-autosize": "^8.3.2",
|
|
52
53
|
"redux": "^4.0.4",
|
|
53
54
|
"redux-localstorage": "^0.4.1",
|
|
54
55
|
"redux-logger": "^3.0.6",
|
|
55
56
|
"redux-thunk": "^2.3.0",
|
|
56
|
-
"
|
|
57
|
+
"stream-browserify": "^3.0.0",
|
|
58
|
+
"styled-components": "^5.3.6",
|
|
57
59
|
"uuid": "^9.0.0"
|
|
58
60
|
},
|
|
59
61
|
"peerDependencies": {
|
|
60
|
-
"pusher-js": ">=
|
|
62
|
+
"pusher-js": ">=8.0.0",
|
|
61
63
|
"pusher-redux": ">=0.5.0",
|
|
62
64
|
"react": ">=16.9.0",
|
|
63
65
|
"react-dom": ">=16.9.0"
|
|
64
66
|
},
|
|
65
67
|
"devDependencies": {
|
|
66
|
-
"@babel/core": "^7.
|
|
68
|
+
"@babel/core": "^7.20.12",
|
|
67
69
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
68
|
-
"@babel/plugin-transform-runtime": "^7.19.
|
|
69
|
-
"@babel/preset-env": "^7.
|
|
70
|
+
"@babel/plugin-transform-runtime": "^7.19.6",
|
|
71
|
+
"@babel/preset-env": "^7.20.2",
|
|
70
72
|
"@babel/preset-react": "^7.18.6",
|
|
71
|
-
"@storybook/addon-a11y": "^6.5.
|
|
72
|
-
"@storybook/addon-actions": "^6.5.
|
|
73
|
-
"@storybook/addon-essentials": "^6.5.
|
|
74
|
-
"@storybook/addon-interactions": "^6.5.
|
|
75
|
-
"@storybook/addon-links": "^6.5.
|
|
76
|
-
"@storybook/builder-
|
|
73
|
+
"@storybook/addon-a11y": "^6.5.16",
|
|
74
|
+
"@storybook/addon-actions": "^6.5.16",
|
|
75
|
+
"@storybook/addon-essentials": "^6.5.16",
|
|
76
|
+
"@storybook/addon-interactions": "^6.5.16",
|
|
77
|
+
"@storybook/addon-links": "^6.5.16",
|
|
78
|
+
"@storybook/builder-webpack5": "^6.5.16",
|
|
77
79
|
"@storybook/jest": "^0.0.10",
|
|
78
|
-
"@storybook/manager-
|
|
79
|
-
"@storybook/react": "^6.5.
|
|
80
|
-
"@storybook/test-runner": "^0.
|
|
80
|
+
"@storybook/manager-webpack5": "^6.5.16",
|
|
81
|
+
"@storybook/react": "^6.5.16",
|
|
82
|
+
"@storybook/test-runner": "^0.8.0",
|
|
81
83
|
"@storybook/testing-library": "^0.0.13",
|
|
82
84
|
"@testing-library/jest-dom": "^5.16.5",
|
|
83
85
|
"@testing-library/react": "^11.2.7",
|
|
84
86
|
"@types/react": "^16.14.32",
|
|
85
87
|
"@types/react-dom": "^16.9.16",
|
|
86
88
|
"axe-playwright": "^1.1.11",
|
|
87
|
-
"babel-jest": "^
|
|
88
|
-
"babel-loader": "^
|
|
89
|
+
"babel-jest": "^29.4.1",
|
|
90
|
+
"babel-loader": "^9.1.2",
|
|
89
91
|
"babel-plugin-styled-components": "^1.13.3",
|
|
90
92
|
"babel-plugin-transform-react-remove-prop-types": "^0.4.24",
|
|
91
93
|
"babel-plugin-transform-remove-console": "^6.9.4",
|
|
92
94
|
"browserslist": "^4.21.4",
|
|
93
95
|
"chromatic": "^6.10.1",
|
|
94
|
-
"clean-webpack-plugin": "^
|
|
95
|
-
"compression": "1.7.4",
|
|
96
|
-
"concurrently": "^7.4.0",
|
|
96
|
+
"clean-webpack-plugin": "^4.0.0",
|
|
97
97
|
"dotenv": "8.6.0",
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
"html-loader": "0.5.5",
|
|
102
|
-
"html-webpack-plugin": "^3.2.0",
|
|
98
|
+
"express": "^4.18.2",
|
|
99
|
+
"file-loader": "^6.2.0",
|
|
100
|
+
"html-webpack-plugin": "^5.5.0",
|
|
103
101
|
"husky": "3.1.0",
|
|
104
|
-
"jest": "^
|
|
105
|
-
"jest-each": "^
|
|
106
|
-
"jest-
|
|
107
|
-
"jest-
|
|
102
|
+
"jest": "^29.4.1",
|
|
103
|
+
"jest-each": "^29.4.1",
|
|
104
|
+
"jest-environment-jsdom": "^29.4.1",
|
|
105
|
+
"jest-junit": "^15.0.0",
|
|
108
106
|
"lodash.clonedeep": "^4.5.0",
|
|
109
|
-
"
|
|
107
|
+
"process": "^0.11.10",
|
|
108
|
+
"pusher-js": "^8.0.1",
|
|
110
109
|
"pusher-redux": "^0.5.0",
|
|
111
110
|
"react": "^16.14.0",
|
|
112
111
|
"react-dom": "^16.14.0",
|
|
113
112
|
"react-svg-loader": "^3.0.3",
|
|
114
113
|
"react-test-renderer": "16.14.0",
|
|
115
114
|
"resolve-url-loader": "^5.0.0",
|
|
116
|
-
"storybook-addon-mock": "^2.
|
|
117
|
-
"url-loader": "
|
|
115
|
+
"storybook-addon-mock": "^3.2.0",
|
|
116
|
+
"url-loader": "^4.1.1",
|
|
118
117
|
"wait-on": "^6.0.1",
|
|
119
|
-
"webpack": "^
|
|
120
|
-
"webpack-bundle-analyzer": "^
|
|
121
|
-
"webpack-cli": "^
|
|
122
|
-
"webpack-dev-server": "^
|
|
123
|
-
"webpack-merge": "^
|
|
118
|
+
"webpack": "^5.75.0",
|
|
119
|
+
"webpack-bundle-analyzer": "^4.7.0",
|
|
120
|
+
"webpack-cli": "^5.0.1",
|
|
121
|
+
"webpack-dev-server": "^4.11.1",
|
|
122
|
+
"webpack-merge": "^5.8.0"
|
|
124
123
|
},
|
|
125
|
-
"
|
|
126
|
-
"
|
|
127
|
-
"webpackConfig": "./webpack.config.js"
|
|
124
|
+
"engines": {
|
|
125
|
+
"npm": ">=8.3.0"
|
|
128
126
|
},
|
|
129
|
-
"
|
|
127
|
+
"overrides": {
|
|
128
|
+
"pusher-redux": {
|
|
129
|
+
"pusher-js": "8.0.1"
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"gitHead": "e8e325c85808d88ebc5b01cd1ca77375c791c4c4"
|
|
130
133
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { expect } from '@storybook/jest';
|
|
2
2
|
import { fireEvent, userEvent, within } from '@storybook/testing-library';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import withFetchMock from 'storybook-addon-mock';
|
|
5
4
|
|
|
6
5
|
import { FIELDS } from '../../../src/components/Form/utils/constants';
|
|
7
6
|
import KindlyChatButton from '../../../src/features/KindlyChatButton/KindlyChatButton';
|
|
@@ -21,7 +20,7 @@ const defaultBotSettings = {
|
|
|
21
20
|
export default {
|
|
22
21
|
title: 'Screen/Chat/Form',
|
|
23
22
|
component: KindlyChatButton,
|
|
24
|
-
decorators: [
|
|
23
|
+
decorators: [withContainer, withMockProvider],
|
|
25
24
|
argTypes: {
|
|
26
25
|
initialStateModifierFromArgs: {
|
|
27
26
|
table: {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { expect } from '@storybook/jest';
|
|
2
2
|
import { fireEvent, userEvent, waitFor, within } from '@storybook/testing-library';
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import withFetchMock from 'storybook-addon-mock';
|
|
5
4
|
|
|
6
5
|
import { IMAGE_WIDTH } from 'app/constants';
|
|
7
6
|
|
|
@@ -28,7 +27,7 @@ function Template(args, context) {
|
|
|
28
27
|
export default {
|
|
29
28
|
title: 'Screen/Chat',
|
|
30
29
|
component: KindlyChatButton,
|
|
31
|
-
decorators: [
|
|
30
|
+
decorators: [withContainer, withMockProvider],
|
|
32
31
|
argTypes: {
|
|
33
32
|
initialStateModifierFromArgs: {
|
|
34
33
|
table: {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import withMock from 'storybook-addon-mock';
|
|
3
2
|
|
|
4
3
|
import { chromaticViewports } from '../../.storybook/preview';
|
|
5
4
|
import KindlyChat from '../../src/KindlyChat';
|
|
@@ -23,7 +22,7 @@ function Template({ options, ...args }) {
|
|
|
23
22
|
export default {
|
|
24
23
|
title: 'Screen/Button',
|
|
25
24
|
component: KindlyChat,
|
|
26
|
-
decorators: [
|
|
25
|
+
decorators: [],
|
|
27
26
|
argTypes: {
|
|
28
27
|
options: {
|
|
29
28
|
table: {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import withFetchMock from 'storybook-addon-mock';
|
|
3
2
|
|
|
4
3
|
import { feedbackFormTypes } from 'app/constants';
|
|
5
4
|
|
|
@@ -24,7 +23,7 @@ function Template(args, context) {
|
|
|
24
23
|
export default {
|
|
25
24
|
title: 'Screen/Feedback',
|
|
26
25
|
component: KindlyChatButton,
|
|
27
|
-
decorators: [
|
|
26
|
+
decorators: [withContainer, withMockProvider],
|
|
28
27
|
};
|
|
29
28
|
|
|
30
29
|
export const Emojis = Template.bind({});
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import withMock from 'storybook-addon-mock';
|
|
3
2
|
|
|
4
3
|
import { chromaticViewports } from '../../.storybook/preview';
|
|
5
4
|
import KindlyChat from '../../src/KindlyChat';
|
|
@@ -36,7 +35,6 @@ function Template({ slug, nudgeLayout, trackEvent, options, ...args }) {
|
|
|
36
35
|
export default {
|
|
37
36
|
title: 'Screen/Nudges',
|
|
38
37
|
component: KindlyChat,
|
|
39
|
-
decorators: [withMock],
|
|
40
38
|
};
|
|
41
39
|
|
|
42
40
|
export const Product = Template.bind({});
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { userEvent, within } from '@storybook/testing-library';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import withFetchMock from 'storybook-addon-mock';
|
|
4
3
|
|
|
5
4
|
import { chromaticViewports } from '../../.storybook/preview';
|
|
6
5
|
import KindlyChatButton from '../../src/features/KindlyChatButton/KindlyChatButton';
|
|
@@ -23,7 +22,7 @@ function Template(args, context) {
|
|
|
23
22
|
export default {
|
|
24
23
|
title: 'Screen/Options',
|
|
25
24
|
component: KindlyChatButton,
|
|
26
|
-
decorators: [
|
|
25
|
+
decorators: [withContainer, withMockProvider],
|
|
27
26
|
};
|
|
28
27
|
|
|
29
28
|
const defaultParameters = {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import withFetchMock from 'storybook-addon-mock';
|
|
3
2
|
|
|
4
3
|
import { chromaticViewports } from '../../.storybook/preview';
|
|
5
4
|
import KindlyChatButton from '../../src/features/KindlyChatButton/KindlyChatButton';
|
|
@@ -22,7 +21,7 @@ function Template(args, context) {
|
|
|
22
21
|
export default {
|
|
23
22
|
title: 'Screen/PushGreeting',
|
|
24
23
|
component: KindlyChatButton,
|
|
25
|
-
decorators: [
|
|
24
|
+
decorators: [withContainer, withMockProvider],
|
|
26
25
|
};
|
|
27
26
|
|
|
28
27
|
export const Default = Template.bind({});
|