Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 4 additions & 2 deletions webapp/packages/core-administration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"description": "",
"license": "Apache-2.0",
"exports": {
".": "./lib/index.js"
".": "./lib/index.js",
"./module": "./lib/module.js"
},
"scripts": {
"build": "tsc -b",
Expand All @@ -34,14 +35,15 @@
"@cloudbeaver/core-settings": "workspace:*",
"@cloudbeaver/core-storage": "workspace:*",
"@cloudbeaver/core-utils": "workspace:*",
"@dbeaver/js-helpers": "workspace:^",
"@dbeaver/js-helpers": "workspace:*",
"mobx": "^6",
"tslib": "^2"
},
"devDependencies": {
"@cloudbeaver/core-cli": "workspace:*",
"@cloudbeaver/tsconfig": "workspace:*",
"@dbeaver/cli": "workspace:*",
"rimraf": "^6",
"typescript": "^5"
}
}
1 change: 0 additions & 1 deletion webapp/packages/core-administration/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*/

import './module.js';
export * from './manifest.js';
export * from './AdministrationItem/AdministrationItemService.js';
export * from './AdministrationItem/filterConfigurationWizard.js';
export * from './AdministrationItem/IAdministrationItem.js';
Expand Down
14 changes: 0 additions & 14 deletions webapp/packages/core-administration/src/manifest.ts

This file was deleted.

2 changes: 1 addition & 1 deletion webapp/packages/core-administration/src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { AdministrationScreenService } from './AdministrationScreen/Administrati
import { AdministrationLocaleService } from './AdministrationLocaleService.js';
import { AdministrationItemService } from './AdministrationItem/AdministrationItemService.js';

