@ironsource/shared-ui 2.0.1 → 2.0.2-rc.0
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_9cc6b34e_lang.css +1 -0
- package/DataGridRowsCounter.vue_vue_type_style_index_0_scoped_9e366543_lang.css +1 -0
- package/components/table/v4/DataGrid.vue.d.ts +1 -0
- package/components/table/v4/DataGrid.vue.js +3 -3
- package/components/table/v4/DataGrid.vue2.js +162 -150
- package/components/table/v4/DataGridRowsCounter.vue.js +3 -3
- package/components/table/v4/DataGridRowsCounter.vue2.js +13 -7
- package/components/table/v4/index.d.ts +1 -0
- package/index.d.ts +2 -0
- package/package.json +1 -1
- package/DataGrid.vue_vue_type_style_index_0_scoped_4e432056_lang.css +0 -1
- package/DataGridRowsCounter.vue_vue_type_style_index_0_scoped_11c1bb3f_lang.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.sticky[data-v-9cc6b34e]{position:sticky}.table-container[data-v-9cc6b34e]{width:100%;position:relative;display:flex;flex-direction:column}.table-header[data-v-9cc6b34e]{display:flex;align-items:center;height:calc(var(--spacing-800) - 1px);border-bottom:1px solid var(--common-divider);background-color:var(--background-paper-elevation-0);position:sticky;left:0;padding:var(--spacing-300)}.table-header .table-title[data-v-9cc6b34e]{display:flex;flex:1;align-items:center;justify-content:flex-start;height:100%;color:var(--text-primary)}.table-header .table-header-right[data-v-9cc6b34e]{display:flex;align-items:center;height:100%}.table-header .search-wrapper[data-v-9cc6b34e]{width:13.75rem}.table-header.isStickyHeader[data-v-9cc6b34e]{z-index:calc(var(--b72a9fc4) + 3);top:0}.table-head-container[data-v-9cc6b34e]{display:flex;align-items:center;white-space:nowrap;color:var(--text-primary)}.table-footer[data-v-9cc6b34e]{color:var(--text-primary);background-color:var(--background-paper-elevation-0);padding:0 var(--spacing-300);display:flex;align-items:center;min-height:var(--spacing-600);border:1px solid var(--common-divider);border-radius:var(--border-radius-md);border-top-right-radius:0;border-top-left-radius:0}.table-body-wrapper[data-v-9cc6b34e]{display:inline-table}.table-header-actions[data-v-9cc6b34e]{margin-left:var(--spacing-100);display:flex;align-items:center}.table-row[data-v-9cc6b34e]{position:relative}.table-row.loading[data-v-9cc6b34e]{opacity:.7}.table-row:not(.expanded):last-child>td[data-v-9cc6b34e]{border-bottom:none}.table-row.expanded:last-child>.expanded-row[data-v-9cc6b34e]{border-bottom:none}.expanded-row[data-v-9cc6b34e]{grid-column:var(--30b75412);border-bottom:1px solid var(--common-divider);background-color:var(--background-default)}table[data-v-9cc6b34e]{position:relative;display:block;overflow:auto;background:var(--background-paper-elevation-0);border:1px solid var(--common-divider);color:var(--text-primary);text-align:left;table-layout:fixed;width:100%;max-height:100%;border-radius:var(--border-radius-md)}table.hasFooter[data-v-9cc6b34e]{border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom:none}table td[data-v-9cc6b34e],table th[data-v-9cc6b34e]{line-height:normal;padding:0 var(--spacing-200)}table td[data-v-9cc6b34e]:first-of-type,table th[data-v-9cc6b34e]:first-of-type{padding-left:var(--spacing-300)}table td[data-v-9cc6b34e]:last-of-type,table th[data-v-9cc6b34e]:last-of-type{padding-right:var(--spacing-300)}table td.expand-toggle-cell[data-v-9cc6b34e],table th.expand-toggle-cell[data-v-9cc6b34e]{padding-left:var(--spacing-150);padding-right:var(--spacing-75)}table>thead[data-v-9cc6b34e]{border-bottom:none;z-index:calc(var(--b72a9fc4) + 1);display:inline-table;min-width:100%}table>thead>tr[data-v-9cc6b34e]{color:var(--text-primary);border-bottom:1px solid var(--common-divider);height:var(--spacing-500);display:grid;grid-template-columns:var(--b002aaea)}table>thead>tr>th[data-v-9cc6b34e]{background:var(--background-paper-elevation-0);width:100%;display:flex;align-items:center;cursor:default}table>thead>tr>th.bordered[data-v-9cc6b34e]{border-right:1px solid var(--common-divider)}table>thead>tr>th.bordered.isStickyRight[data-v-9cc6b34e]{border-right:none;border-left:1px solid var(--common-divider)}table>thead>tr>th.isTextRight[data-v-9cc6b34e]{justify-content:flex-end}table>thead>tr>th.isSortable[data-v-9cc6b34e]{cursor:pointer}table>thead.sticky[data-v-9cc6b34e]{position:sticky;top:0;background:white}table>thead.isStickyHeader[data-v-9cc6b34e]{z-index:calc(var(--b72a9fc4) + 2);top:calc(var(--spacing-800) - 1px)}table>tbody[data-v-9cc6b34e]{display:block}table>tbody>*>tr[data-v-9cc6b34e]{background-color:var(--background-default);min-height:var(--2e048053);height:auto;display:grid;align-items:center;grid-template-columns:var(--b002aaea)}table>tbody>*>tr:nth-of-type(2n)>td[data-v-9cc6b34e]{background-color:var(--background-default)}table>tbody>*>tr:hover:not(.loading)>td[data-v-9cc6b34e]{background-color:var(--background-paper-elevation-1)}table>tbody td[data-v-9cc6b34e]{background-color:var(--background-default);border:none;min-width:0;display:flex;min-height:var(--2e048053);height:auto;width:100%;place-items:center;border-bottom:1px solid var(--common-divider);justify-content:start}table>tbody td.bordered[data-v-9cc6b34e]{border-right:1px solid var(--common-divider)}table>tbody td.bordered.isStickyRight[data-v-9cc6b34e]{border-right:none;border-left:1px solid var(--common-divider)}table>tbody td.isTextRight[data-v-9cc6b34e]{justify-content:flex-end;text-align:right}.section-container[data-v-9cc6b34e]{left:0}.sections[data-v-9cc6b34e]{display:flex}.section[data-v-9cc6b34e]{padding:0 1.5rem;background:var(--background-default);left:0;height:32px;display:flex;align-items:flex-end;border-right:1px solid var(--common-divider)}.table-cell[data-v-9cc6b34e]{width:100%}.empty-state[data-v-9cc6b34e]{min-height:250px}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.data-grid-rows-counter[data-v-9e366543]{color:var(--text-secondary)}.text-strong[data-v-9e366543]{color:var(--text-primary)}
|
|
@@ -154,6 +154,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
154
154
|
title?(_: {}): any;
|
|
155
155
|
search?(_: {}): any;
|
|
156
156
|
"table-header-actions"?(_: {}): any;
|
|
157
|
+
"select-all-checkbox"?(_: {}): any;
|
|
157
158
|
loader?(_: {}): any;
|
|
158
159
|
expanded?(_: {
|
|
159
160
|
row: import("@vueuse/core").UseVirtualListItem<Row>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./DataGrid.vue2.js";
|
|
2
2
|
/* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../../DataGrid.
|
|
4
|
-
const
|
|
3
|
+
// import "../../../DataGrid.vue_vue_type_style_index_0_scoped_9cc6b34e_lang.css"; //*');
|
|
4
|
+
const s = /* @__PURE__ */ e(o, [["__scopeId", "data-v-9cc6b34e"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
s as default
|
|
7
7
|
};
|
|
@@ -1,27 +1,33 @@
|
|
|
1
|
-
import "../../../DataGrid.
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import "../../../DataGrid.vue_vue_type_style_index_0_scoped_9cc6b34e_lang.css"; import { defineComponent as ee, useCssVars as te, unref as e, useSlots as se, computed as g, openBlock as i, createElementBlock as l, createElementVNode as r, normalizeStyle as R, normalizeClass as y, renderSlot as n, createVNode as u, withCtx as T, createTextVNode as C, toDisplayString as E, isRef as ae, createCommentVNode as h, Fragment as x, renderList as B, createBlock as ie, mergeProps as le } from "vue";
|
|
2
|
+
import V from "../../typography/v4/Typography.vue.js";
|
|
3
|
+
import de from "../../skeleton/v4/SkeletonV4.vue.js";
|
|
4
|
+
import oe from "../../emptyState/v4/EmptyStateV4.vue.js";
|
|
5
|
+
import U from "../../checkbox/v4/CheckboxV4.vue.js";
|
|
6
6
|
import { TableTestIdModifiers as f } from "../../../testids/index.js";
|
|
7
|
-
import { tableCommon as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { useVModel as
|
|
12
|
-
const
|
|
7
|
+
import { tableCommon as ne } from "../common/Table.common.js";
|
|
8
|
+
import ce from "./SortIcon.vue.js";
|
|
9
|
+
import re from "./ExpandRowToggle.vue.js";
|
|
10
|
+
import ue from "../../search/v4/SearchV4.vue.js";
|
|
11
|
+
import { useVModel as he } from "@vueuse/core";
|
|
12
|
+
const ye = ["data-testid"], fe = ["data-testid"], Se = ["data-testid"], ke = ["data-testid"], me = ["data-testid"], ge = { class: "search-wrapper" }, be = ["data-testid"], ve = ["data-testid"], $e = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "checkbox-cell"
|
|
15
|
+
}, Re = {
|
|
13
16
|
key: 1,
|
|
14
17
|
class: "expand-toggle-cell"
|
|
15
|
-
},
|
|
18
|
+
}, Te = ["onClick"], Ce = { class: "table-head-container" }, Ee = ["data-testid"], xe = ["onMouseenter"], Be = {
|
|
19
|
+
key: 0,
|
|
20
|
+
class: "checkbox-cell"
|
|
21
|
+
}, Ve = {
|
|
16
22
|
key: 1,
|
|
17
23
|
class: "expand-toggle-cell"
|
|
18
|
-
},
|
|
24
|
+
}, we = {
|
|
19
25
|
key: 2,
|
|
20
26
|
class: "expanded-row"
|
|
21
|
-
},
|
|
27
|
+
}, Ie = { key: 1 }, Pe = {
|
|
22
28
|
key: 0,
|
|
23
29
|
class: "table-footer"
|
|
24
|
-
},
|
|
30
|
+
}, pe = /* @__PURE__ */ ee({
|
|
25
31
|
__name: "DataGrid",
|
|
26
32
|
props: {
|
|
27
33
|
title: { default: "" },
|
|
@@ -30,7 +36,7 @@ const yt = ["data-testid"], ft = ["data-testid"], St = ["data-testid"], kt = ["d
|
|
|
30
36
|
sections: { default: null },
|
|
31
37
|
sort: { default: null },
|
|
32
38
|
selection: { default: null },
|
|
33
|
-
getRowId: { type: Function, default: (
|
|
39
|
+
getRowId: { type: Function, default: (s, S) => S },
|
|
34
40
|
isSticky: { type: Boolean, default: !0 },
|
|
35
41
|
isStickyHeader: { type: Boolean, default: !1 },
|
|
36
42
|
isLoading: { type: Boolean, default: !1 },
|
|
@@ -50,19 +56,19 @@ const yt = ["data-testid"], ft = ["data-testid"], St = ["data-testid"], kt = ["d
|
|
|
50
56
|
zIndexBase: { default: 100 }
|
|
51
57
|
},
|
|
52
58
|
emits: ["update:sort", "update:search", "update:selection", "onScroll", "saveRow", "loadMore"],
|
|
53
|
-
setup(
|
|
54
|
-
const o =
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"
|
|
58
|
-
|
|
59
|
-
"
|
|
59
|
+
setup(s, { emit: S }) {
|
|
60
|
+
const o = s;
|
|
61
|
+
te((a) => ({
|
|
62
|
+
b72a9fc4: s.zIndexBase,
|
|
63
|
+
"30b75412": e(J),
|
|
64
|
+
b002aaea: e(H),
|
|
65
|
+
"2e048053": e(q)
|
|
60
66
|
}));
|
|
61
|
-
const
|
|
67
|
+
const b = se(), {
|
|
62
68
|
list: A,
|
|
63
|
-
containerProps:
|
|
64
|
-
wrapperProps:
|
|
65
|
-
activeRow:
|
|
69
|
+
containerProps: G,
|
|
70
|
+
wrapperProps: p,
|
|
71
|
+
activeRow: w,
|
|
66
72
|
gridColumnTemplate: H,
|
|
67
73
|
toggleSortOrder: Y,
|
|
68
74
|
columnsStickyPositions: L,
|
|
@@ -70,232 +76,238 @@ const yt = ["data-testid"], ft = ["data-testid"], St = ["data-testid"], kt = ["d
|
|
|
70
76
|
containerStyle: W,
|
|
71
77
|
onScroll: N,
|
|
72
78
|
savingRows: F,
|
|
73
|
-
hasExpandSlot:
|
|
79
|
+
hasExpandSlot: v,
|
|
74
80
|
toggleExpandRow: j,
|
|
75
81
|
cssRowHeight: q,
|
|
76
82
|
cssExpandGridCol: J,
|
|
77
|
-
isRowExpanded:
|
|
83
|
+
isRowExpanded: I,
|
|
78
84
|
hasCheckboxes: M
|
|
79
|
-
} =
|
|
80
|
-
|
|
85
|
+
} = ne(o, S), O = g(() => !!b.footer), k = he(o, "search", S), z = g(() => o.selection.length || 0), P = g(
|
|
86
|
+
() => o.rows.length && z.value === o.rows.length
|
|
87
|
+
), D = (a) => o.selection.includes(a), K = (a) => {
|
|
88
|
+
D(a) ? $(o.selection.filter((c) => c !== a)) : $([...o.selection, a]);
|
|
81
89
|
}, X = () => {
|
|
82
|
-
|
|
83
|
-
}, $ = (
|
|
84
|
-
S("update:selection",
|
|
90
|
+
P.value ? $([]) : $(o.rows.map((a, c) => o.getRowId(a, c)));
|
|
91
|
+
}, $ = (a) => {
|
|
92
|
+
S("update:selection", a);
|
|
85
93
|
}, Z = g(
|
|
86
94
|
() => o.emptyStateVariant ?? (k.value ? "no-results" : "no-data")
|
|
87
95
|
), _ = g(
|
|
88
96
|
() => o.emptyStateSubtitle ? o.emptyStateSubtitle : k.value ? "Search again with different filters" : void 0
|
|
89
97
|
);
|
|
90
|
-
return (
|
|
98
|
+
return (a, c) => (i(), l("div", {
|
|
91
99
|
class: "table-container",
|
|
92
|
-
"data-testid": `${
|
|
93
|
-
onMouseleave:
|
|
100
|
+
"data-testid": `${s.testId}-${e(f).CONTAINER}`,
|
|
101
|
+
onMouseleave: c[2] || (c[2] = (t) => w.value = null)
|
|
94
102
|
}, [
|
|
95
103
|
r("table", {
|
|
96
|
-
ref:
|
|
97
|
-
style: R(
|
|
104
|
+
ref: e(G).ref,
|
|
105
|
+
style: R(e(W)),
|
|
98
106
|
class: y({
|
|
99
|
-
hasFooter:
|
|
107
|
+
hasFooter: e(O)
|
|
100
108
|
}),
|
|
101
|
-
"data-testid": `${
|
|
102
|
-
onScrollPassive:
|
|
103
|
-
(...
|
|
109
|
+
"data-testid": `${s.testId}-${e(f).TABLE}`,
|
|
110
|
+
onScrollPassive: c[1] || (c[1] = //@ts-ignore
|
|
111
|
+
(...t) => e(N) && e(N)(...t))
|
|
104
112
|
}, [
|
|
105
|
-
|
|
113
|
+
s.title || e(b).title || e(Q) || e(b)["table-header-actions"] ? (i(), l("div", {
|
|
106
114
|
key: 0,
|
|
107
|
-
class: y(["table-header", { isStickyHeader:
|
|
108
|
-
"data-testid": `${
|
|
115
|
+
class: y(["table-header", { isStickyHeader: s.isStickyHeader }]),
|
|
116
|
+
"data-testid": `${s.testId}-${e(f).HEADER}`
|
|
109
117
|
}, [
|
|
110
118
|
r("div", {
|
|
111
119
|
class: "table-title",
|
|
112
|
-
"data-testid": `${
|
|
120
|
+
"data-testid": `${s.testId}-${e(f).TITLE}`
|
|
113
121
|
}, [
|
|
114
|
-
|
|
115
|
-
u(
|
|
122
|
+
n(a.$slots, "title", {}, () => [
|
|
123
|
+
u(e(V), { variant: "h3" }, {
|
|
116
124
|
default: T(() => [
|
|
117
|
-
C(E(
|
|
125
|
+
C(E(s.title), 1)
|
|
118
126
|
]),
|
|
119
127
|
_: 1
|
|
120
128
|
})
|
|
121
129
|
], !0)
|
|
122
|
-
], 8,
|
|
130
|
+
], 8, ke),
|
|
123
131
|
r("div", {
|
|
124
132
|
class: "table-header-right",
|
|
125
|
-
"data-testid": `${
|
|
133
|
+
"data-testid": `${s.testId}-${e(f).HEADER_RIGHT}`
|
|
126
134
|
}, [
|
|
127
|
-
|
|
128
|
-
r("div",
|
|
129
|
-
u(
|
|
130
|
-
modelValue:
|
|
131
|
-
"onUpdate:modelValue":
|
|
132
|
-
placeholder:
|
|
133
|
-
"auto-focus":
|
|
134
|
-
"test-id":
|
|
135
|
+
s.showSearch ? n(a.$slots, "search", { key: 0 }, () => [
|
|
136
|
+
r("div", ge, [
|
|
137
|
+
u(e(ue), {
|
|
138
|
+
modelValue: e(k),
|
|
139
|
+
"onUpdate:modelValue": c[0] || (c[0] = (t) => ae(k) ? k.value = t : null),
|
|
140
|
+
placeholder: s.searchPlaceholder,
|
|
141
|
+
"auto-focus": s.searchAutoFocus,
|
|
142
|
+
"test-id": s.testId
|
|
135
143
|
}, null, 8, ["modelValue", "placeholder", "auto-focus", "test-id"])
|
|
136
144
|
])
|
|
137
145
|
], !0) : h("", !0)
|
|
138
|
-
], 8,
|
|
139
|
-
|
|
146
|
+
], 8, me),
|
|
147
|
+
e(b)["table-header-actions"] ? (i(), l("div", {
|
|
140
148
|
key: 0,
|
|
141
149
|
class: "table-header-actions",
|
|
142
|
-
"data-testid": `${
|
|
150
|
+
"data-testid": `${s.testId}-${e(f).ACTIONS}`
|
|
143
151
|
}, [
|
|
144
|
-
|
|
145
|
-
], 8,
|
|
146
|
-
], 10,
|
|
152
|
+
n(a.$slots, "table-header-actions", {}, void 0, !0)
|
|
153
|
+
], 8, be)) : h("", !0)
|
|
154
|
+
], 10, Se)) : h("", !0),
|
|
147
155
|
r("thead", {
|
|
148
|
-
class: y({ sticky:
|
|
156
|
+
class: y({ sticky: s.isSticky, isStickyHeader: s.isStickyHeader })
|
|
149
157
|
}, [
|
|
150
158
|
r("div", {
|
|
151
159
|
class: "sections",
|
|
152
|
-
"data-testid": `${
|
|
160
|
+
"data-testid": `${s.testId}-${e(f).SECTIONS}`
|
|
153
161
|
}, [
|
|
154
|
-
(i(!0), l(x, null, B(
|
|
155
|
-
key:
|
|
156
|
-
class: y(["section-container", { sticky:
|
|
162
|
+
(i(!0), l(x, null, B(s.sections, (t) => (i(), l("div", {
|
|
163
|
+
key: t.id,
|
|
164
|
+
class: y(["section-container", { sticky: t.isSticky }])
|
|
157
165
|
}, [
|
|
158
|
-
|
|
166
|
+
n(a.$slots, `section-${t.id}`, {}, () => [
|
|
159
167
|
r("div", {
|
|
160
|
-
style: R({ width:
|
|
168
|
+
style: R({ width: t.width + "px" }),
|
|
161
169
|
class: y({ section: !0 })
|
|
162
170
|
}, [
|
|
163
|
-
u(
|
|
171
|
+
u(e(V), { variant: "body2" }, {
|
|
164
172
|
default: T(() => [
|
|
165
|
-
C(E(
|
|
173
|
+
C(E(t.title), 1)
|
|
166
174
|
]),
|
|
167
175
|
_: 2
|
|
168
176
|
}, 1024)
|
|
169
177
|
], 4)
|
|
170
178
|
], !0)
|
|
171
179
|
], 2))), 128))
|
|
172
|
-
], 8,
|
|
180
|
+
], 8, ve),
|
|
173
181
|
r("tr", null, [
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
182
|
+
e(M) ? (i(), l("th", $e, [
|
|
183
|
+
n(a.$slots, "select-all-checkbox", {}, () => [
|
|
184
|
+
u(e(U), {
|
|
185
|
+
"is-checked": e(P),
|
|
186
|
+
"is-indeterminate": !e(P) && e(z) > 0,
|
|
187
|
+
"onUpdate:isChecked": X
|
|
188
|
+
}, null, 8, ["is-checked", "is-indeterminate"])
|
|
189
|
+
], !0)
|
|
180
190
|
])) : h("", !0),
|
|
181
|
-
|
|
182
|
-
(i(!0), l(x, null, B(
|
|
183
|
-
key:
|
|
191
|
+
e(v) ? (i(), l("th", Re)) : h("", !0),
|
|
192
|
+
(i(!0), l(x, null, B(s.columns, (t) => (i(), l("th", {
|
|
193
|
+
key: t.id,
|
|
184
194
|
class: y({
|
|
185
|
-
sticky:
|
|
186
|
-
isStickyRight:
|
|
187
|
-
bordered:
|
|
188
|
-
isTextRight:
|
|
189
|
-
isSortable:
|
|
195
|
+
sticky: t.isSticky,
|
|
196
|
+
isStickyRight: t.isStickyRight,
|
|
197
|
+
bordered: t.isBordered,
|
|
198
|
+
isTextRight: t.isTextRight,
|
|
199
|
+
isSortable: t.isSortable,
|
|
200
|
+
[`column-${t.id}`]: !0
|
|
190
201
|
}),
|
|
191
|
-
style: R(
|
|
192
|
-
onClick: (m) =>
|
|
202
|
+
style: R(t.isSticky ? e(L)[t.id] : null),
|
|
203
|
+
onClick: (m) => t.isSortable ? e(Y)(t) : null
|
|
193
204
|
}, [
|
|
194
|
-
r("div",
|
|
195
|
-
|
|
196
|
-
u(
|
|
205
|
+
r("div", Ce, [
|
|
206
|
+
n(a.$slots, `header-${t.id}`, { column: t }, () => [
|
|
207
|
+
u(e(V), { variant: "tableLabel" }, {
|
|
197
208
|
default: T(() => [
|
|
198
|
-
C(E(
|
|
209
|
+
C(E(t.title), 1)
|
|
199
210
|
]),
|
|
200
211
|
_: 2
|
|
201
212
|
}, 1024)
|
|
202
213
|
], !0),
|
|
203
|
-
|
|
214
|
+
t.isSortable && t.id === s.sort?.sortBy ? (i(), ie(ce, {
|
|
204
215
|
key: 0,
|
|
205
|
-
"sort-order":
|
|
216
|
+
"sort-order": s.sort.sortOrder
|
|
206
217
|
}, null, 8, ["sort-order"])) : h("", !0)
|
|
207
218
|
])
|
|
208
|
-
], 14,
|
|
219
|
+
], 14, Te))), 128))
|
|
209
220
|
])
|
|
210
221
|
], 2),
|
|
211
222
|
r("tbody", null, [
|
|
212
|
-
|
|
223
|
+
e(A).length > 0 ? (i(), l("div", le({
|
|
213
224
|
key: 0,
|
|
214
225
|
class: "table-body-wrapper",
|
|
215
|
-
"data-testid": `${
|
|
216
|
-
},
|
|
217
|
-
(i(!0), l(x, null, B(
|
|
218
|
-
key:
|
|
226
|
+
"data-testid": `${s.testId}-${e(f).BODY_WRAPPER}`
|
|
227
|
+
}, e(p)), [
|
|
228
|
+
(i(!0), l(x, null, B(e(A), (t) => (i(), l("tr", {
|
|
229
|
+
key: t.index,
|
|
219
230
|
class: y(["table-row", {
|
|
220
|
-
loading:
|
|
221
|
-
active:
|
|
222
|
-
expanded:
|
|
231
|
+
loading: s.isLoading || s.isLoading && !t.data || e(F).includes(t.index),
|
|
232
|
+
active: e(w) === t.index,
|
|
233
|
+
expanded: e(v) && e(I)(t.index)
|
|
223
234
|
}]),
|
|
224
|
-
onMouseenter: (m) =>
|
|
235
|
+
onMouseenter: (m) => w.value = t.index
|
|
225
236
|
}, [
|
|
226
|
-
|
|
227
|
-
u(
|
|
228
|
-
"is-checked": D(
|
|
237
|
+
e(M) ? (i(), l("td", Be, [
|
|
238
|
+
u(e(U), {
|
|
239
|
+
"is-checked": D(s.getRowId(t.data, t.index)),
|
|
229
240
|
size: "sm",
|
|
230
|
-
"onUpdate:isChecked": (m) => K(
|
|
241
|
+
"onUpdate:isChecked": (m) => K(s.getRowId(t.data, t.index))
|
|
231
242
|
}, null, 8, ["is-checked", "onUpdate:isChecked"])
|
|
232
243
|
])) : h("", !0),
|
|
233
|
-
|
|
234
|
-
u(
|
|
235
|
-
expanded:
|
|
236
|
-
onClick: (m) =>
|
|
244
|
+
e(v) ? (i(), l("td", Ve, [
|
|
245
|
+
u(re, {
|
|
246
|
+
expanded: e(I)(t.index),
|
|
247
|
+
onClick: (m) => e(j)(t.index, m)
|
|
237
248
|
}, null, 8, ["expanded", "onClick"])
|
|
238
249
|
])) : h("", !0),
|
|
239
|
-
(i(!0), l(x, null, B(
|
|
250
|
+
(i(!0), l(x, null, B(s.columns, (m, d) => (i(), l("td", {
|
|
240
251
|
key: d,
|
|
241
252
|
class: y({
|
|
242
|
-
sticky:
|
|
243
|
-
isStickyRight:
|
|
244
|
-
bordered:
|
|
245
|
-
isTextRight:
|
|
253
|
+
sticky: s.columns[d].isSticky,
|
|
254
|
+
isStickyRight: s.columns[d].isStickyRight,
|
|
255
|
+
bordered: s.columns[d].isBordered,
|
|
256
|
+
isTextRight: s.columns[d].isTextRight,
|
|
257
|
+
[`column-${s.columns[d].id}`]: !0
|
|
246
258
|
}),
|
|
247
259
|
style: R(
|
|
248
|
-
|
|
260
|
+
s.columns[d].isSticky ? e(L)[s.columns[d].id] : null
|
|
249
261
|
)
|
|
250
262
|
}, [
|
|
251
|
-
!
|
|
263
|
+
!s.isLoading || s.isLoading && t.data[d] ? (i(), l("div", {
|
|
252
264
|
key: 0,
|
|
253
|
-
class: y(["table-cell", { last: d ===
|
|
265
|
+
class: y(["table-cell", { last: d === t.data.length - 1 }])
|
|
254
266
|
}, [
|
|
255
|
-
|
|
256
|
-
cell:
|
|
257
|
-
isLoading:
|
|
267
|
+
n(a.$slots, `cell-${s.columns[d].id}`, {
|
|
268
|
+
cell: t.data[d],
|
|
269
|
+
isLoading: e(F).includes(t.index),
|
|
258
270
|
cellIndex: d,
|
|
259
|
-
row:
|
|
260
|
-
rowIndex:
|
|
271
|
+
row: t,
|
|
272
|
+
rowIndex: t.index
|
|
261
273
|
}, () => [
|
|
262
|
-
u(
|
|
274
|
+
u(e(V), { variant: "body1" }, {
|
|
263
275
|
default: T(() => [
|
|
264
|
-
C(E(
|
|
276
|
+
C(E(t.data[d]), 1)
|
|
265
277
|
]),
|
|
266
278
|
_: 2
|
|
267
279
|
}, 1024)
|
|
268
280
|
], !0)
|
|
269
|
-
], 2)) :
|
|
270
|
-
u(
|
|
281
|
+
], 2)) : n(a.$slots, "loader", { key: 1 }, () => [
|
|
282
|
+
u(e(de), { round: "" })
|
|
271
283
|
], !0)
|
|
272
284
|
], 6))), 128)),
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
row:
|
|
276
|
-
gridColumnTemplate:
|
|
285
|
+
e(v) && e(I)(t.index) ? (i(), l("div", we, [
|
|
286
|
+
n(a.$slots, "expanded", {
|
|
287
|
+
row: t,
|
|
288
|
+
gridColumnTemplate: e(H)
|
|
277
289
|
}, void 0, !0)
|
|
278
290
|
])) : h("", !0)
|
|
279
|
-
], 42,
|
|
280
|
-
], 16,
|
|
281
|
-
|
|
282
|
-
u(
|
|
291
|
+
], 42, xe))), 128))
|
|
292
|
+
], 16, Ee)) : (i(), l("div", Ie, [
|
|
293
|
+
n(a.$slots, "empty-state", {}, () => [
|
|
294
|
+
u(e(oe), {
|
|
283
295
|
class: "empty-state",
|
|
284
|
-
title:
|
|
285
|
-
subtitle:
|
|
286
|
-
variant:
|
|
287
|
-
"test-id": `${
|
|
296
|
+
title: s.emptyStateTitle,
|
|
297
|
+
subtitle: e(_),
|
|
298
|
+
variant: e(Z),
|
|
299
|
+
"test-id": `${s.testId}-${e(f).EMPTY_STATE}`
|
|
288
300
|
}, null, 8, ["title", "subtitle", "variant", "test-id"])
|
|
289
301
|
], !0)
|
|
290
302
|
]))
|
|
291
303
|
])
|
|
292
|
-
], 46,
|
|
293
|
-
|
|
294
|
-
|
|
304
|
+
], 46, fe),
|
|
305
|
+
e(O) ? (i(), l("div", Pe, [
|
|
306
|
+
n(a.$slots, "footer", {}, void 0, !0)
|
|
295
307
|
])) : h("", !0)
|
|
296
|
-
], 40,
|
|
308
|
+
], 40, ye));
|
|
297
309
|
}
|
|
298
310
|
});
|
|
299
311
|
export {
|
|
300
|
-
|
|
312
|
+
pe as default
|
|
301
313
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./DataGridRowsCounter.vue2.js";
|
|
2
|
-
/* empty css */import
|
|
3
|
-
// import "../../../DataGridRowsCounter.
|
|
4
|
-
const r = /* @__PURE__ */
|
|
2
|
+
/* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
// import "../../../DataGridRowsCounter.vue_vue_type_style_index_0_scoped_9e366543_lang.css"; //*');
|
|
4
|
+
const r = /* @__PURE__ */ e(o, [["__scopeId", "data-v-9e366543"]]);
|
|
5
5
|
export {
|
|
6
6
|
r as default
|
|
7
7
|
};
|
|
@@ -1,26 +1,32 @@
|
|
|
1
|
-
import "../../../DataGridRowsCounter.
|
|
1
|
+
import "../../../DataGridRowsCounter.vue_vue_type_style_index_0_scoped_9e366543_lang.css"; import { defineComponent as l, openBlock as u, createElementBlock as i, createVNode as e, unref as o, withCtx as a, createTextVNode as t, toDisplayString as s } from "vue";
|
|
2
2
|
import r from "../../typography/v4/Typography.vue.js";
|
|
3
|
-
const
|
|
3
|
+
const c = { class: "data-grid-rows-counter" }, m = /* @__PURE__ */ l({
|
|
4
4
|
__name: "DataGridRowsCounter",
|
|
5
5
|
props: {
|
|
6
6
|
count: { default: 0 },
|
|
7
7
|
totalCount: { default: 0 }
|
|
8
8
|
},
|
|
9
9
|
setup(n) {
|
|
10
|
-
return (
|
|
10
|
+
return (d, f) => (u(), i("div", c, [
|
|
11
11
|
e(o(r), { variant: "body2" }, {
|
|
12
12
|
default: a(() => [
|
|
13
13
|
t(" Displaying "),
|
|
14
|
-
e(o(r), {
|
|
14
|
+
e(o(r), {
|
|
15
|
+
class: "text-strong",
|
|
16
|
+
variant: "subtitle2"
|
|
17
|
+
}, {
|
|
15
18
|
default: a(() => [
|
|
16
|
-
t(
|
|
19
|
+
t(s(n.count), 1)
|
|
17
20
|
]),
|
|
18
21
|
_: 1
|
|
19
22
|
}),
|
|
20
23
|
t(" out of "),
|
|
21
|
-
e(o(r), {
|
|
24
|
+
e(o(r), {
|
|
25
|
+
class: "text-strong",
|
|
26
|
+
variant: "subtitle2"
|
|
27
|
+
}, {
|
|
22
28
|
default: a(() => [
|
|
23
|
-
t(
|
|
29
|
+
t(s(n.totalCount), 1)
|
|
24
30
|
]),
|
|
25
31
|
_: 1
|
|
26
32
|
}),
|
|
@@ -590,6 +590,7 @@ declare const DataGridTypes: () => (({
|
|
|
590
590
|
title?(_: {}): any;
|
|
591
591
|
search?(_: {}): any;
|
|
592
592
|
"table-header-actions"?(_: {}): any;
|
|
593
|
+
"select-all-checkbox"?(_: {}): any;
|
|
593
594
|
loader?(_: {}): any;
|
|
594
595
|
expanded?(_: {
|
|
595
596
|
row: import("@vueuse/core").UseVirtualListItem<import("../common/Table.types").Row>;
|
package/index.d.ts
CHANGED
|
@@ -2339,6 +2339,7 @@ declare const _default: {
|
|
|
2339
2339
|
title?(_: {}): any;
|
|
2340
2340
|
search?(_: {}): any;
|
|
2341
2341
|
"table-header-actions"?(_: {}): any;
|
|
2342
|
+
"select-all-checkbox"?(_: {}): any;
|
|
2342
2343
|
loader?(_: {}): any;
|
|
2343
2344
|
expanded?(_: {
|
|
2344
2345
|
row: import("@vueuse/core").UseVirtualListItem<import("./components/table/common/Table.types").Row>;
|
|
@@ -2987,6 +2988,7 @@ declare const _default: {
|
|
|
2987
2988
|
title?(_: {}): any;
|
|
2988
2989
|
search?(_: {}): any;
|
|
2989
2990
|
"table-header-actions"?(_: {}): any;
|
|
2991
|
+
"select-all-checkbox"?(_: {}): any;
|
|
2990
2992
|
loader?(_: {}): any;
|
|
2991
2993
|
expanded?(_: {
|
|
2992
2994
|
row: import("@vueuse/core").UseVirtualListItem<import("./components/table/common/Table.types").Row>;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.sticky[data-v-4e432056]{position:sticky}.table-container[data-v-4e432056]{width:100%;position:relative;display:flex;flex-direction:column}.table-header[data-v-4e432056]{display:flex;align-items:center;height:calc(var(--spacing-800) - 1px);border-bottom:1px solid var(--common-divider);background-color:var(--background-paper-elevation-0);position:sticky;left:0;padding:var(--spacing-300)}.table-header .table-title[data-v-4e432056]{display:flex;flex:1;align-items:center;justify-content:flex-start;height:100%;color:var(--text-primary)}.table-header .table-header-right[data-v-4e432056]{display:flex;align-items:center;height:100%}.table-header .search-wrapper[data-v-4e432056]{width:13.75rem}.table-header.isStickyHeader[data-v-4e432056]{z-index:calc(var(--f7be0d24) + 3);top:0}.table-head-container[data-v-4e432056]{display:flex;align-items:center;white-space:nowrap;color:var(--text-primary)}.table-footer[data-v-4e432056]{color:var(--text-primary);background-color:var(--background-paper-elevation-0);padding:0 var(--spacing-300);display:flex;align-items:center;min-height:var(--spacing-600);border:1px solid var(--common-divider);border-radius:var(--border-radius-md);border-top-right-radius:0;border-top-left-radius:0}.table-body-wrapper[data-v-4e432056]{display:inline-table}.table-header-actions[data-v-4e432056]{margin-left:var(--spacing-100);display:flex;align-items:center}.table-row[data-v-4e432056]{position:relative}.table-row.loading[data-v-4e432056]{opacity:.7}.table-row:not(.expanded):last-child>td[data-v-4e432056]{border-bottom:none}.table-row.expanded:last-child>.expanded-row[data-v-4e432056]{border-bottom:none}.expanded-row[data-v-4e432056]{grid-column:var(--1ec56162);border-bottom:1px solid var(--common-divider);background-color:var(--background-default)}table[data-v-4e432056]{position:relative;display:block;overflow:auto;background:var(--background-paper-elevation-0);border:1px solid var(--common-divider);color:var(--text-primary);text-align:left;table-layout:fixed;width:100%;max-height:100%;border-radius:var(--border-radius-md)}table.hasFooter[data-v-4e432056]{border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom:none}table td[data-v-4e432056],table th[data-v-4e432056]{line-height:normal;padding:0 var(--spacing-200)}table td[data-v-4e432056]:first-of-type,table th[data-v-4e432056]:first-of-type{padding-left:var(--spacing-300)}table td[data-v-4e432056]:last-of-type,table th[data-v-4e432056]:last-of-type{padding-right:var(--spacing-300)}table td.expand-toggle-cell[data-v-4e432056],table th.expand-toggle-cell[data-v-4e432056]{padding-left:var(--spacing-150);padding-right:var(--spacing-75)}table>thead[data-v-4e432056]{border-bottom:none;z-index:calc(var(--f7be0d24) + 1);display:inline-table;min-width:100%}table>thead>tr[data-v-4e432056]{color:var(--text-primary);border-bottom:1px solid var(--common-divider);height:var(--spacing-500);display:grid;grid-template-columns:var(--4abea3db)}table>thead>tr>th[data-v-4e432056]{background:var(--background-paper-elevation-0);width:100%;display:flex;align-items:center;cursor:default}table>thead>tr>th.bordered[data-v-4e432056]{border-right:1px solid var(--common-divider)}table>thead>tr>th.bordered.isStickyRight[data-v-4e432056]{border-right:none;border-left:1px solid var(--common-divider)}table>thead>tr>th.isTextRight[data-v-4e432056]{justify-content:flex-end}table>thead>tr>th.isSortable[data-v-4e432056]{cursor:pointer}table>thead.sticky[data-v-4e432056]{position:sticky;top:0;background:white}table>thead.isStickyHeader[data-v-4e432056]{z-index:calc(var(--f7be0d24) + 2);top:calc(var(--spacing-800) - 1px)}table>tbody[data-v-4e432056]{display:block}table>tbody>*>tr[data-v-4e432056]{background-color:var(--background-default);min-height:var(--0d6494ba);height:auto;display:grid;align-items:center;grid-template-columns:var(--4abea3db)}table>tbody>*>tr:nth-of-type(2n)>td[data-v-4e432056]{background-color:var(--background-default)}table>tbody>*>tr:hover:not(.loading)>td[data-v-4e432056]{background-color:var(--background-paper-elevation-1)}table>tbody td[data-v-4e432056]{background-color:var(--background-default);border:none;min-width:0;display:flex;min-height:var(--0d6494ba);height:auto;width:100%;place-items:center;border-bottom:1px solid var(--common-divider);justify-content:start}table>tbody td.bordered[data-v-4e432056]{border-right:1px solid var(--common-divider)}table>tbody td.bordered.isStickyRight[data-v-4e432056]{border-right:none;border-left:1px solid var(--common-divider)}table>tbody td.isTextRight[data-v-4e432056]{justify-content:flex-end;text-align:right}.section-container[data-v-4e432056]{left:0}.sections[data-v-4e432056]{display:flex}.section[data-v-4e432056]{padding:0 1.5rem;background:var(--background-default);left:0;height:32px;display:flex;align-items:flex-end;border-right:1px solid var(--common-divider)}.table-cell[data-v-4e432056]{width:100%}.empty-state[data-v-4e432056]{min-height:250px}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
div[data-v-11c1bb3f]{display:block}
|