@ironsource/shared-ui 2.1.8-rc.0 → 2.1.8-rc.3
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/DataGrid.vue_vue_type_style_index_0_scoped_7524407f_lang.css +1 -0
- package/DataGridRowsCounter.vue_vue_type_style_index_0_scoped_ef699ec5_lang.css +1 -0
- package/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_1726ad49_lang.css +1 -0
- package/TreeDropdown.vue_vue_type_style_index_0_scoped_a51b6929_lang.css +1 -0
- package/components/dropdown/v4/DefaultDropdownTrigger.vue.js +2 -2
- package/components/dropdown/v4/DefaultDropdownTrigger.vue2.js +1 -1
- package/components/dropdown/v4/TreeDropdown.vue.js +2 -2
- package/components/dropdown/v4/TreeDropdown.vue2.js +33 -30
- package/components/table/common/Table.common.js +71 -68
- package/components/table/v4/DataGrid.vue.d.ts +10 -4
- package/components/table/v4/DataGrid.vue.js +3 -3
- package/components/table/v4/DataGrid.vue2.js +130 -136
- package/components/table/v4/DataGridRowsCounter.vue.js +2 -2
- package/components/table/v4/DataGridRowsCounter.vue2.js +14 -13
- package/components/table/v4/MultipleDataGrid.vue.d.ts +2 -2
- package/components/table/v4/index.d.ts +41 -7
- package/components/table/v4/storyUtils.d.ts +8 -0
- package/index.d.ts +82 -14
- package/package.json +3 -2
- package/utils/formatNumbers.d.ts +4 -0
- package/utils/formatNumbers.js +11 -0
- package/utils/index.d.ts +1 -0
- package/DataGrid.vue_vue_type_style_index_0_scoped_706b324e_lang.css +0 -1
- package/DataGridRowsCounter.vue_vue_type_style_index_0_scoped_0ce71f73_lang.css +0 -1
- package/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_98819e5a_lang.css +0 -1
- package/TreeDropdown.vue_vue_type_style_index_0_scoped_ffd0b476_lang.css +0 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import "../../../DataGrid.
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import "../../../DataGrid.vue_vue_type_style_index_0_scoped_7524407f_lang.css"; import { defineComponent as ie, useCssVars as de, unref as t, useSlots as oe, computed as v, openBlock as l, createElementBlock as o, createElementVNode as u, normalizeStyle as x, normalizeClass as f, renderSlot as r, createVNode as h, withCtx as T, createTextVNode as w, toDisplayString as E, isRef as ne, createCommentVNode as c, Fragment as B, renderList as I, createBlock as z, mergeProps as re } from "vue";
|
|
2
|
+
import p from "../../typography/v4/Typography.vue.js";
|
|
3
|
+
import ce from "../../skeleton/v4/SkeletonV4.vue.js";
|
|
4
4
|
import ue from "../../emptyState/v4/EmptyStateV4.vue.js";
|
|
5
|
-
import
|
|
5
|
+
import K from "../../checkbox/v4/CheckboxV4.vue.js";
|
|
6
6
|
import { TableTestIdModifiers as S } from "../../../testids/index.js";
|
|
7
7
|
import { tableCommon as he } from "../common/Table.common.js";
|
|
8
8
|
import ye from "./SortIcon.vue.js";
|
|
9
9
|
import fe from "./HelpIcon.vue.js";
|
|
10
10
|
import Se from "./ExpandRowToggle.vue.js";
|
|
11
11
|
import ke from "../../search/v4/SearchV4.vue.js";
|
|
12
|
-
import { useVModel as
|
|
13
|
-
const
|
|
12
|
+
import { useVModel as me } from "@vueuse/core";
|
|
13
|
+
const ge = ["data-testid"], ve = ["data-testid"], be = ["data-testid"], $e = ["data-testid"], Re = ["data-testid"], Ce = { class: "search-wrapper" }, xe = ["data-testid"], Te = ["data-testid"], we = {
|
|
14
14
|
key: 0,
|
|
15
15
|
class: "checkbox-cell"
|
|
16
|
-
},
|
|
16
|
+
}, Ee = {
|
|
17
17
|
key: 1,
|
|
18
18
|
class: "expand-toggle-cell"
|
|
19
|
-
},
|
|
19
|
+
}, Be = ["onClick"], Ie = { class: "table-head-container" }, pe = ["data-testid"], Ae = ["onMouseenter", "onClick"], Ve = {
|
|
20
20
|
key: 0,
|
|
21
21
|
class: "checkbox-cell"
|
|
22
22
|
}, Me = {
|
|
@@ -25,13 +25,10 @@ const me = ["data-testid"], ve = ["data-testid"], be = ["data-testid"], $e = ["d
|
|
|
25
25
|
}, Pe = {
|
|
26
26
|
key: 2,
|
|
27
27
|
class: "expanded-row"
|
|
28
|
-
},
|
|
29
|
-
key: 3,
|
|
30
|
-
class: "floating-row"
|
|
31
|
-
}, He = { key: 1 }, Ne = {
|
|
28
|
+
}, He = { key: 1 }, Le = {
|
|
32
29
|
key: 0,
|
|
33
30
|
class: "table-footer"
|
|
34
|
-
},
|
|
31
|
+
}, qe = /* @__PURE__ */ ie({
|
|
35
32
|
__name: "DataGrid",
|
|
36
33
|
props: {
|
|
37
34
|
title: { default: "" },
|
|
@@ -40,8 +37,8 @@ const me = ["data-testid"], ve = ["data-testid"], be = ["data-testid"], $e = ["d
|
|
|
40
37
|
sections: { default: null },
|
|
41
38
|
sort: { default: null },
|
|
42
39
|
selection: { default: null },
|
|
43
|
-
getRowId: { type: Function, default: (s,
|
|
44
|
-
selectedMatcher: { type: Function, default: (s,
|
|
40
|
+
getRowId: { type: Function, default: (s, m) => m },
|
|
41
|
+
selectedMatcher: { type: Function, default: (s, m) => s === m },
|
|
45
42
|
isSticky: { type: Boolean, default: !0 },
|
|
46
43
|
isStickyHeader: { type: Boolean, default: !1 },
|
|
47
44
|
isLoading: { type: Boolean, default: !1 },
|
|
@@ -58,70 +55,72 @@ const me = ["data-testid"], ve = ["data-testid"], be = ["data-testid"], $e = ["d
|
|
|
58
55
|
showSearch: { type: Boolean, default: !1 },
|
|
59
56
|
searchPlaceholder: { default: "Search" },
|
|
60
57
|
searchAutoFocus: { type: Boolean, default: !1 },
|
|
61
|
-
zIndexBase: { default: 100 }
|
|
58
|
+
zIndexBase: { default: 100 },
|
|
59
|
+
rowCustomClassKey: { default: "" },
|
|
60
|
+
rowDataKey: { default: "" }
|
|
62
61
|
},
|
|
63
62
|
emits: ["update:sort", "update:search", "update:selection", "onScroll", "onClearSearch", "saveRow", "loadMore", "selectAll", "selectRow", "clickRow"],
|
|
64
|
-
setup(s, { expose:
|
|
65
|
-
const
|
|
63
|
+
setup(s, { expose: m, emit: y }) {
|
|
64
|
+
const i = s;
|
|
66
65
|
de((a) => ({
|
|
67
|
-
"
|
|
68
|
-
|
|
69
|
-
"
|
|
70
|
-
"
|
|
66
|
+
"06b5104a": s.zIndexBase,
|
|
67
|
+
bd683984: t(X),
|
|
68
|
+
"45ac1eb7": t(H),
|
|
69
|
+
"2737857f": t(J)
|
|
71
70
|
}));
|
|
72
|
-
const b = oe(), {
|
|
71
|
+
const b = oe(), U = (a) => i.rowCustomClassKey && i.rows[a] ? i.rows[a][i.rowCustomClassKey] : "", {
|
|
73
72
|
list: P,
|
|
74
73
|
containerProps: G,
|
|
75
74
|
wrapperProps: Y,
|
|
76
|
-
activeRow:
|
|
77
|
-
gridColumnTemplate:
|
|
75
|
+
activeRow: A,
|
|
76
|
+
gridColumnTemplate: H,
|
|
78
77
|
toggleSortOrder: Q,
|
|
79
|
-
columnsStickyPositions:
|
|
78
|
+
columnsStickyPositions: L,
|
|
80
79
|
hasSearchSlot: W,
|
|
81
80
|
containerStyle: j,
|
|
82
81
|
onScroll: N,
|
|
83
82
|
savingRows: F,
|
|
84
|
-
hasExpandSlot:
|
|
83
|
+
hasExpandSlot: $,
|
|
85
84
|
toggleExpandRow: q,
|
|
86
85
|
cssRowHeight: J,
|
|
87
|
-
cssExpandGridCol:
|
|
88
|
-
isRowExpanded:
|
|
86
|
+
cssExpandGridCol: X,
|
|
87
|
+
isRowExpanded: V,
|
|
89
88
|
hasCheckboxes: O,
|
|
90
|
-
activeMenuRow:
|
|
91
|
-
scrollTo:
|
|
92
|
-
} = he(
|
|
93
|
-
const a =
|
|
94
|
-
return a.length && a.every((d) =>
|
|
95
|
-
}),
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
(d) => !
|
|
89
|
+
activeMenuRow: Z,
|
|
90
|
+
scrollTo: _
|
|
91
|
+
} = he(i, y), D = v(() => !!b.footer), g = me(i, "search", y), ee = v(() => i.selection.length || 0), M = v(() => {
|
|
92
|
+
const a = i.rows.map((d, e) => i.getRowId(d, e));
|
|
93
|
+
return a.length && a.every((d) => R(d));
|
|
94
|
+
}), R = (a) => i.selection.findIndex((d) => i.selectedMatcher(a, d)) !== -1, te = (a) => {
|
|
95
|
+
R(a) ? (C(
|
|
96
|
+
i.selection.filter(
|
|
97
|
+
(d) => !i.selectedMatcher(a, d)
|
|
99
98
|
)
|
|
100
|
-
), y("selectRow", !1)) : (C([...
|
|
101
|
-
},
|
|
99
|
+
), y("selectRow", !1)) : (C([...i.selection, a]), y("selectRow", !0));
|
|
100
|
+
}, se = () => {
|
|
102
101
|
if (M.value)
|
|
103
102
|
C([]), y("selectAll", !1);
|
|
104
103
|
else {
|
|
105
|
-
const a =
|
|
106
|
-
C([...
|
|
104
|
+
const a = i.rows.map((d, e) => i.getRowId(d, e)).filter((d) => !R(d));
|
|
105
|
+
C([...i.selection, ...a]), y("selectAll", !0);
|
|
107
106
|
}
|
|
108
107
|
}, C = (a) => {
|
|
109
108
|
y("update:selection", a);
|
|
110
|
-
},
|
|
111
|
-
() =>
|
|
109
|
+
}, ae = v(
|
|
110
|
+
() => i.emptyStateVariant ?? (g.value ? "no-results" : "no-data")
|
|
112
111
|
), le = v(
|
|
113
|
-
() =>
|
|
112
|
+
() => i.emptyStateSubtitle ? i.emptyStateSubtitle : g.value ? "Search again with different filters" : void 0
|
|
114
113
|
);
|
|
115
|
-
return
|
|
116
|
-
scrollTo:
|
|
117
|
-
}), (a, d) => (l(),
|
|
114
|
+
return m({
|
|
115
|
+
scrollTo: _
|
|
116
|
+
}), (a, d) => (l(), o("div", {
|
|
118
117
|
class: "table-container",
|
|
119
118
|
"data-testid": `${s.testId}-${t(S).CONTAINER}`,
|
|
120
|
-
onMouseleave: d[3] || (d[3] = (e) =>
|
|
119
|
+
onMouseleave: d[3] || (d[3] = (e) => A.value = null)
|
|
121
120
|
}, [
|
|
122
121
|
u("table", {
|
|
123
122
|
ref: t(G).ref,
|
|
124
|
-
style:
|
|
123
|
+
style: x(t(j)),
|
|
125
124
|
class: f({
|
|
126
125
|
hasFooter: t(D)
|
|
127
126
|
}),
|
|
@@ -129,7 +128,7 @@ const me = ["data-testid"], ve = ["data-testid"], be = ["data-testid"], $e = ["d
|
|
|
129
128
|
onScrollPassive: d[2] || (d[2] = //@ts-ignore
|
|
130
129
|
(...e) => t(N) && t(N)(...e))
|
|
131
130
|
}, [
|
|
132
|
-
s.title || t(b).title || t(W) || t(b)["table-header-actions"] ? (l(),
|
|
131
|
+
s.title || t(b).title || t(W) || t(b)["table-header-actions"] ? (l(), o("div", {
|
|
133
132
|
key: 0,
|
|
134
133
|
class: f(["table-header", { isStickyHeader: s.isStickyHeader }]),
|
|
135
134
|
"data-testid": `${s.testId}-${t(S).HEADER}`
|
|
@@ -138,40 +137,40 @@ const me = ["data-testid"], ve = ["data-testid"], be = ["data-testid"], $e = ["d
|
|
|
138
137
|
class: "table-title",
|
|
139
138
|
"data-testid": `${s.testId}-${t(S).TITLE}`
|
|
140
139
|
}, [
|
|
141
|
-
|
|
142
|
-
h(t(
|
|
143
|
-
default:
|
|
144
|
-
w(
|
|
140
|
+
r(a.$slots, "title", {}, () => [
|
|
141
|
+
h(t(p), { variant: "h3" }, {
|
|
142
|
+
default: T(() => [
|
|
143
|
+
w(E(s.title), 1)
|
|
145
144
|
]),
|
|
146
145
|
_: 1
|
|
147
146
|
})
|
|
148
|
-
])
|
|
147
|
+
], !0)
|
|
149
148
|
], 8, $e),
|
|
150
149
|
u("div", {
|
|
151
150
|
class: "table-header-right",
|
|
152
151
|
"data-testid": `${s.testId}-${t(S).HEADER_RIGHT}`
|
|
153
152
|
}, [
|
|
154
|
-
s.showSearch ?
|
|
155
|
-
u("div",
|
|
153
|
+
s.showSearch ? r(a.$slots, "search", { key: 0 }, () => [
|
|
154
|
+
u("div", Ce, [
|
|
156
155
|
h(t(ke), {
|
|
157
|
-
modelValue: t(
|
|
158
|
-
"onUpdate:modelValue": d[0] || (d[0] = (e) => ne(
|
|
156
|
+
modelValue: t(g),
|
|
157
|
+
"onUpdate:modelValue": d[0] || (d[0] = (e) => ne(g) ? g.value = e : null),
|
|
159
158
|
placeholder: s.searchPlaceholder,
|
|
160
159
|
"auto-focus": s.searchAutoFocus,
|
|
161
160
|
"test-id": s.testId,
|
|
162
161
|
onOnClear: d[1] || (d[1] = (e) => y("onClearSearch"))
|
|
163
162
|
}, null, 8, ["modelValue", "placeholder", "auto-focus", "test-id"])
|
|
164
163
|
])
|
|
165
|
-
]) :
|
|
164
|
+
], !0) : c("", !0)
|
|
166
165
|
], 8, Re),
|
|
167
|
-
t(b)["table-header-actions"] ? (l(),
|
|
166
|
+
t(b)["table-header-actions"] ? (l(), o("div", {
|
|
168
167
|
key: 0,
|
|
169
168
|
class: "table-header-actions",
|
|
170
169
|
"data-testid": `${s.testId}-${t(S).ACTIONS}`
|
|
171
170
|
}, [
|
|
172
|
-
|
|
173
|
-
], 8,
|
|
174
|
-
], 10, be)) :
|
|
171
|
+
r(a.$slots, "table-header-actions", {}, void 0, !0)
|
|
172
|
+
], 8, xe)) : c("", !0)
|
|
173
|
+
], 10, be)) : c("", !0),
|
|
175
174
|
u("thead", {
|
|
176
175
|
class: f({ sticky: s.isSticky, isStickyHeader: s.isStickyHeader })
|
|
177
176
|
}, [
|
|
@@ -179,38 +178,38 @@ const me = ["data-testid"], ve = ["data-testid"], be = ["data-testid"], $e = ["d
|
|
|
179
178
|
class: "sections",
|
|
180
179
|
"data-testid": `${s.testId}-${t(S).SECTIONS}`
|
|
181
180
|
}, [
|
|
182
|
-
(l(!0),
|
|
181
|
+
(l(!0), o(B, null, I(s.sections, (e) => (l(), o("div", {
|
|
183
182
|
key: e.id,
|
|
184
183
|
class: f(["section-container", { sticky: e.isSticky }])
|
|
185
184
|
}, [
|
|
186
|
-
|
|
185
|
+
r(a.$slots, `section-${e.id}`, {}, () => [
|
|
187
186
|
u("div", {
|
|
188
|
-
style:
|
|
187
|
+
style: x({ width: e.width + "px" }),
|
|
189
188
|
class: f({ section: !0 })
|
|
190
189
|
}, [
|
|
191
|
-
h(t(
|
|
192
|
-
default:
|
|
193
|
-
w(
|
|
190
|
+
h(t(p), { variant: "body2" }, {
|
|
191
|
+
default: T(() => [
|
|
192
|
+
w(E(e.title), 1)
|
|
194
193
|
]),
|
|
195
194
|
_: 2
|
|
196
195
|
}, 1024)
|
|
197
196
|
], 4)
|
|
198
|
-
])
|
|
197
|
+
], !0)
|
|
199
198
|
], 2))), 128))
|
|
200
199
|
], 8, Te),
|
|
201
200
|
u("tr", null, [
|
|
202
|
-
t(O) ? (l(),
|
|
203
|
-
|
|
204
|
-
h(t(
|
|
201
|
+
t(O) ? (l(), o("th", we, [
|
|
202
|
+
r(a.$slots, "select-all-checkbox", {}, () => [
|
|
203
|
+
h(t(K), {
|
|
205
204
|
disabled: s.isLoading,
|
|
206
205
|
"is-checked": t(M),
|
|
207
|
-
"is-indeterminate": !t(M) && t(
|
|
208
|
-
"onUpdate:isChecked":
|
|
206
|
+
"is-indeterminate": !t(M) && t(ee) > 0,
|
|
207
|
+
"onUpdate:isChecked": se
|
|
209
208
|
}, null, 8, ["disabled", "is-checked", "is-indeterminate"])
|
|
210
|
-
])
|
|
211
|
-
])) :
|
|
212
|
-
t(
|
|
213
|
-
(l(!0),
|
|
209
|
+
], !0)
|
|
210
|
+
])) : c("", !0),
|
|
211
|
+
t($) ? (l(), o("th", Ee)) : c("", !0),
|
|
212
|
+
(l(!0), o(B, null, I(s.columns, (e) => (l(), o("th", {
|
|
214
213
|
key: e.id,
|
|
215
214
|
class: f({
|
|
216
215
|
sticky: e.isSticky,
|
|
@@ -220,61 +219,62 @@ const me = ["data-testid"], ve = ["data-testid"], be = ["data-testid"], $e = ["d
|
|
|
220
219
|
isSortable: e.isSortable,
|
|
221
220
|
[`column-${e.id}`]: !0
|
|
222
221
|
}),
|
|
223
|
-
style:
|
|
222
|
+
style: x(e.isSticky ? t(L)[e.id] : null),
|
|
224
223
|
onClick: (k) => e.isSortable ? t(Q)(e) : null
|
|
225
224
|
}, [
|
|
226
|
-
u("div",
|
|
227
|
-
|
|
228
|
-
h(t(
|
|
229
|
-
default:
|
|
230
|
-
w(
|
|
225
|
+
u("div", Ie, [
|
|
226
|
+
r(a.$slots, `header-${e.id}`, { column: e }, () => [
|
|
227
|
+
h(t(p), { variant: "tableLabel" }, {
|
|
228
|
+
default: T(() => [
|
|
229
|
+
w(E(e.title), 1)
|
|
231
230
|
]),
|
|
232
231
|
_: 2
|
|
233
232
|
}, 1024)
|
|
234
|
-
]),
|
|
233
|
+
], !0),
|
|
235
234
|
e.helpText ? (l(), z(fe, {
|
|
236
235
|
key: 0,
|
|
237
236
|
"hover-help-text": e.helpText,
|
|
238
237
|
"hover-help-text-placement": e.helpTextPlacement
|
|
239
|
-
}, null, 8, ["hover-help-text", "hover-help-text-placement"])) :
|
|
238
|
+
}, null, 8, ["hover-help-text", "hover-help-text-placement"])) : c("", !0),
|
|
240
239
|
e.isSortable && e.id === s.sort?.sortBy ? (l(), z(ye, {
|
|
241
240
|
key: 1,
|
|
242
241
|
"sort-order": s.sort.sortOrder
|
|
243
|
-
}, null, 8, ["sort-order"])) :
|
|
242
|
+
}, null, 8, ["sort-order"])) : c("", !0)
|
|
244
243
|
])
|
|
245
|
-
], 14,
|
|
244
|
+
], 14, Be))), 128))
|
|
246
245
|
])
|
|
247
246
|
], 2),
|
|
248
247
|
u("tbody", null, [
|
|
249
|
-
t(P).length > 0 ? (l(),
|
|
248
|
+
t(P).length > 0 ? (l(), o("div", re({
|
|
250
249
|
key: 0,
|
|
251
250
|
class: "table-body-wrapper",
|
|
252
251
|
"data-testid": `${s.testId}-${t(S).BODY_WRAPPER}`
|
|
253
252
|
}, t(Y)), [
|
|
254
|
-
(l(!0),
|
|
253
|
+
(l(!0), o(B, null, I(t(P), (e) => (l(), o("tr", {
|
|
255
254
|
key: e.index,
|
|
256
255
|
class: f(["table-row", {
|
|
257
256
|
loading: s.isLoading || s.isLoading && !e.data || t(F).includes(e.index),
|
|
258
|
-
active: t(
|
|
259
|
-
activeMenu: t(
|
|
260
|
-
expanded: t(
|
|
257
|
+
active: t(A) === e.index,
|
|
258
|
+
activeMenu: t(Z) === e.index,
|
|
259
|
+
expanded: t($) && t(V)(e.index),
|
|
260
|
+
[U(e.index)]: !0
|
|
261
261
|
}]),
|
|
262
|
-
onMouseenter: (k) =>
|
|
262
|
+
onMouseenter: (k) => A.value = e.index,
|
|
263
263
|
onClick: (k) => y("clickRow", e.index)
|
|
264
264
|
}, [
|
|
265
|
-
t(O) ? (l(),
|
|
266
|
-
h(t(
|
|
267
|
-
"is-checked":
|
|
268
|
-
"onUpdate:isChecked": (k) =>
|
|
265
|
+
t(O) ? (l(), o("td", Ve, [
|
|
266
|
+
h(t(K), {
|
|
267
|
+
"is-checked": R(s.getRowId(e.data, e.index)),
|
|
268
|
+
"onUpdate:isChecked": (k) => te(s.getRowId(e.data, e.index))
|
|
269
269
|
}, null, 8, ["is-checked", "onUpdate:isChecked"])
|
|
270
|
-
])) :
|
|
271
|
-
t(
|
|
270
|
+
])) : c("", !0),
|
|
271
|
+
t($) ? (l(), o("td", Me, [
|
|
272
272
|
h(Se, {
|
|
273
|
-
expanded: t(
|
|
273
|
+
expanded: t(V)(e.index),
|
|
274
274
|
onClick: (k) => t(q)(e.index, k)
|
|
275
275
|
}, null, 8, ["expanded", "onClick"])
|
|
276
|
-
])) :
|
|
277
|
-
(l(!0),
|
|
276
|
+
])) : c("", !0),
|
|
277
|
+
(l(!0), o(B, null, I(s.columns, (k, n) => (l(), o("td", {
|
|
278
278
|
key: n,
|
|
279
279
|
class: f({
|
|
280
280
|
sticky: s.columns[n].isSticky,
|
|
@@ -283,47 +283,41 @@ const me = ["data-testid"], ve = ["data-testid"], be = ["data-testid"], $e = ["d
|
|
|
283
283
|
isTextRight: s.columns[n].isTextRight,
|
|
284
284
|
[`column-${s.columns[n].id}`]: !0
|
|
285
285
|
}),
|
|
286
|
-
style:
|
|
287
|
-
s.columns[n].isSticky ? t(
|
|
286
|
+
style: x(
|
|
287
|
+
s.columns[n].isSticky ? t(L)[s.columns[n].id] : null
|
|
288
288
|
)
|
|
289
289
|
}, [
|
|
290
|
-
!s.isLoading || s.isLoading && e.data[n] ? (l(),
|
|
290
|
+
!s.isLoading || s.isLoading && e.data[n] ? (l(), o("div", {
|
|
291
291
|
key: 0,
|
|
292
292
|
class: f(["table-cell", { last: n === e.data.length - 1 }])
|
|
293
293
|
}, [
|
|
294
|
-
|
|
294
|
+
r(a.$slots, `cell-${s.columns[n].id}`, {
|
|
295
295
|
cell: e.data[n],
|
|
296
296
|
isLoading: t(F).includes(e.index),
|
|
297
297
|
cellIndex: n,
|
|
298
298
|
row: e,
|
|
299
299
|
rowIndex: e.index
|
|
300
300
|
}, () => [
|
|
301
|
-
h(t(
|
|
302
|
-
default:
|
|
303
|
-
w(
|
|
301
|
+
h(t(p), { variant: "body1" }, {
|
|
302
|
+
default: T(() => [
|
|
303
|
+
w(E(e.data[n]), 1)
|
|
304
304
|
]),
|
|
305
305
|
_: 2
|
|
306
306
|
}, 1024)
|
|
307
|
-
])
|
|
308
|
-
], 2)) :
|
|
309
|
-
h(t(
|
|
310
|
-
])
|
|
307
|
+
], !0)
|
|
308
|
+
], 2)) : r(a.$slots, "loader", { key: 1 }, () => [
|
|
309
|
+
h(t(ce), { round: "" })
|
|
310
|
+
], !0)
|
|
311
311
|
], 6))), 128)),
|
|
312
|
-
t(
|
|
313
|
-
|
|
314
|
-
row: e,
|
|
315
|
-
gridColumnTemplate: t(V)
|
|
316
|
-
})
|
|
317
|
-
])) : r("", !0),
|
|
318
|
-
se(e.index) ? (l(), i("div", Ve, [
|
|
319
|
-
c(a.$slots, "floating-row", {
|
|
312
|
+
t($) && t(V)(e.index) ? (l(), o("div", Pe, [
|
|
313
|
+
r(a.$slots, "expanded", {
|
|
320
314
|
row: e,
|
|
321
|
-
|
|
322
|
-
})
|
|
323
|
-
])) :
|
|
315
|
+
gridColumnTemplate: t(H)
|
|
316
|
+
}, void 0, !0)
|
|
317
|
+
])) : c("", !0)
|
|
324
318
|
], 42, Ae))), 128))
|
|
325
|
-
], 16, pe)) : (l(),
|
|
326
|
-
|
|
319
|
+
], 16, pe)) : (l(), o("div", He, [
|
|
320
|
+
r(a.$slots, "empty-state", {}, () => [
|
|
327
321
|
h(t(ue), {
|
|
328
322
|
class: "empty-state",
|
|
329
323
|
title: s.emptyStateTitle,
|
|
@@ -331,16 +325,16 @@ const me = ["data-testid"], ve = ["data-testid"], be = ["data-testid"], $e = ["d
|
|
|
331
325
|
variant: t(ae),
|
|
332
326
|
"test-id": `${s.testId}-${t(S).EMPTY_STATE}`
|
|
333
327
|
}, null, 8, ["title", "subtitle", "variant", "test-id"])
|
|
334
|
-
])
|
|
328
|
+
], !0)
|
|
335
329
|
]))
|
|
336
330
|
])
|
|
337
331
|
], 46, ve),
|
|
338
|
-
t(D) ? (l(),
|
|
339
|
-
|
|
340
|
-
])) :
|
|
341
|
-
], 40,
|
|
332
|
+
t(D) ? (l(), o("div", Le, [
|
|
333
|
+
r(a.$slots, "footer", {}, void 0, !0)
|
|
334
|
+
])) : c("", !0)
|
|
335
|
+
], 40, ge));
|
|
342
336
|
}
|
|
343
337
|
});
|
|
344
338
|
export {
|
|
345
|
-
|
|
339
|
+
qe as default
|
|
346
340
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./DataGridRowsCounter.vue2.js";
|
|
2
2
|
/* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../../DataGridRowsCounter.
|
|
4
|
-
const r = /* @__PURE__ */ e(o, [["__scopeId", "data-v-
|
|
3
|
+
// import "../../../DataGridRowsCounter.vue_vue_type_style_index_0_scoped_ef699ec5_lang.css"; //*');
|
|
4
|
+
const r = /* @__PURE__ */ e(o, [["__scopeId", "data-v-ef699ec5"]]);
|
|
5
5
|
export {
|
|
6
6
|
r as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import "../../../DataGridRowsCounter.
|
|
1
|
+
import "../../../DataGridRowsCounter.vue_vue_type_style_index_0_scoped_ef699ec5_lang.css"; import { defineComponent as l, openBlock as u, createElementBlock as f, unref as e, createVNode as d, withCtx as i, createTextVNode as a, toDisplayString as o } from "vue";
|
|
2
2
|
import s from "../../typography/v4/Typography.vue.js";
|
|
3
3
|
import { RowsCounterTestIdModifiers as n } from "../../../testids/index.js";
|
|
4
|
-
|
|
4
|
+
import { nFormatter as r } from "../../../utils/formatNumbers.js";
|
|
5
|
+
const c = ["data-testid"], I = /* @__PURE__ */ l({
|
|
5
6
|
__name: "DataGridRowsCounter",
|
|
6
7
|
props: {
|
|
7
8
|
count: { default: 0 },
|
|
@@ -12,41 +13,41 @@ const f = ["data-testid"], C = /* @__PURE__ */ l({
|
|
|
12
13
|
testId: { default: "" }
|
|
13
14
|
},
|
|
14
15
|
setup(t) {
|
|
15
|
-
return (
|
|
16
|
+
return (m, T) => (u(), f("div", {
|
|
16
17
|
class: "data-grid-rows-counter",
|
|
17
18
|
"data-testid": `${t.testId}-${e(n).CONTAINER}`
|
|
18
19
|
}, [
|
|
19
|
-
|
|
20
|
+
d(e(s), { variant: "body1" }, {
|
|
20
21
|
default: i(() => [
|
|
21
|
-
a(
|
|
22
|
-
|
|
22
|
+
a(o(t.displayingText) + " ", 1),
|
|
23
|
+
d(e(s), {
|
|
23
24
|
class: "text-strong",
|
|
24
25
|
variant: "subtitle1",
|
|
25
26
|
"data-testid": `${t.testId}-${e(n).COUNT}`
|
|
26
27
|
}, {
|
|
27
28
|
default: i(() => [
|
|
28
|
-
a(
|
|
29
|
+
a(o(e(r)(t.count)), 1)
|
|
29
30
|
]),
|
|
30
31
|
_: 1
|
|
31
32
|
}, 8, ["data-testid"]),
|
|
32
|
-
a(" " +
|
|
33
|
-
|
|
33
|
+
a(" " + o(t.outOfText) + " ", 1),
|
|
34
|
+
d(e(s), {
|
|
34
35
|
class: "text-strong",
|
|
35
36
|
variant: "subtitle1",
|
|
36
37
|
"data-testid": `${t.testId}-${e(n).TOTAL}`
|
|
37
38
|
}, {
|
|
38
39
|
default: i(() => [
|
|
39
|
-
a(
|
|
40
|
+
a(o(e(r)(t.totalCount)), 1)
|
|
40
41
|
]),
|
|
41
42
|
_: 1
|
|
42
43
|
}, 8, ["data-testid"]),
|
|
43
|
-
a(" " +
|
|
44
|
+
a(" " + o(t.totalText), 1)
|
|
44
45
|
]),
|
|
45
46
|
_: 1
|
|
46
47
|
})
|
|
47
|
-
], 8,
|
|
48
|
+
], 8, c));
|
|
48
49
|
}
|
|
49
50
|
});
|
|
50
51
|
export {
|
|
51
|
-
|
|
52
|
+
I as default
|
|
52
53
|
};
|
|
@@ -120,8 +120,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
120
120
|
search?(_: {}): any;
|
|
121
121
|
"table-header-actions"?(_: {}): any;
|
|
122
122
|
"floating-row"?(_: {
|
|
123
|
-
row:
|
|
124
|
-
rowIndex:
|
|
123
|
+
row: any;
|
|
124
|
+
rowIndex: any;
|
|
125
125
|
}): any;
|
|
126
126
|
"empty-state"?(_: {}): any;
|
|
127
127
|
}>;
|