@textback/notification-widget 2.0.1-84986 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/.eslintrc.js +291 -291
- package/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/.idea/misc.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/notificationwidget.iml +9 -0
- package/.idea/vcs.xml +6 -0
- package/build/index.js +3 -3
- package/build/sdk.js +2 -2
- package/package.json +70 -70
- package/promote_tag.sh +1 -1
- package/readme.md +569 -569
- package/server.js +1 -1
- package/src/libraries/ai.1.0.11.js +4088 -4088
- package/src/libraries/localization/locales/index.js +8 -8
- package/src/libraries/localization/text.js +9 -9
- package/src/libraries/t.js +82 -82
- package/src/sdk/channels/channel.js +30 -30
- package/src/sdk/channels/facebook.js +13 -13
- package/src/sdk/channels/skype.js +12 -12
- package/src/sdk/channels/telegram.js +18 -18
- package/src/sdk/channels/viber.js +12 -12
- package/src/sdk/channels/vk-modal/vk-modal.html +17 -17
- package/src/sdk/channels/vk-modal/vk-modal.js +25 -25
- package/src/sdk/channels/vk-modal/vk-modal.scss +116 -116
- package/src/sdk/channels/vk.js +195 -195
- package/src/sdk/events/observer.js +46 -46
- package/src/sdk/index.js +5 -5
- package/src/sdk/sdk.js +67 -67
- package/src/sdk/utils/apiErrorHandler.js +11 -11
- package/src/sdk/utils/appInsights.js +88 -88
- package/src/sdk/utils/browserInfo.js +8 -8
- package/src/sdk/utils/constants.js +17 -17
- package/src/sdk/utils/cookies.js +67 -67
- package/src/sdk/utils/find.js +7 -7
- package/src/sdk/utils/loadConfig.js +20 -20
- package/src/sdk/utils/loadDeepLink.js +48 -48
- package/src/sdk/utils/loadScript.js +25 -25
- package/src/sdk/utils/loadSubscriptions.js +6 -6
- package/src/sdk/utils/parseQueryString.js +33 -33
- package/src/sdk/utils/windowHelper.js +25 -25
- package/src/sdk/widget/widget.js +192 -192
- package/src/widget/components/tb-notification-button/index.js +34 -34
- package/src/widget/components/tb-notification-button/styles.scss +657 -657
- package/src/widget/components/tb-notification-widget/normalize.scss +395 -395
- package/src/widget/components/tb-nw-wahunter/styles.scss +471 -471
- package/src/widget/config.js +5 -5
- package/src/widget/icons/icon_chat_window.svg +1 -1
- package/src/widget/icons/icon_close.svg +1 -1
- package/src/widget/icons/icon_facebook.svg +7 -7
- package/src/widget/icons/icon_facebook_circle.svg +7 -7
- package/src/widget/icons/icon_instagram_circle.svg +95 -95
- package/src/widget/icons/icon_skype.svg +44 -44
- package/src/widget/icons/icon_skype_circle.svg +46 -46
- package/src/widget/icons/icon_skype_new.svg +113 -113
- package/src/widget/icons/icon_tg.svg +25 -25
- package/src/widget/icons/icon_tg_circle.svg +17 -17
- package/src/widget/icons/icon_viber.svg +75 -75
- package/src/widget/icons/icon_viber_circle.svg +67 -67
- package/src/widget/icons/icon_viber_new.svg +102 -102
- package/src/widget/icons/icon_vk.svg +14 -14
- package/src/widget/icons/icon_vk_circle.svg +16 -16
- package/src/widget/icons/icon_whatsapp.svg +147 -147
- package/src/widget/icons/icon_whatsapp_circle.svg +3 -3
- package/src/widget/icons/icon_whatsapp_new.svg +127 -127
- package/src/widget/icons/icon_whatsappb.svg +147 -147
- package/src/widget/icons/icon_whatsappb_circle.svg +3 -3
- package/src/widget/icons/icon_whatsappb_new.svg +127 -127
- package/src/widget/icons/paper-plane-arrow.svg +3 -3
- package/src/widget/icons/tb-logo.svg +21 -21
- package/src/widget/index.js +28 -28
- package/src/widget/locales/cs.js +42 -42
- package/src/widget/locales/en.js +42 -42
- package/src/widget/locales/ro.js +41 -41
- package/src/widget/utils/cookiesEx.js +41 -41
- package/src/widget/utils/stringifyAttributes.js +19 -19
- package/src/widget/utils/widgetsStorage.js +28 -28
- package/src/widget/widget.entry.js +3 -3
- package/tests/gf.html +35 -35
- package/tests/gf.js +21 -21
- package/tests/index.js +61 -61
- package/views/examples.ejs +3 -3
- package/views/sdk.html +274 -274
- package/webpack.common.js +72 -72
- package/webpack.dev.js +15 -15
- package/webpack.prod.js +10 -10
package/webpack.common.js
CHANGED
@@ -1,72 +1,72 @@
|
|
1
|
-
const webpack = require('webpack');
|
2
|
-
const CleanWebpackPlugin = require('clean-webpack-plugin');
|
3
|
-
|
4
|
-
const fs = require('fs');
|
5
|
-
|
6
|
-
function getPackageVersion() {
|
7
|
-
const json = require('./package.json');
|
8
|
-
const buildNumber = process.env.BUILD_BUILDNUMBER;
|
9
|
-
let version = json.version;
|
10
|
-
|
11
|
-
if (typeof buildNumber !== 'undefined') {
|
12
|
-
version = `${json.version}-${buildNumber}`
|
13
|
-
json.version = version;
|
14
|
-
fs.writeFileSync('package.json', JSON.stringify(json, null, 2));
|
15
|
-
}
|
16
|
-
return version;
|
17
|
-
}
|
18
|
-
|
19
|
-
|
20
|
-
const webpackConfig = {
|
21
|
-
entry: {
|
22
|
-
sdk: './src/sdk/sdk.entry.js',
|
23
|
-
index: './src/widget/widget.entry.js',
|
24
|
-
},
|
25
|
-
output: {
|
26
|
-
path: __dirname + '/build',
|
27
|
-
filename: '[name].js',
|
28
|
-
},
|
29
|
-
module: {
|
30
|
-
rules: [{
|
31
|
-
test: /\.scss$/,
|
32
|
-
use: [
|
33
|
-
{loader: 'style-loader'},
|
34
|
-
{loader: 'css-loader'},
|
35
|
-
{loader: 'sass-loader'}
|
36
|
-
]
|
37
|
-
}, {
|
38
|
-
test: /\.svg/,
|
39
|
-
use: [{
|
40
|
-
loader: 'svg-inline-loader',
|
41
|
-
options: {
|
42
|
-
// classPrefix: 'tb-notification-widget',
|
43
|
-
// idPrefix: 'tb-notification-widget',
|
44
|
-
},
|
45
|
-
}]
|
46
|
-
}, {
|
47
|
-
test: /\.png/,
|
48
|
-
use: 'base64-image-loader'
|
49
|
-
}, {
|
50
|
-
test: /\.html/,
|
51
|
-
use: 'html-loader',
|
52
|
-
}, {
|
53
|
-
test: /\.js$/,
|
54
|
-
exclude: [/node_modules/],
|
55
|
-
use: [{
|
56
|
-
loader: 'babel-loader',
|
57
|
-
options: {
|
58
|
-
presets: ['env'],
|
59
|
-
},
|
60
|
-
}],
|
61
|
-
}],
|
62
|
-
},
|
63
|
-
|
64
|
-
plugins: [
|
65
|
-
new CleanWebpackPlugin(['build']),
|
66
|
-
new webpack.DefinePlugin({
|
67
|
-
VERSION: JSON.stringify(getPackageVersion())
|
68
|
-
}),
|
69
|
-
],
|
70
|
-
};
|
71
|
-
|
72
|
-
module.exports = webpackConfig;
|
1
|
+
const webpack = require('webpack');
|
2
|
+
const CleanWebpackPlugin = require('clean-webpack-plugin');
|
3
|
+
|
4
|
+
const fs = require('fs');
|
5
|
+
|
6
|
+
function getPackageVersion() {
|
7
|
+
const json = require('./package.json');
|
8
|
+
const buildNumber = process.env.BUILD_BUILDNUMBER;
|
9
|
+
let version = json.version;
|
10
|
+
|
11
|
+
if (typeof buildNumber !== 'undefined') {
|
12
|
+
version = `${json.version}-${buildNumber}`
|
13
|
+
json.version = version;
|
14
|
+
fs.writeFileSync('package.json', JSON.stringify(json, null, 2));
|
15
|
+
}
|
16
|
+
return version;
|
17
|
+
}
|
18
|
+
|
19
|
+
|
20
|
+
const webpackConfig = {
|
21
|
+
entry: {
|
22
|
+
sdk: './src/sdk/sdk.entry.js',
|
23
|
+
index: './src/widget/widget.entry.js',
|
24
|
+
},
|
25
|
+
output: {
|
26
|
+
path: __dirname + '/build',
|
27
|
+
filename: '[name].js',
|
28
|
+
},
|
29
|
+
module: {
|
30
|
+
rules: [{
|
31
|
+
test: /\.scss$/,
|
32
|
+
use: [
|
33
|
+
{loader: 'style-loader'},
|
34
|
+
{loader: 'css-loader'},
|
35
|
+
{loader: 'sass-loader'}
|
36
|
+
]
|
37
|
+
}, {
|
38
|
+
test: /\.svg/,
|
39
|
+
use: [{
|
40
|
+
loader: 'svg-inline-loader',
|
41
|
+
options: {
|
42
|
+
// classPrefix: 'tb-notification-widget',
|
43
|
+
// idPrefix: 'tb-notification-widget',
|
44
|
+
},
|
45
|
+
}]
|
46
|
+
}, {
|
47
|
+
test: /\.png/,
|
48
|
+
use: 'base64-image-loader'
|
49
|
+
}, {
|
50
|
+
test: /\.html/,
|
51
|
+
use: 'html-loader',
|
52
|
+
}, {
|
53
|
+
test: /\.js$/,
|
54
|
+
exclude: [/node_modules/],
|
55
|
+
use: [{
|
56
|
+
loader: 'babel-loader',
|
57
|
+
options: {
|
58
|
+
presets: ['env'],
|
59
|
+
},
|
60
|
+
}],
|
61
|
+
}],
|
62
|
+
},
|
63
|
+
|
64
|
+
plugins: [
|
65
|
+
new CleanWebpackPlugin(['build']),
|
66
|
+
new webpack.DefinePlugin({
|
67
|
+
VERSION: JSON.stringify(getPackageVersion())
|
68
|
+
}),
|
69
|
+
],
|
70
|
+
};
|
71
|
+
|
72
|
+
module.exports = webpackConfig;
|
package/webpack.dev.js
CHANGED
@@ -1,15 +1,15 @@
|
|
1
|
-
const merge = require('webpack-merge');
|
2
|
-
const common = require('./webpack.common.js');
|
3
|
-
|
4
|
-
module.exports = merge(common, {
|
5
|
-
devtool: 'eval-source-map',
|
6
|
-
watch: true,
|
7
|
-
/*devServer: {
|
8
|
-
contentBase: './build',
|
9
|
-
port: 8081,
|
10
|
-
watchOptions: {
|
11
|
-
aggregateTimeout: 300,
|
12
|
-
poll: 1000
|
13
|
-
},
|
14
|
-
}*/
|
15
|
-
});
|
1
|
+
const merge = require('webpack-merge');
|
2
|
+
const common = require('./webpack.common.js');
|
3
|
+
|
4
|
+
module.exports = merge(common, {
|
5
|
+
devtool: 'eval-source-map',
|
6
|
+
watch: true,
|
7
|
+
/*devServer: {
|
8
|
+
contentBase: './build',
|
9
|
+
port: 8081,
|
10
|
+
watchOptions: {
|
11
|
+
aggregateTimeout: 300,
|
12
|
+
poll: 1000
|
13
|
+
},
|
14
|
+
}*/
|
15
|
+
});
|
package/webpack.prod.js
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
const merge = require('webpack-merge');
|
2
|
-
const common = require('./webpack.common.js');
|
3
|
-
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
|
4
|
-
|
5
|
-
module.exports = merge(common, {
|
6
|
-
mode: 'production',
|
7
|
-
optimization: {
|
8
|
-
minimizer: [new UglifyJSPlugin()]
|
9
|
-
}
|
10
|
-
});
|
1
|
+
const merge = require('webpack-merge');
|
2
|
+
const common = require('./webpack.common.js');
|
3
|
+
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
|
4
|
+
|
5
|
+
module.exports = merge(common, {
|
6
|
+
mode: 'production',
|
7
|
+
optimization: {
|
8
|
+
minimizer: [new UglifyJSPlugin()]
|
9
|
+
}
|
10
|
+
});
|