@webitel/ui-sdk 2.0.15 → 2.0.16-3
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/img/sprite/index.js +1 -1
- package/dist/img/sprite/stt-download.svg +4 -0
- package/dist/img/sprite/stt.svg +4 -0
- package/dist/ui-sdk.common.js +96 -9
- package/dist/ui-sdk.common.js.map +1 -1
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.umd.js +96 -9
- package/dist/ui-sdk.umd.js.map +1 -1
- package/dist/ui-sdk.umd.min.js +2 -2
- package/dist/ui-sdk.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/wt-context-menu/wt-context-menu.vue +16 -3
- package/src/components/index.js +2 -0
- package/src/components/organisms/wt-headline-nav/__tests__/wt-headline-nav.spec.js +13 -0
- package/src/components/organisms/wt-headline-nav/wt-headline-nav.vue +85 -0
- package/src/css/components/_components.scss +1 -0
- package/src/css/components/atoms/wt-context-menu/_variables.scss +0 -3
- package/src/css/components/organisms/wt-headline-nav/_variables.scss +5 -0
- package/src/enums/WebitelApplications/AdminSections.enum.js +1 -0
- package/src/locale/en/en.js +8 -0
- package/src/locale/ru/ru.js +8 -0
- package/src/locale/ua/ua.js +8 -0
- package/src/modules/Userinfo/classes/ApplicationsAccess.js +4 -0
package/package.json
CHANGED
|
@@ -7,7 +7,10 @@
|
|
|
7
7
|
>
|
|
8
8
|
<slot name="activator"></slot>
|
|
9
9
|
<template #popper="{ hide }">
|
|
10
|
-
<ul
|
|
10
|
+
<ul
|
|
11
|
+
class="wt-context-menu__menu"
|
|
12
|
+
:style="`width: ${width}; min-width: ${minWidth}; max-width: ${maxWidth};`"
|
|
13
|
+
>
|
|
11
14
|
<li
|
|
12
15
|
class="wt-context-menu__option-wrapper"
|
|
13
16
|
v-for="(option, index) in options"
|
|
@@ -42,6 +45,18 @@ export default {
|
|
|
42
45
|
type: Boolean,
|
|
43
46
|
default: false,
|
|
44
47
|
},
|
|
48
|
+
width: {
|
|
49
|
+
type: [String],
|
|
50
|
+
default: 'auto',
|
|
51
|
+
},
|
|
52
|
+
minWidth: {
|
|
53
|
+
type: [String],
|
|
54
|
+
default: '160px',
|
|
55
|
+
},
|
|
56
|
+
maxWidth: {
|
|
57
|
+
type: [String],
|
|
58
|
+
default: '300px',
|
|
59
|
+
},
|
|
45
60
|
},
|
|
46
61
|
methods: {
|
|
47
62
|
handleOptionClick({ option, index, hide }) {
|
|
@@ -59,8 +74,6 @@ export default {
|
|
|
59
74
|
|
|
60
75
|
.wt-context-menu__menu {
|
|
61
76
|
@extend %typo-body-2;
|
|
62
|
-
min-width: var(--context-menu-min-width);
|
|
63
|
-
max-width: var(--context-menu-max-width);
|
|
64
77
|
background-color: var(--context-menu-background-color);
|
|
65
78
|
border-radius: var(--border-radius);
|
|
66
79
|
box-shadow: var(--box-shadow);
|
package/src/components/index.js
CHANGED
|
@@ -40,6 +40,7 @@ import WtFiltersPanelWrapper from './organisms/wt-filters-panel-wrapper/wt-filte
|
|
|
40
40
|
import WtHeaderActions from './organisms/wt-app-header/wt-header-actions.vue';
|
|
41
41
|
import WtErrorPage from './organisms/wt-error-page/wt-error-page.vue';
|
|
42
42
|
import WtHeadline from './organisms/wt-headline/wt-headline.vue';
|
|
43
|
+
import WtHeadlineNav from './organisms/wt-headline-nav/wt-headline-nav.vue';
|
|
43
44
|
import WtNavigationBar from './organisms/wt-navigation-bar/wt-navigation-bar.vue';
|
|
44
45
|
import WtNotificationsBar from './organisms/wt-notifications-bar/wt-notifications-bar.vue';
|
|
45
46
|
import WtPageWrapper from './organisms/wt-page-wrapper/wt-page-wrapper.vue';
|
|
@@ -84,6 +85,7 @@ const Components = {
|
|
|
84
85
|
WtTextarea,
|
|
85
86
|
WtAppHeader,
|
|
86
87
|
WtHeadline,
|
|
88
|
+
WtHeadlineNav,
|
|
87
89
|
WtNavigationBar,
|
|
88
90
|
WtAppNavigator,
|
|
89
91
|
WtFiltersPanelWrapper,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import WtHeadlineNav from '../wt-headline-nav.vue';
|
|
3
|
+
|
|
4
|
+
describe('WtHeadlineNav', () => {
|
|
5
|
+
it('renders a component', () => {
|
|
6
|
+
const wrapper = shallowMount(WtHeadlineNav, {
|
|
7
|
+
propsData: {
|
|
8
|
+
path: [],
|
|
9
|
+
},
|
|
10
|
+
});
|
|
11
|
+
expect(wrapper.isVisible()).toBe(true);
|
|
12
|
+
});
|
|
13
|
+
});
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<nav class="wt-headline-nav">
|
|
3
|
+
<div
|
|
4
|
+
class="wt-headline-nav__wrapper"
|
|
5
|
+
v-for="(singlePath, key) of path"
|
|
6
|
+
:key="key"
|
|
7
|
+
>
|
|
8
|
+
<span v-if="key !== 0" class="wt-headline-nav__indicator"></span>
|
|
9
|
+
<h1 class="wt-headline-nav__title">
|
|
10
|
+
<router-link
|
|
11
|
+
v-if="singlePath.route"
|
|
12
|
+
class="wt-headline-nav__text wt-headline-nav__title-link"
|
|
13
|
+
:to="singlePath.route"
|
|
14
|
+
>{{ singlePath.name }}
|
|
15
|
+
</router-link>
|
|
16
|
+
<span v-else class="wt-headline-nav__text">{{ singlePath.name }}</span>
|
|
17
|
+
</h1>
|
|
18
|
+
</div>
|
|
19
|
+
</nav>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script>
|
|
23
|
+
export default {
|
|
24
|
+
name: 'wt-headline-nav',
|
|
25
|
+
props: {
|
|
26
|
+
path: {
|
|
27
|
+
type: Array,
|
|
28
|
+
required: true,
|
|
29
|
+
// PATH EXAMPLE
|
|
30
|
+
// default: () => [
|
|
31
|
+
// { name: 'directory' },
|
|
32
|
+
// { name: 'users', route: '/directory/users' },
|
|
33
|
+
// { name: 'adm', route: '/directory/users/3' },
|
|
34
|
+
// ],
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<style lang="scss" scoped>
|
|
41
|
+
.wt-headline-nav {
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.wt-headline-nav__wrapper {
|
|
47
|
+
display: flex;
|
|
48
|
+
align-items: center;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.wt-headline-nav__indicator {
|
|
52
|
+
display: inline-block;
|
|
53
|
+
width: var(--headline-nav-indicator-size);
|
|
54
|
+
height: var(--headline-nav-indicator-size);
|
|
55
|
+
margin: 0 var(--headline-nav-indicator-margin);
|
|
56
|
+
background: var(--icon-color);
|
|
57
|
+
border-radius: 50%;
|
|
58
|
+
flex-shrink: 0;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.wt-headline-nav__title {
|
|
62
|
+
@extend %typo-subtitle-1;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.wt-headline-nav__text {
|
|
66
|
+
color: var(--text-outline-color);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.wt-headline-nav__wrapper:last-child {
|
|
70
|
+
min-width: 0;
|
|
71
|
+
|
|
72
|
+
.wt-headline-nav__indicator {
|
|
73
|
+
background: var(--icon-color-accent);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.wt-headline-nav__title {
|
|
77
|
+
overflow: hidden;
|
|
78
|
+
text-overflow: ellipsis;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.wt-headline-nav__text {
|
|
82
|
+
color: var(--text-primary-color);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
</style>
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
@import "molecules/wt-button-select/variables";
|
|
33
33
|
|
|
34
34
|
@import "organisms/wt-headline/variables";
|
|
35
|
+
@import "organisms/wt-headline-nav/variables";
|
|
35
36
|
@import "organisms/wt-app-header/variables";
|
|
36
37
|
@import "organisms/wt-navigation-bar/variables";
|
|
37
38
|
@import "organisms/wt-notifications-bar/variables";
|
|
@@ -34,6 +34,7 @@ const AdminSections = Object.freeze({
|
|
|
34
34
|
// INTEGRATIONS
|
|
35
35
|
STORAGE: 'storage', // scope: storage_profile
|
|
36
36
|
COGNITIVE_PROFILES: 'cognitive-profiles', // scope: cognitive_profile
|
|
37
|
+
EMAIL_PROFILES: 'email-profiles', // scope: email_profile
|
|
37
38
|
|
|
38
39
|
// PERMISSIONS
|
|
39
40
|
OBJECTS: 'objects', // permissions: add
|
package/src/locale/en/en.js
CHANGED
|
@@ -45,6 +45,13 @@ export default {
|
|
|
45
45
|
voice: 'Voice',
|
|
46
46
|
format: 'Format',
|
|
47
47
|
text: 'Text',
|
|
48
|
+
yes: 'Yes',
|
|
49
|
+
no: 'No',
|
|
50
|
+
description: 'Description',
|
|
51
|
+
login: 'Login',
|
|
52
|
+
host: 'Host',
|
|
53
|
+
time: 'Time',
|
|
54
|
+
channel: 'Channel',
|
|
48
55
|
},
|
|
49
56
|
// date-related texts
|
|
50
57
|
date: {
|
|
@@ -144,6 +151,7 @@ export default {
|
|
|
144
151
|
[AdminSections.QUEUES]: 'Queues',
|
|
145
152
|
[AdminSections.STORAGE]: 'Storage',
|
|
146
153
|
[AdminSections.COGNITIVE_PROFILES]: 'Cognitive profiles',
|
|
154
|
+
[AdminSections.EMAIL_PROFILES]: 'Email profiles',
|
|
147
155
|
[AdminSections.MEDIA]: 'Media',
|
|
148
156
|
[AdminSections.BLACKLIST]: 'Call lists',
|
|
149
157
|
[AdminSections.ROLES]: 'Roles',
|
package/src/locale/ru/ru.js
CHANGED
|
@@ -44,6 +44,13 @@ export default {
|
|
|
44
44
|
voice: 'Голос',
|
|
45
45
|
format: 'Формат',
|
|
46
46
|
text: 'Текст',
|
|
47
|
+
yes: 'Да',
|
|
48
|
+
no: 'Нет',
|
|
49
|
+
description: 'Описание',
|
|
50
|
+
login: 'Логин',
|
|
51
|
+
host: 'Хост',
|
|
52
|
+
time: 'Время',
|
|
53
|
+
channel: 'Канал',
|
|
47
54
|
},
|
|
48
55
|
// date-related texts
|
|
49
56
|
date: {
|
|
@@ -143,6 +150,7 @@ export default {
|
|
|
143
150
|
[AdminSections.QUEUES]: 'Очереди',
|
|
144
151
|
[AdminSections.STORAGE]: 'Хранилища',
|
|
145
152
|
[AdminSections.COGNITIVE_PROFILES]: 'Языковые профили',
|
|
153
|
+
[AdminSections.EMAIL_PROFILES]: 'Email профили',
|
|
146
154
|
[AdminSections.ROLES]: 'Роли',
|
|
147
155
|
[AdminSections.OBJECTS]: 'Разделы',
|
|
148
156
|
},
|
package/src/locale/ua/ua.js
CHANGED
|
@@ -44,6 +44,13 @@ export default {
|
|
|
44
44
|
voice: 'Голос',
|
|
45
45
|
format: 'Формат',
|
|
46
46
|
text: 'Текст',
|
|
47
|
+
yes: 'Так',
|
|
48
|
+
no: 'Ні',
|
|
49
|
+
description: 'Опис',
|
|
50
|
+
login: 'Логін',
|
|
51
|
+
host: 'Хост',
|
|
52
|
+
time: 'Час',
|
|
53
|
+
channel: 'Канал',
|
|
47
54
|
},
|
|
48
55
|
// date-related texts
|
|
49
56
|
date: {
|
|
@@ -143,6 +150,7 @@ export default {
|
|
|
143
150
|
[AdminSections.QUEUES]: 'Черги',
|
|
144
151
|
[AdminSections.STORAGE]: 'Сховища',
|
|
145
152
|
[AdminSections.COGNITIVE_PROFILES]: 'Мовні профілі',
|
|
153
|
+
[AdminSections.EMAIL_PROFILES]: 'Email профілі',
|
|
146
154
|
[AdminSections.ROLES]: 'Ролі',
|
|
147
155
|
[AdminSections.OBJECTS]: 'Розділи',
|
|
148
156
|
},
|
|
@@ -128,6 +128,10 @@ const applicationsAccess = (value = true) => ({
|
|
|
128
128
|
_enabled: value,
|
|
129
129
|
_locale: `WebitelApplications.${WebitelApplications.ADMIN}.sections.${AdminSections.COGNITIVE_PROFILES}`,
|
|
130
130
|
},
|
|
131
|
+
[AdminSections.EMAIL_PROFILES]: {
|
|
132
|
+
_enabled: value,
|
|
133
|
+
_locale: `WebitelApplications.${WebitelApplications.ADMIN}.sections.${AdminSections.EMAIL_PROFILES}`,
|
|
134
|
+
},
|
|
131
135
|
[AdminSections.ROLES]: {
|
|
132
136
|
_enabled: value,
|
|
133
137
|
_locale: `WebitelApplications.${WebitelApplications.ADMIN}.sections.${AdminSections.ROLES}`,
|