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,151 +1,153 @@
1
1
  import { j as e } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { useRef as te, useState as T, useMemo as K, useCallback as re, useEffect as le } from "react";
3
- import { Row as y, Col as a, Space as A, Form as h, Select as G, Spin as se, Typography as oe, Table as ce, Pagination as ne, Flex as ie, Empty as H } from "antd";
4
- import J from "../../BitzButton/index.mjs";
5
- import { getColumns as ae, getExpandable as pe, getLayoutConfig as ue } from "./getData.mjs";
6
- import de from "../TextBlock/index.mjs";
7
- import xe from "../../../node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useSize/index.mjs";
8
- import he from "../../BitzTheme/index.mjs";
2
+ import { useRef as re, useState as T, useMemo as K, useCallback as le, useEffect as oe } from "react";
3
+ import { Row as f, Col as a, Space as _, Form as h, Select as A, Spin as se, Typography as ce, Flex as ne, Empty as G } from "antd";
4
+ import ie from "../../BitzPagination/index.mjs";
5
+ import ae from "../../BitzTable/index.mjs";
6
+ import H from "../../BitzButton/index.mjs";
7
+ import { getColumns as pe, getExpandable as de, getLayoutConfig as ue } from "./getData.mjs";
8
+ import xe from "../TextBlock/index.mjs";
9
+ import he from "../../../node_modules/.store/ahooks@3.7.10/node_modules/ahooks/es/useSize/index.mjs";
10
+ import me from "../../BitzTheme/index.mjs";
9
11
  import "./index.less.mjs";
