@ant-design/pro-components 3.1.0-0 → 3.1.1-1
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/README.es-PR.md +1 -3
- package/README.md +8 -10
- package/README.zh-CN.md +11 -11
- package/dist/pro-components.min.js +1 -1
- package/es/card/ProCard.js +8 -10
- package/es/card/components/Actions/index.js +25 -25
- package/es/card/components/Actions/style.js +79 -71
- package/es/card/components/Card/index.js +157 -142
- package/es/card/components/Card/style.js +249 -192
- package/es/card/components/CheckCard/Group.js +94 -115
- package/es/card/components/CheckCard/index.js +85 -79
- package/es/card/components/CheckCard/style.js +184 -168
- package/es/card/components/Divider/index.js +19 -15
- package/es/card/components/Divider/style.js +32 -29
- package/es/card/components/Loading/index.js +19 -16
- package/es/card/components/Loading/style.js +34 -31
- package/es/card/components/Operation/index.js +16 -13
- package/es/card/components/Operation/style.js +19 -18
- package/es/card/components/Statistic/index.js +46 -41
- package/es/card/components/Statistic/style.js +89 -70
- package/es/card/components/StatisticCard/index.js +46 -41
- package/es/card/components/StatisticCard/style.js +37 -35
- package/es/descriptions/index.js +214 -225
- package/es/descriptions/useFetchData.js +53 -91
- package/es/field/AllProField.js +265 -216
- package/es/field/FieldHOC/index.js +9 -14
- package/es/field/PureProField.js +82 -80
- package/es/field/ValueTypeToComponent.js +517 -618
- package/es/field/components/Cascader/index.d.ts +3 -3
- package/es/field/components/Cascader/index.js +66 -84
- package/es/field/components/Checkbox/index.d.ts +2 -2
- package/es/field/components/Checkbox/index.js +75 -72
- package/es/field/components/Code/index.js +40 -39
- package/es/field/components/ColorPicker/index.d.ts +2 -2
- package/es/field/components/ColorPicker/index.js +38 -32
- package/es/field/components/DatePicker/index.d.ts +2 -2
- package/es/field/components/DatePicker/index.js +49 -53
- package/es/field/components/Digit/index.js +41 -42
- package/es/field/components/DigitRange/index.js +71 -77
- package/es/field/components/FromNow/index.js +27 -25
- package/es/field/components/Image/index.js +28 -24
- package/es/field/components/IndexColumn/index.js +22 -16
- package/es/field/components/Money/index.js +107 -116
- package/es/field/components/Options/index.js +34 -33
- package/es/field/components/Password/index.js +35 -38
- package/es/field/components/Percent/index.js +40 -44
- package/es/field/components/Percent/util.js +3 -5
- package/es/field/components/Progress/index.js +29 -27
- package/es/field/components/Radio/index.d.ts +1 -1
- package/es/field/components/Radio/index.js +61 -62
- package/es/field/components/RangePicker/index.d.ts +2 -2
- package/es/field/components/RangePicker/index.js +52 -63
- package/es/field/components/Rate/index.js +24 -21
- package/es/field/components/Second/index.js +36 -33
- package/es/field/components/Segmented/index.d.ts +1 -1
- package/es/field/components/Segmented/index.js +37 -46
- package/es/field/components/Select/LightSelect/index.d.ts +1 -1
- package/es/field/components/Select/LightSelect/index.js +102 -109
- package/es/field/components/Select/SearchSelect/index.js +129 -155
- package/es/field/components/Select/index.d.ts +2 -2
- package/es/field/components/Select/index.js +193 -219
- package/es/field/components/Slider/index.js +25 -22
- package/es/field/components/Status/index.js +67 -78
- package/es/field/components/Switch/index.d.ts +1 -1
- package/es/field/components/Switch/index.js +32 -30
- package/es/field/components/Text/index.js +34 -37
- package/es/field/components/TextArea/index.js +26 -21
- package/es/field/components/TextArea/readonly.js +24 -21
- package/es/field/components/TimePicker/index.js +96 -105
- package/es/field/components/TreeSelect/index.d.ts +3 -3
- package/es/field/components/TreeSelect/index.js +107 -125
- package/es/form/BaseForm/BaseForm.js +416 -502
- package/es/form/BaseForm/EditOrReadOnlyContext.js +1 -1
- package/es/form/BaseForm/LightWrapper/index.js +56 -65
- package/es/form/BaseForm/LightWrapper/style.js +17 -13
- package/es/form/BaseForm/Submitter/index.js +44 -43
- package/es/form/FieldContext.js +1 -1
- package/es/form/components/Captcha/index.js +74 -134
- package/es/form/components/Cascader/index.d.ts +1 -1
- package/es/form/components/Cascader/index.js +26 -28
- package/es/form/components/Checkbox/index.js +60 -61
- package/es/form/components/ColorPicker/index.d.ts +1 -1
- package/es/form/components/ColorPicker/index.js +24 -26
- package/es/form/components/DatePicker/BaseDatePicker.js +32 -30
- package/es/form/components/DatePicker/DatePicker.js +14 -13
- package/es/form/components/DatePicker/DateTimePicker.js +11 -12
- package/es/form/components/DatePicker/MonthPicker.js +14 -13
- package/es/form/components/DatePicker/QuarterPicker.js +14 -13
- package/es/form/components/DatePicker/TimePicker.js +26 -27
- package/es/form/components/DatePicker/WeekPicker.js +14 -13
- package/es/form/components/DatePicker/YearPicker.js +14 -13
- package/es/form/components/DatePicker/index.js +1 -1
- package/es/form/components/DateRangePicker/BaseDateRanger.js +34 -34
- package/es/form/components/DateRangePicker/DateMonthRangePicker.js +15 -16
- package/es/form/components/DateRangePicker/DateQuarterRangePicker.js +15 -16
- package/es/form/components/DateRangePicker/DateTimeRangePicker.js +15 -16
- package/es/form/components/DateRangePicker/DateWeekRangePicker.js +15 -16
- package/es/form/components/DateRangePicker/DateYearRangePicker.js +15 -16
- package/es/form/components/DateRangePicker/TimeRangePicker.js +26 -29
- package/es/form/components/DateRangePicker/index.js +15 -16
- package/es/form/components/Dependency/index.js +31 -34
- package/es/form/components/Digit/DigitRange.d.ts +2 -2
- package/es/form/components/Digit/DigitRange.js +23 -24
- package/es/form/components/Digit/index.d.ts +1 -1
- package/es/form/components/Digit/index.js +27 -29
- package/es/form/components/Field/index.js +55 -63
- package/es/form/components/FieldSet/index.js +68 -76
- package/es/form/components/FormItem/FormItemRender/index.js +58 -48
- package/es/form/components/FormItem/Group/index.js +95 -95
- package/es/form/components/FormItem/Group/style.js +46 -40
- package/es/form/components/FormItem/index.js +135 -141
- package/es/form/components/FormItem/warpField.js +165 -149
- package/es/form/components/List/ListContainer.js +98 -189
- package/es/form/components/List/ListItem.js +151 -198
- package/es/form/components/List/index.js +97 -107
- package/es/form/components/List/style.js +71 -47
- package/es/form/components/Money/index.d.ts +1 -1
- package/es/form/components/Money/index.js +28 -30
- package/es/form/components/Radio/index.d.ts +2 -2
- package/es/form/components/Radio/index.js +45 -49
- package/es/form/components/Rate/index.d.ts +1 -1
- package/es/form/components/Rate/index.js +17 -20
- package/es/form/components/SchemaForm/index.js +58 -72
- package/es/form/components/SchemaForm/layoutType/Embed.js +5 -6
- package/es/form/components/SchemaForm/layoutType/StepsForm.js +22 -26
- package/es/form/components/SchemaForm/valueType/dependency.js +11 -11
- package/es/form/components/SchemaForm/valueType/divider.js +4 -5
- package/es/form/components/SchemaForm/valueType/field.js +45 -44
- package/es/form/components/SchemaForm/valueType/formList.js +8 -7
- package/es/form/components/SchemaForm/valueType/formSet.js +8 -7
- package/es/form/components/SchemaForm/valueType/group.js +7 -8
- package/es/form/components/SchemaForm/valueType/ignore.js +2 -2
- package/es/form/components/SchemaForm/valueType/index.js +5 -5
- package/es/form/components/Segmented/index.js +20 -23
- package/es/form/components/Select/index.js +69 -73
- package/es/form/components/Slider/index.d.ts +1 -1
- package/es/form/components/Slider/index.js +33 -35
- package/es/form/components/Switch/index.js +24 -26
- package/es/form/components/Text/index.js +75 -86
- package/es/form/components/TextArea/index.d.ts +1 -1
- package/es/form/components/TextArea/index.js +17 -20
- package/es/form/components/TreeSelect/index.js +20 -23
- package/es/form/components/UploadButton/index.js +56 -103
- package/es/form/components/UploadDragger/index.js +37 -44
- package/es/form/helpers/grid.js +65 -67
- package/es/form/layouts/DrawerForm/index.js +150 -241
- package/es/form/layouts/DrawerForm/style.js +26 -25
- package/es/form/layouts/LightFilter/index.d.ts +12 -1
- package/es/form/layouts/LightFilter/index.js +158 -140
- package/es/form/layouts/LightFilter/style.js +52 -48
- package/es/form/layouts/LoginForm/index.js +44 -47
- package/es/form/layouts/LoginForm/style.js +71 -67
- package/es/form/layouts/LoginFormPage/index.js +45 -48
- package/es/form/layouts/LoginFormPage/style.js +136 -126
- package/es/form/layouts/ModalForm/index.js +119 -203
- package/es/form/layouts/ProForm/index.d.ts +2 -2
- package/es/form/layouts/ProForm/index.js +5 -5
- package/es/form/layouts/QueryFilter/Actions.js +23 -22
- package/es/form/layouts/QueryFilter/index.js +178 -203
- package/es/form/layouts/QueryFilter/style.js +45 -37
- package/es/form/layouts/StepsForm/StepForm.d.ts +2 -3
- package/es/form/layouts/StepsForm/StepForm.js +50 -71
- package/es/form/layouts/StepsForm/index.js +175 -217
- package/es/form/layouts/StepsForm/style.js +30 -28
- package/es/form/layouts/index.js +1 -1
- package/es/layout/ProLayout.js +281 -292
- package/es/layout/WrapContent.js +16 -12
- package/es/layout/assert/Logo.js +95 -97
- package/es/layout/components/AppsLogoComponents/AppsLogo.js +10 -12
- package/es/layout/components/AppsLogoComponents/DefaultContent.js +17 -16
- package/es/layout/components/AppsLogoComponents/SimpleContent.js +19 -18
- package/es/layout/components/AppsLogoComponents/index.js +33 -38
- package/es/layout/components/AppsLogoComponents/style/default.js +2 -2
- package/es/layout/components/AppsLogoComponents/style/index.js +52 -50
- package/es/layout/components/AppsLogoComponents/style/simple.js +1 -1
- package/es/layout/components/CollapsedIcon/index.js +18 -15
- package/es/layout/components/CollapsedIcon/style.js +40 -40
- package/es/layout/components/Footer.js +22 -21
- package/es/layout/components/FooterToolbar/index.js +58 -52
- package/es/layout/components/FooterToolbar/style/index.js +38 -37
- package/es/layout/components/FooterToolbar/style/stylish.js +11 -9
- package/es/layout/components/GlobalFooter/index.js +25 -25
- package/es/layout/components/GlobalFooter/style.js +31 -30
- package/es/layout/components/GlobalHeader/ActionsContent.js +62 -78
- package/es/layout/components/GlobalHeader/index.js +59 -47
- package/es/layout/components/GlobalHeader/rightContentStyle.js +49 -49
- package/es/layout/components/GlobalHeader/style.js +58 -54
- package/es/layout/components/GridContent/index.js +24 -19
- package/es/layout/components/GridContent/style.js +14 -13
- package/es/layout/components/Header/index.js +63 -57
- package/es/layout/components/Header/style/header.js +49 -47
- package/es/layout/components/Header/style/stylish.js +15 -11
- package/es/layout/components/Help/AsyncContentPanel.js +13 -18
- package/es/layout/components/Help/HelpProvide.js +1 -1
- package/es/layout/components/Help/ProHelpContentPanel.js +64 -83
- package/es/layout/components/Help/ProHelpDrawer.js +25 -31
- package/es/layout/components/Help/ProHelpModal.d.ts +1 -1
- package/es/layout/components/Help/ProHelpModal.js +24 -27
- package/es/layout/components/Help/ProHelpPanel.js +86 -94
- package/es/layout/components/Help/ProHelpPopover.js +18 -16
- package/es/layout/components/Help/RenderContentPanel.js +34 -24
- package/es/layout/components/Help/Search.js +52 -78
- package/es/layout/components/Help/index.js +9 -11
- package/es/layout/components/Help/style.js +82 -75
- package/es/layout/components/PageContainer/index.js +168 -149
- package/es/layout/components/PageContainer/style/index.js +95 -78
- package/es/layout/components/PageContainer/style/stylish.js +11 -9
- package/es/layout/components/PageHeader/index.js +96 -97
- package/es/layout/components/PageHeader/style/index.js +142 -122
- package/es/layout/components/PageLoading/index.js +17 -20
- package/es/layout/components/SettingDrawer/BlockCheckbox.js +29 -32
- package/es/layout/components/SettingDrawer/LayoutChange.js +22 -22
- package/es/layout/components/SettingDrawer/RegionalChange.js +14 -15
- package/es/layout/components/SettingDrawer/ThemeColor.js +32 -35
- package/es/layout/components/SettingDrawer/index.js +137 -168
- package/es/layout/components/SettingDrawer/style/index.js +141 -137
- package/es/layout/components/SiderMenu/BaseMenu.js +235 -221
- package/es/layout/components/SiderMenu/SiderMenu.js +125 -115
- package/es/layout/components/SiderMenu/index.js +47 -42
- package/es/layout/components/SiderMenu/style/index.js +179 -161
- package/es/layout/components/SiderMenu/style/menu.js +148 -110
- package/es/layout/components/SiderMenu/style/stylish.js +15 -11
- package/es/layout/components/TopNavHeader/index.js +71 -60
- package/es/layout/components/TopNavHeader/style.js +64 -63
- package/es/layout/context/RouteContext.js +1 -1
- package/es/layout/defaultSettings.js +1 -1
- package/es/layout/getPageTitle.js +23 -24
- package/es/layout/locales/en-US.js +3 -2
- package/es/layout/locales/index.js +5 -5
- package/es/layout/locales/it-IT.js +3 -2
- package/es/layout/locales/ko-KR.js +3 -2
- package/es/layout/locales/zh-CN.js +3 -2
- package/es/layout/locales/zh-TW.js +3 -2
- package/es/layout/style/index.js +48 -42
- package/es/layout/utils/getBreadcrumbProps.js +60 -60
- package/es/layout/utils/getMenuData.js +7 -11
- package/es/layout/utils/pathTools.js +2 -6
- package/es/layout/utils/useCurrentMenuLayoutProps.js +4 -9
- package/es/layout/utils/utils.js +15 -17
- package/es/list/Item.js +157 -137
- package/es/list/ListView.js +106 -115
- package/es/list/constants.js +2 -2
- package/es/list/index.js +72 -70
- package/es/list/style/index.js +281 -213
- package/es/provider/index.js +122 -115
- package/es/provider/intl.js +53 -55
- package/es/provider/typing/layoutToken.js +26 -23
- package/es/provider/useStyle/index.js +51 -59
- package/es/provider/utils/merge.js +10 -12
- package/es/skeleton/components/Descriptions/index.js +211 -229
- package/es/skeleton/components/List/index.js +208 -223
- package/es/skeleton/components/Result/index.js +45 -47
- package/es/skeleton/index.js +13 -10
- package/es/table/Store/Provide.d.ts +4 -4
- package/es/table/Store/Provide.js +102 -117
- package/es/table/Table.d.ts +5 -2
- package/es/table/Table.js +526 -691
- package/es/table/TableSearch.d.ts +24 -0
- package/es/table/TableSearch.js +54 -0
- package/es/table/TableToolbar.d.ts +22 -0
- package/es/table/TableToolbar.js +47 -0
- package/es/table/components/Alert/index.js +41 -40
- package/es/table/components/Alert/style.js +28 -27
- package/es/table/components/ColumnSetting/index.js +228 -223
- package/es/table/components/ColumnSetting/style.js +86 -71
- package/es/table/components/DragSortTable/index.js +65 -79
- package/es/table/components/DragSortTable/style.js +20 -19
- package/es/table/components/Dropdown/index.js +42 -47
- package/es/table/components/EditableTable/CellEditorTable.js +24 -32
- package/es/table/components/EditableTable/RowEditorTable.js +23 -28
- package/es/table/components/EditableTable/index.js +295 -329
- package/es/table/components/Form/FormRender.js +99 -103
- package/es/table/components/Form/index.d.ts +4 -19
- package/es/table/components/Form/index.js +112 -159
- package/es/table/components/ListToolBar/HeaderMenu.js +44 -52
- package/es/table/components/ListToolBar/index.js +122 -147
- package/es/table/components/ListToolBar/style.js +127 -117
- package/es/table/components/ToolBar/DensityIcon.js +10 -9
- package/es/table/components/ToolBar/FullscreenIcon.js +5 -9
- package/es/table/components/ToolBar/index.d.ts +2 -8
- package/es/table/components/ToolBar/index.js +155 -195
- package/es/table/style/index.js +144 -112
- package/es/table/typing.d.ts +4 -0
- package/es/table/useFetchData.js +199 -338
- package/es/table/utils/cellRenderToFromItem.js +105 -119
- package/es/table/utils/columnRender.js +63 -54
- package/es/table/utils/columnSort.js +22 -22
- package/es/table/utils/genProColumnToColumn.d.ts +13 -9
- package/es/table/utils/genProColumnToColumn.js +121 -98
- package/es/table/utils/index.d.ts +10 -0
- package/es/table/utils/index.js +112 -178
- package/es/table/utils/useDragSort.d.ts +1 -1
- package/es/table/utils/useDragSort.js +99 -92
- package/es/table/utils/usePageInfo.d.ts +6 -0
- package/es/table/utils/usePageInfo.js +55 -0
- package/es/utils/components/DropdownFooter/index.js +23 -21
- package/es/utils/components/DropdownFooter/style.js +16 -15
- package/es/utils/components/ErrorBoundary/index.js +27 -50
- package/es/utils/components/FieldLabel/index.js +70 -70
- package/es/utils/components/FieldLabel/style.js +104 -81
- package/es/utils/components/FilterDropdown/index.d.ts +11 -0
- package/es/utils/components/FilterDropdown/index.js +43 -32
- package/es/utils/components/FilterDropdown/style.js +19 -16
- package/es/utils/components/InlineErrorFormItem/index.js +78 -78
- package/es/utils/components/InlineErrorFormItem/style.js +56 -49
- package/es/utils/components/LabelIconTip/index.js +30 -31
- package/es/utils/components/LabelIconTip/style.js +36 -35
- package/es/utils/components/ProFormContext/index.js +1 -1
- package/es/utils/conversionMomentValue/index.js +19 -22
- package/es/utils/dateArrayFormatter/index.js +9 -14
- package/es/utils/genCopyable/index.js +74 -32
- package/es/utils/getFieldPropsOrFormItemProps/index.js +1 -1
- package/es/utils/hooks/useDebounceFn/index.js +18 -51
- package/es/utils/hooks/useDebounceValue/index.js +7 -16
- package/es/utils/hooks/useDeepCompareEffect/index.js +6 -18
- package/es/utils/hooks/useDocumentTitle/index.js +2 -2
- package/es/utils/hooks/useFetchData/index.js +36 -65
- package/es/utils/hooks/useForceRender/index.js +2 -9
- package/es/utils/hooks/useLatest/index.js +2 -2
- package/es/utils/hooks/usePrevious/index.js +3 -3
- package/es/utils/hooks/useReactiveRef/index.js +2 -2
- package/es/utils/hooks/useRefCallback/index.js +3 -3
- package/es/utils/hooks/useRefFunction/index.js +4 -9
- package/es/utils/index.d.ts +1 -2
- package/es/utils/index.js +1 -2
- package/es/utils/isBrowser/index.js +2 -2
- package/es/utils/isDeepEqualReact/index.js +9 -44
- package/es/utils/isDropdownValueType/index.js +2 -2
- package/es/utils/isNil/index.js +1 -3
- package/es/utils/isUrl/index.js +2 -2
- package/es/utils/merge/index.js +10 -12
- package/es/utils/nanoid/index.js +5 -6
- package/es/utils/omitBoolean/index.js +1 -1
- package/es/utils/omitUndefined/index.js +3 -3
- package/es/utils/omitUndefinedAndEmptyArr/index.js +4 -5
- package/es/utils/parseValueToMoment/index.js +3 -7
- package/es/utils/pickProFormItemProps/index.js +3 -3
- package/es/utils/pickProProps/index.js +6 -7
- package/es/utils/proFieldParsingText/index.js +85 -98
- package/es/utils/runFunction/index.js +2 -5
- package/es/utils/stringify/index.js +1 -1
- package/es/utils/transformKeySubmitValue/index.js +99 -116
- package/es/utils/useEditableArray/index.d.ts +6 -1
- package/es/utils/useEditableArray/index.js +579 -735
- package/es/utils/useEditableMap/index.d.ts +1 -1
- package/es/utils/useEditableMap/index.js +89 -135
- package/es/utils/useMediaQuery/index.d.ts +2 -2
- package/es/utils/useMediaQuery/index.js +37 -34
- package/es/utils/useMediaQuery/query.js +7 -17
- package/es/version.js +1 -1
- package/guidelines/Guidelines.md +33 -0
- package/guidelines/components/drawer-form.md +90 -0
- package/guidelines/components/editable-pro-table.md +150 -0
- package/guidelines/components/modal-form.md +88 -0
- package/guidelines/components/pro-card.md +90 -0
- package/guidelines/components/pro-form.md +96 -0
- package/guidelines/components/pro-layout.md +84 -0
- package/guidelines/components/pro-table.md +142 -0
- package/guidelines/components/steps-form.md +105 -0
- package/guidelines/design-tokens/colors.md +58 -0
- package/guidelines/design-tokens/layout.md +53 -0
- package/guidelines/design-tokens/typography.md +49 -0
- package/guidelines/overview-components.md +55 -0
- package/guidelines/overview-icons.md +23 -0
- package/lib/card/ProCard.js +8 -10
- package/lib/card/components/Actions/index.js +25 -25
- package/lib/card/components/Actions/style.js +79 -72
- package/lib/card/components/Card/index.js +154 -139
- package/lib/card/components/Card/style.js +249 -193
- package/lib/card/components/CheckCard/Group.js +97 -115
- package/lib/card/components/CheckCard/index.js +85 -78
- package/lib/card/components/CheckCard/style.js +184 -169
- package/lib/card/components/Divider/index.js +20 -16
- package/lib/card/components/Divider/style.js +32 -30
- package/lib/card/components/Loading/index.js +19 -16
- package/lib/card/components/Loading/style.js +34 -32
- package/lib/card/components/Operation/index.js +16 -14
- package/lib/card/components/Operation/style.js +19 -19
- package/lib/card/components/Statistic/index.js +46 -42
- package/lib/card/components/Statistic/style.js +89 -71
- package/lib/card/components/StatisticCard/index.js +46 -41
- package/lib/card/components/StatisticCard/style.js +37 -36
- package/lib/card/index.js +4 -4
- package/lib/descriptions/index.js +219 -225
- package/lib/descriptions/useFetchData.js +51 -90
- package/lib/field/AllProField.js +267 -217
- package/lib/field/FieldHOC/index.js +9 -15
- package/lib/field/PureProField.js +84 -82
- package/lib/field/ValueTypeToComponent.js +517 -618
- package/lib/field/components/Cascader/index.d.ts +2 -2
- package/lib/field/components/Cascader/index.js +66 -85
- package/lib/field/components/Checkbox/index.d.ts +1 -1
- package/lib/field/components/Checkbox/index.js +75 -73
- package/lib/field/components/Code/index.js +40 -39
- package/lib/field/components/ColorPicker/index.js +38 -33
- package/lib/field/components/DatePicker/index.d.ts +1 -1
- package/lib/field/components/DatePicker/index.js +49 -53
- package/lib/field/components/Digit/index.js +41 -43
- package/lib/field/components/DigitRange/index.js +69 -76
- package/lib/field/components/FromNow/index.js +27 -25
- package/lib/field/components/Image/index.js +28 -24
- package/lib/field/components/IndexColumn/index.js +22 -17
- package/lib/field/components/Money/index.js +106 -116
- package/lib/field/components/Options/index.js +34 -34
- package/lib/field/components/Password/index.js +35 -38
- package/lib/field/components/Percent/index.js +40 -45
- package/lib/field/components/Percent/util.js +3 -6
- package/lib/field/components/Progress/index.js +29 -28
- package/lib/field/components/Radio/index.d.ts +1 -1
- package/lib/field/components/Radio/index.js +61 -63
- package/lib/field/components/RangePicker/index.d.ts +1 -1
- package/lib/field/components/RangePicker/index.js +52 -63
- package/lib/field/components/Rate/index.js +24 -21
- package/lib/field/components/Second/index.js +36 -33
- package/lib/field/components/Segmented/index.d.ts +1 -1
- package/lib/field/components/Segmented/index.js +37 -48
- package/lib/field/components/Select/LightSelect/index.d.ts +1 -1
- package/lib/field/components/Select/LightSelect/index.js +103 -110
- package/lib/field/components/Select/SearchSelect/index.js +133 -156
- package/lib/field/components/Select/index.d.ts +1 -1
- package/lib/field/components/Select/index.js +194 -218
- package/lib/field/components/Slider/index.js +25 -22
- package/lib/field/components/Status/index.js +69 -79
- package/lib/field/components/Switch/index.d.ts +1 -1
- package/lib/field/components/Switch/index.js +32 -31
- package/lib/field/components/Text/index.js +34 -38
- package/lib/field/components/TextArea/index.js +26 -21
- package/lib/field/components/TextArea/readonly.js +24 -22
- package/lib/field/components/TimePicker/index.js +96 -105
- package/lib/field/components/TreeSelect/index.d.ts +2 -2
- package/lib/field/components/TreeSelect/index.js +105 -124
- package/lib/field/index.js +34 -34
- package/lib/form/BaseForm/BaseForm.js +413 -499
- package/lib/form/BaseForm/EditOrReadOnlyContext.js +1 -1
- package/lib/form/BaseForm/LightWrapper/index.js +57 -66
- package/lib/form/BaseForm/LightWrapper/style.js +17 -14
- package/lib/form/BaseForm/Submitter/index.js +44 -44
- package/lib/form/BaseForm/index.js +3 -3
- package/lib/form/FieldContext.js +1 -1
- package/lib/form/components/Captcha/index.js +74 -135
- package/lib/form/components/Cascader/index.js +26 -29
- package/lib/form/components/Checkbox/index.js +60 -61
- package/lib/form/components/ColorPicker/index.js +24 -26
- package/lib/form/components/DatePicker/BaseDatePicker.js +32 -30
- package/lib/form/components/DatePicker/DatePicker.js +14 -13
- package/lib/form/components/DatePicker/DateTimePicker.js +11 -12
- package/lib/form/components/DatePicker/MonthPicker.js +14 -13
- package/lib/form/components/DatePicker/QuarterPicker.js +14 -13
- package/lib/form/components/DatePicker/TimePicker.js +26 -27
- package/lib/form/components/DatePicker/WeekPicker.js +14 -13
- package/lib/form/components/DatePicker/YearPicker.js +14 -13
- package/lib/form/components/DatePicker/index.js +1 -1
- package/lib/form/components/DateRangePicker/BaseDateRanger.js +34 -34
- package/lib/form/components/DateRangePicker/DateMonthRangePicker.js +15 -16
- package/lib/form/components/DateRangePicker/DateQuarterRangePicker.js +15 -16
- package/lib/form/components/DateRangePicker/DateTimeRangePicker.js +15 -16
- package/lib/form/components/DateRangePicker/DateWeekRangePicker.js +15 -16
- package/lib/form/components/DateRangePicker/DateYearRangePicker.js +15 -16
- package/lib/form/components/DateRangePicker/TimeRangePicker.js +26 -29
- package/lib/form/components/DateRangePicker/index.js +15 -16
- package/lib/form/components/Dependency/index.js +31 -35
- package/lib/form/components/Digit/DigitRange.js +23 -24
- package/lib/form/components/Digit/index.js +27 -29
- package/lib/form/components/Field/index.js +55 -63
- package/lib/form/components/FieldSet/index.js +68 -76
- package/lib/form/components/FormItem/FormItemRender/index.js +58 -48
- package/lib/form/components/FormItem/Group/index.js +95 -95
- package/lib/form/components/FormItem/Group/style.js +46 -41
- package/lib/form/components/FormItem/index.js +135 -141
- package/lib/form/components/FormItem/warpField.js +165 -149
- package/lib/form/components/List/ListContainer.js +100 -191
- package/lib/form/components/List/ListItem.js +153 -200
- package/lib/form/components/List/index.js +97 -107
- package/lib/form/components/List/style.js +71 -48
- package/lib/form/components/Money/index.js +28 -30
- package/lib/form/components/Radio/index.js +45 -49
- package/lib/form/components/Rate/index.js +17 -21
- package/lib/form/components/SchemaForm/index.js +54 -68
- package/lib/form/components/SchemaForm/layoutType/Embed.js +5 -6
- package/lib/form/components/SchemaForm/layoutType/StepsForm.js +22 -26
- package/lib/form/components/SchemaForm/layoutType/index.js +2 -2
- package/lib/form/components/SchemaForm/valueType/dependency.js +13 -12
- package/lib/form/components/SchemaForm/valueType/divider.js +6 -7
- package/lib/form/components/SchemaForm/valueType/field.js +47 -45
- package/lib/form/components/SchemaForm/valueType/formList.js +10 -9
- package/lib/form/components/SchemaForm/valueType/formSet.js +10 -8
- package/lib/form/components/SchemaForm/valueType/group.js +9 -10
- package/lib/form/components/SchemaForm/valueType/ignore.js +4 -3
- package/lib/form/components/SchemaForm/valueType/index.js +7 -6
- package/lib/form/components/Segmented/index.js +20 -24
- package/lib/form/components/Select/index.js +69 -73
- package/lib/form/components/Slider/index.js +33 -35
- package/lib/form/components/Switch/index.js +24 -26
- package/lib/form/components/Text/index.js +73 -84
- package/lib/form/components/TextArea/index.js +17 -21
- package/lib/form/components/TreeSelect/index.js +20 -23
- package/lib/form/components/UploadButton/index.js +56 -103
- package/lib/form/components/UploadDragger/index.js +37 -44
- package/lib/form/components/index.js +42 -42
- package/lib/form/helpers/grid.js +68 -69
- package/lib/form/helpers/index.js +1 -1
- package/lib/form/index.js +8 -8
- package/lib/form/layouts/DrawerForm/index.js +149 -241
- package/lib/form/layouts/DrawerForm/style.js +26 -26
- package/lib/form/layouts/LightFilter/index.d.ts +12 -1
- package/lib/form/layouts/LightFilter/index.js +158 -141
- package/lib/form/layouts/LightFilter/style.js +52 -49
- package/lib/form/layouts/LoginForm/index.js +44 -48
- package/lib/form/layouts/LoginForm/style.js +71 -68
- package/lib/form/layouts/LoginFormPage/index.js +45 -49
- package/lib/form/layouts/LoginFormPage/style.js +136 -127
- package/lib/form/layouts/ModalForm/index.js +118 -203
- package/lib/form/layouts/ProForm/index.d.ts +1 -1
- package/lib/form/layouts/ProForm/index.js +5 -5
- package/lib/form/layouts/QueryFilter/Actions.js +23 -22
- package/lib/form/layouts/QueryFilter/index.js +177 -202
- package/lib/form/layouts/QueryFilter/style.js +45 -38
- package/lib/form/layouts/StepsForm/StepForm.d.ts +2 -3
- package/lib/form/layouts/StepsForm/StepForm.js +50 -72
- package/lib/form/layouts/StepsForm/index.js +174 -216
- package/lib/form/layouts/StepsForm/style.js +30 -29
- package/lib/form/layouts/index.js +9 -9
- package/lib/index.js +11 -11
- package/lib/layout/ProLayout.js +281 -292
- package/lib/layout/WrapContent.js +18 -14
- package/lib/layout/assert/Logo.js +96 -97
- package/lib/layout/components/AppsLogoComponents/AppsLogo.js +11 -12
- package/lib/layout/components/AppsLogoComponents/DefaultContent.js +19 -17
- package/lib/layout/components/AppsLogoComponents/SimpleContent.js +22 -19
- package/lib/layout/components/AppsLogoComponents/index.js +36 -40
- package/lib/layout/components/AppsLogoComponents/style/default.js +4 -3
- package/lib/layout/components/AppsLogoComponents/style/index.js +52 -51
- package/lib/layout/components/AppsLogoComponents/style/simple.js +3 -2
- package/lib/layout/components/CollapsedIcon/index.js +20 -17
- package/lib/layout/components/CollapsedIcon/style.js +40 -41
- package/lib/layout/components/Footer.js +23 -22
- package/lib/layout/components/FooterToolbar/index.js +59 -53
- package/lib/layout/components/FooterToolbar/style/index.js +38 -38
- package/lib/layout/components/FooterToolbar/style/stylish.js +11 -10
- package/lib/layout/components/GlobalFooter/index.js +27 -27
- package/lib/layout/components/GlobalFooter/style.js +31 -31
- package/lib/layout/components/GlobalHeader/ActionsContent.js +65 -81
- package/lib/layout/components/GlobalHeader/index.js +61 -49
- package/lib/layout/components/GlobalHeader/rightContentStyle.js +49 -50
- package/lib/layout/components/GlobalHeader/style.js +58 -55
- package/lib/layout/components/GridContent/index.js +26 -21
- package/lib/layout/components/GridContent/style.js +14 -14
- package/lib/layout/components/Header/index.js +65 -59
- package/lib/layout/components/Header/style/header.js +49 -48
- package/lib/layout/components/Header/style/stylish.js +15 -12
- package/lib/layout/components/Help/AsyncContentPanel.js +15 -20
- package/lib/layout/components/Help/HelpProvide.js +1 -1
- package/lib/layout/components/Help/ProHelpContentPanel.js +66 -85
- package/lib/layout/components/Help/ProHelpDrawer.js +27 -32
- package/lib/layout/components/Help/ProHelpModal.d.ts +1 -1
- package/lib/layout/components/Help/ProHelpModal.js +26 -28
- package/lib/layout/components/Help/ProHelpPanel.js +86 -94
- package/lib/layout/components/Help/ProHelpPopover.js +20 -18
- package/lib/layout/components/Help/RenderContentPanel.js +36 -26
- package/lib/layout/components/Help/Search.js +55 -80
- package/lib/layout/components/Help/index.js +19 -20
- package/lib/layout/components/Help/style.js +82 -76
- package/lib/layout/components/PageContainer/index.js +172 -151
- package/lib/layout/components/PageContainer/style/index.js +95 -79
- package/lib/layout/components/PageContainer/style/stylish.js +11 -10
- package/lib/layout/components/PageHeader/index.js +99 -99
- package/lib/layout/components/PageHeader/style/index.js +142 -123
- package/lib/layout/components/PageLoading/index.js +18 -20
- package/lib/layout/components/SettingDrawer/BlockCheckbox.js +31 -34
- package/lib/layout/components/SettingDrawer/LayoutChange.js +25 -23
- package/lib/layout/components/SettingDrawer/RegionalChange.js +16 -16
- package/lib/layout/components/SettingDrawer/ThemeColor.js +34 -36
- package/lib/layout/components/SettingDrawer/index.js +138 -168
- package/lib/layout/components/SettingDrawer/style/index.js +141 -138
- package/lib/layout/components/SiderMenu/BaseMenu.js +235 -221
- package/lib/layout/components/SiderMenu/SiderMenu.js +128 -117
- package/lib/layout/components/SiderMenu/index.js +49 -44
- package/lib/layout/components/SiderMenu/style/index.js +179 -162
- package/lib/layout/components/SiderMenu/style/menu.js +148 -111
- package/lib/layout/components/SiderMenu/style/stylish.js +15 -12
- package/lib/layout/components/TopNavHeader/index.js +73 -62
- package/lib/layout/components/TopNavHeader/style.js +64 -64
- package/lib/layout/context/RouteContext.js +1 -1
- package/lib/layout/defaultSettings.js +1 -1
- package/lib/layout/getPageTitle.js +27 -26
- package/lib/layout/index.js +16 -16
- package/lib/layout/locales/en-US.js +3 -2
- package/lib/layout/locales/index.js +8 -6
- package/lib/layout/locales/it-IT.js +3 -2
- package/lib/layout/locales/ko-KR.js +3 -2
- package/lib/layout/locales/zh-CN.js +3 -2
- package/lib/layout/locales/zh-TW.js +3 -2
- package/lib/layout/style/index.js +48 -43
- package/lib/layout/utils/getBreadcrumbProps.js +65 -62
- package/lib/layout/utils/getMenuData.js +9 -13
- package/lib/layout/utils/pathTools.js +2 -6
- package/lib/layout/utils/useCurrentMenuLayoutProps.js +6 -11
- package/lib/layout/utils/utils.js +16 -18
- package/lib/list/Item.js +155 -136
- package/lib/list/ListView.js +110 -119
- package/lib/list/constants.js +2 -2
- package/lib/list/index.js +72 -70
- package/lib/list/style/index.js +281 -214
- package/lib/provider/index.js +128 -118
- package/lib/provider/intl.js +56 -56
- package/lib/provider/typing/layoutToken.js +28 -25
- package/lib/provider/useStyle/index.js +55 -60
- package/lib/provider/utils/merge.js +12 -14
- package/lib/skeleton/components/Descriptions/index.js +213 -229
- package/lib/skeleton/components/List/index.js +211 -221
- package/lib/skeleton/components/Result/index.js +45 -47
- package/lib/skeleton/index.js +23 -19
- package/lib/table/Store/Provide.d.ts +4 -4
- package/lib/table/Store/Provide.js +103 -117
- package/lib/table/Table.d.ts +5 -2
- package/lib/table/Table.js +524 -689
- package/lib/table/TableSearch.d.ts +24 -0
- package/lib/table/TableSearch.js +61 -0
- package/lib/table/TableToolbar.d.ts +22 -0
- package/lib/table/TableToolbar.js +55 -0
- package/lib/table/components/Alert/index.js +41 -40
- package/lib/table/components/Alert/style.js +28 -28
- package/lib/table/components/ColumnSetting/index.js +228 -224
- package/lib/table/components/ColumnSetting/style.js +86 -72
- package/lib/table/components/DragSortTable/index.js +64 -78
- package/lib/table/components/DragSortTable/style.js +20 -20
- package/lib/table/components/Dropdown/index.js +42 -48
- package/lib/table/components/EditableTable/CellEditorTable.js +24 -32
- package/lib/table/components/EditableTable/RowEditorTable.js +23 -28
- package/lib/table/components/EditableTable/index.js +293 -327
- package/lib/table/components/Form/FormRender.js +99 -104
- package/lib/table/components/Form/index.d.ts +4 -19
- package/lib/table/components/Form/index.js +113 -159
- package/lib/table/components/ListToolBar/HeaderMenu.js +42 -51
- package/lib/table/components/ListToolBar/index.js +123 -148
- package/lib/table/components/ListToolBar/style.js +127 -118
- package/lib/table/components/ToolBar/DensityIcon.js +10 -9
- package/lib/table/components/ToolBar/FullscreenIcon.js +5 -10
- package/lib/table/components/ToolBar/index.d.ts +2 -8
- package/lib/table/components/ToolBar/index.js +154 -194
- package/lib/table/index.js +27 -27
- package/lib/table/style/index.js +144 -113
- package/lib/table/typing.d.ts +4 -0
- package/lib/table/useFetchData.js +197 -337
- package/lib/table/utils/cellRenderToFromItem.js +106 -120
- package/lib/table/utils/columnRender.js +65 -54
- package/lib/table/utils/columnSort.js +24 -23
- package/lib/table/utils/genProColumnToColumn.d.ts +13 -9
- package/lib/table/utils/genProColumnToColumn.js +121 -99
- package/lib/table/utils/index.d.ts +10 -0
- package/lib/table/utils/index.js +127 -181
- package/lib/table/utils/useDragSort.d.ts +1 -1
- package/lib/table/utils/useDragSort.js +99 -93
- package/lib/table/utils/usePageInfo.d.ts +6 -0
- package/lib/table/utils/usePageInfo.js +61 -0
- package/lib/utils/components/DropdownFooter/index.js +25 -23
- package/lib/utils/components/DropdownFooter/style.js +16 -16
- package/lib/utils/components/ErrorBoundary/index.js +28 -50
- package/lib/utils/components/FieldLabel/index.js +70 -71
- package/lib/utils/components/FieldLabel/style.js +104 -82
- package/lib/utils/components/FilterDropdown/index.d.ts +11 -0
- package/lib/utils/components/FilterDropdown/index.js +44 -33
- package/lib/utils/components/FilterDropdown/style.js +19 -17
- package/lib/utils/components/InlineErrorFormItem/index.js +80 -80
- package/lib/utils/components/InlineErrorFormItem/style.js +56 -50
- package/lib/utils/components/LabelIconTip/index.js +30 -32
- package/lib/utils/components/LabelIconTip/style.js +36 -36
- package/lib/utils/components/ProFormContext/index.js +1 -1
- package/lib/utils/conversionMomentValue/index.js +22 -23
- package/lib/utils/dateArrayFormatter/index.js +11 -15
- package/lib/utils/genCopyable/index.js +75 -33
- package/lib/utils/getFieldPropsOrFormItemProps/index.js +3 -2
- package/lib/utils/hooks/useDebounceFn/index.js +18 -52
- package/lib/utils/hooks/useDebounceValue/index.js +7 -17
- package/lib/utils/hooks/useDeepCompareEffect/index.js +7 -19
- package/lib/utils/hooks/useDocumentTitle/index.js +2 -2
- package/lib/utils/hooks/useFetchData/index.js +36 -65
- package/lib/utils/hooks/useForceRender/index.js +2 -10
- package/lib/utils/hooks/useLatest/index.js +4 -3
- package/lib/utils/hooks/usePrevious/index.js +5 -4
- package/lib/utils/hooks/useReactiveRef/index.js +2 -2
- package/lib/utils/hooks/useRefCallback/index.js +3 -3
- package/lib/utils/hooks/useRefFunction/index.js +6 -11
- package/lib/utils/index.d.ts +1 -2
- package/lib/utils/index.js +57 -65
- package/lib/utils/isBrowser/index.js +4 -3
- package/lib/utils/isDeepEqualReact/index.js +9 -45
- package/lib/utils/isDropdownValueType/index.js +4 -3
- package/lib/utils/isNil/index.js +2 -3
- package/lib/utils/isUrl/index.js +4 -3
- package/lib/utils/merge/index.js +12 -14
- package/lib/utils/nanoid/index.js +7 -7
- package/lib/utils/omitBoolean/index.js +3 -2
- package/lib/utils/omitUndefined/index.js +5 -4
- package/lib/utils/omitUndefinedAndEmptyArr/index.js +6 -6
- package/lib/utils/parseValueToMoment/index.js +5 -8
- package/lib/utils/pickProFormItemProps/index.js +3 -3
- package/lib/utils/pickProProps/index.js +6 -7
- package/lib/utils/proFieldParsingText/index.js +89 -99
- package/lib/utils/runFunction/index.js +2 -5
- package/lib/utils/stringify/index.js +2 -2
- package/lib/utils/transformKeySubmitValue/index.js +101 -117
- package/lib/utils/useEditableArray/index.d.ts +6 -1
- package/lib/utils/useEditableArray/index.js +582 -735
- package/lib/utils/useEditableMap/index.d.ts +1 -1
- package/lib/utils/useEditableMap/index.js +88 -135
- package/lib/utils/useMediaQuery/index.js +40 -35
- package/lib/utils/useMediaQuery/query.js +7 -18
- package/lib/version.js +1 -1
- package/package.json +20 -31
- package/es/utils/useMountMergeState/index.d.ts +0 -2
- package/es/utils/useMountMergeState/index.js +0 -2
- package/lib/utils/useMountMergeState/index.d.ts +0 -2
- package/lib/utils/useMountMergeState/index.js +0 -12
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.TopNavHeader = void 0;
|
|
9
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
11
8
|
var _antd = require("antd");
|
|
12
|
-
var
|
|
9
|
+
var _clsx = require("clsx");
|
|
13
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
11
|
var _provider = require("../../../provider");
|
|
15
12
|
var _AppsLogoComponents = require("../AppsLogoComponents");
|
|
@@ -18,38 +15,43 @@ var _BaseMenu = require("../SiderMenu/BaseMenu");
|
|
|
18
15
|
var _SiderMenu = require("../SiderMenu/SiderMenu");
|
|
19
16
|
var _style = require("./style");
|
|
20
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
contentWidth
|
|
26
|
-
propsClassName
|
|
27
|
-
style
|
|
28
|
-
headerContentRender
|
|
29
|
-
layout
|
|
30
|
-
actionsRender
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
18
|
+
const TopNavHeader = props => {
|
|
19
|
+
const ref = (0, _react.useRef)(null);
|
|
20
|
+
const {
|
|
21
|
+
onMenuHeaderClick,
|
|
22
|
+
contentWidth,
|
|
23
|
+
className: propsClassName,
|
|
24
|
+
style,
|
|
25
|
+
headerContentRender,
|
|
26
|
+
layout,
|
|
27
|
+
actionsRender
|
|
28
|
+
} = props;
|
|
29
|
+
const {
|
|
30
|
+
getPrefixCls
|
|
31
|
+
} = (0, _react.useContext)(_antd.ConfigProvider.ConfigContext);
|
|
32
|
+
const {
|
|
33
|
+
dark
|
|
34
|
+
} = (0, _react.useContext)(_provider.ProProvider);
|
|
35
|
+
const prefixCls = `${props.prefixCls || getPrefixCls('pro')}-top-nav-header`;
|
|
36
|
+
const {
|
|
37
|
+
wrapSSR,
|
|
38
|
+
hashId
|
|
39
|
+
} = (0, _style.useStyle)(prefixCls);
|
|
40
|
+
let renderKey = undefined;
|
|
40
41
|
if (props.menuHeaderRender !== undefined) {
|
|
41
42
|
renderKey = 'menuHeaderRender';
|
|
42
43
|
} else if (layout === 'mix' || layout === 'top') {
|
|
43
44
|
renderKey = 'headerTitleRender';
|
|
44
45
|
}
|
|
45
|
-
|
|
46
|
+
const headerDom = (0, _SiderMenu.renderLogoAndTitle)({
|
|
47
|
+
...props,
|
|
46
48
|
collapsed: false
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
token
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
}, renderKey);
|
|
50
|
+
const {
|
|
51
|
+
token
|
|
52
|
+
} = (0, _react.useContext)(_provider.ProProvider);
|
|
53
|
+
const contentDom = (0, _react.useMemo)(() => {
|
|
54
|
+
const defaultDom = /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.ConfigProvider // @ts-ignore
|
|
53
55
|
, {
|
|
54
56
|
theme: {
|
|
55
57
|
hashed: (0, _provider.isNeedOpenHash)(),
|
|
@@ -59,59 +61,66 @@ var TopNavHeader = exports.TopNavHeader = function TopNavHeader(props) {
|
|
|
59
61
|
bodyBg: 'transparent'
|
|
60
62
|
},
|
|
61
63
|
Menu: {
|
|
62
|
-
itemBg:
|
|
63
|
-
subMenuItemBg:
|
|
64
|
+
itemBg: token.layout?.header?.colorBgHeader || 'transparent',
|
|
65
|
+
subMenuItemBg: token.layout?.header?.colorBgHeader || 'transparent',
|
|
64
66
|
itemBorderRadius: token.borderRadius,
|
|
65
|
-
itemSelectedBg:
|
|
66
|
-
horizontalItemSelectedBg:
|
|
67
|
+
itemSelectedBg: token.layout?.header?.colorBgMenuItemSelected || token?.colorBgTextHover,
|
|
68
|
+
horizontalItemSelectedBg: token.layout?.header?.colorBgMenuItemSelected || token?.colorBgTextHover,
|
|
67
69
|
activeBarWidth: 0,
|
|
68
70
|
activeBarHeight: 0,
|
|
69
71
|
activeBarBorderWidth: 0,
|
|
70
|
-
itemColor:
|
|
71
|
-
horizontalItemHoverColor:
|
|
72
|
-
horizontalItemSelectedColor:
|
|
72
|
+
itemColor: token.layout?.header?.colorTextMenu || token?.colorTextSecondary,
|
|
73
|
+
horizontalItemHoverColor: token.layout?.header?.colorTextMenuActive || token?.colorText,
|
|
74
|
+
horizontalItemSelectedColor: token.layout?.header?.colorTextMenuSelected || token?.colorTextBase,
|
|
73
75
|
horizontalItemBorderRadius: 4,
|
|
74
|
-
itemHoverColor:
|
|
75
|
-
horizontalItemHoverBg:
|
|
76
|
-
itemSelectedColor:
|
|
77
|
-
popupBg: token
|
|
76
|
+
itemHoverColor: token.layout?.header?.colorTextMenuActive || 'rgba(0, 0, 0, 0.85)',
|
|
77
|
+
horizontalItemHoverBg: token.layout?.header?.colorBgMenuItemHover || 'rgba(0, 0, 0, 0.04)',
|
|
78
|
+
itemSelectedColor: token.layout?.header?.colorTextMenuSelected || 'rgba(0, 0, 0, 1)',
|
|
79
|
+
popupBg: token?.colorBgElevated,
|
|
78
80
|
darkSubMenuItemBg: 'transparent',
|
|
79
|
-
darkPopupBg: token
|
|
81
|
+
darkPopupBg: token?.colorBgElevated
|
|
80
82
|
}
|
|
81
83
|
},
|
|
82
84
|
token: {
|
|
83
|
-
colorBgElevated:
|
|
85
|
+
colorBgElevated: token.layout?.header?.colorBgHeader || 'transparent'
|
|
84
86
|
}
|
|
85
87
|
},
|
|
86
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_BaseMenu.BaseMenu,
|
|
87
|
-
theme: dark ? 'dark' : 'light'
|
|
88
|
-
|
|
89
|
-
className:
|
|
90
|
-
|
|
91
|
-
style:
|
|
92
|
-
width: '100%'
|
|
93
|
-
|
|
88
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_BaseMenu.BaseMenu, {
|
|
89
|
+
theme: dark ? 'dark' : 'light',
|
|
90
|
+
...props,
|
|
91
|
+
className: `${prefixCls}-base-menu ${hashId}`.trim(),
|
|
92
|
+
...props.menuProps,
|
|
93
|
+
style: {
|
|
94
|
+
width: '100%',
|
|
95
|
+
...props.menuProps?.style
|
|
96
|
+
},
|
|
94
97
|
collapsed: false,
|
|
95
98
|
menuRenderType: "header",
|
|
96
99
|
mode: "horizontal"
|
|
97
|
-
})
|
|
100
|
+
})
|
|
98
101
|
});
|
|
99
102
|
if (headerContentRender) {
|
|
100
103
|
return headerContentRender(props, defaultDom);
|
|
101
104
|
}
|
|
102
105
|
return defaultDom;
|
|
103
|
-
}, [
|
|
106
|
+
}, [token.layout?.header?.colorBgHeader, token.layout?.header?.colorBgMenuItemSelected, token.layout?.header?.colorBgMenuItemHover, token.layout?.header?.colorTextMenu, token.layout?.header?.colorTextMenuActive, token.layout?.header?.colorTextMenuSelected, token.layout?.header?.colorBgMenuElevated, token.borderRadius, token?.colorBgTextHover, token?.colorTextSecondary, token?.colorText, token?.colorTextBase, token.colorBgElevated, dark, props, prefixCls, hashId, headerContentRender]);
|
|
104
107
|
return wrapSSR( /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
105
|
-
className: (0,
|
|
108
|
+
className: (0, _clsx.clsx)(prefixCls, hashId, propsClassName, {
|
|
109
|
+
[`${prefixCls}-light`]: true
|
|
110
|
+
}),
|
|
106
111
|
style: style,
|
|
107
112
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
108
113
|
ref: ref,
|
|
109
|
-
className: (0,
|
|
114
|
+
className: (0, _clsx.clsx)(`${prefixCls}-main`, hashId, {
|
|
115
|
+
[`${prefixCls}-wide`]: contentWidth === 'Fixed' && layout === 'top'
|
|
116
|
+
}),
|
|
110
117
|
children: [headerDom && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
111
|
-
className: (0,
|
|
118
|
+
className: (0, _clsx.clsx)(`${prefixCls}-main-left ${hashId}`),
|
|
112
119
|
onClick: onMenuHeaderClick,
|
|
113
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_AppsLogoComponents.AppsLogoComponents,
|
|
114
|
-
|
|
120
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_AppsLogoComponents.AppsLogoComponents, {
|
|
121
|
+
...props
|
|
122
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
123
|
+
className: `${prefixCls}-logo ${hashId}`.trim(),
|
|
115
124
|
id: "logo",
|
|
116
125
|
children: headerDom
|
|
117
126
|
}, "logo")]
|
|
@@ -119,11 +128,13 @@ var TopNavHeader = exports.TopNavHeader = function TopNavHeader(props) {
|
|
|
119
128
|
style: {
|
|
120
129
|
flex: 1
|
|
121
130
|
},
|
|
122
|
-
className:
|
|
131
|
+
className: `${prefixCls}-menu ${hashId}`.trim(),
|
|
123
132
|
children: contentDom
|
|
124
|
-
}), (actionsRender || props.avatarProps) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ActionsContent.ActionsContent,
|
|
133
|
+
}), (actionsRender || props.avatarProps) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ActionsContent.ActionsContent, {
|
|
134
|
+
...props,
|
|
125
135
|
prefixCls: prefixCls
|
|
126
|
-
})
|
|
136
|
+
})]
|
|
127
137
|
})
|
|
128
138
|
}));
|
|
129
|
-
};
|
|
139
|
+
};
|
|
140
|
+
exports.TopNavHeader = TopNavHeader;
|
|
@@ -1,83 +1,83 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.useStyle = useStyle;
|
|
8
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
7
|
var _provider = require("../../../provider");
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
position: 'relative',
|
|
15
|
-
width: '100%',
|
|
16
|
-
height: '100%',
|
|
17
|
-
backgroundColor: 'transparent',
|
|
18
|
-
'.anticon': {
|
|
19
|
-
color: 'inherit'
|
|
20
|
-
},
|
|
21
|
-
'&-main': {
|
|
22
|
-
display: 'flex',
|
|
23
|
-
height: '100%',
|
|
24
|
-
paddingInlineStart: '16px',
|
|
25
|
-
'&-left': (0, _defineProperty2.default)({
|
|
26
|
-
display: 'flex',
|
|
27
|
-
alignItems: 'center'
|
|
28
|
-
}, "".concat(token.proComponentsCls, "-layout-apps-icon"), {
|
|
29
|
-
marginInlineEnd: 16,
|
|
30
|
-
marginInlineStart: -8
|
|
31
|
-
})
|
|
32
|
-
},
|
|
33
|
-
'&-wide': {
|
|
34
|
-
maxWidth: 1152,
|
|
35
|
-
margin: '0 auto'
|
|
36
|
-
},
|
|
37
|
-
'&-logo': {
|
|
8
|
+
const genTopNavHeaderStyle = token => {
|
|
9
|
+
return {
|
|
10
|
+
[token.componentCls]: {
|
|
38
11
|
position: 'relative',
|
|
39
|
-
|
|
12
|
+
width: '100%',
|
|
40
13
|
height: '100%',
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
14
|
+
backgroundColor: 'transparent',
|
|
15
|
+
'.anticon': {
|
|
16
|
+
color: 'inherit'
|
|
17
|
+
},
|
|
18
|
+
'&-main': {
|
|
44
19
|
display: 'flex',
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
20
|
+
height: '100%',
|
|
21
|
+
paddingInlineStart: '16px',
|
|
22
|
+
'&-left': {
|
|
23
|
+
display: 'flex',
|
|
24
|
+
alignItems: 'center',
|
|
25
|
+
[`${token.proComponentsCls}-layout-apps-icon`]: {
|
|
26
|
+
marginInlineEnd: 16,
|
|
27
|
+
marginInlineStart: -8
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
'&-wide': {
|
|
32
|
+
maxWidth: 1152,
|
|
33
|
+
margin: '0 auto'
|
|
48
34
|
},
|
|
49
|
-
'
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
35
|
+
'&-logo': {
|
|
36
|
+
position: 'relative',
|
|
37
|
+
display: 'flex',
|
|
38
|
+
height: '100%',
|
|
39
|
+
alignItems: 'center',
|
|
40
|
+
overflow: 'hidden',
|
|
41
|
+
'> *:first-child': {
|
|
42
|
+
display: 'flex',
|
|
43
|
+
alignItems: 'center',
|
|
44
|
+
minHeight: '22px',
|
|
45
|
+
fontSize: '22px'
|
|
46
|
+
},
|
|
47
|
+
'> *:first-child > img': {
|
|
48
|
+
display: 'inline-block',
|
|
49
|
+
height: '32px',
|
|
50
|
+
verticalAlign: 'middle'
|
|
51
|
+
},
|
|
52
|
+
'> *:first-child > h1': {
|
|
53
|
+
display: 'inline-block',
|
|
54
|
+
marginBlock: 0,
|
|
55
|
+
marginInline: 0,
|
|
56
|
+
lineHeight: '24px',
|
|
57
|
+
marginInlineStart: 6,
|
|
58
|
+
fontWeight: '600',
|
|
59
|
+
fontSize: '16px',
|
|
60
|
+
color: token.layout?.header?.colorHeaderTitle,
|
|
61
|
+
verticalAlign: 'top'
|
|
62
|
+
}
|
|
53
63
|
},
|
|
54
|
-
'
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
fontSize: '16px',
|
|
62
|
-
color: (_token$layout = token.layout) === null || _token$layout === void 0 || (_token$layout = _token$layout.header) === null || _token$layout === void 0 ? void 0 : _token$layout.colorHeaderTitle,
|
|
63
|
-
verticalAlign: 'top'
|
|
64
|
+
'&-menu': {
|
|
65
|
+
minWidth: 0,
|
|
66
|
+
display: 'flex',
|
|
67
|
+
alignItems: 'center',
|
|
68
|
+
paddingInline: 6,
|
|
69
|
+
paddingBlock: 6,
|
|
70
|
+
lineHeight: `${Math.max((token.layout?.header?.heightLayoutHeader || 56) - 12, 40)}px`
|
|
64
71
|
}
|
|
65
|
-
},
|
|
66
|
-
'&-menu': {
|
|
67
|
-
minWidth: 0,
|
|
68
|
-
display: 'flex',
|
|
69
|
-
alignItems: 'center',
|
|
70
|
-
paddingInline: 6,
|
|
71
|
-
paddingBlock: 6,
|
|
72
|
-
lineHeight: "".concat(Math.max((((_token$layout2 = token.layout) === null || _token$layout2 === void 0 || (_token$layout2 = _token$layout2.header) === null || _token$layout2 === void 0 ? void 0 : _token$layout2.heightLayoutHeader) || 56) - 12, 40), "px")
|
|
73
72
|
}
|
|
74
|
-
}
|
|
73
|
+
};
|
|
75
74
|
};
|
|
76
75
|
function useStyle(prefixCls) {
|
|
77
|
-
return (0, _provider.useStyle)('ProLayoutTopNavHeader',
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
76
|
+
return (0, _provider.useStyle)('ProLayoutTopNavHeader', token => {
|
|
77
|
+
const topNavHeaderToken = {
|
|
78
|
+
...token,
|
|
79
|
+
componentCls: `.${prefixCls}`
|
|
80
|
+
};
|
|
81
81
|
return [genTopNavHeaderStyle(topNavHeaderToken)];
|
|
82
82
|
});
|
|
83
83
|
}
|
|
@@ -5,4 +5,4 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.RouteContext = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
|
-
|
|
8
|
+
const RouteContext = exports.RouteContext = /*#__PURE__*/(0, _react.createContext)({});
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.defaultSettings = void 0;
|
|
7
|
-
|
|
7
|
+
const defaultSettings = exports.defaultSettings = {
|
|
8
8
|
navTheme: 'light',
|
|
9
9
|
layout: 'side',
|
|
10
10
|
contentWidth: 'Fluid',
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.matchParamsPath = exports.getPageTitleInfo = exports.getPageTitle = void 0;
|
|
8
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
7
|
var _pathToRegexp = require("path-to-regexp");
|
|
10
|
-
|
|
8
|
+
const matchParamsPath = (pathname, breadcrumb, breadcrumbMap) => {
|
|
11
9
|
// Internal logic use breadcrumbMap to ensure the order
|
|
12
10
|
// 内部逻辑使用 breadcrumbMap 来确保查询顺序
|
|
13
11
|
if (breadcrumbMap) {
|
|
14
|
-
|
|
12
|
+
const pathKey = [...breadcrumbMap.keys()].find(key => {
|
|
15
13
|
try {
|
|
16
14
|
if (key.startsWith('http')) {
|
|
17
15
|
return false;
|
|
@@ -30,9 +28,9 @@ var matchParamsPath = exports.matchParamsPath = function matchParamsPath(pathnam
|
|
|
30
28
|
// External uses use breadcrumb
|
|
31
29
|
// 外部用户使用 breadcrumb 参数
|
|
32
30
|
if (breadcrumb) {
|
|
33
|
-
|
|
31
|
+
const pathKey = Object.keys(breadcrumb).find(key => {
|
|
34
32
|
try {
|
|
35
|
-
if (key
|
|
33
|
+
if (key?.startsWith('http')) {
|
|
36
34
|
return false;
|
|
37
35
|
}
|
|
38
36
|
return (0, _pathToRegexp.match)(key)(pathname);
|
|
@@ -41,33 +39,34 @@ var matchParamsPath = exports.matchParamsPath = function matchParamsPath(pathnam
|
|
|
41
39
|
return false;
|
|
42
40
|
}
|
|
43
41
|
});
|
|
44
|
-
if (
|
|
45
|
-
return breadcrumb[
|
|
42
|
+
if (pathKey) {
|
|
43
|
+
return breadcrumb[pathKey];
|
|
46
44
|
}
|
|
47
45
|
}
|
|
48
46
|
return {
|
|
49
47
|
path: ''
|
|
50
48
|
};
|
|
51
49
|
};
|
|
50
|
+
exports.matchParamsPath = matchParamsPath;
|
|
52
51
|
/**
|
|
53
52
|
* 获取关于 pageTitle 的所有信息方便包装
|
|
54
53
|
*
|
|
55
54
|
* @param props
|
|
56
55
|
* @param ignoreTitle
|
|
57
56
|
*/
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
pathname =
|
|
61
|
-
breadcrumb
|
|
62
|
-
breadcrumbMap
|
|
63
|
-
formatMessage
|
|
64
|
-
title
|
|
65
|
-
|
|
66
|
-
menu = _props$menu === void 0 ? {
|
|
57
|
+
const getPageTitleInfo = (props, ignoreTitle) => {
|
|
58
|
+
const {
|
|
59
|
+
pathname = '/',
|
|
60
|
+
breadcrumb,
|
|
61
|
+
breadcrumbMap,
|
|
62
|
+
formatMessage,
|
|
63
|
+
title,
|
|
64
|
+
menu = {
|
|
67
65
|
locale: false
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
66
|
+
}
|
|
67
|
+
} = props;
|
|
68
|
+
const pageTitle = ignoreTitle ? '' : title || '';
|
|
69
|
+
const currRouterData = matchParamsPath(pathname, breadcrumb, breadcrumbMap);
|
|
71
70
|
if (!currRouterData) {
|
|
72
71
|
return {
|
|
73
72
|
title: pageTitle,
|
|
@@ -75,7 +74,7 @@ var getPageTitleInfo = exports.getPageTitleInfo = function getPageTitleInfo(prop
|
|
|
75
74
|
pageName: pageTitle
|
|
76
75
|
};
|
|
77
76
|
}
|
|
78
|
-
|
|
77
|
+
let pageName = currRouterData.name;
|
|
79
78
|
if (menu.locale !== false && currRouterData.locale && formatMessage) {
|
|
80
79
|
pageName = formatMessage({
|
|
81
80
|
id: currRouterData.locale || '',
|
|
@@ -93,15 +92,17 @@ var getPageTitleInfo = exports.getPageTitleInfo = function getPageTitleInfo(prop
|
|
|
93
92
|
return {
|
|
94
93
|
title: pageName,
|
|
95
94
|
id: currRouterData.locale || '',
|
|
96
|
-
pageName
|
|
95
|
+
pageName
|
|
97
96
|
};
|
|
98
97
|
}
|
|
99
98
|
return {
|
|
100
|
-
title:
|
|
99
|
+
title: `${pageName} - ${title}`,
|
|
101
100
|
id: currRouterData.locale || '',
|
|
102
|
-
pageName
|
|
101
|
+
pageName
|
|
103
102
|
};
|
|
104
103
|
};
|
|
105
|
-
|
|
104
|
+
exports.getPageTitleInfo = getPageTitleInfo;
|
|
105
|
+
const getPageTitle = (props, ignoreTitle) => {
|
|
106
106
|
return getPageTitleInfo(props, ignoreTitle).title;
|
|
107
|
-
};
|
|
107
|
+
};
|
|
108
|
+
exports.getPageTitle = getPageTitle;
|
package/lib/layout/index.js
CHANGED
|
@@ -22,92 +22,92 @@ var _exportNames = {
|
|
|
22
22
|
};
|
|
23
23
|
Object.defineProperty(exports, "DefaultFooter", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function
|
|
25
|
+
get: function () {
|
|
26
26
|
return _Footer.DefaultFooter;
|
|
27
27
|
}
|
|
28
28
|
});
|
|
29
29
|
Object.defineProperty(exports, "DefaultHeader", {
|
|
30
30
|
enumerable: true,
|
|
31
|
-
get: function
|
|
31
|
+
get: function () {
|
|
32
32
|
return _Header.DefaultHeader;
|
|
33
33
|
}
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "FooterToolbar", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: function
|
|
37
|
+
get: function () {
|
|
38
38
|
return _FooterToolbar.FooterToolbar;
|
|
39
39
|
}
|
|
40
40
|
});
|
|
41
41
|
Object.defineProperty(exports, "GridContent", {
|
|
42
42
|
enumerable: true,
|
|
43
|
-
get: function
|
|
43
|
+
get: function () {
|
|
44
44
|
return _GridContent.GridContent;
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
47
|
Object.defineProperty(exports, "PageContainer", {
|
|
48
48
|
enumerable: true,
|
|
49
|
-
get: function
|
|
49
|
+
get: function () {
|
|
50
50
|
return _PageContainer.PageContainer;
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
53
|
Object.defineProperty(exports, "PageHeader", {
|
|
54
54
|
enumerable: true,
|
|
55
|
-
get: function
|
|
55
|
+
get: function () {
|
|
56
56
|
return _PageHeader.PageHeader;
|
|
57
57
|
}
|
|
58
58
|
});
|
|
59
59
|
Object.defineProperty(exports, "PageLoading", {
|
|
60
60
|
enumerable: true,
|
|
61
|
-
get: function
|
|
61
|
+
get: function () {
|
|
62
62
|
return _PageLoading.PageLoading;
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
65
|
Object.defineProperty(exports, "ProBreadcrumb", {
|
|
66
66
|
enumerable: true,
|
|
67
|
-
get: function
|
|
67
|
+
get: function () {
|
|
68
68
|
return _PageContainer.ProBreadcrumb;
|
|
69
69
|
}
|
|
70
70
|
});
|
|
71
71
|
Object.defineProperty(exports, "ProLayout", {
|
|
72
72
|
enumerable: true,
|
|
73
|
-
get: function
|
|
73
|
+
get: function () {
|
|
74
74
|
return _ProLayout.ProLayout;
|
|
75
75
|
}
|
|
76
76
|
});
|
|
77
77
|
Object.defineProperty(exports, "ProPageHeader", {
|
|
78
78
|
enumerable: true,
|
|
79
|
-
get: function
|
|
79
|
+
get: function () {
|
|
80
80
|
return _PageContainer.ProPageHeader;
|
|
81
81
|
}
|
|
82
82
|
});
|
|
83
83
|
Object.defineProperty(exports, "RouteContext", {
|
|
84
84
|
enumerable: true,
|
|
85
|
-
get: function
|
|
85
|
+
get: function () {
|
|
86
86
|
return _RouteContext.RouteContext;
|
|
87
87
|
}
|
|
88
88
|
});
|
|
89
89
|
Object.defineProperty(exports, "SettingDrawer", {
|
|
90
90
|
enumerable: true,
|
|
91
|
-
get: function
|
|
91
|
+
get: function () {
|
|
92
92
|
return _SettingDrawer.SettingDrawer;
|
|
93
93
|
}
|
|
94
94
|
});
|
|
95
95
|
Object.defineProperty(exports, "TopNavHeader", {
|
|
96
96
|
enumerable: true,
|
|
97
|
-
get: function
|
|
97
|
+
get: function () {
|
|
98
98
|
return _TopNavHeader.TopNavHeader;
|
|
99
99
|
}
|
|
100
100
|
});
|
|
101
101
|
exports.default = void 0;
|
|
102
102
|
Object.defineProperty(exports, "getMenuData", {
|
|
103
103
|
enumerable: true,
|
|
104
|
-
get: function
|
|
104
|
+
get: function () {
|
|
105
105
|
return _getMenuData.getMenuData;
|
|
106
106
|
}
|
|
107
107
|
});
|
|
108
108
|
Object.defineProperty(exports, "getPageTitle", {
|
|
109
109
|
enumerable: true,
|
|
110
|
-
get: function
|
|
110
|
+
get: function () {
|
|
111
111
|
return _getPageTitle.getPageTitle;
|
|
112
112
|
}
|
|
113
113
|
});
|
|
@@ -131,7 +131,7 @@ Object.keys(_Help).forEach(function (key) {
|
|
|
131
131
|
if (key in exports && exports[key] === _Help[key]) return;
|
|
132
132
|
Object.defineProperty(exports, key, {
|
|
133
133
|
enumerable: true,
|
|
134
|
-
get: function
|
|
134
|
+
get: function () {
|
|
135
135
|
return _Help[key];
|
|
136
136
|
}
|
|
137
137
|
});
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
8
|
var _settingDrawer = _interopRequireDefault(require("./en-US/settingDrawer"));
|
|
10
|
-
var _default = exports.default =
|
|
9
|
+
var _default = exports.default = {
|
|
10
|
+
..._settingDrawer.default
|
|
11
|
+
};
|
|
@@ -11,20 +11,22 @@ var _itIT = _interopRequireDefault(require("./it-IT"));
|
|
|
11
11
|
var _koKR = _interopRequireDefault(require("./ko-KR"));
|
|
12
12
|
var _zhCN = _interopRequireDefault(require("./zh-CN"));
|
|
13
13
|
var _zhTW = _interopRequireDefault(require("./zh-TW"));
|
|
14
|
-
|
|
14
|
+
const locales = {
|
|
15
15
|
'zh-CN': _zhCN.default,
|
|
16
16
|
'zh-TW': _zhTW.default,
|
|
17
17
|
'en-US': _enUS.default,
|
|
18
18
|
'it-IT': _itIT.default,
|
|
19
19
|
'ko-KR': _koKR.default
|
|
20
20
|
};
|
|
21
|
-
|
|
21
|
+
const getLanguage = () => {
|
|
22
22
|
// support ssr
|
|
23
23
|
if (!(0, _utils.isBrowser)()) return 'zh-CN';
|
|
24
|
-
|
|
24
|
+
const lang = window.localStorage.getItem('umi_locale');
|
|
25
25
|
return lang || window.g_locale || navigator.language;
|
|
26
26
|
};
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
exports.getLanguage = getLanguage;
|
|
28
|
+
const gLocaleObject = () => {
|
|
29
|
+
const gLocale = getLanguage();
|
|
29
30
|
return locales[gLocale] || locales['zh-CN'];
|
|
30
|
-
};
|
|
31
|
+
};
|
|
32
|
+
exports.gLocaleObject = gLocaleObject;
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
9
8
|
var _settingDrawer = _interopRequireDefault(require("./it-IT/settingDrawer"));
|
|
10
|
-
var _default = exports.default =
|
|
9
|
+
var _default = exports.default = {
|
|
10
|
+
..._settingDrawer.default
|
|
11
|
+
};
|