@subiz/widget-v4 4.1.170 → 4.1.172
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/chatbox/ChatButton.js +1 -0
- package/compiled_src/chatbox/main.js +13 -3
- package/compiled_src/plugin.js +1 -0
- package/compiled_src/store/store.js +9 -9
- package/dist/{198a92fcacc.app.js → 198b082f7d0.app.js} +1 -1
- package/dist/{198a92fcacc.chat.html → 198b082f7d0.chat.html} +1 -1
- package/dist/{198a92fcacc.chat.js → 198b082f7d0.chat.js} +1 -1
- package/dist/{198a92fcacc.form.html → 198b082f7d0.form.html} +1 -1
- package/dist/{198a92fcacc.form.js → 198b082f7d0.form.js} +1 -1
- package/dist/{198a92fcacc.index.html → 198b082f7d0.index.html} +1 -1
- package/dist/{198a92fcacc.library.html → 198b082f7d0.library.html} +1 -1
- package/dist/{198a92fcacc.library.js → 198b082f7d0.library.js} +1 -1
- package/dist/{198a92fcacc.preview.html → 198b082f7d0.preview.html} +1 -1
- package/dist/{198a92fcacc.preview.js → 198b082f7d0.preview.js} +1 -1
- package/dist/{198a92fcacc.webview.js → 198b082f7d0.webview.js} +1 -1
- package/dist/HASH +1 -1
- package/dist/screenshoot.js +5 -2
- package/package.json +2 -2
- package/src/chatbox/ChatButton.js +3 -0
- package/src/chatbox/main.js +13 -4
- package/src/plugin.js +1 -0
- package/src/store/store.js +11 -12
- /package/dist/{198a92fcacc.127.js → 198b082f7d0.127.js} +0 -0
- /package/dist/{198a92fcacc.132.js → 198b082f7d0.132.js} +0 -0
- /package/dist/{198a92fcacc.185.js → 198b082f7d0.185.js} +0 -0
- /package/dist/{198a92fcacc.27.js → 198b082f7d0.27.js} +0 -0
- /package/dist/{198a92fcacc.278.js → 198b082f7d0.278.js} +0 -0
- /package/dist/{198a92fcacc.339.js → 198b082f7d0.339.js} +0 -0
- /package/dist/{198a92fcacc.459.js → 198b082f7d0.459.js} +0 -0
- /package/dist/{198a92fcacc.490.js → 198b082f7d0.490.js} +0 -0
- /package/dist/{198a92fcacc.74.js → 198b082f7d0.74.js} +0 -0
- /package/dist/{198a92fcacc.997.js → 198b082f7d0.997.js} +0 -0
package/dist/HASH
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
198b082f7d0
|
package/dist/screenshoot.js
CHANGED
|
@@ -11310,6 +11310,7 @@ function Plugin(plugin, store, $container, lib) {
|
|
|
11310
11310
|
var _this = this;
|
|
11311
11311
|
this.getState = () => state;
|
|
11312
11312
|
var run = async function () {
|
|
11313
|
+
if (typeof sbz_info != 'undefined') sbz_info[util/* default */.A.Date.now() + '.run'] = state;
|
|
11313
11314
|
if (_destroy) return;
|
|
11314
11315
|
if (state !== 'hold') return;
|
|
11315
11316
|
if (plugin.type === 'popup' && store.isConverted(plugin.id)) return;
|
|
@@ -11317,6 +11318,7 @@ function Plugin(plugin, store, $container, lib) {
|
|
|
11317
11318
|
if (plugin.type === 'chatbox' || plugin.type === 'notification') lastrun = undefined;
|
|
11318
11319
|
if (!plugin.enabled) return;
|
|
11319
11320
|
let match = util/* default */.A.checkRunConditions(plugin.initiative_frequency, plugin.conditions, lastrun, store);
|
|
11321
|
+
if (typeof sbz_info != 'undefined') sbz_info[util/* default */.A.Date.now() + '.run.match'] = match;
|
|
11320
11322
|
if (!match) return;
|
|
11321
11323
|
state = 'running';
|
|
11322
11324
|
await _this.update(plugin);
|
|
@@ -11504,6 +11506,7 @@ class PluginMgr {
|
|
|
11504
11506
|
});
|
|
11505
11507
|
});
|
|
11506
11508
|
let pluginM = this.lib.store.matchPlugin();
|
|
11509
|
+
if (typeof sbz_info != 'undefined') sbz_info['plugins'] = pluginM;
|
|
11507
11510
|
let foundchatbox = false;
|
|
11508
11511
|
util/* default */.A.each(pluginM, conf => {
|
|
11509
11512
|
if (conf.type === 'chatbox') {
|
|
@@ -11829,14 +11832,14 @@ class lib_Widget {
|
|
|
11829
11832
|
}
|
|
11830
11833
|
async showWidget(view, cid) {
|
|
11831
11834
|
await this.domGate.entry();
|
|
11832
|
-
this.pluginMgr.showCurrentChatbox({
|
|
11835
|
+
return this.pluginMgr.showCurrentChatbox({
|
|
11833
11836
|
view,
|
|
11834
11837
|
cid: cid
|
|
11835
11838
|
});
|
|
11836
11839
|
}
|
|
11837
11840
|
async showTyping() {
|
|
11838
11841
|
await this.domGate.entry();
|
|
11839
|
-
this.pluginMgr.showCurrentChatboxTyping();
|
|
11842
|
+
return this.pluginMgr.showCurrentChatboxTyping();
|
|
11840
11843
|
}
|
|
11841
11844
|
async hideWidget() {
|
|
11842
11845
|
await this.domGate.entry();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@subiz/widget-v4",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.172",
|
|
4
4
|
"main": "./compiled_src/lib.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "npx webpack serve --config webpack.dev.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"babel-plugin-syntax-jsx": "^6.18.0",
|
|
31
31
|
"html-webpack-plugin": "^5.6.4",
|
|
32
32
|
"puppeteer": "^24.16.2",
|
|
33
|
-
"webpack": "^5.101.
|
|
33
|
+
"webpack": "^5.101.2",
|
|
34
34
|
"webpack-bundle-analyzer": "^4.10.2",
|
|
35
35
|
"webpack-cli": "^6.0.1",
|
|
36
36
|
"webpack-dev-server": "^5.2.2"
|
|
@@ -266,6 +266,8 @@ export default class ChatButton extends Com {
|
|
|
266
266
|
}
|
|
267
267
|
|
|
268
268
|
renderButton() {
|
|
269
|
+
if (typeof sbz_info != 'undefined') sbz_info.render_chatbox_button = sb.Date.now()
|
|
270
|
+
|
|
269
271
|
let accountSetting = this.props.plugin.chatbox
|
|
270
272
|
accountSetting = this.fixMissingSetting(accountSetting)
|
|
271
273
|
let imgsrc =
|
|
@@ -369,6 +371,7 @@ export default class ChatButton extends Com {
|
|
|
369
371
|
height: ${imgheight - 4}px !important;
|
|
370
372
|
|
|
371
373
|
`
|
|
374
|
+
|
|
372
375
|
return (
|
|
373
376
|
<div class={cls} onClick={(e) => this.onClick(e)}>
|
|
374
377
|
<div class={whitebgcls} style={whiteBgStyle}></div>
|
package/src/chatbox/main.js
CHANGED
|
@@ -73,10 +73,19 @@ export default class Main extends Com {
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
render() {
|
|
76
|
-
if (!this.state.cssready)
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
if (!this.state.cssready) {
|
|
77
|
+
if (typeof sbz_info != 'undefined') sbz_info.render_chatbox_css_not_ready = sb.Date.now()
|
|
78
|
+
return null
|
|
79
|
+
}
|
|
80
|
+
if (sb.isUserBanned(this.props.store.matchUser())) {
|
|
81
|
+
if (typeof sbz_info != 'undefined') sbz_info.render_chatbox_user_is_banned = sb.Date.now()
|
|
82
|
+
return null
|
|
83
|
+
}
|
|
84
|
+
if (!this.props.t) {
|
|
85
|
+
if (typeof sbz_info != 'undefined') sbz_info.render_chatbox_no_t = sb.Date.now()
|
|
86
|
+
return null
|
|
87
|
+
}
|
|
88
|
+
if (typeof sbz_info != 'undefined') sbz_info.render_chatbox_main = sb.Date.now()
|
|
80
89
|
return (
|
|
81
90
|
<div class={this.props.store.isMobile() ? 'mobile' : 'desktop'}>
|
|
82
91
|
<ChatButton
|
package/src/plugin.js
CHANGED
|
@@ -255,6 +255,7 @@ export default class PluginMgr {
|
|
|
255
255
|
})
|
|
256
256
|
|
|
257
257
|
let pluginM = this.lib.store.matchPlugin()
|
|
258
|
+
if (typeof sbz_info != 'undefined') sbz_info['plugins'] = pluginM
|
|
258
259
|
let foundchatbox = false
|
|
259
260
|
sb.each(pluginM, (conf) => {
|
|
260
261
|
if (conf.type === 'chatbox') {
|
package/src/store/store.js
CHANGED
|
@@ -980,21 +980,20 @@ export default class Store {
|
|
|
980
980
|
this.pubsub.publish('events', oldev)
|
|
981
981
|
}
|
|
982
982
|
|
|
983
|
-
if (ev.type === 'message_sent') {
|
|
984
|
-
let idemkey = sb.get(ev, 'data.message.idempotency_key')
|
|
985
|
-
let found = sb.find(this.listEvents(cid), (oldev) => oldev.id === idemkey)
|
|
986
|
-
if (found) {
|
|
987
|
-
// keeping old created so the ui can be static
|
|
988
|
-
this.chain.del(cid, found.id)
|
|
989
|
-
ev.created = found.created
|
|
990
|
-
}
|
|
991
|
-
|
|
992
|
-
convo.last_message_sent = ev
|
|
993
|
-
}
|
|
994
|
-
|
|
995
983
|
// dont store pong and typing
|
|
996
984
|
if (ev.type !== 'message_pong' && ev.type !== 'conversation_typing') {
|
|
997
985
|
this.chain.put(cid, ev.id, sb.getMs(ev.created), ev)
|
|
986
|
+
if (ev.type === 'message_sent') {
|
|
987
|
+
let idemkey = sb.get(ev, 'data.message.idempotency_key')
|
|
988
|
+
let found = sb.find(this.listEvents(cid), (oldev) => oldev.id === idemkey)
|
|
989
|
+
if (found) {
|
|
990
|
+
// keeping old created so the ui can be static
|
|
991
|
+
this.chain.del(cid, found.id)
|
|
992
|
+
ev.created = found.created
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
convo.last_message_sent = ev
|
|
996
|
+
}
|
|
998
997
|
}
|
|
999
998
|
this._setConvo(convo)
|
|
1000
999
|
this.pubsub.publish('account')
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|