@subiz/widget-v4 4.1.6 → 4.1.8
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.
|
@@ -35,7 +35,7 @@ class Header extends _common.Com {
|
|
|
35
35
|
}
|
|
36
36
|
renderCollapsedHeader(show) {
|
|
37
37
|
let accSetting = this.props.plugin.chatbox || {};
|
|
38
|
-
let acc = this.props.store.matchAccount();
|
|
38
|
+
let acc = this.props.store.matchAccount() || {};
|
|
39
39
|
let state = acc.is_online ? this.props.t('agent_online') : this.props.t('agent_offline');
|
|
40
40
|
let tagline = _index.default.get(accSetting, `tagline`, {});
|
|
41
41
|
let desc = this.props.t.i18n(tagline) || accSetting.introduction || state;
|
|
@@ -60,7 +60,7 @@ class Header extends _common.Com {
|
|
|
60
60
|
}
|
|
61
61
|
renderSocial(show) {
|
|
62
62
|
let accSetting = this.props.plugin.chatbox || {};
|
|
63
|
-
let acc = this.props.store.matchAccount();
|
|
63
|
+
let acc = this.props.store.matchAccount() || {};
|
|
64
64
|
let links = _index.default.get(accSetting, 'header.links') || [];
|
|
65
65
|
let $links = _index.default.map(links, link => {
|
|
66
66
|
if (!link.url || !link.type || link.type === 'subiz') return null;
|
|
@@ -151,7 +151,7 @@ Vui lòng hỏi chúng tôi bất cứ điều gì hoặc chia sẻ phản hồi
|
|
|
151
151
|
}
|
|
152
152
|
getTitle() {
|
|
153
153
|
let accSetting = this.props.plugin.chatbox || {};
|
|
154
|
-
let acc = this.props.store.matchAccount();
|
|
154
|
+
let acc = this.props.store.matchAccount() || {};
|
|
155
155
|
let agentsJoined = this.getAgentJoined(this.props.cid);
|
|
156
156
|
let caption = _index.default.get(this.props.plugin, 'chatbox.caption', {});
|
|
157
157
|
let title = this.props.t.i18n(caption) || accSetting.title;
|
|
@@ -248,6 +248,7 @@ class Notif extends _common.Com {
|
|
|
248
248
|
}, this.state.timestamp);
|
|
249
249
|
let $title = this.renderTextFromQuillDelta(this.state.title, user);
|
|
250
250
|
let $message = this.renderTextFromQuillDelta(this.state.message, user);
|
|
251
|
+
console.log("DDDDDD", $title, $message);
|
|
251
252
|
if (!lo.size($title) && !lo.size($message)) $time = null;
|
|
252
253
|
return (0, _preact.h)("div", {
|
|
253
254
|
class: animation + ' notif' + ' notif__' + pos,
|
|
@@ -54,6 +54,8 @@ class _default {
|
|
|
54
54
|
_defineProperty(this, "sendTyping", cid => OK200);
|
|
55
55
|
_defineProperty(this, "sendPresence", data => OK200);
|
|
56
56
|
_defineProperty(this, "sendContent", data => OK200);
|
|
57
|
+
_defineProperty(this, "sendLostFocus", data => OK200);
|
|
58
|
+
_defineProperty(this, "sendContentView", data => OK200);
|
|
57
59
|
_defineProperty(this, "uploadToS3", async file => OK200);
|
|
58
60
|
_defineProperty(this, "getChallenge", accid => OK200);
|
|
59
61
|
_defineProperty(this, "time", _ => Promise.resolve({
|
package/package.json
CHANGED
package/src/chatbox/Header.js
CHANGED
|
@@ -40,7 +40,7 @@ export default class Header extends Com {
|
|
|
40
40
|
|
|
41
41
|
renderCollapsedHeader(show) {
|
|
42
42
|
let accSetting = this.props.plugin.chatbox || {}
|
|
43
|
-
let acc = this.props.store.matchAccount()
|
|
43
|
+
let acc = this.props.store.matchAccount() || {}
|
|
44
44
|
let state = acc.is_online ? this.props.t('agent_online') : this.props.t('agent_offline')
|
|
45
45
|
let tagline = sb.get(accSetting, `tagline`, {})
|
|
46
46
|
let desc = this.props.t.i18n(tagline) || accSetting.introduction || state
|
|
@@ -65,7 +65,7 @@ export default class Header extends Com {
|
|
|
65
65
|
|
|
66
66
|
renderSocial(show) {
|
|
67
67
|
let accSetting = this.props.plugin.chatbox || {}
|
|
68
|
-
let acc = this.props.store.matchAccount()
|
|
68
|
+
let acc = this.props.store.matchAccount() || {}
|
|
69
69
|
let links = sb.get(accSetting, 'header.links') || []
|
|
70
70
|
let $links = sb.map(links, (link) => {
|
|
71
71
|
if (!link.url || !link.type || link.type === 'subiz') return null
|
|
@@ -158,10 +158,8 @@ Vui lòng hỏi chúng tôi bất cứ điều gì hoặc chia sẻ phản hồi
|
|
|
158
158
|
|
|
159
159
|
getTitle() {
|
|
160
160
|
let accSetting = this.props.plugin.chatbox || {}
|
|
161
|
-
let acc = this.props.store.matchAccount()
|
|
162
|
-
|
|
161
|
+
let acc = this.props.store.matchAccount() || {}
|
|
163
162
|
let agentsJoined = this.getAgentJoined(this.props.cid)
|
|
164
|
-
|
|
165
163
|
let caption = sb.get(this.props.plugin, 'chatbox.caption', {})
|
|
166
164
|
let title = this.props.t.i18n(caption) || accSetting.title
|
|
167
165
|
return getJoinedNameMember(agentsJoined) || title || acc.name || this.props.t('widget_title')
|
package/src/notif/notif.js
CHANGED
|
@@ -259,6 +259,7 @@ export default class Notif extends Com {
|
|
|
259
259
|
|
|
260
260
|
let $title = this.renderTextFromQuillDelta(this.state.title, user)
|
|
261
261
|
let $message = this.renderTextFromQuillDelta(this.state.message, user)
|
|
262
|
+
console.log("DDDDDD", $title, $message)
|
|
262
263
|
if (!lo.size($title) && !lo.size($message)) $time = null
|
|
263
264
|
|
|
264
265
|
return (
|
package/src/store/api_fake.js
CHANGED