@subiz/widget-v4 4.1.14 → 4.1.16

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 (98) hide show
  1. package/assets/less/message.less +7 -0
  2. package/compiled_src/popup/popup.js +8 -2
  3. package/compiled_src/store/store.js +1 -1
  4. package/inject.js +287 -98
  5. package/package.json +6 -6
  6. package/src/popup/popup.js +9 -1
  7. package/src/store/store.js +1 -1
  8. package/dist/132.js +0 -6612
  9. package/dist/178.js +0 -406
  10. package/dist/1857b1f5c4f.132.js +0 -1
  11. package/dist/1857b1f5c4f.178.js +0 -1
  12. package/dist/1857b1f5c4f.213.js +0 -1
  13. package/dist/1857b1f5c4f.335.js +0 -1
  14. package/dist/1857b1f5c4f.362.js +0 -1
  15. package/dist/1857b1f5c4f.441.js +0 -1
  16. package/dist/1857b1f5c4f.605.js +0 -1
  17. package/dist/1857b1f5c4f.678.js +0 -1
  18. package/dist/1857b1f5c4f.782.js +0 -1
  19. package/dist/1857b1f5c4f.app.js +0 -1
  20. package/dist/1857b1f5c4f.index.html +0 -26
  21. package/dist/1857b1f5c4f.library.html +0 -26
  22. package/dist/1857b1f5c4f.library.js +0 -1
  23. package/dist/1857b1f5c4f.preview.html +0 -759
  24. package/dist/1857b1f5c4f.preview.js +0 -1
  25. package/dist/1857b1f5c4f.screenshoot.js +0 -1
  26. package/dist/1857b1f5c4f.webview.js +0 -1
  27. package/dist/213.js +0 -2774
  28. package/dist/335.js +0 -372
  29. package/dist/362.js +0 -107
  30. package/dist/441.js +0 -2855
  31. package/dist/605.js +0 -305
  32. package/dist/678.js +0 -107
  33. package/dist/782.js +0 -107
  34. package/dist/HASH +0 -1
  35. package/dist/assets/img/Facebook.64607ec.png +0 -0
  36. package/dist/assets/img/Zalo.6845707.png +0 -0
  37. package/dist/assets/img/award1a.1a58e10.png +0 -0
  38. package/dist/assets/img/award3a.3b74423.png +0 -0
  39. package/dist/assets/img/award4a.ed6ccd4.png +0 -0
  40. package/dist/assets/img/award5.39eb7ae.png +0 -0
  41. package/dist/assets/img/bubble_default.7d5e4ab.svg +0 -20
  42. package/dist/assets/img/caret.998eb8f.svg +0 -1
  43. package/dist/assets/img/convos_empty.2353007.svg +0 -72
  44. package/dist/assets/img/default.06e6ee0.jpg +0 -0
  45. package/dist/assets/img/default_avatar.5b74dc1.png +0 -0
  46. package/dist/assets/img/done_gray.d7e8203.svg +0 -4
  47. package/dist/assets/img/done_green.b817fd4.svg +0 -4
  48. package/dist/assets/img/emoji/messenger/sub_23.529_58.824.d5faf14.png +0 -0
  49. package/dist/assets/img/emoji/messenger/sub_23.529_60.784.1420241.png +0 -0
  50. package/dist/assets/img/emoji/messenger/sub_25.490_0.000.1e6b2c0.png +0 -0
  51. package/dist/assets/img/emoji/messenger/sub_25.490_45.098.3dfbc08.png +0 -0
  52. package/dist/assets/img/emoji/messenger/sub_25.490_5.882.4b49e94.png +0 -0
  53. package/dist/assets/img/emoji/messenger/sub_27.451_72.549.7114f58.png +0 -0
  54. package/dist/assets/img/emoji/messenger/sub_27.451_84.314.231e2b7.png +0 -0
  55. package/dist/assets/img/emoji/messenger/sub_27.451_96.078.ddbb008.png +0 -0
  56. package/dist/assets/img/emoji/messenger/sub_29.412_5.882.61f3359.png +0 -0
  57. package/dist/assets/img/emoji/messenger/sub_58.824_100.000.6df72bc.png +0 -0
  58. package/dist/assets/img/emoji/messenger/sub_58.824_45.098.3d7a7ad.png +0 -0
  59. package/dist/assets/img/emoji/messenger/sub_58.824_47.059.0f4d6e2.png +0 -0
  60. package/dist/assets/img/emoji/messenger/sub_58.824_54.902.65724c1.png +0 -0
  61. package/dist/assets/img/emoji/messenger/sub_58.824_64.706.9da3cba.png +0 -0
  62. package/dist/assets/img/emoji/messenger/sub_58.824_72.549.edca5cf.png +0 -0
  63. package/dist/assets/img/emoji/messenger/sub_58.824_78.431.f910f2a.png +0 -0
  64. package/dist/assets/img/emoji/messenger/sub_58.824_88.235.def4e71.png +0 -0
  65. package/dist/assets/img/emoji/messenger/sub_60.784_11.765.49c03d0.png +0 -0
  66. package/dist/assets/img/emoji/messenger/sub_60.784_27.451.46b54e5.png +0 -0
  67. package/dist/assets/img/emoji/messenger/sub_60.784_29.412.e36d284.png +0 -0
  68. package/dist/assets/img/emoji/messenger/sub_60.784_3.922.bb191b0.png +0 -0
  69. package/dist/assets/img/emoji/messenger/sub_60.784_35.294.af7b927.png +0 -0
  70. package/dist/assets/img/emoji/messenger/sub_60.784_7.843.98f2a99.png +0 -0
  71. package/dist/assets/img/empty.29bed2d.svg +0 -23
  72. package/dist/assets/img/empty_1.0b98af0.svg +0 -11
  73. package/dist/assets/img/examplte_logo.f86535f.svg +0 -1
  74. package/dist/assets/img/external-link.90577cc.svg +0 -1
  75. package/dist/assets/img/fb_inverse_circle.36c2cfc.png +0 -0
  76. package/dist/assets/img/ghn.070f8e3.svg +0 -17
  77. package/dist/assets/img/ghtk.326eac1.svg +0 -18
  78. package/dist/assets/img/image_default.be0698b.png +0 -0
  79. package/dist/assets/img/info.ebce7ea.svg +0 -1
  80. package/dist/assets/img/loader.37000a7.svg +0 -1
  81. package/dist/assets/img/loading_static.8f403ae.svg +0 -10
  82. package/dist/assets/img/main-service1.d536cc2.png +0 -0
  83. package/dist/assets/img/main-service2.9b99549.png +0 -0
  84. package/dist/assets/img/not_found_search.2ddb8d1.png +0 -0
  85. package/dist/assets/img/package.8d37d0f.svg +0 -5
  86. package/dist/assets/img/package_fade.763c001.svg +0 -1
  87. package/dist/assets/img/rating--average.1ea492c.svg +0 -12
  88. package/dist/assets/img/rating--great.e3d712e.svg +0 -16
  89. package/dist/assets/img/rating--poor.2938a25.svg +0 -12
  90. package/dist/assets/img/search.f9705ff.svg +0 -1
  91. package/dist/assets/img/send.6db52a9.svg +0 -3
  92. package/dist/assets/img/shop.f7dc7d8.svg +0 -1
  93. package/dist/assets/img/shop_faded.df7845a.svg +0 -1
  94. package/dist/assets/img/subiz-mono.877e9f5.svg +0 -3
  95. package/dist/assets/img/x.26fdfa3.svg +0 -5
  96. package/dist/malicious-app.js +0 -13
  97. package/dist/screenshoot.html +0 -7
  98. package/dist/screenshoot.js +0 -5607
