@webitel/ui-sdk 25.8.40 → 25.8.42

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.
@@ -105,6 +105,8 @@ function setPause() {
105
105
  </script>
106
106
 
107
107
  <style lang="scss" scoped>
108
+ @use '@webitel/styleguide/typography' as *;
109
+
108
110
  .wt-cc-pause-cause-popup-option {
109
111
  display: flex;
110
112
  justify-content: space-between;
@@ -1,30 +1,36 @@
1
- import { CallActions, ChatActions, JobState } from 'webitel-sdk';
1
+ import { CallActions, ChannelState, ChatActions, JobState } from 'webitel-sdk';
2
2
 
3
3
  import i18n from '../../../locale/i18n.js';
4
4
  import BaseStoreModule from '../../../store/BaseStoreModules/BaseStoreModule.js';
5
- import endChatSound from '../assets/audio/end-chat.wav';
6
- import newChatSound from '../assets/audio/new-chat.wav';
7
- import newMessageSound from '../assets/audio/new-message.wav';
5
+ import endChatSound from '../assets/audio/chat-end.wav';
6
+ import newChatSound from '../assets/audio/chat-new.wav';
7
+ import newMessageSound from '../assets/audio/chat-new-message.wav';
8
+ import endCallSound from '../assets/audio/end-call.wav';
8
9
  import ringingSound from '../assets/audio/ringing.mp3';
9
- import triggerSound from '../assets/audio/triggerSound.js';
10
+ import endTask from '../assets/audio/task-end.wav';
11
+ import newTask from '../assets/audio/task-new.wav';
10
12
  import notificationIcon from '../assets/img/notification-icon.png';
11
13
 
12
14
  const NOTIFICATION_VISIBLE_INTERVAL = 2000;
13
15
 
14
16
  const getNotificationSound = (action) => {
15
17
  switch (action) {
16
- case ChatActions.UserInvite:
17
18
  case JobState.Distribute:
18
- return new Audio(newChatSound);
19
+ return new Audio(newTask);
20
+ case JobState.Closed:
21
+ case ChannelState.WrapTime:
22
+ return new Audio(endTask);
19
23
  case ChatActions.Message:
20
24
  return new Audio(newMessageSound);
25
+ case ChatActions.UserInvite:
26
+ return new Audio(newChatSound);
21
27
  case ChatActions.Close:
22
28
  return new Audio(endChatSound);
23
29
  case CallActions.Ringing:
24
30
  // default call ringtone sound
25
31
  return new Audio(ringingSound);
26
32
  case CallActions.Hangup:
27
- return triggerSound();
33
+ return new Audio(endCallSound);
28
34
  default:
29
35
  return false;
30
36
  }
@@ -161,7 +167,7 @@ export default class NotificationsStoreModule extends BaseStoreModule {
161
167
  interval = NOTIFICATION_VISIBLE_INTERVAL,
162
168
  },
163
169
  ) => {
164
- const notification = new Notification(text, { icon });
170
+ const notification = new Notification(text, { icon, silent: true });
165
171
 
166
172
  notification.addEventListener(
167
173
  'click',
@@ -26,9 +26,7 @@ export default {
26
26
  return this.filterSchema?.storedProp;
27
27
  },
28
28
  label() {
29
- return Array.isArray(this.locale.label)
30
- ? this.$tc(...this.locale.label)
31
- : this.$t(this.locale.label);
29
+ return this.$t(this.locale.label);
32
30
  },
33
31
  localizedOptions() {
34
32
  const optsHaveLocale = this.options.length && this.options[0].locale; // just check 1st el
@@ -36,7 +34,7 @@ export default {
36
34
  return this.options.map((opt) => ({
37
35
  ...opt,
38
36
  name: Array.isArray(opt.locale)
39
- ? this.$tc(...opt.locale)
37
+ ? this.$t(...opt.locale)
40
38
  : this.$t(opt.locale),
41
39
  }));
42
40
  }