@arim-aisdc/public-components 2.3.39 → 2.3.41

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 (93) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +3 -3
  3. package/dist/assets/iconfont/index.css +6 -6
  4. package/dist/assets/iconfont/menu-gray/demo.css +539 -539
  5. package/dist/assets/iconfont/menu-gray/demo_index.html +1154 -1154
  6. package/dist/assets/iconfont/menu-gray/iconfont.css +183 -183
  7. package/dist/assets/iconfont/menu-gray/iconfont.json +303 -303
  8. package/dist/assets/iconfont/other/demo.css +539 -539
  9. package/dist/assets/iconfont/other/demo_index.html +2764 -2764
  10. package/dist/assets/iconfont/other/iconfont.css +463 -463
  11. package/dist/assets/iconfont/other/iconfont.json +793 -793
  12. package/dist/assets/iconfont/public/iconfont.css +69 -69
  13. package/dist/assets/iconfont/table/iconfont.css +89 -81
  14. package/dist/assets/iconfont/table/iconfont.ttf +0 -0
  15. package/dist/assets/iconfont/theme-dark/four/demo.css +539 -539
  16. package/dist/assets/iconfont/theme-dark/four/demo_index.html +306 -306
  17. package/dist/assets/iconfont/theme-dark/four/iconfont.css +37 -37
  18. package/dist/assets/iconfont/theme-dark/four/iconfont.json +44 -44
  19. package/dist/assets/images/data-empty-dark.svg +103 -103
  20. package/dist/assets/images/data-empty-light.svg +73 -73
  21. package/dist/assets/images/data.empty-dark.svg +44 -44
  22. package/dist/assets/styles/custom-dark.css +28466 -28466
  23. package/dist/assets/styles/custom-light.css +28092 -28092
  24. package/dist/components/BaseInfo/index.less +95 -95
  25. package/dist/components/CacheTabs/index.less +115 -115
  26. package/dist/components/CenterModal/index.less +41 -41
  27. package/dist/components/ConditionExpression/index.less +111 -111
  28. package/dist/components/CustomForm/CustomForm.js +5 -5
  29. package/dist/components/CustomForm/UploadImg/index.js +5 -5
  30. package/dist/components/CustomForm/customFormItemInputNumber/index.less +12 -12
  31. package/dist/components/CustomForm/index.less +76 -76
  32. package/dist/components/DraggableBox/index.less +26 -26
  33. package/dist/components/Empty/index.less +21 -21
  34. package/dist/components/Filter/FilterColor/index.less +106 -106
  35. package/dist/components/Filter/FilterInputNumber/index.less +15 -15
  36. package/dist/components/Filter/FilterRadio/index.less +25 -25
  37. package/dist/components/Filter/FilterSelect/index.less +28 -28
  38. package/dist/components/Filter/FilterSlider/index.less +19 -19
  39. package/dist/components/Filter/FilterSwitch/index.less +20 -20
  40. package/dist/components/GlobalTip/MessageTip/index.less +28 -28
  41. package/dist/components/GlobalTip/ModalTip/index.less +42 -42
  42. package/dist/components/Icon/IconDemo/animations/Calendar/calendar.json +692 -692
  43. package/dist/components/Icon/IconDemo/animations/Loading/loading.json +869 -869
  44. package/dist/components/Icon/IconDemo/animations/download/download.json +815 -815
  45. package/dist/components/Icon/IconDemo/animations/download/download.svg +5 -5
  46. package/dist/components/Icon/IconDemo/animations/skipForward/skipForward.json +1053 -1053
  47. package/dist/components/Icon/index.less +28 -28
  48. package/dist/components/QueryFilter/QueryFilter.js +5 -5
  49. package/dist/components/QueryFilter/index.less +64 -64
  50. package/dist/components/SchemaForm/type.js +2 -2
  51. package/dist/components/SchemaForm/utils.js +7 -7
  52. package/dist/components/SplitPane/splitPane.less +24 -24
  53. package/dist/components/SplitPane/util.js +21 -21
  54. package/dist/components/SplitterPane/SplitterPane.js +46 -1
  55. package/dist/components/TableMax/TableBody/contextMenu/index.less +21 -21
  56. package/dist/components/TableMax/TableBody/index.less +187 -187
  57. package/dist/components/TableMax/TableHeader/Cell.d.ts +2 -1
  58. package/dist/components/TableMax/TableHeader/Cell.js +4 -2
  59. package/dist/components/TableMax/TableHeader/index.d.ts +2 -1
  60. package/dist/components/TableMax/TableHeader/index.js +4 -2
  61. package/dist/components/TableMax/TableHeader/index.less +224 -224
  62. package/dist/components/TableMax/TableMax.js +59 -28
  63. package/dist/components/TableMax/components/ColumnEdit/components/numberRange/index.less +2 -2
  64. package/dist/components/TableMax/components/ColumnEdit/index.less +72 -72
  65. package/dist/components/TableMax/components/ColumnFilterV2/DateRange/index.less +24 -24
  66. package/dist/components/TableMax/components/ColumnFilterV2/Filter.d.ts +1 -0
  67. package/dist/components/TableMax/components/ColumnFilterV2/Filter.js +77 -14
  68. package/dist/components/TableMax/components/ColumnFilterV2/MultipleSelect/index.less +32 -32
  69. package/dist/components/TableMax/components/ColumnFilterV2/NumberRange/index.less +27 -27
  70. package/dist/components/TableMax/components/ColumnFilterV2/SingleSelect/index.less +43 -43
  71. package/dist/components/TableMax/components/ColumnFilterV2/index.d.ts +3 -1
  72. package/dist/components/TableMax/components/ColumnFilterV2/index.js +19 -3
  73. package/dist/components/TableMax/components/ColumnFilterV2/index.less +39 -39
  74. package/dist/components/TableMax/components/ColumnSetting/index.js +7 -3
  75. package/dist/components/TableMax/components/ColumnSetting/index.less +183 -183
  76. package/dist/components/TableMax/components/ColumnSort/customSortFns.d.ts +8 -8
  77. package/dist/components/TableMax/components/ColumnSort/index.less +42 -42
  78. package/dist/components/TableMax/components/CustomDragerLayer/index.less +59 -59
  79. package/dist/components/TableMax/components/PaginationV2/index.less +116 -116
  80. package/dist/components/TableMax/hooks/useColumnWidth copy.js +26 -26
  81. package/dist/components/TableMax/hooks/useColumnWidth.js +18 -18
  82. package/dist/components/TableMax/hooks/useInfiniteScroll.d.ts +28 -0
  83. package/dist/components/TableMax/hooks/useInfiniteScroll.js +95 -0
  84. package/dist/components/TableMax/tableMax.less +340 -340
  85. package/dist/components/TableMax/type.d.ts +12 -0
  86. package/dist/components/TableMax/utils.js +9 -9
  87. package/dist/hooks/useCenterModalState.js +2 -2
  88. package/dist/hooks/usePageCacheState.js +18 -18
  89. package/dist/themes/custom-dark.css +28482 -28482
  90. package/dist/themes/custom-light.css +28108 -28108
  91. package/dist/themes/variables.less +90 -90
  92. package/dist/utils/request.js +10 -10
  93. package/package.json +108 -108
