@webitel/ui-sdk 1.0.44 → 2.0.0

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.
Files changed (30) hide show
  1. package/README.md +1 -1
  2. package/dist/img/sprite/index.js +1 -1
  3. package/dist/img/sprite/messenger-messenger.svg +12 -0
  4. package/dist/ui-sdk.common.js +169 -92
  5. package/dist/ui-sdk.common.js.map +1 -1
  6. package/dist/ui-sdk.css +1 -1
  7. package/dist/ui-sdk.umd.js +169 -92
  8. package/dist/ui-sdk.umd.js.map +1 -1
  9. package/dist/ui-sdk.umd.min.js +2 -2
  10. package/dist/ui-sdk.umd.min.js.map +1 -1
  11. package/package.json +1 -1
  12. package/src/components/atoms/wt-tooltip/__tests__/WtTooltip.spec.js +2 -1
  13. package/src/components/atoms/wt-tooltip/wt-tooltip.vue +28 -41
  14. package/src/components/index.js +2 -0
  15. package/src/components/molecules/wt-datetimepicker/__tests__/WtDatetimepicker.spec.js +27 -25
  16. package/src/components/molecules/wt-hint/__tests__/WtHint.spec.js +9 -0
  17. package/src/components/molecules/wt-hint/wt-hint.vue +21 -0
  18. package/src/components/molecules/wt-icon-btn/__tests__/WtIconBtn.spec.js +0 -15
  19. package/src/components/molecules/wt-icon-btn/wt-icon-btn.vue +46 -88
  20. package/src/components/molecules/wt-label/wt-label.vue +4 -22
  21. package/src/components/organisms/wt-app-header/wt-app-navigator.vue +12 -12
  22. package/src/components/organisms/wt-app-header/wt-header-actions.vue +13 -13
  23. package/src/components/organisms/wt-pagination/__tests__/WtPagination.spec.js +2 -2
  24. package/src/components/organisms/wt-pagination/wt-pagination.vue +22 -16
  25. package/src/components/organisms/wt-table/table-cells/wt-table-delete-action.vue +9 -6
  26. package/src/components/organisms/wt-table/table-cells/wt-table-edit-action.vue +10 -7
  27. package/src/components/organisms/wt-table-actions/wt-table-actions.vue +62 -38
  28. package/src/components/organisms/wt-table-column-select/__tests__/WtTableColumnSelect.spec.js +2 -2
  29. package/src/components/organisms/wt-table-column-select/wt-table-column-select.vue +13 -9
  30. package/src/css/components/atoms/wt-tooltip/_variables.scss +17 -2
@@ -1,43 +1,67 @@
1
1
  <template>
2
2
  <aside class="wt-table-actions">
3
3
  <slot></slot>
4
- <wt-icon-btn
5
- v-if="isImport"
6
- icon="download"
7
- :tooltip="$t('reusable.import')"
8
- @click="$emit('input', 'import')"
9
- ></wt-icon-btn>
10
- <wt-icon-btn
11
- v-if="isExport"
12
- icon="upload"
13
- :tooltip="$t('reusable.export')"
14
- @click="$emit('input', 'export')"
15
- ></wt-icon-btn>
16
- <wt-icon-btn
17
- v-if="isFilterReset"
18
- icon="clear"
19
- :tooltip="$t('webitelUI.tableActions.filterReset')"
20
- @click="$emit('input', 'filterReset')"
21
- ></wt-icon-btn>
22
- <wt-icon-btn
23
- v-if="isColumnSelect"
24
- icon="column-select"
25
- :tooltip="$t('webitelUI.tableActions.columnSelect')"
26
- @click="$emit('input', 'columnSelect')"
27
- ></wt-icon-btn>
28
- <wt-icon-btn
29
- v-if="isRefresh"
30
- icon="refresh"
31
- :tooltip="$t('webitelUI.tableActions.refreshTable')"
32
- @click="$emit('input', 'refresh')"
33
- ></wt-icon-btn>
34
- <wt-icon-btn
35
- v-if="isSettings"
36
- :class="{'active': isSettingsActive}"
37
- icon="filter"
38
- :tooltip="$t('webitelUI.tableActions.expandFilters')"
39
- @click="$emit('input', 'settings')"
40
- ></wt-icon-btn>
4
+ <wt-tooltip>
5
+ <template v-slot:activator>
6
+ <wt-icon-btn
7
+ v-if="isImport"
8
+ icon="download"
9
+ @click="$emit('input', 'import')"
10
+ ></wt-icon-btn>
11
+ </template>
12
+ {{ $t('reusable.import') }}
13
+ </wt-tooltip>
14
+ <wt-tooltip>
15
+ <template v-slot:activator>
16
+ <wt-icon-btn
17
+ v-if="isExport"
18
+ icon="upload"
19
+ @click="$emit('input', 'export')"
20
+ ></wt-icon-btn>
21
+ </template>
22
+ {{ $t('reusable.export') }}
23
+ </wt-tooltip>
24
+ <wt-tooltip>
25
+ <template v-slot:activator>
26
+ <wt-icon-btn
27
+ v-if="isFilterReset"
28
+ icon="clear"
29
+ @click="$emit('input', 'filterReset')"
30
+ ></wt-icon-btn>
31
+ </template>
32
+ {{ $t('webitelUI.tableActions.filterReset') }}
33
+ </wt-tooltip>
34
+ <wt-tooltip>
35
+ <template v-slot:activator>
36
+ <wt-icon-btn
37
+ v-if="isColumnSelect"
38
+ icon="column-select"
39
+ @click="$emit('input', 'columnSelect')"
40
+ ></wt-icon-btn>
41
+ </template>
42
+ {{ $t('webitelUI.tableActions.columnSelect') }}
43
+ </wt-tooltip>
44
+ <wt-tooltip>
45
+ <template v-slot:activator>
46
+ <wt-icon-btn
47
+ v-if="isRefresh"
48
+ icon="refresh"
49
+ @click="$emit('input', 'refresh')"
50
+ ></wt-icon-btn>
51
+ </template>
52
+ {{ $t('webitelUI.tableActions.refreshTable') }}
53
+ </wt-tooltip>
54
+ <wt-tooltip>
55
+ <template v-slot:activator>
56
+ <wt-icon-btn
57
+ v-if="isSettings"
58
+ :class="{'active': isSettingsActive}"
59
+ icon="filter"
60
+ @click="$emit('input', 'settings')"
61
+ ></wt-icon-btn>
62
+ </template>
63
+ {{ $t('webitelUI.tableActions.expandFilters') }}
64
+ </wt-tooltip>
41
65
  </aside>
