@ironsource/shared-ui 2.2.0-rc.8 → 2.2.0-rc.9

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.
@@ -1 +1,433 @@
1
- import "../../../DataGrid.vue_vue_type_style_index_0_scoped_46851fcb_lang.css";
1
+ import "../../../DataGrid.vue_vue_type_style_index_0_scoped_46851fcb_lang.css"; import { defineComponent as ke, useCssVars as me, unref as t, useSlots as be, computed as u, openBlock as i, createElementBlock as d, createElementVNode as b, normalizeStyle as S, normalizeClass as y, createBlock as I, isRef as pe, createSlots as ve, withCtx as g, renderSlot as r, createCommentVNode as c, Fragment as C, renderList as R, createVNode as k, createTextVNode as P, toDisplayString as O, mergeProps as L } from "vue";
2
+ import V from "../../typography/v4/Typography.vue.js";
3
+ import xe from "../../skeleton/v4/SkeletonV4.vue.js";
4
+ import Ce from "../../emptyState/v4/EmptyStateV4.vue.js";
5
+ import Q from "../../checkbox/v4/CheckboxV4.vue.js";
6
+ import Re from "../../tooltip/v4/TooltipV4.vue.js";
7
+ import "./DataGrid.vue.js";
8
+ import "./DataGridMenu.vue.js";
9
+ import "./DataGridRowsCounter.vue.js";
10
+ import $e from "./DataGridHeader.vue.js";
11
+ import "./DataGridContainer.vue.js";
12
+ import "./MultipleDataGrid.vue.js";
13
+ import { TableTestIdModifiers as $ } from "../../../testids/index.js";
14
+ import { tableCommon as Te } from "../common/Table.common.js";
15
+ import He from "./SortIcon.vue.js";
16
+ import we from "./HelpIcon.vue.js";
17
+ import Ee from "./ExpandRowToggle.vue.js";
18
+ import { DEFAULT_ROW_HEIGHT as Be, CHECKBOX_COLUMN_ID as Ae, DATA_GRID_HEADER_HEIGHT as X, HEADER_ROW_HEIGHT as j } from "../common/consts.js";
19
+ import { useElementSize as Ie } from "@vueuse/core";
20
+ const Pe = ["data-testid"], Le = ["data-testid"], Ve = ["data-testid"], Me = {
21
+ key: 1,
22
+ class: "expand-toggle-cell"
23
+ }, De = ["onClick"], Fe = { class: "table-head-container" }, Ne = {
24
+ key: 0,
25
+ class: "totals-row"
26
+ }, Oe = ["data-testid"], ze = ["onMouseenter", "onClick"], Ge = {
27
+ key: 2,
28
+ class: "expanded-row"
29
+ }, Ke = {
30
+ key: 3,
31
+ class: "floating-row"
32
+ }, Ue = {
33
+ key: 0,
34
+ class: "table-footer"
35
+ }, ct = /* @__PURE__ */ ke({
36
+ __name: "DataGrid",
37
+ props: {
38
+ title: { default: "" },
39
+ columns: null,
40
+ rows: null,
41
+ sections: { default: null },
42
+ sort: { default: null },
43
+ selection: { default: null },
44
+ getRowId: { type: Function, default: (l, m) => m },
45
+ getRowKey: { type: Function, default: (l, m) => m },
46
+ selectedMatcher: { type: Function, default: (l, m) => l === m },
47
+ isSticky: { type: Boolean, default: !0 },
48
+ isStickyHeader: { type: Boolean, default: !1 },
49
+ isLoading: { type: Boolean, default: !1 },
50
+ emptyStateVariant: { default: null },
51
+ emptyStateTitle: { default: "No data to display" },
52
+ emptyStateSubtitle: { default: "" },
53
+ isInfiniteScroll: { type: Boolean, default: !1 },
54
+ showTotalsRow: { type: Boolean },
55
+ infiniteScrollThreshold: { default: 100 },
56
+ rowHeight: { type: [Number, Function], default: Be },
57
+ loadingRowCount: { default: 3 },
58
+ defaultScrollPosition: { default: null },
59
+ helpTooltipVariant: { default: "icon" },
60
+ testId: { default: "" },
61
+ useAvailableHeight: { type: Boolean, default: !1 },
62
+ search: { default: null },
63
+ showSearch: { type: Boolean, default: !1 },
64
+ searchPlaceholder: { default: "Search" },
65
+ searchAutoFocus: { type: Boolean, default: !1 },
66
+ zIndexBase: { default: 100 },
67
+ rowCustomClassKey: { default: "" },
68
+ rowDataKey: { default: "" },
69
+ isSelectionSticky: { type: Boolean, default: !1 },
70
+ isSelectionBordered: { type: Boolean, default: !1 }
71
+ },
72
+ emits: ["update:sort", "update:search", "update:selection", "onScroll", "onClearSearch", "saveRow", "loadMore", "selectAll", "selectRow", "clickRow"],
73
+ setup(l, { expose: m, emit: f }) {
74
+ const s = l;
75
+ me((a) => ({
76
+ "55ef8912": l.zIndexBase,
77
+ "5caaa606": t(le),
78
+ b7356102: t(G),
79
+ "7d96c2a6": t(fe)
80
+ }));
81
+ const p = be(), q = (a) => s.rowCustomClassKey && s.rows[a] ? s.rows[a][s.rowCustomClassKey] : "", {
82
+ list: v,
83
+ containerProps: z,
84
+ wrapperProps: J,
85
+ activeRow: T,
86
+ gridColumnTemplate: G,
87
+ toggleSortOrder: Z,
88
+ columnsStickyPositions: H,
89
+ hasSearchSlot: _,
90
+ containerStyle: ee,
91
+ onScroll: K,
92
+ savingRows: U,
93
+ hasExpandSlot: w,
94
+ toggleExpandRow: te,
95
+ cssExpandGridCol: le,
96
+ isRowExpanded: M,
97
+ hasCheckboxes: D,
98
+ activeMenuRow: ae,
99
+ scrollTo: se
100
+ } = Te(s, f), W = u(() => !!p.footer), ie = u(
101
+ () => s.title || p.title || _.value || p["table-header-actions"] || p["table-header-pre-search"]
102
+ ), x = u({
103
+ get: () => s.search,
104
+ set: (a) => f("update:search", a)
105
+ }), oe = u(() => s.selection.length || 0), F = u(() => {
106
+ const a = s.rows.map((o, e) => s.getRowId(o, e));
107
+ return !!a.length && a.every((o) => E(o));
108
+ }), E = (a) => s.selection.findIndex((o) => s.selectedMatcher(a, o)) !== -1, de = (a) => {
109
+ E(a) ? (B(
110
+ s.selection.filter(
111
+ (o) => !s.selectedMatcher(a, o)
112
+ )
113
+ ), f("selectRow", !1)) : (B([...s.selection, a]), f("selectRow", !0));
114
+ }, ne = () => {
115
+ if (F.value)
116
+ B([]), f("selectAll", !1);
117
+ else {
118
+ const a = s.rows.map((o, e) => s.getRowId(o, e)).filter((o) => !E(o));
119
+ B([...s.selection, ...a]), f("selectAll", !0);
120
+ }
121
+ }, B = (a) => {
122
+ f("update:selection", a);
123
+ }, re = (a) => !s.isLoading && T.value === a, ce = u(
124
+ () => s.emptyStateVariant ?? (x.value ? "no-results" : "no-data")
125
+ ), ue = u(
126
+ () => s.emptyStateSubtitle ? s.emptyStateSubtitle : x.value ? "Search again with different filters" : void 0
127
+ ), N = u(() => ({
128
+ class: {
129
+ sticky: s.isSelectionSticky,
130
+ bordered: s.isSelectionBordered
131
+ },
132
+ style: s.isSelectionSticky ? H.value[Ae] : null
133
+ })), he = (a) => ({
134
+ sticky: a.isSticky,
135
+ isStickyRight: a.isStickyRight,
136
+ bordered: a.isBordered,
137
+ isTextRight: a.isTextRight
138
+ }), Y = u(
139
+ () => s.columns.map((a) => he(a))
140
+ ), ye = (a) => ({
141
+ minHeight: (typeof s.rowHeight == "function" ? s.rowHeight(a) : s.rowHeight) + "px"
142
+ }), A = u(() => v.value.reduce((a, o) => (a[o.index] = ye(o.index), a), {})), fe = u(() => `${X}px`), { height: Se } = Ie(z.ref), ge = u(
143
+ () => Se.value - j - X
144
+ );
145
+ return m({
146
+ scrollTo: se
147
+ }), (a, o) => (i(), d("div", {
148
+ class: "table-container",
149
+ "data-testid": `${l.testId}-${t($).CONTAINER}`,
150
+ onMouseleave: o[3] || (o[3] = (e) => T.value = null)
151
+ }, [
152
+ b("table", {
153
+ ref: t(z).ref,
154
+ style: S(t(ee)),
155
+ class: y({
156
+ hasFooter: t(W),
157
+ "disabled-scrolling": t(v).length === 0
158
+ }),
159
+ "data-testid": `${l.testId}-${t($).TABLE}`,
160
+ onScrollPassive: o[2] || (o[2] = //@ts-ignore
161
+ (...e) => t(K) && t(K)(...e))
162
+ }, [
163
+ t(ie) ? (i(), I(t($e), {
164
+ key: 0,
165
+ search: t(x),
166
+ "onUpdate:search": o[0] || (o[0] = (e) => pe(x) ? x.value = e : null),
167
+ title: l.title,
168
+ "is-sticky": l.isStickyHeader,
169
+ "show-search": l.showSearch,
170
+ "search-placeholder": l.searchPlaceholder,
171
+ "search-auto-focus": l.searchAutoFocus,
172
+ "z-index-base": l.zIndexBase,
173
+ "test-id": l.testId,
174
+ onOnClearSearch: o[1] || (o[1] = (e) => f("onClearSearch"))
175
+ }, ve({
176
+ title: g(() => [
177
+ r(a.$slots, "title")
178
+ ]),
179
+ search: g(() => [
180
+ r(a.$slots, "search")
181
+ ]),
182
+ _: 2
183
+ }, [
184
+ t(p)["table-header-pre-search"] ? {
185
+ name: "table-header-pre-search",
186
+ fn: g(() => [
187
+ r(a.$slots, "table-header-pre-search")
188
+ ]),
189
+ key: "0"
190
+ } : void 0,
191
+ t(p)["table-header-actions"] ? {
192
+ name: "table-header-actions",
193
+ fn: g(() => [
194
+ r(a.$slots, "table-header-actions")
195
+ ]),
196
+ key: "1"
197
+ } : void 0
198
+ ]), 1032, ["search", "title", "is-sticky", "show-search", "search-placeholder", "search-auto-focus", "z-index-base", "test-id"])) : c("", !0),
199
+ b("thead", {
200
+ class: y({ sticky: l.isSticky, isStickyHeader: l.isStickyHeader })
201
+ }, [
202
+ b("div", {
203
+ class: "sections",
204
+ "data-testid": `${l.testId}-${t($).SECTIONS}`
205
+ }, [
206
+ (i(!0), d(C, null, R(l.sections, (e) => (i(), d("div", {
207
+ key: e.id,
208
+ class: y(["section-container", { sticky: e.isSticky }])
209
+ }, [
210
+ r(a.$slots, `section-${e.id}`, {}, () => [
211
+ b("div", {
212
+ style: S({ width: e.width + "px" }),
213
+ class: y({ section: !0 })
214
+ }, [
215
+ k(t(V), { variant: "body2" }, {
216
+ default: g(() => [
217
+ P(O(e.title), 1)
218
+ ]),
219
+ _: 2
220
+ }, 1024)
221
+ ], 4)
222
+ ])
223
+ ], 2))), 128))
224
+ ], 8, Ve),
225
+ b("tr", {
226
+ style: S({ height: `${t(j)}px` })
227
+ }, [
228
+ t(D) ? (i(), d("th", L({
229
+ key: 0,
230
+ class: "checkbox-cell"
231
+ }, t(N)), [
232
+ r(a.$slots, "select-all-checkbox", {}, () => [
233
+ k(t(Q), {
234
+ disabled: l.isLoading,
235
+ "is-checked": t(F),
236
+ "is-indeterminate": !t(F) && t(oe) > 0,
237
+ "onUpdate:isChecked": ne
238
+ }, null, 8, ["disabled", "is-checked", "is-indeterminate"])
239
+ ])
240
+ ], 16)) : c("", !0),
241
+ t(w) ? (i(), d("th", Me)) : c("", !0),
242
+ (i(!0), d(C, null, R(l.columns, (e, h) => (i(), d("th", {
243
+ key: e.id,
244
+ class: y({
245
+ ...t(Y)[h],
246
+ isSortable: e.isSortable,
247
+ [`column-${e.id}`]: !0
248
+ }),
249
+ style: S(e.isSticky ? t(H)[e.id] : null),
250
+ onClick: (n) => e.isSortable ? t(Z)(e) : null
251
+ }, [
252
+ b("div", Fe, [
253
+ r(a.$slots, `header-${e.id}`, { column: e }, () => [
254
+ k(t(Re), {
255
+ text: e.helpText,
256
+ disabled: !e.helpText || l.helpTooltipVariant === "icon",
257
+ placement: e.helpTextPlacement || "top",
258
+ "test-id": `help-tooltip-underlined-${e.id}`
259
+ }, {
260
+ default: g(() => [
261
+ k(t(V), {
262
+ variant: "tableLabel",
263
+ class: y({
264
+ underlined: e.helpText && l.helpTooltipVariant === "underline"
265
+ })
266
+ }, {
267
+ default: g(() => [
268
+ P(O(e.title), 1)
269
+ ]),
270
+ _: 2
271
+ }, 1032, ["class"])
272
+ ]),
273
+ _: 2
274
+ }, 1032, ["text", "disabled", "placement", "test-id"])
275
+ ]),
276
+ e.helpText && l.helpTooltipVariant === "icon" ? (i(), I(we, {
277
+ key: 0,
278
+ "hover-help-text": e.helpText,
279
+ "hover-help-text-placement": e.helpTextPlacement,
280
+ "test-id": `help-tooltip-${e.id}`
281
+ }, null, 8, ["hover-help-text", "hover-help-text-placement", "test-id"])) : c("", !0),
282
+ r(a.$slots, `after-header-${e.id}`, { column: e }),
283
+ e.isSortable && e.id === l.sort?.sortBy ? (i(), I(He, {
284
+ key: 1,
285
+ "sort-order": l.sort.sortOrder
286
+ }, null, 8, ["sort-order"])) : c("", !0)
287
+ ])
288
+ ], 14, De))), 128))
289
+ ], 4),
290
+ l.showTotalsRow && t(v).length > 0 ? (i(), d("tr", Ne, [
291
+ t(D) ? (i(), d("td", L({
292
+ key: 0,
293
+ class: "bg"
294
+ }, t(N)), null, 16)) : c("", !0),
295
+ (i(!0), d(C, null, R(l.columns, (e, h) => (i(), d("td", {
296
+ key: e.id,
297
+ class: y({
298
+ ...t(Y)[h],
299
+ [`total-${e.id}`]: !0
300
+ }),
301
+ style: S(e.isSticky ? t(H)[e.id] : null)
302
+ }, [
303
+ r(a.$slots, `total-${e.id}`, { column: e }, () => [
304
+ h === 0 ? (i(), I(t(V), {
305
+ key: 0,
306
+ variant: "h6"
307
+ }, {
308
+ default: g(() => [
309
+ P("Totals")
310
+ ]),
311
+ _: 1
312
+ })) : c("", !0)
313
+ ])
314
+ ], 6))), 128))
315
+ ])) : c("", !0)
316
+ ], 2),
317
+ b("tbody", null, [
318
+ t(v).length > 0 ? (i(), d("div", L({
319
+ key: 0,
320
+ class: "table-body-wrapper",
321
+ "data-testid": `${l.testId}-${t($).BODY_WRAPPER}`
322
+ }, t(J)), [
323
+ (i(!0), d(C, null, R(t(v), (e) => (i(), d("tr", {
324
+ key: l.getRowKey(e.data, e.index),
325
+ class: y(["table-row", {
326
+ loading: l.isLoading || l.isLoading && !e.data || t(U).includes(e.index),
327
+ active: t(T) === e.index,
328
+ activeMenu: t(ae) === e.index,
329
+ expanded: t(w) && t(M)(e.index),
330
+ [q(e.index)]: !0
331
+ }]),
332
+ style: S(t(A)[e.index]),
333
+ onMouseenter: (h) => T.value = e.index,
334
+ onClick: (h) => f("clickRow", e.index)
335
+ }, [
336
+ t(D) ? (i(), d("td", L({
337
+ key: 0,
338
+ class: "checkbox-cell"
339
+ }, t(N), {
340
+ style: t(A)[e.index]
341
+ }), [
342
+ k(t(Q), {
343
+ "is-checked": E(l.getRowId(e.data, e.index)),
344
+ "onUpdate:isChecked": (h) => de(l.getRowId(e.data, e.index))
345
+ }, null, 8, ["is-checked", "onUpdate:isChecked"])
346
+ ], 16)) : c("", !0),
347
+ t(w) ? (i(), d("td", {
348
+ key: 1,
349
+ class: "expand-toggle-cell",
350
+ style: S(t(A)[e.index])
351
+ }, [
352
+ k(Ee, {
353
+ expanded: t(M)(e.index),
354
+ onClick: (h) => t(te)(e.index, h)
355
+ }, null, 8, ["expanded", "onClick"])
356
+ ], 4)) : c("", !0),
357
+ (i(!0), d(C, null, R(l.columns, (h, n) => (i(), d("td", {
358
+ key: n,
359
+ class: y({
360
+ sticky: l.columns[n].isSticky,
361
+ isStickyRight: l.columns[n].isStickyRight,
362
+ bordered: l.columns[n].isBordered,
363
+ isTextRight: l.columns[n].isTextRight,
364
+ [`column-${l.columns[n].id}`]: !0
365
+ }),
366
+ style: S([
367
+ l.columns[n].isSticky ? t(H)[l.columns[n].id] : null,
368
+ t(A)[e.index]
369
+ ])
370
+ }, [
371
+ !l.isLoading || l.isLoading && e.data[n] ? (i(), d("div", {
372
+ key: 0,
373
+ class: y(["table-cell", { last: n === e.data.length - 1 }])
374
+ }, [
375
+ r(a.$slots, `cell-${l.columns[n].id}`, {
376
+ cell: e.data[n],
377
+ isLoading: t(U).includes(e.index),
378
+ cellIndex: n,
379
+ row: e,
380
+ rowIndex: e.index
381
+ }, () => [
382
+ k(t(V), { variant: "body1" }, {
383
+ default: g(() => [
384
+ P(O(e.data[n]), 1)
385
+ ]),
386
+ _: 2
387
+ }, 1024)
388
+ ])
389
+ ], 2)) : r(a.$slots, "loader", { key: 1 }, () => [
390
+ k(t(xe), { round: "" })
391
+ ])
392
+ ], 6))), 128)),
393
+ t(w) && t(M)(e.index) ? (i(), d("div", Ge, [
394
+ r(a.$slots, "expanded", {
395
+ row: e,
396
+ gridColumnTemplate: t(G)
397
+ })
398
+ ])) : c("", !0),
399
+ re(e.index) ? (i(), d("div", Ke, [
400
+ r(a.$slots, "floating-row", {
401
+ row: e,
402
+ rowIndex: e.index
403
+ })
404
+ ])) : c("", !0)
405
+ ], 46, ze))), 128))
406
+ ], 16, Oe)) : (i(), d("div", {
407
+ key: 1,
408
+ style: S(
409
+ l.useAvailableHeight ? { height: `${t(ge)}px` } : {}
410
+ )
411
+ }, [
412
+ r(a.$slots, "empty-state", {}, () => [
413
+ k(t(Ce), {
414
+ class: "empty-state",
415
+ title: l.emptyStateTitle,
416
+ subtitle: t(ue),
417
+ variant: t(ce),
418
+ "icon-name": "file-search",
419
+ "test-id": `${l.testId}-${t($).EMPTY_STATE}`
420
+ }, null, 8, ["title", "subtitle", "variant", "test-id"])
421
+ ])
422
+ ], 4))
423
+ ])
424
+ ], 46, Le),
425
+ t(W) ? (i(), d("div", Ue, [
426
+ r(a.$slots, "footer")
427
+ ])) : c("", !0)
428
+ ], 40, Pe));
429
+ }
430
+ });
431
+ export {
432
+ ct as default
433
+ };
@@ -1 +1,19 @@
1
- import "../../../DataGridContainer.vue_vue_type_style_index_0_scoped_9a30b10c_lang.css";
1
+ import "../../../DataGridContainer.vue_vue_type_style_index_0_scoped_9a30b10c_lang.css"; import { defineComponent as n, useSlots as a, computed as d, unref as r, openBlock as i, createElementBlock as l, renderSlot as t, createElementVNode as c } from "vue";
2
+ const u = {
3
+ key: 0,
4
+ class: "data-grid-container"
5
+ }, p = { class: "side-panel-container" }, v = /* @__PURE__ */ n({
6
+ __name: "DataGridContainer",
7
+ setup(_) {
8
+ const o = a(), s = d(() => !!o["side-panel"]);
9
+ return (e, m) => r(s) ? (i(), l("div", u, [
10
+ t(e.$slots, "default", {}, void 0, !0),
11
+ c("div", p, [
12
+ t(e.$slots, "side-panel", {}, void 0, !0)
13
+ ])
14
+ ])) : t(e.$slots, "default", { key: 1 }, void 0, !0);
15
+ }
16
+ });
17
+ export {
18
+ v as default
19
+ };
@@ -1 +1,84 @@
1
- import "../../../DataGridHeader.vue_vue_type_style_index_0_scoped_0e826456_lang.css";
1
+ import "../../../DataGridHeader.vue_vue_type_style_index_0_scoped_0e826456_lang.css"; import { defineComponent as $, useCssVars as I, useSlots as S, openBlock as r, createElementBlock as i, normalizeClass as E, normalizeStyle as b, unref as t, createElementVNode as n, renderSlot as l, createVNode as m, withCtx as v, createTextVNode as A, toDisplayString as C, createCommentVNode as c, isRef as H } from "vue";
2
+ import { TableTestIdModifiers as s } from "../../../testids/index.js";
3
+ import T from "../../typography/v4/Typography.vue.js";
4
+ import R from "../../search/v4/SearchV4.vue.js";
5
+ import { useVModel as V } from "@vueuse/core";
6
+ import { DATA_GRID_HEADER_HEIGHT as k } from "../common/consts.js";
7
+ const B = ["data-testid"], D = ["data-testid"], p = ["data-testid"], N = ["data-testid"], g = { class: "search-wrapper" }, w = ["data-testid"], O = /* @__PURE__ */ $({
8
+ __name: "DataGridHeader",
9
+ props: {
10
+ title: { default: "" },
11
+ search: { default: null },
12
+ isSticky: { type: Boolean, default: !1 },
13
+ zIndexBase: { default: 100 },
14
+ standalone: { type: Boolean, default: !1 },
15
+ showSearch: { type: Boolean, default: !1 },
16
+ searchPlaceholder: { default: "Search" },
17
+ searchAutoFocus: { type: Boolean, default: !1 },
18
+ testId: { default: "" }
19
+ },
20
+ emits: ["update:search", "onClearSearch"],
21
+ setup(e, { emit: h }) {
22
+ const y = e;
23
+ I((a) => ({
24
+ "406e82a6": e.zIndexBase
25
+ }));
26
+ const u = S(), o = V(y, "search", h);
27
+ return (a, d) => (r(), i("div", {
28
+ class: E(["table-header", {
29
+ isStickyHeader: e.isSticky,
30
+ "table-header--standalone": e.standalone
31
+ }]),
32
+ style: b({ height: `${t(k)}px` }),
33
+ "data-testid": `${e.testId}-${t(s).HEADER}`
34
+ }, [
35
+ n("div", {
36
+ class: "table-title",
37
+ "data-testid": `${e.testId}-${t(s).TITLE}`
38
+ }, [
39
+ l(a.$slots, "title", {}, () => [
40
+ m(t(T), { variant: "h3" }, {
41
+ default: v(() => [
42
+ A(C(e.title), 1)
43
+ ]),
44
+ _: 1
45
+ })
46
+ ], !0)
47
+ ], 8, D),
48
+ t(u)["table-header-pre-search"] ? (r(), i("div", {
49
+ key: 0,
50
+ class: "table-header-pre-search-content",
51
+ "data-testid": `${e.testId}-${t(s).PRE_SEARCH_HEADER}`
52
+ }, [
53
+ l(a.$slots, "table-header-pre-search", {}, void 0, !0)
54
+ ], 8, p)) : c("", !0),
55
+ n("div", {
56
+ class: "table-header-right",
57
+ "data-testid": `${e.testId}-${t(s).HEADER_RIGHT}`
58
+ }, [
59
+ e.showSearch ? l(a.$slots, "search", { key: 0 }, () => [
60
+ n("div", g, [
61
+ m(t(R), {
62
+ modelValue: t(o),
63
+ "onUpdate:modelValue": d[0] || (d[0] = (f) => H(o) ? o.value = f : null),
64
+ placeholder: e.searchPlaceholder,
65
+ "auto-focus": e.searchAutoFocus,
66
+ "test-id": e.testId,
67
+ onOnClear: d[1] || (d[1] = (f) => h("onClearSearch"))
68
+ }, null, 8, ["modelValue", "placeholder", "auto-focus", "test-id"])
69
+ ])
70
+ ], !0) : c("", !0)
71
+ ], 8, N),
72
+ t(u)["table-header-actions"] ? (r(), i("div", {
73
+ key: 1,
74
+ class: "table-header-actions",
75
+ "data-testid": `${e.testId}-${t(s).ACTIONS}`
76
+ }, [
77
+ l(a.$slots, "table-header-actions", {}, void 0, !0)
78
+ ], 8, w)) : c("", !0)
79
+ ], 14, B));
80
+ }
81
+ });
82
+ export {
83
+ O as default
84
+ };
@@ -1 +1,66 @@
1
- import "../../../DataGridMenu.vue_vue_type_style_index_0_scoped_ddfaf207_lang.css";
1
+ import "../../../DataGridMenu.vue_vue_type_style_index_0_scoped_ddfaf207_lang.css"; import { defineComponent as u, onBeforeUnmount as f, openBlock as x, createBlock as w, unref as o, withCtx as r, createVNode as c, createSlots as I, createTextVNode as v, toDisplayString as M } from "vue";
2
+ import g from "../../dropdown/v4/DropdownV4.vue.js";
3
+ import "../../dropdown/v4/DefaultDropdownTrigger.vue.js";
4
+ import "../../dropdown/v4/IconButtonDropdownTrigger.vue.js";
5
+ import "../../dropdown/v4/ChipDropdownTrigger.vue.js";
6
+ import "../../dropdown/v4/AppDropdownTrigger.vue.js";
7
+ import "../../dropdown/v4/ButtonDropdownTrigger.vue.js";
8
+ import "../../dropdown/v4/ButtonFilterDropdownTrigger.vue.js";
9
+ import "../../dropdown/v4/TreeDropdown.vue.js";
10
+ import C from "../../dropdown/v4/OptionV4.vue.js";
11
+ import "../../dropdown/v4/ConditionalDropdown.vue.js";
12
+ import k from "../../icon/v4/IconV4.vue.js";
13
+ import "../../icon/v4/IconFlag.vue.js";
14
+ import { useTableContext as y } from "../common/TableContext.js";
15
+ const h = /* @__PURE__ */ u({
16
+ __name: "DataGridMenu",
17
+ props: {
18
+ menuItems: { default: () => [] },
19
+ rowIndex: { default: null },
20
+ placement: { default: "left-start" }
21
+ },
22
+ emits: ["selected"],
23
+ setup(t, { emit: d }) {
24
+ const n = t, i = y("DataGridMenu"), a = (s) => s.text, p = () => {
25
+ n.rowIndex && i.setActiveMenuRow(n.rowIndex);
26
+ }, m = () => {
27
+ n.rowIndex && i.setActiveMenuRow(null);
28
+ };
29
+ return f(m), (s, l) => (x(), w(o(g), {
30
+ class: "data-grid-menu",
31
+ options: t.menuItems,
32
+ "display-value": a,
33
+ "predefined-trigger": "icon-button",
34
+ placement: t.placement,
35
+ skidding: -4,
36
+ "onUpdate:selected": l[0] || (l[0] = (e) => d("selected", e)),
37
+ onOpened: p,
38
+ onClosed: m
39
+ }, {
40
+ default: r(({ option: e }) => [
41
+ c(o(C), { option: e }, I({
42
+ default: r(() => [
43
+ v(" " + M(a(e)), 1)
44
+ ]),
45
+ _: 2
46
+ }, [
47
+ e.icon ? {
48
+ name: "icon-start",
49
+ fn: r(() => [
50
+ c(o(k), {
51
+ class: "menu-icon",
52
+ name: e.icon,
53
+ size: "20px"
54
+ }, null, 8, ["name"])
55
+ ]),
56
+ key: "0"
57
+ } : void 0
58
+ ]), 1032, ["option"])
59
+ ]),
60
+ _: 1
61
+ }, 8, ["options", "placement"]));
62
+ }
63
+ });
64
+ export {
65
+ h as default
66
+ };
@@ -1 +1,53 @@
1
- import "../../../DataGridRowsCounter.vue_vue_type_style_index_0_scoped_e38c881a_lang.css";
1
+ import "../../../DataGridRowsCounter.vue_vue_type_style_index_0_scoped_e38c881a_lang.css"; import { defineComponent as r, openBlock as u, createElementBlock as f, unref as e, createVNode as d, withCtx as l, createTextVNode as a, toDisplayString as o } from "vue";
2
+ import s from "../../typography/v4/Typography.vue.js";
3
+ import { RowsCounterTestIdModifiers as i } from "../../../testids/index.js";
4
+ import { nFormatter as n } from "../../../utils/formatNumbers.js";
5
+ const c = ["data-testid"], I = /* @__PURE__ */ r({
6
+ __name: "DataGridRowsCounter",
7
+ props: {
8
+ count: { default: 0 },
9
+ totalCount: { default: 0 },
10
+ displayingText: { default: "Displaying" },
11
+ outOfText: { default: "out of" },
12
+ totalText: { default: "total rows" },
13
+ testId: { default: "" }
14
+ },
15
+ setup(t) {
16
+ return (m, T) => (u(), f("div", {
17
+ class: "data-grid-rows-counter",
18
+ "data-testid": `${t.testId}-${e(i).CONTAINER}`
19
+ }, [
20
+ d(e(s), { variant: "body1" }, {
21
+ default: l(() => [
22
+ a(o(t.displayingText) + " ", 1),
23
+ d(e(s), {
24
+ class: "text-strong",
25
+ variant: "subtitle1",
26
+ "data-testid": `${t.testId}-${e(i).COUNT}`
27
+ }, {
28
+ default: l(() => [
29
+ a(o(e(n)(t.count, !1, null, !1)), 1)
30
+ ]),
31
+ _: 1
32
+ }, 8, ["data-testid"]),
33
+ a(" " + o(t.outOfText) + " ", 1),
34
+ d(e(s), {
35
+ class: "text-strong",
36
+ variant: "subtitle1",
37
+ "data-testid": `${t.testId}-${e(i).TOTAL}`
38
+ }, {
39
+ default: l(() => [
40
+ a(o(e(n)(t.totalCount, !1, null, !1)), 1)
41
+ ]),
42
+ _: 1
43
+ }, 8, ["data-testid"]),
44
+ a(" " + o(t.totalText), 1)
45
+ ]),
46
+ _: 1
47
+ })
48
+ ], 8, c));
49
+ }
50
+ });
51
+ export {
52
+ I as default
53
+ };
@@ -1 +1,26 @@
1
- import "../../../ExpandRowToggle.vue_vue_type_style_index_0_scoped_b053baa6_lang.css";
1
+ import "../../../ExpandRowToggle.vue_vue_type_style_index_0_scoped_b053baa6_lang.css"; import { defineComponent as r, openBlock as a, createElementBlock as c, createVNode as p, unref as l } from "vue";
2
+ import "../../button/v4/ButtonV4.vue.js";
3
+ import i from "../../button/v4/IconButtonV4.vue.js";
4
+ import "../../button/v4/ButtonGroup.vue.js";
5
+ import "../../button/v4/ToggleButtonGroupAB.vue.js";
6
+ const g = /* @__PURE__ */ r({
7
+ __name: "ExpandRowToggle",
8
+ props: {
9
+ expanded: { type: Boolean, default: !1 }
10
+ },
11
+ emits: ["click"],
12
+ setup(o, { emit: n }) {
13
+ return (m, e) => (a(), c("div", {
14
+ class: "expand-row-toggle",
15
+ onClick: e[0] || (e[0] = (t) => n("click", t))
16
+ }, [
17
+ p(l(i), {
18
+ class: "expand-button",
19
+ "icon-name": o.expanded ? "caret-down" : "caret-right"
20
+ }, null, 8, ["icon-name"])
21
+ ]));
22
+ }
23
+ });
24
+ export {
25
+ g as default
26
+ };
@@ -1 +1,33 @@
1
- import "../../../HelpIcon.vue_vue_type_style_index_0_scoped_06fce2e3_lang.css";
1
+ import "../../../HelpIcon.vue_vue_type_style_index_0_scoped_06fce2e3_lang.css"; import { defineComponent as o, openBlock as l, createBlock as n, unref as t, withCtx as r, createVNode as a } from "vue";
2
+ import c from "../../icon/v4/IconV4.vue.js";
3
+ import "../../icon/v4/IconFlag.vue.js";
4
+ import p from "../../tooltip/v4/TooltipV4.vue.js";
5
+ const x = /* @__PURE__ */ o({
6
+ __name: "HelpIcon",
7
+ props: {
8
+ hoverHelpText: { default: "" },
9
+ hoverHelpTextPlacement: { default: "top" },
10
+ testId: { default: "" }
11
+ },
12
+ setup(e) {
13
+ return (i, m) => (l(), n(t(p), {
14
+ class: "table-help-icon",
15
+ triggers: ["hover"],
16
+ text: e.hoverHelpText,
17
+ placement: e.hoverHelpTextPlacement,
18
+ "test-id": e.testId
19
+ }, {
20
+ default: r(() => [
21
+ a(t(c), {
22
+ class: "info-icon",
23
+ name: "question",
24
+ size: "16px"
25
+ })
26
+ ]),
27
+ _: 1
28
+ }, 8, ["text", "placement", "test-id"]));
29
+ }
30
+ });
31
+ export {
32
+ x as default
33
+ };
@@ -1 +1,183 @@
1
- import "../../../MultipleDataGrid.vue_vue_type_style_index_0_scoped_3caa1d7b_lang.css";
1
+ import "../../../MultipleDataGrid.vue_vue_type_style_index_0_scoped_3caa1d7b_lang.css"; import { defineComponent as V, useCssVars as E, useSlots as N, computed as G, openBlock as d, createElementBlock as w, createVNode as O, unref as l, isRef as b, createSlots as g, withCtx as n, renderSlot as i, createBlock as S, createCommentVNode as v, Fragment as p, renderList as h } from "vue";
2
+ import R from "./DataGrid.vue.js";
3
+ import "./DataGridMenu.vue.js";
4
+ import A from "./DataGridRowsCounter.vue.js";
5
+ import F from "./DataGridHeader.vue.js";
6
+ import "./DataGridContainer.vue.js";
7
+ import "./MultipleDataGrid.vue.js";
8
+ import { useVModel as H } from "@vueuse/core";
9
+ const M = {
10
+ key: 0,
11
+ class: "tables-container"
12
+ }, Y = /* @__PURE__ */ V({
13
+ __name: "MultipleDataGrid",
14
+ props: {
15
+ tablesSettings: { default: () => [] },
16
+ loadingAndEmptyStatesColumns: { default: () => [] },
17
+ getRowId: { type: Function, default: (t, s) => s },
18
+ getRowKey: { type: Function, default: (t, s) => s },
19
+ isSticky: { type: Boolean, default: !0 },
20
+ isLoading: { type: Boolean, default: !1 },
21
+ emptyStateVariant: { default: null },
22
+ emptyStateTitle: { default: "No data to display" },
23
+ emptyStateSubtitle: { default: "" },
24
+ loadingRowCount: { default: 3 },
25
+ search: { default: null },
26
+ showSearch: { type: Boolean, default: !0 },
27
+ searchPlaceholder: { default: "Search" },
28
+ zIndexBase: { default: 100 },
29
+ count: { default: 0 },
30
+ totalCount: { default: 0 },
31
+ displayingText: { default: "Displaying" },
32
+ outOfText: { default: "out of" },
33
+ totalText: { default: "total rows" },
34
+ rowCustomClassKey: { default: "" },
35
+ rowDataKey: { default: "" },
36
+ testId: { default: "" }
37
+ },
38
+ emits: ["update:search", "onScroll", "onClearSearch", "clickRow", "saveRow"],
39
+ setup(t, { emit: s }) {
40
+ const f = t;
41
+ E((e) => ({
42
+ "21bdffad": t.zIndexBase
43
+ }));
44
+ const k = N(), x = G(
45
+ () => f.isLoading || !f.tablesSettings.flatMap((e) => e.rows).length
46
+ ), u = H(f, "search", s), y = (e) => `header-${e.id}`, C = (e) => `cell-${e.id}`, $ = (e) => {
47
+ s("onScroll", e.target.scrollTop);
48
+ }, I = () => s("onClearSearch"), B = (e, r) => s("clickRow", e, r), T = ({ value: e, rowIndex: r, cellIndex: a, confirm: c }, o) => s("saveRow", { value: e, tableIndex: o, rowIndex: r, cellIndex: a, confirm: c });
49
+ return (e, r) => (d(), w("div", {
50
+ class: "multi-table-container",
51
+ onScrollPassive: $
52
+ }, [
53
+ O(l(F), {
54
+ search: l(u),
55
+ "onUpdate:search": r[0] || (r[0] = (a) => b(u) ? u.value = a : null),
56
+ class: "multi-table-header",
57
+ "is-sticky": t.isSticky,
58
+ "show-search": t.showSearch,
59
+ "search-placeholder": t.searchPlaceholder,
60
+ "z-index-base": t.zIndexBase,
61
+ "test-id": t.testId,
62
+ onOnClearSearch: I
63
+ }, g({
64
+ title: n(() => [
65
+ i(e.$slots, "title", {}, () => [
66
+ t.isLoading ? v("", !0) : (d(), S(l(A), {
67
+ key: 0,
68
+ count: t.count,
69
+ "total-count": t.totalCount,
70
+ "total-text": t.totalText,
71
+ "displaying-text": t.displayingText,
72
+ "out-of-text": t.outOfText,
73
+ "test-id": t.testId
74
+ }, null, 8, ["count", "total-count", "total-text", "displaying-text", "out-of-text", "test-id"]))
75
+ ], !0)
76
+ ]),
77
+ search: n(() => [
78
+ i(e.$slots, "search", {}, void 0, !0)
79
+ ]),
80
+ _: 2
81
+ }, [
82
+ l(k)["table-header-pre-search"] ? {
83
+ name: "table-header-pre-search",
84
+ fn: n(() => [
85
+ i(e.$slots, "table-header-pre-search", {}, void 0, !0)
86
+ ]),
87
+ key: "0"
88
+ } : void 0,
89
+ l(k)["table-header-actions"] ? {
90
+ name: "table-header-actions",
91
+ fn: n(() => [
92
+ i(e.$slots, "table-header-actions", {}, void 0, !0)
93
+ ]),
94
+ key: "1"
95
+ } : void 0
96
+ ]), 1032, ["search", "is-sticky", "show-search", "search-placeholder", "z-index-base", "test-id"]),
97
+ l(x) ? (d(), S(l(R), {
98
+ key: 1,
99
+ search: l(u),
100
+ "onUpdate:search": r[1] || (r[1] = (a) => b(u) ? u.value = a : null),
101
+ rows: [],
102
+ columns: t.loadingAndEmptyStatesColumns,
103
+ "is-loading": t.isLoading,
104
+ "loading-row-count": t.loadingRowCount,
105
+ "empty-state-variant": t.emptyStateVariant,
106
+ "empty-state-title": t.emptyStateTitle,
107
+ "empty-state-subtitle": t.emptyStateSubtitle,
108
+ "test-id": t.testId
109
+ }, g({
110
+ "empty-state": n(() => [
111
+ i(e.$slots, "empty-state", {}, void 0, !0)
112
+ ]),
113
+ _: 2
114
+ }, [
115
+ h(t.loadingAndEmptyStatesColumns, (a) => ({
116
+ name: y(a),
117
+ fn: n(() => [
118
+ i(e.$slots, `${y(a)}`, { column: a }, void 0, !0)
119
+ ])
120
+ }))
121
+ ]), 1032, ["search", "columns", "is-loading", "loading-row-count", "empty-state-variant", "empty-state-title", "empty-state-subtitle", "test-id"])) : (d(), w("div", M, [
122
+ (d(!0), w(p, null, h(t.tablesSettings, (a, c) => (d(), w("div", {
123
+ key: a.testId,
124
+ class: "table-wrapper"
125
+ }, [
126
+ a.rows.length ? (d(), S(l(R), {
127
+ key: 0,
128
+ sections: a.sections,
129
+ columns: a.columns,
130
+ rows: a.rows,
131
+ "row-height": a.rowHeight,
132
+ "is-sticky": t.isSticky,
133
+ "z-index-base": t.zIndexBase,
134
+ "get-row-id": t.getRowId,
135
+ "get-row-key": t.getRowKey,
136
+ "row-custom-class-key": t.rowCustomClassKey,
137
+ "row-data-key": t.rowDataKey,
138
+ "test-id": a.testId,
139
+ onClickRow: (o) => B(o, c),
140
+ onSaveRow: (o) => T(o, c)
141
+ }, g({
142
+ "floating-row": n(({ row: o, rowIndex: m }) => [
143
+ i(e.$slots, "floating-row", {
144
+ row: o,
145
+ rowIndex: m,
146
+ tableIndex: c
147
+ }, void 0, !0)
148
+ ]),
149
+ _: 2
150
+ }, [
151
+ h(a.columns, (o) => ({
152
+ name: y(o),
153
+ fn: n(() => [
154
+ i(e.$slots, `${y(o)}`, { column: o }, void 0, !0)
155
+ ])
156
+ })),
157
+ h(a.columns, (o) => ({
158
+ name: C(o),
159
+ fn: n(({
160
+ cell: m,
161
+ rowIndex: z,
162
+ isLoading: L,
163
+ cellIndex: D,
164
+ row: K
165
+ }) => [
166
+ i(e.$slots, `${C(o)}`, {
167
+ cell: m,
168
+ isLoading: L,
169
+ cellIndex: D,
170
+ row: K,
171
+ rowIndex: z
172
+ }, void 0, !0)
173
+ ])
174
+ }))
175
+ ]), 1032, ["sections", "columns", "rows", "row-height", "is-sticky", "z-index-base", "get-row-id", "get-row-key", "row-custom-class-key", "row-data-key", "test-id", "onClickRow", "onSaveRow"])) : v("", !0)
176
+ ]))), 128))
177
+ ]))
178
+ ], 32));
179
+ }
180
+ });
181
+ export {
182
+ Y as default
183
+ };
@@ -1 +1,25 @@
1
- import "../../../SortIcon.vue_vue_type_style_index_0_scoped_2bda5d4a_lang.css";
1
+ import "../../../SortIcon.vue_vue_type_style_index_0_scoped_2bda5d4a_lang.css"; import { defineComponent as c, openBlock as e, createElementBlock as s, createBlock as o, unref as t, createCommentVNode as a } from "vue";
2
+ import n from "../../icon/v4/IconV4.vue.js";
3
+ import "../../icon/v4/IconFlag.vue.js";
4
+ const m = { class: "table-sort-icon" }, f = /* @__PURE__ */ c({
5
+ __name: "SortIcon",
6
+ props: {
7
+ sortOrder: null
8
+ },
9
+ setup(r) {
10
+ return (d, i) => (e(), s("div", m, [
11
+ r.sortOrder === "asc" ? (e(), o(t(n), {
12
+ key: 0,
13
+ name: "arrow-up",
14
+ size: "20px"
15
+ })) : r.sortOrder === "desc" ? (e(), o(t(n), {
16
+ key: 1,
17
+ name: "arrow-down",
18
+ size: "20px"
19
+ })) : a("", !0)
20
+ ]));
21
+ }
22
+ });
23
+ export {
24
+ f as default
25
+ };
@@ -1 +1,43 @@
1
- import "../../../Editable.vue_vue_type_style_index_0_scoped_2561e913_lang.css";
1
+ import "../../../Editable.vue_vue_type_style_index_0_scoped_2561e913_lang.css"; import { defineComponent as u, openBlock as i, createElementBlock as a, unref as e, createElementVNode as m, renderSlot as s, createVNode as p, withCtx as y, createTextVNode as g, toDisplayString as k } from "vue";
2
+ import E from "../../typography/Text.vue.js";
3
+ import { editableCommon as _ } from "../common/Editable.common.js";
4
+ const v = { class: "editable-container" }, x = {
5
+ key: 1,
6
+ class: "editable-content"
7
+ }, N = /* @__PURE__ */ u({
8
+ __name: "Editable",
9
+ props: {
10
+ cell: { default: "" },
11
+ isEditing: { type: Boolean, default: !1 },
12
+ validateFunction: { type: Function, default: () => !1 },
13
+ isLoading: { type: Boolean, default: !1 },
14
+ rowIndex: null,
15
+ cellIndex: null
16
+ },
17
+ setup(t) {
18
+ const r = t, { onEdit: o, target: d, isEditing: c } = _(r);
19
+ return (n, l) => (i(), a("div", {
20
+ ref_key: "target",
21
+ ref: d,
22
+ class: "container",
23
+ onClick: l[0] || (l[0] = //@ts-ignore
24
+ (...f) => e(o) && e(o)(...f))
25
+ }, [
26
+ m("div", v, [
27
+ e(c) ? s(n.$slots, "input", { key: 0 }, void 0, !0) : (i(), a("div", x, [
28
+ s(n.$slots, "content", {}, () => [
29
+ p(E, { size: "sm" }, {
30
+ default: y(() => [
31
+ g(k(t.cell), 1)
32
+ ]),
33
+ _: 1
34
+ })
35
+ ], !0)
36
+ ]))
37
+ ])
38
+ ], 512));
39
+ }
40
+ });
41
+ export {
42
+ N as default
43
+ };
@@ -1 +1,57 @@
1
- import "../../../EditableV4.vue_vue_type_style_index_0_scoped_1bbe222a_lang.css";
1
+ import "../../../EditableV4.vue_vue_type_style_index_0_scoped_1bbe222a_lang.css"; import { defineComponent as f, openBlock as o, createElementBlock as i, unref as t, createElementVNode as m, renderSlot as r, createVNode as d, withCtx as y, createTextVNode as k, toDisplayString as V, createBlock as b, createCommentVNode as g } from "vue";
2
+ import { editableCommon as v } from "../common/Editable.common.js";
3
+ import w from "../../typography/v4/Typography.vue.js";
4
+ import x from "../../input/v4/TextField.vue.js";
5
+ import B from "../../icon/v4/IconV4.vue.js";
6
+ import "../../icon/v4/IconFlag.vue.js";
7
+ const C = { class: "editable-wrapper" }, E = {
8
+ key: 1,
9
+ class: "editable-content"
10
+ }, S = /* @__PURE__ */ f({
11
+ __name: "EditableV4",
12
+ props: {
13
+ cell: { default: "" },
14
+ isLoading: { type: Boolean, default: !1 },
15
+ rowIndex: null,
16
+ cellIndex: null,
17
+ type: { default: "input" },
18
+ withIcons: { type: Boolean, default: !0 },
19
+ saveOnClickOutside: { type: Boolean, default: !0 },
20
+ validateFunction: { type: Function, default: () => !1 },
21
+ displayValue: { type: Function, default: (e) => e }
22
+ },
23
+ setup(e) {
24
+ const s = e, { onEdit: n, target: c, isEditing: u } = v(s);
25
+ return (l, a) => (o(), i("div", {
26
+ ref_key: "target",
27
+ ref: c,
28
+ class: "editable",
29
+ onClick: a[0] || (a[0] = //@ts-ignore
30
+ (...p) => t(n) && t(n)(...p))
31
+ }, [
32
+ m("div", C, [
33
+ t(u) ? r(l.$slots, "input", { key: 0 }, () => [
34
+ d(t(x))
35
+ ], !0) : (o(), i("div", E, [
36
+ r(l.$slots, "content", {}, () => [
37
+ d(t(w), { variant: "body1" }, {
38
+ default: y(() => [
39
+ k(V(e.displayValue(e.cell)), 1)
40
+ ]),
41
+ _: 1
42
+ }),
43
+ e.type === "dropdown" ? (o(), b(t(B), {
44
+ key: 0,
45
+ class: "caret-icon",
46
+ name: "caret-down",
47
+ size: "20px"
48
+ })) : g("", !0)
49
+ ], !0)
50
+ ]))
51
+ ])
52
+ ], 512));
53
+ }
54
+ });
55
+ export {
56
+ S as default
57
+ };
@@ -1 +1,72 @@
1
- import "../../../TabsV4.vue_vue_type_style_index_0_scoped_f9433b11_lang.css";
1
+ import "../../../TabsV4.vue_vue_type_style_index_0_scoped_f9433b11_lang.css"; import { defineComponent as x, useCssVars as y, ref as l, watch as C, nextTick as $, openBlock as o, createElementBlock as c, mergeProps as w, unref as s, Fragment as A, renderList as S, normalizeClass as g, renderSlot as V, createBlock as B, withCtx as M, createTextVNode as N, toDisplayString as R, createCommentVNode as _, pushScopeId as E, popScopeId as P, createElementVNode as W } from "vue";
2
+ import H from "../../typography/v4/Typography.vue.js";
3
+ import { TabsTestIdModifiers as m } from "../../../testids/index.js";
4
+ import { tabsCommon as z } from "../common/tabsCommon.js";
5
+ import { useTestIdAttrs as D } from "../../../utils/testIds.js";
6
+ const F = (t) => (E("data-v-f9433b11"), t = t(), P(), t), U = ["data-testid", "onClick", "onMouseover"], j = /* @__PURE__ */ F(() => /* @__PURE__ */ W("div", { class: "tabs-border-line" }, null, -1)), Q = /* @__PURE__ */ x({
7
+ __name: "TabsV4",
8
+ props: {
9
+ tabsList: { default: () => [] },
10
+ selectedTab: null,
11
+ variant: { default: "card" },
12
+ testId: { default: "" }
13
+ },
14
+ emits: ["update:selectedTab"],
15
+ setup(t, { emit: p }) {
16
+ const r = t;
17
+ y((a) => ({
18
+ "167b065e": v.value,
19
+ "8cfadb62": b.value
20
+ }));
21
+ const { skipUnwrap: T, selectTab: I, setHover: L, clearHover: u, getSelectedTabIndex: k } = z(r, p), f = l(null), h = D(r.testId, m), i = (a) => a.id === r.selectedTab, b = l(), v = l();
22
+ return C(
23
+ [() => r.variant, () => r.selectedTab, () => r.tabsList],
24
+ async () => {
25
+ const a = k();
26
+ if (a === -1)
27
+ return;
28
+ await $();
29
+ const e = Array.from(f.value?.children || []).at(a);
30
+ b.value = e?.clientWidth + "px", v.value = e?.offsetLeft + "px";
31
+ },
32
+ { immediate: !0 }
33
+ ), (a, n) => (o(), c("ul", w({
34
+ ref_key: "tabsListRef",
35
+ ref: f,
36
+ class: ["tabs-list", [`tabs-list--${t.variant}`]]
37
+ }, s(h)[s(m).WRAPPER]), [
38
+ (o(!0), c(A, null, S(t.tabsList, (e) => (o(), c("li", {
39
+ ref_for: !0,
40
+ ref: s(T).tabsNewList,
41
+ key: e.id,
42
+ class: g(["tab-item", {
43
+ "tab-item--disabled": e.disabled,
44
+ "tab-item--active": i(e)
45
+ }]),
46
+ "data-testid": t.testId ? `${t.testId}-${s(m).TAB}-${e.id}` : void 0,
47
+ onClick: (d) => s(I)(e),
48
+ onMouseover: (d) => s(L)(e),
49
+ onMouseleave: n[0] || (n[0] = //@ts-ignore
50
+ (...d) => s(u) && s(u)(...d))
51
+ }, [
52
+ V(a.$slots, "tab-icon", {
53
+ tab: e,
54
+ active: i(e)
55
+ }, void 0, !0),
56
+ e.name ? (o(), B(s(H), {
57
+ key: 0,
58
+ variant: i(e) ? "tabLabel2" : "tabLabel1"
59
+ }, {
60
+ default: M(() => [
61
+ N(R(e.name), 1)
62
+ ]),
63
+ _: 2
64
+ }, 1032, ["variant"])) : _("", !0)
65
+ ], 42, U))), 128)),
66
+ j
67
+ ], 16));
68
+ }
69
+ });
70
+ export {
71
+ Q as default
72
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ironsource/shared-ui",
3
- "version": "2.2.0-rc.8",
3
+ "version": "2.2.0-rc.9",
4
4
  "engines": {
5
5
  "npm": ">=7.0.0",
6
6
  "node": ">=16.0.0"