@webitel/ui-sdk 3.2.125 → 3.2.127

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.
Files changed (56) hide show
  1. package/dist/ui-sdk.common.js +606 -384
  2. package/dist/ui-sdk.common.js.map +1 -1
  3. package/dist/ui-sdk.css +1 -1
  4. package/dist/ui-sdk.umd.js +608 -386
  5. package/dist/ui-sdk.umd.js.map +1 -1
  6. package/dist/ui-sdk.umd.min.js +1 -1
  7. package/dist/ui-sdk.umd.min.js.map +1 -1
  8. package/package.json +2 -1
  9. package/src/components/on-demand/wt-cc-agent-status-timers/__tests__/wt-cc-agent-status-timers.spec.js +25 -0
  10. package/src/components/on-demand/wt-cc-agent-status-timers/wt-cc-agent-status-timers.vue +56 -0
  11. package/src/components/wt-app-header/wt-app-header.vue +4 -1
  12. package/src/components/wt-avatar/wt-avatar.vue +4 -1
  13. package/src/components/wt-badge/wt-badge.vue +4 -1
  14. package/src/components/wt-button/wt-button.vue +4 -1
  15. package/src/components/wt-button-select/wt-button-select.vue +5 -1
  16. package/src/components/wt-checkbox/wt-checkbox.vue +4 -1
  17. package/src/components/wt-chip/wt-chip.vue +1 -1
  18. package/src/components/wt-context-menu/wt-context-menu.vue +4 -1
  19. package/src/components/wt-datepicker/wt-datepicker.vue +4 -1
  20. package/src/components/wt-divider/wt-divider.vue +4 -1
  21. package/src/components/wt-headline/wt-headline.vue +4 -1
  22. package/src/components/wt-headline-nav/wt-headline-nav.vue +4 -1
  23. package/src/components/wt-icon/wt-icon.vue +3 -1
  24. package/src/components/wt-indicator/wt-indicator.vue +4 -1
  25. package/src/components/wt-input/wt-input.vue +4 -1
  26. package/src/components/wt-input-info/wt-input-info.vue +4 -1
  27. package/src/components/wt-label/wt-label.vue +4 -1
  28. package/src/components/wt-load-bar/wt-load-bar.vue +4 -1
  29. package/src/components/wt-loader/wt-loader.vue +4 -1
  30. package/src/components/wt-navigation-bar/wt-navigation-bar.vue +4 -1
  31. package/src/components/wt-notification/wt-notification.vue +4 -1
  32. package/src/components/wt-notifications-bar/wt-notifications-bar.vue +4 -1
  33. package/src/components/wt-page-wrapper/wt-page-wrapper.vue +4 -1
  34. package/src/components/wt-pagination/wt-pagination.vue +4 -1
  35. package/src/components/wt-popup/wt-popup.vue +4 -1
  36. package/src/components/wt-progress-bar/wt-progress-bar.vue +4 -1
  37. package/src/components/wt-rounded-action/wt-rounded-action.vue +4 -1
  38. package/src/components/wt-search-bar/wt-search-bar.vue +4 -1
  39. package/src/components/wt-select/wt-select.vue +4 -1
  40. package/src/components/wt-slider/wt-slider.vue +4 -1
  41. package/src/components/wt-status-select/wt-status-select.vue +4 -1
  42. package/src/components/wt-switcher/wt-switcher.vue +4 -1
  43. package/src/components/wt-table/wt-table.vue +4 -1
  44. package/src/components/wt-table-actions/wt-table-actions.vue +4 -1
  45. package/src/components/wt-tabs/wt-tabs.vue +4 -1
  46. package/src/components/wt-tags-input/wt-tags-input.vue +3 -1
  47. package/src/components/wt-textarea/wt-textarea.vue +4 -1
  48. package/src/components/wt-timepicker/wt-timepicker.vue +4 -1
  49. package/src/components/wt-tooltip/wt-tooltip.vue +4 -1
  50. package/src/composables/useRepresentableAgentPauseCause/__tests__/useRepresentableAgentPauseCause.spec.js +78 -0
  51. package/src/composables/useRepresentableAgentPauseCause/useRepresentableAgentPauseCause.js +36 -0
  52. package/src/locale/en/en.js +7 -0
  53. package/src/locale/ru/ru.js +7 -0
  54. package/src/locale/ua/ua.js +7 -0
  55. package/src/locale/.DS_Store +0 -0
  56. /package/src/{scripts/validators → validators}/domainValidator.js +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "3.2.125",
