@zat-design/sisyphus-react 4.5.8-beta.5 → 4.5.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/dist/index.esm.css +1 -1
  2. package/dist/less.esm.css +1 -1
  3. package/es/ProAction/components/CheckModalContent/index.d.ts +1 -2
  4. package/es/ProDownload/index.d.ts +1 -2
  5. package/es/ProEditTable/components/ActionButton/index.d.ts +1 -2
  6. package/es/ProEditTable/components/RcTable/BaseTable.d.ts +1 -1
  7. package/es/ProEditTable/components/RcTable/DraggableTable.d.ts +1 -1
  8. package/es/ProEditTable/components/RenderField/index.d.ts +1 -1
  9. package/es/ProEditTable/components/RenderField/index.js +48 -37
  10. package/es/ProEditTable/components/RenderToolbar/index.d.ts +1 -2
  11. package/es/ProEditTable/components/Summary/index.d.ts +1 -2
  12. package/es/ProEditTable/index.d.ts +1 -1
  13. package/es/ProEditTable/index.js +66 -36
  14. package/es/ProEditTable/utils/config.d.ts +1 -2
  15. package/es/ProEditTable/utils/useShouldUpdateForTable.d.ts +2 -0
  16. package/es/ProEditTable/utils/useShouldUpdateForTable.js +24 -8
  17. package/es/ProEnum/components/Group.d.ts +1 -2
  18. package/es/ProEnum/components/Tag.d.ts +1 -2
  19. package/es/ProEnum/index.d.ts +2 -3
  20. package/es/ProEnum/utils/getEnumLabel.d.ts +1 -2
  21. package/es/ProForm/components/base/Input/index.d.ts +1 -2
  22. package/es/ProForm/components/combination/FormList/components/Empty.d.ts +1 -2
  23. package/es/ProForm/components/combination/ProCascader/index.d.ts +1 -1
  24. package/es/ProForm/hooks/useForm.d.ts +1 -1
  25. package/es/ProLayout/components/Layout/Menu/OpenMenu/index.d.ts +1 -2
  26. package/es/ProLayout/components/ProCollapse/index.d.ts +1 -2
  27. package/es/ProLayout/components/ProFooter/index.d.ts +1 -1
  28. package/es/ProLayout/components/ProHeader/components/Copy/index.d.ts +1 -2
  29. package/es/ProLayout/components/ProHeader/components/Describe/index.d.ts +3 -3
  30. package/es/ProLayout/components/ProHeader/index.d.ts +1 -1
  31. package/es/ProLayout/components/TabsManager/components/TabContextMenu.d.ts +1 -2
  32. package/es/ProLayout/components/TabsManager/components/TabsHeader.d.ts +1 -2
  33. package/es/ProLayout/components/TabsManager/components/TabsHeader.js +1 -0
  34. package/es/ProLayout/index.d.ts +4 -4
  35. package/es/ProLayout/index.js +22 -2
  36. package/es/ProLayout/style/index.less +2 -3
  37. package/es/ProSelect/components/AdaptiveTooltip.d.ts +1 -2
  38. package/es/ProSelect/index.d.ts +1 -1
  39. package/es/ProStep/components/Anchor/index.d.ts +2 -2
  40. package/es/ProStep/components/Step/index.d.ts +1 -2
  41. package/es/ProStep/style/index.less +6 -3
  42. package/es/ProTable/components/EditableCell/EditIcon.js +2 -6
  43. package/es/ProTable/components/EditableCell/index.less +0 -5
  44. package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.d.ts +1 -1
  45. package/es/ProTable/components/RenderFooter/index.d.ts +1 -2
  46. package/es/ProTable/components/RenderTableHeader/index.d.ts +1 -2
  47. package/es/ProTable/components/RenderTabs/index.d.ts +1 -1
  48. package/es/ProTable/components/TableResizable/index.d.ts +1 -2
  49. package/es/ProTabs/components/Card/index.d.ts +1 -2
  50. package/es/ProThemeTools/component/ProTools/index.d.ts +1 -2
  51. package/es/ProThemeTools/index.d.ts +1 -2
  52. package/es/ProTooltip/index.d.ts +1 -2
  53. package/es/ProTree/components/AdaptiveTooltip.d.ts +1 -2
  54. package/es/ProTree/components/CloseIcon.d.ts +1 -2
  55. package/es/ProTree/components/List.d.ts +1 -1
  56. package/es/ProTree/components/ProTree.d.ts +1 -2
  57. package/es/ProTree/components/ProTreeSelect/index.d.ts +1 -1
  58. package/es/ProTree/components/SearchTitle.d.ts +1 -1
  59. package/es/ProTree/components/Tree.d.ts +2 -2
  60. package/es/ProTree/index.d.ts +1 -2
  61. package/es/ProTreeModal/components/Cascader.d.ts +1 -1
  62. package/es/ProTreeModal/components/CloseIcon.d.ts +1 -2
  63. package/es/ProTreeModal/components/SearchTitle.d.ts +1 -1
  64. package/es/ProTreeModal/components/Trigger.d.ts +1 -1
  65. package/es/ProTreeModal/components/Trigger.js +22 -16
  66. package/es/ProTreeModal/index.d.ts +1 -2
  67. package/es/ProTreeModal/index.js +199 -187
  68. package/es/ProTreeModal/style/index.less +25 -1
  69. package/es/ProUpload/components/DraggableUploadListItem.d.ts +1 -2
  70. package/package.json +2 -1
  71. package/es/assets/edit.svg +0 -1
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { FormInstance, FormListOperation } from 'antd';
3
2
  import type { InternalNamePath } from 'antd/es/form/interface';
