@blocklet/ui-react 2.13.70 → 3.0.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/lib/@types/index.js +5 -18
- package/lib/BlockletStudio/index.js +75 -89
- package/lib/ComponentInstaller/index.js +153 -190
- package/lib/ComponentInstaller/installer-item.js +56 -55
- package/lib/ComponentInstaller/locales.js +19 -18
- package/lib/ComponentInstaller/use-component-installed.js +49 -80
- package/lib/ComponentManager/components/add-component.js +68 -89
- package/lib/ComponentManager/components/check-component.js +4 -2
- package/lib/ComponentManager/components/publish-component.js +48 -57
- package/lib/ComponentManager/components/resource-dialog.js +41 -55
- package/lib/ComponentManager/index.js +8 -3
- package/lib/ComponentManager/libs/locales.js +8 -5
- package/lib/Dashboard/index.js +88 -124
- package/lib/Footer/brand.js +25 -28
- package/lib/Footer/copyright.js +15 -16
- package/lib/Footer/index.js +55 -65
- package/lib/Footer/internal-footer.js +93 -95
- package/lib/Footer/layout/plain.js +26 -24
- package/lib/Footer/layout/row.js +16 -20
- package/lib/Footer/layout/standard.js +73 -59
- package/lib/Footer/links.js +100 -120
- package/lib/Footer/social-media.js +28 -33
- package/lib/Header/index.js +108 -130
- package/lib/Icon/index.js +43 -59
- package/lib/Notifications/Snackbar.js +114 -151
- package/lib/Notifications/hooks/use-title.js +85 -126
- package/lib/Notifications/hooks/use-width.js +10 -9
- package/lib/Notifications/utils.js +74 -114
- package/lib/UserCenter/components/config-inviter.js +21 -31
- package/lib/UserCenter/components/config-profile.js +41 -47
- package/lib/UserCenter/components/danger-zone.js +88 -93
- package/lib/UserCenter/components/editable-field.js +149 -167
- package/lib/UserCenter/components/nft.js +90 -66
- package/lib/UserCenter/components/notification.js +206 -195
- package/lib/UserCenter/components/passport.js +37 -53
- package/lib/UserCenter/components/privacy.js +53 -64
- package/lib/UserCenter/components/settings.js +117 -128
- package/lib/UserCenter/components/status-dialog/date-picker.js +35 -36
- package/lib/UserCenter/components/status-dialog/index.js +132 -144
- package/lib/UserCenter/components/status-selector/duration-menu.js +53 -48
- package/lib/UserCenter/components/status-selector/index.js +37 -36
- package/lib/UserCenter/components/status-selector/menu-item.js +13 -9
- package/lib/UserCenter/components/storage/action.js +27 -25
- package/lib/UserCenter/components/storage/connected.js +59 -30
- package/lib/UserCenter/components/storage/delete.js +32 -39
- package/lib/UserCenter/components/storage/disconnect.js +43 -25
- package/lib/UserCenter/components/storage/icons/empty-spaces-nft.svg.js +7 -0
- package/lib/UserCenter/components/storage/index.js +24 -18
- package/lib/UserCenter/components/storage/preview-nft.js +35 -36
- package/lib/UserCenter/components/third-party-login/index.js +73 -143
- package/lib/UserCenter/components/third-party-login/third-party-item.js +132 -153
- package/lib/UserCenter/components/user-center.js +345 -461
- package/lib/UserCenter/components/user-info/address.js +120 -100
- package/lib/UserCenter/components/user-info/index.js +10 -4
- package/lib/UserCenter/components/user-info/link-preview-input.js +159 -156
- package/lib/UserCenter/components/user-info/metadata.js +291 -385
- package/lib/UserCenter/components/user-info/switch-role.js +24 -18
- package/lib/UserCenter/components/user-info/timezone-select.js +37 -45
- package/lib/UserCenter/components/user-info/user-basic-info.js +213 -207
- package/lib/UserCenter/components/user-info/user-info-item.js +39 -26
- package/lib/UserCenter/components/user-info/user-info.js +52 -67
- package/lib/UserCenter/components/user-info/user-status.js +111 -154
- package/lib/UserCenter/components/user-info/utils.js +52 -93
- package/lib/UserCenter/components/webhook-item.js +95 -143
- package/lib/UserCenter/index.js +4 -1
- package/lib/UserCenter/libs/locales.js +132 -129
- package/lib/UserCenter/libs/utils.js +17 -22
- package/lib/UserSessions/components/user-session-info.js +30 -26
- package/lib/UserSessions/components/user-sessions.js +222 -268
- package/lib/UserSessions/index.js +4 -1
- package/lib/UserSessions/libs/locales.js +31 -28
- package/lib/UserSessions/libs/utils.js +30 -56
- package/lib/blocklets.js +75 -156
- package/lib/common/domain-warning.js +64 -104
- package/lib/common/header-addons.js +59 -80
- package/lib/common/link-blocker.js +10 -16
- package/lib/common/notification-addon.js +56 -89
- package/lib/common/overridable-theme-provider.js +12 -12
- package/lib/common/wallet-hidden-topbar.js +11 -13
- package/lib/common/ws.js +23 -34
- package/lib/contexts/config-user-space.js +34 -43
- package/lib/hooks/use-mobile.js +7 -4
- package/lib/index.js +25 -10
- package/lib/libs/client.js +5 -2
- package/lib/libs/constant.js +4 -1
- package/lib/libs/spaces.js +11 -11
- package/lib/libs/with-hide-when-embed.js +13 -15
- package/lib/packages/blocklet-ui-react/build.config.d.ts +2 -0
- package/lib/packages/blocklet-ui-react/jest.config.d.ts +8 -0
- package/lib/packages/blocklet-ui-react/lib/@types/index.d.ts +3 -0
- package/lib/packages/blocklet-ui-react/lib/BlockletStudio/index.d.ts +26 -0
- package/lib/packages/blocklet-ui-react/lib/ComponentInstaller/index.d.ts +18 -0
- package/lib/packages/blocklet-ui-react/lib/ComponentInstaller/installer-item.d.ts +18 -0
- package/lib/packages/blocklet-ui-react/lib/ComponentInstaller/locales.d.ts +28 -0
- package/lib/packages/blocklet-ui-react/lib/ComponentInstaller/use-component-installed.d.ts +12 -0
- package/lib/packages/blocklet-ui-react/lib/ComponentManager/components/add-component.d.ts +13 -0
- package/lib/packages/blocklet-ui-react/lib/ComponentManager/components/check-component.d.ts +2 -0
- package/lib/packages/blocklet-ui-react/lib/ComponentManager/components/publish-component.d.ts +7 -0
- package/lib/packages/blocklet-ui-react/lib/ComponentManager/components/resource-dialog.d.ts +11 -0
- package/lib/packages/blocklet-ui-react/lib/ComponentManager/index.d.ts +4 -0
- package/lib/packages/blocklet-ui-react/lib/ComponentManager/libs/locales.d.ts +19 -0
- package/lib/packages/blocklet-ui-react/lib/Dashboard/index.d.ts +27 -0
- package/lib/packages/blocklet-ui-react/lib/Footer/brand.d.ts +15 -0
- package/lib/packages/blocklet-ui-react/lib/Footer/copyright.d.ts +13 -0
- package/lib/packages/blocklet-ui-react/lib/Footer/index.d.ts +2 -0
- package/lib/packages/blocklet-ui-react/lib/Footer/internal-footer.d.ts +29 -0
- package/lib/packages/blocklet-ui-react/lib/Footer/layout/plain.d.ts +19 -0
- package/lib/packages/blocklet-ui-react/lib/Footer/layout/row.d.ts +13 -0
- package/lib/packages/blocklet-ui-react/lib/Footer/layout/standard.d.ts +21 -0
- package/lib/packages/blocklet-ui-react/lib/Footer/links.d.ts +20 -0
- package/lib/packages/blocklet-ui-react/lib/Footer/social-media.d.ts +14 -0
- package/lib/packages/blocklet-ui-react/lib/Header/index.d.ts +2 -0
- package/lib/packages/blocklet-ui-react/lib/Icon/index.d.ts +7 -0
- package/lib/packages/blocklet-ui-react/lib/Notifications/Snackbar.d.ts +8 -0
- package/lib/packages/blocklet-ui-react/lib/Notifications/hooks/use-title.d.ts +9 -0
- package/lib/packages/blocklet-ui-react/lib/Notifications/hooks/use-width.d.ts +2 -0
- package/lib/packages/blocklet-ui-react/lib/Notifications/utils.d.ts +10 -0
- package/lib/packages/blocklet-ui-react/lib/UserCenter/components/config-inviter.d.ts +4 -0
- package/lib/packages/blocklet-ui-react/lib/UserCenter/components/config-profile.d.ts +5 -0
- package/lib/packages/blocklet-ui-react/lib/UserCenter/components/danger-zone.d.ts +2 -0
- package/lib/packages/blocklet-ui-react/lib/UserCenter/components/editable-field.d.ts +50 -0
- package/lib/packages/blocklet-ui-react/lib/UserCenter/components/nft.d.ts +4 -0
- package/lib/packages/blocklet-ui-react/lib/UserCenter/components/notification.d.ts +5 -0
- package/lib/packages/blocklet-ui-react/lib/UserCenter/components/passport.d.ts +5 -0
- package/lib/packages/blocklet-ui-react/lib/UserCenter/components/privacy.d.ts +5 -0
- package/lib/packages/blocklet-ui-react/lib/UserCenter/components/settings.d.ts +8 -0
- package/lib/packages/blocklet-ui-react/lib/UserCenter/components/status-dialog/date-picker.d.ts +9 -0
- package/lib/packages/blocklet-ui-react/lib/UserCenter/components/status-dialog/index.d.ts +9 -0
- package/lib/packages/blocklet-ui-react/lib/UserCenter/components/status-selector/duration-menu.d.ts +7 -0
- package/lib/packages/blocklet-ui-react/lib/UserCenter/components/status-selector/index.d.ts +8 -0
- package/lib/packages/blocklet-ui-react/lib/UserCenter/components/status-selector/menu-item.d.ts +9 -0
- package/lib/packages/blocklet-ui-react/lib/UserCenter/components/storage/action.d.ts +7 -0
- package/lib/packages/blocklet-ui-react/lib/UserCenter/components/storage/connected.d.ts +4 -0
- package/lib/packages/blocklet-ui-react/lib/UserCenter/components/storage/delete.d.ts +5 -0
- package/lib/packages/blocklet-ui-react/lib/UserCenter/components/storage/disconnect.d.ts +2 -0
- package/lib/packages/blocklet-ui-react/lib/UserCenter/components/storage/icons/empty-spaces-nft.svg.d.ts +3 -0
- package/lib/packages/blocklet-ui-react/lib/UserCenter/components/storage/index.d.ts +2 -0
- package/lib/packages/blocklet-ui-react/lib/UserCenter/components/storage/preview-nft.d.ts +5 -0
- package/lib/packages/blocklet-ui-react/lib/UserCenter/components/third-party-login/index.d.ts +4 -0
- package/lib/packages/blocklet-ui-react/lib/UserCenter/components/third-party-login/third-party-item.d.ts +4 -0
- package/lib/packages/blocklet-ui-react/lib/UserCenter/components/user-center.d.ts +15 -0
- package/lib/packages/blocklet-ui-react/lib/UserCenter/components/user-info/address.d.ts +7 -0
- package/lib/packages/blocklet-ui-react/lib/UserCenter/components/user-info/index.d.ts +5 -0
- package/lib/packages/blocklet-ui-react/lib/UserCenter/components/user-info/link-preview-input.d.ts +6 -0
- package/lib/packages/blocklet-ui-react/lib/UserCenter/components/user-info/metadata.d.ts +7 -0
- package/lib/packages/blocklet-ui-react/lib/UserCenter/components/user-info/switch-role.d.ts +6 -0
- package/lib/packages/blocklet-ui-react/lib/UserCenter/components/user-info/timezone-select.d.ts +7 -0
- package/lib/packages/blocklet-ui-react/lib/UserCenter/components/user-info/user-basic-info.d.ts +12 -0
- package/lib/packages/blocklet-ui-react/lib/UserCenter/components/user-info/user-info-item.d.ts +6 -0
- package/lib/packages/blocklet-ui-react/lib/UserCenter/components/user-info/user-info.d.ts +6 -0
- package/lib/packages/blocklet-ui-react/lib/UserCenter/components/user-info/user-status.d.ts +9 -0
- package/lib/packages/blocklet-ui-react/lib/UserCenter/components/user-info/utils.d.ts +33 -0
- package/lib/packages/blocklet-ui-react/lib/UserCenter/components/webhook-item.d.ts +10 -0
- package/lib/packages/blocklet-ui-react/lib/UserCenter/index.d.ts +2 -0
- package/lib/packages/blocklet-ui-react/lib/UserCenter/libs/locales.d.ts +513 -0
- package/lib/packages/blocklet-ui-react/lib/UserCenter/libs/utils.d.ts +3 -0
- package/lib/packages/blocklet-ui-react/lib/UserSessions/components/user-session-info.d.ts +5 -0
- package/lib/packages/blocklet-ui-react/lib/UserSessions/components/user-sessions.d.ts +8 -0
- package/lib/packages/blocklet-ui-react/lib/UserSessions/index.d.ts +2 -0
- package/lib/packages/blocklet-ui-react/lib/UserSessions/libs/locales.d.ts +88 -0
- package/lib/packages/blocklet-ui-react/lib/UserSessions/libs/utils.d.ts +3 -0
- package/lib/packages/blocklet-ui-react/lib/blocklets.d.ts +18 -0
- package/lib/packages/blocklet-ui-react/lib/common/domain-warning.d.ts +12 -0
- package/lib/packages/blocklet-ui-react/lib/common/header-addons.d.ts +19 -0
- package/lib/packages/blocklet-ui-react/lib/common/link-blocker.d.ts +4 -0
- package/lib/packages/blocklet-ui-react/lib/common/notification-addon.d.ts +10 -0
- package/lib/packages/blocklet-ui-react/lib/common/overridable-theme-provider.d.ts +12 -0
- package/lib/packages/blocklet-ui-react/lib/common/wallet-hidden-topbar.d.ts +2 -0
- package/lib/packages/blocklet-ui-react/lib/common/ws.d.ts +4 -0
- package/lib/packages/blocklet-ui-react/lib/contexts/config-user-space.d.ts +7 -0
- package/lib/packages/blocklet-ui-react/lib/hooks/use-mobile.d.ts +4 -0
- package/lib/packages/blocklet-ui-react/lib/index.d.ts +12 -0
- package/lib/packages/blocklet-ui-react/lib/libs/client.d.ts +3 -0
- package/lib/packages/blocklet-ui-react/lib/libs/constant.d.ts +2 -0
- package/lib/packages/blocklet-ui-react/lib/libs/spaces.d.ts +3 -0
- package/lib/packages/blocklet-ui-react/lib/libs/with-hide-when-embed.d.ts +5 -0
- package/lib/packages/blocklet-ui-react/lib/types.d.ts +37 -0
- package/lib/packages/blocklet-ui-react/lib/utils.d.ts +11 -0
- package/lib/{@types → packages/blocklet-ui-react/src/@types}/index.d.ts +3 -3
- package/lib/{BlockletStudio → packages/blocklet-ui-react/src/BlockletStudio}/index.d.ts +1 -1
- package/lib/packages/blocklet-ui-react/src/ComponentInstaller/ComponentInstaller.stories.d.ts +9 -0
- package/lib/packages/blocklet-ui-react/src/ComponentInstaller/demo/basic.d.ts +29 -0
- package/lib/packages/blocklet-ui-react/src/ComponentInstaller/demo/mock-optional-components.d.ts +2 -0
- package/lib/packages/blocklet-ui-react/src/ComponentInstaller/index.d.ts +18 -0
- package/lib/packages/blocklet-ui-react/src/ComponentInstaller/installer-item.d.ts +18 -0
- package/lib/{ComponentInstaller → packages/blocklet-ui-react/src/ComponentInstaller}/use-component-installed.d.ts +1 -1
- package/lib/{ComponentManager → packages/blocklet-ui-react/src/ComponentManager}/components/add-component.d.ts +2 -2
- package/lib/packages/blocklet-ui-react/src/ComponentManager/components/check-component.d.ts +2 -0
- package/lib/{ComponentManager → packages/blocklet-ui-react/src/ComponentManager}/components/publish-component.d.ts +2 -2
- package/lib/{ComponentManager → packages/blocklet-ui-react/src/ComponentManager}/components/resource-dialog.d.ts +2 -2
- package/lib/packages/blocklet-ui-react/src/Dashboard/Dashboard.stories.d.ts +13 -0
- package/lib/packages/blocklet-ui-react/src/Dashboard/demo/basic.d.ts +29 -0
- package/lib/packages/blocklet-ui-react/src/Dashboard/index.d.ts +30 -0
- package/lib/packages/blocklet-ui-react/src/Footer/Footer.stories.d.ts +19 -0
- package/lib/packages/blocklet-ui-react/src/Footer/brand.d.ts +15 -0
- package/lib/packages/blocklet-ui-react/src/Footer/copyright.d.ts +13 -0
- package/lib/packages/blocklet-ui-react/src/Footer/demo/arcblock-site.d.ts +31 -0
- package/lib/packages/blocklet-ui-react/src/Footer/demo/brand.d.ts +1 -0
- package/lib/packages/blocklet-ui-react/src/Footer/demo/copyright.d.ts +1 -0
- package/lib/packages/blocklet-ui-react/src/Footer/demo/footer.d.ts +10 -0
- package/lib/packages/blocklet-ui-react/src/Footer/demo/links.d.ts +1 -0
- package/lib/packages/blocklet-ui-react/src/Footer/demo/social-media-icons.d.ts +1 -0
- package/lib/packages/blocklet-ui-react/src/Footer/index.d.ts +6 -0
- package/lib/packages/blocklet-ui-react/src/Footer/internal-footer.d.ts +32 -0
- package/lib/packages/blocklet-ui-react/src/Footer/layout/plain.d.ts +22 -0
- package/lib/packages/blocklet-ui-react/src/Footer/layout/row.d.ts +13 -0
- package/lib/packages/blocklet-ui-react/src/Footer/layout/standard.d.ts +24 -0
- package/lib/packages/blocklet-ui-react/src/Footer/links.d.ts +23 -0
- package/lib/packages/blocklet-ui-react/src/Footer/social-media.d.ts +14 -0
- package/lib/packages/blocklet-ui-react/src/Header/Header.stories.d.ts +26 -0
- package/lib/packages/blocklet-ui-react/src/Header/demo/addons-customization.d.ts +11 -0
- package/lib/packages/blocklet-ui-react/src/Header/demo/basic.d.ts +1 -0
- package/lib/packages/blocklet-ui-react/src/Header/demo/fixtures/index.d.ts +49 -0
- package/lib/packages/blocklet-ui-react/src/Header/demo/with-enable-connect-enable-locale.d.ts +1 -0
- package/lib/{Header → packages/blocklet-ui-react/src/Header}/index.d.ts +3 -2
- package/lib/packages/blocklet-ui-react/src/Icon/Icon.stories.d.ts +12 -0
- package/lib/packages/blocklet-ui-react/src/Icon/demo/basic.d.ts +1 -0
- package/lib/{Icon → packages/blocklet-ui-react/src/Icon}/index.d.ts +2 -3
- package/lib/packages/blocklet-ui-react/src/Notifications/Snackbar.d.ts +16 -0
- package/lib/{Notifications → packages/blocklet-ui-react/src/Notifications}/hooks/use-title.d.ts +1 -1
- package/lib/{Notifications → packages/blocklet-ui-react/src/Notifications}/utils.d.ts +2 -2
- package/lib/{UserCenter → packages/blocklet-ui-react/src/UserCenter}/components/config-inviter.d.ts +1 -1
- package/lib/{UserCenter → packages/blocklet-ui-react/src/UserCenter}/components/config-profile.d.ts +1 -1
- package/lib/packages/blocklet-ui-react/src/UserCenter/components/danger-zone.d.ts +1 -0
- package/lib/{UserCenter → packages/blocklet-ui-react/src/UserCenter}/components/editable-field.d.ts +3 -3
- package/lib/{UserCenter → packages/blocklet-ui-react/src/UserCenter}/components/nft.d.ts +1 -1
- package/lib/{UserCenter → packages/blocklet-ui-react/src/UserCenter}/components/notification.d.ts +1 -1
- package/lib/packages/blocklet-ui-react/src/UserCenter/components/passport.d.ts +5 -0
- package/lib/{UserCenter → packages/blocklet-ui-react/src/UserCenter}/components/privacy.d.ts +1 -1
- package/lib/{UserCenter → packages/blocklet-ui-react/src/UserCenter}/components/settings.d.ts +2 -2
- package/lib/{UserCenter → packages/blocklet-ui-react/src/UserCenter}/components/status-dialog/date-picker.d.ts +1 -1
- package/lib/{UserCenter → packages/blocklet-ui-react/src/UserCenter}/components/status-dialog/index.d.ts +1 -1
- package/lib/packages/blocklet-ui-react/src/UserCenter/components/status-selector/duration-menu.d.ts +7 -0
- package/lib/{UserCenter → packages/blocklet-ui-react/src/UserCenter}/components/status-selector/index.d.ts +1 -1
- package/lib/{UserCenter → packages/blocklet-ui-react/src/UserCenter}/components/status-selector/menu-item.d.ts +4 -4
- package/lib/{UserCenter → packages/blocklet-ui-react/src/UserCenter}/components/storage/action.d.ts +1 -1
- package/lib/{UserCenter → packages/blocklet-ui-react/src/UserCenter}/components/storage/connected.d.ts +1 -1
- package/lib/{UserCenter → packages/blocklet-ui-react/src/UserCenter}/components/storage/delete.d.ts +1 -1
- package/lib/packages/blocklet-ui-react/src/UserCenter/components/storage/disconnect.d.ts +2 -0
- package/lib/packages/blocklet-ui-react/src/UserCenter/components/storage/index.d.ts +2 -0
- package/lib/{UserCenter → packages/blocklet-ui-react/src/UserCenter}/components/storage/preview-nft.d.ts +1 -1
- package/lib/packages/blocklet-ui-react/src/UserCenter/components/third-party-login/index.d.ts +4 -0
- package/lib/{UserCenter → packages/blocklet-ui-react/src/UserCenter}/components/third-party-login/third-party-item.d.ts +2 -2
- package/lib/{UserCenter → packages/blocklet-ui-react/src/UserCenter}/components/user-center.d.ts +2 -2
- package/lib/{UserCenter → packages/blocklet-ui-react/src/UserCenter}/components/user-info/address.d.ts +2 -2
- package/lib/{UserCenter → packages/blocklet-ui-react/src/UserCenter}/components/user-info/link-preview-input.d.ts +1 -1
- package/lib/{UserCenter → packages/blocklet-ui-react/src/UserCenter}/components/user-info/metadata.d.ts +2 -2
- package/lib/packages/blocklet-ui-react/src/UserCenter/components/user-info/switch-role.d.ts +7 -0
- package/lib/{UserCenter → packages/blocklet-ui-react/src/UserCenter}/components/user-info/timezone-select.d.ts +1 -1
- package/lib/{UserCenter → packages/blocklet-ui-react/src/UserCenter}/components/user-info/user-basic-info.d.ts +3 -3
- package/lib/{UserCenter → packages/blocklet-ui-react/src/UserCenter}/components/user-info/user-info-item.d.ts +1 -1
- package/lib/packages/blocklet-ui-react/src/UserCenter/components/user-info/user-info.d.ts +6 -0
- package/lib/{UserCenter → packages/blocklet-ui-react/src/UserCenter}/components/user-info/user-status.d.ts +2 -2
- package/lib/{UserCenter → packages/blocklet-ui-react/src/UserCenter}/components/user-info/utils.d.ts +8 -5
- package/lib/{UserCenter → packages/blocklet-ui-react/src/UserCenter}/components/webhook-item.d.ts +1 -1
- package/lib/{UserCenter → packages/blocklet-ui-react/src/UserCenter}/libs/utils.d.ts +1 -1
- package/lib/{UserSessions → packages/blocklet-ui-react/src/UserSessions}/components/user-session-info.d.ts +1 -1
- package/lib/{UserSessions → packages/blocklet-ui-react/src/UserSessions}/components/user-sessions.d.ts +1 -1
- package/lib/packages/blocklet-ui-react/src/common/domain-warning.d.ts +12 -0
- package/lib/packages/blocklet-ui-react/src/common/header-addons.d.ts +19 -0
- package/lib/{common → packages/blocklet-ui-react/src/common}/link-blocker.d.ts +1 -1
- package/lib/{common → packages/blocklet-ui-react/src/common}/notification-addon.d.ts +3 -6
- package/lib/{common → packages/blocklet-ui-react/src/common}/overridable-theme-provider.d.ts +5 -8
- package/lib/{contexts → packages/blocklet-ui-react/src/contexts}/config-user-space.d.ts +3 -3
- package/lib/{libs → packages/blocklet-ui-react/src/libs}/with-hide-when-embed.d.ts +1 -1
- package/lib/packages/blocklet-ui-react/src/types.d.ts +36 -0
- package/lib/packages/blocklet-ui-react/tools/auto-exports.d.ts +1 -0
- package/lib/packages/blocklet-ui-react/tools/jest.d.ts +1 -0
- package/lib/packages/blocklet-ui-react/vite.config.d.mts +2 -0
- package/lib/types.js +39 -39
- package/lib/utils.js +61 -175
- package/package.json +29 -34
- package/src/ComponentInstaller/ComponentInstaller.stories.jsx +16 -0
- package/src/ComponentInstaller/index.jsx +11 -27
- package/src/ComponentInstaller/installer-item.jsx +1 -5
- package/src/ComponentManager/components/add-component.tsx +3 -3
- package/src/ComponentManager/components/publish-component.tsx +3 -3
- package/src/Dashboard/Dashboard.stories.jsx +20 -0
- package/src/Dashboard/index.jsx +16 -27
- package/src/Footer/Footer.stories.jsx +32 -0
- package/src/Footer/brand.jsx +1 -7
- package/src/Footer/copyright.jsx +1 -6
- package/src/Footer/index.jsx +1 -6
- package/src/Footer/internal-footer.jsx +26 -16
- package/src/Footer/layout/row.jsx +2 -7
- package/src/Footer/layout/standard.jsx +12 -2
- package/src/Footer/links.jsx +2 -7
- package/src/Footer/social-media.jsx +1 -5
- package/src/Header/Header.stories.jsx +30 -0
- package/src/Header/index.tsx +1 -1
- package/src/Icon/Icon.stories.jsx +12 -0
- package/src/Notifications/Snackbar.tsx +119 -126
- package/src/Notifications/hooks/use-title.tsx +5 -2
- package/src/Notifications/hooks/use-width.tsx +1 -1
- package/src/UserCenter/components/config-profile.tsx +0 -1
- package/src/UserCenter/components/danger-zone.tsx +7 -3
- package/src/UserCenter/components/editable-field.tsx +45 -44
- package/src/UserCenter/components/nft.tsx +23 -5
- package/src/UserCenter/components/notification.tsx +22 -6
- package/src/UserCenter/components/privacy.tsx +1 -1
- package/src/UserCenter/components/settings.tsx +6 -1
- package/src/UserCenter/components/status-dialog/date-picker.tsx +10 -7
- package/src/UserCenter/components/status-dialog/index.tsx +11 -4
- package/src/UserCenter/components/status-selector/duration-menu.tsx +7 -2
- package/src/UserCenter/components/status-selector/index.tsx +7 -1
- package/src/UserCenter/components/status-selector/menu-item.tsx +1 -2
- package/src/UserCenter/components/storage/action.tsx +1 -2
- package/src/UserCenter/components/storage/connected.tsx +18 -5
- package/src/UserCenter/components/storage/delete.tsx +1 -1
- package/src/UserCenter/components/storage/disconnect.tsx +10 -2
- package/src/UserCenter/components/storage/index.tsx +6 -1
- package/src/UserCenter/components/storage/preview-nft.tsx +1 -1
- package/src/UserCenter/components/third-party-login/index.tsx +2 -2
- package/src/UserCenter/components/third-party-login/third-party-item.tsx +11 -7
- package/src/UserCenter/components/user-center.tsx +10 -5
- package/src/UserCenter/components/user-info/address.tsx +12 -6
- package/src/UserCenter/components/user-info/link-preview-input.tsx +31 -13
- package/src/UserCenter/components/user-info/metadata.tsx +44 -37
- package/src/UserCenter/components/user-info/timezone-select.tsx +2 -5
- package/src/UserCenter/components/user-info/user-basic-info.tsx +24 -8
- package/src/UserCenter/components/user-info/user-info-item.tsx +7 -2
- package/src/UserCenter/components/user-info/user-status.tsx +7 -9
- package/src/UserCenter/components/webhook-item.tsx +4 -2
- package/src/UserSessions/components/user-sessions.tsx +1 -1
- package/src/common/domain-warning.jsx +2 -14
- package/src/common/header-addons.jsx +8 -11
- package/src/common/notification-addon.jsx +1 -7
- package/src/common/overridable-theme-provider.jsx +1 -5
- package/src/common/ws.js +2 -2
- package/src/contexts/config-user-space.tsx +3 -3
- package/vite.config.mjs +31 -0
- package/lib/@types/shims.d.ts +0 -18
- package/lib/ComponentInstaller/index.d.ts +0 -37
- package/lib/ComponentInstaller/installer-item.d.ts +0 -21
- package/lib/ComponentManager/components/check-component.d.ts +0 -2
- package/lib/Dashboard/index.d.ts +0 -44
- package/lib/Footer/brand.d.ts +0 -22
- package/lib/Footer/copyright.d.ts +0 -18
- package/lib/Footer/index.d.ts +0 -6
- package/lib/Footer/internal-footer.d.ts +0 -29
- package/lib/Footer/layout/plain.d.ts +0 -15
- package/lib/Footer/layout/row.d.ts +0 -18
- package/lib/Footer/layout/standard.d.ts +0 -17
- package/lib/Footer/links.d.ts +0 -23
- package/lib/Footer/social-media.d.ts +0 -14
- package/lib/Notifications/Snackbar.d.ts +0 -14
- package/lib/UserCenter/components/danger-zone.d.ts +0 -1
- package/lib/UserCenter/components/passport.d.ts +0 -5
- package/lib/UserCenter/components/status-selector/duration-menu.d.ts +0 -7
- package/lib/UserCenter/components/storage/disconnect.d.ts +0 -2
- package/lib/UserCenter/components/storage/icons/empty-spaces-nft.svg +0 -58
- package/lib/UserCenter/components/storage/icons/long-arrow.svg +0 -5
- package/lib/UserCenter/components/storage/icons/space-connected.svg +0 -3
- package/lib/UserCenter/components/storage/icons/space-disconnect.svg +0 -3
- package/lib/UserCenter/components/storage/index.d.ts +0 -2
- package/lib/UserCenter/components/third-party-login/index.d.ts +0 -4
- package/lib/UserCenter/components/user-info/switch-role.d.ts +0 -7
- package/lib/UserCenter/components/user-info/user-info.d.ts +0 -6
- package/lib/common/domain-warning.d.ts +0 -17
- package/lib/common/header-addons.d.ts +0 -27
- package/lib/types.d.ts +0 -2
- /package/lib/{ComponentInstaller → packages/blocklet-ui-react/src/ComponentInstaller}/locales.d.ts +0 -0
- /package/lib/{ComponentManager → packages/blocklet-ui-react/src/ComponentManager}/index.d.ts +0 -0
- /package/lib/{ComponentManager → packages/blocklet-ui-react/src/ComponentManager}/libs/locales.d.ts +0 -0
- /package/lib/{Notifications → packages/blocklet-ui-react/src/Notifications}/hooks/use-width.d.ts +0 -0
- /package/lib/{UserCenter → packages/blocklet-ui-react/src/UserCenter}/components/user-info/index.d.ts +0 -0
- /package/lib/{UserCenter → packages/blocklet-ui-react/src/UserCenter}/index.d.ts +0 -0
- /package/lib/{UserCenter → packages/blocklet-ui-react/src/UserCenter}/libs/locales.d.ts +0 -0
- /package/lib/{UserSessions → packages/blocklet-ui-react/src/UserSessions}/index.d.ts +0 -0
- /package/lib/{UserSessions → packages/blocklet-ui-react/src/UserSessions}/libs/locales.d.ts +0 -0
- /package/lib/{UserSessions → packages/blocklet-ui-react/src/UserSessions}/libs/utils.d.ts +0 -0
- /package/lib/{blocklets.d.ts → packages/blocklet-ui-react/src/blocklets.d.ts} +0 -0
- /package/lib/{common → packages/blocklet-ui-react/src/common}/wallet-hidden-topbar.d.ts +0 -0
- /package/lib/{common → packages/blocklet-ui-react/src/common}/ws.d.ts +0 -0
- /package/lib/{hooks → packages/blocklet-ui-react/src/hooks}/use-mobile.d.ts +0 -0
- /package/lib/{index.d.ts → packages/blocklet-ui-react/src/index.d.ts} +0 -0
- /package/lib/{libs → packages/blocklet-ui-react/src/libs}/client.d.ts +0 -0
- /package/lib/{libs → packages/blocklet-ui-react/src/libs}/constant.d.ts +0 -0
- /package/lib/{libs → packages/blocklet-ui-react/src/libs}/spaces.d.ts +0 -0
- /package/lib/{utils.d.ts → packages/blocklet-ui-react/src/utils.d.ts} +0 -0
|
@@ -1,31 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
Typography,
|
|
16
|
-
IconButton
|
|
17
|
-
} from "@mui/material";
|
|
18
|
-
import dayjs from "dayjs";
|
|
19
|
-
import CloseIcon from "@mui/icons-material/Close";
|
|
20
|
-
import { translate } from "@arcblock/ux/lib/Locale/util";
|
|
21
|
-
import { useMemoizedFn } from "ahooks";
|
|
22
|
-
import ArrowDownwardIcon from "@arcblock/icons/lib/ArrowDown";
|
|
23
|
-
import { useLocaleContext } from "@arcblock/ux/lib/Locale/context";
|
|
24
|
-
import { DurationEnum } from "../../../@types/index.js";
|
|
25
|
-
import { translations } from "../../libs/locales.js";
|
|
26
|
-
import DateTimeInput from "./date-picker.js";
|
|
27
|
-
import { defaultButtonStyle, primaryButtonStyle } from "../user-info/utils.js";
|
|
28
|
-
const selectStyle = {
|
|
1
|
+
import { jsxs as n, jsx as r, Fragment as Q } from "react/jsx-runtime";
|
|
2
|
+
import { useState as s, useEffect as V, useMemo as G, Suspense as z, createElement as W } from "react";
|
|
3
|
+
import { Dialog as H, DialogTitle as J, Typography as g, IconButton as K, DialogContent as U, FormControl as w, InputLabel as M, Select as R, MenuItem as T, ListItemIcon as B, Box as v, DialogActions as X, Button as b } from "@mui/material";
|
|
4
|
+
import C from "dayjs";
|
|
5
|
+
import { Close as Y } from "@mui/icons-material";
|
|
6
|
+
import { translate as Z } from "@arcblock/ux/lib/Locale/util";
|
|
7
|
+
import { useMemoizedFn as _ } from "ahooks";
|
|
8
|
+
import A from "@arcblock/icons/lib/ArrowDown";
|
|
9
|
+
import { useLocaleContext as $ } from "@arcblock/ux/lib/Locale/context";
|
|
10
|
+
import { DurationEnum as p } from "../../../@types/index.js";
|
|
11
|
+
import { translations as oo } from "../../libs/locales.js";
|
|
12
|
+
import io from "./date-picker.js";
|
|
13
|
+
import { defaultButtonStyle as E, primaryButtonStyle as ro } from "../user-info/utils.js";
|
|
14
|
+
const O = {
|
|
29
15
|
padding: "8px 16px",
|
|
30
16
|
borderRadius: "8px",
|
|
31
17
|
"&:hover": {
|
|
@@ -43,104 +29,116 @@ const selectStyle = {
|
|
|
43
29
|
alignItems: "center"
|
|
44
30
|
}
|
|
45
31
|
};
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
const t =
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
const [
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
...item.duration ? { duration: item.duration } : {}
|
|
68
|
-
});
|
|
69
|
-
onClose();
|
|
70
|
-
};
|
|
71
|
-
const handleSubmit = (clean = false) => {
|
|
72
|
-
if (clean) {
|
|
73
|
-
onSelect(void 0);
|
|
74
|
-
} else {
|
|
75
|
-
const current = dayjs();
|
|
76
|
-
onSelect({
|
|
77
|
-
value: status,
|
|
78
|
-
...duration ? { duration } : {},
|
|
79
|
-
...duration === DurationEnum.Custom && customDate ? { dateRange: [current.toDate(), dayjs(customDate).toDate()] } : {}
|
|
32
|
+
function go({ open: j, onClose: u, data: m, selected: i, onSelect: h, timezone: F }) {
|
|
33
|
+
var I, k;
|
|
34
|
+
const { locale: L } = $(), t = _((o, e = {}) => Z(oo, o, L, "en", e)), [l, S] = s((i == null ? void 0 : i.value) || ""), [a, y] = s((i == null ? void 0 : i.duration) || ""), [d, x] = s(((I = i == null ? void 0 : i.dateRange) == null ? void 0 : I[1]) || ""), [N, c] = s(!1);
|
|
35
|
+
V(() => {
|
|
36
|
+
var o;
|
|
37
|
+
S((i == null ? void 0 : i.value) || ""), y((i == null ? void 0 : i.duration) || ""), x(((o = i == null ? void 0 : i.dateRange) == null ? void 0 : o[1]) || "");
|
|
38
|
+
}, [i]);
|
|
39
|
+
const P = G(() => l && a, [l, a]), f = m.find((o) => o.id === l), q = (o) => {
|
|
40
|
+
h({
|
|
41
|
+
value: o.id,
|
|
42
|
+
...o.duration ? { duration: o.duration } : {}
|
|
43
|
+
}), u();
|
|
44
|
+
}, D = (o = !1) => {
|
|
45
|
+
if (o)
|
|
46
|
+
h(void 0);
|
|
47
|
+
else {
|
|
48
|
+
const e = C();
|
|
49
|
+
h({
|
|
50
|
+
value: l,
|
|
51
|
+
...a ? { duration: a } : {},
|
|
52
|
+
...a === p.Custom && d ? { dateRange: [e.toDate(), C(d).toDate()] } : {}
|
|
80
53
|
});
|
|
81
54
|
}
|
|
82
|
-
|
|
55
|
+
u();
|
|
83
56
|
};
|
|
84
|
-
return /* @__PURE__ */
|
|
85
|
-
|
|
57
|
+
return /* @__PURE__ */ n(
|
|
58
|
+
H,
|
|
86
59
|
{
|
|
87
|
-
open,
|
|
88
|
-
onClose,
|
|
60
|
+
open: j,
|
|
61
|
+
onClose: u,
|
|
89
62
|
maxWidth: "xs",
|
|
90
|
-
fullWidth:
|
|
63
|
+
fullWidth: !0,
|
|
91
64
|
PaperProps: {
|
|
92
65
|
sx: {
|
|
93
66
|
borderRadius: "8px"
|
|
94
67
|
}
|
|
95
68
|
},
|
|
96
69
|
children: [
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
-
/* @__PURE__ */
|
|
99
|
-
/* @__PURE__ */
|
|
100
|
-
|
|
70
|
+
/* @__PURE__ */ n(J, { sx: { borderBottom: "1px solid", borderColor: "divider" }, children: [
|
|
71
|
+
/* @__PURE__ */ r(g, { variant: "body1", sx: { fontSize: "16px !important", mb: 0 }, children: t("profile.setStatus") }),
|
|
72
|
+
/* @__PURE__ */ r(
|
|
73
|
+
K,
|
|
101
74
|
{
|
|
102
75
|
"aria-label": "close",
|
|
103
|
-
onClick:
|
|
76
|
+
onClick: u,
|
|
104
77
|
sx: {
|
|
105
78
|
position: "absolute",
|
|
106
79
|
right: 8,
|
|
107
80
|
top: 8,
|
|
108
|
-
color: (
|
|
81
|
+
color: (o) => o.palette.grey[500]
|
|
109
82
|
},
|
|
110
|
-
children: /* @__PURE__ */
|
|
83
|
+
children: /* @__PURE__ */ r(Y, {})
|
|
111
84
|
}
|
|
112
85
|
)
|
|
113
86
|
] }),
|
|
114
|
-
/* @__PURE__ */
|
|
115
|
-
/* @__PURE__ */
|
|
116
|
-
/* @__PURE__ */
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
-
|
|
87
|
+
/* @__PURE__ */ n(U, { children: [
|
|
88
|
+
/* @__PURE__ */ n(w, { fullWidth: !0, sx: { mt: 2 }, children: [
|
|
89
|
+
/* @__PURE__ */ r(M, { size: "small", sx: { fontSize: "14px" }, children: t("profile.setStatus") }),
|
|
90
|
+
/* @__PURE__ */ r(
|
|
91
|
+
R,
|
|
119
92
|
{
|
|
120
|
-
value:
|
|
93
|
+
value: l,
|
|
121
94
|
label: t("profile.setStatus"),
|
|
122
|
-
onChange: (
|
|
123
|
-
|
|
124
|
-
setChanged(true);
|
|
95
|
+
onChange: (o) => {
|
|
96
|
+
S(o.target.value), c(!0);
|
|
125
97
|
},
|
|
126
98
|
variant: "outlined",
|
|
127
|
-
IconComponent: (
|
|
128
|
-
sx:
|
|
129
|
-
children:
|
|
130
|
-
|
|
99
|
+
IconComponent: (o) => /* @__PURE__ */ r(A, { ...o, width: 20, height: 20 }),
|
|
100
|
+
sx: O,
|
|
101
|
+
children: m.map((o) => /* @__PURE__ */ r(T, { value: o.id, children: /* @__PURE__ */ n(z, { fallback: null, children: [
|
|
102
|
+
o.icon && /* @__PURE__ */ r(B, { style: { minWidth: "24px" }, children: W(o.icon, {
|
|
131
103
|
style: { fontSize: "16px", width: "16px", height: "16px" }
|
|
132
104
|
}) }),
|
|
133
|
-
|
|
134
|
-
] }) },
|
|
105
|
+
o.name
|
|
106
|
+
] }) }, o.id))
|
|
135
107
|
}
|
|
136
108
|
)
|
|
137
109
|
] }),
|
|
138
|
-
|
|
139
|
-
/* @__PURE__ */
|
|
140
|
-
|
|
141
|
-
|
|
110
|
+
l ? /* @__PURE__ */ n(w, { fullWidth: !0, sx: { mt: "24px" }, children: [
|
|
111
|
+
/* @__PURE__ */ r(M, { size: "small", sx: { fontSize: "14px" }, children: t("profile.removeStatusAfter") }),
|
|
112
|
+
/* @__PURE__ */ r(
|
|
113
|
+
R,
|
|
114
|
+
{
|
|
115
|
+
value: a,
|
|
116
|
+
label: t("profile.removeStatusAfter"),
|
|
117
|
+
onChange: (o) => {
|
|
118
|
+
const { value: e } = o.target;
|
|
119
|
+
y(e), e === p.Custom && x(C().toDate()), c(!0);
|
|
120
|
+
},
|
|
121
|
+
variant: "outlined",
|
|
122
|
+
IconComponent: (o) => /* @__PURE__ */ r(A, { ...o, width: 20, height: 20 }),
|
|
123
|
+
sx: O,
|
|
124
|
+
children: (k = f == null ? void 0 : f.children) == null ? void 0 : k.map((o) => /* @__PURE__ */ r(T, { value: o.id, children: o.name }, o.id))
|
|
125
|
+
}
|
|
126
|
+
)
|
|
127
|
+
] }) : /* @__PURE__ */ n(v, { sx: { mt: "24px" }, children: [
|
|
128
|
+
/* @__PURE__ */ r(
|
|
129
|
+
g,
|
|
142
130
|
{
|
|
143
|
-
|
|
131
|
+
variant: "body2",
|
|
132
|
+
sx: {
|
|
133
|
+
color: "text.secondary"
|
|
134
|
+
},
|
|
135
|
+
children: t("profile.quickSettings")
|
|
136
|
+
}
|
|
137
|
+
),
|
|
138
|
+
m.map((o) => /* @__PURE__ */ r(
|
|
139
|
+
v,
|
|
140
|
+
{
|
|
141
|
+
onClick: () => q(o),
|
|
144
142
|
sx: {
|
|
145
143
|
display: "flex",
|
|
146
144
|
alignItems: "center",
|
|
@@ -152,79 +150,66 @@ export default function StatusDialog({ open, onClose, data, selected, onSelect,
|
|
|
152
150
|
bgcolor: "action.hover"
|
|
153
151
|
}
|
|
154
152
|
},
|
|
155
|
-
children: /* @__PURE__ */
|
|
156
|
-
|
|
153
|
+
children: /* @__PURE__ */ n(z, { fallback: null, children: [
|
|
154
|
+
o.icon && /* @__PURE__ */ r(B, { style: { minWidth: "24px" }, children: W(o.icon, {
|
|
157
155
|
style: { fontSize: "16px", width: "16px", height: "16px" }
|
|
158
156
|
}) }),
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
157
|
+
o.name,
|
|
158
|
+
o.durationName && /* @__PURE__ */ n(
|
|
159
|
+
g,
|
|
160
|
+
{
|
|
161
|
+
variant: "body2",
|
|
162
|
+
sx: {
|
|
163
|
+
color: "text.secondary"
|
|
164
|
+
},
|
|
165
|
+
children: [
|
|
166
|
+
"- ",
|
|
167
|
+
o.durationName
|
|
168
|
+
]
|
|
169
|
+
}
|
|
170
|
+
)
|
|
164
171
|
] })
|
|
165
172
|
},
|
|
166
|
-
|
|
173
|
+
o.id
|
|
167
174
|
))
|
|
168
|
-
] }) : /* @__PURE__ */ jsxs(FormControl, { fullWidth: true, sx: { mt: "24px" }, children: [
|
|
169
|
-
/* @__PURE__ */ jsx(InputLabel, { size: "small", sx: { fontSize: "14px" }, children: t("profile.removeStatusAfter") }),
|
|
170
|
-
/* @__PURE__ */ jsx(
|
|
171
|
-
Select,
|
|
172
|
-
{
|
|
173
|
-
value: duration,
|
|
174
|
-
label: t("profile.removeStatusAfter"),
|
|
175
|
-
onChange: (e) => {
|
|
176
|
-
const { value } = e.target;
|
|
177
|
-
setDuration(value);
|
|
178
|
-
if (value === DurationEnum.Custom) {
|
|
179
|
-
setCustomDate(dayjs().toDate());
|
|
180
|
-
}
|
|
181
|
-
setChanged(true);
|
|
182
|
-
},
|
|
183
|
-
variant: "outlined",
|
|
184
|
-
IconComponent: (props) => /* @__PURE__ */ jsx(ArrowDownwardIcon, { ...props, width: 20, height: 20 }),
|
|
185
|
-
sx: selectStyle,
|
|
186
|
-
children: selectedStatus?.children?.map((item) => /* @__PURE__ */ jsx(MenuItem, { value: item.id, children: item.name }, item.id))
|
|
187
|
-
}
|
|
188
|
-
)
|
|
189
175
|
] }),
|
|
190
|
-
|
|
191
|
-
|
|
176
|
+
a === p.Custom && /* @__PURE__ */ r(v, { sx: { mt: "24px" }, children: /* @__PURE__ */ r(
|
|
177
|
+
io,
|
|
192
178
|
{
|
|
193
|
-
value:
|
|
194
|
-
onChange: (
|
|
195
|
-
|
|
196
|
-
setChanged(true);
|
|
179
|
+
value: d,
|
|
180
|
+
onChange: (o) => {
|
|
181
|
+
x(o), c(!0);
|
|
197
182
|
},
|
|
198
183
|
label: t("profile.selectEndTime"),
|
|
199
|
-
timezone,
|
|
200
|
-
error:
|
|
201
|
-
helperText:
|
|
184
|
+
timezone: F,
|
|
185
|
+
error: a === p.Custom && !d,
|
|
186
|
+
helperText: a === p.Custom && !d ? t("profile.pleaseSelectTime") : void 0
|
|
202
187
|
}
|
|
203
188
|
) })
|
|
204
189
|
] }),
|
|
205
|
-
/* @__PURE__ */
|
|
206
|
-
|
|
190
|
+
/* @__PURE__ */ r(X, { sx: { p: "16px 24px", borderTop: "1px solid", borderColor: "divider" }, children: i != null && i.value && !N ? /* @__PURE__ */ r(
|
|
191
|
+
b,
|
|
207
192
|
{
|
|
208
|
-
sx: { ...
|
|
193
|
+
sx: { ...E, minWidth: "54px" },
|
|
209
194
|
size: "small",
|
|
210
195
|
variant: "outlined",
|
|
211
|
-
onClick: () =>
|
|
196
|
+
onClick: () => D(!0),
|
|
212
197
|
children: t("profile.cleanStatus")
|
|
213
198
|
}
|
|
214
|
-
) : /* @__PURE__ */
|
|
215
|
-
/* @__PURE__ */
|
|
216
|
-
/* @__PURE__ */
|
|
217
|
-
|
|
199
|
+
) : /* @__PURE__ */ n(Q, { children: [
|
|
200
|
+
/* @__PURE__ */ r(b, { size: "small", variant: "outlined", sx: { ...E, minWidth: "54px" }, onClick: u, children: t("common.cancel") }),
|
|
201
|
+
/* @__PURE__ */ r(
|
|
202
|
+
b,
|
|
218
203
|
{
|
|
219
204
|
sx: {
|
|
220
|
-
...
|
|
205
|
+
...ro,
|
|
221
206
|
minWidth: "54px",
|
|
222
207
|
"&.Mui-disabled": {
|
|
223
208
|
backgroundColor: "rgba(0, 0, 0, 0.12)"
|
|
224
209
|
}
|
|
225
210
|
},
|
|
226
|
-
disabled: !
|
|
227
|
-
onClick: () =>
|
|
211
|
+
disabled: !P,
|
|
212
|
+
onClick: () => D(!1),
|
|
228
213
|
size: "small",
|
|
229
214
|
variant: "outlined",
|
|
230
215
|
children: t("common.confirm")
|
|
@@ -235,3 +220,6 @@ export default function StatusDialog({ open, onClose, data, selected, onSelect,
|
|
|
235
220
|
}
|
|
236
221
|
);
|
|
237
222
|
}
|
|
223
|
+
export {
|
|
224
|
+
go as default
|
|
225
|
+
};
|
|
@@ -1,39 +1,30 @@
|
|
|
1
|
-
import { Fragment, jsx
|
|
2
|
-
import {
|
|
3
|
-
import { useState } from "react";
|
|
4
|
-
import { useLocaleContext } from "@arcblock/ux/lib/Locale/context";
|
|
5
|
-
import { useMemoizedFn } from "ahooks";
|
|
6
|
-
import { translate } from "@arcblock/ux/lib/Locale/util";
|
|
7
|
-
import { translations } from "../../libs/locales.js";
|
|
8
|
-
import
|
|
9
|
-
function
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
})
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
import { jsxs as a, Fragment as g, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { styled as x, Menu as v, Typography as y } from "@mui/material";
|
|
3
|
+
import { useState as z } from "react";
|
|
4
|
+
import { useLocaleContext as C } from "@arcblock/ux/lib/Locale/context";
|
|
5
|
+
import { useMemoizedFn as b } from "ahooks";
|
|
6
|
+
import { translate as k } from "@arcblock/ux/lib/Locale/util";
|
|
7
|
+
import { translations as D } from "../../libs/locales.js";
|
|
8
|
+
import s, { StyledMenu as j } from "./menu-item.js";
|
|
9
|
+
function I({ data: n, selected: r, onSelect: m }) {
|
|
10
|
+
var c;
|
|
11
|
+
const { locale: p } = C(), f = b((o, t = {}) => k(D, o, p, "en", t)), [e, l] = z(null), h = !!e, S = (o) => {
|
|
12
|
+
l(o.currentTarget);
|
|
13
|
+
}, u = () => {
|
|
14
|
+
l(null);
|
|
15
|
+
}, d = (o) => {
|
|
16
|
+
S(o);
|
|
17
|
+
}, M = (o, t) => {
|
|
18
|
+
m({
|
|
19
|
+
...r ?? {},
|
|
20
|
+
value: n.id,
|
|
21
|
+
duration: t.id
|
|
22
|
+
}), u();
|
|
18
23
|
};
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
openSubMenu(e);
|
|
24
|
-
};
|
|
25
|
-
const onSelectDuration = (e, item) => {
|
|
26
|
-
onSelect({
|
|
27
|
-
...selected ?? {},
|
|
28
|
-
value: data.id,
|
|
29
|
-
duration: item.id
|
|
30
|
-
});
|
|
31
|
-
closeSubMenu();
|
|
32
|
-
};
|
|
33
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
34
|
-
/* @__PURE__ */ jsx(StatusMenuItem, { icon: data.icon, selected: selected?.value === data.id, onClick: onSelectStatus, children: data.name }),
|
|
35
|
-
/* @__PURE__ */ jsxs(
|
|
36
|
-
StyledMenu,
|
|
24
|
+
return /* @__PURE__ */ a(g, { children: [
|
|
25
|
+
/* @__PURE__ */ i(s, { icon: n.icon, selected: (r == null ? void 0 : r.value) === n.id, onClick: d, children: n.name }),
|
|
26
|
+
/* @__PURE__ */ a(
|
|
27
|
+
j,
|
|
37
28
|
{
|
|
38
29
|
anchorOrigin: {
|
|
39
30
|
vertical: "top",
|
|
@@ -43,31 +34,45 @@ function DurationMenu({ data, selected, onSelect }) {
|
|
|
43
34
|
vertical: "top",
|
|
44
35
|
horizontal: "left"
|
|
45
36
|
},
|
|
46
|
-
open,
|
|
47
|
-
onClose:
|
|
48
|
-
anchorEl,
|
|
37
|
+
open: h,
|
|
38
|
+
onClose: u,
|
|
39
|
+
anchorEl: e,
|
|
49
40
|
children: [
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
-
|
|
52
|
-
|
|
41
|
+
/* @__PURE__ */ i(
|
|
42
|
+
y,
|
|
43
|
+
{
|
|
44
|
+
component: "span",
|
|
45
|
+
sx: {
|
|
46
|
+
color: "text.secondary",
|
|
47
|
+
pl: 2,
|
|
48
|
+
fontSize: "14px"
|
|
49
|
+
},
|
|
50
|
+
children: f("profile.removeStatusAfter")
|
|
51
|
+
}
|
|
52
|
+
),
|
|
53
|
+
(c = n.children) == null ? void 0 : c.map((o) => /* @__PURE__ */ i(
|
|
54
|
+
s,
|
|
53
55
|
{
|
|
54
|
-
selected:
|
|
55
|
-
onClick: (
|
|
56
|
-
children:
|
|
56
|
+
selected: (r == null ? void 0 : r.duration) === o.id,
|
|
57
|
+
onClick: (t) => M(t, o),
|
|
58
|
+
children: o.name
|
|
57
59
|
},
|
|
58
|
-
|
|
60
|
+
o.id
|
|
59
61
|
))
|
|
60
62
|
]
|
|
61
63
|
}
|
|
62
64
|
)
|
|
63
65
|
] });
|
|
64
66
|
}
|
|
65
|
-
|
|
66
|
-
export const MenuDiv = styled(Menu)`
|
|
67
|
+
const $ = x(v)`
|
|
67
68
|
.MuiList-root {
|
|
68
69
|
min-width: 160px;
|
|
69
70
|
}
|
|
70
71
|
.selected {
|
|
71
|
-
background-color: ${({ theme }) =>
|
|
72
|
+
background-color: ${({ theme: n }) => n.palette.grey[50]};
|
|
72
73
|
}
|
|
73
74
|
`;
|
|
75
|
+
export {
|
|
76
|
+
$ as MenuDiv,
|
|
77
|
+
I as default
|
|
78
|
+
};
|
|
@@ -1,39 +1,40 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Typography } from "@mui/material";
|
|
3
|
-
import { translate } from "@arcblock/ux/lib/Locale/util";
|
|
4
|
-
import { useMemoizedFn } from "ahooks";
|
|
5
|
-
import { useLocaleContext } from "@arcblock/ux/lib/Locale/context";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { translations } from "../../libs/locales.js";
|
|
9
|
-
function
|
|
10
|
-
const { locale } =
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
1
|
+
import { jsxs as m, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { Typography as f } from "@mui/material";
|
|
3
|
+
import { translate as d } from "@arcblock/ux/lib/Locale/util";
|
|
4
|
+
import { useMemoizedFn as S } from "ahooks";
|
|
5
|
+
import { useLocaleContext as x } from "@arcblock/ux/lib/Locale/context";
|
|
6
|
+
import h from "./duration-menu.js";
|
|
7
|
+
import M, { StyledMenu as y } from "./menu-item.js";
|
|
8
|
+
import { translations as C } from "../../libs/locales.js";
|
|
9
|
+
function L({ data: e, open: a, onSelect: u, anchorEl: i, selected: r }) {
|
|
10
|
+
const { locale: s } = x(), l = S((o, c = {}) => d(C, o, s, "en", c)), n = (o) => {
|
|
11
|
+
u(o);
|
|
12
|
+
}, p = () => e.map((o) => o.children ? /* @__PURE__ */ t(h, { data: o, selected: r, onSelect: n }, o.id) : /* @__PURE__ */ t(
|
|
13
|
+
M,
|
|
14
|
+
{
|
|
15
|
+
icon: o.icon,
|
|
16
|
+
selected: (r == null ? void 0 : r.value) === o.id,
|
|
17
|
+
onClick: () => n({ value: o.id }),
|
|
18
|
+
children: o.name
|
|
19
|
+
},
|
|
20
|
+
o.id
|
|
21
|
+
));
|
|
22
|
+
return /* @__PURE__ */ m(y, { open: a, onClose: () => n(), anchorEl: i, children: [
|
|
23
|
+
/* @__PURE__ */ t(
|
|
24
|
+
f,
|
|
25
|
+
{
|
|
26
|
+
component: "span",
|
|
27
|
+
sx: {
|
|
28
|
+
color: "text.secondary",
|
|
29
|
+
pl: 2,
|
|
30
|
+
fontSize: "14px"
|
|
29
31
|
},
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
return /* @__PURE__ */ jsxs(StyledMenu, { open, onClose: () => onSelectStatus(), anchorEl, children: [
|
|
35
|
-
/* @__PURE__ */ jsx(Typography, { component: "span", color: "text.secondary", pl: 2, fontSize: "14px", children: t("profile.setStatus") }),
|
|
36
|
-
renderMenuItems()
|
|
32
|
+
children: l("profile.setStatus")
|
|
33
|
+
}
|
|
34
|
+
),
|
|
35
|
+
p()
|
|
37
36
|
] });
|
|
38
37
|
}
|
|
39
|
-
export
|
|
38
|
+
export {
|
|
39
|
+
L as default
|
|
40
|
+
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
return /* @__PURE__ */
|
|
6
|
-
|
|
1
|
+
import { jsxs as i, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { styled as n, Menu as l, MenuItem as p, ListItemIcon as a } from "@mui/material";
|
|
3
|
+
import d from "react";
|
|
4
|
+
function c({ icon: e, selected: t, onClick: o, children: r }) {
|
|
5
|
+
return /* @__PURE__ */ i(p, { onClick: o, className: t ? "selected" : "", children: [
|
|
6
|
+
e && /* @__PURE__ */ s(a, { style: { minWidth: "24px" }, children: d.createElement(e, {
|
|
7
7
|
style: { fontSize: "16px", width: "16px", height: "16px" }
|
|
8
8
|
}) }),
|
|
9
|
-
|
|
9
|
+
r
|
|
10
10
|
] });
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
const h = n(l)`
|
|
13
13
|
.MuiPaper-root {
|
|
14
14
|
box-shadow: 0px 6px 24px rgba(0, 0, 0, 0.15);
|
|
15
15
|
}
|
|
@@ -17,6 +17,10 @@ export const StyledMenu = styled(Menu)`
|
|
|
17
17
|
min-width: 160px;
|
|
18
18
|
}
|
|
19
19
|
.selected {
|
|
20
|
-
background-color: ${({ theme }) =>
|
|
20
|
+
background-color: ${({ theme: e }) => e.palette.grey[50]};
|
|
21
21
|
}
|
|
22
22
|
`;
|
|
23
|
+
export {
|
|
24
|
+
h as StyledMenu,
|
|
25
|
+
c as default
|
|
26
|
+
};
|