@dazhicheng/ui 1.5.265 → 1.6.0
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/tt-area/TtArea.vue.js +1 -1
- package/dist/components/tt-drawer/src/components/DrawerHeader.vue.js +2 -2
- package/dist/components/tt-drawer/src/hooks/useResizable.js +2 -2
- package/dist/components/tt-form/src/components/FormElInput.vue.js +51 -38
- package/dist/components/tt-form/src/form-render/FormField.vue2.js +36 -36
- package/dist/components/tt-form/src/form-render/array-register/FormArrayRegister.d.ts +3 -3
- package/dist/components/tt-form/src/form-render/array-register/FormArrayRegister.js +3 -1
- package/dist/components/tt-icon/index.vue.js +2 -2
- package/dist/components/tt-loading/src/loading.vue.js +2 -2
- package/dist/components/tt-modal-form/index.vue.js +13 -12
- package/dist/components/tt-panel-select/src/components/PanelMiddle.vue.d.ts +2 -2
- package/dist/components/tt-panel-select/src/hooks/usePanelData.js +93 -86
- package/dist/components/tt-panel-select/src/index.vue.js +1 -0
- package/dist/components/tt-select/src/Select.vue.d.ts +4 -4
- package/dist/components/tt-select/src/components/Table.vue.d.ts +4 -4
- package/dist/components/tt-table/index.d.ts +523 -358
- package/dist/components/tt-table/index.js +7 -4
- package/dist/components/tt-table/src/Table.vue.d.ts +306 -216
- package/dist/components/tt-table/src/Table.vue.js +405 -618
- package/dist/components/tt-table/src/TableForm.vue.d.ts +384 -19
- package/dist/components/tt-table/src/TableForm.vue.js +219 -228
- package/dist/components/tt-table/src/components/TableAction.vue.js +108 -131
- package/dist/components/tt-table/src/components/TableButtons.js +25 -25
- package/dist/components/tt-table/src/components/TableColumnModal.vue2.js +88 -85
- package/dist/components/tt-table/src/components/TableToolbarTools.vue.d.ts +80 -0
- package/dist/components/tt-table/src/components/{TableToobalTools.vue.js → TableToolbarTools.vue.js} +29 -31
- package/dist/components/tt-table/src/components/TableToolbarTools.vue2.js +4 -0
- package/dist/components/tt-table/src/emits.js +2 -1
- package/dist/components/tt-table/src/hooks/useColumnPersistence.d.ts +19 -0
- package/dist/components/tt-table/src/hooks/useColumnPersistence.js +63 -0
- package/dist/components/tt-table/src/hooks/useColumns.d.ts +505 -21
- package/dist/components/tt-table/src/hooks/useColumns.js +100 -245
- package/dist/components/tt-table/src/hooks/useGridProps.d.ts +36 -0
- package/dist/components/tt-table/src/hooks/useGridProps.js +121 -0
- package/dist/components/tt-table/src/hooks/useKeyboardNav.d.ts +11 -0
- package/dist/components/tt-table/src/hooks/useKeyboardNav.js +97 -0
- package/dist/components/tt-table/src/hooks/usePagination.d.ts +14 -8
- package/dist/components/tt-table/src/hooks/usePagination.js +29 -33
- package/dist/components/tt-table/src/hooks/useQuery.d.ts +41 -0
- package/dist/components/tt-table/src/hooks/useQuery.js +147 -0
- package/dist/components/tt-table/src/hooks/useRowIdentity.d.ts +22 -0
- package/dist/components/tt-table/src/hooks/useRowIdentity.js +96 -0
- package/dist/components/tt-table/src/hooks/useRowSelection.d.ts +23 -7
- package/dist/components/tt-table/src/hooks/useRowSelection.js +95 -71
- package/dist/components/tt-table/src/hooks/{useLeftRightSlot.d.ts → useSideSlot.d.ts} +25 -17
- package/dist/components/tt-table/src/hooks/useSideSlot.js +77 -0
- package/dist/components/tt-table/src/hooks/useSyncProps.d.ts +12 -0
- package/dist/components/tt-table/src/hooks/useSyncProps.js +55 -0
- package/dist/components/tt-table/src/hooks/useTableData.d.ts +71 -0
- package/dist/components/tt-table/src/hooks/useTableData.js +307 -0
- package/dist/components/tt-table/src/hooks/useTableFooter.d.ts +15 -0
- package/dist/components/tt-table/src/hooks/useTableFooter.js +46 -0
- package/dist/components/tt-table/src/hooks/useTableForm.d.ts +10 -5
- package/dist/components/tt-table/src/hooks/useTableForm.js +55 -48
- package/dist/components/tt-table/src/hooks/useTableMethods.d.ts +165 -0
- package/dist/components/tt-table/src/hooks/useTableMethods.js +183 -0
- package/dist/components/tt-table/src/hooks/useTableRender.d.ts +24 -55
- package/dist/components/tt-table/src/props.d.ts +318 -151
- package/dist/components/tt-table/src/props.js +117 -270
- package/dist/components/tt-table/src/table-defaults.d.ts +25 -0
- package/dist/components/tt-table/src/table-defaults.js +71 -0
- package/dist/components/tt-table/src/table-mutation-events.d.ts +43 -0
- package/dist/components/tt-table/src/table-mutation-events.js +70 -0
- package/dist/components/tt-table/src/types/table.d.ts +207 -88
- package/dist/components/tt-table/src/types/tableAction.d.ts +23 -0
- package/dist/components/tt-table/src/types/tableForm.d.ts +15 -26
- package/dist/components/tt-table/src/utils/action-tab-index.d.ts +2 -0
- package/dist/components/tt-table/src/utils/action-tab-index.js +50 -0
- package/dist/components/tt-table/src/utils/context.js +25 -12
- package/dist/components/tt-table/src/utils/table-api.d.ts +136 -58
- package/dist/components/tt-table/src/utils/table-api.js +198 -165
- package/dist/components/tt-table/src/utils/table-form-api.d.ts +11 -11
- package/dist/components/tt-table/src/utils/table-form-api.js +41 -31
- package/dist/components/types.d.ts +0 -20
- package/dist/hooks/useSetup.js +0 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.js +105 -101
- package/dist/packages/hooks/src/useDebounce.js +6 -6
- package/dist/packages/utils/src/is.js +20 -18
- package/dist/packages/utils/src/tool.js +76 -149
- package/dist/style.css +1 -1
- package/dist/utils/uppercaseInput.d.ts +29 -0
- package/dist/utils/uppercaseInput.js +16 -0
- package/package.json +3 -3
- package/dist/components/tt-table/src/components/TableToobalTools.vue.d.ts +0 -576
- package/dist/components/tt-table/src/components/TableToobalTools.vue2.js +0 -4
- package/dist/components/tt-table/src/enum.d.ts +0 -2
- package/dist/components/tt-table/src/hooks/useCellArea.d.ts +0 -15
- package/dist/components/tt-table/src/hooks/useCellArea.js +0 -15
- package/dist/components/tt-table/src/hooks/useCustomColumns.d.ts +0 -20
- package/dist/components/tt-table/src/hooks/useCustomColumns.js +0 -65
- package/dist/components/tt-table/src/hooks/useDataSource.d.ts +0 -29
- package/dist/components/tt-table/src/hooks/useDataSource.js +0 -232
- package/dist/components/tt-table/src/hooks/useLeftRightSlot.js +0 -64
- package/dist/components/tt-table/src/hooks/useTable.d.ts +0 -7
- package/dist/components/tt-table/src/hooks/useTableEvent.d.ts +0 -101
- package/dist/components/tt-table/src/hooks/useTableEvent.js +0 -197
- package/dist/components/tt-table/src/hooks/useTableFormEvent.d.ts +0 -10
- package/dist/components/tt-table/src/hooks/useTableHeight.d.ts +0 -15
- package/dist/components/tt-table/src/hooks/useTableSlot.d.ts +0 -11
- package/dist/components/tt-table/src/hooks/useTableSlot.js +0 -17
- package/dist/components/tt-table/src/utils/filters.d.ts +0 -109
- package/dist/components/tt-table/src/utils/vxeTable.d.ts +0 -28
- package/dist/packages/utils/src/check.js +0 -10
|
@@ -1,181 +1,108 @@
|
|
|
1
|
-
import
|
|
1
|
+
import "dayjs";
|
|
2
2
|
import "vue";
|
|
3
3
|
import "xe-utils";
|
|
4
|
-
import { twMerge as
|
|
5
|
-
import { clsx as
|
|
6
|
-
import { klona as
|
|
7
|
-
import "dayjs";
|
|
4
|
+
import { twMerge as N } from "../../../node_modules/.pnpm/tailwind-merge@3.5.0/node_modules/tailwind-merge/dist/bundle-mjs.js";
|
|
5
|
+
import { clsx as W } from "../../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.js";
|
|
6
|
+
import { klona as j } from "../../../node_modules/.pnpm/klona@2.0.6/node_modules/klona/full/index.js";
|
|
8
7
|
import "dayjs/plugin/utc";
|
|
9
8
|
import "dayjs/plugin/timezone";
|
|
10
|
-
function
|
|
11
|
-
let
|
|
12
|
-
const
|
|
13
|
-
return
|
|
14
|
-
}
|
|
15
|
-
function S(n, i, e) {
|
|
16
|
-
const t = (e == null ? void 0 : e.excludeAll) || [], f = (e == null ? void 0 : e.exclude) || [];
|
|
17
|
-
return t.includes("Id") || t.push("Id"), t.includes("rowId") || t.push("rowId"), Object.fromEntries(
|
|
18
|
-
Object.entries(n).reduce((o, [s, r]) => (t.includes(s) || f.includes(s) || (r && v(r) ? L(e, i, r, s, o) : r && E(r) ? z(e, i, r, s, o) : H(e, i, r, s, o)), o), [])
|
|
19
|
-
);
|
|
20
|
-
}
|
|
21
|
-
function L(n, i, e, t, f) {
|
|
22
|
-
const o = S(e, i[t] || {}, {
|
|
23
|
-
excludeAll: n == null ? void 0 : n.excludeAll,
|
|
24
|
-
...n
|
|
25
|
-
});
|
|
26
|
-
Object.keys(o).length && f.push([t, o]);
|
|
27
|
-
}
|
|
28
|
-
function z(n, i, e, t, f) {
|
|
29
|
-
var r, d, u;
|
|
30
|
-
const o = [], s = (r = (n || {})[t]) == null ? void 0 : r.key;
|
|
31
|
-
if (i[t]) {
|
|
32
|
-
const a = (e == null ? void 0 : e.length) >= ((d = i[t]) == null ? void 0 : d.length) ? e : i[t], g = (e == null ? void 0 : e.length) < ((u = i[t]) == null ? void 0 : u.length) ? e : i[t];
|
|
33
|
-
s ? a.forEach((l) => {
|
|
34
|
-
const p = g.find((h) => h[s] === l[s]);
|
|
35
|
-
if (p) {
|
|
36
|
-
const h = S(l, p, {
|
|
37
|
-
excludeAll: n == null ? void 0 : n.excludeAll,
|
|
38
|
-
...n[t]
|
|
39
|
-
});
|
|
40
|
-
Object.keys(h).length && o.push({ [s]: p[s], ...h });
|
|
41
|
-
} else
|
|
42
|
-
o.push(l);
|
|
43
|
-
}) : a.forEach((l, p) => {
|
|
44
|
-
const h = g[p];
|
|
45
|
-
if (v(l) && !v(h) || E(l) && !E(h) || typeof l != typeof h || !h)
|
|
46
|
-
o.push(l);
|
|
47
|
-
else if (v(l) || E(l)) {
|
|
48
|
-
const A = S(l, h, { excludeAll: n == null ? void 0 : n.excludeAll });
|
|
49
|
-
Object.keys(A).length && o.push({ ...A });
|
|
50
|
-
} else l !== h && o.push(l);
|
|
51
|
-
});
|
|
52
|
-
} else
|
|
53
|
-
o.push(...e);
|
|
54
|
-
o.length && f.push([t, o]);
|
|
55
|
-
}
|
|
56
|
-
function H(n, i, e, t, f) {
|
|
57
|
-
const o = (n == null ? void 0 : n.notNullToFalse) || [];
|
|
58
|
-
if (typeof e == "string" && typeof i[t] == "number" || typeof e == "number" && typeof i[t] == "string")
|
|
59
|
-
Number(e) !== Number(i[t]) && f.push([t, e]);
|
|
60
|
-
else if ([void 0, null, ""].includes(e))
|
|
61
|
-
[void 0, null, ""].includes(i[t]) || f.push([t, e]);
|
|
62
|
-
else if (e !== i[t]) {
|
|
63
|
-
if (e === !1 && [void 0, null, ""].includes(i[t]) && !o.includes(t))
|
|
64
|
-
return;
|
|
65
|
-
f.push([t, e]);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
function W(n, i, e) {
|
|
69
|
-
const t = {}, f = ["rowId", "row_id"], o = (e == null ? void 0 : e.excludeAll) || [], s = (e == null ? void 0 : e.exclude) || [];
|
|
70
|
-
for (const r in i)
|
|
71
|
-
if (Object.prototype.hasOwnProperty.call(i, r) && ![...o, ...f].includes(r) && ![...s, ...f].includes(r)) {
|
|
72
|
-
const d = n[r], u = i[r];
|
|
73
|
-
if (Array.isArray(u) && Array.isArray(d))
|
|
74
|
-
(d.length !== u.length || d.some((g, l) => typeof g == "object" && typeof u[l] == "object" ? Object.keys(W(g, u[l], { excludeAll: o, ...e == null ? void 0 : e[r] })).length > 0 : g !== u[l])) && (t[r] = u);
|
|
75
|
-
else if (typeof u == "object" && typeof d == "object" && u !== null && d !== null) {
|
|
76
|
-
const a = W(d, u, { excludeAll: o, ...e == null ? void 0 : e[r] });
|
|
77
|
-
Object.keys(a).length > 0 && (t[r] = a);
|
|
78
|
-
} else d !== u && String(d) !== String(u) && (t[r] = u);
|
|
79
|
-
}
|
|
80
|
-
return t;
|
|
9
|
+
function P(o, i = "12", m = "Microsoft YaHei,Arial,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue','Noto Sans',sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol','Noto Color Emoji'") {
|
|
10
|
+
let s = 0;
|
|
11
|
+
const n = document.createElement("canvas").getContext("2d");
|
|
12
|
+
return n && (n.font = `${i} ${m}`, s = n.measureText(o).width), s;
|
|
81
13
|
}
|
|
82
|
-
function
|
|
83
|
-
const i = Object.getPrototypeOf(
|
|
14
|
+
function z(o) {
|
|
15
|
+
const i = Object.getPrototypeOf(o);
|
|
84
16
|
if (!i || i === Object.prototype)
|
|
85
|
-
return
|
|
86
|
-
const
|
|
87
|
-
for (const
|
|
88
|
-
const f =
|
|
89
|
-
|
|
17
|
+
return o;
|
|
18
|
+
const m = Object.getOwnPropertyNames(i);
|
|
19
|
+
for (const s of m) {
|
|
20
|
+
const f = o[s];
|
|
21
|
+
s !== "constructor" && typeof f == "function" && (o[s] = f.bind(o));
|
|
90
22
|
}
|
|
91
|
-
return
|
|
23
|
+
return o;
|
|
92
24
|
}
|
|
93
|
-
function
|
|
94
|
-
for (const i of
|
|
25
|
+
function F(...o) {
|
|
26
|
+
for (const i of o)
|
|
95
27
|
if (i != null)
|
|
96
28
|
return i;
|
|
97
29
|
}
|
|
98
|
-
function
|
|
99
|
-
return
|
|
30
|
+
function H(...o) {
|
|
31
|
+
return N(W(o));
|
|
100
32
|
}
|
|
101
|
-
function
|
|
102
|
-
const
|
|
103
|
-
window.dispatchEvent(
|
|
33
|
+
function R() {
|
|
34
|
+
const o = new Event("resize");
|
|
35
|
+
window.dispatchEvent(o);
|
|
104
36
|
}
|
|
105
|
-
function
|
|
106
|
-
return
|
|
37
|
+
function $(o) {
|
|
38
|
+
return j(o);
|
|
107
39
|
}
|
|
108
|
-
function
|
|
109
|
-
const { leading:
|
|
110
|
-
let
|
|
111
|
-
function
|
|
112
|
-
const
|
|
113
|
-
return
|
|
40
|
+
function B(o, i = 200, m = {}) {
|
|
41
|
+
const { leading: s = !1, trailing: f = !0, maxWait: n } = m;
|
|
42
|
+
let r, d, l, a = 0, c, u;
|
|
43
|
+
function g(t) {
|
|
44
|
+
const e = c;
|
|
45
|
+
return c = void 0, a = t, u = o(...e), u;
|
|
114
46
|
}
|
|
115
47
|
function p() {
|
|
116
|
-
|
|
48
|
+
r !== void 0 && (window.clearTimeout(r), r = void 0), d !== void 0 && (window.clearTimeout(d), d = void 0);
|
|
117
49
|
}
|
|
118
|
-
function
|
|
119
|
-
p(),
|
|
50
|
+
function S() {
|
|
51
|
+
p(), a = 0, c = void 0, l = void 0, u = void 0;
|
|
120
52
|
}
|
|
121
|
-
function
|
|
122
|
-
const
|
|
123
|
-
return
|
|
53
|
+
function h(t) {
|
|
54
|
+
const e = t - l, w = t - a, b = i - e;
|
|
55
|
+
return n !== void 0 ? Math.min(b, n - w) : b;
|
|
124
56
|
}
|
|
125
|
-
function
|
|
126
|
-
if (
|
|
127
|
-
const
|
|
128
|
-
return
|
|
57
|
+
function x(t) {
|
|
58
|
+
if (l === void 0) return !0;
|
|
59
|
+
const e = t - l, w = t - a;
|
|
60
|
+
return e >= i || e < 0 || n !== void 0 && w >= n;
|
|
129
61
|
}
|
|
130
|
-
function
|
|
131
|
-
return
|
|
62
|
+
function k(t) {
|
|
63
|
+
return a = t, p(), r = window.setTimeout(T, i), n !== void 0 && (d = window.setTimeout(E, n)), s ? g(t) : u;
|
|
132
64
|
}
|
|
133
|
-
function
|
|
134
|
-
return
|
|
65
|
+
function I(t) {
|
|
66
|
+
return r = void 0, f && c !== void 0 ? g(t) : (c = void 0, u);
|
|
135
67
|
}
|
|
136
68
|
function T() {
|
|
137
|
-
const
|
|
138
|
-
if (
|
|
139
|
-
|
|
69
|
+
const t = Date.now();
|
|
70
|
+
if (x(t)) {
|
|
71
|
+
I(t);
|
|
140
72
|
return;
|
|
141
73
|
}
|
|
142
|
-
const
|
|
143
|
-
|
|
74
|
+
const e = h(t);
|
|
75
|
+
e > 0 ? r = window.setTimeout(T, e) : r = void 0;
|
|
144
76
|
}
|
|
145
|
-
function
|
|
146
|
-
const
|
|
147
|
-
p(),
|
|
77
|
+
function E() {
|
|
78
|
+
const t = Date.now();
|
|
79
|
+
p(), c !== void 0 && g(t);
|
|
148
80
|
}
|
|
149
|
-
const
|
|
150
|
-
const
|
|
151
|
-
if (
|
|
152
|
-
if (
|
|
153
|
-
return
|
|
154
|
-
if (
|
|
155
|
-
return p(),
|
|
81
|
+
const v = (...t) => {
|
|
82
|
+
const e = Date.now(), w = x(e);
|
|
83
|
+
if (c = t ?? [], l = e, w) {
|
|
84
|
+
if (r === void 0)
|
|
85
|
+
return k(e);
|
|
86
|
+
if (n !== void 0)
|
|
87
|
+
return p(), r = window.setTimeout(T, i), d = window.setTimeout(E, n), s ? g(e) : u;
|
|
156
88
|
}
|
|
157
|
-
return
|
|
89
|
+
return r === void 0 && (r = window.setTimeout(T, i), n !== void 0 && (d = window.setTimeout(E, n))), u;
|
|
158
90
|
};
|
|
159
|
-
return
|
|
160
|
-
|
|
161
|
-
},
|
|
162
|
-
if (!
|
|
163
|
-
return
|
|
164
|
-
const
|
|
165
|
-
return
|
|
166
|
-
},
|
|
91
|
+
return v.isPending = () => r !== void 0 || d !== void 0, v.cancel = () => {
|
|
92
|
+
S();
|
|
93
|
+
}, v.flush = (...t) => {
|
|
94
|
+
if (!v.isPending())
|
|
95
|
+
return t.length > 0 ? o(...t) : u;
|
|
96
|
+
const e = c !== void 0 ? c : t;
|
|
97
|
+
return S(), o(...e);
|
|
98
|
+
}, v;
|
|
167
99
|
}
|
|
168
100
|
export {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
X as getFirstNonNullOrUndefined,
|
|
177
|
-
z as setDifferenceArr,
|
|
178
|
-
H as setDifferenceField,
|
|
179
|
-
L as setDifferenceObj,
|
|
180
|
-
y as triggerWindowResize
|
|
101
|
+
z as bindMethods,
|
|
102
|
+
P as calcWordsWidth,
|
|
103
|
+
H as clnm,
|
|
104
|
+
$ as cloneDeep,
|
|
105
|
+
B as debounce,
|
|
106
|
+
F as getFirstNonNullOrUndefined,
|
|
107
|
+
R as triggerWindowResize
|
|
181
108
|
};
|