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.
@@ -1,23 +1,23 @@
1
1
  export declare const Helper: {
2
- breadthFirstWalkTree: (node: import("..").Mind.Node, callback: {
3
- before: (node: import("..").Mind.Node) => boolean;
4
- after: (rank: import("..").Mind.Node[]) => void;
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("..").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;
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("..").Mind.Node) => import("..").Mind.Node[];
10
+ descendant: (node: import("../../../..").Mind.Node) => import("../../../..").Mind.Node[];
11
11
  error: (message: string) => Error;
12
- getLayoutCalcChildren: (node: import("..").Mind.Node, rootId: string, getRootHeirOrientation: import("../process").Process.getRootHeirOrientationFunc) => import("..").Mind.Node[];
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("..").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;
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("..").Mind.CacheMap;
4
- options: Required<import("..").Mind.Options>;
5
- root: import("..").Mind.Root;
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("..").Mind.Transform;
8
+ transform: import("../../../..").Mind.Transform;
9
9
  zoom: import("../graphic/zoom").Zoom;
10
- }) => import("..").Mind.Visible;
10
+ }) => import("../../../..").Mind.Visible;
11
11
  connect: (context: {
12
- cacheMap: import("..").Mind.CacheMap;
13
- options: Required<import("..").Mind.Options>;
14
- root: import("..").Mind.Root;
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("..").Mind.CacheMap;
19
- options: Required<import("..").Mind.Options>;
20
- root: import("..").Mind.Root;
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("..").Mind.Transform;
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 | undefined) => readonly [T, (update: T | ((prevState: T) => T)) => void, import("react").MutableRefObject<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
- overlayInnerStyle: {
45
- color: '#000',
46
- width: _maxWidth,
47
- lineHeight: '22px',
48
- maxHeight: maxTooltipHeight,
49
- overflow: 'auto',
50
- padding: '15px 5px 15px 15px'
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
  },
@@ -1,3 +1,4 @@
1
1
  export * from './useBIHooks';
2
2
  export * from './useEnhancePagination';
3
+ export * from './useTabRouteWatcher';
3
4
  export * from './useTabsTablePagination/index';
@@ -1,3 +1,4 @@
1
1
  export * from "./useBIHooks";
2
2
  export * from "./useEnhancePagination";
3
+ export * from "./useTabRouteWatcher";
3
4
  export * from "./useTabsTablePagination/index";
@@ -0,0 +1,5 @@
1
+ /**
2
+ * 项目多tab模式,某个tab下,监听路由变化,当重新回到该tab时,执行回调
3
+ * @param onRefresh 路由变化时执行的回调
4
+ */
5
+ export declare const useTabRouteWatcher: (onRefresh: () => void) => void;
@@ -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.6",
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",