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