@@ -1,28 +1,28 @@
1
- .public-icon {
2
- // cursor: pointer;
3
- font-size: 14px;
4
- }
5
-
6
- .animation-icon-dark, .animation-icon-light {
7
- display: inline-block;
8
- width: 30px;
9
- height: 30px;
10
- }
11
-
12
- .animation-icon-dark {
13
- svg {
14
- path {
15
- fill: #ffffff !important;
16
- stroke: #ffffff !important;
17
- }
18
- }
19
- }
20
-
21
- .animation-icon-light {
22
- svg {
23
- path {
24
- fill: #000000 !important;
25
- stroke: #000000 !important;
26
- }
27
- }
28
- }
1
+ .public-icon {
2
+ // cursor: pointer;
3
+ font-size: 14px;
4
+ }
5
+
6
+ .animation-icon-dark, .animation-icon-light {
7
+ display: inline-block;
8
+ width: 30px;
9
+ height: 30px;
10
+ }
11
+
12
+ .animation-icon-dark {
13
+ svg {
14
+ path {
15
+ fill: #ffffff !important;
16
+ stroke: #ffffff !important;
17
+ }
18
+ }
19
+ }
20
+
21
+ .animation-icon-light {
22
+ svg {
23
+ path {
24
+ fill: #000000 !important;
25
+ stroke: #000000 !important;
26
+ }
27
+ }
28
+ }
@@ -683,11 +683,11 @@ var QueryFilter = function QueryFilter(_ref, ref) {
683
683
  });
684
684
  };
685
685
 
686
- /**
687
- * 处理公共动态查询的searchField
688
- * @param searchField 查询的字段
689
- * @param dynamicField 动态查询设置的字段
690
- * @returns
686
+ /**
687
+ * 处理公共动态查询的searchField
688
+ * @param searchField 查询的字段
689
+ * @param dynamicField 动态查询设置的字段
690
+ * @returns
691
691
  */
