Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kuzmadom committed Dec 27, 2024
1 parent f2122d3 commit 8c47626
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import React from 'react';

import block from 'bem-cn-lite';
import {isWrappedHTML} from 'shared/utils/ui-sandbox';

import {WrappedHTMLNode, isWrappedHTML} from '../WrappedHTMLNode';
import {WrappedHTMLNode} from '../WrappedHTMLNode';

import type {BarProps} from './types';
import {getStyles, isPropsValid} from './utils';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import block from 'bem-cn-lite';
import get from 'lodash/get';
import {DEFAULT_WIDGET_SIZE} from 'shared';
import type {TableCommonCell, TableHead, TableRow, WidgetSizeType} from 'shared';
import {isWrappedHTML} from 'shared/utils/ui-sandbox';

import type {ChartKitDataTable, DataTableData} from '../../../../../types';
import {
Expand All @@ -20,7 +21,7 @@ import {Loader} from '../../../Loader/Loader';
import {SNAPTER_HTML_CLASSNAME} from '../constants';

import Paginator from './Paginator/Paginator';
import {WrappedHTMLNode, isWrappedHTML} from './WrappedHTMLNode';
import {WrappedHTMLNode} from './WrappedHTMLNode';
import type {TableProps} from './types';
import {
camelCaseCss,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';

import {WRAPPED_HTML_KEY} from 'shared';
import type {WrappedHTML} from 'shared';

import {generateHtml} from '../../../../../modules/html-generator';
Expand All @@ -11,14 +10,6 @@ type Props<T extends React.ElementType> = {
className?: string;
};

export function isWrappedHTML(value: unknown): value is WrappedHTML {
if (!value || typeof value !== 'object') {
return false;
}

return WRAPPED_HTML_KEY in value;
}

export function WrappedHTMLNode<T extends React.ElementType = 'div'>(props: Props<T>) {
const {as, className, value} = props;
const Tag: React.ElementType = as || 'span';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@ import type {
TableRow,
} from 'shared';
import {ChartKitTableQa, isMarkupItem} from 'shared';
import {isWrappedHTML} from 'shared/utils/ui-sandbox';

import {MarkdownHelpPopover} from '../../../../../../../../components/MarkdownHelpPopover/MarkdownHelpPopover';
import {Markup} from '../../../../../../../../components/Markup';
import {markupToRawString} from '../../../../../../modules/table';
import type {ChartKitDataTable, DataTableData} from '../../../../../../types';
import {Bar} from '../Bar/Bar';
import {WrappedHTMLNode, isWrappedHTML} from '../WrappedHTMLNode';
import {WrappedHTMLNode} from '../WrappedHTMLNode';
import type {TableProps} from '../types';

import {getAdditionalStyles, getRowActionParams} from './action-params';
Expand Down

0 comments on commit 8c47626

Please sign in to comment.