bitz-react-admin-ui 2.7.6 → 2.7.7

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,7 +1,4 @@
1
- import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.mjs";
2
- import { __require as o } from "../node_modules/dayjs/dayjs.min.mjs";
3
- var t = o();
4
- const s = /* @__PURE__ */ r(t);
1
+ var a = { exports: {} };
5
2
  export {
6
- s as default
3
+ a as __module
7
4
  };
@@ -1,4 +1,4 @@
1
- var s = { exports: {} };
1
+ var e = { exports: {} };
2
2
  export {
3
- s as __module
3
+ e as __module
4
4
  };
@@ -1,4 +1,4 @@
1
- var e = { exports: {} };
1
+ var s = { exports: {} };
2
2
  export {
3
- e as __module
3
+ s as __module
4
4
  };
@@ -1,7 +1,7 @@
1
1
  import { j as n } from "../../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 "../../_virtual/dayjs.min.mjs";
4
+ import N from "../../node_modules/dayjs/dayjs.min.mjs";
5
5
  import B from "../../node_modules/dayjs/plugin/weekOfYear.mjs";
6
6
  import "../../node_modules/dayjs/locale/zh-cn.mjs";
7
7
  N.extend(B);
@@ -1,4 +1,4 @@
1
- import t from "../../_virtual/dayjs.min.mjs";
1
+ import t from "../../node_modules/dayjs/dayjs.min.mjs";
2
2
  import "../../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/zustand/esm/index.mjs";
2
- import o from "../../_virtual/dayjs.min.mjs";
2
+ import o from "../../node_modules/dayjs/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/react/jsx-runtime.mjs";
2
2
  import { useState as y, useEffect as g, useMemo as j } from "react";
3
3
  import D from "../../node_modules/dayjs/plugin/isToday.mjs";
4
- import n from "../../_virtual/dayjs.min.mjs";
4
+ import n from "../../node_modules/dayjs/dayjs.min.mjs";
5
5
  import { useBitzFuiCalendarStore as M, CalendarTypeEnum as S } from "./BitzFuiCalendarStore.mjs";
6
6
  import C 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/react/jsx-runtime.mjs";
2
2
  import { useMemo as c } from "react";
3
3
  import e from "./CalendarAgendum.module.less.mjs";
4
- import r from "../../_virtual/dayjs.min.mjs";
4
+ import r from "../../node_modules/dayjs/dayjs.min.mjs";
5
5
  import { Button as a } from "antd";
