@webitel/ui-sdk 26.8.8 → 26.8.10
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/{components-DL68kJ6J.js → components-BEEq6Fvq.js} +3 -3
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +3 -2
- package/dist/ui-sdk.umd.cjs +120 -119
- package/dist/{wt-chat-emoji-DHIoEBMM.js → wt-chat-emoji-D9v1fWl2.js} +1 -1
- package/dist/{wt-display-chip-items-DlfFjaAD.js → wt-display-chip-items-DviuzYP0.js} +1 -1
- package/dist/{wt-send-message-popup-D19W5Yxy.js → wt-send-message-popup-oYdzmm4y.js} +1 -1
- package/dist/{wt-table-DWLjoS90.js → wt-table-_Zf-10Ge.js} +57 -60
- package/dist/{wt-type-extension-value-input-Crem3zn1.js → wt-type-extension-value-input-wpaNQiRx.js} +1 -1
- package/dist/{wt-vidstack-player-Bi5_MA91.js → wt-vidstack-player-DQH5QOAU.js} +1 -1
- package/package.json +1 -1
- package/src/components/wt-table/wt-table.vue +2 -15
- package/src/plugins/primevue/theme/components/tooltip/tooltip.js +2 -1
- package/types/.tsbuildinfo +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as e, i as t } from "./components-
|
|
1
|
+
import { C as e, i as t } from "./components-BEEq6Fvq.js";
|
|
2
2
|
import { t as n } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
3
3
|
import { t as r } from "./displayText-CtaxzaBz.js";
|
|
4
4
|
import { Fragment as i, computed as a, createCommentVNode as o, createElementBlock as s, createTextVNode as c, createVNode as l, defineComponent as u, openBlock as d, renderList as f, renderSlot as p, toDisplayString as m, unref as h, withCtx as g } from "vue";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as e, r as t } from "./clients-DqzkR0RW.js";
|
|
2
|
-
import { n } from "./components-
|
|
2
|
+
import { n } from "./components-BEEq6Fvq.js";
|
|
3
3
|
import { t as r } from "./vue-i18n-Db_oYfO8.js";
|
|
4
4
|
import { createBlock as i, createTextVNode as a, createVNode as o, defineComponent as s, inject as c, mergeProps as l, onMounted as u, openBlock as d, ref as f, resolveComponent as p, toDisplayString as m, unref as h, withCtx as g } from "vue";
|
|
5
5
|
//#endregion
|
|
@@ -4,7 +4,7 @@ import { n, t as r } from "./sortQueryAdapters-CyYXvnDN.js";
|
|
|
4
4
|
import { t as i } from "./composables-DgOEWk-2.js";
|
|
5
5
|
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, nextTick as h, normalizeStyle as g, onMounted as _, onUnmounted as v, openBlock as y, ref as b, renderList as x, renderSlot as S, resolveComponent as C, resolveDirective as w, toDisplayString as T, useSlots as E, useTemplateRef as D, withCtx as O, withDirectives as k, withModifiers as A } from "vue";
|
|
6
6
|
//#region src/components/wt-table/wt-table.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var j = { class: "wt-table__th__content typo-body-1-bold" }, M = { class: "wt-table__td__actions" }, N =
|
|
7
|
+
var j = { class: "wt-table__th__content typo-body-1-bold" }, M = { class: "wt-table__td__actions" }, N = /*#__PURE__*/ e(/* @__PURE__ */ m({
|
|
8
8
|
__name: "wt-table",
|
|
9
9
|
props: {
|
|
10
10
|
headers: { default: () => [] },
|
|
@@ -145,85 +145,82 @@ var j = { class: "wt-table__th__content typo-body-1-bold" }, M = { class: "wt-ta
|
|
|
145
145
|
"column-reorder"
|
|
146
146
|
],
|
|
147
147
|
setup(e, { emit: m }) {
|
|
148
|
-
let
|
|
148
|
+
let N = e, { t: P } = t(), F = E(), I = m, L = D("table"), R = b(0), z = b([]), { addTableDragListener: B, removeTableDragListener: V } = i(L, N.reorderableColumns), H = [
|
|
149
149
|
"row-select",
|
|
150
150
|
"row-reorder",
|
|
151
151
|
"row-actions",
|
|
152
152
|
"row-expander"
|
|
153
|
-
],
|
|
153
|
+
], U = o(() => N.selectable ? N.selected || N.data.filter((e) => e._isSelected) : []), W = o(() => N.headers.map((e) => !e.text && e.locale ? {
|
|
154
154
|
...e,
|
|
155
|
-
text: typeof e.locale == "string" ?
|
|
156
|
-
} : e)),
|
|
157
|
-
let t =
|
|
158
|
-
|
|
159
|
-
}, J = o(() => Object.keys(I).some((e) => e.includes("-footer"))), Y = o(() => Object.keys(I).some((e) => e === "footer")), X = o(() => W.value.length === P.data.length && P.data.length > 0), Z = o(() => P.headers.find((e) => e.sort === r.ASC || e.sort === r.DESC)?.field ?? null), Q = ({ sortField: e }) => {
|
|
160
|
-
let t = G.value.find((t) => t.field === e);
|
|
161
|
-
if (!$(t)) return;
|
|
155
|
+
text: typeof e.locale == "string" ? P(e.locale) : P(...e.locale)
|
|
156
|
+
} : e)), G = (e) => e.show === !1, K = (e) => ({ minWidth: e.width || "140px" }), q = o(() => Object.keys(F).some((e) => e.includes("-footer"))), J = o(() => Object.keys(F).some((e) => e === "footer")), Y = o(() => U.value.length === N.data.length && N.data.length > 0), X = o(() => N.headers.find((e) => e.sort === r.ASC || e.sort === r.DESC)?.field ?? null), Z = ({ sortField: e }) => {
|
|
157
|
+
let t = W.value.find((t) => t.field === e);
|
|
158
|
+
if (!Q(t)) return;
|
|
162
159
|
let r = n(t.sort);
|
|
163
|
-
|
|
164
|
-
},
|
|
165
|
-
|
|
160
|
+
I("sort", t, r);
|
|
161
|
+
}, Q = ({ sort: e }) => N.sortable && e !== void 0, $ = () => {
|
|
162
|
+
N.selected ? Y.value ? I("update:selected", []) : I("update:selected", [...N.data]) : Y.value ? N.data.forEach((e) => {
|
|
166
163
|
e._isSelected = !1;
|
|
167
|
-
}) :
|
|
164
|
+
}) : N.data.forEach((e) => {
|
|
168
165
|
e._isSelected = !0;
|
|
169
166
|
});
|
|
170
|
-
},
|
|
171
|
-
|
|
172
|
-
},
|
|
167
|
+
}, ee = (e, t) => {
|
|
168
|
+
N.selected ? t ? I("update:selected", [...U.value, e]) : I("update:selected", U.value.filter((t) => t !== e)) : e._isSelected = !e._isSelected;
|
|
169
|
+
}, te = ({ element: e }) => {
|
|
173
170
|
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;
|
|
174
|
-
|
|
171
|
+
I("column-resize", {
|
|
175
172
|
columnName: t,
|
|
176
173
|
columnWidth: `${a}px`
|
|
177
174
|
});
|
|
178
|
-
},
|
|
179
|
-
let e =
|
|
180
|
-
|
|
181
|
-
|
|
175
|
+
}, ne = () => {
|
|
176
|
+
let e = L.value.$el.querySelector(".p-datatable-table-container").scrollLeft, t = L.value.d_columnOrder.filter((e) => !H.includes(e));
|
|
177
|
+
R.value += 1, I("column-reorder", t), h(() => {
|
|
178
|
+
B(), L.value.$el.querySelector(".p-datatable-table-container").scrollLeft = e;
|
|
182
179
|
});
|
|
183
|
-
},
|
|
184
|
-
let t =
|
|
185
|
-
t === -1 ?
|
|
186
|
-
},
|
|
187
|
-
if (
|
|
188
|
-
lazy:
|
|
189
|
-
onLazyLoad:
|
|
190
|
-
itemSize:
|
|
191
|
-
numToleratedItems: N,
|
|
192
|
-
totalRecords:
|
|
180
|
+
}, re = (e) => z.value.some((t) => t?.id === e?.id), ie = (e) => {
|
|
181
|
+
let t = z.value.findIndex((t) => t.id === e.id);
|
|
182
|
+
t === -1 ? z.value.push(e) : z.value.splice(t, 1);
|
|
183
|
+
}, ae = o(() => {
|
|
184
|
+
if (N.lazy) return {
|
|
185
|
+
lazy: N.lazy,
|
|
186
|
+
onLazyLoad: N.onLoading,
|
|
187
|
+
itemSize: N.itemSize,
|
|
188
|
+
numToleratedItems: N.data.length,
|
|
189
|
+
totalRecords: N.data.length,
|
|
193
190
|
autoSize: !0
|
|
194
191
|
};
|
|
195
192
|
});
|
|
196
193
|
return _(() => {
|
|
197
|
-
|
|
194
|
+
B();
|
|
198
195
|
}), v(() => {
|
|
199
|
-
|
|
196
|
+
V();
|
|
200
197
|
}), (t, n) => {
|
|
201
198
|
let r = C("wt-icon-btn"), i = C("p-column"), o = C("wt-icon"), m = C("wt-checkbox"), h = C("p-table"), _ = w("tooltip");
|
|
202
199
|
return y(), s(h, {
|
|
203
|
-
key:
|
|
200
|
+
key: R.value,
|
|
204
201
|
ref_key: "table",
|
|
205
|
-
ref:
|
|
206
|
-
"expanded-rows":
|
|
202
|
+
ref: L,
|
|
203
|
+
"expanded-rows": z.value,
|
|
207
204
|
"reorderable-columns": e.reorderableColumns,
|
|
208
205
|
"resizable-columns": e.resizableColumns,
|
|
209
206
|
"row-class": e.rowClass,
|
|
210
207
|
"row-style": e.rowStyle,
|
|
211
208
|
"show-headers": !e.headless,
|
|
212
209
|
value: e.data,
|
|
213
|
-
"sort-field":
|
|
214
|
-
"data-key":
|
|
210
|
+
"sort-field": X.value,
|
|
211
|
+
"data-key": N.dataKey,
|
|
215
212
|
class: "wt-table",
|
|
216
213
|
"column-resize-mode": "expand",
|
|
217
214
|
lazy: "",
|
|
218
215
|
"scroll-height": "flex",
|
|
219
216
|
scrollable: "",
|
|
220
|
-
"virtual-scroller-options":
|
|
217
|
+
"virtual-scroller-options": ae.value,
|
|
221
218
|
pt: { tableContainer: "wt-scrollbar" },
|
|
222
|
-
onSort:
|
|
223
|
-
"onUpdate:expandedRows": n[0] ||= (e) =>
|
|
224
|
-
onColumnResizeEnd:
|
|
225
|
-
onColumnReorder:
|
|
226
|
-
onRowReorder: n[1] ||= ({ dragIndex: e, dropIndex: t }) =>
|
|
219
|
+
onSort: Z,
|
|
220
|
+
"onUpdate:expandedRows": n[0] ||= (e) => z.value = e,
|
|
221
|
+
onColumnResizeEnd: te,
|
|
222
|
+
onColumnReorder: ne,
|
|
223
|
+
onRowReorder: n[1] ||= ({ dragIndex: e, dropIndex: t }) => I("reorder:row", {
|
|
227
224
|
oldIndex: e,
|
|
228
225
|
newIndex: t
|
|
229
226
|
})
|
|
@@ -238,9 +235,9 @@ var j = { class: "wt-table__th__content typo-body-1-bold" }, M = { class: "wt-ta
|
|
|
238
235
|
"header-style": "width: 1%;"
|
|
239
236
|
}, {
|
|
240
237
|
body: O(({ data: e }) => [p(r, {
|
|
241
|
-
disabled:
|
|
242
|
-
icon:
|
|
243
|
-
onClick: A((t) =>
|
|
238
|
+
disabled: N.rowExpansionDisabled(e),
|
|
239
|
+
icon: re(e) ? "arrow-down" : "arrow-right",
|
|
240
|
+
onClick: A((t) => ie(e), ["stop"])
|
|
244
241
|
}, null, 8, [
|
|
245
242
|
"disabled",
|
|
246
243
|
"icon",
|
|
@@ -273,23 +270,23 @@ var j = { class: "wt-table__th__content typo-body-1-bold" }, M = { class: "wt-ta
|
|
|
273
270
|
"header-style": "width: 1%;"
|
|
274
271
|
}, {
|
|
275
272
|
header: O(() => [p(m, {
|
|
276
|
-
selected:
|
|
277
|
-
"onUpdate:selected":
|
|
273
|
+
selected: Y.value,
|
|
274
|
+
"onUpdate:selected": $
|
|
278
275
|
}, null, 8, ["selected"])]),
|
|
279
276
|
body: O(({ data: e }) => [e ? (y(), s(m, {
|
|
280
277
|
key: 0,
|
|
281
|
-
selected:
|
|
282
|
-
"onUpdate:selected": (t) =>
|
|
278
|
+
selected: U.value.includes(e),
|
|
279
|
+
"onUpdate:selected": (t) => ee(e, t)
|
|
283
280
|
}, null, 8, ["selected", "onUpdate:selected"])) : c("", !0)]),
|
|
284
281
|
_: 1
|
|
285
282
|
})) : c("", !0),
|
|
286
|
-
(y(!0), l(a, null, x(
|
|
283
|
+
(y(!0), l(a, null, x(W.value, (e, n) => (y(), s(i, {
|
|
287
284
|
key: e.value,
|
|
288
285
|
"column-key": e.field,
|
|
289
286
|
field: e.field,
|
|
290
|
-
hidden:
|
|
287
|
+
hidden: G(e),
|
|
291
288
|
pt: { root: { "data-column-field": e.field } },
|
|
292
|
-
sortable:
|
|
289
|
+
sortable: Q(e)
|
|
293
290
|
}, d({
|
|
294
291
|
header: O(() => [S(t.$slots, `header-${e.value}`, {
|
|
295
292
|
index: n,
|
|
@@ -306,7 +303,7 @@ var j = { class: "wt-table__th__content typo-body-1-bold" }, M = { class: "wt-ta
|
|
|
306
303
|
size: "sm"
|
|
307
304
|
})) : c("", !0)])], !0)]),
|
|
308
305
|
body: O(({ data: n, index: r }) => [u("div", {
|
|
309
|
-
style: g(
|
|
306
|
+
style: g(K(e)),
|
|
310
307
|
class: "wt-table__td__content typo-body-1"
|
|
311
308
|
}, [n ? S(t.$slots, e.value, {
|
|
312
309
|
key: 0,
|
|
@@ -315,7 +312,7 @@ var j = { class: "wt-table__th__content typo-body-1-bold" }, M = { class: "wt-ta
|
|
|
315
312
|
}, () => [f(T(n[e.value]), 1)], !0) : c("", !0)], 4)]),
|
|
316
313
|
sorticon: O(() => []),
|
|
317
314
|
_: 2
|
|
318
|
-
}, [
|
|
315
|
+
}, [q.value ? {
|
|
319
316
|
name: "footer",
|
|
320
317
|
fn: O(() => [S(t.$slots, `${e.value}-footer`, {}, void 0, !0)]),
|
|
321
318
|
key: "0"
|
|
@@ -343,7 +340,7 @@ var j = { class: "wt-table__th__content typo-body-1-bold" }, M = { class: "wt-ta
|
|
|
343
340
|
}, 8, ["frozen"])) : c("", !0)
|
|
344
341
|
], void 0, !0),
|
|
345
342
|
_: 2
|
|
346
|
-
}, [
|
|
343
|
+
}, [J.value ? {
|
|
347
344
|
name: "footer",
|
|
348
345
|
fn: O(() => [S(t.$slots, "footer", {}, void 0, !0)]),
|
|
349
346
|
key: "0"
|
|
@@ -361,6 +358,6 @@ var j = { class: "wt-table__th__content typo-body-1-bold" }, M = { class: "wt-ta
|
|
|
361
358
|
]);
|
|
362
359
|
};
|
|
363
360
|
}
|
|
364
|
-
}), [["__scopeId", "data-v-
|
|
361
|
+
}), [["__scopeId", "data-v-92454b8d"]]);
|
|
365
362
|
//#endregion
|
|
366
|
-
export {
|
|
363
|
+
export { N as default };
|
package/dist/{wt-type-extension-value-input-Crem3zn1.js → wt-type-extension-value-input-wpaNQiRx.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "./clients-DqzkR0RW.js";
|
|
2
|
-
import { a as t, o as n, r, s as i } from "./components-
|
|
2
|
+
import { a as t, o as n, r, s as i } from "./components-BEEq6Fvq.js";
|
|
3
3
|
import { t as a } from "./enums-De8CDKZ1.js";
|
|
4
4
|
import { t as o } from "./vue-i18n-Db_oYfO8.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";
|
package/package.json
CHANGED
|
@@ -232,13 +232,6 @@ import { getNextSortOrder } from '../../scripts/sortQueryAdapters.js';
|
|
|
232
232
|
import { useTableColumnDrag } from '../_internals/composables';
|
|
233
233
|
import type { WtTableHeader } from './types/WtTable';
|
|
234
234
|
|
|
235
|
-
/**
|
|
236
|
-
* Number of items to render outside the visible area for virtual scrolling.
|
|
237
|
-
* This helps maintain smooth scrolling performance by pre-rendering items
|
|
238
|
-
* that are about to come into view, reducing the chance of blank spaces
|
|
239
|
-
* during fast scrolling.
|
|
240
|
-
*/
|
|
241
|
-
const VIRTUAL_SCROLL_TOLERATED_ITEMS = 10;
|
|
242
235
|
const DEFAULT_ITEM_SIZE = 40;
|
|
243
236
|
|
|
244
237
|
interface Props extends DataTableProps {
|
|
@@ -382,15 +375,9 @@ const isColumnHidden = (col) => {
|
|
|
382
375
|
|
|
383
376
|
const columnStyle = (col) => {
|
|
384
377
|
const baseWidth = 140;
|
|
385
|
-
const width = col.width || `${baseWidth}px`;
|
|
386
|
-
|
|
387
|
-
if (props.lazy)
|
|
388
|
-
return {
|
|
389
|
-
width,
|
|
390
|
-
};
|
|
391
378
|
|
|
392
379
|
return {
|
|
393
|
-
minWidth: width
|
|
380
|
+
minWidth: col.width || `${baseWidth}px`,
|
|
394
381
|
};
|
|
395
382
|
};
|
|
396
383
|
|
|
@@ -533,7 +520,7 @@ const virtualScroll = computed(() => {
|
|
|
533
520
|
lazy: props.lazy,
|
|
534
521
|
onLazyLoad: props.onLoading,
|
|
535
522
|
itemSize: props.itemSize, // The height/width of item according to orientation
|
|
536
|
-
numToleratedItems:
|
|
523
|
+
numToleratedItems: props.data.length, // Number of items to pre-render outside visible area
|
|
537
524
|
totalRecords: props.data.length,
|
|
538
525
|
autoSize: true, // Enable auto height recalculation
|
|
539
526
|
};
|
|
@@ -14,7 +14,8 @@ const tooltip = {
|
|
|
14
14
|
typo: WtTypography.Body2,
|
|
15
15
|
})}
|
|
16
16
|
white-space: pre-line;
|
|
17
|
-
word-break:
|
|
17
|
+
word-break: normal;
|
|
18
|
+
overflow-wrap: break-word;
|
|
18
19
|
background: ${dt('tooltip.background')};
|
|
19
20
|
color: ${dt('tooltip.color')};
|
|
20
21
|
padding: ${dt('tooltip.padding')};
|