Merge branch 'devel' into 8433-cb-replace-material-ui-with-native-css-variables-and-tailwind-utilities
@@ -37,10 +37,11 @@ interface Props {
|
||||
staticProperties?: boolean;
|
||||
filterable?: boolean;
|
||||
sortByName?: boolean;
|
||||
disableOverflowEffect?: boolean;
|
||||
}
|
||||
|
||||
export const PropertiesTable = observer<Props>(function PropertiesTable(props) {
|
||||
const { className, onAdd, readOnly, propertiesState } = props;
|
||||
const { className, onAdd, readOnly, propertiesState, disableOverflowEffect = false } = props;
|
||||
const translate = useTranslate();
|
||||
const propsRef = useObjectRef({ ...props });
|
||||
const style = useS(styles);
|
||||
@@ -165,7 +166,7 @@ export const PropertiesTable = observer<Props>(function PropertiesTable(props) {
|
||||
onRemove={removeProperty}
|
||||
/>
|
||||
))}
|
||||
<div className={s(style, { propertiesListOverflow: true })} />
|
||||
{!disableOverflowEffect && <div className={s(style, { propertiesListOverflow: true })} />}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -149,7 +149,7 @@ export class ResourceSqlDataSource extends BaseSqlDataSource {
|
||||
private readonly projectsService: ProjectsService,
|
||||
state: IResourceSqlDataSourceState,
|
||||
) {
|
||||
super();
|
||||
super('/icons/sql_script_m.svg');
|
||||
this.bindState(state);
|
||||
this.lastAction = undefined;
|
||||
this.loaded = false;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_2405_984)">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M31 2.5C31 1.11929 29.8807 0 28.5 0H8.39735C6.74049 0 5.39735 1.34315 5.39735 3L5.39734 5L5.3999 4.99696V23H7.5999V4.49998C7.59989 3.9996 7.63677 3.49608 7.82583 3.13249C7.90752 2.97541 8.0104 2.86064 8.15262 2.77735C8.29863 2.69185 8.55416 2.6 8.9999 2.6H22.9001V28C22.9001 28.5039 22.8678 29.0333 22.6922 29.4181C22.6146 29.5879 22.5254 29.6909 22.4267 29.7567C22.3314 29.8202 22.1517 29.9 21.805 29.9H20V26H0V32H6.0001V32.1H21.805C22.5119 32.1 23.1334 31.9298 23.6473 31.587C24.1578 31.2466 24.4856 30.7871 24.6934 30.3319C25.0885 29.4667 25.1001 28.4961 25.1001 28L25.1001 5H31V2.5Z" fill="#338ECC"/>
|
||||
<g clip-path="url(#clip0_8043_5081)">
|
||||
<path d="M10 2C8.16 2 6 3.72 6 5.59V24H3V26.41C3 28.28 4.16 30 6 30H21C22.84 30 25 27.87 25 26V6.64C25 5.33 25.94 4.14 27.24 4.01C28.74 3.86 29 4.01 29 4.01V2H10ZM5 26.68V26H16C16 26.77 16.3 27.47 16.78 28H6.56C5.7 28 5 27.41 5 26.68ZM23 11V25.5C23 26.88 21.88 28 20.5 28C19.12 28 18 26.88 18 25.5V24H8V6.5C8 5.12 9.12 4 10.5 4H23.53C23.21 4.49 23 5.03 23 5.59V11Z" fill="#3387C5"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_2405_984">
|
||||
<clipPath id="clip0_8043_5081">
|
||||
<rect width="32" height="32" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
|
||||
|
Before Width: | Height: | Size: 901 B After Width: | Height: | Size: 632 B |
@@ -1,9 +1,9 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_3207_946)">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M21 0C22.1046 0 23 0.89543 23 2V4H20L20 21.5799C20 22.9164 18.8232 23.9999 17.4867 23.9999L14 23.9999V24L8.9046 24L8.0466 24L8.0401 24L1 23.9999V19.9999L14 20V22.0933L17.4867 22.0932C17.7702 22.0932 18 21.8634 18 21.5799L18 2L8.23591 2L7 2V17H5L5 5V3C5 2.9996 5 2.99919 5 2.99879V2C5 0.895431 5.89543 0 7 0H8H19H21Z" fill="#338ECC"/>
|
||||
<g clip-path="url(#clip0_8043_5087)">
|
||||
<path d="M7.38462 1C5.96923 1 4.30769 2.35143 4.30769 3.82071V18.2857H2V20.1793C2 21.6486 2.89231 23 4.30769 23H15.8462C17.2615 23 18.9231 21.3264 18.9231 19.8571V4.64571C18.9231 3.61643 19.6462 2.68143 20.6462 2.57929C21.8 2.46143 22 2.57929 22 2.57929V1H7.38462ZM3.53846 20.3914V19.8571H12C12 20.4621 12.2308 21.0121 12.6 21.4286H4.73846C4.07692 21.4286 3.53846 20.965 3.53846 20.3914ZM17.3846 8.07143V19.4643C17.3846 20.5486 16.5231 21.4286 15.4615 21.4286C14.4 21.4286 13.5385 20.5486 13.5385 19.4643V18.2857H5.84615V4.53571C5.84615 3.45143 6.70769 2.57143 7.76923 2.57143H17.7923C17.5462 2.95643 17.3846 3.38071 17.3846 3.82071V8.07143Z" fill="#3387C5"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_3207_946">
|
||||
<clipPath id="clip0_8043_5087">
|
||||
<rect width="24" height="24" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
|
||||
|
Before Width: | Height: | Size: 630 B After Width: | Height: | Size: 909 B |
@@ -1,9 +1,9 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_2405_996)">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 -0.0498047C12.0886 -0.0498047 12.173 -0.0320861 12.25 2.42144e-07L14 3.39001e-07V1H15V4H13.1501L13.1501 14.3458C13.1501 15.257 12.4114 15.9958 11.5002 15.9958L9 15.9958V16H0V13H9V14.6958L11.5002 14.6958C11.6934 14.6958 11.8501 14.5391 11.8501 14.3458L11.8501 2L4.15 2V9.9999V10.6499H2.85V9.9999V1.60019C2.85 0.688924 3.58873 -0.0498047 4.5 -0.0498047H12Z" fill="#338ECC"/>
|
||||
<g clip-path="url(#clip0_8043_5093)">
|
||||
<path d="M5.5 1C4.58 1 3.5 1.86 3.5 2.795V12H2V13.205C2 14.14 2.58 15 3.5 15H11C11.92 15 13 13.935 13 13V3.32C13 2.665 13.47 2.07 14.12 2.005C14.87 1.93 15 2.005 15 2.005V1H5.5ZM3 13.34V13H8.5C8.5 13.385 8.65 13.735 8.89 14H3.78C3.35 14 3 13.705 3 13.34ZM12 5.5V12.75C12 13.44 11.44 14 10.75 14C10.06 14 9.5 13.44 9.5 12.75V12H4.5V3.25C4.5 2.56 5.06 2 5.75 2H12.265C12.105 2.245 12 2.515 12 2.795V5.5Z" fill="#3387C5"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_2405_996">
|
||||
<clipPath id="clip0_8043_5093">
|
||||
<rect width="16" height="16" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
|
||||
|
Before Width: | Height: | Size: 673 B After Width: | Height: | Size: 669 B |
@@ -0,0 +1,17 @@
|
||||
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_7987_4550)">
|
||||
<g clip-path="url(#clip1_7987_4550)">
|
||||
<path d="M17.8667 26.22C16.8027 26.0053 16 25.0627 16 23.9333V22.5333H6.66667V6.2C6.66667 4.912 7.712 3.86667 9 3.86667H21.1613C20.8627 4.324 20.6667 4.828 20.6667 5.35067V15.0667H22.5333V6.33067C22.5333 5.108 23.4107 3.99733 24.624 3.876C26.024 3.736 26.2667 3.876 26.2667 3.876V2H8.53333C6.816 2 4.8 3.60533 4.8 5.35067V22.5333H2V24.7827C2 26.5373 3.08267 28.1333 4.8 28.1333H17.8667V26.22ZM5.32267 26.2667C4.52 26.2667 3.86667 25.716 3.86667 25.0347V24.4H14.1333C14.1333 25.1187 14.4133 25.772 14.8613 26.2667H5.32267Z" fill="#3387C5"/>
|
||||
<path d="M27.4707 18.8003L24.8667 21.6376L22.2627 18.8003H27.4614M30.0001 16.9336H19.7334V18.8003L24.8667 24.4003L30.0001 18.8003V16.9336Z" fill="#3387C5"/>
|
||||
<path d="M24.8667 22.5332L30.0001 28.1332V29.9999H19.7334V28.1332L24.8667 22.5332Z" fill="#3387C5"/>
|
||||
</g>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_7987_4550">
|
||||
<rect width="32" height="32" fill="white"/>
|
||||
</clipPath>
|
||||
<clipPath id="clip1_7987_4550">
|
||||
<rect width="28" height="28" fill="white" transform="translate(2 2)"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,17 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_7987_4555)">
|
||||
<g clip-path="url(#clip1_7987_4555)">
|
||||
<path d="M13.4667 20.03C12.6307 19.8613 12 19.1207 12 18.2333V17.1333H4.66667V4.3C4.66667 3.288 5.488 2.46667 6.5 2.46667H16.0553C15.8207 2.826 15.6667 3.222 15.6667 3.63267V11.2667H17.1333V4.40267C17.1333 3.442 17.8227 2.56933 18.776 2.474C19.876 2.364 20.0667 2.474 20.0667 2.474V1H6.13333C4.784 1 3.2 2.26133 3.2 3.63267V17.1333H1V18.9007C1 20.2793 1.85067 21.5333 3.2 21.5333H13.4667V20.03ZM3.61067 20.0667C2.98 20.0667 2.46667 19.634 2.46667 19.0987V18.6H10.5333C10.5333 19.1647 10.7533 19.678 11.1053 20.0667H3.61067Z" fill="#3387C5"/>
|
||||
<path d="M21.0129 14.2001L18.9669 16.4294L16.9209 14.2001H21.0056M23.0003 12.7334H14.9336V14.2001L18.9669 18.6001L23.0003 14.2001V12.7334Z" fill="#3387C5"/>
|
||||
<path d="M18.9669 17.1338L23.0003 21.5338V23.0005H14.9336V21.5338L18.9669 17.1338Z" fill="#3387C5"/>
|
||||
</g>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_7987_4555">
|
||||
<rect width="24" height="24" fill="white"/>
|
||||
</clipPath>
|
||||
<clipPath id="clip1_7987_4555">
|
||||
<rect width="22" height="22" fill="white" transform="translate(1 1)"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,17 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clip-path="url(#clip0_7987_4560)">
|
||||
<g clip-path="url(#clip1_7987_4560)">
|
||||
<path d="M8.93333 13.11C8.40133 13.0027 8 12.5313 8 11.9667V11.2667H3.33333V3.1C3.33333 2.456 3.856 1.93333 4.5 1.93333H10.5807C10.4313 2.162 10.3333 2.414 10.3333 2.67533V7.53333H11.2667V3.16533C11.2667 2.554 11.7053 1.99867 12.312 1.938C13.012 1.868 13.1333 1.938 13.1333 1.938V1H4.26667C3.408 1 2.4 1.80267 2.4 2.67533V11.2667H1V12.3913C1 13.2687 1.54133 14.0667 2.4 14.0667H8.93333V13.11ZM2.66133 13.1333C2.26 13.1333 1.93333 12.858 1.93333 12.5173V12.2H7.06667C7.06667 12.5593 7.20667 12.886 7.43067 13.1333H2.66133Z" fill="#3387C5"/>
|
||||
<path d="M13.7349 9.40013L12.4329 10.8188L11.1309 9.40013H13.7302M14.9995 8.4668H9.86621V9.40013L12.4329 12.2001L14.9995 9.40013V8.4668Z" fill="#3387C5"/>
|
||||
<path d="M12.4329 11.2666L14.9995 14.0666V14.9999H9.86621V14.0666L12.4329 11.2666Z" fill="#3387C5"/>
|
||||
</g>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_7987_4560">
|
||||
<rect width="16" height="16" fill="white"/>
|
||||
</clipPath>
|
||||
<clipPath id="clip1_7987_4560">
|
||||
<rect width="14" height="14" fill="white" transform="translate(1 1)"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -91,7 +91,7 @@ export abstract class BaseSqlDataSource<TDataSource extends QueryDataSource = Qu
|
||||
protected editing: boolean;
|
||||
protected innerCursorState: ISqlEditorCursor;
|
||||
|
||||
constructor(icon = '/icons/sql_script_m.svg') {
|
||||
constructor(icon = '/icons/sql_script_temp_m.svg') {
|
||||
this.icon = icon;
|
||||
this.databaseModels = [];
|
||||
this.incomingScript = undefined;
|
||||
|
||||
@@ -57,4 +57,5 @@ export default [
|
||||
],
|
||||
['plugin_sql_editor_settings_highlight_white_space', 'Highlight white space characters'],
|
||||
['plugin_sql_editor_settings_highlight_white_space_description', 'Highlight spaces, tabs and other white space characters in the SQL editor'],
|
||||
['plugin_sql_editor_bind_parameters_dialog_alert_title', 'String values must be quoted'],
|
||||
];
|
||||
|
||||
@@ -61,4 +61,5 @@ export default [
|
||||
'plugin_sql_editor_settings_highlight_white_space_description',
|
||||
"Mettre en surbrillance les espaces, les tabulations et les autres caractères d'espace blanc dans l'éditeur SQL",
|
||||
],
|
||||
['plugin_sql_editor_bind_parameters_dialog_alert_title', 'Les valeurs de type chaîne doivent être entre guillemets'],
|
||||
];
|
||||
|
||||
@@ -53,4 +53,5 @@ export default [
|
||||
'plugin_sql_editor_settings_highlight_white_space_description',
|
||||
"Mettere in evidenza spazi, tabulazioni e altri caratteri di spazio bianco nell'editor SQL",
|
||||
],
|
||||
['plugin_sql_editor_bind_parameters_dialog_alert_title', 'I valori stringa devono essere racchiusi tra virgolette'],
|
||||
];
|
||||
|
||||
@@ -54,4 +54,5 @@ export default [
|
||||
],
|
||||
['plugin_sql_editor_settings_highlight_white_space', 'Подсветить пробелы'],
|
||||
['plugin_sql_editor_settings_highlight_white_space_description', 'Подсветить пробелы, табуляции и другие пробельные символы в редакторе SQL'],
|
||||
['plugin_sql_editor_bind_parameters_dialog_alert_title', 'Строковые значения должны быть заключены в кавычки'],
|
||||
];
|
||||
|
||||
@@ -56,4 +56,5 @@ export default [
|
||||
'plugin_sql_editor_settings_highlight_white_space_description',
|
||||
'Đánh dấu khoảng trắng, tab và các ký tự khoảng trắng khác trong trình soạn thảo SQL',
|
||||
],
|
||||
['plugin_sql_editor_bind_parameters_dialog_alert_title', 'Giá trị chuỗi phải được đặt trong dấu ngoặc kép'],
|
||||
];
|
||||
|
||||
@@ -54,4 +54,5 @@ export default [
|
||||
],
|
||||
['plugin_sql_editor_settings_highlight_white_space', '高亮显示空白字符'],
|
||||
['plugin_sql_editor_settings_highlight_white_space_description', '高亮显示SQL编辑器中的空格、制表符和其他空白字符'],
|
||||
['plugin_sql_editor_bind_parameters_dialog_alert_title', '字符串值必须用引号括起来'],
|
||||
];
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
*/
|
||||
|
||||
import { PropertiesTable, useResource } from '@cloudbeaver/core-blocks';
|
||||
import { IconOrImage, PropertiesTable, useResource, useTranslate } from '@cloudbeaver/core-blocks';
|
||||
import { SQLCodeEditor, useSqlDialectExtension } from '@cloudbeaver/plugin-sql-editor-codemirror';
|
||||
import { useCodemirrorExtensions } from '@cloudbeaver/plugin-codemirror6';
|
||||
import { observer } from 'mobx-react-lite';
|
||||
@@ -56,12 +56,14 @@ const RenderParametersForm = observer(function RenderParametersForm({
|
||||
const connectionDialectResource = useResource(RenderParametersForm, ConnectionDialectResource, connectionKey);
|
||||
const sqlDialect = useSqlDialectExtension(connectionDialectResource.data);
|
||||
const extensions = useCodemirrorExtensions();
|
||||
const translate = useTranslate();
|
||||
|
||||
if (sqlDialect) {
|
||||
extensions.set(...sqlDialect);
|
||||
}
|
||||
|
||||
for (const [paramName, paramValue] of Object.entries(parameters)) {
|
||||
const paramValueString = String(paramValue);
|
||||
const paramValueString = String(paramValue);
|
||||
if (paramValueString) {
|
||||
const escapedName = escapeForRegExp(paramName);
|
||||
|
||||
@@ -90,12 +92,16 @@ const RenderParametersForm = observer(function RenderParametersForm({
|
||||
className="tw:overflow-auto"
|
||||
sortByName={false}
|
||||
staticProperties
|
||||
disableOverflowEffect
|
||||
/>
|
||||
</div>
|
||||
|
||||
{!sqlEditorSettingsService.disabled && (
|
||||
<SQLCodeEditor value={query} extensions={extensions} className="tw:overflow-auto tw:flex-1/3" readonly />
|
||||
)}
|
||||
<div className="theme-typography--body2 tw:p-2 tw:bg-(--theme-secondary) tw:flex tw:flex-row tw:gap-2 tw:items-center tw:rounded">
|
||||
<IconOrImage icon="/icons/preload/info_icon_sm.svg" className="tw:size-3" />
|
||||
<span>{translate('plugin_sql_editor_bind_parameters_dialog_alert_title')}</span>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
});
|
||||
|
||||