4
3
  import type { ToolbarActionType } from '../propsType';
@@ -10,5 +9,5 @@ interface EmptyProps {
10
9
  namePath?: InternalNamePath;
11
10
  emptyBtnText?: string;
12
11
  }
13
- declare const Empty: ({ disabled, toolbarProps, operation, form, namePath, emptyBtnText }: EmptyProps) => import("react").JSX.Element;
12
+ declare const Empty: ({ disabled, toolbarProps, operation, form, namePath, emptyBtnText }: EmptyProps) => import("react/jsx-runtime").JSX.Element;
14
13
  export default Empty;
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import type { ProCascaderType } from './propsType';
3
- declare const _default: import("react").MemoExoticComponent<(props: ProCascaderType) => import("react").JSX.Element>;
3
+ declare const _default: import("react").MemoExoticComponent<(props: ProCascaderType) => import("react/jsx-runtime").JSX.Element>;
4
4
  export default _default;
@@ -5,4 +5,4 @@ export interface FormInstanceOption {
5
5
  formKey?: string;
6
6
  source?: string;
7
7
  }
8
- export declare const useForm: <T>(originForm?: ModifiedFormInstanceType<T> | FormInstanceOption, options?: FormInstanceOption) => [ModifiedFormInstanceType<T>];
8
+ export declare const useForm: <T>(originForm?: FormInstanceOption | ModifiedFormInstanceType<T>, options?: FormInstanceOption) => [ModifiedFormInstanceType<T>];
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { OpenMenuPropsType } from './propsType';
3
- declare const OpenMenu: (props: OpenMenuPropsType) => import("react").JSX.Element;
2
+ declare const OpenMenu: (props: OpenMenuPropsType) => import("react/jsx-runtime").JSX.Element;
4
3
  export default OpenMenu;
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import type { ProCollapseType } from './PropTypes';
3
- declare const ProCollapse: (props: ProCollapseType) => React.JSX.Element;
2
+ declare const ProCollapse: (props: ProCollapseType) => import("react/jsx-runtime").JSX.Element;
4
3
  export default ProCollapse;
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import type { ProFooterType } from './PropTypes';
3
- declare const _default: import("react").MemoExoticComponent<(props: ProFooterType) => import("react").JSX.Element>;
3
+ declare const _default: import("react").MemoExoticComponent<(props: ProFooterType) => import("react/jsx-runtime").JSX.Element>;
4
4
  export default _default;
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
1
  declare const Copy: ({ text }: {
3
2
  text: any;
4
- }) => import("react").JSX.Element;
3
+ }) => import("react/jsx-runtime").JSX.Element;
5
4
  export default Copy;
@@ -8,13 +8,13 @@ type DescribeValueItem = Pick<DescribeColumnType, 'tag' | 'link' | 'value' | 'co
8
8
  export declare const DescribeTag: ({ tag, parentKey, }: {
9
9
  tag?: DescribeColumnType['tag'];
10
10
  parentKey: string;
11
- }) => React.JSX.Element;
11
+ }) => import("react/jsx-runtime").JSX.Element;
12
12
  /**
13
13
  * 单行值渲染:link → <a>,copyable+字符串 → 复制按钮,末尾追加 tag
14
14
  */