ModuleRegistry.add({
export default ModuleRegistry.add({
name: '@cloudbeaver/core-administration',

configure: serviceCollection => {
Expand Down
6 changes: 4 additions & 2 deletions webapp/packages/core-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"description": "",
"license": "Apache-2.0",
"exports": {
".": "./lib/index.js"
".": "./lib/index.js",
"./module": "./lib/module.js"
},
"scripts": {
"build": "tsc -b",
Expand All @@ -35,7 +36,7 @@
"@cloudbeaver/core-ui": "workspace:*",
"@cloudbeaver/core-utils": "workspace:*",
"@cloudbeaver/core-version": "workspace:*",
"@dbeaver/ui-kit": "workspace:^",
"@dbeaver/ui-kit": "workspace:*",
"mobx": "^6",
"mobx-react-lite": "^4",
"react": "^19",
Expand All @@ -46,6 +47,7 @@
"@cloudbeaver/core-cli": "workspace:*",
"@cloudbeaver/tsconfig": "workspace:*",
"@types/react": "^19",
"rimraf": "^6",
"typescript": "^5",
"typescript-plugin-css-modules": "^5"
}
Expand Down
3 changes: 0 additions & 3 deletions webapp/packages/core-app/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,3 @@ export * from './AppLocaleService.js';

// components
export * from './BodyLazy.js';

// Interfaces
export * from './manifest.js';
14 changes: 0 additions & 14 deletions webapp/packages/core-app/src/manifest.ts

This file was deleted.

2 changes: 1 addition & 1 deletion webapp/packages/core-app/src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { AppScreenService } from './AppScreen/AppScreenService.js';
import { AppScreenBootstrap } from './AppScreen/AppScreenBootstrap.js';
import { AppLocaleService } from './AppLocaleService.js';

ModuleRegistry.add({
export default ModuleRegistry.add({
name: '@cloudbeaver/core-app',

configure: serviceCollection => {
Expand Down
7 changes: 5 additions & 2 deletions webapp/packages/core-authentication/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"license": "Apache-2.0",
"exports": {
".": "./lib/index.js",
"./module": "./lib/module.js",
"./*": "./lib/*"
},
"scripts": {
Expand All @@ -34,17 +35,19 @@
"@cloudbeaver/core-settings": "workspace:*",
"@cloudbeaver/core-storage": "workspace:*",
"@cloudbeaver/core-utils": "workspace:*",
"@dbeaver/js-helpers": "workspace:^",
"@dbeaver/js-helpers": "workspace:*",
"mobx": "^6",
"tslib": "^2"
},
"devDependencies": {
"@cloudbeaver/core-cli": "workspace:*",
"@cloudbeaver/core-root": "workspace:*",
"@cloudbeaver/core-sdk": "workspace:*",
"@cloudbeaver/core-settings": "workspace:*",
"@cloudbeaver/tests-runner": "workspace:*",
"@cloudbeaver/tsconfig": "workspace:*",
"@dbeaver/cli": "workspace:*",
"@dbeaver/react-tests": "workspace:^",
"@dbeaver/react-tests": "workspace:*",
"msw": "^2",
"rimraf": "^6",
"typescript": "^5",
Expand Down
1 change: 0 additions & 1 deletion webapp/packages/core-authentication/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import './module.js';

export * from './manifest.js';
export * from './ELMRole.js';
export * from './AppAuthService.js';
export * from './AUTH_PROVIDER_LOCAL_ID.js';
Expand Down
14 changes: 0 additions & 14 deletions webapp/packages/core-authentication/src/manifest.ts

This file was deleted.

2 changes: 1 addition & 1 deletion webapp/packages/core-authentication/src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import { AuthConfigurationsResource } from './AuthConfigurationsResource.js';
import { AuthConfigurationParametersResource } from './AuthConfigurationParametersResource.js';
import { AppAuthService } from './AppAuthService.js';

ModuleRegistry.add({
export default ModuleRegistry.add({
name: '@cloudbeaver/core-authentication',

configure: serviceCollection => {
Expand Down
6 changes: 4 additions & 2 deletions webapp/packages/core-blocks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"description": "",
"license": "Apache-2.0",
"exports": {
".": "./lib/index.js"
".": "./lib/index.js",
"./module": "./lib/module.js"
},
"scripts": {
"build": "tsc -b",
Expand Down Expand Up @@ -57,13 +58,14 @@
"@cloudbeaver/tests-runner": "workspace:*",
"@cloudbeaver/tsconfig": "workspace:*",
"@dbeaver/cli": "workspace:*",
"@dbeaver/react-tests": "workspace:^",
"@dbeaver/react-tests": "workspace:*",
"@testing-library/jest-dom": "^6",
"@testing-library/react": "^16",
"@types/react": "^19",
"mobx": "^6",
"react": "^19",
"react-dom": "^19",
"rimraf": "^6",
"typescript": "^5",
"typescript-plugin-css-modules": "^5",
"vitest": "^3"
Expand Down
12 changes: 8 additions & 4 deletions webapp/packages/core-blocks/src/AppRefreshButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
* Licensed under the Apache License, Version 2.0.
* you may not use this file except in compliance with the License.
*/
import type React from 'react';
import { use } from 'react';

import { App, useService } from '@cloudbeaver/core-di';
import { AppContext } from '@cloudbeaver/core-di';
import { clsx } from '@dbeaver/ui-kit';

import style from './AppRefreshButton.module.css';
Expand All @@ -17,10 +17,14 @@ interface IProps {
}

export const AppRefreshButton: React.FC<IProps> = function AppRefreshButton({ className }) {
const app = useService(App);
const app = use(AppContext);

if (!app) {
return null;
}

function refresh() {
app.restart();
app?.restart();
}

return (
Expand Down
14 changes: 14 additions & 0 deletions webapp/packages/core-blocks/src/DisplayError.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
display: flex;
margin: auto;
padding: 16px 24px;
gap: 8px;
flex-direction: column;
align-items: center;
}
Expand All @@ -29,4 +30,17 @@
.details {
padding: 8px 16px;
white-space: pre-wrap;
font-size: 14px;

& summary {
cursor: pointer;
margin-bottom: 8px;
}

& code {
display: block;
font-size: 12px;
overflow: auto;
height: 250px;
}
}
20 changes: 14 additions & 6 deletions webapp/packages/core-blocks/src/DisplayError.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* CloudBeaver - Cloud Database Manager
* Copyright (C) 2020-2024 DBeaver Corp and others
* Copyright (C) 2020-2025 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0.
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -36,11 +36,19 @@ export const DisplayError = observer<Props>(function DisplayError({ root, childr
{root && <AppRefreshButton />}
{children}
{error && (
<div className={s(styles, { details: true })}>
{error.toString()}
{stack && <br />}
{stack}
</div>
<details className={s(styles, { details: true })}>
<summary>Details</summary>
<p>
{error.toString()}
{stack && (
<>
<br />
<br />
</>
)}
<code>{stack}</code>
</p>
</details>
)}
</div>
</div>
Expand Down
1 change: 0 additions & 1 deletion webapp/packages/core-blocks/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@

export * from './AuthenticationProviderLoader.js';
export * from './useAuthenticationAction.js';
export * from './CommonDialog/CommonDialog/CommonDialogBody.js';

Check failure on line 13 in webapp/packages/core-blocks/src/index.ts

View workflow job for this annotation

GitHub Actions / Frontend / Lint

Don't import/export .tsx files from .ts files directly, use React.lazy()
export * from './CommonDialog/CommonDialog/CommonDialogFooter.js';

Check failure on line 14 in webapp/packages/core-blocks/src/index.ts

View workflow job for this annotation

GitHub Actions / Frontend / Lint

Don't import/export .tsx files from .ts files directly, use React.lazy()
export * from './CommonDialog/CommonDialog/CommonDialogHeader.js';

Check failure on line 15 in webapp/packages/core-blocks/src/index.ts

View workflow job for this annotation

GitHub Actions / Frontend / Lint

Don't import/export .tsx files from .ts files directly, use React.lazy()
export * from './CommonDialog/CommonDialog/CommonDialogWrapper.js';

Check failure on line 16 in webapp/packages/core-blocks/src/index.ts

View workflow job for this annotation

GitHub Actions / Frontend / Lint

Don't import/export .tsx files from .ts files directly, use React.lazy()
export * from './CommonDialog/ConfirmationDialog.js';

Check failure on line 17 in webapp/packages/core-blocks/src/index.ts

View workflow job for this annotation

GitHub Actions / Frontend / Lint

Don't import/export .tsx files from .ts files directly, use React.lazy()
export { default as ConfirmationDialogStyles } from './CommonDialog/ConfirmationDialog.module.css';
export * from './CommonDialog/ConfirmationDialogDelete.js';

Check failure on line 19 in webapp/packages/core-blocks/src/index.ts

View workflow job for this annotation

GitHub Actions / Frontend / Lint

Don't import/export .tsx files from .ts files directly, use React.lazy()
export * from './CommonDialog/RenameDialog.js';

Check failure on line 20 in webapp/packages/core-blocks/src/index.ts

View workflow job for this annotation

GitHub Actions / Frontend / Lint

Don't import/export .tsx files from .ts files directly, use React.lazy()
export * from './CommonDialog/DialogsPortal.js';

Check failure on line 21 in webapp/packages/core-blocks/src/index.ts

View workflow job for this annotation

GitHub Actions / Frontend / Lint

Don't import/export .tsx files from .ts files directly, use React.lazy()

export * from './ErrorDetailsDialog/ErrorDetailsDialog.js';

Check failure on line 23 in webapp/packages/core-blocks/src/index.ts

View workflow job for this annotation

GitHub Actions / Frontend / Lint

Don't import/export .tsx files from .ts files directly, use React.lazy()

export * from './ComponentsRegistry/CRegistryLoader.js';
export * from './ComponentsRegistry/registry.js';

Check failure on line 26 in webapp/packages/core-blocks/src/index.ts

View workflow job for this annotation

GitHub Actions / Frontend / Lint

Don't import/export .tsx files from .ts files directly, use React.lazy()
export * from './ComponentsRegistry/CRegistryList.js';
export * from './ComponentsRegistry/IComponentsTreeNodeValidator.js';
export * from './ComponentsRegistry/useParentProps.js';
Expand Down Expand Up @@ -251,7 +251,6 @@
export * from './useListKeyboardNavigation.js';
export * from './useMergeRefs.js';
export * from './usePasswordValidation.js';
export * from './manifest.js';
export * from './importLazyComponent.js';
export * from './ClickableLoader.js';
export * from './FormControls/TagsComboboxLoader.js';
Expand Down
14 changes: 0 additions & 14 deletions webapp/packages/core-blocks/src/manifest.ts

This file was deleted.

2 changes: 1 addition & 1 deletion webapp/packages/core-blocks/src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import { Bootstrap, ModuleRegistry } from '@cloudbeaver/core-di';
import { BlocksLocaleService } from './BlocksLocaleService.js';

ModuleRegistry.add({
export default ModuleRegistry.add({
name: '@cloudbeaver/core-blocks',

configure: serviceCollection => {
Expand Down
11 changes: 10 additions & 1 deletion webapp/packages/core-blocks/src/useS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,16 @@
const stylesRef = useRef<ComponentStyle[]>([]);
const [patch, forceUpdate] = useState(0);
const loadedStyles = useRef<BaseStyles[]>([]);
const themeService = useService(ThemeService);
let themeService: ThemeService | undefined;

try {
// this service not required, in some cases we don't have services initialized and need to show basic UI
// eslint-disable-next-line react-hooks/rules-of-hooks
themeService = useService(ThemeService);
} catch {
themeService = undefined;
}

const [currentThemeId, setCurrentThemeId] = useState(() => themeService?.themeId);
const lastThemeRef = useRef<string | undefined>(currentThemeId);
const filteredStyles = themeService
Expand Down Expand Up @@ -111,7 +120,7 @@
}
});

const styles = useMemo(() => combineStyles(loadedStyles.current), [patch, loadedStyles.current]);

Check warning on line 123 in webapp/packages/core-blocks/src/useS.ts

View workflow job for this annotation

GitHub Actions / Frontend / Lint

React Hook useMemo has unnecessary dependencies: 'loadedStyles.current' and 'patch'. Either exclude them or remove the dependency array. Mutable values like 'loadedStyles.current' aren't valid dependencies because mutating them doesn't re-render the component

return styles as ExtractStyles<T>; // todo this method is called in each rerender
}
Expand Down
Loading
Loading