bitz-react-admin-ui 2.9.1 → 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.
@@ -1,4 +1,4 @@
1
- var s = { exports: {} };
1
+ var p = { exports: {} };
2
2
  export {
3
- s as __module
3
+ p as __module
4
4
  };
@@ -1,4 +1,4 @@
1
- var p = { exports: {} };
1
+ var s = { exports: {} };
2
2
  export {
3
- p as __module
3
+ s as __module
4
4
  };
@@ -1,66 +1,66 @@
1
1
  import { j as a } from "../../../node_modules/react/jsx-runtime.mjs";
2
- import { Resizable as v } from "../../../node_modules/react-resizable/index.mjs";
3
- import { useState as E, useMemo as b, useRef as i } from "react";
4
- import L from "../../../node_modules/classnames/index.mjs";
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: g, scrollbarSize: y, onResize: x, width: n, datagridref: S, stretchref: u, ...j } = p, [D, m] = E(!1), R = b(() => {
7
- var t, z;
8
- const e = { ...j };
9
- return ((t = e.className) == null ? void 0 : t.includes("ant-table-cell-fix-right")) && !g && ((z = e.style) != null && z.right) && (e.style = { ...e.style ?? {} }, e.style.right = Number(e.style.right ?? 0) - (y || 0)), e;
10
- }, [p]), c = i(0), f = i(0), r = i(0), l = i(0), o = i(!1), h = b(() => c.current - n + d, [c.current, n]);
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 N = (e) => {
14
- if (r.current = e.clientX - f.current, n + r.current - c.current <= d || r.current < h) {
15
- o.current = !0;
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 && o.current && (r.current = h, o.current = !1);
19
- const t = u.current;
20
- l.current = r.current, t.style.left = `${l.current}px`;
21
- }, w = (e) => {
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 t = e.clientX - f.current;
26
- l.current = t, s.style.left = `${t}px`, c.current = t, r.current = t;
27
- }, P = (e, s) => {
28
- o.current = !1, m(!1);
29
- const t = u.current;
30
- t.style.opacity = 0, t.style.pointerEvents = "none", setTimeout(() => {
31
- t.style.left = "0px";
32
- }, 200), x(
33
- e,
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 + l.current - c.current
39
+ width: n + i.current - c.current
40
40
  }
41
41
  }
42
- ), l.current = 0, c.current = 0, r.current = 0;
43
- }, X = /* @__PURE__ */ a.jsx(
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: (e) => {
48
- e.stopPropagation(), e.preventDefault();
47
+ onClick: (t) => {
48
+ t.stopPropagation(), t.preventDefault();
49
49
  }
50
50
  }
51
51
  );
52
52
  return /* @__PURE__ */ a.jsx(
53
- v,
53
+ X,
54
54
  {
55
55
  width: n,
56
56
  height: 0,
57
- handle: X,
58
- className: L("bitzResizable", {
59
- disabledUserSelect: D
57
+ handle: P,
58
+ className: E("bitzResizable", {
59
+ disabledUserSelect: j
60
60
  }),
61
- onResize: N,
61
+ onResize: D,
62
62
  onResizeStart: w,
63
- onResizeStop: P,
63
+ onResizeStop: N,
64
64
  draggableOpts: { enableUserSelectHack: !1 },
65
65
  children: /* @__PURE__ */ a.jsx("th", { ...R })
66
66
  }