@ironsource/shared-ui 2.0.0 → 2.0.1
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/AppDropdownTrigger.vue_vue_type_style_index_0_scoped_c48dc06e_lang.css +1 -0
- package/ButtonV4.vue_vue_type_style_index_0_scoped_cca772e9_lang.css +1 -0
- package/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_e5202bb9_lang.css +1 -0
- package/DataGrid.vue_vue_type_style_index_0_scoped_4e432056_lang.css +1 -0
- package/DataGridMenu.vue_vue_type_style_index_0_scoped_92d83650_lang.css +1 -0
- package/DataGridRowsCounter.vue_vue_type_style_index_0_scoped_11c1bb3f_lang.css +1 -0
- package/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_c6156fa0_lang.css +1 -0
- package/DialogV4.vue_vue_type_style_index_0_scoped_7422cf08_lang.css +1 -0
- package/DropdownV4.vue_vue_type_style_index_0_scoped_19f8fedd_lang.css +1 -0
- package/DropdownV4.vue_vue_type_style_index_1_lang.css +1 -1
- package/IncludeExclude.vue_vue_type_style_index_0_scoped_fb054d88_lang.css +1 -0
- package/IncludeExcludeDragDrop.vue_vue_type_style_index_0_scoped_5764fd61_lang.css +1 -0
- package/OptionV4.vue_vue_type_style_index_0_scoped_2a214b95_lang.css +1 -0
- package/{Skeleton.vue_vue_type_style_index_0_scoped_9837f0ce_lang.css → Skeleton.vue_vue_type_style_index_0_scoped_5ed40068_lang.css} +1 -1
- package/SkeletonV4.vue_vue_type_style_index_0_scoped_2f3b3470_lang.css +1 -0
- package/Table.vue_vue_type_style_index_0_scoped_76fef9bd_lang.css +1 -0
- package/TextField.vue_vue_type_style_index_0_scoped_473bab9b_lang.css +1 -0
- package/components/button/v4/ButtonV4.vue.js +4 -4
- package/components/button/v4/ButtonV4.vue2.js +1 -1
- package/components/dialog/v4/DialogV4.vue.d.ts +34 -0
- package/components/dialog/v4/DialogV4.vue.js +3 -3
- package/components/dialog/v4/DialogV4.vue2.js +87 -56
- package/components/dialog/v4/index.d.ts +128 -2
- package/components/dropdown/common/Dropdown.common.js +29 -29
- package/components/dropdown/v4/AppDropdownTrigger.vue.d.ts +136 -0
- package/components/dropdown/v4/AppDropdownTrigger.vue.js +7 -0
- package/components/dropdown/v4/AppDropdownTrigger.vue2.js +147 -0
- package/components/dropdown/v4/ChipDropdownTrigger.vue.js +3 -3
- package/components/dropdown/v4/ChipDropdownTrigger.vue2.js +8 -8
- package/components/dropdown/v4/DefaultDropdownTrigger.vue.d.ts +39 -11
- package/components/dropdown/v4/DefaultDropdownTrigger.vue.js +2 -2
- package/components/dropdown/v4/DefaultDropdownTrigger.vue2.js +77 -47
- package/components/dropdown/v4/Dropdown.types.d.ts +1 -1
- package/components/dropdown/v4/Dropdown.types.js +2 -1
- package/components/dropdown/v4/DropdownV4.vue.d.ts +42 -7
- package/components/dropdown/v4/DropdownV4.vue.js +4 -4
- package/components/dropdown/v4/DropdownV4.vue2.js +193 -163
- package/components/dropdown/v4/OptionV4.vue.d.ts +20 -0
- package/components/dropdown/v4/OptionV4.vue.js +2 -2
- package/components/dropdown/v4/OptionV4.vue2.js +54 -37
- package/components/dropdown/v4/index.d.ts +824 -70
- package/components/dropdown/v4/index.js +11 -8
- package/components/includeExclude/IncludeExclude.vue.js +3 -3
- package/components/includeExclude/IncludeExclude.vue2.js +2 -2
- package/components/includeExclude/IncludeExcludeChipFilter.vue.d.ts +1 -1
- package/components/includeExclude/IncludeExcludeDragDrop.vue.js +3 -3
- package/components/includeExclude/IncludeExcludeDragDrop.vue2.js +2 -2
- package/components/includeExclude/index.d.ts +20 -20
- package/components/input/v4/TextField.vue.d.ts +1 -1
- package/components/input/v4/TextField.vue.js +3 -3
- package/components/input/v4/TextField.vue2.js +9 -10
- package/components/input/v4/index.d.ts +20 -20
- package/components/layout/FormCard.vue.d.ts +1 -1
- package/components/layout/index.d.ts +12 -12
- package/components/multibar/MultiBarMenu.vue2.js +7 -6
- package/components/skeleton/v3/Skeleton.vue.js +7 -0
- package/components/skeleton/{Skeleton.vue2.js → v3/Skeleton.vue2.js} +1 -1
- package/components/skeleton/v4/SkeletonV4.vue.d.ts +41 -0
- package/components/skeleton/v4/SkeletonV4.vue.js +7 -0
- package/components/skeleton/v4/SkeletonV4.vue2.js +23 -0
- package/components/skeleton/v4/index.d.ts +94 -0
- package/components/skeleton/v4/index.js +6 -0
- package/components/table/v3/Table.vue.js +5 -5
- package/components/table/v3/Table.vue2.js +3 -3
- package/components/table/v4/DataGrid.vue.d.ts +7 -2
- package/components/table/v4/DataGrid.vue.js +4 -4
- package/components/table/v4/DataGrid.vue2.js +175 -169
- package/components/table/v4/DataGridMenu.vue.d.ts +5 -0
- package/components/table/v4/DataGridMenu.vue.js +3 -3
- package/components/table/v4/DataGridMenu.vue2.js +49 -38
- package/components/table/v4/DataGridRowsCounter.vue.d.ts +34 -0
- package/components/table/v4/DataGridRowsCounter.vue.js +7 -0
- package/components/table/v4/DataGridRowsCounter.vue2.js +36 -0
- package/components/table/v4/index.d.ts +56 -6
- package/components/table/v4/index.js +6 -4
- package/components/table/v4/storyUtils.d.ts +1 -0
- package/components/toggle/v4/ToggleV4.vue.d.ts +1 -1
- package/components/toggle/v4/index.d.ts +20 -20
- package/index.d.ts +2401 -360
- package/index.js +119 -119
- package/mocks/apps.d.ts +7 -0
- package/package.json +6 -2
- package/testids/index.d.ts +3 -1
- package/testids/index.js +10 -10
- package/utils/array.js +1 -1
- package/ButtonV4.vue_vue_type_style_index_0_scoped_31e553e8_lang.css +0 -1
- package/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_14dcdae5_lang.css +0 -1
- package/DataGrid.vue_vue_type_style_index_0_scoped_7a670808_lang.css +0 -1
- package/DataGridMenu.vue_vue_type_style_index_0_scoped_99f1dcca_lang.css +0 -1
- package/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_c218ef1f_lang.css +0 -1
- package/DialogV4.vue_vue_type_style_index_0_scoped_c0c12287_lang.css +0 -1
- package/DropdownV4.vue_vue_type_style_index_0_scoped_571b7c2f_lang.css +0 -1
- package/IncludeExclude.vue_vue_type_style_index_0_scoped_2a01a791_lang.css +0 -1
- package/IncludeExcludeDragDrop.vue_vue_type_style_index_0_scoped_85bff8f4_lang.css +0 -1
- package/OptionV4.vue_vue_type_style_index_0_scoped_92add735_lang.css +0 -1
- package/Table.vue_vue_type_style_index_0_scoped_6b769df2_lang.css +0 -1
- package/TextField.vue_vue_type_style_index_0_scoped_d4dc4582_lang.css +0 -1
- package/components/skeleton/Skeleton.vue.js +0 -7
- /package/components/skeleton/{Skeleton.vue.d.ts → v3/Skeleton.vue.d.ts} +0 -0
- /package/components/skeleton/{index.d.ts → v3/index.d.ts} +0 -0
- /package/components/skeleton/{index.js → v3/index.js} +0 -0
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import "../../../DataGrid.
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { TableTestIdModifiers as
|
|
7
|
-
import { tableCommon as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { useVModel as
|
|
12
|
-
const
|
|
1
|
+
import "../../../DataGrid.vue_vue_type_style_index_0_scoped_4e432056_lang.css"; import { defineComponent as tt, useCssVars as et, unref as t, useSlots as at, computed as g, openBlock as i, createElementBlock as l, createElementVNode as r, normalizeStyle as R, normalizeClass as y, renderSlot as c, createVNode as u, withCtx as T, createTextVNode as C, toDisplayString as E, isRef as st, createCommentVNode as h, Fragment as x, renderList as B, createBlock as it, mergeProps as lt } from "vue";
|
|
2
|
+
import I from "../../typography/v4/Typography.vue.js";
|
|
3
|
+
import dt from "../../skeleton/v4/SkeletonV4.vue.js";
|
|
4
|
+
import ot from "../../emptyState/v4/EmptyStateV4.vue.js";
|
|
5
|
+
import p from "../../checkbox/v4/CheckboxV4.vue.js";
|
|
6
|
+
import { TableTestIdModifiers as f } from "../../../testids/index.js";
|
|
7
|
+
import { tableCommon as nt } from "../common/Table.common.js";
|
|
8
|
+
import rt from "./SortIcon.vue.js";
|
|
9
|
+
import ct from "./ExpandRowToggle.vue.js";
|
|
10
|
+
import ut from "../../search/v4/SearchV4.vue.js";
|
|
11
|
+
import { useVModel as ht } from "@vueuse/core";
|
|
12
|
+
const yt = ["data-testid"], ft = ["data-testid"], St = ["data-testid"], kt = ["data-testid"], mt = ["data-testid"], gt = { class: "search-wrapper" }, vt = ["data-testid"], bt = ["data-testid"], $t = { key: 0 }, Rt = {
|
|
13
13
|
key: 1,
|
|
14
14
|
class: "expand-toggle-cell"
|
|
15
|
-
},
|
|
15
|
+
}, Tt = ["onClick"], Ct = { class: "table-head-container" }, Et = ["data-testid"], xt = ["onMouseenter"], Bt = { key: 0 }, It = {
|
|
16
16
|
key: 1,
|
|
17
17
|
class: "expand-toggle-cell"
|
|
18
|
-
},
|
|
18
|
+
}, Vt = {
|
|
19
19
|
key: 2,
|
|
20
20
|
class: "expanded-row"
|
|
21
|
-
}, Pt = { key: 1 },
|
|
21
|
+
}, Pt = { key: 1 }, wt = {
|
|
22
22
|
key: 0,
|
|
23
23
|
class: "table-footer"
|
|
24
|
-
},
|
|
24
|
+
}, Gt = /* @__PURE__ */ tt({
|
|
25
25
|
__name: "DataGrid",
|
|
26
26
|
props: {
|
|
27
27
|
title: { default: "" },
|
|
@@ -30,11 +30,11 @@ const ut = ["data-testid"], ht = ["data-testid"], yt = ["data-testid"], St = ["d
|
|
|
30
30
|
sections: { default: null },
|
|
31
31
|
sort: { default: null },
|
|
32
32
|
selection: { default: null },
|
|
33
|
-
getRowId: { type: Function, default: (
|
|
33
|
+
getRowId: { type: Function, default: (a, S) => S },
|
|
34
34
|
isSticky: { type: Boolean, default: !0 },
|
|
35
35
|
isStickyHeader: { type: Boolean, default: !1 },
|
|
36
36
|
isLoading: { type: Boolean, default: !1 },
|
|
37
|
-
emptyStateVariant: { default:
|
|
37
|
+
emptyStateVariant: { default: null },
|
|
38
38
|
emptyStateTitle: { default: "No data to display" },
|
|
39
39
|
emptyStateSubtitle: { default: "" },
|
|
40
40
|
isInfiniteScroll: { type: Boolean, default: !1 },
|
|
@@ -46,134 +46,140 @@ const ut = ["data-testid"], ht = ["data-testid"], yt = ["data-testid"], St = ["d
|
|
|
46
46
|
search: { default: null },
|
|
47
47
|
showSearch: { type: Boolean, default: !1 },
|
|
48
48
|
searchPlaceholder: { default: "Search" },
|
|
49
|
-
searchAutoFocus: { type: Boolean, default: !1 }
|
|
49
|
+
searchAutoFocus: { type: Boolean, default: !1 },
|
|
50
|
+
zIndexBase: { default: 100 }
|
|
50
51
|
},
|
|
51
52
|
emits: ["update:sort", "update:search", "update:selection", "onScroll", "saveRow", "loadMore"],
|
|
52
|
-
setup(
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
"
|
|
57
|
-
"
|
|
53
|
+
setup(a, { emit: S }) {
|
|
54
|
+
const o = a;
|
|
55
|
+
et((s) => ({
|
|
56
|
+
f7be0d24: a.zIndexBase,
|
|
57
|
+
"1ec56162": t(J),
|
|
58
|
+
"4abea3db": t(H),
|
|
59
|
+
"0d6494ba": t(q)
|
|
58
60
|
}));
|
|
59
|
-
const
|
|
60
|
-
list:
|
|
61
|
-
containerProps:
|
|
62
|
-
wrapperProps:
|
|
63
|
-
activeRow:
|
|
64
|
-
gridColumnTemplate:
|
|
65
|
-
toggleSortOrder:
|
|
66
|
-
columnsStickyPositions:
|
|
67
|
-
hasSearchSlot:
|
|
68
|
-
containerStyle:
|
|
69
|
-
onScroll:
|
|
61
|
+
const v = at(), {
|
|
62
|
+
list: A,
|
|
63
|
+
containerProps: U,
|
|
64
|
+
wrapperProps: G,
|
|
65
|
+
activeRow: V,
|
|
66
|
+
gridColumnTemplate: H,
|
|
67
|
+
toggleSortOrder: Y,
|
|
68
|
+
columnsStickyPositions: L,
|
|
69
|
+
hasSearchSlot: Q,
|
|
70
|
+
containerStyle: W,
|
|
71
|
+
onScroll: N,
|
|
70
72
|
savingRows: F,
|
|
71
|
-
hasExpandSlot:
|
|
72
|
-
toggleExpandRow:
|
|
73
|
-
cssRowHeight:
|
|
74
|
-
cssExpandGridCol:
|
|
73
|
+
hasExpandSlot: b,
|
|
74
|
+
toggleExpandRow: j,
|
|
75
|
+
cssRowHeight: q,
|
|
76
|
+
cssExpandGridCol: J,
|
|
75
77
|
isRowExpanded: P,
|
|
76
78
|
hasCheckboxes: M
|
|
77
|
-
} =
|
|
78
|
-
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
},
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
|
|
79
|
+
} = nt(o, S), O = g(() => !!v.footer), k = ht(o, "search", S), z = g(() => o.selection.length || 0), w = g(() => z.value === o.rows.length), D = (s) => o.selection.includes(s), K = (s) => {
|
|
80
|
+
D(s) ? $(o.selection.filter((n) => n !== s)) : $([...o.selection, s]);
|
|
81
|
+
}, X = () => {
|
|
82
|
+
w.value ? $([]) : $(o.rows.map((s, n) => o.getRowId(s, n)));
|
|
83
|
+
}, $ = (s) => {
|
|
84
|
+
S("update:selection", s);
|
|
85
|
+
}, Z = g(
|
|
86
|
+
() => o.emptyStateVariant ?? (k.value ? "no-results" : "no-data")
|
|
87
|
+
), _ = g(
|
|
88
|
+
() => o.emptyStateSubtitle ? o.emptyStateSubtitle : k.value ? "Search again with different filters" : void 0
|
|
89
|
+
);
|
|
90
|
+
return (s, n) => (i(), l("div", {
|
|
85
91
|
class: "table-container",
|
|
86
|
-
"data-testid": `${
|
|
87
|
-
onMouseleave:
|
|
92
|
+
"data-testid": `${a.testId}-${t(f).CONTAINER}`,
|
|
93
|
+
onMouseleave: n[2] || (n[2] = (e) => V.value = null)
|
|
88
94
|
}, [
|
|
89
|
-
|
|
90
|
-
ref: t(
|
|
91
|
-
style:
|
|
95
|
+
r("table", {
|
|
96
|
+
ref: t(U).ref,
|
|
97
|
+
style: R(t(W)),
|
|
92
98
|
class: y({
|
|
93
99
|
hasFooter: t(O)
|
|
94
100
|
}),
|
|
95
|
-
"data-testid": `${
|
|
96
|
-
onScrollPassive:
|
|
97
|
-
(...e) => t(
|
|
101
|
+
"data-testid": `${a.testId}-${t(f).TABLE}`,
|
|
102
|
+
onScrollPassive: n[1] || (n[1] = //@ts-ignore
|
|
103
|
+
(...e) => t(N) && t(N)(...e))
|
|
98
104
|
}, [
|
|
99
|
-
|
|
105
|
+
a.title || t(v).title || t(Q) || t(v)["table-header-actions"] ? (i(), l("div", {
|
|
100
106
|
key: 0,
|
|
101
|
-
class: y(["table-header", { isStickyHeader:
|
|
102
|
-
"data-testid": `${
|
|
107
|
+
class: y(["table-header", { isStickyHeader: a.isStickyHeader }]),
|
|
108
|
+
"data-testid": `${a.testId}-${t(f).HEADER}`
|
|
103
109
|
}, [
|
|
104
|
-
|
|
110
|
+
r("div", {
|
|
105
111
|
class: "table-title",
|
|
106
|
-
"data-testid": `${
|
|
112
|
+
"data-testid": `${a.testId}-${t(f).TITLE}`
|
|
107
113
|
}, [
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
default:
|
|
111
|
-
|
|
114
|
+
c(s.$slots, "title", {}, () => [
|
|
115
|
+
u(t(I), { variant: "h3" }, {
|
|
116
|
+
default: T(() => [
|
|
117
|
+
C(E(a.title), 1)
|
|
112
118
|
]),
|
|
113
119
|
_: 1
|
|
114
120
|
})
|
|
115
121
|
], !0)
|
|
116
|
-
], 8,
|
|
117
|
-
|
|
122
|
+
], 8, kt),
|
|
123
|
+
r("div", {
|
|
118
124
|
class: "table-header-right",
|
|
119
|
-
"data-testid": `${
|
|
125
|
+
"data-testid": `${a.testId}-${t(f).HEADER_RIGHT}`
|
|
120
126
|
}, [
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
modelValue: t(
|
|
125
|
-
"onUpdate:modelValue":
|
|
126
|
-
placeholder:
|
|
127
|
-
"auto-focus":
|
|
128
|
-
"test-id":
|
|
127
|
+
a.showSearch ? c(s.$slots, "search", { key: 0 }, () => [
|
|
128
|
+
r("div", gt, [
|
|
129
|
+
u(t(ut), {
|
|
130
|
+
modelValue: t(k),
|
|
131
|
+
"onUpdate:modelValue": n[0] || (n[0] = (e) => st(k) ? k.value = e : null),
|
|
132
|
+
placeholder: a.searchPlaceholder,
|
|
133
|
+
"auto-focus": a.searchAutoFocus,
|
|
134
|
+
"test-id": a.testId
|
|
129
135
|
}, null, 8, ["modelValue", "placeholder", "auto-focus", "test-id"])
|
|
130
136
|
])
|
|
131
|
-
], !0) :
|
|
132
|
-
], 8,
|
|
133
|
-
t(
|
|
137
|
+
], !0) : h("", !0)
|
|
138
|
+
], 8, mt),
|
|
139
|
+
t(v)["table-header-actions"] ? (i(), l("div", {
|
|
134
140
|
key: 0,
|
|
135
141
|
class: "table-header-actions",
|
|
136
|
-
"data-testid": `${
|
|
142
|
+
"data-testid": `${a.testId}-${t(f).ACTIONS}`
|
|
137
143
|
}, [
|
|
138
|
-
|
|
139
|
-
], 8,
|
|
140
|
-
], 10,
|
|
141
|
-
|
|
142
|
-
class: y({ sticky:
|
|
144
|
+
c(s.$slots, "table-header-actions", {}, void 0, !0)
|
|
145
|
+
], 8, vt)) : h("", !0)
|
|
146
|
+
], 10, St)) : h("", !0),
|
|
147
|
+
r("thead", {
|
|
148
|
+
class: y({ sticky: a.isSticky, isStickyHeader: a.isStickyHeader })
|
|
143
149
|
}, [
|
|
144
|
-
|
|
150
|
+
r("div", {
|
|
145
151
|
class: "sections",
|
|
146
|
-
"data-testid": `${
|
|
152
|
+
"data-testid": `${a.testId}-${t(f).SECTIONS}`
|
|
147
153
|
}, [
|
|
148
|
-
(i(!0),
|
|
154
|
+
(i(!0), l(x, null, B(a.sections, (e) => (i(), l("div", {
|
|
149
155
|
key: e.id,
|
|
150
156
|
class: y(["section-container", { sticky: e.isSticky }])
|
|
151
157
|
}, [
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
style:
|
|
158
|
+
c(s.$slots, `section-${e.id}`, {}, () => [
|
|
159
|
+
r("div", {
|
|
160
|
+
style: R({ width: e.width + "px" }),
|
|
155
161
|
class: y({ section: !0 })
|
|
156
162
|
}, [
|
|
157
|
-
|
|
158
|
-
default:
|
|
159
|
-
|
|
163
|
+
u(t(I), { variant: "body2" }, {
|
|
164
|
+
default: T(() => [
|
|
165
|
+
C(E(e.title), 1)
|
|
160
166
|
]),
|
|
161
167
|
_: 2
|
|
162
168
|
}, 1024)
|
|
163
169
|
], 4)
|
|
164
170
|
], !0)
|
|
165
171
|
], 2))), 128))
|
|
166
|
-
], 8,
|
|
167
|
-
|
|
168
|
-
t(M) ? (i(),
|
|
169
|
-
|
|
170
|
-
"is-checked": t(
|
|
171
|
-
"is-indeterminate": !t(
|
|
172
|
-
"onUpdate:isChecked":
|
|
172
|
+
], 8, bt),
|
|
173
|
+
r("tr", null, [
|
|
174
|
+
t(M) ? (i(), l("th", $t, [
|
|
175
|
+
u(t(p), {
|
|
176
|
+
"is-checked": t(w),
|
|
177
|
+
"is-indeterminate": !t(w) && t(z) > 0,
|
|
178
|
+
"onUpdate:isChecked": X
|
|
173
179
|
}, null, 8, ["is-checked", "is-indeterminate"])
|
|
174
|
-
])) :
|
|
175
|
-
t(
|
|
176
|
-
(i(!0),
|
|
180
|
+
])) : h("", !0),
|
|
181
|
+
t(b) ? (i(), l("th", Rt)) : h("", !0),
|
|
182
|
+
(i(!0), l(x, null, B(a.columns, (e) => (i(), l("th", {
|
|
177
183
|
key: e.id,
|
|
178
184
|
class: y({
|
|
179
185
|
sticky: e.isSticky,
|
|
@@ -182,114 +188,114 @@ const ut = ["data-testid"], ht = ["data-testid"], yt = ["data-testid"], St = ["d
|
|
|
182
188
|
isTextRight: e.isTextRight,
|
|
183
189
|
isSortable: e.isSortable
|
|
184
190
|
}),
|
|
185
|
-
style:
|
|
186
|
-
onClick: (
|
|
191
|
+
style: R(e.isSticky ? t(L)[e.id] : null),
|
|
192
|
+
onClick: (m) => e.isSortable ? t(Y)(e) : null
|
|
187
193
|
}, [
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
default:
|
|
192
|
-
|
|
194
|
+
r("div", Ct, [
|
|
195
|
+
c(s.$slots, `header-${e.id}`, { column: e }, () => [
|
|
196
|
+
u(t(I), { variant: "tableLabel" }, {
|
|
197
|
+
default: T(() => [
|
|
198
|
+
C(E(e.title), 1)
|
|
193
199
|
]),
|
|
194
200
|
_: 2
|
|
195
201
|
}, 1024)
|
|
196
202
|
], !0),
|
|
197
|
-
e.isSortable && e.id ===
|
|
203
|
+
e.isSortable && e.id === a.sort?.sortBy ? (i(), it(rt, {
|
|
198
204
|
key: 0,
|
|
199
|
-
"sort-order":
|
|
200
|
-
}, null, 8, ["sort-order"])) :
|
|
205
|
+
"sort-order": a.sort.sortOrder
|
|
206
|
+
}, null, 8, ["sort-order"])) : h("", !0)
|
|
201
207
|
])
|
|
202
|
-
], 14,
|
|
208
|
+
], 14, Tt))), 128))
|
|
203
209
|
])
|
|
204
210
|
], 2),
|
|
205
|
-
|
|
206
|
-
t(
|
|
211
|
+
r("tbody", null, [
|
|
212
|
+
t(A).length > 0 ? (i(), l("div", lt({
|
|
207
213
|
key: 0,
|
|
208
214
|
class: "table-body-wrapper",
|
|
209
|
-
"data-testid": `${
|
|
210
|
-
}, t(
|
|
211
|
-
(i(!0),
|
|
215
|
+
"data-testid": `${a.testId}-${t(f).BODY_WRAPPER}`
|
|
216
|
+
}, t(G)), [
|
|
217
|
+
(i(!0), l(x, null, B(t(A), (e) => (i(), l("tr", {
|
|
212
218
|
key: e.index,
|
|
213
219
|
class: y(["table-row", {
|
|
214
|
-
loading:
|
|
215
|
-
active: t(
|
|
216
|
-
expanded: t(
|
|
220
|
+
loading: a.isLoading || a.isLoading && !e.data || t(F).includes(e.index),
|
|
221
|
+
active: t(V) === e.index,
|
|
222
|
+
expanded: t(b) && t(P)(e.index)
|
|
217
223
|
}]),
|
|
218
|
-
onMouseenter: (
|
|
224
|
+
onMouseenter: (m) => V.value = e.index
|
|
219
225
|
}, [
|
|
220
|
-
t(M) ? (i(),
|
|
221
|
-
|
|
222
|
-
"is-checked":
|
|
226
|
+
t(M) ? (i(), l("td", Bt, [
|
|
227
|
+
u(t(p), {
|
|
228
|
+
"is-checked": D(a.getRowId(e.data, e.index)),
|
|
223
229
|
size: "sm",
|
|
224
|
-
"onUpdate:isChecked": (
|
|
230
|
+
"onUpdate:isChecked": (m) => K(a.getRowId(e.data, e.index))
|
|
225
231
|
}, null, 8, ["is-checked", "onUpdate:isChecked"])
|
|
226
|
-
])) :
|
|
227
|
-
t(
|
|
228
|
-
|
|
232
|
+
])) : h("", !0),
|
|
233
|
+
t(b) ? (i(), l("td", It, [
|
|
234
|
+
u(ct, {
|
|
229
235
|
expanded: t(P)(e.index),
|
|
230
|
-
onClick: (
|
|
236
|
+
onClick: (m) => t(j)(e.index, m)
|
|
231
237
|
}, null, 8, ["expanded", "onClick"])
|
|
232
|
-
])) :
|
|
233
|
-
(i(!0),
|
|
234
|
-
key:
|
|
238
|
+
])) : h("", !0),
|
|
239
|
+
(i(!0), l(x, null, B(a.columns, (m, d) => (i(), l("td", {
|
|
240
|
+
key: d,
|
|
235
241
|
class: y({
|
|
236
|
-
sticky:
|
|
237
|
-
isStickyRight:
|
|
238
|
-
bordered:
|
|
239
|
-
isTextRight:
|
|
242
|
+
sticky: a.columns[d].isSticky,
|
|
243
|
+
isStickyRight: a.columns[d].isStickyRight,
|
|
244
|
+
bordered: a.columns[d].isBordered,
|
|
245
|
+
isTextRight: a.columns[d].isTextRight
|
|
240
246
|
}),
|
|
241
|
-
style:
|
|
242
|
-
|
|
247
|
+
style: R(
|
|
248
|
+
a.columns[d].isSticky ? t(L)[a.columns[d].id] : null
|
|
243
249
|
)
|
|
244
250
|
}, [
|
|
245
|
-
!
|
|
251
|
+
!a.isLoading || a.isLoading && e.data[d] ? (i(), l("div", {
|
|
246
252
|
key: 0,
|
|
247
|
-
class: y(["table-cell", { last:
|
|
253
|
+
class: y(["table-cell", { last: d === e.data.length - 1 }])
|
|
248
254
|
}, [
|
|
249
|
-
|
|
250
|
-
cell: e.data[
|
|
255
|
+
c(s.$slots, `cell-${a.columns[d].id}`, {
|
|
256
|
+
cell: e.data[d],
|
|
251
257
|
isLoading: t(F).includes(e.index),
|
|
252
|
-
cellIndex:
|
|
258
|
+
cellIndex: d,
|
|
253
259
|
row: e,
|
|
254
260
|
rowIndex: e.index
|
|
255
261
|
}, () => [
|
|
256
|
-
|
|
257
|
-
default:
|
|
258
|
-
|
|
262
|
+
u(t(I), { variant: "body1" }, {
|
|
263
|
+
default: T(() => [
|
|
264
|
+
C(E(e.data[d]), 1)
|
|
259
265
|
]),
|
|
260
266
|
_: 2
|
|
261
267
|
}, 1024)
|
|
262
268
|
], !0)
|
|
263
|
-
], 2)) :
|
|
264
|
-
|
|
269
|
+
], 2)) : c(s.$slots, "loader", { key: 1 }, () => [
|
|
270
|
+
u(t(dt), { round: "" })
|
|
265
271
|
], !0)
|
|
266
272
|
], 6))), 128)),
|
|
267
|
-
t(
|
|
268
|
-
|
|
273
|
+
t(b) && t(P)(e.index) ? (i(), l("div", Vt, [
|
|
274
|
+
c(s.$slots, "expanded", {
|
|
269
275
|
row: e,
|
|
270
|
-
gridColumnTemplate: t(
|
|
276
|
+
gridColumnTemplate: t(H)
|
|
271
277
|
}, void 0, !0)
|
|
272
|
-
])) :
|
|
273
|
-
], 42,
|
|
274
|
-
], 16,
|
|
275
|
-
|
|
276
|
-
|
|
278
|
+
])) : h("", !0)
|
|
279
|
+
], 42, xt))), 128))
|
|
280
|
+
], 16, Et)) : (i(), l("div", Pt, [
|
|
281
|
+
c(s.$slots, "empty-state", {}, () => [
|
|
282
|
+
u(t(ot), {
|
|
277
283
|
class: "empty-state",
|
|
278
|
-
title:
|
|
279
|
-
subtitle:
|
|
280
|
-
variant:
|
|
281
|
-
"test-id": `${
|
|
284
|
+
title: a.emptyStateTitle,
|
|
285
|
+
subtitle: t(_),
|
|
286
|
+
variant: t(Z),
|
|
287
|
+
"test-id": `${a.testId}-${t(f).EMPTY_STATE}`
|
|
282
288
|
}, null, 8, ["title", "subtitle", "variant", "test-id"])
|
|
283
289
|
], !0)
|
|
284
290
|
]))
|
|
285
291
|
])
|
|
286
|
-
], 46,
|
|
287
|
-
t(O) ? (i(),
|
|
288
|
-
|
|
289
|
-
])) :
|
|
290
|
-
], 40,
|
|
292
|
+
], 46, ft),
|
|
293
|
+
t(O) ? (i(), l("div", wt, [
|
|
294
|
+
c(s.$slots, "footer", {}, void 0, !0)
|
|
295
|
+
])) : h("", !0)
|
|
296
|
+
], 40, yt));
|
|
291
297
|
}
|
|
292
298
|
});
|
|
293
299
|
export {
|
|
294
|
-
|
|
300
|
+
Gt as default
|
|
295
301
|
};
|
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
import { MenuItem } from '@is-ssp/table/common/Table.types';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
3
3
|
menuItems: MenuItem[];
|
|
4
|
+
container?: string;
|
|
4
5
|
}>, {
|
|
5
6
|
menuItems: () => any[];
|
|
7
|
+
container: any;
|
|
6
8
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
9
|
selected: (option: unknown) => void;
|
|
8
10
|
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
9
11
|
menuItems: MenuItem[];
|
|
12
|
+
container?: string;
|
|
10
13
|
}>, {
|
|
11
14
|
menuItems: () => any[];
|
|
15
|
+
container: any;
|
|
12
16
|
}>>> & {
|
|
13
17
|
onSelected?: (option: unknown) => any;
|
|
14
18
|
}, {
|
|
19
|
+
container: string;
|
|
15
20
|
menuItems: MenuItem[];
|
|
16
21
|
}>;
|
|
17
22
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./DataGridMenu.vue2.js";
|
|
2
2
|
/* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../../DataGridMenu.
|
|
4
|
-
const
|
|
3
|
+
// import "../../../DataGridMenu.vue_vue_type_style_index_0_scoped_92d83650_lang.css"; //*');
|
|
4
|
+
const a = /* @__PURE__ */ e(o, [["__scopeId", "data-v-92d83650"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -1,50 +1,61 @@
|
|
|
1
|
-
import "../../../DataGridMenu.
|
|
2
|
-
import
|
|
1
|
+
import "../../../DataGridMenu.vue_vue_type_style_index_0_scoped_92d83650_lang.css"; import { defineComponent as p, ref as u, computed as f, openBlock as x, createElementBlock as g, createVNode as o, unref as t, withCtx as n, createSlots as k, createTextVNode as v, toDisplayString as y } from "vue";
|
|
2
|
+
import _ from "../../dropdown/v4/DropdownV4.vue.js";
|
|
3
3
|
import "../../dropdown/v4/DefaultDropdownTrigger.vue.js";
|
|
4
4
|
import "../../dropdown/v4/IconButtonDropdownTrigger.vue.js";
|
|
5
5
|
import "../../dropdown/v4/ChipDropdownTrigger.vue.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
6
|
+
import "../../dropdown/v4/AppDropdownTrigger.vue.js";
|
|
7
|
+
import D from "../../dropdown/v4/OptionV4.vue.js";
|
|
8
|
+
import I from "../../icon/v4/IconV4.vue.js";
|
|
9
|
+
const b = /* @__PURE__ */ p({
|
|
9
10
|
__name: "DataGridMenu",
|
|
10
11
|
props: {
|
|
11
|
-
menuItems: { default: () => [] }
|
|
12
|
+
menuItems: { default: () => [] },
|
|
13
|
+
container: { default: null }
|
|
12
14
|
},
|
|
13
15
|
emits: ["selected"],
|
|
14
|
-
setup(
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
a(
|
|
36
|
-
name: e.icon,
|
|
37
|
-
size: "20px"
|
|
38
|
-
}, null, 8, ["name"])
|
|
16
|
+
setup(r, { emit: l }) {
|
|
17
|
+
const m = r, a = (c) => c.text, i = u(null), d = f(
|
|
18
|
+
() => m.container ?? (i.value || void 0)
|
|
19
|
+
);
|
|
20
|
+
return (c, s) => (x(), g("div", {
|
|
21
|
+
ref_key: "rootRef",
|
|
22
|
+
ref: i
|
|
23
|
+
}, [
|
|
24
|
+
o(t(_), {
|
|
25
|
+
class: "data-grid-menu",
|
|
26
|
+
options: r.menuItems,
|
|
27
|
+
"display-value": a,
|
|
28
|
+
"predefined-trigger": "icon-button",
|
|
29
|
+
placement: "left-start",
|
|
30
|
+
skidding: -4,
|
|
31
|
+
container: t(d),
|
|
32
|
+
"onUpdate:selected": s[0] || (s[0] = (e) => l("selected", e))
|
|
33
|
+
}, {
|
|
34
|
+
default: n(({ option: e }) => [
|
|
35
|
+
o(t(D), { option: e }, k({
|
|
36
|
+
default: n(() => [
|
|
37
|
+
v(" " + y(a(e)), 1)
|
|
39
38
|
]),
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
39
|
+
_: 2
|
|
40
|
+
}, [
|
|
41
|
+
e.icon ? {
|
|
42
|
+
name: "icon-start",
|
|
43
|
+
fn: n(() => [
|
|
44
|
+
o(t(I), {
|
|
45
|
+
class: "menu-icon",
|
|
46
|
+
name: e.icon,
|
|
47
|
+
size: "20px"
|
|
48
|
+
}, null, 8, ["name"])
|
|
49
|
+
]),
|
|
50
|
+
key: "0"
|
|
51
|
+
} : void 0
|
|
52
|
+
]), 1032, ["option"])
|
|
53
|
+
]),
|
|
54
|
+
_: 1
|
|
55
|
+
}, 8, ["options", "container"])
|
|
56
|
+
], 512));
|
|
46
57
|
}
|
|
47
58
|
});
|
|
48
59
|
export {
|
|
49
|
-
|
|
60
|
+
b as default
|
|
50
61
|
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
+
count?: number;
|
|
3
|
+
totalCount?: number;
|
|
4
|
+
}>, {
|
|
5
|
+
count: number;
|
|
6
|
+
totalCount: number;
|
|
7
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
8
|
+
count?: number;
|
|
9
|
+
totalCount?: number;
|
|
10
|
+
}>, {
|
|
11
|
+
count: number;
|
|
12
|
+
totalCount: number;
|
|
13
|
+
}>>>, {
|
|
14
|
+
count: number;
|
|
15
|
+
totalCount: number;
|
|
16
|
+
}>;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
19
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
20
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
21
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
22
|
+
} : {
|
|
23
|
+
type: import('vue').PropType<T[K]>;
|
|
24
|
+
required: true;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
type __VLS_WithDefaults<P, D> = {
|
|
28
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
29
|
+
default: D[K];
|
|
30
|
+
}> : P[K];
|
|
31
|
+
};
|
|
32
|
+
type __VLS_Prettify<T> = {
|
|
33
|
+
[K in keyof T]: T[K];
|
|
34
|
+
} & {};
|