ebaoferc 0.1.1 → 0.1.3

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 (26) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +43 -43
  3. package/dist/components/MindGraph/core/graphic/drag.js +15 -15
  4. package/dist/components/MindGraph/core/graphic/index.js +105 -105
  5. package/dist/components/MindGraph/core/helper/depth-first-walk-tree.js +4 -4
  6. package/dist/components/MindGraph/core/helper/descendant.js +3 -3
  7. package/dist/components/MindGraph/core/helper/get-layout-calc-children.js +6 -6
  8. package/dist/components/MindGraph/core/helper/judge-if-all-child-fold.js +4 -4
  9. package/dist/components/MindGraph/core/helper/judge-if-heir-and-fold.js +6 -6
  10. package/dist/components/MindGraph/core/helper/judge-if-visual-leaf.js +3 -3
  11. package/dist/components/MindGraph/core/index.d.ts +6 -2
  12. package/dist/components/MindGraph/core/index.js +26 -26
  13. package/dist/components/MindGraph/core/process/layout/structured/get-node-cross-boundary.js +7 -7
  14. package/dist/components/MindGraph/core/process/layout/type.js +20 -20
  15. package/dist/components/MindGraph/core/process/visible.js +3 -3
  16. package/dist/components/MindGraph/react/component/index.module.less +71 -71
  17. package/dist/components/MindGraph/react/scrollbar/axis/index.module.less +47 -47
  18. package/dist/components/SectionTitleBar/index.less +31 -31
  19. package/dist/components/SliderVerify/style.module.less +119 -119
  20. package/dist/components/StyledQueryFilter/index.less +34 -26
  21. package/dist/components/StyledTable/index.less +17 -17
  22. package/dist/hooks/useEnhancePagination/index.d.ts +4 -2
  23. package/dist/hooks/useTabsTablePagination/index.d.ts +4 -2
  24. package/dist/hooks/useTabsTablePagination/index.js +2 -2
  25. package/dist/utils/format/index.js +10 -10
  26. package/package.json +98 -98
