@subiz/widget-v4 4.0.78 → 4.0.79
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/assets/less/message.less +1 -0
- package/compiled_src/chatbox/ButtonAttachments.js +2 -1
- package/compiled_src/chatbox/Event.js +4 -2
- package/compiled_src/chatbox/GenericTemplateAttachments.js +4 -1
- package/package.json +1 -1
- package/src/chatbox/ButtonAttachments.js +1 -1
- package/src/chatbox/Event.js +2 -2
- package/src/chatbox/GenericTemplateAttachments.js +2 -2
package/assets/less/message.less
CHANGED
|
@@ -183,7 +183,8 @@ class Event extends _common.Com {
|
|
|
183
183
|
ev: ev
|
|
184
184
|
}), (0, _preact.h)(_ButtonAttachments.default, {
|
|
185
185
|
store: this.props.store,
|
|
186
|
-
ev: ev
|
|
186
|
+
ev: ev,
|
|
187
|
+
t: this.props.t
|
|
187
188
|
}), (0, _preact.h)(_FormAttachments.default, {
|
|
188
189
|
store: this.props.store,
|
|
189
190
|
onSubmit: this.props.onFormSubmit,
|
|
@@ -273,7 +274,8 @@ class Event extends _common.Com {
|
|
|
273
274
|
ev: ev
|
|
274
275
|
}), (0, _preact.h)(_ButtonAttachments.default, {
|
|
275
276
|
store: this.props.store,
|
|
276
|
-
ev: ev
|
|
277
|
+
ev: ev,
|
|
278
|
+
t: this.props.t
|
|
277
279
|
}), (0, _preact.h)(_FormAttachments.default, {
|
|
278
280
|
store: this.props.store,
|
|
279
281
|
onSubmit: this.props.onFormSubmit,
|
|
@@ -34,7 +34,10 @@ class GenericTemplateAttachments extends _common.Com {
|
|
|
34
34
|
this.setState({
|
|
35
35
|
focusing: eleindex
|
|
36
36
|
});
|
|
37
|
-
this.galleryRef.current.
|
|
37
|
+
this.galleryRef.current.scrollTo({
|
|
38
|
+
left: 220 * eleindex,
|
|
39
|
+
behavior: 'smooth'
|
|
40
|
+
});
|
|
38
41
|
}
|
|
39
42
|
|
|
40
43
|
render() {
|
package/package.json
CHANGED
|
@@ -21,6 +21,6 @@ export default class ButtonAttachments extends Com {
|
|
|
21
21
|
sb.each(sb.get(att, 'buttons') || [], btn => buttons.push(btn))
|
|
22
22
|
})
|
|
23
23
|
|
|
24
|
-
return <Buttons store={this.props.store} buttons={buttons} />
|
|
24
|
+
return <Buttons store={this.props.store} buttons={buttons} t={this.props.t}/>
|
|
25
25
|
}
|
|
26
26
|
}
|
package/src/chatbox/Event.js
CHANGED
|
@@ -130,7 +130,7 @@ export default class Event extends Com {
|
|
|
130
130
|
<AudioAttachments store={this.props.store} ev={ev} />
|
|
131
131
|
<VideoAttachments store={this.props.store} ev={ev} />
|
|
132
132
|
<FileAttachments store={this.props.store} ev={ev} />
|
|
133
|
-
<ButtonAttachments store={this.props.store} ev={ev} />
|
|
133
|
+
<ButtonAttachments store={this.props.store} ev={ev} t={this.props.t}/>
|
|
134
134
|
<FormAttachments
|
|
135
135
|
store={this.props.store}
|
|
136
136
|
onSubmit={this.props.onFormSubmit}
|
|
@@ -182,7 +182,7 @@ export default class Event extends Com {
|
|
|
182
182
|
<AudioAttachments store={this.props.store} ev={ev} />
|
|
183
183
|
<VideoAttachments store={this.props.store} ev={ev} />
|
|
184
184
|
<FileAttachments store={this.props.store} ev={ev} />
|
|
185
|
-
<ButtonAttachments store={this.props.store} ev={ev} />
|
|
185
|
+
<ButtonAttachments store={this.props.store} ev={ev} t={this.props.t}/>
|
|
186
186
|
<FormAttachments store={this.props.store} onSubmit={this.props.onFormSubmit} ref={this.refForm} ev={ev} />
|
|
187
187
|
<ProductAttachments t={this.props.t} store={this.props.store} ev={ev} />
|
|
188
188
|
<FormSubmitAttachments store={this.props.store} ev={ev} />
|
|
@@ -21,8 +21,8 @@ export default class GenericTemplateAttachments extends Com {
|
|
|
21
21
|
|
|
22
22
|
focus(eleindex) {
|
|
23
23
|
this.setState({focusing: eleindex})
|
|
24
|
-
|
|
25
|
-
this.galleryRef.current.scrollLeft =
|
|
24
|
+
this.galleryRef.current.scrollTo({left: 220 * eleindex, behavior: 'smooth'})
|
|
25
|
+
//this.galleryRef.current.scrollLeft = 220 * eleindex - 20
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
render() {
|