@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
|
@@ -0,0 +1,438 @@
|
|
|
1
|
+
import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
2
|
+
import { l as t } from "./enums-B_9ZBu01.js";
|
|
3
|
+
import { t as n } from "./wt-badge-tosjsmJU.js";
|
|
4
|
+
import { t as r } from "./vue-i18n-B88GcHzn.js";
|
|
5
|
+
import { n as i, t as a } from "./sortQueryAdapters-CyYXvnDN.js";
|
|
6
|
+
import { t as o } from "./wt-icon-btn-DDElLZil.js";
|
|
7
|
+
import { t as s } from "./composables-OP5kSvlh.js";
|
|
8
|
+
import { t as c } from "./wt-popover-DuZFw3bg.js";
|
|
9
|
+
import { Fragment as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createSlots as h, createTextVNode as g, createVNode as _, defineComponent as v, guardReactiveProps as y, nextTick as b, normalizeClass as x, normalizeProps as S, normalizeStyle as C, onMounted as w, onUnmounted as T, openBlock as E, ref as D, renderList as ee, renderSlot as O, resolveComponent as k, resolveDirective as te, toDisplayString as A, unref as j, useSlots as M, useTemplateRef as ne, withCtx as N, withDirectives as P, withModifiers as F } from "vue";
|
|
10
|
+
//#region src/components/wt-table/_internals/wt-table-column-filter.vue?vue&type=script&setup=true&lang.ts
|
|
11
|
+
var I = ["onPointerenter", "onPointerleave"], L = /*#__PURE__*/ e(/* @__PURE__ */ v({
|
|
12
|
+
__name: "wt-table-column-filter",
|
|
13
|
+
props: { active: { type: Boolean } },
|
|
14
|
+
setup(e) {
|
|
15
|
+
let r = e, i = M(), a = (e, t) => {
|
|
16
|
+
r.active && i.preview && t(e);
|
|
17
|
+
}, s = (e, t, n) => {
|
|
18
|
+
n(), t(e);
|
|
19
|
+
};
|
|
20
|
+
return (r, i) => (E(), d(c, { class: "wt-table-column-filter" }, {
|
|
21
|
+
activator: N(({ toggle: l }) => [_(c, { class: "wt-table-column-filter__preview" }, {
|
|
22
|
+
activator: N(({ show: r, hide: c }) => [m("div", {
|
|
23
|
+
class: "wt-table-column-filter__wrapper",
|
|
24
|
+
"data-pc-section": "columnfilterbutton",
|
|
25
|
+
onPointerenter: (e) => a(e, r),
|
|
26
|
+
onPointerleave: c
|
|
27
|
+
}, [_(n, { hidden: !e.active }, {
|
|
28
|
+
default: N(() => [_(o, {
|
|
29
|
+
icon: "table-filter",
|
|
30
|
+
size: j(t).SM,
|
|
31
|
+
onClick: (e) => s(e, l, c),
|
|
32
|
+
onMousedown: i[0] ||= F(() => {}, ["stop"])
|
|
33
|
+
}, null, 8, ["size", "onClick"])], void 0, !0),
|
|
34
|
+
_: 2
|
|
35
|
+
}, 1032, ["hidden"])], 40, I)]),
|
|
36
|
+
default: N(() => [O(r.$slots, "preview", {}, void 0, !0)]),
|
|
37
|
+
_: 2
|
|
38
|
+
}, 1024)]),
|
|
39
|
+
default: N(({ hide: e }) => [O(r.$slots, "default", S(y({ hide: e })), void 0, !0)]),
|
|
40
|
+
_: 3
|
|
41
|
+
}));
|
|
42
|
+
}
|
|
43
|
+
}), [["__scopeId", "data-v-e55022a4"]]), R = { class: "wt-table" }, z = {
|
|
44
|
+
key: 0,
|
|
45
|
+
class: "wt-table__empty"
|
|
46
|
+
}, B = { class: "wt-table__th__title" }, V = { class: "wt-table__td__actions" }, H = /*#__PURE__*/ e(/* @__PURE__ */ v({
|
|
47
|
+
__name: "wt-table",
|
|
48
|
+
props: {
|
|
49
|
+
headers: { default: () => [] },
|
|
50
|
+
data: { default: () => [] },
|
|
51
|
+
sortable: {
|
|
52
|
+
type: Boolean,
|
|
53
|
+
default: !1
|
|
54
|
+
},
|
|
55
|
+
selectable: {
|
|
56
|
+
type: Boolean,
|
|
57
|
+
default: !0
|
|
58
|
+
},
|
|
59
|
+
selected: {},
|
|
60
|
+
gridActions: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
default: !0
|
|
63
|
+
},
|
|
64
|
+
fixedActions: {
|
|
65
|
+
type: Boolean,
|
|
66
|
+
default: !1
|
|
67
|
+
},
|
|
68
|
+
headless: {
|
|
69
|
+
type: Boolean,
|
|
70
|
+
default: !1
|
|
71
|
+
},
|
|
72
|
+
stripedRows: {
|
|
73
|
+
type: Boolean,
|
|
74
|
+
default: !1
|
|
75
|
+
},
|
|
76
|
+
rowReorder: {
|
|
77
|
+
type: Boolean,
|
|
78
|
+
default: !1
|
|
79
|
+
},
|
|
80
|
+
dataKey: { default: "" },
|
|
81
|
+
isRowReorderDisabled: {
|
|
82
|
+
type: Function,
|
|
83
|
+
default: () => !1
|
|
84
|
+
},
|
|
85
|
+
rowExpansion: {
|
|
86
|
+
type: Boolean,
|
|
87
|
+
default: !1
|
|
88
|
+
},
|
|
89
|
+
rowClass: {
|
|
90
|
+
type: Function,
|
|
91
|
+
default: () => ""
|
|
92
|
+
},
|
|
93
|
+
rowStyle: {
|
|
94
|
+
type: Function,
|
|
95
|
+
default: () => ({})
|
|
96
|
+
},
|
|
97
|
+
resizableColumns: {
|
|
98
|
+
type: Boolean,
|
|
99
|
+
default: !1
|
|
100
|
+
},
|
|
101
|
+
reorderableColumns: {
|
|
102
|
+
type: Boolean,
|
|
103
|
+
default: !1
|
|
104
|
+
},
|
|
105
|
+
rowExpansionDisabled: {
|
|
106
|
+
type: Function,
|
|
107
|
+
default: () => !1
|
|
108
|
+
},
|
|
109
|
+
lazy: {
|
|
110
|
+
type: Boolean,
|
|
111
|
+
default: !1
|
|
112
|
+
},
|
|
113
|
+
onLoading: {},
|
|
114
|
+
loading: { type: Boolean },
|
|
115
|
+
itemSize: { default: 40 },
|
|
116
|
+
value: {},
|
|
117
|
+
rows: {},
|
|
118
|
+
first: {},
|
|
119
|
+
totalRecords: {},
|
|
120
|
+
paginator: { type: Boolean },
|
|
121
|
+
paginatorPosition: {},
|
|
122
|
+
alwaysShowPaginator: { type: Boolean },
|
|
123
|
+
paginatorTemplate: {},
|
|
124
|
+
pageLinkSize: {},
|
|
125
|
+
rowsPerPageOptions: {},
|
|
126
|
+
currentPageReportTemplate: {},
|
|
127
|
+
loadingIcon: {},
|
|
128
|
+
sortField: {},
|
|
129
|
+
sortOrder: {},
|
|
130
|
+
nullSortOrder: {},
|
|
131
|
+
defaultSortOrder: {},
|
|
132
|
+
multiSortMeta: {},
|
|
133
|
+
sortMode: {},
|
|
134
|
+
removableSort: { type: Boolean },
|
|
135
|
+
filters: {},
|
|
136
|
+
filterDisplay: {},
|
|
137
|
+
globalFilterFields: {},
|
|
138
|
+
filterLocale: {},
|
|
139
|
+
selection: {},
|
|
140
|
+
selectionMode: {},
|
|
141
|
+
compareSelectionBy: {},
|
|
142
|
+
metaKeySelection: { type: Boolean },
|
|
143
|
+
contextMenu: { type: Boolean },
|
|
144
|
+
contextMenuSelection: {},
|
|
145
|
+
selectAll: {},
|
|
146
|
+
rowHover: { type: Boolean },
|
|
147
|
+
csvSeparator: {},
|
|
148
|
+
exportFilename: {},
|
|
149
|
+
exportFunction: {},
|
|
150
|
+
columnResizeMode: {},
|
|
151
|
+
expandedRows: {},
|
|
152
|
+
expandedRowIcon: {},
|
|
153
|
+
collapsedRowIcon: {},
|
|
154
|
+
rowGroupMode: {},
|
|
155
|
+
groupRowsBy: {},
|
|
156
|
+
expandableRowGroups: { type: Boolean },
|
|
157
|
+
expandedRowGroups: {},
|
|
158
|
+
stateStorage: {},
|
|
159
|
+
stateKey: {},
|
|
160
|
+
editMode: {},
|
|
161
|
+
editingRows: {},
|
|
162
|
+
scrollable: { type: Boolean },
|
|
163
|
+
scrollHeight: {},
|
|
164
|
+
virtualScrollerOptions: {},
|
|
165
|
+
frozenValue: {},
|
|
166
|
+
breakpoint: {},
|
|
167
|
+
showHeaders: { type: Boolean },
|
|
168
|
+
showGridlines: { type: Boolean },
|
|
169
|
+
highlightOnSelect: { type: Boolean },
|
|
170
|
+
size: {},
|
|
171
|
+
tableStyle: {},
|
|
172
|
+
tableClass: {},
|
|
173
|
+
tableProps: {},
|
|
174
|
+
filterInputProps: {},
|
|
175
|
+
filterButtonProps: {},
|
|
176
|
+
editButtonProps: {},
|
|
177
|
+
dt: {},
|
|
178
|
+
pt: {},
|
|
179
|
+
ptOptions: {},
|
|
180
|
+
unstyled: { type: Boolean }
|
|
181
|
+
},
|
|
182
|
+
emits: [
|
|
183
|
+
"sort",
|
|
184
|
+
"update:selected",
|
|
185
|
+
"reorder:row",
|
|
186
|
+
"column-resize",
|
|
187
|
+
"column-reorder"
|
|
188
|
+
],
|
|
189
|
+
setup(e, { emit: t }) {
|
|
190
|
+
let n = e, { t: o } = r(), c = M(), v = t, y = ({ dragIndex: e, dropIndex: t }) => v("reorder:row", {
|
|
191
|
+
oldIndex: e,
|
|
192
|
+
newIndex: t
|
|
193
|
+
}), S = ne("table"), j = D(0), I = D([]), { addTableDragListener: H, removeTableDragListener: U } = s(S, n.reorderableColumns), W = u(() => n.selectable ? n.selected || n.data.filter((e) => e._isSelected) : []), G = u(() => {
|
|
194
|
+
let e = n.headers.map((e) => !e.text && e.locale ? {
|
|
195
|
+
...e,
|
|
196
|
+
text: typeof e.locale == "string" ? o(e.locale) : o(...e.locale)
|
|
197
|
+
} : e), t = e.filter((e) => e.reorderable === !1), r = e.filter((e) => e.reorderable !== !1);
|
|
198
|
+
return [...t, ...r];
|
|
199
|
+
}), K = [
|
|
200
|
+
"row-select",
|
|
201
|
+
"row-reorder",
|
|
202
|
+
"row-actions",
|
|
203
|
+
"row-expander"
|
|
204
|
+
], q = u(() => [...G.value.filter((e) => e.reorderable === !1).map((e) => e.field || e.value), ...K]), J = (e) => e.show === !1, Y = (e) => ({ minWidth: e.width || "140px" }), X = u(() => Object.keys(c).some((e) => e.includes("-footer"))), re = u(() => Object.keys(c).some((e) => e === "footer")), Z = u(() => !!c.empty && !n.loading && !n.data.length), Q = u(() => W.value.length === n.data.length && n.data.length > 0), ie = u(() => n.headers.find((e) => e.sort === a.ASC || e.sort === a.DESC)?.field ?? null), ae = ({ sortField: e }) => {
|
|
205
|
+
let t = G.value.find((t) => t.field === e);
|
|
206
|
+
if (!t || !$(t)) return;
|
|
207
|
+
let n = i(t.sort);
|
|
208
|
+
v("sort", t, n);
|
|
209
|
+
}, $ = ({ sort: e }) => n.sortable && e !== void 0, oe = () => {
|
|
210
|
+
n.selected ? Q.value ? v("update:selected", []) : v("update:selected", [...n.data]) : Q.value ? n.data.forEach((e) => {
|
|
211
|
+
e._isSelected = !1;
|
|
212
|
+
}) : n.data.forEach((e) => {
|
|
213
|
+
e._isSelected = !0;
|
|
214
|
+
});
|
|
215
|
+
}, se = (e, t) => {
|
|
216
|
+
n.selected ? t ? v("update:selected", [...W.value, e]) : v("update:selected", W.value.filter((t) => t !== e)) : e._isSelected = !e._isSelected;
|
|
217
|
+
}, ce = ({ element: e }) => {
|
|
218
|
+
let t = e.getAttribute("data-column-field"), n = getComputedStyle(e), r = Number.parseFloat(n.paddingLeft), i = Number.parseFloat(n.paddingRight), a = e.offsetWidth - r - i;
|
|
219
|
+
v("column-resize", {
|
|
220
|
+
columnName: t,
|
|
221
|
+
columnWidth: `${a}px`
|
|
222
|
+
});
|
|
223
|
+
}, le = () => {
|
|
224
|
+
let e = S.value?.$el?.querySelector(".p-datatable-table-container")?.scrollLeft, t = S.value?.d_columnOrder.filter((e) => !q.value.includes(e));
|
|
225
|
+
j.value += 1, v("column-reorder", t), b(() => {
|
|
226
|
+
H();
|
|
227
|
+
let t = S.value?.$el?.querySelector(".p-datatable-table-container");
|
|
228
|
+
t && (t.scrollLeft = e);
|
|
229
|
+
});
|
|
230
|
+
}, ue = (e) => I.value.some((t) => t?.id === e?.id), de = (e) => {
|
|
231
|
+
let t = I.value.findIndex((t) => t.id === e.id);
|
|
232
|
+
t === -1 ? I.value.push(e) : I.value.splice(t, 1);
|
|
233
|
+
}, fe = u(() => {
|
|
234
|
+
if (n.lazy) return {
|
|
235
|
+
lazy: n.lazy,
|
|
236
|
+
onLazyLoad: n.onLoading,
|
|
237
|
+
itemSize: n.itemSize,
|
|
238
|
+
numToleratedItems: n.data.length,
|
|
239
|
+
totalRecords: n.data.length,
|
|
240
|
+
autoSize: !0
|
|
241
|
+
};
|
|
242
|
+
});
|
|
243
|
+
return w(() => {
|
|
244
|
+
H();
|
|
245
|
+
}), T(() => {
|
|
246
|
+
U();
|
|
247
|
+
}), (t, r) => {
|
|
248
|
+
let i = k("wt-icon-btn"), a = k("p-column"), o = k("wt-icon"), s = k("wt-checkbox"), c = k("p-table"), u = te("tooltip");
|
|
249
|
+
return E(), p("div", R, [Z.value ? (E(), p("div", z, [O(t.$slots, "empty", {}, void 0, !0)])) : f("", !0), (E(), d(c, {
|
|
250
|
+
key: j.value,
|
|
251
|
+
ref_key: "table",
|
|
252
|
+
ref: S,
|
|
253
|
+
"expanded-rows": I.value,
|
|
254
|
+
"reorderable-columns": e.reorderableColumns,
|
|
255
|
+
"resizable-columns": e.resizableColumns,
|
|
256
|
+
"row-class": e.rowClass,
|
|
257
|
+
"row-style": e.rowStyle,
|
|
258
|
+
"show-headers": !e.headless,
|
|
259
|
+
"striped-rows": e.stripedRows,
|
|
260
|
+
value: e.data,
|
|
261
|
+
"sort-field": ie.value,
|
|
262
|
+
"data-key": n.dataKey,
|
|
263
|
+
class: x([{ "wt-table__wrapper--overlay": Z.value }, "wt-table"]),
|
|
264
|
+
"column-resize-mode": "expand",
|
|
265
|
+
lazy: "",
|
|
266
|
+
"scroll-height": "flex",
|
|
267
|
+
scrollable: "",
|
|
268
|
+
"virtual-scroller-options": fe.value,
|
|
269
|
+
pt: { tableContainer: "wt-scrollbar" },
|
|
270
|
+
onSort: ae,
|
|
271
|
+
"onUpdate:expandedRows": r[0] ||= (e) => I.value = e,
|
|
272
|
+
onColumnResizeEnd: ce,
|
|
273
|
+
onColumnReorder: le,
|
|
274
|
+
onRowReorder: y
|
|
275
|
+
}, h({
|
|
276
|
+
expansion: N(({ data: e }) => [m("div", null, [O(t.$slots, "expansion", { item: e }, void 0, !0)])]),
|
|
277
|
+
default: N(() => [
|
|
278
|
+
e.rowExpansion ? (E(), d(a, {
|
|
279
|
+
key: 0,
|
|
280
|
+
pt: { columnresizer: { class: { hidden: !0 } } },
|
|
281
|
+
"reorderable-column": !1,
|
|
282
|
+
"body-style": "width: 1%;",
|
|
283
|
+
"column-key": "row-expander",
|
|
284
|
+
"header-style": "width: 1%;"
|
|
285
|
+
}, {
|
|
286
|
+
body: N(({ data: e }) => [_(i, {
|
|
287
|
+
disabled: n.rowExpansionDisabled(e),
|
|
288
|
+
icon: ue(e) ? "arrow-down" : "arrow-right",
|
|
289
|
+
onClick: F((t) => de(e), ["stop"])
|
|
290
|
+
}, null, 8, [
|
|
291
|
+
"disabled",
|
|
292
|
+
"icon",
|
|
293
|
+
"onClick"
|
|
294
|
+
])]),
|
|
295
|
+
_: 1
|
|
296
|
+
})) : f("", !0),
|
|
297
|
+
e.rowReorder ? (E(), d(a, {
|
|
298
|
+
key: 1,
|
|
299
|
+
pt: { columnresizer: { class: { hidden: !0 } } },
|
|
300
|
+
"reorderable-column": !1,
|
|
301
|
+
"body-style": "width: 1%;",
|
|
302
|
+
"column-key": "row-reorder",
|
|
303
|
+
"header-style": "width: 1%;",
|
|
304
|
+
"row-reorder": ""
|
|
305
|
+
}, {
|
|
306
|
+
body: N(({ data: t }) => [e.isRowReorderDisabled(t) ? f("", !0) : (E(), d(o, {
|
|
307
|
+
key: 0,
|
|
308
|
+
"data-pc-section": "reorderablerowhandle",
|
|
309
|
+
icon: "move"
|
|
310
|
+
}))]),
|
|
311
|
+
_: 1
|
|
312
|
+
})) : f("", !0),
|
|
313
|
+
e.selectable ? (E(), d(a, {
|
|
314
|
+
key: 2,
|
|
315
|
+
pt: { columnresizer: { class: { hidden: !0 } } },
|
|
316
|
+
"reorderable-column": !1,
|
|
317
|
+
"body-style": "width: 1%;",
|
|
318
|
+
"column-key": "row-select",
|
|
319
|
+
"header-style": "width: 1%;"
|
|
320
|
+
}, {
|
|
321
|
+
header: N(() => [_(s, {
|
|
322
|
+
selected: Q.value,
|
|
323
|
+
"onUpdate:selected": oe
|
|
324
|
+
}, null, 8, ["selected"])]),
|
|
325
|
+
body: N(({ data: e }) => [e ? (E(), d(s, {
|
|
326
|
+
key: 0,
|
|
327
|
+
selected: W.value.includes(e),
|
|
328
|
+
"onUpdate:selected": (t) => se(e, t)
|
|
329
|
+
}, null, 8, ["selected", "onUpdate:selected"])) : f("", !0)]),
|
|
330
|
+
_: 1
|
|
331
|
+
})) : f("", !0),
|
|
332
|
+
(E(!0), p(l, null, ee(G.value, (e, n) => (E(), d(a, {
|
|
333
|
+
key: e.value,
|
|
334
|
+
"column-key": e.field || e.value,
|
|
335
|
+
field: e.field,
|
|
336
|
+
"reorderable-column": e.reorderable !== !1,
|
|
337
|
+
hidden: J(e),
|
|
338
|
+
pt: { root: { "data-column-field": e.field } },
|
|
339
|
+
sortable: $(e)
|
|
340
|
+
}, h({
|
|
341
|
+
header: N(() => [O(t.$slots, `header-${e.value}`, {
|
|
342
|
+
index: n,
|
|
343
|
+
header: e
|
|
344
|
+
}, () => [m("div", {
|
|
345
|
+
style: C(Y(e)),
|
|
346
|
+
class: "wt-table__th__content typo-body-1-bold"
|
|
347
|
+
}, [
|
|
348
|
+
P((E(), p("span", B, [g(A(e.text), 1)])), [[u, e.text]]),
|
|
349
|
+
e.sort === "asc" ? (E(), d(o, {
|
|
350
|
+
key: 0,
|
|
351
|
+
class: "wt-table__th__sort-arrow wt-table__th__sort-arrow--asc",
|
|
352
|
+
icon: "sort-arrow-up",
|
|
353
|
+
size: "sm"
|
|
354
|
+
})) : e.sort === "desc" ? (E(), d(o, {
|
|
355
|
+
key: 1,
|
|
356
|
+
class: "wt-table__th__sort-arrow wt-table__th__sort-arrow--desc",
|
|
357
|
+
icon: "sort-arrow-down",
|
|
358
|
+
size: "sm"
|
|
359
|
+
})) : f("", !0),
|
|
360
|
+
e.filter && t.$slots["column-filter"] ? (E(), d(L, {
|
|
361
|
+
key: 2,
|
|
362
|
+
active: !!e.filtered
|
|
363
|
+
}, {
|
|
364
|
+
default: N(({ hide: n }) => [O(t.$slots, "column-filter", {
|
|
365
|
+
header: e,
|
|
366
|
+
hide: n,
|
|
367
|
+
formView: !0
|
|
368
|
+
}, void 0, !0)]),
|
|
369
|
+
preview: N(() => [O(t.$slots, "column-filter", {
|
|
370
|
+
header: e,
|
|
371
|
+
formView: !1
|
|
372
|
+
}, void 0, !0)]),
|
|
373
|
+
_: 2
|
|
374
|
+
}, 1032, ["active"])) : f("", !0)
|
|
375
|
+
], 4)], !0)]),
|
|
376
|
+
body: N(({ data: n, index: r }) => [m("div", {
|
|
377
|
+
style: C(Y(e)),
|
|
378
|
+
class: "wt-table__td__content typo-body-1"
|
|
379
|
+
}, [n ? O(t.$slots, e.value, {
|
|
380
|
+
key: 0,
|
|
381
|
+
index: r,
|
|
382
|
+
item: n
|
|
383
|
+
}, () => [g(A(n[e.value]), 1)], !0) : f("", !0)], 4)]),
|
|
384
|
+
sorticon: N(() => []),
|
|
385
|
+
_: 2
|
|
386
|
+
}, [X.value ? {
|
|
387
|
+
name: "footer",
|
|
388
|
+
fn: N(() => [O(t.$slots, `${e.value}-footer`, {}, void 0, !0)]),
|
|
389
|
+
key: "0"
|
|
390
|
+
} : void 0]), 1032, [
|
|
391
|
+
"column-key",
|
|
392
|
+
"field",
|
|
393
|
+
"reorderable-column",
|
|
394
|
+
"hidden",
|
|
395
|
+
"pt",
|
|
396
|
+
"sortable"
|
|
397
|
+
]))), 128)),
|
|
398
|
+
e.gridActions ? (E(), d(a, {
|
|
399
|
+
key: 3,
|
|
400
|
+
frozen: e.fixedActions,
|
|
401
|
+
"reorderable-column": !1,
|
|
402
|
+
"align-frozen": "right",
|
|
403
|
+
"column-key": "row-actions",
|
|
404
|
+
style: { width: "112px" }
|
|
405
|
+
}, {
|
|
406
|
+
header: N(() => [O(t.$slots, "actions-header", {}, void 0, !0)]),
|
|
407
|
+
body: N(({ data: e, index: n }) => [m("div", V, [e ? O(t.$slots, "actions", {
|
|
408
|
+
key: 0,
|
|
409
|
+
index: n,
|
|
410
|
+
item: e
|
|
411
|
+
}, void 0, !0) : f("", !0)])]),
|
|
412
|
+
_: 3
|
|
413
|
+
}, 8, ["frozen"])) : f("", !0)
|
|
414
|
+
], void 0, !0),
|
|
415
|
+
_: 2
|
|
416
|
+
}, [re.value ? {
|
|
417
|
+
name: "footer",
|
|
418
|
+
fn: N(() => [O(t.$slots, "footer", {}, void 0, !0)]),
|
|
419
|
+
key: "0"
|
|
420
|
+
} : void 0]), 1032, [
|
|
421
|
+
"expanded-rows",
|
|
422
|
+
"reorderable-columns",
|
|
423
|
+
"resizable-columns",
|
|
424
|
+
"row-class",
|
|
425
|
+
"row-style",
|
|
426
|
+
"show-headers",
|
|
427
|
+
"striped-rows",
|
|
428
|
+
"value",
|
|
429
|
+
"sort-field",
|
|
430
|
+
"data-key",
|
|
431
|
+
"class",
|
|
432
|
+
"virtual-scroller-options"
|
|
433
|
+
]))]);
|
|
434
|
+
};
|
|
435
|
+
}
|
|
436
|
+
}), [["__scopeId", "data-v-ac0e4169"]]);
|
|
437
|
+
//#endregion
|
|
438
|
+
export { H as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./wt-icon-
|
|
1
|
+
import { t as e } from "./wt-icon-ClDNfV5I.js";
|
|
2
2
|
import { i as t, l as n } from "./enums-B_9ZBu01.js";
|
|
3
3
|
import { Fragment as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createVNode as c, defineComponent as l, guardReactiveProps as u, normalizeProps as d, normalizeStyle as f, openBlock as p, resolveComponent as m, toDisplayString as h, unref as g, useAttrs as _, withCtx as v } from "vue";
|
|
4
4
|
//#region node_modules/mitt/dist/mitt.mjs
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
2
2
|
import { n as t } from "./sortQueryAdapters-CyYXvnDN.js";
|
|
3
|
-
import {
|
|
3
|
+
import { t as n } from "./wt-checkbox-BBdi-1oS.js";
|
|
4
|
+
import { t as r } from "./wt-icon-btn-DDElLZil.js";
|
|
4
5
|
import { t as i } from "./useWtTable-CUpN0LZ5.js";
|
|
5
6
|
import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createSlots as d, createTextVNode as f, createVNode as p, defineComponent as m, normalizeClass as h, normalizeStyle as g, onMounted as _, openBlock as v, ref as y, renderList as b, renderSlot as x, resolveComponent as S, toDisplayString as C, toRef as w, unref as T, withCtx as E, withModifiers as D } from "vue";
|
|
6
7
|
//#region src/components/wt-tree-table-row/wt-tree-table-row.vue?vue&type=script&setup=true&lang.ts
|
package/dist/{wt-type-extension-value-input-CnKUoOuC.js → wt-type-extension-value-input-ZqfUFvcs.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "./clients-
|
|
2
|
-
import { a as t, o as n, r, s as i } from "./components-
|
|
1
|
+
import { t as e } from "./clients-9rILOBrM.js";
|
|
2
|
+
import { a as t, o as n, r, s as i } from "./components-Dost4BNg.js";
|
|
3
3
|
import { t as a } from "./enums-B_9ZBu01.js";
|
|
4
4
|
import { t as o } from "./vue-i18n-B88GcHzn.js";
|
|
5
5
|
import { computed as s, createBlock as c, createCommentVNode as l, createVNode as u, defineComponent as d, mergeModels as f, mergeProps as p, openBlock as m, renderSlot as h, resolveComponent as g, unref as _, useModel as v } from "vue";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { D as e } from "./components-
|
|
1
|
+
import { D as e } from "./components-Dost4BNg.js";
|
|
2
2
|
import { t } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
3
3
|
import { l as n } from "./enums-B_9ZBu01.js";
|
|
4
|
-
import "./wt-button-
|
|
5
|
-
import { t as r } from "./wt-icon-btn-
|
|
4
|
+
import "./wt-button-CNQAK85M.js";
|
|
5
|
+
import { t as r } from "./wt-icon-btn-DDElLZil.js";
|
|
6
6
|
import { $ as i, C as a, D as o, F as s, G as c, H as l, I as u, J as d, K as f, L as p, M as m, N as h, O as g, P as ee, Q as _, R as te, S as v, U as ne, V as y, W as b, X as x, Y as re, Z as S, _ as C, a as ie, b as ae, c as oe, d as se, et as ce, f as le, g as ue, h as de, i as w, it as fe, j as pe, k as me, l as T, m as he, n as E, nt as D, o as O, ot as ge, p as k, q as A, r as j, rt as _e, t as ve, tt as ye, u as be, v as M, w as xe, y as Se, z as Ce } from "./vidstack-D9mvYVIz-DesuYgKV.js";
|
|
7
7
|
import { _ as N, a as we, c as Te, d as Ee, f as De, g as Oe, h as ke, i as Ae, l as je, m as Me, n as Ne, o as Pe, p as Fe, r as Ie, s as Le, t as P, u as Re } from "./vidstack-CgfrU1hS-CNTJkyzm.js";
|
|
8
8
|
import { _ as ze, a as Be, c as Ve, f as He, g as Ue, h as We, i as Ge, l as Ke, n as qe, r as Je, s as Ye, t as Xe, u as Ze, v as Qe, x as $e, y as et } from "./useVidstackSrc-aQcqC_v0.js";
|
package/package.json
CHANGED
|
@@ -222,6 +222,7 @@ import stt from './stt.svg?raw';
|
|
|
222
222
|
import sttDownload from './stt-download.svg?raw';
|
|
223
223
|
import sttSearch from './stt-search.svg?raw';
|
|
224
224
|
import table from './table.svg?raw';
|
|
225
|
+
import tableFilter from './table-filter.svg?raw';
|
|
225
226
|
import telegramBot from './telegram-bot.svg?raw';
|
|
226
227
|
import tick from './tick.svg?raw';
|
|
227
228
|
import tile from './tile.svg?raw';
|
|
@@ -354,6 +355,7 @@ export default objCamelToKebab({
|
|
|
354
355
|
exportExel,
|
|
355
356
|
'eye--closed': eyeClosed,
|
|
356
357
|
'eye--opened': eyeOpened,
|
|
358
|
+
'table-filter': tableFilter,
|
|
357
359
|
filter,
|
|
358
360
|
flipCamera,
|
|
359
361
|
flows,
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M13 12.3428C13.0001 11.6758 13.2223 11.0275 13.6319 10.501L17.9102 5H6.08986L10.3682 10.501C10.7777 11.0275 10.9999 11.6758 11 12.3428V19H13V12.3428ZM15 20C15 20.5177 14.6067 20.9438 14.1026 20.9951L14 21H10C9.48234 21 9.05623 20.6067 9.0049 20.1025L9.00001 20V12.3428C8.99996 12.1762 8.95821 12.0132 8.8799 11.8682L8.78908 11.7295L3.2549 4.61426C2.77603 3.99857 3.15764 3.11857 3.89259 3.01074L4.04494 3H19.9551C20.7872 3 21.256 3.9574 20.7451 4.61426L15.211 11.7295C15.0745 11.9049 15.0001 12.1205 15 12.3428V20Z"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<wt-popover class="wt-table-column-filter">
|
|
3
|
+
<template #activator="{ toggle }">
|
|
4
|
+
<wt-popover class="wt-table-column-filter__preview">
|
|
5
|
+
<template #activator="{ show, hide }">
|
|
6
|
+
<div
|
|
7
|
+
class="wt-table-column-filter__wrapper"
|
|
8
|
+
data-pc-section="columnfilterbutton"
|
|
9
|
+
@pointerenter="showPreview($event, show)"
|
|
10
|
+
@pointerleave="hide"
|
|
11
|
+
>
|
|
12
|
+
<wt-badge :hidden="!active">
|
|
13
|
+
<wt-icon-btn
|
|
14
|
+
icon="table-filter"
|
|
15
|
+
:size="ComponentSize.SM"
|
|
16
|
+
@click="openFilter($event, toggle, hide)"
|
|
17
|
+
@mousedown.stop
|
|
18
|
+
/>
|
|
19
|
+
</wt-badge>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<template #default>
|
|
24
|
+
<slot name="preview" />
|
|
25
|
+
</template>
|
|
26
|
+
</wt-popover>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<template #default="{ hide }">
|
|
30
|
+
<slot v-bind="{ hide }" />
|
|
31
|
+
</template>
|
|
32
|
+
</wt-popover>
|
|
33
|
+
</template>
|
|
34
|
+
|
|
35
|
+
<script setup lang="ts">
|
|
36
|
+
import { ComponentSize } from '@webitel/ui-sdk/enums';
|
|
37
|
+
import { useSlots } from 'vue';
|
|
38
|
+
import WtBadge from '../../wt-badge/wt-badge.vue';
|
|
39
|
+
import WtIconBtn from '../../wt-icon-btn/wt-icon-btn.vue';
|
|
40
|
+
import WtPopover from '../../wt-popover/wt-popover.vue';
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Column header filter icon: popover content from the default slot (scope `hide`); while
|
|
44
|
+
* `active`, hovering shows the `preview` slot in a second popover instead.
|
|
45
|
+
* `data-pc-section="columnfilterbutton"` stops PrimeVue sorting on click here while still
|
|
46
|
+
* bubbling to `document` (closes other popovers); `@mousedown.stop` blocks column drag.
|
|
47
|
+
*
|
|
48
|
+
* [WTEL-7727](https://webitel.atlassian.net/browse/WTEL-7727)
|
|
49
|
+
*/
|
|
50
|
+
const props = defineProps<{
|
|
51
|
+
/** Shows the badge on the icon (a filter is applied to this column) */
|
|
52
|
+
active?: boolean;
|
|
53
|
+
}>();
|
|
54
|
+
|
|
55
|
+
const slots = useSlots();
|
|
56
|
+
|
|
57
|
+
const showPreview = (event: Event, show: (event: Event) => void) => {
|
|
58
|
+
if (props.active && slots.preview) show(event);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const openFilter = (
|
|
62
|
+
event: Event,
|
|
63
|
+
toggle: (event: Event) => void,
|
|
64
|
+
hide: () => void,
|
|
65
|
+
) => {
|
|
66
|
+
hide();
|
|
67
|
+
toggle(event);
|
|
68
|
+
};
|
|
69
|
+
</script>
|
|
70
|
+
|
|
71
|
+
<style scoped>
|
|
72
|
+
.wt-table-column-filter__wrapper {
|
|
73
|
+
display: flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
}
|
|
76
|
+
</style>
|
|
@@ -3,6 +3,12 @@ import type { SortSymbols } from '../../../scripts/sortQueryAdapters';
|
|
|
3
3
|
/** derived so adding a symbol to `SortSymbols` widens this automatically */
|
|
4
4
|
export type WtTableSortOrder = (typeof SortSymbols)[keyof typeof SortSymbols];
|
|
5
5
|
|
|
6
|
+
export type WtTableHeaderFilter =
|
|
7
|
+
| string
|
|
8
|
+
| {
|
|
9
|
+
name: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
6
12
|
export type WtTableHeader = {
|
|
7
13
|
value: string;
|
|
8
14
|
/**
|
|
@@ -19,6 +25,20 @@ export type WtTableHeader = {
|
|
|
19
25
|
show?: boolean;
|
|
20
26
|
/** `false` excludes the column from drag-to-reorder and pins it to the start */
|
|
21
27
|
reorderable?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Filter shown in the column header popover (`column-filter` slot).
|
|
30
|
+
* Set only on columns that have a header filter.
|
|
31
|
+
*
|
|
32
|
+
* [WTEL-7727](https://webitel.atlassian.net/browse/WTEL-7727)
|
|
33
|
+
*/
|
|
34
|
+
filter?: WtTableHeaderFilter;
|
|
35
|
+
/**
|
|
36
|
+
* Shows the badge on the filter icon. Set by whoever owns `headers` (mirrors `sort`: read
|
|
37
|
+
* here, written by the caller), not derived from a separate table-wide prop.
|
|
38
|
+
*
|
|
39
|
+
* [WTEL-7727](https://webitel.atlassian.net/browse/WTEL-7727)
|
|
40
|
+
*/
|
|
41
|
+
filtered?: boolean;
|
|
22
42
|
};
|
|
23
43
|
|
|
24
44
|
/** TODO(types): every cell is read through a header-driven runtime `field` key. */
|