@oceanbase/ui 1.0.0-alpha.2 → 1.0.0-alpha.20
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/Inter-Medium.ea234620.woff2 +0 -0
- package/dist/static/Inter-Regular.34ba43c9.woff2 +0 -0
- package/dist/static/Inter-SemiBold.95439fb4.woff2 +0 -0
- package/dist/ui.min.css +1 -1
- package/dist/ui.min.js +1 -1
- package/es/Action/Group.d.ts +1 -2
- package/es/Action/Group.js +340 -62
- package/es/Action/Item.d.ts +6 -15
- package/es/Action/Item.js +86 -128
- package/es/Action/index.d.ts +6 -3
- package/es/Action/index.js +1 -0
- package/es/Action/style/index.d.ts +2 -2
- package/es/Action/style/index.js +8 -4
- package/es/BackgroundTaskManager/RefreshMan.js +1 -0
- package/es/BackgroundTaskManager/index.d.ts +2 -0
- package/es/BackgroundTaskManager/index.js +26 -4
- package/es/BasicLayout/Header.js +1 -0
- package/es/BasicLayout/index.d.ts +3 -1
- package/es/BasicLayout/index.js +63 -24
- package/es/BasicLayout/locale/en-US.d.ts +3 -0
- package/es/BasicLayout/locale/en-US.js +4 -1
- package/es/BasicLayout/locale/ja-JP.d.ts +16 -0
- package/es/BasicLayout/locale/ja-JP.js +15 -0
- package/es/BasicLayout/locale/zh-CN.d.ts +3 -0
- package/es/BasicLayout/locale/zh-CN.js +4 -1
- package/es/BasicLayout/locale/zh-TW.d.ts +3 -0
- package/es/BasicLayout/locale/zh-TW.js +4 -1
- package/es/BasicLayout/style/index.js +45 -25
- package/es/BatchOperationBar/index.d.ts +0 -1
- package/es/BatchOperationBar/index.js +33 -17
- package/es/BatchOperationBar/locale/en-US.d.ts +1 -0
- package/es/BatchOperationBar/locale/en-US.js +2 -1
- package/es/BatchOperationBar/locale/ja-JP.d.ts +8 -0
- package/es/BatchOperationBar/locale/ja-JP.js +7 -0
- package/es/BatchOperationBar/locale/zh-CN.d.ts +1 -0
- package/es/BatchOperationBar/locale/zh-CN.js +2 -1
- package/es/BatchOperationBar/locale/zh-TW.d.ts +1 -0
- package/es/BatchOperationBar/locale/zh-TW.js +2 -1
- package/es/BatchOperationBar/style/index.d.ts +10 -0
- package/es/BatchOperationBar/style/index.js +56 -0
- package/es/Boundary/Components/Code.js +13 -6
- package/es/Boundary/Components/Exception.js +86 -74
- package/es/Boundary/Components/Function.js +13 -6
- package/es/Boundary/index.d.ts +0 -1
- package/es/Boundary/index.js +1 -1
- package/es/Boundary/locale/en-US.js +1 -1
- package/es/Boundary/locale/ja-JP.d.ts +11 -0
- package/es/Boundary/locale/ja-JP.js +10 -0
- package/es/Boundary/locale/zh-CN.js +1 -1
- package/es/Boundary/locale/zh-TW.js +1 -1
- package/es/Boundary/style/index.d.ts +10 -0
- package/es/Boundary/style/index.js +48 -0
- package/es/ContentWithIcon/index.d.ts +0 -1
- package/es/ContentWithIcon/index.js +30 -29
- package/es/ContentWithIcon/style/index.d.ts +10 -0
- package/es/ContentWithIcon/style/index.js +26 -0
- package/es/ContentWithQuestion/index.js +1 -0
- package/es/DateRanger/EditableDateTimeInput.d.ts +23 -0
- package/es/DateRanger/EditableDateTimeInput.js +129 -0
- package/es/DateRanger/PickerPanel.js +37 -20
- package/es/DateRanger/Ranger.d.ts +4 -2
- package/es/DateRanger/Ranger.js +71 -49
- package/es/DateRanger/hooks/index.d.ts +4 -0
- package/es/DateRanger/hooks/index.js +2 -0
- package/es/DateRanger/hooks/useAutoWidthInput.d.ts +13 -0
- package/es/DateRanger/hooks/useAutoWidthInput.js +44 -0
- package/es/DateRanger/hooks/useSegmentedInput.d.ts +31 -0
- package/es/DateRanger/hooks/useSegmentedInput.js +304 -0
- package/es/DateRanger/index.js +1 -0
- package/es/DateRanger/locale/en-US.d.ts +2 -0
- package/es/DateRanger/locale/en-US.js +3 -1
- package/es/DateRanger/locale/ja-JP.d.ts +58 -0
- package/es/DateRanger/locale/ja-JP.js +22 -0
- package/es/DateRanger/locale/zh-CN.d.ts +2 -0
- package/es/DateRanger/locale/zh-CN.js +3 -1
- package/es/DateRanger/locale/zh-TW.d.ts +2 -0
- package/es/DateRanger/locale/zh-TW.js +3 -1
- package/es/DateRanger/style/index.d.ts +10 -0
- package/es/DateRanger/style/index.js +164 -0
- package/es/Dialog/Anchor.d.ts +2 -10
- package/es/Dialog/Anchor.js +68 -96
- package/es/Dialog/EventProxy.js +1 -0
- package/es/Dialog/index.d.ts +5 -1
- package/es/Dialog/index.js +599 -576
- package/es/Dialog/locale/en-US.d.ts +5 -0
- package/es/Dialog/locale/en-US.js +6 -1
- package/es/Dialog/locale/ja-JP.d.ts +10 -0
- package/es/Dialog/locale/ja-JP.js +9 -0
- package/es/Dialog/locale/zh-CN.d.ts +5 -0
- package/es/Dialog/locale/zh-CN.js +6 -1
- package/es/Dialog/locale/zh-TW.d.ts +5 -0
- package/es/Dialog/locale/zh-TW.js +6 -1
- package/es/Dialog/style/index.d.ts +10 -0
- package/es/Dialog/style/index.js +116 -0
- package/es/DocDialog/index.js +29 -9
- package/es/DocDialog/locale/en-US.d.ts +3 -1
- package/es/DocDialog/locale/en-US.js +3 -1
- package/es/DocDialog/locale/ja-JP.d.ts +4 -0
- package/es/DocDialog/locale/ja-JP.js +3 -0
- package/es/DocDialog/locale/zh-CN.d.ts +3 -1
- package/es/DocDialog/locale/zh-CN.js +3 -1
- package/es/DocDialog/locale/zh-TW.d.ts +3 -1
- package/es/DocDialog/locale/zh-TW.js +3 -1
- package/es/FooterToolbar/index.d.ts +7 -4
- package/es/FooterToolbar/index.js +28 -11
- package/es/FooterToolbar/locale/en-US.d.ts +4 -0
- package/es/FooterToolbar/locale/en-US.js +3 -0
- package/es/FooterToolbar/locale/ja-JP.d.ts +4 -0
- package/es/FooterToolbar/locale/ja-JP.js +3 -0
- package/es/FooterToolbar/locale/zh-CN.d.ts +4 -0
- package/es/FooterToolbar/locale/zh-CN.js +3 -0
- package/es/FooterToolbar/locale/zh-TW.d.ts +4 -0
- package/es/FooterToolbar/locale/zh-TW.js +3 -0
- package/es/FooterToolbar/style/index.d.ts +0 -2
- package/es/FooterToolbar/style/index.js +10 -19
- package/es/FullscreenBox/index.d.ts +0 -1
- package/es/FullscreenBox/index.js +62 -44
- package/es/FullscreenBox/locale/en-US.d.ts +4 -1
- package/es/FullscreenBox/locale/en-US.js +4 -1
- package/es/FullscreenBox/locale/ja-JP.d.ts +5 -0
- package/es/FullscreenBox/locale/ja-JP.js +4 -0
- package/es/FullscreenBox/locale/zh-CN.d.ts +4 -1
- package/es/FullscreenBox/locale/zh-CN.js +4 -1
- package/es/FullscreenBox/locale/zh-TW.d.ts +4 -1
- package/es/FullscreenBox/locale/zh-TW.js +4 -1
- package/es/FullscreenBox/style/index.d.ts +10 -0
- package/es/FullscreenBox/style/index.js +74 -0
- package/es/Highlight/DiffView/DiffCells.js +1 -0
- package/es/Highlight/DiffView/index.d.ts +0 -1
- package/es/Highlight/DiffView/index.js +6 -5
- package/es/Highlight/HighlightCell.js +1 -0
- package/es/Highlight/JsonView.d.ts +0 -1
- package/es/Highlight/JsonView.js +6 -5
- package/es/Highlight/index.d.ts +1 -2
- package/es/Highlight/index.js +33 -25
- package/es/Highlight/locale/en-US.d.ts +2 -0
- package/es/Highlight/locale/en-US.js +3 -1
- package/es/Highlight/locale/ja-JP.d.ts +6 -0
- package/es/Highlight/locale/ja-JP.js +5 -0
- package/es/Highlight/locale/zh-CN.d.ts +2 -0
- package/es/Highlight/locale/zh-CN.js +3 -1
- package/es/Highlight/locale/zh-TW.d.ts +2 -0
- package/es/Highlight/locale/zh-TW.js +3 -1
- package/es/Highlight/style/index.d.ts +10 -0
- package/es/Highlight/style/index.js +213 -0
- package/es/Highlight/useKeyDownCopyEvent.js +1 -0
- package/es/IconFont/index.js +1 -0
- package/es/LightFilter/index.d.ts +6 -2
- package/es/LightFilter/index.js +25 -8
- package/es/LightFilter/locale/en-US.d.ts +4 -0
- package/es/LightFilter/locale/en-US.js +3 -0
- package/es/LightFilter/locale/ja-JP.d.ts +4 -0
- package/es/LightFilter/locale/ja-JP.js +3 -0
- package/es/LightFilter/locale/zh-CN.d.ts +4 -0
- package/es/LightFilter/locale/zh-CN.js +3 -0
- package/es/LightFilter/locale/zh-TW.d.ts +4 -0
- package/es/LightFilter/locale/zh-TW.js +3 -0
- package/es/LocaleDropdown/index.js +5 -2
- package/es/Login/ActivateForm.d.ts +0 -1
- package/es/Login/ActivateForm.js +13 -9
- package/es/Login/LoginForm.d.ts +0 -1
- package/es/Login/LoginForm.js +21 -15
- package/es/Login/RegisterForm.d.ts +0 -1
- package/es/Login/RegisterForm.js +15 -11
- package/es/Login/index.d.ts +0 -1
- package/es/Login/index.js +25 -22
- package/es/Login/locale/ja-JP.d.ts +28 -0
- package/es/Login/locale/ja-JP.js +27 -0
- package/es/Login/locale/zh-CN.js +2 -2
- package/es/Login/style/index.d.ts +10 -0
- package/es/Login/style/index.js +182 -0
- package/es/Lottie/index.js +1 -0
- package/es/NavMenu/index.d.ts +5 -3
- package/es/NavMenu/index.js +39 -13
- package/es/NavMenu/locale/en-US.d.ts +4 -0
- package/es/NavMenu/locale/en-US.js +3 -0
- package/es/NavMenu/locale/ja-JP.d.ts +4 -0
- package/es/NavMenu/locale/ja-JP.js +3 -0
- package/es/NavMenu/locale/zh-CN.d.ts +4 -0
- package/es/NavMenu/locale/zh-CN.js +3 -0
- package/es/NavMenu/locale/zh-TW.d.ts +4 -0
- package/es/NavMenu/locale/zh-TW.js +3 -0
- package/es/NavMenu/style/index.d.ts +10 -0
- package/es/NavMenu/style/index.js +47 -0
- package/es/PageContainer/ItemRender.js +1 -0
- package/es/PageContainer/index.d.ts +2 -0
- package/es/PageContainer/index.js +124 -30
- package/es/PageContainer/locale/en-US.d.ts +1 -0
- package/es/PageContainer/locale/en-US.js +2 -1
- package/es/PageContainer/locale/ja-JP.d.ts +5 -0
- package/es/PageContainer/locale/ja-JP.js +4 -0
- package/es/PageContainer/locale/zh-CN.d.ts +1 -0
- package/es/PageContainer/locale/zh-CN.js +2 -1
- package/es/PageContainer/locale/zh-TW.d.ts +1 -0
- package/es/PageContainer/locale/zh-TW.js +2 -1
- package/es/PageContainer/style/index.js +42 -13
- package/es/PageLoading/index.js +1 -0
- package/es/Password/Content.d.ts +2 -0
- package/es/Password/Content.js +12 -3
- package/es/Password/index.d.ts +1 -0
- package/es/Password/index.js +19 -14
- package/es/Password/locale/en-US.d.ts +1 -0
- package/es/Password/locale/en-US.js +2 -1
- package/es/Password/locale/ja-JP.d.ts +14 -0
- package/es/Password/locale/ja-JP.js +13 -0
- package/es/Password/locale/zh-CN.d.ts +1 -0
- package/es/Password/locale/zh-CN.js +1 -0
- package/es/Password/locale/zh-TW.d.ts +1 -0
- package/es/Password/locale/zh-TW.js +2 -1
- package/es/ProCard/index.js +1 -0
- package/es/ProCard/style/index.d.ts +2 -2
- package/es/ProCard/style/index.js +12 -6
- package/es/ProTable/index.js +10 -2
- package/es/ProTable/style/index.d.ts +2 -2
- package/es/ProTable/style/index.js +10 -5
- package/es/Ranger/QuickPicker.js +9 -4
- package/es/Ranger/Ranger.d.ts +0 -1
- package/es/Ranger/Ranger.js +13 -9
- package/es/Ranger/index.js +1 -0
- package/es/Ranger/locale/ja-JP.d.ts +28 -0
- package/es/Ranger/locale/ja-JP.js +29 -0
- package/es/Ranger/style/index.d.ts +10 -0
- package/es/Ranger/style/index.js +44 -0
- package/es/SideTip/Dragger.js +3 -1
- package/es/SideTip/IconLoading.js +1 -0
- package/es/SideTip/index.d.ts +0 -1
- package/es/SideTip/index.js +62 -29
- package/es/SideTip/locale/en-US.d.ts +4 -1
- package/es/SideTip/locale/en-US.js +4 -1
- package/es/SideTip/locale/ja-JP.d.ts +5 -0
- package/es/SideTip/locale/ja-JP.js +4 -0
- package/es/SideTip/locale/zh-CN.d.ts +4 -1
- package/es/SideTip/locale/zh-CN.js +4 -1
- package/es/SideTip/locale/zh-TW.d.ts +4 -1
- package/es/SideTip/locale/zh-TW.js +4 -1
- package/es/SideTip/style/index.d.ts +10 -0
- package/es/SideTip/style/index.js +171 -0
- package/es/TagSelect/Group.d.ts +6 -6
- package/es/TagSelect/Group.js +11 -4
- package/es/TagSelect/Item.js +8 -4
- package/es/TagSelect/index.js +1 -0
- package/es/TreeSearch/index.js +1 -0
- package/es/Welcome/index.d.ts +0 -1
- package/es/Welcome/index.js +31 -26
- package/es/Welcome/locale/ja-JP.d.ts +5 -0
- package/es/Welcome/locale/ja-JP.js +4 -0
- package/es/Welcome/step/style/index.d.ts +10 -0
- package/es/Welcome/step/style/index.js +44 -0
- package/es/Welcome/step.d.ts +0 -1
- package/es/Welcome/step.js +18 -14
- package/es/Welcome/style/index.d.ts +10 -0
- package/es/Welcome/style/index.js +141 -0
- package/es/_util/genComponentStyleHook.d.ts +4 -3
- package/es/_util/genComponentStyleHook.js +1 -1
- package/es/_util/index.js +6 -0
- package/es/assets/logo/oceanbase_logo.svg +45 -29
- package/es/assets/logo/oceanbase_logo_dark.svg +45 -29
- package/es/assets/logo/oceanbase_watermark.svg +45 -31
- package/es/constant/index.js +1 -0
- package/es/index.d.ts +0 -5
- package/es/index.js +1 -3
- package/es/locale/LocaleWrapper.js +1 -0
- package/es/locale/en-US.js +6 -4
- package/es/locale/index.js +1 -0
- package/es/locale/ja-JP.d.ts +3 -0
- package/es/locale/ja-JP.js +44 -0
- package/es/locale/zh-CN.js +6 -4
- package/es/locale/zh-TW.js +6 -4
- package/lib/Action/Group.d.ts +1 -2
- package/lib/Action/Group.js +354 -121
- package/lib/Action/Item.d.ts +6 -15
- package/lib/Action/Item.js +81 -110
- package/lib/Action/index.d.ts +6 -3
- package/lib/Action/index.js +13 -36
- package/lib/Action/style/index.d.ts +2 -2
- package/lib/Action/style/index.js +38 -41
- package/lib/BackgroundTaskManager/RefreshMan.js +34 -60
- package/lib/BackgroundTaskManager/constants.js +10 -32
- package/lib/BackgroundTaskManager/index.d.ts +2 -0
- package/lib/BackgroundTaskManager/index.js +137 -135
- package/lib/BasicLayout/Header.js +238 -138
- package/lib/BasicLayout/index.d.ts +3 -1
- package/lib/BasicLayout/index.js +306 -292
- package/lib/BasicLayout/locale/en-US.d.ts +3 -0
- package/lib/BasicLayout/locale/en-US.js +19 -34
- package/lib/BasicLayout/locale/ja-JP.d.ts +16 -0
- package/lib/BasicLayout/locale/ja-JP.js +21 -0
- package/lib/BasicLayout/locale/zh-CN.d.ts +3 -0
- package/lib/BasicLayout/locale/zh-CN.js +19 -34
- package/lib/BasicLayout/locale/zh-TW.d.ts +3 -0
- package/lib/BasicLayout/locale/zh-TW.js +19 -34
- package/lib/BasicLayout/style/Header.js +41 -60
- package/lib/BasicLayout/style/index.js +201 -204
- package/lib/BatchOperationBar/index.d.ts +0 -1
- package/lib/BatchOperationBar/index.js +119 -132
- package/lib/BatchOperationBar/locale/en-US.d.ts +1 -0
- package/lib/BatchOperationBar/locale/en-US.js +11 -28
- package/lib/BatchOperationBar/locale/ja-JP.d.ts +8 -0
- package/lib/BatchOperationBar/locale/ja-JP.js +13 -0
- package/lib/BatchOperationBar/locale/zh-CN.d.ts +1 -0
- package/lib/BatchOperationBar/locale/zh-CN.js +11 -28
- package/lib/BatchOperationBar/locale/zh-TW.d.ts +1 -0
- package/lib/BatchOperationBar/locale/zh-TW.js +11 -28
- package/lib/BatchOperationBar/style/index.d.ts +10 -0
- package/lib/BatchOperationBar/style/index.js +71 -0
- package/lib/Boundary/Components/Code.js +57 -64
- package/lib/Boundary/Components/Exception.js +117 -117
- package/lib/Boundary/Components/Function.js +47 -51
- package/lib/Boundary/Components/index.js +36 -25
- package/lib/Boundary/IBoundary.js +4 -16
- package/lib/Boundary/constant.js +16 -38
- package/lib/Boundary/index.d.ts +0 -1
- package/lib/Boundary/index.js +11 -26
- package/lib/Boundary/locale/en-US.js +14 -32
- package/lib/Boundary/locale/ja-JP.d.ts +11 -0
- package/lib/Boundary/locale/ja-JP.js +16 -0
- package/lib/Boundary/locale/zh-CN.js +14 -32
- package/lib/Boundary/locale/zh-TW.js +14 -32
- package/lib/Boundary/style/index.d.ts +10 -0
- package/lib/Boundary/style/index.js +57 -0
- package/lib/Boundary/utils.js +9 -31
- package/lib/ContentWithIcon/index.d.ts +0 -1
- package/lib/ContentWithIcon/index.js +99 -102
- package/lib/ContentWithIcon/style/index.d.ts +10 -0
- package/lib/ContentWithIcon/style/index.js +38 -0
- package/lib/ContentWithQuestion/index.js +40 -48
- package/lib/ContentWithQuestion/style/index.js +16 -35
- package/lib/DateRanger/EditableDateTimeInput.d.ts +23 -0
- package/lib/DateRanger/EditableDateTimeInput.js +131 -0
- package/lib/DateRanger/PickerPanel.js +341 -294
- package/lib/DateRanger/Ranger.d.ts +4 -2
- package/lib/DateRanger/Ranger.js +376 -405
- package/lib/DateRanger/constant/index.js +188 -376
- package/lib/DateRanger/hooks/index.d.ts +4 -0
- package/lib/DateRanger/hooks/index.js +19 -0
- package/lib/DateRanger/hooks/useAutoWidthInput.d.ts +13 -0
- package/lib/DateRanger/hooks/useAutoWidthInput.js +37 -0
- package/lib/DateRanger/hooks/useSegmentedInput.d.ts +31 -0
- package/lib/DateRanger/hooks/useSegmentedInput.js +233 -0
- package/lib/DateRanger/index.js +45 -65
- package/lib/DateRanger/locale/en-US.d.ts +2 -0
- package/lib/DateRanger/locale/en-US.js +22 -47
- package/lib/DateRanger/locale/ja-JP.d.ts +58 -0
- package/lib/DateRanger/locale/ja-JP.js +24 -0
- package/lib/DateRanger/locale/zh-CN.d.ts +2 -0
- package/lib/DateRanger/locale/zh-CN.js +22 -47
- package/lib/DateRanger/locale/zh-TW.d.ts +2 -0
- package/lib/DateRanger/locale/zh-TW.js +22 -47
- package/lib/DateRanger/style/index.d.ts +10 -0
- package/lib/DateRanger/style/index.js +224 -0
- package/lib/DateRanger/typing.js +4 -16
- package/lib/Dialog/Anchor.d.ts +2 -10
- package/lib/Dialog/Anchor.js +80 -105
- package/lib/Dialog/Dock.js +14 -36
- package/lib/Dialog/EventProxy.js +21 -49
- package/lib/Dialog/index.d.ts +5 -1
- package/lib/Dialog/index.js +581 -519
- package/lib/Dialog/locale/en-US.d.ts +5 -0
- package/lib/Dialog/locale/en-US.js +13 -26
- package/lib/Dialog/locale/ja-JP.d.ts +10 -0
- package/lib/Dialog/locale/ja-JP.js +15 -0
- package/lib/Dialog/locale/zh-CN.d.ts +5 -0
- package/lib/Dialog/locale/zh-CN.js +13 -26
- package/lib/Dialog/locale/zh-TW.d.ts +5 -0
- package/lib/Dialog/locale/zh-TW.js +13 -26
- package/lib/Dialog/style/index.d.ts +10 -0
- package/lib/Dialog/style/index.js +137 -0
- package/lib/DocDialog/index.js +69 -81
- package/lib/DocDialog/locale/en-US.d.ts +3 -1
- package/lib/DocDialog/locale/en-US.js +7 -23
- package/lib/DocDialog/locale/ja-JP.d.ts +4 -0
- package/lib/DocDialog/locale/ja-JP.js +9 -0
- package/lib/DocDialog/locale/zh-CN.d.ts +3 -1
- package/lib/DocDialog/locale/zh-CN.js +7 -23
- package/lib/DocDialog/locale/zh-TW.d.ts +3 -1
- package/lib/DocDialog/locale/zh-TW.js +7 -23
- package/lib/FooterToolbar/index.d.ts +7 -4
- package/lib/FooterToolbar/index.js +48 -50
- package/lib/FooterToolbar/locale/en-US.d.ts +4 -0
- package/lib/FooterToolbar/locale/en-US.js +9 -0
- package/lib/FooterToolbar/locale/ja-JP.d.ts +4 -0
- package/lib/FooterToolbar/locale/ja-JP.js +9 -0
- package/lib/FooterToolbar/locale/zh-CN.d.ts +4 -0
- package/lib/FooterToolbar/locale/zh-CN.js +9 -0
- package/lib/FooterToolbar/locale/zh-TW.d.ts +4 -0
- package/lib/FooterToolbar/locale/zh-TW.js +9 -0
- package/lib/FooterToolbar/style/index.d.ts +0 -2
- package/lib/FooterToolbar/style/index.js +25 -54
- package/lib/FullscreenBox/index.d.ts +0 -1
- package/lib/FullscreenBox/index.js +159 -121
- package/lib/FullscreenBox/locale/en-US.d.ts +4 -1
- package/lib/FullscreenBox/locale/en-US.js +8 -23
- package/lib/FullscreenBox/locale/ja-JP.d.ts +5 -0
- package/lib/FullscreenBox/locale/ja-JP.js +10 -0
- package/lib/FullscreenBox/locale/zh-CN.d.ts +4 -1
- package/lib/FullscreenBox/locale/zh-CN.js +8 -23
- package/lib/FullscreenBox/locale/zh-TW.d.ts +4 -1
- package/lib/FullscreenBox/locale/zh-TW.js +8 -23
- package/lib/FullscreenBox/style/index.d.ts +10 -0
- package/lib/FullscreenBox/style/index.js +90 -0
- package/lib/Highlight/DiffView/DiffCells.js +35 -49
- package/lib/Highlight/DiffView/index.d.ts +0 -1
- package/lib/Highlight/DiffView/index.js +154 -149
- package/lib/Highlight/HighlightCell.js +29 -46
- package/lib/Highlight/JsonView.d.ts +0 -1
- package/lib/Highlight/JsonView.js +45 -74
- package/lib/Highlight/index.d.ts +1 -2
- package/lib/Highlight/index.js +204 -204
- package/lib/Highlight/languages/bash.js +7 -34
- package/lib/Highlight/languages/cpp.js +7 -34
- package/lib/Highlight/languages/css.js +7 -34
- package/lib/Highlight/languages/dockerfile.js +7 -34
- package/lib/Highlight/languages/go.js +7 -34
- package/lib/Highlight/languages/groovy.js +7 -34
- package/lib/Highlight/languages/http.js +7 -34
- package/lib/Highlight/languages/java.js +7 -34
- package/lib/Highlight/languages/javascript.js +7 -34
- package/lib/Highlight/languages/json.js +7 -34
- package/lib/Highlight/languages/markdown.js +7 -34
- package/lib/Highlight/languages/nginx.js +7 -34
- package/lib/Highlight/languages/python.js +7 -34
- package/lib/Highlight/languages/ruby.js +7 -34
- package/lib/Highlight/languages/solidity.js +7 -34
- package/lib/Highlight/languages/sql.js +7 -34
- package/lib/Highlight/languages/typescript.js +7 -34
- package/lib/Highlight/languages/xml.js +7 -34
- package/lib/Highlight/languages/yaml.js +7 -34
- package/lib/Highlight/locale/en-US.d.ts +2 -0
- package/lib/Highlight/locale/en-US.js +9 -25
- package/lib/Highlight/locale/ja-JP.d.ts +6 -0
- package/lib/Highlight/locale/ja-JP.js +11 -0
- package/lib/Highlight/locale/zh-CN.d.ts +2 -0
- package/lib/Highlight/locale/zh-CN.js +9 -25
- package/lib/Highlight/locale/zh-TW.d.ts +2 -0
- package/lib/Highlight/locale/zh-TW.js +9 -25
- package/lib/Highlight/style/index.d.ts +10 -0
- package/lib/Highlight/style/index.js +277 -0
- package/lib/Highlight/useKeyDownCopyEvent.js +40 -65
- package/lib/IconFont/index.js +23 -39
- package/lib/LightFilter/index.d.ts +6 -2
- package/lib/LightFilter/index.js +46 -43
- package/lib/LightFilter/locale/en-US.d.ts +4 -0
- package/lib/LightFilter/locale/en-US.js +9 -0
- package/lib/LightFilter/locale/ja-JP.d.ts +4 -0
- package/lib/LightFilter/locale/ja-JP.js +9 -0
- package/lib/LightFilter/locale/zh-CN.d.ts +4 -0
- package/lib/LightFilter/locale/zh-CN.js +9 -0
- package/lib/LightFilter/locale/zh-TW.d.ts +4 -0
- package/lib/LightFilter/locale/zh-TW.js +9 -0
- package/lib/LightFilter/style/index.js +15 -33
- package/lib/LocaleDropdown/index.js +44 -61
- package/lib/Login/ActivateForm.d.ts +0 -1
- package/lib/Login/ActivateForm.js +93 -119
- package/lib/Login/LoginForm.d.ts +0 -1
- package/lib/Login/LoginForm.js +135 -150
- package/lib/Login/RegisterForm.d.ts +0 -1
- package/lib/Login/RegisterForm.js +122 -163
- package/lib/Login/index.d.ts +0 -1
- package/lib/Login/index.js +156 -132
- package/lib/Login/locale/en-US.js +31 -49
- package/lib/Login/locale/ja-JP.d.ts +28 -0
- package/lib/Login/locale/ja-JP.js +33 -0
- package/lib/Login/locale/zh-CN.js +31 -49
- package/lib/Login/locale/zh-TW.js +30 -48
- package/lib/Login/style/index.d.ts +10 -0
- package/lib/Login/style/index.js +246 -0
- package/lib/Lottie/index.js +7 -25
- package/lib/NavMenu/index.d.ts +5 -3
- package/lib/NavMenu/index.js +118 -103
- package/lib/NavMenu/locale/en-US.d.ts +4 -0
- package/lib/NavMenu/locale/en-US.js +9 -0
- package/lib/NavMenu/locale/ja-JP.d.ts +4 -0
- package/lib/NavMenu/locale/ja-JP.js +9 -0
- package/lib/NavMenu/locale/zh-CN.d.ts +4 -0
- package/lib/NavMenu/locale/zh-CN.js +9 -0
- package/lib/NavMenu/locale/zh-TW.d.ts +4 -0
- package/lib/NavMenu/locale/zh-TW.js +9 -0
- package/lib/NavMenu/style/index.d.ts +10 -0
- package/lib/NavMenu/style/index.js +60 -0
- package/lib/PageContainer/ItemRender.js +27 -46
- package/lib/PageContainer/index.d.ts +2 -0
- package/lib/PageContainer/index.js +167 -97
- package/lib/PageContainer/locale/en-US.d.ts +1 -0
- package/lib/PageContainer/locale/en-US.js +8 -25
- package/lib/PageContainer/locale/ja-JP.d.ts +5 -0
- package/lib/PageContainer/locale/ja-JP.js +10 -0
- package/lib/PageContainer/locale/zh-CN.d.ts +1 -0
- package/lib/PageContainer/locale/zh-CN.js +8 -25
- package/lib/PageContainer/locale/zh-TW.d.ts +1 -0
- package/lib/PageContainer/locale/zh-TW.js +8 -25
- package/lib/PageContainer/style/index.js +69 -45
- package/lib/PageLoading/index.js +32 -64
- package/lib/Password/Content.d.ts +2 -0
- package/lib/Password/Content.js +99 -84
- package/lib/Password/index.d.ts +1 -0
- package/lib/Password/index.js +127 -141
- package/lib/Password/locale/en-US.d.ts +1 -0
- package/lib/Password/locale/en-US.js +15 -32
- package/lib/Password/locale/ja-JP.d.ts +14 -0
- package/lib/Password/locale/ja-JP.js +19 -0
- package/lib/Password/locale/zh-CN.d.ts +1 -0
- package/lib/Password/locale/zh-CN.js +16 -33
- package/lib/Password/locale/zh-TW.d.ts +1 -0
- package/lib/Password/locale/zh-TW.js +15 -32
- package/lib/ProCard/index.js +77 -98
- package/lib/ProCard/style/index.d.ts +2 -2
- package/lib/ProCard/style/index.js +32 -38
- package/lib/ProTable/index.js +102 -122
- package/lib/ProTable/style/index.d.ts +2 -2
- package/lib/ProTable/style/index.js +29 -37
- package/lib/Ranger/QuickPicker.js +91 -83
- package/lib/Ranger/Ranger.d.ts +0 -1
- package/lib/Ranger/Ranger.js +98 -128
- package/lib/Ranger/constant/index.js +115 -266
- package/lib/Ranger/index.js +61 -70
- package/lib/Ranger/locale/en-US.js +31 -49
- package/lib/Ranger/locale/ja-JP.d.ts +28 -0
- package/lib/Ranger/locale/ja-JP.js +35 -0
- package/lib/Ranger/locale/zh-CN.js +7 -25
- package/lib/Ranger/locale/zh-TW.js +7 -25
- package/lib/Ranger/style/index.d.ts +10 -0
- package/lib/Ranger/style/index.js +64 -0
- package/lib/Ranger/typing.js +4 -16
- package/lib/SideTip/Dragger.js +259 -219
- package/lib/SideTip/IconLoading.js +43 -75
- package/lib/SideTip/index.d.ts +0 -1
- package/lib/SideTip/index.js +160 -116
- package/lib/SideTip/locale/en-US.d.ts +4 -1
- package/lib/SideTip/locale/en-US.js +8 -23
- package/lib/SideTip/locale/ja-JP.d.ts +5 -0
- package/lib/SideTip/locale/ja-JP.js +10 -0
- package/lib/SideTip/locale/zh-CN.d.ts +4 -1
- package/lib/SideTip/locale/zh-CN.js +8 -23
- package/lib/SideTip/locale/zh-TW.d.ts +4 -1
- package/lib/SideTip/locale/zh-TW.js +8 -23
- package/lib/SideTip/style/index.d.ts +10 -0
- package/lib/SideTip/style/index.js +204 -0
- package/lib/SideTip/utils.js +40 -61
- package/lib/TagSelect/Group.d.ts +6 -6
- package/lib/TagSelect/Group.js +68 -79
- package/lib/TagSelect/Item.js +67 -86
- package/lib/TagSelect/TagSelectContext.js +7 -25
- package/lib/TagSelect/index.js +12 -36
- package/lib/TagSelect/style/index.js +41 -64
- package/lib/TreeSearch/index.js +133 -132
- package/lib/TreeSearch/util.js +52 -70
- package/lib/Welcome/index.d.ts +0 -1
- package/lib/Welcome/index.js +140 -84
- package/lib/Welcome/locale/en-US.js +8 -26
- package/lib/Welcome/locale/ja-JP.d.ts +5 -0
- package/lib/Welcome/locale/ja-JP.js +10 -0
- package/lib/Welcome/locale/zh-CN.js +8 -26
- package/lib/Welcome/locale/zh-TW.js +8 -26
- package/lib/Welcome/step/style/index.d.ts +10 -0
- package/lib/Welcome/step/style/index.js +58 -0
- package/lib/Welcome/step.d.ts +0 -1
- package/lib/Welcome/step.js +63 -49
- package/lib/Welcome/style/index.d.ts +10 -0
- package/lib/Welcome/style/index.js +176 -0
- package/lib/_util/genComponentStyleHook.d.ts +4 -3
- package/lib/_util/genComponentStyleHook.js +15 -43
- package/lib/_util/index.js +43 -44
- package/lib/_util/useNavigate.js +11 -26
- package/lib/assets/logo/oceanbase_logo.svg +45 -29
- package/lib/assets/logo/oceanbase_logo_dark.svg +45 -29
- package/lib/assets/logo/oceanbase_watermark.svg +45 -31
- package/lib/constant/index.js +23 -50
- package/lib/index.d.ts +0 -5
- package/lib/index.js +282 -136
- package/lib/interface.js +4 -16
- package/lib/locale/LocaleWrapper.js +52 -62
- package/lib/locale/en-US.js +43 -68
- package/lib/locale/index.js +5 -17
- package/lib/locale/ja-JP.d.ts +3 -0
- package/lib/locale/ja-JP.js +46 -0
- package/lib/locale/zh-CN.js +42 -67
- package/lib/locale/zh-TW.js +38 -63
- package/package.json +9 -12
- package/dist/static/Inter.f6bcdfb6.woff2 +0 -0
- package/es/BatchOperationBar/index.less +0 -46
- package/es/BatchOperationBar/index.less.d.ts +0 -15
- package/es/Boundary/index.less +0 -36
- package/es/ContentWithIcon/index.less +0 -21
- package/es/DateRanger/index.less +0 -180
- package/es/Dialog/index.less +0 -116
- package/es/FullscreenBox/index.less +0 -49
- package/es/GraphToolbar/index.d.ts +0 -26
- package/es/GraphToolbar/index.js +0 -146
- package/es/GraphToolbar/index.less +0 -65
- package/es/GraphToolbar/locale/en-US.d.ts +0 -9
- package/es/GraphToolbar/locale/en-US.js +0 -8
- package/es/GraphToolbar/locale/zh-CN.d.ts +0 -9
- package/es/GraphToolbar/locale/zh-CN.js +0 -8
- package/es/GraphToolbar/locale/zh-TW.d.ts +0 -9
- package/es/GraphToolbar/locale/zh-TW.js +0 -8
- package/es/Highlight/index.less +0 -381
- package/es/Login/index.less +0 -268
- package/es/NavMenu/index.less +0 -50
- package/es/Ranger/index.less +0 -57
- package/es/SideTip/index.less +0 -180
- package/es/TaskGraph/Graph.d.ts +0 -24
- package/es/TaskGraph/Graph.js +0 -271
- package/es/TaskGraph/graph.less +0 -23
- package/es/TaskGraph/index.d.ts +0 -16
- package/es/TaskGraph/index.js +0 -178
- package/es/TaskGraph/index.less +0 -117
- package/es/TaskGraph/locale/en-US.d.ts +0 -13
- package/es/TaskGraph/locale/en-US.js +0 -12
- package/es/TaskGraph/locale/zh-CN.d.ts +0 -13
- package/es/TaskGraph/locale/zh-CN.js +0 -12
- package/es/TaskGraph/locale/zh-TW.d.ts +0 -13
- package/es/TaskGraph/locale/zh-TW.js +0 -12
- package/es/TaskGraph/register.d.ts +0 -7
- package/es/TaskGraph/register.js +0 -200
- package/es/Welcome/index.less +0 -185
- package/es/index.less +0 -1
- package/es/variable.less +0 -54
- package/lib/BatchOperationBar/index.less +0 -46
- package/lib/BatchOperationBar/index.less.d.ts +0 -15
- package/lib/Boundary/index.less +0 -36
- package/lib/ContentWithIcon/index.less +0 -21
- package/lib/DateRanger/index.less +0 -180
- package/lib/Dialog/index.less +0 -116
- package/lib/FullscreenBox/index.less +0 -49
- package/lib/GraphToolbar/index.d.ts +0 -26
- package/lib/GraphToolbar/index.js +0 -154
- package/lib/GraphToolbar/index.less +0 -65
- package/lib/GraphToolbar/locale/en-US.d.ts +0 -9
- package/lib/GraphToolbar/locale/en-US.js +0 -32
- package/lib/GraphToolbar/locale/zh-CN.d.ts +0 -9
- package/lib/GraphToolbar/locale/zh-CN.js +0 -32
- package/lib/GraphToolbar/locale/zh-TW.d.ts +0 -9
- package/lib/GraphToolbar/locale/zh-TW.js +0 -32
- package/lib/Highlight/index.less +0 -381
- package/lib/Login/index.less +0 -268
- package/lib/NavMenu/index.less +0 -50
- package/lib/Ranger/index.less +0 -57
- package/lib/SideTip/index.less +0 -180
- package/lib/TaskGraph/Graph.d.ts +0 -24
- package/lib/TaskGraph/Graph.js +0 -261
- package/lib/TaskGraph/graph.less +0 -23
- package/lib/TaskGraph/index.d.ts +0 -16
- package/lib/TaskGraph/index.js +0 -164
- package/lib/TaskGraph/index.less +0 -117
- package/lib/TaskGraph/locale/en-US.d.ts +0 -13
- package/lib/TaskGraph/locale/en-US.js +0 -36
- package/lib/TaskGraph/locale/zh-CN.d.ts +0 -13
- package/lib/TaskGraph/locale/zh-CN.js +0 -36
- package/lib/TaskGraph/locale/zh-TW.d.ts +0 -13
- package/lib/TaskGraph/locale/zh-TW.js +0 -36
- package/lib/TaskGraph/register.d.ts +0 -7
- package/lib/TaskGraph/register.js +0 -205
- package/lib/Welcome/index.less +0 -185
- package/lib/index.less +0 -1
- package/lib/variable.less +0 -54
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
3
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
4
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
5
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
+
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."); }
|
|
7
|
+
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); }
|
|
8
|
+
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; }
|
|
9
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
10
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
+
import { useRef, useCallback, useState, useMemo, useEffect } from 'react';
|
|
12
|
+
import dayjs from 'dayjs';
|
|
13
|
+
import 'dayjs/locale/en';
|
|
14
|
+
import 'dayjs/locale/zh-cn';
|
|
15
|
+
import moment from 'moment';
|
|
16
|
+
// 常量
|
|
17
|
+
var RANGE_SEPARATORS = [' ~ ', '~', ' - ', ' – ', ' — '];
|
|
18
|
+
var TIMEZONE_PATTERN = /(\s*\(?(?:UTC|GMT)[+-]?\d*\)?)\s*$/i;
|
|
19
|
+
|
|
20
|
+
// 格式化日期值,确保使用正确的 locale
|
|
21
|
+
var formatDateValue = function formatDateValue(date, formatStr, isMoment, isCn) {
|
|
22
|
+
if (!date) return '';
|
|
23
|
+
var locale = isCn ? 'zh-cn' : 'en';
|
|
24
|
+
if (isMoment || moment.isMoment(date)) {
|
|
25
|
+
return date.locale(locale).format(formatStr);
|
|
26
|
+
} else {
|
|
27
|
+
var dayjsInstance = dayjs.isDayjs(date) ? date : dayjs(date);
|
|
28
|
+
return dayjsInstance.locale(locale).format(formatStr);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
// 解析粘贴文本,提取开始和结束时间字符串
|
|
33
|
+
var parsePastedText = function parsePastedText(text) {
|
|
34
|
+
for (var _i = 0, _RANGE_SEPARATORS = RANGE_SEPARATORS; _i < _RANGE_SEPARATORS.length; _i++) {
|
|
35
|
+
var sep = _RANGE_SEPARATORS[_i];
|
|
36
|
+
if (text.includes(sep)) {
|
|
37
|
+
var parts = text.split(sep);
|
|
38
|
+
if (parts.length === 2) {
|
|
39
|
+
return [parts[0].trim(), parts[1].trim()];
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
// 如果没有找到分隔符,使用整个文本作为开始和结束时间
|
|
44
|
+
return [text, text];
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
// 解析日期字符串
|
|
48
|
+
var parseDateString = function parseDateString(dateStr, formatStr, isMoment) {
|
|
49
|
+
var strictParsed = isMoment ? moment(dateStr, formatStr, true) : dayjs(dateStr, formatStr, true);
|
|
50
|
+
|
|
51
|
+
// 如果严格解析失败,尝试宽松解析
|
|
52
|
+
if (strictParsed.isValid()) {
|
|
53
|
+
return strictParsed;
|
|
54
|
+
}
|
|
55
|
+
return isMoment ? moment(dateStr) : dayjs(dateStr);
|
|
56
|
+
};
|
|
57
|
+
export var useSegmentedInput = function useSegmentedInput(options) {
|
|
58
|
+
var value = options.value,
|
|
59
|
+
onChange = options.onChange,
|
|
60
|
+
format = options.format,
|
|
61
|
+
baseFormat = options.baseFormat,
|
|
62
|
+
_options$isMoment = options.isMoment,
|
|
63
|
+
isMoment = _options$isMoment === void 0 ? false : _options$isMoment,
|
|
64
|
+
_options$isCn = options.isCn,
|
|
65
|
+
isCn = _options$isCn === void 0 ? true : _options$isCn,
|
|
66
|
+
onClick = options.onClick,
|
|
67
|
+
_options$open = options.open,
|
|
68
|
+
open = _options$open === void 0 ? false : _options$open;
|
|
69
|
+
var inputRef = useRef(null);
|
|
70
|
+
var _useState = useState(false),
|
|
71
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
72
|
+
isEditing = _useState2[0],
|
|
73
|
+
setIsEditing = _useState2[1];
|
|
74
|
+
// 粘贴值:仅作为预览,只有确认后才触发 onChange
|
|
75
|
+
var _useState3 = useState(null),
|
|
76
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
77
|
+
pastedValue = _useState4[0],
|
|
78
|
+
setPastedValue = _useState4[1];
|
|
79
|
+
|
|
80
|
+
// 根据语言环境设置分隔符
|
|
81
|
+
var rangeSeparator = useMemo(function () {
|
|
82
|
+
return isCn ? ' ~ ' : ' - ';
|
|
83
|
+
}, [isCn]);
|
|
84
|
+
|
|
85
|
+
// 显示值:有粘贴值时显示粘贴值(预览),否则显示原始 value
|
|
86
|
+
var _useState5 = useState(''),
|
|
87
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
88
|
+
displayValue = _useState6[0],
|
|
89
|
+
setDisplayValue = _useState6[1];
|
|
90
|
+
|
|
91
|
+
// 同步更新显示值
|
|
92
|
+
useEffect(function () {
|
|
93
|
+
var displayDate = pastedValue || value;
|
|
94
|
+
var startDate = displayDate === null || displayDate === void 0 ? void 0 : displayDate[0];
|
|
95
|
+
var endDate = displayDate === null || displayDate === void 0 ? void 0 : displayDate[1];
|
|
96
|
+
var startValue = formatDateValue(startDate, baseFormat, isMoment, isCn);
|
|
97
|
+
var endValue = formatDateValue(endDate, format, isMoment, isCn);
|
|
98
|
+
if (!startValue && !endValue) {
|
|
99
|
+
setDisplayValue('');
|
|
100
|
+
} else {
|
|
101
|
+
setDisplayValue("".concat(startValue).concat(rangeSeparator).concat(endValue));
|
|
102
|
+
}
|
|
103
|
+
}, [pastedValue, value, baseFormat, format, rangeSeparator, isMoment, isCn]);
|
|
104
|
+
|
|
105
|
+
// 当 value 更新为 pastedValue 时,清除 pastedValue(说明确定按钮已生效)
|
|
106
|
+
useEffect(function () {
|
|
107
|
+
if (pastedValue && value) {
|
|
108
|
+
var _pastedValue$, _value$, _pastedValue$2, _value$2;
|
|
109
|
+
var isSameAsPasted = ((_pastedValue$ = pastedValue[0]) === null || _pastedValue$ === void 0 ? void 0 : _pastedValue$.valueOf()) === ((_value$ = value[0]) === null || _value$ === void 0 ? void 0 : _value$.valueOf()) && ((_pastedValue$2 = pastedValue[1]) === null || _pastedValue$2 === void 0 ? void 0 : _pastedValue$2.valueOf()) === ((_value$2 = value[1]) === null || _value$2 === void 0 ? void 0 : _value$2.valueOf());
|
|
110
|
+
if (isSameAsPasted) {
|
|
111
|
+
setPastedValue(null);
|
|
112
|
+
setIsEditing(false);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}, [value, pastedValue]);
|
|
116
|
+
|
|
117
|
+
// 确认粘贴:触发 onChange,清除粘贴状态
|
|
118
|
+
var confirmPastedValue = useCallback(function () {
|
|
119
|
+
if (pastedValue) {
|
|
120
|
+
onChange === null || onChange === void 0 || onChange(pastedValue);
|
|
121
|
+
setPastedValue(null);
|
|
122
|
+
setIsEditing(false);
|
|
123
|
+
}
|
|
124
|
+
}, [pastedValue, onChange]);
|
|
125
|
+
|
|
126
|
+
// 取消粘贴:清除粘贴值,回到初始值
|
|
127
|
+
var cancelPastedValue = useCallback(function () {
|
|
128
|
+
var _inputRef$current;
|
|
129
|
+
setPastedValue(null);
|
|
130
|
+
setIsEditing(false);
|
|
131
|
+
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || (_inputRef$current = _inputRef$current.input) === null || _inputRef$current === void 0 || _inputRef$current.blur();
|
|
132
|
+
}, []);
|
|
133
|
+
|
|
134
|
+
// 单击获取焦点
|
|
135
|
+
var handleClick = useCallback(function (e) {
|
|
136
|
+
e.stopPropagation();
|
|
137
|
+
setIsEditing(true);
|
|
138
|
+
// 让 input 获得焦点
|
|
139
|
+
setTimeout(function () {
|
|
140
|
+
var _inputRef$current2;
|
|
141
|
+
(_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 || (_inputRef$current2 = _inputRef$current2.input) === null || _inputRef$current2 === void 0 || _inputRef$current2.focus();
|
|
142
|
+
}, 0);
|
|
143
|
+
onClick === null || onClick === void 0 || onClick();
|
|
144
|
+
}, [onClick]);
|
|
145
|
+
|
|
146
|
+
// 双击获取焦点并全选
|
|
147
|
+
var handleDoubleClick = useCallback(function (e) {
|
|
148
|
+
var _inputRef$current3;
|
|
149
|
+
e.stopPropagation();
|
|
150
|
+
setIsEditing(true);
|
|
151
|
+
(_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 || (_inputRef$current3 = _inputRef$current3.input) === null || _inputRef$current3 === void 0 || _inputRef$current3.select();
|
|
152
|
+
}, []);
|
|
153
|
+
|
|
154
|
+
// 面板打开时,让 input 获得焦点
|
|
155
|
+
useEffect(function () {
|
|
156
|
+
if (open) {
|
|
157
|
+
// 延迟获取焦点,确保面板已渲染
|
|
158
|
+
var timer = setTimeout(function () {
|
|
159
|
+
var _inputRef$current4;
|
|
160
|
+
(_inputRef$current4 = inputRef.current) === null || _inputRef$current4 === void 0 || (_inputRef$current4 = _inputRef$current4.input) === null || _inputRef$current4 === void 0 || _inputRef$current4.focus();
|
|
161
|
+
}, 100);
|
|
162
|
+
return function () {
|
|
163
|
+
return clearTimeout(timer);
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
}, [open]);
|
|
167
|
+
|
|
168
|
+
// 检查焦点是否在面板内(参考 ant-design 的实现)
|
|
169
|
+
var isFocusInPanel = useCallback(function (relatedTarget) {
|
|
170
|
+
if (!relatedTarget) return false;
|
|
171
|
+
var panelElement = document.querySelector('.ant-picker-dropdown, .ant-dropdown, [class*="ranger-picker-panel"]');
|
|
172
|
+
return panelElement ? panelElement.contains(relatedTarget) : false;
|
|
173
|
+
}, []);
|
|
174
|
+
|
|
175
|
+
// 失去焦点处理(如果焦点在面板内,直接返回,不处理)
|
|
176
|
+
var handleBlur = useCallback(function (e) {
|
|
177
|
+
var relatedTarget = e.relatedTarget;
|
|
178
|
+
|
|
179
|
+
// 不强制重新获取焦点,允许用户在面板中的 input 正常编辑
|
|
180
|
+
if (isFocusInPanel(relatedTarget)) {
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// 焦点不在面板内,清除粘贴值
|
|
185
|
+
// 但是,如果 value 已经更新为 pastedValue,说明确定按钮已经生效,不应该清除
|
|
186
|
+
if (pastedValue) {
|
|
187
|
+
var _pastedValue$3, _value$3, _pastedValue$4, _value$4;
|
|
188
|
+
// 检查 value 是否已经更新为 pastedValue
|
|
189
|
+
var isValueUpdated = value && ((_pastedValue$3 = pastedValue[0]) === null || _pastedValue$3 === void 0 ? void 0 : _pastedValue$3.valueOf()) === ((_value$3 = value[0]) === null || _value$3 === void 0 ? void 0 : _value$3.valueOf()) && ((_pastedValue$4 = pastedValue[1]) === null || _pastedValue$4 === void 0 ? void 0 : _pastedValue$4.valueOf()) === ((_value$4 = value[1]) === null || _value$4 === void 0 ? void 0 : _value$4.valueOf());
|
|
190
|
+
|
|
191
|
+
// 只有当 value 还没有更新为 pastedValue 时,才清除 pastedValue
|
|
192
|
+
// 这样可以避免在确定按钮点击后,失去焦点时清除已确认的值
|
|
193
|
+
if (!isValueUpdated) {
|
|
194
|
+
setPastedValue(null);
|
|
195
|
+
setIsEditing(false);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}, [isFocusInPanel, pastedValue, value]);
|
|
199
|
+
|
|
200
|
+
// 解析粘贴文本并设置预览值
|
|
201
|
+
var processPaste = useCallback( /*#__PURE__*/function () {
|
|
202
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(pastedText) {
|
|
203
|
+
var _parsePastedText, _parsePastedText2, startStr, endStr, formatWithoutTimezone, parsedStart, parsedEnd;
|
|
204
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
205
|
+
while (1) switch (_context.prev = _context.next) {
|
|
206
|
+
case 0:
|
|
207
|
+
if (pastedText.trim()) {
|
|
208
|
+
_context.next = 2;
|
|
209
|
+
break;
|
|
210
|
+
}
|
|
211
|
+
return _context.abrupt("return");
|
|
212
|
+
case 2:
|
|
213
|
+
_parsePastedText = parsePastedText(pastedText.trim()), _parsePastedText2 = _slicedToArray(_parsePastedText, 2), startStr = _parsePastedText2[0], endStr = _parsePastedText2[1];
|
|
214
|
+
formatWithoutTimezone = format.replace(TIMEZONE_PATTERN, '');
|
|
215
|
+
parsedStart = parseDateString(startStr, baseFormat, isMoment);
|
|
216
|
+
parsedEnd = parseDateString(endStr, formatWithoutTimezone, isMoment);
|
|
217
|
+
if (parsedStart.isValid() && parsedEnd.isValid()) {
|
|
218
|
+
setPastedValue([parsedStart, parsedEnd]);
|
|
219
|
+
setIsEditing(true);
|
|
220
|
+
}
|
|
221
|
+
case 7:
|
|
222
|
+
case "end":
|
|
223
|
+
return _context.stop();
|
|
224
|
+
}
|
|
225
|
+
}, _callee);
|
|
226
|
+
}));
|
|
227
|
+
return function (_x) {
|
|
228
|
+
return _ref.apply(this, arguments);
|
|
229
|
+
};
|
|
230
|
+
}(), [isMoment, format, baseFormat]);
|
|
231
|
+
|
|
232
|
+
// 键盘事件:Ctrl+V 粘贴,Enter 确认,Escape 取消
|
|
233
|
+
var handleKeyDown = useCallback( /*#__PURE__*/function () {
|
|
234
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(e) {
|
|
235
|
+
var text;
|
|
236
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
237
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
238
|
+
case 0:
|
|
239
|
+
if (!((e.ctrlKey || e.metaKey) && e.key === 'v')) {
|
|
240
|
+
_context2.next = 14;
|
|
241
|
+
break;
|
|
242
|
+
}
|
|
243
|
+
e.preventDefault();
|
|
244
|
+
_context2.prev = 2;
|
|
245
|
+
_context2.next = 5;
|
|
246
|
+
return navigator.clipboard.readText();
|
|
247
|
+
case 5:
|
|
248
|
+
text = _context2.sent;
|
|
249
|
+
_context2.next = 8;
|
|
250
|
+
return processPaste(text);
|
|
251
|
+
case 8:
|
|
252
|
+
_context2.next = 13;
|
|
253
|
+
break;
|
|
254
|
+
case 10:
|
|
255
|
+
_context2.prev = 10;
|
|
256
|
+
_context2.t0 = _context2["catch"](2);
|
|
257
|
+
console.warn('Failed to read clipboard:', _context2.t0);
|
|
258
|
+
case 13:
|
|
259
|
+
return _context2.abrupt("return");
|
|
260
|
+
case 14:
|
|
261
|
+
if (pastedValue) {
|
|
262
|
+
_context2.next = 16;
|
|
263
|
+
break;
|
|
264
|
+
}
|
|
265
|
+
return _context2.abrupt("return");
|
|
266
|
+
case 16:
|
|
267
|
+
// Enter 确认粘贴
|
|
268
|
+
if (e.key === 'Enter') {
|
|
269
|
+
e.preventDefault();
|
|
270
|
+
confirmPastedValue();
|
|
271
|
+
}
|
|
272
|
+
// Escape 取消粘贴
|
|
273
|
+
else if (e.key === 'Escape') {
|
|
274
|
+
e.preventDefault();
|
|
275
|
+
cancelPastedValue();
|
|
276
|
+
}
|
|
277
|
+
case 17:
|
|
278
|
+
case "end":
|
|
279
|
+
return _context2.stop();
|
|
280
|
+
}
|
|
281
|
+
}, _callee2, null, [[2, 10]]);
|
|
282
|
+
}));
|
|
283
|
+
return function (_x2) {
|
|
284
|
+
return _ref2.apply(this, arguments);
|
|
285
|
+
};
|
|
286
|
+
}(), [pastedValue, confirmPastedValue, cancelPastedValue, processPaste]);
|
|
287
|
+
// 获取粘贴值
|
|
288
|
+
var getPastedValue = useCallback(function () {
|
|
289
|
+
return pastedValue;
|
|
290
|
+
}, [pastedValue]);
|
|
291
|
+
return {
|
|
292
|
+
inputRef: inputRef,
|
|
293
|
+
isEditing: isEditing,
|
|
294
|
+
displayValue: displayValue,
|
|
295
|
+
handleClick: handleClick,
|
|
296
|
+
handleDoubleClick: handleDoubleClick,
|
|
297
|
+
handleBlur: handleBlur,
|
|
298
|
+
handleKeyDown: handleKeyDown,
|
|
299
|
+
confirmPastedValue: confirmPastedValue,
|
|
300
|
+
hasPastedValue: !!pastedValue,
|
|
301
|
+
getPastedValue: getPastedValue
|
|
302
|
+
};
|
|
303
|
+
};
|
|
304
|
+
export default useSegmentedInput;
|
package/es/DateRanger/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { LAST_1_DAY, LAST_3_DAYS, LAST_7_DAYS, LAST_30_DAYS, LAST_MONTH, LAST_WEEK, LAST_YEAR, NEAR_10_MINUTES, NEAR_12_HOURS, NEAR_1_HOURS, NEAR_1_MINUTES, NEAR_20_MINUTES, NEAR_2_HOURS, NEAR_30_MINUTES, NEAR_3_HOURS, NEAR_5_MINUTES, NEAR_6_HOURS, NEXT_YEAR, THIS_MONTH, THIS_WEEK, THIS_YEAR, TODAY, YESTERDAY } from "./constant";
|
|
2
3
|
import InternalDateRanger from "./Ranger";
|
|
3
4
|
export * from "./Ranger";
|
|
@@ -16,5 +16,7 @@ export default _objectSpread({
|
|
|
16
16
|
confirm: 'Confirm',
|
|
17
17
|
current: 'Current',
|
|
18
18
|
jumpBack: 'Previous Interval',
|
|
19
|
-
jumpForward: 'Next Interval'
|
|
19
|
+
jumpForward: 'Next Interval',
|
|
20
|
+
syncToCurrent: 'Sync to current time',
|
|
21
|
+
zoomOutRange: 'Expand time range'
|
|
20
22
|
}, en_US);
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
locale: string;
|
|
3
|
+
dateFormat?: string;
|
|
4
|
+
dateTimeFormat?: string;
|
|
5
|
+
fieldDateTimeFormat?: string;
|
|
6
|
+
fieldDateFormat?: string;
|
|
7
|
+
fieldTimeFormat?: string;
|
|
8
|
+
fieldMonthFormat?: string;
|
|
9
|
+
fieldYearFormat?: string;
|
|
10
|
+
fieldWeekFormat?: string;
|
|
11
|
+
fieldQuarterFormat?: string;
|
|
12
|
+
monthBeforeYear?: boolean;
|
|
13
|
+
yearFormat?: string;
|
|
14
|
+
monthFormat?: string;
|
|
15
|
+
cellYearFormat?: string;
|
|
16
|
+
cellQuarterFormat?: string;
|
|
17
|
+
dayFormat?: string;
|
|
18
|
+
cellDateFormat?: string;
|
|
19
|
+
cellMeridiemFormat?: string;
|
|
20
|
+
today: string;
|
|
21
|
+
now: string;
|
|
22
|
+
backToToday: string;
|
|
23
|
+
ok: string;
|
|
24
|
+
timeSelect: string;
|
|
25
|
+
dateSelect: string;
|
|
26
|
+
weekSelect?: string;
|
|
27
|
+
clear: string;
|
|
28
|
+
week: string;
|
|
29
|
+
month: string;
|
|
30
|
+
year: string;
|
|
31
|
+
previousMonth: string;
|
|
32
|
+
nextMonth: string;
|
|
33
|
+
monthSelect: string;
|
|
34
|
+
yearSelect: string;
|
|
35
|
+
decadeSelect: string;
|
|
36
|
+
previousYear: string;
|
|
37
|
+
nextYear: string;
|
|
38
|
+
previousDecade: string;
|
|
39
|
+
nextDecade: string;
|
|
40
|
+
previousCentury: string;
|
|
41
|
+
nextCentury: string;
|
|
42
|
+
shortWeekDays?: string[];
|
|
43
|
+
shortMonths?: string[];
|
|
44
|
+
customize: string;
|
|
45
|
+
customTime: string;
|
|
46
|
+
startDate: string;
|
|
47
|
+
startTime: string;
|
|
48
|
+
endDate: string;
|
|
49
|
+
endTime: string;
|
|
50
|
+
cancel: string;
|
|
51
|
+
confirm: string;
|
|
52
|
+
current: string;
|
|
53
|
+
jumpBack: string;
|
|
54
|
+
jumpForward: string;
|
|
55
|
+
syncToCurrent: string;
|
|
56
|
+
zoomOutRange: string;
|
|
57
|
+
};
|
|
58
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
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(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
import ja_JP from 'rc-picker/es/locale/ja_JP';
|
|
8
|
+
export default _objectSpread({
|
|
9
|
+
customize: 'カスタム',
|
|
10
|
+
customTime: 'カスタム時間',
|
|
11
|
+
startDate: '開始日',
|
|
12
|
+
startTime: '開始時刻',
|
|
13
|
+
endDate: '終了日',
|
|
14
|
+
endTime: '終了時刻',
|
|
15
|
+
cancel: 'キャンセル',
|
|
16
|
+
confirm: 'OK',
|
|
17
|
+
current: '現在',
|
|
18
|
+
jumpBack: '前の期間へ',
|
|
19
|
+
jumpForward: '次の期間へ',
|
|
20
|
+
syncToCurrent: '現在時刻に同期',
|
|
21
|
+
zoomOutRange: '時間範囲を拡大'
|
|
22
|
+
}, ja_JP);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { GenerateStyle } from '@oceanbase/design/es/theme';
|
|
3
|
+
import type { OBToken } from '../../_util/genComponentStyleHook';
|
|
4
|
+
export type DateRangerToken = OBToken;
|
|
5
|
+
export declare const genDateRangerStyle: GenerateStyle<DateRangerToken>;
|
|
6
|
+
declare const _default: (prefixCls: string) => {
|
|
7
|
+
wrapSSR: (node: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) => import("react").JSX.Element;
|
|
8
|
+
hashId: string;
|
|
9
|
+
};
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
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; }
|
|
3
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
4
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
5
|
+
import { genComponentStyleHook } from "../../_util/genComponentStyleHook";
|
|
6
|
+
export var genDateRangerStyle = function genDateRangerStyle(token) {
|
|
7
|
+
var _ref;
|
|
8
|
+
var componentCls = token.componentCls,
|
|
9
|
+
antCls = token.antCls,
|
|
10
|
+
colorBgContainer = token.colorBgContainer,
|
|
11
|
+
colorBorder = token.colorBorder,
|
|
12
|
+
borderRadius = token.borderRadius,
|
|
13
|
+
colorTextSecondary = token.colorTextSecondary,
|
|
14
|
+
colorFillSecondary = token.colorFillSecondary,
|
|
15
|
+
colorFill = token.colorFill;
|
|
16
|
+
return _ref = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_ref, "".concat(componentCls), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
17
|
+
cursor: 'pointer'
|
|
18
|
+
}, "".concat(componentCls, "-wrapper"), _defineProperty(_defineProperty({
|
|
19
|
+
backgroundColor: colorBgContainer,
|
|
20
|
+
border: "1px solid ".concat(colorBorder),
|
|
21
|
+
boxSizing: 'border-box',
|
|
22
|
+
display: 'flex',
|
|
23
|
+
borderRadius: borderRadius,
|
|
24
|
+
transition: 'all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1)'
|
|
25
|
+
}, "".concat(componentCls, "-picker"), _defineProperty(_defineProperty({
|
|
26
|
+
paddingLeft: 0,
|
|
27
|
+
paddingRight: 16,
|
|
28
|
+
border: 0,
|
|
29
|
+
'&:focus, &:focus-within': {
|
|
30
|
+
boxShadow: 'none'
|
|
31
|
+
},
|
|
32
|
+
input: {
|
|
33
|
+
textAlign: 'center'
|
|
34
|
+
}
|
|
35
|
+
}, "".concat(antCls, "-picker-active-bar"), {
|
|
36
|
+
height: 0
|
|
37
|
+
}), "".concat(antCls, "-picker-input > input"), {
|
|
38
|
+
cursor: 'pointer'
|
|
39
|
+
})), '&:hover', {
|
|
40
|
+
borderColor: token.gray7
|
|
41
|
+
})), "".concat(componentCls, "-wrapper-has-jumper"), {
|
|
42
|
+
borderTopRightRadius: 0,
|
|
43
|
+
borderBottomRightRadius: 0
|
|
44
|
+
}), "".concat(componentCls, "-play"), {
|
|
45
|
+
padding: '3px 11px 3px'
|
|
46
|
+
}), "".concat(componentCls, "-picker-input"), {
|
|
47
|
+
maxWidth: 125
|
|
48
|
+
}), "".concat(componentCls, "-date-picker"), _defineProperty(_defineProperty({}, "".concat(antCls, "-select-selector"), {
|
|
49
|
+
borderTopLeftRadius: 0,
|
|
50
|
+
borderBottomLeftRadius: 0,
|
|
51
|
+
'&:hover': {
|
|
52
|
+
zIndex: 1
|
|
53
|
+
}
|
|
54
|
+
}), "".concat(antCls, "-select-arrow"), {
|
|
55
|
+
zIndex: 1
|
|
56
|
+
}))), "".concat(componentCls, "-dropdown-picker"), _defineProperty(_defineProperty({
|
|
57
|
+
display: 'flex',
|
|
58
|
+
padding: 4,
|
|
59
|
+
gap: 4,
|
|
60
|
+
backgroundColor: colorBgContainer,
|
|
61
|
+
backgroundClip: 'padding-box',
|
|
62
|
+
borderRadius: token.borderRadiusMD,
|
|
63
|
+
outline: 'none',
|
|
64
|
+
boxShadow: '0 6px 16px 0 rgba(54, 69, 99, 0.08), 0 3px 6px -4px rgba(54, 69, 99, 0.12), 0 9px 28px 8px rgba(54, 69, 99, 0.05)'
|
|
65
|
+
}, "".concat(antCls, "-dropdown-menu"), {
|
|
66
|
+
padding: 0,
|
|
67
|
+
boxShadow: 'none !important'
|
|
68
|
+
}), "".concat(antCls, "-picker-time-panel-container"), _defineProperty({}, "".concat(antCls, "-picker-content"), {
|
|
69
|
+
height: 148
|
|
70
|
+
}))), "".concat(componentCls, "-show-range"), _defineProperty(_defineProperty({}, "".concat(componentCls, "-quick-picker.").concat(componentCls, "-quick-picker-select"), _defineProperty(_defineProperty({
|
|
71
|
+
marginRight: -1
|
|
72
|
+
}, "".concat(antCls, "-select-selector"), {
|
|
73
|
+
borderTopRightRadius: 0,
|
|
74
|
+
borderBottomRightRadius: 0,
|
|
75
|
+
'&:hover': {
|
|
76
|
+
zIndex: 1
|
|
77
|
+
}
|
|
78
|
+
}), "".concat(antCls, "-select-arrow"), {
|
|
79
|
+
zIndex: 1
|
|
80
|
+
})), "".concat(componentCls, "-playback-control"), _defineProperty({
|
|
81
|
+
display: 'flex',
|
|
82
|
+
flexWrap: 'nowrap'
|
|
83
|
+
}, "".concat(antCls, "-radio-button-wrapper"), {
|
|
84
|
+
paddingInline: 8,
|
|
85
|
+
color: colorTextSecondary,
|
|
86
|
+
transition: 'all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1)',
|
|
87
|
+
'&:hover': {
|
|
88
|
+
borderColor: token.gray7,
|
|
89
|
+
zIndex: 1,
|
|
90
|
+
'&::before': {
|
|
91
|
+
backgroundColor: token.gray7
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}))), "".concat(componentCls, "-label"), {
|
|
95
|
+
fontSize: token.fontSizeSM,
|
|
96
|
+
lineHeight: token.lineHeightSM,
|
|
97
|
+
backgroundColor: colorFillSecondary,
|
|
98
|
+
color: colorTextSecondary,
|
|
99
|
+
display: 'inline-block',
|
|
100
|
+
width: 52,
|
|
101
|
+
borderRadius: token.borderRadiusSM,
|
|
102
|
+
textAlign: 'center'
|
|
103
|
+
}), "".concat(componentCls, "-dashed"), _defineProperty(_defineProperty({}, "".concat(componentCls, "-wrapper"), {
|
|
104
|
+
borderStyle: 'dashed'
|
|
105
|
+
}), "".concat(componentCls, "-playback-control"), _defineProperty({}, "".concat(antCls, "-radio-button-wrapper"), {
|
|
106
|
+
borderStyle: 'dashed',
|
|
107
|
+
'&::before': {
|
|
108
|
+
borderStyle: 'dashed'
|
|
109
|
+
}
|
|
110
|
+
}))), "".concat(componentCls, "-back-radio-focused"), _defineProperty(_defineProperty({}, "".concat(componentCls, "-wrapper"), {
|
|
111
|
+
borderRightColor: token.gray7
|
|
112
|
+
}), "".concat(componentCls, "-playback-control"), _defineProperty({}, "".concat(antCls, "-radio-button-wrapper:first-child"), _defineProperty({}, "+ ".concat(antCls, "-radio-button-wrapper::before"), {
|
|
113
|
+
backgroundColor: token.gray7
|
|
114
|
+
})))), "".concat(componentCls, "-history-menu-item"), _defineProperty(_defineProperty({}, "".concat(componentCls, "-menu-text-btn-wrapper"), {
|
|
115
|
+
justifyContent: 'space-between',
|
|
116
|
+
height: 0,
|
|
117
|
+
transition: 'height 0.2s',
|
|
118
|
+
overflow: 'hidden'
|
|
119
|
+
}), '&:hover', _defineProperty({}, "".concat(componentCls, "-menu-text-btn-wrapper"), {
|
|
120
|
+
height: 22
|
|
121
|
+
}))), "".concat(componentCls, "-menu-text-btn"), {
|
|
122
|
+
width: 72,
|
|
123
|
+
backgroundColor: "".concat(colorFillSecondary, " !important"),
|
|
124
|
+
'&:hover': {
|
|
125
|
+
backgroundColor: "".concat(colorFill, " !important")
|
|
126
|
+
}
|
|
127
|
+
}), "".concat(componentCls, "-editable-wrapper"), {
|
|
128
|
+
display: 'inline-flex',
|
|
129
|
+
alignItems: 'center'
|
|
130
|
+
}), "".concat(componentCls, "-range-editable"), {
|
|
131
|
+
position: 'relative',
|
|
132
|
+
display: 'inline-flex',
|
|
133
|
+
alignItems: 'center',
|
|
134
|
+
cursor: 'text',
|
|
135
|
+
'&-disabled': {
|
|
136
|
+
cursor: 'not-allowed',
|
|
137
|
+
opacity: 0.6
|
|
138
|
+
}
|
|
139
|
+
}), _defineProperty(_defineProperty(_ref, "".concat(componentCls, "-range-editable-sizer"), {
|
|
140
|
+
position: 'absolute',
|
|
141
|
+
top: 0,
|
|
142
|
+
left: 0,
|
|
143
|
+
height: 0,
|
|
144
|
+
overflow: 'hidden',
|
|
145
|
+
whiteSpace: 'pre',
|
|
146
|
+
visibility: 'hidden',
|
|
147
|
+
pointerEvents: 'none'
|
|
148
|
+
}), "".concat(componentCls, "-range-editable-input"), {
|
|
149
|
+
minWidth: 80,
|
|
150
|
+
maxWidth: '100%',
|
|
151
|
+
cursor: 'text',
|
|
152
|
+
caretColor: 'transparent',
|
|
153
|
+
fontVariantNumeric: 'tabular-nums',
|
|
154
|
+
'&:focus, &:focus-within': _defineProperty({}, "".concat(antCls, "-input"), {
|
|
155
|
+
caretColor: token.colorPrimary
|
|
156
|
+
})
|
|
157
|
+
});
|
|
158
|
+
};
|
|
159
|
+
export default (function (prefixCls) {
|
|
160
|
+
var useStyle = genComponentStyleHook('DateRanger', function (token) {
|
|
161
|
+
return [genDateRangerStyle(token)];
|
|
162
|
+
});
|
|
163
|
+
return useStyle(prefixCls);
|
|
164
|
+
});
|
package/es/Dialog/Anchor.d.ts
CHANGED
|
@@ -6,14 +6,6 @@ export interface IAnchorProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
6
6
|
onMove?: (event: PointerEvent) => void;
|
|
7
7
|
onEnd?: (event: PointerEvent) => void;
|
|
8
8
|
dock?: IDockProps;
|
|
9
|
+
prefixCls?: string;
|
|
9
10
|
}
|
|
10
|
-
export declare
|
|
11
|
-
isPointDown: boolean;
|
|
12
|
-
originBodyStyle: string | null;
|
|
13
|
-
clientX: number;
|
|
14
|
-
clientY: number;
|
|
15
|
-
onDragStart: (event: PointerEvent) => void;
|
|
16
|
-
onDragMove: (event: PointerEvent) => void;
|
|
17
|
-
onDragEnd: (event: PointerEvent) => void;
|
|
18
|
-
render(): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
19
|
-
}
|
|
11
|
+
export declare const Anchor: React.FC<IAnchorProps>;
|