@zat-design/sisyphus-react 4.5.8-beta.1 → 4.5.8-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.css +1 -1
- package/dist/less.esm.css +1 -1
- package/es/ProAction/components/CheckModalContent/index.d.ts +2 -1
- package/es/ProDownload/index.d.ts +2 -1
- package/es/ProDrawerForm/hooks/useConfirmClose.d.ts +1 -0
- package/es/ProEditTable/components/ActionButton/index.d.ts +2 -1
- package/es/ProEditTable/components/RcTable/BaseTable.d.ts +2 -1
- package/es/ProEditTable/components/RcTable/DraggableTable.d.ts +1 -1
- package/es/ProEditTable/components/RenderField/index.d.ts +1 -1
- package/es/ProEditTable/components/RenderToolbar/index.d.ts +2 -1
- package/es/ProEditTable/components/Summary/index.d.ts +2 -1
- package/es/ProEditTable/components/Validator/index.d.ts +1 -0
- package/es/ProEditTable/utils/config.d.ts +2 -1
- package/es/ProEditTable/utils/tools.d.ts +1 -1
- package/es/ProEditTable/utils/transform.d.ts +2 -2
- package/es/ProEnum/components/Group.d.ts +2 -1
- package/es/ProEnum/components/Tag.d.ts +2 -1
- package/es/ProEnum/index.d.ts +3 -2
- package/es/ProEnum/utils/getEnumLabel.d.ts +2 -1
- package/es/ProForm/components/FormFooter/propsType.d.ts +1 -0
- package/es/ProForm/components/base/Input/index.d.ts +2 -1
- package/es/ProForm/components/combination/FormList/components/Empty.d.ts +2 -1
- package/es/ProForm/components/combination/Group/utils/index.d.ts +1 -0
- package/es/ProForm/components/combination/ProCascader/index.d.ts +2 -1
- package/es/ProForm/components/combination/ProNumberRange/index.d.ts +1 -0
- package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.d.ts +2 -1
- package/es/ProForm/index.d.ts +1 -1
- package/es/ProForm/utils/index.d.ts +1 -1
- package/es/ProForm/utils/reactiveValues.d.ts +1 -0
- package/es/ProForm/utils/transformValue.d.ts +1 -1
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.d.ts +2 -1
- package/es/ProLayout/components/Layout/Notice/index.d.ts +5 -2
- package/es/ProLayout/components/Layout/Notice/index.js +3 -1
- package/es/ProLayout/components/ProCollapse/index.d.ts +2 -1
- package/es/ProLayout/components/ProFooter/index.d.ts +2 -1
- package/es/ProLayout/components/ProHeader/components/Copy/index.d.ts +2 -1
- package/es/ProLayout/components/ProHeader/components/Describe/index.d.ts +4 -4
- package/es/ProLayout/components/ProHeader/index.d.ts +1 -1
- package/es/ProLayout/components/ProHeader/index.js +5 -2
- package/es/ProLayout/components/ProHeader/utils/index.d.ts +1 -1
- package/es/ProLayout/components/TabsManager/components/TabContextMenu.d.ts +2 -1
- package/es/ProLayout/components/TabsManager/components/TabsContext.d.ts +1 -0
- package/es/ProLayout/components/TabsManager/components/TabsHeader.d.ts +2 -1
- package/es/ProLayout/components/TabsManager/hooks/useTabsState.js +22 -2
- package/es/ProLayout/components/TabsManager/index.d.ts +1 -0
- package/es/ProLayout/components/TabsManager/index.js +16 -26
- package/es/ProLayout/components/TabsManager/utils/index.d.ts +6 -2
- package/es/ProLayout/components/TabsManager/utils/index.js +23 -0
- package/es/ProLayout/index.d.ts +6 -5
- package/es/ProLayout/index.js +47 -14
- package/es/ProLayout/propTypes.d.ts +4 -0
- package/es/ProLayout/style/index.less +25 -18
- package/es/ProSelect/components/AdaptiveTooltip.d.ts +2 -1
- package/es/ProSelect/index.d.ts +1 -1
- package/es/ProStep/components/Step/index.d.ts +3 -2
- package/es/ProStep/components/Step/index.js +6 -3
- package/es/ProStep/index.d.ts +2 -2
- package/es/ProStep/propsType.d.ts +2 -2
- package/es/ProTable/components/FormatColumn/index.d.ts +1 -1
- package/es/ProTable/components/RcTable/components/BaseTable/index.d.ts +1 -0
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.d.ts +1 -1
- package/es/ProTable/components/RcTable/components/DraggableTable/index.d.ts +1 -0
- package/es/ProTable/components/RenderFooter/index.d.ts +2 -1
- package/es/ProTable/components/RenderTableHeader/index.d.ts +2 -1
- package/es/ProTable/components/RenderTabs/index.d.ts +2 -1
- package/es/ProTable/components/TableResizable/index.d.ts +2 -1
- package/es/ProTable/index.d.ts +1 -1
- package/es/ProTabs/components/Card/index.d.ts +2 -1
- package/es/ProThemeTools/component/ProTools/index.d.ts +2 -1
- package/es/ProThemeTools/index.d.ts +2 -1
- package/es/ProTooltip/index.d.ts +2 -1
- package/es/ProTree/components/AdaptiveTooltip.d.ts +2 -1
- package/es/ProTree/components/CloseIcon.d.ts +2 -1
- package/es/ProTree/components/List.d.ts +1 -1
- package/es/ProTree/components/ProTree.d.ts +2 -1
- package/es/ProTree/components/ProTreeSelect/index.d.ts +1 -1
- package/es/ProTree/components/SearchTitle.d.ts +2 -1
- package/es/ProTree/components/Tree.d.ts +2 -2
- package/es/ProTree/index.d.ts +2 -1
- package/es/ProTreeModal/components/Cascader.d.ts +1 -1
- package/es/ProTreeModal/components/CloseIcon.d.ts +2 -1
- package/es/ProTreeModal/components/SearchTitle.d.ts +2 -1
- package/es/ProTreeModal/components/Trigger.d.ts +1 -1
- package/es/ProTreeModal/index.d.ts +2 -1
- package/es/ProUpload/components/DraggableUploadListItem.d.ts +2 -1
- package/es/hooks/useDraggableRow.d.ts +1 -1
- package/package.json +4 -19
package/es/ProLayout/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { ProLayoutStatesType, ProLayoutType } from './propTypes';
|
|
2
3
|
import { useProLayoutTabs } from './components/TabsManager/hooks/useProLayoutTabs';
|
|
3
4
|
import { useActiveTab } from './components/TabsManager/hooks/useActiveTab';
|
|
@@ -8,12 +9,12 @@ interface LayoutContextValue {
|
|
|
8
9
|
}
|
|
9
10
|
export declare const LayoutContext: import("react").Context<LayoutContextValue>;
|
|
10
11
|
declare const ProLayout: {
|
|
11
|
-
(props: ProLayoutType): import("react
|
|
12
|
-
ProCollapse: (props: import("
|
|
13
|
-
ProFooter: import("react").MemoExoticComponent<(props: import("
|
|
14
|
-
ProHeader: import("react").MemoExoticComponent<(props: import("
|
|
12
|
+
(props: ProLayoutType): import("react").JSX.Element;
|
|
13
|
+
ProCollapse: (props: import("@/ProLayout/components/ProCollapse/PropTypes").ProCollapseType) => import("react").JSX.Element;
|
|
14
|
+
ProFooter: import("react").MemoExoticComponent<(props: import("@/ProLayout/components/ProFooter/PropTypes").ProFooterType) => import("react").JSX.Element>;
|
|
15
|
+
ProHeader: import("react").MemoExoticComponent<(props: import("@/ProLayout/components/ProHeader/PropTypes").ProHeaderType) => import("react").JSX.Element>;
|
|
15
16
|
useProLayoutTabs: typeof useProLayoutTabs;
|
|
16
|
-
useActiveTab: () => import("./propTypes").TabItem
|
|
17
|
+
useActiveTab: () => import("./propTypes").TabItem;
|
|
17
18
|
};
|
|
18
19
|
export { useProLayoutTabs, useActiveTab };
|
|
19
20
|
export default ProLayout;
|
package/es/ProLayout/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/* eslint-disable func-call-spacing */
|
|
2
2
|
/* eslint-disable no-spaced-func */
|
|
3
|
-
import { createContext, useMemo, useRef, useCallback } from 'react';
|
|
3
|
+
import { createContext, useMemo, useRef, useCallback, useLayoutEffect, useState } from 'react';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
|
-
import { useSetState, useToggle, useDeepCompareEffect
|
|
5
|
+
import { useSetState, useToggle, useDeepCompareEffect } from 'ahooks';
|
|
6
6
|
import { ProWaterMark } from "../index";
|
|
7
7
|
import { ProCollapse, ProFooter, ProHeader } from "./components";
|
|
8
8
|
import { Header, Notice, Menu } from "./components/Layout/index";
|
|
@@ -66,19 +66,22 @@ const ProLayout = props => {
|
|
|
66
66
|
const setTabsBarElRef = useCallback(el => setTabsState({
|
|
67
67
|
tabsBarEl: el
|
|
68
68
|
}), []);
|
|
69
|
-
// TabsManager 会在 effect 中调用这两个回调;保持引用稳定,避免父组件每次
|
|
70
|
-
// render 都让 effect 重新执行并再次 setState,形成无限更新循环。
|
|
69
|
+
// TabsManager 会在 layout effect 中调用这两个回调;保持引用稳定,避免父组件每次
|
|
70
|
+
// render 都让 layout effect 重新执行并再次 setState,形成无限更新循环。
|
|
71
71
|
const handleTabsChange = useCallback(v => setTabsState({
|
|
72
72
|
hasTabs: v
|
|
73
73
|
}), []);
|
|
74
74
|
const handleIframePureChange = useCallback(v => setTabsState({
|
|
75
75
|
isIframePure: v
|
|
76
76
|
}), []);
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
const
|
|
77
|
+
const noticeElRef = useRef(null);
|
|
78
|
+
const setNoticeElRef = useCallback(el => {
|
|
79
|
+
noticeElRef.current = el;
|
|
80
|
+
}, []);
|
|
81
|
+
const [stickyHeights, setStickyHeights] = useState({
|
|
82
|
+
notice: 0,
|
|
83
|
+
tabsBar: 0
|
|
84
|
+
});
|
|
82
85
|
const [{
|
|
83
86
|
notice,
|
|
84
87
|
menus,
|
|
@@ -88,6 +91,32 @@ const ProLayout = props => {
|
|
|
88
91
|
menus: [],
|
|
89
92
|
selectedPath: ''
|
|
90
93
|
});
|
|
94
|
+
useLayoutEffect(() => {
|
|
95
|
+
const noticeEl = notice && !isIframePure ? noticeElRef.current : null;
|
|
96
|
+
const visibleTabsBarEl = isTabsLayout && hasTabs && !isIframePure ? tabsBarEl : null;
|
|
97
|
+
let active = true;
|
|
98
|
+
const measureStickyElements = () => {
|
|
99
|
+
if (!active) return;
|
|
100
|
+
const nextHeights = {
|
|
101
|
+
notice: noticeEl?.getBoundingClientRect().height ?? 0,
|
|
102
|
+
tabsBar: visibleTabsBarEl?.getBoundingClientRect().height ?? 0
|
|
103
|
+
};
|
|
104
|
+
setStickyHeights(currentHeights => currentHeights.notice === nextHeights.notice && currentHeights.tabsBar === nextHeights.tabsBar ? currentHeights : nextHeights);
|
|
105
|
+
};
|
|
106
|
+
measureStickyElements();
|
|
107
|
+
const observedElements = [noticeEl, visibleTabsBarEl].filter(element => element !== null);
|
|
108
|
+
if (observedElements.length === 0 || typeof ResizeObserver === 'undefined') {
|
|
109
|
+
return () => {
|
|
110
|
+
active = false;
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
const resizeObserver = new ResizeObserver(measureStickyElements);
|
|
114
|
+
observedElements.forEach(element => resizeObserver.observe(element));
|
|
115
|
+
return () => {
|
|
116
|
+
active = false;
|
|
117
|
+
resizeObserver.disconnect();
|
|
118
|
+
};
|
|
119
|
+
}, [hasTabs, isIframePure, isTabsLayout, notice, tabsBarEl]);
|
|
91
120
|
const [collapsed, {
|
|
92
121
|
toggle,
|
|
93
122
|
set
|
|
@@ -214,11 +243,12 @@ const ProLayout = props => {
|
|
|
214
243
|
'pro-layout-row-top-pure': typeof pure !== 'boolean' && pure.topMenu,
|
|
215
244
|
'pro-layout-row-left-pure': typeof pure !== 'boolean' && pure.leftMenu
|
|
216
245
|
});
|
|
217
|
-
const noticeHeight = notice
|
|
246
|
+
const noticeHeight = stickyHeights.notice;
|
|
218
247
|
|
|
219
248
|
// pure 模式下 Header 不渲染,有效头部高度为 0
|
|
220
249
|
const isPureHeader = typeof pure === 'boolean' ? pure : !!pure?.topMenu;
|
|
221
250
|
const effectiveHeaderHeight = isPureHeader ? 0 : headerHeight;
|
|
251
|
+
const contentStickyTop = effectiveHeaderHeight + noticeHeight + (hasTabs ? stickyHeights.tabsBar : 0);
|
|
222
252
|
|
|
223
253
|
// 为Header组件创建专门的props对象
|
|
224
254
|
const headerProps = {
|
|
@@ -234,9 +264,10 @@ const ProLayout = props => {
|
|
|
234
264
|
|
|
235
265
|
// 为Notice组件创建专门的props对象
|
|
236
266
|
const noticeProps = {
|
|
237
|
-
headerHeight,
|
|
267
|
+
headerHeight: effectiveHeaderHeight,
|
|
238
268
|
notice,
|
|
239
|
-
onCancel: onCancelNotice
|
|
269
|
+
onCancel: onCancelNotice,
|
|
270
|
+
noticeRef: setNoticeElRef
|
|
240
271
|
};
|
|
241
272
|
|
|
242
273
|
// 为Menu组件创建专门的props对象
|
|
@@ -278,7 +309,9 @@ const ProLayout = props => {
|
|
|
278
309
|
}),
|
|
279
310
|
style: {
|
|
280
311
|
'--header-bg-image': `url(${headerBg})`,
|
|
281
|
-
'--pro-layout-header-height': `${effectiveHeaderHeight}px
|
|
312
|
+
'--pro-layout-header-height': `${effectiveHeaderHeight}px`,
|
|
313
|
+
'--pro-layout-notice-height': `${noticeHeight}px`,
|
|
314
|
+
'--pro-layout-content-sticky-top': `${contentStickyTop}px`
|
|
282
315
|
},
|
|
283
316
|
children: [/*#__PURE__*/_jsx(Header, {
|
|
284
317
|
...headerProps
|
|
@@ -286,7 +319,7 @@ const ProLayout = props => {
|
|
|
286
319
|
...noticeProps
|
|
287
320
|
}), /*#__PURE__*/_jsx("div", {
|
|
288
321
|
ref: setTabsBarElRef,
|
|
289
|
-
className: `pro-layout-tabs-bar-wrapper${hasTabs ? ' tabs-visible' : ''}${collapsed ? ' tabs-menu-open' : ''}
|
|
322
|
+
className: `pro-layout-tabs-bar-wrapper${hasTabs ? ' tabs-visible' : ''}${collapsed ? ' tabs-menu-open' : ''}`,
|
|
290
323
|
style: {
|
|
291
324
|
marginTop: effectiveHeaderHeight + noticeHeight
|
|
292
325
|
}
|
|
@@ -519,6 +519,10 @@ export interface TabsConfig {
|
|
|
519
519
|
max?: number;
|
|
520
520
|
storage?: TabsStorageStrategy;
|
|
521
521
|
cacheKey?: string;
|
|
522
|
+
/**
|
|
523
|
+
* @description 普通初始标签页。无缓存时每次 ProLayout 挂载只初始化一次;关闭全部后本次挂载期间不会重新添加
|
|
524
|
+
*/
|
|
525
|
+
initialTabs?: AddTabParams[];
|
|
522
526
|
onTabChange?: (activeKey: string, activeTab: TabItem | undefined, allTabs: TabItem[]) => void;
|
|
523
527
|
/**
|
|
524
528
|
* @description 是否允许标签页拖拽排序
|
|
@@ -293,9 +293,9 @@
|
|
|
293
293
|
margin-right: var(--zaui-space-size-md, 16px);
|
|
294
294
|
margin-left: 48px;
|
|
295
295
|
padding: 0;
|
|
296
|
-
// 滚动时固定在 header 正下方
|
|
296
|
+
// 滚动时固定在 header 和 notice 正下方
|
|
297
297
|
position: sticky;
|
|
298
|
-
top: var(--pro-layout-header-height, 64px);
|
|
298
|
+
top: calc(var(--pro-layout-header-height, 64px) + var(--pro-layout-notice-height, 0px));
|
|
299
299
|
z-index: 89;
|
|
300
300
|
// 与 ::before 渐变层像素级对齐:滚动时遮住上滚的白色内容,同时保持渐变背景可见
|
|
301
301
|
// background-color 作为实体打底,防止渐变图片浅色区域透出白色内容
|
|
@@ -328,22 +328,8 @@
|
|
|
328
328
|
min-height: 0;
|
|
329
329
|
}
|
|
330
330
|
|
|
331
|
-
//
|
|
332
|
-
|
|
333
|
-
&.tabs-visible.tabs-at-top::after {
|
|
334
|
-
content: '';
|
|
335
|
-
position: absolute;
|
|
336
|
-
bottom: calc(-1 * var(--zaui-border-radius, 8px));
|
|
337
|
-
right: 0;
|
|
338
|
-
width: var(--zaui-border-radius, 8px);
|
|
339
|
-
height: var(--zaui-border-radius, 8px);
|
|
340
|
-
border-right: 1px solid rgb(235 236 238);
|
|
341
|
-
border-top-right-radius: var(--zaui-border-radius, 8px);
|
|
342
|
-
pointer-events: none;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
// 遮住 ant-tabs-nav::before 横线的右端(圆角半径宽度),使其在圆弧起点处截止
|
|
346
|
-
&.tabs-visible.tabs-at-top::before {
|
|
331
|
+
// 稳定遮住 ant-tabs-nav::before 横线的右端,使其在内容区圆弧起点处截止
|
|
332
|
+
&.tabs-visible::before {
|
|
347
333
|
content: '';
|
|
348
334
|
position: absolute;
|
|
349
335
|
bottom: 0;
|
|
@@ -386,8 +372,29 @@
|
|
|
386
372
|
padding-top: var(--zaui-space-size-md, 16px);
|
|
387
373
|
border-top-right-radius: var(--zaui-border-radius, 8px);
|
|
388
374
|
|
|
375
|
+
// 圆弧由内容区独立绘制并随内容滚动;sticky Tab 栏始终保持在其上方。
|
|
376
|
+
// ::before 在子内容之前绘制,ProStep / ProHeader 仍可完整覆盖圆弧。
|
|
377
|
+
&::before {
|
|
378
|
+
content: '';
|
|
379
|
+
position: absolute;
|
|
380
|
+
top: 0;
|
|
381
|
+
right: 0;
|
|
382
|
+
width: var(--zaui-border-radius, 8px);
|
|
383
|
+
height: var(--zaui-border-radius, 8px);
|
|
384
|
+
border-right: 1px solid rgb(235 236 238);
|
|
385
|
+
border-top-right-radius: var(--zaui-border-radius, 8px);
|
|
386
|
+
pointer-events: none;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
389
|
.pro-layout-tabs-content {
|
|
390
390
|
> .tab-pane {
|
|
391
|
+
// ProStep 以 ProHeader 开头时,去掉 tabs 内容区的顶部/右侧外层留白。
|
|
392
|
+
// ProStep 保持默认 right: 0,内容与收起态步骤条保留 16px 间距;左侧缩进不变。
|
|
393
|
+
> .pro-step-wrapper:has(> .pro-header:first-child) {
|
|
394
|
+
margin-top: calc(-1px - var(--zaui-space-size-md, 16px));
|
|
395
|
+
margin-right: calc(-1px - var(--zaui-space-size-md, 16px));
|
|
396
|
+
}
|
|
397
|
+
|
|
391
398
|
> .pro-header.pro-header-no-describe:first-child {
|
|
392
399
|
padding: 0 !important;
|
|
393
400
|
|
package/es/ProSelect/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { PropSelectType, ProSelectActionType } from './propsType';
|
|
3
|
-
export declare const ProSelect: (props: PropSelectType, ref: React.Ref<ProSelectActionType> | undefined) =>
|
|
3
|
+
export declare const ProSelect: (props: PropSelectType, ref: React.Ref<ProSelectActionType> | undefined) => React.JSX.Element;
|
|
4
4
|
declare const _default: React.ForwardRefExoticComponent<PropSelectType & React.RefAttributes<ProSelectActionType>>;
|
|
5
5
|
export default _default;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { ProStepType } from '../../propsType';
|
|
2
|
-
export declare const Step: ({ fixedTop, dataSource, activeKey, errorCollection, style, targetOffset, scrollToError, }:
|
|
3
|
+
export declare const Step: ({ fixedTop, dataSource, activeKey, errorCollection, style, targetOffset, scrollToError, }: import("../../propsType").ProStepPropsType & {
|
|
3
4
|
errorCollection: object;
|
|
4
|
-
}) =>
|
|
5
|
+
}) => React.JSX.Element;
|
|
5
6
|
export default Step;
|
|
@@ -5,8 +5,10 @@ import catalogSvg from "../../../assets/catalog.svg";
|
|
|
5
5
|
import Anchor from "../Anchor";
|
|
6
6
|
import locale from "../../../locale";
|
|
7
7
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
const DEFAULT_FIXED_TOP = 'var(--pro-layout-content-sticky-top, 64px)';
|
|
9
|
+
const toCssLength = value => typeof value === 'number' ? `${value}px` : value;
|
|
8
10
|
export const Step = ({
|
|
9
|
-
fixedTop =
|
|
11
|
+
fixedTop = DEFAULT_FIXED_TOP,
|
|
10
12
|
dataSource = [],
|
|
11
13
|
activeKey,
|
|
12
14
|
errorCollection,
|
|
@@ -15,6 +17,7 @@ export const Step = ({
|
|
|
15
17
|
scrollToError
|
|
16
18
|
}) => {
|
|
17
19
|
const [onOff, setOnOff] = useState(false);
|
|
20
|
+
const fixedTopCss = toCssLength(fixedTop);
|
|
18
21
|
const options = useMemo(() => {
|
|
19
22
|
const nextDataSource = _cloneDeep(dataSource);
|
|
20
23
|
let activeIndex;
|
|
@@ -45,8 +48,8 @@ export const Step = ({
|
|
|
45
48
|
return /*#__PURE__*/_jsxs("div", {
|
|
46
49
|
className: `pro-step ${onOff ? 'pro-step-open' : 'pro-step-closed'}`,
|
|
47
50
|
style: {
|
|
48
|
-
top:
|
|
49
|
-
maxHeight: `calc(100vh - ${
|
|
51
|
+
top: fixedTopCss,
|
|
52
|
+
maxHeight: `calc(100vh - ${fixedTopCss})`,
|
|
50
53
|
...style
|
|
51
54
|
},
|
|
52
55
|
onMouseEnter: handleMouseEnter,
|
package/es/ProStep/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare const useStep: () => Partial<ProStepContextType>;
|
|
|
5
5
|
declare const ProStep: {
|
|
6
6
|
({ children, ...resetProps }: ProStepType): ReactNode;
|
|
7
7
|
useStep: () => Partial<ProStepContextType>;
|
|
8
|
-
Item: ({ id, title, collapse: collapseItem, children, lazyLoad: stepLazyLoad, order, ...restProps }: import("./propsType").
|
|
9
|
-
Listener: ({ children, delayTime, excludes, ...props }: import("./propsType").ListenerProps) => import("react").ReactElement
|
|
8
|
+
Item: ({ id, title, collapse: collapseItem, children, lazyLoad: stepLazyLoad, order, ...restProps }: import("./propsType").ProStepItemPropsType) => ReactNode;
|
|
9
|
+
Listener: ({ children, delayTime, excludes, ...props }: import("./propsType").ListenerProps) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
10
10
|
};
|
|
11
11
|
export default ProStep;
|
|
@@ -37,8 +37,8 @@ export type LoadedMapType = LoadedMapPropsType;
|
|
|
37
37
|
export interface ProStepPropsType {
|
|
38
38
|
/** 步骤条配置项 */
|
|
39
39
|
dataSource?: ItemType[];
|
|
40
|
-
/**
|
|
41
|
-
fixedTop
|
|
40
|
+
/** 距离顶部的偏移量,支持像素值或 CSS 长度 */
|
|
41
|
+
fixedTop?: string | number;
|
|
42
42
|
/** 当前激活的步骤标识 */
|
|
43
43
|
activeKey?: string;
|
|
44
44
|
/** 子组件内容 */
|
|
@@ -13,7 +13,7 @@ export declare const formatColumn: ({ column, originalObj, rowKey, wrapToolTipPr
|
|
|
13
13
|
scroll?: any;
|
|
14
14
|
isInNewRow?: any;
|
|
15
15
|
diffConfig: any;
|
|
16
|
-
editMode?:
|
|
16
|
+
editMode?: 'per-cell-form' | 'shared-form';
|
|
17
17
|
sharedForm?: FormInstance;
|
|
18
18
|
}) => void;
|
|
19
19
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { ProTableTabsType } from '../../propsType';
|
|
2
|
-
declare const _default: import("react").MemoExoticComponent<(props: ProTableTabsType) => import("react
|
|
3
|
+
declare const _default: import("react").MemoExoticComponent<(props: ProTableTabsType) => import("react").JSX.Element>;
|
|
3
4
|
export default _default;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
declare const _default: {
|
|
2
3
|
components: {
|
|
3
4
|
header: {
|
|
@@ -6,7 +7,7 @@ declare const _default: {
|
|
|
6
7
|
onDrag: any;
|
|
7
8
|
width: number;
|
|
8
9
|
minwidth?: number;
|
|
9
|
-
}) => import("react
|
|
10
|
+
}) => import("react").JSX.Element;
|
|
10
11
|
};
|
|
11
12
|
};
|
|
12
13
|
};
|
package/es/ProTable/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare const defaultPage: {
|
|
|
6
6
|
pageNum: number;
|
|
7
7
|
pageSize: number;
|
|
8
8
|
};
|
|
9
|
-
declare const ProTable: React.ForwardRefExoticComponent<ProTableType & React.RefAttributes<any>> & {
|
|
9
|
+
declare const ProTable: React.ForwardRefExoticComponent<ProTableType<any> & React.RefAttributes<any>> & {
|
|
10
10
|
useAntdTable: typeof useAntdTable;
|
|
11
11
|
SELECTION_ALL: typeof SELECTION_ALL;
|
|
12
12
|
CURRENT_PAGE: typeof CURRENT_PAGE;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { DevToolsPropsType } from '../../propsType';
|
|
2
|
-
declare const ProTools: ({ onReset, onClose, setState, open, state, tableBorder, tableStripe, }: DevToolsPropsType) =>
|
|
3
|
+
declare const ProTools: ({ onReset, onClose, setState, open, state, tableBorder, tableStripe, }: DevToolsPropsType) => React.JSX.Element;
|
|
3
4
|
export default ProTools;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { ProThemeToolsType } from './propsType';
|
|
2
3
|
declare const ProThemeTools: {
|
|
3
|
-
({ size, className, cacheTime, color, mode, iconFollowTheme, prefixCls, tableBorder, tableStripe, theme, onChange, ...props }: ProThemeToolsType): import("react
|
|
4
|
+
({ size, className, cacheTime, color, mode, iconFollowTheme, prefixCls, tableBorder, tableStripe, theme, onChange, ...props }: ProThemeToolsType): import("react").JSX.Element;
|
|
4
5
|
setThemes: (themes: import("./utils/index").ThemesProps) => boolean;
|
|
5
6
|
};
|
|
6
7
|
export default ProThemeTools;
|
package/es/ProTooltip/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { ProTooltipType } from './propsType';
|
|
2
|
-
declare const ProTooltip: (props: ProTooltipType) => import("react
|
|
3
|
+
declare const ProTooltip: (props: ProTooltipType) => import("react").JSX.Element;
|
|
3
4
|
export default ProTooltip;
|
|
@@ -12,6 +12,6 @@ interface ListProps {
|
|
|
12
12
|
handleFilterClose?: (code: string) => void;
|
|
13
13
|
optionRender?: (item: any, searchStr?: string) => string | ReactNode;
|
|
14
14
|
}
|
|
15
|
-
declare function List(props: ListProps): import("react
|
|
15
|
+
declare function List(props: ListProps): import("react").JSX.Element;
|
|
16
16
|
declare const _default: import("react").MemoExoticComponent<typeof List>;
|
|
17
17
|
export default _default;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { ProTreeType } from '../propsType';
|
|
2
|
-
declare const ProTree: (props: ProTreeType) => import("react
|
|
3
|
+
declare const ProTree: (props: ProTreeType) => import("react").JSX.Element;
|
|
3
4
|
export default ProTree;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ProTreeSelectType } from './propsType';
|
|
3
|
-
export declare const ProTreeSelect: (props: ProTreeSelectType, ref: React.Ref<unknown> | undefined) =>
|
|
3
|
+
export declare const ProTreeSelect: (props: ProTreeSelectType, ref: React.Ref<unknown> | undefined) => React.JSX.Element;
|
|
4
4
|
declare const _default: React.ForwardRefExoticComponent<ProTreeSelectType & React.RefAttributes<unknown>>;
|
|
5
5
|
export default _default;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { ProFormOtherType } from '../../ProForm/propsType';
|
|
2
3
|
declare function SearchTitle(props: {
|
|
3
4
|
searchStr?: string;
|
|
@@ -5,6 +6,6 @@ declare function SearchTitle(props: {
|
|
|
5
6
|
showEllipse?: boolean;
|
|
6
7
|
ellipseWidth?: string;
|
|
7
8
|
otherProps?: ProFormOtherType;
|
|
8
|
-
}): import("react
|
|
9
|
+
}): import("react").JSX.Element;
|
|
9
10
|
declare const _default: import("react").MemoExoticComponent<typeof SearchTitle>;
|
|
10
11
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import type { ProTreeFieldNamesType, ProTreeType } from '../propsType';
|
|
3
3
|
interface ListProps extends ProTreeType {
|
|
4
4
|
disabled?: boolean;
|
|
@@ -23,5 +23,5 @@ interface ListProps extends ProTreeType {
|
|
|
23
23
|
handleFilterClose?: (code: string, node?: any) => void;
|
|
24
24
|
[key: string]: any;
|
|
25
25
|
}
|
|
26
|
-
declare function List(props: ListProps):
|
|
26
|
+
declare function List(props: ListProps): React.JSX.Element;
|
|
27
27
|
export default List;
|
package/es/ProTree/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { ProTreeType } from './propsType';
|
|
2
|
-
declare const ProTreeHandle: (props: ProTreeType) => import("react
|
|
3
|
+
declare const ProTreeHandle: (props: ProTreeType) => import("react").JSX.Element;
|
|
3
4
|
export default ProTreeHandle;
|
|
@@ -10,5 +10,5 @@ interface CascaderProps {
|
|
|
10
10
|
handleOnChange?: (e: any, value: string) => void;
|
|
11
11
|
optionRender?: (item: any, searchStr: string) => string | ReactNode;
|
|
12
12
|
}
|
|
13
|
-
declare const Cascader: (props: CascaderProps) => import("react
|
|
13
|
+
declare const Cascader: (props: CascaderProps) => import("react").JSX.Element;
|
|
14
14
|
export default Cascader;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
declare function SearchTitle(props: {
|
|
2
3
|
searchStr: string;
|
|
3
4
|
label: string;
|
|
4
|
-
}): import("react
|
|
5
|
+
}): import("react").JSX.Element;
|
|
5
6
|
declare const _default: import("react").MemoExoticComponent<typeof SearchTitle>;
|
|
6
7
|
export default _default;
|
|
@@ -17,5 +17,5 @@ interface TriggerProps {
|
|
|
17
17
|
handleClearAll: () => void;
|
|
18
18
|
appointChange: (appoint?: boolean) => void;
|
|
19
19
|
}
|
|
20
|
-
declare function Trigger(props: TriggerProps): import("react
|
|
20
|
+
declare function Trigger(props: TriggerProps): import("react").JSX.Element;
|
|
21
21
|
export default Trigger;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { ProTreeModalType } from './propsType';
|
|
2
3
|
export declare const CASCADER = "CASCADER";
|
|
3
|
-
declare const ProTreeModal: (props: ProTreeModalType) =>
|
|
4
|
+
declare const ProTreeModal: (props: ProTreeModalType) => React.JSX.Element;
|
|
4
5
|
export default ProTreeModal;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { DraggableUploadListItemType } from '../propsType';
|
|
2
|
-
export declare const DraggableUploadListItem: ({ file, children }: DraggableUploadListItemType) =>
|
|
3
|
+
export declare const DraggableUploadListItem: ({ file, children }: DraggableUploadListItemType) => React.JSX.Element;
|
|
@@ -10,7 +10,7 @@ export interface UseDraggableRowStateOptions {
|
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
}
|
|
12
12
|
export declare const useDraggableRowState: ({ id, disabled }: UseDraggableRowStateOptions) => {
|
|
13
|
-
setNodeRef: (node: HTMLElement
|
|
13
|
+
setNodeRef: (node: HTMLElement) => void;
|
|
14
14
|
style: React.CSSProperties;
|
|
15
15
|
listeners: import("@dnd-kit/core/dist/hooks/utilities").SyntheticListenerMap;
|
|
16
16
|
attributes: import("@dnd-kit/core").DraggableAttributes;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zat-design/sisyphus-react",
|
|
3
|
-
"version": "4.5.8-beta.
|
|
3
|
+
"version": "4.5.8-beta.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -101,22 +101,6 @@
|
|
|
101
101
|
"Firefox ESR",
|
|
102
102
|
"> 1%"
|
|
103
103
|
],
|
|
104
|
-
"overrides": {
|
|
105
|
-
"react-resizable": {
|
|
106
|
-
"react-draggable": "<4.5.0"
|
|
107
|
-
},
|
|
108
|
-
"@babel/core": "^7.26.0",
|
|
109
|
-
"react-docgen-typescript-dumi-tmp": {
|
|
110
|
-
"typescript": "^4.9.5"
|
|
111
|
-
},
|
|
112
|
-
"esbuild": "0.21.4"
|
|
113
|
-
},
|
|
114
|
-
"resolutions": {
|
|
115
|
-
"react-resizable/react-draggable": "<4.5.0",
|
|
116
|
-
"@babel/core": "^7.26.0",
|
|
117
|
-
"react-docgen-typescript-dumi-tmp/typescript": "^4.9.5",
|
|
118
|
-
"esbuild": "0.21.4"
|
|
119
|
-
},
|
|
120
104
|
"dependencies": {
|
|
121
105
|
"@dnd-kit/core": "^6.0.8",
|
|
122
106
|
"@dnd-kit/sortable": "^7.0.2",
|
|
@@ -129,7 +113,7 @@
|
|
|
129
113
|
"idb-keyval": "^6.2.2",
|
|
130
114
|
"lodash": "^4.17.21",
|
|
131
115
|
"react-intersection-observer": "^9.13.0",
|
|
132
|
-
"react-resizable": "^3.
|
|
116
|
+
"react-resizable": "^3.1.3",
|
|
133
117
|
"react-svg": "^17.2.4"
|
|
134
118
|
},
|
|
135
119
|
"peerDependencies": {
|
|
@@ -188,7 +172,8 @@
|
|
|
188
172
|
"react-router-dom": "^6.0.0",
|
|
189
173
|
"stylelint": "^16.0.0",
|
|
190
174
|
"stylelint-checkstyle-formatter": "0.1.2",
|
|
191
|
-
"typescript": "^5.4.0"
|
|
175
|
+
"typescript": "^5.4.0",
|
|
176
|
+
"typescript-dumi1": "npm:typescript@4.9.5"
|
|
192
177
|
},
|
|
193
178
|
"checkFiles": [
|
|
194
179
|
"src/**/*.js*",
|