bitz-react-admin-ui 2.9.0 → 2.10.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/_virtual/lodash.mjs +4 -0
- package/dist/components/BitzTable/Store/utils/index.d.ts +3 -1
- package/dist/components/BitzTable/Store/utils/index.mjs +26 -38
- package/dist/components/BitzTable/Table/ResizableTitle copy.mjs +35 -35
- package/dist/components/BitzTable/Table/index.mjs +454 -494
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +144 -142
- package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.mjs +55 -49
- package/dist/components/BitzTable/ToolBar/index.d.ts +3 -0
- package/dist/node_modules/lodash/lodash.mjs +3680 -0
- package/dist/node_modules/lodash-es/_SetCache.mjs +13 -0
- package/dist/node_modules/lodash-es/_arrayIncludes.mjs +8 -0
- package/dist/node_modules/lodash-es/_arrayIncludesWith.mjs +9 -0
- package/dist/node_modules/lodash-es/_arraySome.mjs +9 -0
- package/dist/node_modules/lodash-es/_baseFindIndex.mjs +9 -0
- package/dist/node_modules/lodash-es/_baseForOwn.mjs +8 -0
- package/dist/node_modules/lodash-es/_baseHasIn.mjs +6 -0
- package/dist/node_modules/lodash-es/_baseIndexOf.mjs +9 -0
- package/dist/node_modules/lodash-es/_baseIsEqual.mjs +8 -0
- package/dist/node_modules/lodash-es/_baseIsEqualDeep.mjs +32 -0
- package/dist/node_modules/lodash-es/_baseIsMatch.mjs +31 -0
- package/dist/node_modules/lodash-es/_baseIsNaN.mjs +6 -0
- package/dist/node_modules/lodash-es/_baseIteratee.mjs +11 -0
- package/dist/node_modules/lodash-es/_baseMatches.mjs +12 -0
- package/dist/node_modules/lodash-es/_baseMatchesProperty.mjs +17 -0
- package/dist/node_modules/lodash-es/_baseProperty.mjs +8 -0
- package/dist/node_modules/lodash-es/_basePropertyDeep.mjs +9 -0
- package/dist/node_modules/lodash-es/_baseUniq.mjs +34 -0
- package/dist/node_modules/lodash-es/_cacheHas.mjs +6 -0
- package/dist/node_modules/lodash-es/_createSet.mjs +10 -0
- package/dist/node_modules/lodash-es/_equalArrays.mjs +40 -0
- package/dist/node_modules/lodash-es/_equalByTag.mjs +45 -0
- package/dist/node_modules/lodash-es/_equalObjects.mjs +36 -0
- package/dist/node_modules/lodash-es/_getMatchData.mjs +12 -0
- package/dist/node_modules/lodash-es/_hasPath.mjs +19 -0
- package/dist/node_modules/lodash-es/_isStrictComparable.mjs +7 -0
- package/dist/node_modules/lodash-es/_mapToArray.mjs +9 -0
- package/dist/node_modules/lodash-es/_matchesStrictComparable.mjs +8 -0
- package/dist/node_modules/lodash-es/_setCacheAdd.mjs +7 -0
- package/dist/node_modules/lodash-es/_setCacheHas.mjs +6 -0
- package/dist/node_modules/lodash-es/_setToArray.mjs +9 -0
- package/dist/node_modules/lodash-es/_strictIndexOf.mjs +9 -0
- package/dist/node_modules/lodash-es/hasIn.mjs +8 -0
- package/dist/node_modules/lodash-es/mapValues.mjs +12 -0
- package/dist/node_modules/lodash-es/noop.mjs +5 -0
- package/dist/node_modules/lodash-es/property.mjs +10 -0
- package/dist/node_modules/lodash-es/uniq.mjs +7 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -10,5 +10,7 @@ export declare const loopFilter: (columns: any[], columnsMap: any) => any[];
|
|
|
10
10
|
export declare const genColumnKey: (column: any, defaultKey?: any) => any;
|
|
11
11
|
export declare const flattenColumns: (columns: any) => any[];
|
|
12
12
|
export declare const columnSort: (columnsMap: Record<string, ColumnsConfigProps>) => (a: any, b: any) => number;
|
|
13
|
-
export declare function updateNestedObject(obj: any, prop: any, val: any): {
|
|
13
|
+
export declare function updateNestedObject(obj: any, prop: any, val: any): {
|
|
14
|
+
[x: string]: any;
|
|
15
|
+
};
|
|
14
16
|
export declare const removePropertiesWithoutMutation: (obj: any, without: any) => {};
|
|
@@ -1,62 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { l as y } from "../../../../node_modules/lodash/lodash.mjs";
|
|
2
|
+
const I = (e, r) => ((t, i) => t.map((d) => {
|
|
3
|
+
const f = h(d, d.index), o = i[f];
|
|
4
|
+
return o && o.show === !1 ? !1 : {
|
|
4
5
|
...d,
|
|
5
|
-
...
|
|
6
|
+
...o
|
|
6
7
|
// ...item?.isOperationCol && {
|
|
7
8
|
// width: finish ? config?.width ?? item?.width : item?.width
|
|
8
9
|
// },
|
|
9
10
|
};
|
|
10
|
-
}))(e, r).filter(Boolean),
|
|
11
|
+
}))(e, r).filter(Boolean), h = (e, r) => "key" in e && e.key !== void 0 && e.key !== null ? e.key : e.dataIndex ? Array.isArray(e.dataIndex) ? e.dataIndex.join("-") : e.dataIndex : `${r}`, k = (e) => {
|
|
11
12
|
const r = [];
|
|
12
|
-
function
|
|
13
|
-
t.children ? t.children.forEach(
|
|
13
|
+
function n(t) {
|
|
14
|
+
t.children ? t.children.forEach(n) : t.dataIndex && !t.exportHidden && r.push({
|
|
14
15
|
field: t.dataIndex,
|
|
15
16
|
title: t.title,
|
|
16
17
|
show: !0
|
|
17
18
|
});
|
|
18
19
|
}
|
|
19
|
-
return e.forEach(
|
|
20
|
-
},
|
|
21
|
-
var
|
|
22
|
-
const { fixed: t, index:
|
|
20
|
+
return e.forEach(n), r;
|
|
21
|
+
}, g = (e) => (r, n) => {
|
|
22
|
+
var s, l, x, u;
|
|
23
|
+
const { fixed: t, index: i } = r, { fixed: d, index: f } = n;
|
|
23
24
|
if (t === "left" && d !== "left" || d === "right" && t !== "right")
|
|
24
25
|
return -2;
|
|
25
26
|
if (d === "left" && t !== "left" || t === "right" && d !== "right")
|
|
26
27
|
return 2;
|
|
27
|
-
const
|
|
28
|
-
return (
|
|
28
|
+
const o = r.key || `${i}`, a = n.key || `${f}`;
|
|
29
|
+
return (s = e[o]) != null && s.order || (l = e[a]) != null && l.order ? (((x = e[o]) == null ? void 0 : x.order) || 0) - (((u = e[a]) == null ? void 0 : u.order) || 0) : (r.index || 0) - (n.index || 0);
|
|
29
30
|
};
|
|
30
|
-
function
|
|
31
|
-
|
|
32
|
-
let n = "";
|
|
33
|
-
const d = (o, s, a) => {
|
|
34
|
-
for (const f in o)
|
|
35
|
-
if (o.hasOwnProperty(f) && (typeof o[f] == "object" && o[f] !== null && (n = f, t[f] = { ...o[f] }, d(o[f], s, a)), f === s)) {
|
|
36
|
-
const l = t[n];
|
|
37
|
-
t[n] = {
|
|
38
|
-
...l,
|
|
39
|
-
[s]: a
|
|
40
|
-
// [prop]: current.disabled || current.fixed ? true : val,
|
|
41
|
-
}, n = "";
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
return d(e, r, i), t;
|
|
31
|
+
function K(e, r, n) {
|
|
32
|
+
return y.mapValues(e, (t) => ({ ...t, [r]: n }));
|
|
45
33
|
}
|
|
46
|
-
const
|
|
47
|
-
let
|
|
34
|
+
const p = (e, r) => {
|
|
35
|
+
let n = {};
|
|
48
36
|
for (let t in e)
|
|
49
37
|
if (e.hasOwnProperty(t)) {
|
|
50
|
-
let
|
|
51
|
-
typeof
|
|
38
|
+
let i = e[t];
|
|
39
|
+
typeof i == "object" && i !== null && (i = p(i, r)), r.includes(t) || (n[t] = i);
|
|
52
40
|
}
|
|
53
|
-
return
|
|
41
|
+
return n;
|
|
54
42
|
};
|
|
55
43
|
export {
|
|
56
|
-
|
|
44
|
+
g as columnSort,
|
|
57
45
|
k as flattenColumns,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
46
|
+
h as genColumnKey,
|
|
47
|
+
I as loopFilter,
|
|
48
|
+
p as removePropertiesWithoutMutation,
|
|
49
|
+
K as updateNestedObject
|
|
62
50
|
};
|
|
@@ -1,66 +1,66 @@
|
|
|
1
1
|
import { j as a } from "../../../node_modules/react/jsx-runtime.mjs";
|
|
2
|
-
import { Resizable as
|
|
3
|
-
import { useState as
|
|
4
|
-
import
|
|
2
|
+
import { Resizable as X } from "../../../node_modules/react-resizable/index.mjs";
|
|
3
|
+
import { useState as v, useMemo as b, useRef as o } from "react";
|
|
4
|
+
import E from "../../../node_modules/classnames/index.mjs";
|
|
5
5
|
const d = 56, C = (p) => {
|
|
6
|
-
const { hasScrollBar:
|
|
7
|
-
var
|
|
8
|
-
const
|
|
9
|
-
return ((
|
|
10
|
-
}, [p]), c =
|
|
6
|
+
const { hasScrollBar: x, scrollbarSize: L, onResize: g, width: n, datagridref: S, stretchref: u, ...y } = p, [j, m] = v(!1), R = b(() => {
|
|
7
|
+
var e, z;
|
|
8
|
+
const t = { ...y };
|
|
9
|
+
return ((e = t.className) == null ? void 0 : e.includes("ant-table-cell-fix-right")) && !x && ((z = t.style) != null && z.right), t;
|
|
10
|
+
}, [p]), c = o(0), f = o(0), r = o(0), i = o(0), l = o(!1), h = b(() => c.current - n + d, [c.current, n]);
|
|
11
11
|
if (!n)
|
|
12
12
|
return /* @__PURE__ */ a.jsx("th", { ...R });
|
|
13
|
-
const
|
|
14
|
-
if (r.current =
|
|
15
|
-
|
|
13
|
+
const D = (t) => {
|
|
14
|
+
if (r.current = t.clientX - f.current, n + r.current - c.current <= d || r.current < h) {
|
|
15
|
+
l.current = !0;
|
|
16
16
|
return;
|
|
17
17
|
}
|
|
18
|
-
r.current >= h &&
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
}, w = (
|
|
18
|
+
r.current >= h && l.current && (r.current = h, l.current = !1);
|
|
19
|
+
const e = u.current;
|
|
20
|
+
i.current = r.current, e.style.left = `${i.current}px`;
|
|
21
|
+
}, w = (t) => {
|
|
22
22
|
m(!0);
|
|
23
23
|
const s = u.current;
|
|
24
24
|
s.style.opacity = 1, s.style.pointerEvents = "auto", f.current = S.current.getBoundingClientRect().left;
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}, 200),
|
|
33
|
-
|
|
25
|
+
const e = t.clientX - f.current;
|
|
26
|
+
i.current = e, s.style.left = `${e}px`, c.current = e, r.current = e;
|
|
27
|
+
}, N = (t, s) => {
|
|
28
|
+
l.current = !1, m(!1);
|
|
29
|
+
const e = u.current;
|
|
30
|
+
e.style.opacity = 0, e.style.pointerEvents = "none", setTimeout(() => {
|
|
31
|
+
e.style.left = "0px";
|
|
32
|
+
}, 200), g(
|
|
33
|
+
t,
|
|
34
34
|
{
|
|
35
35
|
...s,
|
|
36
36
|
minWidth: d,
|
|
37
37
|
size: {
|
|
38
38
|
...s.size,
|
|
39
|
-
width: n +
|
|
39
|
+
width: n + i.current - c.current
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
),
|
|
43
|
-
},
|
|
42
|
+
), i.current = 0, c.current = 0, r.current = 0;
|
|
43
|
+
}, P = /* @__PURE__ */ a.jsx(
|
|
44
44
|
"span",
|
|
45
45
|
{
|
|
46
46
|
className: "bitzResizableHandle",
|
|
47
|
-
onClick: (
|
|
48
|
-
|
|
47
|
+
onClick: (t) => {
|
|
48
|
+
t.stopPropagation(), t.preventDefault();
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
);
|
|
52
52
|
return /* @__PURE__ */ a.jsx(
|
|
53
|
-
|
|
53
|
+
X,
|
|
54
54
|
{
|
|
55
55
|
width: n,
|
|
56
56
|
height: 0,
|
|
57
|
-
handle:
|
|
58
|
-
className:
|
|
59
|
-
disabledUserSelect:
|
|
57
|
+
handle: P,
|
|
58
|
+
className: E("bitzResizable", {
|
|
59
|
+
disabledUserSelect: j
|
|
60
60
|
}),
|
|
61
|
-
onResize:
|
|
61
|
+
onResize: D,
|
|
62
62
|
onResizeStart: w,
|
|
63
|
-
onResizeStop:
|
|
63
|
+
onResizeStop: N,
|
|
64
64
|
draggableOpts: { enableUserSelectHack: !1 },
|
|
65
65
|
children: /* @__PURE__ */ a.jsx("th", { ...R })
|
|
66
66
|
}
|