bitz-react-admin-ui 1.9.7 → 1.9.9

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.
Files changed (44) hide show
  1. package/dist/_virtual/dayjs.min.mjs +5 -2
  2. package/dist/_virtual/dayjs.min2.mjs +4 -0
  3. package/dist/components/BitzCalendar/index.mjs +1 -1
  4. package/dist/components/BitzDayJs/index.mjs +1 -1
  5. package/dist/components/BitzFluentInput/index.mjs +24 -20
  6. package/dist/components/BitzFluentSelect/index.mjs +19 -15
  7. package/dist/components/BitzFuiCalendar/BitzFuiCalendarStore.mjs +1 -1
  8. package/dist/components/BitzFuiCalendar/CalendarAgendum.mjs +1 -1
  9. package/dist/components/BitzFuiCalendar/CalendarAgendumItem.mjs +1 -1
  10. package/dist/components/BitzFuiCalendar/CalendarHeadItem.mjs +1 -1
  11. package/dist/components/BitzFuiCalendar/CalendarToolbar.mjs +1 -1
  12. package/dist/components/BitzFuiCalendar/ColumnData.mjs +1 -1
  13. package/dist/components/BitzMeetingTime/BitzMeetingTimeItem.mjs +1 -1
  14. package/dist/components/BitzMeetingTime/index.mjs +1 -1
  15. package/dist/components/BitzTable/ActionBar/style.mjs +9 -9
  16. package/dist/components/BitzTable/ActionCol/style.mjs +8 -8
  17. package/dist/components/BitzTable/Dropdown/style.mjs +7 -7
  18. package/dist/components/BitzTable/SelectionBar/style.mjs +5 -5
  19. package/dist/components/BitzTable/Store/index.d.ts +2 -2
  20. package/dist/components/BitzTable/Store/index.mjs +21 -19
  21. package/dist/components/BitzTable/Table/index.mjs +235 -211
  22. package/dist/components/BitzTable/Table/style.d.ts +4 -34
  23. package/dist/components/BitzTable/Table/style.mjs +8 -4
  24. package/dist/components/BitzTable/Table/utils.mjs +12 -12
  25. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnSettingModal.d.ts +2 -0
  26. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnSettingModal.mjs +244 -236
  27. package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +32 -27
  28. package/dist/components/BitzTable/ToolBar/DensityIcon/index.mjs +36 -28
  29. package/dist/components/BitzTable/ToolBar/style.mjs +5 -5
  30. package/dist/components/BitzTable/index.d.ts +5 -3
  31. package/dist/components/BitzTable/index.mjs +7 -7
  32. package/dist/components/BitzTableSelect/Picker/index.d.ts +5 -2
  33. package/dist/components/BitzTableSelect/SelectPopup/getData.d.ts +1 -1
  34. package/dist/components/BitzTableSelect/SelectPopup/getData.mjs +32 -34
  35. package/dist/components/BitzTableSelect/SelectPopup/index.mjs +108 -109
  36. package/dist/components/BitzTableSelect/TableCell/index.mjs +1 -1
  37. package/dist/components/BitzTableSelect/TextBlock/index.mjs +7 -7
  38. package/dist/components/BitzTableSelect/index.d.ts +2 -2
  39. package/dist/node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs +292 -292
  40. package/dist/node_modules/.store/dayjs@1.11.10/node_modules/dayjs/locale/zh-cn.mjs +13 -13
  41. package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/isBoolean.mjs +9 -0
  42. package/dist/style.css +1 -1
  43. package/dist/utils/time.mjs +1 -1
  44. package/package.json +1 -1
