@vtable-guild/vtable-guild 2.9.0-alpha.3 → 2.9.0-alpha.5
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/css/index.css +17 -0
- package/css/presets/antdv.css +10 -5
- package/css/presets/element-plus.css +9 -4
- package/css/style.css +83 -84
- package/css/tailwind3-utilities.css +35 -44
- package/css/tailwind3.css +48 -40
- package/css/tailwind4.css +48 -40
- package/css/transitions.css +12 -31
- package/dist/css/index.css +17 -0
- package/dist/css/presets/antdv.css +10 -5
- package/dist/css/presets/element-plus.css +9 -4
- package/dist/css/style.css +83 -84
- package/dist/css/tailwind3-utilities.css +35 -44
- package/dist/css/tailwind3.css +48 -40
- package/dist/css/tailwind4.css +48 -40
- package/dist/css/transitions.css +12 -31
- package/dist/index.full.mjs +5297 -5255
- package/dist/table/src/components/FilterDropdown.d.ts +23 -23
- package/dist/table/src/components/FilterDropdown.d.ts.map +1 -1
- package/dist/table/src/components/FilterDropdown.mjs +163 -175
- package/dist/table/src/components/PaginationSizeSelect.d.ts.map +1 -1
- package/dist/table/src/components/PaginationSizeSelect.mjs +85 -95
- package/dist/table/src/components/SelectionDropdown.d.ts +0 -27
- package/dist/table/src/components/SelectionDropdown.d.ts.map +1 -1
- package/dist/table/src/components/SelectionDropdown.mjs +31 -56
- package/dist/table/src/components/Table.d.ts +1 -1
- package/dist/table/src/components/TableColumnSettings.d.ts.map +1 -1
- package/dist/table/src/components/TableColumnSettings.mjs +212 -236
- package/dist/table/src/components/TableHeaderCell.d.ts.map +1 -1
- package/dist/table/src/components/TableHeaderCell.mjs +272 -278
- package/dist/table/src/components/TablePopup.d.ts +77 -0
- package/dist/table/src/components/TablePopup.d.ts.map +1 -0
- package/dist/table/src/components/TablePopup.mjs +104 -0
- package/dist/table/src/components/TablePopup.test.d.ts +2 -0
- package/dist/table/src/components/TablePopup.test.d.ts.map +1 -0
- package/dist/table/src/components/VTableHeaderAlignment.test.d.ts +2 -0
- package/dist/table/src/components/VTableHeaderAlignment.test.d.ts.map +1 -0
- package/dist/table/src/composables/useHeaderTitleBalance.d.ts +7 -0
- package/dist/table/src/composables/useHeaderTitleBalance.d.ts.map +1 -0
- package/dist/table/src/composables/useHeaderTitleBalance.mjs +50 -0
- package/dist/table/src/composables/useHeaderTitleBalance.test.d.ts +2 -0
- package/dist/table/src/composables/useHeaderTitleBalance.test.d.ts.map +1 -0
- package/dist/table/src/preset-config.d.ts +2 -0
- package/dist/table/src/preset-config.d.ts.map +1 -1
- package/dist/table/src/preset-config.mjs +12 -10
- package/dist/table/src/utils/popupPosition.d.ts +1 -6
- package/dist/table/src/utils/popupPosition.d.ts.map +1 -1
- package/dist/table/src/utils/popupPosition.mjs +22 -26
- package/dist/theme/src/column-settings.d.ts +8 -8
- package/dist/theme/src/column-settings.d.ts.map +1 -1
- package/dist/theme/src/column-settings.mjs +16 -18
- package/dist/theme/src/pagination.d.ts +2 -2
- package/dist/theme/src/pagination.d.ts.map +1 -1
- package/dist/theme/src/pagination.mjs +7 -8
- package/dist/theme/src/presets/antdv/table.d.ts +6 -6
- package/dist/theme/src/presets/antdv/table.d.ts.map +1 -1
- package/dist/theme/src/presets/antdv/table.mjs +9 -19
- package/dist/theme/src/presets/element-plus/table.d.ts +6 -6
- package/dist/theme/src/presets/element-plus/table.d.ts.map +1 -1
- package/dist/theme/src/presets/element-plus/table.mjs +9 -20
- package/package.json +1 -1
|
@@ -13,18 +13,17 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
13
13
|
type: BooleanConstructor;
|
|
14
14
|
default: boolean;
|
|
15
15
|
};
|
|
16
|
-
|
|
17
|
-
type: PropType<
|
|
18
|
-
|
|
19
|
-
left: number;
|
|
20
|
-
right: number;
|
|
21
|
-
bottom: number;
|
|
22
|
-
}>;
|
|
23
|
-
required: true;
|
|
16
|
+
anchor: {
|
|
17
|
+
type: PropType<HTMLElement | null>;
|
|
18
|
+
default: null;
|
|
24
19
|
};
|
|
25
|
-
|
|
26
|
-
type: PropType<
|
|
27
|
-
default:
|
|
20
|
+
focusAnchor: {
|
|
21
|
+
type: PropType<HTMLElement | null>;
|
|
22
|
+
default: null;
|
|
23
|
+
};
|
|
24
|
+
getPopupContainer: {
|
|
25
|
+
type: PropType<(anchor: HTMLElement) => HTMLElement | string>;
|
|
26
|
+
default: undefined;
|
|
28
27
|
};
|
|
29
28
|
filterSearch: {
|
|
30
29
|
type: PropType<boolean | ((input: string, filter: ColumnFilterItem) => boolean)>;
|
|
@@ -55,18 +54,17 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
55
54
|
type: BooleanConstructor;
|
|
56
55
|
default: boolean;
|
|
57
56
|
};
|
|
58
|
-
|
|
59
|
-
type: PropType<
|
|
60
|
-
|
|
61
|
-
left: number;
|
|
62
|
-
right: number;
|
|
63
|
-
bottom: number;
|
|
64
|
-
}>;
|
|
65
|
-
required: true;
|
|
57
|
+
anchor: {
|
|
58
|
+
type: PropType<HTMLElement | null>;
|
|
59
|
+
default: null;
|
|
66
60
|
};
|
|
67
|
-
|
|
68
|
-
type: PropType<
|
|
69
|
-
default:
|
|
61
|
+
focusAnchor: {
|
|
62
|
+
type: PropType<HTMLElement | null>;
|
|
63
|
+
default: null;
|
|
64
|
+
};
|
|
65
|
+
getPopupContainer: {
|
|
66
|
+
type: PropType<(anchor: HTMLElement) => HTMLElement | string>;
|
|
67
|
+
default: undefined;
|
|
70
68
|
};
|
|
71
69
|
filterSearch: {
|
|
72
70
|
type: PropType<boolean | ((input: string, filter: ColumnFilterItem) => boolean)>;
|
|
@@ -90,12 +88,14 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
90
88
|
onConfirm?: ((...args: any[]) => any) | undefined;
|
|
91
89
|
"onUpdate:expandedKeys"?: ((...args: any[]) => any) | undefined;
|
|
92
90
|
}>, {
|
|
91
|
+
anchor: HTMLElement | null;
|
|
93
92
|
visible: boolean;
|
|
94
93
|
multiple: boolean;
|
|
95
94
|
filterSearch: boolean | ((input: string, filter: ColumnFilterItem) => boolean);
|
|
96
95
|
filterMode: "tree" | "menu";
|
|
96
|
+
getPopupContainer: (anchor: HTMLElement) => HTMLElement | string;
|
|
97
|
+
focusAnchor: HTMLElement | null;
|
|
97
98
|
selectedKeys: (string | number | boolean)[];
|
|
98
|
-
popupContainer: string | HTMLElement;
|
|
99
99
|
expandedKeys: Set<string | number | boolean> | null;
|
|
100
100
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
101
101
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterDropdown.d.ts","sourceRoot":"","sources":["../../../../../table/src/components/FilterDropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"FilterDropdown.d.ts","sourceRoot":"","sources":["../../../../../table/src/components/FilterDropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,QAAQ,EAEd,MAAM,KAAK,CAAA;AAGZ,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;;;cAkClB,QAAQ,CAAC,gBAAgB,EAAE,CAAC;;;;cACvB,QAAQ,CAAC,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,EAAE,CAAC;;;;;;;;cAGpD,QAAQ,CAAC,WAAW,GAAG,IAAI,CAAC;;;;cAI5B,QAAQ,CAAC,WAAW,GAAG,IAAI,CAAC;;;;cAI1B,QAAQ,CAAC,CAAC,MAAM,EAAE,WAAW,KAAK,WAAW,GAAG,MAAM,CAAC;;;;cAI5C,QAAQ,CACnC,OAAO,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,KAAK,OAAO,CAAC,CACjE;;;;cAIe,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC;;;;cAIzB,QAAQ,CAAC,GAAG,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,GAAG,IAAI,CAAC;;;;;;;;;cA1BvC,QAAQ,CAAC,gBAAgB,EAAE,CAAC;;;;cACvB,QAAQ,CAAC,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,EAAE,CAAC;;;;;;;;cAGpD,QAAQ,CAAC,WAAW,GAAG,IAAI,CAAC;;;;cAI5B,QAAQ,CAAC,WAAW,GAAG,IAAI,CAAC;;;;cAI1B,QAAQ,CAAC,CAAC,MAAM,EAAE,WAAW,KAAK,WAAW,GAAG,MAAM,CAAC;;;;cAI5C,QAAQ,CACnC,OAAO,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,KAAK,OAAO,CAAC,CACjE;;;;cAIe,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAC;;;;cAIzB,QAAQ,CAAC,GAAG,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,GAAG,IAAI,CAAC;;;;;;;;;;;;;;;;qCAT1C,MAAM,UAAU,gBAAgB,KAAK,OAAO;;gCAL7B,WAAW,KAAK,WAAW,GAAG,MAAM;;;;;AAf9E,wBA2gBE"}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { TABLE_CONTEXT_KEY as
|
|
10
|
-
import
|
|
11
|
-
function
|
|
1
|
+
import { defineComponent as le, inject as ne, ref as C, onMounted as re, watch as oe, computed as f, createVNode as r, Transition as se } from "vue";
|
|
2
|
+
import P from "../../../core/src/components/Checkbox.mjs";
|
|
3
|
+
import ae from "../../../core/src/components/Radio.mjs";
|
|
4
|
+
import H from "../../../core/src/components/Button.mjs";
|
|
5
|
+
import ie from "../../../core/src/components/Input.mjs";
|
|
6
|
+
import W from "../../../core/src/components/Scrollbar.mjs";
|
|
7
|
+
import ue from "../../../icons/src/CaretDownIcon.mjs";
|
|
8
|
+
import ce from "../../../icons/src/SearchIcon.mjs";
|
|
9
|
+
import { TABLE_CONTEXT_KEY as de } from "../context.mjs";
|
|
10
|
+
import fe from "./TablePopup.mjs";
|
|
11
|
+
function w(n) {
|
|
12
12
|
const i = [];
|
|
13
13
|
for (const t of n)
|
|
14
|
-
i.push(t.value), t.children?.length && i.push(...
|
|
14
|
+
i.push(t.value), t.children?.length && i.push(...w(t.children));
|
|
15
15
|
return i;
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function _(n, i) {
|
|
18
18
|
for (const t of n)
|
|
19
|
-
t.children?.length && (
|
|
19
|
+
t.children?.length && (_(t.children, i), t.children.every((c) => i.has(c.value)) ? i.add(t.value) : i.delete(t.value));
|
|
20
20
|
}
|
|
21
|
-
const
|
|
21
|
+
const xe = /* @__PURE__ */ le({
|
|
22
22
|
name: "FilterDropdown",
|
|
23
23
|
props: {
|
|
24
24
|
filters: {
|
|
@@ -33,13 +33,17 @@ const ke = /* @__PURE__ */ ae({
|
|
|
33
33
|
type: Boolean,
|
|
34
34
|
default: !0
|
|
35
35
|
},
|
|
36
|
-
|
|
36
|
+
anchor: {
|
|
37
37
|
type: Object,
|
|
38
|
-
|
|
38
|
+
default: null
|
|
39
|
+
},
|
|
40
|
+
focusAnchor: {
|
|
41
|
+
type: Object,
|
|
42
|
+
default: null
|
|
39
43
|
},
|
|
40
|
-
|
|
41
|
-
type:
|
|
42
|
-
default:
|
|
44
|
+
getPopupContainer: {
|
|
45
|
+
type: Function,
|
|
46
|
+
default: void 0
|
|
43
47
|
},
|
|
44
48
|
filterSearch: {
|
|
45
49
|
type: [Boolean, Function],
|
|
@@ -62,8 +66,8 @@ const ke = /* @__PURE__ */ ae({
|
|
|
62
66
|
setup(n, {
|
|
63
67
|
emit: i
|
|
64
68
|
}) {
|
|
65
|
-
const t =
|
|
66
|
-
|
|
69
|
+
const t = ne(de, {}), a = C([...n.selectedKeys]), c = C(""), d = C(/* @__PURE__ */ new Set());
|
|
70
|
+
re(() => {
|
|
67
71
|
if (n.expandedKeys)
|
|
68
72
|
d.value = new Set(n.expandedKeys);
|
|
69
73
|
else {
|
|
@@ -76,249 +80,233 @@ const ke = /* @__PURE__ */ ae({
|
|
|
76
80
|
d.value = new Set(e(n.filters)), i("update:expandedKeys", d.value);
|
|
77
81
|
}
|
|
78
82
|
});
|
|
79
|
-
function
|
|
83
|
+
function N(e) {
|
|
80
84
|
d.value.has(e) ? d.value.delete(e) : d.value.add(e), i("update:expandedKeys", d.value);
|
|
81
85
|
}
|
|
82
|
-
function
|
|
86
|
+
function E(e) {
|
|
83
87
|
return d.value.has(e);
|
|
84
88
|
}
|
|
85
|
-
function
|
|
89
|
+
function O(e) {
|
|
86
90
|
const o = e.style;
|
|
87
91
|
o.height = "0", o.overflow = "hidden", o.opacity = "0";
|
|
88
92
|
}
|
|
89
|
-
function
|
|
93
|
+
function R(e, o) {
|
|
90
94
|
const l = e, s = l.scrollHeight, u = l.style;
|
|
91
95
|
u.transition = "height 0.2s ease, opacity 0.2s ease", l.offsetHeight, u.height = `${s}px`, u.opacity = "1", l.addEventListener("transitionend", o, {
|
|
92
96
|
once: !0
|
|
93
97
|
});
|
|
94
98
|
}
|
|
95
|
-
function
|
|
99
|
+
function j(e) {
|
|
96
100
|
e.style.cssText = "";
|
|
97
101
|
}
|
|
98
|
-
function
|
|
102
|
+
function $(e) {
|
|
99
103
|
const o = e, l = o.style;
|
|
100
104
|
l.height = `${o.scrollHeight}px`, l.overflow = "hidden";
|
|
101
105
|
}
|
|
102
|
-
function
|
|
106
|
+
function z(e, o) {
|
|
103
107
|
const l = e, s = l.style;
|
|
104
108
|
s.transition = "height 0.15s ease, opacity 0.15s ease", l.offsetHeight, s.height = "0", s.opacity = "0", l.addEventListener("transitionend", o, {
|
|
105
109
|
once: !0
|
|
106
110
|
});
|
|
107
111
|
}
|
|
108
|
-
function
|
|
112
|
+
function V(e) {
|
|
109
113
|
e.style.cssText = "";
|
|
110
114
|
}
|
|
111
|
-
|
|
115
|
+
oe(() => n.selectedKeys, (e) => {
|
|
112
116
|
a.value = [...e];
|
|
113
117
|
});
|
|
114
118
|
function I(e, o) {
|
|
115
119
|
return typeof n.filterSearch == "function" ? n.filterSearch(o, e) : e.text.toLowerCase().includes(o.toLowerCase());
|
|
116
120
|
}
|
|
117
|
-
function
|
|
121
|
+
function q(e, o) {
|
|
118
122
|
return e.filter((l) => I(l, o));
|
|
119
123
|
}
|
|
120
|
-
const
|
|
121
|
-
function
|
|
124
|
+
const m = f(() => !n.filterSearch || !c.value || n.filterMode === "tree" ? n.filters : q(n.filters, c.value)), p = f(() => t.presetConfig?.value.filterSingleSelectMode === "highlight"), v = f(() => t.locale?.value.filterDropdown), U = f(() => m.value.length > 0), k = f(() => !!n.filterSearch && c.value.trim().length > 0 && n.filterMode !== "tree" && !U.value);
|
|
125
|
+
function L(e) {
|
|
122
126
|
return a.value.includes(e);
|
|
123
127
|
}
|
|
124
|
-
function
|
|
128
|
+
function A(e, o) {
|
|
125
129
|
if (n.multiple) {
|
|
126
130
|
if (n.filterMode === "tree" && o) {
|
|
127
131
|
const l = new Set(a.value);
|
|
128
132
|
if (!!o.children?.length) {
|
|
129
|
-
const u =
|
|
130
|
-
u.every((
|
|
133
|
+
const u = w([o]);
|
|
134
|
+
u.every((h) => l.has(h)) ? u.forEach((h) => l.delete(h)) : u.forEach((h) => l.add(h));
|
|
131
135
|
} else
|
|
132
136
|
l.has(e) ? l.delete(e) : l.add(e);
|
|
133
|
-
|
|
137
|
+
_(n.filters, l), a.value = Array.from(l);
|
|
134
138
|
} else {
|
|
135
139
|
const l = a.value.indexOf(e);
|
|
136
140
|
l > -1 ? a.value.splice(l, 1) : a.value.push(e);
|
|
137
141
|
}
|
|
138
142
|
return;
|
|
139
143
|
}
|
|
140
|
-
|
|
144
|
+
L(e) || (a.value = [e]);
|
|
141
145
|
}
|
|
142
|
-
function
|
|
146
|
+
function X() {
|
|
143
147
|
i("confirm", [...a.value]);
|
|
144
148
|
}
|
|
145
|
-
function
|
|
149
|
+
function Y() {
|
|
146
150
|
a.value = [], i("reset");
|
|
147
151
|
}
|
|
148
|
-
const
|
|
149
|
-
const e =
|
|
152
|
+
const y = f(() => n.filterMode === "tree" && n.multiple), b = f(() => y.value ? w(m.value) : []), S = f(() => {
|
|
153
|
+
const e = b.value.length;
|
|
150
154
|
if (e === 0) return "none";
|
|
151
|
-
const o =
|
|
155
|
+
const o = b.value.filter((l) => a.value.includes(l)).length;
|
|
152
156
|
return o === 0 ? "none" : o === e ? "all" : "partial";
|
|
153
157
|
});
|
|
154
|
-
function
|
|
155
|
-
|
|
156
|
-
}
|
|
157
|
-
function A(e) {
|
|
158
|
-
n.visible && v.value && !v.value.contains(e.target) && i("close");
|
|
158
|
+
function G() {
|
|
159
|
+
S.value === "all" ? a.value = [] : a.value = [...b.value];
|
|
159
160
|
}
|
|
160
|
-
function
|
|
161
|
-
n.
|
|
162
|
-
}
|
|
163
|
-
W(() => {
|
|
164
|
-
ce(() => {
|
|
165
|
-
document.addEventListener("mousedown", A), window.addEventListener("scroll", F, !0);
|
|
166
|
-
});
|
|
167
|
-
}), de(() => {
|
|
168
|
-
document.removeEventListener("mousedown", A), window.removeEventListener("scroll", F, !0);
|
|
169
|
-
});
|
|
170
|
-
function K(e, o) {
|
|
171
|
-
return n.multiple ? r(N, {
|
|
161
|
+
function B(e, o) {
|
|
162
|
+
return n.multiple ? r(P, {
|
|
172
163
|
checked: e,
|
|
173
164
|
indeterminate: o
|
|
174
|
-
}, null) :
|
|
165
|
+
}, null) : p.value ? null : r(ae, {
|
|
175
166
|
checked: e
|
|
176
167
|
}, null);
|
|
177
168
|
}
|
|
178
|
-
function
|
|
179
|
-
const l =
|
|
180
|
-
let
|
|
181
|
-
if (
|
|
182
|
-
const
|
|
183
|
-
|
|
169
|
+
function J(e, o = 0) {
|
|
170
|
+
const l = L(e.value), s = !!e.children?.length, u = E(e.value), x = !n.multiple && p.value, h = n.filterMode === "tree" && c.value.trim().length > 0 && I(e, c.value);
|
|
171
|
+
let D = !1;
|
|
172
|
+
if (y.value && s) {
|
|
173
|
+
const ee = w(e.children).some((te) => a.value.includes(te));
|
|
174
|
+
D = !l && ee;
|
|
184
175
|
}
|
|
185
|
-
const
|
|
176
|
+
const Q = () => s ? r("span", {
|
|
186
177
|
class: [t.subThemeSlots?.filterDropdownSwitcher(), u ? t.subThemeSlots?.filterDropdownSwitcherExpanded() : t.subThemeSlots?.filterDropdownSwitcherCollapsed()],
|
|
187
|
-
onClick: (
|
|
188
|
-
|
|
178
|
+
onClick: (K) => {
|
|
179
|
+
K.stopPropagation(), N(e.value);
|
|
189
180
|
},
|
|
190
181
|
"aria-label": u ? "Collapse" : "Expand"
|
|
191
|
-
}, [r(
|
|
182
|
+
}, [r(ue, null, null)]) : r("span", {
|
|
192
183
|
class: [t.subThemeSlots?.filterDropdownSwitcher(), t.subThemeSlots?.filterDropdownSwitcherNoop()],
|
|
193
184
|
"aria-hidden": "true"
|
|
194
|
-
}, null),
|
|
185
|
+
}, null), g = n.filterMode === "tree", F = g ? t.subThemeSlots?.filterDropdownTreeItem() : t.subThemeSlots?.filterDropdownItem(), M = g ? t.subThemeSlots?.filterDropdownTreeContentWrapper() : t.subThemeSlots?.filterDropdownContentWrapper(), Z = g ? {
|
|
195
186
|
paddingLeft: `calc(var(--vtg-table-filter-tree-indent-size, 24px) * ${o})`
|
|
196
187
|
} : void 0;
|
|
197
|
-
return
|
|
188
|
+
return g ? r("li", {
|
|
198
189
|
key: String(e.value),
|
|
199
|
-
class:
|
|
200
|
-
style:
|
|
201
|
-
onClick: () =>
|
|
202
|
-
}, [r(
|
|
190
|
+
class: F,
|
|
191
|
+
style: Z,
|
|
192
|
+
onClick: () => A(e.value, e)
|
|
193
|
+
}, [r(Q, null, null), r("span", {
|
|
203
194
|
class: t.vtgClass?.("mt-1 mr-2 shrink-0")
|
|
204
|
-
}, [
|
|
205
|
-
class: [
|
|
195
|
+
}, [B(l, D)]), r("div", {
|
|
196
|
+
class: [M, l ? t.subThemeSlots?.filterDropdownTreeItemSelected() : t.subThemeSlots?.filterDropdownItemHover()]
|
|
206
197
|
}, [r("span", {
|
|
207
|
-
class: [t.vtgClass?.("text-[color:var(--color-on-surface)]"),
|
|
198
|
+
class: [t.vtgClass?.("text-[color:var(--color-on-surface)]"), h && t.subThemeSlots?.filterDropdownTreeItemMatched()]
|
|
208
199
|
}, [e.text])])]) : r("li", {
|
|
209
200
|
key: String(e.value),
|
|
210
|
-
role:
|
|
211
|
-
"aria-checked":
|
|
212
|
-
class: [
|
|
201
|
+
role: x ? "radio" : void 0,
|
|
202
|
+
"aria-checked": x ? l : void 0,
|
|
203
|
+
class: [F, !n.multiple && p.value && t.vtgClass?.("gap-0")]
|
|
213
204
|
}, [r("div", {
|
|
214
|
-
class: [
|
|
215
|
-
onClick: () =>
|
|
216
|
-
}, [
|
|
205
|
+
class: [M, l ? !n.multiple && t.subThemeSlots?.filterDropdownItemSelectedSingle?.() || t.subThemeSlots?.filterDropdownItemSelected() : t.subThemeSlots?.filterDropdownItemHover()],
|
|
206
|
+
onClick: () => A(e.value, e)
|
|
207
|
+
}, [B(l, D), r("span", {
|
|
217
208
|
class: t.vtgClass?.("text-[color:var(--color-on-surface)]")
|
|
218
209
|
}, [e.text])])]);
|
|
219
210
|
}
|
|
220
|
-
function
|
|
211
|
+
function T(e, o = 0) {
|
|
221
212
|
const l = [];
|
|
222
213
|
for (const s of e)
|
|
223
|
-
l.push(
|
|
214
|
+
l.push(J(s, o)), s.children?.length && (n.filterMode === "tree" ? l.push(r(se, {
|
|
224
215
|
css: !1,
|
|
225
|
-
onBeforeEnter:
|
|
226
|
-
onEnter:
|
|
227
|
-
onAfterEnter:
|
|
228
|
-
onBeforeLeave:
|
|
229
|
-
onLeave:
|
|
230
|
-
onAfterLeave:
|
|
216
|
+
onBeforeEnter: O,
|
|
217
|
+
onEnter: R,
|
|
218
|
+
onAfterEnter: j,
|
|
219
|
+
onBeforeLeave: $,
|
|
220
|
+
onLeave: z,
|
|
221
|
+
onAfterLeave: V
|
|
231
222
|
}, {
|
|
232
|
-
default: () => [
|
|
223
|
+
default: () => [E(s.value) && r("div", {
|
|
233
224
|
key: `tree-${s.value}`
|
|
234
|
-
}, [
|
|
235
|
-
})) : l.push(...
|
|
225
|
+
}, [T(s.children, o + 1)])]
|
|
226
|
+
})) : l.push(...T(s.children, o + 1)));
|
|
236
227
|
return l;
|
|
237
228
|
}
|
|
238
229
|
return () => {
|
|
239
|
-
const
|
|
240
|
-
anchorRect: e
|
|
241
|
-
} = n, o = 150, l = n.popupContainer, s = n.filterMode === "tree", u = s ? t.subThemeSlots?.filterDropdownTreeList() : t.subThemeSlots?.filterDropdownList(), p = s ? t.subThemeSlots?.filterDropdownTreeContentWrapper() : t.subThemeSlots?.filterDropdownContentWrapper(), c = Te(e, l, o);
|
|
230
|
+
const e = n.filterMode === "tree", o = e ? t.subThemeSlots?.filterDropdownTreeList() : t.subThemeSlots?.filterDropdownList(), l = e ? t.subThemeSlots?.filterDropdownTreeContentWrapper() : t.subThemeSlots?.filterDropdownContentWrapper();
|
|
242
231
|
return r(fe, {
|
|
243
|
-
|
|
232
|
+
open: n.visible,
|
|
233
|
+
anchor: n.anchor,
|
|
234
|
+
focusAnchor: n.focusAnchor,
|
|
235
|
+
getPopupContainer: n.getPopupContainer,
|
|
236
|
+
preset: t.themePreset?.value ?? "antdv",
|
|
237
|
+
alignmentWidth: 150,
|
|
238
|
+
class: t.subThemeSlots?.filterDropdown(),
|
|
239
|
+
onDismiss: () => i("close")
|
|
244
240
|
}, {
|
|
245
|
-
default: () => [r(
|
|
246
|
-
|
|
241
|
+
default: () => [n.filterSearch && r("div", {
|
|
242
|
+
class: t.subThemeSlots?.filterDropdownSearch()
|
|
243
|
+
}, [r("div", {
|
|
244
|
+
class: t.subThemeSlots?.filterDropdownSearchField()
|
|
245
|
+
}, [r("span", {
|
|
246
|
+
class: t.subThemeSlots?.filterDropdownSearchIcon(),
|
|
247
|
+
"aria-hidden": "true"
|
|
248
|
+
}, [r(ce, null, null)]), r(ie, {
|
|
249
|
+
bare: !0,
|
|
250
|
+
value: c.value,
|
|
251
|
+
placeholder: v.value?.searchPlaceholder ?? "在筛选项中搜索",
|
|
252
|
+
inputClass: t.subThemeSlots?.filterDropdownSearchInput(),
|
|
253
|
+
"onUpdate:value": (s) => {
|
|
254
|
+
c.value = s;
|
|
255
|
+
}
|
|
256
|
+
}, null)])]), e ? r("div", {
|
|
257
|
+
class: t.subThemeSlots?.filterDropdownTreeWrapper()
|
|
258
|
+
}, [y.value && r("div", {
|
|
259
|
+
key: "__vtg_select_all__",
|
|
260
|
+
class: t.subThemeSlots?.filterDropdownTreeCheckAll(),
|
|
261
|
+
onClick: G
|
|
262
|
+
}, [r("span", {
|
|
263
|
+
class: t.vtgClass?.("mt-1 mr-2 shrink-0")
|
|
264
|
+
}, [r(P, {
|
|
265
|
+
checked: S.value === "all",
|
|
266
|
+
indeterminate: S.value === "partial"
|
|
267
|
+
}, null)]), r("div", {
|
|
268
|
+
class: [l, S.value === "all" ? t.subThemeSlots?.filterDropdownTreeItemSelected() : t.subThemeSlots?.filterDropdownItemHover()]
|
|
269
|
+
}, [r("span", {
|
|
270
|
+
class: t.vtgClass?.("text-[color:var(--color-on-surface)]")
|
|
271
|
+
}, [v.value?.selectAllText ?? "全选"])])]), r(W, {
|
|
272
|
+
maxHeight: "var(--vtg-table-filter-dropdown-max-height, 264px)"
|
|
273
|
+
}, {
|
|
274
|
+
default: () => [r("ul", {
|
|
275
|
+
class: o
|
|
276
|
+
}, [T(m.value), k.value && r("li", {
|
|
277
|
+
class: t.subThemeSlots?.filterDropdownListEmpty()
|
|
278
|
+
}, [v.value?.emptyText ?? "Not Found"])])]
|
|
279
|
+
})]) : r(W, {
|
|
280
|
+
maxHeight: "var(--vtg-table-filter-dropdown-max-height, 264px)"
|
|
281
|
+
}, {
|
|
282
|
+
default: () => [r("ul", {
|
|
283
|
+
role: !n.multiple && p.value ? "radiogroup" : void 0,
|
|
284
|
+
class: o
|
|
285
|
+
}, [T(m.value), k.value && r("li", {
|
|
286
|
+
class: t.subThemeSlots?.filterDropdownListEmpty()
|
|
287
|
+
}, [v.value?.emptyText ?? "Not Found"])])]
|
|
288
|
+
}), r("div", {
|
|
289
|
+
class: t.subThemeSlots?.filterDropdownActions()
|
|
290
|
+
}, [r(H, {
|
|
291
|
+
type: "link",
|
|
292
|
+
size: "sm",
|
|
293
|
+
class: t.subThemeSlots?.filterDropdownResetButton?.(),
|
|
294
|
+
disabled: a.value.length === 0,
|
|
295
|
+
onClick: Y
|
|
296
|
+
}, {
|
|
297
|
+
default: () => [v.value?.resetText ?? "重置"]
|
|
298
|
+
}), r(H, {
|
|
299
|
+
type: "primary",
|
|
300
|
+
size: "sm",
|
|
301
|
+
class: t.subThemeSlots?.filterDropdownConfirmButton?.(),
|
|
302
|
+
onClick: X
|
|
247
303
|
}, {
|
|
248
|
-
default: () => [
|
|
249
|
-
|
|
250
|
-
class: t.subThemeSlots?.filterDropdown(),
|
|
251
|
-
style: c
|
|
252
|
-
}, [n.filterSearch && r("div", {
|
|
253
|
-
class: t.subThemeSlots?.filterDropdownSearch()
|
|
254
|
-
}, [r("div", {
|
|
255
|
-
class: t.subThemeSlots?.filterDropdownSearchField()
|
|
256
|
-
}, [r("span", {
|
|
257
|
-
class: t.subThemeSlots?.filterDropdownSearchIcon(),
|
|
258
|
-
"aria-hidden": "true"
|
|
259
|
-
}, [r(pe, null, null)]), r(ve, {
|
|
260
|
-
bare: !0,
|
|
261
|
-
value: h.value,
|
|
262
|
-
placeholder: m.value?.searchPlaceholder ?? "在筛选项中搜索",
|
|
263
|
-
inputClass: t.subThemeSlots?.filterDropdownSearchInput(),
|
|
264
|
-
"onUpdate:value": (S) => {
|
|
265
|
-
h.value = S;
|
|
266
|
-
}
|
|
267
|
-
}, null)])]), s ? r("div", {
|
|
268
|
-
class: t.subThemeSlots?.filterDropdownTreeWrapper()
|
|
269
|
-
}, [C.value && r("div", {
|
|
270
|
-
key: "__vtg_select_all__",
|
|
271
|
-
class: t.subThemeSlots?.filterDropdownTreeCheckAll(),
|
|
272
|
-
onClick: te
|
|
273
|
-
}, [r("span", {
|
|
274
|
-
class: t.vtgClass?.("mt-1 mr-2 shrink-0")
|
|
275
|
-
}, [r(N, {
|
|
276
|
-
checked: g.value === "all",
|
|
277
|
-
indeterminate: g.value === "partial"
|
|
278
|
-
}, null)]), r("div", {
|
|
279
|
-
class: [p, g.value === "all" ? t.subThemeSlots?.filterDropdownTreeItemSelected() : t.subThemeSlots?.filterDropdownItemHover()]
|
|
280
|
-
}, [r("span", {
|
|
281
|
-
class: t.vtgClass?.("text-[color:var(--color-on-surface)]")
|
|
282
|
-
}, [m.value?.selectAllText ?? "全选"])])]), r(j, {
|
|
283
|
-
maxHeight: "var(--vtg-table-filter-dropdown-max-height, 264px)"
|
|
284
|
-
}, {
|
|
285
|
-
default: () => [r("ul", {
|
|
286
|
-
class: u
|
|
287
|
-
}, [y(T.value), k.value && r("li", {
|
|
288
|
-
class: t.subThemeSlots?.filterDropdownListEmpty()
|
|
289
|
-
}, [m.value?.emptyText ?? "Not Found"])])]
|
|
290
|
-
})]) : r(j, {
|
|
291
|
-
maxHeight: "var(--vtg-table-filter-dropdown-max-height, 264px)"
|
|
292
|
-
}, {
|
|
293
|
-
default: () => [r("ul", {
|
|
294
|
-
role: !n.multiple && w.value ? "radiogroup" : void 0,
|
|
295
|
-
class: u
|
|
296
|
-
}, [y(T.value), k.value && r("li", {
|
|
297
|
-
class: t.subThemeSlots?.filterDropdownListEmpty()
|
|
298
|
-
}, [m.value?.emptyText ?? "Not Found"])])]
|
|
299
|
-
}), r("div", {
|
|
300
|
-
class: t.subThemeSlots?.filterDropdownActions()
|
|
301
|
-
}, [r(O, {
|
|
302
|
-
type: "link",
|
|
303
|
-
size: "sm",
|
|
304
|
-
class: t.subThemeSlots?.filterDropdownResetButton?.(),
|
|
305
|
-
disabled: a.value.length === 0,
|
|
306
|
-
onClick: ee
|
|
307
|
-
}, {
|
|
308
|
-
default: () => [m.value?.resetText ?? "重置"]
|
|
309
|
-
}), r(O, {
|
|
310
|
-
type: "primary",
|
|
311
|
-
size: "sm",
|
|
312
|
-
class: t.subThemeSlots?.filterDropdownConfirmButton?.(),
|
|
313
|
-
onClick: Z
|
|
314
|
-
}, {
|
|
315
|
-
default: () => [m.value?.confirmText ?? "确 定"]
|
|
316
|
-
})])])]
|
|
317
|
-
})]
|
|
304
|
+
default: () => [v.value?.confirmText ?? "确 定"]
|
|
305
|
+
})])]
|
|
318
306
|
});
|
|
319
307
|
};
|
|
320
308
|
}
|
|
321
309
|
});
|
|
322
310
|
export {
|
|
323
|
-
|
|
311
|
+
xe as default
|
|
324
312
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaginationSizeSelect.d.ts","sourceRoot":"","sources":["../../../../../table/src/components/PaginationSizeSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"PaginationSizeSelect.d.ts","sourceRoot":"","sources":["../../../../../table/src/components/PaginationSizeSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,QAAQ,EACb,KAAK,UAAU,EAChB,MAAM,KAAK,CAAA;AAGZ,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;;;;;;;cAO5B,QAAQ,CAAC,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;;;;;;;;;cAInC,QAAQ,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,KAAK,UAAU,CAAC;;;;cAG3C,QAAQ,CAAC,MAAM,CAAC,eAAe,EAAE,MAAM,MAAM,CAAC,CAAC;;;uBACzC,QAAQ,CAAC,CAAC,OAAO,EAAE,WAAW,KAAK,WAAW,CAAC;;qBAEtD,MAAM;;;;;;;cAVJ,QAAQ,CAAC,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;;;;;;;;;cAInC,QAAQ,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,KAAK,UAAU,CAAC;;;;cAG3C,QAAQ,CAAC,MAAM,CAAC,eAAe,EAAE,MAAM,MAAM,CAAC,CAAC;;;uBACzC,QAAQ,CAAC,CAAC,OAAO,EAAE,WAAW,KAAK,WAAW,CAAC;;;;;;AAZlF,wBAqJE"}
|