@spacego/fe-components 0.1.0 → 0.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.
- package/README.md +37 -37
- package/lib/_virtual/Resizable.js +4 -0
- package/lib/_virtual/ResizableBox.js +4 -0
- package/lib/_virtual/index.js +5 -0
- package/lib/_virtual/index2.js +4 -0
- package/lib/_virtual/index3.js +4 -0
- package/lib/_virtual/index4.js +4 -0
- package/lib/_virtual/propTypes.js +4 -0
- package/lib/_virtual/react-is.development.js +4 -0
- package/lib/_virtual/react-is.production.min.js +4 -0
- package/lib/_virtual/utils.js +4 -0
- package/lib/fe-auto-complete/index.js +6 -0
- package/lib/fe-button/index.js +27 -0
- package/lib/fe-cascader/index.js +19 -0
- package/lib/fe-checkbox/index.js +6 -0
- package/lib/fe-checkbox-group/index.js +6 -0
- package/lib/fe-date-picker/index.js +19 -0
- package/lib/fe-description-render/index.js +43 -0
- package/lib/fe-descriptions/index.js +6 -0
- package/lib/fe-empty/index.js +6 -0
- package/lib/fe-error-block/index.js +6 -0
- package/lib/fe-form/fe-form/index.js +133 -0
- package/lib/fe-form/fe-form-auto-complete/index.js +57 -0
- package/lib/fe-form/fe-form-btn-group/index.js +29 -0
- package/lib/fe-form/fe-form-cascader/index.js +25 -0
- package/lib/fe-form/fe-form-checkbox-group/index.js +21 -0
- package/lib/fe-form/fe-form-date-picker/index.js +75 -0
- package/lib/fe-form/fe-form-date-range-picker/index.js +99 -0
- package/lib/fe-form/fe-form-input/index.js +53 -0
- package/lib/fe-form/fe-form-input-input/index.js +63 -0
- package/lib/fe-form/fe-form-input-number/index.js +43 -0
- package/lib/fe-form/fe-form-item/index.js +46 -0
- package/lib/fe-form/fe-form-label/index.js +20 -0
- package/lib/fe-form/fe-form-radio/index.js +21 -0
- package/lib/fe-form/fe-form-render/index.js +33 -0
- package/lib/fe-form/fe-form-rich-text/index.js +25 -0
- package/lib/fe-form/fe-form-select/index.js +93 -0
- package/lib/fe-form/fe-form-switch/index.js +21 -0
- package/lib/fe-form/fe-form-text/index.js +20 -0
- package/lib/fe-form/fe-form-text-area/index.js +24 -0
- package/lib/fe-form/fe-form-time-picker/index.js +21 -0
- package/lib/fe-form/fe-form-upload/index.js +63 -0
- package/lib/fe-form/utils/index.js +28 -0
- package/lib/fe-input/index.js +32 -0
- package/lib/fe-input-number/index.js +19 -0
- package/lib/fe-layouts/auth-layout/index.js +35 -17
- package/lib/fe-layouts/basics-layout/index.js +2 -2
- package/lib/fe-layouts/layout.js +34 -16
- package/lib/fe-link/index.js +23 -0
- package/lib/fe-map/index.js +263 -0
- package/lib/fe-modal/index.js +85 -0
- package/lib/fe-pagination/index.js +6 -0
- package/lib/fe-panel/fe-panel-toolbar.js +40 -0
- package/lib/fe-panel/index.js +49 -0
- package/lib/fe-panel/use-panel-context.js +9 -0
- package/lib/fe-permission/index.js +12 -0
- package/lib/fe-permission-provider/index.js +29 -0
- package/lib/fe-radio/index.js +11 -0
- package/lib/fe-radio-group/index.js +6 -0
- package/lib/fe-rich-text/index.js +293 -0
- package/lib/fe-select/index.js +24 -0
- package/lib/fe-switch/index.js +6 -0
- package/lib/fe-table/fe-edit-table/index.js +39 -0
- package/lib/fe-table/fe-edit-table-cell/index.js +63 -0
- package/lib/fe-table/fe-head-title/index.js +9 -0
- package/lib/fe-table/fe-normal-table/index.js +192 -0
- package/lib/fe-table/fe-sub-table/index.js +74 -0
- package/lib/fe-table/fe-table/index.js +7 -0
- package/lib/fe-table/fe-table-alert/index.js +42 -0
- package/lib/fe-table/fe-table-link/index.js +87 -0
- package/lib/fe-table/fe-table-render/index.js +56 -0
- package/lib/fe-table/fe-table-setting/index.js +165 -0
- package/lib/fe-table/fe-table-toolbar/index.js +63 -0
- package/lib/fe-table/fe-table-utils/index.js +157 -0
- package/lib/fe-table/type/table.d.js +4 -0
- package/lib/fe-table/use-edit-table/index.js +151 -0
- package/lib/fe-table/use-pagination/index.js +59 -0
- package/lib/fe-table/use-sub-table/index.js +23 -0
- package/lib/fe-table/use-table/index.js +177 -0
- package/lib/fe-table/use-table-columns/index.js +53 -0
- package/lib/fe-table/use-table-form-context/index.js +14 -0
- package/lib/fe-table/use-table-selection/index.js +53 -0
- package/lib/fe-text-area/index.js +21 -0
- package/lib/fe-time-picker/index.js +19 -0
- package/lib/fe-upload/index.js +182 -0
- package/lib/fe-upload/upload.constant.js +91 -0
- package/lib/fe-upload-atomic/index.js +6 -0
- package/lib/fe-upload-crop/index.js +207 -0
- package/lib/hooks/{use-auth.hook.js → use-auth.hook/index.js} +3 -3
- package/lib/hooks/use-form/index.js +38 -0
- package/lib/hooks/use-permission.hook/index.js +9 -0
- package/lib/index.css +7 -1
- package/lib/index.js +161 -42
- package/lib/node_modules/.pnpm/@dnd-kit_accessibility@3.1.1_react@18.3.1/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js +56 -0
- package/lib/node_modules/.pnpm/@dnd-kit_core@6.3.1_nnrd3gsncyragczmpvfhocinkq/node_modules/@dnd-kit/core/dist/core.esm.js +2344 -0
- package/lib/node_modules/.pnpm/@dnd-kit_modifiers@9.0.0_55ztycxty3xzw7t4rzpvix55vq/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.js +13 -0
- package/lib/node_modules/.pnpm/@dnd-kit_sortable@10.0.0_55ztycxty3xzw7t4rzpvix55vq/node_modules/@dnd-kit/sortable/dist/sortable.esm.js +439 -0
- package/lib/node_modules/.pnpm/@dnd-kit_utilities@3.2.2_react@18.3.1/node_modules/@dnd-kit/utilities/dist/utilities.esm.js +235 -0
- package/lib/node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.js +54 -0
- package/lib/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/checkPropTypes.js +54 -0
- package/lib/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithThrowingShims.js +52 -0
- package/lib/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithTypeCheckers.js +329 -0
- package/lib/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js +17 -0
- package/lib/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/ReactPropTypesSecret.js +10 -0
- package/lib/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/has.js +7 -0
- package/lib/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.js +95 -0
- package/lib/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.js +78 -0
- package/lib/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +10 -0
- package/lib/node_modules/.pnpm/react-resizable@3.1.3_nnrd3gsncyragczmpvfhocinkq/node_modules/react-resizable/build/Resizable.js +233 -0
- package/lib/node_modules/.pnpm/react-resizable@3.1.3_nnrd3gsncyragczmpvfhocinkq/node_modules/react-resizable/build/ResizableBox.js +164 -0
- package/lib/node_modules/.pnpm/react-resizable@3.1.3_nnrd3gsncyragczmpvfhocinkq/node_modules/react-resizable/build/propTypes.js +113 -0
- package/lib/node_modules/.pnpm/react-resizable@3.1.3_nnrd3gsncyragczmpvfhocinkq/node_modules/react-resizable/build/utils.js +56 -0
- package/lib/node_modules/.pnpm/react-resizable@3.1.3_nnrd3gsncyragczmpvfhocinkq/node_modules/react-resizable/index.js +12 -0
- package/lib/store/modules/layout-config.store.js +83 -65
- package/lib/store/modules/theme.store.js +36 -18
- package/lib/types/fe-auto-complete/index.d.ts +2 -0
- package/lib/types/fe-button/index.d.ts +16 -0
- package/lib/types/fe-cascader/index.d.ts +7 -0
- package/lib/types/fe-checkbox/index.d.ts +6 -0
- package/lib/types/fe-checkbox-group/index.d.ts +7 -0
- package/lib/types/fe-date-picker/index.d.ts +3 -0
- package/lib/types/fe-description-render/index.d.ts +31 -0
- package/lib/types/fe-descriptions/index.d.ts +2 -0
- package/lib/types/fe-empty/index.d.ts +2 -0
- package/lib/types/fe-error-block/index.d.ts +6 -0
- package/lib/types/fe-form/fe-form/index.d.ts +356 -0
- package/lib/types/fe-form/fe-form-auto-complete/index.d.ts +3 -0
- package/lib/types/fe-form/fe-form-btn-group/index.d.ts +3 -0
- package/lib/types/fe-form/fe-form-cascader/index.d.ts +3 -0
- package/lib/types/fe-form/fe-form-checkbox-group/index.d.ts +3 -0
- package/lib/types/fe-form/fe-form-date-picker/index.d.ts +3 -0
- package/lib/types/fe-form/fe-form-date-range-picker/index.d.ts +3 -0
- package/lib/types/fe-form/fe-form-input/index.d.ts +3 -0
- package/lib/types/fe-form/fe-form-input-input/index.d.ts +3 -0
- package/lib/types/fe-form/fe-form-input-number/index.d.ts +3 -0
- package/lib/types/fe-form/fe-form-item/index.d.ts +70 -0
- package/lib/types/fe-form/fe-form-label/index.d.ts +45 -0
- package/lib/types/fe-form/fe-form-radio/index.d.ts +3 -0
- package/lib/types/fe-form/fe-form-render/index.d.ts +3 -0
- package/lib/types/fe-form/fe-form-rich-text/index.d.ts +3 -0
- package/lib/types/fe-form/fe-form-select/index.d.ts +3 -0
- package/lib/types/fe-form/fe-form-switch/index.d.ts +3 -0
- package/lib/types/fe-form/fe-form-text/index.d.ts +3 -0
- package/lib/types/fe-form/fe-form-text-area/index.d.ts +3 -0
- package/lib/types/fe-form/fe-form-time-picker/index.d.ts +3 -0
- package/lib/types/fe-form/fe-form-upload/index.d.ts +3 -0
- package/lib/types/fe-form/index.d.ts +26 -0
- package/lib/types/fe-form/utils/index.d.ts +24 -0
- package/lib/types/fe-input/index.d.ts +12 -0
- package/lib/types/fe-input-number/index.d.ts +2 -0
- package/lib/types/fe-layouts/context/global-context.d.ts +240 -238
- package/lib/types/fe-link/index.d.ts +6 -0
- package/lib/types/fe-map/index.d.ts +73 -0
- package/lib/types/fe-modal/index.d.ts +20 -0
- package/lib/types/fe-pagination/index.d.ts +2 -0
- package/lib/types/fe-panel/fe-panel-toolbar.d.ts +3 -0
- package/lib/types/fe-panel/index.d.ts +61 -0
- package/lib/types/fe-panel/panel-toolbar.d.ts +4 -0
- package/lib/types/fe-panel/use-panel-context.d.ts +6 -0
- package/lib/types/fe-permission/index.d.ts +10 -0
- package/lib/types/fe-permission-provider/index.d.ts +8 -0
- package/lib/types/fe-radio/index.d.ts +2 -0
- package/lib/types/fe-radio-group/index.d.ts +2 -0
- package/lib/types/fe-rich-text/index.d.ts +167 -0
- package/lib/types/fe-select/index.d.ts +8 -0
- package/lib/types/fe-switch/index.d.ts +2 -0
- package/lib/types/fe-table/fe-edit-table/index.d.ts +3 -0
- package/lib/types/fe-table/fe-edit-table-cell/index.d.ts +16 -0
- package/lib/types/fe-table/fe-head-title/index.d.ts +6 -0
- package/lib/types/fe-table/fe-normal-table/index.d.ts +3 -0
- package/lib/types/fe-table/fe-sub-table/index.d.ts +3 -0
- package/lib/types/fe-table/fe-table/index.d.ts +3 -0
- package/lib/types/fe-table/fe-table-alert/index.d.ts +13 -0
- package/lib/types/fe-table/fe-table-link/index.d.ts +12 -0
- package/lib/types/fe-table/fe-table-render/index.d.ts +13 -0
- package/lib/types/fe-table/fe-table-setting/index.d.ts +22 -0
- package/lib/types/fe-table/fe-table-toolbar/index.d.ts +18 -0
- package/lib/types/fe-table/fe-table-utils/index.d.ts +193 -0
- package/lib/types/fe-table/index.d.ts +6 -0
- package/lib/types/fe-table/type/table-context.d.ts +60 -0
- package/lib/types/fe-table/type/table.d.ts +797 -0
- package/lib/types/fe-table/use-edit-table/index.d.ts +6 -0
- package/lib/types/fe-table/use-pagination/index.d.ts +3 -0
- package/lib/types/fe-table/use-sub-table/index.d.ts +8 -0
- package/lib/types/fe-table/use-table/index.d.ts +3 -0
- package/lib/types/fe-table/use-table-columns/index.d.ts +47 -0
- package/lib/types/fe-table/use-table-form-context/index.d.ts +10 -0
- package/lib/types/fe-table/use-table-selection/index.d.ts +46 -0
- package/lib/types/fe-text-area/index.d.ts +4 -0
- package/lib/types/fe-time-picker/index.d.ts +3 -0
- package/lib/types/fe-upload/index.d.ts +85 -0
- package/lib/types/fe-upload/upload.constant.d.ts +39 -0
- package/lib/types/fe-upload-atomic/index.d.ts +2 -0
- package/lib/types/fe-upload-crop/index.d.ts +10 -0
- package/lib/types/hooks/index.d.ts +1 -0
- package/lib/types/hooks/use-descriptions/index.d.ts +3 -0
- package/lib/types/hooks/use-form/index.d.ts +16 -0
- package/lib/types/hooks/use-permission.hook/index.d.ts +10 -0
- package/lib/types/index.d.ts +32 -0
- package/lib/types/typings/index.d.ts +98 -59
- package/lib/types/typings/shims-axios.d.ts +38 -38
- package/package.json +79 -68
- /package/lib/hooks/{use-nprogress.hook.js → use-nprogress.hook/index.js} +0 -0
- /package/lib/types/hooks/{use-auth.hook.d.ts → use-auth.hook/index.d.ts} +0 -0
- /package/lib/types/hooks/{use-nprogress.hook.d.ts → use-nprogress.hook/index.d.ts} +0 -0
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { jsxs as h, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { Table as V, Empty as W, Space as G } from "antd";
|
|
3
|
+
import J, { useMemo as L, useEffect as E } from "react";
|
|
4
|
+
import { r as Q } from "../../_virtual/index.js";
|
|
5
|
+
import "@ant-design/icons";
|
|
6
|
+
import "../../store/modules/layout-config.store.js";
|
|
7
|
+
import "../../store/modules/theme.store.js";
|
|
8
|
+
import "react-router-dom";
|
|
9
|
+
import "../../fe-layouts/context/context.js";
|
|
10
|
+
import "nprogress";
|
|
11
|
+
import "../../hooks/use-permission.hook/index.js";
|
|
12
|
+
import "@spacego/turbo-utils";
|
|
13
|
+
/* empty css */
|
|
14
|
+
import "lodash-es";
|
|
15
|
+
import "../../fe-form/fe-form-date-range-picker/index.js";
|
|
16
|
+
import "../../fe-rich-text/index.js";
|
|
17
|
+
import "../../fe-text-area/index.js";
|
|
18
|
+
/* empty css */
|
|
19
|
+
/* empty css */
|
|
20
|
+
/* empty css */
|
|
21
|
+
import "@spacego/zustand";
|
|
22
|
+
import "react-icons/fa6";
|
|
23
|
+
import "react-icons/io5";
|
|
24
|
+
import "react-icons/lu";
|
|
25
|
+
import "react-icons/md";
|
|
26
|
+
/* empty css */
|
|
27
|
+
import "../../fe-layouts/basics-layout/index.js";
|
|
28
|
+
/* empty css */
|
|
29
|
+
/* empty css */
|
|
30
|
+
/* empty css */
|
|
31
|
+
import "react-draggable";
|
|
32
|
+
import { usePanelContext as X } from "../../fe-panel/use-panel-context.js";
|
|
33
|
+
/* empty css */
|
|
34
|
+
import Y from "../fe-edit-table-cell/index.js";
|
|
35
|
+
import Z from "../fe-sub-table/index.js";
|
|
36
|
+
import $ from "../fe-table-alert/index.js";
|
|
37
|
+
import ee from "../fe-table-setting/index.js";
|
|
38
|
+
import te from "../use-sub-table/index.js";
|
|
39
|
+
import ne from "../use-table-columns/index.js";
|
|
40
|
+
import oe from "../use-table-selection/index.js";
|
|
41
|
+
import "ahooks";
|
|
42
|
+
const re = (t) => {
|
|
43
|
+
var l, u;
|
|
44
|
+
const { onResize: a, width: s, ...r } = t;
|
|
45
|
+
return s ? /* @__PURE__ */ n(
|
|
46
|
+
Q.Resizable,
|
|
47
|
+
{
|
|
48
|
+
width: s,
|
|
49
|
+
height: 0,
|
|
50
|
+
handle: /* @__PURE__ */ n("span", { className: "react-resizable-handle", onClick: (g) => g.stopPropagation() }),
|
|
51
|
+
onResize: a,
|
|
52
|
+
draggableOpts: { enableUserSelectHack: !1 },
|
|
53
|
+
children: /* @__PURE__ */ n(
|
|
54
|
+
"th",
|
|
55
|
+
{
|
|
56
|
+
...r,
|
|
57
|
+
style: { userSelect: "none", textAlign: ((u = t.style) == null ? void 0 : u.textAlign) ?? "center", ...t.style }
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
}
|
|
61
|
+
) : /* @__PURE__ */ n(
|
|
62
|
+
"th",
|
|
63
|
+
{
|
|
64
|
+
...r,
|
|
65
|
+
style: { userSelect: "none", textAlign: ((l = t.style) == null ? void 0 : l.textAlign) ?? "center", ...t.style }
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
}, Je = (t) => {
|
|
69
|
+
const [a, s] = J.useState([]), {
|
|
70
|
+
headerTitle: r,
|
|
71
|
+
toolBarRender: l,
|
|
72
|
+
options: u,
|
|
73
|
+
search: g,
|
|
74
|
+
cardProps: ie,
|
|
75
|
+
tableAlertRender: P,
|
|
76
|
+
rowSelection: A,
|
|
77
|
+
dataSource: C,
|
|
78
|
+
rowKey: x,
|
|
79
|
+
columnSetting: F,
|
|
80
|
+
columns: w,
|
|
81
|
+
tableKey: I,
|
|
82
|
+
...K
|
|
83
|
+
} = t, {
|
|
84
|
+
processedColumns: c,
|
|
85
|
+
originalColumns: y,
|
|
86
|
+
hiddenColumns: S,
|
|
87
|
+
onColumnsChange: N,
|
|
88
|
+
onColumnVisibilityChange: v,
|
|
89
|
+
columnSettingEnabled: p
|
|
90
|
+
} = ne({
|
|
91
|
+
columns: w,
|
|
92
|
+
columnSetting: F,
|
|
93
|
+
tableKey: I
|
|
94
|
+
}), { renderExtraDom: _ } = X(), { selectedRowKeys: j, selectedRows: k, rowSelection: B, onCleanSelected: H } = oe({
|
|
95
|
+
rowSelection: A,
|
|
96
|
+
dataSource: C,
|
|
97
|
+
rowKey: x
|
|
98
|
+
}), q = (e, i) => {
|
|
99
|
+
const o = [...a.length ? a : c];
|
|
100
|
+
o[e] = {
|
|
101
|
+
...o[e],
|
|
102
|
+
width: i.width
|
|
103
|
+
}, s(o);
|
|
104
|
+
}, D = (a.length ? a : c).map((e, i) => {
|
|
105
|
+
var T;
|
|
106
|
+
const o = {
|
|
107
|
+
...e,
|
|
108
|
+
title: e.titleRender || e.title,
|
|
109
|
+
onHeaderCell: (d) => ({
|
|
110
|
+
width: d.width,
|
|
111
|
+
onResize: (z, { size: b }) => {
|
|
112
|
+
q(i, b);
|
|
113
|
+
}
|
|
114
|
+
})
|
|
115
|
+
}, { editable: m, ...R } = e.editRenderParams || {};
|
|
116
|
+
return m && ((T = R.formProps) != null && T.required && (o.title = () => /* @__PURE__ */ h("div", { children: [
|
|
117
|
+
/* @__PURE__ */ n("span", { style: { color: "#ff4d4f", fontFamily: "SimSun,sans-serif", fontSize: 14, marginInlineEnd: "4px" }, children: "*" }),
|
|
118
|
+
e.title
|
|
119
|
+
] })), o.onCell = (d, z) => {
|
|
120
|
+
const b = typeof m == "function" ? m(d, e.dataIndex) : t.isEditing(d, t.rowKey);
|
|
121
|
+
return {
|
|
122
|
+
...R,
|
|
123
|
+
record: d,
|
|
124
|
+
dataIndex: e.dataIndex,
|
|
125
|
+
label: e.title,
|
|
126
|
+
index: z,
|
|
127
|
+
rowKey: t.rowKey,
|
|
128
|
+
editing: b
|
|
129
|
+
};
|
|
130
|
+
}), o;
|
|
131
|
+
}), { subColumns: f } = te(t.subTableConfig), M = L(() => {
|
|
132
|
+
if (!f.length || t.expandable) return t.expandable;
|
|
133
|
+
const { expandableConfig: e, ...i } = t.subTableConfig;
|
|
134
|
+
return {
|
|
135
|
+
...e ?? {},
|
|
136
|
+
expandedRowRender: (o) => /* @__PURE__ */ n(Z, { columns: f, config: i, record: o })
|
|
137
|
+
};
|
|
138
|
+
}, [f, t.expandable]), O = () => r ? /* @__PURE__ */ n("div", { className: "fe-table-header-title", children: typeof r == "string" ? /* @__PURE__ */ n("h3", { style: { margin: 0, fontSize: 16, fontWeight: 500 }, children: r }) : r }) : null, U = () => {
|
|
139
|
+
const e = typeof l == "function" ? l() : l;
|
|
140
|
+
return e ? /* @__PURE__ */ n("div", { className: "fe-table-toolbar", children: /* @__PURE__ */ n(G, { style: { marginRight: p ? "8px" : 0 }, children: e }) }) : null;
|
|
141
|
+
};
|
|
142
|
+
return E(() => {
|
|
143
|
+
const e = c.map((i) => {
|
|
144
|
+
const o = w.find((m) => m.dataIndex === i.dataIndex);
|
|
145
|
+
return {
|
|
146
|
+
...o,
|
|
147
|
+
width: i.width || o.width
|
|
148
|
+
};
|
|
149
|
+
});
|
|
150
|
+
s(e);
|
|
151
|
+
}, [c]), E(() => {
|
|
152
|
+
p && _(/* @__PURE__ */ n(
|
|
153
|
+
ee,
|
|
154
|
+
{
|
|
155
|
+
columns: y,
|
|
156
|
+
onColumnsChange: N,
|
|
157
|
+
onColumnVisibilityChange: v,
|
|
158
|
+
hiddenColumns: S
|
|
159
|
+
}
|
|
160
|
+
));
|
|
161
|
+
}, [p, y, S]), /* @__PURE__ */ h("div", { className: "fe-table-wrapper", children: [
|
|
162
|
+
(r || l) && /* @__PURE__ */ h("div", { className: "fe-table-header", children: [
|
|
163
|
+
O(),
|
|
164
|
+
U()
|
|
165
|
+
] }),
|
|
166
|
+
/* @__PURE__ */ n(
|
|
167
|
+
$,
|
|
168
|
+
{
|
|
169
|
+
selectedRowKeys: j,
|
|
170
|
+
selectedRows: k,
|
|
171
|
+
onCleanSelected: H,
|
|
172
|
+
tableAlertRender: P
|
|
173
|
+
}
|
|
174
|
+
),
|
|
175
|
+
/* @__PURE__ */ n(
|
|
176
|
+
V,
|
|
177
|
+
{
|
|
178
|
+
...K,
|
|
179
|
+
dataSource: C,
|
|
180
|
+
rowKey: x,
|
|
181
|
+
rowSelection: B,
|
|
182
|
+
components: { header: { cell: re }, body: { cell: Y } },
|
|
183
|
+
columns: D,
|
|
184
|
+
locale: { emptyText: /* @__PURE__ */ n(W, { description: "暂无数据" }) },
|
|
185
|
+
expandable: M
|
|
186
|
+
}
|
|
187
|
+
)
|
|
188
|
+
] });
|
|
189
|
+
};
|
|
190
|
+
export {
|
|
191
|
+
Je as default
|
|
192
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { Table as m } from "antd";
|
|
3
|
+
import * as N from "react";
|
|
4
|
+
import P from "../use-pagination/index.js";
|
|
5
|
+
const K = ({ columns: u, record: r, config: f }) => {
|
|
6
|
+
const {
|
|
7
|
+
rowKey: S = "id",
|
|
8
|
+
pagination: h = !0,
|
|
9
|
+
pageOption: a,
|
|
10
|
+
initDataSource: s,
|
|
11
|
+
fetchModel: p,
|
|
12
|
+
...z
|
|
13
|
+
} = f, d = () => S, g = h !== !1, n = P(async (l) => {
|
|
14
|
+
const e = {
|
|
15
|
+
pageNo: l.pageNo || (a == null ? void 0 : a.pageNo) || 1,
|
|
16
|
+
pageSize: l.pageSize || (a == null ? void 0 : a.pageSize) || 10,
|
|
17
|
+
totalCount: 0,
|
|
18
|
+
totalPage: 1
|
|
19
|
+
};
|
|
20
|
+
let t = [];
|
|
21
|
+
if (s && s.length > 0) {
|
|
22
|
+
if (t = s, e.totalCount = t.length, g) {
|
|
23
|
+
const i = (e.pageNo - 1) * e.pageSize, o = i + e.pageSize;
|
|
24
|
+
t = t.slice(i, o);
|
|
25
|
+
}
|
|
26
|
+
} else if (r.children && Array.isArray(r.children) && r.children.length > 0) {
|
|
27
|
+
if (t = r.children, e.totalCount = t.length, g) {
|
|
28
|
+
const i = (e.pageNo - 1) * e.pageSize, o = i + e.pageSize;
|
|
29
|
+
t = t.slice(i, o);
|
|
30
|
+
}
|
|
31
|
+
} else if (p) {
|
|
32
|
+
const i = g ? e : { ...e, pageSize: 9999 }, o = await p(r, i);
|
|
33
|
+
return t = o.records, e.pageNo = o.pageNo, e.pageSize = o.pageSize, e.totalCount = o.totalCount, e.totalPage = o.totalPage, o;
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
pageNo: e.pageNo,
|
|
37
|
+
pageSize: e.pageSize,
|
|
38
|
+
totalCount: e.totalCount,
|
|
39
|
+
totalPage: e.totalPage,
|
|
40
|
+
records: t
|
|
41
|
+
};
|
|
42
|
+
}, {
|
|
43
|
+
defaultPageSize: (a == null ? void 0 : a.pageSize) || 10,
|
|
44
|
+
defaultCurrent: (a == null ? void 0 : a.pageNo) || 1,
|
|
45
|
+
onError: (l) => {
|
|
46
|
+
console.error("子表格数据加载失败:", l);
|
|
47
|
+
},
|
|
48
|
+
refreshDeps: [r],
|
|
49
|
+
manual: !1
|
|
50
|
+
}), C = N.useMemo(() => g ? {
|
|
51
|
+
current: n.pagination.pageNo,
|
|
52
|
+
pageSize: n.pagination.pageSize,
|
|
53
|
+
total: n.pagination.totalCount,
|
|
54
|
+
size: "small",
|
|
55
|
+
showSizeChanger: !0,
|
|
56
|
+
onChange: n.pagination.onChange
|
|
57
|
+
} : !1, [g, n.pagination]);
|
|
58
|
+
return /* @__PURE__ */ c("div", { className: "fe-sub-table", children: /* @__PURE__ */ c(
|
|
59
|
+
m,
|
|
60
|
+
{
|
|
61
|
+
...z,
|
|
62
|
+
columns: u,
|
|
63
|
+
dataSource: n.data,
|
|
64
|
+
pagination: C,
|
|
65
|
+
rowKey: d(),
|
|
66
|
+
size: "small",
|
|
67
|
+
bordered: !0,
|
|
68
|
+
loading: n.loading
|
|
69
|
+
}
|
|
70
|
+
) });
|
|
71
|
+
};
|
|
72
|
+
export {
|
|
73
|
+
K as default
|
|
74
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Space as i, Button as c } from "antd";
|
|
3
|
+
const u = (o) => {
|
|
4
|
+
const { selectedRowKeys: t, selectedRows: s, onCleanSelected: l, tableAlertRender: n } = o;
|
|
5
|
+
if (!t.length || n === !1)
|
|
6
|
+
return null;
|
|
7
|
+
const a = /* @__PURE__ */ r(
|
|
8
|
+
"div",
|
|
9
|
+
{
|
|
10
|
+
style: {
|
|
11
|
+
display: "flex",
|
|
12
|
+
alignItems: "center",
|
|
13
|
+
justifyContent: "space-between",
|
|
14
|
+
marginBlockEnd: "16px",
|
|
15
|
+
backgroundColor: "rgba(0, 0, 0, 0.02)",
|
|
16
|
+
borderRadius: "6px",
|
|
17
|
+
border: "none",
|
|
18
|
+
padding: "12px 24px"
|
|
19
|
+
},
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ e(i, { children: /* @__PURE__ */ r("span", { style: { color: "#999999" }, children: [
|
|
22
|
+
"已选择 ",
|
|
23
|
+
t.length,
|
|
24
|
+
" 项"
|
|
25
|
+
] }) }),
|
|
26
|
+
/* @__PURE__ */ e(c, { type: "link", size: "small", onClick: l, style: { padding: 0 }, children: "取消选择" })
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
if (typeof n == "function") {
|
|
31
|
+
const d = n({
|
|
32
|
+
selectedRowKeys: t,
|
|
33
|
+
selectedRows: s,
|
|
34
|
+
onCleanSelected: l
|
|
35
|
+
});
|
|
36
|
+
return /* @__PURE__ */ e("div", { className: "fe-table-alert", children: d });
|
|
37
|
+
}
|
|
38
|
+
return /* @__PURE__ */ e("div", { className: "fe-table-alert", children: a });
|
|
39
|
+
};
|
|
40
|
+
export {
|
|
41
|
+
u as default
|
|
42
|
+
};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { jsxs as a, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { DownOutlined as h } from "@ant-design/icons";
|
|
3
|
+
import { Dropdown as l, Tooltip as f } from "antd";
|
|
4
|
+
import "../../store/modules/layout-config.store.js";
|
|
5
|
+
import "../../store/modules/theme.store.js";
|
|
6
|
+
import "react-router-dom";
|
|
7
|
+
import "react";
|
|
8
|
+
import "../../fe-layouts/context/context.js";
|
|
9
|
+
import "nprogress";
|
|
10
|
+
import "../../hooks/use-permission.hook/index.js";
|
|
11
|
+
import "@spacego/turbo-utils";
|
|
12
|
+
import d from "../../fe-link/index.js";
|
|
13
|
+
import "lodash-es";
|
|
14
|
+
import "../../fe-form/fe-form-date-range-picker/index.js";
|
|
15
|
+
import "../../fe-rich-text/index.js";
|
|
16
|
+
import "../../fe-text-area/index.js";
|
|
17
|
+
/* empty css */
|
|
18
|
+
/* empty css */
|
|
19
|
+
/* empty css */
|
|
20
|
+
import "@spacego/zustand";
|
|
21
|
+
import "react-icons/fa6";
|
|
22
|
+
import "react-icons/io5";
|
|
23
|
+
import "react-icons/lu";
|
|
24
|
+
import "react-icons/md";
|
|
25
|
+
/* empty css */
|
|
26
|
+
import "../../fe-layouts/basics-layout/index.js";
|
|
27
|
+
/* empty css */
|
|
28
|
+
/* empty css */
|
|
29
|
+
/* empty css */
|
|
30
|
+
import "react-draggable";
|
|
31
|
+
import "../../fe-panel/use-panel-context.js";
|
|
32
|
+
/* empty css */
|
|
33
|
+
import "../../_virtual/index.js";
|
|
34
|
+
import "../fe-edit-table-cell/index.js";
|
|
35
|
+
import "ahooks";
|
|
36
|
+
import "../fe-table-setting/index.js";
|
|
37
|
+
const Y = (o) => {
|
|
38
|
+
const c = (i) => {
|
|
39
|
+
var e;
|
|
40
|
+
const n = () => {
|
|
41
|
+
var s;
|
|
42
|
+
(s = o.modal) == null || s.confirm({
|
|
43
|
+
title: "提示",
|
|
44
|
+
content: typeof i.confirmText == "function" ? i.confirmText(i.record) : i.confirmText ?? `确定${i.label}吗?`,
|
|
45
|
+
onOk: () => {
|
|
46
|
+
i.onClick(i.record, i.index);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}, r = (e = i.disabled) == null ? void 0 : e.call(i, i == null ? void 0 : i.record, i == null ? void 0 : i.index), m = /* @__PURE__ */ t(d, { style: { width: "100%", display: "inline-block" }, onClick: n, disabled: r, children: i.label });
|
|
50
|
+
return r ? /* @__PURE__ */ t(f, { title: i.disabledText ?? "该功能已被禁用", children: /* @__PURE__ */ t(d, { style: { width: "100%", display: "inline-block" }, disabled: r, children: i.label }) }) : m;
|
|
51
|
+
}, p = (i) => {
|
|
52
|
+
var m;
|
|
53
|
+
const n = (m = i.disabled) == null ? void 0 : m.call(i, i == null ? void 0 : i.record, i == null ? void 0 : i.index), r = /* @__PURE__ */ t(
|
|
54
|
+
d,
|
|
55
|
+
{
|
|
56
|
+
style: { width: "100%", display: "inline-block" },
|
|
57
|
+
onClick: () => {
|
|
58
|
+
n || i.onClick(i.record, i.index);
|
|
59
|
+
},
|
|
60
|
+
disabled: n,
|
|
61
|
+
children: i.label
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
return n ? /* @__PURE__ */ t(f, { title: i.disabledText ?? "该功能已被禁用", children: r }) : r;
|
|
65
|
+
};
|
|
66
|
+
return /* @__PURE__ */ a("div", { style: { display: "flex", justifyContent: "center", alignItems: "center", gap: "8px" }, children: [
|
|
67
|
+
o.config.slice(0, o.config.length > 3 ? 2 : o.config.length).map((i, n) => /* @__PURE__ */ t("div", { children: i.needConfirm ? c(i) : p(i) }, n)),
|
|
68
|
+
(o.config && o.config.length) > 3 && /* @__PURE__ */ t(
|
|
69
|
+
l,
|
|
70
|
+
{
|
|
71
|
+
menu: {
|
|
72
|
+
items: o.config.slice(2, o.config.length).map((i) => ({
|
|
73
|
+
key: i.label,
|
|
74
|
+
label: i.needConfirm ? c(i) : p(i)
|
|
75
|
+
}))
|
|
76
|
+
},
|
|
77
|
+
children: /* @__PURE__ */ t("div", { children: /* @__PURE__ */ a(d, { children: [
|
|
78
|
+
/* @__PURE__ */ t("span", { children: "更多" }),
|
|
79
|
+
/* @__PURE__ */ t(h, { style: { width: "10px", height: "10px", marginLeft: "2px" } })
|
|
80
|
+
] }) })
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
] });
|
|
84
|
+
};
|
|
85
|
+
export {
|
|
86
|
+
Y as default
|
|
87
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { jsxs as x, Fragment as p, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { isNumber as T, thousands as N } from "@spacego/turbo-utils";
|
|
3
|
+
import { Tag as W, Tooltip as R } from "antd";
|
|
4
|
+
import { toNumber as S } from "lodash-es";
|
|
5
|
+
const V = ({
|
|
6
|
+
value: o,
|
|
7
|
+
width: f,
|
|
8
|
+
record: h,
|
|
9
|
+
column: u,
|
|
10
|
+
renderType: c,
|
|
11
|
+
renderParams: t,
|
|
12
|
+
tagRenderParams: s,
|
|
13
|
+
thousandsParams: b
|
|
14
|
+
}) => {
|
|
15
|
+
const w = {
|
|
16
|
+
overflow: "hidden",
|
|
17
|
+
textOverflow: "ellipsis",
|
|
18
|
+
wordBreak: "break-all",
|
|
19
|
+
display: "-webkit-box",
|
|
20
|
+
WebkitBoxOrient: "vertical",
|
|
21
|
+
WebkitLineClamp: (t == null ? void 0 : t.maxLines) || 1,
|
|
22
|
+
whiteSpace: "break-spaces"
|
|
23
|
+
}, m = {
|
|
24
|
+
overflowWrap: "break-word",
|
|
25
|
+
wordWrap: "break-word",
|
|
26
|
+
wordBreak: "break-word",
|
|
27
|
+
whiteSpace: "normal"
|
|
28
|
+
}, D = () => /* @__PURE__ */ i(R, { title: o, children: /* @__PURE__ */ i(
|
|
29
|
+
"div",
|
|
30
|
+
{
|
|
31
|
+
style: {
|
|
32
|
+
...(t == null ? void 0 : t.ellipsis) === !0 ? w : m
|
|
33
|
+
},
|
|
34
|
+
children: o
|
|
35
|
+
}
|
|
36
|
+
) });
|
|
37
|
+
return /* @__PURE__ */ x(p, { children: [
|
|
38
|
+
c === "default" && /* @__PURE__ */ i(() => t != null && t.tooltip ? /* @__PURE__ */ i(D, {}) : /* @__PURE__ */ i(p, { children: o }), {}),
|
|
39
|
+
c === "tag" && /* @__PURE__ */ i(() => o.length ? /* @__PURE__ */ i("div", { children: o.map((e, l) => {
|
|
40
|
+
var n;
|
|
41
|
+
return /* @__PURE__ */ i(W, { color: ((n = s == null ? void 0 : s.themeEnums) == null ? void 0 : n[h[u.dataIndex]]) ?? "processing", children: e }, l);
|
|
42
|
+
}) }) : /* @__PURE__ */ i("div", { style: { minWidth: f }, children: "-" }), {}),
|
|
43
|
+
c === "thousands" && /* @__PURE__ */ i(() => {
|
|
44
|
+
const { precision: e, fillZero: l = !1, separator: n = "," } = b ?? {}, d = S(o);
|
|
45
|
+
if (Number.isNaN(d))
|
|
46
|
+
return /* @__PURE__ */ i("div", { children: "-" });
|
|
47
|
+
let r;
|
|
48
|
+
l === !1 && e == null ? r = T(o) ? o.countDecimals() : d.countDecimals() : r = e ?? 2;
|
|
49
|
+
const k = o != null && o !== "" ? N(o, r, l, n) : "-";
|
|
50
|
+
return /* @__PURE__ */ i("div", { children: k });
|
|
51
|
+
}, {})
|
|
52
|
+
] });
|
|
53
|
+
};
|
|
54
|
+
export {
|
|
55
|
+
V as default
|
|
56
|
+
};
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { jsxs as S, jsx as t, Fragment as k } from "react/jsx-runtime";
|
|
2
|
+
import { SettingOutlined as B, DragOutlined as O } from "@ant-design/icons";
|
|
3
|
+
import { useSensors as T, useSensor as y, DndContext as j, closestCenter as z, KeyboardSensor as E, PointerSensor as F } from "../../node_modules/.pnpm/@dnd-kit_core@6.3.1_nnrd3gsncyragczmpvfhocinkq/node_modules/@dnd-kit/core/dist/core.esm.js";
|
|
4
|
+
import { restrictToVerticalAxis as K } from "../../node_modules/.pnpm/@dnd-kit_modifiers@9.0.0_55ztycxty3xzw7t4rzpvix55vq/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.js";
|
|
5
|
+
import { SortableContext as M, verticalListSortingStrategy as N, arrayMove as $, sortableKeyboardCoordinates as A, useSortable as G } from "../../node_modules/.pnpm/@dnd-kit_sortable@10.0.0_55ztycxty3xzw7t4rzpvix55vq/node_modules/@dnd-kit/sortable/dist/sortable.esm.js";
|
|
6
|
+
import { Typography as H, Dropdown as L, Button as P, Checkbox as V } from "antd";
|
|
7
|
+
import { useState as Y, useMemo as q } from "react";
|
|
8
|
+
const { Text: C } = H, J = ({ id: g, column: o, checked: i, onChange: s }) => {
|
|
9
|
+
const { attributes: p, listeners: m, setNodeRef: h, transform: l, transition: d, isDragging: n } = G({ id: g }), b = {
|
|
10
|
+
transform: l ? `translate3d(${l.x}px, ${l.y}px, 0)` : void 0,
|
|
11
|
+
transition: d,
|
|
12
|
+
opacity: n ? 0.5 : 1,
|
|
13
|
+
zIndex: n ? 1e3 : "auto"
|
|
14
|
+
};
|
|
15
|
+
return /* @__PURE__ */ t(
|
|
16
|
+
"div",
|
|
17
|
+
{
|
|
18
|
+
ref: h,
|
|
19
|
+
style: {
|
|
20
|
+
...b,
|
|
21
|
+
willChange: n ? "transform" : "auto"
|
|
22
|
+
},
|
|
23
|
+
className: "fe-table-setting-item",
|
|
24
|
+
...p,
|
|
25
|
+
children: /* @__PURE__ */ S(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
style: {
|
|
29
|
+
display: "flex",
|
|
30
|
+
alignItems: "center",
|
|
31
|
+
padding: "8px 12px",
|
|
32
|
+
border: n ? "1px solid #1890ff" : "1px solid #f0f0f0",
|
|
33
|
+
borderRadius: "4px",
|
|
34
|
+
marginBottom: "2px",
|
|
35
|
+
backgroundColor: n ? "#f6ffed" : "#fff",
|
|
36
|
+
cursor: n ? "grabbing" : "grab",
|
|
37
|
+
boxShadow: n ? "0 4px 12px rgba(0, 0, 0, 0.15)" : "none",
|
|
38
|
+
transition: "all 0.2s ease"
|
|
39
|
+
},
|
|
40
|
+
children: [
|
|
41
|
+
/* @__PURE__ */ t(
|
|
42
|
+
O,
|
|
43
|
+
{
|
|
44
|
+
style: {
|
|
45
|
+
color: "#999",
|
|
46
|
+
marginRight: "8px",
|
|
47
|
+
cursor: "grab"
|
|
48
|
+
},
|
|
49
|
+
...m
|
|
50
|
+
}
|
|
51
|
+
),
|
|
52
|
+
/* @__PURE__ */ t(
|
|
53
|
+
V,
|
|
54
|
+
{
|
|
55
|
+
checked: i,
|
|
56
|
+
onChange: (u) => s(u.target.checked, o.dataIndex),
|
|
57
|
+
style: { marginRight: "8px" }
|
|
58
|
+
}
|
|
59
|
+
),
|
|
60
|
+
/* @__PURE__ */ t(C, { style: { flex: 1, userSelect: "none" }, children: /* @__PURE__ */ t(k, { children: typeof o.title == "string" ? o.title : o.dataIndex }) })
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
}, te = (g) => {
|
|
67
|
+
const { columns: o, onColumnsChange: i, onColumnVisibilityChange: s, hiddenColumns: p = [], style: m } = g, [h, l] = Y(!1), d = q(() => o.filter((e) => e.dataIndex && e.dataIndex !== "handle" && e.dataIndex !== "index" && !e.hideInSetting), [o]), n = T(
|
|
68
|
+
y(F),
|
|
69
|
+
y(E, {
|
|
70
|
+
coordinateGetter: A
|
|
71
|
+
})
|
|
72
|
+
), b = (e) => {
|
|
73
|
+
const { active: x, over: a } = e;
|
|
74
|
+
if (x.id !== (a == null ? void 0 : a.id)) {
|
|
75
|
+
const v = d.findIndex((r) => r.dataIndex === x.id), D = d.findIndex((r) => r.dataIndex === (a == null ? void 0 : a.id)), R = $(d, v, D), c = [...o];
|
|
76
|
+
let I = 0;
|
|
77
|
+
for (let r = 0; r < c.length; r++) {
|
|
78
|
+
const f = c[r];
|
|
79
|
+
f.dataIndex && f.dataIndex !== "handle" && f.dataIndex !== "index" && !f.hideInSetting && (c[r] = R[I], I++);
|
|
80
|
+
}
|
|
81
|
+
i == null || i(c);
|
|
82
|
+
}
|
|
83
|
+
}, u = (e, x) => {
|
|
84
|
+
s == null || s(x, e);
|
|
85
|
+
}, w = /* @__PURE__ */ S(
|
|
86
|
+
"div",
|
|
87
|
+
{
|
|
88
|
+
style: {
|
|
89
|
+
width: 280,
|
|
90
|
+
padding: "12px",
|
|
91
|
+
backgroundColor: "#fff",
|
|
92
|
+
borderRadius: "8px",
|
|
93
|
+
boxShadow: "0 6px 16px 0 rgba(0, 0, 0, 0.08)",
|
|
94
|
+
border: "1px solid #f0f0f0"
|
|
95
|
+
},
|
|
96
|
+
children: [
|
|
97
|
+
/* @__PURE__ */ t(
|
|
98
|
+
"div",
|
|
99
|
+
{
|
|
100
|
+
style: {
|
|
101
|
+
marginBottom: "12px",
|
|
102
|
+
paddingBottom: "8px",
|
|
103
|
+
borderBottom: "1px solid #f0f0f0"
|
|
104
|
+
},
|
|
105
|
+
children: /* @__PURE__ */ t(C, { strong: !0, children: "列设置" })
|
|
106
|
+
}
|
|
107
|
+
),
|
|
108
|
+
/* @__PURE__ */ t(
|
|
109
|
+
j,
|
|
110
|
+
{
|
|
111
|
+
sensors: n,
|
|
112
|
+
collisionDetection: z,
|
|
113
|
+
onDragEnd: b,
|
|
114
|
+
modifiers: [K],
|
|
115
|
+
children: /* @__PURE__ */ t(
|
|
116
|
+
M,
|
|
117
|
+
{
|
|
118
|
+
items: d.map((e) => e.dataIndex),
|
|
119
|
+
strategy: N,
|
|
120
|
+
children: /* @__PURE__ */ t("div", { style: { maxHeight: "330px", overflowY: "auto" }, children: d.map((e) => /* @__PURE__ */ t(
|
|
121
|
+
J,
|
|
122
|
+
{
|
|
123
|
+
id: e.dataIndex,
|
|
124
|
+
column: e,
|
|
125
|
+
checked: !p.includes(e.dataIndex),
|
|
126
|
+
onChange: u
|
|
127
|
+
},
|
|
128
|
+
e.dataIndex
|
|
129
|
+
)) })
|
|
130
|
+
}
|
|
131
|
+
)
|
|
132
|
+
}
|
|
133
|
+
)
|
|
134
|
+
]
|
|
135
|
+
}
|
|
136
|
+
);
|
|
137
|
+
return /* @__PURE__ */ t(
|
|
138
|
+
L,
|
|
139
|
+
{
|
|
140
|
+
open: h,
|
|
141
|
+
onOpenChange: l,
|
|
142
|
+
trigger: ["click"],
|
|
143
|
+
placement: "bottomRight",
|
|
144
|
+
dropdownRender: () => w,
|
|
145
|
+
children: /* @__PURE__ */ t(
|
|
146
|
+
P,
|
|
147
|
+
{
|
|
148
|
+
type: "text",
|
|
149
|
+
icon: /* @__PURE__ */ t(B, {}),
|
|
150
|
+
size: "small",
|
|
151
|
+
style: {
|
|
152
|
+
color: "#666",
|
|
153
|
+
border: "none",
|
|
154
|
+
boxShadow: "none",
|
|
155
|
+
...m
|
|
156
|
+
},
|
|
157
|
+
title: "列设置"
|
|
158
|
+
}
|
|
159
|
+
)
|
|
160
|
+
}
|
|
161
|
+
);
|
|
162
|
+
};
|
|
163
|
+
export {
|
|
164
|
+
te as default
|
|
165
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { jsx as e, Fragment as s } from "react/jsx-runtime";
|
|
2
|
+
import { Tooltip as b } from "antd";
|
|
3
|
+
import "@ant-design/icons";
|
|
4
|
+
import "../../store/modules/layout-config.store.js";
|
|
5
|
+
import "../../store/modules/theme.store.js";
|
|
6
|
+
import "react-router-dom";
|
|
7
|
+
import "react";
|
|
8
|
+
import "../../fe-layouts/context/context.js";
|
|
9
|
+
import "nprogress";
|
|
10
|
+
import "../../hooks/use-permission.hook/index.js";
|
|
11
|
+
import a from "../../fe-button/index.js";
|
|
12
|
+
import "@spacego/turbo-utils";
|
|
13
|
+
/* empty css */
|
|
14
|
+
import "lodash-es";
|
|
15
|
+
import "../../fe-form/fe-form-date-range-picker/index.js";
|
|
16
|
+
import "../../fe-rich-text/index.js";
|
|
17
|
+
import "../../fe-text-area/index.js";
|
|
18
|
+
/* empty css */
|
|
19
|
+
/* empty css */
|
|
20
|
+
/* empty css */
|
|
21
|
+
import "@spacego/zustand";
|
|
22
|
+
import "react-icons/fa6";
|
|
23
|
+
import "react-icons/io5";
|
|
24
|
+
import "react-icons/lu";
|
|
25
|
+
import "react-icons/md";
|
|
26
|
+
/* empty css */
|
|
27
|
+
import "../../fe-layouts/basics-layout/index.js";
|
|
28
|
+
/* empty css */
|
|
29
|
+
/* empty css */
|
|
30
|
+
/* empty css */
|
|
31
|
+
import "react-draggable";
|
|
32
|
+
import "../../fe-panel/use-panel-context.js";
|
|
33
|
+
/* empty css */
|
|
34
|
+
import "../../_virtual/index.js";
|
|
35
|
+
import "../fe-edit-table-cell/index.js";
|
|
36
|
+
import "ahooks";
|
|
37
|
+
import "../fe-table-setting/index.js";
|
|
38
|
+
const Z = (i) => {
|
|
39
|
+
const p = (r, t) => {
|
|
40
|
+
var m;
|
|
41
|
+
return /* @__PURE__ */ e(a, { type: t.type ?? "primary", onClick: t.onClick, disabled: (m = t.disabled) == null ? void 0 : m.call(t), children: t.label }, r);
|
|
42
|
+
}, d = (r, t) => {
|
|
43
|
+
var o;
|
|
44
|
+
const m = () => {
|
|
45
|
+
var l;
|
|
46
|
+
(l = i == null ? void 0 : i.modal) == null || l.confirm({
|
|
47
|
+
title: "提示",
|
|
48
|
+
content: t.confirmText ?? `确定${t.label}吗?`,
|
|
49
|
+
onOk: () => {
|
|
50
|
+
t.onClick();
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
return /* @__PURE__ */ e(a, { type: t.type ?? "primary", disabled: (o = t.disabled) == null ? void 0 : o.call(t), onClick: m, children: t.label }, r);
|
|
55
|
+
};
|
|
56
|
+
return i.config.filter((r) => !r.btnPermission || (i.btnPermissionList || []).includes(r.btnPermission ?? "")).map((r, t) => {
|
|
57
|
+
var m;
|
|
58
|
+
return /* @__PURE__ */ e(s, { children: (m = r.disabled) != null && m.call(r) ? /* @__PURE__ */ e(b, { title: r.disabledText ?? "该功能已被禁用", children: p(t, r) }) : r != null && r.needConfirm ? d(t, r) : p(t, r) });
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
export {
|
|
62
|
+
Z as default
|
|
63
|
+
};
|