@subiz/widget-v4 4.1.18 → 4.1.20
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/assets/img/loading_static.svg +8 -8
- package/assets/less/chatbox.less +9 -1
- package/assets/less/message.less +5 -5
- package/assets/less/widget.less +2 -1
- package/assets/less/widget_header.less +5 -4
- package/compiled_src/chatbox/Events.js +1 -1
- package/compiled_src/chatbox/spinner.js +11 -25
- package/compiled_src/util/common.js +1 -4
- package/compiled_src/util/order.js +2 -4
- package/compiled_src/util/pubsub.js +3 -6
- package/dist/132.js +33 -47
- package/dist/178.js +1 -1
- package/dist/186965b8487.132.js +1 -0
- package/dist/186965b8487.178.js +1 -0
- package/dist/186965b8487.213.js +1 -0
- package/dist/186965b8487.335.js +1 -0
- package/dist/186965b8487.605.js +1 -0
- package/dist/186965b8487.app.js +1 -0
- package/dist/{1861083ae18.index.html → 186965b8487.index.html} +1 -1
- package/dist/{1861083ae18.library.html → 186965b8487.library.html} +1 -1
- package/dist/186965b8487.library.js +1 -0
- package/dist/{1861083ae18.preview.html → 186965b8487.preview.html} +1 -1
- package/dist/186965b8487.preview.js +1 -0
- package/dist/186965b8487.screenshoot.js +1 -0
- package/dist/186965b8487.webview.js +1 -0
- package/dist/213.js +12 -11
- package/dist/335.js +1 -1
- package/dist/605.js +7 -7
- package/dist/HASH +1 -1
- package/dist/assets/img/{loading_static.8f403ae.svg → loading_static.a27f0ac.svg} +8 -8
- package/dist/screenshoot.html +1 -1
- package/dist/screenshoot.js +104 -112
- package/package.json +8 -8
- package/src/chatbox/Events.js +1 -1
- package/src/chatbox/spinner.js +12 -23
- package/src/store/store.js +4 -1
- package/assets/less/spinner.less +0 -28
- package/dist/1861083ae18.132.js +0 -1
- package/dist/1861083ae18.178.js +0 -1
- package/dist/1861083ae18.213.js +0 -1
- package/dist/1861083ae18.335.js +0 -1
- package/dist/1861083ae18.605.js +0 -1
- package/dist/1861083ae18.app.js +0 -1
- package/dist/1861083ae18.library.js +0 -1
- package/dist/1861083ae18.preview.js +0 -1
- package/dist/1861083ae18.screenshoot.js +0 -1
- package/dist/1861083ae18.webview.js +0 -1
- /package/dist/{1861083ae18.362.js → 186965b8487.362.js} +0 -0
- /package/dist/{1861083ae18.441.js → 186965b8487.441.js} +0 -0
- /package/dist/{1861083ae18.678.js → 186965b8487.678.js} +0 -0
- /package/dist/{1861083ae18.782.js → 186965b8487.782.js} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<svg width="96" height="96" viewBox="0 0 96 96" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path d="M50.6405 31.0668C50.3123 31.1559 49.8798 31.1851 49.5292 31.192C47.2397 31.1957 45.3018 29.2499 45.3778 26.9338L45.4448 14.2026C45.4386 11.9089 47.3787 9.96953 49.6906 10.0481C51.9801 10.0444 53.918 11.9902 53.842 14.3062L53.775 27.0375C53.6695 28.9201 52.3635 30.599 50.6405 31.0668Z" fill="#
|
|
3
|
-
<path d="M49.8863 84.419C49.6402 84.4859 49.4761 84.5304 49.2076 84.515C47.8056 84.5426 46.6876 83.3453 46.6586 81.9406L46.7256 69.2094C46.6966 67.8047 47.8905 66.686 49.2925 66.6585C50.6946 66.6309 51.8125 67.8282 51.8416 69.2329L51.7746 81.9641C51.7589 83.2043 50.953 84.1294 49.8863 84.419Z" fill="#
|
|
4
|
-
<path d="M64.6962 34.4895C64.286 34.6009 63.8087 34.4656 63.451 34.1213C62.9665 33.6348 62.9297 32.8503 63.4967 32.3432L72.5108 23.3626C72.9958 22.8777 73.7789 22.8417 74.2857 23.4103C74.7702 23.8968 74.807 24.6813 74.2399 25.1885L65.2259 34.1691C65.0841 34.2959 64.9423 34.4226 64.6962 34.4895Z" fill="#
|
|
5
|
-
<path d="M26.1317 74.8013C25.1471 75.0686 24.0286 74.8426 23.2684 73.9896C22.1505 72.7923 22.0919 70.9542 23.2857 69.8355L32.2998 60.8549C33.4937 59.7361 35.3283 59.6794 36.4463 60.8767C37.5642 62.074 37.6228 63.9121 36.4289 65.0308L27.4149 74.0114C27.0716 74.3695 26.624 74.6676 26.1317 74.8013Z" fill="#
|
|
6
|
-
<path d="M83.682 49.9048C83.5179 49.9494 83.3538 49.9939 83.2494 49.934L70.5416 49.8531C69.5721 49.8515 68.8342 49.0807 68.8571 48.1916C68.8577 47.2204 69.6262 46.482 70.5137 46.5059L83.2215 46.5867C84.191 46.5883 84.9289 47.3591 84.906 48.2482C84.8831 49.1373 84.3384 49.7266 83.682 49.9048Z" fill="#
|
|
7
|
-
<path d="M29.1731 51.2862C28.9269 51.353 28.5987 51.4421 28.2482 51.449L15.5404 51.3681C13.6835 51.3426 12.2077 49.8011 12.1491 47.963C12.1726 46.1026 13.7097 44.6258 15.5443 44.5691L28.2522 44.65C30.1091 44.6755 31.5848 46.2171 31.6434 48.0551C31.6127 49.5643 30.5679 50.9074 29.1731 51.2862Z" fill="#
|
|
8
|
-
<path d="M73.727 74.2379C72.9886 74.4384 72.2206 74.2055 71.6317 73.6591L62.6579 64.6187C61.8156 63.788 61.809 62.4656 62.6372 61.6227C63.4655 60.7798 64.7855 60.7745 65.6278 61.6052L74.6016 70.6456C75.4439 71.4763 75.4505 72.7988 74.6223 73.6417C74.4431 73.9552 74.0552 74.1488 73.727 74.2379Z" fill="#
|
|
9
|
-
<path d="M35.5354 36.7576C34.2227 37.114 32.8134 36.7904 31.8221 35.7353L22.8483 26.6949C21.3949 25.2355 21.3441 22.7773 22.8812 21.3005C24.3363 19.846 26.7899 19.7978 28.2656 21.3394L37.2395 30.3798C38.6929 31.8391 38.7437 34.2973 37.2065 35.7741C36.7215 36.2589 36.1098 36.6016 35.5354 36.7576Z" fill="#
|
|
2
|
+
<path d="M50.6405 31.0668C50.3123 31.1559 49.8798 31.1851 49.5292 31.192C47.2397 31.1957 45.3018 29.2499 45.3778 26.9338L45.4448 14.2026C45.4386 11.9089 47.3787 9.96953 49.6906 10.0481C51.9801 10.0444 53.918 11.9902 53.842 14.3062L53.775 27.0375C53.6695 28.9201 52.3635 30.599 50.6405 31.0668Z" fill="#00000011"/>
|
|
3
|
+
<path d="M49.8863 84.419C49.6402 84.4859 49.4761 84.5304 49.2076 84.515C47.8056 84.5426 46.6876 83.3453 46.6586 81.9406L46.7256 69.2094C46.6966 67.8047 47.8905 66.686 49.2925 66.6585C50.6946 66.6309 51.8125 67.8282 51.8416 69.2329L51.7746 81.9641C51.7589 83.2043 50.953 84.1294 49.8863 84.419Z" fill="#00000033"/>
|
|
4
|
+
<path d="M64.6962 34.4895C64.286 34.6009 63.8087 34.4656 63.451 34.1213C62.9665 33.6348 62.9297 32.8503 63.4967 32.3432L72.5108 23.3626C72.9958 22.8777 73.7789 22.8417 74.2857 23.4103C74.7702 23.8968 74.807 24.6813 74.2399 25.1885L65.2259 34.1691C65.0841 34.2959 64.9423 34.4226 64.6962 34.4895Z" fill="#00000000"/>
|
|
5
|
+
<path d="M26.1317 74.8013C25.1471 75.0686 24.0286 74.8426 23.2684 73.9896C22.1505 72.7923 22.0919 70.9542 23.2857 69.8355L32.2998 60.8549C33.4937 59.7361 35.3283 59.6794 36.4463 60.8767C37.5642 62.074 37.6228 63.9121 36.4289 65.0308L27.4149 74.0114C27.0716 74.3695 26.624 74.6676 26.1317 74.8013Z" fill="#00000055"/>
|
|
6
|
+
<path d="M83.682 49.9048C83.5179 49.9494 83.3538 49.9939 83.2494 49.934L70.5416 49.8531C69.5721 49.8515 68.8342 49.0807 68.8571 48.1916C68.8577 47.2204 69.6262 46.482 70.5137 46.5059L83.2215 46.5867C84.191 46.5883 84.9289 47.3591 84.906 48.2482C84.8831 49.1373 84.3384 49.7266 83.682 49.9048Z" fill="#00000000"/>
|
|
7
|
+
<path d="M29.1731 51.2862C28.9269 51.353 28.5987 51.4421 28.2482 51.449L15.5404 51.3681C13.6835 51.3426 12.2077 49.8011 12.1491 47.963C12.1726 46.1026 13.7097 44.6258 15.5443 44.5691L28.2522 44.65C30.1091 44.6755 31.5848 46.2171 31.6434 48.0551C31.6127 49.5643 30.5679 50.9074 29.1731 51.2862Z" fill="#00000044"/>
|
|
8
|
+
<path d="M73.727 74.2379C72.9886 74.4384 72.2206 74.2055 71.6317 73.6591L62.6579 64.6187C61.8156 63.788 61.809 62.4656 62.6372 61.6227C63.4655 60.7798 64.7855 60.7745 65.6278 61.6052L74.6016 70.6456C75.4439 71.4763 75.4505 72.7988 74.6223 73.6417C74.4431 73.9552 74.0552 74.1488 73.727 74.2379Z" fill="#00000033"/>
|
|
9
|
+
<path d="M35.5354 36.7576C34.2227 37.114 32.8134 36.7904 31.8221 35.7353L22.8483 26.6949C21.3949 25.2355 21.3441 22.7773 22.8812 21.3005C24.3363 19.846 26.7899 19.7978 28.2656 21.3394L37.2395 30.3798C38.6929 31.8391 38.7437 34.2973 37.2065 35.7741C36.7215 36.2589 36.1098 36.6016 35.5354 36.7576Z" fill="#00000022"/>
|
|
10
10
|
</svg>
|
package/assets/less/chatbox.less
CHANGED
|
@@ -237,6 +237,15 @@ body div#sbz92 {
|
|
|
237
237
|
flex-shrink: 0;
|
|
238
238
|
}
|
|
239
239
|
|
|
240
|
+
.loading {
|
|
241
|
+
flex: 1;
|
|
242
|
+
align-items: center;
|
|
243
|
+
justify-content: center;
|
|
244
|
+
display: flex;
|
|
245
|
+
flex-direction: column;
|
|
246
|
+
background: white
|
|
247
|
+
}
|
|
248
|
+
|
|
240
249
|
@import 'avatar.less';
|
|
241
250
|
@import 'widget_header.less';
|
|
242
251
|
@import 'message_input.less';
|
|
@@ -246,7 +255,6 @@ body div#sbz92 {
|
|
|
246
255
|
@import 'emoji.less';
|
|
247
256
|
@import 'widget.less';
|
|
248
257
|
@import 'rating.less';
|
|
249
|
-
@import 'spinner.less';
|
|
250
258
|
@import 'order.less';
|
|
251
259
|
@import 'dropdown_select.less';
|
|
252
260
|
}
|
package/assets/less/message.less
CHANGED
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
.file-attachment--agent .file-attachment--filename {
|
|
60
|
-
.color(@
|
|
60
|
+
.color(@text-color);
|
|
61
61
|
text-decoration: underline;
|
|
62
62
|
text-overflow: ellipsis;
|
|
63
63
|
white-space: nowrap;
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
.file-attachment--agent .file-attachment--download {
|
|
85
|
-
background: @
|
|
85
|
+
background: @text-color;
|
|
86
86
|
background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9IiMwMjY1RkYiIHN0cm9rZS13aWR0aD0iMyIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiBjbGFzcz0iZmVhdGhlciBmZWF0aGVyLWFycm93LWRvd24iPjxsaW5lIHgxPSIxMiIgeTE9IjUiIHgyPSIxMiIgeTI9IjE5Ij48L2xpbmU+PHBvbHlsaW5lIHBvaW50cz0iMTkgMTIgMTIgMTkgNSAxMiI+PC9wb2x5bGluZT48L3N2Zz4K');
|
|
87
87
|
background-size: 15px 15px;
|
|
88
88
|
background-repeat: no-repeat;
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
margin: 5px 0 0;
|
|
112
112
|
display: inline-block;
|
|
113
113
|
background-color: @primary-color;
|
|
114
|
-
.color(@
|
|
114
|
+
.color(@text-color);
|
|
115
115
|
padding: 10px 14px 10px 14px;
|
|
116
116
|
}
|
|
117
117
|
|
|
@@ -323,7 +323,7 @@ a.message_error {
|
|
|
323
323
|
|
|
324
324
|
.form-attachment--submit-btn {
|
|
325
325
|
background-color: @primary-color;
|
|
326
|
-
.color(@
|
|
326
|
+
.color(@text-color);
|
|
327
327
|
width: 100%;
|
|
328
328
|
margin-top: 10px;
|
|
329
329
|
border-radius: 7px;
|
|
@@ -331,7 +331,7 @@ a.message_error {
|
|
|
331
331
|
text-align: center;
|
|
332
332
|
font-size: 15px;
|
|
333
333
|
&:hover {
|
|
334
|
-
.color(@
|
|
334
|
+
.color(@text-color);
|
|
335
335
|
}
|
|
336
336
|
}
|
|
337
337
|
|
package/assets/less/widget.less
CHANGED
|
@@ -234,7 +234,7 @@
|
|
|
234
234
|
padding-left: 32px;
|
|
235
235
|
padding-right: 32px;
|
|
236
236
|
height: 40px;
|
|
237
|
-
.color(@
|
|
237
|
+
.color(@text-color);
|
|
238
238
|
font-size: 16px;
|
|
239
239
|
line-height: 20px;
|
|
240
240
|
text-align: center;
|
|
@@ -243,6 +243,7 @@
|
|
|
243
243
|
align-items: center;
|
|
244
244
|
margin-left: auto;
|
|
245
245
|
margin-right: auto;
|
|
246
|
+
margin-bottom: @spacer3;
|
|
246
247
|
&::after {
|
|
247
248
|
display: none;
|
|
248
249
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// transition: height 0.2s;
|
|
5
5
|
border-radius: 15px 15px 0px 0px;
|
|
6
6
|
background: @background;
|
|
7
|
-
.color(@
|
|
7
|
+
.color(@text-color);
|
|
8
8
|
width: 100%;
|
|
9
9
|
|
|
10
10
|
.widget-header--total-unread-convo {
|
|
@@ -38,14 +38,15 @@
|
|
|
38
38
|
overflow: hidden;
|
|
39
39
|
text-overflow: ellipsis;
|
|
40
40
|
font-size: 16px;
|
|
41
|
-
.color(@
|
|
41
|
+
.color(@text-color);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
.widget-header--description {
|
|
45
45
|
font-size: 14px;
|
|
46
|
+
white-space: pre-wrap;
|
|
46
47
|
opacity: 0.8;
|
|
47
48
|
flex: 1;
|
|
48
|
-
.color(@
|
|
49
|
+
.color(@text-color);
|
|
49
50
|
margin-top: 2.5px;
|
|
50
51
|
position: relative;
|
|
51
52
|
}
|
|
@@ -218,7 +219,7 @@
|
|
|
218
219
|
}
|
|
219
220
|
|
|
220
221
|
.social__introduction {
|
|
221
|
-
.color(@
|
|
222
|
+
.color(@text-color);
|
|
222
223
|
max-height: 72px;
|
|
223
224
|
overflow: hidden;
|
|
224
225
|
display: -webkit-box;
|
|
@@ -68,7 +68,7 @@ class Events extends _common.Com {
|
|
|
68
68
|
if (this.state.loading || this.props.creating) {
|
|
69
69
|
$loading = (0, _preact.h)(_spinner.default, {
|
|
70
70
|
static: true,
|
|
71
|
-
mode:
|
|
71
|
+
mode: _index.default.get(this.props.chatbox, 'primary_color', 'dark'),
|
|
72
72
|
size: "120",
|
|
73
73
|
center: true
|
|
74
74
|
});
|
|
@@ -10,37 +10,23 @@ const loadingimg = require('../../assets/img/loading_static.svg');
|
|
|
10
10
|
class Spinner extends _common.Com {
|
|
11
11
|
render() {
|
|
12
12
|
let mode = (this.props.mode + '').toLowerCase();
|
|
13
|
-
let mainColor = mode === 'dark' ? '#000000dd' : mode === 'blue' ? 'rgba(52, 152, 220, .8)' :
|
|
14
|
-
let borderColor = mode === 'dark' ? '#00000055' : mode === 'blue' ? 'rgba(52, 152, 220, .15)' : '#ffffff55';
|
|
13
|
+
let mainColor = mode === 'dark' ? '#000000dd' : mode === 'blue' ? 'rgba(52, 152, 220, .8)' : mode;
|
|
15
14
|
let size = this.props.size || 14;
|
|
16
15
|
let borderWidth = Math.ceil(size / 14);
|
|
17
|
-
let style = `width: ${size}px !important;height: ${size}px
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
if (size < 40) return (0, _preact.h)(LoaderIcon, {
|
|
23
|
-
size: size + '',
|
|
24
|
-
style: `stroke:${mainColor}`
|
|
25
|
-
});
|
|
26
|
-
if (this.props.center) {
|
|
27
|
-
return (0, _preact.h)("div", {
|
|
28
|
-
class: "loading"
|
|
29
|
-
}, (0, _preact.h)("img", {
|
|
30
|
-
alt: "loading",
|
|
31
|
-
style: style,
|
|
32
|
-
src: loadingimg
|
|
33
|
-
}));
|
|
34
|
-
}
|
|
35
|
-
return (0, _preact.h)("img", {
|
|
16
|
+
let style = `width: ${size}px !important;height: ${size}px !important;`;
|
|
17
|
+
if (this.props.center) {
|
|
18
|
+
return (0, _preact.h)("div", {
|
|
19
|
+
class: "loading"
|
|
20
|
+
}, (0, _preact.h)("img", {
|
|
36
21
|
alt: "loading",
|
|
37
22
|
style: style,
|
|
38
23
|
src: loadingimg
|
|
39
|
-
});
|
|
24
|
+
}));
|
|
40
25
|
}
|
|
41
|
-
return (0, _preact.h)("
|
|
42
|
-
|
|
43
|
-
style: style
|
|
26
|
+
return (0, _preact.h)("img", {
|
|
27
|
+
alt: "loading",
|
|
28
|
+
style: style,
|
|
29
|
+
src: loadingimg
|
|
44
30
|
});
|
|
45
31
|
}
|
|
46
32
|
}
|
|
@@ -156,10 +156,7 @@ function getMsgField(ev, fieldName) {
|
|
|
156
156
|
function isObject(item) {
|
|
157
157
|
return item && typeof item === 'object' && !Array.isArray(item);
|
|
158
158
|
}
|
|
159
|
-
function merge(target) {
|
|
160
|
-
for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
161
|
-
sources[_key - 1] = arguments[_key];
|
|
162
|
-
}
|
|
159
|
+
function merge(target, ...sources) {
|
|
163
160
|
if (!sources.length) return target;
|
|
164
161
|
const source = sources.shift();
|
|
165
162
|
if (isObject(target) && isObject(source)) {
|
|
@@ -14,8 +14,7 @@ op.map = common.map;
|
|
|
14
14
|
op.each = common.each;
|
|
15
15
|
op.size = common.size;
|
|
16
16
|
op.find = common.find;
|
|
17
|
-
function getProductPropName(product) {
|
|
18
|
-
let seperator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ' - ';
|
|
17
|
+
function getProductPropName(product, seperator = ' - ') {
|
|
19
18
|
let options = op.get(product, 'options', []);
|
|
20
19
|
let props = op.get(product, 'props', []);
|
|
21
20
|
let multiPropsOptions = op.filter(options, option => op.size(option.values) > 1);
|
|
@@ -26,8 +25,7 @@ function getProductPropName(product) {
|
|
|
26
25
|
});
|
|
27
26
|
return names.join(seperator);
|
|
28
27
|
}
|
|
29
|
-
function getOrderDisplayName() {
|
|
30
|
-
let order = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
28
|
+
function getOrderDisplayName(order = {}) {
|
|
31
29
|
return order.number || order.id || '';
|
|
32
30
|
}
|
|
33
31
|
function displayOrderShippingAddress(order, isShorten) {
|
|
@@ -14,12 +14,9 @@ class Pubsub {
|
|
|
14
14
|
}
|
|
15
15
|
publish(topic, payload, payload2, payload3) {
|
|
16
16
|
this.listeners[topic] = filter(this.listeners[topic], sub => sub.obj._isMounted);
|
|
17
|
-
map(this.listeners[topic],
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
} = _ref;
|
|
21
|
-
return cb(payload, payload2, payload3);
|
|
22
|
-
});
|
|
17
|
+
map(this.listeners[topic], ({
|
|
18
|
+
cb
|
|
19
|
+
}) => cb(payload, payload2, payload3));
|
|
23
20
|
}
|
|
24
21
|
on2(obj, topic, cb) {
|
|
25
22
|
if (!this.listeners[topic]) this.listeners[topic] = [];
|
package/dist/132.js
CHANGED
|
@@ -982,10 +982,10 @@ class MessageInput extends common/* Com */.up {
|
|
|
982
982
|
focus() {
|
|
983
983
|
if (this.props.disabled) return;
|
|
984
984
|
this.refMessageInput.current && this.refMessageInput.current.focus();
|
|
985
|
-
setTimeout(() => {
|
|
985
|
+
util/* default.setTimeout */.Z.setTimeout(() => {
|
|
986
986
|
this.refMessageInput.current && this.refMessageInput.current.focus();
|
|
987
987
|
});
|
|
988
|
-
setTimeout(() => {
|
|
988
|
+
util/* default.setTimeout */.Z.setTimeout(() => {
|
|
989
989
|
this.refMessageInput.current && this.refMessageInput.current.focus();
|
|
990
990
|
}, 100);
|
|
991
991
|
}
|
|
@@ -2437,7 +2437,7 @@ function absLink(url) {
|
|
|
2437
2437
|
;// CONCATENATED MODULE: ./src/chatbox/time.js
|
|
2438
2438
|
|
|
2439
2439
|
var g_pub = new util/* default.Pubsub */.Z.Pubsub();
|
|
2440
|
-
setInterval(() => g_pub.publish('time'), 20 * 1000);
|
|
2440
|
+
util/* default.setInterval */.Z.setInterval(() => g_pub.publish('time'), 20 * 1000);
|
|
2441
2441
|
|
|
2442
2442
|
|
|
2443
2443
|
class Time extends common/* Com */.up {
|
|
@@ -2775,7 +2775,7 @@ class Event extends common/* Com */.up {
|
|
|
2775
2775
|
}));
|
|
2776
2776
|
}
|
|
2777
2777
|
if (util/* default.getMsgField */.Z.getMsgField(ev, 'idempotency') === ev.id && this.props.store.now() - ev.created < 900) {
|
|
2778
|
-
setTimeout(() => this.setState({
|
|
2778
|
+
util/* default.setTimeout */.Z.setTimeout(() => this.setState({
|
|
2779
2779
|
refresh: this.state.refresh
|
|
2780
2780
|
}), 1000);
|
|
2781
2781
|
}
|
|
@@ -2877,37 +2877,23 @@ const loadingimg = __webpack_require__(6484);
|
|
|
2877
2877
|
class Spinner extends common/* Com */.up {
|
|
2878
2878
|
render() {
|
|
2879
2879
|
let mode = (this.props.mode + '').toLowerCase();
|
|
2880
|
-
let mainColor = mode === 'dark' ? '#000000dd' : mode === 'blue' ? 'rgba(52, 152, 220, .8)' :
|
|
2881
|
-
let borderColor = mode === 'dark' ? '#00000055' : mode === 'blue' ? 'rgba(52, 152, 220, .15)' : '#ffffff55';
|
|
2880
|
+
let mainColor = mode === 'dark' ? '#000000dd' : mode === 'blue' ? 'rgba(52, 152, 220, .8)' : mode;
|
|
2882
2881
|
let size = this.props.size || 14;
|
|
2883
2882
|
let borderWidth = Math.ceil(size / 14);
|
|
2884
|
-
let style = `width: ${size}px !important;height: ${size}px
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
if (size < 40) return (0,preact_module.h)(LoaderIcon, {
|
|
2890
|
-
size: size + '',
|
|
2891
|
-
style: `stroke:${mainColor}`
|
|
2892
|
-
});
|
|
2893
|
-
if (this.props.center) {
|
|
2894
|
-
return (0,preact_module.h)("div", {
|
|
2895
|
-
class: "loading"
|
|
2896
|
-
}, (0,preact_module.h)("img", {
|
|
2897
|
-
alt: "loading",
|
|
2898
|
-
style: style,
|
|
2899
|
-
src: loadingimg
|
|
2900
|
-
}));
|
|
2901
|
-
}
|
|
2902
|
-
return (0,preact_module.h)("img", {
|
|
2883
|
+
let style = `width: ${size}px !important;height: ${size}px !important;`;
|
|
2884
|
+
if (this.props.center) {
|
|
2885
|
+
return (0,preact_module.h)("div", {
|
|
2886
|
+
class: "loading"
|
|
2887
|
+
}, (0,preact_module.h)("img", {
|
|
2903
2888
|
alt: "loading",
|
|
2904
2889
|
style: style,
|
|
2905
2890
|
src: loadingimg
|
|
2906
|
-
});
|
|
2891
|
+
}));
|
|
2907
2892
|
}
|
|
2908
|
-
return (0,preact_module.h)("
|
|
2909
|
-
|
|
2910
|
-
style: style
|
|
2893
|
+
return (0,preact_module.h)("img", {
|
|
2894
|
+
alt: "loading",
|
|
2895
|
+
style: style,
|
|
2896
|
+
src: loadingimg
|
|
2911
2897
|
});
|
|
2912
2898
|
}
|
|
2913
2899
|
}
|
|
@@ -2975,7 +2961,7 @@ class Events extends common/* Com */.up {
|
|
|
2975
2961
|
if (this.state.loading || this.props.creating) {
|
|
2976
2962
|
$loading = (0,preact_module.h)(Spinner, {
|
|
2977
2963
|
static: true,
|
|
2978
|
-
mode:
|
|
2964
|
+
mode: util/* default.get */.Z.get(this.props.chatbox, 'primary_color', 'dark'),
|
|
2979
2965
|
size: "120",
|
|
2980
2966
|
center: true
|
|
2981
2967
|
});
|
|
@@ -3075,7 +3061,7 @@ class Events extends common/* Com */.up {
|
|
|
3075
3061
|
error: false
|
|
3076
3062
|
});
|
|
3077
3063
|
this.scrollToBottom();
|
|
3078
|
-
setTimeout(() => this.setState({
|
|
3064
|
+
util/* default.setTimeout */.Z.setTimeout(() => this.setState({
|
|
3079
3065
|
loading: false
|
|
3080
3066
|
}), 50);
|
|
3081
3067
|
}
|
|
@@ -3085,11 +3071,11 @@ class Events extends common/* Com */.up {
|
|
|
3085
3071
|
return $container.scrollHeight < $container.scrollTop + $container.offsetHeight + 50;
|
|
3086
3072
|
}
|
|
3087
3073
|
scrollToBottom() {
|
|
3088
|
-
setTimeout(() => {
|
|
3074
|
+
util/* default.setTimeout */.Z.setTimeout(() => {
|
|
3089
3075
|
const $div = this.refBody;
|
|
3090
3076
|
if ($div) $div.scrollTop = $div.scrollHeight;
|
|
3091
3077
|
});
|
|
3092
|
-
setTimeout(() => {
|
|
3078
|
+
util/* default.setTimeout */.Z.setTimeout(() => {
|
|
3093
3079
|
const $div = this.refBody;
|
|
3094
3080
|
if ($div) $div.scrollTop = $div.scrollHeight;
|
|
3095
3081
|
}, 200);
|
|
@@ -3158,7 +3144,7 @@ class Typing extends common/* Com */.up {
|
|
|
3158
3144
|
let oldby = util/* default.get */.Z.get(this.state.ev, 'by.id');
|
|
3159
3145
|
if (oldby && util/* default.get */.Z.get(ev, 'by.id') !== oldby) return;
|
|
3160
3146
|
if (util/* default.get */.Z.get(ev, 'type') === 'message_sent') {
|
|
3161
|
-
if (this.timer) clearTimeout(this.timer);
|
|
3147
|
+
if (this.timer) util/* default.clearTimeout */.Z.clearTimeout(this.timer);
|
|
3162
3148
|
this.timer = null;
|
|
3163
3149
|
this.setState({
|
|
3164
3150
|
isShow: false
|
|
@@ -3172,8 +3158,8 @@ class Typing extends common/* Com */.up {
|
|
|
3172
3158
|
ev: ev,
|
|
3173
3159
|
isShow: true
|
|
3174
3160
|
});
|
|
3175
|
-
if (this.timer) clearTimeout(this.timer);
|
|
3176
|
-
this.timer = setTimeout(() => {
|
|
3161
|
+
if (this.timer) util/* default.clearTimeout */.Z.clearTimeout(this.timer);
|
|
3162
|
+
this.timer = util/* default.setTimeout */.Z.setTimeout(() => {
|
|
3177
3163
|
if (util/* default.convoOfEv */.Z.convoOfEv(ev) !== this.props.cid) return;
|
|
3178
3164
|
this.timer = null;
|
|
3179
3165
|
this.setState({
|
|
@@ -3430,7 +3416,7 @@ class Rating extends common/* Com */.up {
|
|
|
3430
3416
|
hide: false
|
|
3431
3417
|
});
|
|
3432
3418
|
if (!this.refRating.current) return;
|
|
3433
|
-
setTimeout(() => {
|
|
3419
|
+
util/* default.setTimeout */.Z.setTimeout(() => {
|
|
3434
3420
|
if (this.refComment.current) this.refComment.current.focus();
|
|
3435
3421
|
}, 400);
|
|
3436
3422
|
this.refComment.current.value = '';
|
|
@@ -3619,7 +3605,7 @@ class DropdownSelect extends common/* Com */.up {
|
|
|
3619
3605
|
focusFilter() {
|
|
3620
3606
|
if (!this.filterRef.current) return;
|
|
3621
3607
|
this.filterRef.current.focus();
|
|
3622
|
-
setTimeout(() => {
|
|
3608
|
+
util/* default.setTimeout */.Z.setTimeout(() => {
|
|
3623
3609
|
if (!this.filterRef.current) return;
|
|
3624
3610
|
this.filterRef.current.focus();
|
|
3625
3611
|
}, 100);
|
|
@@ -3814,7 +3800,7 @@ class AddressPicker extends common/* Com */.up {
|
|
|
3814
3800
|
focusFilter() {
|
|
3815
3801
|
if (!this.filterRef.current) return;
|
|
3816
3802
|
this.filterRef.current.focus();
|
|
3817
|
-
setTimeout(() => {
|
|
3803
|
+
util/* default.setTimeout */.Z.setTimeout(() => {
|
|
3818
3804
|
if (!this.filterRef.current) return;
|
|
3819
3805
|
this.filterRef.current.focus();
|
|
3820
3806
|
}, 100);
|
|
@@ -5169,7 +5155,7 @@ class Order extends common/* Com */.up {
|
|
|
5169
5155
|
render() {
|
|
5170
5156
|
if (this._show != this.props.show) {
|
|
5171
5157
|
this._show = this.props.show;
|
|
5172
|
-
setTimeout(() => {
|
|
5158
|
+
util/* default.setTimeout */.Z.setTimeout(() => {
|
|
5173
5159
|
if (!this._show) this.close();else this.open();
|
|
5174
5160
|
});
|
|
5175
5161
|
}
|
|
@@ -5374,7 +5360,7 @@ class Widget extends common/* Com */.up {
|
|
|
5374
5360
|
clickedJoin: false,
|
|
5375
5361
|
quickReplyMessage: {}
|
|
5376
5362
|
});
|
|
5377
|
-
setTimeout(() => {
|
|
5363
|
+
util/* default.setTimeout */.Z.setTimeout(() => {
|
|
5378
5364
|
this.events && this.events.focus();
|
|
5379
5365
|
if (!this.props.store.isMobile()) this.focusInput();
|
|
5380
5366
|
}, 100);
|
|
@@ -5908,8 +5894,8 @@ class Widget extends common/* Com */.up {
|
|
|
5908
5894
|
if (this.props.store.isPreview) return;
|
|
5909
5895
|
var $input = this.msgInput.current;
|
|
5910
5896
|
if (!$input) return;
|
|
5911
|
-
setTimeout(() => $input && $input.blur());
|
|
5912
|
-
setTimeout(() => $input && $input.blur(), 300);
|
|
5897
|
+
util/* default.setTimeout */.Z.setTimeout(() => $input && $input.blur());
|
|
5898
|
+
util/* default.setTimeout */.Z.setTimeout(() => $input && $input.blur(), 300);
|
|
5913
5899
|
}
|
|
5914
5900
|
focusInput() {
|
|
5915
5901
|
if (this.props.store.isPreview) return;
|
|
@@ -5920,7 +5906,7 @@ class Widget extends common/* Com */.up {
|
|
|
5920
5906
|
if (firstemptykey) return;
|
|
5921
5907
|
if (!field.value) firstemptykey = key;
|
|
5922
5908
|
});
|
|
5923
|
-
setTimeout(() => {
|
|
5909
|
+
util/* default.setTimeout */.Z.setTimeout(() => {
|
|
5924
5910
|
var $input = this['form_' + Widget_encode(firstemptykey)];
|
|
5925
5911
|
if (!$input) return;
|
|
5926
5912
|
$input.focus();
|
|
@@ -5929,8 +5915,8 @@ class Widget extends common/* Com */.up {
|
|
|
5929
5915
|
}
|
|
5930
5916
|
var $input = this.msgInput.current;
|
|
5931
5917
|
if (!$input) return;
|
|
5932
|
-
setTimeout(() => $input.focus());
|
|
5933
|
-
setTimeout(() => $input.focus(), 300);
|
|
5918
|
+
util/* default.setTimeout */.Z.setTimeout(() => $input.focus());
|
|
5919
|
+
util/* default.setTimeout */.Z.setTimeout(() => $input.focus(), 300);
|
|
5934
5920
|
}
|
|
5935
5921
|
onRate(rating) {
|
|
5936
5922
|
if (!this.props.cid) return;
|
|
@@ -6521,7 +6507,7 @@ module.exports = __webpack_require__.p + "assets/img/loader.37000a7.svg";
|
|
|
6521
6507
|
/***/ 6484:
|
|
6522
6508
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
6523
6509
|
|
|
6524
|
-
module.exports = __webpack_require__.p + "assets/img/loading_static.
|
|
6510
|
+
module.exports = __webpack_require__.p + "assets/img/loading_static.a27f0ac.svg";
|
|
6525
6511
|
|
|
6526
6512
|
/***/ }),
|
|
6527
6513
|
|