@ironsource/shared-ui 2.1.12-rc.55 → 2.1.12-rc.57

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,37 +1,38 @@
1
- import "../../../DataGrid.vue_vue_type_style_index_0_scoped_ef67c78e_lang.css"; import { defineComponent as ye, useCssVars as fe, unref as t, useSlots as ke, computed as y, openBlock as i, createBlock as C, createSlots as Y, withCtx as u, createElementVNode as g, normalizeStyle as v, normalizeClass as f, isRef as Se, renderSlot as n, createCommentVNode as c, createElementBlock as d, Fragment as x, renderList as $, createVNode as S, createTextVNode as V, toDisplayString as D, mergeProps as I } from "vue";
2
- import M from "../../typography/v4/Typography.vue.js";
3
- import ge from "../../skeleton/v4/SkeletonV4.vue.js";
4
- import me from "../../emptyState/v4/EmptyStateV4.vue.js";
1
+ import "../../../DataGrid.vue_vue_type_style_index_0_scoped_cd41c5ca_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 x, renderList as C, 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
5
  import Q from "../../checkbox/v4/CheckboxV4.vue.js";
6
- import be from "../../tooltip/v4/TooltipV4.vue.js";
6
+ import Re from "../../tooltip/v4/TooltipV4.vue.js";
7
7
  import "./DataGrid.vue.js";
8
8
  import "./DataGridMenu.vue.js";
9
9
  import "./DataGridRowsCounter.vue.js";
10
- import ve from "./DataGridHeader.vue.js";
10
+ import $e from "./DataGridHeader.vue.js";
11
+ import "./DataGridContainer.vue.js";
11
12
  import "./MultipleDataGrid.vue.js";
12
- import pe from "./DataGridContainer.vue.js";
13
13
  import { TableTestIdModifiers as R } from "../../../testids/index.js";
