widget-chatbot 1.0.0 → 1.0.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/index.js +1 -1
- package/package.json +16 -2
- package/.prettierrc +0 -7
- package/CHANGELOG.md +0 -614
- package/CONTRIBUTING.md +0 -44
- package/cloudbuild.yaml +0 -29
- package/commitlint.config.js +0 -1
- package/index.js +0 -228
- package/live_chat_helpdesk/HelpdeskChatContextProvider.js +0 -323
- package/live_chat_helpdesk/HelpdeskSender.js +0 -287
- package/live_chat_helpdesk/PayloadContextProvider.js +0 -131
- package/live_chat_helpdesk/constant.js +0 -28
- package/live_chat_helpdesk/useWSChatbot.js +0 -178
- package/npmrc.enc +0 -0
- package/publish_process/README.md +0 -64
- package/test-setup.js +0 -22
- package/umd.js +0 -3
- package/webpack.dev.js +0 -81
- package/webpack.prod.js +0 -100
package/test-setup.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// /* eslint-disable func-names */
|
|
2
|
-
// import Enzyme from 'enzyme';
|
|
3
|
-
// import Adapter from 'enzyme-adapter-react-16';
|
|
4
|
-
|
|
5
|
-
// Enzyme.configure({ adapter: new Adapter() });
|
|
6
|
-
// window.matchMedia =
|
|
7
|
-
// window.matchMedia ||
|
|
8
|
-
// function () {
|
|
9
|
-
// return {
|
|
10
|
-
// matches: false,
|
|
11
|
-
// addListener() {},
|
|
12
|
-
// removeListener() {}
|
|
13
|
-
// };
|
|
14
|
-
// };
|
|
15
|
-
|
|
16
|
-
// window.requestAnimationFrame =
|
|
17
|
-
// window.requestAnimationFrame ||
|
|
18
|
-
// function (callback) {
|
|
19
|
-
// setTimeout(callback, 0);
|
|
20
|
-
// };
|
|
21
|
-
|
|
22
|
-
// Enzyme.configure({ adapter: new Adapter() });
|
package/umd.js
DELETED
package/webpack.dev.js
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
const path = require('path');
|
|
2
|
-
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|
3
|
-
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
|
|
4
|
-
const TerserPlugin = require('terser-webpack-plugin');
|
|
5
|
-
const { version } = require('./package.json');
|
|
6
|
-
|
|
7
|
-
module.exports = {
|
|
8
|
-
// entry: ['babel-polyfill', './index.js'],
|
|
9
|
-
entry: './umd.js',
|
|
10
|
-
output: {
|
|
11
|
-
path: path.join(__dirname, '/dist'),
|
|
12
|
-
filename: 'index.js',
|
|
13
|
-
library: 'WebChat',
|
|
14
|
-
libraryTarget: 'umd',
|
|
15
|
-
},
|
|
16
|
-
devServer: {
|
|
17
|
-
host: '127.0.0.1',
|
|
18
|
-
allowedHosts: 'all',
|
|
19
|
-
headers: {
|
|
20
|
-
'Access-Control-Allow-Origin': '*',
|
|
21
|
-
'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS',
|
|
22
|
-
'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization',
|
|
23
|
-
},
|
|
24
|
-
port: 8082,
|
|
25
|
-
historyApiFallback: { disableDotRule: true },
|
|
26
|
-
hot: false,
|
|
27
|
-
client: { overlay: false },
|
|
28
|
-
liveReload: false,
|
|
29
|
-
},
|
|
30
|
-
resolve: {
|
|
31
|
-
extensions: ['.js', '.jsx'],
|
|
32
|
-
},
|
|
33
|
-
mode: 'development',
|
|
34
|
-
devtool: 'eval-source-map',
|
|
35
|
-
module: {
|
|
36
|
-
rules: [
|
|
37
|
-
{
|
|
38
|
-
test: /\.(js|jsx)$/,
|
|
39
|
-
exclude: /node_modules/,
|
|
40
|
-
use: [
|
|
41
|
-
{
|
|
42
|
-
loader: 'string-replace-loader',
|
|
43
|
-
options: {
|
|
44
|
-
search: 'PACKAGE_VERSION_TO_BE_REPLACED',
|
|
45
|
-
replace: version,
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
{ loader: 'babel-loader' },
|
|
49
|
-
],
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
test: /\.scss$/,
|
|
53
|
-
use: [{ loader: 'style-loader' }, { loader: 'css-loader' }],
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
test: /\.css$/,
|
|
57
|
-
use: ['style-loader', 'css-loader'],
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
test: /\.(jpg|png|gif|svg|woff|ttf|eot)$/,
|
|
61
|
-
use: {
|
|
62
|
-
loader: 'url-loader',
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
],
|
|
66
|
-
},
|
|
67
|
-
plugins: [
|
|
68
|
-
new HtmlWebpackPlugin({
|
|
69
|
-
title: 'Web Chat Widget Test',
|
|
70
|
-
filename: 'index.html',
|
|
71
|
-
inject: false,
|
|
72
|
-
template: 'dev/src/index.html',
|
|
73
|
-
showErrors: true,
|
|
74
|
-
}),
|
|
75
|
-
// new BundleAnalyzerPlugin()
|
|
76
|
-
],
|
|
77
|
-
optimization: {
|
|
78
|
-
minimize: true,
|
|
79
|
-
minimizer: [new TerserPlugin()],
|
|
80
|
-
},
|
|
81
|
-
};
|
package/webpack.prod.js
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
const path = require('path');
|
|
2
|
-
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
3
|
-
const CleanWebpackPlugin = require('clean-webpack-plugin');
|
|
4
|
-
const { version } = require('./package.json');
|
|
5
|
-
// const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
|
|
6
|
-
const TerserPlugin = require('terser-webpack-plugin');
|
|
7
|
-
|
|
8
|
-
module.exports = {
|
|
9
|
-
// entry: ['babel-polyfill', './index.js'],
|
|
10
|
-
// entry: './umd.js',
|
|
11
|
-
entry: './index.js',
|
|
12
|
-
// entry: path.resolve(__dirname, 'src/umd.js'),
|
|
13
|
-
output: {
|
|
14
|
-
path: path.join(__dirname, '/dist'),
|
|
15
|
-
filename: 'index.js',
|
|
16
|
-
library: 'WebChat',
|
|
17
|
-
libraryTarget: 'umd',
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
externals: {
|
|
21
|
-
react: 'react',
|
|
22
|
-
'react-dom': 'react-dom',
|
|
23
|
-
axios: 'axios',
|
|
24
|
-
redux: 'redux',
|
|
25
|
-
'react-redux': 'react-redux',
|
|
26
|
-
'socket.io-client': 'socket.io-client',
|
|
27
|
-
'react-markdown': 'react-markdown',
|
|
28
|
-
antd: 'antd',
|
|
29
|
-
'@antv/g2': '@antv/g2',
|
|
30
|
-
'@antv/g6': '@antv/g6',
|
|
31
|
-
'@antv/g2plot': '@antv/g2plot',
|
|
32
|
-
'@antv/l7': '@antv/l7',
|
|
33
|
-
'chart.js': 'chart.js',
|
|
34
|
-
'crypto-js': 'crypto-js',
|
|
35
|
-
'@reduxjs/toolkit': '@reduxjs/toolkit',
|
|
36
|
-
},
|
|
37
|
-
resolve: {
|
|
38
|
-
extensions: ['.js', '.jsx'],
|
|
39
|
-
},
|
|
40
|
-
mode: 'production',
|
|
41
|
-
module: {
|
|
42
|
-
rules: [
|
|
43
|
-
{
|
|
44
|
-
test: /\.(js|jsx)$/,
|
|
45
|
-
exclude: /node_modules/,
|
|
46
|
-
use: [
|
|
47
|
-
{
|
|
48
|
-
loader: 'string-replace-loader',
|
|
49
|
-
options: {
|
|
50
|
-
search: 'PACKAGE_VERSION_TO_BE_REPLACED',
|
|
51
|
-
replace: version,
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
{ loader: 'babel-loader' },
|
|
55
|
-
],
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
test: /\.scss$/,
|
|
59
|
-
use: [
|
|
60
|
-
{ loader: 'style-loader' },
|
|
61
|
-
{ loader: 'css-loader' },
|
|
62
|
-
// {
|
|
63
|
-
// loader: 'sass-loader',
|
|
64
|
-
// options: {
|
|
65
|
-
// sassOptions: {
|
|
66
|
-
// includePaths: [path.resolve(__dirname, 'src/scss/')]
|
|
67
|
-
// }
|
|
68
|
-
// }
|
|
69
|
-
// }
|
|
70
|
-
],
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
test: /\.css$/,
|
|
74
|
-
use: ['style-loader', 'css-loader'],
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
test: /\.(jpg|png|gif|svg|woff|ttf|eot)$/,
|
|
78
|
-
use: {
|
|
79
|
-
loader: 'url-loader',
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
],
|
|
83
|
-
},
|
|
84
|
-
plugins: [
|
|
85
|
-
new CleanWebpackPlugin(['dist']),
|
|
86
|
-
// new BundleAnalyzerPlugin()
|
|
87
|
-
],
|
|
88
|
-
optimization: {
|
|
89
|
-
minimize: true,
|
|
90
|
-
minimizer: [
|
|
91
|
-
new TerserPlugin({
|
|
92
|
-
extractComments: false,
|
|
93
|
-
terserOptions: {
|
|
94
|
-
compress: { drop_console: true },
|
|
95
|
-
output: { comments: false },
|
|
96
|
-
},
|
|
97
|
-
}),
|
|
98
|
-
],
|
|
99
|
-
},
|
|
100
|
-
};
|