@ironsource/shared-ui 2.1.11-test.41 → 2.1.11-test.44
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/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_e43ac1c9_lang.css +1 -0
- package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_8f96cf5a_lang.css +1 -0
- package/DataGrid.vue_vue_type_style_index_0_scoped_26488faf_lang.css +1 -0
- package/DataGridMenu.vue_vue_type_style_index_0_scoped_ddfaf207_lang.css +1 -0
- package/DialogV4.vue_vue_type_style_index_0_scoped_37da643b_lang.css +1 -0
- package/DropdownV4.vue_vue_type_style_index_0_scoped_75002075_lang.css +1 -0
- package/EmptyStateV4.vue_vue_type_style_index_0_scoped_18728498_lang.css +1 -0
- package/FiltersPanelV4.vue_vue_type_style_index_0_scoped_383011d3_lang.css +1 -0
- package/FormCard.vue_vue_type_style_index_0_scoped_86feae7b_lang.css +1 -0
- package/SortableItem.vue_vue_type_style_index_0_scoped_7cb676f1_lang.css +1 -0
- package/SortableItemLabel.vue_vue_type_style_index_0_scoped_f2ced2f4_lang.css +1 -0
- package/SortableList.vue_vue_type_style_index_0_scoped_156c01ca_lang.css +1 -0
- package/ThemeWrapper.vue_vue_type_style_index_1_lang.css +1 -1
- package/TreeDropdown.vue_vue_type_style_index_0_scoped_a898b632_lang.css +1 -0
- package/Typography.vue_vue_type_style_index_0_scoped_a14013a5_lang.css +1 -0
- package/components/dialog/v4/DialogV4.vue.d.ts +5 -0
- package/components/dialog/v4/DialogV4.vue.js +3 -3
- package/components/dialog/v4/DialogV4.vue2.js +52 -49
- package/components/dialog/v4/index.d.ts +20 -1
- package/components/dropdown/common/Dropdown.common.js +36 -34
- package/components/dropdown/v4/ChipDropdownTrigger.vue.js +3 -3
- package/components/dropdown/v4/ChipDropdownTrigger.vue2.js +55 -40
- package/components/dropdown/v4/ConditionalDropdown.vue.d.ts +20 -0
- package/components/dropdown/v4/ConditionalDropdown.vue.js +4 -4
- package/components/dropdown/v4/ConditionalDropdown.vue2.js +136 -97
- package/components/dropdown/v4/DropdownV4.vue.d.ts +2 -0
- package/components/dropdown/v4/DropdownV4.vue.js +2 -2
- package/components/dropdown/v4/DropdownV4.vue2.js +7 -7
- package/components/dropdown/v4/TreeDropdown.vue.d.ts +5 -0
- package/components/dropdown/v4/TreeDropdown.vue.js +2 -2
- package/components/dropdown/v4/TreeDropdown.vue2.js +165 -158
- package/components/dropdown/v4/index.d.ts +67 -2
- package/components/emptyState/v4/EmptyStateV4.vue.js +3 -3
- package/components/emptyState/v4/EmptyStateV4.vue2.js +1 -1
- package/components/filtersPanel/v4/FiltersPanelV4.vue.js +3 -3
- package/components/filtersPanel/v4/FiltersPanelV4.vue2.js +1 -1
- package/components/forms/FormCard.vue.js +3 -3
- package/components/forms/FormCard.vue2.js +1 -1
- package/components/sortableList/SortableItem.vue.js +3 -3
- package/components/sortableList/SortableItem.vue2.js +57 -56
- package/components/sortableList/SortableItemLabel.vue.js +3 -3
- package/components/sortableList/SortableItemLabel.vue2.js +20 -23
- package/components/sortableList/SortableList.vue.js +3 -3
- package/components/sortableList/SortableList.vue2.js +82 -76
- package/components/table/common/Table.common.d.ts +1 -1
- package/components/table/common/Table.common.js +78 -70
- package/components/table/common/consts.d.ts +4 -0
- package/components/table/common/consts.js +7 -0
- package/components/table/v4/DataGrid.vue.d.ts +10 -5
- package/components/table/v4/DataGrid.vue.js +3 -3
- package/components/table/v4/DataGrid.vue2.js +173 -171
- package/components/table/v4/DataGridMenu.vue.js +5 -5
- package/components/table/v4/DataGridMenu.vue2.js +1 -1
- package/components/table/v4/index.d.ts +39 -20
- package/components/table-cells/common/Editable.common.js +24 -19
- package/components/typography/v4/Typography.vue.js +3 -3
- package/components/typography/v4/Typography.vue2.js +24 -18
- package/index.d.ts +252 -46
- package/index.js +1 -1
- package/package.json +1 -1
- package/style/v4/grid.css +1 -1
- package/style/v4/grid.css.map +1 -1
- package/style/v4/spacings.scss +1 -0
- package/testids/index.d.ts +1 -0
- package/testids/index.js +13 -13
- package/ChipDropdownTrigger.vue_vue_type_style_index_0_scoped_039dd922_lang.css +0 -1
- package/ConditionalDropdown.vue_vue_type_style_index_0_scoped_2aee12ad_lang.css +0 -1
- package/DataGrid.vue_vue_type_style_index_0_scoped_2406226b_lang.css +0 -1
- package/DataGridMenu.vue_vue_type_style_index_0_scoped_a6e4672f_lang.css +0 -1
- package/DialogV4.vue_vue_type_style_index_0_scoped_c65df8d7_lang.css +0 -1
- package/DropdownV4.vue_vue_type_style_index_0_scoped_6466948d_lang.css +0 -1
- package/EmptyStateV4.vue_vue_type_style_index_0_scoped_24001caa_lang.css +0 -1
- package/FiltersPanelV4.vue_vue_type_style_index_0_scoped_111b200a_lang.css +0 -1
- package/FormCard.vue_vue_type_style_index_0_scoped_c7965a69_lang.css +0 -1
- package/SortableItem.vue_vue_type_style_index_0_scoped_9dd4d372_lang.css +0 -1
- package/SortableItemLabel.vue_vue_type_style_index_0_scoped_1386ae20_lang.css +0 -1
- package/SortableList.vue_vue_type_style_index_0_scoped_e9cd63b8_lang.css +0 -1
- package/TreeDropdown.vue_vue_type_style_index_0_scoped_bdfb0aef_lang.css +0 -1
- package/Typography.vue_vue_type_style_index_0_scoped_992962bc_lang.css +0 -1
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import "../../SortableList.
|
|
2
|
-
import { VueDraggable as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { useVModel as
|
|
8
|
-
import { matchString as
|
|
9
|
-
import { useTestIdAttrs as
|
|
1
|
+
import "../../SortableList.vue_vue_type_style_index_0_scoped_156c01ca_lang.css"; import { defineComponent as G, useSlots as U, computed as p, ref as M, openBlock as s, createElementBlock as i, mergeProps as T, unref as l, createBlock as g, isRef as $, createCommentVNode as m, withCtx as y, Fragment as V, renderList as D, createSlots as w, renderSlot as S, createElementVNode as K, createVNode as x, createTextVNode as Q, toDisplayString as j } from "vue";
|
|
2
|
+
import { VueDraggable as z } from "vue-draggable-plus";
|
|
3
|
+
import q from "./SortableItem.vue.js";
|
|
4
|
+
import J from "../search/v4/SearchV4.vue.js";
|
|
5
|
+
import W from "../typography/v4/Typography.vue.js";
|
|
6
|
+
import X from "../skeleton/v4/SkeletonV4.vue.js";
|
|
7
|
+
import { useVModel as Y } from "@vueuse/core";
|
|
8
|
+
import { matchString as H } from "../../utils/search.js";
|
|
9
|
+
import { useTestIdAttrs as Z } from "../../utils/testIds.js";
|
|
10
10
|
import { SortableListTestIdModifiers as I } from "../../testids/index.js";
|
|
11
|
-
import { DRAG_CURSOR_CSS_CLASS as
|
|
12
|
-
const
|
|
11
|
+
import { DRAG_CURSOR_CSS_CLASS as O } from "./consts.js";
|
|
12
|
+
const _ = {
|
|
13
13
|
key: 1,
|
|
14
14
|
class: "sortable-list-container"
|
|
15
|
-
},
|
|
15
|
+
}, ee = { class: "loader-bars" }, te = {
|
|
16
16
|
key: 3,
|
|
17
17
|
class: "empty-state-title"
|
|
18
|
-
},
|
|
18
|
+
}, fe = /* @__PURE__ */ G({
|
|
19
19
|
__name: "SortableList",
|
|
20
20
|
props: {
|
|
21
21
|
items: { default: () => [] },
|
|
@@ -34,127 +34,133 @@ const X = {
|
|
|
34
34
|
},
|
|
35
35
|
emits: ["sortableItemDragged", "update:items", "update:openId", "update:selectedId", "update:selectedChildId", "update:search", "clearSearch"],
|
|
36
36
|
setup(d, { emit: o }) {
|
|
37
|
-
const
|
|
37
|
+
const r = d, R = U(), u = Y(r, "search", o), v = p(() => !!u.value?.trim()), C = p(() => v.value ? r.items.filter((t) => {
|
|
38
38
|
const a = t.children || [], e = u.value;
|
|
39
|
-
return
|
|
40
|
-
a.some((
|
|
41
|
-
}) :
|
|
39
|
+
return r.searchHandler ? r.searchHandler(t, e) : H(t.displayText, e) || // match parent item
|
|
40
|
+
a.some((n) => H(n.displayText, e));
|
|
41
|
+
}) : r.items), h = p({
|
|
42
42
|
get() {
|
|
43
43
|
return C.value.filter((t) => !t.isLocked);
|
|
44
44
|
},
|
|
45
45
|
set(t) {
|
|
46
|
-
o("update:items", [...t, ...
|
|
46
|
+
o("update:items", [...t, ...k.value]);
|
|
47
47
|
}
|
|
48
|
-
}),
|
|
48
|
+
}), k = p(
|
|
49
49
|
() => C.value.filter((t) => t.isLocked)
|
|
50
|
-
),
|
|
51
|
-
|
|
52
|
-
},
|
|
53
|
-
const { target: a, item: e, newIndex:
|
|
54
|
-
|
|
50
|
+
), b = M(!1), F = (t) => {
|
|
51
|
+
b.value = !0, setTimeout(() => t.target.classList.add(O), 50);
|
|
52
|
+
}, P = (t) => {
|
|
53
|
+
const { target: a, item: e, newIndex: n } = t;
|
|
54
|
+
b.value = !1, a.classList.remove(O);
|
|
55
55
|
const c = e.attributes["data-id"]?.value;
|
|
56
|
-
o("sortableItemDragged", { id: c, newIndex:
|
|
57
|
-
},
|
|
56
|
+
o("sortableItemDragged", { id: c, newIndex: n });
|
|
57
|
+
}, A = (t) => (v.value || t.id === r.openId) && !b.value, B = (t, a) => {
|
|
58
58
|
a ? o("update:openId", t.id) : o("update:openId", null);
|
|
59
|
-
},
|
|
59
|
+
}, f = (t) => t.id === r.selectedId, E = (t) => {
|
|
60
60
|
o("update:selectedId", t.id), o("update:selectedChildId", null);
|
|
61
|
-
},
|
|
61
|
+
}, N = (t, a) => {
|
|
62
62
|
o("update:selectedChildId", t.id), o("update:selectedId", a.id), o("update:openId", a.id);
|
|
63
|
-
}, L =
|
|
63
|
+
}, L = Z(r.testId, I);
|
|
64
64
|
return (t, a) => (s(), i("div", T({ class: "sortable-list-and-search-container" }, l(L)[l(I).CONTAINER]), [
|
|
65
|
-
d.showSearch ? (s(), g(l(
|
|
65
|
+
d.showSearch ? (s(), g(l(J), {
|
|
66
66
|
key: 0,
|
|
67
67
|
modelValue: l(u),
|
|
68
|
-
"onUpdate:modelValue": a[0] || (a[0] = (e) =>
|
|
68
|
+
"onUpdate:modelValue": a[0] || (a[0] = (e) => $(u) ? u.value = e : null),
|
|
69
69
|
class: "list-search",
|
|
70
70
|
placeholder: d.searchPlaceholder,
|
|
71
71
|
"test-id": d.testId,
|
|
72
72
|
onOnClear: a[1] || (a[1] = (e) => o("clearSearch"))
|
|
73
|
-
}, null, 8, ["modelValue", "placeholder", "test-id"])) :
|
|
73
|
+
}, null, 8, ["modelValue", "placeholder", "test-id"])) : m("", !0),
|
|
74
74
|
d.isLoading ? S(t.$slots, "loader", { key: 2 }, () => [
|
|
75
|
-
|
|
75
|
+
K("div", ee, [
|
|
76
76
|
(s(!0), i(V, null, D(d.loadingRowCount, (e) => (s(), i("div", { key: e }, [
|
|
77
|
-
|
|
77
|
+
x(l(X), {
|
|
78
78
|
round: "",
|
|
79
79
|
class: "loader-bar"
|
|
80
80
|
})
|
|
81
81
|
]))), 128))
|
|
82
82
|
])
|
|
83
|
-
], !0) : (s(), i("div",
|
|
84
|
-
l(h).length ? (s(), g(l(
|
|
83
|
+
], !0) : (s(), i("div", _, [
|
|
84
|
+
l(h).length ? (s(), g(l(z), T({
|
|
85
85
|
key: 0,
|
|
86
86
|
modelValue: l(h),
|
|
87
|
-
"onUpdate:modelValue": a[2] || (a[2] = (e) =>
|
|
87
|
+
"onUpdate:modelValue": a[2] || (a[2] = (e) => $(h) ? h.value = e : null),
|
|
88
88
|
class: "sortable-list",
|
|
89
89
|
filter: ".expand-icon",
|
|
90
90
|
animation: 150,
|
|
91
91
|
handle: ".draggable-handle",
|
|
92
92
|
disabled: l(v)
|
|
93
93
|
}, l(L)[l(I).DRAGGABLE_LIST], {
|
|
94
|
-
onStart:
|
|
95
|
-
onEnd:
|
|
94
|
+
onStart: F,
|
|
95
|
+
onEnd: P
|
|
96
96
|
}), {
|
|
97
|
-
default:
|
|
98
|
-
(s(!0), i(V, null, D(l(h), (e,
|
|
97
|
+
default: y(() => [
|
|
98
|
+
(s(!0), i(V, null, D(l(h), (e, n) => (s(), g(q, {
|
|
99
99
|
key: e.id,
|
|
100
100
|
"data-id": e.id,
|
|
101
101
|
item: e,
|
|
102
|
-
index:
|
|
103
|
-
"is-open":
|
|
104
|
-
"is-selected":
|
|
105
|
-
"selected-child-id":
|
|
102
|
+
index: n,
|
|
103
|
+
"is-open": A(e),
|
|
104
|
+
"is-selected": f(e),
|
|
105
|
+
"selected-child-id": f(e) ? d.selectedChildId : null,
|
|
106
106
|
"display-value": d.displayValue,
|
|
107
107
|
"search-query": l(u),
|
|
108
108
|
"search-handler": d.searchHandler,
|
|
109
|
-
onToggle: (c) =>
|
|
110
|
-
onSelect: (c) =>
|
|
111
|
-
onSelectChild: (c) =>
|
|
112
|
-
}, {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
109
|
+
onToggle: (c) => B(e, c),
|
|
110
|
+
onSelect: (c) => E(e),
|
|
111
|
+
onSelectChild: (c) => N(c, e)
|
|
112
|
+
}, w({ _: 2 }, [
|
|
113
|
+
l(R).menu ? {
|
|
114
|
+
name: "menu",
|
|
115
|
+
fn: y(() => [
|
|
116
|
+
S(t.$slots, "menu", { item: e }, void 0, !0)
|
|
117
|
+
]),
|
|
118
|
+
key: "0"
|
|
119
|
+
} : void 0
|
|
120
|
+
]), 1032, ["data-id", "item", "index", "is-open", "is-selected", "selected-child-id", "display-value", "search-query", "search-handler", "onToggle", "onSelect", "onSelectChild"]))), 128))
|
|
118
121
|
]),
|
|
119
122
|
_: 3
|
|
120
|
-
}, 16, ["modelValue", "disabled"])) :
|
|
121
|
-
l(
|
|
123
|
+
}, 16, ["modelValue", "disabled"])) : m("", !0),
|
|
124
|
+
l(k).length ? (s(), i("div", T({
|
|
122
125
|
key: 1,
|
|
123
126
|
class: "locked-list"
|
|
124
127
|
}, l(L)[l(I).LOCKED_LIST]), [
|
|
125
|
-
(s(!0), i(V, null, D(l(
|
|
128
|
+
(s(!0), i(V, null, D(l(k), (e) => (s(), g(q, {
|
|
126
129
|
key: e.id,
|
|
127
130
|
item: e,
|
|
128
|
-
"is-open":
|
|
129
|
-
"is-selected":
|
|
130
|
-
"selected-child-id":
|
|
131
|
+
"is-open": A(e),
|
|
132
|
+
"is-selected": f(e),
|
|
133
|
+
"selected-child-id": f(e) ? d.selectedChildId : null,
|
|
131
134
|
"display-value": d.displayValue,
|
|
132
135
|
"search-query": l(u),
|
|
133
136
|
"on-search": d.searchHandler,
|
|
134
|
-
onToggle: (
|
|
135
|
-
onSelect: (
|
|
136
|
-
onSelectChild: (
|
|
137
|
-
}, {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
137
|
+
onToggle: (n) => B(e, n),
|
|
138
|
+
onSelect: (n) => E(e),
|
|
139
|
+
onSelectChild: (n) => N(n, e)
|
|
140
|
+
}, w({ _: 2 }, [
|
|
141
|
+
l(R).menu ? {
|
|
142
|
+
name: "menu",
|
|
143
|
+
fn: y(() => [
|
|
144
|
+
S(t.$slots, "menu", { item: e }, void 0, !0)
|
|
145
|
+
]),
|
|
146
|
+
key: "0"
|
|
147
|
+
} : void 0
|
|
148
|
+
]), 1032, ["item", "is-open", "is-selected", "selected-child-id", "display-value", "search-query", "on-search", "onToggle", "onSelect", "onSelectChild"]))), 128))
|
|
149
|
+
], 16)) : m("", !0)
|
|
144
150
|
])),
|
|
145
|
-
!l(C).length && !d.isLoading ? (s(), i("div",
|
|
151
|
+
!l(C).length && !d.isLoading ? (s(), i("div", te, [
|
|
146
152
|
S(t.$slots, "empty-state", {}, () => [
|
|
147
|
-
|
|
148
|
-
default:
|
|
149
|
-
|
|
153
|
+
x(l(W), { variant: "body2" }, {
|
|
154
|
+
default: y(() => [
|
|
155
|
+
Q(j(d.emptyStateTitle), 1)
|
|
150
156
|
]),
|
|
151
157
|
_: 1
|
|
152
158
|
})
|
|
153
159
|
], !0)
|
|
154
|
-
])) :
|
|
160
|
+
])) : m("", !0)
|
|
155
161
|
], 16));
|
|
156
162
|
}
|
|
157
163
|
});
|
|
158
164
|
export {
|
|
159
|
-
|
|
165
|
+
fe as default
|
|
160
166
|
};
|
|
@@ -19,7 +19,7 @@ export declare const tableCommon: (props: any, emit: any) => {
|
|
|
19
19
|
floatingActionRef: import("vue").Ref<HTMLDivElement>;
|
|
20
20
|
scrollToTop: () => void;
|
|
21
21
|
toggleSortOrder: (column: Column) => void;
|
|
22
|
-
columnsStickyPositions: import("vue").ComputedRef<Record<string,
|
|
22
|
+
columnsStickyPositions: import("vue").ComputedRef<Record<string, CSSProperties>>;
|
|
23
23
|
hasSearchSlot: import("vue").ComputedRef<boolean>;
|
|
24
24
|
showBackToTopButton: import("vue").ComputedRef<boolean>;
|
|
25
25
|
containerStyle: import("vue").ComputedRef<CSSProperties>;
|
|
@@ -1,123 +1,131 @@
|
|
|
1
|
-
import { useSlots as
|
|
2
|
-
import { useVirtualList as
|
|
3
|
-
import { TableContext as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
V(
|
|
7
|
-
|
|
1
|
+
import { useSlots as V, ref as a, provide as Y, computed as n, onMounted as j, nextTick as q } from "vue";
|
|
2
|
+
import { useVirtualList as F, useInfiniteScroll as J } from "@vueuse/core";
|
|
3
|
+
import { TableContext as Q } from "./TableContext.js";
|
|
4
|
+
import { CHECKBOX_STICKY_COL_WIDTH as Z, CHECKBOX_COL_WIDTH as p, EXPAND_COL_WIDTH as tt, CHECKBOX_COLUMN_ID as et } from "./consts.js";
|
|
5
|
+
const rt = (e, d) => {
|
|
6
|
+
const x = V(), u = a([]);
|
|
7
|
+
Y(Q, {
|
|
8
|
+
onClose({ rowIndex: t, cellIndex: o, value: i } = {}) {
|
|
8
9
|
u.value = [...u.value, t], d("saveRow", {
|
|
9
10
|
rowIndex: t,
|
|
10
11
|
cellIndex: o,
|
|
11
|
-
value:
|
|
12
|
+
value: i,
|
|
12
13
|
confirm: () => {
|
|
13
|
-
u.value = u.value.filter((
|
|
14
|
+
u.value = u.value.filter((l) => l !== t);
|
|
14
15
|
}
|
|
15
16
|
});
|
|
16
17
|
},
|
|
17
18
|
setActiveMenuRow(t) {
|
|
18
|
-
|
|
19
|
+
R.value = t;
|
|
19
20
|
}
|
|
20
21
|
});
|
|
21
|
-
const
|
|
22
|
-
const t = (
|
|
23
|
-
return e.columns.reduce((o, { width:
|
|
24
|
-
const
|
|
25
|
-
return `${o} ${
|
|
22
|
+
const h = n(() => !!e.selection), T = n(() => e.isSelectionSticky ? Z : p), b = n(() => {
|
|
23
|
+
const t = (h.value ? `${T.value}px ` : "") + (v.value ? `${tt}px ` : "");
|
|
24
|
+
return e.columns.reduce((o, { width: i, colSpan: l }) => {
|
|
25
|
+
const s = typeof i == "number" ? `${i}px` : i, S = s || `${l || 1}fr`;
|
|
26
|
+
return `${o} ${S}`;
|
|
26
27
|
}, t);
|
|
27
|
-
}),
|
|
28
|
+
}), v = n(() => !!x.expanded), O = a(null), R = a(null), k = n(() => Array(e.loadingRowCount).fill(
|
|
28
29
|
Array(e.columns.length).fill("")
|
|
29
|
-
)),
|
|
30
|
+
)), I = n(() => e.rows.length && Array.isArray(e.rows[0]) ? e.isLoading ? [...e.rows, ...k.value] : e.rows : e.isLoading ? [
|
|
30
31
|
...e.rows.map((o) => o[e.rowDataKey]),
|
|
31
|
-
...
|
|
32
|
-
] : e.rows.map((o) => o[e.rowDataKey])), { list:
|
|
33
|
-
|
|
32
|
+
...k.value
|
|
33
|
+
] : e.rows.map((o) => o[e.rowDataKey])), { list: H, containerProps: r, wrapperProps: A, scrollTo: B } = F(
|
|
34
|
+
I,
|
|
34
35
|
{
|
|
35
|
-
itemHeight:
|
|
36
|
+
itemHeight: v.value ? (t) => m[t] ?? e.rowHeight : e.rowHeight
|
|
36
37
|
}
|
|
37
|
-
), $ = a(null),
|
|
38
|
-
|
|
38
|
+
), $ = a(null), w = a(0), L = n(() => !!x.search), _ = (t) => {
|
|
39
|
+
r.onScroll(), w.value = t.target.scrollLeft + t.target.getBoundingClientRect().width, d("onScroll", t.target.scrollTop);
|
|
39
40
|
};
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
j(() => {
|
|
42
|
+
w.value = r.ref.value?.getBoundingClientRect().width, e.defaultScrollPosition && setTimeout(() => {
|
|
43
|
+
r.ref.value?.scrollTo({
|
|
43
44
|
top: e.defaultScrollPosition,
|
|
44
45
|
behavior: "smooth"
|
|
45
46
|
});
|
|
46
47
|
}, 300);
|
|
47
48
|
});
|
|
48
|
-
const
|
|
49
|
-
const [t] =
|
|
49
|
+
const E = n(() => {
|
|
50
|
+
const [t] = H.value;
|
|
50
51
|
return t && t.index > 0;
|
|
51
|
-
}),
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
}), P = n(() => r.style), D = n(() => {
|
|
53
|
+
const t = {
|
|
54
|
+
id: et,
|
|
55
|
+
isSticky: e.isSelectionSticky,
|
|
56
|
+
width: T.value
|
|
57
|
+
};
|
|
58
|
+
return h.value ? [t] : [];
|
|
59
|
+
}), f = n(() => [...D.value, ...e.columns]), K = n(() => f.value.reduce((t, o) => (o.isSticky && (t[o.id] = X(o)), t), {}));
|
|
60
|
+
J(
|
|
61
|
+
r.ref,
|
|
54
62
|
() => {
|
|
55
63
|
e.isInfiniteScroll && d("loadMore");
|
|
56
64
|
},
|
|
57
65
|
{ distance: e.infiniteScrollThreshold }
|
|
58
66
|
);
|
|
59
|
-
function
|
|
60
|
-
|
|
67
|
+
function M() {
|
|
68
|
+
r.ref.value?.scrollTo({
|
|
61
69
|
top: 0,
|
|
62
70
|
behavior: "smooth"
|
|
63
71
|
});
|
|
64
72
|
}
|
|
65
|
-
function
|
|
73
|
+
function W(t) {
|
|
66
74
|
if (!e.sort)
|
|
67
75
|
return;
|
|
68
76
|
const o = e.sort.sortBy === t.id;
|
|
69
77
|
if (!(t.isSortable || t.isSortable === void 0))
|
|
70
78
|
return;
|
|
71
|
-
let
|
|
72
|
-
o ?
|
|
79
|
+
let l = e.sort.sortOrder, s = e.sort.sortBy;
|
|
80
|
+
o ? l = e.sort.sortOrder === "asc" ? "desc" : "asc" : s = t.id, d("update:sort", { sortBy: s, sortOrder: l });
|
|
73
81
|
}
|
|
74
|
-
function
|
|
75
|
-
const { isSticky: o, width:
|
|
76
|
-
if (!o || !
|
|
82
|
+
function X(t) {
|
|
83
|
+
const { isSticky: o, width: i } = t;
|
|
84
|
+
if (!o || !i)
|
|
77
85
|
return null;
|
|
78
|
-
const
|
|
86
|
+
const l = f.value.findIndex((c) => c.id === t.id), s = f.value.reduce((c, C, y) => y < l ? c + C.width : c, 0), S = f.value.reduce((c, C, y) => y > l ? c + C.width : c, 0);
|
|
79
87
|
return {
|
|
80
|
-
...t.isStickyRight ? { right: `${
|
|
88
|
+
...t.isStickyRight ? { right: `${S}px` } : { left: `${s}px` },
|
|
81
89
|
zIndex: 1
|
|
82
90
|
};
|
|
83
91
|
}
|
|
84
|
-
const
|
|
85
|
-
const
|
|
86
|
-
if (
|
|
87
|
-
|
|
88
|
-
const
|
|
89
|
-
await
|
|
92
|
+
const g = a([]), m = {}, N = (t) => g.value.includes(t), z = async (t, o) => {
|
|
93
|
+
const i = g.value.indexOf(t);
|
|
94
|
+
if (i === -1) {
|
|
95
|
+
g.value.push(t);
|
|
96
|
+
const l = o.target.closest("tr");
|
|
97
|
+
await q(), l && (m[t] = l.offsetHeight);
|
|
90
98
|
} else
|
|
91
|
-
|
|
92
|
-
},
|
|
99
|
+
g.value.splice(i, 1), delete m[t];
|
|
100
|
+
}, G = n(() => `${e.rowHeight}px`), U = n(
|
|
93
101
|
() => `1 / span ${e.columns.length + 1}`
|
|
94
102
|
);
|
|
95
103
|
return {
|
|
96
|
-
list:
|
|
97
|
-
containerProps:
|
|
98
|
-
wrapperProps:
|
|
99
|
-
activeRow:
|
|
104
|
+
list: H,
|
|
105
|
+
containerProps: r,
|
|
106
|
+
wrapperProps: A,
|
|
107
|
+
activeRow: O,
|
|
100
108
|
gridColumnTemplate: b,
|
|
101
109
|
floatingActionRef: $,
|
|
102
|
-
scrollToTop:
|
|
103
|
-
toggleSortOrder:
|
|
104
|
-
columnsStickyPositions:
|
|
105
|
-
hasSearchSlot:
|
|
106
|
-
showBackToTopButton:
|
|
107
|
-
containerStyle:
|
|
108
|
-
onScroll:
|
|
109
|
-
scrollTo:
|
|
110
|
+
scrollToTop: M,
|
|
111
|
+
toggleSortOrder: W,
|
|
112
|
+
columnsStickyPositions: K,
|
|
113
|
+
hasSearchSlot: L,
|
|
114
|
+
showBackToTopButton: E,
|
|
115
|
+
containerStyle: P,
|
|
116
|
+
onScroll: _,
|
|
117
|
+
scrollTo: B,
|
|
110
118
|
savingRows: u,
|
|
111
|
-
floatingActionPosition:
|
|
112
|
-
hasExpandSlot:
|
|
113
|
-
hasCheckboxes:
|
|
114
|
-
toggleExpandRow:
|
|
115
|
-
isRowExpanded:
|
|
116
|
-
cssRowHeight:
|
|
117
|
-
cssExpandGridCol:
|
|
118
|
-
activeMenuRow:
|
|
119
|
+
floatingActionPosition: w,
|
|
120
|
+
hasExpandSlot: v,
|
|
121
|
+
hasCheckboxes: h,
|
|
122
|
+
toggleExpandRow: z,
|
|
123
|
+
isRowExpanded: N,
|
|
124
|
+
cssRowHeight: G,
|
|
125
|
+
cssExpandGridCol: U,
|
|
126
|
+
activeMenuRow: R
|
|
119
127
|
};
|
|
120
128
|
};
|
|
121
129
|
export {
|
|
122
|
-
|
|
130
|
+
rt as tableCommon
|
|
123
131
|
};
|
|
@@ -11,7 +11,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
11
11
|
selectedMatcher?: (rowId: unknown, selected: unknown) => boolean;
|
|
12
12
|
isSticky?: boolean;
|
|
13
13
|
isStickyHeader?: boolean;
|
|
14
|
-
isSelectionSticky?: boolean;
|
|
15
14
|
isLoading?: boolean;
|
|
16
15
|
emptyStateVariant?: "error" | "no-access" | "no-results" | "no-data" | "files" | "settings";
|
|
17
16
|
emptyStateTitle?: string;
|
|
@@ -29,12 +28,13 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
29
28
|
zIndexBase?: number;
|
|
30
29
|
rowCustomClassKey?: string;
|
|
31
30
|
rowDataKey?: string;
|
|
31
|
+
isSelectionSticky?: boolean;
|
|
32
|
+
isSelectionBordered?: boolean;
|
|
32
33
|
}>, {
|
|
33
34
|
title: string;
|
|
34
35
|
sort: any;
|
|
35
36
|
isSticky: boolean;
|
|
36
37
|
isStickyHeader: boolean;
|
|
37
|
-
isSelectionSticky: boolean;
|
|
38
38
|
sections: any;
|
|
39
39
|
isLoading: boolean;
|
|
40
40
|
emptyStateVariant: any;
|
|
@@ -57,6 +57,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
57
57
|
zIndexBase: number;
|
|
58
58
|
rowCustomClassKey: string;
|
|
59
59
|
rowDataKey: string;
|
|
60
|
+
isSelectionSticky: boolean;
|
|
61
|
+
isSelectionBordered: boolean;
|
|
60
62
|
}>, {
|
|
61
63
|
scrollTo: (index: number) => void;
|
|
62
64
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -82,7 +84,6 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
82
84
|
selectedMatcher?: (rowId: unknown, selected: unknown) => boolean;
|
|
83
85
|
isSticky?: boolean;
|
|
84
86
|
isStickyHeader?: boolean;
|
|
85
|
-
isSelectionSticky?: boolean;
|
|
86
87
|
isLoading?: boolean;
|
|
87
88
|
emptyStateVariant?: "error" | "no-access" | "no-results" | "no-data" | "files" | "settings";
|
|
88
89
|
emptyStateTitle?: string;
|
|
@@ -100,12 +101,13 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
100
101
|
zIndexBase?: number;
|
|
101
102
|
rowCustomClassKey?: string;
|
|
102
103
|
rowDataKey?: string;
|
|
104
|
+
isSelectionSticky?: boolean;
|
|
105
|
+
isSelectionBordered?: boolean;
|
|
103
106
|
}>, {
|
|
104
107
|
title: string;
|
|
105
108
|
sort: any;
|
|
106
109
|
isSticky: boolean;
|
|
107
110
|
isStickyHeader: boolean;
|
|
108
|
-
isSelectionSticky: boolean;
|
|
109
111
|
sections: any;
|
|
110
112
|
isLoading: boolean;
|
|
111
113
|
emptyStateVariant: any;
|
|
@@ -128,6 +130,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
128
130
|
zIndexBase: number;
|
|
129
131
|
rowCustomClassKey: string;
|
|
130
132
|
rowDataKey: string;
|
|
133
|
+
isSelectionSticky: boolean;
|
|
134
|
+
isSelectionBordered: boolean;
|
|
131
135
|
}>>> & {
|
|
132
136
|
onSelectAll?: (value: boolean) => any;
|
|
133
137
|
onLoadMore?: () => any;
|
|
@@ -162,11 +166,12 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
162
166
|
getRowId: (row: Row, index: number) => unknown;
|
|
163
167
|
getRowKey: (row: Row, index: number) => string | number;
|
|
164
168
|
selectedMatcher: (rowId: unknown, selected: unknown) => boolean;
|
|
165
|
-
isSelectionSticky: boolean;
|
|
166
169
|
emptyStateVariant: "error" | "no-access" | "no-results" | "no-data" | "files" | "settings";
|
|
167
170
|
zIndexBase: number;
|
|
168
171
|
rowCustomClassKey: string;
|
|
169
172
|
rowDataKey: string;
|
|
173
|
+
isSelectionSticky: boolean;
|
|
174
|
+
isSelectionBordered: boolean;
|
|
170
175
|
}>, Partial<Record<`section-${string}`, (_: {}) => any>> & Partial<Record<`header-${string}`, (_: {
|
|
171
176
|
column: Column;
|
|
172
177
|
}) => any>> & Partial<Record<`cell-${string}`, (_: {
|
|
@@ -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
|
|
3
|
+
// import "../../../DataGrid.vue_vue_type_style_index_0_scoped_26488faf_lang.css"; //*');
|
|
4
|
+
const s = /* @__PURE__ */ _(o, [["__scopeId", "data-v-26488faf"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
s as default
|
|
7
7
|
};
|