@oceanbase/design 0.1.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/README.md +22 -0
- package/dist/design.min.css +1 -0
- package/dist/design.min.js +1 -0
- 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/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/Alert/index.d.ts +12 -0
- package/es/Alert/index.js +36 -0
- package/es/Alert/style/index.d.ts +9 -0
- package/es/Alert/style/index.js +73 -0
- package/es/BackgroundTaskManager/RefreshMan.d.ts +11 -0
- package/es/BackgroundTaskManager/RefreshMan.js +66 -0
- package/es/BackgroundTaskManager/constants.d.ts +6 -0
- package/es/BackgroundTaskManager/constants.js +10 -0
- package/es/BackgroundTaskManager/index.d.ts +49 -0
- package/es/BackgroundTaskManager/index.js +154 -0
- package/es/BasicLayout/Header.d.ts +45 -0
- package/es/BasicLayout/Header.js +229 -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.d.ts +12 -0
- package/es/BasicLayout/locale/en-US.js +11 -0
- package/es/BasicLayout/locale/zh-CN.d.ts +12 -0
- package/es/BasicLayout/locale/zh-CN.js +11 -0
- package/es/BasicLayout/locale/zh-TW.d.ts +12 -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.d.ts +7 -0
- package/es/BatchOperationBar/locale/en-US.js +6 -0
- package/es/BatchOperationBar/locale/zh-CN.d.ts +7 -0
- package/es/BatchOperationBar/locale/zh-CN.js +6 -0
- package/es/BatchOperationBar/locale/zh-TW.d.ts +7 -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.d.ts +10 -0
- package/es/Boundary/IBoundary.js +1 -0
- package/es/Boundary/constant.d.ts +26 -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.d.ts +11 -0
- package/es/Boundary/locale/en-US.js +10 -0
- package/es/Boundary/locale/zh-CN.d.ts +11 -0
- package/es/Boundary/locale/zh-CN.js +10 -0
- package/es/Boundary/locale/zh-TW.d.ts +11 -0
- package/es/Boundary/locale/zh-TW.js +10 -0
- package/es/Boundary/utils.d.ts +1 -0
- package/es/Boundary/utils.js +18 -0
- package/es/Button/index.d.ts +10 -0
- package/es/Button/index.js +30 -0
- package/es/Button/style/index.d.ts +9 -0
- package/es/Button/style/index.js +24 -0
- package/es/Card/index.d.ts +16 -0
- package/es/Card/index.js +89 -0
- package/es/Card/style/index.d.ts +12 -0
- package/es/Card/style/index.js +41 -0
- package/es/ConfigProvider/index.d.ts +14 -0
- package/es/ConfigProvider/index.js +23 -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/Descriptions/Item.d.ts +8 -0
- package/es/Descriptions/Item.js +2 -0
- package/es/Descriptions/index.d.ts +9 -0
- package/es/Descriptions/index.js +81 -0
- package/es/Descriptions/style/index.d.ts +12 -0
- package/es/Descriptions/style/index.js +28 -0
- package/es/Dialog/Anchor.d.ts +19 -0
- package/es/Dialog/Anchor.js +104 -0
- package/es/Dialog/Dock.d.ts +6 -0
- package/es/Dialog/Dock.js +84 -0
- package/es/Dialog/EventProxy.d.ts +3 -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.d.ts +5 -0
- package/es/Dialog/locale/en-US.js +4 -0
- package/es/Dialog/locale/zh-CN.d.ts +5 -0
- package/es/Dialog/locale/zh-CN.js +4 -0
- package/es/Dialog/locale/zh-TW.d.ts +5 -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.d.ts +2 -0
- package/es/DocDialog/locale/en-US.js +1 -0
- package/es/DocDialog/locale/zh-CN.d.ts +2 -0
- package/es/DocDialog/locale/zh-CN.js +1 -0
- package/es/DocDialog/locale/zh-TW.d.ts +2 -0
- package/es/DocDialog/locale/zh-TW.js +1 -0
- package/es/Form/FormItem.d.ts +16 -0
- package/es/Form/FormItem.js +44 -0
- package/es/Form/index.d.ts +2 -0
- package/es/Form/index.js +4 -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.d.ts +2 -0
- package/es/FullscreenBox/locale/en-US.js +1 -0
- package/es/FullscreenBox/locale/zh-CN.d.ts +2 -0
- package/es/FullscreenBox/locale/zh-CN.js +1 -0
- package/es/FullscreenBox/locale/zh-TW.d.ts +2 -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.d.ts +9 -0
- package/es/GraphToolbar/locale/en-US.js +8 -0
- package/es/GraphToolbar/locale/zh-CN.d.ts +9 -0
- package/es/GraphToolbar/locale/zh-CN.js +8 -0
- package/es/GraphToolbar/locale/zh-TW.d.ts +9 -0
- package/es/GraphToolbar/locale/zh-TW.js +8 -0
- package/es/Highlight/DiffView/DiffCells.d.ts +17 -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.d.ts +18 -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 +103 -0
- package/es/Highlight/index.js +259 -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.d.ts +2 -0
- package/es/Highlight/locale/en-US.js +1 -0
- package/es/Highlight/locale/zh-CN.d.ts +2 -0
- package/es/Highlight/locale/zh-CN.js +1 -0
- package/es/Highlight/locale/zh-TW.d.ts +2 -0
- package/es/Highlight/locale/zh-TW.js +1 -0
- package/es/Highlight/useKeyDownCopyEvent.d.ts +6 -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.d.ts +27 -0
- package/es/Login/locale/en-US.js +26 -0
- package/es/Login/locale/zh-CN.d.ts +28 -0
- package/es/Login/locale/zh-CN.js +27 -0
- package/es/Login/locale/zh-TW.d.ts +27 -0
- package/es/Login/locale/zh-TW.js +26 -0
- package/es/Lottie/index.d.ts +10 -0
- package/es/Lottie/index.js +37 -0
- package/es/Modal/index.d.ts +31 -0
- package/es/Modal/index.js +50 -0
- package/es/Modal/style/index.d.ts +9 -0
- package/es/Modal/style/index.js +21 -0
- package/es/NavMenu/index.d.ts +19 -0
- package/es/NavMenu/index.js +98 -0
- package/es/NavMenu/index.less +50 -0
- package/es/PageContainer/index.d.ts +17 -0
- package/es/PageContainer/index.js +55 -0
- package/es/PageContainer/index.less +72 -0
- package/es/PageContainer/locale/en-US.d.ts +4 -0
- package/es/PageContainer/locale/en-US.js +3 -0
- package/es/PageContainer/locale/zh-CN.d.ts +4 -0
- package/es/PageContainer/locale/zh-CN.js +3 -0
- package/es/PageContainer/locale/zh-TW.d.ts +4 -0
- package/es/PageContainer/locale/zh-TW.js +3 -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.d.ts +13 -0
- package/es/Password/locale/en-US.js +12 -0
- package/es/Password/locale/zh-CN.d.ts +13 -0
- package/es/Password/locale/zh-CN.js +12 -0
- package/es/Password/locale/zh-TW.d.ts +13 -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.d.ts +27 -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.d.ts +28 -0
- package/es/Ranger/locale/en-US.js +29 -0
- package/es/Ranger/locale/zh-CN.d.ts +4 -0
- package/es/Ranger/locale/zh-CN.js +3 -0
- package/es/Ranger/locale/zh-TW.d.ts +4 -0
- package/es/Ranger/locale/zh-TW.js +3 -0
- package/es/Ranger/typing.d.ts +12 -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 +38 -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.d.ts +2 -0
- package/es/SideTip/locale/en-US.js +1 -0
- package/es/SideTip/locale/zh-CN.d.ts +2 -0
- package/es/SideTip/locale/zh-CN.js +1 -0
- package/es/SideTip/locale/zh-TW.d.ts +2 -0
- package/es/SideTip/locale/zh-TW.js +1 -0
- package/es/SideTip/utils.d.ts +8 -0
- package/es/SideTip/utils.js +80 -0
- package/es/StaticFunction/index.d.ts +10 -0
- package/es/StaticFunction/index.js +37 -0
- package/es/Table/index.d.ts +16 -0
- package/es/Table/index.js +149 -0
- package/es/Table/locale/en-US.d.ts +8 -0
- package/es/Table/locale/en-US.js +7 -0
- package/es/Table/locale/zh-CN.d.ts +8 -0
- package/es/Table/locale/zh-CN.js +7 -0
- package/es/Table/locale/zh-TW.d.ts +8 -0
- package/es/Table/locale/zh-TW.js +7 -0
- package/es/Table/style/index.d.ts +9 -0
- package/es/Table/style/index.js +114 -0
- package/es/Tabs/TabPane.d.ts +7 -0
- package/es/Tabs/TabPane.js +2 -0
- package/es/Tabs/hooks/useInkBar.d.ts +12 -0
- package/es/Tabs/hooks/useInkBar.js +41 -0
- package/es/Tabs/hooks/useLegacyItems.d.ts +4 -0
- package/es/Tabs/hooks/useLegacyItems.js +50 -0
- package/es/Tabs/index.d.ts +17 -0
- package/es/Tabs/index.js +95 -0
- package/es/Tabs/style/index.d.ts +9 -0
- package/es/Tabs/style/index.js +35 -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.d.ts +13 -0
- package/es/TaskGraph/locale/en-US.js +12 -0
- package/es/TaskGraph/locale/zh-CN.d.ts +13 -0
- package/es/TaskGraph/locale/zh-CN.js +12 -0
- package/es/TaskGraph/locale/zh-TW.d.ts +13 -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/Tooltip/MouseTooltip.d.ts +9 -0
- package/es/Tooltip/MouseTooltip.js +98 -0
- package/es/Tooltip/index.d.ts +18 -0
- package/es/Tooltip/index.js +66 -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.d.ts +5 -0
- package/es/Welcome/locale/en-US.js +4 -0
- package/es/Welcome/locale/zh-CN.d.ts +5 -0
- package/es/Welcome/locale/zh-CN.js +4 -0
- package/es/Welcome/locale/zh-TW.d.ts +5 -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 +18 -0
- package/es/_util/genComponentStyleHook.js +27 -0
- package/es/_util/index.d.ts +18 -0
- package/es/_util/index.js +54 -0
- package/es/_util/itemRender.d.ts +2 -0
- package/es/_util/itemRender.js +12 -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.d.ts +7 -0
- package/es/constant/index.js +18 -0
- package/es/index.d.ts +52 -0
- package/es/index.js +53 -0
- package/es/index.less +14 -0
- package/es/interface.d.ts +1 -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.d.ts +3 -0
- package/es/locale/en-US.js +41 -0
- package/es/locale/index.d.ts +4 -0
- package/es/locale/index.js +1 -0
- package/es/locale/zh-CN.d.ts +3 -0
- package/es/locale/zh-CN.js +43 -0
- package/es/locale/zh-TW.d.ts +3 -0
- package/es/locale/zh-TW.js +37 -0
- package/es/theme/index.d.ts +182 -0
- package/es/theme/index.js +107 -0
- package/es/theme/index.less +3 -0
- package/es/theme/style/compact.less +526 -0
- package/es/theme/style/dark.less +526 -0
- package/es/theme/style/default.less +526 -0
- package/es/variable.less +54 -0
- package/lib/Action/Group.d.ts +14 -0
- package/lib/Action/Group.js +126 -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 +39 -0
- package/lib/Alert/index.d.ts +12 -0
- package/lib/Alert/index.js +65 -0
- package/lib/Alert/style/index.d.ts +9 -0
- package/lib/Alert/style/index.js +120 -0
- package/lib/BackgroundTaskManager/RefreshMan.d.ts +11 -0
- package/lib/BackgroundTaskManager/RefreshMan.js +86 -0
- package/lib/BackgroundTaskManager/constants.d.ts +6 -0
- package/lib/BackgroundTaskManager/constants.js +38 -0
- package/lib/BackgroundTaskManager/index.d.ts +49 -0
- package/lib/BackgroundTaskManager/index.js +171 -0
- package/lib/BasicLayout/Header.d.ts +45 -0
- package/lib/BasicLayout/Header.js +180 -0
- package/lib/BasicLayout/Header.less +134 -0
- package/lib/BasicLayout/index.d.ts +45 -0
- package/lib/BasicLayout/index.js +348 -0
- package/lib/BasicLayout/index.less +400 -0
- package/lib/BasicLayout/locale/en-US.d.ts +12 -0
- package/lib/BasicLayout/locale/en-US.js +37 -0
- package/lib/BasicLayout/locale/zh-CN.d.ts +12 -0
- package/lib/BasicLayout/locale/zh-CN.js +37 -0
- package/lib/BasicLayout/locale/zh-TW.d.ts +12 -0
- package/lib/BasicLayout/locale/zh-TW.js +37 -0
- package/lib/BatchOperationBar/index.d.ts +33 -0
- package/lib/BatchOperationBar/index.js +167 -0
- package/lib/BatchOperationBar/index.less +46 -0
- package/lib/BatchOperationBar/index.less.d.ts +15 -0
- package/lib/BatchOperationBar/locale/en-US.d.ts +7 -0
- package/lib/BatchOperationBar/locale/en-US.js +32 -0
- package/lib/BatchOperationBar/locale/zh-CN.d.ts +7 -0
- package/lib/BatchOperationBar/locale/zh-CN.js +32 -0
- package/lib/BatchOperationBar/locale/zh-TW.d.ts +7 -0
- package/lib/BatchOperationBar/locale/zh-TW.js +32 -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 +21 -0
- package/lib/Boundary/IBoundary.d.ts +10 -0
- package/lib/Boundary/IBoundary.js +17 -0
- package/lib/Boundary/constant.d.ts +26 -0
- package/lib/Boundary/constant.js +71 -0
- package/lib/Boundary/index.d.ts +8 -0
- package/lib/Boundary/index.js +29 -0
- package/lib/Boundary/index.less +44 -0
- package/lib/Boundary/locale/en-US.d.ts +11 -0
- package/lib/Boundary/locale/en-US.js +36 -0
- package/lib/Boundary/locale/zh-CN.d.ts +11 -0
- package/lib/Boundary/locale/zh-CN.js +36 -0
- package/lib/Boundary/locale/zh-TW.d.ts +11 -0
- package/lib/Boundary/locale/zh-TW.js +36 -0
- package/lib/Boundary/utils.d.ts +1 -0
- package/lib/Boundary/utils.js +46 -0
- package/lib/Button/index.d.ts +10 -0
- package/lib/Button/index.js +53 -0
- package/lib/Button/style/index.d.ts +9 -0
- package/lib/Button/style/index.js +52 -0
- package/lib/Card/index.d.ts +16 -0
- package/lib/Card/index.js +112 -0
- package/lib/Card/style/index.d.ts +12 -0
- package/lib/Card/style/index.js +80 -0
- package/lib/ConfigProvider/index.d.ts +14 -0
- package/lib/ConfigProvider/index.js +54 -0
- package/lib/ContentWithQuestion/index.d.ts +13 -0
- package/lib/ContentWithQuestion/index.js +78 -0
- package/lib/ContentWithQuestion/index.less +18 -0
- package/lib/Descriptions/Item.d.ts +8 -0
- package/lib/Descriptions/Item.js +28 -0
- package/lib/Descriptions/index.d.ts +9 -0
- package/lib/Descriptions/index.js +114 -0
- package/lib/Descriptions/style/index.d.ts +12 -0
- package/lib/Descriptions/style/index.js +60 -0
- package/lib/Dialog/Anchor.d.ts +19 -0
- package/lib/Dialog/Anchor.js +107 -0
- package/lib/Dialog/Dock.d.ts +6 -0
- package/lib/Dialog/Dock.js +112 -0
- package/lib/Dialog/EventProxy.d.ts +3 -0
- package/lib/Dialog/EventProxy.js +69 -0
- package/lib/Dialog/index.d.ts +35 -0
- package/lib/Dialog/index.js +560 -0
- package/lib/Dialog/index.less +114 -0
- package/lib/Dialog/locale/en-US.d.ts +5 -0
- package/lib/Dialog/locale/en-US.js +30 -0
- package/lib/Dialog/locale/zh-CN.d.ts +5 -0
- package/lib/Dialog/locale/zh-CN.js +30 -0
- package/lib/Dialog/locale/zh-TW.d.ts +5 -0
- package/lib/Dialog/locale/zh-TW.js +30 -0
- package/lib/DocDialog/index.d.ts +24 -0
- package/lib/DocDialog/index.js +137 -0
- package/lib/DocDialog/locale/en-US.d.ts +2 -0
- package/lib/DocDialog/locale/en-US.js +27 -0
- package/lib/DocDialog/locale/zh-CN.d.ts +2 -0
- package/lib/DocDialog/locale/zh-CN.js +27 -0
- package/lib/DocDialog/locale/zh-TW.d.ts +2 -0
- package/lib/DocDialog/locale/zh-TW.js +27 -0
- package/lib/Form/FormItem.d.ts +16 -0
- package/lib/Form/FormItem.js +59 -0
- package/lib/Form/index.d.ts +2 -0
- package/lib/Form/index.js +40 -0
- package/lib/FullscreenBox/index.d.ts +42 -0
- package/lib/FullscreenBox/index.js +128 -0
- package/lib/FullscreenBox/index.less +49 -0
- package/lib/FullscreenBox/locale/en-US.d.ts +2 -0
- package/lib/FullscreenBox/locale/en-US.js +27 -0
- package/lib/FullscreenBox/locale/zh-CN.d.ts +2 -0
- package/lib/FullscreenBox/locale/zh-CN.js +27 -0
- package/lib/FullscreenBox/locale/zh-TW.d.ts +2 -0
- package/lib/FullscreenBox/locale/zh-TW.js +27 -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.d.ts +9 -0
- package/lib/GraphToolbar/locale/en-US.js +34 -0
- package/lib/GraphToolbar/locale/zh-CN.d.ts +9 -0
- package/lib/GraphToolbar/locale/zh-CN.js +34 -0
- package/lib/GraphToolbar/locale/zh-TW.d.ts +9 -0
- package/lib/GraphToolbar/locale/zh-TW.js +34 -0
- package/lib/Highlight/DiffView/DiffCells.d.ts +17 -0
- package/lib/Highlight/DiffView/DiffCells.js +72 -0
- package/lib/Highlight/DiffView/index.d.ts +44 -0
- package/lib/Highlight/DiffView/index.js +299 -0
- package/lib/Highlight/HighlightCell.d.ts +18 -0
- package/lib/Highlight/HighlightCell.js +60 -0
- package/lib/Highlight/JsonView.d.ts +8 -0
- package/lib/Highlight/JsonView.js +85 -0
- package/lib/Highlight/index.d.ts +103 -0
- package/lib/Highlight/index.js +265 -0
- package/lib/Highlight/index.less +381 -0
- package/lib/Highlight/languages/bash.js +38 -0
- package/lib/Highlight/languages/cpp.js +38 -0
- package/lib/Highlight/languages/css.js +38 -0
- package/lib/Highlight/languages/dockerfile.js +38 -0
- package/lib/Highlight/languages/go.js +38 -0
- package/lib/Highlight/languages/groovy.js +38 -0
- package/lib/Highlight/languages/http.js +38 -0
- package/lib/Highlight/languages/java.js +38 -0
- package/lib/Highlight/languages/javascript.js +38 -0
- package/lib/Highlight/languages/json.js +38 -0
- package/lib/Highlight/languages/markdown.js +38 -0
- package/lib/Highlight/languages/nginx.js +38 -0
- package/lib/Highlight/languages/python.js +38 -0
- package/lib/Highlight/languages/ruby.js +38 -0
- package/lib/Highlight/languages/solidity.js +38 -0
- package/lib/Highlight/languages/sql.js +38 -0
- package/lib/Highlight/languages/typescript.js +38 -0
- package/lib/Highlight/languages/xml.js +38 -0
- package/lib/Highlight/languages/yaml.js +38 -0
- package/lib/Highlight/locale/en-US.d.ts +2 -0
- package/lib/Highlight/locale/en-US.js +27 -0
- package/lib/Highlight/locale/zh-CN.d.ts +2 -0
- package/lib/Highlight/locale/zh-CN.js +27 -0
- package/lib/Highlight/locale/zh-TW.d.ts +2 -0
- package/lib/Highlight/locale/zh-TW.js +27 -0
- package/lib/Highlight/useKeyDownCopyEvent.d.ts +6 -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 +84 -0
- package/lib/LocaleDropdown/index.d.ts +9 -0
- package/lib/LocaleDropdown/index.js +72 -0
- package/lib/Login/ActivateForm.d.ts +19 -0
- package/lib/Login/ActivateForm.js +134 -0
- package/lib/Login/LoginForm.d.ts +20 -0
- package/lib/Login/LoginForm.js +177 -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 +175 -0
- package/lib/Login/index.less +325 -0
- package/lib/Login/locale/en-US.d.ts +27 -0
- package/lib/Login/locale/en-US.js +52 -0
- package/lib/Login/locale/zh-CN.d.ts +28 -0
- package/lib/Login/locale/zh-CN.js +53 -0
- package/lib/Login/locale/zh-TW.d.ts +27 -0
- package/lib/Login/locale/zh-TW.js +52 -0
- package/lib/Lottie/index.d.ts +10 -0
- package/lib/Lottie/index.js +64 -0
- package/lib/Modal/index.d.ts +31 -0
- package/lib/Modal/index.js +60 -0
- package/lib/Modal/style/index.d.ts +9 -0
- package/lib/Modal/style/index.js +51 -0
- package/lib/NavMenu/index.d.ts +19 -0
- package/lib/NavMenu/index.js +105 -0
- package/lib/NavMenu/index.less +50 -0
- package/lib/PageContainer/index.d.ts +17 -0
- package/lib/PageContainer/index.js +71 -0
- package/lib/PageContainer/index.less +72 -0
- package/lib/PageContainer/locale/en-US.d.ts +4 -0
- package/lib/PageContainer/locale/en-US.js +29 -0
- package/lib/PageContainer/locale/zh-CN.d.ts +4 -0
- package/lib/PageContainer/locale/zh-CN.js +29 -0
- package/lib/PageContainer/locale/zh-TW.d.ts +4 -0
- package/lib/PageContainer/locale/zh-TW.js +29 -0
- package/lib/Password/Content.d.ts +14 -0
- package/lib/Password/Content.js +108 -0
- package/lib/Password/index.d.ts +25 -0
- package/lib/Password/index.js +164 -0
- package/lib/Password/locale/en-US.d.ts +13 -0
- package/lib/Password/locale/en-US.js +38 -0
- package/lib/Password/locale/zh-CN.d.ts +13 -0
- package/lib/Password/locale/zh-CN.js +38 -0
- package/lib/Password/locale/zh-TW.d.ts +13 -0
- package/lib/Password/locale/zh-TW.js +38 -0
- package/lib/Ranger/QuickPicker.d.ts +4 -0
- package/lib/Ranger/QuickPicker.js +108 -0
- package/lib/Ranger/Ranger.d.ts +11 -0
- package/lib/Ranger/Ranger.js +155 -0
- package/lib/Ranger/constant/index.d.ts +27 -0
- package/lib/Ranger/constant/index.js +268 -0
- package/lib/Ranger/index.d.ts +33 -0
- package/lib/Ranger/index.js +66 -0
- package/lib/Ranger/index.less +55 -0
- package/lib/Ranger/locale/en-US.d.ts +28 -0
- package/lib/Ranger/locale/en-US.js +55 -0
- package/lib/Ranger/locale/zh-CN.d.ts +4 -0
- package/lib/Ranger/locale/zh-CN.js +29 -0
- package/lib/Ranger/locale/zh-TW.d.ts +4 -0
- package/lib/Ranger/locale/zh-TW.js +29 -0
- package/lib/Ranger/typing.d.ts +12 -0
- package/lib/Ranger/typing.js +17 -0
- package/lib/SideTip/Dragger.d.ts +45 -0
- package/lib/SideTip/Dragger.js +261 -0
- package/lib/SideTip/IconLoading.d.ts +3 -0
- package/lib/SideTip/IconLoading.js +78 -0
- package/lib/SideTip/index.d.ts +156 -0
- package/lib/SideTip/index.js +184 -0
- package/lib/SideTip/index.less +177 -0
- package/lib/SideTip/locale/en-US.d.ts +2 -0
- package/lib/SideTip/locale/en-US.js +27 -0
- package/lib/SideTip/locale/zh-CN.d.ts +2 -0
- package/lib/SideTip/locale/zh-CN.js +27 -0
- package/lib/SideTip/locale/zh-TW.d.ts +2 -0
- package/lib/SideTip/locale/zh-TW.js +27 -0
- package/lib/SideTip/utils.d.ts +8 -0
- package/lib/SideTip/utils.js +112 -0
- package/lib/StaticFunction/index.d.ts +10 -0
- package/lib/StaticFunction/index.js +72 -0
- package/lib/Table/index.d.ts +16 -0
- package/lib/Table/index.js +172 -0
- package/lib/Table/locale/en-US.d.ts +8 -0
- package/lib/Table/locale/en-US.js +33 -0
- package/lib/Table/locale/zh-CN.d.ts +8 -0
- package/lib/Table/locale/zh-CN.js +33 -0
- package/lib/Table/locale/zh-TW.d.ts +8 -0
- package/lib/Table/locale/zh-TW.js +33 -0
- package/lib/Table/style/index.d.ts +9 -0
- package/lib/Table/style/index.js +220 -0
- package/lib/Tabs/TabPane.d.ts +7 -0
- package/lib/Tabs/TabPane.js +28 -0
- package/lib/Tabs/hooks/useInkBar.d.ts +12 -0
- package/lib/Tabs/hooks/useInkBar.js +64 -0
- package/lib/Tabs/hooks/useLegacyItems.d.ts +4 -0
- package/lib/Tabs/hooks/useLegacyItems.js +64 -0
- package/lib/Tabs/index.d.ts +17 -0
- package/lib/Tabs/index.js +111 -0
- package/lib/Tabs/style/index.d.ts +9 -0
- package/lib/Tabs/style/index.js +71 -0
- package/lib/TaskGraph/Graph.d.ts +24 -0
- package/lib/TaskGraph/Graph.js +261 -0
- package/lib/TaskGraph/graph.less +23 -0
- package/lib/TaskGraph/index.d.ts +16 -0
- package/lib/TaskGraph/index.js +165 -0
- package/lib/TaskGraph/index.less +117 -0
- package/lib/TaskGraph/locale/en-US.d.ts +13 -0
- package/lib/TaskGraph/locale/en-US.js +38 -0
- package/lib/TaskGraph/locale/zh-CN.d.ts +13 -0
- package/lib/TaskGraph/locale/zh-CN.js +38 -0
- package/lib/TaskGraph/locale/zh-TW.d.ts +13 -0
- package/lib/TaskGraph/locale/zh-TW.js +38 -0
- package/lib/TaskGraph/register.d.ts +7 -0
- package/lib/TaskGraph/register.js +207 -0
- package/lib/Tooltip/MouseTooltip.d.ts +9 -0
- package/lib/Tooltip/MouseTooltip.js +108 -0
- package/lib/Tooltip/index.d.ts +18 -0
- package/lib/Tooltip/index.js +109 -0
- package/lib/TreeSearch/index.d.ts +38 -0
- package/lib/TreeSearch/index.js +137 -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 +104 -0
- package/lib/Welcome/index.less +186 -0
- package/lib/Welcome/locale/en-US.d.ts +5 -0
- package/lib/Welcome/locale/en-US.js +30 -0
- package/lib/Welcome/locale/zh-CN.d.ts +5 -0
- package/lib/Welcome/locale/zh-CN.js +30 -0
- package/lib/Welcome/locale/zh-TW.d.ts +5 -0
- package/lib/Welcome/locale/zh-TW.js +30 -0
- package/lib/Welcome/step.d.ts +18 -0
- package/lib/Welcome/step.js +53 -0
- package/lib/_util/genComponentStyleHook.d.ts +18 -0
- package/lib/_util/genComponentStyleHook.js +58 -0
- package/lib/_util/index.d.ts +18 -0
- package/lib/_util/index.js +67 -0
- package/lib/_util/itemRender.d.ts +2 -0
- package/lib/_util/itemRender.js +44 -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.d.ts +7 -0
- package/lib/constant/index.js +51 -0
- package/lib/index.d.ts +52 -0
- package/lib/index.js +160 -0
- package/lib/index.less +14 -0
- package/lib/interface.d.ts +1 -0
- package/lib/interface.js +17 -0
- package/lib/locale/LocaleWrapper.d.ts +10 -0
- package/lib/locale/LocaleWrapper.js +71 -0
- package/lib/locale/en-US.d.ts +3 -0
- package/lib/locale/en-US.js +75 -0
- package/lib/locale/index.d.ts +4 -0
- package/lib/locale/index.js +17 -0
- package/lib/locale/zh-CN.d.ts +3 -0
- package/lib/locale/zh-CN.js +77 -0
- package/lib/locale/zh-TW.d.ts +3 -0
- package/lib/locale/zh-TW.js +71 -0
- package/lib/theme/index.d.ts +182 -0
- package/lib/theme/index.js +130 -0
- package/lib/theme/index.less +3 -0
- package/lib/theme/style/compact.less +526 -0
- package/lib/theme/style/dark.less +526 -0
- package/lib/theme/style/default.less +526 -0
- package/lib/variable.less +54 -0
- package/package.json +109 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
8
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
10
|
+
function _toArray(arr) { return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest(); }
|
|
11
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
12
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
13
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
14
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
15
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
|
+
import { omit } from 'lodash';
|
|
17
|
+
var generateKey = function generateKey(values) {
|
|
18
|
+
return "".concat(values.join('$$'));
|
|
19
|
+
};
|
|
20
|
+
var splitKey = function splitKey(value) {
|
|
21
|
+
// todo 考虑格式错误的情况
|
|
22
|
+
var _ref = value.split('$$'),
|
|
23
|
+
_ref2 = _toArray(_ref),
|
|
24
|
+
values = _ref2.slice(0);
|
|
25
|
+
return {
|
|
26
|
+
values: values
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** 根据 key 判断节点是否为叶子节点 */
|
|
31
|
+
export var isLeaf = function isLeaf(node) {
|
|
32
|
+
return !(node !== null && node !== void 0 && node.children);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/** 将传入格式的 node 处理为组件内需要的内容 */
|
|
36
|
+
export var nodes2treeNodes = function nodes2treeNodes(nodes, parentKey) {
|
|
37
|
+
if (!nodes) return undefined;
|
|
38
|
+
return nodes.map(function (node) {
|
|
39
|
+
var _ref3, _node$value, _node$originTitle;
|
|
40
|
+
var values = [];
|
|
41
|
+
if (parentKey) {
|
|
42
|
+
values = _toConsumableArray(splitKey(parentKey).values);
|
|
43
|
+
}
|
|
44
|
+
var key = generateKey([].concat(_toConsumableArray(values), [(_ref3 = (_node$value = node.value) !== null && _node$value !== void 0 ? _node$value : node.originTitle) !== null && _ref3 !== void 0 ? _ref3 : node.title]));
|
|
45
|
+
var next = _objectSpread(_objectSpread({}, node), {}, {
|
|
46
|
+
key: key,
|
|
47
|
+
// 补齐 originTitle
|
|
48
|
+
originTitle: (_node$originTitle = node.originTitle) !== null && _node$originTitle !== void 0 ? _node$originTitle : node.title,
|
|
49
|
+
children: nodes2treeNodes(node.children, key)
|
|
50
|
+
});
|
|
51
|
+
return next;
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
export var treeNode2node = function treeNode2node(treeNode) {
|
|
55
|
+
return omit(treeNode, 'key');
|
|
56
|
+
};
|
|
57
|
+
export var deepFilter = function deepFilter(treeNodes, cb) {
|
|
58
|
+
var filtered = treeNodes.map(function (treeNode) {
|
|
59
|
+
var _treeNode$children;
|
|
60
|
+
var next = _objectSpread({}, treeNode);
|
|
61
|
+
// 若过滤通过,无需再关注子节点,直接全部显示
|
|
62
|
+
if (cb(treeNode)) {
|
|
63
|
+
return next;
|
|
64
|
+
}
|
|
65
|
+
// 若过滤不通过,并且有子节点,递归对子节点做过滤操作
|
|
66
|
+
if ((_treeNode$children = treeNode.children) !== null && _treeNode$children !== void 0 && _treeNode$children.length) {
|
|
67
|
+
next.children = deepFilter(treeNode.children, cb);
|
|
68
|
+
}
|
|
69
|
+
return next;
|
|
70
|
+
});
|
|
71
|
+
return filtered.filter(function (treeNode) {
|
|
72
|
+
var _treeNode$children2;
|
|
73
|
+
return (treeNode === null || treeNode === void 0 ? void 0 : (_treeNode$children2 = treeNode.children) === null || _treeNode$children2 === void 0 ? void 0 : _treeNode$children2.length) || cb(treeNode);
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
/** 根据 node key 取得 node 节点 */
|
|
78
|
+
export var findFromTree = function findFromTree(key, treeNodes) {
|
|
79
|
+
var _splitKey = splitKey(key),
|
|
80
|
+
values = _splitKey.values;
|
|
81
|
+
var node;
|
|
82
|
+
var i = 0;
|
|
83
|
+
var _loop = function _loop() {
|
|
84
|
+
var value = values[i];
|
|
85
|
+
if (!node) {
|
|
86
|
+
node = treeNodes.find(function (e) {
|
|
87
|
+
return e.value === value;
|
|
88
|
+
});
|
|
89
|
+
} else {
|
|
90
|
+
var _node$children;
|
|
91
|
+
node = (_node$children = node.children) === null || _node$children === void 0 ? void 0 : _node$children.find(function (e) {
|
|
92
|
+
return e.value === value;
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
for (; i < values.length; i += 1) {
|
|
97
|
+
_loop();
|
|
98
|
+
}
|
|
99
|
+
return node;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
/** 获取所有的选项
|
|
103
|
+
* 如果有子项,则获取子项,否则取本级
|
|
104
|
+
*/
|
|
105
|
+
export var getAllOptions = function getAllOptions(treeNodes) {
|
|
106
|
+
var allOptions = treeNodes.map(function (node) {
|
|
107
|
+
var _node$children2;
|
|
108
|
+
return (node === null || node === void 0 ? void 0 : (_node$children2 = node.children) === null || _node$children2 === void 0 ? void 0 : _node$children2.length) > 0 ? getAllOptions(node === null || node === void 0 ? void 0 : node.children) : node;
|
|
109
|
+
});
|
|
110
|
+
return allOptions.flat();
|
|
111
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ButtonProps } from 'antd/es/button';
|
|
3
|
+
import './index.less';
|
|
4
|
+
export interface IntroduceItem {
|
|
5
|
+
image: string;
|
|
6
|
+
title: string;
|
|
7
|
+
description: string;
|
|
8
|
+
}
|
|
9
|
+
export interface StepItem {
|
|
10
|
+
title: string;
|
|
11
|
+
description: string;
|
|
12
|
+
}
|
|
13
|
+
export interface HelpItem {
|
|
14
|
+
title: string;
|
|
15
|
+
link: string;
|
|
16
|
+
isMore?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface WelcomeLocale {
|
|
19
|
+
helpTitle: string;
|
|
20
|
+
defaultOperation: string;
|
|
21
|
+
}
|
|
22
|
+
export declare type StepType = 'default' | 'card';
|
|
23
|
+
export interface WelcomeProps {
|
|
24
|
+
title: string;
|
|
25
|
+
description: string;
|
|
26
|
+
bgImage: string;
|
|
27
|
+
introduces: IntroduceItem[];
|
|
28
|
+
steps: StepItem[];
|
|
29
|
+
stepType?: StepType;
|
|
30
|
+
buttonText: string;
|
|
31
|
+
buttonProps?: ButtonProps;
|
|
32
|
+
helps: HelpItem[];
|
|
33
|
+
locale?: WelcomeLocale;
|
|
34
|
+
className?: string;
|
|
35
|
+
style?: React.CSSProperties;
|
|
36
|
+
}
|
|
37
|
+
declare const _default: any;
|
|
38
|
+
export default _default;
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
var _excluded = ["title", "description", "bgImage", "introduces", "buttonText", "buttonProps", "steps", "stepType", "helps", "locale", "className"];
|
|
3
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
5
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
6
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
7
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
8
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import { Card, Col, Row, Button } from 'antd';
|
|
11
|
+
import { PlusOutlined } from '@ant-design/icons';
|
|
12
|
+
import classNames from 'classnames';
|
|
13
|
+
import LocaleWrapper from "../locale/LocaleWrapper";
|
|
14
|
+
import zhCN from "./locale/zh-CN";
|
|
15
|
+
import { directTo, getPrefix } from "../_util";
|
|
16
|
+
import Step from "./step";
|
|
17
|
+
import "./index.less";
|
|
18
|
+
var prefix = getPrefix('welcome');
|
|
19
|
+
var Welcome = function Welcome(_ref) {
|
|
20
|
+
var title = _ref.title,
|
|
21
|
+
description = _ref.description,
|
|
22
|
+
bgImage = _ref.bgImage,
|
|
23
|
+
_ref$introduces = _ref.introduces,
|
|
24
|
+
introduces = _ref$introduces === void 0 ? [] : _ref$introduces,
|
|
25
|
+
buttonText = _ref.buttonText,
|
|
26
|
+
buttonProps = _ref.buttonProps,
|
|
27
|
+
_ref$steps = _ref.steps,
|
|
28
|
+
steps = _ref$steps === void 0 ? [] : _ref$steps,
|
|
29
|
+
_ref$stepType = _ref.stepType,
|
|
30
|
+
stepType = _ref$stepType === void 0 ? 'default' : _ref$stepType,
|
|
31
|
+
_ref$helps = _ref.helps,
|
|
32
|
+
helps = _ref$helps === void 0 ? [] : _ref$helps,
|
|
33
|
+
locale = _ref.locale,
|
|
34
|
+
className = _ref.className,
|
|
35
|
+
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
36
|
+
var isDefault = stepType === 'default';
|
|
37
|
+
var renderStep = function renderStep(item, index) {
|
|
38
|
+
var DefaultStep = function DefaultStep() {
|
|
39
|
+
return /*#__PURE__*/React.createElement(Col, {
|
|
40
|
+
span: 12,
|
|
41
|
+
"data-testid": "steps",
|
|
42
|
+
key: item.title,
|
|
43
|
+
className: "".concat(prefix, "-item")
|
|
44
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
45
|
+
className: "".concat(prefix, "-order-wrapper")
|
|
46
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
47
|
+
className: "".concat(prefix, "-order")
|
|
48
|
+
}, index + 1)), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("h3", {
|
|
49
|
+
className: "".concat(prefix, "-title")
|
|
50
|
+
}, item.title), /*#__PURE__*/React.createElement("p", {
|
|
51
|
+
className: "".concat(prefix, "-description")
|
|
52
|
+
}, item.description)));
|
|
53
|
+
};
|
|
54
|
+
var StepProps = {
|
|
55
|
+
title: item.title,
|
|
56
|
+
description: item.description,
|
|
57
|
+
index: index + 1,
|
|
58
|
+
imgUrl: item.imgUrl,
|
|
59
|
+
operations: item.operations,
|
|
60
|
+
locale: locale
|
|
61
|
+
};
|
|
62
|
+
var StepItem = isDefault ? /*#__PURE__*/React.createElement(DefaultStep, {
|
|
63
|
+
key: item.title
|
|
64
|
+
}) : /*#__PURE__*/React.createElement(Step, _extends({
|
|
65
|
+
"data-testid": "steps",
|
|
66
|
+
key: item.title
|
|
67
|
+
}, StepProps));
|
|
68
|
+
return StepItem;
|
|
69
|
+
};
|
|
70
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
71
|
+
className: "".concat("".concat(prefix, "-container"), " ", className)
|
|
72
|
+
}, restProps), /*#__PURE__*/React.createElement(Row, {
|
|
73
|
+
className: "".concat(prefix, "-page-header"),
|
|
74
|
+
style: {
|
|
75
|
+
backgroundImage: "url(\"".concat(bgImage, "\")")
|
|
76
|
+
}
|
|
77
|
+
}, /*#__PURE__*/React.createElement(Col, {
|
|
78
|
+
span: 24,
|
|
79
|
+
className: "".concat(prefix, "-title")
|
|
80
|
+
}, /*#__PURE__*/React.createElement("div", null, title)), /*#__PURE__*/React.createElement(Col, {
|
|
81
|
+
span: 16,
|
|
82
|
+
className: "".concat(prefix, "-description")
|
|
83
|
+
}, /*#__PURE__*/React.createElement("p", null, description))), /*#__PURE__*/React.createElement(Card, {
|
|
84
|
+
bordered: false,
|
|
85
|
+
className: "".concat(prefix, "-introduce")
|
|
86
|
+
}, /*#__PURE__*/React.createElement(Row, {
|
|
87
|
+
gutter: 78
|
|
88
|
+
}, introduces.map(function (item) {
|
|
89
|
+
return /*#__PURE__*/React.createElement(Col, {
|
|
90
|
+
span: 8,
|
|
91
|
+
key: item.image,
|
|
92
|
+
className: "".concat(prefix, "-item"),
|
|
93
|
+
"data-testid": "introduces"
|
|
94
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
95
|
+
src: item.image,
|
|
96
|
+
alt: "",
|
|
97
|
+
height: 80
|
|
98
|
+
}), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("h3", {
|
|
99
|
+
className: "".concat(prefix, "-title")
|
|
100
|
+
}, item.title), /*#__PURE__*/React.createElement("p", {
|
|
101
|
+
className: "".concat(prefix, "-description")
|
|
102
|
+
}, item.description)));
|
|
103
|
+
}))), /*#__PURE__*/React.createElement(Row, {
|
|
104
|
+
className: "".concat(prefix, "-content")
|
|
105
|
+
}, /*#__PURE__*/React.createElement(Col, {
|
|
106
|
+
span: 14,
|
|
107
|
+
className: isDefault ? "".concat(prefix, "-left") : "".concat(prefix, "-border-right")
|
|
108
|
+
}, /*#__PURE__*/React.createElement(Row, {
|
|
109
|
+
justify: "space-around"
|
|
110
|
+
}, steps.map(function (item, index) {
|
|
111
|
+
return renderStep(item, index);
|
|
112
|
+
}), isDefault && /*#__PURE__*/React.createElement(Col, {
|
|
113
|
+
span: 24
|
|
114
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
115
|
+
className: "".concat(prefix, "-btn-wrapper")
|
|
116
|
+
}, /*#__PURE__*/React.createElement(Button, _extends({
|
|
117
|
+
type: "primary",
|
|
118
|
+
icon: /*#__PURE__*/React.createElement(PlusOutlined, null),
|
|
119
|
+
block: true
|
|
120
|
+
}, buttonProps), buttonText))))), /*#__PURE__*/React.createElement(Col, {
|
|
121
|
+
span: 10,
|
|
122
|
+
className: "".concat(prefix, "-right")
|
|
123
|
+
}, /*#__PURE__*/React.createElement("h3", {
|
|
124
|
+
className: "".concat(prefix, "-title")
|
|
125
|
+
}, locale.helpTitle), helps.map(function (item) {
|
|
126
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
127
|
+
key: item.title,
|
|
128
|
+
shape: "round",
|
|
129
|
+
onClick: function onClick() {
|
|
130
|
+
directTo(item.link);
|
|
131
|
+
},
|
|
132
|
+
className: classNames(_defineProperty({}, "".concat(prefix, "-more"), !!item.isMore)),
|
|
133
|
+
"data-testid": "helps"
|
|
134
|
+
}, item.title);
|
|
135
|
+
}))));
|
|
136
|
+
};
|
|
137
|
+
export default LocaleWrapper({
|
|
138
|
+
componentName: 'Welcome',
|
|
139
|
+
defaultLocale: zhCN
|
|
140
|
+
})(Welcome);
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
@import '../variable.less';
|
|
2
|
+
|
|
3
|
+
@prefix: ob-welcome;
|
|
4
|
+
|
|
5
|
+
.@{prefix}-container {
|
|
6
|
+
height: 100%;
|
|
7
|
+
padding-bottom: 0 !important;
|
|
8
|
+
overflow: auto;
|
|
9
|
+
background-color: #fff;
|
|
10
|
+
|
|
11
|
+
.tech-page-container-content {
|
|
12
|
+
// 由于 umi 的本地开发和线上打包的 CSS 样式优先级不一致,导致下列样式在线上环境不生效,因此先加上 !important
|
|
13
|
+
// issue: https://github.com/umijs/umi/issues/5741
|
|
14
|
+
padding: 0 !important;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.@{prefix}-page-header {
|
|
18
|
+
height: 272px;
|
|
19
|
+
padding-top: 72px;
|
|
20
|
+
padding-left: 100px;
|
|
21
|
+
color: #fff;
|
|
22
|
+
background-repeat: no-repeat;
|
|
23
|
+
background-size: 100% 100%;
|
|
24
|
+
|
|
25
|
+
p {
|
|
26
|
+
text-align: justify;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
img {
|
|
30
|
+
width: 80px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.@{prefix}-title {
|
|
34
|
+
font-size: 32px;
|
|
35
|
+
font-family: SFProText-Medium;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.@{prefix}-description {
|
|
39
|
+
margin-top: 16px;
|
|
40
|
+
margin-bottom: 32px;
|
|
41
|
+
font-family: SFProText-Regular;
|
|
42
|
+
opacity: 0.85;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.@{prefix}-introduce {
|
|
47
|
+
margin: 0 32px;
|
|
48
|
+
margin-top: -48px;
|
|
49
|
+
margin-bottom: 40px;
|
|
50
|
+
|
|
51
|
+
.@{prefixCls}-card-body {
|
|
52
|
+
padding: 48px 68px;
|
|
53
|
+
box-shadow: 0 1px 40px 2px rgba(28, 116, 230, 0.1);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.@{prefix}-item {
|
|
57
|
+
display: flex;
|
|
58
|
+
|
|
59
|
+
img {
|
|
60
|
+
margin-right: 12px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.title {
|
|
64
|
+
color: @colorText;
|
|
65
|
+
font-size: 16px;
|
|
66
|
+
font-family: PingFangSC-Medium;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.description {
|
|
70
|
+
margin-top: 4px;
|
|
71
|
+
color: @colorTextSecondary;
|
|
72
|
+
font-family: SFProText-Regular;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.@{prefix}-content {
|
|
78
|
+
padding: 0 32px;
|
|
79
|
+
padding-bottom: 90px;
|
|
80
|
+
|
|
81
|
+
.@{prefix}-left {
|
|
82
|
+
padding: 0 36px;
|
|
83
|
+
border-right: 1px solid #e8e8e8;
|
|
84
|
+
|
|
85
|
+
.@{prefix}-item {
|
|
86
|
+
display: flex;
|
|
87
|
+
padding: 24px 24px;
|
|
88
|
+
|
|
89
|
+
.@{prefix}-order-wrapper {
|
|
90
|
+
.@{prefix}-order {
|
|
91
|
+
width: 24px;
|
|
92
|
+
height: 24px;
|
|
93
|
+
margin-right: 12px;
|
|
94
|
+
color: @colorTextQuaternary;
|
|
95
|
+
text-align: center;
|
|
96
|
+
border: 1px solid @colorTextQuaternary;
|
|
97
|
+
border-radius: 24px;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.@{prefix}-title {
|
|
102
|
+
margin-top: 0;
|
|
103
|
+
color: @colorText;
|
|
104
|
+
font-size: 16px;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.@{prefix}-description {
|
|
108
|
+
margin-top: 8px;
|
|
109
|
+
color: @colorTextTertiary;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.@{prefix}-btn-wrapper {
|
|
114
|
+
margin-right: 24px;
|
|
115
|
+
margin-left: 60px;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.@{prefix}-right {
|
|
120
|
+
padding: 24px 64px;
|
|
121
|
+
|
|
122
|
+
.@{prefix}-title {
|
|
123
|
+
margin-bottom: 16px;
|
|
124
|
+
color: @colorText;
|
|
125
|
+
font-size: 16px;
|
|
126
|
+
font-family: PingFangSC-Medium;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.@{prefixCls}-btn {
|
|
130
|
+
margin-right: 12px;
|
|
131
|
+
margin-bottom: 12px;
|
|
132
|
+
background: rgba(24, 144, 255, 0.06);
|
|
133
|
+
border: none;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.@{prefix}-more {
|
|
137
|
+
background: rgba(0, 0, 0, 0.04);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.@{prefix}-step {
|
|
144
|
+
display: flex;
|
|
145
|
+
// margin-right: 30px;
|
|
146
|
+
margin-bottom: 30px;
|
|
147
|
+
padding: 20px 30px 20px 0;
|
|
148
|
+
background: #fff;
|
|
149
|
+
border: 1px solid rgba(0, 0, 0, 0.06);
|
|
150
|
+
border-radius: 2px;
|
|
151
|
+
|
|
152
|
+
&:hover {
|
|
153
|
+
box-shadow: 0 4px 16px 0;
|
|
154
|
+
cursor: pointer;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
&:nth-child(even) {
|
|
158
|
+
margin-right: 0;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.@{prefix}-step-left {
|
|
162
|
+
padding: 0 20px;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.@{prefix}-step-right {
|
|
166
|
+
.@{prefix}-step-title {
|
|
167
|
+
color: @colorText;
|
|
168
|
+
font-size: 16px;
|
|
169
|
+
line-height: 24px;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.@{prefix}-step-description {
|
|
173
|
+
color: @colorTextTertiary;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.@{prefix}-step-operations {
|
|
178
|
+
color: #0090ff;
|
|
179
|
+
font-size: 14px;
|
|
180
|
+
line-height: 22px;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.borderRight {
|
|
185
|
+
border-right: 1px solid #e8e8e8;
|
|
186
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import './index.less';
|
|
2
|
+
export interface OperationProps {
|
|
3
|
+
text: string;
|
|
4
|
+
onClick: () => void;
|
|
5
|
+
}
|
|
6
|
+
export interface WelcomeStepLocale {
|
|
7
|
+
defaultOperation: string;
|
|
8
|
+
}
|
|
9
|
+
export interface WelcomeStepProps {
|
|
10
|
+
title: string;
|
|
11
|
+
description: string;
|
|
12
|
+
imgUrl?: string;
|
|
13
|
+
index: number;
|
|
14
|
+
operations?: OperationProps[];
|
|
15
|
+
locale?: WelcomeStepLocale;
|
|
16
|
+
}
|
|
17
|
+
declare const _default: any;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Col } from 'antd';
|
|
3
|
+
import LocaleWrapper from "../locale/LocaleWrapper";
|
|
4
|
+
import zhCN from "./locale/zh-CN";
|
|
5
|
+
import { getPrefix } from "../_util";
|
|
6
|
+
import "./index.less";
|
|
7
|
+
var prefix = getPrefix('welcome-step');
|
|
8
|
+
var WelcomeStep = function WelcomeStep(props) {
|
|
9
|
+
var title = props.title,
|
|
10
|
+
description = props.description,
|
|
11
|
+
operations = props.operations,
|
|
12
|
+
imgUrl = props.imgUrl,
|
|
13
|
+
locale = props.locale;
|
|
14
|
+
return /*#__PURE__*/React.createElement(Col, {
|
|
15
|
+
span: 11,
|
|
16
|
+
key: title,
|
|
17
|
+
className: prefix
|
|
18
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
19
|
+
className: "".concat(prefix, "-left")
|
|
20
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
21
|
+
src: imgUrl,
|
|
22
|
+
alt: "",
|
|
23
|
+
width: "60"
|
|
24
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
25
|
+
className: "".concat(prefix, "-right")
|
|
26
|
+
}, /*#__PURE__*/React.createElement("h3", {
|
|
27
|
+
className: "".concat(prefix, "-title")
|
|
28
|
+
}, title), /*#__PURE__*/React.createElement("p", {
|
|
29
|
+
className: "".concat(prefix, "-description")
|
|
30
|
+
}, description), operations && /*#__PURE__*/React.createElement("div", {
|
|
31
|
+
className: "".concat(prefix, "-operations")
|
|
32
|
+
}, operations && operations.map(function (operation) {
|
|
33
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
34
|
+
onClick: operation.onClick,
|
|
35
|
+
className: "".concat(prefix, "-operation")
|
|
36
|
+
}, operation.text || locale.defaultOperation);
|
|
37
|
+
}))));
|
|
38
|
+
};
|
|
39
|
+
export default LocaleWrapper({
|
|
40
|
+
componentName: 'WelcomeStep',
|
|
41
|
+
defaultLocale: zhCN
|
|
42
|
+
})(WelcomeStep);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { GenerateStyle } from 'antd/es/theme/internal';
|
|
3
|
+
import type { ProAliasToken } from '@ant-design/pro-components';
|
|
4
|
+
export interface OBToken extends ProAliasToken {
|
|
5
|
+
/** Wrap component class with `.` prefix */
|
|
6
|
+
componentCls: string;
|
|
7
|
+
/** Origin prefix which do not have `.` prefix */
|
|
8
|
+
prefixCls: string;
|
|
9
|
+
/** Wrap icon class with `.` prefix */
|
|
10
|
+
iconCls: string;
|
|
11
|
+
/** Wrap ant prefixCls class with `.` prefix */
|
|
12
|
+
antCls: string;
|
|
13
|
+
zIndexPopup: number;
|
|
14
|
+
}
|
|
15
|
+
export declare function genComponentStyleHook(componentName: string, styleFn: GenerateStyle<OBToken>): (prefixCls: string) => {
|
|
16
|
+
wrapSSR: (node: React.ReactElement<any, string | React.JSXElementConstructor<any>>) => JSX.Element;
|
|
17
|
+
hashId: string;
|
|
18
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { useStyle } from '@ant-design/pro-components';
|
|
9
|
+
import ConfigProvider from "../ConfigProvider";
|
|
10
|
+
export function genComponentStyleHook(componentName, styleFn) {
|
|
11
|
+
return function (prefixCls) {
|
|
12
|
+
return useStyle(componentName, function (token) {
|
|
13
|
+
var _React$useContext = React.useContext(ConfigProvider.ConfigContext),
|
|
14
|
+
getPrefixCls = _React$useContext.getPrefixCls,
|
|
15
|
+
iconPrefixCls = _React$useContext.iconPrefixCls;
|
|
16
|
+
var rootPrefixCls = getPrefixCls();
|
|
17
|
+
var componentCls = ".".concat(prefixCls);
|
|
18
|
+
var mergedToken = _objectSpread(_objectSpread({}, token), {}, {
|
|
19
|
+
componentCls: componentCls,
|
|
20
|
+
prefixCls: prefixCls,
|
|
21
|
+
iconCls: ".".concat(iconPrefixCls),
|
|
22
|
+
antCls: ".".concat(rootPrefixCls)
|
|
23
|
+
});
|
|
24
|
+
return [styleFn(mergedToken)];
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 获取基于 Umi 框架应用的语言
|
|
3
|
+
* @returns string
|
|
4
|
+
*/
|
|
5
|
+
export declare function getLocale(): string;
|
|
6
|
+
/**
|
|
7
|
+
* 设置基于 Umi 框架应用的语言
|
|
8
|
+
* @param locale 语言的 key
|
|
9
|
+
*/
|
|
10
|
+
export declare function setLocale(locale: string): void;
|
|
11
|
+
export declare function directTo(url: string, blank?: boolean): void;
|
|
12
|
+
/**
|
|
13
|
+
* 将 path 拆分成多个匹配路径
|
|
14
|
+
* 例如: /userinfo/2144/id => ['/userinfo','/useinfo/2144,'/userindo/2144/id']
|
|
15
|
+
* */
|
|
16
|
+
export declare function urlToList(url?: string): string[];
|
|
17
|
+
export declare function isEnglish(): boolean;
|
|
18
|
+
export declare const getPrefix: (cls: string) => string;
|