@zat-design/sisyphus-react 4.5.9 → 4.5.10-beta.2
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/dist/index.esm.css +1 -1
- package/dist/less.esm.css +1 -1
- package/es/FormsProvider/index.js +14 -21
- package/es/ProAction/components/CheckModalContent/index.js +12 -26
- package/es/ProAction/index.js +79 -83
- package/es/ProAction/propsType.js +0 -1
- package/es/ProConfigProvider/index.js +63 -110
- package/es/ProConfigProvider/propsType.js +0 -1
- package/es/ProDownload/index.d.ts +2 -1
- package/es/ProDownload/index.js +74 -69
- package/es/ProDownload/propsType.js +0 -1
- package/es/ProDownload/utils.d.ts +10 -5
- package/es/ProDownload/utils.js +63 -95
- package/es/ProDrawerForm/components/ProDrawer/index.js +83 -113
- package/es/ProDrawerForm/components/ProModal/index.js +77 -108
- package/es/ProDrawerForm/components/index.js +6 -2
- package/es/ProDrawerForm/hooks/useConfirmClose.js +20 -39
- package/es/ProDrawerForm/index.js +29 -38
- package/es/ProDrawerForm/propsType.js +0 -1
- package/es/ProDrawerForm/utils/index.js +18 -36
- package/es/ProEditLabel/components/RenderProForm.js +45 -49
- package/es/ProEditLabel/index.js +126 -163
- package/es/ProEditLabel/propsType.js +0 -1
- package/es/ProEditLabel/utils/index.js +5 -8
- package/es/ProEditTable/components/ActionButton/index.js +111 -119
- package/es/ProEditTable/components/RcTable/BaseTable.js +38 -51
- package/es/ProEditTable/components/RcTable/DraggableTable.js +97 -129
- package/es/ProEditTable/components/RcTable/index.js +6 -4
- package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +77 -95
- package/es/ProEditTable/components/RenderField/index.js +490 -587
- package/es/ProEditTable/components/RenderField/propsType.js +0 -1
- package/es/ProEditTable/components/RenderField/tools.js +115 -112
- package/es/ProEditTable/components/RenderToolbar/index.js +47 -73
- package/es/ProEditTable/components/Summary/index.js +38 -64
- package/es/ProEditTable/components/Validator/index.js +46 -46
- package/es/ProEditTable/components/index.js +12 -5
- package/es/ProEditTable/index.js +456 -378
- package/es/ProEditTable/propsType.js +0 -1
- package/es/ProEditTable/utils/config.js +60 -122
- package/es/ProEditTable/utils/diffOriginal.js +45 -82
- package/es/ProEditTable/utils/getDefaultProps.js +19 -24
- package/es/ProEditTable/utils/index.js +154 -235
- package/es/ProEditTable/utils/tools.js +149 -286
- package/es/ProEditTable/utils/transform.js +25 -30
- package/es/ProEditTable/utils/useEditTableError.js +30 -43
- package/es/ProEditTable/utils/useShouldUpdateForTable.js +42 -72
- package/es/ProEditTable/utils/validateAll.js +87 -154
- package/es/ProEnum/components/Group.js +38 -30
- package/es/ProEnum/components/Tag.js +22 -26
- package/es/ProEnum/hooks/useEnum.js +48 -116
- package/es/ProEnum/hooks/useEnumRequest.js +182 -212
- package/es/ProEnum/hooks/useFrequentEnumRequest.js +40 -48
- package/es/ProEnum/index.js +162 -172
- package/es/ProEnum/propsType.js +0 -1
- package/es/ProEnum/utils/eventCenter.js +10 -12
- package/es/ProEnum/utils/frequentEnum.js +35 -92
- package/es/ProEnum/utils/getEnum.js +32 -90
- package/es/ProEnum/utils/getEnumLabel.js +44 -49
- package/es/ProEnum/utils/index.js +93 -207
- package/es/ProForm/components/Container.js +13 -28
- package/es/ProForm/components/FormFooter/index.js +36 -44
- package/es/ProForm/components/FormFooter/propsType.js +0 -1
- package/es/ProForm/components/base/Checkbox/index.js +32 -59
- package/es/ProForm/components/base/DatePicker/index.js +49 -71
- package/es/ProForm/components/base/Input/index.js +63 -97
- package/es/ProForm/components/base/Input/propsType.js +0 -1
- package/es/ProForm/components/base/InputNumber/index.js +118 -172
- package/es/ProForm/components/base/Radio/index.js +39 -52
- package/es/ProForm/components/base/RangePicker/index.js +109 -127
- package/es/ProForm/components/base/RangePicker/useDateRange.js +20 -17
- package/es/ProForm/components/base/Select/index.js +63 -89
- package/es/ProForm/components/base/Switch/index.js +27 -35
- package/es/ProForm/components/base/SwitchCheckbox/index.js +36 -54
- package/es/ProForm/components/base/TextArea/index.js +30 -41
- package/es/ProForm/components/base/TimePicker/index.js +27 -37
- package/es/ProForm/components/combination/Container/index.js +37 -47
- package/es/ProForm/components/combination/Container/propsType.js +0 -1
- package/es/ProForm/components/combination/FormList/components/ActionButton.js +165 -237
- package/es/ProForm/components/combination/FormList/components/BlockFields.js +98 -102
- package/es/ProForm/components/combination/FormList/components/Empty.js +28 -55
- package/es/ProForm/components/combination/FormList/components/LineFields.js +57 -54
- package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +61 -109
- package/es/ProForm/components/combination/FormList/index.js +151 -161
- package/es/ProForm/components/combination/FormList/propsType.js +0 -1
- package/es/ProForm/components/combination/FormList/style/index.less +6 -0
- package/es/ProForm/components/combination/FormList/utils.js +22 -38
- package/es/ProForm/components/combination/Group/component/AddonWrapper/index.js +12 -28
- package/es/ProForm/components/combination/Group/component/ComRender.js +50 -111
- package/es/ProForm/components/combination/Group/component/FlexibleGroup.js +106 -213
- package/es/ProForm/components/combination/Group/hooks/index.js +69 -129
- package/es/ProForm/components/combination/Group/index.js +87 -126
- package/es/ProForm/components/combination/Group/propsType.js +0 -1
- package/es/ProForm/components/combination/Group/utils/index.js +124 -239
- package/es/ProForm/components/combination/ProCascader/index.js +156 -199
- package/es/ProForm/components/combination/ProCascader/propsType.js +0 -1
- package/es/ProForm/components/combination/ProCascader/utils/index.js +12 -21
- package/es/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +72 -70
- package/es/ProForm/components/combination/ProModalSelect/index.js +309 -347
- package/es/ProForm/components/combination/ProModalSelect/propsType.js +0 -1
- package/es/ProForm/components/combination/ProModalSelect/utils/index.js +32 -39
- package/es/ProForm/components/combination/ProNumberRange/index.js +100 -156
- package/es/ProForm/components/combination/ProNumberRange/propsType.js +0 -1
- package/es/ProForm/components/combination/ProRangeLimit/index.js +104 -115
- package/es/ProForm/components/combination/ProRangeLimit/propsType.js +0 -1
- package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +16 -16
- package/es/ProForm/components/combination/ProTimeLimit/index.js +75 -109
- package/es/ProForm/components/index.js +56 -34
- package/es/ProForm/components/render/ChangedWrapper.js +85 -94
- package/es/ProForm/components/render/ConfirmWrapper.js +27 -39
- package/es/ProForm/components/render/CustomComponentViewWrapper.js +65 -82
- package/es/ProForm/components/render/Render.js +223 -329
- package/es/ProForm/components/render/RenderFields.js +76 -113
- package/es/ProForm/components/render/propsType.js +0 -1
- package/es/ProForm/hooks/useControlled.js +8 -10
- package/es/ProForm/hooks/useDeepCompareMemo.js +11 -11
- package/es/ProForm/hooks/useFieldProps.js +8 -4
- package/es/ProForm/hooks/useForm.js +50 -110
- package/es/ProForm/hooks/useRules.js +17 -33
- package/es/ProForm/hooks/useShouldUpdate.js +77 -152
- package/es/ProForm/hooks/useWatch.js +62 -134
- package/es/ProForm/index.js +157 -194
- package/es/ProForm/propsType.js +15 -7
- package/es/ProForm/utils/buildFormItemProps.js +51 -58
- package/es/ProForm/utils/diffOriginal.js +43 -73
- package/es/ProForm/utils/getDefaultProps.js +18 -24
- package/es/ProForm/utils/index.js +160 -235
- package/es/ProForm/utils/processDependencies.js +21 -60
- package/es/ProForm/utils/reactiveValues.js +20 -34
- package/es/ProForm/utils/rulesCreator.js +42 -40
- package/es/ProForm/utils/transformNames.js +10 -13
- package/es/ProForm/utils/transformValue.js +16 -29
- package/es/ProForm/utils/valueType.js +96 -178
- package/es/ProIcon/config/index.js +340 -274
- package/es/ProIcon/index.js +135 -209
- package/es/ProIcon/propsTypes.js +0 -1
- package/es/ProIcon/utils/index.js +24 -39
- package/es/ProLayout/components/Layout/Header/index.js +108 -141
- package/es/ProLayout/components/Layout/Menu/FoldMenu/index.js +134 -190
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +113 -139
- package/es/ProLayout/components/Layout/Menu/OpenMenu/propsType.js +0 -1
- package/es/ProLayout/components/Layout/Menu/SideMenu/index.js +23 -31
- package/es/ProLayout/components/Layout/Menu/index.js +92 -89
- package/es/ProLayout/components/Layout/Notice/index.js +13 -27
- package/es/ProLayout/components/Layout/index.js +8 -3
- package/es/ProLayout/components/ProCollapse/PropTypes.js +0 -1
- package/es/ProLayout/components/ProCollapse/index.js +89 -111
- package/es/ProLayout/components/ProFooter/PropTypes.js +0 -1
- package/es/ProLayout/components/ProFooter/index.js +27 -24
- package/es/ProLayout/components/ProHeader/PropTypes.js +0 -1
- package/es/ProLayout/components/ProHeader/components/Copy/index.js +23 -21
- package/es/ProLayout/components/ProHeader/components/Describe/index.js +67 -84
- package/es/ProLayout/components/ProHeader/components/ProBackBtn/index.js +18 -21
- package/es/ProLayout/components/ProHeader/components/ProBackBtn/propsType.js +0 -1
- package/es/ProLayout/components/ProHeader/components/index.js +6 -2
- package/es/ProLayout/components/ProHeader/index.js +216 -356
- package/es/ProLayout/components/ProHeader/utils/index.js +19 -26
- package/es/ProLayout/components/TabsManager/components/TabContextMenu.js +92 -85
- package/es/ProLayout/components/TabsManager/components/TabItem.js +53 -63
- package/es/ProLayout/components/TabsManager/components/TabsContext.js +5 -5
- package/es/ProLayout/components/TabsManager/components/TabsHeader.js +42 -52
- package/es/ProLayout/components/TabsManager/hooks/useActiveTab.js +8 -9
- package/es/ProLayout/components/TabsManager/hooks/useIframeRoute.js +19 -32
- package/es/ProLayout/components/TabsManager/hooks/useProLayoutTabs.js +6 -20
- package/es/ProLayout/components/TabsManager/hooks/useTabsCache.js +25 -42
- package/es/ProLayout/components/TabsManager/hooks/useTabsState.js +320 -350
- package/es/ProLayout/components/TabsManager/hooks/useTabsUrlSync.d.ts +19 -0
- package/es/ProLayout/components/TabsManager/hooks/useTabsUrlSync.js +332 -0
- package/es/ProLayout/components/TabsManager/index.js +407 -351
- package/es/ProLayout/components/TabsManager/propTypes.d.ts +4 -0
- package/es/ProLayout/components/TabsManager/propTypes.js +7 -15
- package/es/ProLayout/components/TabsManager/style/index.less +1 -1
- package/es/ProLayout/components/TabsManager/utils/historyObserver.d.ts +7 -0
- package/es/ProLayout/components/TabsManager/utils/historyObserver.js +65 -0
- package/es/ProLayout/components/TabsManager/utils/index.d.ts +15 -2
- package/es/ProLayout/components/TabsManager/utils/index.js +156 -159
- package/es/ProLayout/components/index.js +8 -3
- package/es/ProLayout/index.js +173 -228
- package/es/ProLayout/propTypes.d.ts +28 -1
- package/es/ProLayout/propTypes.js +12 -52
- package/es/ProLayout/utils/index.js +48 -128
- package/es/ProSelect/components/AdaptiveTooltip.js +26 -25
- package/es/ProSelect/index.js +187 -223
- package/es/ProSelect/propsType.js +0 -1
- package/es/ProSelect/style/index.less +13 -0
- package/es/ProSelect/utils/index.js +100 -146
- package/es/ProStep/components/Anchor/index.js +71 -82
- package/es/ProStep/components/Item/index.js +49 -56
- package/es/ProStep/components/LazyLoad/index.js +23 -29
- package/es/ProStep/components/Listener/index.js +20 -33
- package/es/ProStep/components/Step/index.js +31 -38
- package/es/ProStep/constants.js +4 -1
- package/es/ProStep/index.js +166 -153
- package/es/ProStep/propsType.js +0 -1
- package/es/ProStep/style/index.less +1 -1
- package/es/ProStep/utils/index.js +29 -55
- package/es/ProStepTab/index.js +83 -138
- package/es/ProStepTab/propsType.js +0 -1
- package/es/ProTable/components/EditableCell/EditIcon.js +10 -14
- package/es/ProTable/components/EditableCell/index.js +37 -71
- package/es/ProTable/components/EditableCell/propsType.js +0 -1
- package/es/ProTable/components/FormatColumn/index.js +209 -340
- package/es/ProTable/components/FormatColumn/propsType.js +0 -1
- package/es/ProTable/components/RcTable/components/BaseTable/index.js +35 -39
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +80 -107
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +54 -48
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/propsType.js +0 -1
- package/es/ProTable/components/RcTable/components/DraggableTable/index.js +47 -54
- package/es/ProTable/components/RcTable/index.js +6 -4
- package/es/ProTable/components/RenderColumn/index.js +158 -186
- package/es/ProTable/components/RenderEmptyText/index.js +12 -21
- package/es/ProTable/components/RenderFooter/index.js +15 -15
- package/es/ProTable/components/RenderSummary/index.js +33 -50
- package/es/ProTable/components/RenderTableHeader/index.js +44 -46
- package/es/ProTable/components/RenderTabs/index.js +47 -51
- package/es/ProTable/components/TableResizable/index.js +56 -72
- package/es/ProTable/components/TooltipTitle/index.js +13 -21
- package/es/ProTable/components/index.js +16 -36
- package/es/ProTable/hooks/useAntdTable.js +191 -224
- package/es/ProTable/index.js +232 -249
- package/es/ProTable/propsType.js +0 -1
- package/es/ProTable/utils/columnStorage.js +63 -88
- package/es/ProTable/utils/index.js +57 -90
- package/es/ProTabs/components/Card/index.js +20 -48
- package/es/ProTabs/components/index.js +4 -1
- package/es/ProTabs/index.js +41 -58
- package/es/ProTabs/propType.js +0 -1
- package/es/ProThemeTools/component/ProTools/index.js +106 -158
- package/es/ProThemeTools/component/index.js +4 -1
- package/es/ProThemeTools/context/ThemeContext.js +67 -146
- package/es/ProThemeTools/index.js +103 -156
- package/es/ProThemeTools/propsType.js +0 -1
- package/es/ProThemeTools/utils/index.js +60 -109
- package/es/ProTooltip/index.js +132 -168
- package/es/ProTooltip/propsType.js +0 -1
- package/es/ProTree/components/AdaptiveTooltip.js +15 -17
- package/es/ProTree/components/CloseIcon.js +18 -26
- package/es/ProTree/components/List.js +28 -47
- package/es/ProTree/components/ProTree.js +152 -211
- package/es/ProTree/components/ProTreeSelect/index.js +255 -459
- package/es/ProTree/components/ProTreeSelect/propsType.js +0 -1
- package/es/ProTree/components/SearchTitle.js +23 -42
- package/es/ProTree/components/Tree.js +147 -195
- package/es/ProTree/components/index.js +10 -5
- package/es/ProTree/index.js +12 -16
- package/es/ProTree/propsType.js +0 -1
- package/es/ProTree/utils.js +46 -118
- package/es/ProTreeModal/components/Cascader.js +56 -64
- package/es/ProTreeModal/components/CloseIcon.js +18 -26
- package/es/ProTreeModal/components/List.js +114 -180
- package/es/ProTreeModal/components/SearchTitle.js +15 -18
- package/es/ProTreeModal/components/SortableItem.js +29 -58
- package/es/ProTreeModal/components/Tree.js +99 -113
- package/es/ProTreeModal/components/Trigger.js +87 -121
- package/es/ProTreeModal/components/index.js +14 -6
- package/es/ProTreeModal/index.js +397 -438
- package/es/ProTreeModal/propsType.js +0 -1
- package/es/ProTreeModal/utils.js +52 -95
- package/es/ProUpload/components/ButtonRender.js +44 -54
- package/es/ProUpload/components/DragRender.js +94 -148
- package/es/ProUpload/components/DraggableUploadListItem.js +12 -25
- package/es/ProUpload/components/Example.js +27 -31
- package/es/ProUpload/components/FileItem.js +69 -163
- package/es/ProUpload/components/ImageRender.js +134 -170
- package/es/ProUpload/index.js +68 -100
- package/es/ProUpload/propsType.js +0 -1
- package/es/ProUpload/uitls.js +8 -4
- package/es/ProUtils/utils/index.js +17 -13
- package/es/ProViewer/index.js +154 -175
- package/es/ProViewer/propsType.js +0 -5
- package/es/ProWaterMark/index.js +9 -16
- package/es/ProWaterMark/propsType.js +0 -1
- package/es/hooks/useDraggableRow.js +25 -53
- package/es/index.js +57 -77
- package/es/locale/en_US.js +153 -142
- package/es/locale/index.js +23 -36
- package/es/locale/zh_CN.js +145 -142
- package/es/tokens.js +84 -83
- package/es/utils/index.js +24 -51
- package/package.json +4 -2
- package/es/ProConfigProvider/demo/locale.js +0 -58
|
@@ -1,25 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Space, Divider, Breadcrumb, Tooltip, Modal } from "antd";
|
|
3
|
+
import React, { memo, useEffect, useState, useRef } from "react";
|
|
4
|
+
import { tools } from "@zat-design/utils";
|
|
5
|
+
import classnames from "classnames";
|
|
6
|
+
import dayjs from "dayjs";
|
|
7
|
+
import { useToggle } from "ahooks";
|
|
8
|
+
import isFunction from "lodash/isFunction";
|
|
9
|
+
import isEmpty from "lodash/isEmpty";
|
|
10
|
+
import isNumber from "lodash/isNumber";
|
|
11
|
+
import isString from "lodash/isString";
|
|
12
|
+
import { ReactSVG } from "react-svg";
|
|
12
13
|
import foldSvg from "../../../assets/arrow.svg";
|
|
13
14
|
import { Copy, ProBackBtn } from "./components";
|
|
14
15
|
import { DescribeItems, DescribeValue } from "./components/Describe";
|
|
15
16
|
import getEnumLabel from "../../../ProEnum/utils/getEnumLabel";
|
|
16
17
|
import locale from "../../../locale";
|
|
17
18
|
import { toKeyPart, getDescribeColumnKey, getTagKey, getSubDescribeKey } from "./utils";
|
|
18
|
-
|
|
19
|
-
const {
|
|
20
|
-
formatAmount
|
|
21
|
-
} = tools;
|
|
22
|
-
const ProHeader = props => {
|
|
19
|
+
const { formatAmount } = tools;
|
|
20
|
+
const ProHeader = (props) => {
|
|
23
21
|
const {
|
|
24
22
|
breadcrumbColumns,
|
|
25
23
|
actionRender,
|
|
@@ -38,360 +36,241 @@ const ProHeader = props => {
|
|
|
38
36
|
isConfirmBack = false,
|
|
39
37
|
isConfirmBackModalProps = {}
|
|
40
38
|
} = props;
|
|
41
|
-
|
|
42
|
-
// 返回按钮是否显示。
|
|
43
|
-
// 显式意图优先于 autoBack 启发式:
|
|
44
|
-
// 1) 用户显式传了 showBack → 完全尊重该值;
|
|
45
|
-
// 2) 传了 onBack(返回不依赖浏览器历史,如 tab 内返回 / 自定义跳转)→ 显示;
|
|
46
|
-
// 3) 都没传(纯默认,返回兜底走 window.history.back)→ 由 autoBack 按历史长度智能判断:
|
|
47
|
-
// 新开页面(history.length <= autoBack)无处可返回,则隐藏。
|
|
48
39
|
const computeBackState = () => {
|
|
49
|
-
if (props.showBack !==
|
|
50
|
-
|
|
40
|
+
if (props.showBack !== void 0)
|
|
41
|
+
return props.showBack;
|
|
42
|
+
if (onBack)
|
|
43
|
+
return true;
|
|
51
44
|
return window.history.length > autoBack;
|
|
52
45
|
};
|
|
53
46
|
const [backState, setBackState] = useState(computeBackState);
|
|
54
|
-
const [fold, {
|
|
55
|
-
toggle
|
|
56
|
-
}] = useToggle(collapsed);
|
|
47
|
+
const [fold, { toggle }] = useToggle(collapsed);
|
|
57
48
|
const ref = useRef(null);
|
|
58
|
-
|
|
59
|
-
// 最终用于渲染的标题(title + showBack 时会被转成面包屑,此处置空)
|
|
60
49
|
let finalTitle = title;
|
|
61
|
-
|
|
62
|
-
// 面包屑配置数据源
|
|
63
50
|
const finalBreadcrumbColumns = breadcrumbColumns || [];
|
|
64
|
-
|
|
65
|
-
// 次级配置数据源
|
|
66
51
|
const finalSubDescribeColumns = subDescribeColumns || [];
|
|
67
52
|
useEffect(() => {
|
|
68
53
|
if (bodyOverFlowHidden) {
|
|
69
|
-
const bodyElement = document.querySelector(
|
|
70
|
-
bodyElement.style.overflow =
|
|
54
|
+
const bodyElement = document.querySelector("body");
|
|
55
|
+
bodyElement.style.overflow = "hidden";
|
|
71
56
|
}
|
|
72
57
|
return () => {
|
|
73
|
-
const bodyElement = document.querySelector(
|
|
74
|
-
bodyElement.style.overflow =
|
|
58
|
+
const bodyElement = document.querySelector("body");
|
|
59
|
+
bodyElement.style.overflow = "";
|
|
75
60
|
};
|
|
76
61
|
}, [bodyOverFlowHidden]);
|
|
77
|
-
|
|
78
|
-
// showBack / onBack / autoBack 变化时同步 backState(避免 props 更新后按钮显隐不同步)
|
|
79
62
|
useEffect(() => {
|
|
80
63
|
setBackState(computeBackState());
|
|
81
64
|
}, [props.showBack, onBack, autoBack]);
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* 主级描述数据渲染
|
|
85
|
-
*/
|
|
86
|
-
const describeRender = describeData => {
|
|
65
|
+
const describeRender = (describeData) => {
|
|
87
66
|
if (!Array.isArray(describeData)) {
|
|
88
67
|
return null;
|
|
89
68
|
}
|
|
90
|
-
return
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
copyable,
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
},
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
className: "pro-header-describe-label",
|
|
126
|
-
children: label
|
|
127
|
-
}) : null, /*#__PURE__*/_jsx("span", {
|
|
128
|
-
className: "pro-header-describe-value",
|
|
129
|
-
children: items?.length ? /*#__PURE__*/_jsx(DescribeItems, {
|
|
130
|
-
items: items,
|
|
131
|
-
parentKey: describeItemKey,
|
|
132
|
-
containerRef: ref
|
|
133
|
-
}) : /*#__PURE__*/_jsx("span", {
|
|
134
|
-
children: /*#__PURE__*/_jsx(DescribeValue, {
|
|
135
|
-
value: value,
|
|
136
|
-
copyable: copyable,
|
|
137
|
-
tag: tag,
|
|
138
|
-
link: link,
|
|
139
|
-
parentKey: describeItemKey
|
|
140
|
-
})
|
|
141
|
-
})
|
|
142
|
-
})]
|
|
143
|
-
})
|
|
144
|
-
}, describeItemKey);
|
|
145
|
-
})
|
|
146
|
-
});
|
|
69
|
+
return /* @__PURE__ */ jsx(
|
|
70
|
+
"ul",
|
|
71
|
+
{
|
|
72
|
+
className: classnames({
|
|
73
|
+
"pro-header-describe": true,
|
|
74
|
+
"pro-header-describe-open": fold,
|
|
75
|
+
"pro-header-describe-hidden": !fold
|
|
76
|
+
}),
|
|
77
|
+
children: describeData.map((item, index) => {
|
|
78
|
+
const { value, copyable, show = true, tag, label, link, items = [], width } = item;
|
|
79
|
+
const describeItemKey = getDescribeColumnKey(item, index);
|
|
80
|
+
if (show === false || !show) {
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
const onlyTag = tag && !label && !value;
|
|
84
|
+
const tagCls = classnames({
|
|
85
|
+
"pro-header-only-tag": onlyTag,
|
|
86
|
+
"pro-header-describe-items-calc": isString(width) ? width.includes("calc") : false
|
|
87
|
+
});
|
|
88
|
+
return /* @__PURE__ */ jsx("li", { className: tagCls, style: { width }, children: /* @__PURE__ */ jsxs(Space, { size: 4, children: [
|
|
89
|
+
label ? /* @__PURE__ */ jsx("span", { className: "pro-header-describe-label", children: label }) : null,
|
|
90
|
+
/* @__PURE__ */ jsx("span", { className: "pro-header-describe-value", children: (items == null ? void 0 : items.length) ? /* @__PURE__ */ jsx(DescribeItems, { items, parentKey: describeItemKey, containerRef: ref }) : /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx(
|
|
91
|
+
DescribeValue,
|
|
92
|
+
{
|
|
93
|
+
value,
|
|
94
|
+
copyable,
|
|
95
|
+
tag,
|
|
96
|
+
link,
|
|
97
|
+
parentKey: describeItemKey
|
|
98
|
+
}
|
|
99
|
+
) }) })
|
|
100
|
+
] }) }, describeItemKey);
|
|
101
|
+
})
|
|
102
|
+
}
|
|
103
|
+
);
|
|
147
104
|
};
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
*/
|
|
152
|
-
const subDescribeRender = describeData => {
|
|
153
|
-
const {
|
|
154
|
-
value,
|
|
155
|
-
type,
|
|
156
|
-
valueType,
|
|
157
|
-
label,
|
|
158
|
-
show = true,
|
|
159
|
-
precision = 2,
|
|
160
|
-
code
|
|
161
|
-
} = describeData;
|
|
162
|
-
// show为false直接隐藏
|
|
105
|
+
const subDescribeRender = (describeData) => {
|
|
106
|
+
var _a, _b;
|
|
107
|
+
const { value, type, valueType, label, show = true, precision = 2, code } = describeData;
|
|
163
108
|
if (!show) {
|
|
164
|
-
return
|
|
109
|
+
return "";
|
|
165
110
|
}
|
|
166
111
|
let result;
|
|
167
112
|
switch (valueType || type) {
|
|
168
|
-
case
|
|
169
|
-
case
|
|
170
|
-
|
|
171
|
-
result = value || _isNumber(value) ? formatAmount(value, precision) : '-';
|
|
113
|
+
case "thousandth":
|
|
114
|
+
case "money":
|
|
115
|
+
result = value || isNumber(value) ? formatAmount(value, precision) : "-";
|
|
172
116
|
break;
|
|
173
|
-
case
|
|
174
|
-
// 枚举-展示name
|
|
117
|
+
case "enumName":
|
|
175
118
|
result = getEnumLabel(code, value);
|
|
176
119
|
break;
|
|
177
|
-
case
|
|
178
|
-
// 枚举-展示code-name
|
|
120
|
+
case "enumCodeName":
|
|
179
121
|
result = getEnumLabel(code, value, true);
|
|
180
122
|
break;
|
|
181
|
-
case
|
|
182
|
-
|
|
183
|
-
result = value ? dayjs(value)?.format('YYYY-MM-DD') : '-';
|
|
123
|
+
case "date":
|
|
124
|
+
result = value ? (_a = dayjs(value)) == null ? void 0 : _a.format("YYYY-MM-DD") : "-";
|
|
184
125
|
break;
|
|
185
|
-
case
|
|
186
|
-
|
|
187
|
-
result = value ? dayjs(value)?.format('YYYY-MM-DD HH:mm:ss') : '-';
|
|
126
|
+
case "dateTime":
|
|
127
|
+
result = value ? (_b = dayjs(value)) == null ? void 0 : _b.format("YYYY-MM-DD HH:mm:ss") : "-";
|
|
188
128
|
break;
|
|
189
129
|
default:
|
|
190
|
-
result = String(value).includes(
|
|
130
|
+
result = String(value).includes("undefined") || !value ? "-" : value;
|
|
191
131
|
break;
|
|
192
132
|
}
|
|
193
|
-
return
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
className: "describe-value",
|
|
198
|
-
children: result
|
|
199
|
-
})]
|
|
200
|
-
});
|
|
133
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
134
|
+
/* @__PURE__ */ jsx("span", { children: label }),
|
|
135
|
+
/* @__PURE__ */ jsx("span", { className: "describe-value", children: result })
|
|
136
|
+
] });
|
|
201
137
|
};
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* 头部右侧按钮面板渲染
|
|
205
|
-
*/
|
|
206
138
|
const actionsRender = () => {
|
|
207
139
|
if (Array.isArray(actionRender) && actionRender.length) {
|
|
208
|
-
return
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
// 判断第一层dom节点为空
|
|
220
|
-
if (item?.type && !item?.props?.children) {
|
|
221
|
-
return null;
|
|
222
|
-
}
|
|
223
|
-
return /*#__PURE__*/_jsx("div", {
|
|
224
|
-
children: item
|
|
225
|
-
}, actionKey);
|
|
226
|
-
})
|
|
227
|
-
});
|
|
140
|
+
return /* @__PURE__ */ jsx(Space, { separator: /* @__PURE__ */ jsx(Divider, { orientation: "vertical" }), children: actionRender.map((item, index) => {
|
|
141
|
+
var _a;
|
|
142
|
+
const actionKey = (React.isValidElement(item) && item.key != null ? String(item.key) : void 0) ?? toKeyPart(item == null ? void 0 : item.type) ?? `action-${index}`;
|
|
143
|
+
if (isFunction(item == null ? void 0 : item.type)) {
|
|
144
|
+
return /* @__PURE__ */ jsx("div", { children: item }, actionKey);
|
|
145
|
+
}
|
|
146
|
+
if ((item == null ? void 0 : item.type) && !((_a = item == null ? void 0 : item.props) == null ? void 0 : _a.children)) {
|
|
147
|
+
return null;
|
|
148
|
+
}
|
|
149
|
+
return /* @__PURE__ */ jsx("div", { children: item }, actionKey);
|
|
150
|
+
}) });
|
|
228
151
|
}
|
|
229
152
|
return actionRender;
|
|
230
153
|
};
|
|
231
|
-
|
|
232
|
-
/**
|
|
233
|
-
* 总结信息面板渲染
|
|
234
|
-
*/
|
|
235
154
|
const breadcrumbRender = () => {
|
|
236
155
|
if (Array.isArray(finalBreadcrumbColumns) && !finalBreadcrumbColumns.length) {
|
|
237
156
|
return [];
|
|
238
157
|
}
|
|
239
|
-
const list = finalBreadcrumbColumns
|
|
240
|
-
return item.type ===
|
|
158
|
+
const list = finalBreadcrumbColumns == null ? void 0 : finalBreadcrumbColumns.filter((item) => {
|
|
159
|
+
return item.type === "breadcrumb";
|
|
241
160
|
});
|
|
242
161
|
return list.map((item, index) => {
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
show = true,
|
|
246
|
-
tag
|
|
247
|
-
} = item;
|
|
162
|
+
var _a;
|
|
163
|
+
const { value, show = true, tag } = item;
|
|
248
164
|
const breadcrumbItemKey = toKeyPart(value) ?? `breadcrumb-${index}`;
|
|
249
165
|
const tagRender = () => {
|
|
250
166
|
if (Array.isArray(tag) && tag.length) {
|
|
251
|
-
return
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
167
|
+
return /* @__PURE__ */ jsx(Space, { size: 8, children: tag.map((tagItem, tagIndex) => {
|
|
168
|
+
return /* @__PURE__ */ jsx(
|
|
169
|
+
"div",
|
|
170
|
+
{
|
|
255
171
|
className: "pro-header-tag",
|
|
256
172
|
children: tagItem
|
|
257
|
-
},
|
|
258
|
-
|
|
259
|
-
|
|
173
|
+
},
|
|
174
|
+
getTagKey(tagItem, breadcrumbItemKey, tagIndex)
|
|
175
|
+
);
|
|
176
|
+
}) });
|
|
260
177
|
}
|
|
261
|
-
return tag ?
|
|
262
|
-
className: "pro-header-tag",
|
|
263
|
-
children: tag
|
|
264
|
-
}) : null;
|
|
178
|
+
return tag ? /* @__PURE__ */ jsx("div", { className: "pro-header-tag", children: tag }) : null;
|
|
265
179
|
};
|
|
266
|
-
|
|
267
|
-
// show或者值不存在为false直接隐藏¸
|
|
268
180
|
if (!show || !value) {
|
|
269
181
|
return null;
|
|
270
182
|
}
|
|
271
|
-
|
|
272
|
-
if (value?.type && !value?.props?.children) {
|
|
183
|
+
if ((value == null ? void 0 : value.type) && !((_a = value == null ? void 0 : value.props) == null ? void 0 : _a.children)) {
|
|
273
184
|
return null;
|
|
274
185
|
}
|
|
275
186
|
return {
|
|
276
187
|
key: breadcrumbItemKey,
|
|
277
|
-
title:
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
188
|
+
title: /* @__PURE__ */ jsxs(Space, { size: 4, children: [
|
|
189
|
+
value,
|
|
190
|
+
" ",
|
|
191
|
+
tagRender()
|
|
192
|
+
] })
|
|
281
193
|
};
|
|
282
|
-
}).filter(Boolean);
|
|
194
|
+
}).filter(Boolean);
|
|
283
195
|
};
|
|
284
|
-
|
|
285
|
-
/**
|
|
286
|
-
* 头部左侧导航栏后业务信息
|
|
287
|
-
*/
|
|
288
196
|
const infoRender = () => {
|
|
289
197
|
if (!Array.isArray(finalBreadcrumbColumns)) {
|
|
290
|
-
return
|
|
198
|
+
return "";
|
|
291
199
|
}
|
|
292
|
-
const list = finalBreadcrumbColumns
|
|
293
|
-
return item.type !==
|
|
200
|
+
const list = finalBreadcrumbColumns == null ? void 0 : finalBreadcrumbColumns.filter((item) => {
|
|
201
|
+
return item.type !== "breadcrumb";
|
|
294
202
|
});
|
|
295
203
|
if (!list.length) {
|
|
296
204
|
return null;
|
|
297
205
|
}
|
|
298
|
-
return
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
206
|
+
return /* @__PURE__ */ jsx("ul", { className: "pro-header-info", children: list.map((item, index) => {
|
|
207
|
+
var _a;
|
|
208
|
+
const { value, type = "info", show = true, width, tag } = item;
|
|
209
|
+
const infoItemKey = (type && toKeyPart(value) ? `${type}-${toKeyPart(value)}` : void 0) ?? toKeyPart(value) ?? `info-${index}`;
|
|
210
|
+
if (!show || !value) {
|
|
211
|
+
return "";
|
|
212
|
+
}
|
|
213
|
+
if ((value == null ? void 0 : value.type) && !((_a = value == null ? void 0 : value.props) == null ? void 0 : _a.children)) {
|
|
214
|
+
return "";
|
|
215
|
+
}
|
|
216
|
+
let val = String(value).includes("undefined") || !value ? "-" : value;
|
|
217
|
+
if (type === "version" && val) {
|
|
218
|
+
val = `${locale.ProHeader.versionTitle}${val}`;
|
|
219
|
+
}
|
|
220
|
+
const breadcrumbCls = classnames({
|
|
221
|
+
"breadcrumb-value": true,
|
|
222
|
+
omit: width
|
|
223
|
+
});
|
|
224
|
+
const valueRender = (type2) => {
|
|
225
|
+
let valRender = /* @__PURE__ */ jsx("div", { className: breadcrumbCls, style: { width }, children: /* @__PURE__ */ jsxs(Space, { size: 4, children: [
|
|
226
|
+
val,
|
|
227
|
+
" ",
|
|
228
|
+
tag ? /* @__PURE__ */ jsx("div", { className: "pro-header-tag", children: tag }) : null
|
|
229
|
+
] }) });
|
|
230
|
+
if (type2 === "copy") {
|
|
231
|
+
return valRender = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
232
|
+
width ? /* @__PURE__ */ jsx(Tooltip, { title: val, children: valRender }) : valRender,
|
|
233
|
+
/* @__PURE__ */ jsx(Copy, { text: val })
|
|
234
|
+
] });
|
|
316
235
|
}
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
if (type === 'version' && val) {
|
|
320
|
-
val = `${locale.ProHeader.versionTitle}${val}`;
|
|
236
|
+
if (width) {
|
|
237
|
+
return /* @__PURE__ */ jsx(Tooltip, { title: val, children: valRender });
|
|
321
238
|
}
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
});
|
|
328
|
-
const valueRender = type => {
|
|
329
|
-
let valRender = /*#__PURE__*/_jsx("div", {
|
|
330
|
-
className: breadcrumbCls,
|
|
331
|
-
style: {
|
|
332
|
-
width
|
|
333
|
-
},
|
|
334
|
-
children: /*#__PURE__*/_jsxs(Space, {
|
|
335
|
-
size: 4,
|
|
336
|
-
children: [val, " ", tag ? /*#__PURE__*/_jsx("div", {
|
|
337
|
-
className: "pro-header-tag",
|
|
338
|
-
children: tag
|
|
339
|
-
}) : null]
|
|
340
|
-
})
|
|
341
|
-
});
|
|
342
|
-
if (type === 'copy') {
|
|
343
|
-
return valRender = /*#__PURE__*/_jsxs(_Fragment, {
|
|
344
|
-
children: [width ? /*#__PURE__*/_jsx(Tooltip, {
|
|
345
|
-
title: val,
|
|
346
|
-
children: valRender
|
|
347
|
-
}) : valRender, /*#__PURE__*/_jsx(Copy, {
|
|
348
|
-
text: val
|
|
349
|
-
})]
|
|
350
|
-
});
|
|
351
|
-
}
|
|
352
|
-
if (width) {
|
|
353
|
-
return /*#__PURE__*/_jsx(Tooltip, {
|
|
354
|
-
title: val,
|
|
355
|
-
children: valRender
|
|
356
|
-
});
|
|
357
|
-
}
|
|
358
|
-
return valRender;
|
|
359
|
-
};
|
|
360
|
-
return /*#__PURE__*/_jsx("li", {
|
|
239
|
+
return valRender;
|
|
240
|
+
};
|
|
241
|
+
return /* @__PURE__ */ jsx(
|
|
242
|
+
"li",
|
|
243
|
+
{
|
|
361
244
|
className: classnames({
|
|
362
|
-
version: [
|
|
363
|
-
hidden: [
|
|
245
|
+
version: ["version", "tag"].includes(type),
|
|
246
|
+
hidden: ["version", "tag"].includes(type) && !val
|
|
364
247
|
}),
|
|
365
|
-
children: type ===
|
|
366
|
-
},
|
|
367
|
-
|
|
368
|
-
|
|
248
|
+
children: type === "copy" ? valueRender("copy") : valueRender()
|
|
249
|
+
},
|
|
250
|
+
infoItemKey
|
|
251
|
+
);
|
|
252
|
+
}) });
|
|
369
253
|
};
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
const noDescribe = _isEmpty(describeColumns);
|
|
374
|
-
const hasDescribe = !_isEmpty(finalSubDescribeColumns) || !noDescribe;
|
|
375
|
-
const hasFixedTop = fixedTop !== undefined && fixedTop !== null;
|
|
254
|
+
const noDescribe = isEmpty(describeColumns);
|
|
255
|
+
const hasDescribe = !isEmpty(finalSubDescribeColumns) || !noDescribe;
|
|
256
|
+
const hasFixedTop = fixedTop !== void 0 && fixedTop !== null;
|
|
376
257
|
const cls = classnames({
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
258
|
+
"pro-header": true,
|
|
259
|
+
"pro-header-fixed": hasFixedTop,
|
|
260
|
+
"pro-header-shadow": showShadow,
|
|
380
261
|
// 内部窗口滚动自带阴影场景
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
262
|
+
"pro-header-no-back": !backState,
|
|
263
|
+
"pro-header-has-describe": hasDescribe,
|
|
264
|
+
"pro-header-no-describe": noDescribe,
|
|
384
265
|
[`${className}`]: className
|
|
385
266
|
});
|
|
386
|
-
if (title && !
|
|
387
|
-
console.error(
|
|
267
|
+
if (title && !isEmpty(finalBreadcrumbColumns)) {
|
|
268
|
+
console.error("warning: The title and the breadcrumbList cannot be used together");
|
|
388
269
|
}
|
|
389
|
-
|
|
390
|
-
// title默认不显示返回按钮,只有showBack设置为true时才显示
|
|
391
270
|
if (title && props.showBack) {
|
|
392
271
|
finalTitle = null;
|
|
393
272
|
finalBreadcrumbColumns.push({
|
|
394
|
-
type:
|
|
273
|
+
type: "breadcrumb",
|
|
395
274
|
value: title
|
|
396
275
|
});
|
|
397
276
|
}
|
|
@@ -403,11 +282,7 @@ const ProHeader = props => {
|
|
|
403
282
|
}
|
|
404
283
|
return false;
|
|
405
284
|
}
|
|
406
|
-
|
|
407
|
-
const {
|
|
408
|
-
width,
|
|
409
|
-
...restModalProps
|
|
410
|
-
} = isConfirmBackModalProps || {};
|
|
285
|
+
const { width, ...restModalProps } = isConfirmBackModalProps || {};
|
|
411
286
|
Modal.confirm({
|
|
412
287
|
title: `${locale.ProHeader.confirmTitle}`,
|
|
413
288
|
okText: `${locale.ProHeader.confirm}`,
|
|
@@ -416,71 +291,56 @@ const ProHeader = props => {
|
|
|
416
291
|
onBack && onBack();
|
|
417
292
|
},
|
|
418
293
|
// 仅当 width 是 string 或 number 时才传递
|
|
419
|
-
...
|
|
420
|
-
width
|
|
421
|
-
} : {}),
|
|
294
|
+
...width && (typeof width === "string" || typeof width === "number") ? { width } : {},
|
|
422
295
|
...restModalProps
|
|
423
296
|
});
|
|
424
297
|
};
|
|
425
|
-
return
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
...
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
children: /*#__PURE__*/_jsx("div", {
|
|
474
|
-
className: "pro-header-fold-bg",
|
|
475
|
-
onClick: toggle,
|
|
476
|
-
children: /*#__PURE__*/_jsx(ReactSVG, {
|
|
477
|
-
className: "fold-icon",
|
|
478
|
-
src: foldSvg
|
|
479
|
-
}, "copy-icon")
|
|
480
|
-
})
|
|
481
|
-
})]
|
|
482
|
-
}) : null]
|
|
483
|
-
})
|
|
484
|
-
});
|
|
298
|
+
return /* @__PURE__ */ jsx(
|
|
299
|
+
"div",
|
|
300
|
+
{
|
|
301
|
+
className: cls,
|
|
302
|
+
style: { ...style, ...hasFixedTop ? { top: fixedTop } : {}, zIndex },
|
|
303
|
+
"data-pro-step-sticky-header": hasFixedTop ? "true" : void 0,
|
|
304
|
+
children: finalTitle ? /* @__PURE__ */ jsx("div", { className: "pro-header-title", children: finalTitle }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
305
|
+
/* @__PURE__ */ jsxs("div", { className: "pro-header-top", children: [
|
|
306
|
+
/* @__PURE__ */ jsx(
|
|
307
|
+
"div",
|
|
308
|
+
{
|
|
309
|
+
className: classnames({
|
|
310
|
+
"pro-header-left": true,
|
|
311
|
+
"pro-header-left-space": !backState
|
|
312
|
+
}),
|
|
313
|
+
children: /* @__PURE__ */ jsxs(Space, { size: backState ? 4 : 0, children: [
|
|
314
|
+
backState ? /* @__PURE__ */ jsx(ProBackBtn, { onBack: onConfirm }) : null,
|
|
315
|
+
/* @__PURE__ */ jsx(Breadcrumb, { separator: ">", items: breadcrumbRender() }),
|
|
316
|
+
infoRender()
|
|
317
|
+
] })
|
|
318
|
+
}
|
|
319
|
+
),
|
|
320
|
+
/* @__PURE__ */ jsx("div", { className: "pro-header-right", children: actionsRender() })
|
|
321
|
+
] }),
|
|
322
|
+
describeRender(describeColumns),
|
|
323
|
+
!isEmpty(finalSubDescribeColumns) ? /* @__PURE__ */ jsxs(
|
|
324
|
+
"div",
|
|
325
|
+
{
|
|
326
|
+
className: classnames({
|
|
327
|
+
"pro-header-nav": true,
|
|
328
|
+
"pro-header-nav-open": fold,
|
|
329
|
+
"pro-header-nav-hidden": !fold
|
|
330
|
+
}),
|
|
331
|
+
children: [
|
|
332
|
+
/* @__PURE__ */ jsx("ul", { children: finalSubDescribeColumns.map((item, index) => {
|
|
333
|
+
return /* @__PURE__ */ jsx("li", { children: subDescribeRender(item) }, getSubDescribeKey(item, index));
|
|
334
|
+
}) }),
|
|
335
|
+
/* @__PURE__ */ jsx("div", { className: "pro-header-fold", children: /* @__PURE__ */ jsx("div", { className: "pro-header-fold-bg", onClick: toggle, children: /* @__PURE__ */ jsx(ReactSVG, { className: "fold-icon", src: foldSvg }, "copy-icon") }) })
|
|
336
|
+
]
|
|
337
|
+
}
|
|
338
|
+
) : null
|
|
339
|
+
] })
|
|
340
|
+
}
|
|
341
|
+
);
|
|
342
|
+
};
|
|
343
|
+
var ProHeader_default = memo(ProHeader);
|
|
344
|
+
export {
|
|
345
|
+
ProHeader_default as default
|
|
485
346
|
};
|
|
486
|
-
export default /*#__PURE__*/memo(ProHeader);
|