Skip to content

Commit

Permalink
UI: fix text editor
Browse files Browse the repository at this point in the history
  • Loading branch information
mvoloshin0458 committed Oct 17, 2023
1 parent 2fd8bfe commit 3cffb92
Show file tree
Hide file tree
Showing 33 changed files with 1,247 additions and 1,244 deletions.
4 changes: 2 additions & 2 deletions dist/cjs/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/cjs/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/cjs/types/components/MenuPopper/MenuPopper.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference types="react" />
import './menuPopper.scss';
export declare type menuItem = {
export type menuItem = {
hideMenu?: boolean;
key?: string;
text?: string;
Expand Down
4 changes: 2 additions & 2 deletions dist/cjs/types/components/Table/Table.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { UrlFilterParser } from './hooks/useUrlFilters';
import './table.scss';
export declare const filterParsersMap: Map<FilterComponent, UrlFilterParser>;
export declare const stringParser: UrlFilterParser;
export declare type FilterComponent = typeof DateFilter | typeof MultiSelectFilter | typeof SelectFilter | typeof SeverityFilter | typeof TextFilter;
export type FilterComponent = typeof DateFilter | typeof MultiSelectFilter | typeof SelectFilter | typeof SeverityFilter | typeof TextFilter;
export interface RowAction {
hideAction: boolean | ((original: object) => boolean);
action?: ((original: object) => void) | (() => void);
Expand All @@ -28,7 +28,7 @@ export interface CustomCellProps<Data extends Record<string, unknown>> {
cell: CellProps<Data>;
column: Column<Data>;
}
export declare type Column<Data extends Record<string, unknown>> = Omit<RTColumn<Data>, 'Filter' | 'Cell' | 'id' | 'accessor'> & {
export type Column<Data extends Record<string, unknown>> = Omit<RTColumn<Data>, 'Filter' | 'Cell' | 'id' | 'accessor'> & {
onClickCell?: (values: Data) => void;
Cell?: React.FC<CustomCellProps<Data>>;
defaultHidden?: boolean;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
export { default as useLinePosition } from './useLinePosition';
export { default as useTags } from './useTags';
export type * from './useTags';
export { default as useLinesCount } from './useLinesCount';
export { default as useSearch } from './useSearch';
export { default as useOnlyMatching } from './useOnlyMatching';
export type * from './useOnlyMatching';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference types="react" />
import './textViewerLite.scss';
declare type TextViewerLiteProps = {
type TextViewerLiteProps = {
value?: string;
fontSize: number;
maxLines?: number;
Expand Down
4 changes: 2 additions & 2 deletions dist/cjs/types/components/TextEditor/context/context.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PropsWithChildren } from 'react';
declare type TextEditorContextValue = {
type TextEditorContextValue = {
mode?: 'json' | 'text';
shouldFoldAll?: boolean;
allowSearch?: boolean;
Expand All @@ -10,7 +10,7 @@ declare type TextEditorContextValue = {
isLiteMode: boolean;
loading?: boolean;
};
declare type TextEditorContextType = {
type TextEditorContextType = {
value: TextEditorContextValue;
setTextEditorContext: (setter: (prev: TextEditorContextValue) => TextEditorContextValue) => void;
};
Expand Down
1 change: 1 addition & 0 deletions dist/cjs/types/components/TextEditor/hooks/index.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export { default as useTags } from './useTags';
export { default as useLinesCount } from './useLinesCount';
9 changes: 6 additions & 3 deletions dist/cjs/types/components/TextEditor/hooks/useLinesCount.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
declare function useLinesCount({ value, forcedValue }: {
value: string;
forcedValue?: string;
declare function useLinesCount({ value, lines }: {
value?: string;
lines?: {
number: string;
text: string;
}[];
}): void;
export default useLinesCount;
2 changes: 1 addition & 1 deletion dist/cjs/types/components/ToggleButton/ToggleButton.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference types="react" />
import './ToggleButton.scss';
declare type Option = {
type Option = {
label: string;
value: string;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference types="react" />
import './ipRangeTextBox.scss';
declare type Subnet = {
type Subnet = {
ip: string;
mask: string;
};
Expand Down
2 changes: 1 addition & 1 deletion dist/cjs/types/consts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export declare const SEVERITY_MINOR = "MINOR";
export declare const SEVERITY_MAJOR = "MAJOR";
export declare const SEVERITY_CRITICAL = "CRITICAL";
export declare const SEVERITIES: readonly ["DEBUG", "INFO", "WARNING", "MINOR", "MAJOR", "CRITICAL"];
export declare type Severities = typeof SEVERITIES[number];
export type Severities = typeof SEVERITIES[number];
export declare const SEVERITIES_ICONS: SeverityIcons;
interface ShortRoles {
[key: string]: any;
Expand Down
4 changes: 2 additions & 2 deletions dist/esm/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/esm/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/esm/types/components/MenuPopper/MenuPopper.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference types="react" />
import './menuPopper.scss';
export declare type menuItem = {
export type menuItem = {
hideMenu?: boolean;
key?: string;
text?: string;
Expand Down
4 changes: 2 additions & 2 deletions dist/esm/types/components/Table/Table.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { UrlFilterParser } from './hooks/useUrlFilters';
import './table.scss';
export declare const filterParsersMap: Map<FilterComponent, UrlFilterParser>;
export declare const stringParser: UrlFilterParser;
export declare type FilterComponent = typeof DateFilter | typeof MultiSelectFilter | typeof SelectFilter | typeof SeverityFilter | typeof TextFilter;
export type FilterComponent = typeof DateFilter | typeof MultiSelectFilter | typeof SelectFilter | typeof SeverityFilter | typeof TextFilter;
export interface RowAction {
hideAction: boolean | ((original: object) => boolean);
action?: ((original: object) => void) | (() => void);
Expand All @@ -28,7 +28,7 @@ export interface CustomCellProps<Data extends Record<string, unknown>> {
cell: CellProps<Data>;
column: Column<Data>;
}
export declare type Column<Data extends Record<string, unknown>> = Omit<RTColumn<Data>, 'Filter' | 'Cell' | 'id' | 'accessor'> & {
export type Column<Data extends Record<string, unknown>> = Omit<RTColumn<Data>, 'Filter' | 'Cell' | 'id' | 'accessor'> & {
onClickCell?: (values: Data) => void;
Cell?: React.FC<CustomCellProps<Data>>;
defaultHidden?: boolean;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
export { default as useLinePosition } from './useLinePosition';
export { default as useTags } from './useTags';
export type * from './useTags';
export { default as useLinesCount } from './useLinesCount';
export { default as useSearch } from './useSearch';
export { default as useOnlyMatching } from './useOnlyMatching';
export type * from './useOnlyMatching';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference types="react" />
import './textViewerLite.scss';
declare type TextViewerLiteProps = {
type TextViewerLiteProps = {
value?: string;
fontSize: number;
maxLines?: number;
Expand Down
4 changes: 2 additions & 2 deletions dist/esm/types/components/TextEditor/context/context.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PropsWithChildren } from 'react';
declare type TextEditorContextValue = {
type TextEditorContextValue = {
mode?: 'json' | 'text';
shouldFoldAll?: boolean;
allowSearch?: boolean;
Expand All @@ -10,7 +10,7 @@ declare type TextEditorContextValue = {
isLiteMode: boolean;
loading?: boolean;
};
declare type TextEditorContextType = {
type TextEditorContextType = {
value: TextEditorContextValue;
setTextEditorContext: (setter: (prev: TextEditorContextValue) => TextEditorContextValue) => void;
};
Expand Down
1 change: 1 addition & 0 deletions dist/esm/types/components/TextEditor/hooks/index.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export { default as useTags } from './useTags';
export { default as useLinesCount } from './useLinesCount';
9 changes: 6 additions & 3 deletions dist/esm/types/components/TextEditor/hooks/useLinesCount.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
declare function useLinesCount({ value, forcedValue }: {
value: string;
forcedValue?: string;
declare function useLinesCount({ value, lines }: {
value?: string;
lines?: {
number: string;
text: string;
}[];
}): void;
export default useLinesCount;
2 changes: 1 addition & 1 deletion dist/esm/types/components/ToggleButton/ToggleButton.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference types="react" />
import './ToggleButton.scss';
declare type Option = {
type Option = {
label: string;
value: string;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference types="react" />
import './ipRangeTextBox.scss';
declare type Subnet = {
type Subnet = {
ip: string;
mask: string;
};
Expand Down
2 changes: 1 addition & 1 deletion dist/esm/types/consts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export declare const SEVERITY_MINOR = "MINOR";
export declare const SEVERITY_MAJOR = "MAJOR";
export declare const SEVERITY_CRITICAL = "CRITICAL";
export declare const SEVERITIES: readonly ["DEBUG", "INFO", "WARNING", "MINOR", "MAJOR", "CRITICAL"];
export declare type Severities = typeof SEVERITIES[number];
export type Severities = typeof SEVERITIES[number];
export declare const SEVERITIES_ICONS: SeverityIcons;
interface ShortRoles {
[key: string]: any;
Expand Down
10 changes: 5 additions & 5 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ interface FormSwitchProps {
}
declare function FormSwitch({ onChange, oneColor, value, label, placeholder, isRequired, info, ...rest }: FormSwitchProps): JSX.Element;

declare type Subnet = {
type Subnet = {
ip: string;
mask: string;
};
Expand Down Expand Up @@ -303,7 +303,7 @@ declare namespace TextEditor {

declare function Loader(): JSX.Element;

declare type menuItem = {
type menuItem = {
hideMenu?: boolean;
key?: string;
text?: string;
Expand Down Expand Up @@ -372,7 +372,7 @@ declare namespace Toast {
var propTypes: {};
}

declare type Option$1 = {
type Option$1 = {
label: string;
value: string;
};
Expand Down Expand Up @@ -450,7 +450,7 @@ declare function useUrlFilters(props: {
(filters: ExtendedFilter[] | ((prevState: ExtendedFilter[]) => ExtendedFilter[])) => void
];

declare type FilterComponent = typeof DateFilter | typeof MultiSelectFilter | typeof SelectFilter | typeof SeverityFilter | typeof TextFilter;
type FilterComponent = typeof DateFilter | typeof MultiSelectFilter | typeof SelectFilter | typeof SeverityFilter | typeof TextFilter;
interface RowAction {
hideAction: boolean | ((original: object) => boolean);
action?: ((original: object) => void) | (() => void);
Expand All @@ -469,7 +469,7 @@ interface CustomCellProps<Data extends Record<string, unknown>> {
cell: CellProps<Data>;
column: Column<Data>;
}
declare type Column<Data extends Record<string, unknown>> = Omit<Column$1<Data>, 'Filter' | 'Cell' | 'id' | 'accessor'> & {
type Column<Data extends Record<string, unknown>> = Omit<Column$1<Data>, 'Filter' | 'Cell' | 'id' | 'accessor'> & {
onClickCell?: (values: Data) => void;
Cell?: React.FC<CustomCellProps<Data>>;
defaultHidden?: boolean;
Expand Down
Loading

0 comments on commit 3cffb92

Please sign in to comment.