14
- import { tableCommon as Ce } from "../common/Table.common.js";
15
- import xe from "./SortIcon.vue.js";
16
- import $e from "./HelpIcon.vue.js";
17
- import Re from "./ExpandRowToggle.vue.js";
18
- import { DEFAULT_ROW_HEIGHT as Te, CHECKBOX_COLUMN_ID as we } from "../common/consts.js";
19
- const Be = ["data-testid"], He = ["data-testid"], Ee = ["data-testid"], Pe = {
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 = {
20
21
  key: 1,
21
22
  class: "expand-toggle-cell"
22
- }, Le = ["onClick"], Ve = { class: "table-head-container" }, Ie = {
23
+ }, De = ["onClick"], Fe = { class: "table-head-container" }, Ne = {
23
24
  key: 0,
24
25
  class: "totals-row"
25
- }, Me = ["data-testid"], Ae = ["onMouseenter", "onClick"], Fe = {
26
+ }, Oe = ["data-testid"], ze = ["onMouseenter", "onClick"], Ge = {
26
27
  key: 2,
27
28
  class: "expanded-row"
28
- }, Ne = {
29
+ }, Ke = {
29
30
  key: 3,
30
31
  class: "floating-row"
31
- }, Oe = { key: 1 }, De = {
32
+ }, Ue = {
32
33
  key: 0,
33
34
  class: "table-footer"
34
- }, it = /* @__PURE__ */ ye({
35
+ }, ct = /* @__PURE__ */ ke({
35
36
  __name: "DataGrid",
36
37
  props: {
37
38
  title: { default: "" },
@@ -40,9 +41,9 @@ const Be = ["data-testid"], He = ["data-testid"], Ee = ["data-testid"], Pe = {
40
41
  sections: { default: null },
41
42
  sort: { default: null },
42
43
  selection: { default: null },
43
- getRowId: { type: Function, default: (s, m) => m },
44
- getRowKey: { type: Function, default: (s, m) => m },
45
- selectedMatcher: { type: Function, default: (s, m) => s === m },
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 },
46
47
  isSticky: { type: Boolean, default: !0 },
47
48
  isStickyHeader: { type: Boolean, default: !1 },
48
49
  isLoading: { type: Boolean, default: !1 },
@@ -52,11 +53,12 @@ const Be = ["data-testid"], He = ["data-testid"], Ee = ["data-testid"], Pe = {
52
53
  isInfiniteScroll: { type: Boolean, default: !1 },
53
54
  showTotalsRow: { type: Boolean },
54
55
  infiniteScrollThreshold: { default: 100 },
55
- rowHeight: { type: [Number, Function], default: Te },
56
+ rowHeight: { type: [Number, Function], default: Be },
56
57
  loadingRowCount: { default: 3 },
57
58
  defaultScrollPosition: { default: null },
58
59
  helpTooltipVariant: { default: "icon" },
59
60
  testId: { default: "" },
61
+ useAvailableHeight: { type: Boolean, default: !1 },
60
62
  search: { default: null },
61
63
  showSearch: { type: Boolean, default: !1 },
62
64
  searchPlaceholder: { default: "Search" },
@@ -68,370 +70,363 @@ const Be = ["data-testid"], He = ["data-testid"], Ee = ["data-testid"], Pe = {
68
70
  isSelectionBordered: { type: Boolean, default: !1 }
69
71
  },
70
72
  emits: ["update:sort", "update:search", "update:selection", "onScroll", "onClearSearch", "saveRow", "loadMore", "selectAll", "selectRow", "clickRow"],
71
- setup(s, { expose: m, emit: k }) {
72
- const a = s;
73
- fe((l) => ({
74
- "6539eabc": s.zIndexBase,
75
- "118a88d4": t(te),
76
- "49737de2": t(z)
73
+ setup(l, { expose: m, emit: f }) {
74
+ const a = l;
75
+ me((s) => ({
76
+ "423d7fe6": l.zIndexBase,
77
+ "38b7f4c1": t(le),
78
+ "9b4c490c": t(G),
79
+ "243617e8": t(fe)
77
80
  }));
78
- const b = ke(), X = (l) => a.rowCustomClassKey && a.rows[l] ? a.rows[l][a.rowCustomClassKey] : "", {
79
- list: T,
80
- containerProps: j,
81
- wrapperProps: q,
82
- activeRow: w,
83
- gridColumnTemplate: z,
84
- toggleSortOrder: J,
85
- columnsStickyPositions: B,
86
- hasSearchSlot: Z,
87
- containerStyle: _,
81
+ const p = be(), q = (s) => a.rowCustomClassKey && a.rows[s] ? a.rows[s][a.rowCustomClassKey] : "", {
82
+ list: $,
83
+ containerProps: z,
84
+ wrapperProps: J,
85
+ activeRow: T,
86
+ gridColumnTemplate: G,
87
+ toggleSortOrder: Z,
88
+ columnsStickyPositions: H,
89
+ hasSearchSlot: _,
90
+ containerStyle: ee,
88
91
  onScroll: K,
89
92
  savingRows: U,
90
- hasExpandSlot: H,
91
- toggleExpandRow: ee,
92
- cssExpandGridCol: te,
93
- isRowExpanded: A,
94
- hasCheckboxes: F,
95
- activeMenuRow: le,
96
- scrollTo: se
97
- } = Ce(a, k), G = y(() => !!b.footer), ae = y(
98
- () => a.title || b.title || Z.value || b["table-header-actions"] || b["table-header-pre-search"]
99
- ), p = y({
93
+ hasExpandSlot: w,
94
+ toggleExpandRow: te,
95
+ cssExpandGridCol: le,
96
+ isRowExpanded: M,
97
+ hasCheckboxes: D,
98
+ activeMenuRow: se,
99
+ scrollTo: ae
100
+ } = Te(a, f), W = u(() => !!p.footer), ie = u(
101
+ () => a.title || p.title || _.value || p["table-header-actions"] || p["table-header-pre-search"]
102
+ ), v = u({
100
103
  get: () => a.search,
101
- set: (l) => k("update:search", l)
102
- }), ie = y(() => a.selection.length || 0), N = y(() => {
103
- const l = a.rows.map((o, e) => a.getRowId(o, e));
104
- return !!l.length && l.every((o) => E(o));
105
- }), E = (l) => a.selection.findIndex((o) => a.selectedMatcher(l, o)) !== -1, oe = (l) => {
106
- E(l) ? (P(
104
+ set: (s) => f("update:search", s)
105
+ }), oe = u(() => a.selection.length || 0), F = u(() => {
106
+ const s = a.rows.map((o, e) => a.getRowId(o, e));
107
+ return !!s.length && s.every((o) => E(o));
108
+ }), E = (s) => a.selection.findIndex((o) => a.selectedMatcher(s, o)) !== -1, de = (s) => {
109
+ E(s) ? (B(
107
110
  a.selection.filter(
108
- (o) => !a.selectedMatcher(l, o)
111
+ (o) => !a.selectedMatcher(s, o)
109
112
  )
110
- ), k("selectRow", !1)) : (P([...a.selection, l]), k("selectRow", !0));
111
- }, de = () => {
112
- if (N.value)
113
- P([]), k("selectAll", !1);
113
+ ), f("selectRow", !1)) : (B([...a.selection, s]), f("selectRow", !0));
114
+ }, ne = () => {
115
+ if (F.value)
116
+ B([]), f("selectAll", !1);
114
117
  else {
115
- const l = a.rows.map((o, e) => a.getRowId(o, e)).filter((o) => !E(o));
116
- P([...a.selection, ...l]), k("selectAll", !0);
118
+ const s = a.rows.map((o, e) => a.getRowId(o, e)).filter((o) => !E(o));
119
+ B([...a.selection, ...s]), f("selectAll", !0);
117
120
  }
118
- }, P = (l) => {
119
- k("update:selection", l);
120
- }, ne = (l) => !a.isLoading && w.value === l, re = y(
121
- () => a.emptyStateVariant ?? (p.value ? "no-results" : "no-data")
122
- ), ce = y(
123
- () => a.emptyStateSubtitle ? a.emptyStateSubtitle : p.value ? "Search again with different filters" : void 0
124
- ), O = y(() => ({
121
+ }, B = (s) => {
122
+ f("update:selection", s);
123
+ }, re = (s) => !a.isLoading && T.value === s, ce = u(
124
+ () => a.emptyStateVariant ?? (v.value ? "no-results" : "no-data")
125
+ ), ue = u(
126
+ () => a.emptyStateSubtitle ? a.emptyStateSubtitle : v.value ? "Search again with different filters" : void 0
127
+ ), N = u(() => ({
125
128
  class: {
126
129
  sticky: a.isSelectionSticky,
127
130
  bordered: a.isSelectionBordered
128
131
  },
129
- style: a.isSelectionSticky ? B.value[we] : null
130
- })), ue = (l) => ({
131
- sticky: l.isSticky,
132
- isStickyRight: l.isStickyRight,
133
- bordered: l.isBordered,
134
- isTextRight: l.isTextRight
135
- }), W = y(
136
- () => a.columns.map((l) => ue(l))
137
- ), he = (l) => ({
138
- minHeight: (typeof a.rowHeight == "function" ? a.rowHeight(l) : a.rowHeight) + "px"
139
- }), L = y(() => T.value.reduce((l, o) => (l[o.index] = he(o.index), l), {}));
132
+ style: a.isSelectionSticky ? H.value[Ae] : null
133
+ })), he = (s) => ({
134
+ sticky: s.isSticky,
135
+ isStickyRight: s.isStickyRight,
136
+ bordered: s.isBordered,
137
+ isTextRight: s.isTextRight
138
+ }), Y = u(
139
+ () => a.columns.map((s) => he(s))
140
+ ), ye = (s) => ({
141
+ minHeight: (typeof a.rowHeight == "function" ? a.rowHeight(s) : a.rowHeight) + "px"
142
+ }), A = u(() => $.value.reduce((s, o) => (s[o.index] = ye(o.index), s), {})), fe = u(() => `${X}px`), { height: Se } = Ie(z.ref), ge = u(
143
+ () => Se.value - j - X
144
+ );
140
145
  return m({
141
- scrollTo: se
142
- }), (l, o) => (i(), C(pe, null, Y({
143
- default: u(() => [
144
- g("div", {
145
- class: "table-container",
146
- "data-testid": `${s.testId}-${t(R).CONTAINER}`,
147
- onMouseleave: o[3] || (o[3] = (e) => w.value = null)
146
+ scrollTo: ae
147
+ }), (s, o) => (i(), d("div", {
148
+ class: "table-container",
149
+ "data-testid": `${l.testId}-${t(R).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
+ }),
158
+ "data-testid": `${l.testId}-${t(R).TABLE}`,
159
+ onScrollPassive: o[2] || (o[2] = //@ts-ignore
160
+ (...e) => t(K) && t(K)(...e))
161
+ }, [
162
+ t(ie) ? (i(), I(t($e), {
163
+ key: 0,
164
+ search: t(v),
165
+ "onUpdate:search": o[0] || (o[0] = (e) => pe(v) ? v.value = e : null),
166
+ title: l.title,
167
+ "is-sticky": l.isStickyHeader,
168
+ "show-search": l.showSearch,
169
+ "search-placeholder": l.searchPlaceholder,
170
+ "search-auto-focus": l.searchAutoFocus,
171
+ "z-index-base": l.zIndexBase,
172
+ "test-id": l.testId,
173
+ onOnClearSearch: o[1] || (o[1] = (e) => f("onClearSearch"))
174
+ }, ve({
175
+ title: g(() => [
176
+ r(s.$slots, "title")
177
+ ]),
178
+ search: g(() => [
179
+ r(s.$slots, "search")
180
+ ]),
181
+ _: 2
182
+ }, [
183
+ t(p)["table-header-pre-search"] ? {
184
+ name: "table-header-pre-search",
185
+ fn: g(() => [
186
+ r(s.$slots, "table-header-pre-search")
187
+ ]),
188
+ key: "0"
189
+ } : void 0,
190
+ t(p)["table-header-actions"] ? {
191
+ name: "table-header-actions",
192
+ fn: g(() => [
193
+ r(s.$slots, "table-header-actions")
194
+ ]),
195
+ key: "1"
196
+ } : void 0
197
+ ]), 1032, ["search", "title", "is-sticky", "show-search", "search-placeholder", "search-auto-focus", "z-index-base", "test-id"])) : c("", !0),
198
+ b("thead", {
199
+ class: y({ sticky: l.isSticky, isStickyHeader: l.isStickyHeader })
148
200
  }, [
149
- g("table", {
150
- ref: t(j).ref,
151
- style: v(t(_)),
152
- class: f({
153
- hasFooter: t(G)
154
- }),
155
- "data-testid": `${s.testId}-${t(R).TABLE}`,
156
- onScrollPassive: o[2] || (o[2] = //@ts-ignore
157
- (...e) => t(K) && t(K)(...e))
201
+ b("div", {
202
+ class: "sections",
203
+ "data-testid": `${l.testId}-${t(R).SECTIONS}`
158
204
  }, [
159
- t(ae) ? (i(), C(t(ve), {
160
- key: 0,
161
- search: t(p),
162
- "onUpdate:search": o[0] || (o[0] = (e) => Se(p) ? p.value = e : null),
163
- title: s.title,
164
- "is-sticky": s.isStickyHeader,
165
- "show-search": s.showSearch,
166
- "search-placeholder": s.searchPlaceholder,
167
- "search-auto-focus": s.searchAutoFocus,
168
- "z-index-base": s.zIndexBase,
169
- "test-id": s.testId,
170
- onOnClearSearch: o[1] || (o[1] = (e) => k("onClearSearch"))
171
- }, Y({
172
- title: u(() => [
173
- n(l.$slots, "title")
174
- ]),
175
- search: u(() => [
176
- n(l.$slots, "search")
177
- ]),
178
- _: 2
205
+ (i(!0), d(x, null, C(l.sections, (e) => (i(), d("div", {
206
+ key: e.id,
207
+ class: y(["section-container", { sticky: e.isSticky }])
179
208
  }, [
180
- t(b)["table-header-pre-search"] ? {
181
- name: "table-header-pre-search",
182
- fn: u(() => [
183
- n(l.$slots, "table-header-pre-search")
184
- ]),
185
- key: "0"
186
- } : void 0,
187
- t(b)["table-header-actions"] ? {
188
- name: "table-header-actions",
189
- fn: u(() => [
190
- n(l.$slots, "table-header-actions")
191
- ]),
192
- key: "1"
193
- } : void 0
194
- ]), 1032, ["search", "title", "is-sticky", "show-search", "search-placeholder", "search-auto-focus", "z-index-base", "test-id"])) : c("", !0),
195
- g("thead", {
196
- class: f({ sticky: s.isSticky, isStickyHeader: s.isStickyHeader })
197
- }, [
198
- g("div", {
199
- class: "sections",
200
- "data-testid": `${s.testId}-${t(R).SECTIONS}`
201
- }, [
202
- (i(!0), d(x, null, $(s.sections, (e) => (i(), d("div", {
203
- key: e.id,
204
- class: f(["section-container", { sticky: e.isSticky }])
205
- }, [
206
- n(l.$slots, `section-${e.id}`, {}, () => [
207
- g("div", {
208
- style: v({ width: e.width + "px" }),
209
- class: f({ section: !0 })
210
- }, [
211
- S(t(M), { variant: "body2" }, {
212
- default: u(() => [
213
- V(D(e.title), 1)
214
- ]),
215
- _: 2
216
- }, 1024)
217
- ], 4)
218
- ])
219
- ], 2))), 128))
220
- ], 8, Ee),
221
- g("tr", null, [
222
- t(F) ? (i(), d("th", I({
223
- key: 0,
224
- class: "checkbox-cell"
225
- }, t(O)), [
226
- n(l.$slots, "select-all-checkbox", {}, () => [
227
- S(t(Q), {
228
- disabled: s.isLoading,
229
- "is-checked": t(N),
230
- "is-indeterminate": !t(N) && t(ie) > 0,
231
- "onUpdate:isChecked": de
232
- }, null, 8, ["disabled", "is-checked", "is-indeterminate"])
233
- ])
234
- ], 16)) : c("", !0),
235
- t(H) ? (i(), d("th", Pe)) : c("", !0),
236
- (i(!0), d(x, null, $(s.columns, (e, h) => (i(), d("th", {
237
- key: e.id,
238
- class: f({
239
- ...t(W)[h],
240
- isSortable: e.isSortable,
241
- [`column-${e.id}`]: !0
242
- }),
243
- style: v(
244
- e.isSticky ? t(B)[e.id] : null
245
- ),
246
- onClick: (r) => e.isSortable ? t(J)(e) : null
209
+ r(s.$slots, `section-${e.id}`, {}, () => [
210
+ b("div", {
211
+ style: S({ width: e.width + "px" }),
212
+ class: y({ section: !0 })
247
213
  }, [
248
- g("div", Ve, [
249
- n(l.$slots, `header-${e.id}`, { column: e }, () => [
250
- S(t(be), {
251
- text: e.helpText,
252
- disabled: !e.helpText || s.helpTooltipVariant === "icon",
253
- placement: e.helpTextPlacement || "top",
254
- "test-id": `help-tooltip-underlined-${e.id}`
214
+ k(t(V), { variant: "body2" }, {
215
+ default: g(() => [
216
+ P(O(e.title), 1)
217
+ ]),
218
+ _: 2
219
+ }, 1024)
220
+ ], 4)
221
+ ])
222
+ ], 2))), 128))
223
+ ], 8, Ve),
224
+ b("tr", {
225
+ style: S({ height: `${t(j)}px` })
226
+ }, [
227
+ t(D) ? (i(), d("th", L({
228
+ key: 0,
229
+ class: "checkbox-cell"
230
+ }, t(N)), [
231
+ r(s.$slots, "select-all-checkbox", {}, () => [
232
+ k(t(Q), {
233
+ disabled: l.isLoading,
234
+ "is-checked": t(F),
235
+ "is-indeterminate": !t(F) && t(oe) > 0,
236
+ "onUpdate:isChecked": ne
237
+ }, null, 8, ["disabled", "is-checked", "is-indeterminate"])
238
+ ])
239
+ ], 16)) : c("", !0),
240
+ t(w) ? (i(), d("th", Me)) : c("", !0),
241
+ (i(!0), d(x, null, C(l.columns, (e, h) => (i(), d("th", {
242
+ key: e.id,
243
+ class: y({
244
+ ...t(Y)[h],
245
+ isSortable: e.isSortable,
246
+ [`column-${e.id}`]: !0
247
+ }),
248
+ style: S(e.isSticky ? t(H)[e.id] : null),
249
+ onClick: (n) => e.isSortable ? t(Z)(e) : null
250
+ }, [
251
+ b("div", Fe, [
252
+ r(s.$slots, `header-${e.id}`, { column: e }, () => [
253
+ k(t(Re), {
254
+ text: e.helpText,
255
+ disabled: !e.helpText || l.helpTooltipVariant === "icon",
256
+ placement: e.helpTextPlacement || "top",
257
+ "test-id": `help-tooltip-underlined-${e.id}`
258
+ }, {
259
+ default: g(() => [
260
+ k(t(V), {
261
+ variant: "tableLabel",
262
+ class: y({
263
+ underlined: e.helpText && l.helpTooltipVariant === "underline"
264
+ })
255
265
  }, {
256
- default: u(() => [
257
- S(t(M), {
258
- variant: "tableLabel",
259
- class: f({
260
- underlined: e.helpText && s.helpTooltipVariant === "underline"
261
- })
262
- }, {
263
- default: u(() => [
264
- V(D(e.title), 1)
265
- ]),
266
- _: 2
267
- }, 1032, ["class"])
266
+ default: g(() => [
267
+ P(O(e.title), 1)
268
268
  ]),
269
269
  _: 2
270
- }, 1032, ["text", "disabled", "placement", "test-id"])
270
+ }, 1032, ["class"])
271
271
  ]),
272
- e.helpText && s.helpTooltipVariant === "icon" ? (i(), C($e, {
273
- key: 0,
274
- "hover-help-text": e.helpText,
275
- "hover-help-text-placement": e.helpTextPlacement,
276
- "test-id": `help-tooltip-${e.id}`
277
- }, null, 8, ["hover-help-text", "hover-help-text-placement", "test-id"])) : c("", !0),
278
- n(l.$slots, `after-header-${e.id}`, { column: e }),
279
- e.isSortable && e.id === s.sort?.sortBy ? (i(), C(xe, {
280
- key: 1,
281
- "sort-order": s.sort.sortOrder
282
- }, null, 8, ["sort-order"])) : c("", !0)
283
- ])
284
- ], 14, Le))), 128))
285
- ]),
286
- s.showTotalsRow && t(T).length > 0 ? (i(), d("tr", Ie, [
287
- t(F) ? (i(), d("td", I({
272
+ _: 2
273
+ }, 1032, ["text", "disabled", "placement", "test-id"])
274
+ ]),
275
+ e.helpText && l.helpTooltipVariant === "icon" ? (i(), I(we, {
276
+ key: 0,
277
+ "hover-help-text": e.helpText,
278
+ "hover-help-text-placement": e.helpTextPlacement,
279
+ "test-id": `help-tooltip-${e.id}`
280
+ }, null, 8, ["hover-help-text", "hover-help-text-placement", "test-id"])) : c("", !0),
281
+ r(s.$slots, `after-header-${e.id}`, { column: e }),
282
+ e.isSortable && e.id === l.sort?.sortBy ? (i(), I(He, {
283
+ key: 1,
284
+ "sort-order": l.sort.sortOrder
285
+ }, null, 8, ["sort-order"])) : c("", !0)
286
+ ])
287
+ ], 14, De))), 128))
288
+ ], 4),
289
+ l.showTotalsRow && t($).length > 0 ? (i(), d("tr", Ne, [
290
+ t(D) ? (i(), d("td", L({
291
+ key: 0,
292
+ class: "bg"
293
+ }, t(N)), null, 16)) : c("", !0),
294
+ (i(!0), d(x, null, C(l.columns, (e, h) => (i(), d("td", {
295
+ key: e.id,
296
+ class: y({
297
+ ...t(Y)[h],
298
+ [`total-${e.id}`]: !0
299
+ }),
300
+ style: S(e.isSticky ? t(H)[e.id] : null)
301
+ }, [
302
+ r(s.$slots, `total-${e.id}`, { column: e }, () => [
303
+ h === 0 ? (i(), I(t(V), {
304
+ key: 0,
305
+ variant: "h6"
306
+ }, {
307
+ default: g(() => [
308
+ P("Totals")
309
+ ]),
310
+ _: 1
311
+ })) : c("", !0)
312
+ ])
313
+ ], 6))), 128))
314
+ ])) : c("", !0)
315
+ ], 2),
316
+ b("tbody", null, [
317
+ t($).length > 0 ? (i(), d("div", L({
318
+ key: 0,
319
+ class: "table-body-wrapper",
320
+ "data-testid": `${l.testId}-${t(R).BODY_WRAPPER}`
321
+ }, t(J)), [
322
+ (i(!0), d(x, null, C(t($), (e) => (i(), d("tr", {
323
+ key: l.getRowKey(e.data, e.index),
324
+ class: y(["table-row", {
325
+ loading: l.isLoading || l.isLoading && !e.data || t(U).includes(e.index),
326
+ active: t(T) === e.index,
327
+ activeMenu: t(se) === e.index,
328
+ expanded: t(w) && t(M)(e.index),
329
+ [q(e.index)]: !0
330
+ }]),
331
+ style: S(t(A)[e.index]),
332
+ onMouseenter: (h) => T.value = e.index,
333
+ onClick: (h) => f("clickRow", e.index)
334
+ }, [
335
+ t(D) ? (i(), d("td", L({
336
+ key: 0,
337
+ class: "checkbox-cell"
338
+ }, t(N), {
339
+ style: t(A)[e.index]
340
+ }), [
341
+ k(t(Q), {
342
+ "is-checked": E(l.getRowId(e.data, e.index)),
343
+ "onUpdate:isChecked": (h) => de(l.getRowId(e.data, e.index))
344
+ }, null, 8, ["is-checked", "onUpdate:isChecked"])
345
+ ], 16)) : c("", !0),
346
+ t(w) ? (i(), d("td", {
347
+ key: 1,
348
+ class: "expand-toggle-cell",
349
+ style: S(t(A)[e.index])
350
+ }, [
351
+ k(Ee, {
352
+ expanded: t(M)(e.index),
353
+ onClick: (h) => t(te)(e.index, h)
354
+ }, null, 8, ["expanded", "onClick"])
355
+ ], 4)) : c("", !0),
356
+ (i(!0), d(x, null, C(l.columns, (h, n) => (i(), d("td", {
357
+ key: n,
358
+ class: y({
359
+ sticky: l.columns[n].isSticky,
360
+ isStickyRight: l.columns[n].isStickyRight,
361
+ bordered: l.columns[n].isBordered,
362
+ isTextRight: l.columns[n].isTextRight,
363
+ [`column-${l.columns[n].id}`]: !0
364
+ }),
365
+ style: S([
366
+ l.columns[n].isSticky ? t(H)[l.columns[n].id] : null,
367
+ t(A)[e.index]
368
+ ])
369
+ }, [
370
+ !l.isLoading || l.isLoading && e.data[n] ? (i(), d("div", {
288
371
  key: 0,
289
- class: "bg"
290
- }, t(O)), null, 16)) : c("", !0),
291
- (i(!0), d(x, null, $(s.columns, (e, h) => (i(), d("td", {
292
- key: e.id,
293
- class: f({
294
- ...t(W)[h],
295
- [`total-${e.id}`]: !0
296
- }),
297
- style: v(
298
- e.isSticky ? t(B)[e.id] : null
299
- )
372
+ class: y(["table-cell", { last: n === e.data.length - 1 }])
300
373
  }, [
301
- n(l.$slots, `total-${e.id}`, { column: e }, () => [
302
- h === 0 ? (i(), C(t(M), {
303
- key: 0,
304
- variant: "h6"
305
- }, {
306
- default: u(() => [
307
- V("Totals")
374
+ r(s.$slots, `cell-${l.columns[n].id}`, {
375
+ cell: e.data[n],
376
+ isLoading: t(U).includes(e.index),
377
+ cellIndex: n,
378
+ row: e,
379
+ rowIndex: e.index
380
+ }, () => [
381
+ k(t(V), { variant: "body1" }, {
382
+ default: g(() => [
383
+ P(O(e.data[n]), 1)
308
384
  ]),
309
- _: 1
310
- })) : c("", !0)
385
+ _: 2
386
+ }, 1024)
311
387
  ])
312
- ], 6))), 128))
313
- ])) : c("", !0)
314
- ], 2),
315
- g("tbody", null, [
316
- t(T).length > 0 ? (i(), d("div", I({
317
- key: 0,
318
- class: "table-body-wrapper",
319
- "data-testid": `${s.testId}-${t(R).BODY_WRAPPER}`
320
- }, t(q)), [
321
- (i(!0), d(x, null, $(t(T), (e) => (i(), d("tr", {
322
- key: s.getRowKey(e.data, e.index),
323
- class: f(["table-row", {
324
- loading: s.isLoading || s.isLoading && !e.data || t(U).includes(e.index),
325
- active: t(w) === e.index,
326
- activeMenu: t(le) === e.index,
327
- expanded: t(H) && t(A)(e.index),
328
- [X(e.index)]: !0
329
- }]),
330
- style: v(t(L)[e.index]),
331
- onMouseenter: (h) => w.value = e.index,
332
- onClick: (h) => k("clickRow", e.index)
333
- }, [
334
- t(F) ? (i(), d("td", I({
335
- key: 0,
336
- class: "checkbox-cell"
337
- }, t(O), {
338
- style: t(L)[e.index]
339
- }), [
340
- S(t(Q), {
341
- "is-checked": E(s.getRowId(e.data, e.index)),
342
- "onUpdate:isChecked": (h) => oe(s.getRowId(e.data, e.index))
343
- }, null, 8, ["is-checked", "onUpdate:isChecked"])
344
- ], 16)) : c("", !0),
345
- t(H) ? (i(), d("td", {
346
- key: 1,
347
- class: "expand-toggle-cell",
348
- style: v(t(L)[e.index])
349
- }, [
350
- S(Re, {
351
- expanded: t(A)(e.index),
352
- onClick: (h) => t(ee)(e.index, h)
353
- }, null, 8, ["expanded", "onClick"])
354
- ], 4)) : c("", !0),
355
- (i(!0), d(x, null, $(s.columns, (h, r) => (i(), d("td", {
356
- key: r,
357
- class: f({
358
- sticky: s.columns[r].isSticky,
359
- isStickyRight: s.columns[r].isStickyRight,
360
- bordered: s.columns[r].isBordered,
361
- isTextRight: s.columns[r].isTextRight,
362
- [`column-${s.columns[r].id}`]: !0
363
- }),
364
- style: v([
365
- s.columns[r].isSticky ? t(B)[s.columns[r].id] : null,
366
- t(L)[e.index]
367
- ])
368
- }, [
369
- !s.isLoading || s.isLoading && e.data[r] ? (i(), d("div", {
370
- key: 0,
371
- class: f(["table-cell", { last: r === e.data.length - 1 }])
372
- }, [
373
- n(l.$slots, `cell-${s.columns[r].id}`, {
374
- cell: e.data[r],
375
- isLoading: t(U).includes(e.index),
376
- cellIndex: r,
377
- row: e,
378
- rowIndex: e.index
379
- }, () => [
380
- S(t(M), { variant: "body1" }, {
381
- default: u(() => [
382
- V(D(e.data[r]), 1)
383
- ]),
384
- _: 2
385
- }, 1024)
386
- ])
387
- ], 2)) : n(l.$slots, "loader", { key: 1 }, () => [
388
- S(t(ge), { round: "" })
389
- ])
390
- ], 6))), 128)),
391
- t(H) && t(A)(e.index) ? (i(), d("div", Fe, [
392
- n(l.$slots, "expanded", {
393
- row: e,
394
- gridColumnTemplate: t(z)
395
- })
396
- ])) : c("", !0),
397
- ne(e.index) ? (i(), d("div", Ne, [
398
- n(l.$slots, "floating-row", {
399
- row: e,
400
- rowIndex: e.index
401
- })
402
- ])) : c("", !0)
403
- ], 46, Ae))), 128))
404
- ], 16, Me)) : (i(), d("div", Oe, [
405
- n(l.$slots, "empty-state", {}, () => [
406
- S(t(me), {
407
- class: "empty-state",
408
- title: s.emptyStateTitle,
409
- subtitle: t(ce),
410
- variant: t(re),
411
- "icon-name": "file-search",
412
- "test-id": `${s.testId}-${t(R).EMPTY_STATE}`
413
- }, null, 8, ["title", "subtitle", "variant", "test-id"])
388
+ ], 2)) : r(s.$slots, "loader", { key: 1 }, () => [
389
+ k(t(xe), { round: "" })
414
390
  ])
415
- ]))
391
+ ], 6))), 128)),
392
+ t(w) && t(M)(e.index) ? (i(), d("div", Ge, [
393
+ r(s.$slots, "expanded", {
394
+ row: e,
395
+ gridColumnTemplate: t(G)
396
+ })
397
+ ])) : c("", !0),
398
+ re(e.index) ? (i(), d("div", Ke, [
399
+ r(s.$slots, "floating-row", {
400
+ row: e,
401
+ rowIndex: e.index
402
+ })
403
+ ])) : c("", !0)
404
+ ], 46, ze))), 128))
405
+ ], 16, Oe)) : (i(), d("div", {
406
+ key: 1,
407
+ style: S(
408
+ l.useAvailableHeight ? { height: `${t(ge)}px` } : {}
409
+ )
410
+ }, [
411
+ r(s.$slots, "empty-state", {}, () => [
412
+ k(t(Ce), {
413
+ class: "empty-state",
414
+ title: l.emptyStateTitle,
415
+ subtitle: t(ue),
416
+ variant: t(ce),
417
+ "icon-name": "file-search",
418
+ "test-id": `${l.testId}-${t(R).EMPTY_STATE}`
419
+ }, null, 8, ["title", "subtitle", "variant", "test-id"])
416
420
  ])
417
- ], 46, He),
418
- t(G) ? (i(), d("div", De, [
419
- n(l.$slots, "footer")
420
- ])) : c("", !0)
421
- ], 40, Be)
422
- ]),
423
- _: 2
424
- }, [
425
- t(b)["side-panel"] ? {
426
- name: "side-panel",
427
- fn: u(() => [
428
- n(l.$slots, "side-panel")
429
- ]),
430
- key: "0"
431
- } : void 0
432
- ]), 1024));
421
+ ], 4))
422
+ ])
423
+ ], 46, Le),
424
+ t(W) ? (i(), d("div", Ue, [
425
+ r(s.$slots, "footer")
426
+ ])) : c("", !0)
427
+ ], 40, Pe));
433
428
  }
434
429
  });
435
430
  export {
436
- it as default
431
+ ct as default
437
432
  };