@webitel/ui-sdk 24.10.9 → 24.10.11
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/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +703 -697
- package/dist/ui-sdk.umd.cjs +2 -2
- package/package.json +1 -1
- package/src/components/wt-filters-panel-wrapper/wt-filters-panel-wrapper.vue +8 -2
- package/src/modules/Notifications/assets/audio/triggerSound.js +23 -0
- package/src/modules/Notifications/store/NotificationsStoreModule.js +2 -2
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
</div>
|
|
9
9
|
<div class="actions-wrap">
|
|
10
10
|
<wt-table-actions
|
|
11
|
-
:icons="
|
|
11
|
+
:icons="tableActionIcons"
|
|
12
12
|
@input="tableActionsHandler"
|
|
13
13
|
/>
|
|
14
14
|
</div>
|
|
@@ -18,6 +18,12 @@
|
|
|
18
18
|
<script>
|
|
19
19
|
export default {
|
|
20
20
|
name: 'FiltersPanelWrapper',
|
|
21
|
+
props: {
|
|
22
|
+
tableActionIcons: {
|
|
23
|
+
type: Array,
|
|
24
|
+
default: () => ['filter-reset', 'settings'],
|
|
25
|
+
},
|
|
26
|
+
},
|
|
21
27
|
data: () => ({
|
|
22
28
|
isOpened: false,
|
|
23
29
|
filtersCount: 0,
|
|
@@ -45,7 +51,7 @@ export default {
|
|
|
45
51
|
</script>
|
|
46
52
|
|
|
47
53
|
<style lang="scss" scoped>
|
|
48
|
-
$actions-width: calc(
|
|
54
|
+
$actions-width: calc((var(--icon-md-size) + var(--table-actions-icon-gap)));
|
|
49
55
|
|
|
50
56
|
.filters-panel-wrapper {
|
|
51
57
|
display: flex;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
function triggerSound(soundVolume = 1.0, soundDuration = 0.2) {
|
|
2
|
+
// Initialize the AudioContext if it hasn't been created yet
|
|
3
|
+
let audioContext;
|
|
4
|
+
if (!audioContext) {
|
|
5
|
+
audioContext = new (window.AudioContext || window.webkitAudioContext)();
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const oscillator = audioContext.createOscillator();
|
|
9
|
+
|
|
10
|
+
oscillator.frequency.setValueAtTime(440, audioContext.currentTime); // Standard A4 note
|
|
11
|
+
|
|
12
|
+
const gainNode = audioContext.createGain();
|
|
13
|
+
gainNode.gain.value = soundVolume; // Set the ringtoneVolume based on the selected value
|
|
14
|
+
|
|
15
|
+
oscillator.connect(gainNode);
|
|
16
|
+
gainNode.connect(audioContext.destination);
|
|
17
|
+
|
|
18
|
+
oscillator.start();
|
|
19
|
+
|
|
20
|
+
oscillator.stop(audioContext.currentTime + soundDuration);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export default triggerSound;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CallActions, ChatActions, JobState } from 'webitel-sdk';
|
|
2
2
|
import i18n from '../../../locale/i18n.js';
|
|
3
3
|
import BaseStoreModule from '../../../store/BaseStoreModules/BaseStoreModule.js';
|
|
4
|
-
import
|
|
4
|
+
import triggerSound from '../assets/audio/triggerSound.js';
|
|
5
5
|
import endChatSound from '../assets/audio/end-chat.wav';
|
|
6
6
|
import newChatSound from '../assets/audio/new-chat.wav';
|
|
7
7
|
import newMessageSound from '../assets/audio/new-message.wav';
|
|
@@ -23,7 +23,7 @@ const getNotificationSound = (action) => {
|
|
|
23
23
|
// default call ringtone sound
|
|
24
24
|
return new Audio(ringingSound);
|
|
25
25
|
case CallActions.Hangup:
|
|
26
|
-
return
|
|
26
|
+
return triggerSound();
|
|
27
27
|
default:
|
|
28
28
|
return false;
|
|
29
29
|
}
|