@subiz/widget-v4 4.1.29 → 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
  }
@@ -247,6 +247,11 @@ class ChatButton extends _common.Com {
247
247
  height: 70px !important;
248
248
  width: 70px !important;
249
249
  background: ${background} !important;
250
+ mask-size: cover !important;
251
+ -webkit-mask-size: cover !important;
252
+ -o-mask-size: cover !important;
253
+ -moz-mask-size: cover !important;
254
+ mask-size: cover !important;
250
255
  `;
251
256
  }
252
257
  if (imgurl && maskurl) {
@@ -257,6 +262,10 @@ class ChatButton extends _common.Com {
257
262
  mask-image: url("${encodeURI(maskurl)}") !important;
258
263
  background-image: url("${encodeURI(imgurl)}") !important;
259
264
  background-repeat: no-repeat !important;
265
+ -webkit-mask-size: cover !important;
266
+ -o-mask-size: cover !important;
267
+ -moz-mask-size: cover !important;
268
+ mask-size: cover !important;
260
269
  `;
261
270
  }
262
271
  if (imgurl && !maskurl) {
@@ -274,6 +283,10 @@ class ChatButton extends _common.Com {
274
283
  height: 70px !important;
275
284
  width: 70px !important;
276
285
  background: ${background} !important;
286
+ -webkit-mask-size: cover !important;
287
+ -o-mask-size: cover !important;
288
+ -moz-mask-size: cover !important;
289
+ mask-size: cover !important;
277
290
  `;
278
291
  }
279
292
  let cls = 'chat-button chat-button--' + position;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@subiz/widget-v4",
3
- "version": "4.1.29",
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
  }
@@ -268,6 +268,11 @@ export default class ChatButton extends Com {
268
268
  height: 70px !important;
269
269
  width: 70px !important;
270
270
  background: ${background} !important;
271
+ mask-size: cover !important;
272
+ -webkit-mask-size: cover !important;
273
+ -o-mask-size: cover !important;
274
+ -moz-mask-size: cover !important;
275
+ mask-size: cover !important;
271
276
  `
272
277
  }
273
278
  if (imgurl && maskurl) {
@@ -278,6 +283,10 @@ export default class ChatButton extends Com {
278
283
  mask-image: url("${encodeURI(maskurl)}") !important;
279
284
  background-image: url("${encodeURI(imgurl)}") !important;
280
285
  background-repeat: no-repeat !important;
286
+ -webkit-mask-size: cover !important;
287
+ -o-mask-size: cover !important;
288
+ -moz-mask-size: cover !important;
289
+ mask-size: cover !important;
281
290
  `
282
291
  }
283
292
 
@@ -297,6 +306,10 @@ export default class ChatButton extends Com {
297
306
  height: 70px !important;
298
307
  width: 70px !important;
299
308
  background: ${background} !important;
309
+ -webkit-mask-size: cover !important;
310
+ -o-mask-size: cover !important;
311
+ -moz-mask-size: cover !important;
312
+ mask-size: cover !important;
300
313
  `
301
314
  }
302
315