Skip to content

Commit

Permalink
UI: add search, copy and collapseAll to JsonEditor, add Copy component
Browse files Browse the repository at this point in the history
  • Loading branch information
sofa-tata authored and mvoloshin0458 committed Jul 7, 2023
1 parent c3d7f6a commit f4d16c3
Show file tree
Hide file tree
Showing 24 changed files with 1,774 additions and 1,484 deletions.
12 changes: 6 additions & 6 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.

8 changes: 8 additions & 0 deletions dist/cjs/types/components/Copy/Copy.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/// <reference types="react" />
import './copy.scss';
interface CopyProps {
text: string;
extraClass?: string;
}
declare function Copy({ text, extraClass }: CopyProps): JSX.Element;
export default Copy;
1 change: 1 addition & 0 deletions dist/cjs/types/components/Copy/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from './Copy';
4 changes: 4 additions & 0 deletions dist/cjs/types/components/JsonEditor/JsonEditor.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
/// <reference types="react" />
import 'ace-builds/src-noconflict/mode-json';
import 'ace-builds/src-min-noconflict/ext-searchbox';
import './jsonEditor.scss';
interface JsonEditorProps {
onChange?: () => void;
readOnly?: boolean;
value?: string;
onValidate?: () => void;
extraClass?: string;
allowSearch?: boolean;
allowCopy?: boolean;
shouldFoldAll?: boolean;
[key: string]: any;
}
declare function JsonEditor(props: JsonEditorProps): JSX.Element;
Expand Down
1 change: 1 addition & 0 deletions dist/cjs/types/components/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,4 @@ export { default as FilterButton } from './FilterButton';
export { default as FilterHeader } from './Table/filters/FilterHeader';
export { default as FilterBox } from './FilterBox';
export { default as EntityCell } from './Table/cells/EntityCell';
export { default as Copy } from './Copy';
1 change: 1 addition & 0 deletions dist/cjs/types/svgs/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ export { ReactComponent as Warning } from './031-warning-24.svg';
export { ReactComponent as ThinArrow } from './079-arrow-12.svg';
export { ReactComponent as User } from './017-user-16.svg';
export { ReactComponent as Weka } from './043-weka-16.svg';
export { ReactComponent as CheckMark } from './016-checkmark-10.svg';
14 changes: 7 additions & 7 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.

8 changes: 8 additions & 0 deletions dist/esm/types/components/Copy/Copy.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/// <reference types="react" />
import './copy.scss';
interface CopyProps {
text: string;
extraClass?: string;
}
declare function Copy({ text, extraClass }: CopyProps): JSX.Element;
export default Copy;
1 change: 1 addition & 0 deletions dist/esm/types/components/Copy/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from './Copy';
4 changes: 4 additions & 0 deletions dist/esm/types/components/JsonEditor/JsonEditor.d.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
/// <reference types="react" />
import 'ace-builds/src-noconflict/mode-json';
import 'ace-builds/src-min-noconflict/ext-searchbox';
import './jsonEditor.scss';
interface JsonEditorProps {
onChange?: () => void;
readOnly?: boolean;
value?: string;
onValidate?: () => void;
extraClass?: string;
allowSearch?: boolean;
allowCopy?: boolean;
shouldFoldAll?: boolean;
[key: string]: any;
}
declare function JsonEditor(props: JsonEditorProps): JSX.Element;
Expand Down
1 change: 1 addition & 0 deletions dist/esm/types/components/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,4 @@ export { default as FilterButton } from './FilterButton';
export { default as FilterHeader } from './Table/filters/FilterHeader';
export { default as FilterBox } from './FilterBox';
export { default as EntityCell } from './Table/cells/EntityCell';
export { default as Copy } from './Copy';
1 change: 1 addition & 0 deletions dist/esm/types/svgs/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ export { ReactComponent as Warning } from './031-warning-24.svg';
export { ReactComponent as ThinArrow } from './079-arrow-12.svg';
export { ReactComponent as User } from './017-user-16.svg';
export { ReactComponent as Weka } from './043-weka-16.svg';
export { ReactComponent as CheckMark } from './016-checkmark-10.svg';
11 changes: 10 additions & 1 deletion dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,9 @@ interface JsonEditorProps {
value?: string;
onValidate?: () => void;
extraClass?: string;
allowSearch?: boolean;
allowCopy?: boolean;
shouldFoldAll?: boolean;
[key: string]: any;
}
declare function JsonEditor(props: JsonEditorProps): JSX.Element;
Expand Down Expand Up @@ -630,6 +633,12 @@ declare function FilterBox({ name, value: value, onDelete }: FilterBoxProps): JS

declare function EntityCell({ cell }: CustomCellProps): JSX.Element;

interface CopyProps {
text: string;
extraClass?: string;
}
declare function Copy({ text, extraClass }: CopyProps): JSX.Element;

declare const utils: {
insensitiveSort: typeof insensitiveSort;
isEllipsisActive(element: HTMLElement): boolean;
Expand Down Expand Up @@ -682,4 +691,4 @@ declare const utils: {
declare function insensitiveSort<Arr extends string[] | number[]>(array: Arr): Arr;
declare function insensitiveSort<Arr extends Record<Key, string>[] | Record<Key, number>[], Key extends string>(array: Arr, key: Key): Arr;

export { ActionsCell, ApiCallCell, BarCell, BlocksCell, Button, CapacityBar, CapacityCell, Checkbox, CircularProgress, CloseButton, Column, CustomTooltipCell, DataInfo, DateCell, DateFilter, DateTimePicker, EmptyPageMessage, EntityCell, ErrorPage, FilterBox, FilterButton, FilterHeader, FormSwitch, IconButtonCell, IconCell, Info, IpRangeTextBox, IpSubnetTextBox, IpTextBox, JsonBox, JsonEditor, Loader, LoginField, MenuPopper, MultiSelectFilter, MultilineCell, NewPasswordTooltip, NodeCell, NumInput, Pagination, PerPage, ProgressCell, RadioSwitch, Select, SelectFilter, SeverityCell, SeverityFilter, SpanTooltip, StatusCell, Switch, SwitchCell, Tab, _default as Table, TagsBox, TextArea, TextBox, TextField, TextFilter, TextSelectBox, TieringCell, TimeCell, Toast, ToggleButton, Tooltip, UploadField, UptimeCell, utils as Utils, useUrlFilters };
export { ActionsCell, ApiCallCell, BarCell, BlocksCell, Button, CapacityBar, CapacityCell, Checkbox, CircularProgress, CloseButton, Column, Copy, CustomTooltipCell, DataInfo, DateCell, DateFilter, DateTimePicker, EmptyPageMessage, EntityCell, ErrorPage, FilterBox, FilterButton, FilterHeader, FormSwitch, IconButtonCell, IconCell, Info, IpRangeTextBox, IpSubnetTextBox, IpTextBox, JsonBox, JsonEditor, Loader, LoginField, MenuPopper, MultiSelectFilter, MultilineCell, NewPasswordTooltip, NodeCell, NumInput, Pagination, PerPage, ProgressCell, RadioSwitch, Select, SelectFilter, SeverityCell, SeverityFilter, SpanTooltip, StatusCell, Switch, SwitchCell, Tab, _default as Table, TagsBox, TextArea, TextBox, TextField, TextFilter, TextSelectBox, TieringCell, TimeCell, Toast, ToggleButton, Tooltip, UploadField, UptimeCell, utils as Utils, useUrlFilters };
Loading

0 comments on commit f4d16c3

Please sign in to comment.