@webitel/ui-sdk 25.8.41 → 25.8.43

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": "25.8.41",
3
+ "version": "25.8.43",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "make-all": "npm version patch --git-tag-version false && npm run build && (npm run build:types || true) && (npm run lint:fix || true) && npm run publish-lib",
@@ -56,7 +56,7 @@
56
56
  "@vuepic/vue-datepicker": "^4.5.1",
57
57
  "@vueuse/components": "^13.0.0",
58
58
  "@webitel/api-services": "^0.0.33",
59
- "@webitel/styleguide": "^24.12.47",
59
+ "@webitel/styleguide": "^24.12.49",
60
60
  "autosize": "^6.0.1",
61
61
  "axios": "^1.8.3",
62
62
  "clipboard-copy": "^4.0.1",
@@ -82,7 +82,7 @@
82
82
  "vue-multiselect": "^3.1.0",
83
83
  "vue-observe-visibility": "^2.0.0-alpha.1",
84
84
  "vue-router": "^4.5.0",
85
- "webitel-sdk": "^25.5.4",
85
+ "webitel-sdk": "^25.5.6",
86
86
  "xlsx": "0.18.5",
87
87
  "zod": "^3.25.55"
88
88
  },
@@ -1,4 +1,3 @@
1
- <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
2
- <path fill-rule="evenodd" clip-rule="evenodd"
3
- d="M18.1213 7.29289C18.5118 7.68342 18.5118 8.31658 18.1213 8.70711L11.1213 15.7071C10.3403 16.4882 9.07394 16.4882 8.29289 15.7071L5.29289 12.7071C4.90237 12.3166 4.90237 11.6834 5.29289 11.2929C5.68342 10.9024 6.31658 10.9024 6.70711 11.2929L9.35355 13.9393C9.54882 14.1346 9.8654 14.1346 10.0607 13.9393L16.7071 7.29289C17.0976 6.90237 17.7308 6.90237 18.1213 7.29289Z"/>
1
+ <svg width="14" height="14" viewBox="0 0 14 14" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M13.6943 2.31518C14.1019 2.73542 14.1019 3.41676 13.6943 3.837L6.38863 11.3696C5.57348 12.2101 4.25185 12.2101 3.43669 11.3696L0.305684 8.14137C-0.101895 7.72113 -0.101895 7.03978 0.305684 6.61954C0.713262 6.19931 1.37408 6.19931 1.78165 6.61954L4.54367 9.46736C4.74746 9.67748 5.07787 9.67748 5.28166 9.46736L12.2183 2.31518C12.6259 1.89494 13.2867 1.89494 13.6943 2.31518Z" style="fill-opacity:1;"/>
4
3
  </svg>
@@ -8,7 +8,16 @@
8
8
  :disabled="disabled"
9
9
  :value="value"
10
10
  :binary="isSingle"
11
- />
11
+ >
12
+ <template #icon>
13
+ <span class="wt-checkbox__checkmark">
14
+ <wt-icon
15
+ :color="iconColor"
16
+ :icon="checkboxIcon"
17
+ />
18
+ </span>
19
+ </template>
20
+ </p-checkbox>
12
21
  <wt-label
13
22
  v-if="label"
14
23
  :for="checkboxId"
@@ -57,6 +66,16 @@ const isChecked = computed(() => {
57
66
  }
58
67
  return model.value.includes(props.value);
59
68
  });
69
+
70
+ const checkboxIcon = computed(() => {
71
+ return isChecked.value ? 'tick' : '';
72
+ })
73
+
74
+ const iconColor = computed(() => {
75
+ if (props.disabled) return 'disabled';
76
+ if (isChecked.value) return 'active';
77
+ return null;
78
+ })
60
79
  </script>
61
80
 
62
81
  <style lang="scss">
