@webitel/ui-sdk 2.0.14 → 2.0.15-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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "2.0.14",
3
+ "version": "2.0.15-3",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve-lib": "vue-cli-service serve",
@@ -19,7 +19,9 @@
19
19
  href="#"
20
20
  @click.prevent="handleOptionClick({ option, index, hide })"
21
21
  >
22
- {{ option.text || option }}
22
+ <slot name="option" v-bind="option">
23
+ {{ option.text || option }}
24
+ </slot>
23
25
  </a>
24
26
  </li>
25
27
  </ul>
@@ -24,7 +24,7 @@ export default {
24
24
  color: {
25
25
  type: String,
26
26
  default: 'secondary',
27
- options: ['primary', 'secondary', 'disabled', 'success', 'danger', 'transfer', 'break-out'],
27
+ options: ['primary', 'secondary', 'accent', 'disabled', 'success', 'danger', 'transfer', 'break-out', 'job'],
28
28
  },
29
29
  text: {
30
30
  type: [String, Number],
@@ -62,7 +62,8 @@ export default {
62
62
  background: var(--indicator-disabled-color);
63
63
  border-radius: 50%;
64
64
 
65
- &--primary {
65
+ &--primary,
66
+ &--accent {
66
67
  background: var(--indicator-primary-color);
67
68
  }
68
69
 
@@ -89,6 +90,10 @@ export default {
89
90
  &--break-out {
90
91
  background: var(--indicator-break-out-color);
91
92
  }
93
+
94
+ &--job {
95
+ background: var(--job-color);
96
+ }
92
97
  }
93
98
 
94
99
  .wt-indicator--size {
@@ -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,
@@ -91,7 +91,6 @@ export default {
91
91
  return this.user.name || this.user.username;
92
92
  },
93
93
  userAccount() {
94
- console.info(this.user, this.user.preferredUsername);
95
94
  return this.user.preferredUsername || this.user.account;
96
95
  },
97
96
  buildVersion() {
@@ -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";
@@ -0,0 +1,5 @@
1
+
2
+ :root {
3
+ --headline-nav-indicator-size: 6px;
4
+ --headline-nav-indicator-margin: 19px;
5
+ }
@@ -45,6 +45,8 @@ export default {
45
45
  voice: 'Voice',
46
46
  format: 'Format',
47
47
  text: 'Text',
48
+ yes: 'Yes',
49
+ no: 'No',
48
50
  },
49
51
  // date-related texts
50
52
  date: {
@@ -44,6 +44,8 @@ export default {
44
44
  voice: 'Голос',
45
45
  format: 'Формат',
46
46
  text: 'Текст',
47
+ yes: 'Да',
48
+ no: 'Нет',
47
49
  },
48
50
  // date-related texts
49
51
  date: {
@@ -44,6 +44,8 @@ export default {
44
44
  voice: 'Голос',
45
45
  format: 'Формат',
46
46
  text: 'Текст',
47
+ yes: 'Так',
48
+ no: 'Ні',
47
49
  },
48
50
  // date-related texts
49
51
  date: {
@@ -8,6 +8,7 @@ const defaultState = () => ({
8
8
  name: '',
9
9
  username: '',
10
10
  account: '',
11
+ preferredUsername: '',
11
12
  userId: 0,
12
13
  scope: {},
13
14
  permissions: {},