@dazhicheng/ui 1.5.266 → 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/form-render/array-register/FormArrayRegister.d.ts +3 -3
- 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-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 +6 -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 +218 -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/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/package.json +1 -1
- 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,63 +1,72 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
1
|
+
var m = Object.defineProperty;
|
|
2
|
+
var b = (s, t, e) => t in s ? m(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
|
|
3
|
+
var r = (s, t, e) => b(s, typeof t != "symbol" ? t + "" : t, e);
|
|
4
4
|
import "axios";
|
|
5
5
|
import "element-plus";
|
|
6
|
-
import { isFunction as
|
|
7
|
-
import { reactive as i, computed as u, toValue as
|
|
8
|
-
import { bindMethods as
|
|
6
|
+
import { isFunction as c } from "../../../../packages/utils/src/is.js";
|
|
7
|
+
import { reactive as i, computed as u, toValue as f } from "vue";
|
|
8
|
+
import { bindMethods as d } from "../../../../packages/utils/src/tool.js";
|
|
9
9
|
import { mergeWithArrayOverride as a } from "../../../../packages/utils/src/merge.js";
|
|
10
10
|
import "../../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
11
|
-
import { StateHandler as
|
|
11
|
+
import { StateHandler as O } from "../../../../packages/utils/src/stateHandler.js";
|
|
12
12
|
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
13
13
|
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
|
|
14
14
|
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
15
15
|
import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
16
16
|
import "lodash-es";
|
|
17
|
-
import { Store as
|
|
18
|
-
import { getDefaultState as y, TableApi as
|
|
19
|
-
|
|
17
|
+
import { Store as A, useStore as S } from "@tanstack/vue-store";
|
|
18
|
+
import { getDefaultState as y, TableApi as j } from "./table-api.js";
|
|
19
|
+
function g(s) {
|
|
20
|
+
if (!s) return;
|
|
21
|
+
const t = {};
|
|
22
|
+
return Object.keys(s).forEach((e) => {
|
|
23
|
+
e !== "data" && Object.assign(t, { [e]: s[e] });
|
|
24
|
+
}), t;
|
|
25
|
+
}
|
|
26
|
+
class V {
|
|
20
27
|
/**
|
|
21
28
|
* 构造函数,初始化 store、tableApi、状态等
|
|
22
29
|
* @param options 表单+表格配置项
|
|
23
30
|
*/
|
|
24
31
|
constructor(t = {}) {
|
|
25
32
|
/** form 表单实例(FormApi) */
|
|
26
|
-
|
|
33
|
+
r(this, "formApi", i({}));
|
|
27
34
|
/** 表格 API 实例(TableApi) */
|
|
28
|
-
|
|
35
|
+
r(this, "tableApi", i({}));
|
|
29
36
|
/** vxe-grid 表格实例 */
|
|
30
|
-
|
|
37
|
+
r(this, "grid", i({}));
|
|
31
38
|
/** 当前表单+表格的 props 状态 */
|
|
32
|
-
|
|
39
|
+
r(this, "state", null);
|
|
33
40
|
/** 表单操作方法集合(TableFormActionType) */
|
|
34
|
-
|
|
41
|
+
r(this, "tableForm", i({}));
|
|
35
42
|
/** 响应式 store,存储表单+表格的状态 */
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
43
|
+
r(this, "store");
|
|
44
|
+
r(this, "isMounted", !1);
|
|
45
|
+
r(this, "stateHandler");
|
|
39
46
|
/**
|
|
40
47
|
* 当前选中的行 key 数组(响应式)
|
|
41
48
|
*/
|
|
42
|
-
|
|
43
|
-
const e = { ...t }, o =
|
|
44
|
-
|
|
49
|
+
r(this, "selectedKeys", u(() => f(this.tableApi.selectedKeys) ?? []));
|
|
50
|
+
const e = { ...t }, o = g(t.table);
|
|
51
|
+
o && (e.table = o);
|
|
52
|
+
const p = y();
|
|
53
|
+
this.store = new A(
|
|
45
54
|
a(e, {
|
|
46
55
|
useSearchForm: !0,
|
|
47
|
-
table:
|
|
48
|
-
tableRowId:
|
|
56
|
+
table: p,
|
|
57
|
+
tableRowId: p.tableRowId || "id"
|
|
49
58
|
}),
|
|
50
59
|
{
|
|
51
60
|
onUpdate: () => {
|
|
52
61
|
this.state = this.store.state;
|
|
53
62
|
}
|
|
54
63
|
}
|
|
55
|
-
), this.state = this.store.state, this.stateHandler = new
|
|
56
|
-
const
|
|
64
|
+
), this.state = this.store.state, this.stateHandler = new O();
|
|
65
|
+
const n = new j({
|
|
57
66
|
...this.state.table,
|
|
58
67
|
useSearchForm: this.state.useSearchForm || !1
|
|
59
|
-
}), l =
|
|
60
|
-
l.useStore = (
|
|
68
|
+
}), l = n;
|
|
69
|
+
l.useStore = (h) => S(n.store, h), Object.setPrototypeOf(this.tableApi, l), d(this);
|
|
61
70
|
}
|
|
62
71
|
/**
|
|
63
72
|
* 组件挂载时调用,注入表单和表格实例
|
|
@@ -73,14 +82,14 @@ class U {
|
|
|
73
82
|
* @param stateOrFn 新状态或返回新状态的函数
|
|
74
83
|
*/
|
|
75
84
|
setState(t) {
|
|
76
|
-
|
|
85
|
+
c(t) ? this.store.setState((e) => a(t(e), e)) : this.store.setState((e) => a(t, e));
|
|
77
86
|
}
|
|
78
87
|
/**
|
|
79
88
|
* 重新加载表格数据
|
|
80
89
|
* @param data 可选的查询参数
|
|
81
90
|
*/
|
|
82
91
|
async reload(t) {
|
|
83
|
-
this.tableForm.reload(t);
|
|
92
|
+
await this.tableForm.reload(t);
|
|
84
93
|
}
|
|
85
94
|
/**
|
|
86
95
|
* 获取表单实例
|
|
@@ -125,9 +134,10 @@ class U {
|
|
|
125
134
|
* 组件卸载时调用,重置挂载状态
|
|
126
135
|
*/
|
|
127
136
|
unmount() {
|
|
128
|
-
|
|
137
|
+
var t;
|
|
138
|
+
this.isMounted = !1, (t = this.tableApi) == null || t.unmount(), Object.setPrototypeOf(this.grid, Object.prototype), Object.setPrototypeOf(this.formApi, Object.prototype), Object.setPrototypeOf(this.tableForm, Object.prototype), this.stateHandler.reset();
|
|
129
139
|
}
|
|
130
140
|
}
|
|
131
141
|
export {
|
|
132
|
-
|
|
142
|
+
V as TableFormApi
|
|
133
143
|
};
|
|
@@ -80,17 +80,6 @@ export type TtUiGlobalConfig = {
|
|
|
80
80
|
* @default-id
|
|
81
81
|
*/
|
|
82
82
|
tableRowId?: string;
|
|
83
|
-
/**
|
|
84
|
-
* 请求的状态码
|
|
85
|
-
* @default-200
|
|
86
|
-
* @deprecated
|
|
87
|
-
*/
|
|
88
|
-
resultCode?: string | number;
|
|
89
|
-
/**
|
|
90
|
-
* loading text
|
|
91
|
-
* @default-loading text
|
|
92
|
-
*/
|
|
93
|
-
loadingText?: string;
|
|
94
83
|
/**
|
|
95
84
|
* empty text
|
|
96
85
|
* @default-暂无数据
|
|
@@ -130,11 +119,6 @@ export type TtUiGlobalConfig = {
|
|
|
130
119
|
* 表格边框
|
|
131
120
|
*/
|
|
132
121
|
border?: "full" | "inner" | "outer" | "none" | boolean;
|
|
133
|
-
/**
|
|
134
|
-
* 是否开启缓存
|
|
135
|
-
* @default-false 不开启
|
|
136
|
-
*/
|
|
137
|
-
useCache?: boolean;
|
|
138
122
|
/**
|
|
139
123
|
* 是否显示右边刷新按钮
|
|
140
124
|
* @default-true 显示
|
|
@@ -155,12 +139,8 @@ export type TtUiGlobalConfig = {
|
|
|
155
139
|
* @default-true 显示
|
|
156
140
|
*/
|
|
157
141
|
showSetColumn?: boolean;
|
|
158
|
-
/** 是否显示自定义行距 */
|
|
159
|
-
showLineHeight?: boolean;
|
|
160
142
|
/** 自定义函数 */
|
|
161
143
|
customizeColumn?: TtTableProps["customizeColumn"];
|
|
162
|
-
/** 外部插槽 */
|
|
163
|
-
getSyncSlotComponent?: TtTableProps["getSyncSlotComponent"];
|
|
164
144
|
/**
|
|
165
145
|
* 表格斑马线
|
|
166
146
|
* @default- false
|
package/dist/hooks/useSetup.js
CHANGED
|
@@ -15,8 +15,6 @@ const i = {
|
|
|
15
15
|
totalField: "total",
|
|
16
16
|
dataField: "list",
|
|
17
17
|
tableRowId: "id",
|
|
18
|
-
resultCode: 200,
|
|
19
|
-
loadingText: "加载中...",
|
|
20
18
|
emptyText: "暂无数据",
|
|
21
19
|
noSearchText: "请先点击查询",
|
|
22
20
|
keyboardConfig: {
|
|
@@ -33,7 +31,6 @@ const i = {
|
|
|
33
31
|
showSetting: !0,
|
|
34
32
|
showRefresh: !0,
|
|
35
33
|
showExport: !1,
|
|
36
|
-
useCache: !1,
|
|
37
34
|
defaultDisplayFields: [],
|
|
38
35
|
isReloadResetToFirstPage: !0,
|
|
39
36
|
stripe: !0,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import "axios";
|
|
2
2
|
import "element-plus";
|
|
3
3
|
import "dayjs";
|
|
4
|
-
import "vue";
|
|
5
|
-
import { debounce as
|
|
4
|
+
import { getCurrentScope as p, onScopeDispose as i } from "vue";
|
|
5
|
+
import { debounce as n } from "../../utils/src/tool.js";
|
|
6
6
|
import "../../../node_modules/.pnpm/decimal.js@10.6.0/node_modules/decimal.js/decimal.js";
|
|
7
7
|
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/aes.js";
|
|
8
8
|
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/enc-utf8.js";
|
|
9
9
|
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-ecb.js";
|
|
10
10
|
import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
|
|
11
11
|
import "lodash-es";
|
|
12
|
-
function
|
|
13
|
-
const o =
|
|
14
|
-
return {
|
|
12
|
+
function S(r, e, t) {
|
|
13
|
+
const o = n(r, e ?? 200, t);
|
|
14
|
+
return p() && i(o.cancel), {
|
|
15
15
|
/**
|
|
16
16
|
* 防抖函数,保持原函数的返回类型
|
|
17
17
|
* 如果原函数是异步的,返回 Promise;如果是同步的,返回原始类型
|
|
@@ -28,5 +28,5 @@ function h(r, t, i) {
|
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
export {
|
|
31
|
-
|
|
31
|
+
S as useDebounceFn
|
|
32
32
|
};
|
|
@@ -18,47 +18,49 @@ function e(n) {
|
|
|
18
18
|
function c(n) {
|
|
19
19
|
return e(n) ? !1 : n instanceof Promise ? !0 : t(n, "Object");
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
return e(n) ? !0 :
|
|
21
|
+
function j(n) {
|
|
22
|
+
return e(n) ? !0 : d(n) || y(n) ? n.length === 0 : n instanceof Map || n instanceof Set ? n.size === 0 : c(n) ? Object.keys(n).length === 0 : !1;
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function m(n) {
|
|
25
25
|
return t(n, "Date");
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function b(n) {
|
|
28
28
|
return t(n, "Number") && n === n;
|
|
29
29
|
}
|
|
30
30
|
function y(n) {
|
|
31
31
|
return t(n, "String");
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function a(n) {
|
|
34
34
|
return typeof n == "function";
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function g(n) {
|
|
37
37
|
return t(n, "Boolean");
|
|
38
38
|
}
|
|
39
|
-
function
|
|
40
|
-
return
|
|
39
|
+
function d(n) {
|
|
40
|
+
return Array.isArray(n);
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function D(n) {
|
|
43
43
|
return typeof Element > "u" ? !1 : n instanceof Element;
|
|
44
44
|
}
|
|
45
|
-
|
|
45
|
+
const O = typeof window > "u";
|
|
46
|
+
function S(n) {
|
|
46
47
|
return i.isDayjs(n);
|
|
47
48
|
}
|
|
48
49
|
export {
|
|
49
50
|
t as is,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
d as isArray,
|
|
52
|
+
g as isBoolean,
|
|
53
|
+
m as isDate,
|
|
54
|
+
S as isDayjsObject,
|
|
54
55
|
f as isDef,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
D as isElement,
|
|
57
|
+
j as isEmpty,
|
|
58
|
+
a as isFunction,
|
|
58
59
|
s as isNull,
|
|
59
60
|
e as isNullOrUnDef,
|
|
60
|
-
|
|
61
|
+
b as isNumber,
|
|
61
62
|
c as isObject,
|
|
63
|
+
O as isServer,
|
|
62
64
|
y as isString,
|
|
63
65
|
o as isUndefined
|
|
64
66
|
};
|
|
@@ -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
|
};
|