bitz-react-admin-ui 2.1.8 → 2.2.0

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 (79) hide show
  1. package/dist/_virtual/dayjs.min.mjs +2 -5
  2. package/dist/_virtual/index.mjs +2 -2
  3. package/dist/_virtual/index2.mjs +2 -2
  4. package/dist/components/BitzCalendar/index.mjs +1 -1
  5. package/dist/components/BitzDayJs/index.mjs +1 -1
  6. package/dist/components/BitzFuiCalendar/BitzFuiCalendarStore.mjs +1 -1
  7. package/dist/components/BitzFuiCalendar/CalendarAgendum.mjs +1 -1
  8. package/dist/components/BitzFuiCalendar/CalendarAgendumItem.mjs +1 -1
  9. package/dist/components/BitzFuiCalendar/CalendarHeadItem.mjs +1 -1
  10. package/dist/components/BitzFuiCalendar/CalendarToolbar.mjs +1 -1
  11. package/dist/components/BitzFuiCalendar/ColumnData.mjs +1 -1
  12. package/dist/components/BitzMeetingTime/BitzMeetingTimeItem.mjs +1 -1
  13. package/dist/components/BitzMeetingTime/index.mjs +1 -1
  14. package/dist/components/BitzTable/ActionBar/ActionBar.mjs +26 -22
  15. package/dist/components/BitzTable/ActionCol/index.d.ts +1 -1
  16. package/dist/components/BitzTable/ActionCol/index.mjs +61 -61
  17. package/dist/components/BitzTable/SelectionBar/Button.d.ts +2 -3
  18. package/dist/components/BitzTable/SelectionBar/Button.mjs +19 -25
  19. package/dist/components/BitzTable/SelectionBar/SelectionBar.mjs +24 -21
  20. package/dist/components/BitzTable/Store/index.d.ts +43 -22
  21. package/dist/components/BitzTable/Store/index.mjs +128 -125
  22. package/dist/components/BitzTable/Store/utils/index.d.ts +4 -5
  23. package/dist/components/BitzTable/Store/utils/index.mjs +31 -31
  24. package/dist/components/BitzTable/SubTable/index.d.ts +21 -0
  25. package/dist/components/BitzTable/SubTable/index.mjs +149 -0
  26. package/dist/components/BitzTable/Table/SortTableContext.d.ts +12 -0
  27. package/dist/components/BitzTable/Table/SortTableContext.mjs +25 -0
  28. package/dist/components/BitzTable/Table/SortableRow.d.ts +7 -0
  29. package/dist/components/BitzTable/Table/SortableRow.mjs +54 -0
  30. package/dist/components/BitzTable/Table/index.d.ts +5 -0
  31. package/dist/components/BitzTable/Table/index.mjs +277 -255
  32. package/dist/components/BitzTable/Table/utils.mjs +17 -16
  33. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.d.ts +1 -0
  34. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +84 -97
  35. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.d.ts +5 -4
  36. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.mjs +66 -60
  37. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndList.mjs +78 -72
  38. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.d.ts +1 -3
  39. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +190 -189
  40. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndItem.d.ts +8 -0
  41. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndItem.mjs +94 -0
  42. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndList.d.ts +10 -0
  43. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndList.mjs +58 -0
  44. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.d.ts +13 -7
  45. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +119 -80
  46. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.d.ts +2 -2
  47. package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +26 -29
  48. package/dist/components/BitzTable/ToolBar/ColConfigIcon/style.d.ts +3 -1
  49. package/dist/components/BitzTable/ToolBar/ColConfigIcon/style.mjs +53 -77
  50. package/dist/components/BitzTable/ToolBar/ExportIcon/AnyDataTotalLabel.d.ts +2 -2
  51. package/dist/components/BitzTable/ToolBar/ExportIcon/ExportModal.d.ts +12 -0
  52. package/dist/components/BitzTable/ToolBar/ExportIcon/ExportModal.mjs +61 -0
  53. package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +50 -59
  54. package/dist/components/BitzTable/ToolBar/FullscreenIcon/index.mjs +27 -32
  55. package/dist/components/BitzTable/ToolBar/Modal/index.d.ts +18 -0
  56. package/dist/components/BitzTable/ToolBar/Modal/index.mjs +50 -0
  57. package/dist/components/BitzTable/ToolBar/Modal/style.d.ts +2 -0
  58. package/dist/components/BitzTable/ToolBar/Modal/style.mjs +58 -0
  59. package/dist/components/BitzTable/ToolBar/RefreshIcon/index.mjs +20 -20
  60. package/dist/components/BitzTable/ToolBar/index.d.ts +12 -11
  61. package/dist/components/BitzTable/index.d.ts +4 -0
  62. package/dist/components/BitzTable/index.mjs +13 -11
  63. package/dist/node_modules/.store/@ant-design_icons-svg@4.4.2/node_modules/@ant-design/icons-svg/es/asn/MenuOutlined.mjs +5 -0
  64. package/dist/node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/MenuOutlined.mjs +15 -0
  65. package/dist/node_modules/.store/@dnd-kit_core@6.1.0/node_modules/@dnd-kit/core/dist/core.esm.mjs +1098 -753
  66. package/dist/node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs +1 -1
  67. package/dist/node_modules/.store/dayjs@1.11.10/node_modules/dayjs/dayjs.min.mjs +292 -292
  68. package/dist/node_modules/.store/dayjs@1.11.10/node_modules/dayjs/locale/zh-cn.mjs +13 -13
  69. package/dist/node_modules/.store/prop-types@15.8.1/node_modules/prop-types/index.mjs +1 -1
  70. package/dist/style.css +1 -1
  71. package/dist/utils/WithFluent.mjs +16 -12
  72. package/dist/utils/findNode.d.ts +2 -2
  73. package/dist/utils/time.mjs +1 -1
  74. package/package.json +1 -1
  75. package/dist/_virtual/dayjs.min2.mjs +0 -4
  76. package/dist/components/BitzTable/Select/index.mjs +0 -11
  77. package/dist/components/BitzTable/Select/style.mjs +0 -66
  78. package/dist/components/BitzTable/ToolBar/ExportIcon/AnyDataTotalLabel.mjs +0 -78
  79. package/dist/components/BitzTable/ToolBar/ExportIcon/styles.mjs +0 -47
