@rebasepro/studio 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ApiExplorer-CdIwR9Ga.js +963 -0
- package/dist/ApiExplorer-CdIwR9Ga.js.map +1 -0
- package/dist/AuthSimulationSelector-iEZ-Or_1.js +56 -0
- package/dist/AuthSimulationSelector-iEZ-Or_1.js.map +1 -0
- package/dist/BranchesView-DncIRcZt.js +461 -0
- package/dist/BranchesView-DncIRcZt.js.map +1 -0
- package/dist/CronJobsView-4gdtJvoe.js +500 -0
- package/dist/CronJobsView-4gdtJvoe.js.map +1 -0
- package/dist/JSEditor-BhAbEjCP.js +1573 -0
- package/dist/JSEditor-BhAbEjCP.js.map +1 -0
- package/dist/LogsExplorer-CqtKILj8.js +240 -0
- package/dist/LogsExplorer-CqtKILj8.js.map +1 -0
- package/dist/MonacoEditor-COZqrIJ1.js +246 -0
- package/dist/MonacoEditor-COZqrIJ1.js.map +1 -0
- package/dist/RLSEditor-CTxYbBdW.js +1362 -0
- package/dist/RLSEditor-CTxYbBdW.js.map +1 -0
- package/dist/SQLEditor-BLuq_zDM.js +1964 -0
- package/dist/SQLEditor-BLuq_zDM.js.map +1 -0
- package/dist/SchemaVisualizer-BJK2u3C0.js +1068 -0
- package/dist/SchemaVisualizer-BJK2u3C0.js.map +1 -0
- package/dist/StorageView-nDaC2foF.js +1382 -0
- package/dist/StorageView-nDaC2foF.js.map +1 -0
- package/dist/{studio/src/components → components}/ApiExplorer/ApiExplorer.d.ts +2 -1
- package/dist/{studio/src/components → components}/ApiExplorer/EndpointDetail.d.ts +2 -1
- package/dist/{studio/src/components → components}/ApiExplorer/TryItPanel.d.ts +2 -1
- package/dist/{studio/src/components → components}/AuthSimulationSelector.d.ts +2 -1
- package/dist/components/Branches/BranchesView.d.ts +2 -0
- package/dist/components/CronJobs/CronJobsView.d.ts +2 -0
- package/dist/components/JSEditor/JSEditor.d.ts +2 -0
- package/dist/{studio/src/components → components}/JSEditor/JSEditorSidebar.d.ts +2 -1
- package/dist/{studio/src/components → components}/JSEditor/JSMonacoEditor.d.ts +2 -1
- package/dist/components/LogsExplorer/LogsExplorer.d.ts +2 -0
- package/dist/{studio/src/components → components}/RLSEditor/PolicyEditor.d.ts +2 -1
- package/dist/{studio/src/components → components}/RLSEditor/RLSEditor.d.ts +2 -1
- package/dist/{studio/src/components → components}/SQLEditor/MonacoEditor.d.ts +2 -1
- package/dist/{studio/src/components → components}/SQLEditor/SQLEditor.d.ts +2 -1
- package/dist/{studio/src/components → components}/SQLEditor/SQLEditorSidebar.d.ts +2 -1
- package/dist/{studio/src/components → components}/SQLEditor/SchemaBrowser.d.ts +2 -1
- package/dist/{studio/src/components → components}/SchemaVisualizer/RelationEdge.d.ts +1 -1
- package/dist/components/SchemaVisualizer/SchemaVisualizer.d.ts +3 -0
- package/dist/{studio/src/components → components}/SchemaVisualizer/TableNode.d.ts +1 -1
- package/dist/components/StorageView/StorageView.d.ts +2 -0
- package/dist/{studio/src/components → components}/StudioHomePage.d.ts +1 -1
- package/dist/index.es.js +688 -746
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +10303 -9572
- package/dist/index.umd.js.map +1 -1
- package/package.json +22 -22
- package/src/components/ApiExplorer/TryItPanel.tsx +15 -18
- package/src/components/CronJobs/CronJobsView.tsx +1 -1
- package/src/components/JSEditor/JSEditor.tsx +9 -14
- package/src/components/LogsExplorer/LogsExplorer.tsx +6 -3
- package/src/components/RLSEditor/PolicyEditor.tsx +0 -1
- package/src/components/SQLEditor/SQLEditor.tsx +40 -30
- package/src/components/StorageView/StorageView.tsx +22 -11
- package/src/components/StudioHomePage.tsx +51 -15
- package/src/utils/parseSpec.test.ts +41 -20
- package/src/utils/pgColumnToProperty.ts +1 -1
- package/dist/ApiExplorer-CGHEF1uL.js +0 -1052
- package/dist/ApiExplorer-CGHEF1uL.js.map +0 -1
- package/dist/AuthSimulationSelector-DGoXkWSg.js +0 -105
- package/dist/AuthSimulationSelector-DGoXkWSg.js.map +0 -1
- package/dist/BranchesView-BiTEwIhd.js +0 -291
- package/dist/BranchesView-BiTEwIhd.js.map +0 -1
- package/dist/CronJobsView-3PM_qR8v.js +0 -472
- package/dist/CronJobsView-3PM_qR8v.js.map +0 -1
- package/dist/JSEditor-DfwRLBZg.js +0 -1297
- package/dist/JSEditor-DfwRLBZg.js.map +0 -1
- package/dist/LogsExplorer-_4sZadKn.js +0 -162
- package/dist/LogsExplorer-_4sZadKn.js.map +0 -1
- package/dist/MonacoEditor-CMYEjiRf.js +0 -161
- package/dist/MonacoEditor-CMYEjiRf.js.map +0 -1
- package/dist/RLSEditor-CHEExeSB.js +0 -1871
- package/dist/RLSEditor-CHEExeSB.js.map +0 -1
- package/dist/SQLEditor-CQXaI0iU.js +0 -1797
- package/dist/SQLEditor-CQXaI0iU.js.map +0 -1
- package/dist/SchemaVisualizer-BGpmzyXT.js +0 -1069
- package/dist/SchemaVisualizer-BGpmzyXT.js.map +0 -1
- package/dist/StorageView-B7AsN2qX.js +0 -869
- package/dist/StorageView-B7AsN2qX.js.map +0 -1
- package/dist/common/src/collections/CollectionRegistry.d.ts +0 -56
- package/dist/common/src/collections/default-collections.d.ts +0 -9
- package/dist/common/src/collections/index.d.ts +0 -2
- package/dist/common/src/data/buildRebaseData.d.ts +0 -14
- package/dist/common/src/data/query_builder.d.ts +0 -55
- package/dist/common/src/index.d.ts +0 -4
- package/dist/common/src/util/builders.d.ts +0 -57
- package/dist/common/src/util/callbacks.d.ts +0 -6
- package/dist/common/src/util/collections.d.ts +0 -11
- package/dist/common/src/util/common.d.ts +0 -2
- package/dist/common/src/util/conditions.d.ts +0 -26
- package/dist/common/src/util/entities.d.ts +0 -58
- package/dist/common/src/util/enums.d.ts +0 -3
- package/dist/common/src/util/index.d.ts +0 -16
- package/dist/common/src/util/navigation_from_path.d.ts +0 -34
- package/dist/common/src/util/navigation_utils.d.ts +0 -20
- package/dist/common/src/util/parent_references_from_path.d.ts +0 -6
- package/dist/common/src/util/paths.d.ts +0 -14
- package/dist/common/src/util/permissions.d.ts +0 -14
- package/dist/common/src/util/references.d.ts +0 -2
- package/dist/common/src/util/relations.d.ts +0 -22
- package/dist/common/src/util/resolutions.d.ts +0 -72
- package/dist/common/src/util/storage.d.ts +0 -24
- package/dist/core/src/components/AIIcon.d.ts +0 -16
- package/dist/core/src/components/BootstrapAdminBanner.d.ts +0 -4
- package/dist/core/src/components/ConfirmationDialog.d.ts +0 -9
- package/dist/core/src/components/Debug/UIReferenceView.d.ts +0 -1
- package/dist/core/src/components/Debug/UIStyleGuide.d.ts +0 -1
- package/dist/core/src/components/ErrorTooltip.d.ts +0 -2
- package/dist/core/src/components/ErrorView.d.ts +0 -21
- package/dist/core/src/components/LanguageToggle.d.ts +0 -1
- package/dist/core/src/components/LoginView/LoginView.d.ts +0 -109
- package/dist/core/src/components/LoginView/index.d.ts +0 -2
- package/dist/core/src/components/NotFoundPage.d.ts +0 -1
- package/dist/core/src/components/RebaseAuth.d.ts +0 -10
- package/dist/core/src/components/RebaseLogo.d.ts +0 -7
- package/dist/core/src/components/UnsavedChangesDialog.d.ts +0 -9
- package/dist/core/src/components/UserDisplay.d.ts +0 -7
- package/dist/core/src/components/UserSelectPopover.d.ts +0 -62
- package/dist/core/src/components/UserSettingsView.d.ts +0 -1
- package/dist/core/src/components/common/index.d.ts +0 -6
- package/dist/core/src/components/common/table_height.d.ts +0 -5
- package/dist/core/src/components/common/types.d.ts +0 -66
- package/dist/core/src/components/common/useColumnsIds.d.ts +0 -9
- package/dist/core/src/components/common/useDataTableController.d.ts +0 -45
- package/dist/core/src/components/common/useDebouncedData.d.ts +0 -9
- package/dist/core/src/components/common/useScrollRestoration.d.ts +0 -14
- package/dist/core/src/components/index.d.ts +0 -17
- package/dist/core/src/contexts/AdminModeController.d.ts +0 -4
- package/dist/core/src/contexts/AnalyticsContext.d.ts +0 -3
- package/dist/core/src/contexts/AuthControllerContext.d.ts +0 -3
- package/dist/core/src/contexts/CustomizationControllerContext.d.ts +0 -3
- package/dist/core/src/contexts/DataDriverContext.d.ts +0 -3
- package/dist/core/src/contexts/DatabaseAdminContext.d.ts +0 -3
- package/dist/core/src/contexts/DialogsProvider.d.ts +0 -4
- package/dist/core/src/contexts/EffectiveRoleController.d.ts +0 -4
- package/dist/core/src/contexts/InternalUserManagementContext.d.ts +0 -3
- package/dist/core/src/contexts/ModeController.d.ts +0 -4
- package/dist/core/src/contexts/RebaseClientInstanceContext.d.ts +0 -6
- package/dist/core/src/contexts/RebaseDataContext.d.ts +0 -3
- package/dist/core/src/contexts/SnackbarProvider.d.ts +0 -2
- package/dist/core/src/contexts/StorageSourceContext.d.ts +0 -3
- package/dist/core/src/contexts/UserConfigurationPersistenceContext.d.ts +0 -3
- package/dist/core/src/contexts/index.d.ts +0 -13
- package/dist/core/src/core/PluginLifecycleManager.d.ts +0 -17
- package/dist/core/src/core/PluginProviderStack.d.ts +0 -21
- package/dist/core/src/core/Rebase.d.ts +0 -14
- package/dist/core/src/core/RebaseProps.d.ts +0 -147
- package/dist/core/src/core/RebaseRouter.d.ts +0 -4
- package/dist/core/src/core/RebaseRoutes.d.ts +0 -17
- package/dist/core/src/core/index.d.ts +0 -4
- package/dist/core/src/hooks/ApiConfigContext.d.ts +0 -24
- package/dist/core/src/hooks/data/delete.d.ts +0 -31
- package/dist/core/src/hooks/data/save.d.ts +0 -34
- package/dist/core/src/hooks/data/useCollectionFetch.d.ts +0 -62
- package/dist/core/src/hooks/data/useData.d.ts +0 -13
- package/dist/core/src/hooks/data/useDataOrder.d.ts +0 -12
- package/dist/core/src/hooks/data/useEntityFetch.d.ts +0 -43
- package/dist/core/src/hooks/data/useRelationSelector.d.ts +0 -52
- package/dist/core/src/hooks/data/useUserSelector.d.ts +0 -31
- package/dist/core/src/hooks/index.d.ts +0 -37
- package/dist/core/src/hooks/useAdminModeController.d.ts +0 -19
- package/dist/core/src/hooks/useAnalyticsController.d.ts +0 -5
- package/dist/core/src/hooks/useAuthController.d.ts +0 -11
- package/dist/core/src/hooks/useAuthSubscription.d.ts +0 -2
- package/dist/core/src/hooks/useBackendStorageSource.d.ts +0 -30
- package/dist/core/src/hooks/useBridgeRegistration.d.ts +0 -18
- package/dist/core/src/hooks/useBrowserTitleAndIcon.d.ts +0 -6
- package/dist/core/src/hooks/useBuildAdminModeController.d.ts +0 -6
- package/dist/core/src/hooks/useBuildEffectiveRoleController.d.ts +0 -8
- package/dist/core/src/hooks/useBuildLocalConfigurationPersistence.d.ts +0 -2
- package/dist/core/src/hooks/useBuildModeController.d.ts +0 -6
- package/dist/core/src/hooks/useClipboard.d.ts +0 -57
- package/dist/core/src/hooks/useCollapsedGroups.d.ts +0 -27
- package/dist/core/src/hooks/useCustomizationController.d.ts +0 -11
- package/dist/core/src/hooks/useDialogsController.d.ts +0 -11
- package/dist/core/src/hooks/useEffectiveRoleController.d.ts +0 -7
- package/dist/core/src/hooks/useInternalUserManagementController.d.ts +0 -12
- package/dist/core/src/hooks/useLargeLayout.d.ts +0 -1
- package/dist/core/src/hooks/useModeController.d.ts +0 -19
- package/dist/core/src/hooks/usePermissions.d.ts +0 -12
- package/dist/core/src/hooks/useRebaseClient.d.ts +0 -5
- package/dist/core/src/hooks/useRebaseContext.d.ts +0 -11
- package/dist/core/src/hooks/useRebaseRegistry.d.ts +0 -34
- package/dist/core/src/hooks/useResolvedComponent.d.ts +0 -47
- package/dist/core/src/hooks/useSlot.d.ts +0 -18
- package/dist/core/src/hooks/useSnackbarController.d.ts +0 -20
- package/dist/core/src/hooks/useStorageSource.d.ts +0 -7
- package/dist/core/src/hooks/useStudioBridge.d.ts +0 -91
- package/dist/core/src/hooks/useTranslation.d.ts +0 -17
- package/dist/core/src/hooks/useUnsavedChangesDialog.d.ts +0 -12
- package/dist/core/src/hooks/useUserConfigurationPersistence.d.ts +0 -8
- package/dist/core/src/i18n/RebaseI18nProvider.d.ts +0 -33
- package/dist/core/src/index.d.ts +0 -15
- package/dist/core/src/internal/common.d.ts +0 -3
- package/dist/core/src/internal/useRestoreScroll.d.ts +0 -6
- package/dist/core/src/locales/de.d.ts +0 -2
- package/dist/core/src/locales/en.d.ts +0 -10
- package/dist/core/src/locales/es.d.ts +0 -10
- package/dist/core/src/locales/fr.d.ts +0 -2
- package/dist/core/src/locales/hi.d.ts +0 -2
- package/dist/core/src/locales/it.d.ts +0 -2
- package/dist/core/src/locales/pt.d.ts +0 -7
- package/dist/core/src/util/constants.d.ts +0 -1
- package/dist/core/src/util/createFormexStub.d.ts +0 -2
- package/dist/core/src/util/entity_cache.d.ts +0 -22
- package/dist/core/src/util/enums.d.ts +0 -5
- package/dist/core/src/util/icon_list.d.ts +0 -5
- package/dist/core/src/util/icons.d.ts +0 -20
- package/dist/core/src/util/index.d.ts +0 -8
- package/dist/core/src/util/previews.d.ts +0 -4
- package/dist/core/src/util/useStorageUploadController.d.ts +0 -38
- package/dist/formex/src/Field.d.ts +0 -52
- package/dist/formex/src/Formex.d.ts +0 -7
- package/dist/formex/src/index.d.ts +0 -5
- package/dist/formex/src/types.d.ts +0 -40
- package/dist/formex/src/useCreateFormex.d.ts +0 -14
- package/dist/formex/src/utils.d.ts +0 -16
- package/dist/studio/src/components/Branches/BranchesView.d.ts +0 -1
- package/dist/studio/src/components/CronJobs/CronJobsView.d.ts +0 -1
- package/dist/studio/src/components/JSEditor/JSEditor.d.ts +0 -1
- package/dist/studio/src/components/LogsExplorer/LogsExplorer.d.ts +0 -1
- package/dist/studio/src/components/SchemaVisualizer/SchemaVisualizer.d.ts +0 -2
- package/dist/studio/src/components/StorageView/StorageView.d.ts +0 -1
- package/dist/types/src/controllers/analytics_controller.d.ts +0 -7
- package/dist/types/src/controllers/auth.d.ts +0 -104
- package/dist/types/src/controllers/client.d.ts +0 -168
- package/dist/types/src/controllers/collection_registry.d.ts +0 -46
- package/dist/types/src/controllers/customization_controller.d.ts +0 -60
- package/dist/types/src/controllers/data.d.ts +0 -207
- package/dist/types/src/controllers/data_driver.d.ts +0 -218
- package/dist/types/src/controllers/database_admin.d.ts +0 -11
- package/dist/types/src/controllers/dialogs_controller.d.ts +0 -36
- package/dist/types/src/controllers/effective_role.d.ts +0 -4
- package/dist/types/src/controllers/email.d.ts +0 -36
- package/dist/types/src/controllers/index.d.ts +0 -18
- package/dist/types/src/controllers/local_config_persistence.d.ts +0 -20
- package/dist/types/src/controllers/navigation.d.ts +0 -225
- package/dist/types/src/controllers/registry.d.ts +0 -63
- package/dist/types/src/controllers/side_dialogs_controller.d.ts +0 -67
- package/dist/types/src/controllers/side_entity_controller.d.ts +0 -97
- package/dist/types/src/controllers/snackbar.d.ts +0 -24
- package/dist/types/src/controllers/storage.d.ts +0 -171
- package/dist/types/src/index.d.ts +0 -4
- package/dist/types/src/rebase_context.d.ts +0 -122
- package/dist/types/src/types/auth_adapter.d.ts +0 -301
- package/dist/types/src/types/backend.d.ts +0 -571
- package/dist/types/src/types/backend_hooks.d.ts +0 -172
- package/dist/types/src/types/builders.d.ts +0 -15
- package/dist/types/src/types/chips.d.ts +0 -5
- package/dist/types/src/types/collections.d.ts +0 -961
- package/dist/types/src/types/component_ref.d.ts +0 -47
- package/dist/types/src/types/cron.d.ts +0 -102
- package/dist/types/src/types/data_source.d.ts +0 -64
- package/dist/types/src/types/database_adapter.d.ts +0 -94
- package/dist/types/src/types/entities.d.ts +0 -145
- package/dist/types/src/types/entity_actions.d.ts +0 -104
- package/dist/types/src/types/entity_callbacks.d.ts +0 -173
- package/dist/types/src/types/entity_link_builder.d.ts +0 -7
- package/dist/types/src/types/entity_overrides.d.ts +0 -10
- package/dist/types/src/types/entity_views.d.ts +0 -87
- package/dist/types/src/types/export_import.d.ts +0 -21
- package/dist/types/src/types/formex.d.ts +0 -40
- package/dist/types/src/types/index.d.ts +0 -28
- package/dist/types/src/types/locales.d.ts +0 -4
- package/dist/types/src/types/modify_collections.d.ts +0 -5
- package/dist/types/src/types/plugins.d.ts +0 -282
- package/dist/types/src/types/properties.d.ts +0 -1173
- package/dist/types/src/types/property_config.d.ts +0 -74
- package/dist/types/src/types/relations.d.ts +0 -336
- package/dist/types/src/types/slots.d.ts +0 -262
- package/dist/types/src/types/translations.d.ts +0 -900
- package/dist/types/src/types/user_management_delegate.d.ts +0 -86
- package/dist/types/src/types/websockets.d.ts +0 -78
- package/dist/types/src/users/index.d.ts +0 -1
- package/dist/types/src/users/user.d.ts +0 -50
- package/dist/ui/src/components/Alert.d.ts +0 -12
- package/dist/ui/src/components/Autocomplete.d.ts +0 -21
- package/dist/ui/src/components/Avatar.d.ts +0 -11
- package/dist/ui/src/components/Badge.d.ts +0 -8
- package/dist/ui/src/components/BooleanSwitch.d.ts +0 -14
- package/dist/ui/src/components/BooleanSwitchWithLabel.d.ts +0 -17
- package/dist/ui/src/components/Button.d.ts +0 -14
- package/dist/ui/src/components/Card.d.ts +0 -8
- package/dist/ui/src/components/CenteredView.d.ts +0 -9
- package/dist/ui/src/components/Checkbox.d.ts +0 -13
- package/dist/ui/src/components/Chip.d.ts +0 -26
- package/dist/ui/src/components/CircularProgress.d.ts +0 -5
- package/dist/ui/src/components/CircularProgressCenter.d.ts +0 -11
- package/dist/ui/src/components/Collapse.d.ts +0 -9
- package/dist/ui/src/components/ColorPicker.d.ts +0 -30
- package/dist/ui/src/components/Container.d.ts +0 -8
- package/dist/ui/src/components/DateTimeField.d.ts +0 -24
- package/dist/ui/src/components/DebouncedTextField.d.ts +0 -2
- package/dist/ui/src/components/Dialog.d.ts +0 -39
- package/dist/ui/src/components/DialogActions.d.ts +0 -7
- package/dist/ui/src/components/DialogContent.d.ts +0 -7
- package/dist/ui/src/components/DialogTitle.d.ts +0 -10
- package/dist/ui/src/components/ErrorBoundary.d.ts +0 -33
- package/dist/ui/src/components/ExpandablePanel.d.ts +0 -12
- package/dist/ui/src/components/FileUpload.d.ts +0 -23
- package/dist/ui/src/components/FilterChip.d.ts +0 -34
- package/dist/ui/src/components/IconButton.d.ts +0 -12
- package/dist/ui/src/components/InfoLabel.d.ts +0 -5
- package/dist/ui/src/components/InputLabel.d.ts +0 -11
- package/dist/ui/src/components/Label.d.ts +0 -7
- package/dist/ui/src/components/LoadingButton.d.ts +0 -7
- package/dist/ui/src/components/Markdown.d.ts +0 -10
- package/dist/ui/src/components/Menu.d.ts +0 -23
- package/dist/ui/src/components/Menubar.d.ts +0 -80
- package/dist/ui/src/components/MultiSelect.d.ts +0 -48
- package/dist/ui/src/components/Paper.d.ts +0 -6
- package/dist/ui/src/components/Popover.d.ts +0 -24
- package/dist/ui/src/components/RadioGroup.d.ts +0 -28
- package/dist/ui/src/components/ResizablePanels.d.ts +0 -18
- package/dist/ui/src/components/SearchBar.d.ts +0 -26
- package/dist/ui/src/components/Select.d.ts +0 -43
- package/dist/ui/src/components/Separator.d.ts +0 -5
- package/dist/ui/src/components/Sheet.d.ts +0 -22
- package/dist/ui/src/components/Skeleton.d.ts +0 -6
- package/dist/ui/src/components/Slider.d.ts +0 -21
- package/dist/ui/src/components/Table.d.ts +0 -34
- package/dist/ui/src/components/Tabs.d.ts +0 -19
- package/dist/ui/src/components/TextField.d.ts +0 -58
- package/dist/ui/src/components/TextareaAutosize.d.ts +0 -43
- package/dist/ui/src/components/ToggleButtonGroup.d.ts +0 -30
- package/dist/ui/src/components/Tooltip.d.ts +0 -19
- package/dist/ui/src/components/Typography.d.ts +0 -36
- package/dist/ui/src/components/VirtualTable/VirtualTable.d.ts +0 -11
- package/dist/ui/src/components/VirtualTable/VirtualTableCell.d.ts +0 -21
- package/dist/ui/src/components/VirtualTable/VirtualTableHeader.d.ts +0 -29
- package/dist/ui/src/components/VirtualTable/VirtualTableHeaderRow.d.ts +0 -2
- package/dist/ui/src/components/VirtualTable/VirtualTableProps.d.ts +0 -249
- package/dist/ui/src/components/VirtualTable/VirtualTableRow.d.ts +0 -3
- package/dist/ui/src/components/VirtualTable/index.d.ts +0 -3
- package/dist/ui/src/components/VirtualTable/types.d.ts +0 -38
- package/dist/ui/src/components/common/SelectInputLabel.d.ts +0 -5
- package/dist/ui/src/components/index.d.ts +0 -58
- package/dist/ui/src/hooks/PortalContainerContext.d.ts +0 -31
- package/dist/ui/src/hooks/index.d.ts +0 -6
- package/dist/ui/src/hooks/useDebounceCallback.d.ts +0 -1
- package/dist/ui/src/hooks/useDebounceValue.d.ts +0 -1
- package/dist/ui/src/hooks/useDebouncedCallback.d.ts +0 -1
- package/dist/ui/src/hooks/useInjectStyles.d.ts +0 -7
- package/dist/ui/src/hooks/useOutsideAlerter.d.ts +0 -5
- package/dist/ui/src/icons/GitHubIcon.d.ts +0 -2
- package/dist/ui/src/icons/HandleIcon.d.ts +0 -1
- package/dist/ui/src/icons/Icon.d.ts +0 -20
- package/dist/ui/src/icons/cool_icon_keys.d.ts +0 -1
- package/dist/ui/src/icons/icon_keys.d.ts +0 -1
- package/dist/ui/src/icons/index.d.ts +0 -8
- package/dist/ui/src/index.d.ts +0 -5
- package/dist/ui/src/styles.d.ts +0 -12
- package/dist/ui/src/util/chip_colors.d.ts +0 -4
- package/dist/ui/src/util/cls.d.ts +0 -2
- package/dist/ui/src/util/debounce.d.ts +0 -10
- package/dist/ui/src/util/hash.d.ts +0 -1
- package/dist/ui/src/util/index.d.ts +0 -4
- package/dist/ui/src/util/key_to_icon_component.d.ts +0 -1
- /package/dist/{studio/src/components → components}/ApiExplorer/parseSpec.d.ts +0 -0
- /package/dist/{studio/src/components → components}/ApiExplorer/types.d.ts +0 -0
- /package/dist/{studio/src/components → components}/RLSEditor/index.d.ts +0 -0
- /package/dist/{studio/src/components → components}/RebaseStudio.d.ts +0 -0
- /package/dist/{studio/src/components → components}/SQLEditor/ExplainVisualizer.d.ts +0 -0
- /package/dist/{studio/src/components → components}/SchemaVisualizer/schema-visualizer.utils.d.ts +0 -0
- /package/dist/{studio/src/components → components}/SchemaVisualizer/useSchemaGraph.d.ts +0 -0
- /package/dist/{studio/src/index.d.ts → index.d.ts} +0 -0
- /package/dist/{studio/src/utils → utils}/pgColumnToProperty.d.ts +0 -0
- /package/dist/{studio/src/utils → utils}/sql_utils.d.ts +0 -0
|
@@ -1,869 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import React, { useState, useRef, useEffect, useCallback, useMemo } from "react";
|
|
3
|
-
import { Tooltip, IconButton, ArrowLeftIcon, iconSize, Typography, Button, cls, Trash2Icon, XIcon, Chip, LayoutGridIcon, ListIcon, defaultBorderMixin, RefreshCwIcon, FolderPlusIcon, UploadCloudIcon, Dialog, DialogContent, DialogActions, LoadingButton, TextField, CircularProgress, PlusIcon, Checkbox, FolderIcon, DownloadIcon, Music2Icon, CheckIcon, CopyIcon, DialogTitle, FileUpload, FileTextIcon, ImageIcon, VideoIcon } from "@rebasepro/ui";
|
|
4
|
-
import { useStorageSource, useSnackbarController, useApiConfig, ErrorView } from "@rebasepro/core";
|
|
5
|
-
import { useSearchParams } from "react-router-dom";
|
|
6
|
-
import { useDropzone } from "react-dropzone";
|
|
7
|
-
function formatFileSize(bytes) {
|
|
8
|
-
if (bytes < 1024) return `${bytes} B`;
|
|
9
|
-
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
|
|
10
|
-
if (bytes < 1024 * 1024 * 1024) return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
11
|
-
return `${(bytes / (1024 * 1024 * 1024)).toFixed(2)} GB`;
|
|
12
|
-
}
|
|
13
|
-
function getFileIcon(contentType) {
|
|
14
|
-
if (!contentType) return FileTextIcon;
|
|
15
|
-
if (contentType.startsWith("image/")) return ImageIcon;
|
|
16
|
-
if (contentType.startsWith("video/")) return VideoIcon;
|
|
17
|
-
if (contentType.startsWith("audio/")) return Music2Icon;
|
|
18
|
-
return FileTextIcon;
|
|
19
|
-
}
|
|
20
|
-
function getExtension(name) {
|
|
21
|
-
const parts = name.split(".");
|
|
22
|
-
return parts.length > 1 ? parts[parts.length - 1].toUpperCase() : "";
|
|
23
|
-
}
|
|
24
|
-
function breadcrumbSegments(path) {
|
|
25
|
-
if (!path || path === "/") return [{
|
|
26
|
-
label: "Root",
|
|
27
|
-
path: ""
|
|
28
|
-
}];
|
|
29
|
-
const parts = path.split("/").filter(Boolean);
|
|
30
|
-
const segments = [{
|
|
31
|
-
label: "Root",
|
|
32
|
-
path: ""
|
|
33
|
-
}];
|
|
34
|
-
let accumulated = "";
|
|
35
|
-
for (const part of parts) {
|
|
36
|
-
accumulated = accumulated ? `${accumulated}/${part}` : part;
|
|
37
|
-
segments.push({
|
|
38
|
-
label: part,
|
|
39
|
-
path: accumulated
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
return segments;
|
|
43
|
-
}
|
|
44
|
-
function UploadDialog({
|
|
45
|
-
open,
|
|
46
|
-
currentPath,
|
|
47
|
-
onClose,
|
|
48
|
-
onUpload
|
|
49
|
-
}) {
|
|
50
|
-
const [uploading, setUploading] = useState(false);
|
|
51
|
-
const [selectedFiles, setSelectedFiles] = useState([]);
|
|
52
|
-
const [error, setError] = useState(null);
|
|
53
|
-
const handleFilesAdded = useCallback((files) => {
|
|
54
|
-
setSelectedFiles((prev) => [...prev, ...files]);
|
|
55
|
-
}, []);
|
|
56
|
-
const handleRemoveFile = useCallback((index) => {
|
|
57
|
-
setSelectedFiles((prev_0) => prev_0.filter((_, i) => i !== index));
|
|
58
|
-
}, []);
|
|
59
|
-
const handleUpload = useCallback(async () => {
|
|
60
|
-
if (selectedFiles.length === 0) return;
|
|
61
|
-
setUploading(true);
|
|
62
|
-
setError(null);
|
|
63
|
-
try {
|
|
64
|
-
await onUpload(selectedFiles);
|
|
65
|
-
setSelectedFiles([]);
|
|
66
|
-
onClose();
|
|
67
|
-
} catch (err) {
|
|
68
|
-
setError(err instanceof Error ? err.message : "Upload failed");
|
|
69
|
-
} finally {
|
|
70
|
-
setUploading(false);
|
|
71
|
-
}
|
|
72
|
-
}, [selectedFiles, onUpload, onClose]);
|
|
73
|
-
const handleClose = useCallback(() => {
|
|
74
|
-
if (!uploading) {
|
|
75
|
-
setSelectedFiles([]);
|
|
76
|
-
setError(null);
|
|
77
|
-
onClose();
|
|
78
|
-
}
|
|
79
|
-
}, [uploading, onClose]);
|
|
80
|
-
return /* @__PURE__ */ jsxs(Dialog, { open, onOpenChange: (o) => !o && handleClose(), maxWidth: "md", children: [
|
|
81
|
-
/* @__PURE__ */ jsxs(DialogTitle, { children: [
|
|
82
|
-
"Upload Files",
|
|
83
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-text-secondary dark:text-text-secondary-dark mt-0.5 block", children: [
|
|
84
|
-
"to ",
|
|
85
|
-
/* @__PURE__ */ jsxs("span", { className: "font-mono text-primary", children: [
|
|
86
|
-
"/",
|
|
87
|
-
currentPath || "root"
|
|
88
|
-
] })
|
|
89
|
-
] })
|
|
90
|
-
] }),
|
|
91
|
-
/* @__PURE__ */ jsxs(DialogContent, { className: "space-y-4", children: [
|
|
92
|
-
/* @__PURE__ */ jsx(FileUpload, { onFilesAdded: handleFilesAdded, size: "large", uploadDescription: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center pointer-events-none", children: [
|
|
93
|
-
/* @__PURE__ */ jsx(UploadCloudIcon, { className: "text-surface-accent-400 mb-2 w-8 h-8" }),
|
|
94
|
-
/* @__PURE__ */ jsx(Typography, { variant: "label", children: "Drop files here or click to browse" }),
|
|
95
|
-
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: "Any file type supported" })
|
|
96
|
-
] }) }),
|
|
97
|
-
error && /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-red-500 block whitespace-pre-line", children: error }),
|
|
98
|
-
selectedFiles.length > 0 && /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
99
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "secondary", children: [
|
|
100
|
-
"Selected files (",
|
|
101
|
-
selectedFiles.length,
|
|
102
|
-
")"
|
|
103
|
-
] }),
|
|
104
|
-
/* @__PURE__ */ jsx("div", { className: "max-h-40 overflow-auto space-y-1", children: selectedFiles.map((file, index_0) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between p-2 rounded bg-surface-100 dark:bg-surface-800", children: [
|
|
105
|
-
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0 mr-2", children: [
|
|
106
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "truncate", children: file.name }),
|
|
107
|
-
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: formatFileSize(file.size) })
|
|
108
|
-
] }),
|
|
109
|
-
/* @__PURE__ */ jsx(IconButton, { size: "small", onClick: (e) => {
|
|
110
|
-
e.stopPropagation();
|
|
111
|
-
handleRemoveFile(index_0);
|
|
112
|
-
}, disabled: uploading, children: /* @__PURE__ */ jsx(XIcon, { size: 14 }) })
|
|
113
|
-
] }, `${file.name}-${index_0}`)) })
|
|
114
|
-
] })
|
|
115
|
-
] }),
|
|
116
|
-
/* @__PURE__ */ jsxs(DialogActions, { children: [
|
|
117
|
-
/* @__PURE__ */ jsx(Button, { variant: "text", onClick: handleClose, disabled: uploading, children: "Cancel" }),
|
|
118
|
-
/* @__PURE__ */ jsx(Button, { variant: "filled", onClick: handleUpload, disabled: selectedFiles.length === 0 || uploading, startIcon: uploading ? /* @__PURE__ */ jsx(CircularProgress, { size: "smallest" }) : /* @__PURE__ */ jsx(UploadCloudIcon, { size: 14 }), children: uploading ? "Uploading..." : `Upload${selectedFiles.length > 0 ? ` (${selectedFiles.length})` : ""}` })
|
|
119
|
-
] })
|
|
120
|
-
] });
|
|
121
|
-
}
|
|
122
|
-
function FilePreviewPanel({
|
|
123
|
-
file,
|
|
124
|
-
onClose,
|
|
125
|
-
onDelete,
|
|
126
|
-
downloadUrl
|
|
127
|
-
}) {
|
|
128
|
-
file.contentType?.startsWith("image/");
|
|
129
|
-
file.contentType?.startsWith("video/");
|
|
130
|
-
file.contentType?.startsWith("audio/");
|
|
131
|
-
const FileIconComponent = getFileIcon(file.contentType);
|
|
132
|
-
const [deleteDialogOpen, setDeleteDialogOpen] = useState(false);
|
|
133
|
-
const [urlCopied, setUrlCopied] = useState(false);
|
|
134
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
135
|
-
/* @__PURE__ */ jsxs("div", { className: cls("flex flex-col h-full border-l", defaultBorderMixin, "bg-white dark:bg-surface-800"), children: [
|
|
136
|
-
/* @__PURE__ */ jsxs("div", { className: cls("flex items-center justify-between p-3 border-b shrink-0", defaultBorderMixin), children: [
|
|
137
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "font-medium truncate flex-1 mr-2", children: file.name }),
|
|
138
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-0.5", children: [
|
|
139
|
-
downloadUrl && /* @__PURE__ */ jsx(Tooltip, { title: "Download", children: /* @__PURE__ */ jsx(IconButton, { size: "small", onClick: () => window.open(downloadUrl, "_blank"), children: /* @__PURE__ */ jsx(DownloadIcon, { size: iconSize.smallest }) }) }),
|
|
140
|
-
/* @__PURE__ */ jsx(Tooltip, { title: "Delete", children: /* @__PURE__ */ jsx(IconButton, { size: "small", onClick: () => setDeleteDialogOpen(true), className: "text-red-500 hover:bg-red-50 dark:hover:bg-red-900/20", children: /* @__PURE__ */ jsx(Trash2Icon, { size: iconSize.smallest }) }) }),
|
|
141
|
-
/* @__PURE__ */ jsx(IconButton, { size: "small", onClick: onClose, children: /* @__PURE__ */ jsx(XIcon, { size: iconSize.smallest }) })
|
|
142
|
-
] })
|
|
143
|
-
] }),
|
|
144
|
-
/* @__PURE__ */ jsx("div", { className: "flex-1 overflow-auto", children: /* @__PURE__ */ jsx("div", { className: cls("flex flex-col items-center justify-center min-h-[200px] p-4 bg-surface-50 dark:bg-surface-800 border-b", defaultBorderMixin), children: (() => {
|
|
145
|
-
const ext = getExtension(file.name)?.toLowerCase() || "";
|
|
146
|
-
const isImage_0 = file.contentType?.startsWith("image/") || ["jpg", "jpeg", "png", "gif", "webp", "svg"].includes(ext);
|
|
147
|
-
const isVideo_0 = file.contentType?.startsWith("video/") || ["mp4", "webm", "ogg", "mov"].includes(ext);
|
|
148
|
-
const isAudio_0 = file.contentType?.startsWith("audio/") || ["mp3", "wav", "ogg", "m4a"].includes(ext);
|
|
149
|
-
const downloadUrl_0 = file.downloadUrl;
|
|
150
|
-
if (isImage_0 && downloadUrl_0) {
|
|
151
|
-
return /* @__PURE__ */ jsx("img", { src: downloadUrl_0, alt: file.name, className: "max-w-full max-h-[400px] object-contain rounded-md shadow-sm" });
|
|
152
|
-
} else if (isVideo_0 && downloadUrl_0) {
|
|
153
|
-
return /* @__PURE__ */ jsx("video", { src: downloadUrl_0, className: "max-w-full max-h-[400px] rounded-md", controls: true });
|
|
154
|
-
} else if (isAudio_0 && downloadUrl_0) {
|
|
155
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-4", children: [
|
|
156
|
-
/* @__PURE__ */ jsx(Music2Icon, { className: "text-surface-accent-400 w-10 h-10" }),
|
|
157
|
-
/* @__PURE__ */ jsx("audio", { src: downloadUrl_0, controls: true, className: "w-full max-w-xs" })
|
|
158
|
-
] });
|
|
159
|
-
} else {
|
|
160
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-3 text-surface-accent-400", children: [
|
|
161
|
-
/* @__PURE__ */ jsx(FileIconComponent, { className: "w-10 h-10" }),
|
|
162
|
-
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-text-disabled dark:text-text-disabled-dark", children: "No preview available" })
|
|
163
|
-
] });
|
|
164
|
-
}
|
|
165
|
-
})() }) }),
|
|
166
|
-
/* @__PURE__ */ jsxs("div", { className: "p-4 space-y-3", children: [
|
|
167
|
-
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-text-disabled dark:text-text-disabled-dark text-[10px] uppercase tracking-wider font-bold mb-1 block", children: "File Info" }) }),
|
|
168
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-3", children: [
|
|
169
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
170
|
-
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-surface-accent-500 text-[11px]", children: "Name" }),
|
|
171
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-[13px] break-all", children: file.name })
|
|
172
|
-
] }),
|
|
173
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
174
|
-
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-surface-accent-500 text-[11px]", children: "Type" }),
|
|
175
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-[13px]", children: file.contentType || "Unknown" })
|
|
176
|
-
] }),
|
|
177
|
-
file.size !== void 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
178
|
-
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-surface-accent-500 text-[11px]", children: "Size" }),
|
|
179
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-[13px]", children: formatFileSize(file.size) })
|
|
180
|
-
] }),
|
|
181
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
182
|
-
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-surface-accent-500 text-[11px]", children: "Extension" }),
|
|
183
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-[13px] font-mono", children: getExtension(file.name) || "—" })
|
|
184
|
-
] }),
|
|
185
|
-
/* @__PURE__ */ jsxs("div", { className: "col-span-2", children: [
|
|
186
|
-
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-surface-accent-500 text-[11px]", children: "Path" }),
|
|
187
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-[13px] font-mono break-all", children: file.fullPath })
|
|
188
|
-
] })
|
|
189
|
-
] }),
|
|
190
|
-
downloadUrl && /* @__PURE__ */ jsxs("div", { className: "pt-2", children: [
|
|
191
|
-
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-surface-accent-500 text-[11px] block mb-1", children: "URL" }),
|
|
192
|
-
/* @__PURE__ */ jsxs("div", { className: cls("flex items-center gap-2 p-2 rounded cursor-pointer transition-colors", "bg-surface-100 dark:bg-surface-800 hover:bg-surface-200 dark:hover:bg-surface-700"), onClick: () => {
|
|
193
|
-
const fullUrl = downloadUrl.startsWith("http") ? downloadUrl : `${window.location.origin}${downloadUrl.startsWith("/") ? "" : "/"}${downloadUrl}`;
|
|
194
|
-
navigator.clipboard.writeText(fullUrl).then(() => {
|
|
195
|
-
setUrlCopied(true);
|
|
196
|
-
setTimeout(() => setUrlCopied(false), 2e3);
|
|
197
|
-
});
|
|
198
|
-
}, children: [
|
|
199
|
-
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "font-mono text-[11px] truncate flex-1 min-w-0 text-primary", children: (() => {
|
|
200
|
-
const fullUrl_0 = downloadUrl.startsWith("http") ? downloadUrl : `${window.location.origin}${downloadUrl.startsWith("/") ? "" : "/"}${downloadUrl}`;
|
|
201
|
-
return fullUrl_0;
|
|
202
|
-
})() }),
|
|
203
|
-
/* @__PURE__ */ jsx(Tooltip, { title: urlCopied ? "Copied!" : "Copy URL", children: /* @__PURE__ */ jsx("div", { className: "shrink-0", children: urlCopied ? /* @__PURE__ */ jsx(CheckIcon, { size: 14, className: "text-green-500" }) : /* @__PURE__ */ jsx(CopyIcon, { size: 14, className: "text-surface-accent-400" }) }) })
|
|
204
|
-
] })
|
|
205
|
-
] })
|
|
206
|
-
] })
|
|
207
|
-
] }),
|
|
208
|
-
/* @__PURE__ */ jsxs(Dialog, { open: deleteDialogOpen, onOpenChange: setDeleteDialogOpen, children: [
|
|
209
|
-
/* @__PURE__ */ jsxs(DialogContent, { children: [
|
|
210
|
-
/* @__PURE__ */ jsx(Typography, { variant: "subtitle1", className: "mb-2", children: "Delete File?" }),
|
|
211
|
-
/* @__PURE__ */ jsxs(Typography, { className: "text-surface-accent-600 dark:text-surface-accent-400", children: [
|
|
212
|
-
'Are you sure you want to delete "',
|
|
213
|
-
file.name,
|
|
214
|
-
'"? This action cannot be undone.'
|
|
215
|
-
] })
|
|
216
|
-
] }),
|
|
217
|
-
/* @__PURE__ */ jsxs(DialogActions, { children: [
|
|
218
|
-
/* @__PURE__ */ jsx(Button, { variant: "text", onClick: () => setDeleteDialogOpen(false), children: "Cancel" }),
|
|
219
|
-
/* @__PURE__ */ jsx(Button, { variant: "filled", color: "error", onClick: () => {
|
|
220
|
-
setDeleteDialogOpen(false);
|
|
221
|
-
onDelete();
|
|
222
|
-
}, children: "Delete" })
|
|
223
|
-
] })
|
|
224
|
-
] })
|
|
225
|
-
] });
|
|
226
|
-
}
|
|
227
|
-
const StorageView = () => {
|
|
228
|
-
const storageSource = useStorageSource();
|
|
229
|
-
const snackbarController = useSnackbarController();
|
|
230
|
-
const [searchParams, setSearchParams] = useSearchParams();
|
|
231
|
-
const currentPath = searchParams.get("path") || "";
|
|
232
|
-
const [loading, setLoading] = useState(true);
|
|
233
|
-
const [error, setError] = useState(null);
|
|
234
|
-
const [folders, setFolders] = useState([]);
|
|
235
|
-
const [files, setFiles] = useState([]);
|
|
236
|
-
const [selectedFile, setSelectedFile] = useState(null);
|
|
237
|
-
const [selectedDownloadUrl, setSelectedDownloadUrl] = useState(null);
|
|
238
|
-
const [uploadDialogOpen, setUploadDialogOpen] = useState(false);
|
|
239
|
-
const [viewMode, setViewMode] = useState("grid");
|
|
240
|
-
const [selectedPaths, setSelectedPaths] = useState(/* @__PURE__ */ new Set());
|
|
241
|
-
const lastClickedRef = useRef(null);
|
|
242
|
-
const [deleteDialogOpen, setDeleteDialogOpen] = useState(false);
|
|
243
|
-
const [deleteDialogTarget, setDeleteDialogTarget] = useState(null);
|
|
244
|
-
const [deleting, setDeleting] = useState(false);
|
|
245
|
-
const [newFolderDialogOpen, setNewFolderDialogOpen] = useState(false);
|
|
246
|
-
const [newFolderName, setNewFolderName] = useState("");
|
|
247
|
-
const [creatingFolder, setCreatingFolder] = useState(false);
|
|
248
|
-
const apiConfig = useApiConfig();
|
|
249
|
-
const storageSourceRef = React.useRef(storageSource);
|
|
250
|
-
useEffect(() => {
|
|
251
|
-
storageSourceRef.current = storageSource;
|
|
252
|
-
}, [storageSource]);
|
|
253
|
-
const fetchContents = useCallback(async (path) => {
|
|
254
|
-
setLoading(true);
|
|
255
|
-
setError(null);
|
|
256
|
-
try {
|
|
257
|
-
const result = await storageSourceRef.current.listObjects(path);
|
|
258
|
-
const folderItems = (result.prefixes ?? []).map((ref) => ({
|
|
259
|
-
name: ref.name,
|
|
260
|
-
fullPath: ref.fullPath,
|
|
261
|
-
isFolder: true
|
|
262
|
-
}));
|
|
263
|
-
const fileItems = await Promise.all((result.items ?? []).map(async (ref_0) => {
|
|
264
|
-
try {
|
|
265
|
-
const downloadConfig = await storageSourceRef.current.getSignedUrl(ref_0.fullPath);
|
|
266
|
-
return {
|
|
267
|
-
name: ref_0.name,
|
|
268
|
-
fullPath: ref_0.fullPath,
|
|
269
|
-
isFolder: false,
|
|
270
|
-
size: downloadConfig.metadata?.size,
|
|
271
|
-
contentType: downloadConfig.metadata?.contentType,
|
|
272
|
-
downloadUrl: downloadConfig.url ?? void 0
|
|
273
|
-
};
|
|
274
|
-
} catch {
|
|
275
|
-
return {
|
|
276
|
-
name: ref_0.name,
|
|
277
|
-
fullPath: ref_0.fullPath,
|
|
278
|
-
isFolder: false
|
|
279
|
-
};
|
|
280
|
-
}
|
|
281
|
-
}));
|
|
282
|
-
setFolders(folderItems);
|
|
283
|
-
setFiles(fileItems);
|
|
284
|
-
} catch (e) {
|
|
285
|
-
console.error("Storage list error:", e);
|
|
286
|
-
setError(e instanceof Error ? e.message : String(e));
|
|
287
|
-
} finally {
|
|
288
|
-
setLoading(false);
|
|
289
|
-
}
|
|
290
|
-
}, []);
|
|
291
|
-
useEffect(() => {
|
|
292
|
-
fetchContents(currentPath);
|
|
293
|
-
}, [currentPath, fetchContents]);
|
|
294
|
-
const handleNavigate = useCallback((path_0) => {
|
|
295
|
-
if (!path_0) {
|
|
296
|
-
setSearchParams({});
|
|
297
|
-
} else {
|
|
298
|
-
setSearchParams({
|
|
299
|
-
path: path_0
|
|
300
|
-
});
|
|
301
|
-
}
|
|
302
|
-
setSelectedFile(null);
|
|
303
|
-
setSelectedDownloadUrl(null);
|
|
304
|
-
setSelectedPaths(/* @__PURE__ */ new Set());
|
|
305
|
-
lastClickedRef.current = null;
|
|
306
|
-
}, [setSearchParams]);
|
|
307
|
-
const handleNavigateUp = useCallback(() => {
|
|
308
|
-
const parts = currentPath.split("/").filter(Boolean);
|
|
309
|
-
parts.pop();
|
|
310
|
-
handleNavigate(parts.join("/"));
|
|
311
|
-
}, [currentPath, handleNavigate]);
|
|
312
|
-
const allItems = useMemo(() => [...folders, ...files], [folders, files]);
|
|
313
|
-
const handleItemClick = useCallback((item, e_0) => {
|
|
314
|
-
const path_1 = item.fullPath;
|
|
315
|
-
if (e_0.metaKey || e_0.ctrlKey) {
|
|
316
|
-
setSelectedPaths((prev) => {
|
|
317
|
-
const next = new Set(prev);
|
|
318
|
-
if (next.has(path_1)) next.delete(path_1);
|
|
319
|
-
else next.add(path_1);
|
|
320
|
-
return next;
|
|
321
|
-
});
|
|
322
|
-
lastClickedRef.current = path_1;
|
|
323
|
-
} else if (e_0.shiftKey && lastClickedRef.current) {
|
|
324
|
-
const allPaths = allItems.map((i) => i.fullPath);
|
|
325
|
-
const anchorIdx = allPaths.indexOf(lastClickedRef.current);
|
|
326
|
-
const currentIdx = allPaths.indexOf(path_1);
|
|
327
|
-
if (anchorIdx >= 0 && currentIdx >= 0) {
|
|
328
|
-
const [start, end] = anchorIdx < currentIdx ? [anchorIdx, currentIdx] : [currentIdx, anchorIdx];
|
|
329
|
-
setSelectedPaths((prev_0) => {
|
|
330
|
-
const next_0 = new Set(prev_0);
|
|
331
|
-
for (let i_0 = start; i_0 <= end; i_0++) next_0.add(allPaths[i_0]);
|
|
332
|
-
return next_0;
|
|
333
|
-
});
|
|
334
|
-
}
|
|
335
|
-
} else {
|
|
336
|
-
setSelectedPaths(/* @__PURE__ */ new Set([path_1]));
|
|
337
|
-
lastClickedRef.current = path_1;
|
|
338
|
-
if (!item.isFolder) {
|
|
339
|
-
setSelectedFile(item);
|
|
340
|
-
if (item.downloadUrl) {
|
|
341
|
-
setSelectedDownloadUrl(item.downloadUrl);
|
|
342
|
-
} else {
|
|
343
|
-
storageSourceRef.current.getSignedUrl(item.fullPath).then((config) => setSelectedDownloadUrl(config.url)).catch(() => setSelectedDownloadUrl(null));
|
|
344
|
-
}
|
|
345
|
-
} else {
|
|
346
|
-
setSelectedFile(null);
|
|
347
|
-
setSelectedDownloadUrl(null);
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
}, [allItems]);
|
|
351
|
-
const handleItemDoubleClick = useCallback((item_0) => {
|
|
352
|
-
if (item_0.isFolder) {
|
|
353
|
-
handleNavigate(item_0.fullPath);
|
|
354
|
-
} else {
|
|
355
|
-
setSelectedFile(item_0);
|
|
356
|
-
if (item_0.downloadUrl) {
|
|
357
|
-
setSelectedDownloadUrl(item_0.downloadUrl);
|
|
358
|
-
} else {
|
|
359
|
-
storageSourceRef.current.getSignedUrl(item_0.fullPath).then((config_0) => setSelectedDownloadUrl(config_0.url)).catch(() => setSelectedDownloadUrl(null));
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
}, [handleNavigate]);
|
|
363
|
-
const handleUpload = useCallback(async (uploadFiles) => {
|
|
364
|
-
for (const file of uploadFiles) {
|
|
365
|
-
const key = currentPath ? `${currentPath}/${file.name}` : file.name;
|
|
366
|
-
await storageSourceRef.current.putObject({
|
|
367
|
-
file,
|
|
368
|
-
key
|
|
369
|
-
});
|
|
370
|
-
}
|
|
371
|
-
snackbarController.open({
|
|
372
|
-
type: "success",
|
|
373
|
-
message: `${uploadFiles.length} file${uploadFiles.length > 1 ? "s" : ""} uploaded successfully`
|
|
374
|
-
});
|
|
375
|
-
await fetchContents(currentPath);
|
|
376
|
-
}, [currentPath, snackbarController, fetchContents]);
|
|
377
|
-
const handleCreateFolder = useCallback(async () => {
|
|
378
|
-
if (!newFolderName.trim() || !apiConfig?.apiUrl) return;
|
|
379
|
-
const name = newFolderName.trim();
|
|
380
|
-
if (name.includes("/") || name.includes("\\")) {
|
|
381
|
-
snackbarController.open({
|
|
382
|
-
type: "error",
|
|
383
|
-
message: "Folder name cannot contain slashes"
|
|
384
|
-
});
|
|
385
|
-
return;
|
|
386
|
-
}
|
|
387
|
-
const existingFolder = folders.find((f) => f.name === name);
|
|
388
|
-
if (existingFolder) {
|
|
389
|
-
snackbarController.open({
|
|
390
|
-
type: "error",
|
|
391
|
-
message: `Folder "${name}" already exists`
|
|
392
|
-
});
|
|
393
|
-
return;
|
|
394
|
-
}
|
|
395
|
-
setCreatingFolder(true);
|
|
396
|
-
try {
|
|
397
|
-
const folderPath = currentPath ? `default/${currentPath}/${name}` : `default/${name}`;
|
|
398
|
-
const token = apiConfig.getAuthToken ? await apiConfig.getAuthToken() : null;
|
|
399
|
-
const response = await fetch(`${apiConfig.apiUrl}/api/storage/folder`, {
|
|
400
|
-
method: "POST",
|
|
401
|
-
headers: {
|
|
402
|
-
"Content-Type": "application/json",
|
|
403
|
-
...token ? {
|
|
404
|
-
"Authorization": `Bearer ${token}`
|
|
405
|
-
} : {}
|
|
406
|
-
},
|
|
407
|
-
body: JSON.stringify({
|
|
408
|
-
path: folderPath
|
|
409
|
-
})
|
|
410
|
-
});
|
|
411
|
-
if (!response.ok) {
|
|
412
|
-
const err = await response.json().catch(() => ({
|
|
413
|
-
error: "Failed to create folder"
|
|
414
|
-
}));
|
|
415
|
-
throw new Error(err.error || "Failed to create folder");
|
|
416
|
-
}
|
|
417
|
-
snackbarController.open({
|
|
418
|
-
type: "success",
|
|
419
|
-
message: `Folder "${name}" created`
|
|
420
|
-
});
|
|
421
|
-
setNewFolderDialogOpen(false);
|
|
422
|
-
setNewFolderName("");
|
|
423
|
-
await fetchContents(currentPath);
|
|
424
|
-
} catch (e_1) {
|
|
425
|
-
snackbarController.open({
|
|
426
|
-
type: "error",
|
|
427
|
-
message: e_1 instanceof Error ? e_1.message : String(e_1)
|
|
428
|
-
});
|
|
429
|
-
} finally {
|
|
430
|
-
setCreatingFolder(false);
|
|
431
|
-
}
|
|
432
|
-
}, [newFolderName, currentPath, apiConfig, snackbarController, fetchContents, folders]);
|
|
433
|
-
const handleDropFiles = useCallback(async (droppedFiles) => {
|
|
434
|
-
if (droppedFiles.length === 0) return;
|
|
435
|
-
try {
|
|
436
|
-
for (const file_0 of droppedFiles) {
|
|
437
|
-
const key_0 = currentPath ? `${currentPath}/${file_0.name}` : file_0.name;
|
|
438
|
-
await storageSourceRef.current.putObject({
|
|
439
|
-
file: file_0,
|
|
440
|
-
key: key_0
|
|
441
|
-
});
|
|
442
|
-
}
|
|
443
|
-
snackbarController.open({
|
|
444
|
-
type: "success",
|
|
445
|
-
message: `${droppedFiles.length} file${droppedFiles.length > 1 ? "s" : ""} uploaded successfully`
|
|
446
|
-
});
|
|
447
|
-
await fetchContents(currentPath);
|
|
448
|
-
} catch (e_2) {
|
|
449
|
-
snackbarController.open({
|
|
450
|
-
type: "error",
|
|
451
|
-
message: e_2 instanceof Error ? e_2.message : String(e_2)
|
|
452
|
-
});
|
|
453
|
-
}
|
|
454
|
-
}, [currentPath, snackbarController, fetchContents]);
|
|
455
|
-
const {
|
|
456
|
-
getRootProps: getDropRootProps,
|
|
457
|
-
getInputProps: getDropInputProps,
|
|
458
|
-
isDragActive
|
|
459
|
-
} = useDropzone({
|
|
460
|
-
onDrop: handleDropFiles,
|
|
461
|
-
noClick: true,
|
|
462
|
-
noKeyboard: true,
|
|
463
|
-
noDragEventsBubbling: true
|
|
464
|
-
});
|
|
465
|
-
const deleteFolderRecursive = useCallback(async (prefix) => {
|
|
466
|
-
const result_0 = await storageSourceRef.current.listObjects(prefix);
|
|
467
|
-
for (const item_1 of result_0.items ?? []) {
|
|
468
|
-
await storageSourceRef.current.deleteObject(item_1.fullPath);
|
|
469
|
-
}
|
|
470
|
-
for (const sub of result_0.prefixes ?? []) {
|
|
471
|
-
await deleteFolderRecursive(sub.fullPath);
|
|
472
|
-
}
|
|
473
|
-
try {
|
|
474
|
-
await storageSourceRef.current.deleteObject(prefix);
|
|
475
|
-
} catch {
|
|
476
|
-
}
|
|
477
|
-
}, []);
|
|
478
|
-
const handleDeleteFile = useCallback(async (file_1) => {
|
|
479
|
-
try {
|
|
480
|
-
if (file_1.isFolder) {
|
|
481
|
-
await deleteFolderRecursive(file_1.fullPath);
|
|
482
|
-
} else {
|
|
483
|
-
await storageSourceRef.current.deleteObject(file_1.fullPath);
|
|
484
|
-
}
|
|
485
|
-
snackbarController.open({
|
|
486
|
-
type: "success",
|
|
487
|
-
message: `"${file_1.name}" deleted`
|
|
488
|
-
});
|
|
489
|
-
setSelectedFile(null);
|
|
490
|
-
setSelectedDownloadUrl(null);
|
|
491
|
-
setSelectedPaths((prev_1) => {
|
|
492
|
-
const next_1 = new Set(prev_1);
|
|
493
|
-
next_1.delete(file_1.fullPath);
|
|
494
|
-
return next_1;
|
|
495
|
-
});
|
|
496
|
-
fetchContents(currentPath);
|
|
497
|
-
} catch (e_3) {
|
|
498
|
-
snackbarController.open({
|
|
499
|
-
type: "error",
|
|
500
|
-
message: e_3 instanceof Error ? e_3.message : String(e_3)
|
|
501
|
-
});
|
|
502
|
-
}
|
|
503
|
-
}, [currentPath, snackbarController, fetchContents, deleteFolderRecursive]);
|
|
504
|
-
const handleBulkDelete = useCallback(async () => {
|
|
505
|
-
setDeleting(true);
|
|
506
|
-
try {
|
|
507
|
-
const items = allItems.filter((i_1) => selectedPaths.has(i_1.fullPath));
|
|
508
|
-
for (const item_2 of items) {
|
|
509
|
-
if (item_2.isFolder) {
|
|
510
|
-
await deleteFolderRecursive(item_2.fullPath);
|
|
511
|
-
} else {
|
|
512
|
-
await storageSourceRef.current.deleteObject(item_2.fullPath);
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
snackbarController.open({
|
|
516
|
-
type: "success",
|
|
517
|
-
message: `${items.length} item${items.length !== 1 ? "s" : ""} deleted`
|
|
518
|
-
});
|
|
519
|
-
setSelectedPaths(/* @__PURE__ */ new Set());
|
|
520
|
-
setSelectedFile(null);
|
|
521
|
-
setSelectedDownloadUrl(null);
|
|
522
|
-
await fetchContents(currentPath);
|
|
523
|
-
} catch (e_4) {
|
|
524
|
-
snackbarController.open({
|
|
525
|
-
type: "error",
|
|
526
|
-
message: e_4 instanceof Error ? e_4.message : String(e_4)
|
|
527
|
-
});
|
|
528
|
-
} finally {
|
|
529
|
-
setDeleting(false);
|
|
530
|
-
setDeleteDialogOpen(false);
|
|
531
|
-
setDeleteDialogTarget(null);
|
|
532
|
-
}
|
|
533
|
-
}, [allItems, selectedPaths, currentPath, snackbarController, fetchContents, deleteFolderRecursive]);
|
|
534
|
-
const handleConfirmDeleteFolder = useCallback(async () => {
|
|
535
|
-
if (!deleteDialogTarget || deleteDialogTarget === "selection") return;
|
|
536
|
-
setDeleting(true);
|
|
537
|
-
try {
|
|
538
|
-
await deleteFolderRecursive(deleteDialogTarget.fullPath);
|
|
539
|
-
snackbarController.open({
|
|
540
|
-
type: "success",
|
|
541
|
-
message: `Folder "${deleteDialogTarget.name}" deleted`
|
|
542
|
-
});
|
|
543
|
-
setSelectedPaths((prev_2) => {
|
|
544
|
-
const next_2 = new Set(prev_2);
|
|
545
|
-
next_2.delete(deleteDialogTarget.fullPath);
|
|
546
|
-
return next_2;
|
|
547
|
-
});
|
|
548
|
-
await fetchContents(currentPath);
|
|
549
|
-
} catch (e_5) {
|
|
550
|
-
snackbarController.open({
|
|
551
|
-
type: "error",
|
|
552
|
-
message: e_5 instanceof Error ? e_5.message : String(e_5)
|
|
553
|
-
});
|
|
554
|
-
} finally {
|
|
555
|
-
setDeleting(false);
|
|
556
|
-
setDeleteDialogOpen(false);
|
|
557
|
-
setDeleteDialogTarget(null);
|
|
558
|
-
}
|
|
559
|
-
}, [deleteDialogTarget, currentPath, snackbarController, fetchContents, deleteFolderRecursive]);
|
|
560
|
-
const handleSelectAll = useCallback(() => {
|
|
561
|
-
if (selectedPaths.size === allItems.length) {
|
|
562
|
-
setSelectedPaths(/* @__PURE__ */ new Set());
|
|
563
|
-
} else {
|
|
564
|
-
setSelectedPaths(new Set(allItems.map((i_2) => i_2.fullPath)));
|
|
565
|
-
}
|
|
566
|
-
}, [allItems, selectedPaths]);
|
|
567
|
-
useEffect(() => {
|
|
568
|
-
const handler = (e_6) => {
|
|
569
|
-
if (deleteDialogOpen || uploadDialogOpen || newFolderDialogOpen) return;
|
|
570
|
-
if ((e_6.metaKey || e_6.ctrlKey) && e_6.key === "a") {
|
|
571
|
-
e_6.preventDefault();
|
|
572
|
-
handleSelectAll();
|
|
573
|
-
}
|
|
574
|
-
if (e_6.key === "Escape") {
|
|
575
|
-
setSelectedPaths(/* @__PURE__ */ new Set());
|
|
576
|
-
setSelectedFile(null);
|
|
577
|
-
setSelectedDownloadUrl(null);
|
|
578
|
-
}
|
|
579
|
-
if ((e_6.key === "Delete" || e_6.key === "Backspace") && selectedPaths.size > 0 && !e_6.metaKey && !e_6.ctrlKey) {
|
|
580
|
-
if (e_6.target?.tagName === "INPUT" || e_6.target?.tagName === "TEXTAREA") return;
|
|
581
|
-
e_6.preventDefault();
|
|
582
|
-
setDeleteDialogTarget("selection");
|
|
583
|
-
setDeleteDialogOpen(true);
|
|
584
|
-
}
|
|
585
|
-
};
|
|
586
|
-
window.addEventListener("keydown", handler);
|
|
587
|
-
return () => window.removeEventListener("keydown", handler);
|
|
588
|
-
}, [handleSelectAll, selectedPaths, deleteDialogOpen, uploadDialogOpen, newFolderDialogOpen]);
|
|
589
|
-
const handleRefresh = useCallback(() => {
|
|
590
|
-
fetchContents(currentPath);
|
|
591
|
-
}, [currentPath, fetchContents]);
|
|
592
|
-
const segments = breadcrumbSegments(currentPath);
|
|
593
|
-
const renderContents = () => {
|
|
594
|
-
if (loading) {
|
|
595
|
-
return /* @__PURE__ */ jsx("div", { className: "flex-grow flex items-center justify-center", children: /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
|
|
596
|
-
/* @__PURE__ */ jsx(CircularProgress, { size: "medium" }),
|
|
597
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "mt-4 text-text-secondary dark:text-text-secondary-dark font-mono tracking-tight animate-pulse", children: "Loading..." })
|
|
598
|
-
] }) });
|
|
599
|
-
}
|
|
600
|
-
if (error) {
|
|
601
|
-
return /* @__PURE__ */ jsx("div", { className: "flex-grow flex items-center justify-center p-6 overflow-auto", children: /* @__PURE__ */ jsx(ErrorView, { title: "Error loading storage", error, onRetry: handleRefresh }) });
|
|
602
|
-
}
|
|
603
|
-
if (allItems.length === 0) {
|
|
604
|
-
return /* @__PURE__ */ jsx("div", { className: "flex-grow flex items-center justify-center text-text-disabled dark:text-text-disabled-dark", children: /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
|
|
605
|
-
/* @__PURE__ */ jsx("svg", { className: "w-12 h-12 mx-auto mb-4 opacity-50", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1, d: "M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z" }) }),
|
|
606
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body2", children: "This folder is empty" }),
|
|
607
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mt-3", children: [
|
|
608
|
-
/* @__PURE__ */ jsxs(Button, { variant: "text", onClick: () => {
|
|
609
|
-
setNewFolderName("");
|
|
610
|
-
setNewFolderDialogOpen(true);
|
|
611
|
-
}, children: [
|
|
612
|
-
/* @__PURE__ */ jsx(FolderPlusIcon, { size: iconSize.smallest }),
|
|
613
|
-
"New folder"
|
|
614
|
-
] }),
|
|
615
|
-
/* @__PURE__ */ jsxs(Button, { onClick: () => setUploadDialogOpen(true), children: [
|
|
616
|
-
/* @__PURE__ */ jsx(PlusIcon, { size: iconSize.smallest }),
|
|
617
|
-
"Upload files"
|
|
618
|
-
] })
|
|
619
|
-
] })
|
|
620
|
-
] }) });
|
|
621
|
-
}
|
|
622
|
-
if (viewMode === "list") {
|
|
623
|
-
return /* @__PURE__ */ jsx("div", { className: "flex-grow overflow-auto", children: /* @__PURE__ */ jsxs("table", { className: "w-full", children: [
|
|
624
|
-
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { className: cls("border-b text-left text-[10px] uppercase tracking-wider text-text-disabled dark:text-text-disabled-dark", defaultBorderMixin), children: [
|
|
625
|
-
/* @__PURE__ */ jsx("th", { className: "pl-3 pr-0 py-2 w-8", children: /* @__PURE__ */ jsx(Checkbox, { size: "small", checked: allItems.length > 0 && selectedPaths.size === allItems.length, indeterminate: selectedPaths.size > 0 && selectedPaths.size < allItems.length, onCheckedChange: handleSelectAll }) }),
|
|
626
|
-
/* @__PURE__ */ jsx("th", { className: "px-2 py-2 font-bold", children: "Name" }),
|
|
627
|
-
/* @__PURE__ */ jsx("th", { className: "px-4 py-2 font-bold w-24", children: "Type" }),
|
|
628
|
-
/* @__PURE__ */ jsx("th", { className: "px-4 py-2 font-bold w-24 text-right", children: "Size" }),
|
|
629
|
-
/* @__PURE__ */ jsx("th", { className: "px-2 py-2 w-10" })
|
|
630
|
-
] }) }),
|
|
631
|
-
/* @__PURE__ */ jsxs("tbody", { children: [
|
|
632
|
-
folders.map((folder) => {
|
|
633
|
-
const isChecked = selectedPaths.has(folder.fullPath);
|
|
634
|
-
return /* @__PURE__ */ jsxs("tr", { "data-storage-item": true, className: cls("cursor-pointer transition-colors border-b group", defaultBorderMixin, isChecked ? "bg-primary/5 dark:bg-primary/10" : "hover:bg-surface-100 dark:hover:bg-surface-800"), onClick: (e_7) => handleItemClick(folder, e_7), onDoubleClick: () => handleItemDoubleClick(folder), children: [
|
|
635
|
-
/* @__PURE__ */ jsx("td", { className: "pl-3 pr-0 py-2.5", onClick: (e_8) => e_8.stopPropagation(), children: /* @__PURE__ */ jsx(Checkbox, { size: "small", checked: isChecked, onCheckedChange: () => {
|
|
636
|
-
setSelectedPaths((prev_3) => {
|
|
637
|
-
const next_3 = new Set(prev_3);
|
|
638
|
-
if (next_3.has(folder.fullPath)) next_3.delete(folder.fullPath);
|
|
639
|
-
else next_3.add(folder.fullPath);
|
|
640
|
-
return next_3;
|
|
641
|
-
});
|
|
642
|
-
} }) }),
|
|
643
|
-
/* @__PURE__ */ jsx("td", { className: "px-2 py-2.5", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
644
|
-
/* @__PURE__ */ jsx(FolderIcon, { size: iconSize.smallest, className: "text-amber-500 dark:text-amber-400 shrink-0" }),
|
|
645
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-[13px] font-medium truncate", children: folder.name })
|
|
646
|
-
] }) }),
|
|
647
|
-
/* @__PURE__ */ jsx("td", { className: "px-4 py-2.5", children: /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-text-secondary dark:text-text-secondary-dark", children: "Folder" }) }),
|
|
648
|
-
/* @__PURE__ */ jsx("td", { className: "px-4 py-2.5 text-right", children: /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-text-disabled dark:text-text-disabled-dark", children: "—" }) }),
|
|
649
|
-
/* @__PURE__ */ jsx("td", { className: "px-2 py-2.5" })
|
|
650
|
-
] }, folder.fullPath);
|
|
651
|
-
}),
|
|
652
|
-
files.map((file_2) => {
|
|
653
|
-
const FileIconComp = getFileIcon(file_2.contentType);
|
|
654
|
-
const isChecked_0 = selectedPaths.has(file_2.fullPath);
|
|
655
|
-
return /* @__PURE__ */ jsxs("tr", { "data-storage-item": true, className: cls("cursor-pointer transition-colors border-b group", defaultBorderMixin, isChecked_0 ? "bg-primary/5 dark:bg-primary/10" : "hover:bg-surface-100 dark:hover:bg-surface-800"), onClick: (e_9) => handleItemClick(file_2, e_9), onDoubleClick: () => handleItemDoubleClick(file_2), children: [
|
|
656
|
-
/* @__PURE__ */ jsx("td", { className: "pl-3 pr-0 py-2.5", onClick: (e_10) => e_10.stopPropagation(), children: /* @__PURE__ */ jsx(Checkbox, { size: "small", checked: isChecked_0, onCheckedChange: () => {
|
|
657
|
-
setSelectedPaths((prev_4) => {
|
|
658
|
-
const next_4 = new Set(prev_4);
|
|
659
|
-
if (next_4.has(file_2.fullPath)) next_4.delete(file_2.fullPath);
|
|
660
|
-
else next_4.add(file_2.fullPath);
|
|
661
|
-
return next_4;
|
|
662
|
-
});
|
|
663
|
-
} }) }),
|
|
664
|
-
/* @__PURE__ */ jsx("td", { className: "px-2 py-2.5", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
665
|
-
/* @__PURE__ */ jsx(FileIconComp, { size: iconSize.smallest, className: "text-surface-accent-400 shrink-0" }),
|
|
666
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-[13px] truncate", children: file_2.name })
|
|
667
|
-
] }) }),
|
|
668
|
-
/* @__PURE__ */ jsx("td", { className: "px-4 py-2.5", children: /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-text-secondary dark:text-text-secondary-dark", children: getExtension(file_2.name) || file_2.contentType?.split("/")[1]?.toUpperCase() || "—" }) }),
|
|
669
|
-
/* @__PURE__ */ jsx("td", { className: "px-4 py-2.5 text-right", children: /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-text-secondary dark:text-text-secondary-dark font-mono text-[11px]", children: file_2.size !== void 0 ? formatFileSize(file_2.size) : "—" }) }),
|
|
670
|
-
/* @__PURE__ */ jsx("td", { className: "px-2 py-2.5", onClick: (e_11) => e_11.stopPropagation(), children: /* @__PURE__ */ jsx(IconButton, { size: "smallest", className: "opacity-0 group-hover:opacity-100 transition-opacity", onClick: () => handleDeleteFile(file_2), children: /* @__PURE__ */ jsx(Trash2Icon, { size: 14 }) }) })
|
|
671
|
-
] }, file_2.fullPath);
|
|
672
|
-
})
|
|
673
|
-
] })
|
|
674
|
-
] }) });
|
|
675
|
-
}
|
|
676
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex-grow overflow-auto p-4", children: [
|
|
677
|
-
folders.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
678
|
-
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-[10px] uppercase tracking-wider font-bold text-text-disabled dark:text-text-disabled-dark mb-2 block", children: "Folders" }),
|
|
679
|
-
/* @__PURE__ */ jsx("div", { className: "grid gap-3 grid-cols-[repeat(auto-fill,minmax(140px,1fr))]", children: folders.map((folder_0) => {
|
|
680
|
-
const isChecked_1 = selectedPaths.has(folder_0.fullPath);
|
|
681
|
-
return /* @__PURE__ */ jsxs("div", { "data-storage-item": true, className: cls("rounded-lg p-3 cursor-pointer border", "transition-colors duration-150", defaultBorderMixin, "hover:bg-surface-100 dark:hover:bg-surface-800 hover:shadow-sm", "flex items-center gap-2", isChecked_1 && "ring-2 ring-primary bg-primary/5 dark:bg-primary/10"), onClick: (e_12) => handleItemClick(folder_0, e_12), onDoubleClick: () => handleItemDoubleClick(folder_0), children: [
|
|
682
|
-
/* @__PURE__ */ jsx(FolderIcon, { size: iconSize.smallest, className: "text-amber-500 dark:text-amber-400 shrink-0" }),
|
|
683
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-[13px] font-medium truncate", children: folder_0.name })
|
|
684
|
-
] }, folder_0.fullPath);
|
|
685
|
-
}) })
|
|
686
|
-
] }),
|
|
687
|
-
files.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
688
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-[10px] uppercase tracking-wider font-bold text-text-disabled dark:text-text-disabled-dark mb-2 block", children: [
|
|
689
|
-
"Files (",
|
|
690
|
-
files.length,
|
|
691
|
-
")"
|
|
692
|
-
] }),
|
|
693
|
-
/* @__PURE__ */ jsx("div", { className: "grid gap-3 grid-cols-[repeat(auto-fill,minmax(140px,1fr))]", children: files.map((file_3) => {
|
|
694
|
-
const FileIconComp_0 = getFileIcon(file_3.contentType);
|
|
695
|
-
const ext = getExtension(file_3.name)?.toLowerCase() || "";
|
|
696
|
-
const isImage = file_3.contentType?.startsWith("image/") || ["jpg", "jpeg", "png", "gif", "webp", "svg"].includes(ext);
|
|
697
|
-
const isChecked_2 = selectedPaths.has(file_3.fullPath);
|
|
698
|
-
return /* @__PURE__ */ jsxs("div", { "data-storage-item": true, className: cls("rounded-lg overflow-hidden cursor-pointer border", "transition-shadow duration-150", defaultBorderMixin, "hover:shadow-md", isChecked_2 && "ring-2 ring-primary"), onClick: (e_13) => handleItemClick(file_3, e_13), onDoubleClick: () => handleItemDoubleClick(file_3), children: [
|
|
699
|
-
/* @__PURE__ */ jsxs("div", { className: "aspect-square relative overflow-hidden bg-surface-100 dark:bg-surface-800 flex items-center justify-center", children: [
|
|
700
|
-
isImage && file_3.downloadUrl ? /* @__PURE__ */ jsx("img", { src: file_3.downloadUrl, alt: file_3.name, className: "w-full h-full object-cover", loading: "lazy" }) : /* @__PURE__ */ jsx(FileIconComp_0, { className: "text-surface-accent-400 dark:text-surface-accent-500 w-8 h-8" }),
|
|
701
|
-
getExtension(file_3.name) && /* @__PURE__ */ jsx("div", { className: "absolute bottom-1.5 right-1.5 px-1.5 py-0.5 rounded text-[9px] font-bold uppercase bg-black/50 text-white backdrop-blur-sm", children: getExtension(file_3.name) })
|
|
702
|
-
] }),
|
|
703
|
-
/* @__PURE__ */ jsxs("div", { className: "p-2.5", children: [
|
|
704
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-[12px] font-medium truncate text-surface-900 dark:text-white", children: file_3.name }),
|
|
705
|
-
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", className: "truncate block mt-0.5 text-[11px]", children: file_3.size !== void 0 ? formatFileSize(file_3.size) : "—" })
|
|
706
|
-
] })
|
|
707
|
-
] }, file_3.fullPath);
|
|
708
|
-
}) })
|
|
709
|
-
] })
|
|
710
|
-
] });
|
|
711
|
-
};
|
|
712
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex h-full w-full bg-white dark:bg-surface-800 overflow-hidden text-text-primary dark:text-text-primary-dark", children: [
|
|
713
|
-
/* @__PURE__ */ jsxs("div", { className: "flex h-full w-full", children: [
|
|
714
|
-
/* @__PURE__ */ jsxs("div", { className: "flex-grow flex flex-col min-w-0 h-full", children: [
|
|
715
|
-
/* @__PURE__ */ jsxs("div", { className: cls("flex items-center justify-between pr-2 border-b bg-white dark:bg-surface-800 shrink-0 h-10", defaultBorderMixin), children: [
|
|
716
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 flex-grow overflow-hidden px-3 py-2", children: [
|
|
717
|
-
currentPath && /* @__PURE__ */ jsx(Tooltip, { title: "Go up", children: /* @__PURE__ */ jsx(IconButton, { size: "small", onClick: handleNavigateUp, children: /* @__PURE__ */ jsx(ArrowLeftIcon, { size: iconSize.smallest }) }) }),
|
|
718
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-0.5 overflow-x-auto no-scrollbar", children: segments.map((seg, i_3) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
719
|
-
i_3 > 0 && /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-text-disabled dark:text-text-disabled-dark mx-0.5", children: "/" }),
|
|
720
|
-
/* @__PURE__ */ jsx(Button, { variant: "text", size: "small", className: cls("px-1.5 py-0.5 min-h-0 min-w-0 h-6 text-xs whitespace-nowrap normal-case font-normal", i_3 === segments.length - 1 ? "text-text-primary dark:text-text-primary-dark font-medium" : "text-text-secondary dark:text-text-secondary-dark"), onClick: () => handleNavigate(seg.path), children: seg.label })
|
|
721
|
-
] }, seg.path)) }),
|
|
722
|
-
/* @__PURE__ */ jsx("div", { className: "flex-1" }),
|
|
723
|
-
selectedPaths.size > 0 ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 shrink-0", children: [
|
|
724
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "body2", className: "text-[13px] font-medium whitespace-nowrap", children: [
|
|
725
|
-
selectedPaths.size,
|
|
726
|
-
" selected"
|
|
727
|
-
] }),
|
|
728
|
-
/* @__PURE__ */ jsxs(Button, { size: "small", variant: "text", onClick: () => {
|
|
729
|
-
setDeleteDialogTarget("selection");
|
|
730
|
-
setDeleteDialogOpen(true);
|
|
731
|
-
}, children: [
|
|
732
|
-
/* @__PURE__ */ jsx(Trash2Icon, { size: 14, className: "mr-1" }),
|
|
733
|
-
"Delete"
|
|
734
|
-
] }),
|
|
735
|
-
/* @__PURE__ */ jsxs(Button, { size: "small", variant: "text", onClick: () => {
|
|
736
|
-
setSelectedPaths(/* @__PURE__ */ new Set());
|
|
737
|
-
setSelectedFile(null);
|
|
738
|
-
setSelectedDownloadUrl(null);
|
|
739
|
-
}, children: [
|
|
740
|
-
/* @__PURE__ */ jsx(XIcon, { size: 14, className: "mr-1" }),
|
|
741
|
-
"Deselect"
|
|
742
|
-
] })
|
|
743
|
-
] }) : !loading ? /* @__PURE__ */ jsxs(Chip, { size: "small", className: "shrink-0 text-[10px]", children: [
|
|
744
|
-
files.length,
|
|
745
|
-
" file",
|
|
746
|
-
files.length !== 1 ? "s" : "",
|
|
747
|
-
folders.length > 0 ? `, ${folders.length} folder${folders.length !== 1 ? "s" : ""}` : ""
|
|
748
|
-
] }) : null
|
|
749
|
-
] }),
|
|
750
|
-
/* @__PURE__ */ jsxs("div", { className: "flex shrink-0 items-center justify-end gap-1.5 pr-1", children: [
|
|
751
|
-
/* @__PURE__ */ jsx(Tooltip, { title: "Grid view", children: /* @__PURE__ */ jsx(IconButton, { size: "small", onClick: () => setViewMode("grid"), className: cls(viewMode === "grid" && "bg-surface-100 dark:bg-surface-800"), children: /* @__PURE__ */ jsx(LayoutGridIcon, { size: iconSize.smallest }) }) }),
|
|
752
|
-
/* @__PURE__ */ jsx(Tooltip, { title: "List view", children: /* @__PURE__ */ jsx(IconButton, { size: "small", onClick: () => setViewMode("list"), className: cls(viewMode === "list" && "bg-surface-100 dark:bg-surface-800"), children: /* @__PURE__ */ jsx(ListIcon, { size: iconSize.smallest }) }) }),
|
|
753
|
-
/* @__PURE__ */ jsx("div", { className: cls("h-4 w-px mx-0.5", defaultBorderMixin, "bg-surface-200 dark:bg-surface-700") }),
|
|
754
|
-
/* @__PURE__ */ jsx(Tooltip, { title: "Refresh", children: /* @__PURE__ */ jsx(IconButton, { size: "small", onClick: handleRefresh, disabled: loading, children: /* @__PURE__ */ jsx(RefreshCwIcon, { size: iconSize.smallest }) }) }),
|
|
755
|
-
/* @__PURE__ */ jsx(Tooltip, { title: "New folder", children: /* @__PURE__ */ jsx(IconButton, { size: "small", onClick: () => {
|
|
756
|
-
setNewFolderName("");
|
|
757
|
-
setNewFolderDialogOpen(true);
|
|
758
|
-
}, children: /* @__PURE__ */ jsx(FolderPlusIcon, { size: iconSize.smallest }) }) }),
|
|
759
|
-
/* @__PURE__ */ jsxs(Button, { size: "small", color: "primary", onClick: () => setUploadDialogOpen(true), children: [
|
|
760
|
-
/* @__PURE__ */ jsx(UploadCloudIcon, { size: iconSize.smallest, className: "mr-1" }),
|
|
761
|
-
"Upload"
|
|
762
|
-
] })
|
|
763
|
-
] })
|
|
764
|
-
] }),
|
|
765
|
-
/* @__PURE__ */ jsxs("div", { ...getDropRootProps(), className: "flex-grow flex flex-col overflow-hidden min-h-0 relative", onClick: (e_14) => {
|
|
766
|
-
const target = e_14.target;
|
|
767
|
-
if (!target.closest("[data-storage-item]") && selectedPaths.size > 0) {
|
|
768
|
-
setSelectedPaths(/* @__PURE__ */ new Set());
|
|
769
|
-
setSelectedFile(null);
|
|
770
|
-
setSelectedDownloadUrl(null);
|
|
771
|
-
}
|
|
772
|
-
}, children: [
|
|
773
|
-
/* @__PURE__ */ jsx("input", { ...getDropInputProps() }),
|
|
774
|
-
renderContents(),
|
|
775
|
-
isDragActive && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 z-10 flex items-center justify-center bg-primary/5 dark:bg-primary/10 backdrop-blur-[2px]", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-2 p-6 rounded-xl border-2 border-dashed border-primary bg-white/80 dark:bg-surface-900/80", children: [
|
|
776
|
-
/* @__PURE__ */ jsx(UploadCloudIcon, { className: "w-10 h-10 text-primary" }),
|
|
777
|
-
/* @__PURE__ */ jsx(Typography, { variant: "subtitle2", className: "text-primary font-semibold", children: "Drop files to upload" }),
|
|
778
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "secondary", children: [
|
|
779
|
-
"to /",
|
|
780
|
-
currentPath || "root"
|
|
781
|
-
] })
|
|
782
|
-
] }) })
|
|
783
|
-
] }),
|
|
784
|
-
/* @__PURE__ */ jsxs("div", { className: cls("px-4 py-1.5 border-t bg-surface-50 dark:bg-surface-800 flex items-center justify-between shrink-0", defaultBorderMixin), children: [
|
|
785
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4 text-[11px]", children: [
|
|
786
|
-
/* @__PURE__ */ jsx("span", { className: "text-text-disabled dark:text-text-disabled-dark font-bold uppercase tracking-tighter", children: "Path" }),
|
|
787
|
-
/* @__PURE__ */ jsxs("span", { className: "font-mono text-text-secondary dark:text-text-secondary-dark", children: [
|
|
788
|
-
"/",
|
|
789
|
-
currentPath || ""
|
|
790
|
-
] })
|
|
791
|
-
] }),
|
|
792
|
-
selectedPaths.size > 0 ? /* @__PURE__ */ jsxs("div", { className: "text-[11px] text-text-secondary dark:text-text-secondary-dark", children: [
|
|
793
|
-
selectedPaths.size,
|
|
794
|
-
" item",
|
|
795
|
-
selectedPaths.size !== 1 ? "s" : "",
|
|
796
|
-
" selected"
|
|
797
|
-
] }) : selectedFile ? /* @__PURE__ */ jsxs("div", { className: "text-[11px] text-text-secondary dark:text-text-secondary-dark", children: [
|
|
798
|
-
"Selected: ",
|
|
799
|
-
/* @__PURE__ */ jsx("span", { className: "font-mono", children: selectedFile.name })
|
|
800
|
-
] }) : null
|
|
801
|
-
] })
|
|
802
|
-
] }),
|
|
803
|
-
selectedFile && /* @__PURE__ */ jsx("div", { className: "w-80 lg:w-96 shrink-0", children: /* @__PURE__ */ jsx(FilePreviewPanel, { file: selectedFile, downloadUrl: selectedDownloadUrl, onClose: () => {
|
|
804
|
-
setSelectedFile(null);
|
|
805
|
-
setSelectedDownloadUrl(null);
|
|
806
|
-
}, onDelete: () => handleDeleteFile(selectedFile) }) })
|
|
807
|
-
] }),
|
|
808
|
-
/* @__PURE__ */ jsx(UploadDialog, { open: uploadDialogOpen, currentPath, onClose: () => setUploadDialogOpen(false), onUpload: handleUpload }),
|
|
809
|
-
/* @__PURE__ */ jsxs(Dialog, { open: deleteDialogOpen, onOpenChange: (open) => {
|
|
810
|
-
if (!open && !deleting) {
|
|
811
|
-
setDeleteDialogOpen(false);
|
|
812
|
-
setDeleteDialogTarget(null);
|
|
813
|
-
}
|
|
814
|
-
}, children: [
|
|
815
|
-
/* @__PURE__ */ jsxs(DialogContent, { children: [
|
|
816
|
-
/* @__PURE__ */ jsx(Typography, { variant: "subtitle1", className: "font-semibold mb-2", children: deleteDialogTarget === "selection" ? `Delete ${selectedPaths.size} item${selectedPaths.size !== 1 ? "s" : ""}?` : deleteDialogTarget ? `Delete folder "${deleteDialogTarget.name}"?` : "Delete?" }),
|
|
817
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body2", color: "secondary", children: deleteDialogTarget === "selection" ? "This will permanently delete all selected files and folders, including their contents. This action cannot be undone." : "This will permanently delete the folder and all of its contents. This action cannot be undone." })
|
|
818
|
-
] }),
|
|
819
|
-
/* @__PURE__ */ jsxs(DialogActions, { children: [
|
|
820
|
-
/* @__PURE__ */ jsx(Button, { variant: "text", onClick: () => {
|
|
821
|
-
setDeleteDialogOpen(false);
|
|
822
|
-
setDeleteDialogTarget(null);
|
|
823
|
-
}, disabled: deleting, children: "Cancel" }),
|
|
824
|
-
/* @__PURE__ */ jsxs(LoadingButton, { color: "error", loading: deleting, onClick: deleteDialogTarget === "selection" ? handleBulkDelete : handleConfirmDeleteFolder, children: [
|
|
825
|
-
/* @__PURE__ */ jsx(Trash2Icon, { size: 14, className: "mr-1" }),
|
|
826
|
-
"Delete"
|
|
827
|
-
] })
|
|
828
|
-
] })
|
|
829
|
-
] }),
|
|
830
|
-
/* @__PURE__ */ jsxs(Dialog, { open: newFolderDialogOpen, onOpenChange: (open_0) => {
|
|
831
|
-
if (!open_0 && !creatingFolder) {
|
|
832
|
-
setNewFolderDialogOpen(false);
|
|
833
|
-
setNewFolderName("");
|
|
834
|
-
}
|
|
835
|
-
}, children: [
|
|
836
|
-
/* @__PURE__ */ jsxs(DialogContent, { children: [
|
|
837
|
-
/* @__PURE__ */ jsx(Typography, { variant: "subtitle1", className: "font-semibold mb-4", children: "New Folder" }),
|
|
838
|
-
/* @__PURE__ */ jsx(TextField, { autoFocus: true, size: "small", label: "Folder name", value: newFolderName, onChange: (e_15) => setNewFolderName(e_15.target.value), onKeyDown: (e_16) => {
|
|
839
|
-
if (e_16.key === "Enter" && newFolderName.trim()) {
|
|
840
|
-
e_16.preventDefault();
|
|
841
|
-
handleCreateFolder();
|
|
842
|
-
}
|
|
843
|
-
}, disabled: creatingFolder, placeholder: "Enter folder name" }),
|
|
844
|
-
currentPath && /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "secondary", className: "mt-2", children: [
|
|
845
|
-
"Will be created in ",
|
|
846
|
-
/* @__PURE__ */ jsxs("span", { className: "font-mono", children: [
|
|
847
|
-
"/",
|
|
848
|
-
currentPath,
|
|
849
|
-
"/"
|
|
850
|
-
] })
|
|
851
|
-
] })
|
|
852
|
-
] }),
|
|
853
|
-
/* @__PURE__ */ jsxs(DialogActions, { children: [
|
|
854
|
-
/* @__PURE__ */ jsx(Button, { variant: "text", onClick: () => {
|
|
855
|
-
setNewFolderDialogOpen(false);
|
|
856
|
-
setNewFolderName("");
|
|
857
|
-
}, disabled: creatingFolder, children: "Cancel" }),
|
|
858
|
-
/* @__PURE__ */ jsxs(LoadingButton, { color: "primary", loading: creatingFolder, disabled: !newFolderName.trim(), onClick: handleCreateFolder, children: [
|
|
859
|
-
/* @__PURE__ */ jsx(FolderPlusIcon, { size: 14, className: "mr-1" }),
|
|
860
|
-
"Create"
|
|
861
|
-
] })
|
|
862
|
-
] })
|
|
863
|
-
] })
|
|
864
|
-
] });
|
|
865
|
-
};
|
|
866
|
-
export {
|
|
867
|
-
StorageView
|
|
868
|
-
};
|
|
869
|
-
//# sourceMappingURL=StorageView-B7AsN2qX.js.map
|