@ant-design/pro-components 3.1.3-1 → 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/Actions/index.js +1 -4
- package/es/card/components/Card/index.js +60 -28
- package/es/card/components/Card/style.js +46 -9
- package/es/card/components/CheckCard/Group.js +1 -3
- package/es/card/components/CheckCard/index.js +0 -1
- package/es/card/components/Divider/index.d.ts +1 -1
- package/es/card/components/Divider/index.js +2 -2
- package/es/card/components/Divider/style.d.ts +4 -1
- package/es/card/components/Divider/style.js +6 -39
- package/es/card/components/Statistic/index.js +3 -3
- package/es/card/components/StatisticCard/index.js +1 -1
- package/es/card/typing.d.ts +29 -14
- package/es/descriptions/index.d.ts +3 -5
- package/es/descriptions/index.js +6 -6
- package/es/descriptions/useFetchData.js +0 -1
- package/es/field/AllProField.d.ts +2 -0
- package/es/field/AllProField.js +3 -4
- package/es/field/PureProField.d.ts +2 -0
- package/es/field/PureProField.js +2 -5
- package/es/field/components/Cascader/index.js +8 -1
- package/es/field/components/Checkbox/index.js +7 -6
- package/es/field/components/DatePicker/index.d.ts +1 -1
- package/es/field/components/DatePicker/index.js +13 -1
- package/es/field/components/Digit/index.js +20 -3
- package/es/field/components/DigitRange/index.js +1 -0
- package/es/field/components/Money/index.js +51 -3
- package/es/field/components/Options/index.js +0 -3
- package/es/field/components/Password/index.js +12 -11
- package/es/field/components/Percent/util.d.ts +1 -1
- package/es/field/components/Radio/index.js +5 -1
- package/es/field/components/RangePicker/index.d.ts +1 -1
- package/es/field/components/Segmented/index.js +2 -1
- package/es/field/components/Select/SearchSelect/index.js +0 -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 -3
- package/es/field/components/Text/index.js +11 -2
- 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 -6
- package/es/form/BaseForm/LightWrapper/index.d.ts +2 -1
- package/es/form/BaseForm/Submitter/index.d.ts +1 -1
- package/es/form/components/Captcha/index.js +0 -3
- package/es/form/components/Checkbox/index.js +5 -1
- package/es/form/components/DatePicker/index.js +0 -2
- package/es/form/components/Digit/DigitRange.js +5 -2
- package/es/form/components/Digit/index.js +7 -2
- package/es/form/components/FieldSet/index.js +16 -6
- 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/FormItem/index.js +9 -7
- package/es/form/components/FormItem/warpField.js +3 -15
- package/es/form/components/List/ListContainer.js +2 -1
- package/es/form/components/List/index.d.ts +1 -1
- package/es/form/components/List/index.js +0 -2
- package/es/form/components/Radio/index.js +5 -4
- package/es/form/components/SchemaForm/index.js +0 -1
- package/es/form/components/SchemaForm/layoutType/StepsForm.js +0 -1
- package/es/form/components/Select/index.js +11 -2
- package/es/form/components/Text/index.js +0 -3
- package/es/form/components/UploadButton/index.js +4 -2
- package/es/form/components/UploadDragger/index.js +0 -1
- package/es/form/helpers/grid.js +1 -5
- package/es/form/layouts/DrawerForm/index.d.ts +4 -4
- package/es/form/layouts/DrawerForm/index.js +2 -6
- package/es/form/layouts/LightFilter/index.js +5 -6
- 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/ModalForm/index.js +1 -4
- package/es/form/layouts/QueryFilter/Actions.js +2 -1
- package/es/form/layouts/QueryFilter/index.js +40 -24
- package/es/form/layouts/StepsForm/StepForm.js +0 -1
- package/es/form/layouts/StepsForm/index.js +5 -14
- package/es/layout/ProLayout.d.ts +1 -1
- package/es/layout/ProLayout.js +2 -7
- package/es/layout/components/AppsLogoComponents/DefaultContent.js +6 -5
- package/es/layout/components/AppsLogoComponents/SimpleContent.js +6 -5
- package/es/layout/components/AppsLogoComponents/style/index.js +4 -0
- package/es/layout/components/FooterToolbar/index.d.ts +1 -1
- package/es/layout/components/FooterToolbar/index.js +2 -5
- package/es/layout/components/GlobalFooter/index.js +3 -3
- package/es/layout/components/GlobalHeader/ActionsContent.js +6 -7
- package/es/layout/components/GlobalHeader/index.js +1 -1
- package/es/layout/components/GridContent/index.js +1 -1
- package/es/layout/components/Header/index.js +1 -3
- package/es/layout/components/Help/ProHelpPanel.js +11 -10
- package/es/layout/components/PageContainer/index.js +9 -10
- package/es/layout/components/PageContainer/style/index.js +4 -0
- package/es/layout/components/PageHeader/index.js +10 -10
- package/es/layout/components/SettingDrawer/BlockCheckbox.js +2 -3
- 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 -5
- package/es/layout/components/SettingDrawer/style/index.js +4 -0
- package/es/layout/components/SiderMenu/BaseMenu.js +5 -9
- package/es/layout/components/SiderMenu/SiderMenu.js +6 -8
- package/es/layout/components/SiderMenu/index.js +0 -1
- package/es/layout/components/TopNavHeader/index.js +4 -5
- package/es/layout/style/index.js +4 -0
- package/es/layout/utils/getBreadcrumbProps.js +1 -1
- package/es/layout/utils/getMenuData.js +0 -1
- package/es/list/Item.d.ts +4 -7
- package/es/list/Item.js +82 -104
- package/es/list/ListView.d.ts +6 -4
- package/es/list/ListView.js +42 -55
- package/es/list/ProListBase.d.ts +74 -0
- package/es/list/ProListBase.js +358 -0
- package/es/list/constants.d.ts +2 -2
- package/es/list/constants.js +2 -5
- package/es/list/index.d.ts +23 -13
- package/es/list/index.js +78 -41
- package/es/list/style/index.d.ts +0 -1
- package/es/list/style/index.js +228 -86
- package/es/provider/index.d.ts +2 -2
- package/es/provider/index.js +0 -3
- package/es/provider/useStyle/index.d.ts +1 -21
- package/es/provider/useStyle/index.js +6 -3
- package/es/skeleton/components/Descriptions/index.js +1 -4
- package/es/skeleton/components/List/index.js +1 -4
- package/es/table/Store/Provide.js +0 -2
- package/es/table/Table.js +17 -17
- package/es/table/components/Alert/index.js +6 -5
- package/es/table/components/ColumnSetting/index.js +9 -10
- 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 -8
- 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.d.ts +1 -1
- package/es/table/components/ListToolBar/index.js +18 -21
- package/es/table/components/ListToolBar/style.js +3 -3
- package/es/table/components/ToolBar/index.d.ts +1 -1
- package/es/table/style/index.js +4 -0
- package/es/table/typing.d.ts +10 -5
- package/es/table/useFetchData.js +4 -4
- package/es/table/utils/cellRenderToFromItem.js +2 -4
- package/es/table/utils/index.js +0 -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.d.ts +3 -4
- package/es/utils/components/LabelIconTip/index.js +2 -2
- package/es/utils/genCopyable/index.d.ts +6 -0
- package/es/utils/genCopyable/index.js +28 -8
- package/es/utils/hooks/useDebounceValue/index.js +1 -3
- package/es/utils/hooks/useDeepCompareEffect/index.js +0 -2
- package/es/utils/hooks/useFetchData/index.js +0 -2
- package/es/utils/index.d.ts +2 -1
- package/es/utils/isDeepEqualReact/index.js +0 -8
- package/es/utils/isUrl/index.js +1 -1
- package/es/utils/merge/index.js +0 -3
- package/es/utils/nanoid/index.d.ts +1 -3
- package/es/utils/nanoid/index.js +2 -10
- package/es/utils/proFieldParsingText/index.d.ts +2 -2
- package/es/utils/proFieldParsingText/index.js +3 -5
- package/es/utils/typing.d.ts +2 -1
- package/es/utils/useEditableArray/index.js +1 -1
- package/es/utils/useEditableMap/index.js +1 -1
- package/guidelines/components/pro-card.md +5 -4
- package/guidelines/overview-components.md +1 -1
- package/lib/card/ProCard.js +15 -7
- package/lib/card/components/Actions/index.js +1 -4
- package/lib/card/components/Card/index.js +60 -28
- package/lib/card/components/Card/style.js +46 -9
- package/lib/card/components/CheckCard/Group.js +1 -3
- package/lib/card/components/CheckCard/index.js +0 -1
- package/lib/card/components/Divider/index.d.ts +1 -1
- package/lib/card/components/Divider/index.js +2 -2
- package/lib/card/components/Divider/style.d.ts +4 -1
- package/lib/card/components/Divider/style.js +5 -39
- package/lib/card/components/Statistic/index.js +3 -3
- package/lib/card/components/StatisticCard/index.js +1 -1
- package/lib/card/typing.d.ts +29 -14
- package/lib/descriptions/index.d.ts +3 -5
- package/lib/descriptions/index.js +6 -6
- package/lib/descriptions/useFetchData.js +0 -1
- package/lib/field/AllProField.d.ts +2 -0
- package/lib/field/AllProField.js +3 -4
- package/lib/field/PureProField.d.ts +2 -0
- package/lib/field/PureProField.js +2 -5
- package/lib/field/components/Cascader/index.js +8 -1
- package/lib/field/components/Checkbox/index.js +7 -6
- package/lib/field/components/DatePicker/index.d.ts +1 -1
- package/lib/field/components/DatePicker/index.js +13 -1
- package/lib/field/components/Digit/index.js +20 -3
- package/lib/field/components/DigitRange/index.js +1 -0
- package/lib/field/components/Money/index.js +50 -2
- package/lib/field/components/Options/index.js +0 -3
- 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/RangePicker/index.d.ts +1 -1
- package/lib/field/components/Segmented/index.js +2 -1
- package/lib/field/components/Select/SearchSelect/index.js +0 -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 -3
- package/lib/field/components/Text/index.js +11 -2
- 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 -7
- package/lib/form/BaseForm/LightWrapper/index.d.ts +2 -1
- package/lib/form/BaseForm/Submitter/index.d.ts +1 -1
- package/lib/form/components/Captcha/index.js +0 -3
- package/lib/form/components/Checkbox/index.js +5 -1
- package/lib/form/components/DatePicker/index.js +0 -2
- package/lib/form/components/Digit/DigitRange.js +5 -2
- package/lib/form/components/Digit/index.js +7 -2
- package/lib/form/components/FieldSet/index.js +16 -6
- 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/FormItem/index.js +9 -7
- package/lib/form/components/FormItem/warpField.js +3 -15
- package/lib/form/components/List/ListContainer.js +2 -1
- package/lib/form/components/List/index.d.ts +1 -1
- package/lib/form/components/List/index.js +0 -2
- package/lib/form/components/Radio/index.js +5 -4
- package/lib/form/components/SchemaForm/index.js +0 -1
- package/lib/form/components/SchemaForm/layoutType/StepsForm.js +0 -1
- package/lib/form/components/Select/index.js +11 -2
- package/lib/form/components/Text/index.js +0 -3
- package/lib/form/components/UploadButton/index.js +4 -2
- package/lib/form/components/UploadDragger/index.js +0 -1
- package/lib/form/helpers/grid.js +1 -5
- package/lib/form/layouts/DrawerForm/index.d.ts +4 -4
- package/lib/form/layouts/DrawerForm/index.js +2 -6
- package/lib/form/layouts/LightFilter/index.js +5 -6
- 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/ModalForm/index.js +1 -4
- package/lib/form/layouts/QueryFilter/Actions.js +2 -1
- package/lib/form/layouts/QueryFilter/index.js +39 -24
- package/lib/form/layouts/StepsForm/StepForm.js +0 -1
- package/lib/form/layouts/StepsForm/index.js +5 -14
- package/lib/layout/ProLayout.d.ts +1 -1
- package/lib/layout/ProLayout.js +2 -7
- package/lib/layout/components/AppsLogoComponents/DefaultContent.js +6 -5
- package/lib/layout/components/AppsLogoComponents/SimpleContent.js +6 -5
- package/lib/layout/components/AppsLogoComponents/style/index.js +4 -0
- package/lib/layout/components/FooterToolbar/index.d.ts +1 -1
- package/lib/layout/components/FooterToolbar/index.js +2 -6
- package/lib/layout/components/GlobalFooter/index.js +3 -3
- package/lib/layout/components/GlobalHeader/ActionsContent.js +6 -7
- package/lib/layout/components/GlobalHeader/index.js +1 -1
- package/lib/layout/components/GridContent/index.js +1 -1
- package/lib/layout/components/Header/index.js +1 -3
- package/lib/layout/components/Help/ProHelpPanel.js +11 -10
- package/lib/layout/components/PageContainer/index.js +9 -10
- package/lib/layout/components/PageContainer/style/index.js +4 -0
- package/lib/layout/components/PageHeader/index.js +10 -10
- package/lib/layout/components/SettingDrawer/BlockCheckbox.js +2 -3
- 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 -5
- package/lib/layout/components/SettingDrawer/style/index.js +4 -0
- package/lib/layout/components/SiderMenu/BaseMenu.js +5 -9
- package/lib/layout/components/SiderMenu/SiderMenu.js +6 -8
- package/lib/layout/components/SiderMenu/index.js +0 -1
- package/lib/layout/components/TopNavHeader/index.js +4 -5
- package/lib/layout/style/index.js +4 -0
- package/lib/layout/utils/getBreadcrumbProps.js +1 -1
- package/lib/layout/utils/getMenuData.js +0 -1
- package/lib/list/Item.d.ts +4 -7
- package/lib/list/Item.js +81 -103
- package/lib/list/ListView.d.ts +6 -4
- package/lib/list/ListView.js +41 -54
- package/lib/list/ProListBase.d.ts +74 -0
- package/lib/list/ProListBase.js +365 -0
- package/lib/list/constants.d.ts +2 -2
- package/lib/list/constants.js +2 -5
- package/lib/list/index.d.ts +23 -13
- package/lib/list/index.js +77 -40
- package/lib/list/style/index.d.ts +0 -1
- package/lib/list/style/index.js +227 -86
- package/lib/provider/index.d.ts +2 -2
- package/lib/provider/index.js +0 -3
- package/lib/provider/useStyle/index.d.ts +1 -21
- package/lib/provider/useStyle/index.js +6 -3
- package/lib/skeleton/components/Descriptions/index.js +1 -4
- package/lib/skeleton/components/List/index.js +1 -4
- package/lib/table/Store/Provide.js +0 -2
- package/lib/table/Table.js +17 -17
- package/lib/table/components/Alert/index.js +6 -5
- package/lib/table/components/ColumnSetting/index.js +9 -10
- 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 -8
- 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.d.ts +1 -1
- package/lib/table/components/ListToolBar/index.js +18 -21
- package/lib/table/components/ListToolBar/style.js +3 -3
- package/lib/table/components/ToolBar/index.d.ts +1 -1
- package/lib/table/style/index.js +4 -0
- package/lib/table/typing.d.ts +10 -5
- package/lib/table/useFetchData.js +4 -4
- package/lib/table/utils/cellRenderToFromItem.js +2 -4
- package/lib/table/utils/index.js +0 -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.d.ts +3 -4
- package/lib/utils/components/LabelIconTip/index.js +2 -2
- package/lib/utils/genCopyable/index.d.ts +6 -0
- package/lib/utils/genCopyable/index.js +28 -8
- package/lib/utils/hooks/useDebounceValue/index.js +1 -3
- package/lib/utils/hooks/useDeepCompareEffect/index.js +0 -2
- package/lib/utils/hooks/useFetchData/index.js +0 -2
- package/lib/utils/index.d.ts +2 -1
- package/lib/utils/isDeepEqualReact/index.js +0 -8
- package/lib/utils/isUrl/index.js +1 -1
- package/lib/utils/merge/index.js +0 -3
- package/lib/utils/nanoid/index.d.ts +1 -3
- package/lib/utils/nanoid/index.js +2 -10
- package/lib/utils/proFieldParsingText/index.d.ts +2 -2
- package/lib/utils/proFieldParsingText/index.js +3 -5
- package/lib/utils/typing.d.ts +2 -1
- package/lib/utils/useEditableArray/index.js +0 -2
- package/lib/utils/useEditableMap/index.js +0 -2
- package/package.json +32 -32
|
@@ -148,8 +148,8 @@ function StepsForm(props) {
|
|
|
148
148
|
});
|
|
149
149
|
}, [onCurrentChangeCallback]);
|
|
150
150
|
const layoutRender = (0, _react.useMemo)(() => {
|
|
151
|
-
return StepsLayoutStrategy[stepsProps?.
|
|
152
|
-
}, [stepsProps?.
|
|
151
|
+
return StepsLayoutStrategy[stepsProps?.orientation || 'horizontal'];
|
|
152
|
+
}, [stepsProps?.orientation]);
|
|
153
153
|
const lastStep = (0, _react.useMemo)(() => step === formArray.length - 1, [formArray.length, step]);
|
|
154
154
|
|
|
155
155
|
/**
|
|
@@ -215,22 +215,13 @@ function StepsForm(props) {
|
|
|
215
215
|
return stepItemProps;
|
|
216
216
|
})
|
|
217
217
|
};
|
|
218
|
-
|
|
219
|
-
// Convert deprecated direction to orientation
|
|
220
|
-
const processedStepsProps = stepsProps ? {
|
|
221
|
-
...stepsProps
|
|
222
|
-
} : {};
|
|
223
|
-
if ('direction' in processedStepsProps) {
|
|
224
|
-
processedStepsProps.orientation = processedStepsProps.direction;
|
|
225
|
-
delete processedStepsProps.direction;
|
|
226
|
-
}
|
|
227
218
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
228
|
-
className: `${prefixCls}-steps-container
|
|
219
|
+
className: (0, _clsx.clsx)(`${prefixCls}-steps-container`, hashId),
|
|
229
220
|
style: {
|
|
230
221
|
maxWidth: Math.min(formArray.length * 320, 1160)
|
|
231
222
|
},
|
|
232
223
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Steps, {
|
|
233
|
-
...
|
|
224
|
+
...stepsProps,
|
|
234
225
|
...itemsProps,
|
|
235
226
|
current: step,
|
|
236
227
|
onChange: undefined
|
|
@@ -354,7 +345,7 @@ function StepsForm(props) {
|
|
|
354
345
|
return stepsDom;
|
|
355
346
|
}, [formArray, stepsDom, stepsRender]);
|
|
356
347
|
const formContainer = (0, _react.useMemo)(() => /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
357
|
-
className: `${prefixCls}-container
|
|
348
|
+
className: (0, _clsx.clsx)(`${prefixCls}-container`, hashId),
|
|
358
349
|
style: containerStyle,
|
|
359
350
|
children: [formDom, stepsFormRender ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Space, {
|
|
360
351
|
children: submitterDom
|
|
@@ -50,7 +50,7 @@ export type ProLayoutProps = GlobalTypes & {
|
|
|
50
50
|
* @example 设置 logo 为 false 不显示 logo logo={false}
|
|
51
51
|
* @example 设置 logo 为 方法 logo={()=> <img src="https://avatars1.githubusercontent.com/u/8186664?s=460&v=4"/> }
|
|
52
52
|
* */
|
|
53
|
-
logo?: React.ReactNode | JSX.Element | WithFalse<() => React.ReactNode | JSX.Element>;
|
|
53
|
+
logo?: React.ReactNode | React.JSX.Element | WithFalse<() => React.ReactNode | React.JSX.Element>;
|
|
54
54
|
/**
|
|
55
55
|
* @name 页面切换的时候触发
|
|
56
56
|
*
|
package/lib/layout/ProLayout.js
CHANGED
|
@@ -234,7 +234,6 @@ const BaseProLayout = props => {
|
|
|
234
234
|
});
|
|
235
235
|
(0, _react.useEffect)(() => {
|
|
236
236
|
setMenuLoading(isLoading);
|
|
237
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
238
237
|
}, [isLoading]);
|
|
239
238
|
const {
|
|
240
239
|
cache
|
|
@@ -243,7 +242,6 @@ const BaseProLayout = props => {
|
|
|
243
242
|
return () => {
|
|
244
243
|
if (cache instanceof Map) cache.delete(defaultId);
|
|
245
244
|
};
|
|
246
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
247
245
|
}, []);
|
|
248
246
|
const menuInfoData = (0, _react.useMemo)(() => (0, _getMenuData.getMenuData)(data || route?.children || route?.routes || [], menu, formatMessage, menuDataRender), [formatMessage, menu, menuDataRender, data, route?.children]);
|
|
249
247
|
const {
|
|
@@ -406,7 +404,6 @@ const BaseProLayout = props => {
|
|
|
406
404
|
/** 页面切换的时候触发 */
|
|
407
405
|
(0, _react.useEffect)(() => {
|
|
408
406
|
props.onPageChange?.(props.location);
|
|
409
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
410
407
|
}, [location.pathname, location.pathname?.search]);
|
|
411
408
|
const [hasFooterToolbar, setHasFooterToolbar] = (0, _react.useState)(false);
|
|
412
409
|
/**
|
|
@@ -467,9 +464,7 @@ const BaseProLayout = props => {
|
|
|
467
464
|
flexDirection: siderMenuDom ? 'row' : undefined,
|
|
468
465
|
...style
|
|
469
466
|
},
|
|
470
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.ConfigProvider
|
|
471
|
-
// @ts-ignore
|
|
472
|
-
, {
|
|
467
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.ConfigProvider, {
|
|
473
468
|
theme: {
|
|
474
469
|
hashed: (0, _provider.isNeedOpenHash)(),
|
|
475
470
|
token: {
|
|
@@ -500,7 +495,7 @@ const BaseProLayout = props => {
|
|
|
500
495
|
children: siderMenuDom
|
|
501
496
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
502
497
|
style: genLayoutStyle,
|
|
503
|
-
className: `${proLayoutClassName}-container
|
|
498
|
+
className: (0, _clsx.clsx)(`${proLayoutClassName}-container`, hashId),
|
|
504
499
|
children: [headerDom, /*#__PURE__*/(0, _jsxRuntime.jsx)(_WrapContent.WrapContent, {
|
|
505
500
|
hasPageContainer: hasPageContainer,
|
|
506
501
|
isChildrenLayout: isChildrenLayout,
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.DefaultContent = void 0;
|
|
8
|
+
var _clsx = require("clsx");
|
|
8
9
|
var _react = _interopRequireDefault(require("react"));
|
|
9
10
|
var _index = require("./index");
|
|
10
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -16,15 +17,15 @@ const DefaultContent = props => {
|
|
|
16
17
|
itemClick
|
|
17
18
|
} = props;
|
|
18
19
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
19
|
-
className: `${baseClassName}-content
|
|
20
|
+
className: (0, _clsx.clsx)(`${baseClassName}-content`, hashId),
|
|
20
21
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("ul", {
|
|
21
|
-
className: `${baseClassName}-content-list
|
|
22
|
+
className: (0, _clsx.clsx)(`${baseClassName}-content-list`, hashId),
|
|
22
23
|
children: appList?.map((app, index) => {
|
|
23
24
|
if (app?.children?.length) {
|
|
24
25
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
25
|
-
className: `${baseClassName}-content-list-item-group
|
|
26
|
+
className: (0, _clsx.clsx)(`${baseClassName}-content-list-item-group`, hashId),
|
|
26
27
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
27
|
-
className: `${baseClassName}-content-list-item-group-title
|
|
28
|
+
className: (0, _clsx.clsx)(`${baseClassName}-content-list-item-group-title`, hashId),
|
|
28
29
|
children: app.title
|
|
29
30
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(DefaultContent, {
|
|
30
31
|
hashId: hashId,
|
|
@@ -35,7 +36,7 @@ const DefaultContent = props => {
|
|
|
35
36
|
}, index);
|
|
36
37
|
}
|
|
37
38
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("li", {
|
|
38
|
-
className: `${baseClassName}-content-list-item
|
|
39
|
+
className: (0, _clsx.clsx)(`${baseClassName}-content-list-item`, hashId),
|
|
39
40
|
onClick: e => {
|
|
40
41
|
e.stopPropagation();
|
|
41
42
|
itemClick?.(app);
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.renderLogo = exports.SimpleContent = void 0;
|
|
8
|
+
var _clsx = require("clsx");
|
|
8
9
|
var _react = _interopRequireDefault(require("react"));
|
|
9
10
|
var _utils = require("../../../utils");
|
|
10
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -49,15 +50,15 @@ const SimpleContent = props => {
|
|
|
49
50
|
itemClick
|
|
50
51
|
} = props;
|
|
51
52
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
52
|
-
className: `${baseClassName}-content
|
|
53
|
+
className: (0, _clsx.clsx)(`${baseClassName}-content`, hashId),
|
|
53
54
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("ul", {
|
|
54
|
-
className: `${baseClassName}-content-list
|
|
55
|
+
className: (0, _clsx.clsx)(`${baseClassName}-content-list`, hashId),
|
|
55
56
|
children: appList?.map((app, index) => {
|
|
56
57
|
if (app?.children?.length) {
|
|
57
58
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
58
|
-
className: `${baseClassName}-content-list-item-group
|
|
59
|
+
className: (0, _clsx.clsx)(`${baseClassName}-content-list-item-group`, hashId),
|
|
59
60
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
60
|
-
className: `${baseClassName}-content-list-item-group-title
|
|
61
|
+
className: (0, _clsx.clsx)(`${baseClassName}-content-list-item-group-title`, hashId),
|
|
61
62
|
children: app.title
|
|
62
63
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(SimpleContent, {
|
|
63
64
|
hashId: hashId,
|
|
@@ -68,7 +69,7 @@ const SimpleContent = props => {
|
|
|
68
69
|
}, index);
|
|
69
70
|
}
|
|
70
71
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("li", {
|
|
71
|
-
className: `${baseClassName}-content-list-item
|
|
72
|
+
className: (0, _clsx.clsx)(`${baseClassName}-content-list-item`, hashId),
|
|
72
73
|
onClick: e => {
|
|
73
74
|
e.stopPropagation();
|
|
74
75
|
itemClick?.(app);
|
|
@@ -10,6 +10,10 @@ var _simple = require("./simple");
|
|
|
10
10
|
const genAppsLogoComponentsStyle = token => {
|
|
11
11
|
return {
|
|
12
12
|
[token.componentCls]: {
|
|
13
|
+
boxSizing: 'border-box',
|
|
14
|
+
'*, *::before, *::after': {
|
|
15
|
+
boxSizing: 'border-box'
|
|
16
|
+
},
|
|
13
17
|
'&-icon': {
|
|
14
18
|
display: 'inline-flex',
|
|
15
19
|
alignItems: 'center',
|
|
@@ -9,7 +9,7 @@ export type FooterToolbarProps = {
|
|
|
9
9
|
className?: string;
|
|
10
10
|
renderContent?: (props: FooterToolbarProps & RouteContextType & {
|
|
11
11
|
leftWidth?: string;
|
|
12
|
-
}, dom: JSX.Element) => ReactNode;
|
|
12
|
+
}, dom: React.JSX.Element) => ReactNode;
|
|
13
13
|
prefixCls?: string;
|
|
14
14
|
stylish?: GenerateStyle<FooterToolBarToken>;
|
|
15
15
|
children?: React.ReactNode;
|
|
@@ -15,8 +15,6 @@ var _index = require("../../index");
|
|
|
15
15
|
var _style = require("./style");
|
|
16
16
|
var _stylish = require("./style/stylish");
|
|
17
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
-
/* eslint-disable react-hooks/exhaustive-deps */
|
|
19
|
-
|
|
20
18
|
const FooterToolbar = props => {
|
|
21
19
|
const {
|
|
22
20
|
children,
|
|
@@ -52,7 +50,6 @@ const FooterToolbar = props => {
|
|
|
52
50
|
return '100%';
|
|
53
51
|
}
|
|
54
52
|
return isMobile ? '100%' : `calc(100% - ${siderWidth}px)`;
|
|
55
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
56
53
|
}, [value.collapsed, value.hasSiderMenu, value.isMobile, value.siderWidth]);
|
|
57
54
|
const containerDom = (0, _react.useMemo)(() => {
|
|
58
55
|
if (typeof window === 'undefined' || typeof document === 'undefined') return null;
|
|
@@ -64,10 +61,10 @@ const FooterToolbar = props => {
|
|
|
64
61
|
});
|
|
65
62
|
const dom = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
66
63
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
67
|
-
className: `${baseClassName}-left
|
|
64
|
+
className: (0, _clsx.clsx)(`${baseClassName}-left`, hashId),
|
|
68
65
|
children: extra
|
|
69
66
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
70
|
-
className: `${baseClassName}-right
|
|
67
|
+
className: (0, _clsx.clsx)(`${baseClassName}-right`, hashId),
|
|
71
68
|
children: children
|
|
72
69
|
})]
|
|
73
70
|
});
|
|
@@ -81,7 +78,6 @@ const FooterToolbar = props => {
|
|
|
81
78
|
return () => {
|
|
82
79
|
value?.setHasFooterToolbar?.(false);
|
|
83
80
|
};
|
|
84
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
85
81
|
}, []);
|
|
86
82
|
const renderDom = /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
87
83
|
className: (0, _clsx.clsx)(className, hashId, baseClassName, {
|
|
@@ -30,9 +30,9 @@ const GlobalFooter = ({
|
|
|
30
30
|
className: (0, _clsx.clsx)(baseClassName, hashId, className),
|
|
31
31
|
style: style,
|
|
32
32
|
children: [links && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
33
|
-
className: `${baseClassName}-list
|
|
33
|
+
className: (0, _clsx.clsx)(`${baseClassName}-list`, hashId),
|
|
34
34
|
children: links.map(link => /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
|
|
35
|
-
className: `${baseClassName}-list-link
|
|
35
|
+
className: (0, _clsx.clsx)(`${baseClassName}-list-link`, hashId),
|
|
36
36
|
title: link.key,
|
|
37
37
|
target: link.blankTarget ? '_blank' : '_self',
|
|
38
38
|
href: link.href,
|
|
@@ -40,7 +40,7 @@ const GlobalFooter = ({
|
|
|
40
40
|
children: link.title
|
|
41
41
|
}, link.key))
|
|
42
42
|
}), copyright && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
43
|
-
className: `${baseClassName}-copyright
|
|
43
|
+
className: (0, _clsx.clsx)(`${baseClassName}-copyright`, hashId),
|
|
44
44
|
children: copyright
|
|
45
45
|
})]
|
|
46
46
|
}));
|
|
@@ -63,14 +63,14 @@ const ActionsContent = ({
|
|
|
63
63
|
const doms = actionsRender && actionsRender?.(restParams);
|
|
64
64
|
if (!doms && !avatarDom) return null;
|
|
65
65
|
if (!Array.isArray(doms)) return wrapSSR( /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
66
|
-
className: `${prefixCls}-header-actions
|
|
66
|
+
className: (0, _clsx.clsx)(`${prefixCls}-header-actions`, hashId),
|
|
67
67
|
children: [doms, avatarDom && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
68
|
-
className: `${prefixCls}-header-actions-avatar
|
|
68
|
+
className: (0, _clsx.clsx)(`${prefixCls}-header-actions-avatar`, hashId),
|
|
69
69
|
children: avatarDom
|
|
70
70
|
})]
|
|
71
71
|
}));
|
|
72
72
|
return wrapSSR( /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
73
|
-
className: `${prefixCls}-header-actions
|
|
73
|
+
className: (0, _clsx.clsx)(`${prefixCls}-header-actions`, hashId),
|
|
74
74
|
children: [doms.filter(Boolean).map((dom, index) => {
|
|
75
75
|
let hideHover = false;
|
|
76
76
|
// 如果配置了 hideHover 就不展示 hover 效果了
|
|
@@ -78,13 +78,13 @@ const ActionsContent = ({
|
|
|
78
78
|
hideHover = !!dom?.props?.['aria-hidden'];
|
|
79
79
|
}
|
|
80
80
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
81
|
-
className: (0, _clsx.clsx)(`${prefixCls}-header-actions-item
|
|
81
|
+
className: (0, _clsx.clsx)(`${prefixCls}-header-actions-item`, hashId, {
|
|
82
82
|
[`${prefixCls}-header-actions-hover`]: !hideHover
|
|
83
83
|
}),
|
|
84
84
|
children: dom
|
|
85
85
|
}, index);
|
|
86
86
|
}), avatarDom && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
87
|
-
className: `${prefixCls}-header-actions-avatar
|
|
87
|
+
className: (0, _clsx.clsx)(`${prefixCls}-header-actions-avatar`, hashId),
|
|
88
88
|
children: avatarDom
|
|
89
89
|
})]
|
|
90
90
|
}));
|
|
@@ -95,7 +95,7 @@ const ActionsContent = ({
|
|
|
95
95
|
}, 160);
|
|
96
96
|
const contentRender = rightActionsRender;
|
|
97
97
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
98
|
-
className: `${prefixCls}-right-content
|
|
98
|
+
className: (0, _clsx.clsx)(`${prefixCls}-right-content`, hashId),
|
|
99
99
|
style: {
|
|
100
100
|
minWidth: rightSize,
|
|
101
101
|
height: '100%'
|
|
@@ -121,7 +121,6 @@ const ActionsContent = ({
|
|
|
121
121
|
children: contentRender ? contentRender({
|
|
122
122
|
...props,
|
|
123
123
|
// 测试专用
|
|
124
|
-
//@ts-ignore
|
|
125
124
|
rightContentSize: rightSize
|
|
126
125
|
}) : null
|
|
127
126
|
})
|
|
@@ -82,7 +82,7 @@ const GlobalHeader = props => {
|
|
|
82
82
|
...style
|
|
83
83
|
},
|
|
84
84
|
children: [isMobile && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
85
|
-
className: `${baseClassName}-collapsed-button
|
|
85
|
+
className: (0, _clsx.clsx)(`${baseClassName}-collapsed-button`, hashId),
|
|
86
86
|
onClick: () => {
|
|
87
87
|
onCollapse?.(!collapsed);
|
|
88
88
|
},
|
|
@@ -42,7 +42,7 @@ const GridContent = props => {
|
|
|
42
42
|
}),
|
|
43
43
|
style: style,
|
|
44
44
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
45
|
-
className: `${prefixCls}-grid-content-children
|
|
45
|
+
className: (0, _clsx.clsx)(`${prefixCls}-grid-content-children`, hashId),
|
|
46
46
|
children: children
|
|
47
47
|
})
|
|
48
48
|
}));
|
|
@@ -102,9 +102,7 @@ const DefaultHeader = props => {
|
|
|
102
102
|
});
|
|
103
103
|
if (layout === 'side' && !isMobile) return null;
|
|
104
104
|
return stylish.wrapSSR(wrapSSR( /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
105
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_antd.ConfigProvider
|
|
106
|
-
// @ts-ignore
|
|
107
|
-
, {
|
|
105
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_antd.ConfigProvider, {
|
|
108
106
|
theme: {
|
|
109
107
|
hashed: (0, _provider.isNeedOpenHash)(),
|
|
110
108
|
components: {
|
|
@@ -8,6 +8,7 @@ exports.SelectKeyProvide = exports.ProHelpPanel = 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 _provider = require("../../../provider");
|
|
13
14
|
var _HelpProvide = require("./HelpProvide");
|
|
@@ -82,7 +83,7 @@ const ProHelpPanel = ({
|
|
|
82
83
|
const parentKey = (0, _react.useMemo)(() => dataSourceKeyMap.get(selectedKey)?.parentKey, [dataSourceKeyMap, selectedKey]);
|
|
83
84
|
const defaultExtraActions = {
|
|
84
85
|
collapsePanelAction: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
85
|
-
className: `${className}-actions-item
|
|
86
|
+
className: (0, _clsx.clsx)(`${className}-actions-item`, hashId),
|
|
86
87
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.ProfileOutlined, {
|
|
87
88
|
title: "collapse panel",
|
|
88
89
|
onClick: () => {
|
|
@@ -91,8 +92,8 @@ const ProHelpPanel = ({
|
|
|
91
92
|
})
|
|
92
93
|
}),
|
|
93
94
|
helpSelectAction: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Search.ProHelpSelect, {
|
|
94
|
-
iconClassName: `${className}-actions-item`,
|
|
95
|
-
className:
|
|
95
|
+
iconClassName: (0, _clsx.clsx)(`${className}-actions-item`, hashId),
|
|
96
|
+
className: (0, _clsx.clsx)(hashId, `${className}-actions-input`),
|
|
96
97
|
value: selectedKey,
|
|
97
98
|
onChange: (value, item) => {
|
|
98
99
|
setSelectedKey(value);
|
|
@@ -100,7 +101,7 @@ const ProHelpPanel = ({
|
|
|
100
101
|
}
|
|
101
102
|
}),
|
|
102
103
|
closeAction: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
103
|
-
className: `${className}-actions-item
|
|
104
|
+
className: (0, _clsx.clsx)(`${className}-actions-item`, hashId),
|
|
104
105
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.CloseOutlined, {
|
|
105
106
|
title: "close panel",
|
|
106
107
|
onClick: () => {
|
|
@@ -111,7 +112,7 @@ const ProHelpPanel = ({
|
|
|
111
112
|
};
|
|
112
113
|
const extraDomList = () => {
|
|
113
114
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
114
|
-
className: `${className}-actions
|
|
115
|
+
className: (0, _clsx.clsx)(`${className}-actions`, hashId),
|
|
115
116
|
children: extraRender ? extraRender(defaultExtraActions.collapsePanelAction, defaultExtraActions.helpSelectAction, defaultExtraActions.closeAction) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
116
117
|
children: [defaultExtraActions.collapsePanelAction, defaultExtraActions.helpSelectAction, onClose ? defaultExtraActions.closeAction : null]
|
|
117
118
|
})
|
|
@@ -137,7 +138,7 @@ const ProHelpPanel = ({
|
|
|
137
138
|
size: "small",
|
|
138
139
|
extra: extraDomList(),
|
|
139
140
|
children: [showLeftPanel ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
140
|
-
className:
|
|
141
|
+
className: (0, _clsx.clsx)(hashId, `${className}-left-panel`),
|
|
141
142
|
style: {
|
|
142
143
|
height
|
|
143
144
|
},
|
|
@@ -167,7 +168,7 @@ const ProHelpPanel = ({
|
|
|
167
168
|
}
|
|
168
169
|
},
|
|
169
170
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Menu, {
|
|
170
|
-
className:
|
|
171
|
+
className: (0, _clsx.clsx)(hashId, `${className}-left-panel-menu`),
|
|
171
172
|
openKeys: [parentKey, openKey],
|
|
172
173
|
onOpenChange: keys => {
|
|
173
174
|
setOpenKey(keys.at(-1) || '');
|
|
@@ -194,17 +195,17 @@ const ProHelpPanel = ({
|
|
|
194
195
|
})
|
|
195
196
|
})
|
|
196
197
|
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
197
|
-
className:
|
|
198
|
+
className: (0, _clsx.clsx)(hashId, `${className}-content-panel`),
|
|
198
199
|
style: {
|
|
199
200
|
height
|
|
200
201
|
},
|
|
201
202
|
children: [selectedKey ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ProHelpContentPanel.ProHelpContentPanel, {
|
|
202
203
|
parentItem: dataSourceKeyMap.get(parentKey),
|
|
203
|
-
className: `${className}-content-render`,
|
|
204
|
+
className: (0, _clsx.clsx)(`${className}-content-render`, hashId),
|
|
204
205
|
selectedKey: selectedKey,
|
|
205
206
|
onScroll: key => setSelectedKey(key)
|
|
206
207
|
}) : null, footer ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
207
|
-
className:
|
|
208
|
+
className: (0, _clsx.clsx)(hashId, `${className}-footer`),
|
|
208
209
|
children: footer
|
|
209
210
|
}) : null]
|
|
210
211
|
})]
|
|
@@ -41,7 +41,7 @@ const renderFooter = ({
|
|
|
41
41
|
}) => {
|
|
42
42
|
if (Array.isArray(tabList) || tabBarExtraContent) {
|
|
43
43
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Tabs, {
|
|
44
|
-
className: `${prefixedClassName}-tabs
|
|
44
|
+
className: (0, _clsx.clsx)(`${prefixedClassName}-tabs`, hashId),
|
|
45
45
|
activeKey: tabActiveKey,
|
|
46
46
|
onChange: key => {
|
|
47
47
|
if (onTabChange) {
|
|
@@ -64,16 +64,16 @@ const renderPageHeader = (content, extraContent, prefixedClassName, hashId) => {
|
|
|
64
64
|
return null;
|
|
65
65
|
}
|
|
66
66
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
67
|
-
className: `${prefixedClassName}-detail
|
|
67
|
+
className: (0, _clsx.clsx)(`${prefixedClassName}-detail`, hashId),
|
|
68
68
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
69
|
-
className: `${prefixedClassName}-main
|
|
69
|
+
className: (0, _clsx.clsx)(`${prefixedClassName}-main`, hashId),
|
|
70
70
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
71
|
-
className: `${prefixedClassName}-row
|
|
71
|
+
className: (0, _clsx.clsx)(`${prefixedClassName}-row`, hashId),
|
|
72
72
|
children: [content && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
73
|
-
className: `${prefixedClassName}-content
|
|
73
|
+
className: (0, _clsx.clsx)(`${prefixedClassName}-content`, hashId),
|
|
74
74
|
children: content
|
|
75
75
|
}), extraContent && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
76
|
-
className: `${prefixedClassName}-extraContent
|
|
76
|
+
className: (0, _clsx.clsx)(`${prefixedClassName}-extraContent`, hashId),
|
|
77
77
|
children: extraContent
|
|
78
78
|
})]
|
|
79
79
|
})
|
|
@@ -161,7 +161,7 @@ const memoRenderPageHeader = props => {
|
|
|
161
161
|
}
|
|
162
162
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_PageHeader.PageHeader, {
|
|
163
163
|
...pageHeaderProps,
|
|
164
|
-
className: `${prefixedClassName}-warp-page-header
|
|
164
|
+
className: (0, _clsx.clsx)(`${prefixedClassName}-warp-page-header`, hashId),
|
|
165
165
|
breadcrumb: breadcrumbRender === false ? undefined : {
|
|
166
166
|
...pageHeaderProps.breadcrumb,
|
|
167
167
|
...value.breadcrumbProps
|
|
@@ -196,7 +196,6 @@ const PageContainerBase = props => {
|
|
|
196
196
|
return () => {
|
|
197
197
|
value?.setHasPageContainer?.(num => num - 1);
|
|
198
198
|
};
|
|
199
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
200
199
|
}, []);
|
|
201
200
|
const {
|
|
202
201
|
token
|
|
@@ -283,9 +282,9 @@ const PageContainerBase = props => {
|
|
|
283
282
|
(0, _jsxRuntime.jsx)(_antd.Affix, {
|
|
284
283
|
offsetTop: value.hasHeader && value.fixedHeader ? token.layout?.header?.heightLayoutHeader : 1,
|
|
285
284
|
...affixProps,
|
|
286
|
-
className: `${basePageContainer}-affix
|
|
285
|
+
className: (0, _clsx.clsx)(`${basePageContainer}-affix`, hashId),
|
|
287
286
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
288
|
-
className: `${basePageContainer}-warp
|
|
287
|
+
className: (0, _clsx.clsx)(`${basePageContainer}-warp`, hashId),
|
|
289
288
|
children: pageHeaderDom
|
|
290
289
|
})
|
|
291
290
|
}) : pageHeaderDom, renderContentDom && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridContent.GridContent, {
|
|
@@ -9,6 +9,10 @@ const [sm, md, lg, xl] = [576, 768, 992, 1200].map(bp => `@media (max-width: ${b
|
|
|
9
9
|
const genPageContainerStyle = token => {
|
|
10
10
|
return {
|
|
11
11
|
[token.componentCls]: {
|
|
12
|
+
boxSizing: 'border-box',
|
|
13
|
+
'*, *::before, *::after': {
|
|
14
|
+
boxSizing: 'border-box'
|
|
15
|
+
},
|
|
12
16
|
position: 'relative',
|
|
13
17
|
'&-children-container': {
|
|
14
18
|
paddingBlockStart: 0,
|
|
@@ -17,13 +17,13 @@ const renderBack = (prefixCls, hashId, backIcon, onBack) => {
|
|
|
17
17
|
return null;
|
|
18
18
|
}
|
|
19
19
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
20
|
-
className: `${prefixCls}-back
|
|
20
|
+
className: (0, _clsx.clsx)(`${prefixCls}-back`, hashId),
|
|
21
21
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
22
22
|
role: "button",
|
|
23
23
|
onClick: e => {
|
|
24
24
|
onBack?.(e);
|
|
25
25
|
},
|
|
26
|
-
className: `${prefixCls}-back-button
|
|
26
|
+
className: (0, _clsx.clsx)(`${prefixCls}-back-button`, hashId),
|
|
27
27
|
"aria-label": "back",
|
|
28
28
|
children: backIcon
|
|
29
29
|
})
|
|
@@ -61,26 +61,26 @@ const renderTitle = (prefixCls, props, direction = 'ltr', hashId) => {
|
|
|
61
61
|
const backIconDom = renderBack(prefixCls, hashId, backIcon, onBack);
|
|
62
62
|
const hasTitle = backIconDom || avatar || hasHeading;
|
|
63
63
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
64
|
-
className: headingPrefixCls
|
|
64
|
+
className: (0, _clsx.clsx)(headingPrefixCls, hashId),
|
|
65
65
|
children: [hasTitle && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
66
|
-
className: `${headingPrefixCls}-left
|
|
66
|
+
className: (0, _clsx.clsx)(`${headingPrefixCls}-left`, hashId),
|
|
67
67
|
children: [backIconDom, avatar && /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Avatar, {
|
|
68
68
|
className: (0, _clsx.clsx)(`${headingPrefixCls}-avatar`, hashId, avatar.className),
|
|
69
69
|
...avatar
|
|
70
70
|
}), title && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
71
|
-
className: `${headingPrefixCls}-title
|
|
71
|
+
className: (0, _clsx.clsx)(`${headingPrefixCls}-title`, hashId),
|
|
72
72
|
title: typeof title === 'string' ? title : undefined,
|
|
73
73
|
children: title
|
|
74
74
|
}), subTitle && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
75
|
-
className: `${headingPrefixCls}-sub-title
|
|
75
|
+
className: (0, _clsx.clsx)(`${headingPrefixCls}-sub-title`, hashId),
|
|
76
76
|
title: typeof subTitle === 'string' ? subTitle : undefined,
|
|
77
77
|
children: subTitle
|
|
78
78
|
}), tags && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
79
|
-
className: `${headingPrefixCls}-tags
|
|
79
|
+
className: (0, _clsx.clsx)(`${headingPrefixCls}-tags`, hashId),
|
|
80
80
|
children: tags
|
|
81
81
|
})]
|
|
82
82
|
}), extra && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
83
|
-
className: `${headingPrefixCls}-extra
|
|
83
|
+
className: (0, _clsx.clsx)(`${headingPrefixCls}-extra`, hashId),
|
|
84
84
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Space, {
|
|
85
85
|
children: extra
|
|
86
86
|
})
|
|
@@ -90,14 +90,14 @@ const renderTitle = (prefixCls, props, direction = 'ltr', hashId) => {
|
|
|
90
90
|
const renderFooter = (prefixCls, footer, hashId) => {
|
|
91
91
|
if (footer) {
|
|
92
92
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
93
|
-
className: `${prefixCls}-footer
|
|
93
|
+
className: (0, _clsx.clsx)(`${prefixCls}-footer`, hashId),
|
|
94
94
|
children: footer
|
|
95
95
|
});
|
|
96
96
|
}
|
|
97
97
|
return null;
|
|
98
98
|
};
|
|
99
99
|
const renderChildren = (prefixCls, children, hashId) => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
100
|
-
className: `${prefixCls}-content
|
|
100
|
+
className: (0, _clsx.clsx)(`${prefixCls}-content`, hashId),
|
|
101
101
|
children: children
|
|
102
102
|
});
|
|
103
103
|
const PageHeader = props => {
|
|
@@ -25,18 +25,17 @@ const BlockCheckbox = ({
|
|
|
25
25
|
className: (0, _clsx.clsx)(hashId, `${baseClassName}-item`, `${baseClassName}-item-${item.key}`, `${baseClassName}-${configType}-item`),
|
|
26
26
|
onClick: () => onChange(item.key),
|
|
27
27
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.CheckOutlined, {
|
|
28
|
-
className: `${baseClassName}-selectIcon
|
|
28
|
+
className: (0, _clsx.clsx)(`${baseClassName}-selectIcon`, hashId),
|
|
29
29
|
style: {
|
|
30
30
|
display: value === item.key ? 'block' : 'none'
|
|
31
31
|
}
|
|
32
32
|
}), item?.icon ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
33
|
-
className: `${baseClassName}-icon
|
|
33
|
+
className: (0, _clsx.clsx)(`${baseClassName}-icon`, hashId),
|
|
34
34
|
children: item.icon
|
|
35
35
|
}) : null]
|
|
36
36
|
})
|
|
37
37
|
}, item.key));
|
|
38
38
|
return domList;
|
|
39
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
40
39
|
}, [value, list?.length, onChange]);
|
|
41
40
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
42
41
|
className: (0, _clsx.clsx)(baseClassName, hashId),
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.renderLayoutSettingItem = exports.LayoutSetting = void 0;
|
|
8
8
|
var _antd = require("antd");
|
|
9
|
+
var _clsx = require("clsx");
|
|
9
10
|
var _react = _interopRequireDefault(require("react"));
|
|
10
11
|
var _defaultSettings = require("../../defaultSettings");
|
|
11
12
|
var _index = require("./index");
|
|
@@ -44,7 +45,7 @@ const LayoutSetting = ({
|
|
|
44
45
|
fixSiderbar
|
|
45
46
|
} = settings || _defaultSettings.defaultSettings;
|
|
46
47
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.List, {
|
|
47
|
-
className: `${prefixCls}-list
|
|
48
|
+
className: (0, _clsx.clsx)(`${prefixCls}-list`, hashId),
|
|
48
49
|
split: false,
|
|
49
50
|
dataSource: [{
|
|
50
51
|
title: formatMessage({
|
|
@@ -54,7 +55,7 @@ const LayoutSetting = ({
|
|
|
54
55
|
action: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_antd.Select, {
|
|
55
56
|
value: contentWidth || 'Fixed',
|
|
56
57
|
size: "small",
|
|
57
|
-
className:
|
|
58
|
+
className: (0, _clsx.clsx)('content-width', hashId),
|
|
58
59
|
onSelect: value => {
|
|
59
60
|
changeSetting('contentWidth', value);
|
|
60
61
|
},
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.RegionalSetting = void 0;
|
|
8
8
|
var _antd = require("antd");
|
|
9
|
+
var _clsx = require("clsx");
|
|
9
10
|
var _react = _interopRequireDefault(require("react"));
|
|
10
11
|
var _index = require("./index");
|
|
11
12
|
var _LayoutChange = require("./LayoutChange");
|
|
@@ -19,7 +20,7 @@ const RegionalSetting = ({
|
|
|
19
20
|
const formatMessage = (0, _index.getFormatMessage)();
|
|
20
21
|
const regionalSetting = ['header', 'footer', 'menu', 'menuHeader'];
|
|
21
22
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.List, {
|
|
22
|
-
className: `${prefixCls}-list
|
|
23
|
+
className: (0, _clsx.clsx)(`${prefixCls}-list`, hashId),
|
|
23
24
|
split: false,
|
|
24
25
|
renderItem: _LayoutChange.renderLayoutSettingItem,
|
|
25
26
|
dataSource: regionalSetting.map(key => {
|
|
@@ -29,7 +30,7 @@ const RegionalSetting = ({
|
|
|
29
30
|
}),
|
|
30
31
|
action: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Switch, {
|
|
31
32
|
size: "small",
|
|
32
|
-
className: `regional-${key}
|
|
33
|
+
className: (0, _clsx.clsx)(`regional-${key}`, hashId),
|
|
33
34
|
checked: settings[`${key}Render`] || settings[`${key}Render`] === undefined,
|
|
34
35
|
onChange: checked => changeSetting(`${key}Render`, checked === true ? undefined : false)
|
|
35
36
|
})
|