bitz-react-admin-ui 2.0.5 → 2.0.6

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 (77) hide show
  1. package/dist/_virtual/index.mjs +2 -2
  2. package/dist/_virtual/index2.mjs +2 -2
  3. package/dist/components/BitzTable/Store/utils/index.mjs +14 -30
  4. package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +36 -46
  5. package/dist/components/BitzTable/ToolBar/index.d.ts +0 -2
  6. package/dist/components/BitzTable/ToolBar/index.mjs +4 -6
  7. package/dist/node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs +1 -1
  8. package/dist/node_modules/.store/prop-types@15.8.1/node_modules/prop-types/index.mjs +1 -1
  9. package/dist/style.css +1 -1
  10. package/package.json +1 -1
  11. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.d.ts +0 -10
  12. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +0 -100
  13. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.d.ts +0 -10
  14. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.mjs +0 -103
  15. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndList.d.ts +0 -13
  16. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndList.mjs +0 -88
  17. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.d.ts +0 -14
  18. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +0 -261
  19. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.d.ts +0 -6
  20. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +0 -17
  21. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/RadioCard.d.ts +0 -8
  22. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/RadioCard.mjs +0 -13
  23. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.d.ts +0 -10
  24. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.mjs +0 -163
  25. package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.d.ts +0 -11
  26. package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +0 -44
  27. package/dist/components/BitzTable/ToolBar/ColConfigIcon/style.d.ts +0 -2
  28. package/dist/components/BitzTable/ToolBar/ColConfigIcon/style.mjs +0 -249
  29. package/dist/node_modules/.store/@ant-design_icons-svg@4.4.2/node_modules/@ant-design/icons-svg/es/asn/CheckCircleOutlined.mjs +0 -5
  30. package/dist/node_modules/.store/@ant-design_icons-svg@4.4.2/node_modules/@ant-design/icons-svg/es/asn/PicRightOutlined.mjs +0 -5
  31. package/dist/node_modules/.store/@ant-design_icons-svg@4.4.2/node_modules/@ant-design/icons-svg/es/asn/RedoOutlined.mjs +0 -5
  32. package/dist/node_modules/.store/@ant-design_icons-svg@4.4.2/node_modules/@ant-design/icons-svg/es/asn/SettingOutlined.mjs +0 -5
  33. package/dist/node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/CheckCircleOutlined.mjs +0 -15
  34. package/dist/node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/PicRightOutlined.mjs +0 -15
  35. package/dist/node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/RedoOutlined.mjs +0 -15
  36. package/dist/node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/SettingOutlined.mjs +0 -15
  37. package/dist/node_modules/.store/@dnd-kit_accessibility@3.1.0/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.mjs +0 -54
  38. package/dist/node_modules/.store/@dnd-kit_core@6.1.0/node_modules/@dnd-kit/core/dist/core.esm.mjs +0 -2179
  39. package/dist/node_modules/.store/@dnd-kit_modifiers@6.0.1/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.mjs +0 -27
  40. package/dist/node_modules/.store/@dnd-kit_sortable@7.0.2/node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs +0 -367
  41. package/dist/node_modules/.store/@dnd-kit_utilities@3.2.2/node_modules/@dnd-kit/utilities/dist/utilities.esm.mjs +0 -235
  42. package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_DataView.mjs +0 -7
  43. package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_Promise.mjs +0 -7
  44. package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_Set.mjs +0 -7
  45. package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_WeakMap.mjs +0 -7
  46. package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_arrayEach.mjs +0 -8
  47. package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_arrayFilter.mjs +0 -10
  48. package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_baseAssign.mjs +0 -8
  49. package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_baseAssignIn.mjs +0 -8
  50. package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_baseClone.mjs +0 -65
  51. package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_baseGetAllKeys.mjs +0 -9
  52. package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_baseIsMap.mjs +0 -9
  53. package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_baseIsSet.mjs +0 -9
  54. package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_baseKeys.mjs +0 -14
  55. package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_baseSlice.mjs +0 -10
  56. package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_baseUnset.mjs +0 -10
  57. package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_cloneDataView.mjs +0 -8
  58. package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_cloneRegExp.mjs +0 -8
  59. package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_cloneSymbol.mjs +0 -8
  60. package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_copySymbols.mjs +0 -8
  61. package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_copySymbolsIn.mjs +0 -8
  62. package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_customOmitClone.mjs +0 -7
  63. package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_getAllKeys.mjs +0 -9
  64. package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_getAllKeysIn.mjs +0 -9
  65. package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_getSymbols.mjs +0 -11
  66. package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_getSymbolsIn.mjs +0 -13
  67. package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_getTag.mjs +0 -29
  68. package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_initCloneArray.mjs +0 -8
  69. package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_initCloneByTag.mjs +0 -42
  70. package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_nativeKeys.mjs +0 -6
  71. package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/_parent.mjs +0 -8
  72. package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/isMap.mjs +0 -8
  73. package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/isSet.mjs +0 -8
  74. package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/keys.mjs +0 -9
  75. package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/last.mjs +0 -7
  76. package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/omit.mjs +0 -24
  77. package/dist/node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/stubArray.mjs +0 -6
