@webitel/ui-sdk 24.6.47 → 24.6.49

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "24.6.47",
3
+ "version": "24.6.49",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vite",
@@ -12,7 +12,6 @@ import applyTransform, {
12
12
  notify,
13
13
  sanitize,
14
14
  snakeToCamel,
15
- starToSearch,
16
15
  } from '../../transformers/index.js';
17
16
 
18
17
  const instance = getDefaultInstance();
@@ -45,7 +44,6 @@ const getUsersList = async (params) => {
45
44
 
46
45
  const url = applyTransform(params, [
47
46
  merge(getDefaultGetParams()),
48
- starToSearch('search'),
49
47
  (params) => ({ ...params, q: params.search }),
50
48
  sanitize(fieldsToSend),
51
49
  camelToSnake(),
@@ -20,9 +20,8 @@ const getNotificationSound = (action) => {
20
20
  case ChatActions.Close:
21
21
  return new Audio(endChatSound);
22
22
  case CallActions.Ringing:
23
- const audio = new Audio(ringingSound);
24
- audio.loop = true;
25
- return audio;
23
+ // default call ringtone sound
24
+ return new Audio(ringingSound);
26
25
  case CallActions.Hangup:
27
26
  return new Audio(endCallSound);
28
27
  default:
@@ -127,9 +126,13 @@ export default class NotificationsStoreModule extends BaseStoreModule {
127
126
  return;
128
127
 
129
128
  const audio = sound instanceof Audio ? sound : new Audio(sound);
129
+
130
130
  audio.addEventListener('ended', () => {
131
131
  context.dispatch('STOP_SOUND');
132
132
  }, { once: true });
133
+
134
+ if (action === CallActions.Ringing) audio.loop = true;
135
+
133
136
  audio.play();
134
137
  localStorage.setItem('wtIsPlaying', 'true');
135
138
  context.commit('SET_CURRENTLY_PLAYING', audio);