@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/dist/ui-sdk.common.js +106 -1
- package/dist/ui-sdk.common.js.map +1 -1
- package/dist/ui-sdk.umd.js +109 -4
- package/dist/ui-sdk.umd.js.map +1 -1
- package/dist/ui-sdk.umd.min.js +3 -3
- package/dist/ui-sdk.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/index.js +2 -0
- package/src/components/organisms/wt-icon-action/__tests__/WtIconAction.spec.js +9 -0
- package/src/components/organisms/wt-icon-action/_internals/__tests__/WtDeleteIconAction.spec.js +9 -0
- package/src/components/organisms/wt-icon-action/_internals/__tests__/WtEditIconAction.spec.js +9 -0
- package/src/components/organisms/{wt-table/table-cells/wt-table-delete-action.vue → wt-icon-action/_internals/wt-delete-icon-action.vue} +2 -2
- package/src/components/organisms/{wt-table/table-cells/wt-table-edit-action.vue → wt-icon-action/_internals/wt-edit-icon-action.vue} +2 -2
- package/src/components/organisms/wt-icon-action/wt-icon-action.vue +31 -0
- package/src/locale/en/en.js +7 -7
- package/src/locale/es/es.js +265 -265
- package/src/locale/ru/ru.js +9 -8
- package/src/locale/ua/ua.js +9 -8
- package/src/components/organisms/wt-table/__tests__/WtTableDeleteAction.spec.js +0 -9
- package/src/components/organisms/wt-table/__tests__/WtTableEditAction.spec.js +0 -9
package/package.json
CHANGED
package/src/components/index.js
CHANGED
|
@@ -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
|
+
});
|
package/src/components/organisms/wt-icon-action/_internals/__tests__/WtDeleteIconAction.spec.js
ADDED
|
@@ -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.
|
|
9
|
+
{{ $t('webitelUI.iconAction.deleteActionHint') }}
|
|
10
10
|
</wt-tooltip>
|
|
11
11
|
</template>
|
|
12
12
|
|
|
13
13
|
<script>
|
|
14
14
|
export default {
|
|
15
|
-
name: 'wt-
|
|
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.
|
|
10
|
+
{{ $t('webitelUI.iconAction.editActionHint') }}
|
|
11
11
|
</wt-tooltip>
|
|
12
12
|
</template>
|
|
13
13
|
|
|
14
14
|
<script>
|
|
15
15
|
export default {
|
|
16
|
-
name: 'wt-
|
|
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>
|
package/src/locale/en/en.js
CHANGED
|
@@ -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
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
editActionHint: 'Edit',
|
|
269
|
-
},
|
|
267
|
+
iconAction: {
|
|
268
|
+
deleteActionHint: 'Delete',
|
|
269
|
+
editActionHint: 'Edit',
|
|
270
270
|
},
|
|
271
271
|
errorPages: {
|
|
272
272
|
goBack: 'Go back',
|