@webitel/ui-sdk 3.1.16 → 3.1.17

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.1.16",
3
+ "version": "3.1.17",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve-lib": "vue-cli-service serve",
@@ -0,0 +1,9 @@
1
+ import { shallowMount } from '@vue/test-utils';
2
+ import WtAddIconAction from '../wt-add-icon-action.vue';
3
+
4
+ describe('WtAddIconAction', () => {
5
+ it('renders a component', () => {
6
+ const wrapper = shallowMount(WtAddIconAction);
7
+ expect(wrapper.exists()).toBe(true);
8
+ });
9
+ });
@@ -0,0 +1,9 @@
1
+ import { shallowMount } from '@vue/test-utils';
2
+ import WtDownloadIconAction from '../wt-download-icon-action.vue';
3
+
4
+ describe('WtDownloadIconAction', () => {
5
+ it('renders a component', () => {
6
+ const wrapper = shallowMount(WtDownloadIconAction);
7
+ expect(wrapper.exists()).toBe(true);
8
+ });
9
+ });
@@ -0,0 +1,9 @@
1
+ import { shallowMount } from '@vue/test-utils';
2
+ import WtHistoryIconAction from '../wt-history-icon-action.vue';
3
+
4
+ describe('WtHistoryIconAction', () => {
5
+ it('renders a component', () => {
6
+ const wrapper = shallowMount(WtHistoryIconAction);
7
+ expect(wrapper.exists()).toBe(true);
8
+ });
9
+ });
@@ -0,0 +1,28 @@
1
+ <template>
2
+ <wt-tooltip>
3
+ <template v-slot:activator>
4
+ <wt-icon-btn
5
+ icon="plus"
6
+ :disabled="disabled"
7
+ @click="$emit('click')"
8
+ ></wt-icon-btn>
9
+ </template>
10
+ {{ $t('webitelUI.iconAction.addActionHint') }}
11
+ </wt-tooltip>
12
+ </template>
13
+
14
+ <script>
15
+ export default {
16
+ name: 'wt-add-icon-action',
17
+ props: {
18
+ disabled: {
19
+ type: Boolean,
20
+ default: false,
21
+ },
22
+ },
23
+ };
24
+ </script>
25
+
26
+ <style scoped>
27
+
28
+ </style>
@@ -3,6 +3,7 @@
3
3
  <template v-slot:activator>
4
4
  <wt-icon-btn
5
5
  icon="bucket"
6
+ :disabled="disabled"
6
7
  @click="$emit('click')"
7
8
  ></wt-icon-btn>
8
9
  </template>
@@ -13,6 +14,12 @@
13
14
  <script>
14
15
  export default {
15
16
  name: 'wt-delete-icon-action',
17
+ props: {
18
+ disabled: {
19
+ type: Boolean,
20
+ default: false,
21
+ },
22
+ },
16
23
  };
17
24
  </script>
18
25
 
@@ -0,0 +1,28 @@
1
+ <template>
2
+ <wt-tooltip>
3
+ <template v-slot:activator>
4
+ <wt-icon-btn
5
+ icon="download"
6
+ :disabled="disabled"
7
+ @click="$emit('click')"
8
+ ></wt-icon-btn>
9
+ </template>
10
+ {{ $t('webitelUI.iconAction.downloadActionHint') }}
11
+ </wt-tooltip>
12
+ </template>
13
+
14
+ <script>
15
+ export default {
16
+ name: 'wt-download-icon-action',
17
+ props: {
18
+ disabled: {
19
+ type: Boolean,
20
+ default: false,
21
+ },
22
+ },
23
+ };
24
+ </script>
25
+
26
+ <style scoped>
27
+
28
+ </style>
@@ -4,6 +4,7 @@
4
4
  <wt-icon-btn
5
5
  class="table-action"
6
6
  icon="edit"
7
+ :disabled="disabled"
7
8
  @click="$emit('click')"
8
9
  ></wt-icon-btn>
9
10
  </template>
@@ -14,6 +15,12 @@
14
15
  <script>
15
16
  export default {
16
17
  name: 'wt-edit-icon-action',
18
+ props: {
19
+ disabled: {
20
+ type: Boolean,
21
+ default: false,
22
+ },
23
+ },
17
24
  };
