bitz-react-admin-ui 2.7.6 → 2.7.8

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,44 +1,51 @@
1
- import { j as o } from "../../../../node_modules/react/jsx-runtime.mjs";
2
- import { memo as d, useContext as p, useMemo as x, useEffect as b } from "react";
3
- import B from "../style.mjs";
4
- import E from "../../../BitzButton/index.mjs";
1
+ import { j as s } from "../../../../node_modules/react/jsx-runtime.mjs";
2
+ import { memo as E, useContext as B, useMemo as z, useEffect as F } from "react";
3
+ import L from "../style.mjs";
4
+ import T from "../../../BitzButton/index.mjs";
5
5
  import l from "../../../../node_modules/screenfull/index.mjs";
6
- import F from "../../../BitzToast/index.mjs";
7
- import { findParentFirstNodeByClass as z } from "../../../../utils/findNode.mjs";
8
- import { BitzTableContext as j } from "../../Store/index.mjs";
9
- import C from "../../../../node_modules/@ant-design/icons/es/icons/FullscreenExitOutlined.mjs";
10
- import T from "../../../../node_modules/@ant-design/icons/es/icons/FullscreenOutlined.mjs";
11
- const g = ({
12
- order: m,
13
- show: u = !0
6
+ import g from "../../../BitzToast/index.mjs";
7
+ import { findParentFirstNodeByClass as j } from "../../../../utils/findNode.mjs";
8
+ import { BitzTableContext as C } from "../../Store/index.mjs";
9
+ import h from "../../../../node_modules/@ant-design/icons/es/icons/FullscreenExitOutlined.mjs";
10
+ import k from "../../../../node_modules/@ant-design/icons/es/icons/FullscreenOutlined.mjs";
11
+ const y = ({
12
+ order: d,
13
+ show: p = !0
14
14
  }) => {
15
- const { toolbarItemClassName: a } = B(), { fullscreen: t, setFullscreen: r } = p(j), s = x(() => t ? {
15
+ const { toolbarItemClassName: b } = L(), { fullscreen: n, setFullscreen: o } = B(C), r = z(() => n ? {
16
16
  title: "退出全屏",
17
- icon: /* @__PURE__ */ o.jsx(C, {})
17
+ icon: /* @__PURE__ */ s.jsx(h, {})
18
18
  } : {
19
19
  title: "全屏",
20
- icon: /* @__PURE__ */ o.jsx(T, {})
21
- }, [t]), f = (n) => {
22
- l.isEnabled || F.error("您的浏览器不支持全屏");
23
- const e = z(n.target, "bitzTableBlock");
24
- t ? l.exit() : l.request(e);
20
+ icon: /* @__PURE__ */ s.jsx(k, {})
21
+ }, [n]), x = (e) => {
22
+ l.isEnabled || g.error("您的浏览器不支持全屏");
23
+ const t = j(e.target, "bitzTableBlock");
24
+ n ? l.exit() : l.request(t);
25
25
  };
26
- return b(() => (document == null || document.addEventListener("fullscreenchange", (n) => {
27
- var e, i, c;
28
- (e = n.target) != null && e.classList.contains("bitzTableBlock") && (r(!!document.fullscreenElement), (c = (i = document.fullscreenElement) == null ? void 0 : i.classList) != null && c.contains("bitzTableBlock") || r(!1));
29
- }), document == null ? void 0 : document.removeEventListener("fullscreenchange", () => {
30
- })), []), u ? /* @__PURE__ */ o.jsx(
31
- E,
26
+ return F(() => {
27
+ const e = "bz-fullscreen", t = (c) => {
28
+ var i, m;
29
+ ((i = c.target) != null && i.classList.contains("bitzTableBlock") || (m = c.target) != null && m.classList.contains(e)) && setTimeout(() => {
30
+ var u, a, f;
31
+ o(!!document.fullscreenElement), (a = (u = document.fullscreenElement) == null ? void 0 : u.classList) != null && a.contains(
32
+ "bitzTableBlock"
33
+ ) || (f = document.fullscreenElement) != null && f.classList.contains(e) || o(!1);
34
+ }, 300);
35
+ };
36
+ return document == null || document.addEventListener("fullscreenchange", t), () => document == null ? void 0 : document.removeEventListener("fullscreenchange", t);
37
+ }, []), p ? /* @__PURE__ */ s.jsx(
38
+ T,
32
39
  {
33
40
  type: "text",
34
- className: a,
35
- onClick: f,
36
- icon: s.icon,
37
- style: { order: m },
38
- children: s.title
41
+ className: b,
42
+ onClick: x,
43
+ icon: r.icon,
44
+ style: { order: d },
45
+ children: r.title
39
46
  }
40
47
  ) : null;
41
- }, G = d(g);
48
+ }, $ = E(y);
42
49
  export {
43
- G as default
50
+ $ as default
44
51
  };
@@ -32,6 +32,7 @@ interface BitzTableActionProps<T = any> {
32
32
  loading?: boolean;
33
33
  maxCount: number;
34
34
  useMaxWidth?: boolean;
35
+ width?: number;
35
36
  /**
36
37
  * 操作按钮组,主要操作、次要操作、下拉列表(含危险操作)
37
38
  * @次要操作 次要操作以下拉菜单显示,如果actionGroup的长度大于3,从第4个开始直到最后的所有按钮都为次要操作按钮