@webitel/ui-sdk 24.2.8 → 24.2.10
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.mjs +2052 -2038
- package/dist/ui-sdk.umd.js +14 -14
- package/package.json +1 -1
- package/src/components/wt-avatar/_variables.scss +1 -0
- package/src/components/wt-avatar/wt-avatar.vue +13 -2
- package/src/components/wt-badge/wt-badge.vue +8 -1
- package/src/components/wt-select/wt-select.vue +1 -1
- package/src/enums/AbstractUserStatus/AbstractUserStatus.enum.js +7 -5
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<wt-badge
|
|
7
7
|
v-if="badge"
|
|
8
8
|
:color-variable="badgeColorVar"
|
|
9
|
-
:icon-badge="
|
|
9
|
+
:icon-badge="isBadge ? props.status : null"
|
|
10
10
|
/>
|
|
11
11
|
<div
|
|
12
12
|
v-if="isLetterAvatar"
|
|
@@ -84,7 +84,14 @@ const avatarLettersBackground = computed(() => {
|
|
|
84
84
|
|
|
85
85
|
const imgSrc = computed(() => props.src || defaultAvatar);
|
|
86
86
|
|
|
87
|
-
const
|
|
87
|
+
const isBadge = computed(() => {
|
|
88
|
+
const eligibleStatuses = [
|
|
89
|
+
AbstractUserStatus.DND,
|
|
90
|
+
AbstractUserStatus.ONLINE,
|
|
91
|
+
AbstractUserStatus.PAUSE
|
|
92
|
+
];
|
|
93
|
+
return eligibleStatuses.includes(props.status);
|
|
94
|
+
});
|
|
88
95
|
|
|
89
96
|
const badgeColorVar = computed(() => {
|
|
90
97
|
switch (props.status) {
|
|
@@ -96,6 +103,10 @@ const badgeColorVar = computed(() => {
|
|
|
96
103
|
return 'busy-color';
|
|
97
104
|
case AbstractUserStatus.OFFLINE:
|
|
98
105
|
return 'offline-color';
|
|
106
|
+
case AbstractUserStatus.ONLINE:
|
|
107
|
+
return 'online-color';
|
|
108
|
+
case AbstractUserStatus.PAUSE:
|
|
109
|
+
return 'pause-color';
|
|
99
110
|
default:
|
|
100
111
|
return 'offline-color';
|
|
101
112
|
}
|
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
<script>
|
|
10
10
|
import BadgeDnd from '../../assets/icons/badge-dnd.svg';
|
|
11
|
+
import BadgeOnline from '../../assets/icons/badge-online.svg';
|
|
12
|
+
import BadgePause from '../../assets/icons/badge-pause.svg';
|
|
13
|
+
import AbstractUserStatus from '../../enums/AbstractUserStatus/AbstractUserStatus.enum';
|
|
11
14
|
|
|
12
15
|
export default {
|
|
13
16
|
name: 'WtBadge',
|
|
@@ -28,8 +31,12 @@ export default {
|
|
|
28
31
|
computed: {
|
|
29
32
|
showIconBadge() {
|
|
30
33
|
switch (this.iconBadge) {
|
|
31
|
-
case
|
|
34
|
+
case AbstractUserStatus.DND:
|
|
32
35
|
return BadgeDnd;
|
|
36
|
+
case AbstractUserStatus.ONLINE:
|
|
37
|
+
return BadgeOnline;
|
|
38
|
+
case AbstractUserStatus.PAUSE:
|
|
39
|
+
return BadgePause;
|
|
33
40
|
default:
|
|
34
41
|
return null;
|
|
35
42
|
}
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
:disabled="disabled"
|
|
91
91
|
class="multiselect__select multiselect__custom-value-arrow"
|
|
92
92
|
icon="call-merge-filled"
|
|
93
|
-
@
|
|
93
|
+
@click="handleCustomValue(toggle)"
|
|
94
94
|
/>
|
|
95
95
|
<!-- To view a list of possible values, click on this icon -->
|
|
96
96
|
<!-- @mousedown.native.prevent.stop="toggle": https://github.com/shentao/vue-multiselect/issues/1204#issuecomment-615114727 -->
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
const AbstractUserStatus = Object.freeze({
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
ACTIVE: 'active',
|
|
3
|
+
DND: 'dnd',
|
|
4
|
+
BUSY: 'busy',
|
|
5
|
+
OFFLINE: 'offline',
|
|
6
|
+
ONLINE: 'online',
|
|
7
|
+
PAUSE: 'pause',
|
|
8
|
+
});
|
|
7
9
|
|
|
8
10
|
export default AbstractUserStatus;
|