@rebasepro/studio 0.5.0 → 0.6.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/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-DpF1u9EC.js +1369 -0
- package/dist/RLSEditor-DpF1u9EC.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-CvrnHmDG.js +1395 -0
- package/dist/StorageView-CvrnHmDG.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 +10323 -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 +1 -1
- package/src/components/SQLEditor/SQLEditor.tsx +40 -30
- package/src/components/StorageView/StorageView.tsx +25 -14
- 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
package/package.json
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rebasepro/studio",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.6.1",
|
|
5
5
|
"main": "./dist/index.umd.js",
|
|
6
6
|
"module": "./dist/index.es.js",
|
|
7
|
-
"types": "dist/
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
8
|
"source": "src/index.ts",
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@monaco-editor/react": "^4.7.0",
|
|
11
11
|
"@types/dagre": "0.7.54",
|
|
12
|
-
"@xyflow/react": "12.
|
|
12
|
+
"@xyflow/react": "12.11.0",
|
|
13
13
|
"dagre": "0.8.5",
|
|
14
14
|
"monaco-editor": "^0.55.1",
|
|
15
15
|
"pgsql-ast-parser": "12.0.2",
|
|
16
16
|
"prism-react-renderer": "^2.4.1",
|
|
17
|
-
"react-dropzone": "^
|
|
18
|
-
"@rebasepro/
|
|
19
|
-
"@rebasepro/
|
|
20
|
-
"@rebasepro/
|
|
21
|
-
"@rebasepro/
|
|
22
|
-
"@rebasepro/
|
|
23
|
-
"@rebasepro/
|
|
17
|
+
"react-dropzone": "^15.0.0",
|
|
18
|
+
"@rebasepro/common": "0.6.1",
|
|
19
|
+
"@rebasepro/core": "0.6.1",
|
|
20
|
+
"@rebasepro/types": "0.6.1",
|
|
21
|
+
"@rebasepro/ui": "0.6.1",
|
|
22
|
+
"@rebasepro/utils": "0.6.1",
|
|
23
|
+
"@rebasepro/client": "0.6.1"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"react": ">=19.0.0",
|
|
27
27
|
"react-dom": ">=19.0.0",
|
|
28
28
|
"react-router": "^7.0.0",
|
|
29
29
|
"react-router-dom": "^7.0.0",
|
|
30
|
-
"@rebasepro/admin": "0.
|
|
30
|
+
"@rebasepro/admin": "0.6.1"
|
|
31
31
|
},
|
|
32
32
|
"peerDependenciesMeta": {
|
|
33
33
|
"@rebasepro/admin": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"exports": {
|
|
38
38
|
".": {
|
|
39
|
-
"types": "./dist/
|
|
39
|
+
"types": "./dist/index.d.ts",
|
|
40
40
|
"development": "./dist/index.es.js",
|
|
41
41
|
"import": "./dist/index.es.js",
|
|
42
42
|
"require": "./dist/index.umd.js"
|
|
@@ -57,18 +57,18 @@
|
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@jest/globals": "^30.4.1",
|
|
60
|
-
"@types/jest": "^
|
|
61
|
-
"@types/node": "^
|
|
62
|
-
"@types/react": "^19.2.
|
|
60
|
+
"@types/jest": "^30.0.0",
|
|
61
|
+
"@types/node": "^25.9.3",
|
|
62
|
+
"@types/react": "^19.2.17",
|
|
63
63
|
"@types/react-dom": "^19.2.3",
|
|
64
|
-
"@vitejs/plugin-react": "^
|
|
64
|
+
"@vitejs/plugin-react": "^6.0.2",
|
|
65
65
|
"babel-plugin-react-compiler": "19.0.0-beta-ebf51a3-20250411",
|
|
66
|
-
"jest": "^
|
|
67
|
-
"react-router": "^7.
|
|
68
|
-
"react-router-dom": "^7.
|
|
69
|
-
"ts-jest": "^29.4.
|
|
70
|
-
"typescript": "^
|
|
71
|
-
"vite": "^
|
|
66
|
+
"jest": "^30.4.2",
|
|
67
|
+
"react-router": "^7.17.0",
|
|
68
|
+
"react-router-dom": "^7.17.0",
|
|
69
|
+
"ts-jest": "^29.4.11",
|
|
70
|
+
"typescript": "^6.0.3",
|
|
71
|
+
"vite": "^8.0.16"
|
|
72
72
|
},
|
|
73
73
|
"files": [
|
|
74
74
|
"dist",
|
|
@@ -42,7 +42,8 @@ export function TryItPanel({ endpoint, apiUrl, getAuthToken, user, basePath = ""
|
|
|
42
42
|
});
|
|
43
43
|
const [customHeaders, setCustomHeaders] = useState<Array<{ key: string; value: string }>>(() => {
|
|
44
44
|
try { const v = localStorage.getItem(`${storageKey}_headers`); if (v) return JSON.parse(v); } catch { /* ignore */ }
|
|
45
|
-
return [{ key: "rebase-branch",
|
|
45
|
+
return [{ key: "rebase-branch",
|
|
46
|
+
value: "" }];
|
|
46
47
|
});
|
|
47
48
|
const [body, setBody] = useState(() => {
|
|
48
49
|
try { const v = localStorage.getItem(`${storageKey}_body`); if (v) return JSON.parse(v); } catch { /* ignore */ }
|
|
@@ -56,19 +57,12 @@ export function TryItPanel({ endpoint, apiUrl, getAuthToken, user, basePath = ""
|
|
|
56
57
|
const [validationError, setValidationError] = useState<string | null>(null);
|
|
57
58
|
|
|
58
59
|
const rebaseContext = useRebaseContext();
|
|
59
|
-
const userManagement = rebaseContext.userManagement;
|
|
60
60
|
const currentUser = rebaseContext.authController?.user;
|
|
61
61
|
|
|
62
62
|
const users = useMemo((): SelectableUser[] => {
|
|
63
|
-
const managed =
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
email: u.email,
|
|
67
|
-
photoURL: u.photoURL,
|
|
68
|
-
roles: u.roles
|
|
69
|
-
}));
|
|
70
|
-
if (currentUser && !managed.some(u => u.uid === currentUser.uid)) {
|
|
71
|
-
managed.unshift({
|
|
63
|
+
const managed: SelectableUser[] = [];
|
|
64
|
+
if (currentUser) {
|
|
65
|
+
managed.push({
|
|
72
66
|
uid: currentUser.uid,
|
|
73
67
|
displayName: currentUser.displayName,
|
|
74
68
|
email: currentUser.email,
|
|
@@ -77,7 +71,7 @@ export function TryItPanel({ endpoint, apiUrl, getAuthToken, user, basePath = ""
|
|
|
77
71
|
});
|
|
78
72
|
}
|
|
79
73
|
return managed;
|
|
80
|
-
}, [
|
|
74
|
+
}, [currentUser]);
|
|
81
75
|
|
|
82
76
|
const currentSelectableUser = useMemo((): SelectableUser | null => {
|
|
83
77
|
if (!currentUser) return null;
|
|
@@ -137,7 +131,7 @@ export function TryItPanel({ endpoint, apiUrl, getAuthToken, user, basePath = ""
|
|
|
137
131
|
|
|
138
132
|
try {
|
|
139
133
|
const headers: Record<string, string> = { "Content-Type": "application/json" };
|
|
140
|
-
|
|
134
|
+
|
|
141
135
|
for (const h of customHeaders) {
|
|
142
136
|
if (h.key.trim()) headers[h.key.trim()] = h.value;
|
|
143
137
|
}
|
|
@@ -158,7 +152,7 @@ export function TryItPanel({ endpoint, apiUrl, getAuthToken, user, basePath = ""
|
|
|
158
152
|
|
|
159
153
|
const elapsed = Math.round(performance.now() - start);
|
|
160
154
|
let text: string;
|
|
161
|
-
|
|
155
|
+
|
|
162
156
|
const rawText = await res.text();
|
|
163
157
|
try {
|
|
164
158
|
const json = JSON.parse(rawText);
|
|
@@ -193,7 +187,7 @@ time: elapsed });
|
|
|
193
187
|
selectedUser={selectedUser}
|
|
194
188
|
setSelectedUser={setSelectedUser}
|
|
195
189
|
users={users}
|
|
196
|
-
loading={
|
|
190
|
+
loading={false}
|
|
197
191
|
currentUser={currentSelectableUser}
|
|
198
192
|
/>
|
|
199
193
|
|
|
@@ -214,7 +208,8 @@ time: elapsed });
|
|
|
214
208
|
title="Query Parameters"
|
|
215
209
|
params={queryParamDefs}
|
|
216
210
|
values={queryParams}
|
|
217
|
-
onChange={(k, v) => setQueryParams((prev) => ({ ...prev,
|
|
211
|
+
onChange={(k, v) => setQueryParams((prev) => ({ ...prev,
|
|
212
|
+
[k]: v }))}
|
|
218
213
|
/>
|
|
219
214
|
)}
|
|
220
215
|
|
|
@@ -224,10 +219,12 @@ time: elapsed });
|
|
|
224
219
|
values={customHeaders}
|
|
225
220
|
onChange={(i, k, v) => {
|
|
226
221
|
const next = [...customHeaders];
|
|
227
|
-
next[i] = { key: k,
|
|
222
|
+
next[i] = { key: k,
|
|
223
|
+
value: v };
|
|
228
224
|
setCustomHeaders(next);
|
|
229
225
|
}}
|
|
230
|
-
onAdd={() => setCustomHeaders((prev) => [...prev, { key: "",
|
|
226
|
+
onAdd={() => setCustomHeaders((prev) => [...prev, { key: "",
|
|
227
|
+
value: "" }])}
|
|
231
228
|
onRemove={(i) => {
|
|
232
229
|
const next = [...customHeaders];
|
|
233
230
|
next.splice(i, 1);
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
} from "@rebasepro/ui";
|
|
22
22
|
import { useRebaseClient, useSnackbarController } from "@rebasepro/core";
|
|
23
23
|
import type { CronJobStatus, CronJobLogEntry } from "@rebasepro/types";
|
|
24
|
-
import type { RebaseClient } from "@rebasepro/
|
|
24
|
+
import type { RebaseClient } from "@rebasepro/types";
|
|
25
25
|
|
|
26
26
|
function formatDuration(ms: number): string {
|
|
27
27
|
if (ms < 1000) return `${ms}ms`;
|
|
@@ -194,7 +194,6 @@ export function JSEditor() {
|
|
|
194
194
|
const { t } = useTranslation();
|
|
195
195
|
|
|
196
196
|
// User management for the "Run as" picker
|
|
197
|
-
const userManagement = rebaseContext.userManagement;
|
|
198
197
|
const currentUser = rebaseContext.authController?.user;
|
|
199
198
|
|
|
200
199
|
// State
|
|
@@ -252,16 +251,10 @@ code: DEFAULT_CODE }])
|
|
|
252
251
|
|
|
253
252
|
// Users list for the picker — mapped to SelectableUser shape
|
|
254
253
|
const users = useMemo((): SelectableUser[] => {
|
|
255
|
-
const managed =
|
|
256
|
-
uid: u.uid,
|
|
257
|
-
displayName: u.displayName,
|
|
258
|
-
email: u.email,
|
|
259
|
-
photoURL: u.photoURL,
|
|
260
|
-
roles: u.roles
|
|
261
|
-
}));
|
|
254
|
+
const managed: SelectableUser[] = [];
|
|
262
255
|
// Ensure the current user is in the list
|
|
263
|
-
if (currentUser
|
|
264
|
-
managed.
|
|
256
|
+
if (currentUser) {
|
|
257
|
+
managed.push({
|
|
265
258
|
uid: currentUser.uid,
|
|
266
259
|
displayName: currentUser.displayName,
|
|
267
260
|
email: currentUser.email,
|
|
@@ -270,7 +263,7 @@ code: DEFAULT_CODE }])
|
|
|
270
263
|
});
|
|
271
264
|
}
|
|
272
265
|
return managed;
|
|
273
|
-
}, [
|
|
266
|
+
}, [currentUser]);
|
|
274
267
|
|
|
275
268
|
// Current user as SelectableUser for the popover
|
|
276
269
|
const currentSelectableUser = useMemo((): SelectableUser | null => {
|
|
@@ -347,7 +340,8 @@ code: DEFAULT_CODE };
|
|
|
347
340
|
baseUrl: apiUrl,
|
|
348
341
|
token: undefined
|
|
349
342
|
});
|
|
350
|
-
return { client,
|
|
343
|
+
return { client,
|
|
344
|
+
isScoped: true };
|
|
351
345
|
}
|
|
352
346
|
|
|
353
347
|
// If not running as another user safely reuse the application's global client.
|
|
@@ -355,7 +349,8 @@ code: DEFAULT_CODE };
|
|
|
355
349
|
if (!rebaseClient) {
|
|
356
350
|
throw new Error("Application client is not initialized.");
|
|
357
351
|
}
|
|
358
|
-
return { client: rebaseClient,
|
|
352
|
+
return { client: rebaseClient,
|
|
353
|
+
isScoped: false };
|
|
359
354
|
}
|
|
360
355
|
|
|
361
356
|
// Get the current auth token
|
|
@@ -725,7 +720,7 @@ message: t("studio_sql_markdown_copy_failed") });
|
|
|
725
720
|
selectedUser={selectedUser}
|
|
726
721
|
setSelectedUser={setSelectedUser}
|
|
727
722
|
users={users}
|
|
728
|
-
loading={
|
|
723
|
+
loading={false}
|
|
729
724
|
currentUser={currentSelectableUser}
|
|
730
725
|
/>
|
|
731
726
|
</div>
|
|
@@ -160,7 +160,8 @@ export function LogsExplorer() {
|
|
|
160
160
|
Auto-scroll
|
|
161
161
|
</Label>
|
|
162
162
|
</div>
|
|
163
|
-
<span style={{ fontSize: 12,
|
|
163
|
+
<span style={{ fontSize: 12,
|
|
164
|
+
color: "#6c7086" }}>
|
|
164
165
|
{logs.length} entries
|
|
165
166
|
</span>
|
|
166
167
|
</div>
|
|
@@ -185,7 +186,8 @@ export function LogsExplorer() {
|
|
|
185
186
|
borderBottom: "1px solid #181825"
|
|
186
187
|
}}
|
|
187
188
|
>
|
|
188
|
-
<span style={{ color: "#6c7086",
|
|
189
|
+
<span style={{ color: "#6c7086",
|
|
190
|
+
flexShrink: 0 }}>
|
|
189
191
|
{new Date(log.timestamp).toLocaleTimeString()}
|
|
190
192
|
</span>
|
|
191
193
|
<span style={{
|
|
@@ -204,7 +206,8 @@ export function LogsExplorer() {
|
|
|
204
206
|
}}>
|
|
205
207
|
[{log.source}]
|
|
206
208
|
</span>
|
|
207
|
-
<span style={{ color: "#cdd6f4",
|
|
209
|
+
<span style={{ color: "#cdd6f4",
|
|
210
|
+
flex: 1 }}>
|
|
208
211
|
{log.message}
|
|
209
212
|
</span>
|
|
210
213
|
</div>
|
|
@@ -232,7 +232,6 @@ export const PolicyEditor = ({
|
|
|
232
232
|
<div className="flex flex-col gap-1.5">
|
|
233
233
|
<Typography variant="caption" className="uppercase tracking-wider text-text-secondary">{t("studio_policy_name")}</Typography>
|
|
234
234
|
<TextField
|
|
235
|
-
// @ts-ignore
|
|
236
235
|
value={name}
|
|
237
236
|
onChange={(e) => setName(e.target.value)}
|
|
238
237
|
placeholder={t("studio_policy_name_placeholder")}
|
|
@@ -359,6 +358,7 @@ export const PolicyEditor = ({
|
|
|
359
358
|
</DialogActions>
|
|
360
359
|
|
|
361
360
|
<Dialog open={helpOpen} onOpenChange={setHelpOpen} maxWidth="3xl">
|
|
361
|
+
<DialogTitle hidden>Row-Level Security Help</DialogTitle>
|
|
362
362
|
<DialogContent className="p-4 sm:p-6 lg:p-8 flex flex-col gap-6">
|
|
363
363
|
<div>
|
|
364
364
|
<Typography variant="h5" className="mb-2">{t("studio_policy_help_title")}</Typography>
|
|
@@ -111,17 +111,18 @@ const QueryLoadingView = () => {
|
|
|
111
111
|
const STORAGE_KEY_TABS = "rebase_sql_tabs";
|
|
112
112
|
const STORAGE_KEY_ACTIVE_TAB = "rebase_sql_active_tab";
|
|
113
113
|
|
|
114
|
-
const FixedEditorOverlay = ({
|
|
115
|
-
displayValue,
|
|
116
|
-
onSave,
|
|
117
|
-
onCancel
|
|
118
|
-
}: {
|
|
119
|
-
displayValue: string,
|
|
120
|
-
onSave: (val: string | null) => void,
|
|
121
|
-
onCancel: () => void
|
|
114
|
+
const FixedEditorOverlay = ({
|
|
115
|
+
displayValue,
|
|
116
|
+
onSave,
|
|
117
|
+
onCancel
|
|
118
|
+
}: {
|
|
119
|
+
displayValue: string,
|
|
120
|
+
onSave: (val: string | null) => void,
|
|
121
|
+
onCancel: () => void
|
|
122
122
|
}) => {
|
|
123
123
|
const [rect, setRect] = useState<DOMRect | null>(null);
|
|
124
|
-
const [windowSize, setWindowSize] = useState({ width: 1000,
|
|
124
|
+
const [windowSize, setWindowSize] = useState({ width: 1000,
|
|
125
|
+
height: 1000 });
|
|
125
126
|
const anchorRef = useRef<HTMLDivElement>(null);
|
|
126
127
|
|
|
127
128
|
useEffect(() => {
|
|
@@ -129,10 +130,12 @@ const FixedEditorOverlay = ({
|
|
|
129
130
|
setRect(anchorRef.current.parentElement.getBoundingClientRect());
|
|
130
131
|
}
|
|
131
132
|
if (typeof window !== "undefined") {
|
|
132
|
-
setWindowSize({ width: window.innerWidth,
|
|
133
|
-
|
|
134
|
-
window.
|
|
135
|
-
|
|
133
|
+
setWindowSize({ width: window.innerWidth,
|
|
134
|
+
height: window.innerHeight });
|
|
135
|
+
const handleResize = () => setWindowSize({ width: window.innerWidth,
|
|
136
|
+
height: window.innerHeight });
|
|
137
|
+
window.addEventListener("resize", handleResize);
|
|
138
|
+
return () => window.removeEventListener("resize", handleResize);
|
|
136
139
|
}
|
|
137
140
|
return undefined;
|
|
138
141
|
}, []);
|
|
@@ -149,7 +152,7 @@ const FixedEditorOverlay = ({
|
|
|
149
152
|
if (left + minWidth > windowSize.width) {
|
|
150
153
|
left = Math.max(10, windowSize.width - minWidth - 10);
|
|
151
154
|
}
|
|
152
|
-
|
|
155
|
+
|
|
153
156
|
// Calculate a max height that doesn't overflow the bottom
|
|
154
157
|
const maxAvailableHeight = Math.max(50, windowSize.height - top - 10);
|
|
155
158
|
const resolvedMaxHeight = Math.min(300, maxAvailableHeight);
|
|
@@ -162,13 +165,13 @@ const FixedEditorOverlay = ({
|
|
|
162
165
|
return (
|
|
163
166
|
<div ref={anchorRef} className="w-full h-full min-h-[20px]">
|
|
164
167
|
{createPortal(
|
|
165
|
-
<div
|
|
168
|
+
<div
|
|
166
169
|
className="fixed z-[9999] bg-surface-50 dark:bg-surface-900 border-2 border-primary dark:border-primary-dark shadow-xl flex flex-col"
|
|
167
|
-
style={{
|
|
168
|
-
top,
|
|
169
|
-
left,
|
|
170
|
-
minWidth,
|
|
171
|
-
minHeight,
|
|
170
|
+
style={{
|
|
171
|
+
top,
|
|
172
|
+
left,
|
|
173
|
+
minWidth,
|
|
174
|
+
minHeight,
|
|
172
175
|
maxWidth: Math.min(400, windowSize.width - left - 10)
|
|
173
176
|
}}
|
|
174
177
|
>
|
|
@@ -176,7 +179,8 @@ const FixedEditorOverlay = ({
|
|
|
176
179
|
className="w-full h-full bg-transparent outline-none border-none ring-0 font-mono text-[13px] text-text-primary dark:text-text-primary-dark px-4 py-1.5 resize-none overflow-y-auto"
|
|
177
180
|
defaultValue={displayValue}
|
|
178
181
|
autoFocus
|
|
179
|
-
style={{ minHeight:
|
|
182
|
+
style={{ minHeight: "32px",
|
|
183
|
+
maxHeight: resolvedMaxHeight }}
|
|
180
184
|
onFocus={(e) => {
|
|
181
185
|
const val = e.target.value;
|
|
182
186
|
e.target.value = "";
|
|
@@ -342,7 +346,8 @@ export const SQLEditor = () => {
|
|
|
342
346
|
if (actualDb) {
|
|
343
347
|
setSelectedDatabase(actualDb);
|
|
344
348
|
localStorage.setItem(`rebase_sql_selected_db_${projectPrefix}`, actualDb);
|
|
345
|
-
setTabs(prev => prev.map(t => t.id === initialActiveTabId && (!t.database || !dbs.includes(t.database)) ? { ...t,
|
|
349
|
+
setTabs(prev => prev.map(t => t.id === initialActiveTabId && (!t.database || !dbs.includes(t.database)) ? { ...t,
|
|
350
|
+
database: actualDb } : t));
|
|
346
351
|
}
|
|
347
352
|
|
|
348
353
|
const currentUser = (currentUserResult?.[0] as Record<string, unknown> | undefined)?.role as string | undefined;
|
|
@@ -360,7 +365,8 @@ export const SQLEditor = () => {
|
|
|
360
365
|
if (actualRole) {
|
|
361
366
|
setSelectedRole(actualRole);
|
|
362
367
|
localStorage.setItem(`rebase_sql_selected_role_${projectPrefix}`, actualRole);
|
|
363
|
-
setTabs(prev => prev.map(t => t.id === initialActiveTabId && (!t.role || !roles.includes(t.role)) ? { ...t,
|
|
368
|
+
setTabs(prev => prev.map(t => t.id === initialActiveTabId && (!t.role || !roles.includes(t.role)) ? { ...t,
|
|
369
|
+
role: actualRole } : t));
|
|
364
370
|
}
|
|
365
371
|
}
|
|
366
372
|
} catch (err: unknown) {
|
|
@@ -384,7 +390,8 @@ export const SQLEditor = () => {
|
|
|
384
390
|
const handleDatabaseChange = (db: string, tabId?: string) => {
|
|
385
391
|
setSelectedDatabase(db);
|
|
386
392
|
localStorage.setItem(`rebase_sql_selected_db_${projectPrefix}`, db);
|
|
387
|
-
setTabs(prev => prev.map(t => t.id === (tabId || activeTabId) ? { ...t,
|
|
393
|
+
setTabs(prev => prev.map(t => t.id === (tabId || activeTabId) ? { ...t,
|
|
394
|
+
database: db } : t));
|
|
388
395
|
// Reset so the schema will be re-fetched for the new database
|
|
389
396
|
schemaFetchedRef.current = false;
|
|
390
397
|
};
|
|
@@ -392,7 +399,8 @@ export const SQLEditor = () => {
|
|
|
392
399
|
const handleRoleChange = (role: string, tabId?: string) => {
|
|
393
400
|
setSelectedRole(role);
|
|
394
401
|
localStorage.setItem(`rebase_sql_selected_role_${projectPrefix}`, role);
|
|
395
|
-
setTabs(prev => prev.map(t => t.id === (tabId || activeTabId) ? { ...t,
|
|
402
|
+
setTabs(prev => prev.map(t => t.id === (tabId || activeTabId) ? { ...t,
|
|
403
|
+
role } : t));
|
|
396
404
|
};
|
|
397
405
|
|
|
398
406
|
const handleTabChange = useCallback((newTabId: string) => {
|
|
@@ -404,14 +412,16 @@ export const SQLEditor = () => {
|
|
|
404
412
|
localStorage.setItem(`rebase_sql_selected_db_${projectPrefix}`, newTab.database);
|
|
405
413
|
schemaFetchedRef.current = false;
|
|
406
414
|
} else if (!newTab.database && selectedDatabase) {
|
|
407
|
-
setTabs(prev => prev.map(t => t.id === newTabId ? { ...t,
|
|
415
|
+
setTabs(prev => prev.map(t => t.id === newTabId ? { ...t,
|
|
416
|
+
database: selectedDatabase } : t));
|
|
408
417
|
}
|
|
409
418
|
|
|
410
419
|
if (newTab.role && newTab.role !== selectedRole) {
|
|
411
420
|
setSelectedRole(newTab.role);
|
|
412
421
|
localStorage.setItem(`rebase_sql_selected_role_${projectPrefix}`, newTab.role);
|
|
413
422
|
} else if (!newTab.role && selectedRole) {
|
|
414
|
-
setTabs(prev => prev.map(t => t.id === newTabId ? { ...t,
|
|
423
|
+
setTabs(prev => prev.map(t => t.id === newTabId ? { ...t,
|
|
424
|
+
role: selectedRole } : t));
|
|
415
425
|
}
|
|
416
426
|
}
|
|
417
427
|
}, [tabs, selectedDatabase, selectedRole, projectPrefix]);
|
|
@@ -777,7 +787,7 @@ execTime: Math.round(performance.now() - start) });
|
|
|
777
787
|
const executeRun = useCallback(async (sqlOverride?: string) => {
|
|
778
788
|
let sqlToRun = sqlOverride || activeTab.sql;
|
|
779
789
|
const upperSql = sqlToRun.toUpperCase();
|
|
780
|
-
|
|
790
|
+
|
|
781
791
|
const isAggregate = /\b(COUNT|SUM|AVG|MIN|MAX)\s*\(/i.test(sqlToRun);
|
|
782
792
|
const isExplain = /\bEXPLAIN\b/i.test(sqlToRun);
|
|
783
793
|
|
|
@@ -1370,8 +1380,8 @@ isFavorite: !s.isFavorite } : s));
|
|
|
1370
1380
|
>
|
|
1371
1381
|
<DatabaseIcon size={iconSize.small} className="mr-1.5 text-text-disabled dark:text-text-disabled-dark"/>
|
|
1372
1382
|
<span className="max-w-[160px] truncate">
|
|
1373
|
-
{isLoadingConfig
|
|
1374
|
-
? "..."
|
|
1383
|
+
{isLoadingConfig
|
|
1384
|
+
? "..."
|
|
1375
1385
|
: `${selectedDatabase || t("studio_sql_select_db")}${selectedRole ? ` (${selectedRole})` : ""}`}
|
|
1376
1386
|
</span>
|
|
1377
1387
|
</Button>
|
|
@@ -434,6 +434,7 @@ function FilePreviewPanel({
|
|
|
434
434
|
|
|
435
435
|
{/* Delete Confirmation */}
|
|
436
436
|
<Dialog open={deleteDialogOpen} onOpenChange={setDeleteDialogOpen}>
|
|
437
|
+
<DialogTitle hidden>Delete File</DialogTitle>
|
|
437
438
|
<DialogContent>
|
|
438
439
|
<Typography variant="subtitle1" className="mb-2">
|
|
439
440
|
Delete File?
|
|
@@ -669,14 +670,16 @@ export const StorageView = () => {
|
|
|
669
670
|
// Validate folder name
|
|
670
671
|
const name = newFolderName.trim();
|
|
671
672
|
if (name.includes("/") || name.includes("\\")) {
|
|
672
|
-
snackbarController.open({ type: "error",
|
|
673
|
+
snackbarController.open({ type: "error",
|
|
674
|
+
message: "Folder name cannot contain slashes" });
|
|
673
675
|
return;
|
|
674
676
|
}
|
|
675
677
|
|
|
676
678
|
// Check if folder already exists
|
|
677
679
|
const existingFolder = folders.find(f => f.name === name);
|
|
678
680
|
if (existingFolder) {
|
|
679
|
-
snackbarController.open({ type: "error",
|
|
681
|
+
snackbarController.open({ type: "error",
|
|
682
|
+
message: `Folder "${name}" already exists` });
|
|
680
683
|
return;
|
|
681
684
|
}
|
|
682
685
|
|
|
@@ -698,12 +701,14 @@ export const StorageView = () => {
|
|
|
698
701
|
throw new Error(err.error || "Failed to create folder");
|
|
699
702
|
}
|
|
700
703
|
|
|
701
|
-
snackbarController.open({ type: "success",
|
|
704
|
+
snackbarController.open({ type: "success",
|
|
705
|
+
message: `Folder "${name}" created` });
|
|
702
706
|
setNewFolderDialogOpen(false);
|
|
703
707
|
setNewFolderName("");
|
|
704
708
|
await fetchContents(currentPath);
|
|
705
709
|
} catch (e) {
|
|
706
|
-
snackbarController.open({ type: "error",
|
|
710
|
+
snackbarController.open({ type: "error",
|
|
711
|
+
message: e instanceof Error ? e.message : String(e) });
|
|
707
712
|
} finally {
|
|
708
713
|
setCreatingFolder(false);
|
|
709
714
|
}
|
|
@@ -715,7 +720,8 @@ export const StorageView = () => {
|
|
|
715
720
|
try {
|
|
716
721
|
for (const file of droppedFiles) {
|
|
717
722
|
const key = currentPath ? `${currentPath}/${file.name}` : file.name;
|
|
718
|
-
await storageSourceRef.current.putObject({ file,
|
|
723
|
+
await storageSourceRef.current.putObject({ file,
|
|
724
|
+
key });
|
|
719
725
|
}
|
|
720
726
|
snackbarController.open({
|
|
721
727
|
type: "success",
|
|
@@ -768,7 +774,8 @@ export const StorageView = () => {
|
|
|
768
774
|
} else {
|
|
769
775
|
await storageSourceRef.current.deleteObject(file.fullPath);
|
|
770
776
|
}
|
|
771
|
-
snackbarController.open({ type: "success",
|
|
777
|
+
snackbarController.open({ type: "success",
|
|
778
|
+
message: `"${file.name}" deleted` });
|
|
772
779
|
setSelectedFile(null);
|
|
773
780
|
setSelectedDownloadUrl(null);
|
|
774
781
|
setSelectedPaths(prev => {
|
|
@@ -778,7 +785,8 @@ export const StorageView = () => {
|
|
|
778
785
|
});
|
|
779
786
|
fetchContents(currentPath);
|
|
780
787
|
} catch (e) {
|
|
781
|
-
snackbarController.open({ type: "error",
|
|
788
|
+
snackbarController.open({ type: "error",
|
|
789
|
+
message: e instanceof Error ? e.message : String(e) });
|
|
782
790
|
}
|
|
783
791
|
}, [currentPath, snackbarController, fetchContents, deleteFolderRecursive]);
|
|
784
792
|
|
|
@@ -794,13 +802,15 @@ export const StorageView = () => {
|
|
|
794
802
|
await storageSourceRef.current.deleteObject(item.fullPath);
|
|
795
803
|
}
|
|
796
804
|
}
|
|
797
|
-
snackbarController.open({ type: "success",
|
|
805
|
+
snackbarController.open({ type: "success",
|
|
806
|
+
message: `${items.length} item${items.length !== 1 ? "s" : ""} deleted` });
|
|
798
807
|
setSelectedPaths(new Set());
|
|
799
808
|
setSelectedFile(null);
|
|
800
809
|
setSelectedDownloadUrl(null);
|
|
801
810
|
await fetchContents(currentPath);
|
|
802
811
|
} catch (e) {
|
|
803
|
-
snackbarController.open({ type: "error",
|
|
812
|
+
snackbarController.open({ type: "error",
|
|
813
|
+
message: e instanceof Error ? e.message : String(e) });
|
|
804
814
|
} finally {
|
|
805
815
|
setDeleting(false);
|
|
806
816
|
setDeleteDialogOpen(false);
|
|
@@ -814,7 +824,8 @@ export const StorageView = () => {
|
|
|
814
824
|
setDeleting(true);
|
|
815
825
|
try {
|
|
816
826
|
await deleteFolderRecursive(deleteDialogTarget.fullPath);
|
|
817
|
-
snackbarController.open({ type: "success",
|
|
827
|
+
snackbarController.open({ type: "success",
|
|
828
|
+
message: `Folder "${deleteDialogTarget.name}" deleted` });
|
|
818
829
|
setSelectedPaths(prev => {
|
|
819
830
|
const next = new Set(prev);
|
|
820
831
|
next.delete(deleteDialogTarget.fullPath);
|
|
@@ -822,7 +833,8 @@ export const StorageView = () => {
|
|
|
822
833
|
});
|
|
823
834
|
await fetchContents(currentPath);
|
|
824
835
|
} catch (e) {
|
|
825
|
-
snackbarController.open({ type: "error",
|
|
836
|
+
snackbarController.open({ type: "error",
|
|
837
|
+
message: e instanceof Error ? e.message : String(e) });
|
|
826
838
|
} finally {
|
|
827
839
|
setDeleting(false);
|
|
828
840
|
setDeleteDialogOpen(false);
|
|
@@ -1389,6 +1401,7 @@ export const StorageView = () => {
|
|
|
1389
1401
|
}
|
|
1390
1402
|
}}
|
|
1391
1403
|
>
|
|
1404
|
+
<DialogTitle hidden>Delete Confirmation</DialogTitle>
|
|
1392
1405
|
<DialogContent>
|
|
1393
1406
|
<Typography variant="subtitle1" className="font-semibold mb-2">
|
|
1394
1407
|
{deleteDialogTarget === "selection"
|
|
@@ -1435,10 +1448,8 @@ export const StorageView = () => {
|
|
|
1435
1448
|
}
|
|
1436
1449
|
}}
|
|
1437
1450
|
>
|
|
1451
|
+
<DialogTitle hidden>New Folder</DialogTitle>
|
|
1438
1452
|
<DialogContent>
|
|
1439
|
-
<Typography variant="subtitle1" className="font-semibold mb-4">
|
|
1440
|
-
New Folder
|
|
1441
|
-
</Typography>
|
|
1442
1453
|
<TextField
|
|
1443
1454
|
autoFocus
|
|
1444
1455
|
size="small"
|