@subiz/widget-v4 4.1.30 → 4.1.31

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.
@@ -147,6 +147,10 @@
147
147
  white-space: pre-wrap;
148
148
  }
149
149
 
150
+ .message-user.message-user-audio {
151
+ flex: 1;
152
+ }
153
+
150
154
  .message-agent {
151
155
  border-radius: 7px;
152
156
  max-width: 85%;
@@ -34,7 +34,7 @@ class AudioAttachments extends _common.Com {
34
34
  })));
35
35
  });
36
36
  return (0, _preact.h)("div", {
37
- class: `message-${byType}`
37
+ class: `message-${byType} message-${byType}-audio`
38
38
  }, $audios);
39
39
  }
40
40
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@subiz/widget-v4",
3
- "version": "4.1.30",
3
+ "version": "4.1.31",
4
4
  "main": "./compiled_src/lib.js",
5
5
  "scripts": {
6
6
  "dev": "npx webpack serve --config webpack.dev.js",
@@ -1,13 +1,13 @@
1
1
  import sb from '../util/index.js'
2
- import { Com } from '../common.js'
3
- import { h } from 'preact'
2
+ import {Com} from '../common.js'
3
+ import {h} from 'preact'
4
4
 
5
5
  export default class AudioAttachments extends Com {
6
- constructor (props) {
6
+ constructor(props) {
7
7
  super(props)
8
8
  }
9
9
 
10
- render () {
10
+ render() {
11
11
  let byType = sb.get(this.props.ev, 'by.type')
12
12
  var attachments = sb.get(this.props.ev, 'data.message.attachments', [])
13
13
  var audios = []
@@ -20,12 +20,12 @@ export default class AudioAttachments extends Com {
20
20
  var $audios = sb.map(audios, (audio, index) => {
21
21
  return (
22
22
  <div key={index} class={`audio-attachment audio-attachment--${byType}`}>
23
- <audio class="audio-attachment__audio" controls>
23
+ <audio class='audio-attachment__audio' controls>
24
24
  <source src={this.props.store.replaceFileUrl(audio.url)} type={audio.mimetype} />
25
25
  </audio>
26
26
  </div>
27
27
  )
28
28
  })
29
- return <div class={`message-${byType}`}>{$audios}</div>
29
+ return <div class={`message-${byType} message-${byType}-audio`}>{$audios}</div>
30
30
  }
31
31
  }