ebaoferc 0.0.3-beta.2 → 0.0.3-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/LICENSE +21 -21
- package/README.md +43 -43
- package/dist/components/FlexRowCol/index.js +3 -3
- package/dist/components/MindGraph/core/graphic/drag.js +15 -15
- package/dist/components/MindGraph/core/graphic/index.js +105 -105
- package/dist/components/MindGraph/core/helper/depth-first-walk-tree.js +4 -4
- package/dist/components/MindGraph/core/helper/descendant.js +3 -3
- package/dist/components/MindGraph/core/helper/get-layout-calc-children.js +6 -6
- package/dist/components/MindGraph/core/helper/judge-if-all-child-fold.js +4 -4
- package/dist/components/MindGraph/core/helper/judge-if-heir-and-fold.js +6 -6
- package/dist/components/MindGraph/core/helper/judge-if-visual-leaf.js +3 -3
- package/dist/components/MindGraph/core/index.d.ts +2 -6
- package/dist/components/MindGraph/core/index.js +26 -26
- package/dist/components/MindGraph/core/process/layout/structured/get-node-cross-boundary.js +7 -7
- package/dist/components/MindGraph/core/process/layout/type.js +20 -20
- package/dist/components/MindGraph/core/process/visible.js +3 -3
- package/dist/components/MindGraph/react/component/index.module.less +71 -71
- package/dist/components/MindGraph/react/scrollbar/axis/index.module.less +47 -47
- package/dist/components/SliderVerify/style.module.less +119 -119
- package/dist/components/StyledQueryFilter/index.js +0 -1
- package/dist/components/StyledQueryFilter/index.less +26 -26
- package/dist/components/StyledTable/index.less +11 -11
- package/dist/components/TabSearchTools/index.d.ts +3 -3
- package/dist/components/TabSearchTools/index.js +0 -2
- package/dist/hooks/useTabsTablePagination/index.d.ts +6 -4
- package/dist/hooks/useTabsTablePagination/index.js +12 -5
- package/dist/utils/format/index.js +8 -8
- package/package.json +98 -98
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
.custom-styled-query-filter {
|
|
2
|
-
display: flex;
|
|
3
|
-
justify-content: space-between;
|
|
4
|
-
column-gap: 16px;
|
|
5
|
-
|
|
6
|
-
&__form {
|
|
7
|
-
flex: 1;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
&__right {
|
|
11
|
-
display: flex;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
justify-content: space-between;
|
|
14
|
-
align-items: flex-end;
|
|
15
|
-
|
|
16
|
-
.ant-btn-link {
|
|
17
|
-
padding-right: 0;
|
|
18
|
-
margin-bottom: 28px;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
&__submitter {
|
|
23
|
-
display: flex;
|
|
24
|
-
column-gap: 8px;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
1
|
+
.custom-styled-query-filter {
|
|
2
|
+
display: flex;
|
|
3
|
+
justify-content: space-between;
|
|
4
|
+
column-gap: 16px;
|
|
5
|
+
|
|
6
|
+
&__form {
|
|
7
|
+
flex: 1;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
&__right {
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
justify-content: space-between;
|
|
14
|
+
align-items: flex-end;
|
|
15
|
+
|
|
16
|
+
.ant-btn-link {
|
|
17
|
+
padding-right: 0;
|
|
18
|
+
margin-bottom: 28px;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&__submitter {
|
|
23
|
+
display: flex;
|
|
24
|
+
column-gap: 8px;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
.styledTableBgColor {
|
|
2
|
-
background: #f9f9f9;
|
|
3
|
-
|
|
4
|
-
td {
|
|
5
|
-
background: #f9f9f9 !important;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
:global(.ant-table-cell-row-hover) {
|
|
9
|
-
background: #f0f0f0 !important;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
1
|
+
.styledTableBgColor {
|
|
2
|
+
background: #f9f9f9;
|
|
3
|
+
|
|
4
|
+
td {
|
|
5
|
+
background: #f9f9f9 !important;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
:global(.ant-table-cell-row-hover) {
|
|
9
|
+
background: #f0f0f0 !important;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { TabsProps } from 'antd';
|
|
3
|
-
type TabSearchToolOption =
|
|
3
|
+
type TabSearchToolOption = Required<TabsProps>['items'][0];
|
|
4
4
|
type OptionAliasMap<T> = {
|
|
5
5
|
[key in keyof T]: keyof TabSearchToolOption;
|
|
6
6
|
};
|
|
@@ -10,6 +10,6 @@ export type TTabSearchToolsProps<T = any> = {
|
|
|
10
10
|
onChange: (activeKey: string) => any;
|
|
11
11
|
tabsProps?: TabsProps;
|
|
12
12
|
};
|
|
13
|
-
export type TTabSearchToolsRef =
|
|
14
|
-
declare const _default: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<TTabSearchToolsProps<any> & import("react").RefAttributes<
|
|
13
|
+
export type TTabSearchToolsRef = object;
|
|
14
|
+
declare const _default: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<TTabSearchToolsProps<any> & import("react").RefAttributes<object>>>;
|
|
15
15
|
export default _default;
|
|
@@ -7,8 +7,6 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
7
7
|
import { Tabs } from 'antd';
|
|
8
8
|
import { resolveAlias } from "../../utils";
|
|
9
9
|
import { forwardRef, memo, useImperativeHandle, useMemo } from 'react';
|
|
10
|
-
|
|
11
|
-
//TabsProps['items'][0];
|
|
12
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
11
|
var TabSearchTools = function TabSearchTools(props, ref) {
|
|
14
12
|
var options = props.options,
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { PaginationOptions, Service } from 'ahooks/lib/usePagination/types';
|
|
2
2
|
type TPaginationHookParams = {
|
|
3
|
+
defaultTabKey: any;
|
|
4
|
+
tabKeyAlias?: string;
|
|
5
|
+
tabKeyMaps?: {
|
|
6
|
+
[key: string]: any[];
|
|
7
|
+
};
|
|
3
8
|
service: Service<any, any>;
|
|
4
9
|
options?: PaginationOptions<any, any>;
|
|
5
10
|
};
|
|
6
|
-
export default function useTabsTablePagination(params: TPaginationHookParams
|
|
7
|
-
defaultTabKey: any;
|
|
8
|
-
tabKeyAlias?: string;
|
|
9
|
-
}): {
|
|
11
|
+
export default function useTabsTablePagination(params: TPaginationHookParams): {
|
|
10
12
|
processQueryFilterOnReset: () => void;
|
|
11
13
|
onChangeTab: (activeKey: string) => void;
|
|
12
14
|
filterConditions: any;
|
|
@@ -16,13 +16,20 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
16
16
|
import { usePagination } from 'ahooks';
|
|
17
17
|
import { isNullOrUndefined } from "../../utils";
|
|
18
18
|
import { useState } from 'react';
|
|
19
|
+
var shortCircuitOperation = function shortCircuitOperation(a, b) {
|
|
20
|
+
return isNullOrUndefined(a) ? b : a;
|
|
21
|
+
};
|
|
19
22
|
export default function useTabsTablePagination(params) {
|
|
20
23
|
var defaultTabKey = params.defaultTabKey,
|
|
21
24
|
_params$tabKeyAlias = params.tabKeyAlias,
|
|
22
|
-
tabKeyAlias = _params$tabKeyAlias === void 0 ? '
|
|
25
|
+
tabKeyAlias = _params$tabKeyAlias === void 0 ? 'tabState' : _params$tabKeyAlias,
|
|
26
|
+
tabKeyMaps = params.tabKeyMaps,
|
|
23
27
|
service = params.service,
|
|
24
28
|
options = params.options;
|
|
25
|
-
var
|
|
29
|
+
var getTabValue = function getTabValue(tabKey) {
|
|
30
|
+
return shortCircuitOperation(tabKeyMaps === null || tabKeyMaps === void 0 ? void 0 : tabKeyMaps[tabKey], tabKey);
|
|
31
|
+
};
|
|
32
|
+
var _useState = useState(_defineProperty({}, tabKeyAlias, getTabValue(defaultTabKey))),
|
|
26
33
|
_useState2 = _slicedToArray(_useState, 2),
|
|
27
34
|
filterConditions = _useState2[0],
|
|
28
35
|
setFilterConditions = _useState2[1];
|
|
@@ -35,7 +42,7 @@ export default function useTabsTablePagination(params) {
|
|
|
35
42
|
var newConditions = _objectSpread(_objectSpread({}, restParams), {}, _defineProperty({
|
|
36
43
|
page: current,
|
|
37
44
|
limit: pageSize
|
|
38
|
-
}, tabKeyAlias,
|
|
45
|
+
}, tabKeyAlias, getTabValue(shortCircuitOperation(restParams === null || restParams === void 0 ? void 0 : restParams[tabKeyAlias], filterConditions === null || filterConditions === void 0 ? void 0 : filterConditions[tabKeyAlias]))));
|
|
39
46
|
setFilterConditions(newConditions);
|
|
40
47
|
return service(newConditions);
|
|
41
48
|
}, options);
|
|
@@ -43,14 +50,14 @@ export default function useTabsTablePagination(params) {
|
|
|
43
50
|
setFilterConditions(_defineProperty({
|
|
44
51
|
page: 1,
|
|
45
52
|
limit: 10
|
|
46
|
-
}, tabKeyAlias, filterConditions === null || filterConditions === void 0 ? void 0 : filterConditions[tabKeyAlias]));
|
|
53
|
+
}, tabKeyAlias, getTabValue(filterConditions === null || filterConditions === void 0 ? void 0 : filterConditions[tabKeyAlias])));
|
|
47
54
|
};
|
|
48
55
|
var onChangeTab = function onChangeTab(activeKey) {
|
|
49
56
|
var _paginationHookRes$ru;
|
|
50
57
|
var newFilterConditions = _objectSpread(_objectSpread({}, filterConditions), {}, _defineProperty({
|
|
51
58
|
page: 1,
|
|
52
59
|
limit: 10
|
|
53
|
-
}, tabKeyAlias, activeKey));
|
|
60
|
+
}, tabKeyAlias, getTabValue(activeKey)));
|
|
54
61
|
setFilterConditions(newFilterConditions);
|
|
55
62
|
paginationHookRes === null || paginationHookRes === void 0 || (_paginationHookRes$ru = paginationHookRes.run) === null || _paginationHookRes$ru === void 0 || _paginationHookRes$ru.call(paginationHookRes, newFilterConditions);
|
|
56
63
|
};
|
|
@@ -13,10 +13,10 @@ export function resolveAlias(obj, aliasMap) {
|
|
|
13
13
|
export function isNullOrUndefined(target) {
|
|
14
14
|
return target === null || target === undefined;
|
|
15
15
|
}
|
|
16
|
-
/**
|
|
17
|
-
* 表格序号
|
|
18
|
-
* @param TableRiwNoType
|
|
19
|
-
* @returns
|
|
16
|
+
/**
|
|
17
|
+
* 表格序号
|
|
18
|
+
* @param TableRiwNoType
|
|
19
|
+
* @returns
|
|
20
20
|
*/
|
|
21
21
|
export function computedTableRowSerialNo(_ref) {
|
|
22
22
|
var pagination = _ref.pagination,
|
|
@@ -30,10 +30,10 @@ export function computedTableRowSerialNo(_ref) {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
/**
|
|
34
|
-
* 对中国手机号进行加密中间四位。
|
|
35
|
-
* @param phoneNumber - 需要加密的手机号
|
|
36
|
-
* @returns 加密后的手机号
|
|
33
|
+
/**
|
|
34
|
+
* 对中国手机号进行加密中间四位。
|
|
35
|
+
* @param phoneNumber - 需要加密的手机号
|
|
36
|
+
* @returns 加密后的手机号
|
|
37
37
|
*/
|
|
38
38
|
export function encryptPhoneNumber(phoneNumber) {
|
|
39
39
|
// 将中间四位替换为星号
|
package/package.json
CHANGED
|
@@ -1,98 +1,98 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "ebaoferc",
|
|
3
|
-
"version": "0.0.3-beta.
|
|
4
|
-
"description": "A react library developed with dumi",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"module": "dist/index.js",
|
|
7
|
-
"types": "dist/index.d.ts",
|
|
8
|
-
"files": [
|
|
9
|
-
"dist"
|
|
10
|
-
],
|
|
11
|
-
"scripts": {
|
|
12
|
-
"build": "father build",
|
|
13
|
-
"build:watch": "father dev",
|
|
14
|
-
"dev": "dumi dev",
|
|
15
|
-
"docs:build": "dumi build",
|
|
16
|
-
"docs:preview": "dumi preview",
|
|
17
|
-
"doctor": "father doctor",
|
|
18
|
-
"lint": "npm run lint:es && npm run lint:css",
|
|
19
|
-
"lint:css": "stylelint \"{src,test}/**/*.{css,less}\"",
|
|
20
|
-
"lint:es": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
|
|
21
|
-
"prepare": "husky install && dumi setup",
|
|
22
|
-
"prepublishOnly": "father doctor && npm run build",
|
|
23
|
-
"start": "npm run dev"
|
|
24
|
-
},
|
|
25
|
-
"commitlint": {
|
|
26
|
-
"extends": [
|
|
27
|
-
"@commitlint/config-conventional"
|
|
28
|
-
]
|
|
29
|
-
},
|
|
30
|
-
"lint-staged": {
|
|
31
|
-
"*.{md,json}": [
|
|
32
|
-
"prettier --write --no-error-on-unmatched-pattern"
|
|
33
|
-
],
|
|
34
|
-
"*.{css,less}": [
|
|
35
|
-
"stylelint --fix",
|
|
36
|
-
"prettier --write"
|
|
37
|
-
],
|
|
38
|
-
"*.{js,jsx}": [
|
|
39
|
-
"eslint --fix",
|
|
40
|
-
"prettier --write"
|
|
41
|
-
],
|
|
42
|
-
"*.{ts,tsx}": [
|
|
43
|
-
"eslint --fix",
|
|
44
|
-
"prettier --parser=typescript --write"
|
|
45
|
-
]
|
|
46
|
-
},
|
|
47
|
-
"dependencies": {
|
|
48
|
-
"d3": "^7.9.0",
|
|
49
|
-
"dagre": "^0.8.5"
|
|
50
|
-
},
|
|
51
|
-
"devDependencies": {
|
|
52
|
-
"@ant-design/icons": "^5.3.7",
|
|
53
|
-
"@ant-design/pro-components": "^2.7.1",
|
|
54
|
-
"@commitlint/cli": "^18.2.0",
|
|
55
|
-
"@commitlint/config-conventional": "^18.1.0",
|
|
56
|
-
"@commitlint/config-pnpm-scopes": "^18.1.0",
|
|
57
|
-
"@types/lodash": "^4.17.7",
|
|
58
|
-
"@types/react": "^18.2.36",
|
|
59
|
-
"@types/react-dom": "^18.2.14",
|
|
60
|
-
"@umijs/lint": "^4.0.87",
|
|
61
|
-
"@umijs/max": "^4.1.10",
|
|
62
|
-
"@vitest/coverage-v8": "^0.34.6",
|
|
63
|
-
"ahooks": "^3.7.10",
|
|
64
|
-
"antd": "^5.17.0",
|
|
65
|
-
"classnames": "^2.5.1",
|
|
66
|
-
"cross-env": "^7.0.3",
|
|
67
|
-
"dayjs": "^1.11.10",
|
|
68
|
-
"dumi": "^2.3.0",
|
|
69
|
-
"eslint": "^8.23.0",
|
|
70
|
-
"father": "^4.1.0",
|
|
71
|
-
"husky": "^8.0.1",
|
|
72
|
-
"lint-staged": "^13.0.3",
|
|
73
|
-
"lodash": "^4.17.21",
|
|
74
|
-
"prettier": "^2.7.1",
|
|
75
|
-
"prettier-plugin-organize-imports": "^3.0.0",
|
|
76
|
-
"prettier-plugin-packagejson": "^2.2.18",
|
|
77
|
-
"react": "^18.0.0",
|
|
78
|
-
"react-dom": "^18.0.0",
|
|
79
|
-
"stylelint": "^14.9.1"
|
|
80
|
-
},
|
|
81
|
-
"peerDependencies": {
|
|
82
|
-
"@ant-design/icons": "^5.3.7",
|
|
83
|
-
"@ant-design/pro-components": "^2.7.1",
|
|
84
|
-
"ahooks": "^3.7.10",
|
|
85
|
-
"antd": "^5.17.0",
|
|
86
|
-
"classnames": "^2.5.1",
|
|
87
|
-
"cross-env": "^7.0.3",
|
|
88
|
-
"dayjs": "^1.11.10",
|
|
89
|
-
"lodash": "^4.17.21",
|
|
90
|
-
"react": ">=16.9.0",
|
|
91
|
-
"react-dom": ">=16.9.0"
|
|
92
|
-
},
|
|
93
|
-
"publishConfig": {
|
|
94
|
-
"access": "public",
|
|
95
|
-
"registry": "https://registry.npmjs.org"
|
|
96
|
-
},
|
|
97
|
-
"authors": []
|
|
98
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "ebaoferc",
|
|
3
|
+
"version": "0.0.3-beta.4",
|
|
4
|
+
"description": "A react library developed with dumi",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"module": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "father build",
|
|
13
|
+
"build:watch": "father dev",
|
|
14
|
+
"dev": "dumi dev",
|
|
15
|
+
"docs:build": "dumi build",
|
|
16
|
+
"docs:preview": "dumi preview",
|
|
17
|
+
"doctor": "father doctor",
|
|
18
|
+
"lint": "npm run lint:es && npm run lint:css",
|
|
19
|
+
"lint:css": "stylelint \"{src,test}/**/*.{css,less}\"",
|
|
20
|
+
"lint:es": "eslint \"{src,test}/**/*.{js,jsx,ts,tsx}\"",
|
|
21
|
+
"prepare": "husky install && dumi setup",
|
|
22
|
+
"prepublishOnly": "father doctor && npm run build",
|
|
23
|
+
"start": "npm run dev"
|
|
24
|
+
},
|
|
25
|
+
"commitlint": {
|
|
26
|
+
"extends": [
|
|
27
|
+
"@commitlint/config-conventional"
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
"lint-staged": {
|
|
31
|
+
"*.{md,json}": [
|
|
32
|
+
"prettier --write --no-error-on-unmatched-pattern"
|
|
33
|
+
],
|
|
34
|
+
"*.{css,less}": [
|
|
35
|
+
"stylelint --fix",
|
|
36
|
+
"prettier --write"
|
|
37
|
+
],
|
|
38
|
+
"*.{js,jsx}": [
|
|
39
|
+
"eslint --fix",
|
|
40
|
+
"prettier --write"
|
|
41
|
+
],
|
|
42
|
+
"*.{ts,tsx}": [
|
|
43
|
+
"eslint --fix",
|
|
44
|
+
"prettier --parser=typescript --write"
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"d3": "^7.9.0",
|
|
49
|
+
"dagre": "^0.8.5"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@ant-design/icons": "^5.3.7",
|
|
53
|
+
"@ant-design/pro-components": "^2.7.1",
|
|
54
|
+
"@commitlint/cli": "^18.2.0",
|
|
55
|
+
"@commitlint/config-conventional": "^18.1.0",
|
|
56
|
+
"@commitlint/config-pnpm-scopes": "^18.1.0",
|
|
57
|
+
"@types/lodash": "^4.17.7",
|
|
58
|
+
"@types/react": "^18.2.36",
|
|
59
|
+
"@types/react-dom": "^18.2.14",
|
|
60
|
+
"@umijs/lint": "^4.0.87",
|
|
61
|
+
"@umijs/max": "^4.1.10",
|
|
62
|
+
"@vitest/coverage-v8": "^0.34.6",
|
|
63
|
+
"ahooks": "^3.7.10",
|
|
64
|
+
"antd": "^5.17.0",
|
|
65
|
+
"classnames": "^2.5.1",
|
|
66
|
+
"cross-env": "^7.0.3",
|
|
67
|
+
"dayjs": "^1.11.10",
|
|
68
|
+
"dumi": "^2.3.0",
|
|
69
|
+
"eslint": "^8.23.0",
|
|
70
|
+
"father": "^4.1.0",
|
|
71
|
+
"husky": "^8.0.1",
|
|
72
|
+
"lint-staged": "^13.0.3",
|
|
73
|
+
"lodash": "^4.17.21",
|
|
74
|
+
"prettier": "^2.7.1",
|
|
75
|
+
"prettier-plugin-organize-imports": "^3.0.0",
|
|
76
|
+
"prettier-plugin-packagejson": "^2.2.18",
|
|
77
|
+
"react": "^18.0.0",
|
|
78
|
+
"react-dom": "^18.0.0",
|
|
79
|
+
"stylelint": "^14.9.1"
|
|
80
|
+
},
|
|
81
|
+
"peerDependencies": {
|
|
82
|
+
"@ant-design/icons": "^5.3.7",
|
|
83
|
+
"@ant-design/pro-components": "^2.7.1",
|
|
84
|
+
"ahooks": "^3.7.10",
|
|
85
|
+
"antd": "^5.17.0",
|
|
86
|
+
"classnames": "^2.5.1",
|
|
87
|
+
"cross-env": "^7.0.3",
|
|
88
|
+
"dayjs": "^1.11.10",
|
|
89
|
+
"lodash": "^4.17.21",
|
|
90
|
+
"react": ">=16.9.0",
|
|
91
|
+
"react-dom": ">=16.9.0"
|
|
92
|
+
},
|
|
93
|
+
"publishConfig": {
|
|
94
|
+
"access": "public",
|
|
95
|
+
"registry": "https://registry.npmjs.org"
|
|
96
|
+
},
|
|
97
|
+
"authors": []
|
|
98
|
+
}
|