From 0a14db01be5381b827ac60fafd62bbf2a861809e Mon Sep 17 00:00:00 2001 From: Aditya Toshniwal Date: Fri, 24 Oct 2025 08:26:10 +0530 Subject: [PATCH] Migrate pgAdmin UI to use React 19. #8676 --- tools/get_chromedriver.py | 415 ++++++++++------- web/.eslintrc.js | 4 +- web/babel.config.json | 6 +- web/jest.config.js | 3 +- web/package.json | 12 +- .../about/static/js/AboutComponent.jsx | 2 +- web/pgadmin/about/static/js/about.js | 1 - web/pgadmin/browser/static/js/node.js | 1 - web/pgadmin/dashboard/static/js/Dashboard.jsx | 2 +- web/pgadmin/dashboard/static/js/Graphs.jsx | 2 +- .../dashboard/static/js/PgAdminLogo.jsx | 1 - .../static/js/Replication/LogReplication.jsx | 2 +- .../static/js/Replication/PGDReplication.jsx | 2 +- .../dashboard/static/js/Replication/index.jsx | 1 - .../static/js/SystemStats/CpuDetails.jsx | 2 +- .../static/js/SystemStats/Memory.jsx | 2 +- .../static/js/SystemStats/Storage.jsx | 2 +- .../static/js/SystemStats/Summary.jsx | 2 +- .../dashboard/static/js/WelcomeDashboard.jsx | 1 - .../static/js/components/ChartContainer.jsx | 1 - .../static/js/components/RefreshButtons.jsx | 1 - .../static/js/components/SectionContainer.jsx | 1 - .../bgprocess/static/js/BgProcessNotify.jsx | 1 - .../bgprocess/static/js/ProcessDetails.jsx | 2 +- web/pgadmin/misc/cloud/static/js/cloud.js | 1 - .../misc/cloud/static/js/cloud_components.jsx | 1 - .../static/js/FileManagerModule.jsx | 1 - .../static/js/components/GridView.jsx | 2 +- .../static/js/components/Uploader.jsx | 2 +- web/pgadmin/misc/properties/Properties.jsx | 1 - .../workspaces/static/js/AdHocConnection.jsx | 3 +- .../workspaces/static/js/WorkspaceToolbar.jsx | 2 +- .../static/js/WorkspaceWelcomePage.jsx | 1 - .../misc/workspaces/static/js/config.jsx | 1 - .../static/js/components/LeftTree.jsx | 2 +- .../js/components/PreferencesHelper.jsx | 1 - .../static/js/components/RightPreference.jsx | 2 +- web/pgadmin/static/bundle/app.js | 1 - web/pgadmin/static/js/AppMenuBar.jsx | 2 +- web/pgadmin/static/js/BrowserComponent.jsx | 2 +- .../js/Dialogs/ChangeOwnershipContent.jsx | 1 - .../static/js/Dialogs/ConfirmSaveContent.jsx | 1 - .../js/Dialogs/ConnectServerContent.jsx | 2 +- .../js/Dialogs/MasterPasswordContent.jsx | 2 +- .../static/js/Dialogs/NamedRestoreContent.jsx | 2 +- .../static/js/Dialogs/RenameTabContent.jsx | 2 +- .../static/js/Dialogs/UrlDialogContent.jsx | 1 - web/pgadmin/static/js/Dialogs/index.jsx | 1 - .../static/js/QuickSearch/HiddenIframe.jsx | 1 - web/pgadmin/static/js/QuickSearch/index.jsx | 2 +- .../static/js/QuickSearch/online_help.js | 1 - .../js/SchemaView/DataGridView/SearchBox.jsx | 2 +- .../DataGridView/features/common.jsx | 1 - .../DataGridView/features/reorder.jsx | 2 +- .../js/SchemaView/DataGridView/formHeader.jsx | 2 +- .../js/SchemaView/DataGridView/grid.jsx | 2 +- .../js/SchemaView/DataGridView/header.jsx | 2 +- .../js/SchemaView/DataGridView/mappedCell.jsx | 2 +- .../static/js/SchemaView/DataGridView/row.jsx | 53 +-- .../DataGridView/utils/createGridColumns.jsx | 1 - .../static/js/SchemaView/FieldControl.jsx | 6 +- .../static/js/SchemaView/FormLoader.jsx | 2 +- .../static/js/SchemaView/FormViewTab.jsx | 2 +- .../static/js/SchemaView/InlineView.jsx | 2 +- .../static/js/SchemaView/MappedControl.jsx | 2 +- .../static/js/SchemaView/ResetButton.jsx | 2 +- web/pgadmin/static/js/SchemaView/SQLTab.jsx | 2 +- .../static/js/SchemaView/SaveButton.jsx | 2 +- .../static/js/SchemaView/SchemaDialogView.jsx | 2 +- .../js/SchemaView/SchemaPropertiesView.jsx | 2 +- .../static/js/SchemaView/SchemaView.jsx | 1 - .../static/js/SecurityPages/BasePage.jsx | 2 +- .../js/SecurityPages/ForgotPasswordPage.jsx | 2 +- .../static/js/SecurityPages/LoginPage.jsx | 2 +- .../js/SecurityPages/MfaRegisterPage.jsx | 2 +- .../js/SecurityPages/MfaValidatePage.jsx | 2 +- .../js/SecurityPages/PasswordResetPage.jsx | 2 +- web/pgadmin/static/js/SecurityPages/index.jsx | 1 - web/pgadmin/static/js/Theme/index.jsx | 2 +- web/pgadmin/static/js/ToolErrorView.jsx | 1 - web/pgadmin/static/js/ToolView.jsx | 2 +- web/pgadmin/static/js/UtilityView.jsx | 2 +- web/pgadmin/static/js/components/Buttons.jsx | 18 +- .../static/js/components/ContextMenu.jsx | 1 - .../js/components/EmptyPanelMessage.jsx | 1 - .../static/js/components/ExternalIcon.jsx | 1 - web/pgadmin/static/js/components/FieldSet.jsx | 1 - .../static/js/components/FormComponents.jsx | 22 +- .../static/js/components/JsonEditor.jsx | 2 +- .../js/components/KeyboardShortcuts.jsx | 2 +- web/pgadmin/static/js/components/Loader.jsx | 1 - .../static/js/components/ModalContent.jsx | 11 +- .../js/components/ObjectBreadcrumbs.jsx | 2 +- .../js/components/PgChart/StreamingChart.jsx | 2 +- .../js/components/PgReactTableStyled.jsx | 50 ++- .../FileTreeItem/DoubleClickHandler.jsx | 1 - .../js/components/PgTree/FileTreeX/index.tsx | 2 +- .../static/js/components/Privilege.jsx | 1 - .../static/js/components/QueryThresholds.jsx | 1 - .../ReactCodeMirror/components/Editor.jsx | 2 +- .../ReactCodeMirror/components/FindDialog.jsx | 2 +- .../ReactCodeMirror/components/GotoDialog.jsx | 2 +- .../js/components/ReactCodeMirror/index.jsx | 2 +- .../static/js/components/SearchInputText.jsx | 1 - .../static/js/components/SelectRefresh.jsx | 2 +- .../static/js/components/SelectThemes.jsx | 2 +- .../static/js/components/ShortcutTitle.jsx | 1 - web/pgadmin/static/js/components/TabPanel.jsx | 1 - web/pgadmin/static/js/components/Table.jsx | 1 - .../js/helpers/Layout/LayoutIframeTab.jsx | 2 +- .../static/js/helpers/ModalProvider.jsx | 13 +- web/pgadmin/static/js/helpers/Notifier.jsx | 9 +- .../js/helpers/appAutoUpdateNotifier.jsx | 1 - .../static/js/helpers/withColorPicker.js | 2 +- .../ObjectExplorer/ObjectExplorerFilter.jsx | 2 +- .../ObjectExplorer/ObjectExplorerToolbar.jsx | 2 +- .../debugger/static/js/DebuggerModule.js | 1 - .../debugger/static/js/components/ToolBar.jsx | 2 +- .../tools/debugger/static/js/debugger_ui.js | 1 - web/pgadmin/tools/erd/static/js/ERDModule.js | 1 - .../js/erd_tool/components/BeforeUnload.jsx | 2 +- .../js/erd_tool/components/ConnectionBar.jsx | 2 +- .../js/erd_tool/components/FloatingNote.jsx | 2 +- .../erd/static/js/erd_tool/dialogs/index.jsx | 1 - .../js/erd_tool/links/OneToManyLink.jsx | 7 +- .../static/js/erd_tool/nodes/TableNode.jsx | 16 +- .../grant_wizard/static/js/grant_wizard.js | 1 - .../static/js/import_export_servers.js | 1 - .../tools/psql/static/js/PsqlModule.js | 1 - .../schema_diff/static/js/SchemaDiffModule.js | 1 - .../static/js/components/InputComponent.jsx | 2 +- .../js/components/ResultGridComponent.jsx | 2 +- .../static/js/components/Results.jsx | 2 +- .../components/SchemaDiffButtonComponent.jsx | 2 +- .../js/components/SchemaDiffCompare.jsx | 2 +- .../tools/search_objects/static/js/index.js | 1 - .../sqleditor/static/js/SQLEditorModule.js | 1 - .../js/components/QueryToolComponent.jsx | 7 +- .../QueryToolDataGrid/Formatters.jsx | 1 - .../static/js/components/connectServer.js | 1 - .../components/dialogs/CloseRunningDialog.jsx | 1 - .../dialogs/ConfirmExecuteQueryContent.jsx | 2 +- .../dialogs/ConfirmPromotionContent.jsx | 2 +- .../dialogs/ConfirmTransactionContent.jsx | 1 - .../js/components/sections/QueryHistory.jsx | 111 +++-- .../user_management/static/js/RoleDialog.jsx | 2 +- .../user_management/static/js/UserDialog.jsx | 2 +- .../tools/user_management/static/js/index.js | 1 - .../SchemaView/SchemaDialogView.spec.js | 1 - .../SchemaView/SchemaDialogViewEdit.spec.js | 2 +- .../SchemaView/SchemaPropertiesView.spec.js | 1 - .../SchemaView/SchemaViewAllTypes.spec.js | 1 - .../SecurityPages/ForgotPasswordPage.spec.js | 1 - .../SecurityPages/LoginPage.spec.js | 1 - .../SecurityPages/MfaRegisterPage.spec.js | 1 - .../SecurityPages/MfaValidatePage.spec.js | 1 - .../SecurityPages/PasswordResetPage.spec.js | 1 - .../javascript/__mocks__/@mui/material.jsx | 11 +- .../javascript/__mocks__/react-data-grid.jsx | 11 +- web/regression/javascript/__mocks__/svg.js | 10 +- .../javascript/__mocks__/uplot-react.jsx | 1 - .../javascript/components/Buttons.spec.js | 1 - .../javascript/components/CodeMirror.spec.js | 1 - .../components/CodeMirrorCustomEditor.spec.js | 1 - .../components/KeyboardShortcuts.spec.js | 1 - .../javascript/components/Loader.spec.js | 1 - .../javascript/components/Menu.spec.js | 1 - .../components/ObjectBreadcrumbs.spec.js | 1 - .../javascript/components/Privilege.spec.js | 1 - .../components/QueryThreshold.spec.js | 1 - .../components/SelectRefresh.spec.js | 1 - .../components/SelectThemes.spec.js | 1 - .../components/ShortcutTitle.spec.js | 1 - .../javascript/components/TabPanel.spec.js | 1 - .../javascript/dashboard/graphs_spec.js | 1 - .../dashboard/graphs_wrapper_spec.js | 1 - .../debugger/MockDebuggerComponent.jsx | 2 +- .../javascript/debugger/debugger_spec.js | 1 - .../debugger/debugger_stack_spec.js | 1 - .../debugger/debugger_tool_bar_spec.js | 1 - .../javascript/erd/onetomany_link_spec.js | 1 - .../javascript/erd/table_node.spec.js | 1 - .../erd/ui_components/ConnectionBar.spec.js | 1 - .../erd/ui_components/FloatingNote.spec.js | 1 - web/regression/javascript/fake_theme.js | 1 - .../file_manager/FileManager.spec.js | 2 +- .../javascript/file_manager/GridView.spec.js | 1 - .../javascript/file_manager/ListView.spec.js | 1 - .../javascript/file_manager/Uploader.spec.js | 1 - .../javascript/genericFunctions.jsx | 1 - .../javascript/grant_wizard/wizard_spec.js | 1 - .../javascript/processes/Proceses.spec.js | 1 - .../processes/ProcessDetails.spec.js | 1 - .../quick_search/quick_search_spec.js | 1 - .../schema_diff/schema_diff_spec.js | 1 - .../schema_ui_files/backup.ui.spec.js | 1 - .../search_objects/SearchObject.spec.js | 1 - .../user_management/Permissions.spec.js | 1 - .../javascript/user_management/Roles.spec.js | 1 - .../user_management/UserDialog.spec.js | 1 - .../javascript/user_management/Users.spec.js | 1 - web/regression/javascript/withPgadmin.js | 1 - web/webpack.config.js | 15 +- web/yarn.lock | 422 +++++++++++------- 204 files changed, 818 insertions(+), 675 deletions(-) diff --git a/tools/get_chromedriver.py b/tools/get_chromedriver.py index cd0f332f8..12241b9b6 100644 --- a/tools/get_chromedriver.py +++ b/tools/get_chromedriver.py @@ -1,210 +1,299 @@ # -*- coding: utf-8 -*- -########################################################################## -# -# pgAdmin 4 - PostgreSQL Tools -# -# Copyright (C) 2013 - 2025, The pgAdmin Development Team -# This software is released under the PostgreSQL Licence -# -########################################################################## - -# Get the correct version of chromedriver for the version of Chrome on the -# machine and save it to the specified location. - import argparse import os import platform import subprocess import sys -from urllib.request import urlopen, urlretrieve -from urllib.error import URLError +import requests import zipfile +import stat + + +# --- Helper Functions for Auto-Detection --- + + +def _find_chrome_executable(): + """Find the Chrome executable path on Linux or macOS.""" + system = platform.system() + + if system == 'Darwin': + # macOS standard location + paths = [ + '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome' + ] + elif system == 'Linux': + # Common Linux executables (Chromium and Google Chrome) + paths = [ + 'google-chrome', + 'google-chrome-stable', + 'chromium', + 'chromium-browser', + ] + else: + return None + + for path in paths: + try: + # Check if the command/path is callable (using 'which' or + # direct check) + if system == 'Linux': + # Use 'which' for common Linux commands/paths + result = subprocess.run( + ['which', path], + capture_output=True, + text=True, + check=False + ) + if result.returncode == 0: + return result.stdout.strip() + + # For macOS, or if 'which' failed/is unavailable, check direct path + if os.path.exists(path): + return path + + except FileNotFoundError: + continue + + return None def read_command_line(): """Read the command line arguments. - - Returns: - ArgumentParser: The parsed arguments object - """ + The 'chrome' argument is now removed.""" parser = argparse.ArgumentParser( - description='Get the correct version of chromedriver for the ' - 'specified Chrome installation and save it.') - if platform.system() != 'Windows': - parser.add_argument("chrome", metavar="CHROME", - help="the Chrome executable") - parser.add_argument("directory", metavar="DIRECTORY", - help="the directory in which to save chromedriver") + description=( + 'Auto-detects Chrome version, gets the correct Chromedriver ' + 'using Chrome for Testing, and saves it.' + ) + ) - args = parser.parse_args() + # Only accept the directory argument + parser.add_argument( + 'directory', + metavar='DIRECTORY', + help='the directory in which to save chromedriver' + ) - return args + return parser.parse_args() -def get_chrome_version(args): - """Get the Chrome version number. +def get_chrome_version(): + """Get the Chrome version number via OS-specific auto-detection.""" + full_version = None - Args: - args: The parsed arguments object - Returns: - The Chrome version number - """ if platform.system() == 'Windows': - # On Windows we need to examine the resource section of the binary - import winreg - - def _read_registry(root, key, value): - try: - hkey = winreg.OpenKey(root, key) - except Exception: - return None - try: - (val, typ) = winreg.QueryValueEx(hkey, value) - except Exception: - winreg.CloseKey(hkey) - return None - - winreg.CloseKey(hkey) - return val - - key = r'SOFTWARE\Google\Chrome\BLBeacon' - version_str = _read_registry(winreg.HKEY_CURRENT_USER, key, 'Version') - - # On a 64b host, look for a 32b installation - if not version_str: - key = r'SOFTWARE\Wow6432Node\Google\Chrome\BLBeacon' - version_str = _read_registry(winreg.HKEY_CURRENT_USER, key, - 'Version') - - if not version_str: - print('The Chrome version could not be read from the registry.') - sys.exit(1) - - chrome_version = '.'.join(version_str.split()[-1].split('.')[:-1]) - else: - # On Linux/Mac we run the Chrome executable with the --version flag, - # then parse the output. try: - result = subprocess.Popen([args.chrome, '--version'], - stdout=subprocess.PIPE) - except FileNotFoundError: - print('The specified Chrome executable could not be found.') + import winreg + + def _read_registry(root, key, value): + try: + with winreg.OpenKey(root, key) as hkey: + val, _ = winreg.QueryValueEx(hkey, value) + return val + except Exception: + return None + + keys = [ + r'SOFTWARE\Google\Chrome\BLBeacon', + r'SOFTWARE\Wow6432Node\Google\Chrome\BLBeacon', + ] + version_str = None + for key in keys: + version_str = _read_registry( + winreg.HKEY_CURRENT_USER, key, 'Version' + ) + if version_str: + break + + if not version_str: + print( + 'Error: The Chrome version could not be read ' + 'from the Windows registry.' + ) + sys.exit(1) + + full_version = ( + version_str.split()[-1].strip() + if version_str.split() + else version_str.strip() + ) + + except ImportError: + print("Error: The 'winreg' module is required on Windows.") + sys.exit(1) + except Exception as e: + print(f"Error reading Windows registry: {e}") sys.exit(1) - version_str = result.stdout.read().decode("utf-8") - # Check for 'Chrom' not 'Chrome' in case the user is using Chromium. - if "Chrom" not in version_str: - print('The specified Chrome executable output an unexpected ' - 'version string: {}.'.format(version_str)) + else: + chrome_executable = _find_chrome_executable() + + if not chrome_executable: + print( + 'Error: Could not find the Google Chrome or Chromium ' + 'executable in common locations.' + ) sys.exit(1) - # On some linux distro `chrome--version` gives output like - # 'Google Chrome 80.0.3987.132 unknown\n' - # so we need to check and remove the unknown string from the version - if version_str.endswith("unknown\n"): - version_str = version_str.strip("unknown\n").strip() - chrome_version = '.'.join(version_str.split()[-1].split('.')[:-1]) + try: + result = subprocess.run( + [chrome_executable, '--version'], + capture_output=True, + text=True, + check=True + ) - if chrome_version.count('.') != 2: - print('The specified Chrome executable output an unexpected ' - 'version string: {}.'.format(version_str)) + version_str = result.stdout.strip() + if 'Chrom' not in version_str: + print( + 'Error: Executable output unexpected version string: ' + f'{version_str}' + ) + sys.exit(1) + + full_version = version_str.split()[-1] + + except subprocess.CalledProcessError as e: + print(f"Error executing '{chrome_executable} --version': {e}") + sys.exit(1) + + if not full_version or full_version.count('.') < 3: + print(f'Error: Extracted Chrome version "{full_version}" ' + f'seems invalid.') sys.exit(1) - return chrome_version + return full_version -def get_chromedriver_version(chrome_version): - """Get the required chromedriver version number. +def get_system_and_platform(): + """Get the CfT platform name (e.g., mac-arm64, linux64).""" + system = platform.system() - Args: - chrome_version: The chrome version number - Returns: - The chromedriver version number - """ - url = 'https://chromedriver.storage.googleapis.com/LATEST_RELEASE_{}' \ - .format(chrome_version) + if system == 'Darwin': + if platform.machine() in ('arm64', 'aarch64'): + return 'mac-arm64' + return 'mac-x64' + if system == 'Linux': + return 'linux64' + if system == 'Windows': + return 'win64' + + print(f'Error: Unknown or unsupported operating system: {system}') + sys.exit(1) + + +def get_chromedriver_download_url(full_chrome_version, cft_platform): + """Get the required Chromedriver version and download URL using CfT.""" + download_url = ( + 'https://storage.googleapis.com/chrome-for-testing-public/' + f'{full_chrome_version}/{cft_platform}/' + f'chromedriver-{cft_platform}.zip' + ) + return full_chrome_version, download_url + + +def download_and_extract(url, target_directory, cft_platform): + """Downloads the zip, extracts chromedriver, and sets permissions.""" + print(f'Downloading from: {url}') + + temp_zip_path = os.path.join(target_directory, 'chromedriver_temp.zip') + try: + response = requests.get(url, stream=True) + response.raise_for_status() + with open(temp_zip_path, 'wb') as f: + for chunk in response.iter_content(chunk_size=8192): + f.write(chunk) + except Exception as e: + print(f'Error during download: {e}') + sys.exit(1) + + print('Extracting chromedriver...') + + chromedriver_in_zip_dir = f'chromedriver-{cft_platform}/' + + if cft_platform.startswith('win'): + chromedriver_in_zip = chromedriver_in_zip_dir + 'chromedriver.exe' + chromedriver_target_name = 'chromedriver.exe' + else: + chromedriver_in_zip = chromedriver_in_zip_dir + 'chromedriver' + chromedriver_target_name = 'chromedriver' + + target_path = os.path.join(target_directory, chromedriver_target_name) + found = False try: - fp = urlopen(url) - except URLError as e: - print('The chromedriver catalog URL could not be accessed: {}' - .format(e)) + with zipfile.ZipFile(temp_zip_path, 'r') as z: + for name in z.namelist(): + if name == chromedriver_in_zip: + with z.open(name) as source, open( + target_path, 'wb' + ) as target: + target.write(source.read()) + found = True + break + except Exception as e: + print(f'Error during extraction: {e}') + sys.exit(1) + finally: + os.remove(temp_zip_path) + + if not found: + print(f"Error: '{chromedriver_in_zip}' not found in archive.") sys.exit(1) - version = fp.read().decode("utf-8").strip() - fp.close() + if not cft_platform.startswith('win'): + print('Setting executable permissions.') + os.chmod( + target_path, + stat.S_IRWXU | + stat.S_IRGRP | + stat.S_IXGRP | + stat.S_IROTH | + stat.S_IXOTH + ) - return version + print(f'\nSuccess! Chromedriver downloaded and saved to: {target_path}') -def get_system(): - """Get the system name as known to chromedriver +# --- Core Logic --- - Returns: - The system name - """ - if platform.system() == 'Darwin': - return 'mac64' - elif platform.system() == 'Linux': - return 'linux64' - elif platform.system() == 'Windows': - return 'win32' - else: - print("Unknown or unsupported operating system: {}" - .format(platform.system())) + +def main(): + """The core structure of the app.""" + try: + import requests # noqa: F401 + except ImportError: + print( + "Error: The 'requests' library is required. " + "Please install it with 'pip install requests'" + ) sys.exit(1) + args = read_command_line() -"""The core structure of the app.""" + if not os.path.isdir(args.directory): + print( + f'Error: The specified output directory "{args.directory}" ' + 'could not be accessed.' + ) + sys.exit(1) -# Read the command line options -args = read_command_line() + cft_platform = get_system_and_platform() + current_system = platform.system() + print(f'Detected OS: {current_system} | ' + f'Target CfT Platform: {cft_platform}') -chrome_version = get_chrome_version(args) + full_chrome_version = get_chrome_version() + print(f'Detected Chrome Version: {full_chrome_version}') -# Check the directory exists -if not os.path.isdir(args.directory): - print('The specified output directory could not be accessed.') - sys.exit(1) + chromedriver_version, download_url = get_chromedriver_download_url( + full_chrome_version, cft_platform + ) + print(f'Downloading chromedriver v{chromedriver_version}...') -chromedriver_version = get_chromedriver_version(chrome_version) + download_and_extract(download_url, args.directory, cft_platform) -system = get_system() -url = 'https://chromedriver.storage.googleapis.com/{}/chromedriver_{}.zip' \ - .format(chromedriver_version, system) - -print('Downloading chromedriver v{} for Chrome v{} on {}...' - .format(chromedriver_version, chrome_version, system)) - -try: - file, headers = urlretrieve(url) -except URLError as e: - print('The chromedriver download URL could not be accessed: {}' - .format(e)) - sys.exit(1) - -# Unzip chromedriver -print('Extracting chromedriver...') - -found = False -fp = open(file, 'rb') -z = zipfile.ZipFile(fp) -for name in z.namelist(): - if (system == 'win32' and name == 'chromedriver.exe') or \ - (system != 'win32' and name == 'chromedriver'): - z.extract(name, args.directory) - found = True -fp.close() - -if not found: - print("chromedriver could not be found in the downloaded archive: {}" - .format(file)) - sys.exit(1) - -# Set the permissions -if system == 'mac64' or system == 'linux64': - os.chmod(os.path.join(args.directory, 'chromedriver'), 0o755) - -print('Chromedriver downloaded to: {}'.format(args.directory)) +if __name__ == '__main__': + main() diff --git a/web/.eslintrc.js b/web/.eslintrc.js index 1aaffe1a6..1326cb0a4 100644 --- a/web/.eslintrc.js +++ b/web/.eslintrc.js @@ -92,7 +92,9 @@ module.exports = [ 'no-import-assign': 'off', ...reactjs.configs.recommended.rules, ...reactjs.configs['jsx-runtime'].rules, - 'react/jsx-uses-react': 'error', + 'react/prop-types': 'off', + 'react/react-in-jsx-scope': 0, + 'react/jsx-uses-react': 0, 'react/jsx-uses-vars': 'error', 'no-unused-vars': 'off', 'unused-imports/no-unused-imports': 'error', diff --git a/web/babel.config.json b/web/babel.config.json index 81860237f..a4d7b0df8 100644 --- a/web/babel.config.json +++ b/web/babel.config.json @@ -1,4 +1,6 @@ { - "presets": [["@babel/preset-env", {"modules": "commonjs", "useBuiltIns": "usage", "corejs": 3}], "@babel/preset-react", "@babel/preset-typescript"], - "plugins": ["@babel/plugin-proposal-class-properties", "@babel/proposal-object-rest-spread", "@babel/plugin-transform-runtime"] + "presets": [["@babel/preset-env", {"modules": "commonjs", "useBuiltIns": "usage", "corejs": 3}], ["@babel/preset-react", { + "runtime": "automatic" + }], "@babel/preset-typescript"], + "plugins": ["@babel/plugin-proposal-class-properties", "@babel/proposal-object-rest-spread"] } diff --git a/web/jest.config.js b/web/jest.config.js index 38c34b3ce..c3c071c55 100644 --- a/web/jest.config.js +++ b/web/jest.config.js @@ -2,7 +2,8 @@ const webpackShimAlias = require('./webpack.shim').resolveAlias; const webpackAliasToJestModules = ()=>{ const ret = { - '\\.svg': '/regression/javascript/__mocks__/svg.js' + '\\.svg\\?svgr$': '/regression/javascript/__mocks__/svg.js', + 'react-dom/server': 'react-dom/server.edge', }; Object.keys(webpackShimAlias).forEach((an)=>{ // eg - sources: ./pgadmin/static/js/ to '^sources/(.*)$': '/pgadmin/static/js/$1' diff --git a/web/package.json b/web/package.json index a7fce06a3..064102f2e 100644 --- a/web/package.json +++ b/web/package.json @@ -71,7 +71,7 @@ }, "dependencies": { "@babel/plugin-proposal-class-properties": "^7.10.4", - "@babel/preset-react": "^7.12.13", + "@babel/preset-react": "^7.27.1", "@codemirror/lang-json": "^6.0.1", "@codemirror/lang-sql": "^6.10.0", "@date-io/core": "^3.0.0", @@ -90,8 +90,8 @@ "@tanstack/react-table": "^8.16.0", "@tanstack/react-virtual": "^3.13.6", "@types/classnames": "^2.3.4", - "@types/react": "^18.0.2", - "@types/react-dom": "^18.0.0", + "@types/react": "^19.0.0", + "@types/react-dom": "^19.0.0", "@xterm/addon-fit": "^0.10.0", "@xterm/addon-search": "^0.15.0", "@xterm/addon-web-links": "^0.11.0", @@ -124,15 +124,15 @@ "papaparse": "^5.5.2", "path-fx": "^2.0.0", "postcss": "^8.5.6", - "rc-dock": "^3.3.2", - "react": "^18.2.0", + "rc-dock": "^4.0.0-alpha.2", + "react": "^19.0.0", "react-arborist": "^3.2.0", "react-aspen": "^1.1.0", "react-checkbox-tree": "^1.7.2", "react-data-grid": "https://github.com/pgadmin-org/react-data-grid.git#3dfc2ca01a046d55c1c7a45392dcec104815dc76", "react-dnd": "^16.0.1", "react-dnd-html5-backend": "^16.0.1", - "react-dom": "^18.2.0", + "react-dom": "^19.0.0", "react-draggable": "^4.4.6", "react-dropzone": "^14.2.1", "react-frame-component": "^5.2.6", diff --git a/web/pgadmin/about/static/js/AboutComponent.jsx b/web/pgadmin/about/static/js/AboutComponent.jsx index 2efccb258..904ac6f94 100644 --- a/web/pgadmin/about/static/js/AboutComponent.jsx +++ b/web/pgadmin/about/static/js/AboutComponent.jsx @@ -9,7 +9,7 @@ import gettext from 'sources/gettext'; import url_for from 'sources/url_for'; -import React, { useEffect, useState, useRef } from 'react'; +import { useEffect, useState, useRef } from 'react'; import { Box, Grid, InputLabel } from '@mui/material'; import { InputSQL } from '../../../static/js/components/FormComponents'; import getApiInstance from '../../../static/js/api_instance'; diff --git a/web/pgadmin/about/static/js/about.js b/web/pgadmin/about/static/js/about.js index 6a4f7effe..52d1de117 100644 --- a/web/pgadmin/about/static/js/about.js +++ b/web/pgadmin/about/static/js/about.js @@ -7,7 +7,6 @@ // ////////////////////////////////////////////////////////////// -import React from 'react'; import gettext from 'sources/gettext'; import pgAdmin from 'sources/pgadmin'; import AboutComponent from './AboutComponent'; diff --git a/web/pgadmin/browser/static/js/node.js b/web/pgadmin/browser/static/js/node.js index a574e768e..5542b9f67 100644 --- a/web/pgadmin/browser/static/js/node.js +++ b/web/pgadmin/browser/static/js/node.js @@ -10,7 +10,6 @@ import _ from 'lodash'; import getApiInstance from '../../../static/js/api_instance'; import { AllPermissionTypes, BROWSER_PANELS } from './constants'; -import React from 'react'; import ObjectNodeProperties from '../../../misc/properties/ObjectNodeProperties'; import ErrorBoundary from '../../../static/js/helpers/ErrorBoundary'; import toPx from '../../../static/js/to_px'; diff --git a/web/pgadmin/dashboard/static/js/Dashboard.jsx b/web/pgadmin/dashboard/static/js/Dashboard.jsx index 6ea557168..8be4ae508 100644 --- a/web/pgadmin/dashboard/static/js/Dashboard.jsx +++ b/web/pgadmin/dashboard/static/js/Dashboard.jsx @@ -6,7 +6,7 @@ // This software is released under the PostgreSQL Licence // ////////////////////////////////////////////////////////////// -import React, { useEffect, useMemo, useState, Fragment } from 'react'; +import { useEffect, useMemo, useState, Fragment } from 'react'; import { styled } from '@mui/material/styles'; import gettext from 'sources/gettext'; import PropTypes from 'prop-types'; diff --git a/web/pgadmin/dashboard/static/js/Graphs.jsx b/web/pgadmin/dashboard/static/js/Graphs.jsx index 809467c67..724689e6c 100644 --- a/web/pgadmin/dashboard/static/js/Graphs.jsx +++ b/web/pgadmin/dashboard/static/js/Graphs.jsx @@ -6,7 +6,7 @@ // This software is released under the PostgreSQL Licence // ////////////////////////////////////////////////////////////// -import React, { useEffect, useRef, useState, useReducer, useMemo } from 'react'; +import { useEffect, useRef, useState, useReducer, useMemo } from 'react'; import { DATA_POINT_SIZE } from 'sources/chartjs'; import ChartContainer from './components/ChartContainer'; import url_for from 'sources/url_for'; diff --git a/web/pgadmin/dashboard/static/js/PgAdminLogo.jsx b/web/pgadmin/dashboard/static/js/PgAdminLogo.jsx index 74dfb6895..31fb89787 100644 --- a/web/pgadmin/dashboard/static/js/PgAdminLogo.jsx +++ b/web/pgadmin/dashboard/static/js/PgAdminLogo.jsx @@ -6,7 +6,6 @@ // This software is released under the PostgreSQL Licence // ////////////////////////////////////////////////////////////// -import React from 'react'; export default function PgAdminLogo() { diff --git a/web/pgadmin/dashboard/static/js/Replication/LogReplication.jsx b/web/pgadmin/dashboard/static/js/Replication/LogReplication.jsx index 50dfbaf34..c27342e32 100644 --- a/web/pgadmin/dashboard/static/js/Replication/LogReplication.jsx +++ b/web/pgadmin/dashboard/static/js/Replication/LogReplication.jsx @@ -8,7 +8,7 @@ ////////////////////////////////////////////////////////////// import { Box } from '@mui/material'; -import React, { useEffect, useState } from 'react'; +import { useEffect, useState } from 'react'; import gettext from 'sources/gettext'; import ReplicationSlotsSchema from './schema_ui/replication_slots.ui'; diff --git a/web/pgadmin/dashboard/static/js/Replication/PGDReplication.jsx b/web/pgadmin/dashboard/static/js/Replication/PGDReplication.jsx index d1ee43bdf..2f9e99740 100644 --- a/web/pgadmin/dashboard/static/js/Replication/PGDReplication.jsx +++ b/web/pgadmin/dashboard/static/js/Replication/PGDReplication.jsx @@ -8,7 +8,7 @@ ////////////////////////////////////////////////////////////// import { Box, Grid, useTheme } from '@mui/material'; -import React, { useEffect, useMemo, useReducer, useRef, useState } from 'react'; +import { useEffect, useMemo, useReducer, useRef, useState } from 'react'; import gettext from 'sources/gettext'; import PgTable from 'sources/components/PgTable'; diff --git a/web/pgadmin/dashboard/static/js/Replication/index.jsx b/web/pgadmin/dashboard/static/js/Replication/index.jsx index f057d4e63..c45807158 100644 --- a/web/pgadmin/dashboard/static/js/Replication/index.jsx +++ b/web/pgadmin/dashboard/static/js/Replication/index.jsx @@ -8,7 +8,6 @@ ////////////////////////////////////////////////////////////// -import React from 'react'; import PropTypes from 'prop-types'; import LogReplication from './LogReplication'; import EmptyPanelMessage from '../../../../static/js/components/EmptyPanelMessage'; diff --git a/web/pgadmin/dashboard/static/js/SystemStats/CpuDetails.jsx b/web/pgadmin/dashboard/static/js/SystemStats/CpuDetails.jsx index fa312fbf4..ea1e34e80 100644 --- a/web/pgadmin/dashboard/static/js/SystemStats/CpuDetails.jsx +++ b/web/pgadmin/dashboard/static/js/SystemStats/CpuDetails.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, { useState, useEffect, useRef, useReducer, useMemo } from 'react'; +import { useState, useEffect, useRef, useReducer, useMemo } from 'react'; import PgTable from 'sources/components/PgTable'; import gettext from 'sources/gettext'; import PropTypes from 'prop-types'; diff --git a/web/pgadmin/dashboard/static/js/SystemStats/Memory.jsx b/web/pgadmin/dashboard/static/js/SystemStats/Memory.jsx index 5b0e119c6..6947e8d30 100644 --- a/web/pgadmin/dashboard/static/js/SystemStats/Memory.jsx +++ b/web/pgadmin/dashboard/static/js/SystemStats/Memory.jsx @@ -6,7 +6,7 @@ // This software is released under the PostgreSQL Licence // ////////////////////////////////////////////////////////////// -import React, { useState, useEffect, useRef, useReducer, useMemo } from 'react'; +import { useState, useEffect, useRef, useReducer, useMemo } from 'react'; import PgTable from 'sources/components/PgTable'; import gettext from 'sources/gettext'; import PropTypes from 'prop-types'; diff --git a/web/pgadmin/dashboard/static/js/SystemStats/Storage.jsx b/web/pgadmin/dashboard/static/js/SystemStats/Storage.jsx index bda6ec40c..903ad1a77 100644 --- a/web/pgadmin/dashboard/static/js/SystemStats/Storage.jsx +++ b/web/pgadmin/dashboard/static/js/SystemStats/Storage.jsx @@ -6,7 +6,7 @@ // This software is released under the PostgreSQL Licence // ////////////////////////////////////////////////////////////// -import React, { useState, useEffect, useRef, useReducer, useMemo } from 'react'; +import { useState, useEffect, useRef, useReducer, useMemo } from 'react'; import { styled } from '@mui/material/styles'; import gettext from 'sources/gettext'; import PropTypes from 'prop-types'; diff --git a/web/pgadmin/dashboard/static/js/SystemStats/Summary.jsx b/web/pgadmin/dashboard/static/js/SystemStats/Summary.jsx index 5e2e87ead..e10f761bc 100644 --- a/web/pgadmin/dashboard/static/js/SystemStats/Summary.jsx +++ b/web/pgadmin/dashboard/static/js/SystemStats/Summary.jsx @@ -6,7 +6,7 @@ // This software is released under the PostgreSQL Licence // ////////////////////////////////////////////////////////////// -import React, { useState, useEffect, useRef, useReducer, useMemo } from 'react'; +import { useState, useEffect, useRef, useReducer, useMemo } from 'react'; import { styled } from '@mui/material/styles'; import gettext from 'sources/gettext'; import PropTypes from 'prop-types'; diff --git a/web/pgadmin/dashboard/static/js/WelcomeDashboard.jsx b/web/pgadmin/dashboard/static/js/WelcomeDashboard.jsx index d3331b94a..41422402d 100644 --- a/web/pgadmin/dashboard/static/js/WelcomeDashboard.jsx +++ b/web/pgadmin/dashboard/static/js/WelcomeDashboard.jsx @@ -7,7 +7,6 @@ // ////////////////////////////////////////////////////////////// -import React from 'react'; import { styled } from '@mui/material/styles'; import gettext from 'sources/gettext'; import _ from 'lodash'; diff --git a/web/pgadmin/dashboard/static/js/components/ChartContainer.jsx b/web/pgadmin/dashboard/static/js/components/ChartContainer.jsx index df6d3c066..89ffef388 100644 --- a/web/pgadmin/dashboard/static/js/components/ChartContainer.jsx +++ b/web/pgadmin/dashboard/static/js/components/ChartContainer.jsx @@ -6,7 +6,6 @@ // This software is released under the PostgreSQL Licence // ////////////////////////////////////////////////////////////// -import React from 'react'; import { styled } from '@mui/material/styles'; import PropTypes from 'prop-types'; import { Box, Card, CardContent, CardHeader } from '@mui/material'; diff --git a/web/pgadmin/dashboard/static/js/components/RefreshButtons.jsx b/web/pgadmin/dashboard/static/js/components/RefreshButtons.jsx index 468305b93..15421eea5 100644 --- a/web/pgadmin/dashboard/static/js/components/RefreshButtons.jsx +++ b/web/pgadmin/dashboard/static/js/components/RefreshButtons.jsx @@ -7,7 +7,6 @@ // ////////////////////////////////////////////////////////////// -import React from 'react'; import { styled } from '@mui/material/styles'; import gettext from 'sources/gettext'; import CachedOutlinedIcon from '@mui/icons-material/CachedOutlined'; diff --git a/web/pgadmin/dashboard/static/js/components/SectionContainer.jsx b/web/pgadmin/dashboard/static/js/components/SectionContainer.jsx index 6f7824c42..b80d2f164 100644 --- a/web/pgadmin/dashboard/static/js/components/SectionContainer.jsx +++ b/web/pgadmin/dashboard/static/js/components/SectionContainer.jsx @@ -6,7 +6,6 @@ // This software is released under the PostgreSQL Licence // ////////////////////////////////////////////////////////////// -import React from 'react'; import { styled } from '@mui/material/styles'; import PropTypes from 'prop-types'; import { Box } from '@mui/material'; diff --git a/web/pgadmin/misc/bgprocess/static/js/BgProcessNotify.jsx b/web/pgadmin/misc/bgprocess/static/js/BgProcessNotify.jsx index 580d1224d..e43937c5b 100644 --- a/web/pgadmin/misc/bgprocess/static/js/BgProcessNotify.jsx +++ b/web/pgadmin/misc/bgprocess/static/js/BgProcessNotify.jsx @@ -1,6 +1,5 @@ import { Box } from '@mui/material'; import { styled } from '@mui/material/styles'; -import React from 'react'; import CloseIcon from '@mui/icons-material/CloseRounded'; import { DefaultButton, PgIconButton } from '../../../../static/js/components/Buttons'; import DescriptionOutlinedIcon from '@mui/icons-material/DescriptionOutlined'; diff --git a/web/pgadmin/misc/bgprocess/static/js/ProcessDetails.jsx b/web/pgadmin/misc/bgprocess/static/js/ProcessDetails.jsx index 6f45bec62..012fa2019 100644 --- a/web/pgadmin/misc/bgprocess/static/js/ProcessDetails.jsx +++ b/web/pgadmin/misc/bgprocess/static/js/ProcessDetails.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, { useState, useMemo } from 'react'; +import { useState, useMemo } from 'react'; import { styled } from '@mui/material/styles'; import gettext from 'sources/gettext'; import url_for from 'sources/url_for'; diff --git a/web/pgadmin/misc/cloud/static/js/cloud.js b/web/pgadmin/misc/cloud/static/js/cloud.js index 8bc8c69a3..2abbeb57b 100644 --- a/web/pgadmin/misc/cloud/static/js/cloud.js +++ b/web/pgadmin/misc/cloud/static/js/cloud.js @@ -6,7 +6,6 @@ // This software is released under the PostgreSQL Licence // ////////////////////////////////////////////////////////////// -import React from 'react'; import CloudWizard from './CloudWizard'; import getApiInstance from '../../../../static/js/api_instance'; import { BROWSER_PANELS } from '../../../../browser/static/js/constants'; diff --git a/web/pgadmin/misc/cloud/static/js/cloud_components.jsx b/web/pgadmin/misc/cloud/static/js/cloud_components.jsx index 56fee1c5d..f7fef9731 100644 --- a/web/pgadmin/misc/cloud/static/js/cloud_components.jsx +++ b/web/pgadmin/misc/cloud/static/js/cloud_components.jsx @@ -7,7 +7,6 @@ // ////////////////////////////////////////////////////////////// -import React from 'react'; import { ToggleButton, ToggleButtonGroup, TableBody, TableCell, TableHead, TableRow } from '@mui/material'; import CheckRoundedIcon from '@mui/icons-material/CheckRounded'; import { DefaultButton, PrimaryButton } from '../../../../static/js/components/Buttons'; diff --git a/web/pgadmin/misc/file_manager/static/js/FileManagerModule.jsx b/web/pgadmin/misc/file_manager/static/js/FileManagerModule.jsx index 0e6be6291..647201b7c 100644 --- a/web/pgadmin/misc/file_manager/static/js/FileManagerModule.jsx +++ b/web/pgadmin/misc/file_manager/static/js/FileManagerModule.jsx @@ -8,7 +8,6 @@ // ////////////////////////////////////////////////////////////// import gettext from 'sources/gettext'; -import React from 'react'; import FileManager from './components/FileManager'; import { getBrowser } from '../../../../static/js/utils'; import pgAdmin from 'sources/pgadmin'; diff --git a/web/pgadmin/misc/file_manager/static/js/components/GridView.jsx b/web/pgadmin/misc/file_manager/static/js/components/GridView.jsx index 80065657b..4d4dff81d 100644 --- a/web/pgadmin/misc/file_manager/static/js/components/GridView.jsx +++ b/web/pgadmin/misc/file_manager/static/js/components/GridView.jsx @@ -8,7 +8,7 @@ ////////////////////////////////////////////////////////////// import { Box } from '@mui/material'; import { styled } from '@mui/material/styles'; -import React, {useState, useEffect, useRef, useLayoutEffect} from 'react'; +import {useState, useEffect, useRef, useLayoutEffect} from 'react'; import FolderIcon from '@mui/icons-material/Folder'; import DescriptionIcon from '@mui/icons-material/Description'; import LockRoundedIcon from '@mui/icons-material/LockRounded'; diff --git a/web/pgadmin/misc/file_manager/static/js/components/Uploader.jsx b/web/pgadmin/misc/file_manager/static/js/components/Uploader.jsx index 83f0d1b78..fdf8fa648 100644 --- a/web/pgadmin/misc/file_manager/static/js/components/Uploader.jsx +++ b/web/pgadmin/misc/file_manager/static/js/components/Uploader.jsx @@ -6,7 +6,7 @@ // This software is released under the PostgreSQL Licence // ////////////////////////////////////////////////////////////// -import React, { useCallback, useReducer, useEffect, useMemo } from 'react'; +import { useCallback, useReducer, useEffect, useMemo } from 'react'; import { styled } from '@mui/material/styles'; import { Box, List, ListItem } from '@mui/material'; import CloseIcon from '@mui/icons-material/CloseRounded'; diff --git a/web/pgadmin/misc/properties/Properties.jsx b/web/pgadmin/misc/properties/Properties.jsx index 1c9d2ee46..b17ea0ca2 100644 --- a/web/pgadmin/misc/properties/Properties.jsx +++ b/web/pgadmin/misc/properties/Properties.jsx @@ -7,7 +7,6 @@ // ////////////////////////////////////////////////////////////// -import React from 'react'; import { styled } from '@mui/material/styles'; import CollectionNodeProperties from './CollectionNodeProperties'; import ErrorBoundary from '../../static/js/helpers/ErrorBoundary'; diff --git a/web/pgadmin/misc/workspaces/static/js/AdHocConnection.jsx b/web/pgadmin/misc/workspaces/static/js/AdHocConnection.jsx index 3373caeb9..223295285 100644 --- a/web/pgadmin/misc/workspaces/static/js/AdHocConnection.jsx +++ b/web/pgadmin/misc/workspaces/static/js/AdHocConnection.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, { useEffect, useMemo } from 'react'; +import { useEffect, useMemo } from 'react'; import gettext from 'sources/gettext'; import url_for from 'sources/url_for'; import _ from 'lodash'; @@ -229,7 +229,6 @@ class AdHocConnectionSchema extends BaseUISchema { return {type: 'text'}; } }, - optionsLoaded: (res) => this.dbs = res, depChange: (state) => { /* Once the option is selected get the name */ return { diff --git a/web/pgadmin/misc/workspaces/static/js/WorkspaceToolbar.jsx b/web/pgadmin/misc/workspaces/static/js/WorkspaceToolbar.jsx index 9a094460b..3040ad5f7 100644 --- a/web/pgadmin/misc/workspaces/static/js/WorkspaceToolbar.jsx +++ b/web/pgadmin/misc/workspaces/static/js/WorkspaceToolbar.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, { useEffect, useState } from 'react'; +import { useEffect, useState } from 'react'; import { usePgAdmin } from '../../../../static/js/PgAdminProvider'; import { Box } from '@mui/material'; import { QueryToolIcon, SchemaDiffIcon } from '../../../../static/js/components/ExternalIcon'; diff --git a/web/pgadmin/misc/workspaces/static/js/WorkspaceWelcomePage.jsx b/web/pgadmin/misc/workspaces/static/js/WorkspaceWelcomePage.jsx index c270c09d4..f1c56eff6 100644 --- a/web/pgadmin/misc/workspaces/static/js/WorkspaceWelcomePage.jsx +++ b/web/pgadmin/misc/workspaces/static/js/WorkspaceWelcomePage.jsx @@ -7,7 +7,6 @@ // ////////////////////////////////////////////////////////////// -import React from 'react'; import { styled } from '@mui/material/styles'; import gettext from 'sources/gettext'; import PropTypes from 'prop-types'; diff --git a/web/pgadmin/misc/workspaces/static/js/config.jsx b/web/pgadmin/misc/workspaces/static/js/config.jsx index b6e148fb4..83814a58d 100644 --- a/web/pgadmin/misc/workspaces/static/js/config.jsx +++ b/web/pgadmin/misc/workspaces/static/js/config.jsx @@ -10,7 +10,6 @@ import gettext from 'sources/gettext'; import { BROWSER_PANELS, WORKSPACES } from '../../../../browser/static/js/constants'; import WorkspaceWelcomePage from './WorkspaceWelcomePage'; -import React from 'react'; import { LayoutDocker } from '../../../../static/js/helpers/Layout'; const welcomeQueryToolPanelData = [{ diff --git a/web/pgadmin/preferences/static/js/components/LeftTree.jsx b/web/pgadmin/preferences/static/js/components/LeftTree.jsx index dd6787b46..d20232d32 100644 --- a/web/pgadmin/preferences/static/js/components/LeftTree.jsx +++ b/web/pgadmin/preferences/static/js/components/LeftTree.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, { useEffect, useMemo } from 'react'; +import { useEffect, useMemo } from 'react'; import PropTypes from 'prop-types'; import { Resizable } from 're-resizable'; // Import helpers from new file diff --git a/web/pgadmin/preferences/static/js/components/PreferencesHelper.jsx b/web/pgadmin/preferences/static/js/components/PreferencesHelper.jsx index 19ac4b098..796e02471 100644 --- a/web/pgadmin/preferences/static/js/components/PreferencesHelper.jsx +++ b/web/pgadmin/preferences/static/js/components/PreferencesHelper.jsx @@ -11,7 +11,6 @@ import gettext from 'sources/gettext'; import { styled } from '@mui/material/styles'; import _ from 'lodash'; import url_for from 'sources/url_for'; -import React from 'react'; import { Box } from '@mui/material'; import { DefaultButton, PrimaryButton } from '../../../../static/js/components/Buttons'; import { getBinaryPathSchema } from './binary_path.ui'; diff --git a/web/pgadmin/preferences/static/js/components/RightPreference.jsx b/web/pgadmin/preferences/static/js/components/RightPreference.jsx index e11f2303b..cc7003d51 100644 --- a/web/pgadmin/preferences/static/js/components/RightPreference.jsx +++ b/web/pgadmin/preferences/static/js/components/RightPreference.jsx @@ -8,7 +8,7 @@ ////////////////////////////////////////////////////////////// import gettext from 'sources/gettext'; -import React, { useEffect, useRef, useCallback } from 'react'; +import { useEffect, useRef, useCallback } from 'react'; import { Box, Link } from '@mui/material'; import PropTypes from 'prop-types'; import SchemaView from '../../../../static/js/SchemaView'; diff --git a/web/pgadmin/static/bundle/app.js b/web/pgadmin/static/bundle/app.js index 54956e2df..2b214d844 100644 --- a/web/pgadmin/static/bundle/app.js +++ b/web/pgadmin/static/bundle/app.js @@ -7,7 +7,6 @@ // ////////////////////////////////////////////////////////////// -import React from 'react'; import ReactDOM from 'react-dom/client'; import BrowserComponent from '../js/BrowserComponent'; import MainMenuFactory from '../../browser/static/js/MainMenuFactory'; diff --git a/web/pgadmin/static/js/AppMenuBar.jsx b/web/pgadmin/static/js/AppMenuBar.jsx index 71010d860..f1e8e2535 100644 --- a/web/pgadmin/static/js/AppMenuBar.jsx +++ b/web/pgadmin/static/js/AppMenuBar.jsx @@ -8,7 +8,7 @@ ////////////////////////////////////////////////////////////// import { Box } from '@mui/material'; import { styled } from '@mui/material/styles'; -import React, { useEffect } from 'react'; +import { useEffect } from 'react'; import { PrimaryButton } from './components/Buttons'; import { PgMenu, PgMenuDivider, PgMenuItem, PgSubMenu } from './components/Menu'; import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown'; diff --git a/web/pgadmin/static/js/BrowserComponent.jsx b/web/pgadmin/static/js/BrowserComponent.jsx index 4055982cc..5cb3d902c 100644 --- a/web/pgadmin/static/js/BrowserComponent.jsx +++ b/web/pgadmin/static/js/BrowserComponent.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, {useEffect, useMemo, useState } from 'react'; +import {useEffect, useMemo, useState } from 'react'; import AppMenuBar from './AppMenuBar'; import ObjectBreadcrumbs from './components/ObjectBreadcrumbs'; import Layout, { LAYOUT_EVENTS, LayoutDocker, getDefaultGroup } from './helpers/Layout'; diff --git a/web/pgadmin/static/js/Dialogs/ChangeOwnershipContent.jsx b/web/pgadmin/static/js/Dialogs/ChangeOwnershipContent.jsx index 22c7ea93c..a0631d526 100644 --- a/web/pgadmin/static/js/Dialogs/ChangeOwnershipContent.jsx +++ b/web/pgadmin/static/js/Dialogs/ChangeOwnershipContent.jsx @@ -1,4 +1,3 @@ -import React from 'react'; import PropTypes from 'prop-types'; import gettext from 'sources/gettext'; import BaseUISchema from '../SchemaView/base_schema.ui'; diff --git a/web/pgadmin/static/js/Dialogs/ConfirmSaveContent.jsx b/web/pgadmin/static/js/Dialogs/ConfirmSaveContent.jsx index 9fa0d0d02..e7e3e6c42 100644 --- a/web/pgadmin/static/js/Dialogs/ConfirmSaveContent.jsx +++ b/web/pgadmin/static/js/Dialogs/ConfirmSaveContent.jsx @@ -1,4 +1,3 @@ -import React from 'react'; import { ModalContent, ModalFooter } from '../../../static/js/components/ModalContent'; import gettext from 'sources/gettext'; import { Box } from '@mui/material'; diff --git a/web/pgadmin/static/js/Dialogs/ConnectServerContent.jsx b/web/pgadmin/static/js/Dialogs/ConnectServerContent.jsx index cb17144eb..e8f094957 100644 --- a/web/pgadmin/static/js/Dialogs/ConnectServerContent.jsx +++ b/web/pgadmin/static/js/Dialogs/ConnectServerContent.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, { useState, useRef, useEffect, useLayoutEffect } from 'react'; +import { useState, useRef, useEffect, useLayoutEffect } from 'react'; import gettext from 'sources/gettext'; import { Box } from '@mui/material'; import { DefaultButton, PrimaryButton } from '../components/Buttons'; diff --git a/web/pgadmin/static/js/Dialogs/MasterPasswordContent.jsx b/web/pgadmin/static/js/Dialogs/MasterPasswordContent.jsx index f745a5e6c..1735d2ab5 100644 --- a/web/pgadmin/static/js/Dialogs/MasterPasswordContent.jsx +++ b/web/pgadmin/static/js/Dialogs/MasterPasswordContent.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, { useState, useRef, useEffect } from 'react'; +import { useState, useRef, useEffect } from 'react'; import PropTypes from 'prop-types'; import gettext from 'sources/gettext'; import url_for from 'sources/url_for'; diff --git a/web/pgadmin/static/js/Dialogs/NamedRestoreContent.jsx b/web/pgadmin/static/js/Dialogs/NamedRestoreContent.jsx index eab3641a3..6da50ec4d 100644 --- a/web/pgadmin/static/js/Dialogs/NamedRestoreContent.jsx +++ b/web/pgadmin/static/js/Dialogs/NamedRestoreContent.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, { useState, useRef, useEffect } from 'react'; +import { useState, useRef, useEffect } from 'react'; import gettext from 'sources/gettext'; import { Box } from '@mui/material'; import { DefaultButton, PrimaryButton } from '../components/Buttons'; diff --git a/web/pgadmin/static/js/Dialogs/RenameTabContent.jsx b/web/pgadmin/static/js/Dialogs/RenameTabContent.jsx index 352f6bc13..7f056b43d 100644 --- a/web/pgadmin/static/js/Dialogs/RenameTabContent.jsx +++ b/web/pgadmin/static/js/Dialogs/RenameTabContent.jsx @@ -8,7 +8,7 @@ ////////////////////////////////////////////////////////////// import _ from 'lodash'; -import React, { useState, useRef, useMemo } from 'react'; +import { useState, useRef, useMemo } from 'react'; import PropTypes from 'prop-types'; import { Box } from '@mui/material'; diff --git a/web/pgadmin/static/js/Dialogs/UrlDialogContent.jsx b/web/pgadmin/static/js/Dialogs/UrlDialogContent.jsx index 9c742704d..492fb8c75 100644 --- a/web/pgadmin/static/js/Dialogs/UrlDialogContent.jsx +++ b/web/pgadmin/static/js/Dialogs/UrlDialogContent.jsx @@ -7,7 +7,6 @@ // ////////////////////////////////////////////////////////////// -import React from 'react'; import PropTypes from 'prop-types'; import gettext from 'sources/gettext'; import url_for from 'sources/url_for'; diff --git a/web/pgadmin/static/js/Dialogs/index.jsx b/web/pgadmin/static/js/Dialogs/index.jsx index 019968b25..d34b45798 100644 --- a/web/pgadmin/static/js/Dialogs/index.jsx +++ b/web/pgadmin/static/js/Dialogs/index.jsx @@ -7,7 +7,6 @@ // ////////////////////////////////////////////////////////////// -import React from 'react'; import pgAdmin from 'sources/pgadmin'; import ConnectServerContent from './ConnectServerContent'; import url_for from 'sources/url_for'; diff --git a/web/pgadmin/static/js/QuickSearch/HiddenIframe.jsx b/web/pgadmin/static/js/QuickSearch/HiddenIframe.jsx index 7a0171eb8..5df8abec2 100644 --- a/web/pgadmin/static/js/QuickSearch/HiddenIframe.jsx +++ b/web/pgadmin/static/js/QuickSearch/HiddenIframe.jsx @@ -7,7 +7,6 @@ // ////////////////////////////////////////////////////////////// -import React from 'react'; import PropTypes from 'prop-types'; // Allow us to render IFrame using React diff --git a/web/pgadmin/static/js/QuickSearch/index.jsx b/web/pgadmin/static/js/QuickSearch/index.jsx index c2aa7711c..58f9acba6 100644 --- a/web/pgadmin/static/js/QuickSearch/index.jsx +++ b/web/pgadmin/static/js/QuickSearch/index.jsx @@ -6,7 +6,7 @@ // This software is released under the PostgreSQL Licence // ////////////////////////////////////////////////////////////// -import React, {useRef,useState, useEffect} from 'react'; +import {useRef,useState, useEffect} from 'react'; import { styled } from '@mui/material/styles'; import { CircularProgress, Typography } from '@mui/material'; import {useDelayDebounce} from 'sources/custom_hooks'; diff --git a/web/pgadmin/static/js/QuickSearch/online_help.js b/web/pgadmin/static/js/QuickSearch/online_help.js index be00a07ea..401169559 100644 --- a/web/pgadmin/static/js/QuickSearch/online_help.js +++ b/web/pgadmin/static/js/QuickSearch/online_help.js @@ -6,7 +6,6 @@ // This software is released under the PostgreSQL Licence // ////////////////////////////////////////////////////////////// -import React from 'react'; import ReactDOM from 'react-dom/client'; import HiddenIframe from './HiddenIframe'; import url_for from 'sources/url_for'; diff --git a/web/pgadmin/static/js/SchemaView/DataGridView/SearchBox.jsx b/web/pgadmin/static/js/SchemaView/DataGridView/SearchBox.jsx index 1fcc8f5e2..eb98b0bdb 100644 --- a/web/pgadmin/static/js/SchemaView/DataGridView/SearchBox.jsx +++ b/web/pgadmin/static/js/SchemaView/DataGridView/SearchBox.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, { useContext } from 'react'; +import { useContext } from 'react'; import { SEARCH_INPUT_ALIGNMENT, SEARCH_INPUT_SIZE, SearchInputText, diff --git a/web/pgadmin/static/js/SchemaView/DataGridView/features/common.jsx b/web/pgadmin/static/js/SchemaView/DataGridView/features/common.jsx index 84fbcda53..baad5b9c4 100644 --- a/web/pgadmin/static/js/SchemaView/DataGridView/features/common.jsx +++ b/web/pgadmin/static/js/SchemaView/DataGridView/features/common.jsx @@ -7,7 +7,6 @@ // ////////////////////////////////////////////////////////////// -import React from 'react'; export const ACTION_COLUMN = { header: <> , diff --git a/web/pgadmin/static/js/SchemaView/DataGridView/features/reorder.jsx b/web/pgadmin/static/js/SchemaView/DataGridView/features/reorder.jsx index bca27b977..4755a1a71 100644 --- a/web/pgadmin/static/js/SchemaView/DataGridView/features/reorder.jsx +++ b/web/pgadmin/static/js/SchemaView/DataGridView/features/reorder.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, { useRef } from 'react'; +import { useRef } from 'react'; import { useDrag, useDrop } from 'react-dnd'; import DragIndicatorRoundedIcon from '@mui/icons-material/DragIndicatorRounded'; diff --git a/web/pgadmin/static/js/SchemaView/DataGridView/formHeader.jsx b/web/pgadmin/static/js/SchemaView/DataGridView/formHeader.jsx index 799b78f26..12274796d 100644 --- a/web/pgadmin/static/js/SchemaView/DataGridView/formHeader.jsx +++ b/web/pgadmin/static/js/SchemaView/DataGridView/formHeader.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, { +import { useCallback, useContext, useEffect, useRef, useState } from 'react'; import { styled } from '@mui/material/styles'; diff --git a/web/pgadmin/static/js/SchemaView/DataGridView/grid.jsx b/web/pgadmin/static/js/SchemaView/DataGridView/grid.jsx index eb9b92d29..509ce4fc6 100644 --- a/web/pgadmin/static/js/SchemaView/DataGridView/grid.jsx +++ b/web/pgadmin/static/js/SchemaView/DataGridView/grid.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, { +import { useContext, useEffect, useMemo, useRef, useState, } from 'react'; diff --git a/web/pgadmin/static/js/SchemaView/DataGridView/header.jsx b/web/pgadmin/static/js/SchemaView/DataGridView/header.jsx index 3c2c55d10..b8d0896ca 100644 --- a/web/pgadmin/static/js/SchemaView/DataGridView/header.jsx +++ b/web/pgadmin/static/js/SchemaView/DataGridView/header.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, { useCallback, useContext, useEffect, useRef } from 'react'; +import { useCallback, useContext, useEffect, useRef } from 'react'; import Box from '@mui/material/Box'; import AddIcon from '@mui/icons-material/AddOutlined'; diff --git a/web/pgadmin/static/js/SchemaView/DataGridView/mappedCell.jsx b/web/pgadmin/static/js/SchemaView/DataGridView/mappedCell.jsx index 5a5a9a994..c5599c078 100644 --- a/web/pgadmin/static/js/SchemaView/DataGridView/mappedCell.jsx +++ b/web/pgadmin/static/js/SchemaView/DataGridView/mappedCell.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, { useContext, useMemo, useState } from 'react'; +import { useContext, useMemo, useState } from 'react'; import _ from 'lodash'; import PropTypes from 'prop-types'; diff --git a/web/pgadmin/static/js/SchemaView/DataGridView/row.jsx b/web/pgadmin/static/js/SchemaView/DataGridView/row.jsx index c3cc284ea..680371a3c 100644 --- a/web/pgadmin/static/js/SchemaView/DataGridView/row.jsx +++ b/web/pgadmin/static/js/SchemaView/DataGridView/row.jsx @@ -7,7 +7,8 @@ // ////////////////////////////////////////////////////////////// -import React, { useContext, useMemo, useRef } from 'react'; +import { useContext, useMemo, useRef } from 'react'; +import Draggable from 'react-draggable'; import { flexRender } from '@tanstack/react-table'; @@ -54,31 +55,33 @@ export function DataGridRow({row, isResizing}) { return useMemo(() => ( !row ? <> : - - { - row?.getVisibleCells().map((cell) => { - const columnDef = cell.column.columnDef; - const content = flexRender( - columnDef.cell, { - key: columnDef.cell?.type ?? columnDef.id, - row: row, - getValue: cell.getValue, - } - ); + + + { + row?.getVisibleCells().map((cell) => { + const columnDef = cell.column.columnDef; + const content = flexRender( + columnDef.cell, { + key: columnDef.cell?.type ?? columnDef.id, + row: row, + getValue: cell.getValue, + } + ); - return ( - - {content} - - ); - }) - } -
-
+ return ( + + {content} + + ); + }) + } +
+
+ { expandedRowContents.length ? { const Control = item.control; - const props = item.controlProps; + const {key, ...props} = item.controlProps; const children = item.controls; return useMemo(() => - + { children?.map( (child, idx) => diff --git a/web/pgadmin/static/js/SchemaView/FormLoader.jsx b/web/pgadmin/static/js/SchemaView/FormLoader.jsx index 9ea3fae16..7c98c0ccd 100644 --- a/web/pgadmin/static/js/SchemaView/FormLoader.jsx +++ b/web/pgadmin/static/js/SchemaView/FormLoader.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, { useContext, useEffect, useState, useMemo } from 'react'; +import { useContext, useEffect, useState, useMemo } from 'react'; import Loader from 'sources/components/Loader'; diff --git a/web/pgadmin/static/js/SchemaView/FormViewTab.jsx b/web/pgadmin/static/js/SchemaView/FormViewTab.jsx index f63c1281c..0cc0a5170 100644 --- a/web/pgadmin/static/js/SchemaView/FormViewTab.jsx +++ b/web/pgadmin/static/js/SchemaView/FormViewTab.jsx @@ -8,7 +8,7 @@ ////////////////////////////////////////////////////////////// import { Tab } from '@mui/material'; -import React, { useContext, useState } from 'react'; +import { useContext, useState } from 'react'; import { useFieldOptions, useSchemaStateSubscriber } from './hooks'; import { SchemaStateContext } from './SchemaState'; import PropTypes from 'prop-types'; diff --git a/web/pgadmin/static/js/SchemaView/InlineView.jsx b/web/pgadmin/static/js/SchemaView/InlineView.jsx index 5d3a53206..c4061888b 100644 --- a/web/pgadmin/static/js/SchemaView/InlineView.jsx +++ b/web/pgadmin/static/js/SchemaView/InlineView.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, { useContext } from 'react'; +import { useContext } from 'react'; import { Grid } from '@mui/material'; import _ from 'lodash'; import PropTypes from 'prop-types'; diff --git a/web/pgadmin/static/js/SchemaView/MappedControl.jsx b/web/pgadmin/static/js/SchemaView/MappedControl.jsx index 3fcb32b64..35b2e7966 100644 --- a/web/pgadmin/static/js/SchemaView/MappedControl.jsx +++ b/web/pgadmin/static/js/SchemaView/MappedControl.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, { useCallback, useContext, useMemo, useState } from 'react'; +import { useCallback, useContext, useMemo, useState } from 'react'; import _ from 'lodash'; import PropTypes from 'prop-types'; diff --git a/web/pgadmin/static/js/SchemaView/ResetButton.jsx b/web/pgadmin/static/js/SchemaView/ResetButton.jsx index 2e9b49060..5926e813b 100644 --- a/web/pgadmin/static/js/SchemaView/ResetButton.jsx +++ b/web/pgadmin/static/js/SchemaView/ResetButton.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, { useContext, useEffect, useState } from 'react'; +import { useContext, useEffect, useState } from 'react'; import { DefaultButton } from 'sources/components/Buttons'; import { SchemaStateContext } from './SchemaState'; diff --git a/web/pgadmin/static/js/SchemaView/SQLTab.jsx b/web/pgadmin/static/js/SchemaView/SQLTab.jsx index e147d4a04..de3c8581f 100644 --- a/web/pgadmin/static/js/SchemaView/SQLTab.jsx +++ b/web/pgadmin/static/js/SchemaView/SQLTab.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, { useEffect, useState } from 'react'; +import { useEffect, useState } from 'react'; import PropTypes from 'prop-types'; import { InputSQL } from 'sources/components/FormComponents'; diff --git a/web/pgadmin/static/js/SchemaView/SaveButton.jsx b/web/pgadmin/static/js/SchemaView/SaveButton.jsx index ef4a0b407..becf5d54e 100644 --- a/web/pgadmin/static/js/SchemaView/SaveButton.jsx +++ b/web/pgadmin/static/js/SchemaView/SaveButton.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, { useContext, useEffect, useState } from 'react'; +import { useContext, useEffect, useState } from 'react'; import { PrimaryButton } from 'sources/components/Buttons'; import { SchemaStateContext } from './SchemaState'; diff --git a/web/pgadmin/static/js/SchemaView/SchemaDialogView.jsx b/web/pgadmin/static/js/SchemaView/SchemaDialogView.jsx index b17bdd067..bce93f11d 100644 --- a/web/pgadmin/static/js/SchemaView/SchemaDialogView.jsx +++ b/web/pgadmin/static/js/SchemaView/SchemaDialogView.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, { useState, useEffect, useMemo } from 'react'; +import { useState, useEffect, useMemo } from 'react'; import CloseIcon from '@mui/icons-material/Close'; import DoneIcon from '@mui/icons-material/Done'; diff --git a/web/pgadmin/static/js/SchemaView/SchemaPropertiesView.jsx b/web/pgadmin/static/js/SchemaView/SchemaPropertiesView.jsx index 88fd1bd47..c79c8d0ec 100644 --- a/web/pgadmin/static/js/SchemaView/SchemaPropertiesView.jsx +++ b/web/pgadmin/static/js/SchemaView/SchemaPropertiesView.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, { useEffect, useMemo } from 'react'; +import { useEffect, useMemo } from 'react'; import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; import InfoIcon from '@mui/icons-material/InfoRounded'; diff --git a/web/pgadmin/static/js/SchemaView/SchemaView.jsx b/web/pgadmin/static/js/SchemaView/SchemaView.jsx index 9d9e69622..c01b9075e 100644 --- a/web/pgadmin/static/js/SchemaView/SchemaView.jsx +++ b/web/pgadmin/static/js/SchemaView/SchemaView.jsx @@ -7,7 +7,6 @@ // ////////////////////////////////////////////////////////////// -import React from 'react'; import PropTypes from 'prop-types'; diff --git a/web/pgadmin/static/js/SecurityPages/BasePage.jsx b/web/pgadmin/static/js/SecurityPages/BasePage.jsx index 0c0aa219e..a7f9af55f 100644 --- a/web/pgadmin/static/js/SecurityPages/BasePage.jsx +++ b/web/pgadmin/static/js/SecurityPages/BasePage.jsx @@ -1,7 +1,7 @@ import { Box, Button, darken } from '@mui/material'; import { styled } from '@mui/material/styles'; import { useSnackbar } from 'notistack'; -import React, { useEffect } from 'react'; +import { useEffect } from 'react'; import { MESSAGE_TYPE, NotifierMessage } from '../components/FormComponents'; import { FinalNotifyContent } from '../helpers/Notifier'; import PropTypes from 'prop-types'; diff --git a/web/pgadmin/static/js/SecurityPages/ForgotPasswordPage.jsx b/web/pgadmin/static/js/SecurityPages/ForgotPasswordPage.jsx index ae07153a9..2980fecf7 100644 --- a/web/pgadmin/static/js/SecurityPages/ForgotPasswordPage.jsx +++ b/web/pgadmin/static/js/SecurityPages/ForgotPasswordPage.jsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import { useState } from 'react'; import ForgotPasswordImage from '../../img/forgot_password.svg?svgr'; import { InputText } from '../components/FormComponents'; import BasePage, { SecurityButton } from './BasePage'; diff --git a/web/pgadmin/static/js/SecurityPages/LoginPage.jsx b/web/pgadmin/static/js/SecurityPages/LoginPage.jsx index 232af2c41..7e1153748 100644 --- a/web/pgadmin/static/js/SecurityPages/LoginPage.jsx +++ b/web/pgadmin/static/js/SecurityPages/LoginPage.jsx @@ -1,5 +1,5 @@ import { Box, Icon } from '@mui/material'; -import React, { useState } from 'react'; +import { useState } from 'react'; import LoginImage from '../../img/login.svg?svgr'; import { InputSelectNonSearch, InputText, MESSAGE_TYPE, NotifierMessage } from '../components/FormComponents'; import BasePage, { SecurityButton } from './BasePage'; diff --git a/web/pgadmin/static/js/SecurityPages/MfaRegisterPage.jsx b/web/pgadmin/static/js/SecurityPages/MfaRegisterPage.jsx index 743ac04cb..4eaebbd47 100644 --- a/web/pgadmin/static/js/SecurityPages/MfaRegisterPage.jsx +++ b/web/pgadmin/static/js/SecurityPages/MfaRegisterPage.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// import { Box } from '@mui/material'; -import React, { useState } from 'react'; +import { useState } from 'react'; import LoginImage from '../../img/login.svg?svgr'; import { FormNote, InputText } from '../components/FormComponents'; import BasePage, { SecurityButton } from './BasePage'; diff --git a/web/pgadmin/static/js/SecurityPages/MfaValidatePage.jsx b/web/pgadmin/static/js/SecurityPages/MfaValidatePage.jsx index 09caab8cc..fb353d481 100644 --- a/web/pgadmin/static/js/SecurityPages/MfaValidatePage.jsx +++ b/web/pgadmin/static/js/SecurityPages/MfaValidatePage.jsx @@ -6,7 +6,7 @@ // This software is released under the PostgreSQL Licence // ////////////////////////////////////////////////////////////// -import React, { useState } from 'react'; +import { useState } from 'react'; import LoginImage from '../../img/login.svg?svgr'; import { InputSelect, InputText, MESSAGE_TYPE, NotifierMessage } from '../components/FormComponents'; import BasePage, { SecurityButton } from './BasePage'; diff --git a/web/pgadmin/static/js/SecurityPages/PasswordResetPage.jsx b/web/pgadmin/static/js/SecurityPages/PasswordResetPage.jsx index efa7c9020..66755c99e 100644 --- a/web/pgadmin/static/js/SecurityPages/PasswordResetPage.jsx +++ b/web/pgadmin/static/js/SecurityPages/PasswordResetPage.jsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import { useState } from 'react'; import ForgotPasswordImage from '../../img/forgot_password.svg?svgr'; import { InputText } from '../components/FormComponents'; import BasePage, { SecurityButton } from './BasePage'; diff --git a/web/pgadmin/static/js/SecurityPages/index.jsx b/web/pgadmin/static/js/SecurityPages/index.jsx index 591d24c62..6b25bbca9 100644 --- a/web/pgadmin/static/js/SecurityPages/index.jsx +++ b/web/pgadmin/static/js/SecurityPages/index.jsx @@ -1,5 +1,4 @@ import ReactDOM from 'react-dom/client'; -import React from 'react'; import { SnackbarProvider } from 'notistack'; import Theme from '../Theme/index'; import LoginPage from './LoginPage'; diff --git a/web/pgadmin/static/js/Theme/index.jsx b/web/pgadmin/static/js/Theme/index.jsx index 3002e309b..013a5c1a2 100644 --- a/web/pgadmin/static/js/Theme/index.jsx +++ b/web/pgadmin/static/js/Theme/index.jsx @@ -12,7 +12,7 @@ * custom themes info will come here. */ -import React, { useEffect, useMemo, useState } from 'react'; +import { useEffect, useMemo, useState } from 'react'; import { createTheme, ThemeProvider } from '@mui/material/styles'; import { LocalizationProvider } from '@mui/x-date-pickers'; import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns'; diff --git a/web/pgadmin/static/js/ToolErrorView.jsx b/web/pgadmin/static/js/ToolErrorView.jsx index 6a5d53180..76d77bc63 100644 --- a/web/pgadmin/static/js/ToolErrorView.jsx +++ b/web/pgadmin/static/js/ToolErrorView.jsx @@ -1,5 +1,4 @@ import PropTypes from 'prop-types'; -import React from 'react'; import gettext from 'sources/gettext'; import { LAYOUT_EVENTS } from './helpers/Layout'; import { styled } from '@mui/material/styles'; diff --git a/web/pgadmin/static/js/ToolView.jsx b/web/pgadmin/static/js/ToolView.jsx index 42832b523..89f65ee0d 100644 --- a/web/pgadmin/static/js/ToolView.jsx +++ b/web/pgadmin/static/js/ToolView.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, { useEffect, useLayoutEffect, useRef } from 'react'; +import { useEffect, useLayoutEffect, useRef } from 'react'; import ReactDOM from 'react-dom/client'; import { usePgAdmin } from './PgAdminProvider'; import { BROWSER_PANELS } from '../../browser/static/js/constants'; diff --git a/web/pgadmin/static/js/UtilityView.jsx b/web/pgadmin/static/js/UtilityView.jsx index 7c7f53749..0674b326c 100644 --- a/web/pgadmin/static/js/UtilityView.jsx +++ b/web/pgadmin/static/js/UtilityView.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, { useEffect, useRef } from 'react'; +import { useEffect, useRef } from 'react'; import getApiInstance from 'sources/api_instance'; import {getHelpUrl, getEPASHelpUrl} from 'pgadmin.help'; import SchemaView from 'sources/SchemaView'; diff --git a/web/pgadmin/static/js/components/Buttons.jsx b/web/pgadmin/static/js/components/Buttons.jsx index f30384254..c37ee9228 100644 --- a/web/pgadmin/static/js/components/Buttons.jsx +++ b/web/pgadmin/static/js/components/Buttons.jsx @@ -8,7 +8,7 @@ ////////////////////////////////////////////////////////////// import { Button, ButtonGroup, Tooltip } from '@mui/material'; -import React, { forwardRef, useEffect, useState } from 'react'; +import { useEffect, useState } from 'react'; import PropTypes from 'prop-types'; import CustomPropTypes from '../custom_prop_types'; import ShortcutTitle from './ShortcutTitle'; @@ -125,7 +125,7 @@ const StyledButton = styled(Button)(({theme, color}) => ({ /* pgAdmin primary button */ -export const PrimaryButton = forwardRef((props, ref)=>{ +export function PrimaryButton({ref, ...props}) { let {children, className, size, noBorder, ...otherProps} = props; let allClassName = ['Buttons-primaryButton', className]; if(size == 'xs') { @@ -137,7 +137,7 @@ export const PrimaryButton = forwardRef((props, ref)=>{ return ( {children} ); -}); +}; PrimaryButton.displayName = 'PrimaryButton'; PrimaryButton.propTypes = { size: PropTypes.string, @@ -147,7 +147,7 @@ PrimaryButton.propTypes = { }; /* pgAdmin default button */ -export const DefaultButton = forwardRef((props, ref)=>{ +export function DefaultButton({ref, ...props}) { let {children, className, size, noBorder, color, ...otherProps} = props; let variant = 'outlined'; let allClassName = ['Buttons-defaultButton', className]; @@ -162,7 +162,7 @@ export const DefaultButton = forwardRef((props, ref)=>{ return ( {children} ); -}); +}; DefaultButton.displayName = 'DefaultButton'; DefaultButton.propTypes = { size: PropTypes.string, @@ -174,7 +174,7 @@ DefaultButton.propTypes = { /* pgAdmin Icon button, takes Icon component as input */ -export const PgIconButton = forwardRef(({icon, title, shortcut, className, splitButton, style, color, isDropdown, tooltipPlacement, ...props}, ref)=>{ +export function PgIconButton({ref, icon, title, shortcut, className, splitButton, style, color, isDropdown, tooltipPlacement, ...props}) { const [tooltipOpen, setTooltipOpen] = useState(false); let shortcutTitle = null; if(shortcut) { @@ -245,7 +245,7 @@ export const PgIconButton = forwardRef(({icon, title, shortcut, className, split ); } -}); +}; PgIconButton.displayName = 'PgIconButton'; PgIconButton.propTypes = { icon: CustomPropTypes.children, @@ -261,14 +261,14 @@ PgIconButton.propTypes = { tooltipPlacement: PropTypes.string, }; -export const PgButtonGroup = forwardRef(({children, ...props}, ref)=>{ +export function PgButtonGroup({ref, children, ...props}) { /* Tooltip does not work for disabled items */ return ( {children} ); -}); +}; PgButtonGroup.displayName = 'PgButtonGroup'; PgButtonGroup.propTypes = { children: CustomPropTypes.children, diff --git a/web/pgadmin/static/js/components/ContextMenu.jsx b/web/pgadmin/static/js/components/ContextMenu.jsx index 19535c5d6..0d350f5d5 100644 --- a/web/pgadmin/static/js/components/ContextMenu.jsx +++ b/web/pgadmin/static/js/components/ContextMenu.jsx @@ -7,7 +7,6 @@ // ////////////////////////////////////////////////////////////// -import React from 'react'; import { PgMenu, PgMenuDivider, PgMenuItem, PgSubMenu } from './Menu'; import PropTypes from 'prop-types'; import gettext from 'sources/gettext'; diff --git a/web/pgadmin/static/js/components/EmptyPanelMessage.jsx b/web/pgadmin/static/js/components/EmptyPanelMessage.jsx index 9a7932f80..9817c05cc 100644 --- a/web/pgadmin/static/js/components/EmptyPanelMessage.jsx +++ b/web/pgadmin/static/js/components/EmptyPanelMessage.jsx @@ -7,7 +7,6 @@ // ////////////////////////////////////////////////////////////// -import React from 'react'; import { styled } from '@mui/material/styles'; import { Box } from '@mui/material'; import InfoRoundedIcon from '@mui/icons-material/InfoRounded'; diff --git a/web/pgadmin/static/js/components/ExternalIcon.jsx b/web/pgadmin/static/js/components/ExternalIcon.jsx index a026ef18e..55e45be89 100644 --- a/web/pgadmin/static/js/components/ExternalIcon.jsx +++ b/web/pgadmin/static/js/components/ExternalIcon.jsx @@ -7,7 +7,6 @@ // ////////////////////////////////////////////////////////////// -import React from 'react'; import QueryToolSvg from '../../img/fonticon/query_tool.svg?svgr'; import ViewDataSvg from '../../img/fonticon/view_data.svg?svgr'; import SaveDataSvg from '../../img/fonticon/save_data_changes.svg?svgr'; diff --git a/web/pgadmin/static/js/components/FieldSet.jsx b/web/pgadmin/static/js/components/FieldSet.jsx index aea7690c7..336690856 100644 --- a/web/pgadmin/static/js/components/FieldSet.jsx +++ b/web/pgadmin/static/js/components/FieldSet.jsx @@ -8,7 +8,6 @@ ////////////////////////////////////////////////////////////// import { styled } from '@mui/material/styles'; -import React from 'react'; import PropTypes from 'prop-types'; import CustomPropTypes from '../custom_prop_types'; diff --git a/web/pgadmin/static/js/components/FormComponents.jsx b/web/pgadmin/static/js/components/FormComponents.jsx index ece76443c..edac3171f 100644 --- a/web/pgadmin/static/js/components/FormComponents.jsx +++ b/web/pgadmin/static/js/components/FormComponents.jsx @@ -8,7 +8,7 @@ ////////////////////////////////////////////////////////////// /* Common form components used in pgAdmin */ -import React, { forwardRef, useCallback, useEffect, useMemo, useRef, useState } from 'react'; +import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; import { styled } from '@mui/material/styles'; import { Box, FormControl, OutlinedInput, FormHelperText, ToggleButton, ToggleButtonGroup, @@ -354,8 +354,7 @@ FormInputDateTimePicker.propTypes = { }; /* Use forwardRef to pass ref prop to OutlinedInput */ -export const InputText = forwardRef(({ - cid, helpid, readonly, disabled, value, onChange, controlProps, type, size, inputStyle, ...props }, ref) => { +export function InputText({ref, cid, helpid, readonly, disabled, value, onChange, controlProps, type, size, inputStyle, ...props }) { const maxlength = typeof(controlProps?.maxLength) != 'undefined' ? controlProps.maxLength : 255; const patterns = { @@ -427,7 +426,7 @@ export const InputText = forwardRef(({ {...(['numeric', 'int'].indexOf(type) > -1 ? { type: 'tel' } : { type: type })} /> ); -}); +}; InputText.displayName = 'InputText'; InputText.propTypes = { cid: PropTypes.string, @@ -657,14 +656,14 @@ InputRadio.propTypes = { labelPlacement: PropTypes.string }; -export const ToggleCheckButton = forwardRef(({ value, selected, label, ...props }, ref) => { +export function ToggleCheckButton({ref, value, selected, label, ...props}) { return (  {label} ); -}); +}; ToggleCheckButton.displayName = 'ToggleCheckButton'; ToggleCheckButton.propTypes = { value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.bool]), @@ -673,7 +672,7 @@ ToggleCheckButton.propTypes = { label: PropTypes.string, }; -export const InputToggle = forwardRef(({ cid, value, onChange, options, disabled, readonly, helpid, ...props }, ref) => { +export function InputToggle({ ref, cid, value, onChange, options, disabled, readonly, helpid, ...props }) { return ( <> o.value==value)?.label} id={cid} aria-describedby={helpid} />} ); -}); +}; InputToggle.displayName = 'InputToggle'; InputToggle.propTypes = { cid: PropTypes.string, @@ -917,8 +916,7 @@ InputSelectNonSearch.propTypes = { })), }; -export const InputSelect = forwardRef(({ - cid, helpid, onChange, options, readonly = false, value, controlProps = {}, optionsLoaded, optionsReloadBasis, disabled, onError, ...props }, ref) => { +export function InputSelect({ref, cid, helpid, onChange, options, readonly = false, value, controlProps = {}, optionsLoaded, optionsReloadBasis, disabled, onError, ...props}) { const [[finalOptions, isLoading], setFinalOptions] = useState([[], true]); const theme = useTheme(); @@ -1012,7 +1010,7 @@ export const InputSelect = forwardRef(({ value: realValue, menuPortalTarget: document.body, styles: styles, - inputId: cid, + inputId: `${cid}-autocomplete`, placeholder: (readonly || disabled) ? '' : controlProps.placeholder || gettext('Select an item...'), maxLength: controlProps.maxLength, ...otherProps, @@ -1045,7 +1043,7 @@ export const InputSelect = forwardRef(({ ); } -}); +}; InputSelect.displayName = 'InputSelect'; InputSelect.propTypes = { cid: PropTypes.string, diff --git a/web/pgadmin/static/js/components/JsonEditor.jsx b/web/pgadmin/static/js/components/JsonEditor.jsx index 9bb1cc860..c48db45a6 100644 --- a/web/pgadmin/static/js/components/JsonEditor.jsx +++ b/web/pgadmin/static/js/components/JsonEditor.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, { useEffect, useMemo, useRef } from 'react'; +import { useEffect, useMemo, useRef } from 'react'; import { createJSONEditor } from 'vanilla-jsoneditor'; import PropTypes from 'prop-types'; import CustomPropTypes from '../custom_prop_types'; diff --git a/web/pgadmin/static/js/components/KeyboardShortcuts.jsx b/web/pgadmin/static/js/components/KeyboardShortcuts.jsx index 8815a1002..c67797b2c 100644 --- a/web/pgadmin/static/js/components/KeyboardShortcuts.jsx +++ b/web/pgadmin/static/js/components/KeyboardShortcuts.jsx @@ -8,7 +8,7 @@ ////////////////////////////////////////////////////////////// import { Box, ToggleButtonGroup } from '@mui/material'; -import React, { useMemo } from 'react'; +import { useMemo } from 'react'; import { InputText, ToggleCheckButton } from './FormComponents'; import PropTypes from 'prop-types'; import { isMac } from '../keyboard_shortcuts'; diff --git a/web/pgadmin/static/js/components/Loader.jsx b/web/pgadmin/static/js/components/Loader.jsx index 9e4f7039c..883c7f835 100644 --- a/web/pgadmin/static/js/components/Loader.jsx +++ b/web/pgadmin/static/js/components/Loader.jsx @@ -9,7 +9,6 @@ import { CircularProgress, Box, Typography } from '@mui/material'; import { styled } from '@mui/material/styles'; -import React from 'react'; import PropTypes from 'prop-types'; const StyledBox = styled(Box)(({theme}) => ({ diff --git a/web/pgadmin/static/js/components/ModalContent.jsx b/web/pgadmin/static/js/components/ModalContent.jsx index 3f1820b4b..8064926e3 100644 --- a/web/pgadmin/static/js/components/ModalContent.jsx +++ b/web/pgadmin/static/js/components/ModalContent.jsx @@ -7,7 +7,6 @@ // ////////////////////////////////////////////////////////////// -import React, { forwardRef } from 'react'; import { styled } from '@mui/material/styles'; import CustomPropTypes from '../custom_prop_types'; import { Box } from '@mui/material'; @@ -29,11 +28,17 @@ const StyledBox = styled(Box)(({theme})=>({ }, })); -export const ModalContent = forwardRef(({children, ...props }, ref) => { +export function ModalContent( + { + ref, + children, + ...props + } +) { return ( {children} ); -}); +}; ModalContent.displayName = 'ModalContent'; ModalContent.propTypes = { children: CustomPropTypes.children, diff --git a/web/pgadmin/static/js/components/ObjectBreadcrumbs.jsx b/web/pgadmin/static/js/components/ObjectBreadcrumbs.jsx index 8d911db6f..24d7acafd 100644 --- a/web/pgadmin/static/js/components/ObjectBreadcrumbs.jsx +++ b/web/pgadmin/static/js/components/ObjectBreadcrumbs.jsx @@ -8,7 +8,7 @@ ////////////////////////////////////////////////////////////// import { Box } from '@mui/material'; import { styled } from '@mui/material/styles'; -import React, { useState, useEffect } from 'react'; +import { useState, useEffect } from 'react'; import AccountTreeIcon from '@mui/icons-material/AccountTree'; import CommentIcon from '@mui/icons-material/Comment'; import ArrowForwardIosRoundedIcon from '@mui/icons-material/ArrowForwardIosRounded'; diff --git a/web/pgadmin/static/js/components/PgChart/StreamingChart.jsx b/web/pgadmin/static/js/components/PgChart/StreamingChart.jsx index 732348338..539a4e80c 100644 --- a/web/pgadmin/static/js/components/PgChart/StreamingChart.jsx +++ b/web/pgadmin/static/js/components/PgChart/StreamingChart.jsx @@ -1,4 +1,4 @@ -import React, { useRef, useMemo } from 'react'; +import { useRef, useMemo } from 'react'; import UplotReact from 'uplot-react'; import { useResizeDetector } from 'react-resize-detector'; import gettext from 'sources/gettext'; diff --git a/web/pgadmin/static/js/components/PgReactTableStyled.jsx b/web/pgadmin/static/js/components/PgReactTableStyled.jsx index 2c658cebe..96a14dca2 100644 --- a/web/pgadmin/static/js/components/PgReactTableStyled.jsx +++ b/web/pgadmin/static/js/components/PgReactTableStyled.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, { forwardRef, useEffect } from 'react'; +import React, { useEffect } from 'react'; import { flexRender } from '@tanstack/react-table'; import { styled } from '@mui/material/styles'; import PropTypes from 'prop-types'; @@ -161,7 +161,15 @@ const StyledDiv = styled('div')(({theme})=>({ } })); -export const PgReactTableCell = forwardRef(({row, cell, children, className}, ref)=>{ +export function PgReactTableCell( + { + ref, + row, + cell, + children, + className + } +) { let classNames = ['pgrd-row-cell']; if (typeof (cell.column.id) == 'string' && cell.column.id.startsWith('btn-')) { classNames.push('btn-cell'); @@ -195,7 +203,7 @@ export const PgReactTableCell = forwardRef(({row, cell, children, className}, re
{children}
); -}); +}; PgReactTableCell.displayName = 'PgReactTableCell'; PgReactTableCell.propTypes = { @@ -205,26 +213,40 @@ PgReactTableCell.propTypes = { className: PropTypes.any, }; -export const PgReactTableRow = forwardRef(({ children, className, ...props }, ref)=>{ +export function PgReactTableRow ( + { + ref, + children, + className, + ...props + } +) { return (
{children}
); -}); +}; PgReactTableRow.displayName = 'PgReactTableRow'; PgReactTableRow.propTypes = { children: CustomPropTypes.children, className: PropTypes.any, }; -export const PgReactTableRowContent = forwardRef(({children, className, ...props}, ref)=>{ +export function PgReactTableRowContent( + { + ref, + children, + className, + ...props + } +) { return (
{children}
); -}); +}; PgReactTableRowContent.displayName = 'PgReactTableRowContent'; PgReactTableRowContent.propTypes = { children: CustomPropTypes.children, @@ -306,7 +328,17 @@ PgReactTableBody.propTypes = { children: CustomPropTypes.children, }; -export const PgReactTable = forwardRef(({children, table, rootClassName, tableClassName, onScrollFunc, ...props}, ref)=>{ +export function PgReactTable( + { + ref, + children, + table, + rootClassName, + tableClassName, + onScrollFunc, + ...props + } +) { const columns = table.getAllColumns(); useEffect(()=>{ @@ -339,7 +371,7 @@ export const PgReactTable = forwardRef(({children, table, rootClassName, tableCl ); -}); +}; PgReactTable.displayName = 'PgReactTable'; PgReactTable.propTypes = { table: PropTypes.object, diff --git a/web/pgadmin/static/js/components/PgTree/FileTreeItem/DoubleClickHandler.jsx b/web/pgadmin/static/js/components/PgTree/FileTreeItem/DoubleClickHandler.jsx index 16f6da42d..5267849bc 100644 --- a/web/pgadmin/static/js/components/PgTree/FileTreeItem/DoubleClickHandler.jsx +++ b/web/pgadmin/static/js/components/PgTree/FileTreeItem/DoubleClickHandler.jsx @@ -8,7 +8,6 @@ ////////////////////////////////////////////////////////////// import { useSingleAndDoubleClick } from '../../../custom_hooks'; -import * as React from 'react'; import PropTypes from 'prop-types'; import CustomPropTypes from '../../../../js/custom_prop_types'; import { getEnterKeyHandler } from '../../../../js/utils'; diff --git a/web/pgadmin/static/js/components/PgTree/FileTreeX/index.tsx b/web/pgadmin/static/js/components/PgTree/FileTreeX/index.tsx index a81c18ab7..eda514152 100644 --- a/web/pgadmin/static/js/components/PgTree/FileTreeX/index.tsx +++ b/web/pgadmin/static/js/components/PgTree/FileTreeX/index.tsx @@ -32,7 +32,7 @@ export class FileTreeX extends React.Component { private readonly pseudoActiveFileDec: Decoration; private activeFile: FileOrDir; private pseudoActiveFile: FileOrDir; - private readonly wrapperRef: React.RefObject = React.createRef(); + private readonly wrapperRef: React.RefObject = React.createRef(); private readonly events: Notificar; private readonly disposables: DisposablesComposite; private keyboardHotkeys: KeyboardHotkeys; diff --git a/web/pgadmin/static/js/components/Privilege.jsx b/web/pgadmin/static/js/components/Privilege.jsx index eed688fb3..3196e2bd8 100644 --- a/web/pgadmin/static/js/components/Privilege.jsx +++ b/web/pgadmin/static/js/components/Privilege.jsx @@ -8,7 +8,6 @@ ////////////////////////////////////////////////////////////// import { styled } from '@mui/material/styles'; import _ from 'lodash'; -import React from 'react'; import { InputCheckbox, InputText } from './FormComponents'; import PropTypes from 'prop-types'; diff --git a/web/pgadmin/static/js/components/QueryThresholds.jsx b/web/pgadmin/static/js/components/QueryThresholds.jsx index ed50d847f..8edf5e763 100644 --- a/web/pgadmin/static/js/components/QueryThresholds.jsx +++ b/web/pgadmin/static/js/components/QueryThresholds.jsx @@ -10,7 +10,6 @@ import gettext from 'sources/gettext'; import _ from 'lodash'; import { FormGroup, Grid, Typography } from '@mui/material'; -import React from 'react'; import { InputText } from './FormComponents'; import PropTypes from 'prop-types'; diff --git a/web/pgadmin/static/js/components/ReactCodeMirror/components/Editor.jsx b/web/pgadmin/static/js/components/ReactCodeMirror/components/Editor.jsx index 943640e41..6fb96440d 100644 --- a/web/pgadmin/static/js/components/ReactCodeMirror/components/Editor.jsx +++ b/web/pgadmin/static/js/components/ReactCodeMirror/components/Editor.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, { useEffect, useMemo, useRef } from 'react'; +import { useEffect, useMemo, useRef } from 'react'; import ReactDOMServer from 'react-dom/server'; import PropTypes from 'prop-types'; diff --git a/web/pgadmin/static/js/components/ReactCodeMirror/components/FindDialog.jsx b/web/pgadmin/static/js/components/ReactCodeMirror/components/FindDialog.jsx index c425e1aab..1553bb3f2 100644 --- a/web/pgadmin/static/js/components/ReactCodeMirror/components/FindDialog.jsx +++ b/web/pgadmin/static/js/components/ReactCodeMirror/components/FindDialog.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, { useEffect, useRef, useState } from 'react'; +import { useEffect, useRef, useState } from 'react'; import { styled } from '@mui/material/styles'; import PropTypes from 'prop-types'; import gettext from 'sources/gettext'; diff --git a/web/pgadmin/static/js/components/ReactCodeMirror/components/GotoDialog.jsx b/web/pgadmin/static/js/components/ReactCodeMirror/components/GotoDialog.jsx index c784baed8..4051bc714 100644 --- a/web/pgadmin/static/js/components/ReactCodeMirror/components/GotoDialog.jsx +++ b/web/pgadmin/static/js/components/ReactCodeMirror/components/GotoDialog.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, { useEffect, useRef, useState } from 'react'; +import { useEffect, useRef, useState } from 'react'; import { styled } from '@mui/material/styles'; import PropTypes from 'prop-types'; import gettext from 'sources/gettext'; diff --git a/web/pgadmin/static/js/components/ReactCodeMirror/index.jsx b/web/pgadmin/static/js/components/ReactCodeMirror/index.jsx index 3456ec0d0..685854843 100644 --- a/web/pgadmin/static/js/components/ReactCodeMirror/index.jsx +++ b/web/pgadmin/static/js/components/ReactCodeMirror/index.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, { useCallback, useMemo, useRef, useState, useEffect } from 'react'; +import { useCallback, useMemo, useRef, useState, useEffect } from 'react'; import { styled } from '@mui/material/styles'; import FileCopyRoundedIcon from '@mui/icons-material/FileCopyRounded'; import CheckRoundedIcon from '@mui/icons-material/CheckRounded'; diff --git a/web/pgadmin/static/js/components/SearchInputText.jsx b/web/pgadmin/static/js/components/SearchInputText.jsx index e5bffe152..280532fa9 100644 --- a/web/pgadmin/static/js/components/SearchInputText.jsx +++ b/web/pgadmin/static/js/components/SearchInputText.jsx @@ -7,7 +7,6 @@ // ////////////////////////////////////////////////////////////// -import React from 'react'; import PropTypes from 'prop-types'; import { InputText } from 'sources/components/FormComponents'; diff --git a/web/pgadmin/static/js/components/SelectRefresh.jsx b/web/pgadmin/static/js/components/SelectRefresh.jsx index 681e66a04..adccdc6ae 100644 --- a/web/pgadmin/static/js/components/SelectRefresh.jsx +++ b/web/pgadmin/static/js/components/SelectRefresh.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, { useState } from 'react'; +import { useState } from 'react'; import { Box} from '@mui/material'; import {InputSelect, FormInput} from './FormComponents'; import PropTypes from 'prop-types'; diff --git a/web/pgadmin/static/js/components/SelectThemes.jsx b/web/pgadmin/static/js/components/SelectThemes.jsx index eacfd6c03..6746e3fc4 100644 --- a/web/pgadmin/static/js/components/SelectThemes.jsx +++ b/web/pgadmin/static/js/components/SelectThemes.jsx @@ -9,7 +9,7 @@ import gettext from 'sources/gettext'; import { FormHelperText, Box } from '@mui/material'; -import React, { useMemo } from 'react'; +import { useMemo } from 'react'; import {InputSelect } from './FormComponents'; import PropTypes from 'prop-types'; import CustomPropTypes from '../custom_prop_types'; diff --git a/web/pgadmin/static/js/components/ShortcutTitle.jsx b/web/pgadmin/static/js/components/ShortcutTitle.jsx index 209370b2c..10c39271a 100644 --- a/web/pgadmin/static/js/components/ShortcutTitle.jsx +++ b/web/pgadmin/static/js/components/ShortcutTitle.jsx @@ -7,7 +7,6 @@ // ////////////////////////////////////////////////////////////// -import React from 'react'; import { styled } from '@mui/material/styles'; import PropTypes from 'prop-types'; import { isMac } from '../keyboard_shortcuts'; diff --git a/web/pgadmin/static/js/components/TabPanel.jsx b/web/pgadmin/static/js/components/TabPanel.jsx index b4d8d073c..8af95957e 100644 --- a/web/pgadmin/static/js/components/TabPanel.jsx +++ b/web/pgadmin/static/js/components/TabPanel.jsx @@ -7,7 +7,6 @@ // ////////////////////////////////////////////////////////////// -import React from 'react'; import { Box } from '@mui/material'; import { styled } from '@mui/material/styles'; import PropTypes from 'prop-types'; diff --git a/web/pgadmin/static/js/components/Table.jsx b/web/pgadmin/static/js/components/Table.jsx index 72419c645..2bb53d1cf 100644 --- a/web/pgadmin/static/js/components/Table.jsx +++ b/web/pgadmin/static/js/components/Table.jsx @@ -7,7 +7,6 @@ // ////////////////////////////////////////////////////////////// -import React from 'react'; import { styled } from '@mui/material/styles'; import CustomPropTypes from '../custom_prop_types'; diff --git a/web/pgadmin/static/js/helpers/Layout/LayoutIframeTab.jsx b/web/pgadmin/static/js/helpers/Layout/LayoutIframeTab.jsx index 3819ba039..6c4bd9a6d 100644 --- a/web/pgadmin/static/js/helpers/Layout/LayoutIframeTab.jsx +++ b/web/pgadmin/static/js/helpers/Layout/LayoutIframeTab.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// import { Portal } from '@mui/material'; -import React, { useEffect, useRef, useState } from 'react'; +import { useEffect, useRef, useState } from 'react'; import Frame from 'react-frame-component'; import PropTypes from 'prop-types'; import CustomPropTypes from '../../custom_prop_types'; diff --git a/web/pgadmin/static/js/helpers/ModalProvider.jsx b/web/pgadmin/static/js/helpers/ModalProvider.jsx index 5a3638364..b4ef9ffb0 100644 --- a/web/pgadmin/static/js/helpers/ModalProvider.jsx +++ b/web/pgadmin/static/js/helpers/ModalProvider.jsx @@ -8,7 +8,7 @@ ////////////////////////////////////////////////////////////// import { Box, Dialog, DialogContent, DialogTitle, Paper } from '@mui/material'; -import React, { useState, useMemo } from 'react'; +import React, { useState, useMemo, useRef } from 'react'; import { getEpoch } from 'sources/utils'; import { DefaultButton, PgIconButton, PrimaryButton } from '../components/Buttons'; import Draggable from 'react-draggable'; @@ -206,6 +206,7 @@ function setEnableResizing(props, resizeable) { function PaperComponent({minHeight, minWidth, ...props}) { let [dialogPosition, setDialogPosition] = useState(null); let resizeable = checkIsResizable(props); + const nodeRef = useRef(null); const setConditionalPosition = () => { return props.isfullscreen == 'true' ? { x: 0, y: 0 } : dialogPosition && { x: dialogPosition.x, y: dialogPosition.y }; @@ -249,8 +250,8 @@ function PaperComponent({minHeight, minWidth, ...props}) { : - - + + ); } @@ -312,7 +313,11 @@ function ModalContainer({ id, title, content, dialogHeight, dialogWidth, onClose open={true} onClose={closeModal} PaperComponent={PaperComponent} - PaperProps={{ 'isfullscreen': isFullScreen.toString(), 'isresizeable': isResizeable.toString(), width: dialogWidth, height: dialogHeight, minHeight: minHeight, minWidth: minWidth }} + slotProps={{ + paper: { + 'isfullscreen': isFullScreen.toString(), 'isresizeable': isResizeable.toString(), width: dialogWidth, height: dialogHeight, minHeight: minHeight, minWidth: minWidth + }, + }} fullScreen={isFullScreen} fullWidth={isFullWidth} disablePortal diff --git a/web/pgadmin/static/js/helpers/Notifier.jsx b/web/pgadmin/static/js/helpers/Notifier.jsx index 09e958520..ead911ca8 100644 --- a/web/pgadmin/static/js/helpers/Notifier.jsx +++ b/web/pgadmin/static/js/helpers/Notifier.jsx @@ -38,9 +38,14 @@ const Root = styled('div')(({theme}) => ({ const AUTO_HIDE_DURATION = 3000; // In milliseconds -export const FinalNotifyContent = React.forwardRef(({children}, ref) => { +export function FinalNotifyContent( + { + ref, + children + } +) { return {children}; -}); +}; FinalNotifyContent.displayName = 'FinalNotifyContent'; FinalNotifyContent.propTypes = { children: CustomPropTypes.children, diff --git a/web/pgadmin/static/js/helpers/appAutoUpdateNotifier.jsx b/web/pgadmin/static/js/helpers/appAutoUpdateNotifier.jsx index d69713c15..e8ef55877 100644 --- a/web/pgadmin/static/js/helpers/appAutoUpdateNotifier.jsx +++ b/web/pgadmin/static/js/helpers/appAutoUpdateNotifier.jsx @@ -7,7 +7,6 @@ // ////////////////////////////////////////////////////////////// -import React from 'react'; import { Box } from '@mui/material'; import { styled } from '@mui/material/styles'; import CloseIcon from '@mui/icons-material/CloseRounded'; diff --git a/web/pgadmin/static/js/helpers/withColorPicker.js b/web/pgadmin/static/js/helpers/withColorPicker.js index 84483f1d9..0f336f1cf 100644 --- a/web/pgadmin/static/js/helpers/withColorPicker.js +++ b/web/pgadmin/static/js/helpers/withColorPicker.js @@ -9,7 +9,7 @@ /* React HOC on color pickr */ import Pickr from '@simonwep/pickr'; -import React, { useEffect, useRef } from 'react'; +import { useEffect, useRef } from 'react'; import gettext from 'sources/gettext'; import PropTypes from 'prop-types'; import { fullHexColor } from '../utils'; diff --git a/web/pgadmin/static/js/tree/ObjectExplorer/ObjectExplorerFilter.jsx b/web/pgadmin/static/js/tree/ObjectExplorer/ObjectExplorerFilter.jsx index 54c7a68fe..11a9f45ba 100644 --- a/web/pgadmin/static/js/tree/ObjectExplorer/ObjectExplorerFilter.jsx +++ b/web/pgadmin/static/js/tree/ObjectExplorer/ObjectExplorerFilter.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, { useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react'; +import { useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react'; import { usePgAdmin } from '../../PgAdminProvider'; import { Box, styled } from '@mui/material'; import { DefaultButton, PrimaryButton } from '../../components/Buttons'; diff --git a/web/pgadmin/static/js/tree/ObjectExplorer/ObjectExplorerToolbar.jsx b/web/pgadmin/static/js/tree/ObjectExplorer/ObjectExplorerToolbar.jsx index e7ee152f3..331db4617 100644 --- a/web/pgadmin/static/js/tree/ObjectExplorer/ObjectExplorerToolbar.jsx +++ b/web/pgadmin/static/js/tree/ObjectExplorer/ObjectExplorerToolbar.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, { useEffect, useState } from 'react'; +import { useEffect, useState } from 'react'; import { usePgAdmin } from '../../PgAdminProvider'; import { Badge, Box } from '@mui/material'; import { QueryToolIcon, RowFilterIcon, ViewDataIcon } from '../../components/ExternalIcon'; diff --git a/web/pgadmin/tools/debugger/static/js/DebuggerModule.js b/web/pgadmin/tools/debugger/static/js/DebuggerModule.js index d298c4eb8..29bba7533 100644 --- a/web/pgadmin/tools/debugger/static/js/DebuggerModule.js +++ b/web/pgadmin/tools/debugger/static/js/DebuggerModule.js @@ -8,7 +8,6 @@ ////////////////////////////////////////////////////////////// import _ from 'lodash'; -import React from 'react'; import ReactDOM from 'react-dom/client'; import gettext from 'sources/gettext'; diff --git a/web/pgadmin/tools/debugger/static/js/components/ToolBar.jsx b/web/pgadmin/tools/debugger/static/js/components/ToolBar.jsx index 6f39986f1..f367e1eb7 100644 --- a/web/pgadmin/tools/debugger/static/js/components/ToolBar.jsx +++ b/web/pgadmin/tools/debugger/static/js/components/ToolBar.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, { useCallback, useContext, useEffect, useState } from 'react'; +import { useCallback, useContext, useEffect, useState } from 'react'; import { styled } from '@mui/material/styles'; diff --git a/web/pgadmin/tools/debugger/static/js/debugger_ui.js b/web/pgadmin/tools/debugger/static/js/debugger_ui.js index 3779ca14e..689e5f55f 100644 --- a/web/pgadmin/tools/debugger/static/js/debugger_ui.js +++ b/web/pgadmin/tools/debugger/static/js/debugger_ui.js @@ -7,7 +7,6 @@ //// //////////////////////////////////////////////////////////////// -import React from 'react'; import gettext from 'sources/gettext'; import pgAdmin from 'sources/pgadmin'; diff --git a/web/pgadmin/tools/erd/static/js/ERDModule.js b/web/pgadmin/tools/erd/static/js/ERDModule.js index 0acbd7a69..d56e313b2 100644 --- a/web/pgadmin/tools/erd/static/js/ERDModule.js +++ b/web/pgadmin/tools/erd/static/js/ERDModule.js @@ -11,7 +11,6 @@ import {getPanelTitle} from 'tools/sqleditor/static/js/sqleditor_title'; import {getRandomInt} from 'sources/utils'; import url_for from 'sources/url_for'; import gettext from 'sources/gettext'; -import React from 'react'; import ReactDOM from 'react-dom/client'; import ERDTool from './erd_tool/components/ERDTool'; import ModalProvider from '../../../../static/js/helpers/ModalProvider'; diff --git a/web/pgadmin/tools/erd/static/js/erd_tool/components/BeforeUnload.jsx b/web/pgadmin/tools/erd/static/js/erd_tool/components/BeforeUnload.jsx index ac3eb65f4..c5725ebcc 100644 --- a/web/pgadmin/tools/erd/static/js/erd_tool/components/BeforeUnload.jsx +++ b/web/pgadmin/tools/erd/static/js/erd_tool/components/BeforeUnload.jsx @@ -1,4 +1,4 @@ -import React, { useEffect } from 'react'; +import { useEffect } from 'react'; import PropTypes from 'prop-types'; import { useBeforeUnload } from '../../../../../../static/js/custom_hooks'; diff --git a/web/pgadmin/tools/erd/static/js/erd_tool/components/ConnectionBar.jsx b/web/pgadmin/tools/erd/static/js/erd_tool/components/ConnectionBar.jsx index a35e02d4a..b9f6f260d 100644 --- a/web/pgadmin/tools/erd/static/js/erd_tool/components/ConnectionBar.jsx +++ b/web/pgadmin/tools/erd/static/js/erd_tool/components/ConnectionBar.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, { useMemo } from 'react'; +import { useMemo } from 'react'; import { styled } from '@mui/material/styles'; import gettext from 'sources/gettext'; import PropTypes from 'prop-types'; diff --git a/web/pgadmin/tools/erd/static/js/erd_tool/components/FloatingNote.jsx b/web/pgadmin/tools/erd/static/js/erd_tool/components/FloatingNote.jsx index ff4d5e8e4..8ec8b9864 100644 --- a/web/pgadmin/tools/erd/static/js/erd_tool/components/FloatingNote.jsx +++ b/web/pgadmin/tools/erd/static/js/erd_tool/components/FloatingNote.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, { useEffect, useState, useMemo } from 'react'; +import { useEffect, useState, useMemo } from 'react'; import { styled } from '@mui/material/styles'; import gettext from 'sources/gettext'; import PropTypes from 'prop-types'; diff --git a/web/pgadmin/tools/erd/static/js/erd_tool/dialogs/index.jsx b/web/pgadmin/tools/erd/static/js/erd_tool/dialogs/index.jsx index 96567213f..3adfa6d7b 100644 --- a/web/pgadmin/tools/erd/static/js/erd_tool/dialogs/index.jsx +++ b/web/pgadmin/tools/erd/static/js/erd_tool/dialogs/index.jsx @@ -14,7 +14,6 @@ import {getOneToOneDialogSchema} from './OneToOneDialog'; import pgAdmin from 'sources/pgadmin'; import SchemaView from '../../../../../../static/js/SchemaView'; -import React from 'react'; export default class ERDDialogs { constructor(modalProvider) { this.modal = modalProvider; diff --git a/web/pgadmin/tools/erd/static/js/erd_tool/links/OneToManyLink.jsx b/web/pgadmin/tools/erd/static/js/erd_tool/links/OneToManyLink.jsx index 830aceecc..a743d3f7a 100644 --- a/web/pgadmin/tools/erd/static/js/erd_tool/links/OneToManyLink.jsx +++ b/web/pgadmin/tools/erd/static/js/erd_tool/links/OneToManyLink.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, { forwardRef, useContext } from 'react'; +import { useContext } from 'react'; import { RightAngleLinkModel, RightAngleLinkWidget, @@ -354,8 +354,7 @@ export class OneToManyLinkWidget extends RightAngleLinkWidget { } } -const LinkSegment = forwardRef(({selected, path, ...props}, ref)=>{ - +function LinkSegment({ref, selected, path, ...props}) { return ( { > ); -}); +}; LinkSegment.displayName = 'LinkSegment'; LinkSegment.propTypes = { model: PropTypes.object, diff --git a/web/pgadmin/tools/erd/static/js/erd_tool/nodes/TableNode.jsx b/web/pgadmin/tools/erd/static/js/erd_tool/nodes/TableNode.jsx index b37e19621..38668010d 100644 --- a/web/pgadmin/tools/erd/static/js/erd_tool/nodes/TableNode.jsx +++ b/web/pgadmin/tools/erd/static/js/erd_tool/nodes/TableNode.jsx @@ -11,12 +11,12 @@ import React from 'react'; import { DefaultNodeModel, DiagramEngine, PortModelAlignment, PortWidget } from '@projectstorm/react-diagrams'; import { AbstractReactFactory } from '@projectstorm/react-canvas-core'; import _ from 'lodash'; -import SchemaIcon from 'top/browser/server_groups/servers/databases/schemas/static/img/schema.svg'; -import TableIcon from 'top/browser/server_groups/servers/databases/schemas/tables/static/img/table.svg'; -import PrimaryKeyIcon from 'top/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/static/img/primary_key.svg'; -import ForeignKeyIcon from 'top/browser/server_groups/servers/databases/schemas/tables/constraints/foreign_key/static/img/foreign_key.svg'; -import ColumnIcon from 'top/browser/server_groups/servers/databases/schemas/tables/columns/static/img/column.svg'; -import UniqueKeyIcon from 'top/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/static/img/unique_constraint.svg'; +import SchemaIcon from 'top/browser/server_groups/servers/databases/schemas/static/img/schema.svg?svgr'; +import TableIcon from 'top/browser/server_groups/servers/databases/schemas/tables/static/img/table.svg?svgr'; +import PrimaryKeyIcon from 'top/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/static/img/primary_key.svg?svgr'; +import ForeignKeyIcon from 'top/browser/server_groups/servers/databases/schemas/tables/constraints/foreign_key/static/img/foreign_key.svg?svgr'; +import ColumnIcon from 'top/browser/server_groups/servers/databases/schemas/tables/columns/static/img/column.svg?svgr'; +import UniqueKeyIcon from 'top/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/static/img/unique_constraint.svg?svgr'; import PropTypes from 'prop-types'; import gettext from 'sources/gettext'; import { PgIconButton } from '../../../../../../static/js/components/Buttons'; @@ -199,9 +199,11 @@ export class TableNodeModel extends DefaultNodeModel { } function RowIcon({icon}) { + const Icon = icon; return (
- + + {/* */}
); } diff --git a/web/pgadmin/tools/grant_wizard/static/js/grant_wizard.js b/web/pgadmin/tools/grant_wizard/static/js/grant_wizard.js index c17bc8418..1c52acb9f 100644 --- a/web/pgadmin/tools/grant_wizard/static/js/grant_wizard.js +++ b/web/pgadmin/tools/grant_wizard/static/js/grant_wizard.js @@ -6,7 +6,6 @@ // This software is released under the PostgreSQL Licence // ////////////////////////////////////////////////////////////// -import React from 'react'; import GrantWizard from './GrantWizard'; import { AllPermissionTypes, BROWSER_PANELS } from '../../../../browser/static/js/constants'; diff --git a/web/pgadmin/tools/import_export_servers/static/js/import_export_servers.js b/web/pgadmin/tools/import_export_servers/static/js/import_export_servers.js index c433157bc..95a1b7680 100644 --- a/web/pgadmin/tools/import_export_servers/static/js/import_export_servers.js +++ b/web/pgadmin/tools/import_export_servers/static/js/import_export_servers.js @@ -7,7 +7,6 @@ // ////////////////////////////////////////////////////////////// -import React from 'react'; import gettext from 'sources/gettext'; import ImportExportServers from './ImportExportServers'; import { BROWSER_PANELS } from '../../../../browser/static/js/constants'; diff --git a/web/pgadmin/tools/psql/static/js/PsqlModule.js b/web/pgadmin/tools/psql/static/js/PsqlModule.js index 2a8a8e6be..70bce3941 100644 --- a/web/pgadmin/tools/psql/static/js/PsqlModule.js +++ b/web/pgadmin/tools/psql/static/js/PsqlModule.js @@ -27,7 +27,6 @@ import ModalProvider from '../../../../static/js/helpers/ModalProvider'; import * as csrfToken from 'sources/csrf'; import { ApplicationStateProvider } from '../../../../settings/static/ApplicationStateProvider'; import ToolErrorView from '../../../../static/js/ToolErrorView'; -import React from 'react'; import ReactDOM from 'react-dom/client'; diff --git a/web/pgadmin/tools/schema_diff/static/js/SchemaDiffModule.js b/web/pgadmin/tools/schema_diff/static/js/SchemaDiffModule.js index 1fcce092e..637f1897b 100644 --- a/web/pgadmin/tools/schema_diff/static/js/SchemaDiffModule.js +++ b/web/pgadmin/tools/schema_diff/static/js/SchemaDiffModule.js @@ -7,7 +7,6 @@ // ////////////////////////////////////////////////////////////// -import React from 'react'; import ReactDOM from 'react-dom/client'; import gettext from 'sources/gettext'; diff --git a/web/pgadmin/tools/schema_diff/static/js/components/InputComponent.jsx b/web/pgadmin/tools/schema_diff/static/js/components/InputComponent.jsx index 855e8120c..c04b0d23f 100644 --- a/web/pgadmin/tools/schema_diff/static/js/components/InputComponent.jsx +++ b/web/pgadmin/tools/schema_diff/static/js/components/InputComponent.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// import PropTypes from 'prop-types'; -import React, { useContext, useState, useEffect } from 'react'; +import { useContext, useState, useEffect } from 'react'; import { Box, Grid, Typography } from '@mui/material'; import { InputSelect } from '../../../../../static/js/components/FormComponents'; import { SchemaDiffEventsContext } from './SchemaDiffComponent'; diff --git a/web/pgadmin/tools/schema_diff/static/js/components/ResultGridComponent.jsx b/web/pgadmin/tools/schema_diff/static/js/components/ResultGridComponent.jsx index a3390d760..979d24efa 100644 --- a/web/pgadmin/tools/schema_diff/static/js/components/ResultGridComponent.jsx +++ b/web/pgadmin/tools/schema_diff/static/js/components/ResultGridComponent.jsx @@ -10,7 +10,7 @@ import _ from 'lodash'; import { styled } from '@mui/material/styles'; import PropTypes from 'prop-types'; import { SelectColumn } from 'react-data-grid'; -import React, { useContext, useEffect, useLayoutEffect, useReducer, useRef, useState } from 'react'; +import { useContext, useEffect, useLayoutEffect, useReducer, useRef, useState } from 'react'; import { Box } from '@mui/material'; import KeyboardArrowRightRoundedIcon from '@mui/icons-material/KeyboardArrowRightRounded'; import KeyboardArrowDownRoundedIcon from '@mui/icons-material/KeyboardArrowDownRounded'; diff --git a/web/pgadmin/tools/schema_diff/static/js/components/Results.jsx b/web/pgadmin/tools/schema_diff/static/js/components/Results.jsx index f0b5af25c..a895c5e73 100644 --- a/web/pgadmin/tools/schema_diff/static/js/components/Results.jsx +++ b/web/pgadmin/tools/schema_diff/static/js/components/Results.jsx @@ -10,7 +10,7 @@ import gettext from 'sources/gettext'; import { styled } from '@mui/material/styles'; -import React, { useContext, useState, useEffect } from 'react'; +import { useContext, useState, useEffect } from 'react'; import { Box } from '@mui/material'; import { InputSQL } from '../../../../../static/js/components/FormComponents'; diff --git a/web/pgadmin/tools/schema_diff/static/js/components/SchemaDiffButtonComponent.jsx b/web/pgadmin/tools/schema_diff/static/js/components/SchemaDiffButtonComponent.jsx index dd9fc3c25..0ce6fa6bd 100644 --- a/web/pgadmin/tools/schema_diff/static/js/components/SchemaDiffButtonComponent.jsx +++ b/web/pgadmin/tools/schema_diff/static/js/components/SchemaDiffButtonComponent.jsx @@ -10,7 +10,7 @@ import _ from 'lodash'; import { styled } from '@mui/material/styles'; import PropTypes from 'prop-types'; -import React, { useState, useRef, useContext, useEffect } from 'react'; +import { useState, useRef, useContext, useEffect } from 'react'; import gettext from 'sources/gettext'; diff --git a/web/pgadmin/tools/schema_diff/static/js/components/SchemaDiffCompare.jsx b/web/pgadmin/tools/schema_diff/static/js/components/SchemaDiffCompare.jsx index e56770c13..ab14919a5 100644 --- a/web/pgadmin/tools/schema_diff/static/js/components/SchemaDiffCompare.jsx +++ b/web/pgadmin/tools/schema_diff/static/js/components/SchemaDiffCompare.jsx @@ -9,7 +9,7 @@ import _ from 'lodash'; import PropTypes from 'prop-types'; -import React, { useContext, useEffect, useRef, useState } from 'react'; +import { useContext, useEffect, useRef, useState } from 'react'; import { Box, Grid } from '@mui/material'; import InfoRoundedIcon from '@mui/icons-material/InfoRounded'; diff --git a/web/pgadmin/tools/search_objects/static/js/index.js b/web/pgadmin/tools/search_objects/static/js/index.js index feb524567..690804fcd 100644 --- a/web/pgadmin/tools/search_objects/static/js/index.js +++ b/web/pgadmin/tools/search_objects/static/js/index.js @@ -8,7 +8,6 @@ ////////////////////////////////////////////////////////////// import pgAdmin from 'sources/pgadmin'; import pgBrowser from 'top/browser/static/js/browser'; -import React from 'react'; import gettext from 'sources/gettext'; import SearchObjects from './SearchObjects'; import {getPanelTitle} from '../../../sqleditor/static/js/sqleditor_title'; diff --git a/web/pgadmin/tools/sqleditor/static/js/SQLEditorModule.js b/web/pgadmin/tools/sqleditor/static/js/SQLEditorModule.js index 7fc9acd70..1c6aae21f 100644 --- a/web/pgadmin/tools/sqleditor/static/js/SQLEditorModule.js +++ b/web/pgadmin/tools/sqleditor/static/js/SQLEditorModule.js @@ -18,7 +18,6 @@ import pgBrowser from 'pgadmin.browser'; import 'pgadmin.tools.user_management'; import 'pgadmin.tools.file_manager'; import gettext from 'sources/gettext'; -import React from 'react'; import ReactDOM from 'react-dom/client'; import QueryToolComponent from './components/QueryToolComponent'; import ModalProvider from '../../../../static/js/helpers/ModalProvider'; diff --git a/web/pgadmin/tools/sqleditor/static/js/components/QueryToolComponent.jsx b/web/pgadmin/tools/sqleditor/static/js/components/QueryToolComponent.jsx index 4ba305ade..cd1c39857 100644 --- a/web/pgadmin/tools/sqleditor/static/js/components/QueryToolComponent.jsx +++ b/web/pgadmin/tools/sqleditor/static/js/components/QueryToolComponent.jsx @@ -231,8 +231,7 @@ export default function QueryToolComponent({params, pgWindow, pgAdmin, selectedN maximizable: true, tabs: [ LayoutDocker.getPanel({id: PANELS.QUERY, title: gettext('Query'), content: setSelectedText(text)} setQtStatePartial={setQtStatePartial}/>}), - LayoutDocker.getPanel({id: PANELS.HISTORY, title: gettext('Query History'), content: , - cached: undefined}), + LayoutDocker.getPanel({id: PANELS.HISTORY, title: gettext('Query History'), content: }), ], }, { @@ -546,7 +545,7 @@ export default function QueryToolComponent({params, pgWindow, pgAdmin, selectedN }); } else if(error.response?.status == 403 && error.response?.data.info == 'ACCESS_DENIED') { pgAdmin.Browser.notifier.error(error.response.data.errormsg); - + }else if(error?.response?.status == 428) { connectServerModal(modal, error.response?.data?.result, async (passwordData)=>{ @@ -914,7 +913,7 @@ export default function QueryToolComponent({params, pgWindow, pgAdmin, selectedN updateServerCursor: (state) => { setQtStatePartial(state); }, - }), [qtState.params, qtState.preferences, containerRef.current, qtState.editor_disabled, qtState.eol, qtState.current_file, qtState.server_cursor]); + }), [qtState.params, qtState.preferences, containerRef.current, qtState.editor_disabled, qtState.eol, qtState.current_file, qtState.server_cursor, docker.current]); const queryToolConnContextValue = React.useMemo(()=>({ diff --git a/web/pgadmin/tools/sqleditor/static/js/components/QueryToolDataGrid/Formatters.jsx b/web/pgadmin/tools/sqleditor/static/js/components/QueryToolDataGrid/Formatters.jsx index 19894b929..8084c220a 100644 --- a/web/pgadmin/tools/sqleditor/static/js/components/QueryToolDataGrid/Formatters.jsx +++ b/web/pgadmin/tools/sqleditor/static/js/components/QueryToolDataGrid/Formatters.jsx @@ -6,7 +6,6 @@ // This software is released under the PostgreSQL Licence // ////////////////////////////////////////////////////////////// -import React from 'react'; import { styled } from '@mui/material/styles'; import _ from 'lodash'; import PropTypes from 'prop-types'; diff --git a/web/pgadmin/tools/sqleditor/static/js/components/connectServer.js b/web/pgadmin/tools/sqleditor/static/js/components/connectServer.js index 6351958a3..699b0cb4d 100644 --- a/web/pgadmin/tools/sqleditor/static/js/components/connectServer.js +++ b/web/pgadmin/tools/sqleditor/static/js/components/connectServer.js @@ -6,7 +6,6 @@ // This software is released under the PostgreSQL Licence // ////////////////////////////////////////////////////////////// -import React from 'react'; import gettext from 'sources/gettext'; import url_for from 'sources/url_for'; import ConnectServerContent from '../../../../../static/js/Dialogs/ConnectServerContent'; diff --git a/web/pgadmin/tools/sqleditor/static/js/components/dialogs/CloseRunningDialog.jsx b/web/pgadmin/tools/sqleditor/static/js/components/dialogs/CloseRunningDialog.jsx index 343204ce8..b21d9d044 100644 --- a/web/pgadmin/tools/sqleditor/static/js/components/dialogs/CloseRunningDialog.jsx +++ b/web/pgadmin/tools/sqleditor/static/js/components/dialogs/CloseRunningDialog.jsx @@ -1,4 +1,3 @@ -import React from 'react'; import { ModalContent, ModalFooter } from '../../../../../../static/js/components/ModalContent'; import gettext from 'sources/gettext'; import { Box } from '@mui/material'; diff --git a/web/pgadmin/tools/sqleditor/static/js/components/dialogs/ConfirmExecuteQueryContent.jsx b/web/pgadmin/tools/sqleditor/static/js/components/dialogs/ConfirmExecuteQueryContent.jsx index 4bd947923..e210282e2 100644 --- a/web/pgadmin/tools/sqleditor/static/js/components/dialogs/ConfirmExecuteQueryContent.jsx +++ b/web/pgadmin/tools/sqleditor/static/js/components/dialogs/ConfirmExecuteQueryContent.jsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import { useState } from 'react'; import { styled } from '@mui/material/styles'; import gettext from 'sources/gettext'; import { Box } from '@mui/material'; diff --git a/web/pgadmin/tools/sqleditor/static/js/components/dialogs/ConfirmPromotionContent.jsx b/web/pgadmin/tools/sqleditor/static/js/components/dialogs/ConfirmPromotionContent.jsx index 9473d03c4..ef5951b43 100644 --- a/web/pgadmin/tools/sqleditor/static/js/components/dialogs/ConfirmPromotionContent.jsx +++ b/web/pgadmin/tools/sqleditor/static/js/components/dialogs/ConfirmPromotionContent.jsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import { useState } from 'react'; import { ModalContent } from '../../../../../../static/js/components/ModalContent'; import gettext from 'sources/gettext'; import { Box } from '@mui/material'; diff --git a/web/pgadmin/tools/sqleditor/static/js/components/dialogs/ConfirmTransactionContent.jsx b/web/pgadmin/tools/sqleditor/static/js/components/dialogs/ConfirmTransactionContent.jsx index 021549705..59e0f8287 100644 --- a/web/pgadmin/tools/sqleditor/static/js/components/dialogs/ConfirmTransactionContent.jsx +++ b/web/pgadmin/tools/sqleditor/static/js/components/dialogs/ConfirmTransactionContent.jsx @@ -1,4 +1,3 @@ -import React from 'react'; import { ModalContent, ModalFooter } from '../../../../../../static/js/components/ModalContent'; import gettext from 'sources/gettext'; import { Box } from '@mui/material'; diff --git a/web/pgadmin/tools/sqleditor/static/js/components/sections/QueryHistory.jsx b/web/pgadmin/tools/sqleditor/static/js/components/sections/QueryHistory.jsx index 09ccc5699..1f48181dc 100644 --- a/web/pgadmin/tools/sqleditor/static/js/components/sections/QueryHistory.jsx +++ b/web/pgadmin/tools/sqleditor/static/js/components/sections/QueryHistory.jsx @@ -378,19 +378,34 @@ export function QueryHistory() { const queryToolConnCtx = React.useContext(QueryToolConnectionContext); const eventBus = React.useContext(QueryToolEventsContext); - const [selectedItemKey, setSelectedItemKey] = React.useState(1); + const [activeOnce, setActiveOnce] = React.useState(false); + const [selectedItemKey, setSelectedItemKey] = React.useState(null); const [showInternal, setShowInternal] = React.useState(true); const forceUpdate = useForceUpdate(); const [loaderText, setLoaderText] = React.useState(''); const selectedEntry = qhu.current.getEntry(selectedItemKey); const layoutDocker = useContext(LayoutDockerContext); const listRef = React.useRef(); + const isVisible = queryToolCtx.docker?.isTabVisible(PANELS.HISTORY); React.useEffect(()=>{ - layoutDocker.eventBus.registerListener(LAYOUT_EVENTS.ACTIVE, (currentTabId)=>{ - currentTabId == PANELS.HISTORY && listRef.current?.focus(); + const unregister = layoutDocker.eventBus.registerListener(LAYOUT_EVENTS.ACTIVE, (currentTabId)=>{ + if(currentTabId == PANELS.HISTORY) { + listRef.current?.focus(); + + if(!activeOnce) { + setActiveOnce(true); + setSelectedItemKey((prev)=>prev || 1); + } + } }); - }, []); + + if(isVisible && !activeOnce) { + setActiveOnce(true); + } + + return () => unregister(); + }, [isVisible]); const fetchQueryHistory = async() =>{ if(!queryToolConnCtx.connected) { @@ -436,11 +451,11 @@ export function QueryHistory() { return ()=>eventBus.deregisterListener(QUERY_TOOL_EVENTS.PUSH_HISTORY, pushHistory); }; - React.useEffect(() =>{ - fetchQueryHistory(); - },[queryToolConnCtx.connected]); + React.useEffect(() => { + activeOnce && fetchQueryHistory(); + }, [queryToolConnCtx.connected, activeOnce]); - const onRemove = async ()=>{ + const onRemove = async () => { setLoaderText(gettext('Removing history entry...')); try { await queryToolCtx.api.delete(url_for('sqleditor.clear_query_history', { @@ -494,52 +509,52 @@ export function QueryHistory() { } }; + if(!activeOnce) { + return <>; + } + return ( - {React.useMemo(()=>( + {qhu.current.size() == 0 ? + : <> - {qhu.current.size() == 0 ? - : - <> - - - - {gettext('Show queries generated internally by pgAdmin?')} - { - setShowInternal(e.target.checked); - qhu.current.showInternal = e.target.checked; - setSelectedItemKey(qhu.current.getNextItemKey()); - }} /> - - - {gettext('Remove')} - {gettext('Remove All')} - - - - } tabIndex="0" onKeyDown={onKeyPressed}> - {qhu.current.getGroups().map(([groupKey, groupHeader]) => ( - - - {groupHeader} - {qhu.current.getGroupEntries(groupKey).map((entry) => ( - {setSelectedItemKey(entry.itemKey);}}/> - ))} - - - ))} - - + + + + {gettext('Show queries generated internally by pgAdmin?')} + { + setShowInternal(e.target.checked); + qhu.current.showInternal = e.target.checked; + setSelectedItemKey(qhu.current.getNextItemKey()); + }} /> - - + + {gettext('Remove')} + {gettext('Remove All')} - } - - ), [selectedItemKey, showInternal, qhu.current.size()])} + + + } tabIndex="0" onKeyDown={onKeyPressed}> + {qhu.current.getGroups().map(([groupKey, groupHeader]) => ( + + + {groupHeader} + {qhu.current.getGroupEntries(groupKey).map((entry) => ( + {setSelectedItemKey(entry.itemKey);}}/> + ))} + + + ))} + + + + + + + } ); } diff --git a/web/pgadmin/tools/user_management/static/js/RoleDialog.jsx b/web/pgadmin/tools/user_management/static/js/RoleDialog.jsx index cef92c168..7f31f4fc5 100644 --- a/web/pgadmin/tools/user_management/static/js/RoleDialog.jsx +++ b/web/pgadmin/tools/user_management/static/js/RoleDialog.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, { useMemo } from 'react'; +import { useMemo } from 'react'; import SchemaView from '../../../../static/js/SchemaView'; import BaseUISchema from '../../../../static/js/SchemaView/base_schema.ui'; import gettext from 'sources/gettext'; diff --git a/web/pgadmin/tools/user_management/static/js/UserDialog.jsx b/web/pgadmin/tools/user_management/static/js/UserDialog.jsx index a1e930541..7e51cf912 100644 --- a/web/pgadmin/tools/user_management/static/js/UserDialog.jsx +++ b/web/pgadmin/tools/user_management/static/js/UserDialog.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, { useMemo } from 'react'; +import { useMemo } from 'react'; import SchemaView from '../../../../static/js/SchemaView'; import BaseUISchema from '../../../../static/js/SchemaView/base_schema.ui'; import gettext from 'sources/gettext'; diff --git a/web/pgadmin/tools/user_management/static/js/index.js b/web/pgadmin/tools/user_management/static/js/index.js index abf4299ce..059cb848d 100644 --- a/web/pgadmin/tools/user_management/static/js/index.js +++ b/web/pgadmin/tools/user_management/static/js/index.js @@ -7,7 +7,6 @@ // ////////////////////////////////////////////////////////////// -import React from 'react'; import pgAdmin from 'sources/pgadmin'; import gettext from 'sources/gettext'; import { showChangeUserPassword, showUrlDialog } from '../../../../static/js/Dialogs/index'; diff --git a/web/regression/javascript/SchemaView/SchemaDialogView.spec.js b/web/regression/javascript/SchemaView/SchemaDialogView.spec.js index de68f3ae7..80cde1e81 100644 --- a/web/regression/javascript/SchemaView/SchemaDialogView.spec.js +++ b/web/regression/javascript/SchemaView/SchemaDialogView.spec.js @@ -8,7 +8,6 @@ ////////////////////////////////////////////////////////////// -import React from 'react'; import { act, render } from '@testing-library/react'; import {TestSchema} from './TestSchema.ui'; diff --git a/web/regression/javascript/SchemaView/SchemaDialogViewEdit.spec.js b/web/regression/javascript/SchemaView/SchemaDialogViewEdit.spec.js index 57aa56f6d..d6e858084 100644 --- a/web/regression/javascript/SchemaView/SchemaDialogViewEdit.spec.js +++ b/web/regression/javascript/SchemaView/SchemaDialogViewEdit.spec.js @@ -8,7 +8,7 @@ ////////////////////////////////////////////////////////////// -import React, { act } from 'react'; +import { act } from 'react'; import { render } from '@testing-library/react'; import {TestSchema} from './TestSchema.ui'; diff --git a/web/regression/javascript/SchemaView/SchemaPropertiesView.spec.js b/web/regression/javascript/SchemaView/SchemaPropertiesView.spec.js index ec8bbcb90..54fd38cd8 100644 --- a/web/regression/javascript/SchemaView/SchemaPropertiesView.spec.js +++ b/web/regression/javascript/SchemaView/SchemaPropertiesView.spec.js @@ -8,7 +8,6 @@ ////////////////////////////////////////////////////////////// -import React from 'react'; import { act, render } from '@testing-library/react'; import {TestSchema} from './TestSchema.ui'; diff --git a/web/regression/javascript/SchemaView/SchemaViewAllTypes.spec.js b/web/regression/javascript/SchemaView/SchemaViewAllTypes.spec.js index d080299d3..69a17e0ee 100644 --- a/web/regression/javascript/SchemaView/SchemaViewAllTypes.spec.js +++ b/web/regression/javascript/SchemaView/SchemaViewAllTypes.spec.js @@ -8,7 +8,6 @@ ////////////////////////////////////////////////////////////// -import React from 'react'; import { act, render } from '@testing-library/react'; import { TestSchemaAllTypes} from './TestSchema.ui'; diff --git a/web/regression/javascript/SecurityPages/ForgotPasswordPage.spec.js b/web/regression/javascript/SecurityPages/ForgotPasswordPage.spec.js index 4f691718c..1d9838e86 100644 --- a/web/regression/javascript/SecurityPages/ForgotPasswordPage.spec.js +++ b/web/regression/javascript/SecurityPages/ForgotPasswordPage.spec.js @@ -8,7 +8,6 @@ ////////////////////////////////////////////////////////////// -import React from 'react'; import { render } from '@testing-library/react'; import Theme from '../../../pgadmin/static/js/Theme'; diff --git a/web/regression/javascript/SecurityPages/LoginPage.spec.js b/web/regression/javascript/SecurityPages/LoginPage.spec.js index ff744679f..633a98b88 100644 --- a/web/regression/javascript/SecurityPages/LoginPage.spec.js +++ b/web/regression/javascript/SecurityPages/LoginPage.spec.js @@ -8,7 +8,6 @@ ////////////////////////////////////////////////////////////// -import React from 'react'; import { render } from '@testing-library/react'; import Theme from '../../../pgadmin/static/js/Theme'; diff --git a/web/regression/javascript/SecurityPages/MfaRegisterPage.spec.js b/web/regression/javascript/SecurityPages/MfaRegisterPage.spec.js index 549bdcdb8..1548b2aa3 100644 --- a/web/regression/javascript/SecurityPages/MfaRegisterPage.spec.js +++ b/web/regression/javascript/SecurityPages/MfaRegisterPage.spec.js @@ -8,7 +8,6 @@ ////////////////////////////////////////////////////////////// -import React from 'react'; import { render } from '@testing-library/react'; import Theme from '../../../pgadmin/static/js/Theme'; diff --git a/web/regression/javascript/SecurityPages/MfaValidatePage.spec.js b/web/regression/javascript/SecurityPages/MfaValidatePage.spec.js index d4864869f..05b96ff20 100644 --- a/web/regression/javascript/SecurityPages/MfaValidatePage.spec.js +++ b/web/regression/javascript/SecurityPages/MfaValidatePage.spec.js @@ -8,7 +8,6 @@ ////////////////////////////////////////////////////////////// -import React from 'react'; import { act, render } from '@testing-library/react'; import Theme from '../../../pgadmin/static/js/Theme'; diff --git a/web/regression/javascript/SecurityPages/PasswordResetPage.spec.js b/web/regression/javascript/SecurityPages/PasswordResetPage.spec.js index dd39632e7..5b4341d2d 100644 --- a/web/regression/javascript/SecurityPages/PasswordResetPage.spec.js +++ b/web/regression/javascript/SecurityPages/PasswordResetPage.spec.js @@ -8,7 +8,6 @@ ////////////////////////////////////////////////////////////// -import React from 'react'; import { render } from '@testing-library/react'; import Theme from '../../../pgadmin/static/js/Theme'; diff --git a/web/regression/javascript/__mocks__/@mui/material.jsx b/web/regression/javascript/__mocks__/@mui/material.jsx index 109132668..c98fbec90 100644 --- a/web/regression/javascript/__mocks__/@mui/material.jsx +++ b/web/regression/javascript/__mocks__/@mui/material.jsx @@ -1,13 +1,18 @@ -import React, { useRef } from 'react'; +import { useRef } from 'react'; import CustomPropTypes from '../../../../pgadmin/static/js/custom_prop_types'; export * from '@mui/material'; // mock popper -export const Popper = React.forwardRef((props, _ref)=>{ +export const Popper = ( + { + ref: _ref, + ...props + } +) => { const ele = useRef(); return
{props.children}
; -}); +}; Popper.displayName = 'Popper'; Popper.propTypes = { diff --git a/web/regression/javascript/__mocks__/react-data-grid.jsx b/web/regression/javascript/__mocks__/react-data-grid.jsx index 16ee3538a..0900e91c5 100644 --- a/web/regression/javascript/__mocks__/react-data-grid.jsx +++ b/web/regression/javascript/__mocks__/react-data-grid.jsx @@ -1,12 +1,17 @@ -import React, { useRef } from 'react'; +import { useRef } from 'react'; import PropTypes from 'prop-types'; export * from 'react-data-grid'; -const ReactDataGrid = React.forwardRef((props, _ref)=>{ +const ReactDataGrid = ( + { + ref: _ref, + ...props + } +) => { const ele = useRef(); return
; -}); +}; ReactDataGrid.displayName = 'ReactDataGrid'; ReactDataGrid.propTypes = { diff --git a/web/regression/javascript/__mocks__/svg.js b/web/regression/javascript/__mocks__/svg.js index 85eb4de3f..eaf73a96d 100644 --- a/web/regression/javascript/__mocks__/svg.js +++ b/web/regression/javascript/__mocks__/svg.js @@ -1,8 +1,10 @@ -import React from 'react'; -const SvgrMock = React.forwardRef((props, ref) => ( - -)); +const SvgrMock = ( + { + ref, + ...props + } +) => (); SvgrMock.displayName = 'SvgrMock'; diff --git a/web/regression/javascript/__mocks__/uplot-react.jsx b/web/regression/javascript/__mocks__/uplot-react.jsx index 70f9eb4dd..b45d33eb9 100644 --- a/web/regression/javascript/__mocks__/uplot-react.jsx +++ b/web/regression/javascript/__mocks__/uplot-react.jsx @@ -1,4 +1,3 @@ -import React from 'react'; export default function UplotReact() { return <>; } diff --git a/web/regression/javascript/components/Buttons.spec.js b/web/regression/javascript/components/Buttons.spec.js index 84870a109..56f0ab619 100644 --- a/web/regression/javascript/components/Buttons.spec.js +++ b/web/regression/javascript/components/Buttons.spec.js @@ -7,7 +7,6 @@ // ////////////////////////////////////////////////////////////// -import React from 'react'; import { withTheme } from '../fake_theme'; import InfoIcon from '@mui/icons-material/InfoRounded'; diff --git a/web/regression/javascript/components/CodeMirror.spec.js b/web/regression/javascript/components/CodeMirror.spec.js index 8d1b66790..487a4f7cc 100644 --- a/web/regression/javascript/components/CodeMirror.spec.js +++ b/web/regression/javascript/components/CodeMirror.spec.js @@ -7,7 +7,6 @@ // ////////////////////////////////////////////////////////////// -import React from 'react'; import { withTheme } from '../fake_theme'; diff --git a/web/regression/javascript/components/CodeMirrorCustomEditor.spec.js b/web/regression/javascript/components/CodeMirrorCustomEditor.spec.js index 4db9b76ef..f7192b235 100755 --- a/web/regression/javascript/components/CodeMirrorCustomEditor.spec.js +++ b/web/regression/javascript/components/CodeMirrorCustomEditor.spec.js @@ -7,7 +7,6 @@ // ////////////////////////////////////////////////////////////// -import React from 'react'; import { withTheme } from '../fake_theme'; import CodeMirror from 'sources/components/ReactCodeMirror'; diff --git a/web/regression/javascript/components/KeyboardShortcuts.spec.js b/web/regression/javascript/components/KeyboardShortcuts.spec.js index 8c03ae04c..b01e0ddca 100644 --- a/web/regression/javascript/components/KeyboardShortcuts.spec.js +++ b/web/regression/javascript/components/KeyboardShortcuts.spec.js @@ -7,7 +7,6 @@ // ////////////////////////////////////////////////////////////// -import React from 'react'; import { withTheme } from '../fake_theme'; import { fireEvent, render } from '@testing-library/react'; diff --git a/web/regression/javascript/components/Loader.spec.js b/web/regression/javascript/components/Loader.spec.js index 1358b0a86..b7133b44f 100644 --- a/web/regression/javascript/components/Loader.spec.js +++ b/web/regression/javascript/components/Loader.spec.js @@ -7,7 +7,6 @@ // ////////////////////////////////////////////////////////////// -import React from 'react'; import { render, screen } from '@testing-library/react'; import { withTheme } from '../fake_theme'; diff --git a/web/regression/javascript/components/Menu.spec.js b/web/regression/javascript/components/Menu.spec.js index 9aa473013..ffc5d98da 100644 --- a/web/regression/javascript/components/Menu.spec.js +++ b/web/regression/javascript/components/Menu.spec.js @@ -7,7 +7,6 @@ // ////////////////////////////////////////////////////////////// -import React from 'react'; import { withTheme } from '../fake_theme'; import { fireEvent, render, screen } from '@testing-library/react'; diff --git a/web/regression/javascript/components/ObjectBreadcrumbs.spec.js b/web/regression/javascript/components/ObjectBreadcrumbs.spec.js index 83380430c..551f03f1c 100644 --- a/web/regression/javascript/components/ObjectBreadcrumbs.spec.js +++ b/web/regression/javascript/components/ObjectBreadcrumbs.spec.js @@ -8,7 +8,6 @@ ////////////////////////////////////////////////////////////// -import React from 'react'; import { render, waitFor } from '@testing-library/react'; import ObjectBreadcrumbs from '../../../pgadmin/static/js/components/ObjectBreadcrumbs'; diff --git a/web/regression/javascript/components/Privilege.spec.js b/web/regression/javascript/components/Privilege.spec.js index df12bbbef..edce407f7 100644 --- a/web/regression/javascript/components/Privilege.spec.js +++ b/web/regression/javascript/components/Privilege.spec.js @@ -8,7 +8,6 @@ ////////////////////////////////////////////////////////////// -import React from 'react'; import Privilege from 'sources/components/Privilege'; import { fireEvent, render, screen, waitFor } from '@testing-library/react'; diff --git a/web/regression/javascript/components/QueryThreshold.spec.js b/web/regression/javascript/components/QueryThreshold.spec.js index 1040ab88c..e137768cb 100644 --- a/web/regression/javascript/components/QueryThreshold.spec.js +++ b/web/regression/javascript/components/QueryThreshold.spec.js @@ -8,7 +8,6 @@ ////////////////////////////////////////////////////////////// -import React from 'react'; import { withTheme } from '../fake_theme'; import { render, screen, waitFor } from '@testing-library/react'; diff --git a/web/regression/javascript/components/SelectRefresh.spec.js b/web/regression/javascript/components/SelectRefresh.spec.js index b9c571594..154e1b93b 100644 --- a/web/regression/javascript/components/SelectRefresh.spec.js +++ b/web/regression/javascript/components/SelectRefresh.spec.js @@ -8,7 +8,6 @@ ////////////////////////////////////////////////////////////// -import React from 'react'; import { withTheme } from '../fake_theme'; import { act, render, waitFor } from '@testing-library/react'; diff --git a/web/regression/javascript/components/SelectThemes.spec.js b/web/regression/javascript/components/SelectThemes.spec.js index b63f8b06d..b8c6da31f 100644 --- a/web/regression/javascript/components/SelectThemes.spec.js +++ b/web/regression/javascript/components/SelectThemes.spec.js @@ -8,7 +8,6 @@ ////////////////////////////////////////////////////////////// -import React from 'react'; import { withTheme } from '../fake_theme'; import { act, render, screen, waitFor } from '@testing-library/react'; diff --git a/web/regression/javascript/components/ShortcutTitle.spec.js b/web/regression/javascript/components/ShortcutTitle.spec.js index e897ee06f..aa2a1c936 100644 --- a/web/regression/javascript/components/ShortcutTitle.spec.js +++ b/web/regression/javascript/components/ShortcutTitle.spec.js @@ -8,7 +8,6 @@ ////////////////////////////////////////////////////////////// -import React from 'react'; import { withTheme } from '../fake_theme'; import { render } from '@testing-library/react'; diff --git a/web/regression/javascript/components/TabPanel.spec.js b/web/regression/javascript/components/TabPanel.spec.js index 4abc49d5e..b1c58053d 100644 --- a/web/regression/javascript/components/TabPanel.spec.js +++ b/web/regression/javascript/components/TabPanel.spec.js @@ -8,7 +8,6 @@ ////////////////////////////////////////////////////////////// -import React from 'react'; import { render } from '@testing-library/react'; import { withTheme } from '../fake_theme'; diff --git a/web/regression/javascript/dashboard/graphs_spec.js b/web/regression/javascript/dashboard/graphs_spec.js index a6b5d2412..d02cd3488 100644 --- a/web/regression/javascript/dashboard/graphs_spec.js +++ b/web/regression/javascript/dashboard/graphs_spec.js @@ -1,5 +1,4 @@ -import React from 'react'; import { DATA_POINT_SIZE } from 'sources/chartjs'; diff --git a/web/regression/javascript/dashboard/graphs_wrapper_spec.js b/web/regression/javascript/dashboard/graphs_wrapper_spec.js index 36f4d2a46..5e9c516a3 100644 --- a/web/regression/javascript/dashboard/graphs_wrapper_spec.js +++ b/web/regression/javascript/dashboard/graphs_wrapper_spec.js @@ -1,4 +1,3 @@ -import React from 'react'; import {GraphsWrapper, X_AXIS_LENGTH, POINT_SIZE} from '../../../pgadmin/dashboard/static/js/Graphs'; import { withTheme } from '../fake_theme'; diff --git a/web/regression/javascript/debugger/MockDebuggerComponent.jsx b/web/regression/javascript/debugger/MockDebuggerComponent.jsx index bb876a83c..d966a4172 100644 --- a/web/regression/javascript/debugger/MockDebuggerComponent.jsx +++ b/web/regression/javascript/debugger/MockDebuggerComponent.jsx @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////// -import React, { useRef, useMemo } from 'react'; +import { useRef, useMemo } from 'react'; import PropTypes from 'prop-types'; import {DebuggerContext, DebuggerEventsContext} from '../../../pgadmin/tools/debugger/static/js/components/DebuggerComponent'; diff --git a/web/regression/javascript/debugger/debugger_spec.js b/web/regression/javascript/debugger/debugger_spec.js index ccfedd139..6d1e336df 100644 --- a/web/regression/javascript/debugger/debugger_spec.js +++ b/web/regression/javascript/debugger/debugger_spec.js @@ -8,7 +8,6 @@ ////////////////////////////////////////////////////////////// -import React from 'react'; import { act, render } from '@testing-library/react'; import MockAdapter from 'axios-mock-adapter'; diff --git a/web/regression/javascript/debugger/debugger_stack_spec.js b/web/regression/javascript/debugger/debugger_stack_spec.js index bd2e59791..77570d514 100644 --- a/web/regression/javascript/debugger/debugger_stack_spec.js +++ b/web/regression/javascript/debugger/debugger_stack_spec.js @@ -9,7 +9,6 @@ -import React from 'react'; import { render } from '@testing-library/react'; import MockAdapter from 'axios-mock-adapter'; diff --git a/web/regression/javascript/debugger/debugger_tool_bar_spec.js b/web/regression/javascript/debugger/debugger_tool_bar_spec.js index 263f5e85b..155868d95 100644 --- a/web/regression/javascript/debugger/debugger_tool_bar_spec.js +++ b/web/regression/javascript/debugger/debugger_tool_bar_spec.js @@ -7,7 +7,6 @@ // ////////////////////////////////////////////////////////////// -import React from 'react'; import { render } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; diff --git a/web/regression/javascript/erd/onetomany_link_spec.js b/web/regression/javascript/erd/onetomany_link_spec.js index fa44de59c..2f73fe15b 100644 --- a/web/regression/javascript/erd/onetomany_link_spec.js +++ b/web/regression/javascript/erd/onetomany_link_spec.js @@ -6,7 +6,6 @@ // This software is released under the PostgreSQL Licence // ////////////////////////////////////////////////////////////// -import React from 'react'; import { diff --git a/web/regression/javascript/erd/table_node.spec.js b/web/regression/javascript/erd/table_node.spec.js index 736e673cb..967dbbeda 100644 --- a/web/regression/javascript/erd/table_node.spec.js +++ b/web/regression/javascript/erd/table_node.spec.js @@ -1,5 +1,4 @@ -import React from 'react'; import { DefaultNodeModel } from '@projectstorm/react-diagrams'; diff --git a/web/regression/javascript/erd/ui_components/ConnectionBar.spec.js b/web/regression/javascript/erd/ui_components/ConnectionBar.spec.js index 59bcba71f..ca7def580 100644 --- a/web/regression/javascript/erd/ui_components/ConnectionBar.spec.js +++ b/web/regression/javascript/erd/ui_components/ConnectionBar.spec.js @@ -7,7 +7,6 @@ // ////////////////////////////////////////////////////////////// -import React from 'react'; import ConnectionBar, {STATUS} from 'pgadmin.tools.erd/erd_tool/components/ConnectionBar'; import Theme from '../../../../pgadmin/static/js/Theme'; diff --git a/web/regression/javascript/erd/ui_components/FloatingNote.spec.js b/web/regression/javascript/erd/ui_components/FloatingNote.spec.js index d8e10c04f..b2f4865f7 100644 --- a/web/regression/javascript/erd/ui_components/FloatingNote.spec.js +++ b/web/regression/javascript/erd/ui_components/FloatingNote.spec.js @@ -7,7 +7,6 @@ // ////////////////////////////////////////////////////////////// -import React from 'react'; import FloatingNote from 'pgadmin.tools.erd/erd_tool/components/FloatingNote'; import Theme from '../../../../pgadmin/static/js/Theme'; diff --git a/web/regression/javascript/fake_theme.js b/web/regression/javascript/fake_theme.js index f634c1fe5..079133754 100644 --- a/web/regression/javascript/fake_theme.js +++ b/web/regression/javascript/fake_theme.js @@ -1,4 +1,3 @@ -import React from 'react'; import Theme from 'sources/Theme'; export function withTheme(WrappedComp) { diff --git a/web/regression/javascript/file_manager/FileManager.spec.js b/web/regression/javascript/file_manager/FileManager.spec.js index ad43af7a4..a909d0e2e 100644 --- a/web/regression/javascript/file_manager/FileManager.spec.js +++ b/web/regression/javascript/file_manager/FileManager.spec.js @@ -8,7 +8,7 @@ ////////////////////////////////////////////////////////////// -import React, { act} from 'react'; +import { act} from 'react'; import { render } from '@testing-library/react'; import Theme from '../../../pgadmin/static/js/Theme'; diff --git a/web/regression/javascript/file_manager/GridView.spec.js b/web/regression/javascript/file_manager/GridView.spec.js index 746ebe161..4f0aad739 100644 --- a/web/regression/javascript/file_manager/GridView.spec.js +++ b/web/regression/javascript/file_manager/GridView.spec.js @@ -8,7 +8,6 @@ ////////////////////////////////////////////////////////////// -import React from 'react'; import { render } from '@testing-library/react'; import Theme from '../../../pgadmin/static/js/Theme'; diff --git a/web/regression/javascript/file_manager/ListView.spec.js b/web/regression/javascript/file_manager/ListView.spec.js index 3f0554222..6d8185ccf 100644 --- a/web/regression/javascript/file_manager/ListView.spec.js +++ b/web/regression/javascript/file_manager/ListView.spec.js @@ -8,7 +8,6 @@ ////////////////////////////////////////////////////////////// -import React from 'react'; import { render, screen, waitFor } from '@testing-library/react'; import Theme from '../../../pgadmin/static/js/Theme'; diff --git a/web/regression/javascript/file_manager/Uploader.spec.js b/web/regression/javascript/file_manager/Uploader.spec.js index 27f07dd3c..bc503f3d7 100644 --- a/web/regression/javascript/file_manager/Uploader.spec.js +++ b/web/regression/javascript/file_manager/Uploader.spec.js @@ -8,7 +8,6 @@ ////////////////////////////////////////////////////////////// -import React from 'react'; import { render, screen, waitFor } from '@testing-library/react'; import Theme from '../../../pgadmin/static/js/Theme'; diff --git a/web/regression/javascript/genericFunctions.jsx b/web/regression/javascript/genericFunctions.jsx index 2facf1993..5c6b435cd 100644 --- a/web/regression/javascript/genericFunctions.jsx +++ b/web/regression/javascript/genericFunctions.jsx @@ -7,7 +7,6 @@ // ////////////////////////////////////////////////////////////// -import React from 'react'; import pgAdmin from 'sources/pgadmin'; import SchemaView from '../../pgadmin/static/js/SchemaView'; import pgWindow from 'sources/window'; diff --git a/web/regression/javascript/grant_wizard/wizard_spec.js b/web/regression/javascript/grant_wizard/wizard_spec.js index 07b0e0b5c..2adfca03f 100644 --- a/web/regression/javascript/grant_wizard/wizard_spec.js +++ b/web/regression/javascript/grant_wizard/wizard_spec.js @@ -8,7 +8,6 @@ ////////////////////////////////////////////////////////////// -import React from 'react'; import { render } from '@testing-library/react'; import '@testing-library/jest-dom'; diff --git a/web/regression/javascript/processes/Proceses.spec.js b/web/regression/javascript/processes/Proceses.spec.js index 3ff8e11de..89f0b8bdb 100644 --- a/web/regression/javascript/processes/Proceses.spec.js +++ b/web/regression/javascript/processes/Proceses.spec.js @@ -8,7 +8,6 @@ ////////////////////////////////////////////////////////////// -import React from 'react'; import { render } from '@testing-library/react'; import { BgProcessManagerProcessState } from '../../../pgadmin/misc/bgprocess/static/js/BgProcessConstants'; diff --git a/web/regression/javascript/processes/ProcessDetails.spec.js b/web/regression/javascript/processes/ProcessDetails.spec.js index cc4aae2ca..e1987eb8b 100644 --- a/web/regression/javascript/processes/ProcessDetails.spec.js +++ b/web/regression/javascript/processes/ProcessDetails.spec.js @@ -8,7 +8,6 @@ ////////////////////////////////////////////////////////////// -import React from 'react'; import { render, waitFor } from '@testing-library/react'; import Theme from '../../../pgadmin/static/js/Theme'; diff --git a/web/regression/javascript/quick_search/quick_search_spec.js b/web/regression/javascript/quick_search/quick_search_spec.js index 34b092e77..a538a1bcf 100644 --- a/web/regression/javascript/quick_search/quick_search_spec.js +++ b/web/regression/javascript/quick_search/quick_search_spec.js @@ -7,7 +7,6 @@ // ////////////////////////////////////////////////////////////////////////// -import React from 'react'; import QuickSearch from '../../../pgadmin/static/js/QuickSearch'; import { render } from '@testing-library/react'; import Theme from '../../../pgadmin/static/js/Theme'; diff --git a/web/regression/javascript/schema_diff/schema_diff_spec.js b/web/regression/javascript/schema_diff/schema_diff_spec.js index 8495d7531..541dcba5c 100644 --- a/web/regression/javascript/schema_diff/schema_diff_spec.js +++ b/web/regression/javascript/schema_diff/schema_diff_spec.js @@ -9,7 +9,6 @@ -import React from 'react'; import { act, render } from '@testing-library/react'; import MockAdapter from 'axios-mock-adapter'; diff --git a/web/regression/javascript/schema_ui_files/backup.ui.spec.js b/web/regression/javascript/schema_ui_files/backup.ui.spec.js index e7a35b35a..6718493bf 100644 --- a/web/regression/javascript/schema_ui_files/backup.ui.spec.js +++ b/web/regression/javascript/schema_ui_files/backup.ui.spec.js @@ -7,7 +7,6 @@ // ////////////////////////////////////////////////////////////// -import React from 'react'; import pgAdmin from 'sources/pgadmin'; import SchemaView from '../../../pgadmin/static/js/SchemaView'; diff --git a/web/regression/javascript/search_objects/SearchObject.spec.js b/web/regression/javascript/search_objects/SearchObject.spec.js index 592793246..8f2ec8d1d 100644 --- a/web/regression/javascript/search_objects/SearchObject.spec.js +++ b/web/regression/javascript/search_objects/SearchObject.spec.js @@ -7,7 +7,6 @@ // ////////////////////////////////////////////////////////////// -import React from 'react'; import { act, render } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; diff --git a/web/regression/javascript/user_management/Permissions.spec.js b/web/regression/javascript/user_management/Permissions.spec.js index 3bf8885d8..23e851320 100644 --- a/web/regression/javascript/user_management/Permissions.spec.js +++ b/web/regression/javascript/user_management/Permissions.spec.js @@ -8,7 +8,6 @@ ////////////////////////////////////////////////////////////// -import React from 'react'; import { act, render, screen, fireEvent, waitFor } from '@testing-library/react'; import MockAdapter from 'axios-mock-adapter'; diff --git a/web/regression/javascript/user_management/Roles.spec.js b/web/regression/javascript/user_management/Roles.spec.js index e2881090a..1a77c8e3c 100644 --- a/web/regression/javascript/user_management/Roles.spec.js +++ b/web/regression/javascript/user_management/Roles.spec.js @@ -7,7 +7,6 @@ // ////////////////////////////////////////////////////////////// -import React from 'react'; import { act, render } from '@testing-library/react'; import MockAdapter from 'axios-mock-adapter'; diff --git a/web/regression/javascript/user_management/UserDialog.spec.js b/web/regression/javascript/user_management/UserDialog.spec.js index 95de83cf5..4019a5e18 100644 --- a/web/regression/javascript/user_management/UserDialog.spec.js +++ b/web/regression/javascript/user_management/UserDialog.spec.js @@ -8,7 +8,6 @@ ////////////////////////////////////////////////////////////// -import React from 'react'; import { act, render } from '@testing-library/react'; import { withBrowser } from '../genericFunctions'; diff --git a/web/regression/javascript/user_management/Users.spec.js b/web/regression/javascript/user_management/Users.spec.js index 1dd1b520c..dea6f6ff3 100644 --- a/web/regression/javascript/user_management/Users.spec.js +++ b/web/regression/javascript/user_management/Users.spec.js @@ -8,7 +8,6 @@ ////////////////////////////////////////////////////////////// -import React from 'react'; import { act, render } from '@testing-library/react'; import MockAdapter from 'axios-mock-adapter'; diff --git a/web/regression/javascript/withPgadmin.js b/web/regression/javascript/withPgadmin.js index 1141f8265..3bba18ac6 100644 --- a/web/regression/javascript/withPgadmin.js +++ b/web/regression/javascript/withPgadmin.js @@ -1,4 +1,3 @@ -import React from 'react'; import { PgAdminProvider } from '../../pgadmin/static/js/PgAdminProvider'; import fakePgAdmin from './fake_pgadmin'; diff --git a/web/webpack.config.js b/web/webpack.config.js index db2d5d72d..c0f22b38c 100644 --- a/web/webpack.config.js +++ b/web/webpack.config.js @@ -50,7 +50,7 @@ const providePlugin = new webpack.ProvidePlugin({ 'moment': 'moment', 'window.moment':'moment', process: 'process/browser', - Buffer: ['buffer', 'Buffer'] + Buffer: ['buffer', 'Buffer'], }); // Helps in debugging each single file, it extracts the module files @@ -130,23 +130,20 @@ module.exports = [{ }, 'webfonts-loader', ], - },{ - test: /\.jsx?$/, - exclude: [/node_modules/, /vendor/], - use: { - loader: 'babel-loader', - }, },{ test: /\.m?js$/, resolve: { fullySpecified: false }, },{ - test: /\.tsx?$|\.ts?$/, + test: /\.tsx?$|\.ts?$|\.jsx?$/, + exclude: [/node_modules/, /vendor/], use: { loader: 'babel-loader', options: { - presets: [['@babel/preset-env', {'modules': 'commonjs', 'useBuiltIns': 'usage', 'corejs': 3}], '@babel/preset-react', '@babel/preset-typescript'], + presets: [['@babel/preset-env', {'modules': 'commonjs', 'useBuiltIns': 'usage', 'corejs': 3}], ['@babel/preset-react', { + 'runtime': 'automatic' + }], '@babel/preset-typescript'], plugins: ['@babel/plugin-proposal-class-properties', '@babel/proposal-object-rest-spread'], }, }, diff --git a/web/yarn.lock b/web/yarn.lock index 747a8a2b3..8350b999c 100644 --- a/web/yarn.lock +++ b/web/yarn.lock @@ -1407,7 +1407,7 @@ __metadata: languageName: node linkType: hard -"@babel/preset-react@npm:^7.12.13, @babel/preset-react@npm:^7.18.6": +"@babel/preset-react@npm:^7.18.6, @babel/preset-react@npm:^7.27.1": version: 7.27.1 resolution: "@babel/preset-react@npm:7.27.1" dependencies: @@ -1438,7 +1438,7 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.10.1, @babel/runtime@npm:^7.11.1, @babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.12.0, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.20.7, @babel/runtime@npm:^7.28.2, @babel/runtime@npm:^7.28.4, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.8.7, @babel/runtime@npm:^7.9.2": +"@babel/runtime@npm:^7.0.0, @babel/runtime@npm:^7.10.1, @babel/runtime@npm:^7.11.1, @babel/runtime@npm:^7.12.0, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.20.7, @babel/runtime@npm:^7.28.2, @babel/runtime@npm:^7.28.4, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.8.7, @babel/runtime@npm:^7.9.2": version: 7.28.4 resolution: "@babel/runtime@npm:7.28.4" checksum: 10c0/792ce7af9750fb9b93879cc9d1db175701c4689da890e6ced242ea0207c9da411ccf16dc04e689cc01158b28d7898c40d75598f4559109f761c12ce01e959bf7 @@ -3174,6 +3174,121 @@ __metadata: languageName: node linkType: hard +"@rc-component/dropdown@npm:~1.0.0": + version: 1.0.0 + resolution: "@rc-component/dropdown@npm:1.0.0" + dependencies: + "@rc-component/trigger": "npm:^3.0.0" + "@rc-component/util": "npm:^1.2.1" + classnames: "npm:^2.2.6" + peerDependencies: + react: ">=16.11.0" + react-dom: ">=16.11.0" + checksum: 10c0/67d1569f836f90f822c4fa1bbc07d9f546bdd4224a8d86363921886288fb5decd1c9034811ffc892ccabcb76e4eaa1f112641197beb5805b3bda4e5fc2410d95 + languageName: node + linkType: hard + +"@rc-component/menu@npm:~1.1.0, @rc-component/menu@npm:~1.1.3": + version: 1.1.4 + resolution: "@rc-component/menu@npm:1.1.4" + dependencies: + "@rc-component/motion": "npm:^1.1.4" + "@rc-component/trigger": "npm:^3.0.0" + "@rc-component/util": "npm:^1.3.0" + classnames: "npm:2.x" + rc-overflow: "npm:^1.3.1" + peerDependencies: + react: ">=16.9.0" + react-dom: ">=16.9.0" + checksum: 10c0/97bdb4d75cb0ce807ae7bb30171b73fbc0fc9a8480bb1d075554d657165524b874a8916600950111dc2ec900e038b355adbf91136f640b84b9252debdc771504 + languageName: node + linkType: hard + +"@rc-component/motion@npm:^1.1.3, @rc-component/motion@npm:^1.1.4": + version: 1.1.4 + resolution: "@rc-component/motion@npm:1.1.4" + dependencies: + "@rc-component/util": "npm:^1.2.0" + classnames: "npm:^2.2.1" + peerDependencies: + react: ">=16.9.0" + react-dom: ">=16.9.0" + checksum: 10c0/fa74b3815c842884d626f8daccedd3bafca19997b5aab43779e67ffba1dfcdd14a397fe033d0dc47b248a55bc489165d14702e90aa8c3ac0526681ea1a890e90 + languageName: node + linkType: hard + +"@rc-component/portal@npm:^2.0.0": + version: 2.0.0 + resolution: "@rc-component/portal@npm:2.0.0" + dependencies: + "@rc-component/util": "npm:^1.2.1" + classnames: "npm:^2.3.2" + peerDependencies: + react: ">=18.0.0" + react-dom: ">=18.0.0" + checksum: 10c0/2b5939175a4da67165a9a146095ace29c090d708eedce739f5590f47ce0fb2f6fbdb11fc017177c4f32d8d95f725379faf50f6ce1865210b535244550b670799 + languageName: node + linkType: hard + +"@rc-component/resize-observer@npm:^1.0.0": + version: 1.0.0 + resolution: "@rc-component/resize-observer@npm:1.0.0" + dependencies: + "@rc-component/util": "npm:^1.2.0" + classnames: "npm:^2.2.1" + peerDependencies: + react: ">=16.9.0" + react-dom: ">=16.9.0" + checksum: 10c0/6ebb681057b518ab9f00e98ec0882ab420a1b82a1d7e4ef2c0bf6b7d7470e9876c3df0ab6342b64d081b918a7f461680d0acf6347bfa7d3272eff953b4377d8e + languageName: node + linkType: hard + +"@rc-component/tabs@npm:~1.5.0": + version: 1.5.2 + resolution: "@rc-component/tabs@npm:1.5.2" + dependencies: + "@rc-component/dropdown": "npm:~1.0.0" + "@rc-component/menu": "npm:~1.1.0" + "@rc-component/motion": "npm:^1.1.3" + "@rc-component/resize-observer": "npm:^1.0.0" + "@rc-component/util": "npm:^1.3.0" + classnames: "npm:2.x" + peerDependencies: + react: ">=16.9.0" + react-dom: ">=16.9.0" + checksum: 10c0/e02671513782ee9b2d4a8d21ee2311aee520da59098fa96c35e6c54f9358f7a96c771c6aa7a182f9946727a9001b0cc834e25f63d8b21bdbb66d3fdd9fb09fe6 + languageName: node + linkType: hard + +"@rc-component/trigger@npm:^3.0.0": + version: 3.6.15 + resolution: "@rc-component/trigger@npm:3.6.15" + dependencies: + "@rc-component/motion": "npm:^1.1.4" + "@rc-component/portal": "npm:^2.0.0" + "@rc-component/resize-observer": "npm:^1.0.0" + "@rc-component/util": "npm:^1.2.1" + classnames: "npm:^2.3.2" + peerDependencies: + react: ">=18.0.0" + react-dom: ">=18.0.0" + checksum: 10c0/15fa722d04d1e9403edd6db871f3a8dd729fd37a057055cc4e968df77d2460adc916bfdc55d0a69e095c8369ebe3649bf0ee3fea622f8ade5fef25fa5cb6fcb0 + languageName: node + linkType: hard + +"@rc-component/util@npm:^1.2.0, @rc-component/util@npm:^1.2.1, @rc-component/util@npm:^1.3.0": + version: 1.3.0 + resolution: "@rc-component/util@npm:1.3.0" + dependencies: + is-mobile: "npm:^5.0.0" + react-is: "npm:^18.2.0" + peerDependencies: + react: ">=18.0.0" + react-dom: ">=18.0.0" + checksum: 10c0/d375206728783caddb2db84ad6f6113740c3cf04c8ea304c4a4bbb2239374c122da29df33d0a1cdb370b7dc814a685c14ce6573aa1bdf6bc375029bafcc76b22 + languageName: node + linkType: hard + "@react-dnd/asap@npm:^4.0.0": version: 4.0.1 resolution: "@react-dnd/asap@npm:4.0.1" @@ -3797,19 +3912,19 @@ __metadata: languageName: node linkType: hard -"@types/prop-types@npm:*, @types/prop-types@npm:^15.7.15": +"@types/prop-types@npm:^15.7.15": version: 15.7.15 resolution: "@types/prop-types@npm:15.7.15" checksum: 10c0/b59aad1ad19bf1733cf524fd4e618196c6c7690f48ee70a327eb450a42aab8e8a063fbe59ca0a5701aebe2d92d582292c0fb845ea57474f6a15f6994b0e260b2 languageName: node linkType: hard -"@types/react-dom@npm:^18.0.0": - version: 18.3.7 - resolution: "@types/react-dom@npm:18.3.7" +"@types/react-dom@npm:^19.0.0": + version: 19.2.2 + resolution: "@types/react-dom@npm:19.2.2" peerDependencies: - "@types/react": ^18.0.0 - checksum: 10c0/8bd309e2c3d1604a28a736a24f96cbadf6c05d5288cfef8883b74f4054c961b6b3a5e997fd5686e492be903c8f3380dba5ec017eff3906b1256529cd2d39603e + "@types/react": ^19.2.0 + checksum: 10c0/6154dfb8e7a638313d7fa15b2b16494f2235afda4c43be37d10f34e5c7a730f6b95117facb5e6eebc73b15cceea7f6da23be46cda5d2262fd00fd7e6069547e3 languageName: node linkType: hard @@ -3822,13 +3937,12 @@ __metadata: languageName: node linkType: hard -"@types/react@npm:^18.0.2": - version: 18.3.25 - resolution: "@types/react@npm:18.3.25" +"@types/react@npm:^19.0.0": + version: 19.2.2 + resolution: "@types/react@npm:19.2.2" dependencies: - "@types/prop-types": "npm:*" csstype: "npm:^3.0.2" - checksum: 10c0/ef4fad7c845ce44cb454e47e826d1b04ff5081bccdac06d0260fc6e47de730268f8f9ff2ffc5085ee793d7466493c1175b2309b3d71c20916efefac0fd7612f1 + checksum: 10c0/f830b1204aca4634ce3c6cb3477b5d3d066b80a4dd832a4ee0069acb504b6debd2416548a43a11c1407c12bc60e2dc6cf362934a18fe75fe06a69c0a98cba8ab languageName: node linkType: hard @@ -3912,6 +4026,19 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/project-service@npm:8.46.1": + version: 8.46.1 + resolution: "@typescript-eslint/project-service@npm:8.46.1" + dependencies: + "@typescript-eslint/tsconfig-utils": "npm:^8.46.1" + "@typescript-eslint/types": "npm:^8.46.1" + debug: "npm:^4.3.4" + peerDependencies: + typescript: ">=4.8.4 <6.0.0" + checksum: 10c0/7218bb343eb371e468596947ef66f0ad5024a76f2787550e093af0fc2b34e1bba3e86840bdec719afd26368e9f75c1ea4ab09bdc84610a746acd89b66910cf8b + languageName: node + linkType: hard + "@typescript-eslint/scope-manager@npm:8.45.0": version: 8.45.0 resolution: "@typescript-eslint/scope-manager@npm:8.45.0" @@ -3922,6 +4049,16 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/scope-manager@npm:8.46.1": + version: 8.46.1 + resolution: "@typescript-eslint/scope-manager@npm:8.46.1" + dependencies: + "@typescript-eslint/types": "npm:8.46.1" + "@typescript-eslint/visitor-keys": "npm:8.46.1" + checksum: 10c0/5cff63677e90f3307fe924b739a3fe9f5239f74ec389fa06d6fa0a3fa51f592d8fb038c0c71088157b5b6fb426145bff1239aa3676c05c7d71d3b9be0f8c2cba + languageName: node + linkType: hard + "@typescript-eslint/tsconfig-utils@npm:8.45.0, @typescript-eslint/tsconfig-utils@npm:^8.45.0": version: 8.45.0 resolution: "@typescript-eslint/tsconfig-utils@npm:8.45.0" @@ -3931,6 +4068,15 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/tsconfig-utils@npm:8.46.1, @typescript-eslint/tsconfig-utils@npm:^8.46.1": + version: 8.46.1 + resolution: "@typescript-eslint/tsconfig-utils@npm:8.46.1" + peerDependencies: + typescript: ">=4.8.4 <6.0.0" + checksum: 10c0/c373bd4e2f43e03d8d4dc91cacbc0acdb217809f0e7b23fb4dd349fdab2503489dd79a3adb394491763ec967fa1312c5c9aebdbc5799ad3ed773b036a6eddb9d + languageName: node + linkType: hard + "@typescript-eslint/type-utils@npm:8.45.0": version: 8.45.0 resolution: "@typescript-eslint/type-utils@npm:8.45.0" @@ -3954,6 +4100,13 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/types@npm:8.46.1, @typescript-eslint/types@npm:^8.46.1": + version: 8.46.1 + resolution: "@typescript-eslint/types@npm:8.46.1" + checksum: 10c0/90887acaa5b33b45af20cf7f87ec4ae098c0daa88484245473e73903fa6e542f613247c22148132167891ca06af6549a60b9d2fd14a65b22871e016901ce3756 + languageName: node + linkType: hard + "@typescript-eslint/typescript-estree@npm:8.45.0": version: 8.45.0 resolution: "@typescript-eslint/typescript-estree@npm:8.45.0" @@ -3974,7 +4127,27 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/utils@npm:8.45.0, @typescript-eslint/utils@npm:^8.0.0": +"@typescript-eslint/typescript-estree@npm:8.46.1": + version: 8.46.1 + resolution: "@typescript-eslint/typescript-estree@npm:8.46.1" + dependencies: + "@typescript-eslint/project-service": "npm:8.46.1" + "@typescript-eslint/tsconfig-utils": "npm:8.46.1" + "@typescript-eslint/types": "npm:8.46.1" + "@typescript-eslint/visitor-keys": "npm:8.46.1" + debug: "npm:^4.3.4" + fast-glob: "npm:^3.3.2" + is-glob: "npm:^4.0.3" + minimatch: "npm:^9.0.4" + semver: "npm:^7.6.0" + ts-api-utils: "npm:^2.1.0" + peerDependencies: + typescript: ">=4.8.4 <6.0.0" + checksum: 10c0/610048f615d4487f3dc57b7440214a14614a9dca8783d142e7dd29e2948d9c8239773839a3bcdf509c266d5f8595ea9f3a20c53c38d7b3bf3cf2305de1491bd8 + languageName: node + linkType: hard + +"@typescript-eslint/utils@npm:8.45.0": version: 8.45.0 resolution: "@typescript-eslint/utils@npm:8.45.0" dependencies: @@ -3989,6 +4162,21 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/utils@npm:^8.0.0": + version: 8.46.1 + resolution: "@typescript-eslint/utils@npm:8.46.1" + dependencies: + "@eslint-community/eslint-utils": "npm:^4.7.0" + "@typescript-eslint/scope-manager": "npm:8.46.1" + "@typescript-eslint/types": "npm:8.46.1" + "@typescript-eslint/typescript-estree": "npm:8.46.1" + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: ">=4.8.4 <6.0.0" + checksum: 10c0/9089be6b88a934843fd4eead61739e43dc79ba3db3dbaebcd9908eed819765b6414da983254a7d619e89d28b441bd131f53c9f163c39ca5b2369b76cd6699121 + languageName: node + linkType: hard + "@typescript-eslint/visitor-keys@npm:8.45.0": version: 8.45.0 resolution: "@typescript-eslint/visitor-keys@npm:8.45.0" @@ -3999,6 +4187,16 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/visitor-keys@npm:8.46.1": + version: 8.46.1 + resolution: "@typescript-eslint/visitor-keys@npm:8.46.1" + dependencies: + "@typescript-eslint/types": "npm:8.46.1" + eslint-visitor-keys: "npm:^4.2.1" + checksum: 10c0/4139a8d78ad95e59fff2285beb623a530b7c2e6af89b994a92e9d8728d0c86eb8d86f64f2372aa874f9f24924253ba9887a2f77bec6bfc6028380b024c24e582 + languageName: node + linkType: hard + "@ungap/structured-clone@npm:^1.3.0": version: 1.3.0 resolution: "@ungap/structured-clone@npm:1.3.0" @@ -5667,7 +5865,7 @@ __metadata: languageName: node linkType: hard -"classnames@npm:*, classnames@npm:2.x, classnames@npm:^2.2.1, classnames@npm:^2.2.5, classnames@npm:^2.2.6, classnames@npm:^2.5.1": +"classnames@npm:*, classnames@npm:2.x, classnames@npm:^2.2.1, classnames@npm:^2.2.5, classnames@npm:^2.2.6, classnames@npm:^2.3.2, classnames@npm:^2.5.1": version: 2.5.1 resolution: "classnames@npm:2.5.1" checksum: 10c0/afff4f77e62cea2d79c39962980bf316bacb0d7c49e13a21adaadb9221e1c6b9d3cdb829d8bb1b23c406f4e740507f37e1dcf506f7e3b7113d17c5bab787aa69 @@ -6663,13 +6861,6 @@ __metadata: languageName: node linkType: hard -"dom-align@npm:^1.7.0": - version: 1.12.4 - resolution: "dom-align@npm:1.12.4" - checksum: 10c0/358f1601fc6b6518c0726ee99e9124212b34ca2828a194c816f247b913415416098cf016391f89741cddccf9b98a98a077469d565630bd4f8143edac81a97186 - languageName: node - linkType: hard - "dom-helpers@npm:^5.0.1": version: 5.2.1 resolution: "dom-helpers@npm:5.2.1" @@ -8697,6 +8888,13 @@ __metadata: languageName: node linkType: hard +"is-mobile@npm:^5.0.0": + version: 5.0.0 + resolution: "is-mobile@npm:5.0.0" + checksum: 10c0/70b31c3e4489109e02deb9b590e74858aeec7ef775a882d89ec030cb7dbaeb2be1173d7faee495049629e49822d0aba9b20e6653b1e25dd7c9121247cb8829d7 + languageName: node + linkType: hard + "is-negative-zero@npm:^2.0.3": version: 2.0.3 resolution: "is-negative-zero@npm:2.0.3" @@ -11901,100 +12099,20 @@ __metadata: languageName: node linkType: hard -"rc-align@npm:^4.0.0": - version: 4.0.15 - resolution: "rc-align@npm:4.0.15" - dependencies: - "@babel/runtime": "npm:^7.10.1" - classnames: "npm:2.x" - dom-align: "npm:^1.7.0" - rc-util: "npm:^5.26.0" - resize-observer-polyfill: "npm:^1.5.1" - peerDependencies: - react: ">=16.9.0" - react-dom: ">=16.9.0" - checksum: 10c0/996e6d8a3988a57438e145717997d4fb88e0d8b9f1acf315c0698189db480f6cde85e143f2a94f6cf719a5c3077317b6efaad15b1d781ee42c2da33af404d5b4 - languageName: node - linkType: hard - -"rc-dock@npm:^3.3.2": - version: 3.3.2 - resolution: "rc-dock@npm:3.3.2" +"rc-dock@npm:^4.0.0-alpha.2": + version: 4.0.0-alpha.2 + resolution: "rc-dock@npm:4.0.0-alpha.2" dependencies: + "@rc-component/dropdown": "npm:~1.0.0" + "@rc-component/menu": "npm:~1.1.3" + "@rc-component/tabs": "npm:~1.5.0" classnames: "npm:^2.5.1" lodash: "npm:^4.17.21" - rc-dropdown: "npm:~4.0.1" - rc-menu: "npm:~9.8.4" rc-new-window: "npm:^0.1.13" - rc-tabs: "npm:~11.16.1" peerDependencies: react: ">=17.0.0" react-dom: ">=17.0.0" - checksum: 10c0/e201ece2d86e7f54481826f66673b101edadad86676e8fb03e885630a8341747e1fd569ce139840c8fda7851142a0fab8ac0d83bebe54250baaf4fdd54dedcc8 - languageName: node - linkType: hard - -"rc-dropdown@npm:~4.0.0, rc-dropdown@npm:~4.0.1": - version: 4.0.1 - resolution: "rc-dropdown@npm:4.0.1" - dependencies: - "@babel/runtime": "npm:^7.18.3" - classnames: "npm:^2.2.6" - rc-trigger: "npm:^5.3.1" - rc-util: "npm:^5.17.0" - peerDependencies: - react: ">=16.11.0" - react-dom: ">=16.11.0" - checksum: 10c0/65b9eb2d76260761188f9cc50d0e6117ce27eb4216330f04d47b7e8c2d31e5588c2b3b334241ce6df54c1174ca3fed4ea5ace7c0b1a2439d1fef4919c80a6f21 - languageName: node - linkType: hard - -"rc-menu@npm:~9.6.0": - version: 9.6.4 - resolution: "rc-menu@npm:9.6.4" - dependencies: - "@babel/runtime": "npm:^7.10.1" - classnames: "npm:2.x" - rc-motion: "npm:^2.4.3" - rc-overflow: "npm:^1.2.0" - rc-trigger: "npm:^5.1.2" - rc-util: "npm:^5.12.0" - shallowequal: "npm:^1.1.0" - peerDependencies: - react: ">=16.9.0" - react-dom: ">=16.9.0" - checksum: 10c0/b8def617accc52ac35ef3d9947ae0d016d47b9d838bec5bbfee212b17dd495dcec7b84be33353cb6b3acd7b1f673e0f2eb33f6a212fd08de7d05ab068d908e6a - languageName: node - linkType: hard - -"rc-menu@npm:~9.8.4": - version: 9.8.4 - resolution: "rc-menu@npm:9.8.4" - dependencies: - "@babel/runtime": "npm:^7.10.1" - classnames: "npm:2.x" - rc-motion: "npm:^2.4.3" - rc-overflow: "npm:^1.2.8" - rc-trigger: "npm:^5.1.2" - rc-util: "npm:^5.27.0" - peerDependencies: - react: ">=16.9.0" - react-dom: ">=16.9.0" - checksum: 10c0/f1bc9dada326aca76591e40c820e4fc958170ae618a3bd196e075ef5c7c271c1ff7260c490f8d589662ed1b284c1aebb286e51b7881ce5b5832e419ea639f863 - languageName: node - linkType: hard - -"rc-motion@npm:^2.0.0, rc-motion@npm:^2.4.3": - version: 2.9.5 - resolution: "rc-motion@npm:2.9.5" - dependencies: - "@babel/runtime": "npm:^7.11.1" - classnames: "npm:^2.2.1" - rc-util: "npm:^5.44.0" - peerDependencies: - react: ">=16.9.0" - react-dom: ">=16.9.0" - checksum: 10c0/84b12b2443dc1b929c8a688e8c9834a44cf88897402e9363fcea80b77f2803b2de83b24dac5873a8695304827e02fb3103c74349d0451ed247cb366553f9d88e + checksum: 10c0/cc65566644e3bd50c287e7a72168069dbcfe6ba0fc35104eba4f40ff7d177a68a468352c71f2e2ff35889c38b76c00a4d584b629e6c3cbf614231d78a76075fb languageName: node linkType: hard @@ -12013,7 +12131,7 @@ __metadata: languageName: node linkType: hard -"rc-overflow@npm:^1.2.0, rc-overflow@npm:^1.2.8": +"rc-overflow@npm:^1.3.1": version: 1.4.1 resolution: "rc-overflow@npm:1.4.1" dependencies: @@ -12043,40 +12161,7 @@ __metadata: languageName: node linkType: hard -"rc-tabs@npm:~11.16.1": - version: 11.16.1 - resolution: "rc-tabs@npm:11.16.1" - dependencies: - "@babel/runtime": "npm:^7.11.2" - classnames: "npm:2.x" - rc-dropdown: "npm:~4.0.0" - rc-menu: "npm:~9.6.0" - rc-resize-observer: "npm:^1.0.0" - rc-util: "npm:^5.5.0" - peerDependencies: - react: ">=16.9.0" - react-dom: ">=16.9.0" - checksum: 10c0/15947967f5773a9c6e422e05d25ee4f6daa82049a58e542e4a6ddf35e1bf86a7145c628e0148ae72507e93439289bb72b7cb51a9a9bc713a9e5c0ced460acd0c - languageName: node - linkType: hard - -"rc-trigger@npm:^5.1.2, rc-trigger@npm:^5.3.1": - version: 5.3.4 - resolution: "rc-trigger@npm:5.3.4" - dependencies: - "@babel/runtime": "npm:^7.18.3" - classnames: "npm:^2.2.6" - rc-align: "npm:^4.0.0" - rc-motion: "npm:^2.0.0" - rc-util: "npm:^5.19.2" - peerDependencies: - react: ">=16.9.0" - react-dom: ">=16.9.0" - checksum: 10c0/1f13cb5ae5b8925ec77aa3f973dbec06420be0bdb7dbfabc2ca28bb48ded8ee3a9c271e436aca7a4222a458b53110591051552714686a742cbb6c871e4440609 - languageName: node - linkType: hard - -"rc-util@npm:^5.12.0, rc-util@npm:^5.17.0, rc-util@npm:^5.19.2, rc-util@npm:^5.26.0, rc-util@npm:^5.27.0, rc-util@npm:^5.37.0, rc-util@npm:^5.38.0, rc-util@npm:^5.44.0, rc-util@npm:^5.5.0": +"rc-util@npm:^5.37.0, rc-util@npm:^5.38.0": version: 5.44.4 resolution: "rc-util@npm:5.44.4" dependencies: @@ -12225,15 +12310,14 @@ __metadata: languageName: node linkType: hard -"react-dom@npm:^18.2.0": - version: 18.3.1 - resolution: "react-dom@npm:18.3.1" +"react-dom@npm:^19.0.0": + version: 19.2.0 + resolution: "react-dom@npm:19.2.0" dependencies: - loose-envify: "npm:^1.1.0" - scheduler: "npm:^0.23.2" + scheduler: "npm:^0.27.0" peerDependencies: - react: ^18.3.1 - checksum: 10c0/a752496c1941f958f2e8ac56239172296fcddce1365ce45222d04a1947e0cc5547df3e8447f855a81d6d39f008d7c32eab43db3712077f09e3f67c4874973e85 + react: ^19.2.0 + checksum: 10c0/fa2cae05248d01288e91523b590ce4e7635b1e13f1344e225f850d722a8da037bf0782f63b1c1d46353334e0c696909b82e582f8cad607948fde6f7646cc18d9 languageName: node linkType: hard @@ -12458,6 +12542,13 @@ __metadata: languageName: node linkType: hard +"react@npm:^19.0.0": + version: 19.2.0 + resolution: "react@npm:19.2.0" + checksum: 10c0/1b6d64eacb9324725bfe1e7860cb7a6b8a34bc89a482920765ebff5c10578eb487e6b46b2f0df263bd27a25edbdae2c45e5ea5d81ae61404301c1a7192c38330 + languageName: node + linkType: hard + "read-only-stream@npm:^2.0.0": version: 2.0.0 resolution: "read-only-stream@npm:2.0.0" @@ -12808,7 +12899,7 @@ __metadata: "@babel/plugin-syntax-jsx": "npm:^7.16.0" "@babel/plugin-transform-runtime": "npm:^7.28.3" "@babel/preset-env": "npm:^7.28.0" - "@babel/preset-react": "npm:^7.12.13" + "@babel/preset-react": "npm:^7.27.1" "@babel/preset-typescript": "npm:^7.24.7" "@codemirror/lang-json": "npm:^6.0.1" "@codemirror/lang-sql": "npm:^6.10.0" @@ -12838,8 +12929,8 @@ __metadata: "@testing-library/user-event": "npm:^14.5.2" "@types/classnames": "npm:^2.3.4" "@types/jest": "npm:^30.0.0" - "@types/react": "npm:^18.0.2" - "@types/react-dom": "npm:^18.0.0" + "@types/react": "npm:^19.0.0" + "@types/react-dom": "npm:^19.0.0" "@xterm/addon-fit": "npm:^0.10.0" "@xterm/addon-search": "npm:^0.15.0" "@xterm/addon-web-links": "npm:^0.11.0" @@ -12897,15 +12988,15 @@ __metadata: postcss-loader: "npm:^8.1.1" process: "npm:^0.11.10" prop-types: "npm:^15.7.2" - rc-dock: "npm:^3.3.2" - react: "npm:^18.2.0" + rc-dock: "npm:^4.0.0-alpha.2" + react: "npm:^19.0.0" react-arborist: "npm:^3.2.0" react-aspen: "npm:^1.1.0" react-checkbox-tree: "npm:^1.7.2" react-data-grid: "https://github.com/pgadmin-org/react-data-grid.git#3dfc2ca01a046d55c1c7a45392dcec104815dc76" react-dnd: "npm:^16.0.1" react-dnd-html5-backend: "npm:^16.0.1" - react-dom: "npm:^18.2.0" + react-dom: "npm:^19.0.0" react-draggable: "npm:^4.4.6" react-dropzone: "npm:^14.2.1" react-frame-component: "npm:^5.2.6" @@ -13036,12 +13127,10 @@ __metadata: languageName: node linkType: hard -"scheduler@npm:^0.23.2": - version: 0.23.2 - resolution: "scheduler@npm:0.23.2" - dependencies: - loose-envify: "npm:^1.1.0" - checksum: 10c0/26383305e249651d4c58e6705d5f8425f153211aef95f15161c151f7b8de885f24751b377e4a0b3dd42cce09aad3f87a61dab7636859c0d89b7daf1a1e2a5c78 +"scheduler@npm:^0.27.0": + version: 0.27.0 + resolution: "scheduler@npm:0.27.0" + checksum: 10c0/4f03048cb05a3c8fddc45813052251eca00688f413a3cee236d984a161da28db28ba71bd11e7a3dd02f7af84ab28d39fb311431d3b3772fed557945beb00c452 languageName: node linkType: hard @@ -13161,13 +13250,6 @@ __metadata: languageName: node linkType: hard -"shallowequal@npm:^1.1.0": - version: 1.1.0 - resolution: "shallowequal@npm:1.1.0" - checksum: 10c0/b926efb51cd0f47aa9bc061add788a4a650550bbe50647962113a4579b60af2abe7b62f9b02314acc6f97151d4cf87033a2b15fc20852fae306d1a095215396c - languageName: node - linkType: hard - "sharp@npm:^0.34.4": version: 0.34.4 resolution: "sharp@npm:0.34.4"