bitz-react-admin-ui 2.2.0 → 2.2.2

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 (48) 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/BitzFuiCalendar/BitzFuiCalendarStore.mjs +1 -1
  6. package/dist/components/BitzFuiCalendar/CalendarAgendum.mjs +1 -1
  7. package/dist/components/BitzFuiCalendar/CalendarAgendumItem.mjs +1 -1
  8. package/dist/components/BitzFuiCalendar/CalendarHeadItem.mjs +1 -1
  9. package/dist/components/BitzFuiCalendar/CalendarToolbar.mjs +1 -1
  10. package/dist/components/BitzFuiCalendar/ColumnData.mjs +1 -1
  11. package/dist/components/BitzMeetingTime/BitzMeetingTimeItem.mjs +1 -1
  12. package/dist/components/BitzMeetingTime/index.mjs +1 -1
  13. package/dist/components/BitzPagination/index.d.ts +4 -0
  14. package/dist/components/BitzPagination/index.mjs +22 -21
  15. package/dist/components/BitzTable/ActionCol/index.mjs +1 -7
  16. package/dist/components/BitzTable/SelectionBar/SelectionBar.mjs +18 -45
  17. package/dist/components/BitzTable/Store/index.mjs +1 -3
  18. package/dist/components/BitzTable/Table/SortTableContext.d.ts +2 -2
  19. package/dist/components/BitzTable/Table/SortableRow.d.ts +1 -1
  20. package/dist/components/BitzTable/Table/index.d.ts +9 -1
  21. package/dist/components/BitzTable/Table/index.mjs +309 -268
  22. package/dist/components/BitzTable/Table/style.d.ts +2 -1
  23. package/dist/components/BitzTable/Table/style.mjs +17 -15
  24. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +17 -2
  25. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.mjs +11 -2
  26. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndList.d.ts +1 -1
  27. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndList.mjs +21 -28
  28. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +6 -1
  29. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndList.d.ts +2 -2
  30. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndList.mjs +19 -24
  31. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.d.ts +1 -1
  32. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +41 -31
  33. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.mjs +118 -126
  34. package/dist/components/BitzTable/ToolBar/ColConfigIcon/style.mjs +6 -2
  35. package/dist/components/BitzTable/ToolBar/ExportIcon/ExportModal.mjs +9 -1
  36. package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +27 -1
  37. package/dist/components/BitzTable/ToolBar/FullscreenIcon/index.mjs +28 -24
  38. package/dist/components/BitzTable/ToolBar/Modal/index.mjs +14 -4
  39. package/dist/components/BitzTable/ToolBar/Modal/style.mjs +0 -1
  40. package/dist/components/BitzTable/ToolBar/RefreshIcon/index.mjs +13 -18
  41. package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +56 -52
  42. package/dist/components/BitzTable/ToolBar/style.mjs +46 -46
  43. package/dist/components/BitzTable/index.d.ts +2 -2
  44. package/dist/node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs +292 -292
  45. package/dist/node_modules/.store/dayjs@1.11.10/node_modules/dayjs/locale/zh-cn.mjs +13 -13
  46. package/dist/style.css +1 -1
  47. package/dist/utils/time.mjs +1 -1
  48. package/package.json +1 -1
@@ -1,4 +1,7 @@
1
- var a = { exports: {} };
1
+ import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.mjs";
2
+ import { __require as o } from "../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
3
+ var t = o();
4
+ const s = /* @__PURE__ */ r(t);
2
5
  export {
3
- a as __module
6
+ s as default
4
7
  };
@@ -0,0 +1,4 @@
1
+ var a = { exports: {} };
2
+ export {
3
+ a as __module
4
+ };
@@ -1,7 +1,7 @@
1
1
  import { j as n } from "../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
2
  import { useRef as O, useEffect as R } from "react";
3
3
  import { Calendar as k, Select as a, Row as w, Col as y } from "antd";
