Skip to content

Commit deb8e01

Browse files
committed
chore: use @gravity-ui/table
1 parent 5dbbcc0 commit deb8e01

File tree

17 files changed

+1187
-677
lines changed

17 files changed

+1187
-677
lines changed

package-lock.json

Lines changed: 127 additions & 92 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
"@gravity-ui/i18n": "^1.0.0",
5454
"@gravity-ui/icons": "^2.13.0",
5555
"@gravity-ui/prettier-config": "^1.0.1",
56-
"@gravity-ui/react-data-table": "^2.2.1",
5756
"@gravity-ui/stylelint-config": "^2.0.0",
5857
"@gravity-ui/tsconfig": "^1.0.0",
5958
"@gravity-ui/uikit": "^7.1.1",
@@ -90,6 +89,7 @@
9089
"@bem-react/classname": "^1.6.0",
9190
"@gravity-ui/i18n": "^1.0.0",
9291
"@gravity-ui/icons": "^2.0.0",
92+
"@gravity-ui/table": "^1.10.1",
9393
"@gravity-ui/uikit": "^7.1.1"
9494
},
9595
"nano-staged": {

src/HighlightedText/HighlightedText.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export default function HighlightedText({
4242
);
4343
}
4444

45-
interface MultiProps extends Omit<Props, 'start'> {
45+
export interface MultiHighlightedTextProps extends Omit<Props, 'start'> {
4646
starts: Array<number>;
4747
}
4848

@@ -53,7 +53,7 @@ export function MultiHighlightedText({
5353
starts,
5454
length,
5555
hasComa,
56-
}: MultiProps) {
56+
}: MultiHighlightedTextProps) {
5757
if (!length || !starts.length) {
5858
const comma = hasComa ? <>,&nbsp;</> : null;
5959
return (

src/ReactUnipika/ReactUnipika.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React from 'react';
22

3-
import type {Settings} from '@gravity-ui/react-data-table';
43
// @ts-expect-error
54
import unipika from '@gravity-ui/unipika/lib/unipika';
65

@@ -19,7 +18,6 @@ export interface ReactUnipikaProps {
1918
extraTools?: React.ReactNode;
2019
virtualized?: boolean;
2120
className?: string;
22-
tableSettings?: Settings;
2321
customLayout?: (args: {toolbar: React.ReactNode; content: React.ReactNode}) => React.ReactNode;
2422
toolbarStickyTop?: number;
2523
}
@@ -41,7 +39,6 @@ export function ReactUnipika({
4139
virtualized = true,
4240
extraTools,
4341
className,
44-
tableSettings,
4542
customLayout,
4643
toolbarStickyTop = 0,
4744
}: ReactUnipikaProps) {
@@ -90,7 +87,6 @@ export function ReactUnipika({
9087
<div className={classes} title={getFormattedTitle()} dir="auto">
9188
{virtualized ? (
9289
<StructuredYson
93-
tableSettings={tableSettings}
9490
value={convertedValue}
9591
settings={settings}
9692
extraTools={extraTools}
Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,26 @@
1+
import {CSSProperties} from 'react';
12
import {Meta, StoryObj} from '@storybook/react';
23

34
import {ReactUnipika, ReactUnipikaProps} from '../../index';
45

6+
import data from './data.json';
7+
58
const meta: Meta<ReactUnipikaProps> = {
69
title: 'ReactUnipika',
710
component: ReactUnipika,
811
};
912
export default meta;
1013

14+
//const root = document.getElementById('storybook-root') as HTMLElement;
15+
const style: CSSProperties = {
16+
// overflow: 'auto',
17+
// height: '400px',
18+
// outline: 'solid 1px lightgray',
19+
};
20+
Object.assign(document.body.style ?? {}, style);
21+
1122
export const Default: StoryObj<ReactUnipikaProps> = {
1223
args: {
13-
value: {foo: 'bar', hello: {world: 'Hello world'}},
24+
value: data,
1425
},
1526
};

0 commit comments

Comments
 (0)