3
+ "version": "3.2.127",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve-lib": "vue-cli-service serve",
@@ -24,6 +24,7 @@
24
24
  "src/enums/*",
25
25
  "src/mixins/*",
26
26
  "src/scripts/*",
27
+ "src/validators/*",
27
28
  "src/modules/*",
28
29
  "src/plugins/*",
29
30
  "src/store/*",
@@ -0,0 +1,25 @@
1
+ import { shallowMount } from '@vue/test-utils';
2
+ import WtCcAgentStatusTimers from '../wt-cc-agent-status-timers.vue';
3
+
4
+ describe('Wt Cc Agent Status Timers', () => {
5
+ it('renders a component', () => {
6
+ const wrapper = shallowMount(WtCcAgentStatusTimers, {
7
+ props: {
8
+ status: {
9
+ online: 123,
10
+ pause: 123,
11
+ offline: 123,
12
+ },
13
+ },
14
+ });
15
+ expect(wrapper.exists())
16
+ .toBe(true);
17
+ });
18
+ it('renders component with empty status prop', () => {
19
+ const wrapper = shallowMount(WtCcAgentStatusTimers, {
20
+ props: { status: {} },
21
+ });
22
+ expect(wrapper.exists())
23
+ .toBe(true);
24
+ });
25
+ });
@@ -0,0 +1,56 @@
1
+ <template>
2
+ <article class="wt-cc-agent-status-timers">
3
+ <wt-indicator
4
+ color="disabled"
5
+ :text="status.offline"
6
+ :size="size"
7
+ ></wt-indicator>
8
+ <wt-indicator
9
+ color="success"
10
+ :text="status.online"
11
+ :size="size"
12
+ ></wt-indicator>
13
+ <wt-indicator
14
+ color="primary"
15
+ :text="pause"
16
+ :size="size"
17
+ ></wt-indicator>
18
+ </article>
19
+ </template>
20
+
21
+ <script setup>
22
+ import { computed } from 'vue';
23
+
24
+ const props = defineProps({
25
+ /**
26
+ * @description Status object
27
+ * @type {Object}
28
+ * @property {Number} offline
29
+ * @property {Number} online
30
+ * @property {Number} pause
31
+ * @property {Number} allowPause
32
+ */
33
+ status: {
34
+ type: Object,
35
+ required: true,
36
+ },
37
+ size: {
38
+ type: String,
39
+ default: 'md',
40
+ options: ['sm', 'md'],
41
+ },
42
+ });
43
+
44
+ const pause = computed(() => {
45
+ if (!props.status.allowPause) return props.status.pause;
46
+ return `${props.status.pause} / ${props.status.allowPause}`;
47
+ });
48
+ </script>
49
+
50
+ <style lang="scss" scoped>
51
+ .wt-cc-agent-status-timers {
52
+ display: flex;
53
+ align-items: center;
54
+ gap: var(--spacing-sm);
55
+ }
56
+ </style>
@@ -10,8 +10,11 @@ export default {
10
10
  };
11
11
  </script>
12
12
 
13
- <style lang="scss" scoped>
13
+ <style lang="scss">
14
14
  @import './variables.scss';
15
+ </style>
16
+
17
+ <style lang="scss" scoped>
15
18
 
