@ironsource/shared-ui 2.1.6-rc.36 → 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 +3 -1
- package/components/table/v4/DataGrid.vue.js +2 -2
- package/components/table/v4/DataGrid.vue2.js +169 -166
- package/components/table/v4/DataGridMenu.vue2.js +3 -2
- package/components/table/v4/index.d.ts +9 -3
- package/index.d.ts +339 -8
- package/mocks/options.d.ts +12 -0
- package/package.json +1 -1
- package/DataGrid.vue_vue_type_style_index_0_scoped_ac14037f_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
|
@@ -24,6 +24,7 @@ export declare const tableCommon: (props: any, emit: any) => {
|
|
|
24
24
|
showBackToTopButton: import("vue").ComputedRef<boolean>;
|
|
25
25
|
containerStyle: import("vue").ComputedRef<CSSProperties>;
|
|
26
26
|
onScroll: (event: any) => void;
|
|
27
|
+
scrollTo: (index: number) => void;
|
|
27
28
|
savingRows: import("vue").Ref<any[]>;
|
|
28
29
|
floatingActionPosition: import("vue").Ref<number>;
|
|
29
30
|
hasExpandSlot: import("vue").ComputedRef<boolean>;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { useSlots as
|
|
2
|
-
import { useVirtualList as
|
|
3
|
-
import { TableContext as
|
|
4
|
-
const
|
|
5
|
-
const m =
|
|
6
|
-
|
|
7
|
-
onClose({ rowIndex: t, cellIndex:
|
|
1
|
+
import { useSlots as K, ref as c, provide as N, computed as s, onMounted as V, nextTick as j } from "vue";
|
|
2
|
+
import { useVirtualList as q, useInfiniteScroll as F } from "@vueuse/core";
|
|
3
|
+
import { TableContext as J } from "./TableContext.js";
|
|
4
|
+
const Q = 46, U = 46, tt = (o, a) => {
|
|
5
|
+
const m = K(), u = c([]);
|
|
6
|
+
N(J, {
|
|
7
|
+
onClose({ rowIndex: t, cellIndex: e, value: n } = {}) {
|
|
8
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
13
|
u.value = u.value.filter(
|
|
14
|
-
(
|
|
14
|
+
(l) => l !== t
|
|
15
15
|
);
|
|
16
16
|
}
|
|
17
17
|
}));
|
|
@@ -20,99 +20,103 @@ const J = 46, Q = 46, p = (e, a) => {
|
|
|
20
20
|
C.value = t;
|
|
21
21
|
}
|
|
22
22
|
});
|
|
23
|
-
const x =
|
|
24
|
-
const t = (x.value ? `${
|
|
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 =
|
|
30
|
-
Array(
|
|
31
|
-
)), $ =
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
+
$,
|
|
33
|
+
{
|
|
34
|
+
itemHeight: g.value ? (t) => w[t] ?? o.rowHeight : o.rowHeight
|
|
35
|
+
}
|
|
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);
|
|
35
38
|
};
|
|
36
|
-
|
|
37
|
-
h.value =
|
|
38
|
-
|
|
39
|
-
top:
|
|
39
|
+
V(() => {
|
|
40
|
+
h.value = i.ref.value?.getBoundingClientRect().width, o.defaultScrollPosition && setTimeout(() => {
|
|
41
|
+
i.ref.value?.scrollTo({
|
|
42
|
+
top: o.defaultScrollPosition,
|
|
40
43
|
behavior: "smooth"
|
|
41
44
|
});
|
|
42
45
|
}, 300);
|
|
43
46
|
});
|
|
44
|
-
const
|
|
47
|
+
const P = s(() => {
|
|
45
48
|
const [t] = R.value;
|
|
46
49
|
return t && t.index > 0;
|
|
47
|
-
}),
|
|
48
|
-
|
|
49
|
-
|
|
50
|
+
}), A = s(() => i.style), E = s(() => o.columns.reduce((t, e) => (e.isSticky && (t[e.id] = _(e)), t), {}));
|
|
51
|
+
F(
|
|
52
|
+
i.ref,
|
|
50
53
|
() => {
|
|
51
|
-
|
|
54
|
+
o.isInfiniteScroll && a("loadMore");
|
|
52
55
|
},
|
|
53
|
-
{ distance:
|
|
56
|
+
{ distance: o.infiniteScrollThreshold }
|
|
54
57
|
);
|
|
55
|
-
function
|
|
56
|
-
|
|
58
|
+
function L() {
|
|
59
|
+
i.ref.value?.scrollTo({
|
|
57
60
|
top: 0,
|
|
58
61
|
behavior: "smooth"
|
|
59
62
|
});
|
|
60
63
|
}
|
|
61
|
-
function
|
|
62
|
-
if (!
|
|
64
|
+
function M(t) {
|
|
65
|
+
if (!o.sort)
|
|
63
66
|
return;
|
|
64
|
-
const
|
|
67
|
+
const e = o.sort.sortBy === t.id;
|
|
65
68
|
if (!(t.isSortable || t.isSortable === void 0))
|
|
66
69
|
return;
|
|
67
|
-
let
|
|
68
|
-
|
|
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 });
|
|
69
72
|
}
|
|
70
|
-
function
|
|
71
|
-
const { isSticky:
|
|
72
|
-
if (!
|
|
73
|
+
function _(t) {
|
|
74
|
+
const { isSticky: e, width: n } = t;
|
|
75
|
+
if (!e || !n)
|
|
73
76
|
return null;
|
|
74
|
-
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);
|
|
75
78
|
return {
|
|
76
|
-
...t.isStickyRight ? { right: `${
|
|
79
|
+
...t.isStickyRight ? { right: `${G}px` } : { left: `${f}px` },
|
|
77
80
|
zIndex: 1
|
|
78
81
|
};
|
|
79
82
|
}
|
|
80
|
-
const d = c([]), w = {},
|
|
83
|
+
const d = c([]), w = {}, D = (t) => d.value.includes(t), W = async (t, e) => {
|
|
81
84
|
const n = d.value.indexOf(t);
|
|
82
85
|
if (n === -1) {
|
|
83
86
|
d.value.push(t);
|
|
84
|
-
const
|
|
85
|
-
await
|
|
87
|
+
const l = e.target.closest("tr");
|
|
88
|
+
await j(), l && (w[t] = l.offsetHeight);
|
|
86
89
|
} else
|
|
87
90
|
d.value.splice(n, 1), delete w[t];
|
|
88
|
-
},
|
|
89
|
-
() => `1 / span ${
|
|
91
|
+
}, X = s(() => `${o.rowHeight}px`), z = s(
|
|
92
|
+
() => `1 / span ${o.columns.length + 1}`
|
|
90
93
|
);
|
|
91
94
|
return {
|
|
92
95
|
list: R,
|
|
93
|
-
containerProps:
|
|
96
|
+
containerProps: i,
|
|
94
97
|
wrapperProps: b,
|
|
95
98
|
activeRow: y,
|
|
96
99
|
gridColumnTemplate: T,
|
|
97
|
-
floatingActionRef:
|
|
98
|
-
scrollToTop:
|
|
99
|
-
toggleSortOrder:
|
|
100
|
-
columnsStickyPositions:
|
|
101
|
-
hasSearchSlot:
|
|
102
|
-
showBackToTopButton:
|
|
103
|
-
containerStyle:
|
|
104
|
-
onScroll:
|
|
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,
|
|
105
109
|
savingRows: u,
|
|
106
110
|
floatingActionPosition: h,
|
|
107
111
|
hasExpandSlot: g,
|
|
108
112
|
hasCheckboxes: x,
|
|
109
|
-
toggleExpandRow:
|
|
110
|
-
isRowExpanded:
|
|
111
|
-
cssRowHeight:
|
|
112
|
-
cssExpandGridCol:
|
|
113
|
+
toggleExpandRow: W,
|
|
114
|
+
isRowExpanded: D,
|
|
115
|
+
cssRowHeight: X,
|
|
116
|
+
cssExpandGridCol: z,
|
|
113
117
|
activeMenuRow: C
|
|
114
118
|
};
|
|
115
119
|
};
|
|
116
120
|
export {
|
|
117
|
-
|
|
121
|
+
tt as tableCommon
|
|
118
122
|
};
|
|
@@ -49,7 +49,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
49
49
|
searchPlaceholder: string;
|
|
50
50
|
searchAutoFocus: boolean;
|
|
51
51
|
zIndexBase: number;
|
|
52
|
-
}>, {
|
|
52
|
+
}>, {
|
|
53
|
+
scrollTo: (index: number) => void;
|
|
54
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
53
55
|
"update:sort": (newSort: Sort) => void;
|
|
54
56
|
"update:search": (query: string) => void;
|
|
55
57
|
"update:selection": (selection: unknown[]) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./DataGrid.vue2.js";
|
|
2
2
|
/* empty css */import _ from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
-
// import "../../../DataGrid.
|
|
4
|
-
const s = /* @__PURE__ */ _(o, [["__scopeId", "data-v-
|
|
3
|
+
// import "../../../DataGrid.vue_vue_type_style_index_0_scoped_057abdf5_lang.css"; //*');
|
|
4
|
+
const s = /* @__PURE__ */ _(o, [["__scopeId", "data-v-057abdf5"]]);
|
|
5
5
|
export {
|
|
6
6
|
s as default
|
|
7
7
|
};
|