@ant-design/pro-components 3.1.4-0 → 3.1.5-0
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/dist/pro-components.min.js +1 -1
- package/es/card/ProCard.js +15 -7
- package/es/card/components/Card/index.js +43 -19
- package/es/card/components/Card/style.js +12 -1
- package/es/card/components/Statistic/index.js +2 -2
- package/es/card/components/StatisticCard/index.js +1 -1
- package/es/card/typing.d.ts +27 -8
- package/es/field/AllProField.d.ts +2 -0
- package/es/field/AllProField.js +3 -0
- package/es/field/PureProField.d.ts +2 -0
- package/es/field/PureProField.js +2 -0
- package/es/field/components/Cascader/index.js +8 -1
- package/es/field/components/Checkbox/index.js +5 -1
- package/es/field/components/DatePicker/index.js +13 -1
- package/es/field/components/Digit/index.js +20 -3
- package/es/field/components/Money/index.js +51 -3
- package/es/field/components/Password/index.js +12 -11
- package/es/field/components/Radio/index.js +5 -1
- package/es/field/components/Segmented/index.js +2 -1
- package/es/field/components/Select/index.d.ts +1 -1
- package/es/field/components/Select/index.js +1 -1
- package/es/field/components/Switch/index.js +10 -2
- package/es/field/components/Text/index.js +7 -1
- package/es/field/components/TextArea/index.js +6 -3
- package/es/field/components/TimePicker/index.js +10 -1
- package/es/field/components/TreeSelect/index.d.ts +2 -12
- package/es/field/components/TreeSelect/index.js +31 -17
- package/es/form/BaseForm/BaseForm.js +4 -3
- package/es/form/BaseForm/Submitter/index.d.ts +1 -1
- package/es/form/components/Digit/DigitRange.js +5 -2
- package/es/form/components/Digit/index.js +7 -2
- package/es/form/components/FormItem/FormItemRender/index.d.ts +1 -1
- package/es/form/components/FormItem/FormItemRender/index.js +10 -2
- package/es/form/components/FormItem/Group/index.js +1 -1
- package/es/form/components/List/ListContainer.js +2 -1
- package/es/form/components/Select/index.js +11 -1
- package/es/form/layouts/DrawerForm/index.d.ts +4 -4
- package/es/form/layouts/DrawerForm/index.js +1 -1
- package/es/form/layouts/LightFilter/index.js +5 -5
- package/es/form/layouts/LoginForm/index.js +8 -8
- package/es/form/layouts/LoginFormPage/index.js +15 -15
- package/es/form/layouts/ModalForm/index.d.ts +2 -2
- package/es/form/layouts/ProForm/index.d.ts +1 -1
- package/es/form/layouts/QueryFilter/Actions.js +2 -1
- package/es/form/layouts/QueryFilter/index.js +40 -23
- package/es/form/layouts/StepsForm/index.js +2 -2
- package/es/layout/ProLayout.d.ts +1 -1
- package/es/layout/ProLayout.js +1 -1
- package/es/layout/components/AppsLogoComponents/DefaultContent.js +6 -5
- package/es/layout/components/AppsLogoComponents/SimpleContent.js +6 -5
- package/es/layout/components/FooterToolbar/index.d.ts +1 -1
- package/es/layout/components/FooterToolbar/index.js +2 -2
- package/es/layout/components/GlobalFooter/index.js +3 -3
- package/es/layout/components/GlobalHeader/ActionsContent.js +6 -6
- package/es/layout/components/GlobalHeader/index.js +1 -1
- package/es/layout/components/GridContent/index.js +1 -1
- package/es/layout/components/Help/ProHelpPanel.js +11 -10
- package/es/layout/components/PageContainer/index.js +9 -9
- package/es/layout/components/PageHeader/index.js +10 -10
- package/es/layout/components/SettingDrawer/BlockCheckbox.js +2 -2
- package/es/layout/components/SettingDrawer/LayoutChange.js +3 -2
- package/es/layout/components/SettingDrawer/RegionalChange.js +3 -2
- package/es/layout/components/SettingDrawer/ThemeColor.js +3 -2
- package/es/layout/components/SettingDrawer/index.js +5 -4
- package/es/layout/components/SiderMenu/BaseMenu.js +3 -3
- package/es/layout/components/SiderMenu/SiderMenu.js +5 -5
- package/es/layout/components/TopNavHeader/index.js +3 -3
- package/es/layout/utils/getBreadcrumbProps.js +1 -1
- package/es/list/Item.d.ts +3 -3
- package/es/list/Item.js +8 -1
- package/es/list/ListView.js +1 -2
- package/es/list/ProListBase.d.ts +1 -1
- package/es/list/ProListBase.js +29 -21
- package/es/list/style/index.js +13 -0
- package/es/provider/index.d.ts +2 -2
- package/es/table/Table.js +14 -5
- package/es/table/components/Alert/index.js +6 -5
- package/es/table/components/ColumnSetting/index.js +9 -9
- package/es/table/components/DragSortTable/index.js +8 -4
- package/es/table/components/EditableTable/index.d.ts +1 -1
- package/es/table/components/EditableTable/index.js +6 -7
- package/es/table/components/ListToolBar/HeaderMenu.d.ts +1 -0
- package/es/table/components/ListToolBar/HeaderMenu.js +4 -3
- package/es/table/components/ListToolBar/index.js +15 -12
- package/es/table/components/ListToolBar/style.js +2 -2
- package/es/table/useFetchData.js +4 -1
- package/es/table/utils/cellRenderToFromItem.js +1 -1
- package/es/table/utils/useDragSort.js +1 -1
- package/es/utils/components/DropdownFooter/index.d.ts +1 -1
- package/es/utils/components/FieldLabel/index.js +1 -1
- package/es/utils/components/FilterDropdown/index.d.ts +1 -1
- package/es/utils/components/FilterDropdown/index.js +1 -1
- package/es/utils/components/InlineErrorFormItem/index.js +5 -4
- package/es/utils/components/LabelIconTip/index.js +2 -2
- package/es/utils/hooks/useFetchData/index.js +0 -2
- package/es/utils/isUrl/index.js +1 -1
- package/es/utils/proFieldParsingText/index.d.ts +2 -2
- package/es/utils/proFieldParsingText/index.js +2 -2
- package/guidelines/components/pro-card.md +5 -4
- package/lib/card/ProCard.js +15 -7
- package/lib/card/components/Card/index.js +43 -19
- package/lib/card/components/Card/style.js +12 -1
- package/lib/card/components/Statistic/index.js +2 -2
- package/lib/card/components/StatisticCard/index.js +1 -1
- package/lib/card/typing.d.ts +27 -8
- package/lib/field/AllProField.d.ts +2 -0
- package/lib/field/AllProField.js +3 -0
- package/lib/field/PureProField.d.ts +2 -0
- package/lib/field/PureProField.js +2 -0
- package/lib/field/components/Cascader/index.js +8 -1
- package/lib/field/components/Checkbox/index.js +5 -1
- package/lib/field/components/DatePicker/index.js +13 -1
- package/lib/field/components/Digit/index.js +20 -3
- package/lib/field/components/Money/index.js +50 -2
- package/lib/field/components/Password/index.js +11 -10
- package/lib/field/components/Percent/util.d.ts +1 -1
- package/lib/field/components/Radio/index.js +5 -1
- package/lib/field/components/Segmented/index.js +2 -1
- package/lib/field/components/Select/index.d.ts +1 -1
- package/lib/field/components/Select/index.js +1 -1
- package/lib/field/components/Switch/index.js +10 -2
- package/lib/field/components/Text/index.js +7 -1
- package/lib/field/components/TextArea/index.js +6 -3
- package/lib/field/components/TimePicker/index.js +10 -1
- package/lib/field/components/TreeSelect/index.d.ts +2 -12
- package/lib/field/components/TreeSelect/index.js +30 -16
- package/lib/form/BaseForm/BaseForm.js +4 -3
- package/lib/form/BaseForm/Submitter/index.d.ts +1 -1
- package/lib/form/components/Digit/DigitRange.js +5 -2
- package/lib/form/components/Digit/index.js +7 -2
- package/lib/form/components/FormItem/FormItemRender/index.d.ts +1 -1
- package/lib/form/components/FormItem/FormItemRender/index.js +10 -2
- package/lib/form/components/FormItem/Group/index.js +1 -1
- package/lib/form/components/List/ListContainer.js +2 -1
- package/lib/form/components/Select/index.js +11 -1
- package/lib/form/layouts/DrawerForm/index.d.ts +4 -4
- package/lib/form/layouts/DrawerForm/index.js +1 -1
- package/lib/form/layouts/LightFilter/index.js +5 -5
- package/lib/form/layouts/LoginForm/index.js +8 -8
- package/lib/form/layouts/LoginFormPage/index.js +15 -15
- package/lib/form/layouts/ModalForm/index.d.ts +2 -2
- package/lib/form/layouts/ProForm/index.d.ts +1 -1
- package/lib/form/layouts/QueryFilter/Actions.js +2 -1
- package/lib/form/layouts/QueryFilter/index.js +39 -22
- package/lib/form/layouts/StepsForm/index.js +2 -2
- package/lib/layout/ProLayout.d.ts +1 -1
- package/lib/layout/ProLayout.js +1 -1
- package/lib/layout/components/AppsLogoComponents/DefaultContent.js +6 -5
- package/lib/layout/components/AppsLogoComponents/SimpleContent.js +6 -5
- package/lib/layout/components/FooterToolbar/index.d.ts +1 -1
- package/lib/layout/components/FooterToolbar/index.js +2 -2
- package/lib/layout/components/GlobalFooter/index.js +3 -3
- package/lib/layout/components/GlobalHeader/ActionsContent.js +6 -6
- package/lib/layout/components/GlobalHeader/index.js +1 -1
- package/lib/layout/components/GridContent/index.js +1 -1
- package/lib/layout/components/Help/ProHelpPanel.js +11 -10
- package/lib/layout/components/PageContainer/index.js +9 -9
- package/lib/layout/components/PageHeader/index.js +10 -10
- package/lib/layout/components/SettingDrawer/BlockCheckbox.js +2 -2
- package/lib/layout/components/SettingDrawer/LayoutChange.js +3 -2
- package/lib/layout/components/SettingDrawer/RegionalChange.js +3 -2
- package/lib/layout/components/SettingDrawer/ThemeColor.js +3 -2
- package/lib/layout/components/SettingDrawer/index.js +5 -4
- package/lib/layout/components/SiderMenu/BaseMenu.js +3 -3
- package/lib/layout/components/SiderMenu/SiderMenu.js +5 -5
- package/lib/layout/components/TopNavHeader/index.js +3 -3
- package/lib/layout/utils/getBreadcrumbProps.js +1 -1
- package/lib/list/Item.d.ts +3 -3
- package/lib/list/Item.js +8 -1
- package/lib/list/ListView.js +1 -2
- package/lib/list/ProListBase.d.ts +1 -1
- package/lib/list/ProListBase.js +28 -20
- package/lib/list/style/index.js +13 -0
- package/lib/provider/index.d.ts +2 -2
- package/lib/table/Table.js +14 -5
- package/lib/table/components/Alert/index.js +6 -5
- package/lib/table/components/ColumnSetting/index.js +9 -9
- package/lib/table/components/DragSortTable/index.js +8 -4
- package/lib/table/components/EditableTable/index.d.ts +1 -1
- package/lib/table/components/EditableTable/index.js +6 -7
- package/lib/table/components/ListToolBar/HeaderMenu.d.ts +1 -0
- package/lib/table/components/ListToolBar/HeaderMenu.js +4 -3
- package/lib/table/components/ListToolBar/index.js +15 -12
- package/lib/table/components/ListToolBar/style.js +2 -2
- package/lib/table/useFetchData.js +4 -1
- package/lib/table/utils/cellRenderToFromItem.js +1 -1
- package/lib/table/utils/useDragSort.js +1 -1
- package/lib/utils/components/DropdownFooter/index.d.ts +1 -1
- package/lib/utils/components/FieldLabel/index.js +1 -1
- package/lib/utils/components/FilterDropdown/index.d.ts +1 -1
- package/lib/utils/components/FilterDropdown/index.js +1 -1
- package/lib/utils/components/InlineErrorFormItem/index.js +5 -4
- package/lib/utils/components/LabelIconTip/index.js +2 -2
- package/lib/utils/hooks/useFetchData/index.js +0 -2
- package/lib/utils/isUrl/index.js +1 -1
- package/lib/utils/proFieldParsingText/index.d.ts +2 -2
- package/lib/utils/proFieldParsingText/index.js +2 -2
- package/package.json +31 -30
|
@@ -60,13 +60,14 @@ function getSettingItem(setting) {
|
|
|
60
60
|
}
|
|
61
61
|
const ListToolBarTabBar = ({
|
|
62
62
|
prefixCls,
|
|
63
|
+
hashId,
|
|
63
64
|
tabs,
|
|
64
65
|
multipleLine,
|
|
65
66
|
filtersNode
|
|
66
67
|
}) => {
|
|
67
68
|
if (!multipleLine) return null;
|
|
68
69
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
69
|
-
className: `${prefixCls}-extra-line`,
|
|
70
|
+
className: (0, _clsx.clsx)(`${prefixCls}-extra-line`, hashId),
|
|
70
71
|
children: tabs?.items && tabs?.items.length ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Tabs, {
|
|
71
72
|
style: {
|
|
72
73
|
width: '100%'
|
|
@@ -144,7 +145,7 @@ const ListToolBar = ({
|
|
|
144
145
|
/** 轻量筛选组件 */
|
|
145
146
|
const filtersNode = (0, _react.useMemo)(() => {
|
|
146
147
|
if (filter) return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
147
|
-
className: `${prefixCls}-filter
|
|
148
|
+
className: (0, _clsx.clsx)(`${prefixCls}-filter`, hashId),
|
|
148
149
|
children: filter
|
|
149
150
|
});
|
|
150
151
|
return null;
|
|
@@ -188,16 +189,16 @@ const ListToolBar = ({
|
|
|
188
189
|
// 保留dom是为了占位,不然 right 就变到左边了
|
|
189
190
|
if (!hasLeft && hasRight) {
|
|
190
191
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
191
|
-
className: `${prefixCls}-left
|
|
192
|
+
className: (0, _clsx.clsx)(`${prefixCls}-left`, hashId)
|
|
192
193
|
});
|
|
193
194
|
}
|
|
194
195
|
|
|
195
196
|
// 减少 space 的dom,渲染的时候能节省点性能
|
|
196
197
|
if (!menu && (hasTitle || !searchNode)) {
|
|
197
198
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
198
|
-
className: `${prefixCls}-left
|
|
199
|
+
className: (0, _clsx.clsx)(`${prefixCls}-left`, hashId),
|
|
199
200
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
200
|
-
className: `${prefixCls}-title
|
|
201
|
+
className: (0, _clsx.clsx)(`${prefixCls}-title`, hashId),
|
|
201
202
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_utils.LabelIconTip, {
|
|
202
203
|
tooltip: tooltip,
|
|
203
204
|
label: title,
|
|
@@ -213,7 +214,7 @@ const ListToolBar = ({
|
|
|
213
214
|
[`${prefixCls}-left-has-inline-menu`]: menu?.type === 'inline'
|
|
214
215
|
}),
|
|
215
216
|
children: [hasTitle && !menu && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
216
|
-
className: `${prefixCls}-title
|
|
217
|
+
className: (0, _clsx.clsx)(`${prefixCls}-title`, hashId),
|
|
217
218
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_utils.LabelIconTip, {
|
|
218
219
|
tooltip: tooltip,
|
|
219
220
|
label: title,
|
|
@@ -224,9 +225,10 @@ const ListToolBar = ({
|
|
|
224
225
|
// 这里面实现了 tabs 的逻辑
|
|
225
226
|
(0, _jsxRuntime.jsx)(_HeaderMenu.default, {
|
|
226
227
|
...menu,
|
|
227
|
-
prefixCls: prefixCls
|
|
228
|
+
prefixCls: prefixCls,
|
|
229
|
+
hashId: hashId
|
|
228
230
|
}), !hasTitle && searchNode ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
229
|
-
className: `${prefixCls}-search
|
|
231
|
+
className: (0, _clsx.clsx)(`${prefixCls}-search`, hashId),
|
|
230
232
|
children: searchNode
|
|
231
233
|
}) : null]
|
|
232
234
|
});
|
|
@@ -234,19 +236,19 @@ const ListToolBar = ({
|
|
|
234
236
|
const rightTitleDom = (0, _react.useMemo)(() => {
|
|
235
237
|
if (!hasRight) return null;
|
|
236
238
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
237
|
-
className: `${prefixCls}-right
|
|
239
|
+
className: (0, _clsx.clsx)(`${prefixCls}-right`, hashId),
|
|
238
240
|
style: isMobile ? {} : {
|
|
239
241
|
alignItems: 'center'
|
|
240
242
|
},
|
|
241
243
|
children: [!multipleLine ? filtersNode : null, hasTitle && searchNode ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
242
|
-
className: `${prefixCls}-search
|
|
244
|
+
className: (0, _clsx.clsx)(`${prefixCls}-search`, hashId),
|
|
243
245
|
children: searchNode
|
|
244
246
|
}) : null, actionDom, settings?.length ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
245
|
-
className: `${prefixCls}-setting-items
|
|
247
|
+
className: (0, _clsx.clsx)(`${prefixCls}-setting-items`, hashId),
|
|
246
248
|
children: settings.map((setting, index) => {
|
|
247
249
|
const settingItem = getSettingItem(setting);
|
|
248
250
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
249
|
-
className: `${prefixCls}-setting-item
|
|
251
|
+
className: (0, _clsx.clsx)(`${prefixCls}-setting-item`, hashId),
|
|
250
252
|
children: settingItem
|
|
251
253
|
}, index);
|
|
252
254
|
})
|
|
@@ -275,6 +277,7 @@ const ListToolBar = ({
|
|
|
275
277
|
className: (0, _clsx.clsx)(prefixCls, hashId, className),
|
|
276
278
|
children: [titleNode, /*#__PURE__*/(0, _jsxRuntime.jsx)(ListToolBarTabBar, {
|
|
277
279
|
filtersNode: filtersNode,
|
|
280
|
+
hashId: hashId,
|
|
278
281
|
prefixCls: prefixCls,
|
|
279
282
|
tabs: tabs,
|
|
280
283
|
multipleLine: multipleLine
|
|
@@ -24,7 +24,7 @@ const genProListStyle = token => {
|
|
|
24
24
|
alignItems: 'center',
|
|
25
25
|
justifyContent: 'flex-start',
|
|
26
26
|
color: token.colorTextHeading,
|
|
27
|
-
fontWeight:
|
|
27
|
+
fontWeight: token.fontWeightStrong,
|
|
28
28
|
fontSize: token.fontSizeLG
|
|
29
29
|
},
|
|
30
30
|
'&-search:not(:last-child)': {
|
|
@@ -107,7 +107,7 @@ const genProListStyle = token => {
|
|
|
107
107
|
},
|
|
108
108
|
[`${token.antCls}-tabs-nav-list`]: {
|
|
109
109
|
marginBlockStart: 0,
|
|
110
|
-
|
|
110
|
+
[`${token.antCls}-tabs-tab`]: {
|
|
111
111
|
paddingBlockStart: 0
|
|
112
112
|
}
|
|
113
113
|
}
|
|
@@ -56,7 +56,10 @@ const useFetchData = (getData, defaultData, options) => {
|
|
|
56
56
|
const setTableDataList = (0, _react.useCallback)(updater => {
|
|
57
57
|
setTableDataListInner(prev => {
|
|
58
58
|
const next = typeof updater === 'function' ? updater(prev) : updater;
|
|
59
|
-
|
|
59
|
+
// 使用 queueMicrotask 延迟回调,避免在渲染期间更新其他组件状态
|
|
60
|
+
queueMicrotask(() => {
|
|
61
|
+
options?.onDataSourceChange?.(next);
|
|
62
|
+
});
|
|
60
63
|
return next;
|
|
61
64
|
});
|
|
62
65
|
}, [options?.onDataSourceChange]);
|
|
@@ -126,7 +126,7 @@ const CellRenderFromItem = props => {
|
|
|
126
126
|
const shouldName = [rowName].flat(1);
|
|
127
127
|
try {
|
|
128
128
|
return JSON.stringify((0, _util.get)(pre, shouldName)) !== JSON.stringify((0, _util.get)(next, shouldName));
|
|
129
|
-
} catch (
|
|
129
|
+
} catch (_error) {
|
|
130
130
|
return true;
|
|
131
131
|
}
|
|
132
132
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
type LightFilterFooterRender = ((onConfirm?: (e?: React.MouseEvent) => void, onClear?: (e?: React.MouseEvent) => void) => JSX.Element | false) | false;
|
|
2
|
+
type LightFilterFooterRender = ((onConfirm?: (e?: React.MouseEvent) => void, onClear?: (e?: React.MouseEvent) => void) => React.JSX.Element | false) | false;
|
|
3
3
|
type OnClick = (e?: React.MouseEvent) => void;
|
|
4
4
|
export type DropdownFooterProps = {
|
|
5
5
|
onClear?: OnClick;
|
|
@@ -78,7 +78,7 @@ const FieldLabelFunction = (props, ref) => {
|
|
|
78
78
|
onClick: () => {
|
|
79
79
|
onLabelClick?.();
|
|
80
80
|
},
|
|
81
|
-
className: `${prefixCls}-text`,
|
|
81
|
+
className: (0, _clsx.clsx)(`${prefixCls}-text`, hashId),
|
|
82
82
|
children: [aLabel, ': ']
|
|
83
83
|
}) : '';
|
|
84
84
|
const str = formatterText(aValue);
|
|
@@ -2,7 +2,7 @@ import type { PopoverProps } from 'antd';
|
|
|
2
2
|
import type { TooltipPlacement } from 'antd/lib/tooltip';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import type { DropdownFooterProps } from '../DropdownFooter';
|
|
5
|
-
export type FooterRender = ((onConfirm?: (e?: React.MouseEvent) => void, onClear?: (e?: React.MouseEvent) => void) => JSX.Element | false) | false;
|
|
5
|
+
export type FooterRender = ((onConfirm?: (e?: React.MouseEvent) => void, onClear?: (e?: React.MouseEvent) => void) => React.JSX.Element | false) | false;
|
|
6
6
|
export type DropdownProps = {
|
|
7
7
|
label?: React.ReactNode;
|
|
8
8
|
footer?: DropdownFooterProps;
|
|
@@ -57,7 +57,7 @@ const FilterDropdown = props => {
|
|
|
57
57
|
return htmlRef.current || document.body;
|
|
58
58
|
},
|
|
59
59
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
60
|
-
className: `${prefixCls}-content
|
|
60
|
+
className: (0, _clsx.clsx)(`${prefixCls}-content`, hashId),
|
|
61
61
|
children: children
|
|
62
62
|
})
|
|
63
63
|
}), footer && /*#__PURE__*/(0, _jsxRuntime.jsx)(_DropdownFooter.DropdownFooter, {
|
|
@@ -8,6 +8,7 @@ exports.InlineErrorFormItem = void 0;
|
|
|
8
8
|
var _icons = require("@ant-design/icons");
|
|
9
9
|
var _util = require("@rc-component/util");
|
|
10
10
|
var _antd = require("antd");
|
|
11
|
+
var _clsx = require("clsx");
|
|
11
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
13
|
var _style = require("./style");
|
|
13
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -52,13 +53,13 @@ const InlineErrorFormItemPopover = ({
|
|
|
52
53
|
getPopupContainer: popoverProps?.getPopupContainer,
|
|
53
54
|
getTooltipContainer: popoverProps?.getTooltipContainer,
|
|
54
55
|
content: wrapSSR( /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
55
|
-
className: `${prefixCls}-form-item
|
|
56
|
+
className: (0, _clsx.clsx)(`${prefixCls}-form-item`, hashId, token.hashId),
|
|
56
57
|
style: {
|
|
57
58
|
margin: 0,
|
|
58
59
|
padding: 0
|
|
59
60
|
},
|
|
60
61
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
61
|
-
className: `${prefixCls}-form-item-with-help
|
|
62
|
+
className: (0, _clsx.clsx)(`${prefixCls}-form-item-with-help`, hashId, token.hashId),
|
|
62
63
|
children: [loading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.LoadingOutlined, {}) : null, errorList]
|
|
63
64
|
})
|
|
64
65
|
})),
|
|
@@ -87,7 +88,7 @@ const InternalFormItemFunction = ({
|
|
|
87
88
|
}
|
|
88
89
|
try {
|
|
89
90
|
return JSON.stringify((0, _util.get)(prev, shouldName)) !== JSON.stringify((0, _util.get)(next, shouldName));
|
|
90
|
-
} catch (
|
|
91
|
+
} catch (_error) {
|
|
91
92
|
return true;
|
|
92
93
|
}
|
|
93
94
|
}
|
|
@@ -137,7 +138,7 @@ const InlineErrorFormItem = props => {
|
|
|
137
138
|
}
|
|
138
139
|
try {
|
|
139
140
|
return JSON.stringify((0, _util.get)(prev, shouldName)) !== JSON.stringify((0, _util.get)(next, shouldName));
|
|
140
|
-
} catch (
|
|
141
|
+
} catch (_error) {
|
|
141
142
|
return true;
|
|
142
143
|
}
|
|
143
144
|
} : undefined,
|
|
@@ -51,12 +51,12 @@ const LabelIconTip = exports.LabelIconTip = /*#__PURE__*/_react.default.memo(pro
|
|
|
51
51
|
}),
|
|
52
52
|
children: label
|
|
53
53
|
}), subTitle && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
54
|
-
className: `${className}-subtitle
|
|
54
|
+
className: (0, _clsx.clsx)(`${className}-subtitle`, hashId),
|
|
55
55
|
children: subTitle
|
|
56
56
|
}), tooltip && /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Tooltip, {
|
|
57
57
|
...tooltipProps,
|
|
58
58
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
59
|
-
className: `${className}-icon
|
|
59
|
+
className: (0, _clsx.clsx)(`${className}-icon`, hashId),
|
|
60
60
|
children: icon
|
|
61
61
|
})
|
|
62
62
|
})]
|
|
@@ -18,7 +18,6 @@ function useFetchData(props) {
|
|
|
18
18
|
testId += 1;
|
|
19
19
|
return testId.toString();
|
|
20
20
|
});
|
|
21
|
-
const proFieldKeyRef = (0, _react.useRef)(cacheKey);
|
|
22
21
|
const fetchData = async () => {
|
|
23
22
|
abortRef.current?.abort();
|
|
24
23
|
const abort = new AbortController();
|
|
@@ -38,7 +37,6 @@ function useFetchData(props) {
|
|
|
38
37
|
};
|
|
39
38
|
const {
|
|
40
39
|
data,
|
|
41
|
-
error,
|
|
42
40
|
isValidating
|
|
43
41
|
} = (0, _swr.default)(props.request ? [cacheKey, props.params] : null, fetchData, {
|
|
44
42
|
revalidateOnFocus: false,
|
package/lib/utils/isUrl/index.js
CHANGED
|
@@ -14,8 +14,8 @@ export declare const objectToMap: (value: ProFieldValueEnumType | undefined) =>
|
|
|
14
14
|
* 转化 text 和 valueEnum 通过 type 来添加 Status
|
|
15
15
|
*
|
|
16
16
|
* @param text
|
|
17
|
-
* @param
|
|
18
|
-
* @param
|
|
17
|
+
* @param valueEnumParams
|
|
18
|
+
* @param key
|
|
19
19
|
*/
|
|
20
20
|
export declare const proFieldParsingText: (text: string | number | (string | number)[], valueEnumParams: ProFieldValueEnumType, key?: number | string) => React.ReactNode;
|
|
21
21
|
export {};
|
|
@@ -102,8 +102,8 @@ const TableStatus = {
|
|
|
102
102
|
* 转化 text 和 valueEnum 通过 type 来添加 Status
|
|
103
103
|
*
|
|
104
104
|
* @param text
|
|
105
|
-
* @param
|
|
106
|
-
* @param
|
|
105
|
+
* @param valueEnumParams
|
|
106
|
+
* @param key
|
|
107
107
|
*/
|
|
108
108
|
const proFieldParsingText = (text, valueEnumParams, key) => {
|
|
109
109
|
if (Array.isArray(text)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ant-design/pro-components",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.5-0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "All-in-one package of @ant-design/pro-components",
|
|
6
6
|
"keywords": [
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"docs:preview": "pnpm docs preview",
|
|
42
42
|
"docs:create": "pnpm docs create",
|
|
43
43
|
"docs:check": "pnpm docs check",
|
|
44
|
+
"prepublishOnly": "pnpm run test && pnpm run build",
|
|
44
45
|
"lint": "eslint --cache --ext .js,.jsx,.ts,.tsx --fix ./ && npm run tsc",
|
|
45
46
|
"prettier": "prettier --write \"**/**.{js,jsx,tsx,ts,less,md,yaml,json}\" --log-level warn",
|
|
46
47
|
"createRelease": "node ./scripts/createRelease.mjs",
|
|
@@ -64,45 +65,45 @@
|
|
|
64
65
|
"@types/responselike": "^1.0.0"
|
|
65
66
|
},
|
|
66
67
|
"dependencies": {
|
|
67
|
-
"@ant-design/cssinjs": "^2.0
|
|
68
|
+
"@ant-design/cssinjs": "^2.1.0",
|
|
68
69
|
"@ant-design/icons": "^6.1.0",
|
|
69
|
-
"@babel/runtime": "^7.28.
|
|
70
|
+
"@babel/runtime": "^7.28.6",
|
|
70
71
|
"@ctrl/tinycolor": "^4.2.0",
|
|
71
72
|
"@dnd-kit/core": "^6.3.1",
|
|
72
73
|
"@dnd-kit/modifiers": "^6.0.1",
|
|
73
74
|
"@dnd-kit/sortable": "^7.0.2",
|
|
74
75
|
"@dnd-kit/utilities": "^3.2.2",
|
|
75
76
|
"@emotion/css": "^11.13.5",
|
|
76
|
-
"@rc-component/form": "^1.6.
|
|
77
|
-
"@rc-component/resize-observer": "^1.
|
|
77
|
+
"@rc-component/form": "^1.6.2",
|
|
78
|
+
"@rc-component/resize-observer": "^1.1.1",
|
|
78
79
|
"@rc-component/table": "^1.9.1",
|
|
79
|
-
"@rc-component/util": "^1.
|
|
80
|
+
"@rc-component/util": "^1.9.0",
|
|
80
81
|
"@umijs/route-utils": "^4.0.3",
|
|
81
82
|
"@umijs/use-params": "^1.0.9",
|
|
82
83
|
"clsx": "^2.1.1",
|
|
83
84
|
"dayjs": "^1.11.19",
|
|
84
|
-
"lodash-es": "^4.17.
|
|
85
|
-
"path-to-regexp": "^8.
|
|
85
|
+
"lodash-es": "^4.17.23",
|
|
86
|
+
"path-to-regexp": "^8.3.0",
|
|
86
87
|
"react-draggable": "^4.5.0",
|
|
87
88
|
"safe-stable-stringify": "^2.5.0",
|
|
88
|
-
"swr": "^2.
|
|
89
|
+
"swr": "^2.4.0"
|
|
89
90
|
},
|
|
90
91
|
"devDependencies": {
|
|
91
92
|
"@ant-design/antd-theme-variable": "^1.0.0",
|
|
92
|
-
"@babel/core": "^7.
|
|
93
|
+
"@babel/core": "^7.29.0",
|
|
93
94
|
"@babel/eslint-plugin": "^7.27.1",
|
|
94
|
-
"@babel/parser": "^7.
|
|
95
|
-
"@babel/plugin-
|
|
96
|
-
"@babel/preset-env": "^7.
|
|
95
|
+
"@babel/parser": "^7.29.0",
|
|
96
|
+
"@babel/plugin-transform-object-rest-spread": "^7.28.6",
|
|
97
|
+
"@babel/preset-env": "^7.29.0",
|
|
97
98
|
"@babel/preset-react": "^7.28.5",
|
|
98
99
|
"@babel/preset-typescript": "^7.28.5",
|
|
99
|
-
"@babel/traverse": "^7.
|
|
100
|
+
"@babel/traverse": "^7.29.0",
|
|
100
101
|
"@emotion/babel-plugin": "^11.13.5",
|
|
101
102
|
"@octokit/core": "^3.6.0",
|
|
102
103
|
"@octokit/rest": "^18.12.0",
|
|
103
104
|
"@testing-library/dom": "^10.4.1",
|
|
104
105
|
"@testing-library/jest-dom": "^6.9.1",
|
|
105
|
-
"@testing-library/react": "^16.3.
|
|
106
|
+
"@testing-library/react": "^16.3.2",
|
|
106
107
|
"@testing-library/react-hooks": "^8.0.1",
|
|
107
108
|
"@testing-library/user-event": "^14.6.1",
|
|
108
109
|
"@types/glob": "^8.1.0",
|
|
@@ -110,20 +111,20 @@
|
|
|
110
111
|
"@types/lodash-es": "^4.17.12",
|
|
111
112
|
"@types/mockjs": "^1.0.10",
|
|
112
113
|
"@types/node": "^14.18.63",
|
|
113
|
-
"@types/react": "^18.3.
|
|
114
|
+
"@types/react": "^18.3.28",
|
|
114
115
|
"@types/react-dom": "^18.3.7",
|
|
115
116
|
"@types/react-helmet": "^6.1.11",
|
|
116
117
|
"@types/react-responsive": "^8.0.8",
|
|
117
118
|
"@types/shallowequal": "^1.1.5",
|
|
118
119
|
"@types/warning": "^3.0.3",
|
|
119
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
120
|
-
"@typescript-eslint/parser": "^8.
|
|
120
|
+
"@typescript-eslint/eslint-plugin": "^8.56.0",
|
|
121
|
+
"@typescript-eslint/parser": "^8.56.0",
|
|
121
122
|
"@umijs/babel-preset-umi": "^3.5.43",
|
|
122
123
|
"@umijs/doctor": "^1.2.1",
|
|
123
124
|
"@umijs/plugin-analytics": "^0.2.4",
|
|
124
125
|
"@umijs/test": "^3.5.43",
|
|
125
126
|
"@umijs/test-utils": "^3.5.43",
|
|
126
|
-
"@umijs/utils": "^4.6.
|
|
127
|
+
"@umijs/utils": "^4.6.28",
|
|
127
128
|
"@vitejs/plugin-legacy": "^6.1.1",
|
|
128
129
|
"@vitest/browser": "^3.2.4",
|
|
129
130
|
"@vitest/coverage-istanbul": "^3.2.4",
|
|
@@ -133,9 +134,9 @@
|
|
|
133
134
|
"chalk": "^4.1.2",
|
|
134
135
|
"copy-to-clipboard": "^3.3.3",
|
|
135
136
|
"cross-env": "^7.0.3",
|
|
136
|
-
"dumi": "^2.4.
|
|
137
|
+
"dumi": "^2.4.23",
|
|
137
138
|
"dumi-theme-antd-style": "^0.31.1",
|
|
138
|
-
"esbuild": "^0.27.
|
|
139
|
+
"esbuild": "^0.27.3",
|
|
139
140
|
"eslint": "^8.57.1",
|
|
140
141
|
"eslint-plugin-react": "^7.37.5",
|
|
141
142
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
@@ -146,7 +147,7 @@
|
|
|
146
147
|
"father": "^4.6.13",
|
|
147
148
|
"gh-pages": "^5.0.0",
|
|
148
149
|
"glob": "^8.1.0",
|
|
149
|
-
"happy-dom": "^20.
|
|
150
|
+
"happy-dom": "^20.6.3",
|
|
150
151
|
"identity-obj-proxy": "^3.0.0",
|
|
151
152
|
"inquirer": "^8.2.7",
|
|
152
153
|
"jest-canvas-mock": "^2.5.2",
|
|
@@ -157,11 +158,11 @@
|
|
|
157
158
|
"nprogress": "^0.2.0",
|
|
158
159
|
"nwsapi": "2.2.13",
|
|
159
160
|
"octokit": "^3.2.2",
|
|
160
|
-
"playwright": "^1.
|
|
161
|
+
"playwright": "^1.58.2",
|
|
161
162
|
"polished": "^4.3.1",
|
|
162
|
-
"prettier": "^3.
|
|
163
|
+
"prettier": "^3.8.1",
|
|
163
164
|
"prettier-plugin-organize-imports": "^4.3.0",
|
|
164
|
-
"prettier-plugin-packagejson": "^2.5.
|
|
165
|
+
"prettier-plugin-packagejson": "^2.5.22",
|
|
165
166
|
"pretty-quick": "^3.3.1",
|
|
166
167
|
"query-string": "^6.14.1",
|
|
167
168
|
"react": "^18.3.1",
|
|
@@ -174,15 +175,15 @@
|
|
|
174
175
|
"slash2": "^2.0.0",
|
|
175
176
|
"style-loader": "^2.0.0",
|
|
176
177
|
"stylelint": "^13.13.1",
|
|
177
|
-
"timezone-mock": "^1.
|
|
178
|
+
"timezone-mock": "^1.4.2",
|
|
178
179
|
"ts-node": "^10.9.2",
|
|
179
180
|
"tsx": "^4.21.0",
|
|
180
181
|
"typescript": "^5.9.3",
|
|
181
|
-
"umi": "^4.6.
|
|
182
|
+
"umi": "^4.6.28",
|
|
182
183
|
"umi-request": "^1.4.0",
|
|
183
184
|
"unified": "^11.0.5",
|
|
184
|
-
"unist-util-visit": "^5.
|
|
185
|
-
"vite": "^7.3.
|
|
185
|
+
"unist-util-visit": "^5.1.0",
|
|
186
|
+
"vite": "^7.3.1",
|
|
186
187
|
"vitest": "^3.2.4",
|
|
187
188
|
"write-pkg": "^4.0.0",
|
|
188
189
|
"xhr-mock": "^2.5.1",
|
|
@@ -194,7 +195,7 @@
|
|
|
194
195
|
"react": ">=18.0.0",
|
|
195
196
|
"react-dom": ">=18.0.0"
|
|
196
197
|
},
|
|
197
|
-
"packageManager": "pnpm@9.
|
|
198
|
+
"packageManager": "pnpm@9.15.9",
|
|
198
199
|
"publishConfig": {
|
|
199
200
|
"access": "public"
|
|
200
201
|
},
|