4
- import N from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
4
+ import N from "../../_virtual/dayjs.min.mjs";
5
5
  import B from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/weekOfYear.mjs";
6
6
  import "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/locale/zh-cn.mjs";
7
7
  N.extend(B);
@@ -1,4 +1,4 @@
1
- import t from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
1
+ import t from "../../_virtual/dayjs.min.mjs";
2
2
  import "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/locale/zh-cn.mjs";
3
3
  const m = {
4
4
  dayjs() {
@@ -1,5 +1,5 @@
1
1
  import { create as a } from "../../node_modules/.store/zustand@4.5.2/node_modules/zustand/esm/index.mjs";
2
- import o from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
2
+ import o from "../../_virtual/dayjs.min.mjs";
3
3
  var d = /* @__PURE__ */ ((e) => (e.day = "day", e.workWeek = "workWeek", e.week = "week", e.agendum = "agendum", e))(d || {});
4
4
  const i = a((e, k) => ({
5
5
  colHeight: 0,
@@ -1,7 +1,7 @@
1
1
  import { j as d } from "../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
2
  import { useState as y, useEffect as j, useMemo as D } from "react";
3
3
  import M from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/isToday.mjs";
4
- import n from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
4
+ import n from "../../_virtual/dayjs.min.mjs";
5
5
  import { useBitzFuiCalendarStore as S, CalendarTypeEnum as C } from "./BitzFuiCalendarStore.mjs";
6
6
  import N from "./CalendarAgendumItem.mjs";
7
7
  import x from "./CalendarAgendum.module.less.mjs";
@@ -1,7 +1,7 @@
1
1
  import { j as i } from "../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
2
  import { useMemo as a } from "react";
3
3
  import e from "./CalendarAgendum.module.less.mjs";
4
- import l from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
4
+ import l from "../../_virtual/dayjs.min.mjs";
5
5
  import { Button as c } from "antd";
6
6
  const d = (_, s) => {
7
7
  let t = s.diff(_, "minute"), m;
@@ -1,6 +1,6 @@
1
1
  import { j as a } from "../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
2
  import { memo as m, useMemo as r } from "react";
3
- import d from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
3
+ import d from "../../_virtual/dayjs.min.mjs";
4
4
  import i from "../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
5
5
  const n = (t) => {
6
6
  const { time: e } = t, s = r(() => e.isSame(d(), "day"), [e]);
@@ -2,7 +2,7 @@ import { j as e } from "../../node_modules/.store/react@18.2.0/node_modules/reac
2
2
  import { memo as C, useMemo as i } from "react";
3
3
  import { Space as c, Button as o, DatePicker as b, Dropdown as h } from "antd";
4
4
  import { useBitzFuiCalendarStore as w, CalendarTypeEnum as a } from "./BitzFuiCalendarStore.mjs";
5
- import g from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
5
+ import g from "../../_virtual/dayjs.min.mjs";
6
6
  import T from "../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/AppstoreOutlined.mjs";
7
7
  import v from "../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/LeftOutlined.mjs";
8
8
  import _ from "../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/RightOutlined.mjs";
@@ -4,7 +4,7 @@ import E from "./FuiCalendarItem.mjs";
4
4
  import b from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/isSameOrAfter.mjs";
5
5
  import F from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/isSameOrBefore.mjs";
6
6
  import M from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/utc.mjs";
7
- import r from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
7
+ import r from "../../_virtual/dayjs.min.mjs";
8
8
  import { useBitzFuiCalendarStore as z } from "./BitzFuiCalendarStore.mjs";
9
9
  r.extend(M);
10
10
  r.extend(F);
@@ -3,7 +3,7 @@ import { useState as w, useMemo as x, useEffect as E } from "react";
3
3
  import A from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/objectSupport.mjs";
4
4
  import H from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/isSameOrAfter.mjs";
5
5
  import D from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/utc.mjs";
6
- import e from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
6
+ import e from "../../_virtual/dayjs.min.mjs";
7
7
  import "./index.less.mjs";
8
8
  e.extend(A);
9
9
  e.extend(H);
@@ -2,7 +2,7 @@ import { j as e } from "../../node_modules/.store/react@18.2.0/node_modules/reac
2
2
  import { useMemo as d } from "react";
3
3
  import p from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/plugin/objectSupport.mjs";
4
4
  import T from "./BitzMeetingTimeItem.mjs";
5
- import m from "../../node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs";
5
+ import m from "../../_virtual/dayjs.min.mjs";
6
6
  import "./index.less.mjs";
7
7
  m.extend(p);
8
8
  const x = (a) => {
@@ -45,6 +45,10 @@ interface BitzPaginationProps extends PaginationProps {
45
45
  * 共的名字
46
46
  */
47
47
  totalItemText?: string;
48
+ /**
49
+ *
50
+ */
51
+ hideTotalText?: boolean;
48
52
  /**
49
53
  * 获取分页组件元素
50
54
  */
@@ -2,10 +2,10 @@ import { j as s } from "../../node_modules/.store/react@18.2.0/node_modules/reac
2
2
  import { useState as l, useMemo as c, useEffect as y, useImperativeHandle as B } from "react";
3
3
  import { Pagination as M } from "antd";
4
4
  import { isMobile as b } from "../../node_modules/.store/react-device-detect@2.2.3/node_modules/react-device-detect/dist/lib.mjs";
5
- import v from "../BitzHighlight/index.mjs";
5
+ import H from "../BitzHighlight/index.mjs";
6
6
  import "./index.less.mjs";
7
7
  let g = !0;
8
- const N = ({
8
+ const Q = ({
9
9
  enableControl: u = !1,
10
10
  pagination: a = {
11
11
  page: 1,
@@ -19,26 +19,27 @@ const N = ({
19
19
  },
20
20
  direction: x = "end",
21
21
  totalText: w = "共",
22
- totalItemText: C = "条",
22
+ totalItemText: d = "条",
23
+ hideTotalText: C,
23
24
  elRefInstance: P,
24
- refInstance: d,
25
- ...S
25
+ refInstance: S,
26
+ ...T
26
27
  }) => {
27
- const [h, n] = l(1), [p, T] = l(10), t = c(() => u ? a : { page: h, size: p }, [u, a, h, p]), o = c(() => m, [m]);
28
+ const [h, o] = l(1), [p, $] = l(10), t = c(() => u ? a : { page: h, size: p }, [u, a, h, p]), n = c(() => m, [m]);
28
29
  y(() => {
29
- o != 0 && n(o);
30
- }, [o]);
31
- const $ = (e, i) => {
32
- n(e), g && f(e, i);
33
- }, k = (e, i) => {
34
- g = !1, T(i), setTimeout(() => {
35
- n(1), f(1, i), setTimeout(() => {
30
+ n != 0 && o(n);
31
+ }, [n]);
32
+ const k = (e, i) => {
33
+ o(e), g && f(e, i);
34
+ }, v = (e, i) => {
35
+ g = !1, $(i), setTimeout(() => {
36
+ o(1), f(1, i), setTimeout(() => {
36
37
  g = !0;
37
38
  }, 10);
38
39
  }, 10);
39
40
  };
40
41
  return B(
41
- d,
42
+ S,
42
43
  () => ({
43
44
  getSize: () => t.size
44
45
  }),
@@ -59,22 +60,22 @@ const N = ({
59
60
  showSizeChanger: !0,
60
61
  showQuickJumper: !0,
61
62
  pageSizeOptions: z,
62
- showTotal: (e) => /* @__PURE__ */ s.jsx(
63
- v,
63
+ showTotal: C ? void 0 : (e) => /* @__PURE__ */ s.jsx(
64
+ H,
64
65
  {
65
66
  highlightTag: "strong",
66
67
  keywords: `${e}`,
67
- sourceString: `${w} ${e} ${C}`
68
+ sourceString: `${w} ${e} ${d}`
68
69
  }
69
70
  ),
70
- onChange: $,
71
- onShowSizeChange: k,
72
- ...S
71
+ onChange: k,
72
+ onShowSizeChange: v,
73
+ ...T
73
74
  }
74
75
  )
75
76
  }
76
77
  ) });
77
78
  };
78
79
  export {
79
- N as default
80
+ Q as default
80
81
  };
@@ -104,13 +104,7 @@ function q(s) {
104
104
  const u = l(c, m).filter(
105
105
  (o) => o.type != "detail"
106
106
  );
107
- return /* @__PURE__ */ t.jsx(
108
- R,
109
- {
110
- actionGroup: u,
111
- refInstance: a
112
- }
113
- );
107
+ return /* @__PURE__ */ t.jsx(R, { actionGroup: u, refInstance: a });
114
108
  },
115
109
  ...r
116
110
  }), [i, a, l]);
@@ -1,50 +1,23 @@
1
- import { j as e } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import j from "../../BitzButton/index.mjs";
3
- import { Space as t, Flex as l } from "antd";
4
- import f from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
5
- import { useContext as C, useMemo as h, useEffect as u } from "react";
6
- import { BitzTableContext as N } from "../Store/index.mjs";
7
- import g from "./style.mjs";
8
- const E = ({
9
- show: s,
10
- num: a,
11
- onClear: r,
12
- children: n
13
- }) => {
1
+ import { j as t } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
+ import { Space as c } from "antd";
3
+ import n from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
4
+ import { useContext as i, useMemo as p, useEffect as f } from "react";
5
+ import { BitzTableContext as C } from "../Store/index.mjs";
6
+ import u from "./style.mjs";
7
+ const v = ({ show: e, children: s }) => {
14
8
  const {
15
- blockClassName: i,
9
+ blockClassName: a,
16
10
  showCls: o,
17
- btnClassName: c,
18
- batchOperationClassName: m,
19
- alertContentClassName: p
20
- } = g(), { setSelected: x } = C(N), d = h(() => f(i, {
21
- [`${o}`]: s
22
- }), [s]);
23
- return u(() => {
24
- x(s ?? !1);
25
- }, [s]), /* @__PURE__ */ e.jsxs("div", { className: d, children: [
26
- /* @__PURE__ */ e.jsx(t.Compact, { className: m, children: n || /* @__PURE__ */ e.jsx("div", {}) }),
27
- /* @__PURE__ */ e.jsxs(l, { gap: 7, className: p, children: [
28
- /* @__PURE__ */ e.jsxs(l, { gap: 20, align: "center", children: [
29
- /* @__PURE__ */ e.jsxs(t, { size: 10, children: [
30
- /* @__PURE__ */ e.jsx("span", { children: "已选中" }),
31
- /* @__PURE__ */ e.jsx("strong", { children: a ?? 0 })
32
- ] }),
33
- /* @__PURE__ */ e.jsx("span", { style: { verticalAlign: "-0.14em" }, children: "/" })
34
- ] }),
35
- /* @__PURE__ */ e.jsx(
36
- j,
37
- {
38
- type: "text",
39
- className: c,
40
- onClick: r,
41
- style: { lineHeight: "normal" },
42
- children: "取消选中"
43
- }
44
- )
45
- ] })
46
- ] });
11
+ btnClassName: x,
12
+ batchOperationClassName: r,
13
+ alertContentClassName: N
14
+ } = u(), { setSelected: m } = i(C), l = p(() => n(a, {
15
+ [`${o}`]: e
16
+ }), [e]);
17
+ return f(() => {
18
+ m(e ?? !1);
19
+ }, [e]), /* @__PURE__ */ t.jsx("div", { className: l, children: /* @__PURE__ */ t.jsx(c.Compact, { className: r, children: s || /* @__PURE__ */ t.jsx("div", {}) }) });
47
20
  };
48
21
  export {
49
- E as default
22
+ v as default
50
23
  };
@@ -295,9 +295,7 @@ function Be(e) {
295
295
  (a = n == null ? void 0 : n(o)) == null || a.then((c) => {
296
296
  var f;
297
297
  const l = S(c ?? {}, (f = e == null ? void 0 : e.columnsState) == null ? void 0 : f.value);
298
- h(
299
- Object.keys(l).length ? l : x
300
- );
298
+ h(Object.keys(l).length ? l : x);
301
299
  });
302
300
  } catch (c) {
303
301
  console.warn(c);
@@ -1,5 +1,5 @@
1
- import { DragEndEvent } from "@dnd-kit/core";
2
- import { ReactNode } from "react";
1
+ import { DragEndEvent } from '@dnd-kit/core';
2
+ import { ReactNode } from 'react';
3
3
  interface SortTableContextProps {
4
4
  children?: ReactNode;
5
5
  enabledRowDragSort?: boolean;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  interface RowProps extends React.HTMLAttributes<HTMLTableRowElement> {
3
3
  'data-row-key': string;
4
- loading: 'true' | 'false';
4
+ 'loading': 'true' | 'false';
5
5
  }
6
6
  declare const SortableRow: ({ children, loading, ...props }: RowProps) => import("react/jsx-runtime").JSX.Element;
7
7
  export default SortableRow;
@@ -6,9 +6,13 @@ import type { RowClassName } from 'rc-table/es/interface';
6
6
  import { ColumnStateType, DensitySize, StylesStateType, ExportColumnStateType } from '../Store';
7
7
  import { ActionsFunType, BitzTableColumnsType } from '..';
8
8
  import { BitzTableBorderedType } from '@/components/BitzConfigProvider/context';
9
+ import { TableRowSelection } from 'antd/es/table/interface';
9
10
  import { DragEndEvent } from '@dnd-kit/core';
10
11
  import './index.less';
11
- export interface BitzTableProps<RecordType = any> extends Omit<TableProps<RecordType>, 'size' | 'pagination' | 'bordered'> {
12
+ export interface BitzTableRowSelectionProps<RecordType> extends TableRowSelection<RecordType> {
13
+ onClear?: () => void;
14
+ }
15
+ export interface BitzTableProps<RecordType = any> extends Omit<TableProps<RecordType>, 'size' | 'pagination' | 'bordered' | 'rowSelection'> {
12
16
  /** 是否开启rowHover样式 */
13
17
  rowHoverable?: boolean;
14
18
  /** 是否开启斑马纹样式 */
@@ -17,6 +21,8 @@ export interface BitzTableProps<RecordType = any> extends Omit<TableProps<Record
17
21
  bordered?: BitzTableBorderedType;
18
22
  /** PC端:是否显示分页 */
19
23
  showPagination?: boolean;
24
+ /** PC端:是否显示分页选中条数据 */
25
+ showSelected?: boolean;
20
26
  /** PC端:BitzTable组件的整体高度,由外部通过视口高度减去其他元素高度和间隙的结果 */
21
27
  height?: number;
22
28
  /** table可滚动区域的最大宽高的值 */
@@ -34,6 +40,8 @@ export interface BitzTableProps<RecordType = any> extends Omit<TableProps<Record
34
40
  operationFilter?: ActionsFunType<RecordType>;
35
41
  /** PC&移动端:请求加载状态 */
36
42
  loading?: boolean;
43
+ /** 多选/单选 */
44
+ rowSelection?: BitzTableRowSelectionProps<RecordType>;
37
45
  /** 骨架屏列表个数 */
38
46
  skeletonNum?: {
39
47
  pc?: number;