@textback/notification-widget 2.0.3 → 2.0.4-110501

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,259 +0,0 @@
1
- import Component from '../index.js';
2
- import arrowIcon from '../../icons/paper-plane-arrow.svg';
3
- import waIcon from '../../icons/icon_whatsapp_new.svg';
4
- import iconTbLogo from '../../icons/tb-logo.svg';
5
-
6
- import './styles.scss';
7
-
8
- const parsePhoneNumber = (phoneString) => phoneString.replace(/[^\d]/g, '');
9
-
10
- export default class Wahunter extends Component {
11
- constructor() {
12
- super(...arguments);
13
- }
14
-
15
-
16
- render() {
17
- this.lang = this.widgetAPI.config.lang || this.parentElement.getAttribute('lang');
18
-
19
- super.render();
20
- this.submitFormElem = this.element.querySelector(`.${Wahunter.tagName}__submit-form`);
21
- this.addListeners();
22
- }
23
-
24
- addListeners() {
25
- this.submitFormElem.addEventListener('submit', (e) => {
26
- e.preventDefault();
27
- this.submit();
28
- });
29
-
30
- this.submitFormElem.phoneNumber.addEventListener('input', (e) => {
31
- const target = e.target;
32
- let selectionPos = target.selectionStart;
33
- let newValue = parsePhoneNumber(target.value);
34
-
35
- if (['7', '8'].includes(newValue[0]) || newValue.slice(0, 2) === '+7') {
36
- newValue = newValue.slice(0, 11);
37
- newValue = (newValue + '_'.repeat(11 - newValue.length)).replace(/(.{1})(.{3})(.{3})(.{2})(.{2})/, "+7 ($2) $3-$4-$5");
38
-
39
- const indexOfFirstUnderscore = newValue.indexOf('_');
40
- const indexOfLastNumber = newValue.lastIndexOf(newValue.match(/\d/g).pop());
41
-
42
- if (target.value[selectionPos] === "_") {
43
- selectionPos = indexOfLastNumber + 1;
44
- } else {
45
- selectionPos = indexOfFirstUnderscore;
46
- }
47
-
48
- target.value = newValue;
49
- return target.setSelectionRange(selectionPos, selectionPos);
50
- }
51
-
52
- if (target.value[0] === '+') {
53
- newValue = `+${newValue}`;
54
- }
55
-
56
- target.value = newValue;
57
- });
58
-
59
- this.submitFormElem.tryAgain.addEventListener('click', (e) => {
60
- if (this.widgetAPI.config.displayMode !== 'inline') {
61
- this.element.querySelector(`.${Wahunter.tagName}__text-content`).style = null;
62
- }
63
-
64
- this.changeSubmitFormState('initial');
65
- });
66
- }
67
-
68
- getTbBrandBadge({ displayMode }) {
69
- const utmMedium = 'hunter';
70
- return `
71
- <a target="_blank"
72
- href="//textback.ru/?utm_source=TextBack_tool&utm_medium=${utmMedium}&utm_campaign=${window.location.origin}${window.location.pathname}&utm_content=${displayMode}"
73
-
74
- id="tb-notification-brand-badge"
75
- style="${displayMode === 'inline' ? 'fill:inherit; color: inherit;' : ''}"
76
- >
77
- ${this.text('worksFor')} ${iconTbLogo}
78
- </a>
79
- `;
80
- }
81
-
82
-
83
- submit() {
84
- const phoneNumber = +parsePhoneNumber(this.submitFormElem.phoneNumber.value);
85
-
86
- if (this.widgetAPI.config.displayMode !== 'inline') {
87
- this.element.querySelector(`.${Wahunter.tagName}__text-content`).style.display = 'none';
88
- }
89
-
90
- this.changeSubmitFormState('pending');
91
-
92
- setTimeout(() => {
93
- this.widgetAPI.runWahunter(phoneNumber)
94
- .then(() => this.changeSubmitFormState('success'))
95
- .catch((error) => {
96
- if (error.status === 400) return this.changeSubmitFormState('notFound');
97
-
98
- this.changeSubmitFormState('error');
99
- });
100
- }, 1500);
101
- }
102
-
103
-
104
- changeSubmitFormState(stateName) {
105
- const submitFormElem = this.submitFormElem;
106
- let messageText = '';
107
- let tryAgainText = '';
108
- let emoji = '';
109
-
110
- switch (stateName) {
111
- case 'pending': {
112
- submitFormElem.dataset.state = 'pending';
113
- messageText = this.text('sendMessage');
114
- emoji = '⏳';
115
- break;
116
- }
117
- case 'success': {
118
- submitFormElem.dataset.state = 'success';
119
- messageText = this.text('answerSuccessful');
120
- emoji = '👍';
121
- break;
122
- }
123
- case 'notFound': {
124
- submitFormElem.dataset.state = 'notFound';
125
- messageText = this.text('numberNotFound');
126
- emoji = '🕵️‍♂️';
127
- tryAgainText = this.text('tryAgain');
128
- break;
129
- }
130
- case 'error': {
131
- submitFormElem.dataset.state = 'error';
132
- messageText = this.text('somethingWentWrong');
133
- emoji = '👨‍🔧';
134
- tryAgainText = this.text('errorTryAgain');
135
- break;
136
- }
137
- default: {
138
- submitFormElem.dataset.state = 'initial';
139
- break;
140
- }
141
- }
142
-
143
- submitFormElem.querySelector(`.${Wahunter.tagName}__state-report-emoji`).textContent = emoji;
144
- submitFormElem.querySelector(`.${Wahunter.tagName}__state-report-message`).innerHTML = messageText;
145
- submitFormElem.tryAgain.textContent = tryAgainText;
146
- }
147
-
148
-
149
- get template() {
150
- const {
151
- displayMode,
152
- markUp: {
153
- image,
154
- header,
155
- description,
156
- },
157
- } = this.widgetAPI.config;
158
-
159
- if (displayMode === 'inline') return this.submitFormTemplate;
160
-
161
- if (displayMode === 'popup') {
162
- return `
163
- <div class="${Wahunter.tagName}__top-img" style="background-image: url(${image.url})"></div>
164
-
165
- <div class="${Wahunter.tagName}__img">
166
- <img src="${image.url}">
167
- </div>
168
-
169
- <div class="${Wahunter.tagName}__main-content">
170
- <div class="${Wahunter.tagName}__text-content">
171
- <div class="${Wahunter.tagName}__headline" style="color:${header.color}">
172
- ${header.value}
173
- </div>
174
- <div class="${Wahunter.tagName}__description" style="color:${description.color}">
175
- ${description.value}
176
- </div>
177
- </div>
178
-
179
- ${this.submitFormTemplate}
180
- </div>
181
- `;
182
- }
183
-
184
- if (displayMode === 'corner-popup') {
185
- return `
186
- <div class="${Wahunter.tagName}__text-content">
187
- <div class="${Wahunter.tagName}__headline" style="color:${header.color}">
188
- ${header.value}
189
- </div>
190
- </div>
191
- ${this.submitFormTemplate}
192
- `
193
- }
194
- }
195
-
196
-
197
- get submitFormTemplate() {
198
- let {
199
- displayMode,
200
- showWahunterAgreement,
201
- markUp: {
202
- wahunterButton,
203
- header,
204
- },
205
- } = this.widgetAPI.config;
206
-
207
-
208
- const landingPlacesUrls = [
209
- 'lp.textback.ru',
210
- 'lp.textback.io',
211
- 'lp-dev.textback.ru',
212
- 'tb-opsrv-dev.textback.io/messaging.html#!/mini-landings',
213
- 'my.textback.io/messaging.html#!/mini-landings',
214
- 'landings.textback.io',
215
- ];
216
-
217
- const isTBMiniLanding = landingPlacesUrls.some((url) => location.href.includes(url));
218
-
219
- return `
220
- <form class="${Wahunter.tagName}__submit-form" data-state="initial">
221
- <div class="${Wahunter.tagName}__submit-form-controls">
222
- <div class="${Wahunter.tagName}__phone-input-container">
223
- <input type="text" class="${Wahunter.tagName}__phone-input" name="phoneNumber" placeholder="${this.text('enterNumber')}" required>
224
-
225
- <button class="${Wahunter.tagName}__submit-button" style="color:${wahunterButton.textColor};background-color:${wahunterButton.color}">
226
- ${wahunterButton.text}
227
- <div class="${Wahunter.tagName}__submit-button-icon">
228
- ${arrowIcon}
229
- </div>
230
- </button>
231
- </div>
232
-
233
- <div class="${Wahunter.tagName}__submit-form-footer" style="${showWahunterAgreement ? '' : 'display:none'}">
234
- <label class="${Wahunter.tagName}__agreement">
235
- <input type="checkbox" required checked>
236
- <span class="${Wahunter.tagName}__agreement-text">${this.text('getAnswer')}<span class="${Wahunter.tagName}__agreement-wa-icon">${waIcon}</span>WhatsApp</span>
237
- </label>
238
- </div>
239
- </div>
240
-
241
- <div class="${Wahunter.tagName}__state-report">
242
- <div class="${Wahunter.tagName}__state-report-emoji"></div>
243
-
244
- <div class="${Wahunter.tagName}__state-report-message-container"
245
- style="${displayMode === 'inline' ? ('color:' + header.color + ';' + 'fill:' + header.color) : ''}">
246
- <div class="${Wahunter.tagName}__state-report-message"></div>
247
- <button class="${Wahunter.tagName}__try-again-button" type="button" name="tryAgain"></button>
248
- ${displayMode === 'inline' && !isTBMiniLanding ? this.getTbBrandBadge(this.widgetAPI.config) : ''}
249
- </div>
250
- </div>
251
- </form>
252
- `
253
- }
254
-
255
-
256
- static get tagName() {
257
- return 'tb-nw-wahunter';
258
- }
259
- };
@@ -1,471 +0,0 @@
1
- $base-class-name: tb-nw-wahunter;
2
- $font-family: 'Montserrat',
3
- 'Open Sans',
4
- 'Droid Sans',
5
- Arial,
6
- sans-serif;
7
-
8
- $color-green: #25D366;
9
- $color-light-gray: #F2F2F2;
10
- $color-dark-gray: darken($color-light-gray, 5%);
11
-
12
- tb-notification-widget #tb-notification-widget-inner.tb-notification-widget-inner tb-nw-wahunter {
13
- font-size: 12px;
14
- font-family: $font-family;
15
-
16
- * {
17
- box-sizing: border-box;
18
- }
19
-
20
- // TODO: Move reset to level of entire widget. Now I’m not sure that this will not break anything in normal notif widget
21
- a,
22
- label,
23
- button,
24
- input {
25
- margin: 0;
26
- padding: 0;
27
- border: none;
28
- box-shadow: none;
29
- outline: none;
30
- font-family: inherit;
31
- font-size: inherit;
32
- color: inherit;
33
- background: transparent;
34
- }
35
-
36
- button,
37
- label {
38
- cursor: pointer;
39
- }
40
- }
41
-
42
-
43
- tb-notification-widget #tb-notification-widget-inner.tb-notification-widget-inner .tb-nw-wahunter {
44
-
45
- /**** All modes ****/
46
- &__headline {
47
- font-weight: 600;
48
- line-height: 1.3;
49
- }
50
-
51
- &__text-content {
52
- margin-bottom: 1.4em;
53
- }
54
-
55
-
56
-
57
- /**** Popup mode only ****/
58
- &__top-img {
59
- padding: 20% 0;
60
- background-size: cover;
61
- background-position: center;
62
- background-repeat: no-repeat;
63
- border-radius: 4px 4px 0px 0px;
64
- }
65
-
66
- &__img {
67
- display: none;
68
- align-items: center;
69
- width: 280px;
70
- flex-shrink: 0;
71
-
72
- img {
73
- width: 100%;
74
- }
75
- }
76
-
77
- &__main-content {
78
- padding: 1.4em 10%;
79
- padding-bottom: 4em;
80
- }
81
-
82
- &__description {
83
- font-size: 1.3em;
84
- line-height: 1.5;
85
- }
86
-
87
- &_without-image {
88
-
89
- .#{$base-class-name}__top-img,
90
- .#{$base-class-name}__img {
91
- display: none;
92
- }
93
-
94
- .#{$base-class-name}__main-content {
95
- padding-top: 3em;
96
- }
97
- }
98
-
99
- &_mode_popup {
100
- .#{$base-class-name}__headline {
101
- font-size: 1.9em;
102
- margin-bottom: 0.4em;
103
- }
104
- }
105
-
106
-
107
-
108
- /**** Inline mode only ****/
109
- &_mode_inline {
110
- display: flex;
111
-
112
- .#{$base-class-name}__submit-form {
113
- margin: 0;
114
- }
115
-
116
- #tb-notification-brand-badge {
117
- display: none;
118
- font-size: 9px;
119
- margin-top: 1.2em;
120
- }
121
- }
122
-
123
- &_inline-mode-align_left {
124
- justify-content: flex-start;
125
- }
126
-
127
- &_inline-mode-align_right {
128
- justify-content: flex-end;
129
- }
130
-
131
- &_inline-mode-align_center {
132
- justify-content: center;
133
- }
134
-
135
-
136
-
137
- /**** Corner-popup mode only ****/
138
- &_mode_corner-popup {
139
- .#{$base-class-name}__headline {
140
- font-size: 1.7em;
141
- margin-bottom: 0.4em;
142
- }
143
- }
144
-
145
-
146
-
147
- /**** Submit-form ****/
148
- &__submit-form {
149
- padding: 0;
150
- width: 100%;
151
- max-width: 100%;
152
- margin: auto;
153
- }
154
-
155
- &__phone-input,
156
- &__submit-button {
157
- height: 44px;
158
- width: 100%;
159
- border-radius: 22px;
160
- padding: 0 40px !important;
161
- }
162
-
163
- &__phone-input {
164
- font-size: 14px;
165
- margin-bottom: 12px;
166
- background: #F2F2F2;
167
- border: 1px solid $color-dark-gray;
168
- letter-spacing: 1px;
169
- color: #333;
170
-
171
- &:invalid {
172
- letter-spacing: 0px;
173
- }
174
- }
175
-
176
- &__submit-button {
177
- position: relative;
178
- background: $color-green;
179
- color: #fff;
180
- font-size: 9px;
181
- font-weight: bold;
182
- letter-spacing: 1px;
183
- text-transform: uppercase;
184
- transition: background ease 0.25s;
185
- }
186
-
187
- &__submit-button-icon {
188
- position: absolute;
189
- right: 13px;
190
- top: 0;
191
- height: 100%;
192
- width: 20px;
193
-
194
- svg {
195
- position: absolute;
196
- top: 0;
197
- left: 0;
198
- right: 0;
199
- bottom: 0;
200
- margin: auto;
201
- }
202
- }
203
-
204
- &__submit-form-footer {
205
- display: flex;
206
- justify-content: space-between;
207
- padding: 0 5px;
208
- font-size: 12px;
209
- margin-top: 10px;
210
- }
211
-
212
- &__agreement {
213
- display: flex;
214
- align-items: center;
215
- }
216
-
217
- &__agreement input[type="checkbox"] {
218
- -webkit-appearance: none;
219
- -moz-appearance: none;
220
- -o-appearance: none;
221
- appearance: none;
222
- position: relative;
223
- height: 14px;
224
- width: 14px;
225
- border: 1px solid rgb(207, 207, 207);
226
- border-radius: 4px;
227
- outline: none;
228
- cursor: pointer;
229
-
230
- &:checked {
231
- background: $color-green;
232
- border: none;
233
- }
234
-
235
- &:checked::before {
236
- content: '\2714';
237
- display: block;
238
- text-align: center;
239
- color: #fff;
240
- position: absolute;
241
- left: 3.5px;
242
- top: 2px;
243
- font-size: 9px;
244
- }
245
- }
246
-
247
- &__agreement-text {
248
- margin-left: 5px;
249
- }
250
-
251
- &__agreement-wa-icon {
252
- display: inline-block;
253
- position: relative;
254
- width: 18px;
255
- height: 14px;
256
- vertical-align: middle;
257
-
258
- svg {
259
- position: absolute;
260
- top: -7px;
261
- left: -3px;
262
- width: 25px;
263
- }
264
- }
265
-
266
- &__state-report {
267
- display: none;
268
- flex-direction: column;
269
- align-items: center;
270
- line-height: 1.5;
271
- }
272
-
273
- &__state-report-emoji {
274
- font-size: 40px;
275
- margin-bottom: 10px;
276
- }
277
-
278
- &__state-report-message-container {
279
- text-align: center;
280
- }
281
-
282
- &__state-report-message {
283
- font-size: 18px;
284
- font-weight: bold;
285
- }
286
-
287
- &__try-again-button {
288
- display: none;
289
- padding: 0;
290
- margin: 0;
291
- margin-top: 20px;
292
- font-size: 16px;
293
- }
294
-
295
- &__try-again-button {
296
- font-weight: bold;
297
- text-decoration: underline;
298
- }
299
-
300
-
301
-
302
- /**** Submit-form state management ****/
303
- &__submit-form:not([data-state="initial"]) {
304
- .#{$base-class-name}__submit-form-controls {
305
- display: none;
306
- }
307
-
308
- .#{$base-class-name}__state-report {
309
- display: flex;
310
- }
311
- }
312
-
313
- &__submit-form[data-state="success"] {
314
- #tb-notification-brand-badge {
315
- display: inline-flex;
316
- }
317
- }
318
-
319
- &__submit-form[data-state="error"],
320
- &__submit-form[data-state="notFound"] {
321
-
322
- .#{$base-class-name}__state-report-message {
323
- font-weight: normal;
324
- }
325
-
326
- .#{$base-class-name}__try-again-button {
327
- display: inline-block;
328
- }
329
- }
330
-
331
-
332
-
333
- @media only screen and (min-device-width: 481px) {
334
- font-size: 13px;
335
-
336
- &:not(.tb-nw-wahunter_mode_corner-popup) {
337
- .#{$base-class-name}__phone-input-container {
338
- padding: 5px;
339
- background: #F2F2F2;
340
- border-radius: 22px;
341
- display: flex;
342
- justify-content: space-between;
343
- align-items: center;
344
- }
345
-
346
- .#{$base-class-name}__phone-input,
347
- .#{$base-class-name}__submit-button {
348
- height: auto;
349
- width: auto;
350
- flex-grow: 1;
351
- }
352
-
353
- .#{$base-class-name}__phone-input {
354
- background: transparent;
355
- border-radius: 0;
356
- padding-left: 15px !important;
357
- padding-right: 10px !important;
358
- min-width: 150px;
359
- margin: 0;
360
- border: none;
361
- }
362
-
363
- .#{$base-class-name}__submit-button {
364
- padding-top: 15px !important;
365
- padding-bottom: 15px !important;
366
- min-width: 49%;
367
- }
368
-
369
- .#{$base-class-name}__submit-form-footer {
370
- margin-top: 6px;
371
- }
372
- }
373
-
374
- &_mode_popup,
375
- &_mode_inline {
376
- .#{$base-class-name}__submit-form {
377
- width: max-content;
378
- }
379
- }
380
-
381
- &_mode_popup {
382
- .#{$base-class-name}__submit-form {
383
- min-width: 370px;
384
- }
385
- }
386
-
387
- &_mode_inline {
388
- .#{$base-class-name}__submit-form {
389
- min-width: 420px;
390
- }
391
- }
392
- }
393
-
394
-
395
-
396
- @media only screen and (min-device-width: 768px) {
397
- font-size: 14px;
398
-
399
- &_image-align_right,
400
- &_image-align_left {
401
- display: flex;
402
- justify-content: space-between;
403
- align-items: center;
404
- text-align: left;
405
- padding: 7em 2.5em;
406
-
407
- .#{$base-class-name}__submit-form {
408
- min-width: unset;
409
- width: 100%;
410
- }
411
-
412
- .#{$base-class-name}__top-img {
413
- display: none;
414
- }
415
-
416
- .#{$base-class-name}__img {
417
- display: flex;
418
- }
419
-
420
- .#{$base-class-name}__main-content {
421
- padding: 0;
422
- }
423
-
424
- .#{$base-class-name}__state-report {
425
- flex-direction: row;
426
- }
427
-
428
- .#{$base-class-name}__state-report-message-container {
429
- text-align: left;
430
- }
431
-
432
- .#{$base-class-name}__state-report-emoji {
433
- margin-bottom: 0;
434
- margin-right: 10px;
435
- }
436
-
437
- .#{$base-class-name}__submit-form[data-state="notFound"],
438
- .#{$base-class-name}__submit-form[data-state="error"] {
439
- .#{$base-class-name}__state-report {
440
- align-items: flex-start;
441
- }
442
- }
443
- }
444
-
445
- &_image-align_top,
446
- &_without-image {
447
- .#{$base-class-name}__submit-form {
448
- min-width: 420px;
449
- }
450
- }
451
-
452
- &_image-align_top {
453
- .#{$base-class-name}__main-content {
454
- padding-bottom: 6em;
455
- }
456
- }
457
-
458
- &_image-align_right {
459
- .#{$base-class-name}__img {
460
- margin-left: 3em;
461
- order: 1;
462
- }
463
- }
464
-
465
- &_image-align_left {
466
- .#{$base-class-name}__img {
467
- margin-right: 3em;
468
- }
469
- }
470
- }
471
- }