bitz-react-admin-ui 2.3.2 → 2.3.4

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 (37) hide show
  1. package/dist/_virtual/dayjs.min.mjs +5 -2
  2. package/dist/_virtual/dayjs.min2.mjs +4 -0
  3. package/dist/_virtual/index.mjs +2 -2
  4. package/dist/_virtual/index2.mjs +2 -2
  5. package/dist/components/BitzCalendar/index.mjs +1 -1
  6. package/dist/components/BitzDayJs/index.mjs +1 -1
  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/CalendarBody.mjs +1 -1
  11. package/dist/components/BitzFuiCalendar/CalendarHead.mjs +1 -1
  12. package/dist/components/BitzFuiCalendar/CalendarHeadItem.mjs +1 -1
  13. package/dist/components/BitzFuiCalendar/CalendarToolbar.mjs +1 -1
  14. package/dist/components/BitzFuiCalendar/ColumnData.mjs +1 -1
  15. package/dist/components/BitzMeetingTime/BitzMeetingTimeItem.mjs +1 -1
  16. package/dist/components/BitzMeetingTime/index.mjs +1 -1
  17. package/dist/components/BitzTable/ActionCol/index.mjs +1 -1
  18. package/dist/components/BitzTable/ActionCol/style.mjs +8 -7
  19. package/dist/components/BitzTable/SelectionBar/SelectionBar.mjs +21 -18
  20. package/dist/components/BitzTable/Store/index.d.ts +4 -0
  21. package/dist/components/BitzTable/Store/index.mjs +73 -71
  22. package/dist/components/BitzTable/Table/SortTableContext.d.ts +3 -5
  23. package/dist/components/BitzTable/Table/SortTableContext.mjs +42 -19
  24. package/dist/components/BitzTable/Table/index.d.ts +1 -2
  25. package/dist/components/BitzTable/Table/index.mjs +193 -186
  26. package/dist/components/BitzTable/ToolBar/Modal/index.mjs +19 -12
  27. package/dist/components/BitzTable/ToolBar/Modal/style.mjs +43 -45
  28. package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +46 -43
  29. package/dist/components/BitzTableSelect/SelectPopup/getData.mjs +1 -1
  30. package/dist/components/BitzTableSelect/SelectPopup/index.mjs +50 -50
  31. package/dist/node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs +1 -1
  32. package/dist/node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs +292 -292
  33. package/dist/node_modules/.store/dayjs@1.11.10/node_modules/dayjs/locale/zh-cn.mjs +13 -13
  34. package/dist/node_modules/.store/prop-types@15.8.1/node_modules/prop-types/index.mjs +1 -1
  35. package/dist/style.css +1 -1
  36. package/dist/utils/time.mjs +1 -1
  37. package/package.json +1 -1
@@ -1,25 +1,48 @@
1
- import { j as t } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { DndContext as a } from "../../../node_modules/.store/@dnd-kit_core@6.1.0/node_modules/@dnd-kit/core/dist/core.esm.mjs";
3
- import { restrictToVerticalAxis as n } from "../../../node_modules/.store/@dnd-kit_modifiers@6.0.1/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.mjs";
4
- import { SortableContext as x, verticalListSortingStrategy as f } from "../../../node_modules/.store/@dnd-kit_sortable@7.0.2/node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs";
5
- import { memo as p } from "react";
6
- function l({
7
- children: r,
8
- enabledRowDragSort: o,
9
- dataSource: e,
10
- mergeRowKey: m,
11
- onDragEnd: i
1
+ import { j as n } from "../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
+ import { DndContext as v } from "../../../node_modules/.store/@dnd-kit_core@6.1.0/node_modules/@dnd-kit/core/dist/core.esm.mjs";
3
+ import { restrictToVerticalAxis as u } from "../../../node_modules/.store/@dnd-kit_modifiers@6.0.1/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.mjs";
4
+ import { SortableContext as j, verticalListSortingStrategy as C, arrayMove as D } from "../../../node_modules/.store/@dnd-kit_sortable@7.0.2/node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs";
5
+ import { useState as S } from "react";
6
+ function T({
7
+ children: a,
8
+ enabledRowDragSort: x,
9
+ dataSource: i,
10
+ mergeRowKey: d,
11
+ onDragEnd: f
12
12
  }) {
13
- return o ? /* @__PURE__ */ t.jsx(a, { modifiers: [n], onDragEnd: i, children: /* @__PURE__ */ t.jsx(
14
- x,
13
+ const [c, s] = S(-1), l = (t) => {
14
+ var r, e;
15
+ const { active: o } = t;
16
+ o && s((e = (r = o.data) == null ? void 0 : r.current) == null ? void 0 : e.sortable.index);
17
+ }, g = (t) => {
18
+ var r, e;
19
+ const { over: o } = t;
20
+ if (o) {
21
+ const m = (e = (r = o.data) == null ? void 0 : r.current) == null ? void 0 : e.sortable.index;
22
+ c !== m && p(c, m);
23
+ }
24
+ }, p = (t, o) => {
25
+ const r = D(i.slice() ?? [], t, o);
26
+ f(r), s(-1);
27
+ };
28
+ return x ? /* @__PURE__ */ n.jsx(
29
+ v,
15
30
  {
16
- items: e.map((s) => s[m]),
17
- strategy: f,
18
- children: r
31
+ modifiers: [u],
32
+ onDragStart: l,
33
+ onDragEnd: g,
34
+ onDragCancel: () => s(-1),
35
+ children: /* @__PURE__ */ n.jsx(
36
+ j,
37
+ {
38
+ items: i.map((t) => t[d]),
39
+ strategy: C,
40
+ children: a
41
+ }
42
+ )
19
43
  }
20
- ) }) : /* @__PURE__ */ t.jsx(t.Fragment, { children: r });
44
+ ) : /* @__PURE__ */ n.jsx(n.Fragment, { children: a });
21
45
  }
22
- const C = p(l);
23
46
  export {
24
- C as default
47
+ T as default
25
48
  };
@@ -6,7 +6,6 @@ import type { RowClassName } from 'rc-table/es/interface';
6
6
  import { ColumnStateType, DensitySize, StylesStateType, ExportColumnStateType } from '../Store';
7
7
  import { ActionsFunType, BitzTableColumnsType, SelelctionAlertProps } from '..';
8
8
  import { BitzTableBorderedType } from '@/components/BitzConfigProvider/context';
9
- import { DragEndEvent } from '@dnd-kit/core';
10
9
  import './index.less';
11
10
  export interface BitzTableProps<RecordType = any> extends Omit<TableProps<RecordType>, 'size' | 'pagination' | 'bordered'> {
12
11
  /** 是否开启rowHover样式 */
@@ -61,7 +60,7 @@ export interface BitzTableProps<RecordType = any> extends Omit<TableProps<Record
61
60
  /** 是否启用拖拽 */
62
61
  enabledRowDragSort?: boolean;
63
62
  /** 拖拽结束 */
64
- onRowDragEnd?: (event: DragEndEvent) => void;
63
+ onRowDragEnd?: (newCols: RecordType[]) => void;
65
64
  /** 移动端:加载更多返回函数 */
66
65
  /** 移动端:下拉刷新 */
67
66
  mobileRefreshEmit?: () => Promise<unknown> | void;