@subiz/widget-v4 4.0.67 → 4.0.68
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 +18 -4
- package/compiled_src/store/store.js +1 -0
- package/dist/{17ff367201e.132.js → 1801c652a77.132.js} +0 -0
- package/dist/{17ff367201e.178.js → 1801c652a77.178.js} +0 -0
- package/dist/{17ff367201e.213.js → 1801c652a77.213.js} +0 -0
- package/dist/{17ff367201e.335.js → 1801c652a77.335.js} +0 -0
- package/dist/{17ff367201e.362.js → 1801c652a77.362.js} +0 -0
- package/dist/{17ff367201e.441.js → 1801c652a77.441.js} +0 -0
- package/dist/{17ff367201e.605.js → 1801c652a77.605.js} +0 -0
- package/dist/{17ff367201e.678.js → 1801c652a77.678.js} +0 -0
- package/dist/{17ff367201e.782.js → 1801c652a77.782.js} +0 -0
- package/dist/{17ff367201e.app.js → 1801c652a77.app.js} +1 -1
- package/dist/{17ff367201e.index.html → 1801c652a77.index.html} +1 -1
- package/dist/{17ff367201e.library.html → 1801c652a77.library.html} +1 -1
- package/dist/{17ff367201e.library.js → 1801c652a77.library.js} +1 -1
- package/dist/{17ff367201e.preview.html → 1801c652a77.preview.html} +1 -1
- package/dist/{17ff367201e.preview.js → 1801c652a77.preview.js} +1 -1
- package/dist/{17ff367201e.screenshoot.js → 1801c652a77.screenshoot.js} +1 -1
- package/dist/HASH +1 -1
- package/dist/screenshoot.html +1 -1
- package/dist/screenshoot.js +19 -4
- package/package.json +1 -1
- package/src/lib.js +13 -4
- package/src/store/store.js +1 -0
package/compiled_src/lib.js
CHANGED
|
@@ -24,7 +24,7 @@ _index.default.preloadWebfonts(['Roboto'], [400, 500]);
|
|
|
24
24
|
|
|
25
25
|
class Widget {
|
|
26
26
|
constructor(ApiURL, FileURL, RealtimeURL, inmem, fake, agenttoken) {
|
|
27
|
-
_defineProperty(this, "version", () => '4.
|
|
27
|
+
_defineProperty(this, "version", () => '4.5');
|
|
28
28
|
|
|
29
29
|
_defineProperty(this, "setSetting", setting => this.store.setSetting({
|
|
30
30
|
account_setting: setting
|
|
@@ -108,7 +108,21 @@ class Widget {
|
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
async sendMessage(convoid, message) {
|
|
111
|
-
|
|
111
|
+
if (!convoid) {
|
|
112
|
+
const {
|
|
113
|
+
convo,
|
|
114
|
+
error
|
|
115
|
+
} = await this.store.startConvo({
|
|
116
|
+
message: message.text,
|
|
117
|
+
initial_by: this.store.matchUser().id
|
|
118
|
+
});
|
|
119
|
+
if (error) return {
|
|
120
|
+
error
|
|
121
|
+
};
|
|
122
|
+
convoid = convo.id;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
return this.store.sendConvoEvent(convoid, 'message_sent', {
|
|
112
126
|
message
|
|
113
127
|
});
|
|
114
128
|
}
|
|
@@ -127,11 +141,11 @@ class Widget {
|
|
|
127
141
|
this.pluginMgr.hideCurrentGreeting();
|
|
128
142
|
}
|
|
129
143
|
|
|
130
|
-
async showWidget(view,
|
|
144
|
+
async showWidget(view, cid) {
|
|
131
145
|
await this.domGate.entry();
|
|
132
146
|
this.pluginMgr.showCurrentChatbox({
|
|
133
147
|
view,
|
|
134
|
-
cid:
|
|
148
|
+
cid: cid
|
|
135
149
|
});
|
|
136
150
|
}
|
|
137
151
|
|
|
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
|