@@ -12,6 +12,13 @@
12
12
  flex: 1;
13
13
  }
14
14
 
15
+ .mobile .widget-body--events {
16
+ display: flex;
17
+ flex-direction: column;
18
+ justify-content: flex-end;
19
+ padding-bottom: 15px;
20
+ }
21
+
15
22
  .widget-body--events-container.widget-body--events-container__error {
16
23
  align-items: center;
17
24
  justify-content: center;
@@ -292,6 +292,9 @@ class Popup extends _common.Com {
292
292
  primarystyle.font_weight = primarystyle.font_weight || '500';
293
293
  primarystyle.font_size = primarystyle.font_size || popup.font_size || '14px';
294
294
  primarystyle.background = primarystyle.background || popup.text_color;
295
+ if (this.props.mobile && com.mobile_style) {
296
+ primarystyle = Object.assign(primarystyle, com.mobile_style);
297
+ }
295
298
  let $primary = null;
296
299
  if (com.buttons.primary_enabled && com.buttons.primary_text) {
297
300
  let style = Object.assign({
@@ -310,6 +313,9 @@ class Popup extends _common.Com {
310
313
  let style = Object.assign({
311
314
  font_size: popup.font_size || '14px'
312
315
  }, page.secondary_button);
316
+ if (this.props.mobile && com.mobile_style) {
317
+ style = Object.assign(style, com.mobile_style);
318
+ }
313
319
  $secondary = (0, _preact.h)("div", {
314
320
  class: 'btn btn__secondary',
315
321
  style: this.js2css(style),
@@ -659,7 +665,6 @@ class Popup extends _common.Com {
659
665
  white_space: 'pre-wrap'
660
666
  }, this.props.mobile && com.mobile_style || com.style);
661
667
  delete style.margin_top;
662
- delete style.margin_bottom;
663
668
  return (0, _preact.h)("div", {
664
669
  class: "text popup_component",
665
670
  style: this.js2css(style),
@@ -845,7 +850,8 @@ class Popup extends _common.Com {
845
850
  background: pagestyle.background || popup.background || '#fff',
846
851
  border: pagestyle.border,
847
852
  overflow: layout === 'row' ? 'auto' : '',
848
- max_height: layout === 'row' ? '100%' : ''
853
+ max_height: layout === 'row' ? '100%' : '',
854
+ min_height: layout === 'row' ? '100%' : ''
849
855
  };
850
856
  let bodycss = {
851
857
  overflow: layout === 'column' ? 'auto' : '',
@@ -1055,7 +1055,7 @@ let cleanLocalStorage = () => {
1055
1055
  }
1056
1056
  _index.default.setTimeout(() => {
1057
1057
  for (var key in localStorage) {
1058
- if (key && key.startsWith('cbz2020') || key.startsWith('sbz2020')) {
1058
+ if (key && (key.startsWith('cbz2020') || key.startsWith('sbz2020'))) {
1059
1059
  localStorage.removeItem(key);
1060
1060
  }
1061
1061
  }
package/inject.js CHANGED
@@ -11,128 +11,317 @@ function getUrlParameter(name) {
11
11
  }
12
12
 
13
13
  function runChatbox(subiz) {
14
- subiz._overridePlugin([
15
- {
16
- account_id: 'acqsulrowbxiugvginhw',
17
- id: 'wpwidget',
18
- name: 'Default chatbox',
19
- type: 'chatbox',
20
- created: 1595816243130,
21
- created_by: 'agqygncqpyaxoujpfc',
22
- updated: 1622003701148,
23
- updated_by: 'agqsulrowbxilyzhds',
24
- enabled: true,
25
- triggers: [
14
+ let popup = {
15
+ account_id: 'acqsulrowbxiugvginhw',
16
+ id: 'cpropvrepsupxyuqcxsqu',
17
+ name: 'Khuyến mãi xe hơi',
18
+ type: 'popup',
19
+ created: 1675912199122,
20
+ created_by: 'agqsulrowbxilyzhds',
21
+ updated: 1675912207092,
22
+ updated_by: 'agqsulrowbxilyzhds',
23
+ enabled: true,
24
+ triggers: [
25
+ {
26
+ type: 'after_pageview',
27
+ },
28
+ ],
29
+ initiative_frequency: {
30
+ once_per_session: true,
31
+ },
32
+ locale: 'vi-VN',
33
+ locales: ['vi-VN'],
34
+ popup: {
35
+ position: 'center',
36
+ type: 'modal',
37
+ animation: true,
38
+ show_close_button: true,
39
+ overlay: true,
40
+ text_color: 'rgba(0,0,0,1)',
41
+ font_family: 'Roboto',
42
+ font_size: '14px',
43
+ background: 'white',
44
+ spacer: '10',
45
+ theme: 'classic',
46
+ pages: [
26
47
  {
27
- type: 'after_pageview',
28
- },
29
- ],
30
- chatbox: {
31
- account_id: 'acqsulrowbxiugvginhw',
32
- widget_version: 'v4',
33
- language: 'en',
34
- is_online: true,
35
- window_mode: 'mini',
36
- header: {
37
- layout: 'social',
38
- links: [
48
+ components: [
39
49
  {
40
- type: 'facebook',
41
- url: 'https://facebook.com/102463231712586',
50
+ type: 'text',
51
+ style: {
52
+ font_family: 'Yeseva One',
53
+ color: 'rgba(208,2,27,1)',
54
+ background: 'rgba(0,0,0,0)',
55
+ text_align: 'center',
56
+ font_style: 'normal',
57
+ font_weight: 'bold',
58
+ margin_bottom: '20px',
59
+ font_size: '30px',
60
+ },
61
+ mobile_style: {
62
+ font_family: 'Yeseva One',
63
+ color: 'rgba(208,2,27,1)',
64
+ background: 'rgba(0,0,0,0)',
65
+ text_align: 'center',
66
+ font_style: 'normal',
67
+ font_weight: 'bold',
68
+ margin_bottom: '20px',
69
+ font_size: '20px',
70
+ },
71
+ text: {
72
+ html: 'CƠ HỘI TRONG TAY\nRINH NGAY XẾ XỊN',
73
+ i18n_html: {
74
+ en_US: 'CƠ HỘI TRONG TAY\nRINH NGAY XẾ XỊN',
75
+ vi_VN: 'CƠ HỘI TRONG TAY\nRINH NGAY XẾ XỊN',
76
+ },
77
+ i18n_quill_delta: {},
78
+ },
42
79
  },
43
80
  {
44
- type: 'zalo',
45
- url: 'https://zalo.com.vn',
81
+ type: 'text',
82
+ style: {
83
+ text_align: 'center',
84
+ font_style: 'italic',
85
+ font_weight: 'normal',
86
+ margin_bottom: '20px',
87
+ font_size: '16px',
88
+ },
89
+ mobile_style: {
90
+ text_align: 'center',
91
+ font_style: 'italic',
92
+ font_weight: 'normal',
93
+ },
94
+ text: {
95
+ html: 'Lãi suất ưu đãi - Hỗ trợ trả góp 90%\nCùng dịch vụ hậu mãi đẳng cấp đi kèm nhiều phần quà hấp dẫn khác',
96
+ i18n_html: {
97
+ en_US:
98
+ 'Lãi suất ưu đãi - Hỗ trợ trả góp 90%\nCùng dịch vụ hậu mãi đẳng cấp đi kèm nhiều phần quà hấp dẫn khác',
99
+ vi_VN:
100
+ 'Lãi suất ưu đãi - Hỗ trợ trả góp 90%\nCùng dịch vụ hậu mãi đẳng cấp đi kèm nhiều phần quà hấp dẫn khác',
101
+ },
102
+ i18n_quill_delta: {},
103
+ },
46
104
  },
47
- ],
48
- agent_ids: ['agqsulrowbxilyzhds', 'agqsuorpukqwddqrtn', 'agqxufisjmshlniwof'],
49
- },
50
- height: 705,
51
- width: 375,
52
- primary_color: 'rgb(15, 220, 174)',
53
- background: 'linear-gradient(135deg, rgb(13, 223, 169) 0%, rgb(41, 183, 248) 100%)',
54
- offline_form: {
55
- fields: [
56
105
  {
57
- key: 'fullname',
58
- label: 'Họ và tên',
59
- i18n_label: {
60
- vi_VN: 'Ho ten',
61
- en_US: 'Fullname',
106
+ type: 'form',
107
+ style: {
108
+ margin_bottom: '20px',
109
+ },
110
+ form: {
111
+ fields: [
112
+ {
113
+ key: 'email',
114
+ label: 'Email',
115
+ i18n_label: {
116
+ en_US: 'Email',
117
+ vi_VN: 'Email',
118
+ },
119
+ is_required: true,
120
+ type: 'email',
121
+ validate: 'email',
122
+ placeholder: 'abc@example.com',
123
+ i18n_placeholder: {
124
+ en_US: 'abc@example.com',
125
+ vi_VN: 'abc@example.com',
126
+ },
127
+ },
128
+ {
129
+ key: 'phone',
130
+ label: 'Số điện thoại',
131
+ i18n_label: {
132
+ en_US: 'Số điện thoại',
133
+ vi_VN: 'Số điện thoại',
134
+ },
135
+ is_required: true,
136
+ type: 'text',
137
+ validate: 'phone',
138
+ placeholder: '036123456',
139
+ i18n_placeholder: {
140
+ en_US: '036123456',
141
+ vi_VN: '036123456',
142
+ },
143
+ },
144
+ ],
62
145
  },
63
- type: 'text',
64
146
  },
65
147
  {
66
- key: 'emails',
67
- label: 'Địa chỉ email',
68
- i18n_label: {
69
- vi_VN: 'THU DIEN TU',
70
- en_US: 'EMAIL',
148
+ type: 'buttons',
149
+ style: {
150
+ border_radius: '12px',
151
+ background: 'rgba(174,0,0,1)',
152
+ flex_direction: 'column',
153
+ align_items: 'center',
154
+ },
155
+ buttons: {
156
+ primary_enabled: true,
157
+ primary_actions: [
158
+ {
159
+ action: 'conversion',
160
+ },
161
+ {
162
+ action: 'next_page',
163
+ },
164
+ ],
165
+ primary_text: 'Đăng ký ngay',
166
+ i18n_primary_text: {
167
+ en_US: 'Đăng ký ngay',
168
+ vi_VN: 'Đăng ký ngay',
169
+ },
170
+ secondary_actions: [
171
+ {
172
+ action: 'close',
173
+ },
174
+ ],
175
+ i18n_secondary_text: {
176
+ vi_VN: 'Đăng ký ngay',
177
+ },
178
+ },
179
+ },
180
+ {
181
+ type: 'image',
182
+ style: {
183
+ width: '375px',
184
+ height: '100%',
185
+ background_position: '28.711790393013125% 0%',
186
+ right: '0',
187
+ top: '0',
188
+ },
189
+ mobile_style: {
190
+ width: '100%',
191
+ height: '150px',
192
+ background_position: '0% 51.66666666666666%',
193
+ left: '0',
194
+ top: '0',
195
+ },
196
+ image: {
197
+ url: 'https://images.unsplash.com/photo-1606220838315-056192d5e927?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwxMjA3fDB8MXxzZWFyY2h8NDJ8fGNhciUzRCUzRCUzRCUzRCUzRCUzRCUzRHxlbnwwfHx8fDE2MjAzNjA3NDc&ixlib=rb-1.2.1&q=80&w=1080',
71
198
  },
72
- type: 'text',
73
199
  },
74
200
  ],
75
- title:
76
- 'Chào bạn! ↵Hiện các agent đang offline. Bạn vui lòng để lại thông tin để chúng tôi tiếp tục hỗ trợ bạn khi quay lại làm việc. Cảm ơn bạn!',
77
- enable_when: 'all_agents_offline',
78
- i18n_question_label: {
79
- vi_VN: 'Tin nhan',
80
- en_US: 'Your answer',
201
+ style: {
202
+ background: 'rgba(255,255,255,1)',
203
+ width: '751px',
204
+ height: 'auto',
205
+ padding_left: '40px',
206
+ padding_right: '40px',
207
+ padding_top: '40px',
208
+ padding_bottom: '40px',
209
+ margin_left: '0px',
210
+ margin_right: '375px',
211
+ margin_top: '0px',
212
+ margin_bottom: '0px',
213
+ overflow: 'hidden',
81
214
  },
82
- i18n_title: {
83
- vi_VN: 'Xin chao qui vi va cac ban',
84
- en_US: 'Holaa lkalalal',
215
+ mobile_style: {
216
+ background: 'rgba(255,255,255,1)',
217
+ width: '400px',
218
+ padding_left: '40px',
219
+ padding_right: '40px',
220
+ padding_top: '40px',
221
+ padding_bottom: '40px',
222
+ margin_left: '0px',
223
+ margin_right: '0px',
224
+ margin_top: '149px',
225
+ margin_bottom: '0px',
85
226
  },
86
-
87
- i18n_group_label: {
88
- vi_VN: 'Tro chuyen voi',
89
- en_US: 'Chat with',
90
- },
91
- enabled: true,
227
+ layout: 'row',
228
+ mobile_layout: 'column',
92
229
  },
93
- prechat_form: {
94
- fields: [
230
+ {
231
+ components: [
95
232
  {
96
- key: 'emails',
97
- label: 'Địa chỉ email',
98
233
  type: 'text',
234
+ style: {
235
+ text_align: 'center',
236
+ margin_bottom: '10px',
237
+ font_size: '20px',
238
+ },
239
+ mobile_style: {
240
+ text_align: 'center',
241
+ margin_bottom: '10px',
242
+ font_size: '40px',
243
+ },
244
+ text: {
245
+ html: 'Cảm ơn',
246
+ i18n_html: {
247
+ en_US: 'Cảm ơn',
248
+ vi_VN: 'Cảm ơn',
249
+ },
250
+ i18n_quill_delta: {},
251
+ },
99
252
  },
100
253
  {
101
- key: 'fullname',
102
- label: 'Họ và tên',
103
- is_required: true,
104
254
  type: 'text',
255
+ style: {
256
+ text_align: 'center',
257
+ margin_bottom: '20px',
258
+ font_size: '16px',
259
+ },
260
+ text: {
261
+ html: 'Chúng tôi đã ghi nhận được yêu cầu của bạn',
262
+ i18n_html: {
263
+ en_US: 'Chúng tôi đã ghi nhận được yêu cầu của bạn',
264
+ vi_VN: 'Chúng tôi đã ghi nhận được yêu cầu của bạn',
265
+ },
266
+ i18n_quill_delta: {},
267
+ },
268
+ },
269
+ {
270
+ type: 'buttons',
271
+ style: {
272
+ flex_direction: 'column',
273
+ align_items: 'center',
274
+ },
275
+ mobile_style: {
276
+ flex_direction: 'column',
277
+ align_items: 'center',
278
+ },
279
+ buttons: {
280
+ primary_enabled: true,
281
+ primary_actions: [
282
+ {
283
+ action: 'close',
284
+ },
285
+ ],
286
+ primary_text: 'Đóng',
287
+ i18n_primary_text: {
288
+ en_US: 'Đóng',
289
+ vi_VN: 'Đóng',
290
+ },
291
+ i18n_secondary_text: {
292
+ vi_VN: 'Đóng',
293
+ },
294
+ },
105
295
  },
106
296
  ],
107
- group_required: true,
108
- title: 'Xin chào',
109
- question_label: 'tin nhan',
110
- },
111
- desktop_button: {
112
- background_mask_url: 'https://public-gcs.subiz-cdn.com/dashboard-v4/public/img/bubble_00.dcaf1b50.svg',
113
- margin_x: 50,
114
- margin_y: 50,
115
- position: 'right',
116
- },
117
- mobile_button: {
118
- background_mask_url: 'https://public-gcs.subiz-cdn.com/dashboard-v4/public/img/bubble_00.dcaf1b50.svg',
119
- margin_x: 20,
120
- margin_y: 20,
121
- position: 'right',
122
- },
123
- greeting: {
124
- message: 'Holla amigo',
125
- enabled: false,
126
- agent_id: 'agqsuorpukqwddqrtn',
297
+ style: {
298
+ background: '#fff',
299
+ width: '300px',
300
+ padding_left: '40px',
301
+ padding_right: '40px',
302
+ padding_top: '40px',
303
+ padding_bottom: '40px',
304
+ overflow: 'hidden',
305
+ },
306
+ mobile_style: {
307
+ background: '#fff',
308
+ width: '300px',
309
+ padding_left: '40px',
310
+ padding_right: '40px',
311
+ padding_top: '40px',
312
+ padding_bottom: '40px',
313
+ },
127
314
  },
128
- title: 'Bất động sản An Cư',
129
- introduction: 'Chúng tôi luôn sẵn sàng hỗ trợ',
130
- auto_request_rating: true,
131
- },
132
- thumbnail_url: 'https://file-subiz.com/fiqzxywfwuvymbiqumbzwpwidget.jpg',
133
- locale: 'vi-VN',
315
+ ],
134
316
  },
135
- ])
317
+ conversion_notification: {
318
+ all_agents: true,
319
+ },
320
+ template_categories: ['Xe hơi'],
321
+ template_title: 'Khuyến mãi xe hơi',
322
+ thumbnail_url: 'https://file-subiz.com/fiqzycspqbycpbawhjzbwptpkufqxwin.jpg',
323
+ }
324
+ subiz._overridePlugin([popup])
136
325
 
137
326
  setTimeout(() => {
138
327
  subiz.showWidget()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@subiz/widget-v4",
3
- "version": "4.1.14",
3
+ "version": "4.1.16",
4
4
  "main": "./compiled_src/lib.js",
5
5
  "scripts": {
6
6
  "dev": "npx webpack serve --config webpack.dev.js",
@@ -14,25 +14,25 @@
14
14
  "@subiz/storage": "0.0.8",
15
15
  "@subiz/wsclient": "^3.1.9",
16
16
  "cookie_js": "1.4.2",
17
- "core-js": "^3.27.1",
17
+ "core-js": "^3.27.2",
18
18
  "css-loader": "5.2.7",
19
19
  "file-loader": "^6.2.0",
20
20
  "less": "^4.1.3",
21
21
  "less-loader": "^11.1.0",
22
- "marked": "^4.2.5",
22
+ "marked": "^4.2.12",
23
23
  "preact": "^10.11.3"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@babel/cli": "^7.20.7",
27
27
  "@babel/core": "^7.20.12",
28
28
  "@babel/plugin-proposal-class-properties": "^7.18.6",
29
- "@babel/plugin-transform-react-jsx": "^7.20.7",
29
+ "@babel/plugin-transform-react-jsx": "^7.20.13",
30
30
  "@babel/preset-env": "^7.20.2",
31
31
  "babel-loader": "^9.1.2",
32
32
  "babel-plugin-syntax-jsx": "^6.18.0",
33
33
  "html-webpack-plugin": "^5.5.0",
34
- "prettier": "^2.8.1",
35
- "puppeteer": "^19.4.1",
34
+ "prettier": "^2.8.3",
35
+ "puppeteer": "^19.6.3",
36
36
  "webpack": "^5.75.0",
37
37
  "webpack-bundle-analyzer": "^4.7.0",
38
38
  "webpack-cli": "^5.0.1",
@@ -285,6 +285,10 @@ export default class Popup extends Com {
285
285
  primarystyle.font_weight = primarystyle.font_weight || '500'
286
286
  primarystyle.font_size = primarystyle.font_size || popup.font_size || '14px'
287
287
  primarystyle.background = primarystyle.background || popup.text_color
288
+
289
+ if (this.props.mobile && com.mobile_style) {
290
+ primarystyle = Object.assign(primarystyle, com.mobile_style)
291
+ }
288
292
  let $primary = null
289
293
  if (com.buttons.primary_enabled && com.buttons.primary_text) {
290
294
  let style = Object.assign({font_size: popup.font_size || '14px'}, page.primary_button)
@@ -304,6 +308,9 @@ export default class Popup extends Com {
304
308
  let $secondary = null
305
309
  if (com.buttons.secondary_enabled && com.buttons.secondary_text) {
306
310
  let style = Object.assign({font_size: popup.font_size || '14px'}, page.secondary_button)
311
+ if (this.props.mobile && com.mobile_style) {
312
+ style = Object.assign(style, com.mobile_style)
313
+ }
307
314
  $secondary = (
308
315
  <div
309
316
  class={'btn btn__secondary'}
@@ -700,7 +707,7 @@ export default class Popup extends Com {
700
707
  (this.props.mobile && com.mobile_style) || com.style,
701
708
  )
702
709
  delete style.margin_top
703
- delete style.margin_bottom
710
+ //delete style.margin_bottom
704
711
 
705
712
  return (
706
713
  <div class='text popup_component' style={this.js2css(style)} onClick={(e) => e.stopPropagation()}>
@@ -920,6 +927,7 @@ export default class Popup extends Com {
920
927
  border: pagestyle.border,
921
928
  overflow: layout === 'row' ? 'auto' : '',
922
929
  max_height: layout === 'row' ? '100%' : '',
930
+ min_height: layout === 'row' ? '100%' : '',
923
931
  }
924
932
  let bodycss = {
925
933
  overflow: layout === 'column' ? 'auto' : '',
@@ -1268,7 +1268,7 @@ let cleanLocalStorage = () => {
1268
1268
  }
1269
1269
  sb.setTimeout(() => {
1270
1270
  for (var key in localStorage) {
1271
- if ((key && key.startsWith('cbz2020')) || key.startsWith('sbz2020')) {
1271
+ if (key && (key.startsWith('cbz2020') || key.startsWith('sbz2020'))) {
1272
1272
  localStorage.removeItem(key)
1273
1273
  }
1274
1274
  }