10
- import me from "../../../node_modules/.store/@ant-design_icons@5.3.5/node_modules/@ant-design/icons/es/icons/InfoCircleOutlined.mjs";
11
- import je from "../../../node_modules/.store/@ant-design_icons@5.3.5/node_modules/@ant-design/icons/es/icons/CloseOutlined.mjs";
12
- function Ee({
12
+ import je from "../../../node_modules/.store/@ant-design_icons@5.3.5/node_modules/@ant-design/icons/es/icons/InfoCircleOutlined.mjs";
13
+ import Se from "../../../node_modules/.store/@ant-design_icons@5.3.5/node_modules/@ant-design/icons/es/icons/CloseOutlined.mjs";
14
+ function ke({
13
15
  columns: P,
14
- tableData: z,
15
- total: O,
16
+ tableData: b,
17
+ total: L,
16
18
  loading: m,
17
- loadingFailed: b,
18
- loadAgain: Q,
19
- page: f,
20
- onPageChange: B,
21
- searchInput: W,
19
+ loadingFailed: y,
20
+ loadAgain: O,
21
+ page: B,
22
+ onPageChange: W,
23
+ searchInput: $,
22
24
  showToolTagSelect: E,
23
- toolTags: $,
25
+ toolTags: q,
24
26
  onToolTagChange: g,
25
27
  lrLayout: w,
26
28
  parentRender: I,
27
29
  keys: R,
28
- rows: k,
29
- fieldNames: r,
30
- onChange: d,
30
+ rows: z,
31
+ fieldNames: t,
32
+ onChange: u,
31
33
  onDropdownVisibleChange: j
32
34
  }) {
33
- var F;
34
- const C = te(null), v = xe(C), { token: o } = he.useToken(), { tableSpaceBetweenPage: M = 10 } = o == null ? void 0 : o.BitzTableSelect, [c, q] = T([]), [s, L] = T([]), [U, X] = T(void 0), Y = (t, l) => {
35
- X(t), g == null || g(t, l), t || (j(!0), setTimeout(() => {
35
+ var C, F;
36
+ const k = re(null), v = he(k), { token: s } = me.useToken(), M = ((C = s == null ? void 0 : s.BitzTableSelect) == null ? void 0 : C.tableSpaceBetweenPage) ?? 10, [c, J] = T([]), [r, Q] = T([]), [U, X] = T(void 0), Y = (l, o) => {
37
+ X(l), g == null || g(l, o), l || (j(!0), setTimeout(() => {
36
38
  j(!1);
37
39
  }, 0));
38
- }, Z = K(() => ae(P, z, f), [P]), D = {
40
+ }, Z = K(() => pe(P, b, B), [P]), D = {
39
41
  selectedRowKeys: c,
40
- onSelect: (t, l) => {
41
- if (l)
42
- c.push(t[r.value]), s.push(t), d(c, s);
42
+ onSelect: (l, o) => {
43
+ if (o)
44
+ c.push(l[t.value]), r.push(l), u(c, r);
43
45
  else {
44
- const p = s.filter(
45
- (u) => u[r.value] !== t[r.value]
46
+ const p = r.filter(
47
+ (d) => d[t.value] !== l[t.value]
46
48
  );
47
- d(
48
- p.map((u) => u[r.value]),
49
+ u(
50
+ p.map((d) => d[t.value]),
49
51
  p
50
52
  );
51
53
  }
52
54
  },
53
- onSelectAll: (t, l, p) => {
54
- const u = p.map((i) => i[r.value]);
55
- if (t) {
56
- const i = c.concat(u), S = s.concat(p);
57
- d(i, S);
55
+ onSelectAll: (l, o, p) => {
56
+ const d = p.map((i) => i[t.value]);
57
+ if (l) {
58
+ const i = c.concat(d), S = r.concat(p);
59
+ u(i, S);
58
60
  } else {
59
- const i = c == null ? void 0 : c.filter((x) => !u.includes(x)), S = /* @__PURE__ */ new Map();
61
+ const i = c == null ? void 0 : c.filter((x) => !d.includes(x)), S = /* @__PURE__ */ new Map();
60
62
  p.forEach((x) => {
61
- S.set(x[r.value], x);
63
+ S.set(x[t.value], x);
62
64
  });
63
- const ee = s == null ? void 0 : s.filter(
64
- (x) => !S.has(x[r.value])
65
+ const te = r == null ? void 0 : r.filter(
66
+ (x) => !S.has(x[t.value])
65
67
  );
66
- d(i, ee);
68
+ u(i, te);
67
69
  }
68
70
  }
69
- }, V = re(() => pe(r.items), [r.items]), _ = (t, l) => /* @__PURE__ */ e.jsxs("span", { style: { color: o.colorText }, children: [
70
- t[0],
71
+ }, V = le(() => de(t.items, m), [t.items]), N = (l, o) => /* @__PURE__ */ e.jsxs("span", { style: { color: s.colorText }, children: [
72
+ l[0],
71
73
  " ",
72
- /* @__PURE__ */ e.jsx("span", { style: { color: o.colorPrimary, fontWeight: 600 }, children: l }),
74
+ /* @__PURE__ */ e.jsx("span", { style: { color: s.colorPrimary, fontWeight: 600 }, children: o }),
73
75
  " ",
74
- t[1]
75
- ] }), N = () => {
76
- const t = (l) => {
77
- const p = s.findIndex(
78
- (i) => i[r.value] === l[r.value]
79
- ), u = c.findIndex(
80
- (i) => i === l[r.value]
76
+ l[1]
77
+ ] }), ee = () => {
78
+ const l = (o) => {
79
+ const p = r.findIndex(
80
+ (i) => i[t.value] === o[t.value]
81
+ ), d = c.findIndex(
82
+ (i) => i === o[t.value]
81
83
  );
82
- s.splice(p, 1), c.splice(u, 1), d(c, s);
84
+ r.splice(p, 1), c.splice(d, 1), u(c, r);
83
85
  };
84
86
  return /* @__PURE__ */ e.jsxs(
85
- A,
87
+ _,
86
88
  {
87
89
  direction: "vertical",
88
90
  style: {
89
91
  width: "calc(100% - 5px)",
90
92
  paddingRight: 5,
91
- maxHeight: s.length ? 220 : "auto",
93
+ maxHeight: r.length ? 220 : "auto",
92
94
  overflow: "hidden auto"
93
95
  },
94
96
  children: [
95
- s.map((l) => /* @__PURE__ */ e.jsxs(
96
- ie,
97
+ r.map((o) => /* @__PURE__ */ e.jsxs(
98
+ ne,
97
99
  {
98
100
  justify: "space-between",
99
101
  style: {
100
102
  padding: "4px 8px",
101
- border: `1px solid ${o.colorBorder}`,
103
+ border: `1px solid ${s.colorBorder}`,
102
104
  backgroundColor: "#f5f5f5",
103
- borderRadius: o.borderRadiusSM,
105
+ borderRadius: s.borderRadiusSM,
104
106
  overflow: "hidden"
105
107
  },
106
108
  children: [
107
- /* @__PURE__ */ e.jsx("div", { style: { width: "calc(100% - 15px)" }, children: /* @__PURE__ */ e.jsx(de, { value: l[r.label] }) }),
109
+ /* @__PURE__ */ e.jsx("div", { style: { width: "calc(100% - 15px)" }, children: /* @__PURE__ */ e.jsx(xe, { value: o[t.label] }) }),
108
110
  /* @__PURE__ */ e.jsx(
109
- je,
111
+ Se,
110
112
  {
111
113
  style: {
112
- color: o.colorError,
114
+ color: s.colorError,
113
115
  fontSize: 13,
114
116
  cursor: "pointer"
115
117
  },
116
- onClick: () => t(l)
118
+ onClick: () => l(o)
117
119
  }
118
120
  )
119
121
  ]
120
122
  },
121
- l[r.value]
123
+ o[t.value]
122
124
  )),
123
- !s.length && /* @__PURE__ */ e.jsx(H, { image: H.PRESENTED_IMAGE_SIMPLE })
125
+ !r.length && /* @__PURE__ */ e.jsx(G, { image: G.PRESENTED_IMAGE_SIMPLE })
124
126
  ]
125
127
  }
126
128
  );
127
129
  }, n = K(() => ue(w, E), [w, E]);
128
- return le(() => {
129
- q(R ?? []), L(k ?? []);
130
- }, [R, k]), /* @__PURE__ */ e.jsxs(y, { gutter: n.gutter, children: [
130
+ return oe(() => {
131
+ J(R ?? []), Q(z ?? []);
132
+ }, [R, z]), /* @__PURE__ */ e.jsxs(f, { gutter: n.gutter, children: [
131
133
  /* @__PURE__ */ e.jsx(a, { span: n.left.span, children: w && I && I(M, v == null ? void 0 : v.height) }),
132
- /* @__PURE__ */ e.jsx(a, { span: n.right.span, children: /* @__PURE__ */ e.jsxs(A, { direction: "vertical", size: M, style: { width: "100%" }, children: [
133
- /* @__PURE__ */ e.jsx(h, { className: "tableSelectPopupSearchForm", children: /* @__PURE__ */ e.jsx(y, { gutter: [16, 16], children: /* @__PURE__ */ e.jsx(a, { span: 24, children: /* @__PURE__ */ e.jsxs(y, { justify: "space-between", gutter: [16, 16], children: [
134
- /* @__PURE__ */ e.jsx(a, { span: n.right.search, children: /* @__PURE__ */ e.jsx(h.Item, { children: W }) }),
135
- /* @__PURE__ */ e.jsx(a, { span: n.right.operation, children: /* @__PURE__ */ e.jsxs(y, { justify: "end", gutter: 8, children: [
134
+ /* @__PURE__ */ e.jsx(a, { span: n.right.span, children: /* @__PURE__ */ e.jsxs(_, { direction: "vertical", size: M, style: { width: "100%" }, children: [
135
+ /* @__PURE__ */ e.jsx(h, { className: "tableSelectPopupSearchForm", children: /* @__PURE__ */ e.jsx(f, { gutter: [16, 16], children: /* @__PURE__ */ e.jsx(a, { span: 24, children: /* @__PURE__ */ e.jsxs(f, { justify: "space-between", gutter: [16, 16], children: [
136
+ /* @__PURE__ */ e.jsx(a, { span: n.right.search, children: /* @__PURE__ */ e.jsx(h.Item, { children: $ }) }),
137
+ /* @__PURE__ */ e.jsx(a, { span: n.right.operation, children: /* @__PURE__ */ e.jsxs(f, { justify: "end", gutter: 8, children: [
136
138
  /* @__PURE__ */ e.jsx(a, { span: n.right.toolTagSelect, children: /* @__PURE__ */ e.jsx(h.Item, { children: /* @__PURE__ */ e.jsx(
137
- G,
139
+ A,
138
140
  {
139
141
  allowClear: !0,
140
142
  className: "tableSelectPopupToolTagSelect",
141
143
  style: {
142
144
  width: "100%",
143
- "--toolTagSelect-color": m ? o.colorTextDisabled : o.colorText
145
+ "--toolTagSelect-color": m ? s.colorTextDisabled : s.colorText
144
146
  },
145
147
  placeholder: "常用标签",
146
148
  showSearch: !1,
147
149
  disabled: m,
148
- options: $,
150
+ options: q,
149
151
  value: U,
150
152
  onChange: Y,
151
153
  onDropdownVisibleChange: j
@@ -153,40 +155,40 @@ function Ee({
153
155
  ) }) }),
154
156
  /* @__PURE__ */ e.jsx(a, { span: n.right.totalSelect, children: /* @__PURE__ */ e.jsx(h.Item, { children: /* @__PURE__ */ e.jsxs("div", { className: "tableSelectPopupTotalSelect", children: [
155
157
  /* @__PURE__ */ e.jsx(
156
- G,
158
+ A,
157
159
  {
158
160
  style: { width: "100%" },
159
161
  mode: "multiple",
160
162
  placeholder: "",
161
163
  showSearch: !1,
162
- options: s,
164
+ options: r,
163
165
  value: c,
164
- fieldNames: r,
166
+ fieldNames: t,
165
167
  popupClassName: "tableSelectPopupTotalPopup",
166
- dropdownRender: N,
168
+ dropdownRender: ee,
167
169
  tagRender: () => /* @__PURE__ */ e.jsx(e.Fragment, {}),
168
170
  onDropdownVisibleChange: j
169
171
  }
170
172
  ),
171
- /* @__PURE__ */ e.jsx("div", { className: "tableSelectPopupTotalSelectTip", children: _(
173
+ /* @__PURE__ */ e.jsx("div", { className: "tableSelectPopupTotalSelectTip", children: N(
172
174
  ["已选择", "条数据"],
173
175
  c.length || 0
174
176
  ) })
175
177
  ] }) }) }),
176
178
  /* @__PURE__ */ e.jsx(a, { span: n.right.button, children: /* @__PURE__ */ e.jsx(
177
- J,
179
+ H,
178
180
  {
179
181
  type: "primary",
180
182
  danger: !0,
181
- onClick: () => d([], [], "clear"),
183
+ onClick: () => u([], [], "clear"),
182
184
  children: "清空"
183
185
  }
184
186
  ) }),
185
187
  /* @__PURE__ */ e.jsx(a, { span: n.right.button, children: /* @__PURE__ */ e.jsx(
186
- J,
188
+ H,
187
189
  {
188
190
  type: "primary",
189
- onClick: () => d([], [], "confirm"),
191
+ onClick: () => u([], [], "confirm"),
190
192
  children: "确认"
191
193
  }
192
194
  ) })
@@ -195,34 +197,34 @@ function Ee({
195
197
  /* @__PURE__ */ e.jsx(
196
198
  "div",
197
199
  {
198
- ref: C,
199
- ...b && {
200
+ ref: k,
201
+ ...y && {
200
202
  className: "pointerMouse",
201
- onClick: () => Q()
203
+ onClick: () => O()
202
204
  },
203
205
  children: /* @__PURE__ */ e.jsx(
204
206
  se,
205
207
  {
206
- spinning: b,
207
- indicator: /* @__PURE__ */ e.jsx(me, {}),
208
- tip: /* @__PURE__ */ e.jsx(oe.Text, { type: "danger", children: "加载失败,点击重试" }),
208
+ spinning: y,
209
+ indicator: /* @__PURE__ */ e.jsx(je, {}),
210
+ tip: /* @__PURE__ */ e.jsx(ce.Text, { type: "danger", children: "加载失败,点击重试" }),
209
211
  children: /* @__PURE__ */ e.jsx(
210
- ce,
212
+ ae,
211
213
  {
212
- rowKey: r.value,
214
+ rowKey: t.value,
213
215
  loading: m,
214
216
  bordered: !0,
215
- sticky: !0,
216
- size: "small",
217
- scroll: { y: 400 },
218
- pagination: !1,
217
+ tableLayout: "fixed",
218
+ scroll: { x: 1, y: 400 },
219
+ showPagination: !1,
220
+ showTableTool: !1,
219
221
  rowSelection: D,
220
222
  columns: Z,
221
- dataSource: z,
222
- ...b && { className: "loadingFailedTable" },
223
+ dataSource: b,
224
+ ...y && { className: "loadingFailedTable" },
223
225
  ...V(),
224
226
  style: {
225
- "--tableBody-bootomBorderColor": ((F = o.Table) == null ? void 0 : F.borderColor) || o.colorBorderSecondary
227
+ "--tableBody-bootomBorderColor": ((F = s.Table) == null ? void 0 : F.borderColor) || s.colorBorderSecondary
226
228
  }
227
229
  }
228
230
  )
@@ -231,24 +233,21 @@ function Ee({
231
233
  }
232
234
  ),
233
235
  /* @__PURE__ */ e.jsx(h, { children: /* @__PURE__ */ e.jsx(h.Item, { style: { marginBottom: 0 }, children: /* @__PURE__ */ e.jsx(
234
- ne,
236
+ ie,
235
237
  {
236
238
  disabled: m,
237
239
  className: "tableSelectPopupTablePagination",
238
240
  size: "small",
239
- current: f.pageIndex,
240
- pageSize: f.pageSize,
241
- showTotal: (t) => _(["共", "条"], t),
242
- showSizeChanger: !0,
243
- showQuickJumper: !0,
244
- total: O,
245
- onChange: B,
246
- onShowSizeChange: (t, l) => B(1, l)
241
+ enableControl: !0,
242
+ pagination: B,
243
+ total: L,
244
+ dataSource: b,
245
+ paginationEmit: W
247
246
  }
248
247
  ) }) })
249
248
  ] }) })
250
249
  ] });
251
250
  }
252
251
  export {
253
- Ee as default
252
+ ke as default
254
253
  };
@@ -51,7 +51,7 @@ const { TextArea: k } = u, C = ({ value: n, isLatterHalf: a = !1 }) => {
51
51
  minRows: 1,
52
52
  maxRows: 100
53
53
  },
54
- bordered: !1,
54
+ variant: "borderless",
55
55
  readOnly: !0
56
56
  }
57
57
  )
@@ -1,8 +1,8 @@
1
- import { j as l } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { Input as m } from "antd";
3
- import i from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
1
+ import { j as i } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
+ import { Input as l } from "antd";
3
+ import m from "../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
4
4
  import "./index.less.mjs";
5
- const { TextArea: n } = m, u = ({
5
+ const { TextArea: n } = l, u = ({
6
6
  maxRows: t = 1,
7
7
  minRows: o,
8
8
  bold: e,
@@ -15,15 +15,15 @@ const { TextArea: n } = m, u = ({
15
15
  fontWeight: e
16
16
  }
17
17
  };
18
- return /* @__PURE__ */ l.jsx(
18
+ return /* @__PURE__ */ i.jsx(
19
19
  n,
20
20
  {
21
- className: i("textBlock", r),
21
+ className: m("textBlock", r),
22
22
  title: s,
23
23
  value: s,
24
24
  readOnly: !0,
25
25
  size: "small",
26
- bordered: !1,
26
+ variant: "borderless",
27
27
  autoSize: {
28
28
  minRows: o ?? t,
29
29
  maxRows: t
@@ -10,8 +10,8 @@ export interface FieldNames {
10
10
  }
11
11
  /** 分页属性 */
12
12
  export interface PaginationProps {
13
- pageIndex: number;
14
- pageSize: number;
13
+ page: number;
14
+ size: number;
15
15
  }
16
16
  /** 分页数据change事件 */
17
17
  export type PaginationChangeEvent = (page: number, pageSize: number) => void;