@subiz/widget-v4 4.1.145 → 4.1.146
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/compiled_src/lib.js +1 -0
- package/dist/.HASH +1 -0
- package/dist/185.js +20 -78
- package/dist/1970d063f3c.app.js +1 -0
- package/dist/{196d399136f.form.html → 1970d063f3c.form.html} +1 -1
- package/dist/1970d063f3c.form.js +1 -0
- package/dist/{196d399136f.index.html → 1970d063f3c.index.html} +1 -1
- package/dist/{196d399136f.library.html → 1970d063f3c.library.html} +1 -1
- package/dist/{196d399136f.library.js → 1970d063f3c.library.js} +1 -1
- package/dist/{196d399136f.preview.html → 1970d063f3c.preview.html} +1 -1
- package/dist/{196d399136f.preview.js → 1970d063f3c.preview.js} +1 -1
- package/dist/1970d063f3c.webview.js +1 -0
- package/dist/screenshoot.js +43 -24
- package/package.json +1 -1
- package/src/lib.js +1 -0
- package/dist/196d399136f.app.js +0 -1
- package/dist/196d399136f.form.js +0 -1
- package/dist/196d399136f.webview.js +0 -1
- package/dist/HASH +0 -1
- /package/dist/{196d399136f.127.js → 1970d063f3c.127.js} +0 -0
- /package/dist/{196d399136f.132.js → 1970d063f3c.132.js} +0 -0
- /package/dist/{196d399136f.185.js → 1970d063f3c.185.js} +0 -0
- /package/dist/{196d399136f.27.js → 1970d063f3c.27.js} +0 -0
- /package/dist/{196d399136f.278.js → 1970d063f3c.278.js} +0 -0
- /package/dist/{196d399136f.339.js → 1970d063f3c.339.js} +0 -0
- /package/dist/{196d399136f.459.js → 1970d063f3c.459.js} +0 -0
- /package/dist/{196d399136f.490.js → 1970d063f3c.490.js} +0 -0
- /package/dist/{196d399136f.74.js → 1970d063f3c.74.js} +0 -0
- /package/dist/{196d399136f.997.js → 1970d063f3c.997.js} +0 -0
package/dist/screenshoot.js
CHANGED
|
@@ -5408,11 +5408,16 @@ class Store {
|
|
|
5408
5408
|
ev.created = util/* default */.A.getMs(ev.created);
|
|
5409
5409
|
if (ev.type === 'user_info_updated') {
|
|
5410
5410
|
return;
|
|
5411
|
-
|
|
5412
|
-
|
|
5413
|
-
|
|
5414
|
-
|
|
5415
|
-
|
|
5411
|
+
// removed by dead control flow
|
|
5412
|
+
{}
|
|
5413
|
+
// removed by dead control flow
|
|
5414
|
+
{}
|
|
5415
|
+
// removed by dead control flow
|
|
5416
|
+
{}
|
|
5417
|
+
// removed by dead control flow
|
|
5418
|
+
{}
|
|
5419
|
+
// removed by dead control flow
|
|
5420
|
+
{}
|
|
5416
5421
|
}
|
|
5417
5422
|
let user = this.cache.match('user') || {};
|
|
5418
5423
|
let cid = util/* default */.A.convoOfEv(ev);
|
|
@@ -6535,6 +6540,9 @@ function AgentsAvatar(props) {
|
|
|
6535
6540
|
})));
|
|
6536
6541
|
}
|
|
6537
6542
|
;// ./src/chatbox/Header.js
|
|
6543
|
+
function Header_defineProperty(e, r, t) { return (r = Header_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
6544
|
+
function Header_toPropertyKey(t) { var i = Header_toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
6545
|
+
function Header_toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6538
6546
|
|
|
6539
6547
|
|
|
6540
6548
|
|
|
@@ -6543,6 +6551,19 @@ function AgentsAvatar(props) {
|
|
|
6543
6551
|
class Header extends common/* Com */.Mw {
|
|
6544
6552
|
constructor(props) {
|
|
6545
6553
|
super(props);
|
|
6554
|
+
Header_defineProperty(this, "renderAgentAvatar", () => {
|
|
6555
|
+
let accSetting = this.props.plugin.chatbox || {};
|
|
6556
|
+
let agids = util/* default */.A.get(accSetting, 'header.agent_ids') || [];
|
|
6557
|
+
let agent = util/* default */.A.get(this.props.store.matchAgent(agids[0]));
|
|
6558
|
+
let logoUrl = util/* default */.A.get(agent, 'avatar_url_128') || util/* default */.A.get(agent, 'avatar_url');
|
|
6559
|
+
if (!logoUrl) return;
|
|
6560
|
+
return (0,preact_module.h)("img", {
|
|
6561
|
+
width: 38,
|
|
6562
|
+
height: 38,
|
|
6563
|
+
class: "avatar avatar__account",
|
|
6564
|
+
src: this.props.store.replaceFileUrl(logoUrl) || __webpack_require__(3582)
|
|
6565
|
+
});
|
|
6566
|
+
});
|
|
6546
6567
|
}
|
|
6547
6568
|
renderAccountAvatar() {
|
|
6548
6569
|
let acc = this.props.store.matchAccount() || {};
|
|
@@ -6587,10 +6608,11 @@ class Header extends common/* Com */.Mw {
|
|
|
6587
6608
|
let $back = null;
|
|
6588
6609
|
let style = '';
|
|
6589
6610
|
if (!classic) $back = this.renderBackButton();else style = 'padding-bottom: 75px !important;';
|
|
6611
|
+
let layout = util/* default */.A.get(accSetting, 'header.layout');
|
|
6590
6612
|
return (0,preact_module.h)("div", {
|
|
6591
6613
|
class: cls,
|
|
6592
6614
|
style: style
|
|
6593
|
-
}, $back, this.renderAccountAvatar(), (0,preact_module.h)("div", {
|
|
6615
|
+
}, $back, layout === 'agent' ? this.renderAgentAvatar() : this.renderAccountAvatar(), (0,preact_module.h)("div", {
|
|
6594
6616
|
class: "widget-header--title-container"
|
|
6595
6617
|
}, (0,preact_module.h)("div", {
|
|
6596
6618
|
class: "widget-header--title"
|
|
@@ -7980,18 +8002,16 @@ class FormSubmitAttachments extends common/* Com */.Mw {
|
|
|
7980
8002
|
}
|
|
7981
8003
|
render() {
|
|
7982
8004
|
return null;
|
|
7983
|
-
|
|
7984
|
-
|
|
7985
|
-
|
|
7986
|
-
|
|
7987
|
-
|
|
7988
|
-
|
|
7989
|
-
|
|
7990
|
-
|
|
7991
|
-
|
|
7992
|
-
|
|
7993
|
-
}, h("span", null, this.props.tt('prechat_form_thanks'))));
|
|
7994
|
-
return h("div", null, $submits);
|
|
8005
|
+
// removed by dead control flow
|
|
8006
|
+
{}
|
|
8007
|
+
// removed by dead control flow
|
|
8008
|
+
{}
|
|
8009
|
+
// removed by dead control flow
|
|
8010
|
+
{}
|
|
8011
|
+
// removed by dead control flow
|
|
8012
|
+
{}
|
|
8013
|
+
// removed by dead control flow
|
|
8014
|
+
{}
|
|
7995
8015
|
}
|
|
7996
8016
|
}
|
|
7997
8017
|
;// ./src/chatbox/touchscroll.js
|
|
@@ -8265,12 +8285,10 @@ var chatbox_time = __webpack_require__(1620);
|
|
|
8265
8285
|
class TextMessage extends common/* Com */.Mw {
|
|
8266
8286
|
renderTime() {
|
|
8267
8287
|
return null;
|
|
8268
|
-
|
|
8269
|
-
|
|
8270
|
-
|
|
8271
|
-
|
|
8272
|
-
t: this.props.t
|
|
8273
|
-
}));
|
|
8288
|
+
// removed by dead control flow
|
|
8289
|
+
{}
|
|
8290
|
+
// removed by dead control flow
|
|
8291
|
+
{}
|
|
8274
8292
|
}
|
|
8275
8293
|
render() {
|
|
8276
8294
|
var format = util/* default */.A.get(this.props.ev, 'data.message.format', 'plaintext');
|
|
@@ -11336,6 +11354,7 @@ class lib_Widget {
|
|
|
11336
11354
|
return outmask;
|
|
11337
11355
|
}
|
|
11338
11356
|
async setAccount(id, $container, mask, cb) {
|
|
11357
|
+
if (!id) return;
|
|
11339
11358
|
let outmask = await this.store.init(id, mask);
|
|
11340
11359
|
util/* default */.A.setTimeout(() => window.postMessage({
|
|
11341
11360
|
type: 'widget_loaded',
|
package/package.json
CHANGED
package/src/lib.js
CHANGED
|
@@ -114,6 +114,7 @@ class Widget {
|
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
async setAccount(id, $container, mask, cb) {
|
|
117
|
+
if (!id) return // do nothing
|
|
117
118
|
let outmask = await this.store.init(id, mask)
|
|
118
119
|
sb.setTimeout(() => window.postMessage({type: 'widget_loaded', account_id: id}, '*'), 0) // send to chrome extension
|
|
119
120
|
// add container to client site
|