@textback/notification-widget 2.0.3 → 2.0.4-110500

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.
Files changed (126) hide show
  1. package/build/index.js +12 -0
  2. package/{release/builds/textback/notificationwidget/build → build}/sdk.js +2 -2
  3. package/package.json +2 -2
  4. package/src/widget/components/tb-notification-widget/index.js +22 -6
  5. package/src/widget/components/tb-nw-wahunter/index.js +4 -2
  6. package/src/widget/icons/tb-logo-dark-en.svg +17 -0
  7. package/src/widget/icons/tb-logo-dark-ru.svg +17 -0
  8. package/src/widget/icons/tb-logo-dark.svg +16 -0
  9. package/src/widget/icons/tb-logo-light-en.svg +17 -0
  10. package/src/widget/icons/tb-logo-light-ru.svg +17 -0
  11. package/src/widget/icons/tb-logo-white.svg +16 -0
  12. package/src/widget/icons/tb-logo.svg +15 -20
  13. package/release/builds/textback/notificationwidget/.eslintrc.js +0 -291
  14. package/release/builds/textback/notificationwidget/.gitlab-ci.yml +0 -34
  15. package/release/builds/textback/notificationwidget/build/index.js +0 -12
  16. package/release/builds/textback/notificationwidget/package-lock.json +0 -9985
  17. package/release/builds/textback/notificationwidget/package.json +0 -70
  18. package/release/builds/textback/notificationwidget/promote_tag.sh +0 -2
  19. package/release/builds/textback/notificationwidget/readme.md +0 -569
  20. package/release/builds/textback/notificationwidget/server.js +0 -224
  21. package/release/builds/textback/notificationwidget/src/libraries/ai.1.0.11.js +0 -4089
  22. package/release/builds/textback/notificationwidget/src/libraries/localization/getLocale.js +0 -17
  23. package/release/builds/textback/notificationwidget/src/libraries/localization/locales/.tern-port +0 -1
  24. package/release/builds/textback/notificationwidget/src/libraries/localization/locales/cs.js +0 -23
  25. package/release/builds/textback/notificationwidget/src/libraries/localization/locales/en.js +0 -23
  26. package/release/builds/textback/notificationwidget/src/libraries/localization/locales/index.js +0 -9
  27. package/release/builds/textback/notificationwidget/src/libraries/localization/locales/pl.js +0 -23
  28. package/release/builds/textback/notificationwidget/src/libraries/localization/locales/ro.js +0 -23
  29. package/release/builds/textback/notificationwidget/src/libraries/localization/locales/ru.js +0 -22
  30. package/release/builds/textback/notificationwidget/src/libraries/localization/locales/uk.js +0 -23
  31. package/release/builds/textback/notificationwidget/src/libraries/localization/text.js +0 -9
  32. package/release/builds/textback/notificationwidget/src/libraries/t.js +0 -82
  33. package/release/builds/textback/notificationwidget/src/sdk/channels/channel.js +0 -31
  34. package/release/builds/textback/notificationwidget/src/sdk/channels/facebook.js +0 -13
  35. package/release/builds/textback/notificationwidget/src/sdk/channels/factory.js +0 -34
  36. package/release/builds/textback/notificationwidget/src/sdk/channels/skype.js +0 -13
  37. package/release/builds/textback/notificationwidget/src/sdk/channels/telegram.js +0 -18
  38. package/release/builds/textback/notificationwidget/src/sdk/channels/viber.js +0 -13
  39. package/release/builds/textback/notificationwidget/src/sdk/channels/vk-modal/vk-modal.html +0 -17
  40. package/release/builds/textback/notificationwidget/src/sdk/channels/vk-modal/vk-modal.js +0 -25
  41. package/release/builds/textback/notificationwidget/src/sdk/channels/vk-modal/vk-modal.scss +0 -116
  42. package/release/builds/textback/notificationwidget/src/sdk/channels/vk.js +0 -195
  43. package/release/builds/textback/notificationwidget/src/sdk/channels/whatsapp.js +0 -27
  44. package/release/builds/textback/notificationwidget/src/sdk/channels/whatsappb.js +0 -27
  45. package/release/builds/textback/notificationwidget/src/sdk/events/observer.js +0 -46
  46. package/release/builds/textback/notificationwidget/src/sdk/index.js +0 -6
  47. package/release/builds/textback/notificationwidget/src/sdk/sdk.entry.js +0 -1
  48. package/release/builds/textback/notificationwidget/src/sdk/sdk.js +0 -67
  49. package/release/builds/textback/notificationwidget/src/sdk/utils/apiErrorHandler.js +0 -12
  50. package/release/builds/textback/notificationwidget/src/sdk/utils/appInsights.js +0 -88
  51. package/release/builds/textback/notificationwidget/src/sdk/utils/browserInfo.js +0 -9
  52. package/release/builds/textback/notificationwidget/src/sdk/utils/constants.js +0 -18
  53. package/release/builds/textback/notificationwidget/src/sdk/utils/cookies.js +0 -67
  54. package/release/builds/textback/notificationwidget/src/sdk/utils/find.js +0 -8
  55. package/release/builds/textback/notificationwidget/src/sdk/utils/loadConfig.js +0 -21
  56. package/release/builds/textback/notificationwidget/src/sdk/utils/loadDeepLink.js +0 -48
  57. package/release/builds/textback/notificationwidget/src/sdk/utils/loadScript.js +0 -26
  58. package/release/builds/textback/notificationwidget/src/sdk/utils/loadSubscriptions.js +0 -6
  59. package/release/builds/textback/notificationwidget/src/sdk/utils/parseQueryString.js +0 -34
  60. package/release/builds/textback/notificationwidget/src/sdk/utils/windowHelper.js +0 -25
  61. package/release/builds/textback/notificationwidget/src/sdk/widget/widget.js +0 -192
  62. package/release/builds/textback/notificationwidget/src/widget/components/index.js +0 -52
  63. package/release/builds/textback/notificationwidget/src/widget/components/tb-notification-button/facebook.js +0 -55
  64. package/release/builds/textback/notificationwidget/src/widget/components/tb-notification-button/index.js +0 -35
  65. package/release/builds/textback/notificationwidget/src/widget/components/tb-notification-button/styles.scss +0 -657
  66. package/release/builds/textback/notificationwidget/src/widget/components/tb-notification-button/telegram.js +0 -55
  67. package/release/builds/textback/notificationwidget/src/widget/components/tb-notification-button/viber.js +0 -57
  68. package/release/builds/textback/notificationwidget/src/widget/components/tb-notification-button/vk.js +0 -92
  69. package/release/builds/textback/notificationwidget/src/widget/components/tb-notification-button/whatsapp.js +0 -58
  70. package/release/builds/textback/notificationwidget/src/widget/components/tb-notification-button/whatsappb.js +0 -58
  71. package/release/builds/textback/notificationwidget/src/widget/components/tb-notification-widget/index.js +0 -678
  72. package/release/builds/textback/notificationwidget/src/widget/components/tb-notification-widget/normalize.scss +0 -395
  73. package/release/builds/textback/notificationwidget/src/widget/components/tb-notification-widget/styles.scss +0 -543
  74. package/release/builds/textback/notificationwidget/src/widget/components/tb-nw-wahunter/index.js +0 -259
  75. package/release/builds/textback/notificationwidget/src/widget/components/tb-nw-wahunter/styles.scss +0 -471
  76. package/release/builds/textback/notificationwidget/src/widget/config.js +0 -5
  77. package/release/builds/textback/notificationwidget/src/widget/icons/bell-icon.png +0 -0
  78. package/release/builds/textback/notificationwidget/src/widget/icons/broadcast-icon.png +0 -0
  79. package/release/builds/textback/notificationwidget/src/widget/icons/icon_chat_window.svg +0 -1
  80. package/release/builds/textback/notificationwidget/src/widget/icons/icon_close.svg +0 -1
  81. package/release/builds/textback/notificationwidget/src/widget/icons/icon_facebook.svg +0 -7
  82. package/release/builds/textback/notificationwidget/src/widget/icons/icon_facebook_circle.svg +0 -7
  83. package/release/builds/textback/notificationwidget/src/widget/icons/icon_instagram_circle.svg +0 -96
  84. package/release/builds/textback/notificationwidget/src/widget/icons/icon_skype.svg +0 -44
  85. package/release/builds/textback/notificationwidget/src/widget/icons/icon_skype_circle.svg +0 -46
  86. package/release/builds/textback/notificationwidget/src/widget/icons/icon_skype_new.svg +0 -114
  87. package/release/builds/textback/notificationwidget/src/widget/icons/icon_tg.svg +0 -25
  88. package/release/builds/textback/notificationwidget/src/widget/icons/icon_tg_circle.svg +0 -17
  89. package/release/builds/textback/notificationwidget/src/widget/icons/icon_viber.svg +0 -75
  90. package/release/builds/textback/notificationwidget/src/widget/icons/icon_viber_circle.svg +0 -67
  91. package/release/builds/textback/notificationwidget/src/widget/icons/icon_viber_new.svg +0 -102
  92. package/release/builds/textback/notificationwidget/src/widget/icons/icon_vk.svg +0 -14
  93. package/release/builds/textback/notificationwidget/src/widget/icons/icon_vk_circle.svg +0 -16
  94. package/release/builds/textback/notificationwidget/src/widget/icons/icon_whatsapp.svg +0 -147
  95. package/release/builds/textback/notificationwidget/src/widget/icons/icon_whatsapp_circle.svg +0 -4
  96. package/release/builds/textback/notificationwidget/src/widget/icons/icon_whatsapp_hollow.svg +0 -128
  97. package/release/builds/textback/notificationwidget/src/widget/icons/icon_whatsapp_new.svg +0 -127
  98. package/release/builds/textback/notificationwidget/src/widget/icons/icon_whatsappb.svg +0 -147
  99. package/release/builds/textback/notificationwidget/src/widget/icons/icon_whatsappb_circle.svg +0 -4
  100. package/release/builds/textback/notificationwidget/src/widget/icons/icon_whatsappb_new.svg +0 -127
  101. package/release/builds/textback/notificationwidget/src/widget/icons/paper-plane-arrow.svg +0 -3
  102. package/release/builds/textback/notificationwidget/src/widget/icons/paper-plane-icon.png +0 -0
  103. package/release/builds/textback/notificationwidget/src/widget/icons/tb-logo.svg +0 -21
  104. package/release/builds/textback/notificationwidget/src/widget/index.js +0 -29
  105. package/release/builds/textback/notificationwidget/src/widget/locales/cs.js +0 -42
  106. package/release/builds/textback/notificationwidget/src/widget/locales/en.js +0 -42
  107. package/release/builds/textback/notificationwidget/src/widget/locales/index.js +0 -9
  108. package/release/builds/textback/notificationwidget/src/widget/locales/pl.js +0 -42
  109. package/release/builds/textback/notificationwidget/src/widget/locales/ro.js +0 -41
  110. package/release/builds/textback/notificationwidget/src/widget/locales/ru.js +0 -41
  111. package/release/builds/textback/notificationwidget/src/widget/locales/uk.js +0 -41
  112. package/release/builds/textback/notificationwidget/src/widget/utils/cookiesEx.js +0 -41
  113. package/release/builds/textback/notificationwidget/src/widget/utils/getLocale.js +0 -17
  114. package/release/builds/textback/notificationwidget/src/widget/utils/stringifyAttributes.js +0 -19
  115. package/release/builds/textback/notificationwidget/src/widget/utils/text.js +0 -10
  116. package/release/builds/textback/notificationwidget/src/widget/utils/widgetsStorage.js +0 -28
  117. package/release/builds/textback/notificationwidget/src/widget/widget.entry.js +0 -3
  118. package/release/builds/textback/notificationwidget/tests/gf.html +0 -35
  119. package/release/builds/textback/notificationwidget/tests/gf.js +0 -22
  120. package/release/builds/textback/notificationwidget/tests/index.js +0 -62
  121. package/release/builds/textback/notificationwidget/views/examples.ejs +0 -51
  122. package/release/builds/textback/notificationwidget/views/sdk.html +0 -274
  123. package/release/builds/textback/notificationwidget/webpack.common.js +0 -72
  124. package/release/builds/textback/notificationwidget/webpack.dev.js +0 -15
  125. package/release/builds/textback/notificationwidget/webpack.prod.js +0 -10
  126. package/widget.tar.gz +0 -0
