ep-craft 0.1.32 → 0.1.33
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/dist/components/checkbox/index.js +6 -5
- package/dist/components/table/index.d.ts +56 -3
- package/dist/components/table/index.js +20 -4
- package/dist/components/table/src/composables/use-scrollbar.d.ts +6 -0
- package/dist/components/table/src/composables/use-scrollbar.js +24 -0
- package/dist/components/table/src/config.d.ts +87 -0
- package/dist/components/table/src/config.js +210 -0
- package/dist/components/table/src/filter-panel.vue.d.ts +837 -0
- package/dist/components/table/src/filter-panel.vue.js +130 -0
- package/dist/components/table/src/filter-panel2.vue.js +155 -0
- package/dist/components/table/src/h-helper.d.ts +13 -0
- package/dist/components/table/src/h-helper.js +30 -0
- package/dist/components/table/src/layout-observer.d.ts +8 -0
- package/dist/components/table/src/layout-observer.js +49 -0
- package/dist/components/table/src/store/current.d.ts +15 -0
- package/dist/components/table/src/store/current.js +45 -0
- package/dist/components/table/src/store/expand.d.ts +14 -0
- package/dist/components/table/src/store/expand.js +55 -0
- package/dist/components/table/src/store/helper.d.ts +548 -0
- package/dist/components/table/src/store/helper.js +61 -0
- package/dist/components/table/src/store/index.d.ts +1107 -0
- package/dist/components/table/src/store/index.js +123 -0
- package/dist/components/table/src/store/tree.d.ts +27 -0
- package/dist/components/table/src/store/tree.js +153 -0
- package/dist/components/table/src/store/watcher.d.ts +88 -0
- package/dist/components/table/src/store/watcher.js +483 -0
- package/dist/components/table/src/table/defaults.d.ts +560 -0
- package/dist/components/table/src/table/defaults.js +236 -0
- package/dist/components/table/src/table/key-render-helper.d.ts +2 -0
- package/dist/components/table/src/table/key-render-helper.js +18 -0
- package/dist/components/table/src/table/style-helper.d.ts +51 -0
- package/dist/components/table/src/table/style-helper.js +169 -0
- package/dist/components/table/src/table/utils-helper.d.ts +16 -0
- package/dist/components/table/src/table/utils-helper.js +36 -0
- package/dist/components/table/src/table-body/defaults.d.ts +39 -0
- package/dist/components/table/src/table-body/defaults.js +25 -0
- package/dist/components/table/src/table-body/events-helper.d.ts +19 -0
- package/dist/components/table/src/table-body/events-helper.js +126 -0
- package/dist/components/table/src/table-body/index.d.ts +84 -0
- package/dist/components/table/src/table-body/index.js +77 -0
- package/dist/components/table/src/table-body/render-helper.d.ts +18 -0
- package/dist/components/table/src/table-body/render-helper.js +188 -0
- package/dist/components/table/src/table-body/styles-helper.d.ts +15 -0
- package/dist/components/table/src/table-body/styles-helper.js +98 -0
- package/dist/components/table/src/table-body/td-wrapper.vue.d.ts +33 -0
- package/dist/components/table/src/table-body/td-wrapper.vue.js +26 -0
- package/dist/components/table/src/table-body/td-wrapper2.vue.js +4 -0
- package/dist/components/table/src/table-column/defaults.d.ts +348 -0
- package/dist/components/table/src/table-column/defaults.js +152 -0
- package/dist/components/table/src/table-column/index.d.ts +2 -0
- package/dist/components/table/src/table-column/index.vue.d.ts +32 -0
- package/dist/components/table/src/table-column/index.vue.js +161 -0
- package/dist/components/table/src/table-column/index2.vue.js +4 -0
- package/dist/components/table/src/table-column/render-helper.d.ts +17 -0
- package/dist/components/table/src/table-column/render-helper.js +116 -0
- package/dist/components/table/src/table-column/watcher-helper.d.ts +8 -0
- package/dist/components/table/src/table-column/watcher-helper.js +85 -0
- package/dist/components/table/src/table-footer/index.d.ts +79 -0
- package/dist/components/table/src/table-footer/index.js +110 -0
- package/dist/components/table/src/table-footer/mapState-helper.d.ts +9 -0
- package/dist/components/table/src/table-footer/mapState-helper.js +16 -0
- package/dist/components/table/src/table-footer/style-helper.d.ts +9 -0
- package/dist/components/table/src/table-footer/style-helper.js +42 -0
- package/dist/components/table/src/table-header/event-helper.d.ts +14 -0
- package/dist/components/table/src/table-header/event-helper.js +113 -0
- package/dist/components/table/src/table-header/index.d.ts +361 -0
- package/dist/components/table/src/table-header/index.js +255 -0
- package/dist/components/table/src/table-header/style.helper.d.ts +10 -0
- package/dist/components/table/src/table-header/style.helper.js +73 -0
- package/dist/components/table/src/table-header/utils-helper.d.ts +10 -0
- package/dist/components/table/src/table-header/utils-helper.js +45 -0
- package/dist/components/table/src/table-layout.d.ts +37 -0
- package/dist/components/table/src/table-layout.js +144 -0
- package/dist/components/table/src/table.vue.d.ts +734 -0
- package/dist/components/table/src/table.vue.js +443 -0
- package/dist/components/table/src/table2.vue.js +4 -0
- package/dist/components/table/src/tableColumn.d.ts +2 -0
- package/dist/components/table/src/tokens.d.ts +3 -0
- package/dist/components/table/src/tokens.js +4 -0
- package/dist/components/table/src/util.d.ts +55 -0
- package/dist/components/table/src/util.js +310 -0
- package/dist/components/table-column/index.d.ts +40 -3
- package/dist/components/table-column/index.js +6 -3
- package/dist/directives/mousewheel/index.js +28 -0
- package/dist/ep-craft.js +186 -182
- package/dist/index.d.ts +24 -0
- package/dist/vendored-components.d.ts +1 -1
- package/dist/vendored-components.js +12 -1
- package/package.json +1 -1
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { getCurrentInstance as g, nextTick as h, unref as a } from "vue";
|
|
2
|
+
import { isNull as S } from "lodash-unified";
|
|
3
|
+
import { useNamespace as v } from "../../../../hooks/use-namespace/index.js";
|
|
4
|
+
import "@vue/shared";
|
|
5
|
+
import "@vueuse/core";
|
|
6
|
+
import "@element-plus/icons-vue";
|
|
7
|
+
import { useLocale as y } from "../../../../hooks/use-locale/index.js";
|
|
8
|
+
import "../../../../hooks/use-size/index.js";
|
|
9
|
+
import "@popperjs/core";
|
|
10
|
+
import "../../../../hooks/use-z-index/index.js";
|
|
11
|
+
import "../../../../hooks/use-delayed-toggle/index.js";
|
|
12
|
+
import "../../../../hooks/use-aria/index.js";
|
|
13
|
+
import "../../../../hooks/use-model-toggle/index.js";
|
|
14
|
+
import "../../../../hooks/use-empty-values/index.js";
|
|
15
|
+
import w from "./watcher.js";
|
|
16
|
+
function f(e, l) {
|
|
17
|
+
return e.map((u) => {
|
|
18
|
+
var p;
|
|
19
|
+
return u.id === l.id ? l : ((p = u.children) != null && p.length && (u.children = f(u.children, l)), u);
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
function m(e) {
|
|
23
|
+
e.forEach((l) => {
|
|
24
|
+
var u, p;
|
|
25
|
+
l.no = (u = l.getColumnIndex) == null ? void 0 : u.call(l), (p = l.children) != null && p.length && m(l.children);
|
|
26
|
+
}), e.sort((l, u) => l.no - u.no);
|
|
27
|
+
}
|
|
28
|
+
function k() {
|
|
29
|
+
const e = g(), l = w(), u = v("table"), { t: p } = y();
|
|
30
|
+
return {
|
|
31
|
+
ns: u,
|
|
32
|
+
t: p,
|
|
33
|
+
...l,
|
|
34
|
+
mutations: {
|
|
35
|
+
setData(o, t) {
|
|
36
|
+
const r = a(o._data) !== t;
|
|
37
|
+
o.data.value = t, o._data.value = t, e.store.execQuery(), e.store.updateCurrentRowData(), e.store.updateExpandRows(), e.store.updateTreeData(
|
|
38
|
+
e.store.states.defaultExpandAll.value
|
|
39
|
+
), a(o.reserveSelection) ? e.store.assertRowKey() : r ? e.store.clearSelection() : e.store.cleanSelection(), e.store.updateSelectionByChildren({ emitChange: !1 }), e.store.updateAllSelected(), e.$ready && e.store.scheduleLayout();
|
|
40
|
+
},
|
|
41
|
+
insertColumn(o, t, r, i) {
|
|
42
|
+
var d;
|
|
43
|
+
const s = a(o._columns);
|
|
44
|
+
let n = [];
|
|
45
|
+
r ? (r && !r.children && (r.children = []), (d = r.children) == null || d.push(t), n = f(s, r)) : (s.push(t), n = s), m(n), o._columns.value = n, o.updateOrderFns.push(i), t.type === "selection" && (o.selectable.value = t.selectable, o.reserveSelection.value = t.reserveSelection), e.$ready && (e.store.updateColumns(), e.store.scheduleLayout());
|
|
46
|
+
},
|
|
47
|
+
updateColumnOrder(o, t) {
|
|
48
|
+
var i;
|
|
49
|
+
((i = t.getColumnIndex) == null ? void 0 : i.call(t)) !== t.no && (m(o._columns.value), e.$ready && e.store.updateColumns());
|
|
50
|
+
},
|
|
51
|
+
removeColumn(o, t, r, i) {
|
|
52
|
+
var d;
|
|
53
|
+
const s = a(o._columns) || [];
|
|
54
|
+
if (r)
|
|
55
|
+
(d = r.children) == null || d.splice(
|
|
56
|
+
r.children.findIndex((c) => c.id === t.id),
|
|
57
|
+
1
|
|
58
|
+
), h(() => {
|
|
59
|
+
var c;
|
|
60
|
+
((c = r.children) == null ? void 0 : c.length) === 0 && delete r.children;
|
|
61
|
+
}), o._columns.value = f(s, r);
|
|
62
|
+
else {
|
|
63
|
+
const c = s.indexOf(t);
|
|
64
|
+
c > -1 && (s.splice(c, 1), o._columns.value = s);
|
|
65
|
+
}
|
|
66
|
+
const n = o.updateOrderFns.indexOf(i);
|
|
67
|
+
n > -1 && o.updateOrderFns.splice(n, 1), e.$ready && (e.store.updateColumns(), e.store.scheduleLayout());
|
|
68
|
+
},
|
|
69
|
+
sort(o, t) {
|
|
70
|
+
const { prop: r, order: i, init: s } = t;
|
|
71
|
+
if (r) {
|
|
72
|
+
const n = a(o.columns).find(
|
|
73
|
+
(d) => d.property === r
|
|
74
|
+
);
|
|
75
|
+
n && (n.order = i, e.store.updateSort(n, r, i), e.store.commit("changeSortCondition", { init: s }));
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
changeSortCondition(o, t) {
|
|
79
|
+
const { sortingColumn: r, sortProp: i, sortOrder: s } = o, n = a(r), d = a(i), c = a(s);
|
|
80
|
+
S(c) && (o.sortingColumn.value = null, o.sortProp.value = null);
|
|
81
|
+
const C = { filter: !0 };
|
|
82
|
+
e.store.execQuery(C), (!t || !(t.silent || t.init)) && e.emit("sort-change", {
|
|
83
|
+
column: n,
|
|
84
|
+
prop: d,
|
|
85
|
+
order: c
|
|
86
|
+
}), e.store.updateTableScrollY();
|
|
87
|
+
},
|
|
88
|
+
filterChange(o, t) {
|
|
89
|
+
const { column: r, values: i, silent: s } = t, n = e.store.updateFilters(r, i);
|
|
90
|
+
e.store.execQuery(), s || e.emit("filter-change", n), e.store.updateTableScrollY();
|
|
91
|
+
},
|
|
92
|
+
toggleAllSelection() {
|
|
93
|
+
var o, t;
|
|
94
|
+
(t = (o = e.store).toggleAllSelection) == null || t.call(o);
|
|
95
|
+
},
|
|
96
|
+
rowSelectedChanged(o, t) {
|
|
97
|
+
e.store.toggleRowSelection(t), e.store.updateAllSelected();
|
|
98
|
+
},
|
|
99
|
+
setHoverRow(o, t) {
|
|
100
|
+
o.hoverRow.value = t;
|
|
101
|
+
},
|
|
102
|
+
setCurrentRow(o, t) {
|
|
103
|
+
e.store.updateCurrentRow(t);
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
commit: function(o, ...t) {
|
|
107
|
+
const r = e.store.mutations;
|
|
108
|
+
if (r[o])
|
|
109
|
+
r[o].apply(e, [
|
|
110
|
+
e.store.states,
|
|
111
|
+
...t
|
|
112
|
+
]);
|
|
113
|
+
else
|
|
114
|
+
throw new Error(`Action not found: ${o}`);
|
|
115
|
+
},
|
|
116
|
+
updateTableScrollY: function() {
|
|
117
|
+
h(() => e.layout.updateScrollY.apply(e.layout));
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
export {
|
|
122
|
+
k as default
|
|
123
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { WatcherPropsData } from '.';
|
|
2
|
+
import type { DefaultRow, TreeNode } from '../table/defaults';
|
|
3
|
+
export interface TreeData extends TreeNode {
|
|
4
|
+
children?: string[];
|
|
5
|
+
lazy?: boolean;
|
|
6
|
+
loaded?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare function useTree<T extends DefaultRow>(watcherData: WatcherPropsData<T>): {
|
|
9
|
+
loadData: (row: T, key: string, treeNode: TreeNode) => void;
|
|
10
|
+
loadOrToggle: (row: T) => void;
|
|
11
|
+
toggleTreeExpansion: (row: T, expanded?: boolean) => void;
|
|
12
|
+
updateTreeExpandKeys: (value: string[]) => void;
|
|
13
|
+
updateTreeData: (ifChangeExpandRowKeys?: boolean, ifExpandAll?: boolean) => void;
|
|
14
|
+
updateKeyChildren: (key: string, data: T[]) => void;
|
|
15
|
+
normalize: (data: T[]) => Record<string, TreeData>;
|
|
16
|
+
states: {
|
|
17
|
+
expandRowKeys: import("vue").Ref<string[], string[]>;
|
|
18
|
+
treeData: import("vue").Ref<Record<string, TreeData>, Record<string, TreeData>>;
|
|
19
|
+
indent: import("vue").Ref<number, number>;
|
|
20
|
+
lazy: import("vue").Ref<boolean, boolean>;
|
|
21
|
+
lazyTreeNodeMap: import("vue").Ref<Record<string, T[]>, Record<string, T[]>>;
|
|
22
|
+
lazyColumnIdentifier: import("vue").Ref<string, string>;
|
|
23
|
+
childrenColumnName: import("vue").Ref<string, string>;
|
|
24
|
+
checkStrictly: import("vue").Ref<boolean, boolean>;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export default useTree;
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { ref as f, getCurrentInstance as G, computed as Y, watch as x, unref as H } from "vue";
|
|
2
|
+
import { isUndefined as J } from "../../../../utils/types.js";
|
|
3
|
+
import "lodash-unified";
|
|
4
|
+
import "@vueuse/core";
|
|
5
|
+
import { isArray as q } from "@vue/shared";
|
|
6
|
+
import "@element-plus/icons-vue";
|
|
7
|
+
import { getRowIdentity as g, walkTreeNode as P } from "../util.js";
|
|
8
|
+
function ee(h) {
|
|
9
|
+
const p = f([]), s = f({}), D = f(16), y = f(!1), c = f({}), w = f("hasChildren"), C = f("children"), M = f(!1), i = G(), N = Y(() => {
|
|
10
|
+
if (!h.rowKey.value) return {};
|
|
11
|
+
const n = h.data.value || [];
|
|
12
|
+
return I(n);
|
|
13
|
+
}), R = Y(() => {
|
|
14
|
+
const n = h.rowKey.value, e = Object.keys(c.value), a = {};
|
|
15
|
+
return e.length && e.forEach((t) => {
|
|
16
|
+
if (c.value[t].length) {
|
|
17
|
+
const r = { children: [] };
|
|
18
|
+
c.value[t].forEach((l) => {
|
|
19
|
+
const u = g(l, n);
|
|
20
|
+
r.children.push(u), l[w.value] && !a[u] && (a[u] = { children: [] });
|
|
21
|
+
}), a[t] = r;
|
|
22
|
+
}
|
|
23
|
+
}), a;
|
|
24
|
+
}), I = (n) => {
|
|
25
|
+
const e = h.rowKey.value, a = {};
|
|
26
|
+
return P(
|
|
27
|
+
n,
|
|
28
|
+
(t, r, l) => {
|
|
29
|
+
const u = g(t, e);
|
|
30
|
+
q(r) ? a[u] = {
|
|
31
|
+
children: r.map((K) => g(K, e)),
|
|
32
|
+
level: l
|
|
33
|
+
} : y.value && (a[u] = {
|
|
34
|
+
children: [],
|
|
35
|
+
lazy: !0,
|
|
36
|
+
level: l
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
C.value,
|
|
40
|
+
w.value,
|
|
41
|
+
y.value
|
|
42
|
+
), a;
|
|
43
|
+
}, m = (n = !1, e) => {
|
|
44
|
+
var u, K;
|
|
45
|
+
e || (e = (u = i.store) == null ? void 0 : u.states.defaultExpandAll.value);
|
|
46
|
+
const a = N.value, t = R.value, r = Object.keys(a), l = {};
|
|
47
|
+
if (r.length) {
|
|
48
|
+
const j = H(s), E = [], S = (o, v) => {
|
|
49
|
+
if (n)
|
|
50
|
+
return p.value ? e || p.value.includes(v) : !!(e || o != null && o.expanded);
|
|
51
|
+
{
|
|
52
|
+
const d = e || p.value && p.value.includes(v);
|
|
53
|
+
return !!(o != null && o.expanded || d);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
r.forEach((o) => {
|
|
57
|
+
const v = j[o], d = { ...a[o] };
|
|
58
|
+
if (d.expanded = S(v, o), d.lazy) {
|
|
59
|
+
const { loaded: z = !1, loading: b = !1 } = v || {};
|
|
60
|
+
d.loaded = !!z, d.loading = !!b, E.push(o);
|
|
61
|
+
}
|
|
62
|
+
l[o] = d;
|
|
63
|
+
});
|
|
64
|
+
const U = Object.keys(t);
|
|
65
|
+
y.value && U.length && E.length && U.forEach((o) => {
|
|
66
|
+
var z;
|
|
67
|
+
const v = j[o], d = t[o].children;
|
|
68
|
+
if (E.includes(o)) {
|
|
69
|
+
if (((z = l[o].children) == null ? void 0 : z.length) !== 0)
|
|
70
|
+
throw new Error("[ElTable]children must be an empty array.");
|
|
71
|
+
l[o].children = d;
|
|
72
|
+
} else {
|
|
73
|
+
const { loaded: b = !1, loading: F = !1 } = v || {};
|
|
74
|
+
l[o] = {
|
|
75
|
+
lazy: !0,
|
|
76
|
+
loaded: !!b,
|
|
77
|
+
loading: !!F,
|
|
78
|
+
expanded: S(v, o),
|
|
79
|
+
children: d,
|
|
80
|
+
level: void 0
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
s.value = l, (K = i.store) == null || K.updateTableScrollY();
|
|
86
|
+
};
|
|
87
|
+
x(
|
|
88
|
+
() => p.value,
|
|
89
|
+
() => {
|
|
90
|
+
m(!0);
|
|
91
|
+
},
|
|
92
|
+
{ deep: !0 }
|
|
93
|
+
), x(
|
|
94
|
+
() => N.value,
|
|
95
|
+
() => {
|
|
96
|
+
m();
|
|
97
|
+
}
|
|
98
|
+
), x(
|
|
99
|
+
() => R.value,
|
|
100
|
+
() => {
|
|
101
|
+
m();
|
|
102
|
+
}
|
|
103
|
+
);
|
|
104
|
+
const _ = (n) => {
|
|
105
|
+
p.value = n, m();
|
|
106
|
+
}, L = (n) => y.value && n && "loaded" in n && !n.loaded, O = (n, e) => {
|
|
107
|
+
i.store.assertRowKey();
|
|
108
|
+
const a = h.rowKey.value, t = g(n, a), r = t && s.value[t];
|
|
109
|
+
if (t && r && "expanded" in r) {
|
|
110
|
+
const l = r.expanded;
|
|
111
|
+
e = J(e) ? !r.expanded : e, s.value[t].expanded = e, l !== e && i.emit("expand-change", n, e), e && L(r) && T(n, t, r), i.store.updateTableScrollY();
|
|
112
|
+
}
|
|
113
|
+
}, B = (n) => {
|
|
114
|
+
i.store.assertRowKey();
|
|
115
|
+
const e = h.rowKey.value, a = g(n, e), t = s.value[a];
|
|
116
|
+
L(t) ? T(n, a, t) : O(n, void 0);
|
|
117
|
+
}, T = (n, e, a) => {
|
|
118
|
+
const { load: t } = i.props;
|
|
119
|
+
t && !s.value[e].loaded && (s.value[e].loading = !0, t(n, a, (r) => {
|
|
120
|
+
if (!q(r))
|
|
121
|
+
throw new TypeError("[ElTable] data must be an array");
|
|
122
|
+
s.value[e].loading = !1, s.value[e].loaded = !0, s.value[e].expanded = !0, r.length && (c.value = { ...c.value, [e]: r }), i.emit("expand-change", n, !0);
|
|
123
|
+
}));
|
|
124
|
+
};
|
|
125
|
+
return {
|
|
126
|
+
loadData: T,
|
|
127
|
+
loadOrToggle: B,
|
|
128
|
+
toggleTreeExpansion: O,
|
|
129
|
+
updateTreeExpandKeys: _,
|
|
130
|
+
updateTreeData: m,
|
|
131
|
+
updateKeyChildren: (n, e) => {
|
|
132
|
+
const { lazy: a, rowKey: t } = i.props;
|
|
133
|
+
if (a) {
|
|
134
|
+
if (!t) throw new Error("[Table] rowKey is required in updateKeyChild");
|
|
135
|
+
c.value[n] && (c.value = { ...c.value, [n]: e });
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
normalize: I,
|
|
139
|
+
states: {
|
|
140
|
+
expandRowKeys: p,
|
|
141
|
+
treeData: s,
|
|
142
|
+
indent: D,
|
|
143
|
+
lazy: y,
|
|
144
|
+
lazyTreeNodeMap: c,
|
|
145
|
+
lazyColumnIdentifier: w,
|
|
146
|
+
childrenColumnName: C,
|
|
147
|
+
checkStrictly: M
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
export {
|
|
152
|
+
ee as default
|
|
153
|
+
};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
import type { TableColumnCtx } from '../table-column/defaults';
|
|
3
|
+
import type { DefaultRow, TableSortOrder } from '../table/defaults';
|
|
4
|
+
import type { StoreFilter } from '.';
|
|
5
|
+
declare function useWatcher<T extends DefaultRow>(): {
|
|
6
|
+
assertRowKey: () => void;
|
|
7
|
+
updateColumns: () => void;
|
|
8
|
+
scheduleLayout: (needUpdateColumns?: boolean, immediate?: boolean) => void;
|
|
9
|
+
isSelected: (row: T) => boolean;
|
|
10
|
+
clearSelection: () => void;
|
|
11
|
+
cleanSelection: () => void;
|
|
12
|
+
getSelectionRows: () => T[];
|
|
13
|
+
getHalfSelectionRows: () => T[];
|
|
14
|
+
toggleRowSelection: (row: T, selected?: boolean, emitChange?: boolean, ignoreSelectable?: boolean) => void;
|
|
15
|
+
_toggleAllSelection: () => void;
|
|
16
|
+
toggleAllSelection: (() => void) | null;
|
|
17
|
+
updateAllSelected: () => void;
|
|
18
|
+
updateSelectionByChildren: (options?: {
|
|
19
|
+
emitChange?: boolean;
|
|
20
|
+
rowIndexMap?: Map<string, number>;
|
|
21
|
+
}) => void;
|
|
22
|
+
getRowIndeterminate: (row: T) => boolean;
|
|
23
|
+
updateFilters: (column: TableColumnCtx<T>, values: string[]) => Record<string, string[]>;
|
|
24
|
+
updateCurrentRow: (_currentRow: T) => void;
|
|
25
|
+
updateSort: (column: TableColumnCtx<T> | null, prop: string | null, order: TableSortOrder | null) => void;
|
|
26
|
+
execFilter: () => void;
|
|
27
|
+
execSort: () => void;
|
|
28
|
+
execQuery: (ignore?: {
|
|
29
|
+
filter: boolean;
|
|
30
|
+
} | undefined) => void;
|
|
31
|
+
clearFilter: (columnKeys?: string[] | string) => void;
|
|
32
|
+
clearSort: () => void;
|
|
33
|
+
toggleRowExpansion: (row: T, expanded?: boolean) => void;
|
|
34
|
+
setExpandRowKeysAdapter: (val: string[]) => void;
|
|
35
|
+
setCurrentRowKey: (key: string) => void;
|
|
36
|
+
toggleRowExpansionAdapter: (row: T, expanded?: boolean) => void;
|
|
37
|
+
isRowExpanded: (row: T) => boolean;
|
|
38
|
+
updateExpandRows: () => void;
|
|
39
|
+
updateCurrentRowData: () => void;
|
|
40
|
+
loadOrToggle: (row: T) => void;
|
|
41
|
+
updateTreeData: (ifChangeExpandRowKeys?: boolean, ifExpandAll?: boolean) => void;
|
|
42
|
+
updateKeyChildren: (key: string, data: T[]) => void;
|
|
43
|
+
states: {
|
|
44
|
+
_currentRowKey: Ref<string | null, string | null>;
|
|
45
|
+
currentRow: Ref<T | null, T | null>;
|
|
46
|
+
expandRowKeys: Ref<string[], string[]>;
|
|
47
|
+
treeData: Ref<Record<string, import("./tree").TreeData>, Record<string, import("./tree").TreeData>>;
|
|
48
|
+
indent: Ref<number, number>;
|
|
49
|
+
lazy: Ref<boolean, boolean>;
|
|
50
|
+
lazyTreeNodeMap: Ref<Record<string, T[]>, Record<string, T[]>>;
|
|
51
|
+
lazyColumnIdentifier: Ref<string, string>;
|
|
52
|
+
childrenColumnName: Ref<string, string>;
|
|
53
|
+
checkStrictly: Ref<boolean, boolean>;
|
|
54
|
+
expandRows: Ref<T[], T[]>;
|
|
55
|
+
defaultExpandAll: Ref<boolean, boolean>;
|
|
56
|
+
tableSize: Ref<any, any>;
|
|
57
|
+
rowKey: Ref<string | null, string | null>;
|
|
58
|
+
data: Ref<T[], T[]>;
|
|
59
|
+
_data: Ref<T[], T[]>;
|
|
60
|
+
isComplex: Ref<boolean, boolean>;
|
|
61
|
+
_columns: Ref<TableColumnCtx<T>[], TableColumnCtx<T>[]>;
|
|
62
|
+
originColumns: Ref<TableColumnCtx<T>[], TableColumnCtx<T>[]>;
|
|
63
|
+
columns: Ref<TableColumnCtx<T>[], TableColumnCtx<T>[]>;
|
|
64
|
+
fixedColumns: Ref<TableColumnCtx<T>[], TableColumnCtx<T>[]>;
|
|
65
|
+
rightFixedColumns: Ref<TableColumnCtx<T>[], TableColumnCtx<T>[]>;
|
|
66
|
+
leafColumns: Ref<TableColumnCtx<T>[], TableColumnCtx<T>[]>;
|
|
67
|
+
fixedLeafColumns: Ref<TableColumnCtx<T>[], TableColumnCtx<T>[]>;
|
|
68
|
+
rightFixedLeafColumns: Ref<TableColumnCtx<T>[], TableColumnCtx<T>[]>;
|
|
69
|
+
updateOrderFns: (() => void)[];
|
|
70
|
+
leafColumnsLength: Ref<number, number>;
|
|
71
|
+
fixedLeafColumnsLength: Ref<number, number>;
|
|
72
|
+
rightFixedLeafColumnsLength: Ref<number, number>;
|
|
73
|
+
isAllSelected: Ref<boolean, boolean>;
|
|
74
|
+
selection: Ref<T[], T[]>;
|
|
75
|
+
selectionIndeterminate: Ref<Record<string, boolean>, Record<string, boolean>>;
|
|
76
|
+
reserveSelection: Ref<boolean, boolean>;
|
|
77
|
+
selectOnIndeterminate: Ref<boolean, boolean>;
|
|
78
|
+
selectable: Ref<((row: T, index: number) => boolean) | null, ((row: T, index: number) => boolean) | null>;
|
|
79
|
+
rowExpandable: Ref<((row: T, index: number) => boolean) | null, ((row: T, index: number) => boolean) | null>;
|
|
80
|
+
filters: Ref<StoreFilter, StoreFilter>;
|
|
81
|
+
filteredData: Ref<T[] | null, T[] | null>;
|
|
82
|
+
sortingColumn: Ref<TableColumnCtx<T> | null, TableColumnCtx<T> | null>;
|
|
83
|
+
sortProp: Ref<string | null, string | null>;
|
|
84
|
+
sortOrder: Ref<TableSortOrder | null, TableSortOrder | null>;
|
|
85
|
+
hoverRow: Ref<T | null, T | null>;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
export default useWatcher;
|