@@ -1,119 +1,119 @@
1
- .slider {
2
- background-color: #fff;
3
- width: 278px;
4
- z-index: 999;
5
- box-sizing: border-box;
6
- padding: 9px;
7
- border-radius: 6px;
8
- box-shadow: 0 0 11px 0 #999;
9
- user-select: none;
10
- }
11
-
12
- .slider .content {
13
- width: 100%;
14
- height: 159px;
15
- position: relative;
16
- }
17
-
18
- .bg-img-div {
19
- width: 100%;
20
- height: 100%;
21
- position: absolute;
22
- transform: translate(0, 0);
23
- }
24
-
25
- .slider-img-div {
26
- height: 100%;
27
- position: absolute;
28
- transform: translate(0, 0);
29
- }
30
-
31
- .bg-img-div img {
32
- width: 100%;
33
- -webkit-user-drag: none;
34
- -khtml-user-drag: none;
35
- -moz-user-drag: none;
36
- -o-user-drag: none;
37
- }
38
-
39
- .slider-img-div img {
40
- height: 100%;
41
- -webkit-user-drag: none;
42
- -khtml-user-drag: none;
43
- -moz-user-drag: none;
44
- -o-user-drag: none;
45
- }
46
-
47
- .slider .slider-move {
48
- width: 100%;
49
- margin: 11px 0;
50
- position: relative;
51
- }
52
-
53
- .slider .bottom {
54
- width: 100%;
55
- display: flex;
56
- justify-content: flex-end;
57
- }
58
-
59
- .refresh-btn,
60
- .close-btn {
61
- display: inline-block;
62
- }
63
-
64
- .slider-move .slider-move-track {
65
- line-height: 32px;
66
- font-size: 14px;
67
- text-align: center;
68
- white-space: nowrap;
69
- color: #88949d;
70
- user-select: none;
71
- border-radius: 20px;
72
- background: #dfe1e2;
73
- box-shadow: inset 0 0 4px 0 rgba(0, 0, 0, 15%);
74
- }
75
-
76
- .slider-move .slider-move-btn {
77
- transform: translate(0, 0);
78
- position: absolute;
79
- top: -8px;
80
- left: 0;
81
- width: 48px;
82
- height: 48px;
83
- -webkit-user-drag: none;
84
- -khtml-user-drag: none;
85
- -moz-user-drag: none;
86
- -o-user-drag: none;
87
- box-shadow: 0 0 8px 0 rgba(0, 0, 0, 30%), inset 0 0 6px 0 rgba(0, 0, 0, 5%);
88
- background-color: white;
89
- border-radius: 50%;
90
- display: flex;
91
- justify-content: center;
92
- align-items: center;
93
- }
94
-
95
- .slider-move .slider-move-btn-img {
96
- -webkit-user-drag: none;
97
- -khtml-user-drag: none;
98
- -moz-user-drag: none;
99
- -o-user-drag: none;
100
- display: flex;
101
- }
102
-
103
- .slider-move-btn:hover,
104
- .close-btn:hover,
105
- .refresh-btn:hover {
106
- cursor: pointer;
107
- }
108
-
109
- .bottom .close-btn {
110
- width: 20px;
111
- height: 20px;
112
- margin: 5px;
113
- }
114
-
115
- .bottom .refresh-btn {
116
- width: 20px;
117
- height: 20px;
118
- margin: 5px;
119
- }
1
+ .slider {
2
+ background-color: #fff;
3
+ width: 278px;
4
+ z-index: 999;
5
+ box-sizing: border-box;
6
+ padding: 9px;
7
+ border-radius: 6px;
8
+ box-shadow: 0 0 11px 0 #999;
9
+ user-select: none;
10
+ }
11
+
12
+ .slider .content {
13
+ width: 100%;
14
+ height: 159px;
15
+ position: relative;
16
+ }
17
+
18
+ .bg-img-div {
19
+ width: 100%;
20
+ height: 100%;
21
+ position: absolute;
22
+ transform: translate(0, 0);
23
+ }
24
+
25
+ .slider-img-div {
26
+ height: 100%;
27
+ position: absolute;
28
+ transform: translate(0, 0);
29
+ }
30
+
31
+ .bg-img-div img {
32
+ width: 100%;
33
+ -webkit-user-drag: none;
34
+ -khtml-user-drag: none;
35
+ -moz-user-drag: none;
36
+ -o-user-drag: none;
37
+ }
38
+
39
+ .slider-img-div img {
40
+ height: 100%;
41
+ -webkit-user-drag: none;
42
+ -khtml-user-drag: none;
43
+ -moz-user-drag: none;
44
+ -o-user-drag: none;
45
+ }
46
+
47
+ .slider .slider-move {
48
+ width: 100%;
49
+ margin: 11px 0;
50
+ position: relative;
51
+ }
52
+
53
+ .slider .bottom {
54
+ width: 100%;
55
+ display: flex;
56
+ justify-content: flex-end;
57
+ }
58
+
59
+ .refresh-btn,
60
+ .close-btn {
61
+ display: inline-block;
62
+ }
63
+
64
+ .slider-move .slider-move-track {
65
+ line-height: 32px;
66
+ font-size: 14px;
67
+ text-align: center;
68
+ white-space: nowrap;
69
+ color: #88949d;
70
+ user-select: none;
71
+ border-radius: 20px;
72
+ background: #dfe1e2;
73
+ box-shadow: inset 0 0 4px 0 rgba(0, 0, 0, 15%);
74
+ }
75
+
76
+ .slider-move .slider-move-btn {
77
+ transform: translate(0, 0);
78
+ position: absolute;
79
+ top: -8px;
80
+ left: 0;
81
+ width: 48px;
82
+ height: 48px;
83
+ -webkit-user-drag: none;
84
+ -khtml-user-drag: none;
85
+ -moz-user-drag: none;
86
+ -o-user-drag: none;
87
+ box-shadow: 0 0 8px 0 rgba(0, 0, 0, 30%), inset 0 0 6px 0 rgba(0, 0, 0, 5%);
88
+ background-color: white;
89
+ border-radius: 50%;
90
+ display: flex;
91
+ justify-content: center;
92
+ align-items: center;
93
+ }
94
+
95
+ .slider-move .slider-move-btn-img {
96
+ -webkit-user-drag: none;
97
+ -khtml-user-drag: none;
98
+ -moz-user-drag: none;
99
+ -o-user-drag: none;
100
+ display: flex;
101
+ }
102
+
103
+ .slider-move-btn:hover,
104
+ .close-btn:hover,
105
+ .refresh-btn:hover {
106
+ cursor: pointer;
107
+ }
108
+
109
+ .bottom .close-btn {
110
+ width: 20px;
111
+ height: 20px;
112
+ margin: 5px;
113
+ }
114
+
115
+ .bottom .refresh-btn {
116
+ width: 20px;
117
+ height: 20px;
118
+ margin: 5px;
119
+ }
@@ -1,26 +1,34 @@
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
+
27
+ .ant-form-item-no-colon {
28
+ margin-right: 4px;
29
+
30
+ &::after {
31
+ display: none;
32
+ }
33
+ }
34
+ }
@@ -1,17 +1,17 @@
1
- .styled-table-row {
2
- td {
3
- padding: 7.5px 16px !important;
4
- }
5
-
6
- &:hover {
7
- td {
8
- background-color: #f0f0f0 !important;
9
- }
10
- }
11
- }
12
-
13
- .styled-table-zebra-stripe {
14
- td {
15
- background: #f9f9f9 !important;
16
- }
17
- }
1
+ .styled-table-row {
2
+ td {
3
+ padding: 7.5px 16px !important;
4
+ }
5
+
6
+ &:hover {
7
+ td {
8
+ background-color: #f0f0f0 !important;
9
+ }
10
+ }
11
+ }
12
+
13
+ .styled-table-zebra-stripe {
14
+ td {
15
+ background: #f9f9f9 !important;
16
+ }
17
+ }
@@ -1,6 +1,8 @@
1
1
  import { Data, PaginationOptions, PaginationResult, Params, Service } from 'ahooks/lib/usePagination/types';
