@ironsource/shared-ui 2.1.6-rc.35 → 2.1.6-rc.37
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_057abdf5_lang.css +1 -0
- package/DropdownV4.vue_vue_type_style_index_0_scoped_b484da34_lang.css +1 -0
- package/OptionV4.vue_vue_type_style_index_0_scoped_9db0f796_lang.css +1 -0
- package/TreeDropdown.vue_vue_type_style_index_0_scoped_4492426c_lang.css +1 -0
- package/components/autocomplete/Autocomplete.vue.d.ts +1 -0
- package/components/autocomplete/Autocomplete.vue2.js +6 -5
- package/components/autocomplete/index.d.ts +1 -0
- package/components/dropdown/common/Dropdown.common.js +22 -22
- package/components/dropdown/common/Option.common.d.ts +1 -1
- package/components/dropdown/common/Option.common.js +9 -9
- package/components/dropdown/composables/useChildOptions.d.ts +7 -0
- package/components/dropdown/composables/useChildOptions.js +14 -0
- package/components/dropdown/v4/DropdownV4.vue.d.ts +6 -0
- package/components/dropdown/v4/DropdownV4.vue.js +3 -3
- package/components/dropdown/v4/DropdownV4.vue2.js +43 -40
- package/components/dropdown/v4/OptionV4.vue.js +2 -2
- package/components/dropdown/v4/OptionV4.vue2.js +21 -22
- package/components/dropdown/v4/TreeDropdown.vue.d.ts +97 -0
- package/components/dropdown/v4/TreeDropdown.vue.js +7 -0
- package/components/dropdown/v4/TreeDropdown.vue2.js +115 -0
- package/components/dropdown/v4/index.d.ts +162 -2
- package/components/dropdown/v4/index.js +7 -4
- package/components/multibar/MultiBarMenu.vue2.js +12 -11
- package/components/table/common/Table.common.d.ts +1 -0
- package/components/table/common/Table.common.js +65 -61
- package/components/table/v4/DataGrid.vue.d.ts +5 -1
- package/components/table/v4/DataGrid.vue.js +4 -4
- package/components/table/v4/DataGrid.vue2.js +155 -151
- package/components/table/v4/DataGridMenu.vue2.js +3 -2
- package/components/table/v4/index.d.ts +16 -4
- package/index.d.ts +353 -10
- package/mocks/options.d.ts +12 -0
- package/package.json +1 -1
- package/DataGrid.vue_vue_type_style_index_0_scoped_b5729ec6_lang.css +0 -1
- package/DropdownV4.vue_vue_type_style_index_0_scoped_2e7a89bc_lang.css +0 -1
- package/OptionV4.vue_vue_type_style_index_0_scoped_69abfd4a_lang.css +0 -1
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import "../../../DataGrid.
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import "../../../DataGrid.vue_vue_type_style_index_0_scoped_057abdf5_lang.css"; import { defineComponent as le, useCssVars as ie, unref as t, useSlots as de, computed as v, openBlock as l, createElementBlock as d, createElementVNode as u, normalizeStyle as C, normalizeClass as f, renderSlot as c, createVNode as h, withCtx as T, createTextVNode as E, toDisplayString as w, isRef as oe, createCommentVNode as r, Fragment as B, renderList as I, createBlock as D, mergeProps as ne } from "vue";
|
|
2
|
+
import p from "../../typography/v4/Typography.vue.js";
|
|
3
|
+
import ce from "../../skeleton/v4/SkeletonV4.vue.js";
|
|
4
|
+
import re from "../../emptyState/v4/EmptyStateV4.vue.js";
|
|
5
|
+
import U from "../../checkbox/v4/CheckboxV4.vue.js";
|
|
6
6
|
import { TableTestIdModifiers as S } from "../../../testids/index.js";
|
|
7
|
-
import { tableCommon as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { useVModel as
|
|
13
|
-
const
|
|
7
|
+
import { tableCommon as ue } from "../common/Table.common.js";
|
|
8
|
+
import he from "./SortIcon.vue.js";
|
|
9
|
+
import ye from "./HelpIcon.vue.js";
|
|
10
|
+
import fe from "./ExpandRowToggle.vue.js";
|
|
11
|
+
import Se from "../../search/v4/SearchV4.vue.js";
|
|
12
|
+
import { useVModel as ke } from "@vueuse/core";
|
|
13
|
+
const me = ["data-testid"], ge = ["data-testid"], ve = ["data-testid"], be = ["data-testid"], $e = ["data-testid"], Re = { class: "search-wrapper" }, xe = ["data-testid"], Ce = ["data-testid"], Te = {
|
|
14
14
|
key: 0,
|
|
15
15
|
class: "checkbox-cell"
|
|
16
|
-
},
|
|
16
|
+
}, Ee = {
|
|
17
17
|
key: 1,
|
|
18
18
|
class: "expand-toggle-cell"
|
|
19
|
-
},
|
|
19
|
+
}, we = ["onClick"], Be = { class: "table-head-container" }, Ie = ["data-testid"], pe = ["onMouseenter", "onClick"], Ae = {
|
|
20
20
|
key: 0,
|
|
21
21
|
class: "checkbox-cell"
|
|
22
|
-
},
|
|
22
|
+
}, Me = {
|
|
23
23
|
key: 1,
|
|
24
24
|
class: "expand-toggle-cell"
|
|
25
|
-
},
|
|
25
|
+
}, Pe = {
|
|
26
26
|
key: 2,
|
|
27
27
|
class: "expanded-row"
|
|
28
|
-
},
|
|
28
|
+
}, Ve = { key: 1 }, He = {
|
|
29
29
|
key: 0,
|
|
30
30
|
class: "table-footer"
|
|
31
|
-
},
|
|
31
|
+
}, qe = /* @__PURE__ */ le({
|
|
32
32
|
__name: "DataGrid",
|
|
33
33
|
props: {
|
|
34
34
|
title: { default: "" },
|
|
@@ -37,8 +37,8 @@ const Se = ["data-testid"], ke = ["data-testid"], me = ["data-testid"], ge = ["d
|
|
|
37
37
|
sections: { default: null },
|
|
38
38
|
sort: { default: null },
|
|
39
39
|
selection: { default: null },
|
|
40
|
-
getRowId: { type: Function, default: (s,
|
|
41
|
-
selectedMatcher: { type: Function, default: (s,
|
|
40
|
+
getRowId: { type: Function, default: (s, m) => m },
|
|
41
|
+
selectedMatcher: { type: Function, default: (s, m) => s === m },
|
|
42
42
|
isSticky: { type: Boolean, default: !0 },
|
|
43
43
|
isStickyHeader: { type: Boolean, default: !1 },
|
|
44
44
|
isLoading: { type: Boolean, default: !1 },
|
|
@@ -57,154 +57,157 @@ const Se = ["data-testid"], ke = ["data-testid"], me = ["data-testid"], ge = ["d
|
|
|
57
57
|
searchAutoFocus: { type: Boolean, default: !1 },
|
|
58
58
|
zIndexBase: { default: 100 }
|
|
59
59
|
},
|
|
60
|
-
emits: ["update:sort", "update:search", "update:selection", "onScroll", "onClearSearch", "saveRow", "loadMore", "selectAll", "selectRow"],
|
|
61
|
-
setup(s, { emit:
|
|
60
|
+
emits: ["update:sort", "update:search", "update:selection", "onScroll", "onClearSearch", "saveRow", "loadMore", "selectAll", "selectRow", "clickRow"],
|
|
61
|
+
setup(s, { expose: m, emit: y }) {
|
|
62
62
|
const o = s;
|
|
63
|
-
|
|
64
|
-
"
|
|
65
|
-
|
|
66
|
-
"
|
|
67
|
-
"
|
|
63
|
+
ie((a) => ({
|
|
64
|
+
"671cd302": s.zIndexBase,
|
|
65
|
+
be93a49a: t(K),
|
|
66
|
+
"13ad9fec": t(H),
|
|
67
|
+
"6feb5274": t(J)
|
|
68
68
|
}));
|
|
69
|
-
const
|
|
70
|
-
list:
|
|
71
|
-
containerProps:
|
|
72
|
-
wrapperProps:
|
|
73
|
-
activeRow:
|
|
74
|
-
gridColumnTemplate:
|
|
75
|
-
toggleSortOrder:
|
|
76
|
-
columnsStickyPositions:
|
|
77
|
-
hasSearchSlot:
|
|
78
|
-
containerStyle:
|
|
79
|
-
onScroll:
|
|
80
|
-
savingRows:
|
|
81
|
-
hasExpandSlot:
|
|
82
|
-
toggleExpandRow:
|
|
83
|
-
cssRowHeight:
|
|
84
|
-
cssExpandGridCol:
|
|
85
|
-
isRowExpanded:
|
|
86
|
-
hasCheckboxes:
|
|
87
|
-
activeMenuRow:
|
|
88
|
-
|
|
69
|
+
const b = de(), {
|
|
70
|
+
list: V,
|
|
71
|
+
containerProps: G,
|
|
72
|
+
wrapperProps: Y,
|
|
73
|
+
activeRow: A,
|
|
74
|
+
gridColumnTemplate: H,
|
|
75
|
+
toggleSortOrder: Q,
|
|
76
|
+
columnsStickyPositions: L,
|
|
77
|
+
hasSearchSlot: W,
|
|
78
|
+
containerStyle: j,
|
|
79
|
+
onScroll: N,
|
|
80
|
+
savingRows: F,
|
|
81
|
+
hasExpandSlot: $,
|
|
82
|
+
toggleExpandRow: q,
|
|
83
|
+
cssRowHeight: J,
|
|
84
|
+
cssExpandGridCol: K,
|
|
85
|
+
isRowExpanded: M,
|
|
86
|
+
hasCheckboxes: O,
|
|
87
|
+
activeMenuRow: X,
|
|
88
|
+
scrollTo: Z
|
|
89
|
+
} = ue(o, y), z = v(() => !!b.footer), g = ke(o, "search", y), _ = v(() => o.selection.length || 0), P = v(() => {
|
|
89
90
|
const a = o.rows.map((i, e) => o.getRowId(i, e));
|
|
90
|
-
return a.length && a.every((i) =>
|
|
91
|
-
}),
|
|
92
|
-
|
|
91
|
+
return a.length && a.every((i) => R(i));
|
|
92
|
+
}), R = (a) => o.selection.findIndex((i) => o.selectedMatcher(a, i)) !== -1, ee = (a) => {
|
|
93
|
+
R(a) ? (x(
|
|
93
94
|
o.selection.filter(
|
|
94
95
|
(i) => !o.selectedMatcher(a, i)
|
|
95
96
|
)
|
|
96
|
-
),
|
|
97
|
-
},
|
|
98
|
-
if (
|
|
99
|
-
|
|
97
|
+
), y("selectRow", !1)) : (x([...o.selection, a]), y("selectRow", !0));
|
|
98
|
+
}, te = () => {
|
|
99
|
+
if (P.value)
|
|
100
|
+
x([]), y("selectAll", !1);
|
|
100
101
|
else {
|
|
101
|
-
const a = o.rows.map((i, e) => o.getRowId(i, e)).filter((i) =>
|
|
102
|
-
|
|
102
|
+
const a = o.rows.map((i, e) => o.getRowId(i, e)).filter((i) => !R(i));
|
|
103
|
+
x([...o.selection, ...a]), y("selectAll", !0);
|
|
103
104
|
}
|
|
104
|
-
},
|
|
105
|
-
|
|
106
|
-
},
|
|
107
|
-
() => o.emptyStateVariant ?? (
|
|
108
|
-
),
|
|
109
|
-
() => o.emptyStateSubtitle ? o.emptyStateSubtitle :
|
|
105
|
+
}, x = (a) => {
|
|
106
|
+
y("update:selection", a);
|
|
107
|
+
}, se = v(
|
|
108
|
+
() => o.emptyStateVariant ?? (g.value ? "no-results" : "no-data")
|
|
109
|
+
), ae = v(
|
|
110
|
+
() => o.emptyStateSubtitle ? o.emptyStateSubtitle : g.value ? "Search again with different filters" : void 0
|
|
110
111
|
);
|
|
111
|
-
return (
|
|
112
|
+
return m({
|
|
113
|
+
scrollTo: Z
|
|
114
|
+
}), (a, i) => (l(), d("div", {
|
|
112
115
|
class: "table-container",
|
|
113
116
|
"data-testid": `${s.testId}-${t(S).CONTAINER}`,
|
|
114
|
-
onMouseleave: i[3] || (i[3] = (e) =>
|
|
117
|
+
onMouseleave: i[3] || (i[3] = (e) => A.value = null)
|
|
115
118
|
}, [
|
|
116
|
-
|
|
117
|
-
ref: t(
|
|
118
|
-
style:
|
|
119
|
+
u("table", {
|
|
120
|
+
ref: t(G).ref,
|
|
121
|
+
style: C(t(j)),
|
|
119
122
|
class: f({
|
|
120
|
-
hasFooter: t(
|
|
123
|
+
hasFooter: t(z)
|
|
121
124
|
}),
|
|
122
125
|
"data-testid": `${s.testId}-${t(S).TABLE}`,
|
|
123
126
|
onScrollPassive: i[2] || (i[2] = //@ts-ignore
|
|
124
|
-
(...e) => t(
|
|
127
|
+
(...e) => t(N) && t(N)(...e))
|
|
125
128
|
}, [
|
|
126
|
-
s.title || t(
|
|
129
|
+
s.title || t(b).title || t(W) || t(b)["table-header-actions"] ? (l(), d("div", {
|
|
127
130
|
key: 0,
|
|
128
131
|
class: f(["table-header", { isStickyHeader: s.isStickyHeader }]),
|
|
129
132
|
"data-testid": `${s.testId}-${t(S).HEADER}`
|
|
130
133
|
}, [
|
|
131
|
-
|
|
134
|
+
u("div", {
|
|
132
135
|
class: "table-title",
|
|
133
136
|
"data-testid": `${s.testId}-${t(S).TITLE}`
|
|
134
137
|
}, [
|
|
135
138
|
c(a.$slots, "title", {}, () => [
|
|
136
|
-
|
|
139
|
+
h(t(p), { variant: "h3" }, {
|
|
137
140
|
default: T(() => [
|
|
138
|
-
|
|
141
|
+
E(w(s.title), 1)
|
|
139
142
|
]),
|
|
140
143
|
_: 1
|
|
141
144
|
})
|
|
142
145
|
], !0)
|
|
143
|
-
], 8,
|
|
144
|
-
|
|
146
|
+
], 8, be),
|
|
147
|
+
u("div", {
|
|
145
148
|
class: "table-header-right",
|
|
146
149
|
"data-testid": `${s.testId}-${t(S).HEADER_RIGHT}`
|
|
147
150
|
}, [
|
|
148
151
|
s.showSearch ? c(a.$slots, "search", { key: 0 }, () => [
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
modelValue: t(
|
|
152
|
-
"onUpdate:modelValue": i[0] || (i[0] = (e) =>
|
|
152
|
+
u("div", Re, [
|
|
153
|
+
h(t(Se), {
|
|
154
|
+
modelValue: t(g),
|
|
155
|
+
"onUpdate:modelValue": i[0] || (i[0] = (e) => oe(g) ? g.value = e : null),
|
|
153
156
|
placeholder: s.searchPlaceholder,
|
|
154
157
|
"auto-focus": s.searchAutoFocus,
|
|
155
158
|
"test-id": s.testId,
|
|
156
|
-
onOnClear: i[1] || (i[1] = (e) =>
|
|
159
|
+
onOnClear: i[1] || (i[1] = (e) => y("onClearSearch"))
|
|
157
160
|
}, null, 8, ["modelValue", "placeholder", "auto-focus", "test-id"])
|
|
158
161
|
])
|
|
159
|
-
], !0) :
|
|
160
|
-
], 8,
|
|
161
|
-
t(
|
|
162
|
+
], !0) : r("", !0)
|
|
163
|
+
], 8, $e),
|
|
164
|
+
t(b)["table-header-actions"] ? (l(), d("div", {
|
|
162
165
|
key: 0,
|
|
163
166
|
class: "table-header-actions",
|
|
164
167
|
"data-testid": `${s.testId}-${t(S).ACTIONS}`
|
|
165
168
|
}, [
|
|
166
169
|
c(a.$slots, "table-header-actions", {}, void 0, !0)
|
|
167
|
-
], 8,
|
|
168
|
-
], 10,
|
|
169
|
-
|
|
170
|
+
], 8, xe)) : r("", !0)
|
|
171
|
+
], 10, ve)) : r("", !0),
|
|
172
|
+
u("thead", {
|
|
170
173
|
class: f({ sticky: s.isSticky, isStickyHeader: s.isStickyHeader })
|
|
171
174
|
}, [
|
|
172
|
-
|
|
175
|
+
u("div", {
|
|
173
176
|
class: "sections",
|
|
174
177
|
"data-testid": `${s.testId}-${t(S).SECTIONS}`
|
|
175
178
|
}, [
|
|
176
|
-
(l(!0), d(
|
|
179
|
+
(l(!0), d(B, null, I(s.sections, (e) => (l(), d("div", {
|
|
177
180
|
key: e.id,
|
|
178
181
|
class: f(["section-container", { sticky: e.isSticky }])
|
|
179
182
|
}, [
|
|
180
183
|
c(a.$slots, `section-${e.id}`, {}, () => [
|
|
181
|
-
|
|
182
|
-
style:
|
|
184
|
+
u("div", {
|
|
185
|
+
style: C({ width: e.width + "px" }),
|
|
183
186
|
class: f({ section: !0 })
|
|
184
187
|
}, [
|
|
185
|
-
|
|
188
|
+
h(t(p), { variant: "body2" }, {
|
|
186
189
|
default: T(() => [
|
|
187
|
-
|
|
190
|
+
E(w(e.title), 1)
|
|
188
191
|
]),
|
|
189
192
|
_: 2
|
|
190
193
|
}, 1024)
|
|
191
194
|
], 4)
|
|
192
195
|
], !0)
|
|
193
196
|
], 2))), 128))
|
|
194
|
-
], 8,
|
|
195
|
-
|
|
196
|
-
t(
|
|
197
|
+
], 8, Ce),
|
|
198
|
+
u("tr", null, [
|
|
199
|
+
t(O) ? (l(), d("th", Te, [
|
|
197
200
|
c(a.$slots, "select-all-checkbox", {}, () => [
|
|
198
|
-
|
|
201
|
+
h(t(U), {
|
|
199
202
|
disabled: s.isLoading,
|
|
200
|
-
"is-checked": t(
|
|
201
|
-
"is-indeterminate": !t(
|
|
202
|
-
"onUpdate:isChecked":
|
|
203
|
+
"is-checked": t(P),
|
|
204
|
+
"is-indeterminate": !t(P) && t(_) > 0,
|
|
205
|
+
"onUpdate:isChecked": te
|
|
203
206
|
}, null, 8, ["disabled", "is-checked", "is-indeterminate"])
|
|
204
207
|
], !0)
|
|
205
|
-
])) :
|
|
206
|
-
t(
|
|
207
|
-
(l(!0), d(
|
|
208
|
+
])) : r("", !0),
|
|
209
|
+
t($) ? (l(), d("th", Ee)) : r("", !0),
|
|
210
|
+
(l(!0), d(B, null, I(s.columns, (e) => (l(), d("th", {
|
|
208
211
|
key: e.id,
|
|
209
212
|
class: f({
|
|
210
213
|
sticky: e.isSticky,
|
|
@@ -214,61 +217,62 @@ const Se = ["data-testid"], ke = ["data-testid"], me = ["data-testid"], ge = ["d
|
|
|
214
217
|
isSortable: e.isSortable,
|
|
215
218
|
[`column-${e.id}`]: !0
|
|
216
219
|
}),
|
|
217
|
-
style:
|
|
218
|
-
onClick: (
|
|
220
|
+
style: C(e.isSticky ? t(L)[e.id] : null),
|
|
221
|
+
onClick: (k) => e.isSortable ? t(Q)(e) : null
|
|
219
222
|
}, [
|
|
220
|
-
|
|
223
|
+
u("div", Be, [
|
|
221
224
|
c(a.$slots, `header-${e.id}`, { column: e }, () => [
|
|
222
|
-
|
|
225
|
+
h(t(p), { variant: "tableLabel" }, {
|
|
223
226
|
default: T(() => [
|
|
224
|
-
|
|
227
|
+
E(w(e.title), 1)
|
|
225
228
|
]),
|
|
226
229
|
_: 2
|
|
227
230
|
}, 1024)
|
|
228
231
|
], !0),
|
|
229
|
-
e.helpText ? (l(),
|
|
232
|
+
e.helpText ? (l(), D(ye, {
|
|
230
233
|
key: 0,
|
|
231
234
|
"hover-help-text": e.helpText,
|
|
232
235
|
"hover-help-text-placement": e.helpTextPlacement
|
|
233
|
-
}, null, 8, ["hover-help-text", "hover-help-text-placement"])) :
|
|
234
|
-
e.isSortable && e.id === s.sort?.sortBy ? (l(),
|
|
236
|
+
}, null, 8, ["hover-help-text", "hover-help-text-placement"])) : r("", !0),
|
|
237
|
+
e.isSortable && e.id === s.sort?.sortBy ? (l(), D(he, {
|
|
235
238
|
key: 1,
|
|
236
239
|
"sort-order": s.sort.sortOrder
|
|
237
|
-
}, null, 8, ["sort-order"])) :
|
|
240
|
+
}, null, 8, ["sort-order"])) : r("", !0)
|
|
238
241
|
])
|
|
239
|
-
], 14,
|
|
242
|
+
], 14, we))), 128))
|
|
240
243
|
])
|
|
241
244
|
], 2),
|
|
242
|
-
|
|
243
|
-
t(
|
|
245
|
+
u("tbody", null, [
|
|
246
|
+
t(V).length > 0 ? (l(), d("div", ne({
|
|
244
247
|
key: 0,
|
|
245
248
|
class: "table-body-wrapper",
|
|
246
249
|
"data-testid": `${s.testId}-${t(S).BODY_WRAPPER}`
|
|
247
|
-
}, t(
|
|
248
|
-
(l(!0), d(
|
|
250
|
+
}, t(Y)), [
|
|
251
|
+
(l(!0), d(B, null, I(t(V), (e) => (l(), d("tr", {
|
|
249
252
|
key: e.index,
|
|
250
253
|
class: f(["table-row", {
|
|
251
|
-
loading: s.isLoading || s.isLoading && !e.data || t(
|
|
252
|
-
active: t(
|
|
253
|
-
activeMenu: t(
|
|
254
|
-
expanded: t(
|
|
254
|
+
loading: s.isLoading || s.isLoading && !e.data || t(F).includes(e.index),
|
|
255
|
+
active: t(A) === e.index,
|
|
256
|
+
activeMenu: t(X) === e.index,
|
|
257
|
+
expanded: t($) && t(M)(e.index)
|
|
255
258
|
}]),
|
|
256
|
-
onMouseenter: (
|
|
259
|
+
onMouseenter: (k) => A.value = e.index,
|
|
260
|
+
onClick: (k) => y("clickRow", e.index)
|
|
257
261
|
}, [
|
|
258
|
-
t(
|
|
259
|
-
|
|
260
|
-
"is-checked":
|
|
262
|
+
t(O) ? (l(), d("td", Ae, [
|
|
263
|
+
h(t(U), {
|
|
264
|
+
"is-checked": R(s.getRowId(e.data, e.index)),
|
|
261
265
|
size: "sm",
|
|
262
|
-
"onUpdate:isChecked": (
|
|
266
|
+
"onUpdate:isChecked": (k) => ee(s.getRowId(e.data, e.index))
|
|
263
267
|
}, null, 8, ["is-checked", "onUpdate:isChecked"])
|
|
264
|
-
])) :
|
|
265
|
-
t(
|
|
266
|
-
|
|
267
|
-
expanded: t(
|
|
268
|
-
onClick: (
|
|
268
|
+
])) : r("", !0),
|
|
269
|
+
t($) ? (l(), d("td", Me, [
|
|
270
|
+
h(fe, {
|
|
271
|
+
expanded: t(M)(e.index),
|
|
272
|
+
onClick: (k) => t(q)(e.index, k)
|
|
269
273
|
}, null, 8, ["expanded", "onClick"])
|
|
270
|
-
])) :
|
|
271
|
-
(l(!0), d(
|
|
274
|
+
])) : r("", !0),
|
|
275
|
+
(l(!0), d(B, null, I(s.columns, (k, n) => (l(), d("td", {
|
|
272
276
|
key: n,
|
|
273
277
|
class: f({
|
|
274
278
|
sticky: s.columns[n].isSticky,
|
|
@@ -277,8 +281,8 @@ const Se = ["data-testid"], ke = ["data-testid"], me = ["data-testid"], ge = ["d
|
|
|
277
281
|
isTextRight: s.columns[n].isTextRight,
|
|
278
282
|
[`column-${s.columns[n].id}`]: !0
|
|
279
283
|
}),
|
|
280
|
-
style:
|
|
281
|
-
s.columns[n].isSticky ? t(
|
|
284
|
+
style: C(
|
|
285
|
+
s.columns[n].isSticky ? t(L)[s.columns[n].id] : null
|
|
282
286
|
)
|
|
283
287
|
}, [
|
|
284
288
|
!s.isLoading || s.isLoading && e.data[n] ? (l(), d("div", {
|
|
@@ -287,48 +291,48 @@ const Se = ["data-testid"], ke = ["data-testid"], me = ["data-testid"], ge = ["d
|
|
|
287
291
|
}, [
|
|
288
292
|
c(a.$slots, `cell-${s.columns[n].id}`, {
|
|
289
293
|
cell: e.data[n],
|
|
290
|
-
isLoading: t(
|
|
294
|
+
isLoading: t(F).includes(e.index),
|
|
291
295
|
cellIndex: n,
|
|
292
296
|
row: e,
|
|
293
297
|
rowIndex: e.index
|
|
294
298
|
}, () => [
|
|
295
|
-
|
|
299
|
+
h(t(p), { variant: "body1" }, {
|
|
296
300
|
default: T(() => [
|
|
297
|
-
|
|
301
|
+
E(w(e.data[n]), 1)
|
|
298
302
|
]),
|
|
299
303
|
_: 2
|
|
300
304
|
}, 1024)
|
|
301
305
|
], !0)
|
|
302
306
|
], 2)) : c(a.$slots, "loader", { key: 1 }, () => [
|
|
303
|
-
|
|
307
|
+
h(t(ce), { round: "" })
|
|
304
308
|
], !0)
|
|
305
309
|
], 6))), 128)),
|
|
306
|
-
t(
|
|
310
|
+
t($) && t(M)(e.index) ? (l(), d("div", Pe, [
|
|
307
311
|
c(a.$slots, "expanded", {
|
|
308
312
|
row: e,
|
|
309
|
-
gridColumnTemplate: t(
|
|
313
|
+
gridColumnTemplate: t(H)
|
|
310
314
|
}, void 0, !0)
|
|
311
|
-
])) :
|
|
312
|
-
], 42,
|
|
313
|
-
], 16,
|
|
315
|
+
])) : r("", !0)
|
|
316
|
+
], 42, pe))), 128))
|
|
317
|
+
], 16, Ie)) : (l(), d("div", Ve, [
|
|
314
318
|
c(a.$slots, "empty-state", {}, () => [
|
|
315
|
-
|
|
319
|
+
h(t(re), {
|
|
316
320
|
class: "empty-state",
|
|
317
321
|
title: s.emptyStateTitle,
|
|
318
|
-
subtitle: t(
|
|
319
|
-
variant: t(
|
|
322
|
+
subtitle: t(ae),
|
|
323
|
+
variant: t(se),
|
|
320
324
|
"test-id": `${s.testId}-${t(S).EMPTY_STATE}`
|
|
321
325
|
}, null, 8, ["title", "subtitle", "variant", "test-id"])
|
|
322
326
|
], !0)
|
|
323
327
|
]))
|
|
324
328
|
])
|
|
325
|
-
], 46,
|
|
326
|
-
t(
|
|
329
|
+
], 46, ge),
|
|
330
|
+
t(z) ? (l(), d("div", He, [
|
|
327
331
|
c(a.$slots, "footer", {}, void 0, !0)
|
|
328
|
-
])) :
|
|
329
|
-
], 40,
|
|
332
|
+
])) : r("", !0)
|
|
333
|
+
], 40, me));
|
|
330
334
|
}
|
|
331
335
|
});
|
|
332
336
|
export {
|
|
333
|
-
|
|
337
|
+
qe as default
|
|
334
338
|
};
|
|
@@ -6,10 +6,11 @@ import "../../dropdown/v4/ChipDropdownTrigger.vue.js";
|
|
|
6
6
|
import "../../dropdown/v4/AppDropdownTrigger.vue.js";
|
|
7
7
|
import "../../dropdown/v4/ButtonDropdownTrigger.vue.js";
|
|
8
8
|
import "../../dropdown/v4/ButtonFilterDropdownTrigger.vue.js";
|
|
9
|
+
import "../../dropdown/v4/TreeDropdown.vue.js";
|
|
9
10
|
import C from "../../dropdown/v4/OptionV4.vue.js";
|
|
10
11
|
import k from "../../icon/v4/IconV4.vue.js";
|
|
11
12
|
import { useTableContext as y } from "../common/TableContext.js";
|
|
12
|
-
const
|
|
13
|
+
const U = /* @__PURE__ */ p({
|
|
13
14
|
__name: "DataGridMenu",
|
|
14
15
|
props: {
|
|
15
16
|
menuItems: { default: () => [] },
|
|
@@ -58,5 +59,5 @@ const T = /* @__PURE__ */ p({
|
|
|
58
59
|
}
|
|
59
60
|
});
|
|
60
61
|
export {
|
|
61
|
-
|
|
62
|
+
U as default
|
|
62
63
|
};
|
|
@@ -145,6 +145,7 @@ declare const DataGridTypes: () => (({
|
|
|
145
145
|
"onUpdate:selection"?: (selection: unknown[]) => any;
|
|
146
146
|
onOnClearSearch?: () => any;
|
|
147
147
|
onSelectRow?: (value: boolean) => any;
|
|
148
|
+
onClickRow?: (rowIndex: number) => any;
|
|
148
149
|
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "sort" | "title" | "search" | "testId" | "isLoading" | "searchAutoFocus" | "searchPlaceholder" | "selection" | "isSticky" | "sections" | "isStickyHeader" | "emptyStateTitle" | "emptyStateSubtitle" | "isInfiniteScroll" | "infiniteScrollThreshold" | "rowHeight" | "loadingRowCount" | "defaultScrollPosition" | "getRowId" | "selectedMatcher" | "emptyStateVariant" | "showSearch" | "zIndexBase">;
|
|
149
150
|
$attrs: {
|
|
150
151
|
[x: string]: unknown;
|
|
@@ -162,7 +163,7 @@ declare const DataGridTypes: () => (({
|
|
|
162
163
|
confirm: () => void;
|
|
163
164
|
rowIndex: number;
|
|
164
165
|
cellIndex: number;
|
|
165
|
-
}) => void) & ((event: "loadMore") => void) & ((event: "update:search", query: string) => void) & ((event: "update:selection", selection: unknown[]) => void) & ((event: "onClearSearch") => void) & ((event: "selectRow", value: boolean) => void);
|
|
166
|
+
}) => void) & ((event: "loadMore") => void) & ((event: "update:search", query: string) => void) & ((event: "update:selection", selection: unknown[]) => void) & ((event: "onClearSearch") => void) & ((event: "selectRow", value: boolean) => void) & ((event: "clickRow", rowIndex: number) => void);
|
|
166
167
|
$el: any;
|
|
167
168
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
168
169
|
sort: {
|
|
@@ -280,7 +281,10 @@ declare const DataGridTypes: () => (({
|
|
|
280
281
|
"onUpdate:selection"?: (selection: unknown[]) => any;
|
|
281
282
|
onOnClearSearch?: () => any;
|
|
282
283
|
onSelectRow?: (value: boolean) => any;
|
|
283
|
-
|
|
284
|
+
onClickRow?: (rowIndex: number) => any;
|
|
285
|
+
}, {
|
|
286
|
+
scrollTo: (index: number) => void;
|
|
287
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
284
288
|
"update:sort": (newSort: import("../common/Table.types").Sort) => void;
|
|
285
289
|
"update:search": (query: string) => void;
|
|
286
290
|
"update:selection": (selection: unknown[]) => void;
|
|
@@ -295,6 +299,7 @@ declare const DataGridTypes: () => (({
|
|
|
295
299
|
loadMore: () => void;
|
|
296
300
|
selectAll: (value: boolean) => void;
|
|
297
301
|
selectRow: (value: boolean) => void;
|
|
302
|
+
clickRow: (rowIndex: number) => void;
|
|
298
303
|
}, string, {
|
|
299
304
|
sort: import("../common/Table.types").Sort;
|
|
300
305
|
title: string;
|
|
@@ -455,7 +460,10 @@ declare const DataGridTypes: () => (({
|
|
|
455
460
|
"onUpdate:selection"?: (selection: unknown[]) => any;
|
|
456
461
|
onOnClearSearch?: () => any;
|
|
457
462
|
onSelectRow?: (value: boolean) => any;
|
|
458
|
-
|
|
463
|
+
onClickRow?: (rowIndex: number) => any;
|
|
464
|
+
} & import("vue").ShallowUnwrapRef<{
|
|
465
|
+
scrollTo: (index: number) => void;
|
|
466
|
+
}> & {} & import("vue").ComponentCustomProperties & {};
|
|
459
467
|
__isFragment?: never;
|
|
460
468
|
__isTeleport?: never;
|
|
461
469
|
__isSuspense?: never;
|
|
@@ -575,7 +583,10 @@ declare const DataGridTypes: () => (({
|
|
|
575
583
|
"onUpdate:selection"?: (selection: unknown[]) => any;
|
|
576
584
|
onOnClearSearch?: () => any;
|
|
577
585
|
onSelectRow?: (value: boolean) => any;
|
|
578
|
-
|
|
586
|
+
onClickRow?: (rowIndex: number) => any;
|
|
587
|
+
}, {
|
|
588
|
+
scrollTo: (index: number) => void;
|
|
589
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
579
590
|
"update:sort": (newSort: import("../common/Table.types").Sort) => void;
|
|
580
591
|
"update:search": (query: string) => void;
|
|
581
592
|
"update:selection": (selection: unknown[]) => void;
|
|
@@ -590,6 +601,7 @@ declare const DataGridTypes: () => (({
|
|
|
590
601
|
loadMore: () => void;
|
|
591
602
|
selectAll: (value: boolean) => void;
|
|
592
603
|
selectRow: (value: boolean) => void;
|
|
604
|
+
clickRow: (rowIndex: number) => void;
|
|
593
605
|
}, string, {
|
|
594
606
|
sort: import("../common/Table.types").Sort;
|
|
595
607
|
title: string;
|