ydb-embedded-ui 8.2.1 → 8.3.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/Table/Table.scss +4 -4
- package/dist/components/TruncatedQuery/TruncatedQuery.d.ts +0 -4
- package/dist/components/TruncatedQuery/TruncatedQuery.js +3 -6
- package/dist/components/TruncatedQuery/TruncatedQuery.js.map +1 -1
- package/dist/components/TruncatedQuery/TruncatedQuery.scss +0 -8
- package/dist/components/YqlHighlighter/YqlHighlighter.d.ts +6 -0
- package/dist/components/YqlHighlighter/YqlHighlighter.js +13 -0
- package/dist/components/YqlHighlighter/YqlHighlighter.js.map +1 -0
- package/dist/components/YqlHighlighter/yql.d.ts +3215 -0
- package/dist/components/YqlHighlighter/yql.js +158 -0
- package/dist/components/YqlHighlighter/yql.js.map +1 -0
- package/dist/containers/Tenant/Diagnostics/TopQueries/columns/columns.js +3 -2
- package/dist/containers/Tenant/Diagnostics/TopQueries/columns/columns.js.map +1 -1
- package/dist/containers/Tenant/Info/View/View.js +2 -2
- package/dist/containers/Tenant/Info/View/View.js.map +1 -1
- package/package.json +4 -2
@@ -50,11 +50,11 @@
|
|
50
50
|
height: var(--ydb-table-cell-height) !important;
|
51
51
|
padding: 0;
|
52
52
|
@include mixins.text-body-2();
|
53
|
-
|
54
|
-
text-align: right;
|
53
|
+
&_align_right {
|
54
|
+
text-align: right !important;
|
55
55
|
}
|
56
|
-
|
57
|
-
vertical-align: top;
|
56
|
+
&_vertical-align_top {
|
57
|
+
vertical-align: top !important;
|
58
58
|
}
|
59
59
|
}
|
60
60
|
}
|
@@ -4,8 +4,4 @@ interface TruncatedQueryProps {
|
|
4
4
|
maxQueryHeight?: number;
|
5
5
|
}
|
6
6
|
export declare const TruncatedQuery: ({ value, maxQueryHeight }: TruncatedQueryProps) => import("react/jsx-runtime").JSX.Element;
|
7
|
-
interface OneLineQueryWithPopoverProps {
|
8
|
-
value?: string;
|
9
|
-
}
|
10
|
-
export declare const OneLineQueryWithPopover: ({ value }: OneLineQueryWithPopoverProps) => import("react/jsx-runtime").JSX.Element;
|
11
7
|
export {};
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
import React from 'react';
|
3
3
|
import { cn } from '../../utils/cn';
|
4
|
-
import {
|
4
|
+
import { YqlHighlighter } from '../YqlHighlighter/YqlHighlighter';
|
5
5
|
import './TruncatedQuery.scss';
|
6
6
|
const b = cn('kv-truncated-query');
|
7
7
|
export const TruncatedQuery = ({ value = '', maxQueryHeight = 6 }) => {
|
@@ -10,11 +10,8 @@ export const TruncatedQuery = ({ value = '', maxQueryHeight = 6 }) => {
|
|
10
10
|
if (truncated) {
|
11
11
|
const content = lines.slice(0, maxQueryHeight).join('\n');
|
12
12
|
const message = '\n...\nThe request was truncated. Click on the line to show the full query on the query tab';
|
13
|
-
return (_jsxs(React.Fragment, { children: [_jsx(
|
13
|
+
return (_jsxs(React.Fragment, { children: [_jsx(YqlHighlighter, { className: b(), children: content }), _jsx("span", { className: b('message', { color: 'secondary' }), children: message })] }));
|
14
14
|
}
|
15
|
-
return _jsx(
|
16
|
-
};
|
17
|
-
export const OneLineQueryWithPopover = ({ value = '' }) => {
|
18
|
-
return (_jsx(CellWithPopover, { contentClassName: b('popover-content'), content: value, children: value }));
|
15
|
+
return _jsx(YqlHighlighter, { children: value });
|
19
16
|
};
|
20
17
|
//# sourceMappingURL=TruncatedQuery.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"TruncatedQuery.js","sourceRoot":"","sources":["../../../src/components/TruncatedQuery/TruncatedQuery.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,EAAE,EAAC,MAAM,gBAAgB,CAAC;AAClC,OAAO,EAAC,
|
1
|
+
{"version":3,"file":"TruncatedQuery.js","sourceRoot":"","sources":["../../../src/components/TruncatedQuery/TruncatedQuery.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,EAAE,EAAC,MAAM,gBAAgB,CAAC;AAClC,OAAO,EAAC,cAAc,EAAC,MAAM,kCAAkC,CAAC;AAEhE,OAAO,uBAAuB,CAAC;AAE/B,MAAM,CAAC,GAAG,EAAE,CAAC,oBAAoB,CAAC,CAAC;AAOnC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAAC,KAAK,GAAG,EAAE,EAAE,cAAc,GAAG,CAAC,EAAsB,EAAE,EAAE;IACpF,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAChC,MAAM,SAAS,GAAG,KAAK,CAAC,MAAM,GAAG,cAAc,CAAC;IAEhD,IAAI,SAAS,EAAE,CAAC;QACZ,MAAM,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1D,MAAM,OAAO,GACT,6FAA6F,CAAC;QAClG,OAAO,CACH,MAAC,KAAK,CAAC,QAAQ,eACX,KAAC,cAAc,IAAC,SAAS,EAAE,CAAC,EAAE,YAAG,OAAO,GAAkB,EAC1D,eAAM,SAAS,EAAE,CAAC,CAAC,SAAS,EAAE,EAAC,KAAK,EAAE,WAAW,EAAC,CAAC,YAAG,OAAO,GAAQ,IACxD,CACpB,CAAC;IACN,CAAC;IACD,OAAO,KAAC,cAAc,cAAE,KAAK,GAAkB,CAAC;AACpD,CAAC,CAAC"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { useThemeValue } from '@gravity-ui/uikit';
|
3
|
+
import { PrismLight as SyntaxHighlighter } from 'react-syntax-highlighter';
|
4
|
+
import { cn } from '../../utils/cn';
|
5
|
+
import { dark, light, yql } from './yql';
|
6
|
+
SyntaxHighlighter.registerLanguage('yql', yql);
|
7
|
+
const b = cn('yql-highlighter');
|
8
|
+
export const YqlHighlighter = ({ children, className }) => {
|
9
|
+
const themeValue = useThemeValue();
|
10
|
+
const isDark = themeValue === 'dark' || themeValue === 'dark-hc';
|
11
|
+
return (_jsx("div", { className: b(null, className), children: _jsx(SyntaxHighlighter, { language: "yql", style: isDark ? dark : light, children: children }) }));
|
12
|
+
};
|
13
|
+
//# sourceMappingURL=YqlHighlighter.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"YqlHighlighter.js","sourceRoot":"","sources":["../../../src/components/YqlHighlighter/YqlHighlighter.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAC,UAAU,IAAI,iBAAiB,EAAC,MAAM,0BAA0B,CAAC;AAEzE,OAAO,EAAC,EAAE,EAAC,MAAM,gBAAgB,CAAC;AAElC,OAAO,EAAC,IAAI,EAAE,KAAK,EAAE,GAAG,EAAC,MAAM,OAAO,CAAC;AAEvC,iBAAiB,CAAC,gBAAgB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AAE/C,MAAM,CAAC,GAAG,EAAE,CAAC,iBAAiB,CAAC,CAAC;AAOhC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAAC,QAAQ,EAAE,SAAS,EAAsB,EAAE,EAAE;IACzE,MAAM,UAAU,GAAG,aAAa,EAAE,CAAC;IACnC,MAAM,MAAM,GAAG,UAAU,KAAK,MAAM,IAAI,UAAU,KAAK,SAAS,CAAC;IAEjE,OAAO,CACH,cAAK,SAAS,EAAE,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,YAC9B,KAAC,iBAAiB,IAAC,QAAQ,EAAC,KAAK,EAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,YACzD,QAAQ,GACO,GAClB,CACT,CAAC;AACN,CAAC,CAAC"}
|