@@ -1,38 +1,43 @@
1
- import { j as t } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import a, { useContext as u } from "react";
3
- import { Tooltip as c } from "antd";
4
- import { show as f } from "@ebay/nice-modal-react";
5
- import C from "./ColumnSettingModal.mjs";
6
- import d from "../style.mjs";
7
- import x from "../../../BitzButton/index.mjs";
8
- import { TableContext as g } from "../../Store/index.mjs";
9
- import h from "../../../../node_modules/.store/@ant-design_icons@5.3.5/node_modules/@ant-design/icons/es/icons/SettingOutlined.mjs";
10
- const j = (o) => {
11
- const { order: m, show: i = !0, icon: l = /* @__PURE__ */ t.jsx(h, {}) } = o, { toolbarItemClassName: r } = d(), { uuid: e } = u(g);
12
- return i ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
13
- /* @__PURE__ */ t.jsx(
14
- C,
1
+ import { j as e } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
+ import C, { useContext as g, useState as x, useMemo as h, useEffect as j } from "react";
3
+ import { Tooltip as b } from "antd";
4
+ import { show as E } from "@ebay/nice-modal-react";
5
+ import S from "./ColumnSettingModal.mjs";
6
+ import B from "../style.mjs";
7
+ import p from "../../../BitzButton/index.mjs";
8
+ import { BitzTableContext as v } from "../../Store/index.mjs";
9
+ import y from "../../../../node_modules/.store/@ant-design_icons@5.3.5/node_modules/@ant-design/icons/es/icons/SettingOutlined.mjs";
10
+ const z = (n) => {
11
+ const { order: c, show: a = !0, icon: u = /* @__PURE__ */ e.jsx(y, {}) } = n, { toolbarItemClassName: f } = B(), { uuid: l } = g(v), [s, i] = x(!1), d = h(() => s ? !1 : void 0, [s]);
12
+ return j(() => (document == null || document.addEventListener("fullscreenchange", (o) => {
13
+ var t, r, m;
14
+ (t = o.target) != null && t.classList.contains("bitzTableBlock") && (i(!!document.fullscreenElement), (m = (r = document.fullscreenElement) == null ? void 0 : r.classList) != null && m.contains("bitzTableBlock") || i(!1));
15
+ }), document == null ? void 0 : document.removeEventListener("fullscreenchange", () => {
16
+ })), []), a ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
17
+ /* @__PURE__ */ e.jsx(
18
+ S,
15
19
  {
16
- id: `ColumnSettingModal-${e}`,
17
- onChange: async (s) => {
18
- var n;
19
- return (n = o.onChange) == null ? void 0 : n.call(o, s);
20
- }
20
+ id: `ColumnSettingModal-${l}`,
21
+ onChange: async (o) => {
22
+ var t;
23
+ return (t = n.onChange) == null ? void 0 : t.call(n, o);
24
+ },
25
+ getContainer: d
21
26
  }
22
27
  ),
23
- /* @__PURE__ */ t.jsx(c, { title: "列设置", open: !1, children: /* @__PURE__ */ t.jsx(
24
- x,
28
+ /* @__PURE__ */ e.jsx(b, { title: "列设置", open: !1, children: /* @__PURE__ */ e.jsx(
29
+ p,
25
30
  {
26
31
  type: "text",
27
- className: r,
28
- onClick: () => f(`ColumnSettingModal-${e}`),
29
- icon: l,
30
- style: { order: m },
32
+ className: f,
33
+ onClick: () => E(`ColumnSettingModal-${l}`),
34
+ icon: u,
35
+ style: { order: c },
31
36
  children: "列设置"
32
37
  }
33
38
  ) })
34
39
  ] }) : null;
35
- }, N = a.memo(j);
40
+ }, R = C.memo(z);
36
41
  export {
37
- N as default
42
+ R as default
38
43
  };
@@ -1,24 +1,24 @@
1
1
  import { j as l } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
2
  import { memo as k, useContext as g } from "react";
3
- import { Tooltip as h } from "antd";
4
- import { TableContext as j } from "../../Store/index.mjs";
5
- import z from "../style.mjs";
3
+ import { Tooltip as z } from "antd";
4
+ import { BitzTableContext as h } from "../../Store/index.mjs";
5
+ import j from "../style.mjs";
6
6
  import C from "../../../BitzButton/index.mjs";
7
7
  import S from "../../Dropdown/index.mjs";
8
8
  import D from "../../../../node_modules/.store/@ant-design_icons@5.3.5/node_modules/@ant-design/icons/es/icons/ColumnHeightOutlined.mjs";
9
9
  const I = ({ defaultSize: e, items: n }) => n.map((t) => t.key === e ? {
10
10
  ...t,
11
11
  label: `${t.label}(默认)`
12
- } : t), w = (e) => {
13
- const { order: n, show: t = !0, icon: c = /* @__PURE__ */ l.jsx(D, {}) } = e, {
14
- sizeStorageType: u,
15
- sizeStorageKey: m,
12
+ } : t), p = (e) => {
13
+ const { order: n, show: t = !0, icon: u = /* @__PURE__ */ l.jsx(D, {}) } = e, {
14
+ sizeStorageType: f,
15
+ sizeStorageKey: s,
16
16
  onlineSizeChange: i,
17
- defaultTableSize: f,
18
- tableSize: s,
17
+ defaultTableSize: y,
18
+ tableSize: a,
19
19
  setTableSize: r
20
- } = g(j), { toolbarItemClassName: y } = z(), d = I({
21
- defaultSize: f,
20
+ } = g(h), { toolbarItemClassName: d } = j(), x = I({
21
+ defaultSize: y,
22
22
  items: [
23
23
  {
24
24
  key: "xl",
@@ -41,26 +41,34 @@ const I = ({ defaultSize: e, items: n }) => n.map((t) => t.key === e ? {
41
41
  label: "特紧凑"
42
42
  }
43
43
  ]
44
- }), x = {
45
- selectedKeys: [s],
46
- onClick: (b) => {
47
- var a;
48
- const { key: o } = b;
49
- o !== s && (r == null || r(o), u === "online" && m && (i == null || i(m, o)), (a = e == null ? void 0 : e.onChange) == null || a.call(e, o));
44
+ }), b = {
45
+ selectedKeys: [a],
46
+ onClick: (m) => {
47
+ var c;
48
+ const { key: o } = m;
49
+ o !== a && (r == null || r(o), f === "online" && s && (i == null || i(s, o)), (c = e == null ? void 0 : e.onChange) == null || c.call(e, o));
50
50
  },
51
- items: d
51
+ items: x
52
52
  };
53
- return t ? /* @__PURE__ */ l.jsx(S, { menu: x, trigger: ["click"], children: /* @__PURE__ */ l.jsx(h, { title: "表格密度", open: !1, children: /* @__PURE__ */ l.jsx(
54
- C,
53
+ return t ? /* @__PURE__ */ l.jsx(
54
+ S,
55
55
  {
56
- style: { order: n },
57
- type: "text",
58
- className: y,
59
- icon: c,
60
- children: "表格密度"
56
+ menu: b,
57
+ trigger: ["click"],
58
+ getPopupContainer: (m) => m.parentElement,
59
+ children: /* @__PURE__ */ l.jsx(z, { title: "表格密度", open: !1, children: /* @__PURE__ */ l.jsx(
60
+ C,
61
+ {
62
+ style: { order: n },
63
+ type: "text",
64
+ className: d,
65
+ icon: u,
66
+ children: "表格密度"
67
+ }
68
+ ) })
61
69
  }
62
- ) }) }) : null;
63
- }, O = k(w);
70
+ ) : null;
71
+ }, G = k(p);
64
72
  export {
65
- O as default
73
+ G as default
66
74
  };
@@ -1,4 +1,4 @@
1
- import { TableContext as $ } from "../Store/index.mjs";
1
+ import { BitzTableContext as $ } from "../Store/index.mjs";
2
2
  import "../../../node_modules/.store/@ant-design_cssinjs@1.18.5/node_modules/@ant-design/cssinjs/es/extractStyle.mjs";
3
3
  import "../../../node_modules/.store/@ant-design_cssinjs@1.18.5/node_modules/@ant-design/cssinjs/es/hooks/useCacheToken.mjs";
4
4
  import { useContext as f, useMemo as g } from "react";
@@ -14,7 +14,7 @@ import "../../../node_modules/.store/@ant-design_cssinjs@1.18.5/node_modules/@an
14
14
  import u from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
15
15
  import x from "../../BitzTheme/index.mjs";
16
16
  const J = () => {
17
- const { theme: T, token: i, hashId: n } = x.useToken(), { tableSize: a } = f($), d = g(() => a ?? "lg", [a]), r = "toolbarItem", m = "ToolbarItemBtn", S = (o, t, e) => {
17
+ const { theme: T, token: i, hashId: n } = x.useToken(), { tableSize: a } = f($), d = g(() => a ?? "lg", [a]), r = "toolbarItem", m = "ToolbarItemBtn", z = (o, t, e) => {
18
18
  var l, s, p, b, c;
19
19
  return [
20
20
  {
@@ -73,10 +73,10 @@ const J = () => {
73
73
  ];
74
74
  };
75
75
  h({ theme: T, token: i, hashId: n, path: [r] }, () => [
76
- S(r, m, i)
76
+ z(r, m, i)
77
77
  ]);
78
- const z = `${d}${m}`;
79
- return { toolbarItemClassName: u(r, z, n) };
78
+ const S = `${d}${m}`;
79
+ return { toolbarItemClassName: u(r, S, n) };
80
80
  };
81
81
  export {
82
82
  J as default
@@ -1,5 +1,5 @@
1
1
  import { BitzTableProps } from './Table';
2
- import BitzTableProvider, { TableContext as BitzTableContext, DensitySize as BitzTableSizeType, SizeStateType, ColumnStateType } from './Store';
2
+ import BitzTableProvider, { BitzTableContext, DensitySize as BitzTableSizeType, SizeStateType, ColumnStateType } from './Store';
3
3
  import ActionBar from './ActionBar';
4
4
  import ToolBar from './ToolBar';
5
5
  import ActionCol from './ActionCol';
@@ -47,8 +47,10 @@ interface BitzTableColumnType<RecordType = any> extends ColumnsConfigProps, Tabl
47
47
  mobileHideLabel?: boolean;
48
48
  /** 是否为操作列 */
49
49
  isOperationCol?: boolean;
50
- /** 是否为复选框/展开列 */
51
- isToolCol?: boolean;
50
+ /** 是否为复选框列 */
51
+ isCheckboxCol?: boolean;
52
+ /** 是否为展开列 */
53
+ isExpandIconCol?: boolean;
52
54
  /** 列宽根据内容宽度最大的设置(只应用在操作列上) */
53
55
  useMaxWidth?: boolean;
54
56
  }
@@ -1,17 +1,17 @@
1
1
  import t from "./Table/index.mjs";
2
- import { TableContext as c, default as f } from "./Store/index.mjs";
2
+ import { BitzTableContext as f, default as b } from "./Store/index.mjs";
3
3
  import r from "./ActionBar/index.mjs";
4
- import e from "./ToolBar/index.mjs";
5
- import i from "./ActionCol/index.mjs";
4
+ import i from "./ToolBar/index.mjs";
5
+ import e from "./ActionCol/index.mjs";
6
6
  import a from "./SelectionBar/index.mjs";
7
7
  const o = t;
8
8
  process.env.NODE_ENV !== "production" && (o.displayName = "BitzTable");
9
9
  o.ActionBar = r;
10
- o.ToolBar = e;
10
+ o.ToolBar = i;
11
11
  o.SelectionBar = a;
12
- o.ActionCol = i;
12
+ o.ActionCol = e;
13
13
  export {
14
- c as BitzTableContext,
15
- f as BitzTableProvider,
14
+ f as BitzTableContext,
15
+ b as BitzTableProvider,
16
16
  o as default
17
17
  };
@@ -1,5 +1,5 @@
1
1
  import { FC, Key, ReactNode } from 'react';
2
- import { PaginationProps, SelectProps as AntSelectProps } from 'antd';
2
+ import { SelectProps as AntSelectProps } from 'antd';
3
3
  import { BaseOptionType } from 'antd/es/select';
4
4
  import { ColumnsType } from 'antd/es/table';
5
5
  import { PaginationChangeEvent, TableSelectPopupParentRender, FieldNames } from '..';
@@ -22,7 +22,10 @@ export interface TableSelectProps<T extends BaseOptionType> extends AntSelectPro
22
22
  /** 表格总数据条数 */
23
23
  total: number;
24
24
  /** 分页属性 */
25
- page: PaginationProps;
25
+ page?: {
26
+ page: number;
27
+ size: number;
28
+ };
26
29
  /** 分页切换 */
27
30
  onPageChange: PaginationChangeEvent;
28
31
  /** 表格搜索input元素 */
@@ -1,7 +1,7 @@
1
1
  /** 表格单元格操作 */
2
2
  export declare const getColumns: (columnOption: any, tableData: any, page: any) => any[];
3
3
  /** 展开表格 */
4
- export declare const getExpandable: (prop?: string) => {
4
+ export declare const getExpandable: (prop?: string, loading?: boolean) => {
5
5
  expandable: {
6
6
  rowExpandable: (record: any) => any;
7
7
  expandedRowRender: (record: any) => import("react/jsx-runtime").JSX.Element;
@@ -1,59 +1,57 @@
1
- import { j as o } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { Table as m } from "antd";
3
- import a from "../../BitzDescriptions/index.mjs";
4
- import p from "../TableCell/index.mjs";
1
+ import { j as i } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
+ import p from "../../BitzDescriptions/index.mjs";
3
+ import m from "../TableCell/index.mjs";
5
4
  import u from "../TextBlock/index.mjs";
6
- const S = (n, r, e) => {
7
- const l = n.map((t) => (typeof t.title == "string" && (t.title = /* @__PURE__ */ o.jsx(u, { value: t.title, bold: 600 })), {
8
- ...t,
9
- render: (i, c, g) => {
10
- const f = (r == null ? void 0 : r.length) === 1 ? !1 : g + 1 > ((r == null ? void 0 : r.length) || 0) / 2;
11
- if (t != null && t.render) {
12
- const s = t.render(i, c, g);
5
+ const b = (o, n, e) => {
6
+ const l = o.map((r) => (typeof r.title == "string" && (r.title = /* @__PURE__ */ i.jsx(u, { value: r.title, bold: 600 })), {
7
+ ...r,
8
+ width: "auto",
9
+ render: (t, c, g) => {
10
+ const f = (n == null ? void 0 : n.length) === 1 ? !1 : g + 1 > ((n == null ? void 0 : n.length) || 0) / 2;
11
+ if (r != null && r.render) {
12
+ const s = r.render(t, c, g);
13
13
  if (typeof s == "object")
14
14
  return s;
15
15
  if (["boolean", "number", "bigint", "string"].includes(
16
16
  typeof s
17
17
  ))
18
- return /* @__PURE__ */ o.jsx(p, { value: `${s}`, isLatterHalf: f });
18
+ return /* @__PURE__ */ i.jsx(m, { value: `${s}`, isLatterHalf: f });
19
19
  }
20
- return !i && !["boolean", "number", "bigint"].includes(typeof i) ? /* @__PURE__ */ o.jsx(u, { value: "-" }) : /* @__PURE__ */ o.jsx(p, { value: i, isLatterHalf: f });
20
+ return !t && !["boolean", "number", "bigint"].includes(typeof t) ? /* @__PURE__ */ i.jsx(u, { value: "-" }) : /* @__PURE__ */ i.jsx(m, { value: t, isLatterHalf: f });
21
21
  }
22
22
  }));
23
23
  return [
24
- m.SELECTION_COLUMN,
25
- m.EXPAND_COLUMN,
26
24
  {
27
25
  title: "序号",
28
26
  rowScope: "row",
29
27
  className: "numRow",
30
- width: 50,
31
- render: (t, i, c) => c + 1 + (e.pageIndex - 1) * e.pageSize
28
+ width: 80,
29
+ render: (r, t, c) => c + 1 + (e.page - 1) * e.size
32
30
  },
33
31
  ...l
34
32
  ];
35
- }, w = (n) => n ? {
33
+ }, j = (o, n) => o ? {
36
34
  expandable: {
37
- rowExpandable: (r) => {
38
- var e;
39
- return (e = r[n]) == null ? void 0 : e.length;
40
- },
41
- expandedRowRender: (r) => {
35
+ rowExpandable: (e) => {
42
36
  var l;
43
- const e = (l = r[n]) == null ? void 0 : l.map((t) => (typeof t.label == "string" && (t.label = /* @__PURE__ */ o.jsx(u, { minRows: 1, maxRows: 5, value: t.label })), typeof t.children == "string" && (t.children = /* @__PURE__ */ o.jsx(u, { minRows: 1, maxRows: 5, value: t.children })), t));
44
- return /* @__PURE__ */ o.jsx(
45
- a,
37
+ return n ? !0 : (l = e[o]) == null ? void 0 : l.length;
38
+ },
39
+ expandedRowRender: (e) => {
40
+ var r;
41
+ const l = (r = e[o]) == null ? void 0 : r.map((t) => (typeof t.label == "string" && (t.label = /* @__PURE__ */ i.jsx(u, { minRows: 1, maxRows: 5, value: t.label })), typeof t.children == "string" && (t.children = /* @__PURE__ */ i.jsx(u, { minRows: 1, maxRows: 5, value: t.children })), t));
42
+ return /* @__PURE__ */ i.jsx(
43
+ p,
46
44
  {
47
45
  size: "small",
48
46
  bordered: !0,
49
- items: e,
47
+ items: l,
50
48
  column: { xs: 1, sm: 1, md: 1, lg: 2, xl: 2, xxl: 2 }
51
49
  }
52
50
  );
53
51
  }
54
52
  }
55
- } : null, R = (n, r) => {
56
- if (n) {
53
+ } : null, w = (o, n) => {
54
+ if (o) {
57
55
  const e = {
58
56
  gutter: 20,
59
57
  left: {
@@ -68,7 +66,7 @@ const S = (n, r, e) => {
68
66
  button: 4
69
67
  }
70
68
  };
71
- return r || (e.right.search = 11, e.right.operation = 13, e.right.toolTagSelect = 0, e.right.totalSelect = 11, e.right.button = void 0), e;
69
+ return n || (e.right.search = 11, e.right.operation = 13, e.right.toolTagSelect = 0, e.right.totalSelect = 11, e.right.button = void 0), e;
72
70
  } else {
73
71
  const e = {
74
72
  gutter: 0,
@@ -84,11 +82,11 @@ const S = (n, r, e) => {
84
82
  button: void 0
85
83
  }
86
84
  };
87
- return r || (e.right.search = 11, e.right.operation = 13, e.right.toolTagSelect = 0, e.right.totalSelect = 11), e;
85
+ return n || (e.right.search = 11, e.right.operation = 13, e.right.toolTagSelect = 0, e.right.totalSelect = 11), e;
88
86
  }
89
87
  };
90
88
  export {
91
- S as getColumns,
92
- w as getExpandable,
93
- R as getLayoutConfig
89
+ b as getColumns,
90
+ j as getExpandable,
91
+ w as getLayoutConfig
94
92
  };