@@ -71,6 +90,10 @@ const isChecked = computed(() => {
71
90
  user-select: none;
72
91
  }
73
92
 
93
+ .wt-checkbox__checkmark {
94
+ display: inline-flex;
95
+ }
96
+
74
97
  .wt-checkbox__label {
75
98
  transition: var(--transition);
76
99
  cursor: pointer;
@@ -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',
@@ -3,6 +3,30 @@ import { CheckboxScheme } from "@webitel/styleguide/component-schemes";
3
3
  const checkbox = {
4
4
  ...CheckboxScheme.sizes,
5
5
  colorScheme: CheckboxScheme.colorScheme,
6
+
7
+ css: ({ dt }) => `
8
+ .p-checkbox-box .wt-icon__icon {
9
+ color: ${dt('checkbox.icon.color')};
10
+ width: ${dt('checkbox.icon.size')};
11
+ height: ${dt('checkbox.icon.size')};
12
+ }
13
+
14
+ .p-checkbox-box .wt-icon--color-active .wt-icon__icon {
15
+ color: ${dt('checkbox.icon.checkedColor')};
16
+ }
17
+
18
+ .p-checkbox-box .wt-icon--color-disabled .wt-icon__icon {
19
+ color: ${dt('checkbox.icon.disabledColor')};
20
+ }
21
+
22
+ .p-checkbox:hover .wt-icon--color-active .wt-icon__icon {
23
+ color: ${dt('checkbox.icon.checkedHoverColor')};
24
+ }
25
+
26
+ .wt-checkbox:has(.wt-label:hover) .wt-icon--color-active .wt-icon__icon {
27
+ color: ${dt('checkbox.icon.checkedHoverColor')};
28
+ }
29
+ `,
6
30
  };
7
31
 
8
32
  export default checkbox;
@@ -9,23 +9,27 @@ declare const model: import("vue").ModelRef<boolean | string[], string, boolean
9
9
  declare const checkboxId: string;
10
10
  declare const isSingle: import("vue").ComputedRef<boolean>;
11
11
  declare const isChecked: import("vue").ComputedRef<any>;
12
+ declare const checkboxIcon: import("vue").ComputedRef<"" | "tick">;
13
+ declare const iconColor: import("vue").ComputedRef<"active" | "disabled">;
12
14
  type __VLS_PublicProps = __VLS_Props & {
13
15
  'selected': boolean | string[];
14
16
  };
15
17
  declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
16
- declare var __VLS_9: {
18
+ declare var __VLS_13: {
17
19
  label: string;
18
20
  isChecked: any;
19
21
  disabled: boolean;
20
22
  };
21
23
  type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
22
- label?: (props: typeof __VLS_9) => any;
24
+ label?: (props: typeof __VLS_13) => any;
23
25
  }>;
24
26
  declare const __VLS_self: import("vue").DefineComponent<__VLS_PublicProps, {
25
27
  model: typeof model;
26
28
  checkboxId: typeof checkboxId;
27
29
  isSingle: typeof isSingle;
28
30
  isChecked: typeof isChecked;
31
+ checkboxIcon: typeof checkboxIcon;
32
+ iconColor: typeof iconColor;
29
33
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
30
34
  "update:selected": (value: boolean | string[]) => any;
31
35
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
@@ -23,13 +23,7 @@ export default class NotificationsStoreModule extends BaseStoreModule {
23
23
  DESTROY: (context: any) => Promise<[PromiseSettledResult<any>, PromiseSettledResult<any>]>;
24
24
  PLAY_SOUND: (context: any, { action, sound, volume }: {
25
25
  action: any;
26
- sound?: boolean | {
27
- play: () => void;
28
- pause: () => void;
29
- addEventListener: (type: any, listener: any) => void;
30
- dispatchEvent: (event: any) => void;
31
- volume: any;
32
- } | HTMLAudioElement;
26
+ sound?: boolean | HTMLAudioElement;
33
27
  volume?: number;
34
28
  }) => Promise<void>;
35
29
  STOP_SOUND: (context: any) => void;
@@ -60,6 +60,9 @@ declare const checkbox: {
60
60
  };
61
61
  };
62
62
  };
63
+ css: ({ dt }: {
64
+ dt: any;
65
+ }) => string;
63
66
  root: {
64
67
  borderRadius: string;
65
68
  width: string;