16
19
  .wt-app-header {
17
20
  display: flex;
@@ -102,8 +102,11 @@ const badgeColorVar = computed(() => {
102
102
  });
103
103
  </script>
104
104
 
105
- <style lang="scss" scoped>
105
+ <style lang="scss">
106
106
  @import './variables.scss';
107
+ </style>
108
+
109
+ <style lang="scss" scoped>
107
110
 
108
111
  %wt-avatar-typo-sm {
109
112
  font-size: 12px;
@@ -38,8 +38,11 @@ export default {
38
38
  };
39
39
  </script>
40
40
 
41
- <style lang="scss" scoped>
41
+ <style lang="scss">
42
42
  @import './variables.scss';
43
+ </style>
44
+
45
+ <style lang="scss" scoped>
43
46
 
44
47
  .wt-badge {
45
48
  position: absolute;
@@ -80,8 +80,11 @@ export default {
80
80
  };
81
81
  </script>
82
82
 
83
- <style lang="scss" scoped>
83
+ <style lang="scss">
84
84
  @import './variables.scss';
85
+ </style>
86
+
87
+ <style lang="scss" scoped>
85
88
 
86
89
  .wt-button {
87
90
  @extend %typo-button;
@@ -65,8 +65,12 @@ export default {
65
65
  },
66
66
  };
67
67
  </script>
68
- <style lang="scss" scoped>
68
+
69
+ <style lang="scss">
69
70
  @import './variables.scss';
71
+ </style>
72
+
73
+ <style lang="scss" scoped>
70
74
 
71
75
  .wt-button-select {
72
76
  position: relative;
@@ -98,8 +98,11 @@ export default {
98
98
  };
99
99
  </script>
100
100
 
101
- <style lang="scss" scoped>
101
+ <style lang="scss">
102
102
  @import './variables.scss';
103
+ </style>
104
+
105
+ <style lang="scss" scoped>
103
106
 
104
107
  .wt-checkbox {
105
108
  @include width-fit-content;
@@ -18,7 +18,7 @@ export default {
18
18
  };
19
19
  </script>
20
20
 
21
- <style lang="scss" scoped>
21
+ <style lang="scss">
22
22
  @import './wt-chip.scss';
23
23
  @import './variables.scss';
24
24
  </style>
@@ -73,8 +73,11 @@ function handleOptionClick({ option, index, hide }) {
73
73
 
74
74
  </script>
75
75
 
76
- <style lang="scss" scoped>
76
+ <style lang="scss">
77
77
  @import './variables.scss';
78
+ </style>
79
+
80
+ <style lang="scss" scoped>
78
81
 
79
82
  .wt-context-menu {
80
83
  line-height: 0;
@@ -131,8 +131,11 @@ const datepicker = ref(null); // template ref
131
131
  const isDateTime = props.mode === 'datetime';
132
132
  </script>
133
133
 
134
- <style lang="scss" scoped>
134
+ <style lang="scss">
135
135
  @import './variables.scss';
136
+ </style>
137
+
138
+ <style lang="scss" scoped>
136
139
 
137
140
  .wt-datepicker :deep(.dp__main) {
138
141
  .dp__input_icon {
@@ -8,8 +8,11 @@ export default {
8
8
  };
9
9
  </script>
10
10
 
11
- <style lang="scss" scoped>
11
+ <style lang="scss">
12
12
  @import './variables.scss';
13
+ </style>
14
+
15
+ <style lang="scss" scoped>
13
16
 
14
17
  .wt-divider {
15
18
  display: block;
@@ -20,8 +20,11 @@ export default {
20
20
  };
21
21
  </script>
22
22
 
23
- <style lang="scss" scoped>
23
+ <style lang="scss">
24
24
  @import './variables.scss';
25
+ </style>
26
+
27
+ <style lang="scss" scoped>
25
28
 
26
29
  .wt-headline {
27
30
  display: flex;
@@ -37,8 +37,11 @@ export default {
37
37
  };
38
38
  </script>
39
39
 
40
- <style lang="scss" scoped>
40
+ <style lang="scss">
41
41
  @import './variables.scss';
42
+ </style>
43
+
44
+ <style lang="scss" scoped>
42
45
 
43
46
  .wt-headline-nav {
44
47
  display: flex;
@@ -64,9 +64,11 @@ export default {
64
64
  };
65
65
  </script>
66
66
 
67
- <style lang="scss" scoped>
67
+ <style lang="scss">
68
68
  @import './variables.scss';
69
+ </style>
69
70
 
71
+ <style lang="scss" scoped>
70
72
  .wt-icon {
71
73
  display: inline-flex;
72
74
  justify-content: center;
@@ -44,8 +44,11 @@ export default {
44
44
  };
45
45
  </script>
46
46
 
47
- <style lang="scss" scoped>
47
+ <style lang="scss">
48
48
  @import './variables.scss';
49
+ </style>
50
+
51
+ <style lang="scss" scoped>
49
52
 
50
53
  .wt-indicator {
51
54
  display: flex;
@@ -245,8 +245,11 @@ export default {
245
245
  };
246
246
  </script>
247
247
 
248
- <style lang="scss" scoped>
248
+ <style lang="scss">
249
249
  @import './variables.scss';
250
+ </style>
251
+
252
+ <style lang="scss" scoped>
250
253
 
251
254
  .wt-input {
252
255
  cursor: text;
@@ -21,8 +21,11 @@ export default {
21
21
  };
22
22
  </script>
23
23
 
24
- <style lang="scss" scoped>
24
+ <style lang="scss">
25
25
  @import './variables.scss';
26
+ </style>
27
+
28
+ <style lang="scss" scoped>
26
29
 
27
30
  .wt-input-info {
28
31
  @extend %typo-caption;
@@ -43,8 +43,11 @@ export default {
43
43
  };
44
44
  </script>
45
45
 
46
- <style lang="scss" scoped>
46
+ <style lang="scss">
47
47
  @import './variables.scss';
48
+ </style>
49
+
50
+ <style lang="scss" scoped>
48
51
 
49
52
  .wt-label {
50
53
  @extend %typo-body-1;
@@ -28,8 +28,11 @@ export default {
28
28
  };
29
29
  </script>
30
30
 
31
- <style lang="scss" scoped>
31
+ <style lang="scss">
32
32
  @import './variables.scss';
33
+ </style>
34
+
35
+ <style lang="scss" scoped>
33
36
 
34
37
  .wt-load-bar {
35
38
  position: relative;
@@ -28,7 +28,10 @@ export default {
28
28
  };
29
29
  </script>
30
30
 
31
- <style lang="scss" scoped>
31
+ <style lang="scss">
32
32
  @import './variables.scss';
33
+ </style>
34
+
35
+ <style lang="scss" scoped>
33
36
 
34
37
  </style>
@@ -164,8 +164,11 @@ export default {
164
164
  };
165
165
  </script>
166
166
 
167
- <style lang="scss" scoped>
167
+ <style lang="scss">
168
168
  @import './variables.scss';
169
+ </style>
170
+
171
+ <style lang="scss" scoped>
169
172
 
170
173
  .wt-navigation-bar__menu-btn {
171
174
  display: block;
@@ -50,8 +50,11 @@ export default {
50
50
  };
51
51
  </script>
52
52
 
53
- <style lang="scss" scoped>
53
+ <style lang="scss">
54
54
  @import './variables.scss';
55
+ </style>
56
+
57
+ <style lang="scss" scoped>
55
58
 
56
59
  .wt-notification {
57
60
  @extend %typo-body-1;
@@ -43,8 +43,11 @@ export default {
43
43
  };
44
44
  </script>
45
45
 
46
- <style lang="scss" scoped>
46
+ <style lang="scss">
47
47
  @import './variables.scss';
48
+ </style>
49
+
50
+ <style lang="scss" scoped>
48
51
 
49
52
  .wt-notifications-bar {
50
53
  @extend %wt-scrollbar;
@@ -24,8 +24,11 @@ export default {
24
24
  };
25
25
  </script>
26
26
 
27
- <style lang="scss" scoped>
27
+ <style lang="scss">
28
28
  @import './variables.scss';
29
+ </style>
30
+
31
+ <style lang="scss" scoped>
29
32
 
30
33
  .wt-page-wrapper {
31
34
  display: flex;
@@ -105,8 +105,11 @@ export default {
105
105
  };
106
106
  </script>
107
107
 
108
- <style lang="scss" scoped>
108
+ <style lang="scss">
109
109
  @import './variables.scss';
110
+ </style>
111
+
112
+ <style lang="scss" scoped>
110
113
 
111
114
  .wt-pagination {
112
115
  @extend %typo-body-1;
@@ -55,8 +55,11 @@ export default {
55
55
  };
56
56
  </script>
57
57
 
58
- <style lang="scss" scoped>
58
+ <style lang="scss">
59
59
  @import './variables.scss';
60
+ </style>
61
+
62
+ <style lang="scss" scoped>
60
63
 
61
64
  .wt-popup {
62
65
  position: fixed;
@@ -42,8 +42,11 @@ export default {
42
42
  };
43
43
  </script>
44
44
 
45
- <style lang="scss" scoped>
45
+ <style lang="scss">
46
46
  @import './variables.scss';
47
+ </style>
48
+
49
+ <style lang="scss" scoped>
47
50
 
48
51
  .wt-progress-bar {
49
52
  box-sizing: border-box;
@@ -66,9 +66,12 @@ export default {
66
66
  };
67
67
  </script>
68
68
 
69
+ <style lang="scss">
70
+ @import './variables.scss';
71
+ </style>
72
+
69
73
  <!--not scoped to change .icon colors-->
70
74
  <style lang="scss" scoped>
71
- @import './variables.scss';
72
75
 
73
76
  .wt-button.wt-rounded-action {
74
77
  min-width: auto;
@@ -80,8 +80,11 @@ function handleKeyup(event) {
80
80
  }
81
81
  </script>
82
82
 
83
- <style lang="scss" scoped>
83
+ <style lang="scss">
84
84
  @import './variables.scss';
85
+ </style>
86
+
87
+ <style lang="scss" scoped>
85
88
 
86
89
  .wt-search-bar {
87
90
  cursor: text;
@@ -140,9 +140,12 @@ export default {
140
140
  };
141
141
  </script>
142
142
 
143
- <style lang="scss" scoped>
143
+ <style lang="scss">
144
144
  @import './variables.scss';
145
145
  @import './multiselect.scss';
146
+ </style>
147
+
148
+ <style lang="scss" scoped>
146
149
 
147
150
  .wt-select {
148
151
  width: 100%;
@@ -94,8 +94,11 @@ export default {
94
94
  };
95
95
  </script>
96
96
 
97
- <style lang="scss" scoped>
97
+ <style lang="scss">
98
98
  @import './variables.scss';
99
+ </style>
100
+
101
+ <style lang="scss" scoped>
99
102
 
100
103
  .wt-slider__wrapper {
101
104
  display: flex;
@@ -94,8 +94,11 @@ export default {
94
94
  };
95
95
  </script>
96
96
 
97
- <style lang="scss" scoped>
97
+ <style lang="scss">
98
98
  @import './variables.scss';
99
+ </style>
100
+
101
+ <style lang="scss" scoped>
99
102
 
100
103
  .wt-status-select.wt-select ::v-deep {
101
104
  box-shadow: var(--elevation-5);
@@ -65,8 +65,11 @@ export default {
65
65
  };
66
66
  </script>
67
67
 
68
- <style lang="scss" scoped>
68
+ <style lang="scss">
69
69
  @import './variables.scss';
70
+ </style>
71
+
72
+ <style lang="scss" scoped>
70
73
 
71
74
  .wt-switcher {
72
75
  @include width-fit-content;
@@ -176,8 +176,11 @@ export default {
176
176
  };
177
177
  </script>
178
178
 
179
- <style lang="scss" scoped>
179
+ <style lang="scss">
180
180
  @import './variables.scss';
181
+ </style>
182
+
183
+ <style lang="scss" scoped>
181
184
 
182
185
  .wt-table {
183
186
  overflow: auto;
@@ -95,8 +95,11 @@ export default {
95
95
  };
96
96
  </script>
97
97
 
98
- <style lang="scss" scoped>
98
+ <style lang="scss">
99
99
  @import './variables.scss';
100
+ </style>
101
+
102
+ <style lang="scss" scoped>
100
103
 
101
104
  .wt-table-actions {
102
105
  display: flex;
@@ -69,8 +69,11 @@ export default {
69
69
  };
70
70
  </script>
71
71
 
72
- <style lang="scss" scoped>
72
+ <style lang="scss">
73
73
  @import './variables.scss';
74
+ </style>
75
+
76
+ <style lang="scss" scoped>
74
77
 
75
78
  .wt-tabs {
76
79
  position: relative;
@@ -155,10 +155,12 @@ export default {
155
155
  };
156
156
  </script>
157
157
 
158
- <style lang="scss" scoped>
158
+ <style lang="scss">
159
159
  @import './variables.scss';
160
160
  @import '../wt-select/multiselect.scss';
161
+ </style>
161
162
 
163
+ <style lang="scss" scoped>
162
164
  .wt-tags-input {
163
165
  width: 100%;
164
166
  }
@@ -135,8 +135,11 @@ export default {
135
135
  };
136
136
  </script>
137
137
 
138
- <style lang="scss" scoped>
138
+ <style lang="scss">
139
139
  @import './variables.scss';
140
+ </style>
141
+
142
+ <style lang="scss" scoped>
140
143
 
141
144
  .wt-textarea {
142
145
  cursor: text;
@@ -142,8 +142,11 @@ export default {
142
142
  };
143
143
  </script>
144
144
 
145
- <style lang="scss" scoped>
145
+ <style lang="scss">
146
146
  @import './variables.scss';
147
+ </style>
148
+
149
+ <style lang="scss" scoped>
147
150
 
148
151
  .wt-timepicker {
149
152
  display: flex;
@@ -116,8 +116,11 @@ onMounted(() => {
116
116
  });
117
117
  </script>
118
118
 
119
- <style lang="scss" scoped>
119
+ <style lang="scss">
120
120
  @import './variables.scss';
121
+ </style>
122
+
123
+ <style lang="scss" scoped>
121
124
 
122
125
  .wt-tooltip {
123
126
  display: inline-block;