692
692
  export function useDynamicSearchFiled(searchField, dynamicField) {
693
693
  var _useState3 = useState(function () {
@@ -1,64 +1,64 @@
1
- .isTwoColumns {
2
- flex: 1;
3
- // display: flex;
4
- // justify-content: space-between;
5
- // flex-wrap: wrap;
6
- }
7
-
8
- .btnContainer {
9
- width: 100%;
10
- text-align: right;
11
- margin-top: 0 !important;
12
- }
13
-
14
- .sectionInput {
15
- display: flex;
16
- align-items: baseline;
17
- flex-direction: row;
18
-
19
- .interSuffix {
20
- display: inline-block;
21
- width: 30px;
22
- margin-left: 4px;
23
- }
24
-
25
- .inputBar {
26
- display: inline-block;
27
- width: 20px;
28
- border-top: 2px solid #d8d8d8;
29
- margin: 0 4px;
30
- padding-top: 4px;
31
- }
32
-
33
- :global {
34
- .custom-light-form-item,
35
- .custom-dark-form-item,
36
- .ant-form-item {
37
- margin: 0;
38
- width: 168px !important;
39
- }
40
- }
41
- }
42
-
43
- // .xmTtn {
44
- // width: 76px;
45
- // height: 32px;
46
- // border-radius: 2px;
47
- // // margin-bottom: 8px;
48
- // padding: 0 !important;
49
- // }
50
-
51
- // .xmTtnDefault {
52
- // background: rgba(245, 245, 245, 1);
53
- // }
54
-
55
- .xmTtn + .xmTtn {
56
- margin-left: 12px;
57
- }
58
-
59
- :global {
60
- .custom-dark-input-number,
61
- .custom-light-input-number {
62
- width: 100% !important;
63
- }
64
- }
1
+ .isTwoColumns {
2
+ flex: 1;
3
+ // display: flex;
4
+ // justify-content: space-between;
5
+ // flex-wrap: wrap;
6
+ }
7
+
8
+ .btnContainer {
9
+ width: 100%;
10
+ text-align: right;
11
+ margin-top: 0 !important;
12
+ }
13
+
14
+ .sectionInput {
15
+ display: flex;
16
+ align-items: baseline;
17
+ flex-direction: row;
18
+
19
+ .interSuffix {
20
+ display: inline-block;
21
+ width: 30px;
22
+ margin-left: 4px;
23
+ }
24
+
25
+ .inputBar {
26
+ display: inline-block;
27
+ width: 20px;
28
+ border-top: 2px solid #d8d8d8;
29
+ margin: 0 4px;
30
+ padding-top: 4px;
31
+ }
32
+
33
+ :global {
34
+ .custom-light-form-item,
35
+ .custom-dark-form-item,
36
+ .ant-form-item {
37
+ margin: 0;
38
+ width: 168px !important;
39
+ }
40
+ }
41
+ }
42
+
43
+ // .xmTtn {
44
+ // width: 76px;
45
+ // height: 32px;
46
+ // border-radius: 2px;
47
+ // // margin-bottom: 8px;
48
+ // padding: 0 !important;
49
+ // }
50
+
51
+ // .xmTtnDefault {
52
+ // background: rgba(245, 245, 245, 1);
53
+ // }
54
+
55
+ .xmTtn + .xmTtn {
56
+ margin-left: 12px;
57
+ }
58
+
59
+ :global {
60
+ .custom-dark-input-number,
61
+ .custom-light-input-number {
62
+ width: 100% !important;
63
+ }
64
+ }
@@ -1,5 +1,5 @@
1
- /*
2
- 数据类型
1
+ /*
2
+ 数据类型
3
3
  */
4
4
  export var ValueType = /*#__PURE__*/function (ValueType) {
5
5
  ValueType["String"] = "String";
@@ -23,13 +23,13 @@ import dayjs from 'dayjs';
23
23
  import jsep from 'jsep';
24
24
  import { DataSourceTypeEnum, ProFieldValueTypeEnum, ValueType } from "./type";
25
25
 
26
- /**
27
- * 从URL类型的数据源中获取options
28
- * @param data // 接口返回数据
29
- * @param path // 填写的路径
30
- * @param textField // text取自哪个字段
31
- * @param valueField // value取自哪个字段
32
- * @returns // {label: string, value: any}[]
26
+ /**
27
+ * 从URL类型的数据源中获取options
28
+ * @param data // 接口返回数据
29
+ * @param path // 填写的路径
30
+ * @param textField // text取自哪个字段
31
+ * @param valueField // value取自哪个字段
32
+ * @returns // {label: string, value: any}[]
33
33
  */
34
34
  export function getOptionsFromApiData(_ref) {
35
35
  var data = _ref.data,
@@ -1,24 +1,24 @@
1
- .split-pane-section {
2
- > div {
3
- overflow: hidden !important;
4
- background: @globalColor7 !important;
5
- }
6
-
7
- > span {
8
- opacity: 1 !important;
9
- border: none !important;
10
- background: @globalColor8 !important;
11
-
12
- &:hover {
13
- border: none !important;
14
- }
15
- }
16
-
17
- &.vertical > .Resizer {
18
- cursor: ew-resize;
19
- }
20
-
21
- &.horizontal > .Resizer {
22
- cursor: ns-resize;
23
- }
24
- }
1
+ .split-pane-section {
2
+ > div {
3
+ overflow: hidden !important;
4
+ background: @globalColor7 !important;
5
+ }
6
+
7
+ > span {
8
+ opacity: 1 !important;
9
+ border: none !important;
10
+ background: @globalColor8 !important;
11
+
12
+ &:hover {
13
+ border: none !important;
14
+ }
15
+ }
16
+
17
+ &.vertical > .Resizer {
18
+ cursor: ew-resize;
19
+ }
20
+
21
+ &.horizontal > .Resizer {
22
+ cursor: ns-resize;
23
+ }
24
+ }
@@ -1,7 +1,7 @@
1
1
  import { SplitSizeType } from "./config";
2
2
 
3
- /**
4
- * @deprecated 弃用 - 改为取Provider里的tableKeyPrefixCls字段
3
+ /**
4
+ * @deprecated 弃用 - 改为取Provider里的tableKeyPrefixCls字段
5
5
  */
6
6
  export var ProjectName = 'ARIM_AISDC';
7
7
 
@@ -26,36 +26,36 @@ export var setLocalStorageItem = function setLocalStorageItem(item, data) {
26
26
  }
27
27
  };
28
28
 
29
- /**
30
- * 唯一路由拼接key(根据 项目名称+用户id)
31
- * @param projectName 项目名称-对应tableKeyPrefixCls
32
- * @param userId 用户id
29
+ /**
30
+ * 唯一路由拼接key(根据 项目名称+用户id)
31
+ * @param projectName 项目名称-对应tableKeyPrefixCls
32
+ * @param userId 用户id
33
33
  */
34
34
  export var getProAndUserKey = function getProAndUserKey(projectName, userId) {
35
35
  return "".concat(projectName, "-").concat(userId);
36
36
  };
37
37
 
38
- /**
39
- * 更新split各组件宽高
40
- * @param modulePageName 页面名称
41
- * @param moduleDataName 数据名称
42
- * @param userId 用户id
43
- * @param projectName 项目名称-对应tableKeyPrefixCls
38
+ /**
39
+ * 更新split各组件宽高
40
+ * @param modulePageName 页面名称
41
+ * @param moduleDataName 数据名称
42
+ * @param userId 用户id
43
+ * @param projectName 项目名称-对应tableKeyPrefixCls
44
44
  */
45
45
  export var setSplitSizeData = function setSplitSizeData(modulePageName, moduleDataName, userId, projectName) {
46
46
  var _getLocalStorageItem;
47
47
  return (_getLocalStorageItem = getLocalStorageItem(getProAndUserKey(projectName, userId))) === null || _getLocalStorageItem === void 0 || (_getLocalStorageItem = _getLocalStorageItem[getCurrentRouterName()]) === null || _getLocalStorageItem === void 0 || (_getLocalStorageItem = _getLocalStorageItem[modulePageName]) === null || _getLocalStorageItem === void 0 ? void 0 : _getLocalStorageItem[moduleDataName];
48
48
  };
49
49
 
50
- /**
51
- * 获取split两组件宽高
52
- * @param splitType split类型
53
- * @param modulePageName 页面名称
54
- * @param moduleDataName 数据名称
55
- * @param pane1Name 组件1名称
56
- * @param pane2Name 组件2名称
57
- * @param userId 用户id
58
- * @param projectName 项目名称-对应tableKeyPrefixCls
50
+ /**
51
+ * 获取split两组件宽高
52
+ * @param splitType split类型
53
+ * @param modulePageName 页面名称
54
+ * @param moduleDataName 数据名称
55
+ * @param pane1Name 组件1名称
56
+ * @param pane2Name 组件2名称
57
+ * @param userId 用户id
58
+ * @param projectName 项目名称-对应tableKeyPrefixCls
59
59
  */
60
60
  export var getComponentsSize = function getComponentsSize(splitType, modulePageName, moduleDataName, pane1Name, pane2Name, userId, projectName) {
61
61
  var sizeType = SplitSizeType[splitType];
@@ -12,7 +12,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
12
12
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
13
  import { useDeepCompareEffect, useUpdateLayoutEffect } from 'ahooks';
14
14
  import { Splitter } from 'antd';
15
- import React, { useCallback, useLayoutEffect, useState } from 'react';
15
+ import React, { useCallback, useEffect, useLayoutEffect, useState } from 'react';
16
16
  import { useConfig } from "../ConfigProvider";
17
17
  import { SplitTypeEnums } from "./config";
18
18
  import { getCurrentRouterName } from "../..";
@@ -60,6 +60,51 @@ var SplitterPane = function SplitterPane(_ref) {
60
60
  useDeepCompareEffect(function () {
61
61
  localStorage.setItem(_cacheKeyKey, JSON.stringify(sizes));
62
62
  }, [sizes]);
63
+
64
+ // 监听窗口缩放变化,重新计算 sizes
65
+ useEffect(function () {
66
+ var handleResize = function handleResize() {
67
+ // 当窗口大小变化时,重新计算面板尺寸
68
+ if (sizes.length > 0) {
69
+ // 检查 sizes 数组中的值是否都是 number 且都有值
70
+ var isValidSizes = sizes.every(function (size) {
71
+ return typeof size === 'number' && size > 0;
72
+ });
73
+ if (isValidSizes) {
74
+ // 计算当前 sizes 的总和
75
+ var totalSize = sizes.reduce(function (sum, size) {
76
+ return sum + size;
77
+ }, 0);
78
+
79
+ // 按比例重新分配为百分比
80
+ if (typeof totalSize === 'number' && totalSize > 0) {
81
+ var newSizes = sizes.map(function (size) {
82
+ return "".concat(Math.round(size / totalSize * 100), "%");
83
+ });
84
+
85
+ // 使用 requestAnimationFrame 确保在下一帧更新
86
+ requestAnimationFrame(function () {
87
+ setSizes(newSizes);
88
+ });
89
+ }
90
+ }
91
+ }
92
+ };
93
+
94
+ // 使用防抖处理,避免频繁触发
95
+ var timeoutId = null;
96
+ var debouncedResize = function debouncedResize() {
97
+ clearTimeout(timeoutId);
98
+ timeoutId = setTimeout(handleResize, 100);
99
+ };
100
+
101
+ // 监听窗口大小变化
102
+ window.addEventListener('resize', debouncedResize);
103
+ return function () {
104
+ window.removeEventListener('resize', debouncedResize);
105
+ clearTimeout(timeoutId);
106
+ };
107
+ }, [sizes]);
63
108
  var handlePaneResize = useCallback(function (newSizes) {
64
109
  setSizes(newSizes);
65
110
  onResize === null || onResize === void 0 || onResize(newSizes);
@@ -1,21 +1,21 @@
1
- .cell-context-menu-wrapper {
2
- position: fixed;
3
- top: 10px;
4
- left: 10px;
5
- background: @globalColor7;
6
- cursor: pointer;
7
- padding: 6px;
8
- color: @globalColor1;
9
- box-shadow: 3px 3px 7px rgba(0, 0, 0, 10%);
10
- z-index: 9999;
11
-
12
- .cell-context-menu-item {
13
- padding: 5px;
14
- min-width: 150px;
15
- font-size: 14px;
16
-
17
- &:hover {
18
- background-color: @rowHoverBackgroundColor;
19
- }
20
- }
21
- }
1
+ .cell-context-menu-wrapper {
2
+ position: fixed;
3
+ top: 10px;
4
+ left: 10px;
5
+ background: @globalColor7;
6
+ cursor: pointer;
7
+ padding: 6px;
8
+ color: @globalColor1;
9
+ box-shadow: 3px 3px 7px rgba(0, 0, 0, 10%);
10
+ z-index: 9999;
11
+
12
+ .cell-context-menu-item {
13
+ padding: 5px;
14
+ min-width: 150px;
15
+ font-size: 14px;
16
+
17
+ &:hover {
18
+ background-color: @rowHoverBackgroundColor;
19
+ }
20
+ }
21
+ }