@webitel/ui-sdk 25.10.34 → 25.10.36
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": "25.10.
|
|
3
|
+
"version": "25.10.36",
|
|
4
4
|
"private": false,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"make-all": "npm version patch --git-tag-version false && npm run build && (npm run build:types || true) && (npm run lint:fix || true) && npm run publish-lib",
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<p-table
|
|
3
|
-
ref="table"
|
|
2
|
+
<p-table
|
|
4
3
|
:key="tableKey"
|
|
5
|
-
|
|
6
|
-
:
|
|
7
|
-
:
|
|
4
|
+
ref="table"
|
|
5
|
+
:reorderable-columns="reorderableColumns"
|
|
6
|
+
:resizable-columns="resizableColumns"
|
|
8
7
|
:row-class="rowClass"
|
|
9
8
|
:row-style="rowStyle"
|
|
9
|
+
:show-headers="!headless"
|
|
10
|
+
:value="data"
|
|
11
|
+
class="wt-table"
|
|
12
|
+
column-resize-mode="expand"
|
|
10
13
|
lazy
|
|
11
|
-
scrollable
|
|
12
14
|
scroll-height="flex"
|
|
13
|
-
|
|
14
|
-
:reorderable-columns="reorderableColumns"
|
|
15
|
-
column-resize-mode="expand"
|
|
15
|
+
scrollable
|
|
16
16
|
@sort="sort"
|
|
17
17
|
@column-resize-end="columnResize"
|
|
18
18
|
@column-reorder="columnReorder"
|
|
@@ -20,40 +20,40 @@
|
|
|
20
20
|
>
|
|
21
21
|
<p-column
|
|
22
22
|
v-if="rowReorder"
|
|
23
|
-
column-key="row-reorder"
|
|
24
|
-
row-reorder
|
|
25
|
-
:reorderable-column="false"
|
|
26
|
-
header-style="width: 1%;"
|
|
27
|
-
body-style="width: 1%;"
|
|
28
23
|
:pt="{
|
|
29
|
-
columnresizer: {
|
|
30
|
-
class: {
|
|
31
|
-
'hidden': true
|
|
32
|
-
}
|
|
24
|
+
columnresizer: {
|
|
25
|
+
class: {
|
|
26
|
+
'hidden': true
|
|
27
|
+
}
|
|
33
28
|
}
|
|
34
29
|
}"
|
|
30
|
+
:reorderable-column="false"
|
|
31
|
+
body-style="width: 1%;"
|
|
32
|
+
column-key="row-reorder"
|
|
33
|
+
header-style="width: 1%;"
|
|
34
|
+
row-reorder
|
|
35
35
|
>
|
|
36
36
|
<template #body="{ data: row }">
|
|
37
37
|
<wt-icon
|
|
38
38
|
v-if="!isRowReorderDisabled(row)"
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
data-pc-section="reorderablerowhandle"
|
|
40
|
+
icon="move"
|
|
41
41
|
/>
|
|
42
42
|
</template>
|
|
43
43
|
</p-column>
|
|
44
44
|
<p-column
|
|
45
45
|
v-if="selectable"
|
|
46
|
-
column-key="row-select"
|
|
47
|
-
:reorderable-column="false"
|
|
48
|
-
header-style="width: 1%;"
|
|
49
|
-
body-style="width: 1%;"
|
|
50
46
|
:pt="{
|
|
51
|
-
columnresizer: {
|
|
52
|
-
class: {
|
|
53
|
-
'hidden': true
|
|
54
|
-
}
|
|
47
|
+
columnresizer: {
|
|
48
|
+
class: {
|
|
49
|
+
'hidden': true
|
|
50
|
+
}
|
|
55
51
|
}
|
|
56
52
|
}"
|
|
53
|
+
:reorderable-column="false"
|
|
54
|
+
body-style="width: 1%;"
|
|
55
|
+
column-key="row-select"
|
|
56
|
+
header-style="width: 1%;"
|
|
57
57
|
>
|
|
58
58
|
<template #header>
|
|
59
59
|
<wt-checkbox
|
|
@@ -71,18 +71,18 @@
|
|
|
71
71
|
/>
|
|
72
72
|
</template>
|
|
73
73
|
</p-column>
|
|
74
|
-
<p-column
|
|
74
|
+
<p-column
|
|
75
75
|
v-for="(col, idx) of dataHeaders"
|
|
76
76
|
:key="col.value"
|
|
77
77
|
:column-key="col.field"
|
|
78
78
|
:field="col.field"
|
|
79
|
-
:sortable="isColSortable(col)"
|
|
80
79
|
:hidden="isColumnHidden(col)"
|
|
81
80
|
:pt="{
|
|
82
81
|
root: {
|
|
83
82
|
'data-column-field': col.field // required for column-resizer to get column field
|
|
84
83
|
}
|
|
85
84
|
}"
|
|
85
|
+
:sortable="isColSortable(col)"
|
|
86
86
|
>
|
|
87
87
|
|
|
88
88
|
<template #header>
|
|
@@ -108,11 +108,11 @@
|
|
|
108
108
|
@slot Customize data columns. Recommended for representing nested data structures like object or array, and adding specific elements like select or chip
|
|
109
109
|
@scope [ { "name": "item", "description": "Data row object" }, { "name": "index", "description": "Data row index" } ]
|
|
110
110
|
-->
|
|
111
|
-
<div
|
|
111
|
+
<div
|
|
112
112
|
:style="columnStyle(col)"
|
|
113
113
|
class="wt-table__td__content"
|
|
114
114
|
>
|
|
115
|
-
<!-- check if row exists (under certain conditions row can be missing, e.g., during async data loading)
|
|
115
|
+
<!-- check if row exists (under certain conditions row can be missing, e.g., during async data loading)
|
|
116
116
|
this guard prevents rendering errors and keeps the table stable -->
|
|
117
117
|
<slot
|
|
118
118
|
v-if="row"
|
|
@@ -122,11 +122,11 @@
|
|
|
122
122
|
>{{ row[col.value] }}</slot>
|
|
123
123
|
</div>
|
|
124
124
|
</template>
|
|
125
|
-
<!-- empty sorticon slot for hiding default sort icon, custom icon is rendered in header -->
|
|
125
|
+
<!-- empty sorticon slot for hiding default sort icon, custom icon is rendered in header -->
|
|
126
126
|
<template #sorticon>
|
|
127
127
|
</template>
|
|
128
128
|
<template
|
|
129
|
-
v-if="isTableColumnFooters"
|
|
129
|
+
v-if="isTableColumnFooters"
|
|
130
130
|
#footer
|
|
131
131
|
>
|
|
132
132
|
<!--
|
|
@@ -138,10 +138,10 @@
|
|
|
138
138
|
</p-column>
|
|
139
139
|
<p-column
|
|
140
140
|
v-if="gridActions"
|
|
141
|
-
column-key="row-actions"
|
|
142
|
-
style="width: 112px;"
|
|
143
141
|
:frozen="fixedActions"
|
|
144
142
|
align-frozen="right"
|
|
143
|
+
column-key="row-actions"
|
|
144
|
+
style="width: 112px;"
|
|
145
145
|
>
|
|
146
146
|
<template #header>
|
|
147
147
|
<!-- @slot Table head actions row slot -->
|
|
@@ -154,11 +154,11 @@
|
|
|
154
154
|
-->
|
|
155
155
|
<div class="wt-table__td__actions">
|
|
156
156
|
<!-- check if row exists to prevent rendering errors -->
|
|
157
|
-
<slot
|
|
157
|
+
<slot
|
|
158
158
|
v-if="actionsData"
|
|
159
|
-
|
|
160
|
-
:index="index"
|
|
159
|
+
:index="index"
|
|
161
160
|
:item="actionsData"
|
|
161
|
+
name="actions"
|
|
162
162
|
/>
|
|
163
163
|
</div>
|
|
164
164
|
</template>
|
|
@@ -172,7 +172,7 @@
|
|
|
172
172
|
</p-table>
|
|
173
173
|
</template>
|
|
174
174
|
|
|
175
|
-
<script
|
|
175
|
+
<script lang="ts" setup>
|
|
176
176
|
import type { DataTableProps } from 'primevue';
|
|
177
177
|
import { computed, defineProps, ref, useSlots,useTemplateRef, withDefaults } from 'vue';
|
|
178
178
|
import { useI18n } from 'vue-i18n';
|
|
@@ -254,7 +254,7 @@ const excludeColumnsFromReorder = ['row-select', 'row-reorder', 'row-actions']
|
|
|
254
254
|
|
|
255
255
|
const _selected = computed(() => {
|
|
256
256
|
// _isSelected for backwards compatibility
|
|
257
|
-
return props.selectable
|
|
257
|
+
return props.selectable
|
|
258
258
|
? props.selected || props.data.filter(item => item._isSelected)
|
|
259
259
|
: [];
|
|
260
260
|
});
|
|
@@ -366,16 +366,9 @@ const columnResize = ({element}) => {
|
|
|
366
366
|
emit('column-resize', { columnName: field, columnWidth: `${columnWidth}px` })
|
|
367
367
|
}
|
|
368
368
|
|
|
369
|
-
const columnReorder =
|
|
370
|
-
const newOrder = table.value.d_columnOrder.filter(col => !excludeColumnsFromReorder.includes(col))
|
|
371
|
-
|
|
372
|
-
//save scroll position after table rerender
|
|
373
|
-
const tableScrollTopPosition = table.value.$el.querySelector('.p-datatable-table').scrollTop
|
|
374
|
-
const tableScrollLeftPosition = table.value.$el.querySelector('.p-datatable-table').scrollLeft
|
|
375
|
-
tableKey.value += 1 // rerender table preventing unexpected behavior
|
|
376
|
-
table.value.$el.querySelector('.p-datatable-table').scrollTop = tableScrollTopPosition
|
|
377
|
-
table.value.$el.querySelector('.p-datatable-table').scrollLeft = tableScrollLeftPosition
|
|
378
|
-
|
|
369
|
+
const columnReorder = () => {
|
|
370
|
+
const newOrder = table.value.d_columnOrder.filter(col => !excludeColumnsFromReorder.includes(col));
|
|
371
|
+
tableKey.value += 1;
|
|
379
372
|
emit('column-reorder', newOrder)
|
|
380
373
|
}
|
|
381
374
|
</script>
|
|
@@ -400,28 +393,28 @@ const columnReorder = async ({dropIndex, originalEvent}) => {
|
|
|
400
393
|
|
|
401
394
|
.wt-table__th__content {
|
|
402
395
|
@extend %typo-body-1-bold;
|
|
403
|
-
white-space: nowrap;
|
|
404
396
|
width: 0;
|
|
397
|
+
white-space: nowrap;
|
|
405
398
|
}
|
|
406
399
|
|
|
407
400
|
.wt-table__td__content {
|
|
408
401
|
@extend %typo-body-1;
|
|
402
|
+
position: relative;
|
|
409
403
|
display: flex;
|
|
410
404
|
align-items: center;
|
|
411
|
-
position: relative;
|
|
412
405
|
}
|
|
413
406
|
|
|
414
407
|
.wt-table__td__actions {
|
|
415
408
|
display: flex;
|
|
416
|
-
justify-content: flex-end;
|
|
417
409
|
align-items: flex-start;
|
|
410
|
+
justify-content: flex-end;
|
|
418
411
|
gap: var(--spacing-xs);
|
|
419
412
|
}
|
|
420
413
|
|
|
421
414
|
.wt-table__th__sort-arrow {
|
|
422
415
|
position: absolute;
|
|
423
|
-
transform: translateY(-50%);
|
|
424
|
-
top: 50%;
|
|
425
416
|
z-index: 1;
|
|
417
|
+
top: 50%;
|
|
418
|
+
transform: translateY(-50%);
|
|
426
419
|
}
|
|
427
|
-
</style>
|
|
420
|
+
</style>
|
|
@@ -67,10 +67,7 @@ declare const handleSelection: (row: any, select: any) => void;
|
|
|
67
67
|
declare const columnResize: ({ element }: {
|
|
68
68
|
element: any;
|
|
69
69
|
}) => void;
|
|
70
|
-
declare const columnReorder: (
|
|
71
|
-
dropIndex: any;
|
|
72
|
-
originalEvent: any;
|
|
73
|
-
}) => Promise<void>;
|
|
70
|
+
declare const columnReorder: () => void;
|
|
74
71
|
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
75
72
|
declare var __VLS_55: string, __VLS_56: {
|
|
76
73
|
index: any;
|