@@ -1,10 +1,16 @@
1
- /// <reference types="react" />
2
- interface ExportConfigProps {
3
- display: boolean;
4
- }
5
- export interface ExportConfigImperativeProps {
6
- getExportConfig: () => any[];
1
+ import { ExportConfigProps, ExportResultConfigType } from '@/components/BitzTable/Store';
2
+ import { Ref } from 'react';
3
+ type BooleanConvertType<T extends boolean> = T extends false ? 'config' : 'export';
4
+ export interface ExportConfigImperativeProps<T extends ExportResultConfigType> {
5
+ getExportConfig: () => ExportConfigProps<T>;
7
6
  hasOne: () => boolean;
8
7
  }
9
- declare const _default: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<ExportConfigProps & import("react").RefAttributes<ExportConfigImperativeProps>>>;
8
+ interface ExportConfigComponentProps<T extends boolean> {
9
+ display: boolean;
10
+ parentHeight?: any;
11
+ showSelectRadio: T;
12
+ refInstance: Ref<ExportConfigImperativeProps<BooleanConvertType<T>>>;
13
+ }
14
+ declare function ExportConfig<T extends boolean>({ display, showSelectRadio, parentHeight, refInstance }: ExportConfigComponentProps<T>): import("react/jsx-runtime").JSX.Element;
15
+ declare const _default: import("react").MemoExoticComponent<typeof ExportConfig>;
10
16
  export default _default;
@@ -1,86 +1,125 @@
1
- import { j as t } from "../../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { BitzTableContext as E } from "../../../Store/index.mjs";
3
- import A from "../../../../BitzTheme/index.mjs";
4
- import { Form as i, Flex as c, Checkbox as h, Radio as o, InputNumber as F, Select as I } from "antd";
5
- import { forwardRef as T, useMemo as p, useContext as N, useState as r, useEffect as R, useImperativeHandle as z, memo as B } from "react";
6
- const G = T(
7
- ({ display: u }, f) => {
8
- A.useToken();
9
- const m = p(() => ({
10
- width: "100%",
11
- ...{ display: u ? "flex" : "none" }
12
- }), [u]), n = N(E).exportConfig, [s, g] = r([]), [l, a] = r([]);
13
- R(() => {
14
- g(n.map((e) => e.field)), a(n.filter((e) => e.show).map((e) => e.field));
15
- }, [n]);
16
- const j = p(() => s.length === l.length, [s, l]), C = p(() => l.length > 0 && l.length < s.length, [l, s]), b = (e) => {
17
- a(e.target.checked ? s : []);
18
- }, [v, w] = r("page"), [k, y] = r(1);
19
- return z(f, () => ({
20
- getExportConfig: () => {
21
- const e = [];
22
- return n.forEach((d) => {
23
- let x = !1;
24
- l.includes(d.field) && (x = !0), e.push({ ...d, show: x });
25
- }), e;
26
- },
27
- hasOne: () => l.length > 0
28
- })), /* @__PURE__ */ t.jsxs(
29
- i,
30
- {
31
- style: m,
32
- labelCol: { span: 3 },
33
- labelAlign: "left",
34
- colon: !1,
35
- className: "exportConfigFormContent",
36
- children: [
37
- /* @__PURE__ */ t.jsx(i.Item, { label: "导出字段", className: "exportFields", children: /* @__PURE__ */ t.jsxs(c, { vertical: !0, gap: 8, children: [
38
- /* @__PURE__ */ t.jsx(
39
- h,
1
+ import { j as n } from "../../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
+ import { BitzTableContext as A } from "../../../Store/index.mjs";
3
+ import D from "../../../../BitzTheme/index.mjs";
4
+ import { findParentFirstNodeByClass as L } from "../../../../../utils/findNode.mjs";
5
+ import M from "../../../../../node_modules/.store/ahooks@3.7.11/node_modules/ahooks/es/useSize/index.mjs";
6
+ import { Form as C, Flex as y, Checkbox as O, Radio as c, InputNumber as P, Select as G } from "antd";
7
+ import { memo as $, useRef as q, useMemo as h, useContext as F, useState as f, useEffect as H, useImperativeHandle as J } from "react";
8
+ import Q from "./DndList.mjs";
9
+ function R({
10
+ display: r,
11
+ showSelectRadio: d = !1,
12
+ parentHeight: g,
13
+ refInstance: I
14
+ }) {
15
+ D.useToken();
16
+ const v = q(null), t = M(v), N = h(() => ({
17
+ // display: display ? 'flex' : 'none'
18
+ width: r ? "100%" : 0,
19
+ height: "100%",
20
+ pointerEvents: r ? "auto" : "none",
21
+ opacity: r ? 1 : 0,
22
+ overflow: "hidden",
23
+ ...r ? {} : {
24
+ position: "absolute",
25
+ left: 0,
26
+ right: 0
27
+ }
28
+ }), [r]), T = h(() => typeof g == "number" && (t != null && t.height) ? g - (t == null ? void 0 : t.height) - 20 : "auto", [g, t == null ? void 0 : t.height]), l = F(A).exportConfig, x = F(A).selected, [i, w] = f([]), [a, u] = f([]), [m, b] = f("current"), [k, E] = f("page"), [j, S] = f(1);
29
+ H(() => {
30
+ var e, s;
31
+ u(l.fields), w(l.fields.map((p) => p.field)), b(d && x ? "selectedRows" : l.config.key), E(((e = l.config.info) == null ? void 0 : e.type) ?? "page"), S(((s = l.config.info) == null ? void 0 : s.value) ?? 1);
32
+ }, [l, d, x]);
33
+ const o = h(() => a.filter((e) => e.show).map((e) => e.field), [a]), B = h(() => i.length === o.length, [i, o]), V = h(() => o.length > 0 && o.length < i.length, [o, i]), z = ({ target: e }) => {
34
+ u(a.map((s) => ({ ...s, show: e.checked })));
35
+ }, K = (e, s) => {
36
+ u(e), w(s);
37
+ };
38
+ return J(I, () => ({
39
+ getExportConfig: () => {
40
+ const e = {
41
+ fields: [],
42
+ config: {
43
+ key: m,
44
+ info: void 0
45
+ }
46
+ };
47
+ return a.forEach((s) => {
48
+ let p = !1;
49
+ o.includes(s.field) && (p = !0), e.fields.push({ ...s, show: p });
50
+ }), m === "any" && (e.config.info = {
51
+ type: k,
52
+ value: (j || 0) < 1 ? 1 : j || 1
53
+ }), e;
54
+ },
55
+ hasOne: () => o.length > 0
56
+ })), /* @__PURE__ */ n.jsxs(
57
+ C,
58
+ {
59
+ style: N,
60
+ labelCol: { span: 3 },
61
+ labelAlign: "left",
62
+ colon: !1,
63
+ className: "exportConfigFormContent",
64
+ children: [
65
+ /* @__PURE__ */ n.jsx(C.Item, { label: "导出字段", className: "exportFields", children: /* @__PURE__ */ n.jsxs(y, { vertical: !0, style: { gap: 8, maxHeight: T }, children: [
66
+ /* @__PURE__ */ n.jsx(
67
+ O,
68
+ {
69
+ checked: B,
70
+ indeterminate: V,
71
+ onChange: z,
72
+ style: { alignSelf: "flex-start" },
73
+ children: "全选"
74
+ }
75
+ ),
76
+ /* @__PURE__ */ n.jsx(
77
+ Q,
78
+ {
79
+ dataList: a,
80
+ keys: i,
81
+ onChange: u,
82
+ onMoveEnd: K
83
+ }
84
+ )
85
+ ] }) }),
86
+ /* @__PURE__ */ n.jsx(C.Item, { label: "导出设置", className: "exportTotal", children: /* @__PURE__ */ n.jsx(c.Group, { ref: v, value: m, onChange: ({ target: e }) => b(e.value), children: /* @__PURE__ */ n.jsxs(y, { vertical: !0, gap: 8, align: "flex-start", children: [
87
+ d && x && /* @__PURE__ */ n.jsx(c, { value: "selectedRows", children: /* @__PURE__ */ n.jsx("span", { style: { whiteSpace: "nowrap" }, children: "导出选中数据" }) }),
88
+ /* @__PURE__ */ n.jsx(c, { value: "current", children: /* @__PURE__ */ n.jsx("span", { style: { whiteSpace: "nowrap" }, children: "仅导出当前页" }) }),
89
+ /* @__PURE__ */ n.jsx(c, { value: "any", children: /* @__PURE__ */ n.jsxs(y, { align: "center", gap: 8, children: [
90
+ /* @__PURE__ */ n.jsx("span", { style: { whiteSpace: "nowrap" }, children: "导出" }),
91
+ /* @__PURE__ */ n.jsx(
92
+ P,
40
93
  {
41
- checked: j,
42
- indeterminate: C,
43
- onChange: b,
44
- children: "全选"
94
+ controls: !1,
95
+ min: 1,
96
+ value: j,
97
+ onChange: (e) => S(e),
98
+ style: { width: 120 },
99
+ addonAfter: /* @__PURE__ */ n.jsx(
100
+ G,
101
+ {
102
+ value: k,
103
+ onChange: E,
104
+ options: [
105
+ { label: "页", value: "page" },
106
+ { label: "条", value: "pieces" }
107
+ ],
108
+ onClick: (e) => e.preventDefault(),
109
+ getPopupContainer: (e) => L(e, "containerBody")
110
+ }
111
+ )
45
112
  }
46
113
  ),
47
- /* @__PURE__ */ t.jsx(h.Group, { value: l, onChange: a, children: n.map((e) => /* @__PURE__ */ t.jsx(h, { title: e.title, value: e.field, children: e.title }, e.field)) })
114
+ /* @__PURE__ */ n.jsx("span", { style: { whiteSpace: "nowrap" }, children: "数据" })
48
115
  ] }) }),
49
- /* @__PURE__ */ t.jsx(i.Item, { label: "导出设置", className: "exportTotal", children: /* @__PURE__ */ t.jsx(o.Group, { children: /* @__PURE__ */ t.jsxs(c, { vertical: !0, gap: 8, children: [
50
- /* @__PURE__ */ t.jsx(o, { value: "current", children: "仅导出当前页" }),
51
- /* @__PURE__ */ t.jsx(o, { value: "any", children: /* @__PURE__ */ t.jsxs(c, { align: "center", gap: 8, children: [
52
- /* @__PURE__ */ t.jsx("span", { children: "导出" }),
53
- /* @__PURE__ */ t.jsx(
54
- F,
55
- {
56
- controls: !1,
57
- min: 1,
58
- value: k,
59
- onChange: (e) => y(e),
60
- style: { width: 120 },
61
- addonAfter: /* @__PURE__ */ t.jsx(
62
- I,
63
- {
64
- value: v,
65
- onChange: w,
66
- options: [
67
- { label: "页", value: "page" },
68
- { label: "条", value: "pieces" }
69
- ],
70
- onClick: (e) => e.preventDefault()
71
- }
72
- )
73
- }
74
- ),
75
- /* @__PURE__ */ t.jsx("span", { children: "数据" })
76
- ] }) }),
77
- /* @__PURE__ */ t.jsx(o, { value: "all", children: "导出全部数据" })
78
- ] }) }) })
79
- ]
80
- }
81
- );
82
- }
83
- ), M = B(G);
116
+ /* @__PURE__ */ n.jsx(c, { value: "all", children: /* @__PURE__ */ n.jsx("span", { style: { whiteSpace: "nowrap" }, children: "导出全部数据" }) })
117
+ ] }) }) })
118
+ ]
119
+ }
120
+ );
121
+ }
122
+ const te = $(R);
84
123
  export {
85
- M as default
124
+ te as default
86
125
  };
@@ -1,10 +1,10 @@
1
1
  /// <reference types="react" />
2
2
  import { FormInstance } from 'antd';
3
- interface StylesConfigProps {
3
+ interface StylesConfigComponentProps {
4
4
  display: boolean;
5
5
  }
6
6
  export interface StylesConfigImperativeProps {
7
7
  getFormInstance: () => FormInstance<any>;
8
8
  }
9
- declare const _default: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<StylesConfigProps & import("react").RefAttributes<StylesConfigImperativeProps>>>;
9
+ declare const _default: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<StylesConfigComponentProps & import("react").RefAttributes<StylesConfigImperativeProps>>>;
10
10
  export default _default;
@@ -1,43 +1,40 @@
1
- import { j as e } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
- import { useState as m, useMemo as h, useEffect as j } from "react";
3
- import { Tooltip as E } from "antd";
4
- import b from "./ColumnConfigModal.mjs";
5
- import p from "../style.mjs";
6
- import v from "../../../BitzButton/index.mjs";
7
- import y from "../../../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/SettingOutlined.mjs";
8
- const o = "表格设置", I = (n) => {
9
- const { order: u, show: f = !0, icon: d = /* @__PURE__ */ e.jsx(y, {}) } = n, { toolbarItemClassName: g } = p(), [x, l] = m(!1), [r, c] = m(!1), C = h(() => r ? !1 : void 0, [r]);
10
- return j(() => (document == null || document.addEventListener("fullscreenchange", (s) => {
11
- var t, i, a;
12
- (t = s.target) != null && t.classList.contains("bitzTableBlock") && (c(!!document.fullscreenElement), (a = (i = document.fullscreenElement) == null ? void 0 : i.classList) != null && a.contains("bitzTableBlock") || c(!1));
13
- }), document == null ? void 0 : document.removeEventListener("fullscreenchange", () => {
14
- })), []), f ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
15
- /* @__PURE__ */ e.jsx(
16
- b,
1
+ import { j as t } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
+ import { useContext as x, useState as C, useMemo as d } from "react";
3
+ import { Tooltip as g } from "antd";
4
+ import j from "./ColumnConfigModal.mjs";
5
+ import h from "../style.mjs";
6
+ import p from "../../../BitzButton/index.mjs";
7
+ import { BitzTableContext as y } from "../../Store/index.mjs";
8
+ import B from "../../../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/SettingOutlined.mjs";
9
+ const o = "表格设置", v = (e) => {
10
+ const { order: l, show: i = !0, icon: m = /* @__PURE__ */ t.jsx(B, {}) } = e, { fullscreen: n } = x(y), { toolbarItemClassName: a } = h(), [c, s] = C(!1), f = d(() => n ? !1 : void 0, [n]);
11
+ return i ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
12
+ /* @__PURE__ */ t.jsx(
13
+ j,
17
14
  {
18
- open: x,
15
+ open: c,
19
16
  title: o,
20
- onChange: async (...s) => {
21
- var t;
22
- return (t = n.onChange) == null ? void 0 : t.call(n, ...s);
17
+ onChange: async (...u) => {
18
+ var r;
19
+ return (r = e.onChange) == null ? void 0 : r.call(e, ...u);
23
20
  },
24
- getContainer: C,
25
- close: () => l(!1)
21
+ getContainer: f,
22
+ close: () => s(!1)
26
23
  }
27
24
  ),
28
- /* @__PURE__ */ e.jsx(E, { title: o, open: !1, children: /* @__PURE__ */ e.jsx(
29
- v,
25
+ /* @__PURE__ */ t.jsx(g, { title: o, open: !1, children: /* @__PURE__ */ t.jsx(
26
+ p,
30
27
  {
31
28
  type: "text",
32
- className: g,
33
- onClick: () => l(!0),
34
- icon: d,
35
- style: { order: u },
29
+ className: a,
30
+ onClick: () => s(!0),
31
+ icon: m,
32
+ style: { order: l },
36
33
  children: o
37
34
  }
38
35
  ) })
39
36
  ] }) : null;
40
37
  };
41
38
  export {
42
- I as default
39
+ v as default
43
40
  };
@@ -1,2 +1,4 @@
1
1
  import { BitzGlobalToken } from '@/components/BitzTheme';
2
- export declare const styles: (token: BitzGlobalToken) => string;
2
+ export declare const columnsSortStyles: (token: BitzGlobalToken) => string;
3
+ export declare const appearanceConfigStyles: (token: BitzGlobalToken) => string;
4
+ export declare const exportConfigStyles: (token: BitzGlobalToken) => string;
@@ -2,7 +2,7 @@ import "../../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/
2
2
  import "../../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/hooks/useCacheToken.mjs";
3
3
  import "react";
4
4
  import "../../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/StyleContext.mjs";
5
- import { unit as e } from "../../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/util/index.mjs";
5
+ import { unit as r } from "../../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/util/index.mjs";
6
6
  import "../../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/hooks/useCompatibleInsertionEffect.mjs";
7
7
  import "../../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/hooks/useEffectCleanupRegister.mjs";
8
8
  import "../../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/hooks/useHMR.mjs";
@@ -10,32 +10,8 @@ import "../../../../node_modules/.store/rc-util@5.39.1/node_modules/rc-util/es/w
10
10
  import "../../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/theme/createTheme.mjs";
11
11
  import "../../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/theme/ThemeCache.mjs";
12
12
  import "../../../../node_modules/.store/@ant-design_cssinjs@1.19.1/node_modules/@ant-design/cssinjs/es/transformers/legacyLogicalProperties.mjs";
13
- import { css as r } from "../../../../node_modules/.store/@emotion_css@11.11.2/node_modules/@emotion/css/dist/emotion-css.esm.mjs";
14
- const n = (o) => {
15
- var a, i, t;
16
- return r`
17
- .ant-modal-content {
18
- background-color: ${(a = o.Modal) == null ? void 0 : a.contentBg};
19
-
20
- .ant-modal-header {
21
- font-size: 16px;
22
- font-weight: 700;
23
- background-color: ${(i = o.Modal) == null ? void 0 : i.headerBg};
24
- }
25
-
26
- .ant-modal-body {
27
- overflow: hidden auto;
28
- }
29
-
30
- .ant-modal-footer {
31
- text-align: left;
32
- margin: 0;
33
- padding: 20px;
34
- background-color: ${(t = o.Modal) == null ? void 0 : t.footerBg};
35
- }
36
- }
37
- `;
38
- }, l = (o) => r`
13
+ import { css as i } from "../../../../node_modules/.store/@emotion_css@11.11.2/node_modules/@emotion/css/dist/emotion-css.esm.mjs";
14
+ const m = (o) => i`
39
15
  .sortContent {
40
16
  width: 100%;
41
17
  height: 100%;
@@ -47,8 +23,8 @@ const n = (o) => {
47
23
  width: 100%;
48
24
  height: 100%;
49
25
  background-color: var(--sortCard-bgColor);
50
- border-radius: ${e(o.borderRadius)};
51
- padding: 6px;
26
+ border-radius: ${r(o.borderRadius)};
27
+ padding-inline: 6px;
52
28
  padding-block-end: 10px;
53
29
  box-sizing: border-box;
54
30
 
@@ -56,22 +32,36 @@ const n = (o) => {
56
32
  color: var(--sortCard-titleColor);
57
33
  margin: 0;
58
34
  padding-inline: 8px;
59
- padding-block-start: 4px;
35
+ padding-block-start: 10px;
36
+ background-color: var(--sortCard-bgColor);
37
+ position: sticky;
38
+ top: 0;
39
+ z-index: 10;
60
40
  }
61
41
 
62
42
  .sortList {
63
43
  flex: 1;
64
44
  width: 100%;
65
- /* height: calc(100% - 30px); */
66
45
  /* overflow: hidden auto; */
67
46
  cursor: grab;
68
47
 
69
- &:has(.draggingSortItem) {
48
+ &:has(.sortItemDragging) {
70
49
  cursor: grabbing;
71
50
  }
72
51
 
73
52
  .sortItem {
74
- border-radius: ${e(o.borderRadius)};
53
+ display: grid;
54
+ align-items: center;
55
+ /* 16px是.dragIcon的padding-inline乘以2 */
56
+ --dragIcon-width: calc(16px + ${r(o.fontSize + 4)});
57
+ /* 16px是.operation的padding-inline-end加上margin-left */
58
+ --operation-width: calc(${r(o.fontSize + 4)} * 2 + 16px);
59
+ grid-template-columns: var(--dragIcon-width) calc(100% - var(--dragIcon-width));
60
+ border-radius: ${r(o.borderRadius)};
61
+
62
+ &.showSortItemOperat {
63
+ grid-template-columns: var(--dragIcon-width) calc(100% - var(--dragIcon-width) - var(--operation-width)) var(--operation-width);
64
+ }
75
65
 
76
66
  &:hover {
77
67
  background-color: ${o.colorBgContainer};
@@ -135,7 +125,7 @@ const n = (o) => {
135
125
  }
136
126
  }
137
127
  }
138
- `, d = (o) => r`
128
+ `, u = (o) => i`
139
129
  .stylesConfigFormContent {
140
130
  display: flex;
141
131
  flex-direction: column;
@@ -171,6 +161,7 @@ const n = (o) => {
171
161
  flex: 1;
172
162
  display: flex;
173
163
  align-items: flex-end;
164
+ margin-block: 60px 0;
174
165
  }
175
166
 
176
167
  .ant-radio-wrapper {
@@ -180,7 +171,7 @@ const n = (o) => {
180
171
  font-weight: normal !important;
181
172
  background-color: ${o.colorBgLayout};
182
173
  background-color: var(--radioCard-bgColor);
183
- border-radius: ${e(o.borderRadiusLG)};
174
+ border-radius: ${r(o.borderRadiusLG)};
184
175
  margin-inline-end: 0;
185
176
  box-sizing: border-box;
186
177
  position: relative;
@@ -220,7 +211,7 @@ const n = (o) => {
220
211
  }
221
212
  }
222
213
  }
223
- `, p = (o) => r`
214
+ `, w = (o) => i`
224
215
  .exportConfigFormContent {
225
216
  display: flex;
226
217
  flex-direction: column;
@@ -235,60 +226,45 @@ const n = (o) => {
235
226
  }
236
227
  }
237
228
 
238
- .exportFields .ant-checkbox-group {
229
+ .sortList {
230
+ flex: 1;
231
+ overflow: hidden auto;
239
232
  display: grid;
240
- grid-template-columns: repeat(3, 1fr);
233
+ grid-template-columns: repeat(3, 161px);
241
234
  gap: 8px;
235
+ margin-left: -2px;
242
236
 
243
- .ant-checkbox-wrapper span:last-child {
244
- display: -webkit-box;
245
- -webkit-line-clamp: 1;
246
- -webkit-box-orient: vertical;
247
- overflow: hidden;
248
- text-overflow: ellipsis;
249
- }
250
- }
251
- }
252
- `, v = (o) => r`
253
- &.tableConfigModal {
254
- ${n(o)}
255
-
256
- .pointerCursor {
257
- cursor: pointer;
258
- }
237
+ &:has(.sortItemDragging) {
238
+ cursor: grabbing;
259
239
 
260
- .container {
261
- height: calc(100% - 48px);
262
-
263
- .ant-card-body {
264
- display: flex;
265
- flex-direction: column;
266
- align-items: center;
267
- gap: 24px;
268
-
269
- &::before,
270
- &::after {
271
- content: none;
240
+ .dragIcon {
241
+ cursor: inherit;
272
242
  }
273
243
  }
274
244
 
275
- .segmentedWrapper {
245
+ .ant-checkbox-wrapper {
246
+ width: calc(100% - 8px - ${r(o.fontSize)});
276
247
  }
277
248
 
278
- .containerBody {
279
- width: 100%;
280
- min-height: 450px;
281
- max-height: 100%;
282
-
283
- ${l(o)}
284
-
285
- ${d(o)}
249
+ .ant-checkbox-wrapper > span:last-child {
250
+ padding-right: 0;
251
+ /* display: -webkit-box;
252
+ -webkit-line-clamp: 1;
253
+ -webkit-box-orient: vertical; */
254
+ width: calc(100% - 8px - ${r(o.fontSize)});
255
+ white-space: nowrap;
256
+ overflow: hidden;
257
+ text-overflow: ellipsis;
258
+ }
286
259
 
287
- ${p()}
260
+ .dragIcon {
261
+ cursor: grab;
288
262
  }
289
263
  }
290
264
  }
291
265
  `;
292
266
  export {
293
- v as styles
267
+ u as appearanceConfigStyles,
268
+ m as columnsSortStyles,
269
+ w as exportConfigStyles
294
270
  };
@@ -1,7 +1,7 @@
1
1
  import { FC } from 'react';
2
- import { MenuKeysType } from '..';
2
+ import { ExportResultExprotKeyType } from '../../Store';
3
3
  interface AnyDataTotalLabelProps {
4
- onClick: (key: MenuKeysType, info: {
4
+ onClick: (key: ExportResultExprotKeyType, info: {
5
5
  value: number;
6
6
  type: 'page' | 'pieces';
7
7
  }) => void;
@@ -0,0 +1,12 @@
1
+ import { ModalProps } from 'antd';
2
+ import { FC } from 'react';
3
+ import { ExportConfigProps } from '../../Store';
4
+ export interface ExportModalProps {
5
+ open: boolean;
6
+ close: () => void;
7
+ title: string;
8
+ onExport?: (val: ExportConfigProps<'export'>) => Promise<void>;
9
+ getContainer: ModalProps['getContainer'];
10
+ }
11
+ declare const ExportModal: FC<ExportModalProps>;
12
+ export default ExportModal;
@@ -0,0 +1,61 @@
1
+ import { j as e } from "../../../../node_modules/.store/react@18.2.0/node_modules/react/jsx-runtime.mjs";
2
+ import { message as y } from "antd";
3
+ import { useState as m, useContext as E, useRef as b, useMemo as B } from "react";
4
+ import { BitzTableContext as O } from "../../Store/index.mjs";
5
+ import c from "../../../BitzButton/index.mjs";
6
+ import R from "../../../BitzTheme/index.mjs";
7
+ import T from "../Modal/index.mjs";
8
+ import z from "../ColConfigIcon/ExportConfig/index.mjs";
9
+ import M from "../../../../node_modules/.store/@ant-design_icons@5.3.6/node_modules/@ant-design/icons/es/icons/CheckCircleOutlined.mjs";
10
+ const q = ({
11
+ open: u,
12
+ title: p,
13
+ onExport: s,
14
+ close: o,
15
+ getContainer: d
16
+ }) => {
17
+ const { token: i } = R.useToken(), [x, r] = m(!1), [g, t] = m(!1), { defaultTableExportConfig: h } = E(O), n = b(null), C = async () => {
18
+ var f, l;
19
+ if (g)
20
+ return;
21
+ if (t(!0), !((f = n.current) == null ? void 0 : f.hasOne())) {
22
+ y.error("导出设置至少需要一个字段"), t(!1);
23
+ return;
24
+ }
25
+ const k = ((l = n.current) == null ? void 0 : l.getExportConfig()) ?? h;
26
+ s && (t(!1), r(!0), s(k).finally(() => {
27
+ r(!1), o();
28
+ }));
29
+ };
30
+ B(() => i.mode === "dark", [i.mode]);
31
+ const j = () => {
32
+ r(!1), t(!1);
33
+ };
34
+ return /* @__PURE__ */ e.jsx(
35
+ T,
36
+ {
37
+ open: u,
38
+ title: p,
39
+ close: o,
40
+ closeAfter: j,
41
+ getContainer: d,
42
+ footer: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
43
+ /* @__PURE__ */ e.jsx(
44
+ c,
45
+ {
46
+ type: "primary",
47
+ icon: /* @__PURE__ */ e.jsx(M, {}),
48
+ onClick: C,
49
+ loading: x,
50
+ children: "导出"
51
+ }
52
+ ),
53
+ /* @__PURE__ */ e.jsx(c, { onClick: o, children: "取消" })
54
+ ] }),
55
+ children: (a) => /* @__PURE__ */ e.jsx(z, { parentHeight: a, refInstance: n, display: !0, showSelectRadio: !0 })
56
+ }
57
+ );
58
+ };
59
+ export {
60
+ q as default
61
+ };