15
15
  export declare const DescribeValue: ({ value, link, copyable, tag, parentKey, }: DescribeValueItem & {
16
16
  parentKey: string;
17
- }) => React.JSX.Element;
17
+ }) => import("react/jsx-runtime").JSX.Element;
18
18
  /**
19
19
  * 多值渲染:以「、」连接;超 3 个显示「共N个,」前缀;内容溢出时显示「...」并用 Tooltip 展示全部
20
20
  */
@@ -22,5 +22,5 @@ export declare const DescribeItems: ({ items, parentKey, containerRef, }: {
22
22
  items: DescribeValueItem[];
23
23
  parentKey: string;
24
24
  containerRef: React.RefObject<HTMLDivElement>;
25
- }) => React.JSX.Element;
25
+ }) => import("react/jsx-runtime").JSX.Element;
26
26
  export {};
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import type { ProHeaderType } from './PropTypes';
3
- declare const _default: React.MemoExoticComponent<(props: ProHeaderType) => React.JSX.Element>;
3
+ declare const _default: React.MemoExoticComponent<(props: ProHeaderType) => import("react/jsx-runtime").JSX.Element>;
4
4
  export default _default;
@@ -1,8 +1,7 @@
1
- /// <reference types="react" />
2
1
  import { TabContextMenuProps } from '../propTypes';
3
2
  /**
4
3
  * 右键菜单组件 - 兼容Antd 4.x和5.x
5
4
  */
6
- declare function TabContextMenu({ tabId, children, closable, onClose, onCloseOthers, onCloseRight, onCloseAll, pinned, pinDisabled, onTogglePin, menuItems: customMenuItems, tabMenuClick, tab, tabs, }: TabContextMenuProps): import("react").JSX.Element;
5
+ declare function TabContextMenu({ tabId, children, closable, onClose, onCloseOthers, onCloseRight, onCloseAll, pinned, pinDisabled, onTogglePin, menuItems: customMenuItems, tabMenuClick, tab, tabs, }: TabContextMenuProps): import("react/jsx-runtime").JSX.Element;
7
6
  export default TabContextMenu;
