@webitel/ui-sdk 3.0.11 → 3.0.12

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": "3.0.11",
3
+ "version": "3.0.12",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve-lib": "vue-cli-service serve",
@@ -52,6 +52,7 @@ import WtStatusSelect from './organisms/wt-status-select/wt-status-select.vue';
52
52
  import WtTable from './organisms/wt-table/wt-table.vue';
53
53
  import WtTableActions from './organisms/wt-table-actions/wt-table-actions.vue';
54
54
  import WtTableColumnSelect from './organisms/wt-table-column-select/wt-table-column-select.vue';
55
+ import WtIconAction from './organisms/wt-icon-action/wt-icon-action.vue';
55
56
 
56
57
  const Components = {
57
58
  WtAvatar,
@@ -105,6 +106,7 @@ const Components = {
105
106
  WtContextMenu,
106
107
  WtCopyAction,
107
108
  WtLoadBar,
109
+ WtIconAction,
108
110
  };
109
111
 
110
112
  export default Components;
@@ -0,0 +1,9 @@
1
+ import { shallowMount } from '@vue/test-utils';
2
+ import WtIconAction from '../wt-icon-action.vue';
3
+
4
+ describe('WtIconAction', () => {
5
+ it('renders a component', () => {
6
+ const wrapper = shallowMount(WtIconAction, { props: { action: 'edit' } });
7
+ expect(wrapper.isVisible()).toBe(true);
8
+ });
9
+ });
@@ -0,0 +1,9 @@
1
+ import { shallowMount } from '@vue/test-utils';
2
+ import WtDeleteIconAction from '../wt-delete-icon-action.vue';
3
+
4
+ describe('WtDeleteIconAction', () => {
5
+ it('renders a component', () => {
6
+ const wrapper = shallowMount(WtDeleteIconAction);
7
+ expect(wrapper.exists()).toBe(true);
8
+ });
9
+ });
@@ -0,0 +1,9 @@
1
+ import { shallowMount } from '@vue/test-utils';
2
+ import WtEditIconAction from '../wt-edit-icon-action.vue';
3
+
4
+ describe('WtEditIconAction', () => {
5
+ it('renders a component', () => {
6
+ const wrapper = shallowMount(WtEditIconAction);
7
+ expect(wrapper.exists()).toBe(true);
8
+ });
9
+ });
@@ -6,13 +6,13 @@
6
6
  @click="$emit('click')"
7
7
  ></wt-icon-btn>
8
8
  </template>
9
- {{ $t('webitelUI.table.tableCells.deleteActionHint') }}
9
+ {{ $t('webitelUI.iconAction.deleteActionHint') }}
10
10
  </wt-tooltip>
11
11
  </template>
12
12
 
13
13
  <script>
14
14
  export default {
15
- name: 'wt-table-delete-action',
15
+ name: 'wt-delete-icon-action',
16
16
  };
17
17
  </script>
18
18
 
@@ -7,13 +7,13 @@
7
7
  @click="$emit('click')"
8
8
  ></wt-icon-btn>
9
9
  </template>
10
- {{ $t('webitelUI.table.tableCells.editActionHint') }}
10
+ {{ $t('webitelUI.iconAction.editActionHint') }}
11
11
  </wt-tooltip>
12
12
  </template>
13
13
 
14
14
  <script>
15
15
  export default {
16
- name: 'wt-table-edit-action',
16
+ name: 'wt-edit-icon-action',
17
17
  };
18
18
  </script>
19
19
 
@@ -0,0 +1,31 @@
1
+ <template>
2
+ <component
3
+ :is="actionComponent"
4
+ ></component>
5
+ </template>
6
+
7
+ <script setup>
8
+ import { computed } from 'vue';
9
+ import WtDeleteIconAction from './_internals/wt-delete-icon-action.vue';
10
+ import WtEditIconAction from './_internals/wt-edit-icon-action.vue';
11
+
12
+ const props = defineProps({
13
+ action: {
14
+ type: String,
15
+ required: true,
16
+ options: ['delete', 'edit'],
17
+ },
18
+ });
19
+
20
+ const actionComponent = computed(() => {
21
+ switch (props.action) {
22
+ case 'edit': return WtEditIconAction;
23
+ case 'delete': return WtDeleteIconAction;
24
+ default: return WtEditIconAction;
25
+ }
26
+ });
27
+ </script>
28
+
29
+ <style lang="scss" scoped>
30
+
31
+ </style>
@@ -7,10 +7,12 @@ import {
7
7
  } from 'webitel-sdk';
8
8
  import { QueueType } from 'webitel-sdk/esm2015/enums';
9
9
  import AdminSections from '../../enums/WebitelApplications/AdminSections.enum';
10
- import SupervisorSections from '../../enums/WebitelApplications/SupervisorSections.enum';
11
- import WebitelApplications from '../../enums/WebitelApplications/WebitelApplications.enum';
12
10
  import AuditorSections
13
11
  from '../../enums/WebitelApplications/AuditorSections.enum';
12
+ import SupervisorSections
13
+ from '../../enums/WebitelApplications/SupervisorSections.enum';
14
+ import WebitelApplications
15
+ from '../../enums/WebitelApplications/WebitelApplications.enum';
14
16
  import { snakeToCamel } from '../../scripts/caseConverters';
15
17
 
16
18
  export default {
@@ -262,11 +264,9 @@ export default {
262
264
  offline: 'Offline',
263
265
  breakOut: 'Break Out',
264
266
  },
265
- table: {
266
- tableCells: {
267
- deleteActionHint: 'Delete',
268
- editActionHint: 'Edit',
269
- },
267
+ iconAction: {
268
+ deleteActionHint: 'Delete',
269
+ editActionHint: 'Edit',
270
270
  },
271
271
  errorPages: {
272
272
  goBack: 'Go back',