@oceanbase/ui 0.2.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/static/iconfont.22caa259.woff +0 -0
- package/dist/static/iconfont.bf41d69a.woff2 +0 -0
- package/dist/static/iconfont.d8ca098f.ttf +0 -0
- package/dist/ui.min.css +1 -0
- package/dist/ui.min.js +1 -0
- package/es/Action/Group.d.ts +14 -0
- package/es/Action/Group.js +112 -0
- package/es/Action/Item.d.ts +31 -0
- package/es/Action/Item.js +136 -0
- package/es/Action/index.d.ts +8 -0
- package/es/Action/index.js +7 -0
- package/es/BackgroundTaskManager/RefreshMan.d.ts +11 -0
- package/es/BackgroundTaskManager/RefreshMan.js +66 -0
- package/es/BackgroundTaskManager/constants.js +10 -0
- package/es/BackgroundTaskManager/index.d.ts +49 -0
- package/es/BackgroundTaskManager/index.js +155 -0
- package/es/BasicLayout/Header.d.ts +45 -0
- package/es/BasicLayout/Header.js +228 -0
- package/es/BasicLayout/Header.less +134 -0
- package/es/BasicLayout/index.d.ts +45 -0
- package/es/BasicLayout/index.js +312 -0
- package/es/BasicLayout/index.less +400 -0
- package/es/BasicLayout/locale/en-US.js +11 -0
- package/es/BasicLayout/locale/zh-CN.js +11 -0
- package/es/BasicLayout/locale/zh-TW.js +11 -0
- package/es/BatchOperationBar/index.d.ts +33 -0
- package/es/BatchOperationBar/index.js +126 -0
- package/es/BatchOperationBar/index.less +46 -0
- package/es/BatchOperationBar/index.less.d.ts +15 -0
- package/es/BatchOperationBar/locale/en-US.js +6 -0
- package/es/BatchOperationBar/locale/zh-CN.js +6 -0
- package/es/BatchOperationBar/locale/zh-TW.js +6 -0
- package/es/Boundary/Components/Code.d.ts +14 -0
- package/es/Boundary/Components/Code.js +32 -0
- package/es/Boundary/Components/Exception.d.ts +17 -0
- package/es/Boundary/Components/Exception.js +129 -0
- package/es/Boundary/Components/Function.d.ts +9 -0
- package/es/Boundary/Components/Function.js +21 -0
- package/es/Boundary/Components/index.d.ts +3 -0
- package/es/Boundary/Components/index.js +3 -0
- package/es/Boundary/IBoundary.js +1 -0
- package/es/Boundary/constant.js +41 -0
- package/es/Boundary/index.d.ts +8 -0
- package/es/Boundary/index.js +7 -0
- package/es/Boundary/index.less +44 -0
- package/es/Boundary/locale/en-US.js +10 -0
- package/es/Boundary/locale/zh-CN.js +10 -0
- package/es/Boundary/locale/zh-TW.js +10 -0
- package/es/Boundary/utils.js +18 -0
- package/es/ContentWithQuestion/index.d.ts +13 -0
- package/es/ContentWithQuestion/index.js +46 -0
- package/es/ContentWithQuestion/index.less +18 -0
- package/es/Dialog/Anchor.js +104 -0
- package/es/Dialog/Dock.js +84 -0
- package/es/Dialog/EventProxy.js +50 -0
- package/es/Dialog/index.d.ts +35 -0
- package/es/Dialog/index.js +614 -0
- package/es/Dialog/index.less +114 -0
- package/es/Dialog/locale/en-US.js +4 -0
- package/es/Dialog/locale/zh-CN.js +4 -0
- package/es/Dialog/locale/zh-TW.js +4 -0
- package/es/DocDialog/index.d.ts +24 -0
- package/es/DocDialog/index.js +115 -0
- package/es/DocDialog/locale/en-US.js +1 -0
- package/es/DocDialog/locale/zh-CN.js +1 -0
- package/es/DocDialog/locale/zh-TW.js +1 -0
- package/es/FullscreenBox/index.d.ts +42 -0
- package/es/FullscreenBox/index.js +145 -0
- package/es/FullscreenBox/index.less +49 -0
- package/es/FullscreenBox/locale/en-US.js +1 -0
- package/es/FullscreenBox/locale/zh-CN.js +1 -0
- package/es/FullscreenBox/locale/zh-TW.js +1 -0
- package/es/GraphToolbar/index.d.ts +26 -0
- package/es/GraphToolbar/index.js +132 -0
- package/es/GraphToolbar/index.less +65 -0
- package/es/GraphToolbar/locale/en-US.js +8 -0
- package/es/GraphToolbar/locale/zh-CN.js +8 -0
- package/es/GraphToolbar/locale/zh-TW.js +8 -0
- package/es/Highlight/DiffView/DiffCells.js +43 -0
- package/es/Highlight/DiffView/index.d.ts +44 -0
- package/es/Highlight/DiffView/index.js +317 -0
- package/es/Highlight/HighlightCell.js +29 -0
- package/es/Highlight/JsonView.d.ts +8 -0
- package/es/Highlight/JsonView.js +44 -0
- package/es/Highlight/index.d.ts +97 -0
- package/es/Highlight/index.js +257 -0
- package/es/Highlight/index.less +381 -0
- package/es/Highlight/languages/bash.js +2 -0
- package/es/Highlight/languages/cpp.js +2 -0
- package/es/Highlight/languages/css.js +2 -0
- package/es/Highlight/languages/dockerfile.js +2 -0
- package/es/Highlight/languages/go.js +2 -0
- package/es/Highlight/languages/groovy.js +2 -0
- package/es/Highlight/languages/http.js +2 -0
- package/es/Highlight/languages/java.js +2 -0
- package/es/Highlight/languages/javascript.js +2 -0
- package/es/Highlight/languages/json.js +2 -0
- package/es/Highlight/languages/markdown.js +2 -0
- package/es/Highlight/languages/nginx.js +2 -0
- package/es/Highlight/languages/python.js +2 -0
- package/es/Highlight/languages/ruby.js +2 -0
- package/es/Highlight/languages/solidity.js +2 -0
- package/es/Highlight/languages/sql.js +2 -0
- package/es/Highlight/languages/typescript.js +2 -0
- package/es/Highlight/languages/xml.js +2 -0
- package/es/Highlight/languages/yaml.js +2 -0
- package/es/Highlight/locale/en-US.js +1 -0
- package/es/Highlight/locale/zh-CN.js +1 -0
- package/es/Highlight/locale/zh-TW.js +1 -0
- package/es/Highlight/useKeyDownCopyEvent.js +54 -0
- package/es/IconFont/font/iconfont.css +503 -0
- package/es/IconFont/font/iconfont.ttf +0 -0
- package/es/IconFont/font/iconfont.woff +0 -0
- package/es/IconFont/font/iconfont.woff2 +0 -0
- package/es/IconFont/index.d.ts +9 -0
- package/es/IconFont/index.js +26 -0
- package/es/LocaleDropdown/index.d.ts +9 -0
- package/es/LocaleDropdown/index.js +47 -0
- package/es/Login/ActivateForm.d.ts +19 -0
- package/es/Login/ActivateForm.js +98 -0
- package/es/Login/LoginForm.d.ts +20 -0
- package/es/Login/LoginForm.js +142 -0
- package/es/Login/RegisterForm.d.ts +23 -0
- package/es/Login/RegisterForm.js +155 -0
- package/es/Login/index.d.ts +66 -0
- package/es/Login/index.js +177 -0
- package/es/Login/index.less +325 -0
- package/es/Login/locale/en-US.js +26 -0
- package/es/Login/locale/zh-CN.js +27 -0
- package/es/Login/locale/zh-TW.js +26 -0
- package/es/Lottie/index.js +37 -0
- package/es/NavMenu/index.d.ts +19 -0
- package/es/NavMenu/index.js +99 -0
- package/es/NavMenu/index.less +50 -0
- package/es/PageContainer/ItemRender.js +21 -0
- package/es/PageContainer/index.d.ts +16 -0
- package/es/PageContainer/index.js +71 -0
- package/es/PageContainer/locale/en-US.js +3 -0
- package/es/PageContainer/locale/zh-CN.js +3 -0
- package/es/PageContainer/locale/zh-TW.js +3 -0
- package/es/PageContainer/style/index.d.ts +5 -0
- package/es/PageContainer/style/index.js +72 -0
- package/es/Password/Content.d.ts +14 -0
- package/es/Password/Content.js +92 -0
- package/es/Password/index.d.ts +25 -0
- package/es/Password/index.js +137 -0
- package/es/Password/locale/en-US.js +12 -0
- package/es/Password/locale/zh-CN.js +12 -0
- package/es/Password/locale/zh-TW.js +12 -0
- package/es/Ranger/QuickPicker.d.ts +4 -0
- package/es/Ranger/QuickPicker.js +123 -0
- package/es/Ranger/Ranger.d.ts +11 -0
- package/es/Ranger/Ranger.js +140 -0
- package/es/Ranger/constant/index.js +187 -0
- package/es/Ranger/index.d.ts +33 -0
- package/es/Ranger/index.js +32 -0
- package/es/Ranger/index.less +55 -0
- package/es/Ranger/locale/en-US.js +29 -0
- package/es/Ranger/locale/zh-CN.js +3 -0
- package/es/Ranger/locale/zh-TW.js +3 -0
- package/es/Ranger/typing.js +1 -0
- package/es/SideTip/Dragger.d.ts +45 -0
- package/es/SideTip/Dragger.js +293 -0
- package/es/SideTip/IconLoading.d.ts +3 -0
- package/es/SideTip/IconLoading.js +37 -0
- package/es/SideTip/index.d.ts +156 -0
- package/es/SideTip/index.js +177 -0
- package/es/SideTip/index.less +177 -0
- package/es/SideTip/locale/en-US.js +1 -0
- package/es/SideTip/locale/zh-CN.js +1 -0
- package/es/SideTip/locale/zh-TW.js +1 -0
- package/es/SideTip/utils.js +80 -0
- package/es/TaskGraph/Graph.d.ts +24 -0
- package/es/TaskGraph/Graph.js +260 -0
- package/es/TaskGraph/graph.less +23 -0
- package/es/TaskGraph/index.d.ts +16 -0
- package/es/TaskGraph/index.js +165 -0
- package/es/TaskGraph/index.less +117 -0
- package/es/TaskGraph/locale/en-US.js +12 -0
- package/es/TaskGraph/locale/zh-CN.js +12 -0
- package/es/TaskGraph/locale/zh-TW.js +12 -0
- package/es/TaskGraph/register.d.ts +7 -0
- package/es/TaskGraph/register.js +200 -0
- package/es/TreeSearch/index.d.ts +38 -0
- package/es/TreeSearch/index.js +168 -0
- package/es/TreeSearch/util.d.ts +21 -0
- package/es/TreeSearch/util.js +111 -0
- package/es/Welcome/index.d.ts +38 -0
- package/es/Welcome/index.js +140 -0
- package/es/Welcome/index.less +186 -0
- package/es/Welcome/locale/en-US.js +4 -0
- package/es/Welcome/locale/zh-CN.js +4 -0
- package/es/Welcome/locale/zh-TW.js +4 -0
- package/es/Welcome/step.d.ts +18 -0
- package/es/Welcome/step.js +42 -0
- package/es/_util/genComponentStyleHook.d.ts +14 -0
- package/es/_util/genComponentStyleHook.js +27 -0
- package/es/_util/index.js +54 -0
- package/es/_util/useHistory.js +9 -0
- package/es/assets/background_img.svg +30 -0
- package/es/assets/graph_fit_view_icon.svg +14 -0
- package/es/assets/graph_reset_icon.svg +14 -0
- package/es/assets/logo/oceanbase_logo.svg +29 -0
- package/es/assets/logo/oceanbase_watermark.svg +31 -0
- package/es/assets/monitor.svg +21 -0
- package/es/assets/user.svg +16 -0
- package/es/constant/index.js +18 -0
- package/es/index.d.ts +28 -0
- package/es/index.js +27 -0
- package/es/index.less +14 -0
- package/es/interface.js +1 -0
- package/es/locale/LocaleWrapper.d.ts +10 -0
- package/es/locale/LocaleWrapper.js +69 -0
- package/es/locale/en-US.js +38 -0
- package/es/locale/index.js +1 -0
- package/es/locale/zh-CN.js +39 -0
- package/es/locale/zh-TW.js +33 -0
- package/es/variable.less +54 -0
- package/lib/Action/Group.d.ts +14 -0
- package/lib/Action/Group.js +124 -0
- package/lib/Action/Item.d.ts +31 -0
- package/lib/Action/Item.js +126 -0
- package/lib/Action/index.d.ts +8 -0
- package/lib/Action/index.js +37 -0
- package/lib/BackgroundTaskManager/RefreshMan.d.ts +11 -0
- package/lib/BackgroundTaskManager/RefreshMan.js +86 -0
- package/lib/BackgroundTaskManager/constants.js +38 -0
- package/lib/BackgroundTaskManager/index.d.ts +49 -0
- package/lib/BackgroundTaskManager/index.js +161 -0
- package/lib/BasicLayout/Header.d.ts +45 -0
- package/lib/BasicLayout/Header.js +177 -0
- package/lib/BasicLayout/Header.less +134 -0
- package/lib/BasicLayout/index.d.ts +45 -0
- package/lib/BasicLayout/index.js +346 -0
- package/lib/BasicLayout/index.less +400 -0
- package/lib/BasicLayout/locale/en-US.js +35 -0
- package/lib/BasicLayout/locale/zh-CN.js +35 -0
- package/lib/BasicLayout/locale/zh-TW.js +35 -0
- package/lib/BatchOperationBar/index.d.ts +33 -0
- package/lib/BatchOperationBar/index.js +165 -0
- package/lib/BatchOperationBar/index.less +46 -0
- package/lib/BatchOperationBar/index.less.d.ts +15 -0
- package/lib/BatchOperationBar/locale/en-US.js +30 -0
- package/lib/BatchOperationBar/locale/zh-CN.js +30 -0
- package/lib/BatchOperationBar/locale/zh-TW.js +30 -0
- package/lib/Boundary/Components/Code.d.ts +14 -0
- package/lib/Boundary/Components/Code.js +55 -0
- package/lib/Boundary/Components/Exception.d.ts +17 -0
- package/lib/Boundary/Components/Exception.js +114 -0
- package/lib/Boundary/Components/Function.d.ts +9 -0
- package/lib/Boundary/Components/Function.js +47 -0
- package/lib/Boundary/Components/index.d.ts +3 -0
- package/lib/Boundary/Components/index.js +27 -0
- package/lib/Boundary/IBoundary.js +17 -0
- package/lib/Boundary/constant.js +71 -0
- package/lib/Boundary/index.d.ts +8 -0
- package/lib/Boundary/index.js +27 -0
- package/lib/Boundary/index.less +44 -0
- package/lib/Boundary/locale/en-US.js +34 -0
- package/lib/Boundary/locale/zh-CN.js +34 -0
- package/lib/Boundary/locale/zh-TW.js +34 -0
- package/lib/Boundary/utils.js +46 -0
- package/lib/ContentWithQuestion/index.d.ts +13 -0
- package/lib/ContentWithQuestion/index.js +76 -0
- package/lib/ContentWithQuestion/index.less +18 -0
- package/lib/Dialog/Anchor.js +107 -0
- package/lib/Dialog/Dock.js +112 -0
- package/lib/Dialog/EventProxy.js +59 -0
- package/lib/Dialog/index.d.ts +35 -0
- package/lib/Dialog/index.js +558 -0
- package/lib/Dialog/index.less +114 -0
- package/lib/Dialog/locale/en-US.js +28 -0
- package/lib/Dialog/locale/zh-CN.js +28 -0
- package/lib/Dialog/locale/zh-TW.js +28 -0
- package/lib/DocDialog/index.d.ts +24 -0
- package/lib/DocDialog/index.js +135 -0
- package/lib/DocDialog/locale/en-US.js +25 -0
- package/lib/DocDialog/locale/zh-CN.js +25 -0
- package/lib/DocDialog/locale/zh-TW.js +25 -0
- package/lib/FullscreenBox/index.d.ts +42 -0
- package/lib/FullscreenBox/index.js +126 -0
- package/lib/FullscreenBox/index.less +49 -0
- package/lib/FullscreenBox/locale/en-US.js +25 -0
- package/lib/FullscreenBox/locale/zh-CN.js +25 -0
- package/lib/FullscreenBox/locale/zh-TW.js +25 -0
- package/lib/GraphToolbar/index.d.ts +26 -0
- package/lib/GraphToolbar/index.js +154 -0
- package/lib/GraphToolbar/index.less +65 -0
- package/lib/GraphToolbar/locale/en-US.js +32 -0
- package/lib/GraphToolbar/locale/zh-CN.js +32 -0
- package/lib/GraphToolbar/locale/zh-TW.js +32 -0
- package/lib/Highlight/DiffView/DiffCells.js +70 -0
- package/lib/Highlight/DiffView/index.d.ts +44 -0
- package/lib/Highlight/DiffView/index.js +297 -0
- package/lib/Highlight/HighlightCell.js +58 -0
- package/lib/Highlight/JsonView.d.ts +8 -0
- package/lib/Highlight/JsonView.js +83 -0
- package/lib/Highlight/index.d.ts +97 -0
- package/lib/Highlight/index.js +263 -0
- package/lib/Highlight/index.less +381 -0
- package/lib/Highlight/languages/bash.js +36 -0
- package/lib/Highlight/languages/cpp.js +36 -0
- package/lib/Highlight/languages/css.js +36 -0
- package/lib/Highlight/languages/dockerfile.js +36 -0
- package/lib/Highlight/languages/go.js +36 -0
- package/lib/Highlight/languages/groovy.js +36 -0
- package/lib/Highlight/languages/http.js +36 -0
- package/lib/Highlight/languages/java.js +36 -0
- package/lib/Highlight/languages/javascript.js +36 -0
- package/lib/Highlight/languages/json.js +36 -0
- package/lib/Highlight/languages/markdown.js +36 -0
- package/lib/Highlight/languages/nginx.js +36 -0
- package/lib/Highlight/languages/python.js +36 -0
- package/lib/Highlight/languages/ruby.js +36 -0
- package/lib/Highlight/languages/solidity.js +36 -0
- package/lib/Highlight/languages/sql.js +36 -0
- package/lib/Highlight/languages/typescript.js +36 -0
- package/lib/Highlight/languages/xml.js +36 -0
- package/lib/Highlight/languages/yaml.js +36 -0
- package/lib/Highlight/locale/en-US.js +25 -0
- package/lib/Highlight/locale/zh-CN.js +25 -0
- package/lib/Highlight/locale/zh-TW.js +25 -0
- package/lib/Highlight/useKeyDownCopyEvent.js +86 -0
- package/lib/IconFont/font/iconfont.css +503 -0
- package/lib/IconFont/font/iconfont.ttf +0 -0
- package/lib/IconFont/font/iconfont.woff +0 -0
- package/lib/IconFont/font/iconfont.woff2 +0 -0
- package/lib/IconFont/index.d.ts +9 -0
- package/lib/IconFont/index.js +82 -0
- package/lib/LocaleDropdown/index.d.ts +9 -0
- package/lib/LocaleDropdown/index.js +70 -0
- package/lib/Login/ActivateForm.d.ts +19 -0
- package/lib/Login/ActivateForm.js +132 -0
- package/lib/Login/LoginForm.d.ts +20 -0
- package/lib/Login/LoginForm.js +175 -0
- package/lib/Login/RegisterForm.d.ts +23 -0
- package/lib/Login/RegisterForm.js +177 -0
- package/lib/Login/index.d.ts +66 -0
- package/lib/Login/index.js +171 -0
- package/lib/Login/index.less +325 -0
- package/lib/Login/locale/en-US.js +50 -0
- package/lib/Login/locale/zh-CN.js +51 -0
- package/lib/Login/locale/zh-TW.js +50 -0
- package/lib/Lottie/index.js +62 -0
- package/lib/NavMenu/index.d.ts +19 -0
- package/lib/NavMenu/index.js +104 -0
- package/lib/NavMenu/index.less +50 -0
- package/lib/PageContainer/ItemRender.js +51 -0
- package/lib/PageContainer/index.d.ts +16 -0
- package/lib/PageContainer/index.js +88 -0
- package/lib/PageContainer/locale/en-US.js +27 -0
- package/lib/PageContainer/locale/zh-CN.js +27 -0
- package/lib/PageContainer/locale/zh-TW.js +27 -0
- package/lib/PageContainer/style/index.d.ts +5 -0
- package/lib/PageContainer/style/index.js +120 -0
- package/lib/Password/Content.d.ts +14 -0
- package/lib/Password/Content.js +106 -0
- package/lib/Password/index.d.ts +25 -0
- package/lib/Password/index.js +162 -0
- package/lib/Password/locale/en-US.js +36 -0
- package/lib/Password/locale/zh-CN.js +36 -0
- package/lib/Password/locale/zh-TW.js +36 -0
- package/lib/Ranger/QuickPicker.d.ts +4 -0
- package/lib/Ranger/QuickPicker.js +106 -0
- package/lib/Ranger/Ranger.d.ts +11 -0
- package/lib/Ranger/Ranger.js +153 -0
- package/lib/Ranger/constant/index.js +268 -0
- package/lib/Ranger/index.d.ts +33 -0
- package/lib/Ranger/index.js +64 -0
- package/lib/Ranger/index.less +55 -0
- package/lib/Ranger/locale/en-US.js +53 -0
- package/lib/Ranger/locale/zh-CN.js +27 -0
- package/lib/Ranger/locale/zh-TW.js +27 -0
- package/lib/Ranger/typing.js +17 -0
- package/lib/SideTip/Dragger.d.ts +45 -0
- package/lib/SideTip/Dragger.js +259 -0
- package/lib/SideTip/IconLoading.d.ts +3 -0
- package/lib/SideTip/IconLoading.js +75 -0
- package/lib/SideTip/index.d.ts +156 -0
- package/lib/SideTip/index.js +182 -0
- package/lib/SideTip/index.less +177 -0
- package/lib/SideTip/locale/en-US.js +25 -0
- package/lib/SideTip/locale/zh-CN.js +25 -0
- package/lib/SideTip/locale/zh-TW.js +25 -0
- package/lib/SideTip/utils.js +112 -0
- package/lib/TaskGraph/Graph.d.ts +24 -0
- package/lib/TaskGraph/Graph.js +259 -0
- package/lib/TaskGraph/graph.less +23 -0
- package/lib/TaskGraph/index.d.ts +16 -0
- package/lib/TaskGraph/index.js +163 -0
- package/lib/TaskGraph/index.less +117 -0
- package/lib/TaskGraph/locale/en-US.js +36 -0
- package/lib/TaskGraph/locale/zh-CN.js +36 -0
- package/lib/TaskGraph/locale/zh-TW.js +36 -0
- package/lib/TaskGraph/register.d.ts +7 -0
- package/lib/TaskGraph/register.js +205 -0
- package/lib/TreeSearch/index.d.ts +38 -0
- package/lib/TreeSearch/index.js +135 -0
- package/lib/TreeSearch/util.d.ts +21 -0
- package/lib/TreeSearch/util.js +110 -0
- package/lib/Welcome/index.d.ts +38 -0
- package/lib/Welcome/index.js +102 -0
- package/lib/Welcome/index.less +186 -0
- package/lib/Welcome/locale/en-US.js +28 -0
- package/lib/Welcome/locale/zh-CN.js +28 -0
- package/lib/Welcome/locale/zh-TW.js +28 -0
- package/lib/Welcome/step.d.ts +18 -0
- package/lib/Welcome/step.js +51 -0
- package/lib/_util/genComponentStyleHook.d.ts +14 -0
- package/lib/_util/genComponentStyleHook.js +58 -0
- package/lib/_util/index.js +67 -0
- package/lib/_util/useHistory.js +30 -0
- package/lib/assets/background_img.svg +30 -0
- package/lib/assets/graph_fit_view_icon.svg +14 -0
- package/lib/assets/graph_reset_icon.svg +14 -0
- package/lib/assets/logo/oceanbase_logo.svg +29 -0
- package/lib/assets/logo/oceanbase_watermark.svg +31 -0
- package/lib/assets/monitor.svg +21 -0
- package/lib/assets/user.svg +16 -0
- package/lib/constant/index.js +51 -0
- package/lib/index.d.ts +28 -0
- package/lib/index.js +115 -0
- package/lib/index.less +14 -0
- package/lib/interface.js +17 -0
- package/lib/locale/LocaleWrapper.d.ts +10 -0
- package/lib/locale/LocaleWrapper.js +69 -0
- package/lib/locale/en-US.js +67 -0
- package/lib/locale/index.js +17 -0
- package/lib/locale/zh-CN.js +68 -0
- package/lib/locale/zh-TW.js +62 -0
- package/lib/variable.less +54 -0
- package/package.json +70 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
@import '../variable.less';
|
|
2
|
+
|
|
3
|
+
@prefix: ob-menu;
|
|
4
|
+
|
|
5
|
+
.@{prefix}-container {
|
|
6
|
+
margin-top: 21px;
|
|
7
|
+
background-color: transparent;
|
|
8
|
+
user-select: none;
|
|
9
|
+
|
|
10
|
+
ul {
|
|
11
|
+
background-color: transparent;
|
|
12
|
+
|
|
13
|
+
li {
|
|
14
|
+
padding-right: 0 !important;
|
|
15
|
+
|
|
16
|
+
.@{prefixCls}-menu-title-content {
|
|
17
|
+
padding: 0 20px;
|
|
18
|
+
border-radius: 10px;
|
|
19
|
+
transition: 0.6s;
|
|
20
|
+
|
|
21
|
+
&:hover {
|
|
22
|
+
background-color: #e4e8f5;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.@{prefixCls}-menu-item:not(.@{prefixCls}-menu-item-selected):hover {
|
|
28
|
+
background-color: transparent !important;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.@{prefixCls}-menu-item-selected {
|
|
32
|
+
background-color: transparent !important;
|
|
33
|
+
|
|
34
|
+
.@{prefixCls}-menu-title-content {
|
|
35
|
+
background-color: #d7e2fc;
|
|
36
|
+
|
|
37
|
+
a {
|
|
38
|
+
color: transparent;
|
|
39
|
+
font-family: SourceSansPro-Semibold, SourceSansPro-Regular;
|
|
40
|
+
background: linear-gradient(-45deg, #002bff 0%, #0080ff 100%);
|
|
41
|
+
background-clip: text;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&::after {
|
|
46
|
+
display: none;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/PageContainer/ItemRender.tsx
|
|
30
|
+
var ItemRender_exports = {};
|
|
31
|
+
__export(ItemRender_exports, {
|
|
32
|
+
default: () => ItemRender_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(ItemRender_exports);
|
|
35
|
+
var import_useHistory = __toESM(require("../_util/useHistory"));
|
|
36
|
+
var ItemRender_default = ({ route, params, routes, paths }) => {
|
|
37
|
+
const routeIndex = routes.indexOf(route);
|
|
38
|
+
const last = routeIndex === routes.length - 1;
|
|
39
|
+
const title = route.title || route.breadcrumbName;
|
|
40
|
+
const path = route.href || routes.slice(0, routeIndex + 1).map((item) => item.path).join("/");
|
|
41
|
+
const history = (0, import_useHistory.default)();
|
|
42
|
+
return last ? /* @__PURE__ */ React.createElement("span", null, title) : /* @__PURE__ */ React.createElement(
|
|
43
|
+
"a",
|
|
44
|
+
{
|
|
45
|
+
onClick: () => {
|
|
46
|
+
history.push(path);
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
title
|
|
50
|
+
);
|
|
51
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { IconComponentProps } from '@ant-design/icons/es/components/Icon';
|
|
2
|
+
import type { PageContainerProps as AntPageContainerProps, PageHeaderProps as AntPageHeaderProps } from '@ant-design/pro-components';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
export declare type ReloadType = boolean | IconComponentProps | React.ReactNode;
|
|
5
|
+
export interface PageContainerLocale {
|
|
6
|
+
reload?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare type PageHeaderProps = AntPageHeaderProps & {
|
|
9
|
+
reload?: ReloadType;
|
|
10
|
+
};
|
|
11
|
+
export interface PageContainerProps extends AntPageContainerProps {
|
|
12
|
+
header?: PageHeaderProps;
|
|
13
|
+
locale?: PageContainerLocale;
|
|
14
|
+
}
|
|
15
|
+
declare const _default: any;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/PageContainer/index.tsx
|
|
30
|
+
var PageContainer_exports = {};
|
|
31
|
+
__export(PageContainer_exports, {
|
|
32
|
+
default: () => PageContainer_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(PageContainer_exports);
|
|
35
|
+
var import_icons = require("@ant-design/icons");
|
|
36
|
+
var import_pro_components = require("@ant-design/pro-components");
|
|
37
|
+
var import_design = require("@oceanbase/design");
|
|
38
|
+
var import_classnames = __toESM(require("classnames"));
|
|
39
|
+
var import_lodash = require("lodash");
|
|
40
|
+
var import_react = __toESM(require("react"));
|
|
41
|
+
var import_design2 = require("@oceanbase/design");
|
|
42
|
+
var import_LocaleWrapper = __toESM(require("../locale/LocaleWrapper"));
|
|
43
|
+
var import_ItemRender = __toESM(require("./ItemRender"));
|
|
44
|
+
var import_zh_CN = __toESM(require("./locale/zh-CN"));
|
|
45
|
+
var import_style = __toESM(require("./style"));
|
|
46
|
+
var PageContainer = ({
|
|
47
|
+
prefixCls: customizePrefixCls,
|
|
48
|
+
className,
|
|
49
|
+
header,
|
|
50
|
+
locale,
|
|
51
|
+
...restProps
|
|
52
|
+
}) => {
|
|
53
|
+
const { getPrefixCls } = (0, import_react.useContext)(import_design2.ConfigProvider.ConfigContext);
|
|
54
|
+
const rootPrefixCls = getPrefixCls();
|
|
55
|
+
const prefixCls = getPrefixCls("pro-page-container", customizePrefixCls);
|
|
56
|
+
const { wrapSSR, hashId } = (0, import_style.default)(prefixCls);
|
|
57
|
+
const pageContainerCls = (0, import_classnames.default)(className, hashId);
|
|
58
|
+
const { reload, subTitle, breadcrumb } = header || {};
|
|
59
|
+
const reloadProps = (0, import_lodash.isObject)(reload) && !import_react.default.isValidElement(reload) ? reload : {};
|
|
60
|
+
const reloadCls = (0, import_classnames.default)(
|
|
61
|
+
`${rootPrefixCls}-page-header-heading-reload`,
|
|
62
|
+
reloadProps.className
|
|
63
|
+
);
|
|
64
|
+
const newSubTitle = /* @__PURE__ */ import_react.default.createElement(import_design.Space, { size: 12 }, reload && /* @__PURE__ */ import_react.default.createElement(import_design2.Tooltip, { title: locale.reload }, (0, import_lodash.isObject)(reload) && import_react.default.isValidElement(reload) ? reload : /* @__PURE__ */ import_react.default.createElement(import_icons.SyncOutlined, { ...reloadProps, className: reloadCls })), subTitle);
|
|
65
|
+
const newHeader = header && {
|
|
66
|
+
...header,
|
|
67
|
+
subTitle: newSubTitle,
|
|
68
|
+
breadcrumb: {
|
|
69
|
+
itemRender: (route, params, routes, paths) => /* @__PURE__ */ import_react.default.createElement(import_ItemRender.default, { route, params, routes, paths }),
|
|
70
|
+
...breadcrumb
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
return wrapSSR(
|
|
74
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
75
|
+
import_pro_components.PageContainer,
|
|
76
|
+
{
|
|
77
|
+
prefixCls: customizePrefixCls,
|
|
78
|
+
className: pageContainerCls,
|
|
79
|
+
header: newHeader,
|
|
80
|
+
...restProps
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
);
|
|
84
|
+
};
|
|
85
|
+
var PageContainer_default = (0, import_LocaleWrapper.default)({
|
|
86
|
+
componentName: "PageContainer",
|
|
87
|
+
defaultLocale: import_zh_CN.default
|
|
88
|
+
})(PageContainer);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/PageContainer/locale/en-US.ts
|
|
20
|
+
var en_US_exports = {};
|
|
21
|
+
__export(en_US_exports, {
|
|
22
|
+
default: () => en_US_default
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(en_US_exports);
|
|
25
|
+
var en_US_default = {
|
|
26
|
+
reload: "Reload"
|
|
27
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/PageContainer/locale/zh-CN.ts
|
|
20
|
+
var zh_CN_exports = {};
|
|
21
|
+
__export(zh_CN_exports, {
|
|
22
|
+
default: () => zh_CN_default
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(zh_CN_exports);
|
|
25
|
+
var zh_CN_default = {
|
|
26
|
+
reload: "刷新"
|
|
27
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/PageContainer/locale/zh-TW.ts
|
|
20
|
+
var zh_TW_exports = {};
|
|
21
|
+
__export(zh_TW_exports, {
|
|
22
|
+
default: () => zh_TW_default
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(zh_TW_exports);
|
|
25
|
+
var zh_TW_default = {
|
|
26
|
+
reload: "重新加載"
|
|
27
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { PageContainerToken } from '@ant-design/pro-layout/es/components/PageContainer/style';
|
|
2
|
+
import type { GenerateStyle } from 'antd/es/theme/internal';
|
|
3
|
+
export declare const genPageContainerStyle: GenerateStyle<PageContainerToken>;
|
|
4
|
+
declare const _default: (prefixCls: string) => any;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/PageContainer/style/index.ts
|
|
20
|
+
var style_exports = {};
|
|
21
|
+
__export(style_exports, {
|
|
22
|
+
default: () => style_default,
|
|
23
|
+
genPageContainerStyle: () => genPageContainerStyle
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(style_exports);
|
|
26
|
+
var import_genComponentStyleHook = require("../../_util/genComponentStyleHook");
|
|
27
|
+
var genPageContainerStyle = (token) => {
|
|
28
|
+
const {
|
|
29
|
+
antCls,
|
|
30
|
+
proComponentsCls,
|
|
31
|
+
componentCls,
|
|
32
|
+
colorBgBase,
|
|
33
|
+
borderRadius,
|
|
34
|
+
boxShadowSecondary,
|
|
35
|
+
fontSizeHeading3,
|
|
36
|
+
controlHeightLG,
|
|
37
|
+
padding,
|
|
38
|
+
paddingLG
|
|
39
|
+
} = token;
|
|
40
|
+
const height = controlHeightLG;
|
|
41
|
+
const lineHeight = `${controlHeightLG}px`;
|
|
42
|
+
return {
|
|
43
|
+
[`${componentCls}`]: {
|
|
44
|
+
// 48px is the height of BasicLayout header
|
|
45
|
+
minHeight: "calc(100vh - 48px)",
|
|
46
|
+
[`${proComponentsCls}-grid-content`]: {
|
|
47
|
+
minHeight: "auto"
|
|
48
|
+
},
|
|
49
|
+
[`${antCls}-page-header`]: {
|
|
50
|
+
[`${antCls}-page-header-breadcrumb`]: {
|
|
51
|
+
marginBottom: 6
|
|
52
|
+
},
|
|
53
|
+
[`${antCls}-page-header-heading-title`]: {
|
|
54
|
+
fontSize: fontSizeHeading3
|
|
55
|
+
},
|
|
56
|
+
[`${antCls}-page-header-heading-reload`]: {
|
|
57
|
+
cursor: "pointer"
|
|
58
|
+
},
|
|
59
|
+
[`${antCls}-page-header-heading-extra`]: {
|
|
60
|
+
height,
|
|
61
|
+
lineHeight,
|
|
62
|
+
marginBlock: 0,
|
|
63
|
+
// 设置页容器右上角的组件高度
|
|
64
|
+
[`${antCls}-btn:not(${antCls}-input-search-button)`]: {
|
|
65
|
+
minWidth: controlHeightLG,
|
|
66
|
+
height
|
|
67
|
+
},
|
|
68
|
+
[`${antCls}-radio-button-wrapper`]: {
|
|
69
|
+
height,
|
|
70
|
+
lineHeight
|
|
71
|
+
},
|
|
72
|
+
[`${antCls}-input-wrapper`]: {
|
|
73
|
+
lineHeight
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
[`${antCls}-page-header-footer`]: {
|
|
77
|
+
marginBlockStart: 0
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
// 减小内容区左右两侧间距
|
|
81
|
+
[`${componentCls}-warp-page-header`]: {
|
|
82
|
+
paddingInline: paddingLG,
|
|
83
|
+
paddingBlock: padding
|
|
84
|
+
},
|
|
85
|
+
[`${componentCls}-children-container`]: {
|
|
86
|
+
paddingInline: paddingLG,
|
|
87
|
+
paddingBlockStart: 0,
|
|
88
|
+
paddingBlockEnd: paddingLG
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
[`${componentCls}-with-footer `]: {
|
|
92
|
+
paddingBottom: 64
|
|
93
|
+
},
|
|
94
|
+
[`${proComponentsCls}-footer-bar`]: {
|
|
95
|
+
backgroundColor: colorBgBase,
|
|
96
|
+
borderRadius,
|
|
97
|
+
boxShadow: boxShadowSecondary,
|
|
98
|
+
borderBlockStart: "none",
|
|
99
|
+
// 设置底部操作栏的组件高度
|
|
100
|
+
[`${antCls}-btn:not(${antCls}-input-search-button)`]: {
|
|
101
|
+
minWidth: 68,
|
|
102
|
+
height
|
|
103
|
+
},
|
|
104
|
+
[`${antCls}-radio-button-wrapper`]: {
|
|
105
|
+
height,
|
|
106
|
+
lineHeight
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
var style_default = (prefixCls) => {
|
|
112
|
+
const useStyle = (0, import_genComponentStyleHook.genComponentStyleHook)("PageContainer", (token) => {
|
|
113
|
+
return [genPageContainerStyle(token)];
|
|
114
|
+
});
|
|
115
|
+
return useStyle(prefixCls);
|
|
116
|
+
};
|
|
117
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
118
|
+
0 && (module.exports = {
|
|
119
|
+
genPageContainerStyle
|
|
120
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface Validator {
|
|
3
|
+
validate: (value?: string) => boolean;
|
|
4
|
+
message: string;
|
|
5
|
+
optional?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const Content: React.FC<{
|
|
8
|
+
rules: Validator[];
|
|
9
|
+
fieldError: string[];
|
|
10
|
+
isValidating: boolean;
|
|
11
|
+
value?: string;
|
|
12
|
+
isTouched: boolean;
|
|
13
|
+
}>;
|
|
14
|
+
export default Content;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/Password/Content.tsx
|
|
30
|
+
var Content_exports = {};
|
|
31
|
+
__export(Content_exports, {
|
|
32
|
+
default: () => Content_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Content_exports);
|
|
35
|
+
var import_icons = require("@ant-design/icons");
|
|
36
|
+
var import_design = require("@oceanbase/design");
|
|
37
|
+
var import_react = __toESM(require("react"));
|
|
38
|
+
var import_design2 = require("@oceanbase/design");
|
|
39
|
+
var Content = ({ rules, fieldError, isValidating, value, isTouched }) => {
|
|
40
|
+
const statusIconMap = {
|
|
41
|
+
error: /* @__PURE__ */ import_react.default.createElement(import_icons.CloseCircleFilled, { style: { color: import_design2.token.colorError } }),
|
|
42
|
+
success: /* @__PURE__ */ import_react.default.createElement(import_icons.CheckCircleFilled, { style: { color: import_design2.token.colorSuccess } }),
|
|
43
|
+
wait: /* @__PURE__ */ import_react.default.createElement(
|
|
44
|
+
"div",
|
|
45
|
+
{
|
|
46
|
+
style: {
|
|
47
|
+
display: "flex",
|
|
48
|
+
alignItems: "center",
|
|
49
|
+
justifyContent: "center",
|
|
50
|
+
width: 14,
|
|
51
|
+
height: 22
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
55
|
+
"div",
|
|
56
|
+
{
|
|
57
|
+
style: {
|
|
58
|
+
width: 6,
|
|
59
|
+
height: 6,
|
|
60
|
+
backgroundColor: import_design2.token.colorTextTertiary,
|
|
61
|
+
borderRadius: 4
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
)
|
|
66
|
+
};
|
|
67
|
+
const isRequireFail = rules.filter((rule) => !rule.optional).filter((rule) => fieldError.includes(rule.message)).length > 0;
|
|
68
|
+
const percent = Math.max(
|
|
69
|
+
0,
|
|
70
|
+
Math.min(100, (rules.length - fieldError.length) / rules.length * 100)
|
|
71
|
+
);
|
|
72
|
+
let strokeColor = "";
|
|
73
|
+
if (isRequireFail) {
|
|
74
|
+
strokeColor = import_design2.token.colorError;
|
|
75
|
+
if (percent > 50 && percent < 100 && percent !== 100) {
|
|
76
|
+
strokeColor = import_design2.token.colorWarning;
|
|
77
|
+
}
|
|
78
|
+
} else {
|
|
79
|
+
strokeColor = import_design2.token.colorSuccess;
|
|
80
|
+
}
|
|
81
|
+
return /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement(
|
|
82
|
+
import_design.Progress,
|
|
83
|
+
{
|
|
84
|
+
percent: value ? percent : 0,
|
|
85
|
+
strokeColor,
|
|
86
|
+
showInfo: false,
|
|
87
|
+
size: "small"
|
|
88
|
+
}
|
|
89
|
+
), /* @__PURE__ */ import_react.default.createElement("ul", { style: { margin: 0, marginTop: "10px", listStyle: "none", padding: "0" } }, rules == null ? void 0 : rules.map((rule, index) => {
|
|
90
|
+
const isError = fieldError.includes(rule.message);
|
|
91
|
+
let status = "wait";
|
|
92
|
+
if (isError) {
|
|
93
|
+
status = rule.optional ? "wait" : "error";
|
|
94
|
+
} else {
|
|
95
|
+
status = "success";
|
|
96
|
+
}
|
|
97
|
+
if (!value) {
|
|
98
|
+
status = "error";
|
|
99
|
+
}
|
|
100
|
+
if (!isTouched) {
|
|
101
|
+
status = "wait";
|
|
102
|
+
}
|
|
103
|
+
return /* @__PURE__ */ import_react.default.createElement("li", { key: index }, /* @__PURE__ */ import_react.default.createElement(import_design.Space, { align: "start" }, isValidating ? /* @__PURE__ */ import_react.default.createElement(import_icons.LoadingOutlined, null) : statusIconMap[status], /* @__PURE__ */ import_react.default.createElement("span", { style: { color: import_design2.token.colorTextSecondary } }, rule.message)));
|
|
104
|
+
})));
|
|
105
|
+
};
|
|
106
|
+
var Content_default = Content;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { PasswordProps as AntdPasswordProps } from 'antd/es/input';
|
|
2
|
+
import type { LocaleWrapperProps } from '../locale/LocaleWrapper';
|
|
3
|
+
import type { Validator } from './Content';
|
|
4
|
+
export interface PasswordLocale {
|
|
5
|
+
lengthRuleMessage: string;
|
|
6
|
+
charRuleMessage: string;
|
|
7
|
+
strengthRuleMessage: string;
|
|
8
|
+
placeholder: string;
|
|
9
|
+
generatePlaceholder: string;
|
|
10
|
+
randomlyGenerate: string;
|
|
11
|
+
pleaseKeepYourPasswordIn: string;
|
|
12
|
+
copySuccessfully: string;
|
|
13
|
+
copyPassword: string;
|
|
14
|
+
andKeepItProperly: string;
|
|
15
|
+
}
|
|
16
|
+
export interface PasswordProps extends LocaleWrapperProps, Omit<AntdPasswordProps, 'onChange'> {
|
|
17
|
+
value?: string;
|
|
18
|
+
onChange?: (value?: string) => void;
|
|
19
|
+
rules?: Validator[];
|
|
20
|
+
onValidate?: (passed: boolean) => void;
|
|
21
|
+
generatePasswordRegex?: RegExp;
|
|
22
|
+
locale?: PasswordLocale;
|
|
23
|
+
}
|
|
24
|
+
declare const _default: any;
|
|
25
|
+
export default _default;
|