@@ -1,224 +0,0 @@
1
- 'use strict';
2
-
3
- const express = require('express');
4
- const app = express();
5
- const port = process.env.PORT || 3000;
6
-
7
- app.use(express.static('.'));
8
-
9
- app.get('/examples', (req, res) => {
10
- const query = Object.assign({
11
- //widgetPath: 'https://cdn.jsdelivr.net/npm/@textback/notification-widget/build/index.js',
12
- widgetPath: 'http://localhost:8080/build/index.js',
13
- apiPath: 'https://tb-apisrv-dev.textback.io/api',
14
- widgetId: '7f4e72a9-6f97-b658-9496-016eeb97d0e4',
15
- lang: 'ru',
16
- data: JSON.stringify({orderId: 'insecureOrderID'})
17
- }, req.query);
18
-
19
- let widgetCode = `<script src='${query.widgetPath}'></script>`;
20
-
21
- widgetCode += `\n<tb-notification-widget`;
22
- widgetCode += `\n widget-id='${query.widgetId}'`;
23
-
24
- if (query.apiPath) {
25
- widgetCode += `\n api-path='${query.apiPath}'`;
26
- }
27
-
28
- if (query.lang) {
29
- widgetCode += `\n lang='${query.lang}'`;
30
- }
31
-
32
- if (query.data) {
33
- widgetCode += `\n data='${query.data}'`;
34
- }
35
-
36
- widgetCode += `>\n</tb-notification-widget>`;
37
-
38
- res.render('examples.ejs', {
39
- query,
40
- widgetCode
41
- });
42
- });
43
-
44
- app.get('/api/endUserNotifications/widgets/error500', (req, res) => {
45
- res.sendStatus(500);
46
- });
47
-
48
- app.get('/api/endUserNotifications/widgets/error404', (req, res) => {
49
- res.sendStatus(404);
50
- });
51
-
52
- app.get('/api/endUserNotifications/widgets/a', (req, res) => {
53
- res.json({
54
- '$error': null,
55
- '$items': null,
56
- '$value': {
57
- 'id': 'd43a36de-9659-45b5-9373-aed1a6d58dc5',
58
- 'vkApiId': null,
59
- 'accountId': '99bffda5-5bd1-49b1-b4f2-658854797c01',
60
- 'channels': [{
61
- 'channel': 'tg',
62
- 'id': 'rb_dev_3_bot',
63
- 'slug': '@rb_dev_3_bot',
64
- 'enabled': true,
65
- 'channelId': null
66
- }, {
67
- 'channel': 'vk',
68
- //'type': 'apiCall',
69
- 'id': '124981888',
70
- 'slug': 'tb_test_group',
71
- 'enabled': true,
72
- 'channelId': 29
73
- }, {
74
- 'channel': 'facebook',
75
- 'id': '323049074708312',
76
- 'slug': 'TA0ETXSdhM8JnvkB1iUM',
77
- 'enabled': true,
78
- 'channelId': null
79
- }, {'channel': 'viber', 'id': 'dev_', 'slug': '', 'enabled': true, 'channelId': null}],
80
- 'welcomeMessage': {
81
- 'text': null,
82
- 'markup': 'PLAIN',
83
- 'attachments': null,
84
- 'buttons': [{
85
- 'type': 'HyperLinkButton',
86
- 'text': 'Читать статью',
87
- 'link': 'https://blog.textback.ru/notifications_in_messengers'
88
- }]
89
- },
90
- 'title': {'value': 'test heading'},
91
- 'description': {'value': 'test desc\r\nline'},
92
- 'markUp': {
93
- 'body': {},
94
- 'icon': {'type': 'preset'},
95
- 'header': {'value': 'привет это тестовый заголовок чтобы понять какое нормальное число знак'},
96
- 'description': {'value': 'это тестовый заголовок чтобы понять какое нормальное число знаков может быть в описании чтобы было читабельно и красиво и вообще нормально. это очень длинное название, прямо очень длинное очень приоче'},
97
- 'title': {'value': 'asdadad'}
98
- },
99
- 'displayOptions': {},
100
- //'displayMode': 'popup'
101
- },
102
- '$count': 1
103
- });
104
- });
105
-
106
- app.get('/api/endUserNotifications/widgets/b', (req, res) => {
107
- res.json({
108
- '$error': null,
109
- '$items': null,
110
- '$value': {
111
- 'id': 'd43a36de-9659-45b5-9373-aed1a6d58dc5',
112
- 'vkApiId': 5930339,
113
- 'accountId': '99bffda5-5bd1-49b1-b4f2-658854797c01',
114
- 'channels': [{
115
- 'channel': 'tg',
116
- 'id': 'rb_dev_3_bot',
117
- 'slug': '@rb_dev_3_bot',
118
- 'enabled': true,
119
- 'channelId': null
120
- }, {
121
- 'channel': 'vk',
122
- 'type': 'apiCall',
123
- 'id': '124981888',
124
- 'slug': 'tb_test_group',
125
- 'enabled': true,
126
- 'channelId': 29
127
- }, {
128
- 'channel': 'facebook',
129
- 'id': '323049074708312',
130
- 'slug': 'TA0ETXSdhM8JnvkB1iUM',
131
- 'enabled': true,
132
- 'channelId': null
133
- }, {'channel': 'viber', 'id': 'dev_', 'slug': '', 'enabled': true, 'channelId': null}],
134
- 'welcomeMessage': {
135
- 'text': null,
136
- 'markup': 'PLAIN',
137
- 'attachments': null,
138
- 'buttons': [{
139
- 'type': 'HyperLinkButton',
140
- 'text': 'Читать статью',
141
- 'link': 'https://blog.textback.ru/notifications_in_messengers'
142
- }]
143
- },
144
- 'title': {'value': 'test heading'},
145
- 'description': {'value': 'test desc\r\nline'},
146
- 'markUp': {
147
- 'body': {},
148
- 'icon': {'type': 'preset'},
149
- 'header': {'value': 'привет это тестовый заголовок чтобы понять какое нормальное число знак'},
150
- 'description': {'value': 'это тестовый заголовок чтобы понять какое нормальное число знаков может быть в описании чтобы было читабельно и красиво и вообще нормально. это очень длинное название, прямо очень длинное очень приоче'},
151
- 'title': {'value': 'asdadad'}
152
- },
153
- 'displayOptions': {},
154
- //'displayMode': 'popup'
155
- },
156
- '$count': 1
157
- });
158
- });
159
-
160
- app.get('/api/endUserNotifications/widgets/c', (req, res) => {
161
- res.json({
162
- '$error': null,
163
- '$items': null,
164
- '$value': {
165
- 'id': 'd43a36de-9659-45b5-9373-aed1a6d58dc5',
166
- 'vkApiId': 5930339,
167
- 'accountId': '99bffda5-5bd1-49b1-b4f2-658854797c01',
168
- 'channels': [{
169
- 'channel': 'tg',
170
- 'id': 'rb_dev_3_bot',
171
- 'slug': '@rb_dev_3_bot',
172
- 'enabled': true,
173
- 'channelId': null
174
- }, {
175
- 'channel': 'vk',
176
- 'id': '124981888',
177
- 'slug': 'tb_test_group',
178
- 'enabled': true,
179
- 'channelId': 29
180
- }, {
181
- 'channel': 'facebook',
182
- 'id': '323049074708312',
183
- 'slug': 'TA0ETXSdhM8JnvkB1iUM',
184
- 'enabled': true,
185
- 'channelId': null
186
- }, {'channel': 'viber', 'id': 'dev_', 'slug': '', 'enabled': true, 'channelId': null}],
187
- 'welcomeMessage': {
188
- 'text': null,
189
- 'markup': 'PLAIN',
190
- 'attachments': null,
191
- 'buttons': [{
192
- 'type': 'HyperLinkButton',
193
- 'text': 'Читать статью',
194
- 'link': 'https://blog.textback.ru/notifications_in_messengers'
195
- }]
196
- },
197
- 'title': {'value': 'test heading'},
198
- 'description': {'value': 'test desc\r\nline'},
199
- 'markUp': {
200
- 'body': {},
201
- 'icon': {'type': 'preset'},
202
- 'header': {'value': 'привет это тестовый заголовок чтобы понять какое нормальное число знак'},
203
- 'description': {'value': 'это тестовый заголовок чтобы понять какое нормальное число знаков может быть в описании чтобы было читабельно и красиво и вообще нормально. это очень длинное название, прямо очень длинное очень приоче'},
204
- 'title': {'value': 'asdadad'}
205
- },
206
- 'displayOptions': {},
207
- 'displayMode': 'popup'
208
- },
209
- '$count': 1
210
- });
211
- });
212
-
213
- app.post('/api/endUserNotifications/deepLinks', (req, res) => {
214
- res.json({
215
- '$error': null,
216
- '$items': null,
217
- '$value': 'subscribe_XXX',
218
- '$count': 1
219
- });
220
- });
221
-
222
- app.listen(port, () => {
223
- console.log(`Application started on http://localhost:${port}`)
224
- });