@webitel/ui-sdk 26.8.46 → 26.8.48
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-CfX8XNuf.js → components-DYxUm4Ny.js} +3 -3
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +1 -1
- package/dist/ui-sdk.umd.cjs +1 -1
- package/dist/{wt-chat-emoji-PSwoA5FA.js → wt-chat-emoji-Cj4hFgmc.js} +1 -1
- package/dist/{wt-display-chip-items-CIXM-Ohl.js → wt-display-chip-items-BK4t9QuQ.js} +1 -1
- package/dist/{wt-send-message-popup-3yRiBsoN.js → wt-send-message-popup-BqvGOPfj.js} +1 -1
- package/dist/{wt-table-C4PZJ3rP.js → wt-table-DWnt7b9t.js} +77 -70
- package/dist/{wt-type-extension-value-input-DArCroNk.js → wt-type-extension-value-input-LBbOPFvb.js} +1 -1
- package/dist/{wt-vidstack-player-BGnQxLI3.js → wt-vidstack-player-B6kvSv-U.js} +1 -1
- package/package.json +1 -1
- package/src/components/wt-table/types/WtTable.ts +2 -0
- package/src/components/wt-table/wt-table.vue +32 -11
- package/src/locale/uk/uk.js +1 -1
- package/types/.tsbuildinfo +1 -1
- package/types/components/wt-table/types/WtTable.d.ts +2 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as e, i as t } from "./components-
|
|
1
|
+
import { C as e, i as t } from "./components-DYxUm4Ny.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,6 +1,6 @@
|
|
|
1
1
|
import { t as e } from "./rolldown-runtime-BEcgMyyN.js";
|
|
2
2
|
import { n as t, r as n } from "./clients-DBqdsc05.js";
|
|
3
|
-
import { T as r, n as i, w as a } from "./components-
|
|
3
|
+
import { T as r, n as i, w as a } from "./components-DYxUm4Ny.js";
|
|
4
4
|
import { t as o } from "./vue-i18n-Db_oYfO8.js";
|
|
5
5
|
import { n as s } from "./useEventBus-B-ZeklLu.js";
|
|
6
6
|
import { createBlock as c, createTextVNode as l, createVNode as u, defineComponent as d, mergeProps as f, onMounted as p, openBlock as m, ref as h, resolveComponent as g, toDisplayString as _, unref as v, withCtx as y } from "vue";
|
|
@@ -2,9 +2,9 @@ import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
|
2
2
|
import { t } from "./vue-i18n-Db_oYfO8.js";
|
|
3
3
|
import { n, t as r } from "./sortQueryAdapters-CyYXvnDN.js";
|
|
4
4
|
import { t as i } from "./composables-BtWSAI5D.js";
|
|
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
|
|
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 ee, renderSlot as x, resolveComponent as S, resolveDirective as C, toDisplayString as w, useSlots as T, useTemplateRef as E, withCtx as D, withDirectives as O, withModifiers as k } from "vue";
|
|
6
6
|
//#region src/components/wt-table/wt-table.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var
|
|
7
|
+
var A = { class: "wt-table__th__content typo-body-1-bold" }, j = { class: "wt-table__td__actions" }, M = /*#__PURE__*/ e(/* @__PURE__ */ m({
|
|
8
8
|
__name: "wt-table",
|
|
9
9
|
props: {
|
|
10
10
|
headers: { default: () => [] },
|
|
@@ -145,67 +145,70 @@ 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 M = e, { t: N } = t(), P = T(), F = m, I = ({ dragIndex: e, dropIndex: t }) => F("reorder:row", {
|
|
149
149
|
oldIndex: e,
|
|
150
150
|
newIndex: t
|
|
151
|
-
}),
|
|
151
|
+
}), L = E("table"), R = b(0), z = b([]), { addTableDragListener: B, removeTableDragListener: V } = i(L, M.reorderableColumns), H = o(() => M.selectable ? M.selected || M.data.filter((e) => e._isSelected) : []), U = o(() => {
|
|
152
|
+
let e = M.headers.map((e) => !e.text && e.locale ? {
|
|
153
|
+
...e,
|
|
154
|
+
text: typeof e.locale == "string" ? N(e.locale) : N(...e.locale)
|
|
155
|
+
} : e), t = e.filter((e) => e.reorderable === !1), n = e.filter((e) => e.reorderable !== !1);
|
|
156
|
+
return [...t, ...n];
|
|
157
|
+
}), W = [
|
|
152
158
|
"row-select",
|
|
153
159
|
"row-reorder",
|
|
154
160
|
"row-actions",
|
|
155
161
|
"row-expander"
|
|
156
|
-
],
|
|
157
|
-
|
|
158
|
-
text: typeof e.locale == "string" ? P(e.locale) : P(...e.locale)
|
|
159
|
-
} : e)), K = (e) => e.show === !1, q = (e) => ({ minWidth: e.width || "140px" }), J = o(() => Object.keys(F).some((e) => e.includes("-footer"))), Y = o(() => Object.keys(F).some((e) => e === "footer")), X = o(() => W.value.length === N.data.length && N.data.length > 0), Z = o(() => N.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);
|
|
162
|
+
], G = o(() => [...U.value.filter((e) => e.reorderable === !1).map((e) => e.field || e.value), ...W]), K = (e) => e.show === !1, q = (e) => ({ minWidth: e.width || "140px" }), J = o(() => Object.keys(P).some((e) => e.includes("-footer"))), Y = o(() => Object.keys(P).some((e) => e === "footer")), X = o(() => H.value.length === M.data.length && M.data.length > 0), Z = o(() => M.headers.find((e) => e.sort === r.ASC || e.sort === r.DESC)?.field ?? null), Q = ({ sortField: e }) => {
|
|
163
|
+
let t = U.value.find((t) => t.field === e);
|
|
161
164
|
if (!t || !$(t)) return;
|
|
162
165
|
let r = n(t.sort);
|
|
163
|
-
|
|
164
|
-
}, $ = ({ sort: e }) =>
|
|
165
|
-
|
|
166
|
+
F("sort", t, r);
|
|
167
|
+
}, $ = ({ sort: e }) => M.sortable && e !== void 0, te = () => {
|
|
168
|
+
M.selected ? X.value ? F("update:selected", []) : F("update:selected", [...M.data]) : X.value ? M.data.forEach((e) => {
|
|
166
169
|
e._isSelected = !1;
|
|
167
|
-
}) :
|
|
170
|
+
}) : M.data.forEach((e) => {
|
|
168
171
|
e._isSelected = !0;
|
|
169
172
|
});
|
|
170
|
-
},
|
|
171
|
-
|
|
172
|
-
},
|
|
173
|
+
}, ne = (e, t) => {
|
|
174
|
+
M.selected ? t ? F("update:selected", [...H.value, e]) : F("update:selected", H.value.filter((t) => t !== e)) : e._isSelected = !e._isSelected;
|
|
175
|
+
}, re = ({ element: e }) => {
|
|
173
176
|
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
|
-
|
|
177
|
+
F("column-resize", {
|
|
175
178
|
columnName: t,
|
|
176
179
|
columnWidth: `${a}px`
|
|
177
180
|
});
|
|
178
|
-
},
|
|
179
|
-
let e =
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
let t =
|
|
181
|
+
}, ie = () => {
|
|
182
|
+
let e = L.value?.$el?.querySelector(".p-datatable-table-container")?.scrollLeft, t = L.value?.d_columnOrder.filter((e) => !G.value.includes(e));
|
|
183
|
+
R.value += 1, F("column-reorder", t), h(() => {
|
|
184
|
+
B();
|
|
185
|
+
let t = L.value?.$el?.querySelector(".p-datatable-table-container");
|
|
183
186
|
t && (t.scrollLeft = e);
|
|
184
187
|
});
|
|
185
|
-
},
|
|
186
|
-
let t =
|
|
187
|
-
t === -1 ?
|
|
188
|
-
},
|
|
189
|
-
if (
|
|
190
|
-
lazy:
|
|
191
|
-
onLazyLoad:
|
|
192
|
-
itemSize:
|
|
193
|
-
numToleratedItems:
|
|
194
|
-
totalRecords:
|
|
188
|
+
}, ae = (e) => z.value.some((t) => t?.id === e?.id), oe = (e) => {
|
|
189
|
+
let t = z.value.findIndex((t) => t.id === e.id);
|
|
190
|
+
t === -1 ? z.value.push(e) : z.value.splice(t, 1);
|
|
191
|
+
}, se = o(() => {
|
|
192
|
+
if (M.lazy) return {
|
|
193
|
+
lazy: M.lazy,
|
|
194
|
+
onLazyLoad: M.onLoading,
|
|
195
|
+
itemSize: M.itemSize,
|
|
196
|
+
numToleratedItems: M.data.length,
|
|
197
|
+
totalRecords: M.data.length,
|
|
195
198
|
autoSize: !0
|
|
196
199
|
};
|
|
197
200
|
});
|
|
198
201
|
return _(() => {
|
|
199
|
-
|
|
202
|
+
B();
|
|
200
203
|
}), v(() => {
|
|
201
|
-
|
|
204
|
+
V();
|
|
202
205
|
}), (t, n) => {
|
|
203
|
-
let r =
|
|
206
|
+
let r = S("wt-icon-btn"), i = S("p-column"), o = S("wt-icon"), m = S("wt-checkbox"), h = S("p-table"), _ = C("tooltip");
|
|
204
207
|
return y(), s(h, {
|
|
205
|
-
key:
|
|
208
|
+
key: R.value,
|
|
206
209
|
ref_key: "table",
|
|
207
|
-
ref:
|
|
208
|
-
"expanded-rows":
|
|
210
|
+
ref: L,
|
|
211
|
+
"expanded-rows": z.value,
|
|
209
212
|
"reorderable-columns": e.reorderableColumns,
|
|
210
213
|
"resizable-columns": e.resizableColumns,
|
|
211
214
|
"row-class": e.rowClass,
|
|
@@ -213,33 +216,34 @@ var j = { class: "wt-table__th__content typo-body-1-bold" }, M = { class: "wt-ta
|
|
|
213
216
|
"show-headers": !e.headless,
|
|
214
217
|
value: e.data,
|
|
215
218
|
"sort-field": Z.value,
|
|
216
|
-
"data-key":
|
|
219
|
+
"data-key": M.dataKey,
|
|
217
220
|
class: "wt-table",
|
|
218
221
|
"column-resize-mode": "expand",
|
|
219
222
|
lazy: "",
|
|
220
223
|
"scroll-height": "flex",
|
|
221
224
|
scrollable: "",
|
|
222
|
-
"virtual-scroller-options":
|
|
225
|
+
"virtual-scroller-options": se.value,
|
|
223
226
|
pt: { tableContainer: "wt-scrollbar" },
|
|
224
227
|
onSort: Q,
|
|
225
|
-
"onUpdate:expandedRows": n[0] ||= (e) =>
|
|
226
|
-
onColumnResizeEnd:
|
|
227
|
-
onColumnReorder:
|
|
228
|
-
onRowReorder:
|
|
228
|
+
"onUpdate:expandedRows": n[0] ||= (e) => z.value = e,
|
|
229
|
+
onColumnResizeEnd: re,
|
|
230
|
+
onColumnReorder: ie,
|
|
231
|
+
onRowReorder: I
|
|
229
232
|
}, d({
|
|
230
|
-
expansion:
|
|
231
|
-
default:
|
|
233
|
+
expansion: D(({ data: e }) => [u("div", null, [x(t.$slots, "expansion", { item: e }, void 0, !0)])]),
|
|
234
|
+
default: D(() => [
|
|
232
235
|
e.rowExpansion ? (y(), s(i, {
|
|
233
236
|
key: 0,
|
|
234
237
|
pt: { columnresizer: { class: { hidden: !0 } } },
|
|
238
|
+
"reorderable-column": !1,
|
|
235
239
|
"body-style": "width: 1%;",
|
|
236
240
|
"column-key": "row-expander",
|
|
237
241
|
"header-style": "width: 1%;"
|
|
238
242
|
}, {
|
|
239
|
-
body:
|
|
240
|
-
disabled:
|
|
241
|
-
icon:
|
|
242
|
-
onClick:
|
|
243
|
+
body: D(({ data: e }) => [p(r, {
|
|
244
|
+
disabled: M.rowExpansionDisabled(e),
|
|
245
|
+
icon: ae(e) ? "arrow-down" : "arrow-right",
|
|
246
|
+
onClick: k((t) => oe(e), ["stop"])
|
|
243
247
|
}, null, 8, [
|
|
244
248
|
"disabled",
|
|
245
249
|
"icon",
|
|
@@ -256,7 +260,7 @@ var j = { class: "wt-table__th__content typo-body-1-bold" }, M = { class: "wt-ta
|
|
|
256
260
|
"header-style": "width: 1%;",
|
|
257
261
|
"row-reorder": ""
|
|
258
262
|
}, {
|
|
259
|
-
body:
|
|
263
|
+
body: D(({ data: t }) => [e.isRowReorderDisabled(t) ? c("", !0) : (y(), s(o, {
|
|
260
264
|
key: 0,
|
|
261
265
|
"data-pc-section": "reorderablerowhandle",
|
|
262
266
|
icon: "move"
|
|
@@ -271,29 +275,30 @@ var j = { class: "wt-table__th__content typo-body-1-bold" }, M = { class: "wt-ta
|
|
|
271
275
|
"column-key": "row-select",
|
|
272
276
|
"header-style": "width: 1%;"
|
|
273
277
|
}, {
|
|
274
|
-
header:
|
|
278
|
+
header: D(() => [p(m, {
|
|
275
279
|
selected: X.value,
|
|
276
|
-
"onUpdate:selected":
|
|
280
|
+
"onUpdate:selected": te
|
|
277
281
|
}, null, 8, ["selected"])]),
|
|
278
|
-
body:
|
|
282
|
+
body: D(({ data: e }) => [e ? (y(), s(m, {
|
|
279
283
|
key: 0,
|
|
280
|
-
selected:
|
|
281
|
-
"onUpdate:selected": (t) =>
|
|
284
|
+
selected: H.value.includes(e),
|
|
285
|
+
"onUpdate:selected": (t) => ne(e, t)
|
|
282
286
|
}, null, 8, ["selected", "onUpdate:selected"])) : c("", !0)]),
|
|
283
287
|
_: 1
|
|
284
288
|
})) : c("", !0),
|
|
285
|
-
(y(!0), l(a, null,
|
|
289
|
+
(y(!0), l(a, null, ee(U.value, (e, n) => (y(), s(i, {
|
|
286
290
|
key: e.value,
|
|
287
|
-
"column-key": e.field,
|
|
291
|
+
"column-key": e.field || e.value,
|
|
288
292
|
field: e.field,
|
|
293
|
+
"reorderable-column": e.reorderable !== !1,
|
|
289
294
|
hidden: K(e),
|
|
290
295
|
pt: { root: { "data-column-field": e.field } },
|
|
291
296
|
sortable: $(e)
|
|
292
297
|
}, d({
|
|
293
|
-
header:
|
|
298
|
+
header: D(() => [x(t.$slots, `header-${e.value}`, {
|
|
294
299
|
index: n,
|
|
295
300
|
header: e
|
|
296
|
-
}, () => [u("div",
|
|
301
|
+
}, () => [u("div", A, [O((y(), l("span", null, [f(w(e.text), 1)])), [[_, e.text]]), e.sort === "asc" ? (y(), s(o, {
|
|
297
302
|
key: 0,
|
|
298
303
|
class: "wt-table__th__sort-arrow wt-table__th__sort-arrow--asc",
|
|
299
304
|
icon: "sort-arrow-up",
|
|
@@ -304,23 +309,24 @@ var j = { class: "wt-table__th__content typo-body-1-bold" }, M = { class: "wt-ta
|
|
|
304
309
|
icon: "sort-arrow-down",
|
|
305
310
|
size: "sm"
|
|
306
311
|
})) : c("", !0)])], !0)]),
|
|
307
|
-
body:
|
|
312
|
+
body: D(({ data: n, index: r }) => [u("div", {
|
|
308
313
|
style: g(q(e)),
|
|
309
314
|
class: "wt-table__td__content typo-body-1"
|
|
310
|
-
}, [n ?
|
|
315
|
+
}, [n ? x(t.$slots, e.value, {
|
|
311
316
|
key: 0,
|
|
312
317
|
index: r,
|
|
313
318
|
item: n
|
|
314
|
-
}, () => [f(
|
|
315
|
-
sorticon:
|
|
319
|
+
}, () => [f(w(n[e.value]), 1)], !0) : c("", !0)], 4)]),
|
|
320
|
+
sorticon: D(() => []),
|
|
316
321
|
_: 2
|
|
317
322
|
}, [J.value ? {
|
|
318
323
|
name: "footer",
|
|
319
|
-
fn:
|
|
324
|
+
fn: D(() => [x(t.$slots, `${e.value}-footer`, {}, void 0, !0)]),
|
|
320
325
|
key: "0"
|
|
321
326
|
} : void 0]), 1032, [
|
|
322
327
|
"column-key",
|
|
323
328
|
"field",
|
|
329
|
+
"reorderable-column",
|
|
324
330
|
"hidden",
|
|
325
331
|
"pt",
|
|
326
332
|
"sortable"
|
|
@@ -328,12 +334,13 @@ var j = { class: "wt-table__th__content typo-body-1-bold" }, M = { class: "wt-ta
|
|
|
328
334
|
e.gridActions ? (y(), s(i, {
|
|
329
335
|
key: 3,
|
|
330
336
|
frozen: e.fixedActions,
|
|
337
|
+
"reorderable-column": !1,
|
|
331
338
|
"align-frozen": "right",
|
|
332
339
|
"column-key": "row-actions",
|
|
333
340
|
style: { width: "112px" }
|
|
334
341
|
}, {
|
|
335
|
-
header:
|
|
336
|
-
body:
|
|
342
|
+
header: D(() => [x(t.$slots, "actions-header", {}, void 0, !0)]),
|
|
343
|
+
body: D(({ data: e, index: n }) => [u("div", j, [e ? x(t.$slots, "actions", {
|
|
337
344
|
key: 0,
|
|
338
345
|
index: n,
|
|
339
346
|
item: e
|
|
@@ -344,7 +351,7 @@ var j = { class: "wt-table__th__content typo-body-1-bold" }, M = { class: "wt-ta
|
|
|
344
351
|
_: 2
|
|
345
352
|
}, [Y.value ? {
|
|
346
353
|
name: "footer",
|
|
347
|
-
fn:
|
|
354
|
+
fn: D(() => [x(t.$slots, "footer", {}, void 0, !0)]),
|
|
348
355
|
key: "0"
|
|
349
356
|
} : void 0]), 1032, [
|
|
350
357
|
"expanded-rows",
|
|
@@ -360,6 +367,6 @@ var j = { class: "wt-table__th__content typo-body-1-bold" }, M = { class: "wt-ta
|
|
|
360
367
|
]);
|
|
361
368
|
};
|
|
362
369
|
}
|
|
363
|
-
}), [["__scopeId", "data-v-
|
|
370
|
+
}), [["__scopeId", "data-v-b068ba13"]]);
|
|
364
371
|
//#endregion
|
|
365
|
-
export {
|
|
372
|
+
export { M as default };
|
package/dist/{wt-type-extension-value-input-DArCroNk.js → wt-type-extension-value-input-LBbOPFvb.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "./clients-DBqdsc05.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-DYxUm4Ny.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
|
@@ -17,6 +17,8 @@ export type WtTableHeader = {
|
|
|
17
17
|
/** `undefined` means the column is not sortable; `boolean` is back-compat */
|
|
18
18
|
sort?: WtTableSortOrder | boolean;
|
|
19
19
|
show?: boolean;
|
|
20
|
+
/** `false` excludes the column from drag-to-reorder and pins it to the start */
|
|
21
|
+
reorderable?: boolean;
|
|
20
22
|
};
|
|
21
23
|
|
|
22
24
|
/** TODO(types): every cell is read through a header-driven runtime `field` key. */
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
}"
|
|
38
|
+
:reorderable-column="false"
|
|
38
39
|
body-style="width: 1%;"
|
|
39
40
|
column-key="row-expander"
|
|
40
41
|
header-style="width: 1%;"
|
|
@@ -102,8 +103,9 @@
|
|
|
102
103
|
<p-column
|
|
103
104
|
v-for="(col, idx) of dataHeaders"
|
|
104
105
|
:key="col.value"
|
|
105
|
-
:column-key="col.field"
|
|
106
|
+
:column-key="col.field || col.value"
|
|
106
107
|
:field="col.field"
|
|
108
|
+
:reorderable-column="col.reorderable !== false"
|
|
107
109
|
:hidden="isColumnHidden(col)"
|
|
108
110
|
:pt="{
|
|
109
111
|
root: {
|
|
@@ -173,6 +175,7 @@
|
|
|
173
175
|
<p-column
|
|
174
176
|
v-if="gridActions"
|
|
175
177
|
:frozen="fixedActions"
|
|
178
|
+
:reorderable-column="false"
|
|
176
179
|
align-frozen="right"
|
|
177
180
|
column-key="row-actions"
|
|
178
181
|
style="width: 112px;"
|
|
@@ -352,14 +355,6 @@ const { addTableDragListener, removeTableDragListener } = useTableColumnDrag(
|
|
|
352
355
|
props.reorderableColumns,
|
|
353
356
|
);
|
|
354
357
|
|
|
355
|
-
// table's columns that should be excluded from reorder
|
|
356
|
-
const excludeColumnsFromReorder = [
|
|
357
|
-
'row-select',
|
|
358
|
-
'row-reorder',
|
|
359
|
-
'row-actions',
|
|
360
|
-
'row-expander',
|
|
361
|
-
];
|
|
362
|
-
|
|
363
358
|
const _selected = computed(() => {
|
|
364
359
|
// _isSelected for backwards compatibility
|
|
365
360
|
return props.selectable
|
|
@@ -369,7 +364,7 @@ const _selected = computed(() => {
|
|
|
369
364
|
});
|
|
370
365
|
|
|
371
366
|
const dataHeaders = computed(() => {
|
|
372
|
-
|
|
367
|
+
const headers = props.headers.map((header) => {
|
|
373
368
|
if (!header.text && header.locale)
|
|
374
369
|
return {
|
|
375
370
|
...header,
|
|
@@ -384,8 +379,34 @@ const dataHeaders = computed(() => {
|
|
|
384
379
|
};
|
|
385
380
|
return header;
|
|
386
381
|
});
|
|
382
|
+
|
|
383
|
+
// non-reorderable columns are kept at the start, so they stay in place
|
|
384
|
+
// while the rest of the columns can be freely reordered
|
|
385
|
+
const nonReorderable = headers.filter(
|
|
386
|
+
(header) => header.reorderable === false,
|
|
387
|
+
);
|
|
388
|
+
const reorderable = headers.filter((header) => header.reorderable !== false);
|
|
389
|
+
return [
|
|
390
|
+
...nonReorderable,
|
|
391
|
+
...reorderable,
|
|
392
|
+
];
|
|
387
393
|
});
|
|
388
394
|
|
|
395
|
+
// table's columns that should be excluded from reorder
|
|
396
|
+
const excludeStaticColumnsFromReorder = [
|
|
397
|
+
'row-select',
|
|
398
|
+
'row-reorder',
|
|
399
|
+
'row-actions',
|
|
400
|
+
'row-expander',
|
|
401
|
+
];
|
|
402
|
+
|
|
403
|
+
const excludeColumnsFromReorder = computed(() => [
|
|
404
|
+
...dataHeaders.value
|
|
405
|
+
.filter((col) => col.reorderable === false)
|
|
406
|
+
.map((col) => col.field || col.value),
|
|
407
|
+
...excludeStaticColumnsFromReorder,
|
|
408
|
+
]);
|
|
409
|
+
|
|
389
410
|
const isColumnHidden = (col: WtTableHeader) => {
|
|
390
411
|
return col.show === false;
|
|
391
412
|
};
|
|
@@ -506,7 +527,7 @@ const columnReorder = () => {
|
|
|
506
527
|
);
|
|
507
528
|
const containerElScrollLeft = containerEl?.scrollLeft;
|
|
508
529
|
const newOrder = table.value?.d_columnOrder.filter(
|
|
509
|
-
(col: string) => !excludeColumnsFromReorder.includes(col),
|
|
530
|
+
(col: string) => !excludeColumnsFromReorder.value.includes(col),
|
|
510
531
|
);
|
|
511
532
|
tableKey.value += 1;
|
|
512
533
|
emit('column-reorder', newOrder);
|
package/src/locale/uk/uk.js
CHANGED
|
@@ -205,7 +205,7 @@ export default {
|
|
|
205
205
|
queueType: 'Тип черги | Типи черг',
|
|
206
206
|
type: {
|
|
207
207
|
[QueueType.INBOUND_QUEUE]: 'Вхідна черга',
|
|
208
|
-
[QueueType.OFFLINE_QUEUE]: '
|
|
208
|
+
[QueueType.OFFLINE_QUEUE]: 'Офлайн черга',
|
|
209
209
|
[QueueType.OUTBOUND_IVR_QUEUE]: 'Вихідний IVR',
|
|
210
210
|
[QueueType.PREDICTIVE_DIALER]: 'Предиктивний обзвін',
|
|
211
211
|
[QueueType.PROGRESSIVE_DIALER]: 'Прогресивний обзвін',
|