@zat-design/sisyphus-react 3.10.2-beta.5 → 3.10.3-beta.2
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/.vscode/extensions.json +5 -0
- package/dist/index.esm.css +47 -34
- package/dist/less.esm.css +47 -34
- package/es/ProAction/index.js +5 -5
- package/es/ProDownload/index.d.ts +1 -1
- package/es/ProDownload/index.js +3 -3
- package/es/ProDownload/utils.js +3 -3
- package/es/ProDrawerForm/components/ProDrawer/index.js +4 -4
- package/es/ProDrawerForm/components/ProModal/index.js +3 -3
- package/es/ProEditLabel/index.js +3 -3
- package/es/ProEditTable/components/ActionButton/index.d.ts +1 -1
- package/es/ProEditTable/components/ActionButton/index.js +3 -3
- package/es/ProEditTable/components/RcTable/BaseTable.d.ts +1 -1
- package/es/ProEditTable/components/RcTable/DraggableTable.d.ts +1 -1
- package/es/ProEditTable/components/RcTable/VirtualTable.d.ts +1 -1
- package/es/ProEditTable/components/RenderField/index.d.ts +1 -1
- package/es/ProEditTable/components/RenderField/index.js +5 -5
- package/es/ProEditTable/components/RenderToolbar/index.d.ts +1 -1
- package/es/ProEditTable/components/RenderToolbar/index.js +1 -1
- package/es/ProEditTable/components/Summary/index.d.ts +1 -1
- package/es/ProEditTable/index.js +39 -11
- package/es/ProEditTable/style/index.less +3 -1
- package/es/ProEditTable/utils/config.d.ts +2 -2
- package/es/ProEditTable/utils/config.js +13 -5
- package/es/ProEditTable/utils/index.js +5 -5
- package/es/ProEditTable/utils/tools.js +4 -4
- package/es/ProEnum/components/Group.d.ts +1 -1
- package/es/ProEnum/components/Tag.d.ts +1 -1
- package/es/ProEnum/hooks/useEnumRequest.js +2 -2
- package/es/ProEnum/index.d.ts +2 -2
- package/es/ProEnum/index.js +1 -1
- package/es/ProEnum/utils/eventCenter.js +1 -2
- package/es/ProEnum/utils/getEnumLabel.d.ts +1 -1
- package/es/ProForm/components/base/Input/index.d.ts +1 -1
- package/es/ProForm/components/combination/FormList/components/ActionButton.js +2 -2
- package/es/ProForm/components/combination/FormList/components/BlockTitle.js +1 -1
- package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +1 -1
- package/es/ProForm/components/combination/FormList/utils.js +1 -1
- package/es/ProForm/components/combination/Group/component/ComRender.js +1 -1
- package/es/ProForm/components/combination/ProCascader/index.d.ts +1 -1
- package/es/ProForm/components/combination/ProCascader/index.js +8 -8
- package/es/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +1 -1
- package/es/ProForm/components/combination/ProModalSelect/index.js +5 -5
- package/es/ProForm/components/old/InputRange/index.d.ts +1 -1
- package/es/ProForm/components/old/InputWithSuffix/index.d.ts +1 -1
- package/es/ProForm/components/old/ProAddress/index.d.ts +1 -2
- package/es/ProForm/components/old/ProAddress/index.js +1 -1
- package/es/ProForm/components/old/ProRangeBox/index.d.ts +1 -2
- package/es/ProForm/components/render/ConfirmWrapper.js +1 -1
- package/es/ProForm/components/render/Render.js +3 -3
- package/es/ProForm/index.js +1 -1
- package/es/ProForm/utils/index.js +14 -10
- package/es/ProForm/utils/useForm.js +1 -1
- package/es/ProIcon/utils/index.js +4 -3
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.d.ts +1 -1
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +3 -3
- package/es/ProLayout/components/ProCollapse/index.d.ts +1 -1
- package/es/ProLayout/components/ProFooter/index.d.ts +1 -1
- package/es/ProLayout/components/ProHeader/components/Copy/index.d.ts +1 -1
- package/es/ProLayout/components/ProHeader/index.d.ts +1 -1
- package/es/ProLayout/index.d.ts +4 -4
- package/es/ProLayout/utils/index.js +9 -9
- package/es/ProSelect/components/AdaptiveTooltip.d.ts +1 -1
- package/es/ProSelect/index.d.ts +1 -1
- package/es/ProStep/components/Anchor/index.d.ts +1 -1
- package/es/ProStep/components/Anchor/index.js +12 -10
- package/es/ProStep/components/Item/index.d.ts +1 -1
- package/es/ProStep/components/Listener/index.js +26 -1
- package/es/ProStep/components/Step/index.d.ts +1 -1
- package/es/ProStep/components/Step/index.js +2 -2
- package/es/ProStep/index.d.ts +2 -2
- package/es/ProStep/index.js +3 -3
- package/es/ProStep/style/index.less +28 -16
- package/es/ProTable/components/FormatColumn/index.js +3 -3
- package/es/ProTable/components/RcTable/components/BaseTable/index.d.ts +1 -1
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +2 -2
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +9 -8
- package/es/ProTable/components/RcTable/components/DraggableTable/index.d.ts +1 -1
- package/es/ProTable/components/RenderFooter/index.d.ts +1 -1
- package/es/ProTable/components/RenderTableHeader/index.d.ts +1 -1
- package/es/ProTable/components/TableResizable/index.d.ts +1 -1
- package/es/ProTable/hooks/useAntdTable.js +48 -49
- package/es/ProTable/index.d.ts +1 -1
- package/es/ProTable/index.js +5 -5
- package/es/ProTable/style/index.less +3 -1
- package/es/ProTable/utils/index.d.ts +2 -0
- package/es/ProTable/utils/index.js +5 -0
- package/es/ProTabs/components/Card/index.d.ts +1 -1
- package/es/ProThemeTools/component/ProTools/index.d.ts +1 -1
- package/es/ProThemeTools/index.d.ts +1 -1
- package/es/ProTooltip/index.d.ts +1 -1
- package/es/ProTree/components/AdaptiveTooltip.d.ts +1 -1
- package/es/ProTree/components/CloseIcon.d.ts +1 -2
- package/es/ProTree/components/List.d.ts +1 -1
- package/es/ProTree/components/ProTree.d.ts +1 -1
- package/es/ProTree/components/ProTree.js +1 -1
- package/es/ProTree/components/ProTreeSelect/index.d.ts +1 -1
- package/es/ProTree/components/ProTreeSelect/index.js +20 -20
- package/es/ProTree/components/SearchTitle.d.ts +1 -1
- package/es/ProTree/components/Tree.d.ts +1 -1
- package/es/ProTree/components/Tree.js +4 -4
- package/es/ProTree/index.d.ts +1 -1
- package/es/ProTree/utils.js +12 -11
- package/es/ProTreeModal/components/Cascader.d.ts +1 -1
- package/es/ProTreeModal/components/CloseIcon.d.ts +1 -2
- package/es/ProTreeModal/components/SearchTitle.d.ts +1 -1
- package/es/ProTreeModal/components/Tree.js +6 -6
- package/es/ProTreeModal/components/Trigger.d.ts +1 -1
- package/es/ProTreeModal/index.d.ts +1 -1
- package/es/ProTreeModal/index.js +3 -3
- package/es/ProTreeModal/utils.js +16 -14
- package/es/ProUpload/components/DraggableUploadListItem.d.ts +1 -1
- package/es/ProUpload/components/ImageRender.js +1 -1
- package/es/ProViewer/index.js +2 -2
- package/es/old/ProEditableTable/index.js +4 -4
- package/lib/ProAction/index.js +5 -5
- package/lib/ProDownload/index.d.ts +1 -1
- package/lib/ProDownload/index.js +3 -3
- package/lib/ProDownload/utils.js +3 -3
- package/lib/ProDrawerForm/components/ProDrawer/index.js +4 -4
- package/lib/ProDrawerForm/components/ProModal/index.js +3 -3
- package/lib/ProEditLabel/index.js +3 -3
- package/lib/ProEditTable/components/ActionButton/index.d.ts +1 -1
- package/lib/ProEditTable/components/ActionButton/index.js +3 -3
- package/lib/ProEditTable/components/RcTable/BaseTable.d.ts +1 -1
- package/lib/ProEditTable/components/RcTable/DraggableTable.d.ts +1 -1
- package/lib/ProEditTable/components/RcTable/VirtualTable.d.ts +1 -1
- package/lib/ProEditTable/components/RenderField/index.d.ts +1 -1
- package/lib/ProEditTable/components/RenderField/index.js +5 -5
- package/lib/ProEditTable/components/RenderToolbar/index.d.ts +1 -1
- package/lib/ProEditTable/components/RenderToolbar/index.js +1 -1
- package/lib/ProEditTable/components/Summary/index.d.ts +1 -1
- package/lib/ProEditTable/index.js +38 -10
- package/lib/ProEditTable/style/index.less +3 -1
- package/lib/ProEditTable/utils/config.d.ts +2 -2
- package/lib/ProEditTable/utils/config.js +13 -5
- package/lib/ProEditTable/utils/index.js +5 -5
- package/lib/ProEditTable/utils/tools.js +4 -4
- package/lib/ProEnum/components/Group.d.ts +1 -1
- package/lib/ProEnum/components/Tag.d.ts +1 -1
- package/lib/ProEnum/hooks/useEnumRequest.js +2 -2
- package/lib/ProEnum/index.d.ts +2 -2
- package/lib/ProEnum/index.js +1 -1
- package/lib/ProEnum/utils/eventCenter.js +1 -2
- package/lib/ProEnum/utils/getEnumLabel.d.ts +1 -1
- package/lib/ProForm/components/base/Input/index.d.ts +1 -1
- package/lib/ProForm/components/combination/FormList/components/ActionButton.js +2 -2
- package/lib/ProForm/components/combination/FormList/components/BlockTitle.js +1 -1
- package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +1 -1
- package/lib/ProForm/components/combination/FormList/utils.js +1 -1
- package/lib/ProForm/components/combination/Group/component/ComRender.js +1 -1
- package/lib/ProForm/components/combination/ProCascader/index.d.ts +1 -1
- package/lib/ProForm/components/combination/ProCascader/index.js +8 -8
- package/lib/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +1 -1
- package/lib/ProForm/components/combination/ProModalSelect/index.js +5 -5
- package/lib/ProForm/components/old/InputRange/index.d.ts +1 -1
- package/lib/ProForm/components/old/InputWithSuffix/index.d.ts +1 -1
- package/lib/ProForm/components/old/ProAddress/index.d.ts +1 -2
- package/lib/ProForm/components/old/ProAddress/index.js +1 -1
- package/lib/ProForm/components/old/ProRangeBox/index.d.ts +1 -2
- package/lib/ProForm/components/render/ConfirmWrapper.js +1 -1
- package/lib/ProForm/components/render/Render.js +3 -3
- package/lib/ProForm/index.js +1 -1
- package/lib/ProForm/utils/index.js +10 -10
- package/lib/ProForm/utils/useForm.js +1 -1
- package/lib/ProIcon/utils/index.js +3 -3
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.d.ts +1 -1
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +3 -3
- package/lib/ProLayout/components/ProCollapse/index.d.ts +1 -1
- package/lib/ProLayout/components/ProFooter/index.d.ts +1 -1
- package/lib/ProLayout/components/ProHeader/components/Copy/index.d.ts +1 -1
- package/lib/ProLayout/components/ProHeader/index.d.ts +1 -1
- package/lib/ProLayout/index.d.ts +4 -4
- package/lib/ProLayout/utils/index.js +9 -9
- package/lib/ProSelect/components/AdaptiveTooltip.d.ts +1 -1
- package/lib/ProSelect/index.d.ts +1 -1
- package/lib/ProStep/components/Anchor/index.d.ts +1 -1
- package/lib/ProStep/components/Anchor/index.js +11 -10
- package/lib/ProStep/components/Item/index.d.ts +1 -1
- package/lib/ProStep/components/Listener/index.js +26 -1
- package/lib/ProStep/components/Step/index.d.ts +1 -1
- package/lib/ProStep/components/Step/index.js +2 -2
- package/lib/ProStep/index.d.ts +2 -2
- package/lib/ProStep/index.js +3 -3
- package/lib/ProStep/style/index.less +28 -16
- package/lib/ProTable/components/FormatColumn/index.js +3 -3
- package/lib/ProTable/components/RcTable/components/BaseTable/index.d.ts +1 -1
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +2 -2
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +8 -8
- package/lib/ProTable/components/RcTable/components/DraggableTable/index.d.ts +1 -1
- package/lib/ProTable/components/RenderFooter/index.d.ts +1 -1
- package/lib/ProTable/components/RenderTableHeader/index.d.ts +1 -1
- package/lib/ProTable/components/TableResizable/index.d.ts +1 -1
- package/lib/ProTable/hooks/useAntdTable.js +45 -46
- package/lib/ProTable/index.d.ts +1 -1
- package/lib/ProTable/index.js +5 -5
- package/lib/ProTable/style/index.less +3 -1
- package/lib/ProTable/utils/index.d.ts +2 -0
- package/lib/ProTable/utils/index.js +6 -1
- package/lib/ProTabs/components/Card/index.d.ts +1 -1
- package/lib/ProThemeTools/component/ProTools/index.d.ts +1 -1
- package/lib/ProThemeTools/index.d.ts +1 -1
- package/lib/ProTooltip/index.d.ts +1 -1
- package/lib/ProTree/components/AdaptiveTooltip.d.ts +1 -1
- package/lib/ProTree/components/CloseIcon.d.ts +1 -2
- package/lib/ProTree/components/List.d.ts +1 -1
- package/lib/ProTree/components/ProTree.d.ts +1 -1
- package/lib/ProTree/components/ProTree.js +1 -1
- package/lib/ProTree/components/ProTreeSelect/index.d.ts +1 -1
- package/lib/ProTree/components/ProTreeSelect/index.js +20 -20
- package/lib/ProTree/components/SearchTitle.d.ts +1 -1
- package/lib/ProTree/components/Tree.d.ts +1 -1
- package/lib/ProTree/components/Tree.js +4 -4
- package/lib/ProTree/index.d.ts +1 -1
- package/lib/ProTree/utils.js +11 -11
- package/lib/ProTreeModal/components/Cascader.d.ts +1 -1
- package/lib/ProTreeModal/components/CloseIcon.d.ts +1 -2
- package/lib/ProTreeModal/components/SearchTitle.d.ts +1 -1
- package/lib/ProTreeModal/components/Tree.js +6 -6
- package/lib/ProTreeModal/components/Trigger.d.ts +1 -1
- package/lib/ProTreeModal/index.d.ts +1 -1
- package/lib/ProTreeModal/index.js +3 -3
- package/lib/ProTreeModal/utils.js +13 -13
- package/lib/ProUpload/components/DraggableUploadListItem.d.ts +1 -1
- package/lib/ProUpload/components/ImageRender.js +1 -1
- package/lib/ProViewer/index.js +2 -2
- package/lib/old/ProEditableTable/index.js +4 -4
- package/package.json +1 -1
@@ -20,7 +20,7 @@
|
|
20
20
|
cursor: pointer;
|
21
21
|
transition: width 0.2s;
|
22
22
|
|
23
|
-
> .step-menu {
|
23
|
+
> .pro-step-menu {
|
24
24
|
display: flex;
|
25
25
|
align-items: center;
|
26
26
|
width: 100%;
|
@@ -33,7 +33,7 @@
|
|
33
33
|
justify-content: center;
|
34
34
|
width: 48px;
|
35
35
|
height: 24px;
|
36
|
-
> .menu-icon {
|
36
|
+
> .pro-step-menu-icon {
|
37
37
|
width: auto !important;
|
38
38
|
height: auto !important;
|
39
39
|
font-size: var(--zaui-font-size-lg-title, 24px);
|
@@ -49,7 +49,7 @@
|
|
49
49
|
> button {
|
50
50
|
width: auto !important;
|
51
51
|
height: auto !important;
|
52
|
-
> .menu-icon {
|
52
|
+
> .pro-step-menu-icon {
|
53
53
|
width: auto !important;
|
54
54
|
height: auto !important;
|
55
55
|
font-size: var(--zaui-font-size-lg-title, 24px);
|
@@ -79,7 +79,7 @@
|
|
79
79
|
}
|
80
80
|
}
|
81
81
|
|
82
|
-
.menu-content {
|
82
|
+
.pro-step-menu-content {
|
83
83
|
overflow: hidden;
|
84
84
|
|
85
85
|
&:hover {
|
@@ -87,7 +87,7 @@
|
|
87
87
|
}
|
88
88
|
}
|
89
89
|
|
90
|
-
.com-menu-item {
|
90
|
+
.pro-step-com-menu-item {
|
91
91
|
display: flex;
|
92
92
|
align-items: center;
|
93
93
|
justify-content: space-between;
|
@@ -107,11 +107,11 @@
|
|
107
107
|
}
|
108
108
|
}
|
109
109
|
|
110
|
-
> .menu-item {
|
110
|
+
> .pro-step-menu-item {
|
111
111
|
display: flex;
|
112
112
|
align-items: center;
|
113
113
|
|
114
|
-
> .menu-icon {
|
114
|
+
> .pro-step-menu-icon {
|
115
115
|
display: flex;
|
116
116
|
align-items: center;
|
117
117
|
justify-content: center;
|
@@ -122,14 +122,19 @@
|
|
122
122
|
fill: var(--zaui-brand, #006aff);
|
123
123
|
}
|
124
124
|
|
125
|
-
> .dot {
|
125
|
+
> .pro-step-dot {
|
126
126
|
width: 6px;
|
127
127
|
height: 6px;
|
128
128
|
background: var(--zaui-brand, #006aff);
|
129
129
|
border-radius: 3px;
|
130
130
|
|
131
|
+
|
132
|
+
|
131
133
|
&.errored {
|
134
|
+
width: 12px;
|
135
|
+
height: 12px;
|
132
136
|
background: #ff5050;
|
137
|
+
border-radius: 50%;
|
133
138
|
fill: #ff5050;
|
134
139
|
}
|
135
140
|
|
@@ -139,7 +144,7 @@
|
|
139
144
|
}
|
140
145
|
}
|
141
146
|
|
142
|
-
.dot-icon {
|
147
|
+
.pro-step-dot-icon {
|
143
148
|
display: flex;
|
144
149
|
align-items: center;
|
145
150
|
justify-content: center;
|
@@ -162,7 +167,7 @@
|
|
162
167
|
}
|
163
168
|
}
|
164
169
|
|
165
|
-
> .menu-name {
|
170
|
+
> .pro-step-menu-name {
|
166
171
|
color: #0a0a0a;
|
167
172
|
|
168
173
|
&.disabled {
|
@@ -171,21 +176,28 @@
|
|
171
176
|
}
|
172
177
|
}
|
173
178
|
|
174
|
-
> .checked-status {
|
179
|
+
> .pro-step-checked-status {
|
175
180
|
height: 18px;
|
176
181
|
|
177
182
|
> svg {
|
178
183
|
fill: var(--zaui-brand, #006aff);
|
179
184
|
}
|
180
185
|
|
181
|
-
.
|
186
|
+
.pro-step-error-dot {
|
182
187
|
display: flex;
|
183
188
|
align-items: center;
|
184
189
|
justify-content: center;
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
190
|
+
|
191
|
+
.@{ant-prefix}-badge{
|
192
|
+
.@{ant-prefix}-badge-count{
|
193
|
+
background: rgba(255, 80, 80, 0.15);
|
194
|
+
color: #ff5050;
|
195
|
+
.@{ant-prefix}-scroll-number-only-unit, .@{ant-prefix}-scroll-number{
|
196
|
+
font-weight: 600;
|
197
|
+
}
|
198
|
+
}
|
199
|
+
|
200
|
+
}
|
189
201
|
|
190
202
|
> span {
|
191
203
|
color: #ff5050;
|
@@ -612,14 +612,14 @@ export var getParentElement = function getParentElement(element, name) {
|
|
612
612
|
if (!element || !name) {
|
613
613
|
return result;
|
614
614
|
}
|
615
|
-
var
|
615
|
+
var _searchDom = function searchDom(element, name) {
|
616
616
|
var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'className';
|
617
617
|
if (element.parentElement[type] === name) {
|
618
618
|
result = element.parentElement;
|
619
619
|
return false;
|
620
620
|
}
|
621
|
-
|
621
|
+
_searchDom(element.parentElement, name, type = 'className');
|
622
622
|
};
|
623
|
-
|
623
|
+
_searchDom(element, name, type = 'className');
|
624
624
|
return result;
|
625
625
|
};
|
package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js
CHANGED
@@ -74,7 +74,7 @@ var DndWrapper = function DndWrapper(_ref2) {
|
|
74
74
|
onDragStartGuard = _ref2.onDragStartGuard,
|
75
75
|
onDragEndGuard = _ref2.onDragEndGuard;
|
76
76
|
var onDragStart = /*#__PURE__*/function () {
|
77
|
-
var _ref4 = _asyncToGenerator(
|
77
|
+
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref3) {
|
78
78
|
var active, _transformedValue, activeObject;
|
79
79
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
80
80
|
while (1) switch (_context.prev = _context.next) {
|
@@ -105,7 +105,7 @@ var DndWrapper = function DndWrapper(_ref2) {
|
|
105
105
|
};
|
106
106
|
}();
|
107
107
|
var onDragEnd = /*#__PURE__*/function () {
|
108
|
-
var _ref6 = _asyncToGenerator(
|
108
|
+
var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref5) {
|
109
109
|
var active, over, transformedValue, activeObject, overObject, activeLevel, activeParentId, overLevel, overParentId, nextDataSource, _nextDataSource, _flatTree, activeIndex, overIndex, nextValue;
|
110
110
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
111
111
|
while (1) switch (_context2.prev = _context2.next) {
|
@@ -9,7 +9,7 @@ export var getRowKey = function getRowKey(rowKey, record) {
|
|
9
9
|
}
|
10
10
|
return key;
|
11
11
|
};
|
12
|
-
|
12
|
+
var _addLevelAndParentId = function addLevelAndParentId(tree, rowKey) {
|
13
13
|
var currentLevel = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
14
14
|
var currentParentId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
15
15
|
return tree.map(function (node) {
|
@@ -18,11 +18,12 @@ export var addLevelAndParentId = function addLevelAndParentId(tree, rowKey) {
|
|
18
18
|
newNode.parentId = currentParentId;
|
19
19
|
newNode.rowKey = getRowKey(rowKey, node);
|
20
20
|
if (node.children) {
|
21
|
-
newNode.children =
|
21
|
+
newNode.children = _addLevelAndParentId(node.children, rowKey, currentLevel + 1, newNode.rowKey);
|
22
22
|
}
|
23
23
|
return newNode;
|
24
24
|
});
|
25
25
|
};
|
26
|
+
export { _addLevelAndParentId as addLevelAndParentId };
|
26
27
|
export function getFinalChildrenKey(tree, meta, options) {
|
27
28
|
if (typeof options.getChildrenKey === 'function') {
|
28
29
|
var dynamicChildrenKey = options.getChildrenKey(tree, meta);
|
@@ -33,7 +34,7 @@ export function getFinalChildrenKey(tree, meta, options) {
|
|
33
34
|
return options.childrenKey;
|
34
35
|
}
|
35
36
|
// 前置深度优先遍历
|
36
|
-
var
|
37
|
+
var _treeNodePreImpl = function treeNodePreImpl(treeItem, callback, options) {
|
37
38
|
var callbackResult = callback(treeItem, options);
|
38
39
|
if (callbackResult) {
|
39
40
|
return treeItem;
|
@@ -45,7 +46,7 @@ var treeNodePreImpl = function treeNodePreImpl(treeItem, callback, options) {
|
|
45
46
|
}
|
46
47
|
for (var i = 0, count = children.length; i < count; i++) {
|
47
48
|
var childItem = children[i];
|
48
|
-
var findOne =
|
49
|
+
var findOne = _treeNodePreImpl(childItem, callback, _objectSpread(_objectSpread({}, options), {}, {
|
49
50
|
parents: [].concat(_toConsumableArray(options.parents), [treeItem]),
|
50
51
|
depth: options.depth + 1
|
51
52
|
}));
|
@@ -56,7 +57,7 @@ var treeNodePreImpl = function treeNodePreImpl(treeItem, callback, options) {
|
|
56
57
|
return undefined;
|
57
58
|
};
|
58
59
|
var treeNodeStrategies = {
|
59
|
-
pre:
|
60
|
+
pre: _treeNodePreImpl
|
60
61
|
};
|
61
62
|
export function treeNodeFind(tree, callback, options) {
|
62
63
|
var _options$childrenKey, _options$strategy;
|
@@ -121,7 +122,7 @@ export function createTreeFromArray(array, options) {
|
|
121
122
|
return result;
|
122
123
|
}
|
123
124
|
// 前置遍历
|
124
|
-
var
|
125
|
+
var _treeForEachPreImpl = function treeForEachPreImpl(treeItem, callback, options) {
|
125
126
|
callback(treeItem, options);
|
126
127
|
var finalChildrenKey = getFinalChildrenKey(treeItem, options, options);
|
127
128
|
var children = treeItem === null || treeItem === void 0 ? void 0 : treeItem[finalChildrenKey];
|
@@ -131,12 +132,12 @@ var treeForEachPreImpl = function treeForEachPreImpl(treeItem, callback, options
|
|
131
132
|
depth: options.depth + 1
|
132
133
|
});
|
133
134
|
children.forEach(function (childItem) {
|
134
|
-
|
135
|
+
_treeForEachPreImpl(childItem, callback, nextLevelOptions);
|
135
136
|
});
|
136
137
|
}
|
137
138
|
};
|
138
139
|
var treeForEachStrategies = {
|
139
|
-
pre:
|
140
|
+
pre: _treeForEachPreImpl
|
140
141
|
};
|
141
142
|
export function treeForEach(tree, callback, options) {
|
142
143
|
var _options$childrenKey2, _options$strategy2;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
declare const RenderFooter: (props: any) => JSX.Element;
|
1
|
+
declare const RenderFooter: (props: any) => import("react/jsx-runtime").JSX.Element;
|
2
2
|
export default RenderFooter;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
declare const RenderTableHeader: (props: any) => JSX.Element;
|
1
|
+
declare const RenderTableHeader: (props: any) => import("react/jsx-runtime").JSX.Element;
|
2
2
|
export default RenderTableHeader;
|
@@ -7,11 +7,11 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
|
|
7
7
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
8
8
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
9
9
|
var _excluded = ["page", "filters", "sorter"];
|
10
|
-
import { useCallback, useMemo, useState } from 'react';
|
11
|
-
import { useRequest, useSetState, useDeepCompareEffect } from 'ahooks';
|
10
|
+
import { useCallback, useEffect, useMemo, useState } from 'react';
|
11
|
+
import { useRequest, useSetState, useDeepCompareEffect, usePrevious } from 'ahooks';
|
12
12
|
import { pickBy, isObject, merge, set, isEqual } from 'lodash';
|
13
13
|
import { defaultPage } from '../index';
|
14
|
-
import { isListResult, removeEmptyKeys } from '../utils';
|
14
|
+
import { isListResult, removeEmptyKeys, isNonEmptyObject } from '../utils';
|
15
15
|
import locale, { formatMessage } from '../../locale';
|
16
16
|
var useDefaultOptions = function useDefaultOptions(options) {
|
17
17
|
var _useState = useState((options === null || options === void 0 ? void 0 : options.page) || defaultPage),
|
@@ -24,6 +24,7 @@ var useDefaultOptions = function useDefaultOptions(options) {
|
|
24
24
|
onPageChange: (options === null || options === void 0 ? void 0 : options.onPageChange) || onPageChange
|
25
25
|
});
|
26
26
|
};
|
27
|
+
var previousSearchValues = null;
|
27
28
|
function useAntdTable(service, options, useRequestOptions) {
|
28
29
|
var _locale$ProTable2, _locale$ProTable3, _locale$ProTable4, _locale$ProTable5;
|
29
30
|
var _useSetState = useSetState({
|
@@ -32,7 +33,10 @@ function useAntdTable(service, options, useRequestOptions) {
|
|
32
33
|
selectedRecords: [],
|
33
34
|
selectedRowKeys: [],
|
34
35
|
searchValues: undefined,
|
35
|
-
extraFilter:
|
36
|
+
extraFilter: {
|
37
|
+
filters: undefined,
|
38
|
+
sorter: undefined
|
39
|
+
},
|
36
40
|
allSelected: false
|
37
41
|
}),
|
38
42
|
_useSetState2 = _slicedToArray(_useSetState, 2),
|
@@ -63,10 +67,10 @@ function useAntdTable(service, options, useRequestOptions) {
|
|
63
67
|
transformResponse = _useDefaultOptions.transformResponse,
|
64
68
|
disabled = _useDefaultOptions.disabled;
|
65
69
|
var _ref = useRequestOptions || {},
|
66
|
-
defaultParams = _ref.defaultParams
|
67
|
-
manual = _ref.manual;
|
70
|
+
defaultParams = _ref.defaultParams;
|
68
71
|
var defaultParam = Array.isArray(defaultParams) ? defaultParams === null || defaultParams === void 0 ? void 0 : defaultParams[0] : defaultParams || {};
|
69
72
|
var initPage = (options === null || options === void 0 ? void 0 : options.page) || defaultPage;
|
73
|
+
var previousPage = usePrevious(page || defaultPage);
|
70
74
|
var getTransformParams = useCallback(function (params) {
|
71
75
|
var _pickBy;
|
72
76
|
var realParams = _objectSpread(_objectSpread(_objectSpread({}, defaultParam), extraParams), params);
|
@@ -105,9 +109,17 @@ function useAntdTable(service, options, useRequestOptions) {
|
|
105
109
|
page: page
|
106
110
|
}, newQueryBean));
|
107
111
|
}, [page, searchValues, extraFilter]);
|
112
|
+
var curService = useMemo(function () {
|
113
|
+
return service.toString();
|
114
|
+
}, [service]);
|
115
|
+
var curExtraParams = useMemo(function () {
|
116
|
+
return extraParams ? JSON.stringify(extraParams) : extraParams;
|
117
|
+
}, [extraParams]);
|
108
118
|
// 调接口
|
109
|
-
var result = useRequest(service, _objectSpread(_objectSpread({
|
110
|
-
debounceWait:
|
119
|
+
var result = useRequest(service, _objectSpread(_objectSpread({
|
120
|
+
debounceWait: 300,
|
121
|
+
refreshDeps: [curService, curExtraParams]
|
122
|
+
}, useRequestOptions), {}, {
|
111
123
|
defaultParams: [getTransformParams()],
|
112
124
|
onSuccess: function onSuccess(res, params) {
|
113
125
|
var transformResult = transformResponse ? transformResponse(res) : res || {};
|
@@ -131,9 +143,6 @@ function useAntdTable(service, options, useRequestOptions) {
|
|
131
143
|
}));
|
132
144
|
var run = result.run,
|
133
145
|
refreshAsync = result.refreshAsync;
|
134
|
-
var curService = useMemo(function () {
|
135
|
-
return service.toString();
|
136
|
-
}, [service]);
|
137
146
|
// service变化时触发 (禁止掉防止service变更时导致的死循环)
|
138
147
|
var clearSelected = useCallback(function () {
|
139
148
|
setState({
|
@@ -172,6 +181,12 @@ function useAntdTable(service, options, useRequestOptions) {
|
|
172
181
|
setState(nextObject);
|
173
182
|
}
|
174
183
|
}, [allSelected, data]);
|
184
|
+
// 释放
|
185
|
+
useEffect(function () {
|
186
|
+
return function () {
|
187
|
+
previousSearchValues = null;
|
188
|
+
};
|
189
|
+
}, []);
|
175
190
|
// 分页变更
|
176
191
|
var handlePageChange = useCallback(function (current, pageSize) {
|
177
192
|
var page = {
|
@@ -213,26 +228,32 @@ function useAntdTable(service, options, useRequestOptions) {
|
|
213
228
|
filters: filters,
|
214
229
|
sorter: sorter
|
215
230
|
})));
|
216
|
-
}, [allSelected, searchValues,
|
231
|
+
}, [allSelected, searchValues, getTransformParams]);
|
217
232
|
var onSearch = useCallback(function (values) {
|
218
233
|
var newPage = {
|
219
234
|
pageNum: 1,
|
220
235
|
pageSize: page.pageSize
|
221
236
|
};
|
222
237
|
var _values = removeEmptyKeys(values);
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
238
|
+
// 如果 previousPage 存在且与 page 不相等,则触发页面变化
|
239
|
+
if (previousPage && !isEqual(previousPage, page)) {
|
240
|
+
onPageChange(newPage);
|
241
|
+
}
|
242
|
+
// 减少查询按钮的渲染,只有需要重置值时才需要调用
|
243
|
+
if ((selectedRecords === null || selectedRecords === void 0 ? void 0 : selectedRecords.length) || isNonEmptyObject(_values) && !isEqual(previousSearchValues, _values)) {
|
244
|
+
previousSearchValues = _values;
|
245
|
+
setState({
|
246
|
+
searchValues: _values,
|
247
|
+
allSelected: false,
|
248
|
+
selectedRecords: [],
|
249
|
+
selectedRowKeys: []
|
250
|
+
});
|
251
|
+
}
|
230
252
|
run(getTransformParams(_objectSpread(_objectSpread({
|
231
253
|
page: newPage
|
232
254
|
}, extraFilter), _values)));
|
233
|
-
}, [extraFilter, page.pageSize,
|
234
|
-
var resetParams = useCallback(function () {
|
235
|
-
var page = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initPage;
|
255
|
+
}, [extraFilter, page.pageSize, previousPage, getTransformParams]);
|
256
|
+
var resetParams = useCallback(function (page) {
|
236
257
|
setState({
|
237
258
|
searchValues: undefined,
|
238
259
|
allSelected: false,
|
@@ -277,7 +298,7 @@ function useAntdTable(service, options, useRequestOptions) {
|
|
277
298
|
}
|
278
299
|
};
|
279
300
|
var handleRefresh = /*#__PURE__*/function () {
|
280
|
-
var _ref4 = _asyncToGenerator(
|
301
|
+
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
281
302
|
var res;
|
282
303
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
283
304
|
while (1) switch (_context.prev = _context.next) {
|
@@ -302,28 +323,6 @@ function useAntdTable(service, options, useRequestOptions) {
|
|
302
323
|
return _ref4.apply(this, arguments);
|
303
324
|
};
|
304
325
|
}();
|
305
|
-
useDeepCompareEffect(function () {
|
306
|
-
if (!manual && curService) {
|
307
|
-
// service改变时重新请求
|
308
|
-
resetParams();
|
309
|
-
onPageChange(initPage);
|
310
|
-
run(getTransformParams());
|
311
|
-
}
|
312
|
-
}, [curService]);
|
313
|
-
useDeepCompareEffect(function () {
|
314
|
-
// extraParams改变时重新请求
|
315
|
-
if (!manual && extraParams) {
|
316
|
-
var newPage = {
|
317
|
-
pageNum: 1,
|
318
|
-
pageSize: page.pageSize
|
319
|
-
};
|
320
|
-
onPageChange(newPage);
|
321
|
-
resetParams(newPage);
|
322
|
-
run(getTransformParams({
|
323
|
-
page: newPage
|
324
|
-
}));
|
325
|
-
}
|
326
|
-
}, [extraParams]);
|
327
326
|
var _rowSelection = {
|
328
327
|
fixed: true,
|
329
328
|
type: rowSelectType,
|
@@ -389,7 +388,7 @@ function useAntdTable(service, options, useRequestOptions) {
|
|
389
388
|
total: total
|
390
389
|
}),
|
391
390
|
onSelect: function () {
|
392
|
-
var _onSelect = _asyncToGenerator(
|
391
|
+
var _onSelect = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(changeableRowKeys) {
|
393
392
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
394
393
|
while (1) switch (_context2.prev = _context2.next) {
|
395
394
|
case 0:
|
@@ -413,7 +412,7 @@ function useAntdTable(service, options, useRequestOptions) {
|
|
413
412
|
key: 'uncheckAll',
|
414
413
|
text: locale === null || locale === void 0 ? void 0 : (_locale$ProTable4 = locale.ProTable) === null || _locale$ProTable4 === void 0 ? void 0 : _locale$ProTable4.deselect,
|
415
414
|
onSelect: function () {
|
416
|
-
var _onSelect2 = _asyncToGenerator(
|
415
|
+
var _onSelect2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
417
416
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
418
417
|
while (1) switch (_context3.prev = _context3.next) {
|
419
418
|
case 0:
|
@@ -449,8 +448,8 @@ function useAntdTable(service, options, useRequestOptions) {
|
|
449
448
|
});
|
450
449
|
}
|
451
450
|
}
|
452
|
-
var selectedTip = allSelected
|
453
|
-
|
451
|
+
var selectedTip = allSelected && selectedRowKeys.length ? formatMessage(locale === null || locale === void 0 ? void 0 : (_locale$ProTable5 = locale.ProTable) === null || _locale$ProTable5 === void 0 ? void 0 : _locale$ProTable5.selectAll, {
|
452
|
+
total: allSelected ? total : selectedRowKeys === null || selectedRowKeys === void 0 ? void 0 : selectedRowKeys.length
|
454
453
|
}) : null;
|
455
454
|
var pagination = {
|
456
455
|
current: page.pageNum,
|
package/es/ProTable/index.d.ts
CHANGED
package/es/ProTable/index.js
CHANGED
@@ -187,7 +187,7 @@ var ProTable = function ProTable(props) {
|
|
187
187
|
return 'new-cell';
|
188
188
|
}
|
189
189
|
};
|
190
|
-
var
|
190
|
+
var _formatColumns = function formatColumns(nextColumns) {
|
191
191
|
nextColumns === null || nextColumns === void 0 ? void 0 : nextColumns.forEach(function (item, index) {
|
192
192
|
formatColumn({
|
193
193
|
column: item,
|
@@ -202,7 +202,7 @@ var ProTable = function ProTable(props) {
|
|
202
202
|
isInNewRow: _rowClassName
|
203
203
|
});
|
204
204
|
if (item.children && Array.isArray(item.children)) {
|
205
|
-
|
205
|
+
_formatColumns(item.children);
|
206
206
|
}
|
207
207
|
});
|
208
208
|
return nextColumns;
|
@@ -228,7 +228,7 @@ var ProTable = function ProTable(props) {
|
|
228
228
|
}).filter(function (item) {
|
229
229
|
return !(item === null || item === void 0 ? void 0 : item.delete);
|
230
230
|
});
|
231
|
-
var nextColumns =
|
231
|
+
var nextColumns = _formatColumns(newColumns);
|
232
232
|
return nextColumns;
|
233
233
|
}, [curColumns, handleResize, _scroll, originalDataSource, originalObj, _rowClassName]);
|
234
234
|
var _columns = useMemo(function () {
|
@@ -254,7 +254,7 @@ var ProTable = function ProTable(props) {
|
|
254
254
|
_scroll = {};
|
255
255
|
}
|
256
256
|
var handleColumnConfig = /*#__PURE__*/function () {
|
257
|
-
var _ref6 = _asyncToGenerator(
|
257
|
+
var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(checkList) {
|
258
258
|
var newColumns, _columnConfig$onColum, catchColumns;
|
259
259
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
260
260
|
while (1) switch (_context.prev = _context.next) {
|
@@ -363,7 +363,7 @@ var ProTable = function ProTable(props) {
|
|
363
363
|
return _rowSelection;
|
364
364
|
};
|
365
365
|
var onDataSourceChange = /*#__PURE__*/function () {
|
366
|
-
var _ref7 = _asyncToGenerator(
|
366
|
+
var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(nextDataSource) {
|
367
367
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
368
368
|
while (1) switch (_context2.prev = _context2.next) {
|
369
369
|
case 0:
|
@@ -585,7 +585,9 @@
|
|
585
585
|
|
586
586
|
.@{ant-prefix}-table-summary {
|
587
587
|
background-color: var(--zaui-table-header-bg, #f2f3f5);
|
588
|
-
|
588
|
+
td{
|
589
|
+
padding:calc(4px + var(--zaui-size)* 8px);
|
590
|
+
}
|
589
591
|
.@{ant-prefix}-table-cell {
|
590
592
|
font-weight: 500;
|
591
593
|
background-color: var(--zaui-table-header-bg, #f2f3f5);
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
1
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
2
3
|
import { get, isEqual } from 'lodash';
|
3
4
|
import { validate } from '@zat-design/utils';
|
@@ -99,4 +100,8 @@ export var getPadding = function getPadding(el) {
|
|
99
100
|
pTop: paddingTop,
|
100
101
|
pBottom: paddingBottom
|
101
102
|
};
|
103
|
+
};
|
104
|
+
/** 判断是有值的对象 */
|
105
|
+
export var isNonEmptyObject = function isNonEmptyObject(obj) {
|
106
|
+
return obj !== null && _typeof(obj) === 'object' && !Array.isArray(obj) && Object.keys(obj).length > 0;
|
102
107
|
};
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import type { DevToolsPropsType } from '../../propsType';
|
2
|
-
declare const ProTools: ({ onReset, onClose, setState, open, state, tableBorder, tableStripe, }: DevToolsPropsType) => JSX.Element;
|
2
|
+
declare const ProTools: ({ onReset, onClose, setState, open, state, tableBorder, tableStripe, }: DevToolsPropsType) => import("react/jsx-runtime").JSX.Element;
|
3
3
|
export default ProTools;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { ProThemeToolsProps } from './propsType';
|
2
2
|
declare const ProThemeTools: {
|
3
|
-
({ size, className, cacheTime, color, mode, iconFollowTheme, prefixCls, tableBorder, tableStripe, theme, onChange, ...props }: ProThemeToolsProps): JSX.Element;
|
3
|
+
({ size, className, cacheTime, color, mode, iconFollowTheme, prefixCls, tableBorder, tableStripe, theme, onChange, ...props }: ProThemeToolsProps): import("react/jsx-runtime").JSX.Element;
|
4
4
|
defaultProps: {
|
5
5
|
size: number;
|
6
6
|
mode: string;
|
package/es/ProTooltip/index.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
1
|
import { ProTooltipPropsType } from './propsType';
|
2
2
|
import './style/index.less';
|
3
|
-
declare const ProTooltip: (props: ProTooltipPropsType) => JSX.Element;
|
3
|
+
declare const ProTooltip: (props: ProTooltipPropsType) => import("react/jsx-runtime").JSX.Element;
|
4
4
|
export default ProTooltip;
|
@@ -12,6 +12,6 @@ interface ListProps {
|
|
12
12
|
handleFilterClose?: (code: string) => void;
|
13
13
|
optionRender?: (item: any, searchStr?: string) => string | ReactNode;
|
14
14
|
}
|
15
|
-
declare function List(props: ListProps): JSX.Element;
|
15
|
+
declare function List(props: ListProps): import("react/jsx-runtime").JSX.Element;
|
16
16
|
declare const _default: import("react").MemoExoticComponent<typeof List>;
|
17
17
|
export default _default;
|
@@ -359,7 +359,7 @@ var ProTree = function ProTree(props) {
|
|
359
359
|
};
|
360
360
|
/** 点击了树节点开始loading,改变自身state并将值通过onchange上传到form */
|
361
361
|
var onSelectTreeNode = /*#__PURE__*/function () {
|
362
|
-
var _ref2 = _asyncToGenerator(
|
362
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(props, info) {
|
363
363
|
var _options$;
|
364
364
|
var values, options, option;
|
365
365
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { PropTreeSelectProps } from './propsType';
|
3
|
-
export declare const ProTreeSelect: (props: PropTreeSelectProps, ref: React.Ref<unknown> | undefined) => JSX.Element;
|
3
|
+
export declare const ProTreeSelect: (props: PropTreeSelectProps, ref: React.Ref<unknown> | undefined) => import("react/jsx-runtime").JSX.Element;
|
4
4
|
declare const _default: React.ForwardRefExoticComponent<PropTreeSelectProps & React.RefAttributes<unknown>>;
|
5
5
|
export default _default;
|