ebaoferc 0.3.6 → 1.0.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/components/MindGraph/core/helper/index.d.ts +15 -15
- package/dist/components/MindGraph/core/render/index.d.ts +12 -12
- package/dist/components/MindGraph/react/hook/use-shadow-state.d.ts +1 -1
- package/dist/components/StyledTable/index.d.ts +1 -1
- package/dist/components/StyledTable/index.js +9 -7
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/useTabRouteWatcher/index.d.ts +5 -0
- package/dist/hooks/useTabRouteWatcher/index.js +26 -0
- package/package.json +3 -2
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
export declare const Helper: {
|
|
2
|
-
breadthFirstWalkTree: (node: import("
|
|
3
|
-
before: (node: import("
|
|
4
|
-
after: (rank: import("
|
|
2
|
+
breadthFirstWalkTree: (node: import("../../../..").Mind.Node, callback: {
|
|
3
|
+
before: (node: import("../../../..").Mind.Node) => boolean;
|
|
4
|
+
after: (rank: import("../../../..").Mind.Node[]) => void;
|
|
5
5
|
}) => void;
|
|
6
|
-
depthFirstWalkTree: (root: import("
|
|
7
|
-
before: (node: import("
|
|
8
|
-
after: (node: import("
|
|
6
|
+
depthFirstWalkTree: (root: import("../../../..").Mind.Node, callback: {
|
|
7
|
+
before: (node: import("../../../..").Mind.Node, parent?: import("../../../..").Mind.Node | undefined) => boolean;
|
|
8
|
+
after: (node: import("../../../..").Mind.Node, parent?: import("../../../..").Mind.Node | undefined) => void;
|
|
9
9
|
}) => void;
|
|
10
|
-
descendant: (node: import("
|
|
10
|
+
descendant: (node: import("../../../..").Mind.Node) => import("../../../..").Mind.Node[];
|
|
11
11
|
error: (message: string) => Error;
|
|
12
|
-
getLayoutCalcChildren: (node: import("
|
|
12
|
+
getLayoutCalcChildren: (node: import("../../../..").Mind.Node, rootId: string, getRootHeirOrientation: import("../process").Process.getRootHeirOrientationFunc) => import("../../../..").Mind.Node[];
|
|
13
13
|
getSvgPathId: (id: string) => string;
|
|
14
|
-
judgeIfAllChildFold: (node: import("
|
|
15
|
-
judgeIfHeirAndFold: (node: import("
|
|
16
|
-
judgeIfVisualLeaf: (node: import("
|
|
17
|
-
rootToNodeArray: (root: import("
|
|
18
|
-
transformRootToWalkable: (root: import("
|
|
19
|
-
getRootHeirOrientation: (id: string) => import("
|
|
20
|
-
shadowNode: import("
|
|
14
|
+
judgeIfAllChildFold: (node: import("../../../..").Mind.Node, rootId: string) => boolean;
|
|
15
|
+
judgeIfHeirAndFold: (node: import("../../../..").Mind.Node, parent: import("../../../..").Mind.Node | undefined, root: import("../../../..").Mind.Root, getRootHeirOrientation: import("../process").Process.getRootHeirOrientationFunc) => boolean;
|
|
16
|
+
judgeIfVisualLeaf: (node: import("../../../..").Mind.Node, children?: import("../../../..").Mind.Node[] | undefined) => boolean | boolean[] | undefined;
|
|
17
|
+
rootToNodeArray: (root: import("../../../..").Mind.Root, callback: (node: import("../../../..").Mind.Node) => void) => import("../../../..").Mind.Node[];
|
|
18
|
+
transformRootToWalkable: (root: import("../../../..").Mind.Root) => {
|
|
19
|
+
getRootHeirOrientation: (id: string) => import("../../../..").Mind.Orientation;
|
|
20
|
+
shadowNode: import("../../../..").Mind.Node;
|
|
21
21
|
};
|
|
22
22
|
withPrefix: (message: string) => string;
|
|
23
23
|
};
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
export declare const Render: {
|
|
2
2
|
calcVisible: (context: {
|
|
3
|
-
cacheMap: import("
|
|
4
|
-
options: Required<import("
|
|
5
|
-
root: import("
|
|
3
|
+
cacheMap: import("../../../..").Mind.CacheMap;
|
|
4
|
+
options: Required<import("../../../..").Mind.Options>;
|
|
5
|
+
root: import("../../../..").Mind.Root;
|
|
6
6
|
container: HTMLElement;
|
|
7
7
|
viewport: HTMLElement;
|
|
8
|
-
transform: import("
|
|
8
|
+
transform: import("../../../..").Mind.Transform;
|
|
9
9
|
zoom: import("../graphic/zoom").Zoom;
|
|
10
|
-
}) => import("
|
|
10
|
+
}) => import("../../../..").Mind.Visible;
|
|
11
11
|
connect: (context: {
|
|
12
|
-
cacheMap: import("
|
|
13
|
-
options: Required<import("
|
|
14
|
-
root: import("
|
|
12
|
+
cacheMap: import("../../../..").Mind.CacheMap;
|
|
13
|
+
options: Required<import("../../../..").Mind.Options>;
|
|
14
|
+
root: import("../../../..").Mind.Root;
|
|
15
15
|
container: HTMLElement;
|
|
16
16
|
}) => void;
|
|
17
17
|
layout: (context: {
|
|
18
|
-
cacheMap: import("
|
|
19
|
-
options: Required<import("
|
|
20
|
-
root: import("
|
|
18
|
+
cacheMap: import("../../../..").Mind.CacheMap;
|
|
19
|
+
options: Required<import("../../../..").Mind.Options>;
|
|
20
|
+
root: import("../../../..").Mind.Root;
|
|
21
21
|
container: HTMLElement;
|
|
22
22
|
viewport: HTMLElement;
|
|
23
|
-
transform: import("
|
|
23
|
+
transform: import("../../../..").Mind.Transform;
|
|
24
24
|
anchor?: string | undefined;
|
|
25
25
|
zoom: import("../graphic/zoom").Zoom;
|
|
26
26
|
}) => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const useShadowState: <T>(init?: T
|
|
2
|
+
export declare const useShadowState: <T>(init?: T) => readonly [T, (update: T | ((prevState: T) => T)) => void, import("react").MutableRefObject<T>];
|
|
@@ -11,7 +11,7 @@ export declare const PaginationCommonProps: {
|
|
|
11
11
|
showQuickJumper: boolean;
|
|
12
12
|
showTotal: (total: number) => string;
|
|
13
13
|
};
|
|
14
|
-
export declare const TableCellText: (text: string | number, cellWidth: any, maxTooltipWidth: any, maxTooltipHeight: any) => import("react/jsx-runtime").JSX.Element
|
|
14
|
+
export declare const TableCellText: (text: string | number, cellWidth: any, maxTooltipWidth: any, maxTooltipHeight: any) => "-" | import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
export default function (props: StyledTableProps): import("react/jsx-runtime").JSX.Element;
|
|
16
16
|
export declare const useRowSelection: () => {
|
|
17
17
|
selectedRowKeys: any[];
|
|
@@ -41,13 +41,15 @@ export var TableCellText = function TableCellText(text, cellWidth, maxTooltipWid
|
|
|
41
41
|
color: '#fff',
|
|
42
42
|
title: val,
|
|
43
43
|
placement: 'topLeft',
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
styles: {
|
|
45
|
+
body: {
|
|
46
|
+
color: '#000',
|
|
47
|
+
width: _maxWidth,
|
|
48
|
+
lineHeight: '22px',
|
|
49
|
+
maxHeight: maxTooltipHeight,
|
|
50
|
+
overflow: 'auto',
|
|
51
|
+
padding: '15px 10px 15px 15px'
|
|
52
|
+
}
|
|
51
53
|
}
|
|
52
54
|
}
|
|
53
55
|
},
|
package/dist/hooks/index.d.ts
CHANGED
package/dist/hooks/index.js
CHANGED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { history } from '@umijs/max';
|
|
2
|
+
import { useEffect, useRef } from 'react';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 项目多tab模式,某个tab下,监听路由变化,当重新回到该tab时,执行回调
|
|
6
|
+
* @param onRefresh 路由变化时执行的回调
|
|
7
|
+
*/
|
|
8
|
+
export var useTabRouteWatcher = function useTabRouteWatcher(onRefresh) {
|
|
9
|
+
var pathname = useRef(window.location.pathname);
|
|
10
|
+
useEffect(function () {
|
|
11
|
+
var unlisten = history.listen(function (_ref) {
|
|
12
|
+
var location = _ref.location;
|
|
13
|
+
if (location.pathname === pathname.current) {
|
|
14
|
+
try {
|
|
15
|
+
onRefresh === null || onRefresh === void 0 || onRefresh();
|
|
16
|
+
} catch (error) {
|
|
17
|
+
console.error(error);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
return function () {
|
|
22
|
+
unlisten();
|
|
23
|
+
};
|
|
24
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
25
|
+
}, []);
|
|
26
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ebaoferc",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "A react library developed with dumi",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -46,7 +46,8 @@
|
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"d3": "^7.9.0",
|
|
49
|
-
"dagre": "^0.8.5"
|
|
49
|
+
"dagre": "^0.8.5",
|
|
50
|
+
"@umijs/max": "^4.1.10"
|
|
50
51
|
},
|
|
51
52
|
"devDependencies": {
|
|
52
53
|
"@ant-design/icons": "^5.3.7",
|