@blocklet/ui-react 2.13.70 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +91 -81
- 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 +148 -159
- package/lib/UserCenter/components/user-info/metadata.js +290 -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 +96 -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 +28 -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 +21 -9
- 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 +36 -51
- package/src/UserCenter/components/user-info/metadata.tsx +45 -39
- 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/user-info/utils.ts +77 -11
- 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
package/lib/@types/index.js
CHANGED
|
@@ -1,18 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
DurationEnum2["Today"] = "today";
|
|
7
|
-
DurationEnum2["ThisWeek"] = "this_week";
|
|
8
|
-
DurationEnum2["Custom"] = "custom";
|
|
9
|
-
return DurationEnum2;
|
|
10
|
-
})(DurationEnum || {});
|
|
11
|
-
export var StatusEnum = /* @__PURE__ */ ((StatusEnum2) => {
|
|
12
|
-
StatusEnum2["Meeting"] = "meeting";
|
|
13
|
-
StatusEnum2["Community"] = "community";
|
|
14
|
-
StatusEnum2["Holiday"] = "holiday";
|
|
15
|
-
StatusEnum2["OffSick"] = "off_sick";
|
|
16
|
-
StatusEnum2["WorkingRemotely"] = "working_remotely";
|
|
17
|
-
return StatusEnum2;
|
|
18
|
-
})(StatusEnum || {});
|
|
1
|
+
var o = /* @__PURE__ */ ((e) => (e.NoClear = "no_clear", e.ThirtyMinutes = "30_minutes", e.OneHour = "1_hour", e.FourHours = "4_hours", e.Today = "today", e.ThisWeek = "this_week", e.Custom = "custom", e))(o || {}), r = /* @__PURE__ */ ((e) => (e.Meeting = "meeting", e.Community = "community", e.Holiday = "holiday", e.OffSick = "off_sick", e.WorkingRemotely = "working_remotely", e))(r || {});
|
|
2
|
+
export {
|
|
3
|
+
o as DurationEnum,
|
|
4
|
+
r as StatusEnum
|
|
5
|
+
};
|
|
@@ -1,97 +1,81 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { BLOCKLET_SERVICE_PATH_PREFIX } from "@arcblock/ux/lib/Util/constant";
|
|
3
|
-
import {
|
|
4
|
-
import { joinURL } from "ufo";
|
|
5
|
-
function
|
|
6
|
-
const
|
|
7
|
-
Object.keys(
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
return url.pathname + url.search;
|
|
1
|
+
import { jsx as T } from "react/jsx-runtime";
|
|
2
|
+
import { BLOCKLET_SERVICE_PATH_PREFIX as V } from "@arcblock/ux/lib/Util/constant";
|
|
3
|
+
import { useState as A, useRef as p, useEffect as H } from "react";
|
|
4
|
+
import { joinURL as J } from "ufo";
|
|
5
|
+
function K(a, s) {
|
|
6
|
+
const t = new URL(a);
|
|
7
|
+
return Object.keys(s).forEach((i) => {
|
|
8
|
+
const o = s[i];
|
|
9
|
+
o !== void 0 && t.searchParams.set(i, typeof o == "string" ? o : JSON.stringify(o));
|
|
10
|
+
}), t.pathname + t.search;
|
|
14
11
|
}
|
|
15
|
-
function
|
|
16
|
-
open,
|
|
17
|
-
setOpen,
|
|
18
|
-
onOpened,
|
|
19
|
-
componentDid,
|
|
20
|
-
tenantScope,
|
|
21
|
-
resourcesParams = {},
|
|
22
|
-
mode = "dialog",
|
|
23
|
-
title,
|
|
24
|
-
logo,
|
|
25
|
-
description,
|
|
26
|
-
introduction,
|
|
27
|
-
note,
|
|
28
|
-
componentsTitle,
|
|
29
|
-
resourcesTitle,
|
|
30
|
-
onUploaded,
|
|
31
|
-
onReleased,
|
|
32
|
-
onConnected,
|
|
33
|
-
components = [],
|
|
34
|
-
resources = {},
|
|
35
|
-
style = {},
|
|
36
|
-
zIndex = 9999,
|
|
37
|
-
dependentComponentsMode,
|
|
38
|
-
...
|
|
12
|
+
function G({
|
|
13
|
+
open: a,
|
|
14
|
+
setOpen: s,
|
|
15
|
+
onOpened: t,
|
|
16
|
+
componentDid: i,
|
|
17
|
+
tenantScope: o,
|
|
18
|
+
resourcesParams: h = {},
|
|
19
|
+
mode: w = "dialog",
|
|
20
|
+
title: E,
|
|
21
|
+
logo: R,
|
|
22
|
+
description: L,
|
|
23
|
+
introduction: y,
|
|
24
|
+
note: D,
|
|
25
|
+
componentsTitle: S,
|
|
26
|
+
resourcesTitle: b,
|
|
27
|
+
onUploaded: j,
|
|
28
|
+
onReleased: x,
|
|
29
|
+
onConnected: B,
|
|
30
|
+
components: P = [],
|
|
31
|
+
resources: U = {},
|
|
32
|
+
style: _ = {},
|
|
33
|
+
zIndex: k = 9999,
|
|
34
|
+
dependentComponentsMode: C,
|
|
35
|
+
...F
|
|
39
36
|
}) {
|
|
40
|
-
const [
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
};
|
|
52
|
-
latestFunctionVersionRef.current["studioDialog.uploaded"] = onUploaded;
|
|
53
|
-
latestFunctionVersionRef.current["studioDialog.connected"] = onConnected;
|
|
54
|
-
latestFunctionVersionRef.current["studioDialog.released"] = onReleased;
|
|
55
|
-
useEffect(() => {
|
|
56
|
-
const listener = (event) => {
|
|
57
|
-
if (event?.data?.componentDid !== didRef.current) {
|
|
37
|
+
const [n, c] = A(!1), u = p("");
|
|
38
|
+
u.current = i;
|
|
39
|
+
const e = p({});
|
|
40
|
+
if (e.current["resourceDialog.close"] = () => {
|
|
41
|
+
c(!1), s(!1);
|
|
42
|
+
}, e.current["resourceDialog.loaded"] = () => {
|
|
43
|
+
c(!0), t == null || t();
|
|
44
|
+
}, e.current["studioDialog.uploaded"] = j, e.current["studioDialog.connected"] = B, e.current["studioDialog.released"] = x, H(() => {
|
|
45
|
+
const l = (r) => {
|
|
46
|
+
var f, m, g;
|
|
47
|
+
if (((f = r == null ? void 0 : r.data) == null ? void 0 : f.componentDid) !== u.current)
|
|
58
48
|
return;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
if (typeof fn === "function") {
|
|
62
|
-
fn(event?.data?.data);
|
|
63
|
-
}
|
|
49
|
+
const d = e.current[(m = r == null ? void 0 : r.data) == null ? void 0 : m.event];
|
|
50
|
+
typeof d == "function" && d((g = r == null ? void 0 : r.data) == null ? void 0 : g.data);
|
|
64
51
|
};
|
|
65
|
-
window.addEventListener("message",
|
|
66
|
-
|
|
67
|
-
window.removeEventListener("message", listener);
|
|
52
|
+
return window.addEventListener("message", l), () => {
|
|
53
|
+
window.removeEventListener("message", l);
|
|
68
54
|
};
|
|
69
|
-
}, [])
|
|
70
|
-
if (!open) {
|
|
55
|
+
}, []), !a)
|
|
71
56
|
return null;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
joinURL(window.location.origin, BLOCKLET_SERVICE_PATH_PREFIX, "/embed/resources", componentDid, "/publish"),
|
|
57
|
+
const I = K(
|
|
58
|
+
J(window.location.origin, V, "/embed/resources", i, "/publish"),
|
|
75
59
|
{
|
|
76
|
-
title,
|
|
77
|
-
logo,
|
|
78
|
-
description,
|
|
79
|
-
introduction,
|
|
80
|
-
note,
|
|
81
|
-
tenantScope,
|
|
82
|
-
mode,
|
|
83
|
-
resourcesParams,
|
|
84
|
-
resources,
|
|
85
|
-
components,
|
|
86
|
-
resourcesTitle,
|
|
87
|
-
componentsTitle,
|
|
88
|
-
dependentComponentsMode
|
|
60
|
+
title: E,
|
|
61
|
+
logo: R,
|
|
62
|
+
description: L,
|
|
63
|
+
introduction: y,
|
|
64
|
+
note: D,
|
|
65
|
+
tenantScope: o,
|
|
66
|
+
mode: w,
|
|
67
|
+
resourcesParams: h,
|
|
68
|
+
resources: U,
|
|
69
|
+
components: P,
|
|
70
|
+
resourcesTitle: b,
|
|
71
|
+
componentsTitle: S,
|
|
72
|
+
dependentComponentsMode: C
|
|
89
73
|
}
|
|
90
74
|
);
|
|
91
|
-
return /* @__PURE__ */
|
|
75
|
+
return /* @__PURE__ */ T(
|
|
92
76
|
"iframe",
|
|
93
77
|
{
|
|
94
|
-
src,
|
|
78
|
+
src: I,
|
|
95
79
|
title: "Blocklet Studio",
|
|
96
80
|
style: {
|
|
97
81
|
position: "fixed",
|
|
@@ -99,16 +83,18 @@ function BlockletStudio({
|
|
|
99
83
|
left: 0,
|
|
100
84
|
width: "100vw",
|
|
101
85
|
height: "100vh",
|
|
102
|
-
zIndex,
|
|
86
|
+
zIndex: k,
|
|
103
87
|
border: 0,
|
|
104
88
|
padding: 0,
|
|
105
89
|
margin: 0,
|
|
106
|
-
pointerEvents:
|
|
107
|
-
opacity:
|
|
108
|
-
...
|
|
90
|
+
pointerEvents: n ? "auto" : "none",
|
|
91
|
+
opacity: n ? 1 : 0,
|
|
92
|
+
..._
|
|
109
93
|
},
|
|
110
|
-
...
|
|
94
|
+
...F
|
|
111
95
|
}
|
|
112
96
|
);
|
|
113
97
|
}
|
|
114
|
-
export
|
|
98
|
+
export {
|
|
99
|
+
G as default
|
|
100
|
+
};
|
|
@@ -1,199 +1,162 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { SessionContext } from "@arcblock/did-connect/lib/Session";
|
|
3
|
-
import { useLocaleContext } from "@arcblock/ux/lib/Locale/context";
|
|
4
|
-
import { translate } from "@arcblock/ux/lib/Locale/util";
|
|
5
|
-
import
|
|
6
|
-
import { Icon } from "@iconify/react";
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import { useMemoizedFn } from "ahooks";
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
function
|
|
16
|
-
warnIcon,
|
|
17
|
-
did,
|
|
18
|
-
noPermissionMute,
|
|
19
|
-
onInstalled,
|
|
20
|
-
onError,
|
|
21
|
-
children,
|
|
22
|
-
closeByOutSize,
|
|
23
|
-
onClose,
|
|
24
|
-
fallback,
|
|
25
|
-
disabled,
|
|
26
|
-
roles = ["owner", "admin"]
|
|
1
|
+
import { jsx as e, jsxs as o, Fragment as x } from "react/jsx-runtime";
|
|
2
|
+
import { SessionContext as R } from "@arcblock/did-connect/lib/Session";
|
|
3
|
+
import { useLocaleContext as W } from "@arcblock/ux/lib/Locale/context";
|
|
4
|
+
import { translate as q } from "@arcblock/ux/lib/Locale/util";
|
|
5
|
+
import A from "@arcblock/ux/lib/SessionPermission";
|
|
6
|
+
import { Icon as I } from "@iconify/react";
|
|
7
|
+
import { Close as S } from "@mui/icons-material";
|
|
8
|
+
import { ClickAwayListener as F, Fade as N, Paper as O, Box as n, IconButton as C } from "@mui/material";
|
|
9
|
+
import { useMemoizedFn as Y } from "ahooks";
|
|
10
|
+
import t from "prop-types";
|
|
11
|
+
import { use as P } from "react";
|
|
12
|
+
import $ from "./installer-item.js";
|
|
13
|
+
import E from "./locales.js";
|
|
14
|
+
import H from "./use-component-installed.js";
|
|
15
|
+
function m({
|
|
16
|
+
warnIcon: l = null,
|
|
17
|
+
did: u,
|
|
18
|
+
noPermissionMute: k = !1,
|
|
19
|
+
onInstalled: v = null,
|
|
20
|
+
onError: z = null,
|
|
21
|
+
children: d,
|
|
22
|
+
closeByOutSize: L = !1,
|
|
23
|
+
onClose: s = null,
|
|
24
|
+
fallback: p = null,
|
|
25
|
+
disabled: T = !1,
|
|
26
|
+
roles: D = ["owner", "admin"]
|
|
27
27
|
}) {
|
|
28
|
-
const { locale } =
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
onInstalled,
|
|
35
|
-
onError
|
|
36
|
-
});
|
|
37
|
-
const sessionCtx = useContext(SessionContext);
|
|
38
|
-
const handleClose = () => {
|
|
39
|
-
onClose?.(false);
|
|
28
|
+
const { locale: B } = W(), a = Y((i, r = {}) => q(E, i, B, "en", r)), { installed: j, optComponents: g, installStatus: h, definedInBlockletYML: M } = H({
|
|
29
|
+
did: u,
|
|
30
|
+
onInstalled: v,
|
|
31
|
+
onError: z
|
|
32
|
+
}), f = P(R), c = () => {
|
|
33
|
+
s == null || s(!1);
|
|
40
34
|
};
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
35
|
+
return T ? d : /* @__PURE__ */ e(A, { session: f == null ? void 0 : f.session, roles: D, children: ({ hasPermission: i }) => j ? d : k && !i ? p || null : typeof d == "function" ? /* @__PURE__ */ o(x, { children: [
|
|
36
|
+
p,
|
|
37
|
+
d({
|
|
38
|
+
hasPermission: i,
|
|
39
|
+
optComponents: g,
|
|
40
|
+
installStatus: h
|
|
41
|
+
})
|
|
42
|
+
] }) : /* @__PURE__ */ o(x, { children: [
|
|
43
|
+
p,
|
|
44
|
+
/* @__PURE__ */ e(
|
|
45
|
+
F,
|
|
46
|
+
{
|
|
47
|
+
onClickAway: (r) => {
|
|
48
|
+
r.preventDefault(), r.stopPropagation(), L && c();
|
|
49
|
+
},
|
|
50
|
+
children: /* @__PURE__ */ e(N, { in: !0, timeout: 350, children: /* @__PURE__ */ e(
|
|
51
|
+
O,
|
|
52
|
+
{
|
|
53
|
+
variant: "outlined",
|
|
54
|
+
sx: {
|
|
55
|
+
position: "fixed",
|
|
56
|
+
top: 20,
|
|
57
|
+
right: 20,
|
|
58
|
+
zIndex: 3e3,
|
|
59
|
+
borderRadius: 1.5,
|
|
60
|
+
width: 400,
|
|
61
|
+
maxWidth: "90vw",
|
|
62
|
+
borderColor: "divider",
|
|
63
|
+
border: "0 !important",
|
|
64
|
+
fontSize: "14px",
|
|
65
|
+
textAlign: "left",
|
|
66
|
+
boxShadow: ({ palette: r }) => `0px 8px 16px 0px ${r.grey[100]}, 0px 0px 0px 1px ${r.grey[100]}`
|
|
67
|
+
},
|
|
68
|
+
children: M ? /* @__PURE__ */ o(n, { sx: { display: "flex", flexDirection: "column" }, children: [
|
|
69
|
+
/* @__PURE__ */ o(
|
|
70
|
+
n,
|
|
71
|
+
{
|
|
72
|
+
sx: {
|
|
73
|
+
padding: "20px 24px",
|
|
74
|
+
marginLeft: 0,
|
|
75
|
+
display: "flex",
|
|
76
|
+
flexDirection: "row",
|
|
77
|
+
alignItems: "center",
|
|
78
|
+
justifyContent: "flex-start"
|
|
79
|
+
},
|
|
80
|
+
children: [
|
|
81
|
+
l || /* @__PURE__ */ e(I, { icon: "mdi:warning-box", style: { color: "yellowgreen", fontSize: 24 } }),
|
|
82
|
+
/* @__PURE__ */ e(n, { sx: { marginLeft: 1, fontSize: "16px", fontWeight: "bold" }, children: a("componentInstallerTitle") }),
|
|
83
|
+
/* @__PURE__ */ e(n, { sx: { flex: 1 } }),
|
|
84
|
+
s ? /* @__PURE__ */ e(C, { variant: "outlined", className: "button", onClick: c, children: /* @__PURE__ */ e(S, {}) }) : null
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
),
|
|
88
|
+
/* @__PURE__ */ e(n, { sx: { width: "100%", height: "1px", backgroundColor: "grey.100" } }),
|
|
89
|
+
/* @__PURE__ */ e(n, { sx: { maxHeight: "70vh", overflowY: "auto" }, children: g.map((r, y) => {
|
|
90
|
+
var w, b;
|
|
91
|
+
return /* @__PURE__ */ e(
|
|
92
|
+
$,
|
|
94
93
|
{
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
onClose ? /* @__PURE__ */ jsx(IconButton, { variant: "outlined", className: "button", onClick: handleClose, children: /* @__PURE__ */ jsx(CloseIcon, {}) }) : null
|
|
134
|
-
]
|
|
135
|
-
}
|
|
136
|
-
),
|
|
137
|
-
/* @__PURE__ */ jsx(Box, { sx: { width: "100%", height: "1px", backgroundColor: "grey.100" } }),
|
|
138
|
-
/* @__PURE__ */ jsx(Box, { sx: { maxHeight: "70vh", overflowY: "auto" }, children: optComponents.map((optionalComponent, index) => {
|
|
139
|
-
return /* @__PURE__ */ jsx(
|
|
140
|
-
InstallerItem,
|
|
141
|
-
{
|
|
142
|
-
t,
|
|
143
|
-
hasPermission,
|
|
144
|
-
index,
|
|
145
|
-
optionalComponent,
|
|
146
|
-
installStatus: installStatus[optionalComponent.meta?.did]
|
|
147
|
-
},
|
|
148
|
-
optionalComponent.meta?.did || index
|
|
149
|
-
);
|
|
150
|
-
}) }),
|
|
151
|
-
hasPermission ? null : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
152
|
-
/* @__PURE__ */ jsx(Box, { sx: { width: "100%", height: "1px", backgroundColor: "grey.100" } }),
|
|
153
|
-
/* @__PURE__ */ jsx(Box, { sx: { padding: "20px 24px" }, children: /* @__PURE__ */ jsx(Box, { sx: { opacity: 1 }, children: t("componentInstallerSuggestions") }) })
|
|
154
|
-
] })
|
|
94
|
+
t: a,
|
|
95
|
+
hasPermission: i,
|
|
96
|
+
index: y,
|
|
97
|
+
optionalComponent: r,
|
|
98
|
+
installStatus: h[(w = r.meta) == null ? void 0 : w.did]
|
|
99
|
+
},
|
|
100
|
+
((b = r.meta) == null ? void 0 : b.did) || y
|
|
101
|
+
);
|
|
102
|
+
}) }),
|
|
103
|
+
i ? null : /* @__PURE__ */ o(x, { children: [
|
|
104
|
+
/* @__PURE__ */ e(n, { sx: { width: "100%", height: "1px", backgroundColor: "grey.100" } }),
|
|
105
|
+
/* @__PURE__ */ e(n, { sx: { padding: "20px 24px" }, children: /* @__PURE__ */ e(n, { sx: { opacity: 1 }, children: a("componentInstallerSuggestions") }) })
|
|
106
|
+
] })
|
|
107
|
+
] }) : /* @__PURE__ */ o(n, { sx: { display: "flex", flexDirection: "column" }, children: [
|
|
108
|
+
/* @__PURE__ */ o(
|
|
109
|
+
n,
|
|
110
|
+
{
|
|
111
|
+
sx: {
|
|
112
|
+
padding: "20px 24px",
|
|
113
|
+
marginLeft: 0,
|
|
114
|
+
display: "flex",
|
|
115
|
+
alignItems: "center",
|
|
116
|
+
flexDirection: "row",
|
|
117
|
+
justifyContent: "flex-start"
|
|
118
|
+
},
|
|
119
|
+
children: [
|
|
120
|
+
l || /* @__PURE__ */ e(I, { icon: "mdi:warning-box", style: { color: "yellowgreen", fontSize: 24 } }),
|
|
121
|
+
/* @__PURE__ */ e(n, { sx: { marginLeft: 1, fontSize: "16px", fontWeight: "bold" }, children: a("componentInstallerTitle") }),
|
|
122
|
+
/* @__PURE__ */ e(n, { sx: { flex: 1 } }),
|
|
123
|
+
s ? /* @__PURE__ */ e(C, { variant: "outlined", className: "button", onClick: c, children: /* @__PURE__ */ e(S, {}) }) : null
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
),
|
|
127
|
+
/* @__PURE__ */ e(n, { sx: { width: "100%", height: "1px", backgroundColor: "grey.100" } }),
|
|
128
|
+
/* @__PURE__ */ o(n, { sx: { padding: "20px 24px", marginTop: 0 }, children: [
|
|
129
|
+
a("componentInstallerNoDefinedInBlockletYML"),
|
|
130
|
+
": ",
|
|
131
|
+
u
|
|
155
132
|
] })
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
} });
|
|
133
|
+
] })
|
|
134
|
+
}
|
|
135
|
+
) })
|
|
136
|
+
}
|
|
137
|
+
)
|
|
138
|
+
] }) });
|
|
162
139
|
}
|
|
163
|
-
|
|
164
|
-
disabled:
|
|
165
|
-
warnIcon:
|
|
166
|
-
did:
|
|
167
|
-
noPermissionMute:
|
|
168
|
-
onInstalled:
|
|
169
|
-
onError:
|
|
170
|
-
children:
|
|
171
|
-
closeByOutSize:
|
|
172
|
-
onClose:
|
|
173
|
-
fallback:
|
|
174
|
-
roles:
|
|
175
|
-
};
|
|
176
|
-
ComponentInstaller.defaultProps = {
|
|
177
|
-
disabled: false,
|
|
178
|
-
warnIcon: null,
|
|
179
|
-
noPermissionMute: false,
|
|
180
|
-
onInstalled: null,
|
|
181
|
-
onError: null,
|
|
182
|
-
closeByOutSize: false,
|
|
183
|
-
onClose: null,
|
|
184
|
-
fallback: null,
|
|
185
|
-
roles: ["owner", "admin"]
|
|
140
|
+
m.propTypes = {
|
|
141
|
+
disabled: t.bool,
|
|
142
|
+
warnIcon: t.node,
|
|
143
|
+
did: t.oneOfType([t.string, t.arrayOf(t.string)]).isRequired,
|
|
144
|
+
noPermissionMute: t.bool,
|
|
145
|
+
onInstalled: t.func,
|
|
146
|
+
onError: t.func,
|
|
147
|
+
children: t.any.isRequired,
|
|
148
|
+
closeByOutSize: t.bool,
|
|
149
|
+
onClose: t.func,
|
|
150
|
+
fallback: t.node,
|
|
151
|
+
roles: t.array
|
|
186
152
|
};
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
return /* @__PURE__ */ jsx(ComponentInstaller, { ...props });
|
|
190
|
-
}
|
|
191
|
-
return props.children;
|
|
153
|
+
function G(l) {
|
|
154
|
+
return window.blocklet ? /* @__PURE__ */ e(m, { ...l }) : l.children;
|
|
192
155
|
}
|
|
193
|
-
|
|
194
|
-
...
|
|
195
|
-
children:
|
|
156
|
+
G.propTypes = {
|
|
157
|
+
...m.propTypes,
|
|
158
|
+
children: t.any.isRequired
|
|
196
159
|
};
|
|
197
|
-
|
|
198
|
-
|
|
160
|
+
export {
|
|
161
|
+
G as default
|
|
199
162
|
};
|