@ironsource/shared-ui 2.1.7-test.7 → 2.1.7-test.9
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_706b324e_lang.css +1 -0
- package/DataGridRowsCounter.vue_vue_type_style_index_0_scoped_0ce71f73_lang.css +1 -0
- package/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_98819e5a_lang.css +1 -0
- package/DropdownV4.vue_vue_type_style_index_0_scoped_00ccab6b_lang.css +1 -0
- package/OptionV4.vue_vue_type_style_index_0_scoped_77509f61_lang.css +1 -0
- package/README.md +1 -1
- package/TreeDropdown.vue_vue_type_style_index_0_scoped_5efe563d_lang.css +1 -0
- package/components/dropdown/common/Dropdown.common.js +89 -89
- package/components/dropdown/v4/DefaultDropdownTrigger.vue.d.ts +1 -0
- package/components/dropdown/v4/DefaultDropdownTrigger.vue.js +2 -2
- package/components/dropdown/v4/DefaultDropdownTrigger.vue2.js +32 -29
- package/components/dropdown/v4/DropdownV4.vue.d.ts +29 -0
- package/components/dropdown/v4/DropdownV4.vue.js +4 -4
- package/components/dropdown/v4/DropdownV4.vue2.js +186 -158
- package/components/dropdown/v4/OptionV4.vue.d.ts +26 -2
- package/components/dropdown/v4/OptionV4.vue.js +2 -2
- package/components/dropdown/v4/OptionV4.vue2.js +94 -71
- package/components/dropdown/v4/TreeDropdown.vue.d.ts +21 -16
- package/components/dropdown/v4/TreeDropdown.vue.js +4 -4
- package/components/dropdown/v4/TreeDropdown.vue2.js +162 -74
- package/components/dropdown/v4/index.d.ts +451 -82
- package/components/table/common/Table.common.js +68 -71
- package/components/table/v4/DataGrid.vue.d.ts +4 -10
- package/components/table/v4/DataGrid.vue.js +3 -3
- package/components/table/v4/DataGrid.vue2.js +134 -128
- package/components/table/v4/DataGridRowsCounter.vue.js +2 -2
- package/components/table/v4/DataGridRowsCounter.vue2.js +13 -14
- package/components/table/v4/MultipleDataGrid.vue.d.ts +2 -2
- package/components/table/v4/index.d.ts +7 -41
- package/components/table/v4/storyUtils.d.ts +0 -4
- package/index.d.ts +1203 -533
- package/mocks/options.d.ts +12 -0
- package/package.json +1 -1
- package/DataGrid.vue_vue_type_style_index_0_scoped_5273976b_lang.css +0 -1
- package/DataGridRowsCounter.vue_vue_type_style_index_0_scoped_ef699ec5_lang.css +0 -1
- package/DefaultDropdownTrigger.vue_vue_type_style_index_0_scoped_0345d6b1_lang.css +0 -1
- package/DropdownV4.vue_vue_type_style_index_0_scoped_938772ee_lang.css +0 -1
- package/OptionV4.vue_vue_type_style_index_0_scoped_b6a06f00_lang.css +0 -1
- package/TreeDropdown.vue_vue_type_style_index_0_scoped_142eab98_lang.css +0 -1
- package/utils/formatNumbers.d.ts +0 -4
- package/utils/formatNumbers.js +0 -11
|
@@ -1,123 +1,120 @@
|
|
|
1
|
-
import { useSlots as
|
|
1
|
+
import { useSlots as K, ref as c, provide as N, computed as s, onMounted as V, nextTick as j } from "vue";
|
|
2
2
|
import { useVirtualList as q, useInfiniteScroll as F } from "@vueuse/core";
|
|
3
3
|
import { TableContext as J } from "./TableContext.js";
|
|
4
|
-
const Q = 46, U = 46, tt = (
|
|
5
|
-
const
|
|
4
|
+
const Q = 46, U = 46, tt = (o, a) => {
|
|
5
|
+
const m = K(), u = c([]);
|
|
6
6
|
N(J, {
|
|
7
|
-
onClose({ rowIndex: t, cellIndex:
|
|
8
|
-
n && (
|
|
7
|
+
onClose({ rowIndex: t, cellIndex: e, value: n } = {}) {
|
|
8
|
+
n && (u.value = [...u.value, t], a("saveRow", {
|
|
9
9
|
rowIndex: t,
|
|
10
|
-
cellIndex:
|
|
10
|
+
cellIndex: e,
|
|
11
11
|
value: n,
|
|
12
12
|
confirm: () => {
|
|
13
|
-
|
|
14
|
-
(
|
|
13
|
+
u.value = u.value.filter(
|
|
14
|
+
(l) => l !== t
|
|
15
15
|
);
|
|
16
16
|
}
|
|
17
17
|
}));
|
|
18
18
|
},
|
|
19
19
|
setActiveMenuRow(t) {
|
|
20
|
-
|
|
20
|
+
C.value = t;
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
|
-
const
|
|
24
|
-
const t = (
|
|
25
|
-
return
|
|
26
|
-
const
|
|
27
|
-
return `${
|
|
23
|
+
const x = s(() => !!o.selection), T = s(() => {
|
|
24
|
+
const t = (x.value ? `${U}px ` : "") + (g.value ? `${Q}px ` : "");
|
|
25
|
+
return o.columns.reduce((e, n) => {
|
|
26
|
+
const l = n.width ? `${n.width}px` : `${n.colSpan || 1}fr`;
|
|
27
|
+
return `${e} ${l}`;
|
|
28
28
|
}, t);
|
|
29
|
-
}), g = s(() => !!
|
|
30
|
-
Array(
|
|
31
|
-
)),
|
|
32
|
-
|
|
33
|
-
...R.value
|
|
34
|
-
] : e.rows.map((o) => o[e.rowDataKey])), { list: T, containerProps: l, wrapperProps: $, scrollTo: b } = q(
|
|
35
|
-
H,
|
|
29
|
+
}), g = s(() => !!m.expanded), y = c(null), C = c(null), H = s(() => Array(o.loadingRowCount).fill(
|
|
30
|
+
Array(o.columns.length).fill("")
|
|
31
|
+
)), $ = s(() => o.isLoading ? [...o.rows, ...H.value] : o.rows), { list: R, containerProps: i, wrapperProps: b, scrollTo: k } = q(
|
|
32
|
+
$,
|
|
36
33
|
{
|
|
37
|
-
itemHeight: g.value ? (t) => w[t] ??
|
|
34
|
+
itemHeight: g.value ? (t) => w[t] ?? o.rowHeight : o.rowHeight
|
|
38
35
|
}
|
|
39
|
-
),
|
|
40
|
-
|
|
36
|
+
), B = c(null), h = c(0), I = s(() => !!m.search), O = (t) => {
|
|
37
|
+
i.onScroll(), h.value = t.target.scrollLeft + t.target.getBoundingClientRect().width, a("onScroll", t.target.scrollTop);
|
|
41
38
|
};
|
|
42
39
|
V(() => {
|
|
43
|
-
h.value =
|
|
44
|
-
|
|
45
|
-
top:
|
|
40
|
+
h.value = i.ref.value?.getBoundingClientRect().width, o.defaultScrollPosition && setTimeout(() => {
|
|
41
|
+
i.ref.value?.scrollTo({
|
|
42
|
+
top: o.defaultScrollPosition,
|
|
46
43
|
behavior: "smooth"
|
|
47
44
|
});
|
|
48
45
|
}, 300);
|
|
49
46
|
});
|
|
50
|
-
const
|
|
51
|
-
const [t] =
|
|
47
|
+
const P = s(() => {
|
|
48
|
+
const [t] = R.value;
|
|
52
49
|
return t && t.index > 0;
|
|
53
|
-
}),
|
|
50
|
+
}), A = s(() => i.style), E = s(() => o.columns.reduce((t, e) => (e.isSticky && (t[e.id] = _(e)), t), {}));
|
|
54
51
|
F(
|
|
55
|
-
|
|
52
|
+
i.ref,
|
|
56
53
|
() => {
|
|
57
|
-
|
|
54
|
+
o.isInfiniteScroll && a("loadMore");
|
|
58
55
|
},
|
|
59
|
-
{ distance:
|
|
56
|
+
{ distance: o.infiniteScrollThreshold }
|
|
60
57
|
);
|
|
61
|
-
function
|
|
62
|
-
|
|
58
|
+
function L() {
|
|
59
|
+
i.ref.value?.scrollTo({
|
|
63
60
|
top: 0,
|
|
64
61
|
behavior: "smooth"
|
|
65
62
|
});
|
|
66
63
|
}
|
|
67
|
-
function
|
|
68
|
-
if (!
|
|
64
|
+
function M(t) {
|
|
65
|
+
if (!o.sort)
|
|
69
66
|
return;
|
|
70
|
-
const
|
|
67
|
+
const e = o.sort.sortBy === t.id;
|
|
71
68
|
if (!(t.isSortable || t.isSortable === void 0))
|
|
72
69
|
return;
|
|
73
|
-
let
|
|
74
|
-
|
|
70
|
+
let l = o.sort.sortOrder, f = o.sort.sortBy;
|
|
71
|
+
e ? l = o.sort.sortOrder === "asc" ? "desc" : "asc" : f = t.id, a("update:sort", { sortBy: f, sortOrder: l });
|
|
75
72
|
}
|
|
76
|
-
function
|
|
77
|
-
const { isSticky:
|
|
78
|
-
if (!
|
|
73
|
+
function _(t) {
|
|
74
|
+
const { isSticky: e, width: n } = t;
|
|
75
|
+
if (!e || !n)
|
|
79
76
|
return null;
|
|
80
|
-
const
|
|
77
|
+
const l = o.columns.findIndex((r) => r.id === t.id), f = o.columns.reduce((r, v, S) => S < l ? r + v.width : r, 0), G = o.columns.reduce((r, v, S) => S > l ? r + v.width : r, 0);
|
|
81
78
|
return {
|
|
82
|
-
...t.isStickyRight ? { right: `${
|
|
79
|
+
...t.isStickyRight ? { right: `${G}px` } : { left: `${f}px` },
|
|
83
80
|
zIndex: 1
|
|
84
81
|
};
|
|
85
82
|
}
|
|
86
|
-
const d = c([]), w = {},
|
|
83
|
+
const d = c([]), w = {}, D = (t) => d.value.includes(t), W = async (t, e) => {
|
|
87
84
|
const n = d.value.indexOf(t);
|
|
88
85
|
if (n === -1) {
|
|
89
86
|
d.value.push(t);
|
|
90
|
-
const
|
|
91
|
-
await j(),
|
|
87
|
+
const l = e.target.closest("tr");
|
|
88
|
+
await j(), l && (w[t] = l.offsetHeight);
|
|
92
89
|
} else
|
|
93
90
|
d.value.splice(n, 1), delete w[t];
|
|
94
|
-
},
|
|
95
|
-
() => `1 / span ${
|
|
91
|
+
}, X = s(() => `${o.rowHeight}px`), z = s(
|
|
92
|
+
() => `1 / span ${o.columns.length + 1}`
|
|
96
93
|
);
|
|
97
94
|
return {
|
|
98
|
-
list:
|
|
99
|
-
containerProps:
|
|
100
|
-
wrapperProps:
|
|
101
|
-
activeRow:
|
|
102
|
-
gridColumnTemplate:
|
|
103
|
-
floatingActionRef:
|
|
104
|
-
scrollToTop:
|
|
105
|
-
toggleSortOrder:
|
|
106
|
-
columnsStickyPositions:
|
|
107
|
-
hasSearchSlot:
|
|
108
|
-
showBackToTopButton:
|
|
109
|
-
containerStyle:
|
|
110
|
-
onScroll:
|
|
111
|
-
scrollTo:
|
|
112
|
-
savingRows:
|
|
95
|
+
list: R,
|
|
96
|
+
containerProps: i,
|
|
97
|
+
wrapperProps: b,
|
|
98
|
+
activeRow: y,
|
|
99
|
+
gridColumnTemplate: T,
|
|
100
|
+
floatingActionRef: B,
|
|
101
|
+
scrollToTop: L,
|
|
102
|
+
toggleSortOrder: M,
|
|
103
|
+
columnsStickyPositions: E,
|
|
104
|
+
hasSearchSlot: I,
|
|
105
|
+
showBackToTopButton: P,
|
|
106
|
+
containerStyle: A,
|
|
107
|
+
onScroll: O,
|
|
108
|
+
scrollTo: k,
|
|
109
|
+
savingRows: u,
|
|
113
110
|
floatingActionPosition: h,
|
|
114
111
|
hasExpandSlot: g,
|
|
115
|
-
hasCheckboxes:
|
|
116
|
-
toggleExpandRow:
|
|
117
|
-
isRowExpanded:
|
|
118
|
-
cssRowHeight:
|
|
119
|
-
cssExpandGridCol:
|
|
120
|
-
activeMenuRow:
|
|
112
|
+
hasCheckboxes: x,
|
|
113
|
+
toggleExpandRow: W,
|
|
114
|
+
isRowExpanded: D,
|
|
115
|
+
cssRowHeight: X,
|
|
116
|
+
cssExpandGridCol: z,
|
|
117
|
+
activeMenuRow: C
|
|
121
118
|
};
|
|
122
119
|
};
|
|
123
120
|
export {
|
|
@@ -25,8 +25,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
25
25
|
searchPlaceholder?: string;
|
|
26
26
|
searchAutoFocus?: boolean;
|
|
27
27
|
zIndexBase?: number;
|
|
28
|
-
rowCustomClassKey?: string;
|
|
29
|
-
rowDataKey?: string;
|
|
30
28
|
}>, {
|
|
31
29
|
title: string;
|
|
32
30
|
sort: any;
|
|
@@ -51,8 +49,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
51
49
|
searchPlaceholder: string;
|
|
52
50
|
searchAutoFocus: boolean;
|
|
53
51
|
zIndexBase: number;
|
|
54
|
-
rowCustomClassKey: string;
|
|
55
|
-
rowDataKey: string;
|
|
56
52
|
}>, {
|
|
57
53
|
scrollTo: (index: number) => void;
|
|
58
54
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -97,8 +93,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
97
93
|
searchPlaceholder?: string;
|
|
98
94
|
searchAutoFocus?: boolean;
|
|
99
95
|
zIndexBase?: number;
|
|
100
|
-
rowCustomClassKey?: string;
|
|
101
|
-
rowDataKey?: string;
|
|
102
96
|
}>, {
|
|
103
97
|
title: string;
|
|
104
98
|
sort: any;
|
|
@@ -123,8 +117,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
123
117
|
searchPlaceholder: string;
|
|
124
118
|
searchAutoFocus: boolean;
|
|
125
119
|
zIndexBase: number;
|
|
126
|
-
rowCustomClassKey: string;
|
|
127
|
-
rowDataKey: string;
|
|
128
120
|
}>>> & {
|
|
129
121
|
onSelectAll?: (value: boolean) => any;
|
|
130
122
|
"onUpdate:search"?: (query: string) => any;
|
|
@@ -165,8 +157,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
165
157
|
selectedMatcher: (rowId: unknown, selected: unknown) => boolean;
|
|
166
158
|
emptyStateVariant: "error" | "no-access" | "no-results" | "no-data" | "files" | "settings";
|
|
167
159
|
zIndexBase: number;
|
|
168
|
-
rowCustomClassKey: string;
|
|
169
|
-
rowDataKey: string;
|
|
170
160
|
}>, Partial<Record<`section-${string}`, (_: {}) => any>> & Partial<Record<`header-${string}`, (_: {
|
|
171
161
|
column: Column;
|
|
172
162
|
}) => any>> & Partial<Record<`cell-${string}`, (_: {
|
|
@@ -185,6 +175,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
185
175
|
row: import("@vueuse/core").UseVirtualListItem<Row>;
|
|
186
176
|
gridColumnTemplate: any;
|
|
187
177
|
}): any;
|
|
178
|
+
"floating-row"?(_: {
|
|
179
|
+
row: import("@vueuse/core").UseVirtualListItem<Row>;
|
|
180
|
+
rowIndex: number;
|
|
181
|
+
}): any;
|
|
188
182
|
"empty-state"?(_: {}): any;
|
|
189
183
|
footer?(_: {}): any;
|
|
190
184
|
}>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./DataGrid.vue2.js";
|
|
2
|
-
/* empty css */import
|
|
3
|
-
// import "../../../DataGrid.
|
|
4
|
-
const a = /* @__PURE__ */
|
|
2
|
+
/* empty css */import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
// import "../../../DataGrid.vue_vue_type_style_index_0_scoped_706b324e_lang.css"; //*');
|
|
4
|
+
const a = /* @__PURE__ */ e(o, [["__scopeId", "data-v-706b324e"]]);
|
|
5
5
|
export {
|
|
6
6
|
a as default
|
|
7
7
|
};
|