@textback/notification-widget 2.0.0-9450 → 2.0.1-102913
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/.eslintrc.js +291 -291
- package/build/index.js +6 -3
- package/build/sdk.js +3 -3
- package/package.json +11 -8
- package/promote_tag.sh +1 -1
- package/{README.md → readme.md} +569 -490
- package/server.js +134 -134
- package/src/libraries/ai.1.0.11.js +4088 -4088
- package/src/libraries/localization/getLocale.js +17 -0
- package/src/libraries/localization/locales/.tern-port +1 -0
- package/src/libraries/localization/locales/cs.js +23 -0
- package/src/libraries/localization/locales/en.js +23 -0
- package/src/libraries/localization/locales/index.js +9 -0
- package/src/libraries/localization/locales/pl.js +23 -0
- package/src/libraries/localization/locales/ro.js +23 -0
- package/src/libraries/localization/locales/ru.js +22 -0
- package/src/libraries/localization/locales/uk.js +23 -0
- package/src/libraries/localization/text.js +9 -0
- 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/factory.js +3 -3
- package/src/sdk/channels/skype.js +12 -12
- package/src/sdk/channels/telegram.js +18 -13
- 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 -173
- package/src/sdk/channels/whatsapp.js +20 -11
- package/src/sdk/channels/whatsappb.js +27 -0
- package/src/sdk/events/observer.js +46 -46
- package/src/sdk/index.js +5 -5
- package/src/sdk/sdk.js +67 -30
- 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 -50
- package/src/sdk/utils/find.js +7 -7
- package/src/sdk/utils/loadConfig.js +20 -20
- package/src/sdk/utils/loadDeepLink.js +48 -21
- 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 -0
- package/src/sdk/widget/widget.js +192 -140
- package/src/widget/components/index.js +6 -2
- package/src/widget/components/tb-notification-button/facebook.js +9 -2
- package/src/widget/components/tb-notification-button/index.js +34 -34
- package/src/widget/components/tb-notification-button/styles.scss +657 -433
- package/src/widget/components/tb-notification-button/telegram.js +9 -2
- package/src/widget/components/tb-notification-button/viber.js +9 -2
- package/src/widget/components/tb-notification-button/vk.js +60 -47
- package/src/widget/components/tb-notification-button/whatsapp.js +15 -8
- package/src/widget/components/tb-notification-button/whatsappb.js +58 -0
- package/src/widget/components/tb-notification-widget/index.js +597 -353
- package/src/widget/components/tb-notification-widget/normalize.scss +395 -394
- package/src/widget/components/tb-notification-widget/styles.scss +514 -136
- package/src/widget/components/tb-nw-wahunter/index.js +259 -0
- package/src/widget/components/tb-nw-wahunter/styles.scss +471 -0
- package/src/widget/config.js +5 -5
- package/src/widget/icons/icon_chat_window.svg +1 -0
- package/src/widget/icons/icon_close.svg +1 -0
- package/src/widget/icons/icon_facebook.svg +7 -7
- package/src/widget/icons/icon_facebook_circle.svg +7 -9
- 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 -27
- package/src/widget/icons/icon_viber.svg +75 -75
- package/src/widget/icons/icon_viber_circle.svg +67 -77
- 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 +4 -123
- package/src/widget/icons/icon_whatsapp_hollow.svg +128 -0
- package/src/widget/icons/icon_whatsapp_new.svg +127 -127
- package/src/widget/icons/icon_whatsappb.svg +147 -0
- package/src/widget/icons/icon_whatsappb_circle.svg +4 -0
- package/src/widget/icons/icon_whatsappb_new.svg +127 -0
- package/src/widget/icons/paper-plane-arrow.svg +3 -0
- package/src/widget/icons/tb-logo.svg +21 -0
- package/src/widget/index.js +28 -28
- package/src/widget/locales/cs.js +42 -0
- package/src/widget/locales/en.js +42 -20
- package/src/widget/locales/index.js +2 -2
- package/src/widget/locales/pl.js +41 -19
- package/src/widget/locales/ro.js +41 -20
- package/src/widget/locales/ru.js +40 -19
- package/src/widget/locales/uk.js +40 -19
- package/src/widget/utils/cookiesEx.js +41 -41
- package/src/widget/utils/getLocale.js +4 -2
- package/src/widget/utils/stringifyAttributes.js +19 -19
- package/src/widget/utils/text.js +2 -1
- package/src/widget/utils/widgetsStorage.js +28 -28
- package/src/widget/widget.entry.js +3 -4
- package/tests/gf.html +35 -35
- package/tests/gf.js +21 -21
- package/tests/index.js +61 -61
- package/views/examples.ejs +7 -3
- package/views/sdk.html +274 -256
- package/webpack.common.js +72 -72
- package/webpack.dev.js +15 -15
- package/webpack.prod.js +10 -17
- package/build/index.js.map +0 -1
- package/build/sdk.js.map +0 -1
- package/src/widget/components/tb-notification-button/skype.js +0 -47
- package/src/widget/icons/text-back-badge.png +0 -0
- package/src/widget/locales/cz.js +0 -20
@@ -1,47 +0,0 @@
|
|
1
|
-
import Button from './index.js';
|
2
|
-
import icon from '../../icons/icon_skype.svg';
|
3
|
-
import iconNew from '../../icons/icon_skype_new.svg';
|
4
|
-
import iconCircle from '../../icons/icon_skype_circle.svg';
|
5
|
-
|
6
|
-
import constants from '../../../sdk/utils/constants.js';
|
7
|
-
|
8
|
-
class SkypeButton extends Button {
|
9
|
-
render() {
|
10
|
-
super.render();
|
11
|
-
|
12
|
-
const link = this.element.querySelector('a');
|
13
|
-
link.addEventListener('click', (event) => {
|
14
|
-
event.preventDefault();
|
15
|
-
this.channelAPI.subscribe();
|
16
|
-
});
|
17
|
-
}
|
18
|
-
|
19
|
-
get template() {
|
20
|
-
if (this.config.type === constants.WIDGET_TYPE_API_CALL) {
|
21
|
-
return `
|
22
|
-
<a target="_blank" href="https://join.skype.com/bot/${this.config.id}?add">
|
23
|
-
<tb-notification-button__icon>${icon}</tb-notification-button__icon>
|
24
|
-
<tb-notification-button__text>${this.text('skype')}</tb-notification-button__text>
|
25
|
-
</a>
|
26
|
-
`;
|
27
|
-
} else if (this.config.markUp.style !== 'square') {
|
28
|
-
return `
|
29
|
-
<a target="_blank" href="https://join.skype.com/bot/${this.config.id}?add">
|
30
|
-
<tb-notification-button__icon>${(this.config.markUp.style === 'rounded' ? icon : iconCircle )}</tb-notification-button__icon>
|
31
|
-
<tb-notification-button__text>${this.text('skype')}</tb-notification-button__text>
|
32
|
-
</a>
|
33
|
-
`;
|
34
|
-
} else {
|
35
|
-
return `
|
36
|
-
<div class="tb-notification-button__inner">
|
37
|
-
<tb-notification-button__icon>${iconNew}</tb-notification-button__icon>
|
38
|
-
<a target="_blank" href="https://join.skype.com/bot/${this.config.id}?add">
|
39
|
-
<tb-notification-button__text>${this.text('sign-skype')}</tb-notification-button__text>
|
40
|
-
</a>
|
41
|
-
</div>
|
42
|
-
`;
|
43
|
-
}
|
44
|
-
}
|
45
|
-
};
|
46
|
-
|
47
|
-
module.exports = SkypeButton;
|
Binary file
|
package/src/widget/locales/cz.js
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
module.exports = {
|
2
|
-
facebook: 'Facebook',
|
3
|
-
'sign-facebook': 'Poslat přes Facebook',
|
4
|
-
skype: 'Skype',
|
5
|
-
'sign-skype': 'Poslat přes Skype',
|
6
|
-
telegram: 'Telegram',
|
7
|
-
'sign-telegram': 'Poslat přes Telegram',
|
8
|
-
viber: 'Viber',
|
9
|
-
'sign-viber': 'Poslat přes Viber',
|
10
|
-
vkontakte: 'VKontakte',
|
11
|
-
'vkontakte login': 'VK Login',
|
12
|
-
'sign-vk': 'Poslat přes VKontakte',
|
13
|
-
whatsapp: 'WhatsApp',
|
14
|
-
'sign-whatsapp': 'Poslat přes WhatsApp',
|
15
|
-
'telegram_tip': 'Stiskněte <strong>"Start"</strong><br/> v aplikaci Telegram',
|
16
|
-
'facebook_tip': 'Stiskněte <strong>"Začít"</strong><br/> v Facebook Messenger',
|
17
|
-
'viber_tip': ' Musíte mít nainstalovanou <br/><strong>Viber Desktop aplikaci</strong>',
|
18
|
-
'vkontakte_tip': 'Stiskněte <strong>"Povolit"</strong><br/> ve vyskakovacím okně',
|
19
|
-
'whatsapp_tip': 'Pošlete <strong>předvyplněný text</strong><br/> přes WhatsApp bez změn'
|
20
|
-
};
|