@webitel/ui-sdk 23.12.39-vite-6 → 23.12.40
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/demo.html +1 -0
- package/dist/img/sprite/index.js +1 -147
- package/dist/ui-sdk.common.js +43304 -0
- package/dist/ui-sdk.common.js.map +1 -0
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.umd.js +43303 -18
- package/dist/ui-sdk.umd.js.map +1 -0
- package/dist/ui-sdk.umd.min.js +35 -0
- package/dist/ui-sdk.umd.min.js.map +1 -0
- package/package.json +38 -20
- package/src/components/on-demand/wt-cc-agent-status-timers/wt-cc-agent-status-timers.vue +3 -3
- package/src/components/on-demand/wt-save-failed-popup/__tests__/WtPopup.spec.js +9 -0
- package/src/components/on-demand/wt-save-failed-popup/wt-save-failed-popup.vue +70 -0
- package/src/components/transitions/wt-expand-transition.vue +2 -2
- package/src/components/wt-app-header/wt-app-header.vue +2 -2
- package/src/components/wt-app-header/wt-app-navigator.vue +5 -6
- package/src/components/wt-app-header/wt-header-actions.vue +14 -30
- package/src/components/wt-avatar/wt-avatar.vue +2 -2
- package/src/components/wt-badge/wt-badge.vue +3 -3
- package/src/components/wt-button/wt-button.vue +3 -5
- package/src/components/wt-button-select/__tests__/WtButtonSelect.spec.js +4 -4
- package/src/components/wt-button-select/wt-button-select.vue +3 -3
- package/src/components/wt-checkbox/wt-checkbox.vue +7 -12
- package/src/components/wt-chip/wt-chip.vue +3 -6
- package/src/components/wt-context-menu/wt-context-menu.vue +4 -4
- package/src/components/wt-copy-action/wt-copy-action.vue +6 -6
- package/src/components/wt-datepicker/wt-datepicker.vue +12 -14
- package/src/components/wt-divider/wt-divider.vue +1 -1
- package/src/components/wt-dummy/wt-dummy.vue +2 -6
- package/src/components/wt-error-page/wt-error-page.vue +4 -10
- package/src/components/wt-expansion-panel/wt-expansion-panel.vue +4 -4
- package/src/components/wt-filters-panel-wrapper/wt-filters-panel-wrapper.vue +4 -7
- package/src/components/wt-headline/wt-headline.vue +4 -4
- package/src/components/wt-headline-nav/wt-headline-nav.vue +4 -11
- package/src/components/wt-hint/wt-hint.vue +4 -4
- package/src/components/wt-icon/wt-icon.vue +5 -5
- package/src/components/wt-icon-action/_internals/wt-add-icon-action.vue +2 -2
- package/src/components/wt-icon-action/_internals/wt-delete-icon-action.vue +2 -2
- package/src/components/wt-icon-action/_internals/wt-download-icon-action.vue +2 -2
- package/src/components/wt-icon-action/_internals/wt-edit-icon-action.vue +2 -2
- package/src/components/wt-icon-action/_internals/wt-history-icon-action.vue +2 -2
- package/src/components/wt-icon-action/_internals/wt-refresh-icon-action.vue +2 -2
- package/src/components/wt-icon-action/wt-icon-action.vue +1 -1
- package/src/components/wt-icon-btn/wt-icon-btn.vue +1 -1
- package/src/components/wt-indicator/wt-indicator.vue +3 -6
- package/src/components/wt-input/wt-input.vue +182 -193
- package/src/components/wt-input-info/wt-input-info.vue +2 -2
- package/src/components/wt-item-link/wt-item-link.vue +1 -1
- package/src/components/wt-label/wt-label.vue +2 -2
- package/src/components/wt-load-bar/wt-load-bar.vue +2 -5
- package/src/components/wt-loader/_internals/wt-loader--md.vue +2 -11
- package/src/components/wt-loader/_internals/wt-loader--sm.vue +2 -9
- package/src/components/wt-loader/wt-loader.vue +3 -10
- package/src/components/wt-navigation-bar/wt-navigation-bar.vue +8 -16
- package/src/components/wt-notification/wt-notification.vue +3 -3
- package/src/components/wt-notifications-bar/wt-notifications-bar.vue +5 -9
- package/src/components/wt-page-header/wt-page-header.vue +8 -7
- package/src/components/wt-page-wrapper/wt-page-wrapper.vue +5 -8
- package/src/components/wt-pagination/wt-pagination.vue +15 -17
- package/src/components/wt-player/wt-player.vue +16 -16
- package/src/components/wt-popup/wt-popup.vue +7 -13
- package/src/components/wt-progress-bar/wt-progress-bar.vue +7 -11
- package/src/components/wt-radio/wt-radio.vue +7 -15
- package/src/components/wt-rounded-action/wt-rounded-action.vue +2 -2
- package/src/components/wt-search-bar/__tests__/WtSearchBar.spec.js +1 -1
- package/src/components/wt-search-bar/wt-search-bar.vue +5 -6
- package/src/components/wt-select/_multiselect.scss +1 -0
- package/src/components/wt-select/wt-select.vue +19 -33
- package/src/components/wt-slider/wt-slider.vue +5 -5
- package/src/components/wt-status-select/wt-status-select.vue +9 -9
- package/src/components/wt-stepper/wt-stepper.vue +6 -8
- package/src/components/wt-switcher/wt-switcher.vue +7 -12
- package/src/components/wt-table/wt-table.vue +72 -110
- package/src/components/wt-table-actions/wt-table-actions.vue +14 -14
- package/src/components/wt-table-column-select/wt-table-column-select.vue +26 -28
- package/src/components/wt-tabs/wt-tabs.vue +7 -7
- package/src/components/wt-tags-input/wt-tags-input.vue +15 -23
- package/src/components/wt-textarea/wt-textarea.vue +10 -15
- package/src/components/wt-time-input/wt-time-input.vue +4 -7
- package/src/components/wt-timepicker/wt-timepicker.vue +15 -19
- package/src/components/wt-tooltip/_internals/wt-tooltip-floating.vue +2 -2
- package/src/components/wt-tooltip/wt-tooltip.vue +4 -4
- package/src/composables/useCachedInterval/__tests__/useCachedInterval.spec.js +5 -5
- package/src/css/styleguide/colors/_colors.scss +8 -9
- package/src/locale/en/en.js +5 -0
- package/src/locale/i18n.js +1 -1
- package/src/locale/kz/kz.js +5 -0
- package/src/locale/ru/ru.js +5 -0
- package/src/locale/ua/ua.js +5 -0
- package/src/mixins/validationMixin/useValidation.js +2 -2
- package/src/modules/AgentStatusSelect/components/__tests__/wt-cc-agent-status-select.spec.js +4 -4
- package/src/modules/AgentStatusSelect/components/_internals/wt-cc-pause-cause-popup.vue +9 -11
- package/src/modules/AgentStatusSelect/components/_internals/wt-cc-status-select-error-popup.vue +5 -6
- package/src/modules/AgentStatusSelect/components/wt-cc-agent-status-select.vue +3 -3
- package/src/modules/AuditForm/components/__tests__/audit-form.spec.js +1 -1
- package/src/modules/AuditForm/components/audit-form-question-read-wrapper.vue +6 -10
- package/src/modules/AuditForm/components/audit-form-question-write-wrapper.vue +8 -8
- package/src/modules/AuditForm/components/audit-form-question.vue +8 -8
- package/src/modules/AuditForm/components/audit-form.vue +5 -6
- package/src/modules/AuditForm/components/questions/options/audit-form-question-options-write-row.vue +4 -4
- package/src/modules/AuditForm/components/questions/options/audit-form-question-options.vue +4 -7
- package/src/modules/AuditForm/components/questions/score/audit-form-question-score.vue +3 -3
- package/src/modules/CSVExport/__tests__/CSVExport.spec.js +2 -2
- package/src/modules/DeleteConfirmationPopup/__tests__/delete-confirmation-popup.spec.js +6 -6
- package/src/modules/DeleteConfirmationPopup/components/delete-confirmation-popup.vue +6 -13
- package/src/modules/FilesExport/__tests__/FilesExport.spec.js +3 -3
- package/src/modules/Filters/components/filter-pagination.vue +1 -1
- package/src/modules/Filters/components/filter-table-fields.vue +1 -1
- package/src/modules/Notifications/store/__tests__/NotificationsStoreModule.actions.spec.js +3 -3
- package/src/modules/QueryFilters/classes/__tests__/ApiFilterSchema.spec.js +1 -1
- package/src/modules/QueryFilters/components/__tests__/abstract-api-filter.spec.js +4 -4
- package/src/modules/QueryFilters/components/__tests__/filter-datetime.spec.js +2 -2
- package/src/modules/QueryFilters/components/__tests__/filter-from-to.spec.js +4 -4
- package/src/modules/QueryFilters/components/__tests__/filter-search.spec.js +2 -2
- package/src/modules/QueryFilters/components/abstract-api-filter.vue +2 -2
- package/src/modules/QueryFilters/components/abstract-enum-filter.vue +2 -2
- package/src/modules/QueryFilters/components/filter-datetime.vue +2 -2
- package/src/modules/QueryFilters/components/filter-from-to.vue +10 -12
- package/src/modules/QueryFilters/components/filter-search.vue +2 -2
- package/src/modules/QueryFilters/components/filter-table-fields.vue +7 -7
- package/src/modules/QueryFilters/mixins/__tests__/apiFilterMixin.spec.js +1 -1
- package/src/modules/QueryFilters/mixins/__tests__/enumFilterMixin.spec.js +2 -2
- package/src/modules/QueryFilters/mixins/__tests__/paginationFilterMixin.spec.js +2 -2
- package/src/modules/QueryFilters/mixins/__tests__/sortFilterMixin.spec.js +1 -1
- package/src/modules/QueryFilters/store/__tests__/QueryFiltersStoreModule.spec.js +2 -2
- package/src/modules/Userinfo/components/__tests__/auth.spec.js +4 -4
- package/src/modules/Userinfo/components/the-auth.vue +4 -7
- package/src/scripts/saveAsJSON.js +7 -0
- package/src/store/BaseStoreModules/__tests__/BaseStoreModule.spec.js +6 -6
- package/dist/favicon.ico +0 -0
- package/dist/plyr.svg +0 -70
- package/dist/ui-sdk.mjs +0 -22678
- package/src/components/wt-input/Readme.md +0 -96
- package/src/css/styleguide/colors/reusable/_text-field.scss +0 -20
- package/src/locale/.DS_Store +0 -0
|
@@ -19,18 +19,13 @@
|
|
|
19
19
|
:disabled="disabled"
|
|
20
20
|
@change="inputHandler"
|
|
21
21
|
>
|
|
22
|
-
<span class="wt-switcher__checkmark"
|
|
22
|
+
<span class="wt-switcher__checkmark"></span>
|
|
23
23
|
<!-- @slot Custom input label -->
|
|
24
24
|
<slot
|
|
25
25
|
v-bind="{ label, value, disabled }"
|
|
26
26
|
name="label"
|
|
27
27
|
>
|
|
28
|
-
<div
|
|
29
|
-
v-if="label"
|
|
30
|
-
class="wt-switcher__label"
|
|
31
|
-
>
|
|
32
|
-
{{ label }}
|
|
33
|
-
</div>
|
|
28
|
+
<div v-if="label" class="wt-switcher__label">{{ label }}</div>
|
|
34
29
|
</slot>
|
|
35
30
|
</wt-label>
|
|
36
31
|
</div>
|
|
@@ -38,11 +33,7 @@
|
|
|
38
33
|
|
|
39
34
|
<script>
|
|
40
35
|
export default {
|
|
41
|
-
name: '
|
|
42
|
-
model: {
|
|
43
|
-
prop: 'value',
|
|
44
|
-
event: 'change',
|
|
45
|
-
},
|
|
36
|
+
name: 'wt-switcher',
|
|
46
37
|
props: {
|
|
47
38
|
value: {
|
|
48
39
|
type: Boolean,
|
|
@@ -65,6 +56,10 @@ export default {
|
|
|
65
56
|
description: 'Object with props, passed down to wt-label as props',
|
|
66
57
|
},
|
|
67
58
|
},
|
|
59
|
+
model: {
|
|
60
|
+
prop: 'value',
|
|
61
|
+
event: 'change',
|
|
62
|
+
},
|
|
68
63
|
methods: {
|
|
69
64
|
inputHandler() {
|
|
70
65
|
this.$emit('change', !this.value);
|
|
@@ -2,124 +2,86 @@
|
|
|
2
2
|
<div class="wt-table">
|
|
3
3
|
<table class="wt-table__table">
|
|
4
4
|
<thead class="wt-table__head">
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
<tr :style="columnsStyle" class="wt-table__tr wt-table__tr__head">
|
|
6
|
+
<th v-if="selectable" class="wt-table__th wt-table__th--checkbox">
|
|
7
|
+
<wt-checkbox
|
|
8
|
+
:selected="isAllSelected"
|
|
9
|
+
@change="selectAll"
|
|
10
|
+
></wt-checkbox>
|
|
11
|
+
</th>
|
|
12
|
+
<th
|
|
13
|
+
v-for="(col, key) of dataHeaders"
|
|
14
|
+
:key="key"
|
|
15
|
+
:class="[
|
|
16
|
+
{'wt-table__th--sortable': isColSortable(col)},
|
|
17
|
+
`wt-table__th--sort-${col.sort}`,
|
|
18
|
+
]"
|
|
19
|
+
class="wt-table__th"
|
|
20
|
+
@click="sort(col)"
|
|
8
21
|
>
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
>
|
|
28
|
-
<div class="wt-table__th__text">
|
|
29
|
-
{{ col.text }}
|
|
30
|
-
</div>
|
|
31
|
-
<wt-icon
|
|
32
|
-
v-if="sortable"
|
|
33
|
-
class="wt-table__th__sort-arrow wt-table__th__sort-arrow--asc"
|
|
34
|
-
icon="sort-arrow-up"
|
|
35
|
-
size="sm"
|
|
36
|
-
/>
|
|
37
|
-
<wt-icon
|
|
38
|
-
v-if="sortable"
|
|
39
|
-
class="wt-table__th__sort-arrow wt-table__th__sort-arrow--desc"
|
|
40
|
-
icon="sort-arrow-down"
|
|
41
|
-
size="sm"
|
|
42
|
-
/>
|
|
43
|
-
</th>
|
|
44
|
-
<th
|
|
45
|
-
v-if="gridActions"
|
|
46
|
-
class="wt-table__th__actions"
|
|
47
|
-
>
|
|
48
|
-
<slot name="actions-header" />
|
|
49
|
-
</th>
|
|
50
|
-
</tr>
|
|
22
|
+
<div class="wt-table__th__text">{{ col.text }}</div>
|
|
23
|
+
<wt-icon
|
|
24
|
+
v-if="sortable"
|
|
25
|
+
class="wt-table__th__sort-arrow wt-table__th__sort-arrow--asc"
|
|
26
|
+
icon="sort-arrow-up"
|
|
27
|
+
size="sm"
|
|
28
|
+
></wt-icon>
|
|
29
|
+
<wt-icon
|
|
30
|
+
v-if="sortable"
|
|
31
|
+
class="wt-table__th__sort-arrow wt-table__th__sort-arrow--desc"
|
|
32
|
+
icon="sort-arrow-down"
|
|
33
|
+
size="sm"
|
|
34
|
+
></wt-icon>
|
|
35
|
+
</th>
|
|
36
|
+
<th v-if="gridActions" class="wt-table__th__actions">
|
|
37
|
+
<slot name="actions-header"></slot>
|
|
38
|
+
</th>
|
|
39
|
+
</tr>
|
|
51
40
|
</thead>
|
|
52
41
|
|
|
53
42
|
<tbody class="wt-table__body">
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
@change="row._isSelected = !row._isSelected"
|
|
68
|
-
/>
|
|
69
|
-
</td>
|
|
43
|
+
<tr
|
|
44
|
+
v-for="(row, dataKey) of data"
|
|
45
|
+
:key="dataKey"
|
|
46
|
+
:class="`wt-table__tr__${row.id || dataKey}`"
|
|
47
|
+
:style="columnsStyle"
|
|
48
|
+
class="wt-table__tr wt-table__tr__body"
|
|
49
|
+
>
|
|
50
|
+
<td v-if="selectable" class="wt-table__td wt-table__td--checkbox">
|
|
51
|
+
<wt-checkbox
|
|
52
|
+
:selected="row._isSelected"
|
|
53
|
+
@change="row._isSelected = !row._isSelected"
|
|
54
|
+
></wt-checkbox>
|
|
55
|
+
</td>
|
|
70
56
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
>
|
|
81
|
-
<div>{{ row[col.value] }}</div>
|
|
82
|
-
</slot>
|
|
83
|
-
</td>
|
|
57
|
+
<td
|
|
58
|
+
v-for="(col, headerKey) of dataHeaders"
|
|
59
|
+
:key="headerKey"
|
|
60
|
+
class="wt-table__td"
|
|
61
|
+
>
|
|
62
|
+
<slot :index="dataKey" :item="row" :name="col.value">
|
|
63
|
+
<div>{{ row[col.value] }}</div>
|
|
64
|
+
</slot>
|
|
65
|
+
</td>
|
|
84
66
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
<slot
|
|
90
|
-
:index="dataKey"
|
|
91
|
-
:item="row"
|
|
92
|
-
name="actions"
|
|
93
|
-
/>
|
|
94
|
-
</td>
|
|
95
|
-
</tr>
|
|
67
|
+
<td v-if="gridActions" class="wt-table__td__actions">
|
|
68
|
+
<slot :index="dataKey" :item="row" name="actions"></slot>
|
|
69
|
+
</td>
|
|
70
|
+
</tr>
|
|
96
71
|
</tbody>
|
|
97
72
|
|
|
98
|
-
<tfoot
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
<
|
|
103
|
-
|
|
104
|
-
|
|
73
|
+
<tfoot v-if="isTableFooter" class="wt-table__foot">
|
|
74
|
+
<tr :style="columnsStyle" class="wt-table__tr wt-table__tr__foot">
|
|
75
|
+
<!-- empty checkbox column -->
|
|
76
|
+
<th v-if="selectable" class="wt-table__th__checkbox"></th>
|
|
77
|
+
<td
|
|
78
|
+
v-for="(col, headerKey) of dataHeaders"
|
|
79
|
+
:key="headerKey"
|
|
80
|
+
class="wt-table__td"
|
|
105
81
|
>
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
class="wt-table__th__checkbox"
|
|
110
|
-
/>
|
|
111
|
-
<td
|
|
112
|
-
v-for="(col, headerKey) of dataHeaders"
|
|
113
|
-
:key="headerKey"
|
|
114
|
-
class="wt-table__td"
|
|
115
|
-
>
|
|
116
|
-
<slot
|
|
117
|
-
:header="col"
|
|
118
|
-
:index="headerKey"
|
|
119
|
-
:name="`${col.value}-footer`"
|
|
120
|
-
/>
|
|
121
|
-
</td>
|
|
122
|
-
</tr>
|
|
82
|
+
<slot :header="col" :index="headerKey" :name="`${col.value}-footer`"></slot>
|
|
83
|
+
</td>
|
|
84
|
+
</tr>
|
|
123
85
|
</tfoot>
|
|
124
86
|
</table>
|
|
125
87
|
</div>
|
|
@@ -129,7 +91,7 @@
|
|
|
129
91
|
import getNextSortOrder from './_internals/getSortOrder';
|
|
130
92
|
|
|
131
93
|
export default {
|
|
132
|
-
name: '
|
|
94
|
+
name: 'wt-table',
|
|
133
95
|
props: {
|
|
134
96
|
headers: {
|
|
135
97
|
type: Array,
|
|
@@ -1,58 +1,58 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<aside class="wt-table-actions">
|
|
3
|
-
<slot
|
|
3
|
+
<slot></slot>
|
|
4
4
|
<wt-tooltip v-if="isImport">
|
|
5
|
-
<template
|
|
5
|
+
<template v-slot:activator>
|
|
6
6
|
<wt-icon-btn
|
|
7
7
|
icon="download"
|
|
8
8
|
@click="$emit('input', 'import')"
|
|
9
|
-
|
|
9
|
+
></wt-icon-btn>
|
|
10
10
|
</template>
|
|
11
11
|
{{ $t('reusable.import') }}
|
|
12
12
|
</wt-tooltip>
|
|
13
13
|
<wt-tooltip v-if="isExport">
|
|
14
|
-
<template
|
|
14
|
+
<template v-slot:activator>
|
|
15
15
|
<wt-icon-btn
|
|
16
16
|
icon="upload"
|
|
17
17
|
@click="$emit('input', 'export')"
|
|
18
|
-
|
|
18
|
+
></wt-icon-btn>
|
|
19
19
|
</template>
|
|
20
20
|
{{ $t('reusable.export') }}
|
|
21
21
|
</wt-tooltip>
|
|
22
22
|
<wt-tooltip v-if="isFilterReset">
|
|
23
|
-
<template
|
|
23
|
+
<template v-slot:activator>
|
|
24
24
|
<wt-icon-btn
|
|
25
25
|
icon="clear"
|
|
26
26
|
@click="$emit('input', 'filterReset')"
|
|
27
|
-
|
|
27
|
+
></wt-icon-btn>
|
|
28
28
|
</template>
|
|
29
29
|
{{ $t('webitelUI.tableActions.filterReset') }}
|
|
30
30
|
</wt-tooltip>
|
|
31
31
|
<wt-tooltip v-if="isColumnSelect">
|
|
32
|
-
<template
|
|
32
|
+
<template v-slot:activator>
|
|
33
33
|
<wt-icon-btn
|
|
34
34
|
icon="column-select"
|
|
35
35
|
@click="$emit('input', 'columnSelect')"
|
|
36
|
-
|
|
36
|
+
></wt-icon-btn>
|
|
37
37
|
</template>
|
|
38
38
|
{{ $t('webitelUI.tableActions.columnSelect') }}
|
|
39
39
|
</wt-tooltip>
|
|
40
40
|
<wt-tooltip v-if="isRefresh">
|
|
41
|
-
<template
|
|
41
|
+
<template v-slot:activator>
|
|
42
42
|
<wt-icon-btn
|
|
43
43
|
icon="refresh"
|
|
44
44
|
@click="$emit('input', 'refresh')"
|
|
45
|
-
|
|
45
|
+
></wt-icon-btn>
|
|
46
46
|
</template>
|
|
47
47
|
{{ $t('webitelUI.tableActions.refreshTable') }}
|
|
48
48
|
</wt-tooltip>
|
|
49
49
|
<wt-tooltip v-if="isSettings">
|
|
50
|
-
<template
|
|
50
|
+
<template v-slot:activator>
|
|
51
51
|
<wt-icon-btn
|
|
52
52
|
:class="{'active': isSettingsActive}"
|
|
53
53
|
icon="filter"
|
|
54
54
|
@click="$emit('input', 'settings')"
|
|
55
|
-
|
|
55
|
+
></wt-icon-btn>
|
|
56
56
|
</template>
|
|
57
57
|
{{ $t('webitelUI.tableActions.expandFilters') }}
|
|
58
58
|
</wt-tooltip>
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
|
|
62
62
|
<script>
|
|
63
63
|
export default {
|
|
64
|
-
name: '
|
|
64
|
+
name: 'wt-table-actions',
|
|
65
65
|
props: {
|
|
66
66
|
icons: {
|
|
67
67
|
type: Array,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="wt-table-column-select">
|
|
3
3
|
<wt-tooltip>
|
|
4
|
-
<template
|
|
4
|
+
<template v-slot:activator>
|
|
5
5
|
<wt-icon-btn
|
|
6
6
|
icon="column-select"
|
|
7
7
|
@click="openPopup"
|
|
8
|
-
|
|
8
|
+
></wt-icon-btn>
|
|
9
9
|
</template>
|
|
10
10
|
{{ $t('webitelUI.tableColumnSelect.title') }}
|
|
11
11
|
</wt-tooltip>
|
|
@@ -14,18 +14,18 @@
|
|
|
14
14
|
class="wt-table-column-select__popup"
|
|
15
15
|
@close="close"
|
|
16
16
|
>
|
|
17
|
-
<template
|
|
17
|
+
<template v-slot:title>
|
|
18
18
|
{{ $t('webitelUI.tableColumnSelect.title') }}
|
|
19
19
|
</template>
|
|
20
|
-
<template
|
|
20
|
+
<template v-slot:main>
|
|
21
21
|
<div class="wt-table-column-select__popup-list-wrap">
|
|
22
22
|
<ul
|
|
23
23
|
class="wt-table-column-select__popup-list"
|
|
24
24
|
:class="{
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
'wt-table-column-select__popup-list--md':
|
|
26
|
+
changeableDraft.length > 10 && changeableDraft.length <= 20,
|
|
27
|
+
'wt-table-column-select__popup-list--lg':
|
|
28
|
+
changeableDraft.length > 20
|
|
29
29
|
}"
|
|
30
30
|
>
|
|
31
31
|
<li
|
|
@@ -37,22 +37,20 @@
|
|
|
37
37
|
<wt-checkbox
|
|
38
38
|
v-model="column.show"
|
|
39
39
|
:label="shownColLabel(column)"
|
|
40
|
-
|
|
40
|
+
></wt-checkbox>
|
|
41
41
|
</li>
|
|
42
42
|
</ul>
|
|
43
43
|
</div>
|
|
44
44
|
</template>
|
|
45
|
-
<template
|
|
45
|
+
<template v-slot:actions>
|
|
46
46
|
<wt-button
|
|
47
47
|
@click="setShownColumns"
|
|
48
|
-
>
|
|
49
|
-
{{ $t('reusable.add') }}
|
|
48
|
+
>{{ $t('reusable.add') }}
|
|
50
49
|
</wt-button>
|
|
51
50
|
<wt-button
|
|
52
51
|
color="secondary"
|
|
53
52
|
@click="close"
|
|
54
|
-
>
|
|
55
|
-
{{ $t('reusable.cancel') }}
|
|
53
|
+
>{{ $t('reusable.cancel') }}
|
|
56
54
|
</wt-button>
|
|
57
55
|
</template>
|
|
58
56
|
</wt-popup>
|
|
@@ -63,12 +61,7 @@
|
|
|
63
61
|
import deepCopy from 'deep-copy';
|
|
64
62
|
|
|
65
63
|
export default {
|
|
66
|
-
name: '
|
|
67
|
-
|
|
68
|
-
model: {
|
|
69
|
-
prop: 'headers',
|
|
70
|
-
event: 'change',
|
|
71
|
-
},
|
|
64
|
+
name: 'wt-table-column-select',
|
|
72
65
|
props: {
|
|
73
66
|
headers: {
|
|
74
67
|
type: Array,
|
|
@@ -82,18 +75,15 @@ export default {
|
|
|
82
75
|
},
|
|
83
76
|
},
|
|
84
77
|
|
|
78
|
+
model: {
|
|
79
|
+
prop: 'headers',
|
|
80
|
+
event: 'change',
|
|
81
|
+
},
|
|
82
|
+
|
|
85
83
|
data: () => ({
|
|
86
84
|
draft: [], // headers draft
|
|
87
85
|
isColumnSelectPopup: false,
|
|
88
86
|
}),
|
|
89
|
-
computed: {
|
|
90
|
-
changeableDraft() {
|
|
91
|
-
return this.draft.filter((header) => !this.staticHeaders.includes(header.value)).sort((a, b) => {
|
|
92
|
-
return this.shownColLabel(a).localeCompare(this.shownColLabel(b));
|
|
93
|
-
// sorting headers for alphabet just in popup
|
|
94
|
-
});
|
|
95
|
-
},
|
|
96
|
-
},
|
|
97
87
|
|
|
98
88
|
watch: {
|
|
99
89
|
isColumnSelectPopup: {
|
|
@@ -102,6 +92,14 @@ export default {
|
|
|
102
92
|
},
|
|
103
93
|
},
|
|
104
94
|
},
|
|
95
|
+
computed: {
|
|
96
|
+
changeableDraft() {
|
|
97
|
+
return this.draft.filter((header) => !this.staticHeaders.includes(header.value)).sort((a, b) => {
|
|
98
|
+
return this.shownColLabel(a).localeCompare(this.shownColLabel(b));
|
|
99
|
+
// sorting headers for alphabet just in popup
|
|
100
|
+
});
|
|
101
|
+
},
|
|
102
|
+
},
|
|
105
103
|
methods: {
|
|
106
104
|
shownColLabel({ text, locale }) {
|
|
107
105
|
if (!text && locale) {
|
|
@@ -26,19 +26,14 @@
|
|
|
26
26
|
transform: `translateX(${activeLineOffset}px)`
|
|
27
27
|
}"
|
|
28
28
|
class="wt-tab__underline--highlight"
|
|
29
|
-
|
|
29
|
+
></div>
|
|
30
30
|
</div>
|
|
31
31
|
</nav>
|
|
32
32
|
</template>
|
|
33
33
|
|
|
34
34
|
<script>
|
|
35
35
|
export default {
|
|
36
|
-
name: '
|
|
37
|
-
|
|
38
|
-
model: {
|
|
39
|
-
prop: 'current',
|
|
40
|
-
event: 'change',
|
|
41
|
-
},
|
|
36
|
+
name: 'wt-tabs',
|
|
42
37
|
props: {
|
|
43
38
|
current: {
|
|
44
39
|
type: Object,
|
|
@@ -50,6 +45,11 @@ export default {
|
|
|
50
45
|
},
|
|
51
46
|
},
|
|
52
47
|
|
|
48
|
+
model: {
|
|
49
|
+
prop: 'current',
|
|
50
|
+
event: 'change',
|
|
51
|
+
},
|
|
52
|
+
|
|
53
53
|
data: () => ({
|
|
54
54
|
activeLineWidth: 0,
|
|
55
55
|
activeLineOffset: 0,
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
class="wt-tags-input"
|
|
9
9
|
>
|
|
10
10
|
<wt-label
|
|
11
|
-
v-if="hasLabel"
|
|
12
11
|
v-bind="labelProps"
|
|
12
|
+
v-if="hasLabel"
|
|
13
13
|
:disabled="disabled"
|
|
14
14
|
:invalid="invalid"
|
|
15
15
|
class="wt-tags-input__label"
|
|
@@ -18,9 +18,7 @@
|
|
|
18
18
|
<slot
|
|
19
19
|
v-bind="{ label }"
|
|
20
20
|
name="label"
|
|
21
|
-
>
|
|
22
|
-
{{ requiredLabel }}
|
|
23
|
-
</slot>
|
|
21
|
+
>{{ requiredLabel }}</slot>
|
|
24
22
|
</wt-label>
|
|
25
23
|
|
|
26
24
|
<vue-multiselect
|
|
@@ -40,20 +38,21 @@
|
|
|
40
38
|
multiple
|
|
41
39
|
v-on="listeners"
|
|
42
40
|
>
|
|
41
|
+
|
|
43
42
|
<!-- Slot that is used for all selected options (tags)-->
|
|
44
|
-
<template
|
|
43
|
+
<template v-slot:tag="{ option, remove }">
|
|
45
44
|
<wt-chip class="multiselect__custom-tag">
|
|
46
45
|
{{ getTagOptionLabel({ option, optionLabel }) }}
|
|
47
46
|
<wt-icon-btn
|
|
48
47
|
icon="close--filled"
|
|
49
48
|
size="sm"
|
|
50
49
|
@click="remove(option)"
|
|
51
|
-
|
|
50
|
+
></wt-icon-btn>
|
|
52
51
|
</wt-chip>
|
|
53
52
|
</template>
|
|
54
53
|
|
|
55
54
|
<!-- Slot for custom option template -->
|
|
56
|
-
<template
|
|
55
|
+
<template v-slot:option="{ option }">
|
|
57
56
|
<slot
|
|
58
57
|
v-bind="{ option, optionLabel }"
|
|
59
58
|
name="option"
|
|
@@ -63,7 +62,7 @@
|
|
|
63
62
|
</template>
|
|
64
63
|
|
|
65
64
|
<!-- Element for opening and closing the dropdown -->
|
|
66
|
-
<template
|
|
65
|
+
<template v-slot:caret="{ toggle }">
|
|
67
66
|
<!-- @mousedown.native.prevent.stop="toggle": https://github.com/shentao/vue-multiselect/issues/1204#issuecomment-615114727 -->
|
|
68
67
|
<wt-icon-btn
|
|
69
68
|
:disabled="disabled"
|
|
@@ -71,31 +70,24 @@
|
|
|
71
70
|
color="active"
|
|
72
71
|
icon="arrow-down"
|
|
73
72
|
@mousedown.prevent.stop="toggle"
|
|
74
|
-
|
|
73
|
+
></wt-icon-btn>
|
|
75
74
|
</template>
|
|
76
75
|
|
|
77
|
-
<template
|
|
78
|
-
<div
|
|
79
|
-
|
|
80
|
-
class="multiselect__loading-wrapper"
|
|
81
|
-
>
|
|
82
|
-
<wt-loader size="sm" />
|
|
76
|
+
<template v-slot:beforeList>
|
|
77
|
+
<div v-show="isLoading" class="multiselect__loading-wrapper">
|
|
78
|
+
<wt-loader size="sm"></wt-loader>
|
|
83
79
|
</div>
|
|
84
80
|
</template>
|
|
85
81
|
|
|
86
|
-
<template
|
|
87
|
-
v-
|
|
88
|
-
#afterList
|
|
89
|
-
>
|
|
90
|
-
<div v-observe-visibility="handleAfterListIntersect" />
|
|
82
|
+
<template v-if="showIntersectionObserver" v-slot:afterList>
|
|
83
|
+
<div v-observe-visibility="handleAfterListIntersect"></div>
|
|
91
84
|
</template>
|
|
92
85
|
</vue-multiselect>
|
|
93
86
|
|
|
94
87
|
<wt-input-info
|
|
95
88
|
v-if="isValidation"
|
|
96
89
|
:invalid="invalid"
|
|
97
|
-
>
|
|
98
|
-
{{ validationText }}
|
|
90
|
+
>{{ validationText }}
|
|
99
91
|
</wt-input-info>
|
|
100
92
|
</div>
|
|
101
93
|
</template>
|
|
@@ -104,7 +96,7 @@
|
|
|
104
96
|
import multiselectMixin from '../wt-select/mixins/multiselectMixin';
|
|
105
97
|
|
|
106
98
|
export default {
|
|
107
|
-
name: '
|
|
99
|
+
name: 'wt-tags-input',
|
|
108
100
|
mixins: [multiselectMixin],
|
|
109
101
|
props: {
|
|
110
102
|
value: {
|
|
@@ -16,8 +16,7 @@
|
|
|
16
16
|
<slot
|
|
17
17
|
name="label"
|
|
18
18
|
v-bind="{ label }"
|
|
19
|
-
>
|
|
20
|
-
{{ requiredLabel }}
|
|
19
|
+
>{{ requiredLabel }}
|
|
21
20
|
</slot>
|
|
22
21
|
</wt-label>
|
|
23
22
|
<div class="wt-textarea__wrapper">
|
|
@@ -29,12 +28,9 @@
|
|
|
29
28
|
:value="value"
|
|
30
29
|
class="wt-textarea__textarea"
|
|
31
30
|
v-on="listeners"
|
|
32
|
-
|
|
33
|
-
<div
|
|
34
|
-
|
|
35
|
-
class="wt-textarea__after-wrapper"
|
|
36
|
-
>
|
|
37
|
-
<slot name="after-input" />
|
|
31
|
+
></textarea>
|
|
32
|
+
<div ref="after-wrapper" class="wt-textarea__after-wrapper">
|
|
33
|
+
<slot name="after-input"></slot>
|
|
38
34
|
<wt-icon-btn
|
|
39
35
|
:class="{ 'hidden': !value }"
|
|
40
36
|
:disabled="disabled"
|
|
@@ -42,14 +38,13 @@
|
|
|
42
38
|
icon="close--filled"
|
|
43
39
|
size="sm"
|
|
44
40
|
@click="$emit('input', '')"
|
|
45
|
-
|
|
41
|
+
></wt-icon-btn>
|
|
46
42
|
</div>
|
|
47
43
|
</div>
|
|
48
44
|
<wt-input-info
|
|
49
45
|
v-if="isValidation"
|
|
50
46
|
:invalid="invalid"
|
|
51
|
-
>
|
|
52
|
-
{{ validationText }}
|
|
47
|
+
>{{ validationText }}
|
|
53
48
|
</wt-input-info>
|
|
54
49
|
</div>
|
|
55
50
|
</template>
|
|
@@ -58,7 +53,7 @@
|
|
|
58
53
|
import validationMixin from '../../mixins/validationMixin/validationMixin';
|
|
59
54
|
|
|
60
55
|
export default {
|
|
61
|
-
name: '
|
|
56
|
+
name: 'wt-textarea',
|
|
62
57
|
mixins: [validationMixin],
|
|
63
58
|
props: {
|
|
64
59
|
/**
|
|
@@ -119,9 +114,6 @@ export default {
|
|
|
119
114
|
return this.required ? `${this.label}*` : this.label;
|
|
120
115
|
},
|
|
121
116
|
},
|
|
122
|
-
mounted() {
|
|
123
|
-
this.updateInputPaddings();
|
|
124
|
-
},
|
|
125
117
|
|
|
126
118
|
methods: {
|
|
127
119
|
handleKeypress(event) {
|
|
@@ -141,6 +133,9 @@ export default {
|
|
|
141
133
|
inputEl.style.paddingRight = `calc(${defaultInputPadding} * 2 + ${afterWrapperWidth}px)`;
|
|
142
134
|
},
|
|
143
135
|
},
|
|
136
|
+
mounted() {
|
|
137
|
+
this.updateInputPaddings();
|
|
138
|
+
},
|
|
144
139
|
};
|
|
145
140
|
</script>
|
|
146
141
|
|