2
- export declare function useEnhancePagination<TData extends Data, TParams extends Params>(service: Service<TData, TParams>, options?: PaginationOptions<TData, TParams> & {
2
+ export type TUseEnhancePaginationOptions<TData extends Data, TParams extends Params> = PaginationOptions<TData, TParams> & {
3
3
  dataPropPath?: string;
4
- }): PaginationResult<TData, TParams> & {
4
+ };
5
+ export type TUseEnhancePaginationOutput<TData extends Data, TParams extends Params> = PaginationResult<TData, TParams> & {
5
6
  listData: Array<any>;
6
7
  };
8
+ export declare function useEnhancePagination<TData extends Data, TParams extends Params>(service: Service<TData, TParams>, options?: TUseEnhancePaginationOptions<TData, TParams>): TUseEnhancePaginationOutput<TData, TParams>;
@@ -1,4 +1,5 @@
1
- import { PaginationOptions, Service } from 'ahooks/lib/usePagination/types';
1
+ import { Service } from 'ahooks/lib/usePagination/types';
2
+ import { TUseEnhancePaginationOptions } from '../useEnhancePagination';
2
3
  type TPaginationHookParams = {
3
4
  defaultTabKey: any;
4
5
  tabKeyAlias?: string;
@@ -6,7 +7,7 @@ type TPaginationHookParams = {
6
7
  [key: string]: any[];
7
8
  };
8
9
  service: Service<any, any>;
9
- options?: PaginationOptions<any, any>;
10
+ options?: TUseEnhancePaginationOptions<any, any>;
10
11
  };
11
12
  export default function useTabsTablePagination(params: TPaginationHookParams): {
12
13
  processQueryFilterOnReset: () => void;
@@ -31,5 +32,6 @@ export default function useTabsTablePagination(params: TPaginationHookParams): {
31
32
  run: (params_0: any) => void;
32
33
  runAsync: (params_0: any) => Promise<any>;
33
34
  mutate: (data?: any) => void;
35
+ listData: any[];
34
36
  };
35
37
  export {};
@@ -13,9 +13,9 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
13
13
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
14
14
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
15
15
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
16
- import { usePagination } from 'ahooks';
17
16
  import { isNullOrUndefined } from "../../utils";
18
17
  import { useState } from 'react';
18
+ import { useEnhancePagination } from "../useEnhancePagination";
19
19
  var shortCircuitOperation = function shortCircuitOperation(a, b) {
20
20
  return isNullOrUndefined(a) ? b : a;
21
21
  };
@@ -33,7 +33,7 @@ export default function useTabsTablePagination(params) {
33
33
  _useState2 = _slicedToArray(_useState, 2),
34
34
  filterConditions = _useState2[0],
35
35
  setFilterConditions = _useState2[1];
36
- var paginationHookRes = usePagination(function (_ref) {
36
+ var paginationHookRes = useEnhancePagination(function (_ref) {
37
37
  var _ref$current = _ref.current,
38
38
  current = _ref$current === void 0 ? 1 : _ref$current,
39
39
  _ref$pageSize = _ref.pageSize,
@@ -14,8 +14,8 @@ export function isNullOrUndefined(target) {
14
14
  return target === null || target === undefined;
15
15
  }
16
16
 
17
- /**
18
- * 给对象第一层的字符串属性值做 trim
17
+ /**
18
+ * 给对象第一层的字符串属性值做 trim
19
19
  */
20
20
  export function trimObjectValuesFirstLayer(obj) {
21
21
  var result = {};
@@ -26,10 +26,10 @@ export function trimObjectValuesFirstLayer(obj) {
26
26
  }
27
27
  return result;
28
28
  }
29
- /**
30
- * 表格序号
31
- * @param TableRiwNoType
32
- * @returns
29
+ /**
30
+ * 表格序号
31
+ * @param TableRiwNoType
32
+ * @returns
33
33
  */
34
34
  export function computedTableRowSerialNo(_ref) {
35
35
  var pagination = _ref.pagination,
@@ -43,10 +43,10 @@ export function computedTableRowSerialNo(_ref) {
43
43
  }
44
44
  }
45
45
 
46
- /**
47
- * 对中国手机号进行加密中间四位。
48
- * @param phoneNumber - 需要加密的手机号
49
- * @returns 加密后的手机号
46
+ /**
47
+ * 对中国手机号进行加密中间四位。
48
+ * @param phoneNumber - 需要加密的手机号
49
+ * @returns 加密后的手机号
50
50
  */
51
51
  export function encryptPhoneNumber(phoneNumber) {
52
52
  // 将中间四位替换为星号
package/package.json CHANGED
@@ -1,98 +1,98 @@
1
- {
2
- "name": "ebaoferc",
3
- "version": "0.1.1",
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.1.3",
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
+ }