6
6
  const d = (_, s) => {
7
7
  const t = s.diff(_, "minute");
@@ -2,7 +2,7 @@ import { j as a } from "../../node_modules/react/jsx-runtime.mjs";
2
2
  import { useState as _, useEffect as y, useMemo as f } from "react";
3
3
  import C from "./ColumnData.mjs";
4
4
  import { useBitzFuiCalendarStore as h, CalendarTypeEnum as o } from "./BitzFuiCalendarStore.mjs";
5
- import j from "../../_virtual/dayjs.min.mjs";
5
+ import j from "../../node_modules/dayjs/dayjs.min.mjs";
6
6
  import x from "../../node_modules/dayjs/plugin/isoWeek.mjs";
7
7
  j.extend(x);
8
8
  const N = (n) => {
@@ -2,7 +2,7 @@ import { j as i } from "../../node_modules/react/jsx-runtime.mjs";
2
2
  import m from "./CalendarHeadItem.mjs";
3
3
  import { useMemo as d } from "react";
4
4
  import { useBitzFuiCalendarStore as u, CalendarTypeEnum as s } from "./BitzFuiCalendarStore.mjs";
5
- import f from "../../_virtual/dayjs.min.mjs";
5
+ import f from "../../node_modules/dayjs/dayjs.min.mjs";
6
6
  import p from "../../node_modules/dayjs/plugin/isoWeek.mjs";
7
7
  f.extend(p);
8
8
  const j = () => {
@@ -1,6 +1,6 @@
1
1
  import { j as a } from "../../node_modules/react/jsx-runtime.mjs";
2
2
  import { memo as m, useMemo as r } from "react";
3
- import d from "../../_virtual/dayjs.min.mjs";
3
+ import d from "../../node_modules/dayjs/dayjs.min.mjs";
4
4
  import i from "../../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/react/jsx-runtime.mjs";
2
2
  import { useMemo as s } from "react";
3
3
  import { Space as c, Button as i, DatePicker as h, Dropdown as C } from "antd";
4
4
  import { useBitzFuiCalendarStore as b, CalendarTypeEnum as a } from "./BitzFuiCalendarStore.mjs";
5
- import w from "../../_virtual/dayjs.min.mjs";
5
+ import w from "../../node_modules/dayjs/dayjs.min.mjs";
6
6
  import g from "../../node_modules/@ant-design/icons/es/icons/AppstoreOutlined.mjs";
7
7
  import v from "../../node_modules/@ant-design/icons/es/icons/LeftOutlined.mjs";
8
8
  import T from "../../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/dayjs/plugin/isSameOrAfter.mjs";
5
5
  import F from "../../node_modules/dayjs/plugin/isSameOrBefore.mjs";
6
6
  import M from "../../node_modules/dayjs/plugin/utc.mjs";
7
- import r from "../../_virtual/dayjs.min.mjs";
7
+ import r from "../../node_modules/dayjs/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/dayjs/plugin/objectSupport.mjs";
4
4
  import H from "../../node_modules/dayjs/plugin/isSameOrAfter.mjs";
5
5
  import D from "../../node_modules/dayjs/plugin/utc.mjs";
6
- import e from "../../_virtual/dayjs.min.mjs";
6
+ import e from "../../node_modules/dayjs/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/react/jsx-runtime.mjs";
2
2
  import { useMemo as d } from "react";
3
3
  import p from "../../node_modules/dayjs/plugin/objectSupport.mjs";
4
4
  import T from "./BitzMeetingTimeItem.mjs";
5
- import m from "../../_virtual/dayjs.min.mjs";
5
+ import m from "../../node_modules/dayjs/dayjs.min.mjs";
6
6
  import "./index.less.mjs";
7
7
  m.extend(p);
8
8
  const x = (a) => {
@@ -1,166 +1,169 @@
1
1
  import { j as n } from "../../../node_modules/react/jsx-runtime.mjs";
2
- import P from "../../../node_modules/ahooks/es/useSize/index.mjs";
3
- import { Space as E, Skeleton as M, theme as D } from "antd";
4
- import { forwardRef as F, useContext as H, useMemo as N, useState as O, Fragment as _, useRef as I } from "react";
5
- import j from "../../BitzButton/index.mjs";
6
- import $, { actionColBtnGap as q } from "./style.mjs";
2
+ import M from "../../../node_modules/ahooks/es/useSize/index.mjs";
3
+ import { Space as I, Skeleton as D, theme as F } from "antd";
4
+ import { forwardRef as G, useContext as H, useMemo as w, useState as O, Fragment as W, useRef as P } from "react";
5
+ import C from "../../BitzButton/index.mjs";
6
+ import _, { actionColBtnGap as $ } from "./style.mjs";
7
7
  import "../index.mjs";
8
8
  import R from "../Dropdown/index.mjs";
9
- import { tablePaddingInline as G } from "../../BitzConfigProvider/context.mjs";
9
+ import { tablePaddingInline as q } from "../../BitzConfigProvider/context.mjs";
10
10
  import { BitzTableContext as J } from "../Store/index.mjs";
11
- const k = ({
12
- skeletonCls: u,
13
- ...s
14
- }) => /* @__PURE__ */ n.jsxs(j, { type: "text", ...s, children: [
15
- /* @__PURE__ */ n.jsx("span", { children: s.children }),
11
+ const b = ({
12
+ skeletonCls: x,
13
+ ...r
14
+ }) => /* @__PURE__ */ n.jsxs(C, { type: "text", ...r, children: [
15
+ /* @__PURE__ */ n.jsx("span", { children: r.children }),
16
16
  /* @__PURE__ */ n.jsx(
17
- M,
17
+ D,
18
18
  {
19
19
  active: !0,
20
20
  title: !1,
21
- className: u,
21
+ className: x,
22
22
  paragraph: {
23
23
  rows: 1,
24
24
  width: "100%"
25
25
  }
26
26
  }
27
27
  )
28
- ] }), K = F(
29
- ({ loading: u, maxCount: s, useMaxWidth: m, actionGroup: i, customActions: o }, b) => {
30
- const { loading: x, fullscreen: S } = H(J), a = N(() => u ?? x, [u, x]), {
31
- primaryBtnClassName: p,
32
- dangerBtnClassName: l,
33
- secondaryBtnClassName: f,
34
- maskClassName: y,
35
- skeletonBtnClassName: C,
36
- skeletonClassName: h
37
- } = $(), [T] = O([
28
+ ] }), K = G(
29
+ ({ loading: x, maxCount: r, useMaxWidth: p, actionGroup: d, customActions: o, width: B }, f) => {
30
+ const { loading: g, fullscreen: z } = H(J), a = w(() => x ?? g, [x, g]), {
31
+ primaryBtnClassName: s,
32
+ dangerBtnClassName: h,
33
+ secondaryBtnClassName: k,
34
+ maskClassName: T,
35
+ skeletonBtnClassName: m,
36
+ skeletonClassName: j
37
+ } = _(), [N] = O([
38
38
  /* @__PURE__ */ n.jsx(
39
- k,
39
+ b,
40
40
  {
41
- className: C,
42
- skeletonCls: h,
41
+ className: m,
42
+ skeletonCls: j,
43
43
  children: "占位"
44
44
  },
45
45
  1
46
46
  ),
47
47
  /* @__PURE__ */ n.jsx(
48
- k,
48
+ b,
49
49
  {
50
- className: C,
51
- skeletonCls: h,
50
+ className: m,
51
+ skeletonCls: j,
52
52
  children: "占位"
53
53
  },
54
54
  2
55
55
  )
56
- ]), B = N(() => {
57
- if (a && m)
58
- return T;
59
- const d = s - 1 > 0 ? s - 1 : 2, g = i.length > s ? d : i.length, t = i.slice(0, g), r = [];
60
- if (t != null && t.length && t.forEach((e, c) => {
61
- r.push(
56
+ ]), y = w(() => {
57
+ if (a && p)
58
+ return N;
59
+ const i = r - 1 > 0 ? r - 1 : 2, u = d.length > r ? i : d.length, e = d.slice(0, u), l = [];
60
+ if (e != null && e.length && e.forEach((t, c) => {
61
+ l.push(
62
62
  a ? /* @__PURE__ */ n.jsx(
63
- k,
63
+ b,
64
64
  {
65
- className: C,
66
- skeletonCls: h,
67
- children: e == null ? void 0 : e.label
65
+ className: m,
66
+ skeletonCls: j,
67
+ children: t == null ? void 0 : t.label
68
68
  },
69
69
  c
70
- ) : e.children ? /* @__PURE__ */ n.jsx(R, { menu: { items: e.children }, children: /* @__PURE__ */ n.jsx(
71
- j,
70
+ ) : t.children ? /* @__PURE__ */ n.jsx(R, { menu: { items: t.children }, children: /* @__PURE__ */ n.jsx(
71
+ C,
72
72
  {
73
73
  type: "text",
74
- className: e.danger ? l : p,
75
- children: e == null ? void 0 : e.label
74
+ className: t.danger ? h : s,
75
+ children: t == null ? void 0 : t.label
76
76
  }
77
77
  ) }, c) : /* @__PURE__ */ n.jsx(
78
- j,
78
+ C,
79
79
  {
80
80
  type: "text",
81
- className: e.danger ? l : p,
82
- onClick: e == null ? void 0 : e.onClick,
83
- children: e == null ? void 0 : e.label
81
+ className: t.danger ? h : s,
82
+ onClick: t == null ? void 0 : t.onClick,
83
+ children: t == null ? void 0 : t.label
84
84
  },
85
85
  c
86
86
  )
87
87
  );
88
- }), g === d && i.length > s) {
89
- const e = i.slice(
90
- d,
91
- i.length
88
+ }), u === i && d.length > r) {
89
+ const t = d.slice(
90
+ i,
91
+ d.length
92
92
  );
93
- r.push(
93
+ l.push(
94
94
  a ? /* @__PURE__ */ n.jsx(
95
- k,
95
+ b,
96
96
  {
97
- className: C,
98
- skeletonCls: h,
97
+ className: m,
98
+ skeletonCls: j,
99
99
  children: "更多"
100
100
  },
101
101
  -1
102
- ) : /* @__PURE__ */ n.jsx(R, { menu: { items: e }, children: /* @__PURE__ */ n.jsx(j, { type: "text", className: f, children: "更多" }) }, -1)
102
+ ) : /* @__PURE__ */ n.jsx(R, { menu: { items: t }, children: /* @__PURE__ */ n.jsx(C, { type: "text", className: k, children: "更多" }) }, -1)
103
103
  );
104
104
  }
105
- return r;
106
- }, [a, s, m, i]), w = N(() => {
105
+ return l;
106
+ }, [a, r, p, d]), S = w(() => {
107
107
  if (!(o != null && o.length))
108
108
  return;
109
- if (a && m)
110
- return T;
111
- const d = o.map((t, r) => /* @__PURE__ */ n.jsx(
112
- k,
109
+ if (a && p)
110
+ return N;
111
+ const i = o.map((e, l) => /* @__PURE__ */ n.jsx(
112
+ b,
113
113
  {
114
- className: C,
115
- skeletonCls: h,
116
- children: t == null ? void 0 : t.label
114
+ className: m,
115
+ skeletonCls: j,
116
+ children: e == null ? void 0 : e.label
117
117
  },
118
- r
119
- )), g = o.map((t, r) => {
120
- let e = /* @__PURE__ */ n.jsx(
121
- j,
118
+ l
119
+ )), u = o.map((e, l) => {
120
+ let t = /* @__PURE__ */ n.jsx(
121
+ C,
122
122
  {
123
123
  type: "text",
124
- className: t.danger ? l : p,
125
- onClick: t.onClick,
126
- children: t == null ? void 0 : t.label
124
+ className: e.danger ? h : s,
125
+ onClick: e.onClick,
126
+ children: e == null ? void 0 : e.label
127
127
  },
128
- r
128
+ l
129
129
  );
130
- t.type === "secondary" && (e = /* @__PURE__ */ n.jsx(
131
- j,
130
+ e.type === "secondary" && (t = /* @__PURE__ */ n.jsx(
131
+ C,
132
132
  {
133
133
  type: "text",
134
- className: f,
135
- onClick: t.onClick,
136
- children: t == null ? void 0 : t.label
134
+ className: k,
135
+ onClick: e.onClick,
136
+ children: e == null ? void 0 : e.label
137
137
  },
138
- r
138
+ l
139
139
  ));
140
- const c = t.render ?? ((z, L) => /* @__PURE__ */ n.jsx(_, { children: z }, L));
141
- return c == null ? void 0 : c(e, r);
140
+ const c = e.render ?? ((L, E) => /* @__PURE__ */ n.jsx(W, { children: L }, E));
141
+ return c == null ? void 0 : c(t, l);
142
142
  });
143
- return a ? d : g;
144
- }, [a, m, o]);
145
- return /* @__PURE__ */ n.jsxs("div", { onClick: (d) => d.stopPropagation(), style: { overflow: "hidden" }, children: [
146
- /* @__PURE__ */ n.jsx(E, { size: q, ref: b, className: "actionGroup", children: w ?? B }),
147
- /* @__PURE__ */ n.jsx("div", { className: y })
143
+ return a ? i : u;
144
+ }, [a, p, o]);
145
+ return B ? /* @__PURE__ */ n.jsxs("div", { onClick: (i) => i.stopPropagation(), style: { overflow: "hidden" }, children: [
146
+ /* @__PURE__ */ n.jsx(I, { size: 8, ref: f, className: "actionGroup", style: { flexWrap: "wrap" }, children: S ?? y }),
147
+ /* @__PURE__ */ n.jsx("div", { className: T })
148
+ ] }) : /* @__PURE__ */ n.jsxs("div", { onClick: (i) => i.stopPropagation(), style: { overflow: "hidden" }, children: [
149
+ /* @__PURE__ */ n.jsx(I, { size: $, ref: f, className: "actionGroup", children: S ?? y }),
150
+ /* @__PURE__ */ n.jsx("div", { className: T })
148
151
  ] });
149
152
  }
150
153
  );
151
- function te(u) {
152
- var h;
154
+ function ne(x) {
155
+ var m;
153
156
  const {
154
- actionGroup: s,
155
- loading: m,
156
- maxCount: i = 3,
157
+ actionGroup: r,
158
+ loading: p,
159
+ maxCount: d = 3,
157
160
  customActions: o,
158
- defaultWidth: b,
159
- width: x,
160
- ...S
161
- } = u, a = ((h = D.useToken().token.Table) == null ? void 0 : h.cellPaddingInline) ?? G, p = I(null), l = P(p), f = I(0), y = N(() => x || (l != null && l.width && !f.current && (f.current = l == null ? void 0 : l.width), !(l != null && l.width) && f.current ? f.current + a * 2 + 1 : l != null && l.width ? l.width + a * 2 + 1 : b ?? 141), [x, l, a, b]);
162
- return N(() => ({
163
- width: Math.floor(y),
161
+ defaultWidth: B,
162
+ width: f,
163
+ ...g
164
+ } = x, z = ((m = F.useToken().token.Table) == null ? void 0 : m.cellPaddingInline) ?? q, a = P(null), s = M(a), h = P(0), k = w(() => f || (s != null && s.width && !h.current && (h.current = s == null ? void 0 : s.width), !(s != null && s.width) && h.current ? h.current + z * 2 + 1 : s != null && s.width ? s.width + z * 2 + 1 : B ?? 141), [f, s, z, B]);
165
+ return w(() => ({
166
+ width: Math.floor(k),
164
167
  mobileHide: !0,
165
168
  isOperationCol: !0,
166
169
  title: "操作",
@@ -169,36 +172,37 @@ function te(u) {
169
172
  dataIndex: "operationCol",
170
173
  className: "operationCol",
171
174
  disabled: !0,
172
- render: (T, B, w) => {
173
- var t, r;
174
- const d = ((t = o == null ? void 0 : o(B, w)) == null ? void 0 : t.filter((e) => e.type != "detail")) ?? [], g = ((r = s == null ? void 0 : s(B, w)) == null ? void 0 : r.filter((e) => {
175
- var z;
176
- const c = typeof e.hidden == "function" ? (z = e.hidden) == null ? void 0 : z.call(e) : e.hidden;
177
- return e.type != "detail" && !c;
175
+ render: (j, N, y) => {
176
+ var u, e;
177
+ const S = ((u = o == null ? void 0 : o(N, y)) == null ? void 0 : u.filter((l) => l.type != "detail")) ?? [], i = ((e = r == null ? void 0 : r(N, y)) == null ? void 0 : e.filter((l) => {
178
+ var c;
179
+ const t = typeof l.hidden == "function" ? (c = l.hidden) == null ? void 0 : c.call(l) : l.hidden;
180
+ return l.type != "detail" && !t;
178
181
  })) ?? [];
179
182
  return /* @__PURE__ */ n.jsx(
180
183
  K,
181
184
  {
182
- actionGroup: g,
183
- customActions: d,
184
- loading: m,
185
- maxCount: i,
186
- useMaxWidth: S.useMaxWidth,
187
- ref: p
185
+ actionGroup: i,
186
+ customActions: S,
187
+ loading: p,
188
+ maxCount: d,
189
+ useMaxWidth: g.useMaxWidth,
190
+ ref: a,
191
+ width: f
188
192
  }
189
193
  );
190
194
  },
191
- ...S
195
+ ...g
192
196
  }), [
193
- y,
194
- p.current,
195
- m,
196
- i,
197
- s,
197
+ k,
198
+ a.current,
199
+ p,
200
+ d,
201
+ r,
198
202
  o
199
203
  ]);
200
204
  }
201
205
  export {
202
206
  K as BitzTableAction,
203
- te as default
207
+ ne as default
204
208
  };
@@ -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个开始直到最后的所有按钮都为次要操作按钮
@@ -1,5 +1,5 @@
1
1
  import { getDefaultExportFromCjs as u } from "../../_virtual/_commonjsHelpers.mjs";
2
- import { __module as i } from "../../_virtual/index2.mjs";
2
+ import { __module as i } from "../../_virtual/index3.mjs";
3
3
  /*!
4
4
  Copyright (c) 2018 Jed Watson.
5
5
  Licensed under the MIT License (MIT), see