8
7
  export { TabContextMenu };
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import type { TabsProps } from 'antd';
3
2
  export interface TabsHeaderProps {
4
3
  activeKey: string | undefined;
@@ -8,4 +7,4 @@ export interface TabsHeaderProps {
8
7
  draggable?: boolean;
9
8
  onReorder?: (activeId: string, overId: string) => void;
10
9
  }
11
- export declare function TabsHeader({ activeKey, tabsItems, onTabChange, onTabEdit, draggable, onReorder, }: TabsHeaderProps): React.JSX.Element;
10
+ export declare function TabsHeader({ activeKey, tabsItems, onTabChange, onTabEdit, draggable, onReorder, }: TabsHeaderProps): import("react/jsx-runtime").JSX.Element;
@@ -51,6 +51,7 @@ export function TabsHeader({
51
51
  const tabKeys = (tabsItems ?? []).map(item => item.key);
52
52
  return /*#__PURE__*/_jsx("div", {
53
53
  className: "pro-layout-tabs-header",
54
+ "data-pro-layout-tabs-measure": "true",
54
55
  children: /*#__PURE__*/_jsx(Tabs, {
55
56
  activeKey: activeKey,
56
57
  onChange: onTabChange,
@@ -9,10 +9,10 @@ interface LayoutContextValue {
9
9
  }
10
10
  export declare const LayoutContext: import("react").Context<LayoutContextValue>;
11
11
  declare const ProLayout: {
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>;
12
+ (props: ProLayoutType): import("react/jsx-runtime").JSX.Element;
13
+ ProCollapse: (props: import("../index").ProCollapseType) => import("react/jsx-runtime").JSX.Element;
14
+ ProFooter: import("react").MemoExoticComponent<(props: import("../index").ProFooterType) => import("react/jsx-runtime").JSX.Element>;
15
+ ProHeader: import("react").MemoExoticComponent<(props: import("../index").ProHeaderType) => import("react/jsx-runtime").JSX.Element>;
16
16
  useProLayoutTabs: typeof useProLayoutTabs;
17
17
  useActiveTab: () => import("./propTypes").TabItem;
18
18
  };
@@ -17,6 +17,7 @@ import headerBg from "../assets/header_bg.png";
17
17
  // 全局上下文
18
18
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
19
19
  export const LayoutContext = /*#__PURE__*/createContext(undefined);
20
+ const TABS_HEADER_MEASURE_SELECTOR = '[data-pro-layout-tabs-measure="true"]';
20
21
  const ProLayout = props => {
21
22
  const {
22
23
  children,
@@ -94,26 +95,45 @@ const ProLayout = props => {
94
95
  useLayoutEffect(() => {
95
96
  const noticeEl = notice && !isIframePure ? noticeElRef.current : null;
96
97
  const visibleTabsBarEl = isTabsLayout && hasTabs && !isIframePure ? tabsBarEl : null;
98
+ const visibleTabsHeaderEl = visibleTabsBarEl?.querySelector(TABS_HEADER_MEASURE_SELECTOR);
97
99
  let active = true;
100
+ let animationFrameId;
98
101
  const measureStickyElements = () => {
99
102
  if (!active) return;
100
103
  const nextHeights = {
101
104
  notice: noticeEl?.getBoundingClientRect().height ?? 0,
102
- tabsBar: visibleTabsBarEl?.getBoundingClientRect().height ?? 0
105
+ tabsBar: visibleTabsHeaderEl?.getBoundingClientRect().height ?? 0
103
106
  };
104
107
  setStickyHeights(currentHeights => currentHeights.notice === nextHeights.notice && currentHeights.tabsBar === nextHeights.tabsBar ? currentHeights : nextHeights);
105
108
  };
106
109
  measureStickyElements();
107
- const observedElements = [noticeEl, visibleTabsBarEl].filter(element => element !== null);
110
+ if (typeof window.requestAnimationFrame === 'function') {
111
+ animationFrameId = window.requestAnimationFrame(measureStickyElements);
112
+ }
113
+ const handleTabsTransitionEnd = event => {
114
+ if (event.target === visibleTabsBarEl && event.propertyName === 'grid-template-rows') {
115
+ measureStickyElements();
116
+ }
117
+ };
118
+ visibleTabsBarEl?.addEventListener('transitionend', handleTabsTransitionEnd);
119
+ const observedElements = [noticeEl, visibleTabsHeaderEl].filter(element => element !== null && element !== undefined);
108
120
  if (observedElements.length === 0 || typeof ResizeObserver === 'undefined') {
109
121
  return () => {
110
122
  active = false;
123
+ if (animationFrameId !== undefined) {
124
+ window.cancelAnimationFrame(animationFrameId);
125
+ }
126
+ visibleTabsBarEl?.removeEventListener('transitionend', handleTabsTransitionEnd);
111
127
  };
112
128
  }
113
129
  const resizeObserver = new ResizeObserver(measureStickyElements);
114
130
  observedElements.forEach(element => resizeObserver.observe(element));
115
131
  return () => {
116
132
  active = false;
133
+ if (animationFrameId !== undefined) {
134
+ window.cancelAnimationFrame(animationFrameId);
135
+ }
136
+ visibleTabsBarEl?.removeEventListener('transitionend', handleTabsTransitionEnd);
117
137
  resizeObserver.disconnect();
118
138
  };
119
139
  }, [hasTabs, isIframePure, isTabsLayout, notice, tabsBarEl]);
@@ -388,11 +388,10 @@
388
388
 
389
389
  .pro-layout-tabs-content {
390
390
  > .tab-pane {
391
- // ProStep 以 ProHeader 开头时,去掉 tabs 内容区的顶部/右侧外层留白。
392
- // ProStep 保持默认 right: 0,内容与收起态步骤条保留 16px 间距;左侧缩进不变。
391
+ // ProStep 以 ProHeader 开头时,仅去掉 tabs 内容区的顶部留白。
392
+ // 保留右侧内边距,让 ProStep wrapper 继续为贴右步骤条预留 16px 间距。
393
393
  > .pro-step-wrapper:has(> .pro-header:first-child) {
394
394
  margin-top: calc(-1px - var(--zaui-space-size-md, 16px));
395
- margin-right: calc(-1px - var(--zaui-space-size-md, 16px));
396
395
  }
397
396
 
398
397
  > .pro-header.pro-header-no-describe:first-child {
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
1
  declare const AdaptiveTooltip: ({ children }: {
3
2
  children: any;
4
- }) => import("react").JSX.Element;
3
+ }) => import("react/jsx-runtime").JSX.Element;
5
4
  export default AdaptiveTooltip;
@@ -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) => React.JSX.Element;
3
+ export declare const ProSelect: (props: PropSelectType, ref: React.Ref<ProSelectActionType> | undefined) => import("react/jsx-runtime").JSX.Element;
4
4
  declare const _default: React.ForwardRefExoticComponent<PropSelectType & React.RefAttributes<ProSelectActionType>>;
5
5
  export default _default;
@@ -1,4 +1,4 @@
1
- import type { ReactNode } from 'react';
1
+ import type { ReactElement } from 'react';
2
2
  import { MenuItemProps } from '../../propsType';
3
- export declare const MenuItem: (props: MenuItemProps) => ReactNode;
3
+ export declare const MenuItem: (props: MenuItemProps) => ReactElement;
4
4
  export default MenuItem;
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import { ProStepType } from '../../propsType';
3
2
  export declare const Step: ({ fixedTop, dataSource, activeKey, errorCollection, style, targetOffset, scrollToError, onAnchorClick, }: import("../../propsType").ProStepPropsType & {
4
3
  errorCollection: object;
@@ -6,5 +5,5 @@ export declare const Step: ({ fixedTop, dataSource, activeKey, errorCollection,
6
5
  targetOffset?: string | number;
7
6
  scrollToError?: boolean;
8
7
  }) => void;
9
- }) => React.JSX.Element;
8
+ }) => import("react/jsx-runtime").JSX.Element;
10
9
  export default Step;
@@ -1,14 +1,17 @@
1
1
  @import '../../style/variables.less';
2
2
 
3
+ @pro-step-closed-width: 48px;
4
+ @pro-step-content-gap: var(--zaui-space-size-md, 16px);
5
+
3
6
  .pro-step-wrapper {
4
- padding-right: 48px;
7
+ padding-right: calc(@pro-step-closed-width - @pro-step-content-gap);
5
8
  }
6
9
 
7
10
  .pro-step {
8
11
  position: fixed;
9
12
  right: 0;
10
13
  z-index: 99;
11
- min-width: 48px;
14
+ min-width: @pro-step-closed-width;
12
15
  min-height: 48px;
13
16
  overflow-x: hidden;
14
17
  overflow-y: auto;
@@ -217,6 +220,6 @@
217
220
  }
218
221
 
219
222
  &.pro-step-closed {
220
- width: 48px;
223
+ width: @pro-step-closed-width;
221
224
  }
222
225
  }
@@ -1,6 +1,5 @@
1
+ import { EditOutlined } from '@ant-design/icons';
1
2
  import React from 'react';
2
- import ProIcon from "../../../ProIcon";
3
- import editSvg from "../../../assets/edit.svg";
4
3
  import styles from "./index.less";
5
4
  import { jsx as _jsx } from "react/jsx-runtime";
6
5
  const EditIcon = ({
@@ -9,10 +8,7 @@ const EditIcon = ({
9
8
  return /*#__PURE__*/_jsx("span", {
10
9
  className: styles['editable-cell-edit-icon'],
11
10
  onClick: onClick,
12
- children: /*#__PURE__*/_jsx(ProIcon, {
13
- src: editSvg,
14
- size: "20px"
15
- })
11
+ children: /*#__PURE__*/_jsx(EditOutlined, {})
16
12
  });
17
13
  };
18
14
  export default EditIcon;
@@ -14,10 +14,6 @@
14
14
  color: rgba(0, 0, 0, 0.65);
15
15
  flex-shrink: 0;
16
16
 
17
- svg path {
18
- fill: currentColor !important;
19
- }
20
-
21
17
  &:hover {
22
18
  color: var(--zaui-brand, #006aff);
23
19
  }
@@ -26,4 +22,3 @@
26
22
  td:hover .editable-cell-edit-icon {
27
23
  visibility: visible;
28
24
  }
29
-
@@ -14,5 +14,5 @@ declare const DndWrapper: ({ draggable, value, onChange, disabled, children, row
14
14
  rowKey: any;
15
15
  onDragStartGuard: any;
16
16
  onDragEndGuard: any;
17
- }) => React.JSX.Element;
17
+ }) => import("react/jsx-runtime").JSX.Element;
18
18
  export default DndWrapper;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
- declare const RenderFooter: (props: any) => import("react").JSX.Element;
1
+ declare const RenderFooter: (props: any) => import("react/jsx-runtime").JSX.Element;
3
2
  export default RenderFooter;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
- declare const RenderTableHeader: (props: any) => import("react").JSX.Element;
1
+ declare const RenderTableHeader: (props: any) => import("react/jsx-runtime").JSX.Element;
3
2
  export default RenderTableHeader;
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import type { ProTableTabsType } from '../../propsType';
3
- declare const _default: import("react").MemoExoticComponent<(props: ProTableTabsType) => import("react").JSX.Element>;
3
+ declare const _default: import("react").MemoExoticComponent<(props: ProTableTabsType) => import("react/jsx-runtime").JSX.Element>;
4
4
  export default _default;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const _default: {
3
2
  components: {
4
3
  header: {
@@ -7,7 +6,7 @@ declare const _default: {
7
6
  onDrag: any;
8
7
  width: number;
9
8
  minwidth?: number;
10
- }) => import("react").JSX.Element;
9
+ }) => import("react/jsx-runtime").JSX.Element;
11
10
  };
12
11
  };
13
12
  };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CardType } from '../../propType';
3
- declare const Card: (props: CardType) => import("react").JSX.Element;
2
+ declare const Card: (props: CardType) => import("react/jsx-runtime").JSX.Element;
4
3
  export default Card;
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import type { DevToolsPropsType } from '../../propsType';
3
- declare const ProTools: ({ onReset, onClose, setState, open, state, tableBorder, tableStripe, }: DevToolsPropsType) => React.JSX.Element;
2
+ declare const ProTools: ({ onReset, onClose, setState, open, state, tableBorder, tableStripe, }: DevToolsPropsType) => import("react/jsx-runtime").JSX.Element;
4
3
  export default ProTools;
@@ -1,7 +1,6 @@
1
- /// <reference types="react" />
2
1
  import type { ProThemeToolsType } from './propsType';
3
2
  declare const ProThemeTools: {
4
- ({ size, className, cacheTime, color, mode, iconFollowTheme, prefixCls, tableBorder, tableStripe, theme, onChange, ...props }: ProThemeToolsType): import("react").JSX.Element;
3
+ ({ size, className, cacheTime, color, mode, iconFollowTheme, prefixCls, tableBorder, tableStripe, theme, onChange, ...props }: ProThemeToolsType): import("react/jsx-runtime").JSX.Element;
5
4
  setThemes: (themes: import("./utils/index").ThemesProps) => boolean;
6
5
  };
7
6
  export default ProThemeTools;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { ProTooltipType } from './propsType';
3
- declare const ProTooltip: (props: ProTooltipType) => import("react").JSX.Element;
2
+ declare const ProTooltip: (props: ProTooltipType) => import("react/jsx-runtime").JSX.Element;
4
3
  export default ProTooltip;
@@ -1,5 +1,4 @@
1
- /// <reference types="react" />
2
1
  declare const AdaptiveTooltip: ({ children }: {
3
2
  children: any;
4
- }) => import("react").JSX.Element;
3
+ }) => import("react/jsx-runtime").JSX.Element;
5
4
  export default AdaptiveTooltip;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
- declare function CloseIcon(props: any): import("react").JSX.Element;
1
+ declare function CloseIcon(props: any): import("react/jsx-runtime").JSX.Element;
3
2
  export default CloseIcon;
@@ -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").JSX.Element;
15
+ declare function List(props: ListProps): import("react/jsx-runtime").JSX.Element;
16
16
  declare const _default: import("react").MemoExoticComponent<typeof List>;
17
17
  export default _default;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { ProTreeType } from '../propsType';
3
- declare const ProTree: (props: ProTreeType) => import("react").JSX.Element;
2
+ declare const ProTree: (props: ProTreeType) => import("react/jsx-runtime").JSX.Element;
4
3
  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) => React.JSX.Element;
3
+ export declare const ProTreeSelect: (props: ProTreeSelectType, ref: React.Ref<unknown> | undefined) => import("react/jsx-runtime").JSX.Element;
4
4
  declare const _default: React.ForwardRefExoticComponent<ProTreeSelectType & React.RefAttributes<unknown>>;
5
5
  export default _default;
@@ -6,6 +6,6 @@ declare function SearchTitle(props: {
6
6
  showEllipse?: boolean;
7
7
  ellipseWidth?: string;
8
8
  otherProps?: ProFormOtherType;
9
- }): import("react").JSX.Element;
9
+ }): import("react/jsx-runtime").JSX.Element;
10
10
  declare const _default: import("react").MemoExoticComponent<typeof SearchTitle>;