@@ -1,100 +0,0 @@
1
- import { j as e } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { create as A, useModal as G, antdModalV5 as I } from "@ebay/nice-modal-react";
3
- import { Modal as J, Typography as P, Card as Q, Segmented as U, Flex as X } from "antd";
4
- import { useState as p, useContext as M, useRef as T, useMemo as Y } from "react";
5
- import { BitzTableContext as Z } from "../../Store/index.mjs";
6
- import z from "../../../BitzButton/index.mjs";
7
- import _ from "../../../BitzTheme/index.mjs";
8
- import $ from "../../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
9
- import ee from "./StylesConfig/index.mjs";
10
- import te from "./ColumnsSort/index.mjs";
11
- import oe from "./ExportConfig/index.mjs";
12
- import { styles as re } from "./style.mjs";
13
- import { BitzConfigContext as se } from "../../../BitzConfigProvider/context.mjs";
14
- import le from "../../../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/CheckCircleOutlined.mjs";
15
- import ne from "../../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/omit.mjs";
16
- const be = A(
17
- ({ title: R, onChange: r, getContainer: N }) => {
18
- const { token: s } = _.useToken(), l = G(), [n, V] = p(1), [w, y] = p(!1);
19
- p(!1);
20
- const {
21
- persistenceType: H,
22
- persistenceKey: g,
23
- onlineChange: a,
24
- setColumnsMap: L,
25
- setSortKeyColumns: E,
26
- stylesStorageType: D,
27
- stylesStorageKey: C,
28
- setTableStylesConfig: m,
29
- onlineStylesConfigChange: c
30
- // clearPersistenceStorage,
31
- } = M(Z), o = M(se).Table, t = T(null), x = T(null), O = async () => {
32
- var S, j, h, b, k, v, B, F, K;
33
- const d = (S = x.current) == null ? void 0 : S.getFormInstance(), f = await (d == null ? void 0 : d.getFieldsValue()), W = ne(f, "stylesScope"), u = {
34
- ...(j = t.current) == null ? void 0 : j.getLeftSortColumns(),
35
- ...(h = t.current) == null ? void 0 : h.getCenterSortColumns(),
36
- ...(b = t.current) == null ? void 0 : b.getRightSortColumns()
37
- }, q = [
38
- ...(k = t.current) == null ? void 0 : k.getLeftSortKeys(),
39
- ...(v = t.current) == null ? void 0 : v.getCenterSortKeys(),
40
- ...(B = t.current) == null ? void 0 : B.getRightSortKeys()
41
- ];
42
- m == null || m(W), (F = o == null ? void 0 : o.setStylesScope) == null || F.call(o, f.stylesScope ? "global" : "current"), L(u), E(q), D === "online" && C && (c == null || c(C, f)), H === "online" && g && (a == null || a(g, u)), r ? (y(!0), (K = r == null ? void 0 : r(u)) == null || K.finally(() => {
43
- y(!1), l.hide();
44
- })) : l.hide();
45
- }, i = Y(() => s.mode === "dark", [s.mode]);
46
- return /* @__PURE__ */ e.jsx(
47
- J,
48
- {
49
- className: $(re(s), "tableConfigModal"),
50
- title: /* @__PURE__ */ e.jsx(P.Title, { style: { fontSize: 16, margin: 0 }, children: R }),
51
- getContainer: N,
52
- ...I(l),
53
- style: {
54
- "--sortCard-bgColor": i ? "#444" : "#f2f2f2",
55
- "--sortCard-titleColor": i ? "#ccc" : "#777",
56
- "--radioCard-bgColor": i ? "#444" : "#F2F2F2",
57
- "--radioCard-bgHoverColor": i ? "#333" : s.colorBgContainer
58
- },
59
- styles: { body: { maxHeight: window.innerHeight - 300 } },
60
- width: 700,
61
- footer: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
62
- /* @__PURE__ */ e.jsx(
63
- z,
64
- {
65
- type: "primary",
66
- icon: /* @__PURE__ */ e.jsx(le, {}),
67
- onClick: O,
68
- loading: w,
69
- children: "保存"
70
- }
71
- ),
72
- /* @__PURE__ */ e.jsx(z, { onClick: () => l.hide(), children: "取消" })
73
- ] }),
74
- children: /* @__PURE__ */ e.jsxs(Q, { className: "container", bordered: !1, children: [
75
- /* @__PURE__ */ e.jsx("div", { className: "segmentedWrapper", children: /* @__PURE__ */ e.jsx(
76
- U,
77
- {
78
- size: "large",
79
- options: [
80
- { label: "外观设置", value: 1 },
81
- { label: "列设置", value: 2 },
82
- { label: "导出设置", value: 3 }
83
- ],
84
- value: n,
85
- onChange: V
86
- }
87
- ) }),
88
- /* @__PURE__ */ e.jsxs(X, { className: "containerBody", children: [
89
- /* @__PURE__ */ e.jsx(ee, { ref: x, display: n === 1 }),
90
- /* @__PURE__ */ e.jsx(te, { ref: t, display: n === 2 }),
91
- /* @__PURE__ */ e.jsx(oe, { display: n === 3 })
92
- ] })
93
- ] })
94
- }
95
- );
96
- }
97
- );
98
- export {
99
- be as default
100
- };
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- export interface DndItemProps {
3
- placement: 'left' | 'center' | 'right';
4
- item: any;
5
- onLeftClick: (key: any, placement: 'left' | 'center' | 'right') => void;
6
- onRightClick: (key: any, placement: 'left' | 'center' | 'right') => void;
7
- onCheckboxChange: (key: any, checked: boolean) => void;
8
- }
9
- declare const _default: React.NamedExoticComponent<DndItemProps>;
10
- export default _default;
@@ -1,103 +0,0 @@
1
- import { j as s } from "../../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import E, { useState as O, useMemo as R } from "react";
3
- import { useSortable as v } from "../../../../../node_modules/.store/@dnd-kit_sortable@7.0.2/node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs";
4
- import { CSS as w } from "../../../../../node_modules/.store/@dnd-kit_utilities@3.2.2/node_modules/@dnd-kit/utilities/dist/utilities.esm.mjs";
5
- import { Flex as f, Checkbox as D, Tooltip as M } from "antd";
6
- import h from "../../../../../node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs";
7
- import i from "../../../../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/PicRightOutlined.mjs";
8
- const g = ({ icon: o, className: r, open: e, title: n, onClick: t }) => /* @__PURE__ */ s.jsx(
9
- M,
10
- {
11
- getTooltipContainer: (l) => l.parentElement,
12
- title: n,
13
- open: e ? !1 : void 0,
14
- children: /* @__PURE__ */ s.jsx(o, { className: r, onClick: t })
15
- }
16
- ), T = ({
17
- item: o,
18
- placement: r,
19
- onLeftClick: e,
20
- onRightClick: n,
21
- onCheckboxChange: t
22
- }) => {
23
- const {
24
- attributes: l,
25
- isDragging: a,
26
- setNodeRef: u,
27
- listeners: x,
28
- transform: p,
29
- transition: j
30
- } = v({
31
- id: o == null ? void 0 : o.key
32
- // disabled: item?.disabled,
33
- }), k = {
34
- transition: j,
35
- transform: w.Transform.toString(p)
36
- }, C = h({
37
- disabledCheckbox: (o == null ? void 0 : o.disabled) || (o == null ? void 0 : o.fixed)
38
- }), b = ({ target: c }) => {
39
- o != null && o.disabled || o != null && o.fixed || t(o.key, c.checked);
40
- }, [N, y] = O(!1), d = (c) => {
41
- y(c);
42
- }, { left: S, right: I } = R(() => r === "left" ? { left: "取消固定", right: "固定在右侧" } : r === "center" ? { left: "固定在左侧", right: "固定在右侧" } : { left: "固定在左侧", right: "取消固定" }, [r]);
43
- return /* @__PURE__ */ s.jsxs(
44
- f,
45
- {
46
- align: "center",
47
- className: h({ draggingSortItem: a }, "sortItem"),
48
- style: k,
49
- ref: u,
50
- onMouseEnter: () => d(!0),
51
- onMouseLeave: () => d(!1),
52
- ...l,
53
- children: [
54
- /* @__PURE__ */ s.jsx(f, { align: "center", className: "dragIcon", ...x, children: /* @__PURE__ */ s.jsx(i, {}) }),
55
- /* @__PURE__ */ s.jsx(
56
- D,
57
- {
58
- checked: o.show,
59
- className: C,
60
- onChange: b,
61
- title: o.title,
62
- children: o.title
63
- }
64
- ),
65
- !(o != null && o.isOperationCol) && /* @__PURE__ */ s.jsxs(
66
- f,
67
- {
68
- style: {
69
- height: "100%",
70
- display: N ? "flex" : "none"
71
- },
72
- className: "operation pointerCursor",
73
- children: [
74
- /* @__PURE__ */ s.jsx(
75
- g,
76
- {
77
- className: "leftOperation",
78
- title: S,
79
- open: a,
80
- icon: i,
81
- onClick: () => e(o.key, r)
82
- }
83
- ),
84
- /* @__PURE__ */ s.jsx(
85
- g,
86
- {
87
- className: "rightOperation",
88
- title: I,
89
- open: a,
90
- icon: i,
91
- onClick: () => n(o.key, r)
92
- }
93
- )
94
- ]
95
- }
96
- )
97
- ]
98
- }
99
- );
100
- }, A = E.memo(T);
101
- export {
102
- A as default
103
- };
@@ -1,13 +0,0 @@
1
- import { FC } from "react";
2
- interface DndListProps {
3
- placement: 'left' | 'center' | 'right';
4
- dataList: any[];
5
- keys: any[];
6
- columnsMap: any;
7
- onLeftClick: (key: any, placement: 'left' | 'center' | 'right') => void;
8
- onRightClick: (key: any, placement: 'left' | 'center' | 'right') => void;
9
- onChange: (newColumnMap: any) => void;
10
- onMoveEnd: (map: any, keys: any[]) => void;
11
- }
12
- declare const DndList: FC<DndListProps>;
13
- export default DndList;
@@ -1,88 +0,0 @@
1
- import { j as m } from "../../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { genColumnKey as C, columnSort as S } from "../../../Store/utils/index.mjs";
3
- import { DndContext as D } from "../../../../../node_modules/.store/@dnd-kit_core@6.1.0/node_modules/@dnd-kit/core/dist/core.esm.mjs";
4
- import { restrictToVerticalAxis as y, restrictToWindowEdges as E } from "../../../../../node_modules/.store/@dnd-kit_modifiers@6.0.1/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.mjs";
5
- import { SortableContext as I, verticalListSortingStrategy as K, arrayMove as A } from "../../../../../node_modules/.store/@dnd-kit_sortable@7.0.2/node_modules/@dnd-kit/sortable/dist/sortable.esm.mjs";
6
- import { Flex as N } from "antd";
7
- import { useMemo as T, useState as F } from "react";
8
- import R from "./DndItem.mjs";
9
- import V from "../../../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/omit.mjs";
10
- const P = ({
11
- placement: u,
12
- dataList: n,
13
- keys: f,
14
- columnsMap: s,
15
- onLeftClick: a,
16
- onRightClick: p,
17
- onChange: h,
18
- onMoveEnd: d
19
- }) => {
20
- const g = T(() => {
21
- const o = [];
22
- return n != null && n.length && (n == null || n.map(
23
- ({ key: r, dataIndex: e, ...i }) => {
24
- const c = C(
25
- r || e,
26
- [r || e].join("-")
27
- ), t = s[c || "null"];
28
- return o.push({
29
- key: c,
30
- ...V(i, ["className"]),
31
- selectable: !1,
32
- disabled: (t == null ? void 0 : t.disabled) === !0,
33
- show: t == null ? void 0 : t.show
34
- }), t;
35
- }
36
- )), o.sort(S(s));
37
- }, [s, n]), [x, l] = F(-1), v = (o) => {
38
- const { active: r } = o;
39
- r && l(r.data.current.sortable.index);
40
- }, b = (o) => {
41
- const { over: r } = o;
42
- if (r) {
43
- const e = r.data.current.sortable.index;
44
- x !== e && (j(x, e), l(-1));
45
- }
46
- }, j = (o, r) => {
47
- const e = {}, i = A(f, o, r);
48
- i.forEach((c, t) => {
49
- e[c] = { ...s[c], order: t };
50
- }), d(e, i);
51
- }, w = (o, r) => {
52
- const e = { ...s };
53
- e[o] = { ...e[o], show: r }, h(
54
- e
55
- /*, newCheckedKeys*/
56
- );
57
- };
58
- return /* @__PURE__ */ m.jsx(
59
- D,
60
- {
61
- modifiers: [y, E],
62
- onDragStart: v,
63
- onDragEnd: b,
64
- onDragCancel: () => l(-1),
65
- children: /* @__PURE__ */ m.jsx(
66
- I,
67
- {
68
- items: f,
69
- strategy: K,
70
- children: /* @__PURE__ */ m.jsx(N, { vertical: !0, className: "sortList", children: g.map((o) => /* @__PURE__ */ m.jsx(
71
- R,
72
- {
73
- item: o,
74
- placement: u,
75
- onLeftClick: a,
76
- onRightClick: p,
77
- onCheckboxChange: w
78
- },
79
- o.key
80
- )) })
81
- }
82
- )
83
- }
84
- );
85
- };
86
- export {
87
- P as default
88
- };
@@ -1,14 +0,0 @@
1
- /// <reference types="react" />
2
- interface ColumnsSortProps {
3
- display: boolean;
4
- }
5
- export interface ColumnsSortImperativeProps {
6
- getLeftSortColumns: () => any;
7
- getLeftSortKeys: () => any;
8
- getCenterSortColumns: () => any;
9
- getCenterSortKeys: () => any;
10
- getRightSortColumns: () => any;
11
- getRightSortKeys: () => any;
12
- }
13
- declare const ColumnsSort: import("react").ForwardRefExoticComponent<ColumnsSortProps & import("react").RefAttributes<ColumnsSortImperativeProps>>;
14
- export default ColumnsSort;
@@ -1,261 +0,0 @@
1
- import { j as i } from "../../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { css as he } from "../../../../../node_modules/.store/@emotion_css@11.11.2/node_modules/@emotion/css/dist/emotion-css.esm.mjs";
3
- import { theme as de, Flex as z, Typography as B, Space as ue, Checkbox as me, Button as fe } from "antd";
4
- import { forwardRef as pe, useMemo as k, useContext as xe, useEffect as F, useState as m, useCallback as ge, useImperativeHandle as Ce } from "react";
5
- import { useImmer as Me } from "../../../../../node_modules/.store/use-immer@0.9.0/node_modules/use-immer/dist/use-immer.module.mjs";
6
- import "../../../index.mjs";
7
- import { columnSort as ye, genColumnKey as ke, updateNestedObject as L } from "../../../Store/utils/index.mjs";
8
- import O from "./DndList.mjs";
9
- import { BitzTableContext as Le } from "../../../Store/index.mjs";
10
- import Ke from "../../../../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/RedoOutlined.mjs";
11
- import Se from "../../../../../node_modules/.store/lodash-es@4.17.21/node_modules/lodash-es/omit.mjs";
12
- const Be = pe(
13
- ({ display: H }, V) => {
14
- const { token: W } = de.useToken(), X = k(() => ({
15
- width: "100%",
16
- ...{ display: H ? "flex" : "none" }
17
- }), [H]), { defaultColumnKeyMap: Y, columns: P, columnsMap: Z, sortKeyColumns: _ } = xe(Le), [a, $] = Me({
18
- columnsMap: {},
19
- sortKeyColumns: []
20
- });
21
- F(() => {
22
- $((e) => {
23
- e.columnsMap = { ...Z }, e.sortKeyColumns = [..._];
24
- });
25
- }, []);
26
- const q = k(() => ((s, t) => s.map(({ key: n, dataIndex: o, children: c, ...l }) => {
27
- var U;
28
- const g = ke(
29
- n || o,
30
- [t == null ? void 0 : t.columnKey, l.index].join("-")
31
- ), r = a.columnsMap[g || "null"] || { show: !0 };
32
- return {
33
- key: g,
34
- ...Se(l, ["className"]),
35
- selectable: !1,
36
- disabled: r.disabled === !0,
37
- disableCheckbox: typeof r.disabled == "boolean" ? r == null ? void 0 : r.disabled : (U = r == null ? void 0 : r.disabled) == null ? void 0 : U.checkbox,
38
- isLeaf: t ? !0 : void 0,
39
- ...r
40
- };
41
- }))(P ?? []).sort(ye(a.columnsMap)), [a.columnsMap, P]);
42
- F(() => {
43
- var n, o;
44
- const e = {}, s = {}, t = {};
45
- for (const c in a.columnsMap)
46
- ((n = a.columnsMap[c]) == null ? void 0 : n.fixed) === "left" ? e[c] = a.columnsMap[c] : ((o = a.columnsMap[c]) == null ? void 0 : o.fixed) === "right" ? s[c] = a.columnsMap[c] : t[c] = a.columnsMap[c];
47
- f(e), p(s), x(t);
48
- }, [a.columnsMap]);
49
- const [K, N] = m([]), [C, S] = m([]), [h, f] = m({}), [j, E] = m([]), [M, w] = m([]), [d, p] = m({}), [b, T] = m([]), [y, R] = m([]), [u, x] = m({});
50
- F(() => {
51
- const e = [], s = [], t = [], n = [], o = [], c = [];
52
- q.forEach((l) => {
53
- l.fixed === "left" ? (e.push(l), s.push(l.key)) : l.fixed === "right" ? (t.push(l), n.push(l.key)) : (o.push(l), c.push(l.key));
54
- }), N(e), S(s), E(t), w(n), T(o), R(c);
55
- }, [q]);
56
- const ee = (e) => {
57
- f(e);
58
- }, te = (e, s) => {
59
- f(e), S(s);
60
- }, se = (e) => {
61
- p(e);
62
- }, oe = (e, s) => {
63
- p(e), w(s);
64
- }, ne = (e) => {
65
- x(e);
66
- }, ce = (e, s) => {
67
- x(e), R(s);
68
- }, G = (e, s, t, n) => {
69
- const o = { ...s[e] };
70
- delete s[e], x({
71
- ...u,
72
- [e]: { ...o, fixed: void 0, order: b.length }
73
- });
74
- const c = t.findIndex((r) => r.key === e), l = t.splice(c, 1)[0];
75
- T([...b, { ...l, fixed: void 0 }]);
76
- const g = n.splice(c, 1);
77
- return R([...y, ...g]), { map: s, list: t, keys: n };
78
- }, J = (e, s, t, n) => {
79
- const o = { ...s[e] };
80
- delete s[e], f({
81
- ...h,
82
- [e]: { ...o, fixed: "left", order: K.length, show: !0 }
83
- });
84
- const c = t.findIndex((r) => r.key === e), l = t.splice(c, 1)[0];
85
- N([...K, { ...l, fixed: "left" }]);
86
- const g = n.splice(c, 1);
87
- return S([...C, ...g]), { map: s, list: t, keys: n };
88
- }, Q = (e, s, t, n) => {
89
- const o = { ...s[e] };
90
- delete s[e], p({
91
- ...d,
92
- [e]: {
93
- ...o,
94
- fixed: "right",
95
- order: j.length,
96
- show: !0
97
- }
98
- });
99
- const c = t.findIndex((r) => r.key === e), l = t.splice(c, 1)[0];
100
- E([...j, { ...l, fixed: "right" }]);
101
- const g = n.splice(c, 1);
102
- return w([...M, ...g]), { map: s, list: t, keys: n };
103
- }, D = (e, s) => {
104
- if (s === "left") {
105
- const { map: t, list: n, keys: o } = G(
106
- e,
107
- h,
108
- K,
109
- C
110
- );
111
- f({ ...t }), N([...n]), S([...o]);
112
- } else if (s === "center") {
113
- const { map: t, list: n, keys: o } = J(
114
- e,
115
- u,
116
- b,
117
- y
118
- );
119
- x({ ...t }), T([...n]), R([...o]);
120
- } else {
121
- const { map: t, list: n, keys: o } = J(
122
- e,
123
- d,
124
- j,
125
- M
126
- );
127
- p({ ...t }), E([...n]), w([...o]);
128
- }
129
- }, A = (e, s) => {
130
- if (s === "left") {
131
- const { map: t, list: n, keys: o } = Q(
132
- e,
133
- h,
134
- K,
135
- C
136
- );
137
- f({ ...t }), N([...n]), S([...o]);
138
- } else if (s === "center") {
139
- const { map: t, list: n, keys: o } = Q(
140
- e,
141
- u,
142
- b,
143
- y
144
- );
145
- x({ ...t }), T([...n]), R([...o]);
146
- } else {
147
- const { map: t, list: n, keys: o } = G(
148
- e,
149
- d,
150
- j,
151
- M
152
- );
153
- p({ ...t }), E([...n]), w([...o]);
154
- }
155
- }, le = ({ target: e }) => {
156
- e.checked ? (f(L(h, "show", !0)), x(L(u, "show", !0)), p(L(d, "show", !0))) : (f(L(h, "show", !1)), x(L(u, "show", !1)), p(L(d, "show", !1)));
157
- }, I = k(() => [...C, ...y, ...M], [C, y, M]), v = k(() => {
158
- var s, t, n;
159
- const e = [];
160
- for (const o in h)
161
- (s = h[o]) != null && s.show && e.push(o);
162
- for (const o in u)
163
- (t = u[o]) != null && t.show && e.push(o);
164
- for (const o in d)
165
- (n = d[o]) != null && n.show && e.push(o);
166
- return e;
167
- }, [h, u, d]), re = k(() => I.length === v.length, [I, v]), ie = k(() => v.length > 0 && v.length < I.length, [v, I]), ae = ge(() => {
168
- $((e) => {
169
- e.columnsMap = { ...Y };
170
- });
171
- }, []);
172
- return Ce(V, () => ({
173
- getLeftSortColumns: () => h,
174
- getLeftSortKeys: () => C,
175
- getCenterSortColumns: () => u,
176
- getCenterSortKeys: () => y,
177
- getRightSortColumns: () => d,
178
- getRightSortKeys: () => M
179
- })), /* @__PURE__ */ i.jsxs(z, { vertical: !0, gap: 16, style: X, children: [
180
- /* @__PURE__ */ i.jsxs("div", { className: "sortContent", children: [
181
- /* @__PURE__ */ i.jsxs(z, { vertical: !0, className: "sortCard", gap: 6, children: [
182
- /* @__PURE__ */ i.jsx(B.Title, { level: 5, className: "title", children: "固定在左侧" }),
183
- /* @__PURE__ */ i.jsx(
184
- O,
185
- {
186
- placement: "left",
187
- dataList: K,
188
- keys: C,
189
- columnsMap: h,
190
- onLeftClick: D,
191
- onRightClick: A,
192
- onChange: ee,
193
- onMoveEnd: te
194
- }
195
- )
196
- ] }),
197
- /* @__PURE__ */ i.jsxs(z, { vertical: !0, className: "sortCard", gap: 6, children: [
198
- /* @__PURE__ */ i.jsx(B.Title, { level: 5, className: "title", children: "不固定" }),
199
- /* @__PURE__ */ i.jsx(
200
- O,
201
- {
202
- placement: "center",
203
- dataList: b,
204
- keys: y,
205
- columnsMap: u,
206
- onLeftClick: D,
207
- onRightClick: A,
208
- onChange: ne,
209
- onMoveEnd: ce
210
- }
211
- )
212
- ] }),
213
- /* @__PURE__ */ i.jsxs(z, { vertical: !0, className: "sortCard", gap: 6, children: [
214
- /* @__PURE__ */ i.jsx(B.Title, { level: 5, className: "title", children: "固定在右侧" }),
215
- /* @__PURE__ */ i.jsx(
216
- O,
217
- {
218
- placement: "right",
219
- dataList: j,
220
- keys: M,
221
- columnsMap: d,
222
- onLeftClick: D,
223
- onRightClick: A,
224
- onChange: se,
225
- onMoveEnd: oe
226
- }
227
- )
228
- ] })
229
- ] }),
230
- /* @__PURE__ */ i.jsxs(ue, { size: 16, className: "scope", children: [
231
- /* @__PURE__ */ i.jsx(
232
- me,
233
- {
234
- indeterminate: ie,
235
- checked: re,
236
- onChange: le,
237
- children: "全选"
238
- }
239
- ),
240
- /* @__PURE__ */ i.jsx(
241
- fe,
242
- {
243
- type: "link",
244
- icon: /* @__PURE__ */ i.jsx(Ke, {}),
245
- size: "small",
246
- onClick: ae,
247
- className: he`
248
- &:hover {
249
- color: ${W.colorPrimary} !important;
250
- }
251
- `,
252
- children: "重置"
253
- }
254
- )
255
- ] })
256
- ] });
257
- }
258
- );
259
- export {
260
- Be as default
261
- };
@@ -1,6 +0,0 @@
1
- import { FC } from "react";
2
- interface ExportConfigProps {
3
- display: boolean;
4
- }
5
- declare const ExportConfig: FC<ExportConfigProps>;
6
- export default ExportConfig;
@@ -1,17 +0,0 @@
1
- import { j as e } from "../../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import r from "../../../../BitzTheme/index.mjs";
3
- import { Flex as s } from "antd";
4
- import { useMemo as m } from "react";
5
- const u = ({
6
- display: o
7
- }) => {
8
- r.useToken();
9
- const t = m(() => ({
10
- width: "100%",
11
- ...{ display: o ? "flex" : "none" }
12
- }), [o]);
13
- return /* @__PURE__ */ e.jsx(s, { style: t, children: "开发中..." });
14
- };
15
- export {
16
- u as default
17
- };
@@ -1,8 +0,0 @@
1
- import { FC, ReactNode } from "react";
2
- interface RadioCardProps {
3
- label: string;
4
- value: any;
5
- children: ReactNode;
6
- }
7
- declare const RadioCard: FC<RadioCardProps>;
8
- export default RadioCard;
@@ -1,13 +0,0 @@
1
- import { j as r } from "../../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { Radio as i, Flex as o, Typography as s } from "antd";
3
- const d = ({
4
- label: e,
5
- value: t,
6
- children: a
7
- }) => /* @__PURE__ */ r.jsx(i, { value: t, children: /* @__PURE__ */ r.jsxs(o, { vertical: !0, align: "center", gap: 8, children: [
8
- a,
9
- /* @__PURE__ */ r.jsx(s.Text, { children: e })
10
- ] }) });
11
- export {
12
- d as default
13
- };
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- import { FormInstance } from 'antd';
3
- interface StylesConfigProps {
4
- display: boolean;
5
- }
6
- export interface StylesConfigImperativeProps {
7
- getFormInstance: () => FormInstance<any>;
8
- }
9
- declare const StylesConfig: import("react").ForwardRefExoticComponent<StylesConfigProps & import("react").RefAttributes<StylesConfigImperativeProps>>;
10
- export default StylesConfig;