@webitel/ui-sdk 26.8.94 → 26.8.96
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/{clients-Pw9u3exJ.js → clients-9rILOBrM.js} +60 -56
- package/dist/{components-DuzJmfos.js → components-Dost4BNg.js} +557 -601
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +2 -2
- package/dist/ui-sdk.umd.cjs +660 -657
- package/dist/wt-badge-tosjsmJU.js +53 -0
- package/dist/{wt-button-BwPz__rU.js → wt-button-CNQAK85M.js} +1 -1
- package/dist/{wt-chat-emoji-Cbxrn6eQ.js → wt-chat-emoji-DXC4OU5L.js} +3 -3
- package/dist/wt-checkbox-BBdi-1oS.js +87 -0
- package/dist/{wt-display-chip-items-9OseXL04.js → wt-display-chip-items-C1EJ62xe.js} +1 -1
- package/dist/{wt-icon-iRDqWkjp.js → wt-icon-ClDNfV5I.js} +1 -0
- package/dist/wt-icon-btn-DDElLZil.js +30 -0
- package/dist/{wt-notifications-bar-ZIMKBDqL.js → wt-notifications-bar-DZidZ2VZ.js} +1 -1
- package/dist/{wt-player-CqjIR3Q-.js → wt-player-CxMTs3eF.js} +2 -2
- package/dist/{wt-send-message-popup-Dr8dIFb4.js → wt-send-message-popup-BSLk9osS.js} +2 -2
- package/dist/wt-table-DHpnLu_f.js +438 -0
- package/dist/{wt-toast-BcgNZFCD.js → wt-toast-DKjRJFE2.js} +1 -1
- package/dist/{wt-tree-table-D4nCNUq_.js → wt-tree-table-DDH6vMh7.js} +2 -1
- package/dist/{wt-type-extension-value-input-CnKUoOuC.js → wt-type-extension-value-input-ZqfUFvcs.js} +2 -2
- package/dist/{wt-vidstack-player-BBRsZ-GL.js → wt-vidstack-player-BtSrpzDY.js} +3 -3
- package/package.json +1 -1
- package/src/assets/icons/sprite/index.ts +2 -0
- package/src/assets/icons/sprite/table-filter.svg +3 -0
- package/src/components/wt-table/_internals/wt-table-column-filter.vue +76 -0
- package/src/components/wt-table/types/WtTable.ts +20 -0
- package/src/components/wt-table/wt-table.vue +75 -7
- package/types/.tsbuildinfo +1 -1
- package/types/components/wt-table/_internals/wt-table-column-filter.vue.d.ts +29 -0
- package/types/components/wt-table/types/WtTable.d.ts +17 -0
- package/types/components/wt-table/wt-table.vue.d.ts +25 -12
- package/dist/wt-icon-btn-BzraLc-w.js +0 -110
- package/dist/wt-table-C-DMIrud.js +0 -377
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<div class="wt-table">
|
|
3
|
+
<div
|
|
4
|
+
v-if="isEmptyOverlayActive"
|
|
5
|
+
class="wt-table__empty"
|
|
6
|
+
>
|
|
7
|
+
<slot name="empty" />
|
|
8
|
+
</div>
|
|
9
|
+
<p-table
|
|
3
10
|
:key="tableKey"
|
|
4
11
|
ref="table"
|
|
5
12
|
:expanded-rows="expandedRows"
|
|
@@ -12,6 +19,7 @@
|
|
|
12
19
|
:value="data"
|
|
13
20
|
:sort-field="sortField"
|
|
14
21
|
:data-key="props.dataKey"
|
|
22
|
+
:class="{ 'wt-table__wrapper--overlay': isEmptyOverlayActive }"
|
|
15
23
|
class="wt-table"
|
|
16
24
|
column-resize-mode="expand"
|
|
17
25
|
lazy
|
|
@@ -121,8 +129,14 @@
|
|
|
121
129
|
:header="col"
|
|
122
130
|
:name="`header-${col.value}`"
|
|
123
131
|
>
|
|
124
|
-
<div
|
|
125
|
-
|
|
132
|
+
<div
|
|
133
|
+
:style="columnStyle(col)"
|
|
134
|
+
class="wt-table__th__content typo-body-1-bold"
|
|
135
|
+
>
|
|
136
|
+
<span
|
|
137
|
+
v-tooltip="col.text"
|
|
138
|
+
class="wt-table__th__title"
|
|
139
|
+
>
|
|
126
140
|
{{ col.text }}
|
|
127
141
|
</span>
|
|
128
142
|
<wt-icon
|
|
@@ -137,6 +151,26 @@
|
|
|
137
151
|
icon="sort-arrow-down"
|
|
138
152
|
size="sm"
|
|
139
153
|
/>
|
|
154
|
+
<wt-table-column-filter
|
|
155
|
+
v-if="col.filter && $slots['column-filter']"
|
|
156
|
+
:active="!!col.filtered"
|
|
157
|
+
>
|
|
158
|
+
<template #default="{ hide }">
|
|
159
|
+
<slot
|
|
160
|
+
:header="col"
|
|
161
|
+
:hide="hide"
|
|
162
|
+
:form-view="true"
|
|
163
|
+
name="column-filter"
|
|
164
|
+
/>
|
|
165
|
+
</template>
|
|
166
|
+
<template #preview>
|
|
167
|
+
<slot
|
|
168
|
+
:header="col"
|
|
169
|
+
:form-view="false"
|
|
170
|
+
name="column-filter"
|
|
171
|
+
/>
|
|
172
|
+
</template>
|
|
173
|
+
</wt-table-column-filter>
|
|
140
174
|
</div>
|
|
141
175
|
</slot>
|
|
142
176
|
</template>
|
|
@@ -215,7 +249,8 @@
|
|
|
215
249
|
>
|
|
216
250
|
<slot name="footer" />
|
|
217
251
|
</template>
|
|
218
|
-
|
|
252
|
+
</p-table>
|
|
253
|
+
</div>
|
|
219
254
|
</template>
|
|
220
255
|
|
|
221
256
|
<script lang="ts" setup>
|
|
@@ -234,6 +269,7 @@ import {
|
|
|
234
269
|
import { useI18n } from 'vue-i18n';
|
|
235
270
|
import { getNextSortOrder } from '../../scripts/sortQueryAdapters.js';
|
|
236
271
|
import { useTableColumnDrag } from '../_internals/composables';
|
|
272
|
+
import WtTableColumnFilter from './_internals/wt-table-column-filter.vue';
|
|
237
273
|
import type { WtTableHeader, WtTableRow } from './types/WtTable';
|
|
238
274
|
|
|
239
275
|
const DEFAULT_ITEM_SIZE = 40;
|
|
@@ -433,6 +469,10 @@ const isTableFooter = computed(() => {
|
|
|
433
469
|
return Object.keys(slots).some((slotName) => slotName === 'footer');
|
|
434
470
|
});
|
|
435
471
|
|
|
472
|
+
const isEmptyOverlayActive = computed(() => {
|
|
473
|
+
return !!slots.empty && !props.loading && !props.data.length;
|
|
474
|
+
});
|
|
475
|
+
|
|
436
476
|
const isAllSelected = computed(() => {
|
|
437
477
|
return _selected.value.length === props.data.length && props.data.length > 0;
|
|
438
478
|
});
|
|
@@ -583,15 +623,32 @@ onUnmounted(() => {
|
|
|
583
623
|
|
|
584
624
|
<style scoped>
|
|
585
625
|
.wt-table {
|
|
626
|
+
position: relative;
|
|
586
627
|
overflow: auto;
|
|
628
|
+
height: 100%;
|
|
587
629
|
}
|
|
588
630
|
|
|
589
631
|
/* style for virtual scroller */
|
|
590
632
|
.wt-table :deep(.wt-table__th__content) {
|
|
633
|
+
display: flex;
|
|
634
|
+
flex-grow: 1;
|
|
635
|
+
align-items: center;
|
|
636
|
+
gap: var(--spacing-2xs);
|
|
591
637
|
width: 0;
|
|
592
638
|
white-space: nowrap;
|
|
593
639
|
}
|
|
594
640
|
|
|
641
|
+
.wt-table :deep(.wt-table__th__title) {
|
|
642
|
+
min-width: 0;
|
|
643
|
+
overflow: hidden;
|
|
644
|
+
text-overflow: ellipsis;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
.wt-table :deep(.wt-table-column-filter) {
|
|
648
|
+
margin-left: auto;
|
|
649
|
+
flex-shrink: 0;
|
|
650
|
+
}
|
|
651
|
+
|
|
595
652
|
.wt-table :deep(.wt-table__td__content) {
|
|
596
653
|
position: relative;
|
|
597
654
|
display: flex;
|
|
@@ -606,9 +663,20 @@ onUnmounted(() => {
|
|
|
606
663
|
}
|
|
607
664
|
|
|
608
665
|
.wt-table :deep(.wt-table__th__sort-arrow) {
|
|
609
|
-
|
|
666
|
+
flex-shrink: 0;
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
.wt-table :deep(.p-datatable-column-resizer) {
|
|
610
670
|
z-index: 1;
|
|
611
|
-
|
|
612
|
-
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
.wt-table__empty {
|
|
674
|
+
position: absolute;
|
|
675
|
+
inset: 0;
|
|
676
|
+
display: flex;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
.wt-table :deep(.wt-table__wrapper--overlay tr.p-datatable-empty-message) {
|
|
680
|
+
display: none;
|
|
613
681
|
}
|
|
614
682
|
</style>
|