11
11
  export default _default;
@@ -1,4 +1,4 @@
1
- import React, { ReactNode } from 'react';
1
+ import { 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): React.JSX.Element;
26
+ declare function List(props: ListProps): import("react/jsx-runtime").JSX.Element;
27
27
  export default List;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { ProTreeType } from './propsType';
3
- declare const ProTreeHandle: (props: ProTreeType) => import("react").JSX.Element;
2
+ declare const ProTreeHandle: (props: ProTreeType) => import("react/jsx-runtime").JSX.Element;
4
3
  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").JSX.Element;
13
+ declare const Cascader: (props: CascaderProps) => import("react/jsx-runtime").JSX.Element;
14
14
  export default Cascader;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
- declare function CloseIcon(props: any): import("react").JSX.Element;
1
+ declare function CloseIcon(props: any): import("react/jsx-runtime").JSX.Element;
3
2
  export default CloseIcon;
@@ -2,6 +2,6 @@
2
2
  declare function SearchTitle(props: {
3
3
  searchStr: string;
4
4
  label: string;
5
- }): import("react").JSX.Element;
5
+ }): import("react/jsx-runtime").JSX.Element;
6
6
  declare const _default: import("react").MemoExoticComponent<typeof SearchTitle>;
7
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").JSX.Element;
20
+ declare function Trigger(props: TriggerProps): import("react/jsx-runtime").JSX.Element;
21
21
  export default Trigger;