18
25
  </script>
19
26
 
@@ -0,0 +1,28 @@
1
+ <template>
2
+ <wt-tooltip>
3
+ <template v-slot:activator>
4
+ <wt-icon-btn
5
+ icon="history"
6
+ :disabled="disabled"
7
+ @click="$emit('click')"
8
+ ></wt-icon-btn>
9
+ </template>
10
+ {{ $t('webitelUI.iconAction.historyActionHint') }}
11
+ </wt-tooltip>
12
+ </template>
13
+
14
+ <script>
15
+ export default {
16
+ name: 'wt-history-icon-action',
17
+ props: {
18
+ disabled: {
19
+ type: Boolean,
20
+ default: false,
21
+ },
22
+ },
23
+ };
24
+ </script>
25
+
26
+ <style scoped>
27
+
28
+ </style>
@@ -1,6 +1,8 @@
1
1
  <template>
2
2
  <component
3
3
  :is="actionComponent"
4
+ :disabled="disabled"
5
+ @click="$emit('click')"
4
6
  ></component>
5
7
  </template>
6
8
 
@@ -8,20 +10,36 @@
8
10
  import { computed } from 'vue';
9
11
  import WtDeleteIconAction from './_internals/wt-delete-icon-action.vue';
10
12
  import WtEditIconAction from './_internals/wt-edit-icon-action.vue';
13
+ import WtAddIconAction from './_internals/wt-add-icon-action.vue';
14
+ import WtHistoryIconAction from './_internals/wt-history-icon-action.vue';
15
+ import WtDownloadIconAction from './_internals/wt-download-icon-action.vue';
11
16
 
12
17
  const props = defineProps({
13
18
  action: {
14
19
  type: String,
15
20
  required: true,
16
- options: ['delete', 'edit'],
21
+ options: ['delete', 'edit', 'add', 'history', 'download'],
22
+ },
23
+ disabled: {
24
+ type: Boolean,
25
+ default: false,
17
26
  },
18
27
  });
19
28
 
20
29
  const actionComponent = computed(() => {
21
30
  switch (props.action) {
22
- case 'edit': return WtEditIconAction;
23
- case 'delete': return WtDeleteIconAction;
24
- default: return WtEditIconAction;
31
+ case 'edit':
32
+ return WtEditIconAction;
33
+ case 'delete':
34
+ return WtDeleteIconAction;
35
+ case 'add':
36
+ return WtAddIconAction;
37
+ case 'history':
38
+ return WtHistoryIconAction;
39
+ case 'download':
40
+ return WtDownloadIconAction;
41
+ default:
42
+ return WtEditIconAction;
25
43
  }
26
44
  });
27
45
  </script>
@@ -43,3 +43,4 @@
43
43
  @import "organisms/wt-table/variables";
44
44
  @import "organisms/wt-table-actions/variables";
45
45
  @import "organisms/wt-player/variables";
46
+ @import "organisms/wt-icon-action/variables";
@@ -267,6 +267,9 @@ export default {
267
267
  iconAction: {
268
268
  deleteActionHint: 'Delete',
269
269
  editActionHint: 'Edit',
270
+ addActionHint: 'Add',
271
+ historyActionHint: 'History',
272
+ downloadActionHint: 'Download',
270
273
  },
271
274
  errorPages: {
272
275
  goBack: 'Go back',
@@ -264,6 +264,9 @@ export default {
264
264
  iconAction: {
265
265
  deleteActionHint: 'Удалить',
266
266
  editActionHint: 'Редактировать',
267
+ addActionHint: 'Добавить',
268
+ historyActionHint: 'История',
269
+ downloadActionHint: 'Скачать',
267
270
  },
268
271
  errorPages: {
269
272
  goBack: 'Вернуться назад',
@@ -264,6 +264,9 @@ export default {
264
264
  iconAction: {
265
265
  deleteActionHint: 'Видалити',
266
266
  editActionHint: 'Редагувати',
267
+ addActionHint: 'Додати',
268
+ historyActionHint: 'Історія',
269
+ downloadActionHint: 'Скачати',
267
270
  },
268
271
  errorPages: {
269
272
  goBack: 'Повернутись назад',