@webitel/ui-sdk 2.1.43 → 2.1.44

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": "2.1.43",
3
+ "version": "2.1.44",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve-lib": "vue-cli-service serve",
@@ -6,6 +6,7 @@
6
6
  <wt-badge
7
7
  v-if="badge"
8
8
  :color-variable="badgeColorVar"
9
+ :icon-badge="isDnd ? 'dnd' : null"
9
10
  ></wt-badge>
10
11
  <img
11
12
  class="wt-avatar__img"
@@ -44,6 +45,9 @@ export default {
44
45
  imgSrc() {
45
46
  return this.src || defaultAvatar;
46
47
  },
48
+ isDnd() {
49
+ return this.status === AbstractUserStatus.DND;
50
+ },
47
51
  badgeColorVar() {
48
52
  switch (this.status) {
49
53
  case AbstractUserStatus.ACTIVE: return 'online-color';
@@ -2,11 +2,13 @@
2
2
  <aside
3
3
  class="wt-badge"
4
4
  :class="{ 'wt-badge--outside': outside }"
5
- :style="{ background: `var(--${colorVariable})` }"
5
+ :style="{ background: iconBadge ? `url(${this.showIconBadge})` : `var(--${colorVariable})` }"
6
6
  ></aside>
7
7
  </template>
8
8
 
9
9
  <script>
10
+ import BadgeDnd from '../../../assets/icons/badge-dnd.svg';
11
+
10
12
  export default {
11
13
  name: 'wt-badge',
12
14
  props: {
@@ -19,6 +21,17 @@ export default {
19
21
  type: Boolean,
20
22
  default: false,
21
23
  },
24
+ iconBadge: {
25
+ type: String,
26
+ },
27
+ },
28
+ computed: {
29
+ showIconBadge() {
30
+ switch (this.iconBadge) {
31
+ case 'dnd': return BadgeDnd;
32
+ default: return null;
33
+ }
34
+ },
22
35
  },
23
36
  };
24
37
  </script>