@@ -6,7 +6,7 @@ import { ReactSVG } from 'react-svg';
6
6
  import { useSetState } from 'ahooks';
7
7
  import locale, { formatMessage } from "../../locale";
8
8
  import viewSvg from "../../assets/view.svg";
9
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
10
10
  function Trigger(props) {
11
11
  const {
12
12
  value,
@@ -26,11 +26,13 @@ function Trigger(props) {
26
26
  const {
27
27
  disabled: appointDisabled
28
28
  } = appointProps || {};
29
- const _tempAppointDisabled = appointDisabled || false;
30
- const _tempDisabled = disabled || false;
31
- const [beforeDisabled, afterDisabled] = Array.isArray(disabled) ? disabled : [_tempDisabled, _tempDisabled];
32
- const [allDisabled, specifyDisabled] = Array.isArray(appointDisabled) ? appointDisabled : [_tempAppointDisabled, _tempAppointDisabled];
33
- const [state, setState] = useSetState({
29
+ const normalizedAppointDisabled = appointDisabled || false;
30
+ const normalizedDisabled = disabled || false;
31
+ const [beforeDisabled, afterDisabled] = Array.isArray(disabled) ? disabled : [normalizedDisabled, normalizedDisabled];
32
+ const [allDisabled, specifyDisabled] = Array.isArray(appointDisabled) ? appointDisabled : [normalizedAppointDisabled, normalizedAppointDisabled];
33
+ const [{
34
+ mode
35
+ }, setState] = useSetState({
34
36
  mode: 'appoint'
35
37
  });
36
38
  useEffect(() => {
@@ -45,17 +47,17 @@ function Trigger(props) {
45
47
  }
46
48
  }, [allValue, value, appoint, checkAll]);
47
49
  const onIconClick = () => {
48
- if (appoint && state.mode === 'all') {
50
+ if (appoint && mode === 'all') {
49
51
  return;
50
52
  }
51
53
  handleClick();
52
54
  };
53
55
  const viewIconClassName = classNames('pro-tree-modal-view-svg', {
54
- 'pro-tree-modal-view-svg-active': !!isView && checkedValues.length > 0 && state.mode !== 'all' && !afterDisabled,
55
- 'pro-tree-modal-view-svg-not-allowed': appoint && state.mode === 'all'
56
+ 'pro-tree-modal-view-svg-active': !!isView && checkedValues.length > 0 && mode !== 'all' && !afterDisabled,
57
+ 'pro-tree-modal-view-svg-not-allowed': appoint && mode === 'all'
56
58
  });
57
59
  const addonAfterClassName = classNames('pro-enum-input-addonAfter', {
58
- 'pro-enum-input-addonAfter-not-allowed': appoint && state.mode === 'all',
60
+ 'pro-enum-input-addonAfter-not-allowed': appoint && mode === 'all',
59
61
  'trigger-no-hover': afterDisabled
60
62
  });
61
63
  if (isView) {
@@ -63,7 +65,8 @@ function Trigger(props) {
63
65
  return /*#__PURE__*/_jsxs("div", {
64
66
  className: "pro-tree-modal-isView",
65
67
  children: [/*#__PURE__*/_jsx("div", {
66
- children: !hasValue ? '-' : state.mode === 'all' ? formatMessage(locale?.ProTreeModal.checkAll1, {
68
+ className: "pro-tree-modal-isView-value",
69
+ children: !hasValue ? '-' : mode === 'all' ? formatMessage(locale?.ProTreeModal.checkAll1, {
67
70
  all: label
68
71
  }) : formatMessage(locale?.ProTreeModal?.checkNumber, {
69
72
  num: checkedValues.length
@@ -92,6 +95,7 @@ function Trigger(props) {
92
95
  if (appoint) {
93
96
  return /*#__PURE__*/_jsxs(Space.Compact, {
94
97
  block: true,
98
+ className: "pro-tree-modal-appoint-compact",
95
99
  style: {
96
100
  ...triggerStyle
97
101
  },
@@ -102,7 +106,7 @@ function Trigger(props) {
102
106
  disabled: beforeDisabled,
103
107
  className: classNames(disabled ? 'trigger-no-hover' : '', appoint ? 'pro-tree-modal-input-appoint' : ''),
104
108
  defaultValue: "appoint",
105
- value: state.mode,
109
+ value: mode,
106
110
  onChange: onAppointChange,
107
111
  options: [{
108
112
  value: 'all',
@@ -116,24 +120,26 @@ function Trigger(props) {
116
120
  }), props.children]
117
121
  });
118
122
  }
119
- return props.children;
123
+ return /*#__PURE__*/_jsx(_Fragment, {
124
+ children: props.children
125
+ });
120
126
  };
121
127
 
122
128
  // 构建 Input 的基础属性
123
129
  const inputProps = {
124
130
  className: classNames(afterDisabled ? 'trigger-no-hover' : '', appoint ? 'pro-tree-modal-input-appoint' : ''),
125
131
  onClick: handleClick,
126
- value: checkedValues.length === 0 ? null : state.mode === 'all' ? formatMessage(locale?.ProTreeModal.checkAll1, {
132
+ value: checkedValues.length === 0 ? null : mode === 'all' ? formatMessage(locale?.ProTreeModal.checkAll1, {
127
133
  all: label
128
134
  }) : formatMessage(locale?.ProTreeModal?.checkNumber, {
129
135
  num: checkedValues.length
130
136
  }),
131
137
  placeholder: locale?.ProTreeModal?.select,
132
- disabled: afterDisabled || state.mode === 'all'
138
+ disabled: afterDisabled || mode === 'all'
133
139
  };
134
140
 
135
141
  // 如果 mode === 'all',不显示 addonAfter,直接返回 Input
136
- if (state.mode === 'all') {
142
+ if (mode === 'all') {
137
143
  return /*#__PURE__*/_jsx(TriggerComponent, {
138
144
  children: /*#__PURE__*/_jsx(Input, {
139
145
  ...inputProps,
@@ -1,5 +1,4 @@
1
- import React from 'react';
2
1
  import type { ProTreeModalType } from './propsType';
3
2
  export declare const CASCADER = "CASCADER";
4
- declare const ProTreeModal: (props: ProTreeModalType) => React.JSX.Element;
3
+ declare const ProTreeModal: (props: ProTreeModalType) => import("react/jsx-runtime").JSX.Element;
5
4
  export default ProTreeModal;