@subiz/widget-v4 4.1.160 → 4.1.161
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 +20 -1
- package/dist/{1989dc3ac95.app.js → 1989dde475e.app.js} +1 -1
- package/dist/{1989dc3a5f1.chat.html → 1989dde475e.chat.html} +1 -1
- package/dist/{1989dc3ac95.chat.js → 1989dde475e.chat.js} +1 -1
- package/dist/{1989dc3a5f1.form.html → 1989dde475e.form.html} +1 -1
- package/dist/{1989dc3ac95.form.js → 1989dde475e.form.js} +1 -1
- package/dist/{1989dc3a5f1.index.html → 1989dde475e.index.html} +1 -1
- package/dist/{1989dc3a5f1.library.html → 1989dde475e.library.html} +1 -1
- package/dist/{1989dc3a5f1.library.js → 1989dde475e.library.js} +1 -1
- package/dist/{1989dc3a5f1.preview.html → 1989dde475e.preview.html} +1 -1
- package/dist/{1989dc3a5f1.preview.js → 1989dde475e.preview.js} +1 -1
- package/dist/{1989dc3a5f1.webview.js → 1989dde475e.webview.js} +1 -1
- package/dist/HASH +1 -1
- package/package.json +2 -2
- package/src/lib.js +16 -2
- package/src/store/store.js +2 -0
- package/dist/1989dc3a5f1.app.js +0 -1
- package/dist/1989dc3a5f1.chat.js +0 -1
- package/dist/1989dc3a5f1.form.js +0 -1
- package/dist/1989dc3ac95.127.js +0 -1
- package/dist/1989dc3ac95.132.js +0 -1
- package/dist/1989dc3ac95.185.js +0 -1
- package/dist/1989dc3ac95.27.js +0 -1
- package/dist/1989dc3ac95.278.js +0 -1
- package/dist/1989dc3ac95.339.js +0 -1
- package/dist/1989dc3ac95.459.js +0 -1
- package/dist/1989dc3ac95.490.js +0 -1
- package/dist/1989dc3ac95.74.js +0 -1
- package/dist/1989dc3ac95.997.js +0 -1
- package/dist/1989dc3ac95.chat.html +0 -1
- package/dist/1989dc3ac95.form.html +0 -1
- package/dist/1989dc3ac95.index.html +0 -71
- package/dist/1989dc3ac95.library.html +0 -71
- package/dist/1989dc3ac95.library.js +0 -1
- package/dist/1989dc3ac95.preview.html +0 -759
- package/dist/1989dc3ac95.preview.js +0 -1
- package/dist/1989dc3ac95.webview.js +0 -1
- package/malicious-app.js.hash.js +0 -17
- /package/dist/{1989dc3a5f1.127.js → 1989dde475e.127.js} +0 -0
- /package/dist/{1989dc3a5f1.132.js → 1989dde475e.132.js} +0 -0
- /package/dist/{1989dc3a5f1.185.js → 1989dde475e.185.js} +0 -0
- /package/dist/{1989dc3a5f1.27.js → 1989dde475e.27.js} +0 -0
- /package/dist/{1989dc3a5f1.278.js → 1989dde475e.278.js} +0 -0
- /package/dist/{1989dc3a5f1.339.js → 1989dde475e.339.js} +0 -0
- /package/dist/{1989dc3a5f1.459.js → 1989dde475e.459.js} +0 -0
- /package/dist/{1989dc3a5f1.490.js → 1989dde475e.490.js} +0 -0
- /package/dist/{1989dc3a5f1.74.js → 1989dde475e.74.js} +0 -0
- /package/dist/{1989dc3a5f1.997.js → 1989dde475e.997.js} +0 -0
package/dist/HASH
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
1989dde475e
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@subiz/widget-v4",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.161",
|
|
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.3",
|
|
32
32
|
"puppeteer": "^24.16.1",
|
|
33
|
-
"webpack": "^5.101.
|
|
33
|
+
"webpack": "^5.101.1",
|
|
34
34
|
"webpack-bundle-analyzer": "^4.10.2",
|
|
35
35
|
"webpack-cli": "^6.0.1",
|
|
36
36
|
"webpack-dev-server": "^5.2.2"
|
package/src/lib.js
CHANGED
|
@@ -219,8 +219,22 @@ class Widget {
|
|
|
219
219
|
}
|
|
220
220
|
|
|
221
221
|
startConvo(req) {
|
|
222
|
-
|
|
223
|
-
|
|
222
|
+
req = sb.cloneDeep(req) || {}
|
|
223
|
+
if (req.welcome_message) {
|
|
224
|
+
return this.store.startLightConvo(req.bot_id, req.welcome_message, req.locale, req.is_testing, req.bot_version)
|
|
225
|
+
}
|
|
226
|
+
console.log(req)
|
|
227
|
+
let members = req.members || []
|
|
228
|
+
if (req.bot_id) {
|
|
229
|
+
let botid = req.bot_id
|
|
230
|
+
delete req.bot_id
|
|
231
|
+
if (!sb.find(members, (m) => b.id == botid)) {
|
|
232
|
+
members.push({type: 'bot', id: botid, bot_version: req.bot_version})
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
req.members = members
|
|
236
|
+
req.initial_by = this.store.matchUser().id
|
|
237
|
+
return this.store.startConvo(req)
|
|
224
238
|
}
|
|
225
239
|
|
|
226
240
|
async showGreeting() {
|