42
66
  </template>
43
67
 
@@ -81,7 +105,7 @@ export default {
81
105
  .wt-table-actions {
82
106
  display: flex;
83
107
  align-items: center;
84
- gap: var(--table-actions-icon-gap);
85
108
  padding: var(--table-actions-padding);
109
+ gap: var(--table-actions-icon-gap);
86
110
  }
87
111
  </style>
@@ -1,4 +1,4 @@
1
- import { shallowMount } from '@vue/test-utils';
1
+ import { mount, shallowMount } from '@vue/test-utils';
2
2
  import WtTableColumnSelect from '../wt-table-column-select.vue';
3
3
 
4
4
  describe('WtTableColumnSelect', () => {
@@ -19,7 +19,7 @@ describe('WtTableColumnSelect', () => {
19
19
  expect(wrapper.find('wt-table-column-select__popup').exists()).toBe(false);
20
20
  });
21
21
  it('column select popup is opening by icon-btn click', async () => {
22
- const wrapper = shallowMount(WtTableColumnSelect, {
22
+ const wrapper = mount(WtTableColumnSelect, {
23
23
  propsData: {
24
24
  headers: [],
25
25
  },
@@ -1,10 +1,14 @@
1
1
  <template>
2
2
  <div class="wt-table-column-select">
3
- <wt-icon-btn
4
- icon="column-select"
5
- :tooltip="$t('webitelUI.tableColumnSelect.title')"
6
- @click="openPopup"
7
- ></wt-icon-btn>
3
+ <wt-tooltip>
4
+ <template v-slot:activator>
5
+ <wt-icon-btn
6
+ icon="column-select"
7
+ @click="openPopup"
8
+ ></wt-icon-btn>
9
+ </template>
10
+ {{ $t('webitelUI.tableColumnSelect.title') }}
11
+ </wt-tooltip>
8
12
  <wt-popup
9
13
  v-if="isColumnSelectPopup"
10
14
  class="wt-table-column-select__popup"
@@ -16,12 +20,12 @@
16
20
  <template slot="main">
17
21
  <ul class="wt-table-column-select__popup__list">
18
22
  <li
19
- class="wt-table-column-select__popup__item"
20
23
  v-for="(col, key) of changeableDraft"
21
24
  :key="key"
25
+ class="wt-table-column-select__popup__item"
22
26
  @click.capture.prevent="col.show = !col.show"
23
27
  >
24
- <wt-checkbox v-model="col.show" :label="col.text"/>
28
+ <wt-checkbox v-model="col.show" :label="col.text" />
25
29
  </li>
26
30
  </ul>
27
31
  </template>
@@ -105,9 +109,9 @@ export default {
105
109
 
106
110
  .wt-table-column-select__popup__list {
107
111
  @extend %wt-scrollbar;
108
- max-height: 35vh; // fixme popup fixed sizes
109
- width: 550px; // fixme popup fixed sizes
110
112
  overflow: auto;
113
+ width: 550px; // fixme popup fixed sizes
114
+ max-height: 35vh; // fixme popup fixed sizes
111
115
  }
112
116
 
113
117
  .wt-table-column-select__popup__item {
@@ -1,7 +1,6 @@
1
1
 
2
2
  :root {
3
3
  --tooltip-padding: var(--spacing-2xs) var(--spacing-xs);
4
- --tooltip-z-index: 100;
5
4
 
6
5
  --tooltip-light-text-color: var(--text-primary-color);
7
6
  --tooltip-light-bg-color: var(--main-color);
@@ -9,4 +8,20 @@
9
8
  --tooltip-dark-bg-color: var(--contrast-color);
10
9
 
11
10
  --tooltip-elevation: var(--elevation-10);
12
- }
11
+ }
12
+
13
+ // cause we need to set styles to element somewhere in the HTML, not inside .wt-tooltip scope
14
+ .wt-tooltip__popper .v-popper__inner {
15
+ @extend %typo-body-1;
16
+ padding: var(--tooltip-padding);
17
+ color: var(--tooltip-light-text-color);
18
+ background: var(--tooltip-light-bg-color);
19
+ border-radius: var(--border-radius);
20
+ box-shadow: var(--tooltip-elevation);
21
+ transition: var(--transition);
22
+ }
23
+
24
+ .wt-tooltip--contrast__popper .v-popper__inner {
25
+ color: var(--tooltip-dark-text-color);
26
+ background: var(--tooltip-dark-bg-color);
27
+ }