1 | import React from 'react';
|
2 | import { StylingFunction } from 'react-base16-styling';
|
3 | export type Key = string | number;
|
4 | export type KeyPath = readonly (string | number)[];
|
5 | export type GetItemString = (nodeType: string, data: unknown, itemType: React.ReactNode, itemString: string, keyPath: KeyPath) => React.ReactNode;
|
6 | export type LabelRenderer = (keyPath: KeyPath, nodeType: string, expanded: boolean, expandable: boolean) => React.ReactNode;
|
7 | export type ValueRenderer = (valueAsString: unknown, value: unknown, ...keyPath: KeyPath) => React.ReactNode;
|
8 | export type ShouldExpandNodeInitially = (keyPath: KeyPath, data: unknown, level: number) => boolean;
|
9 | export type PostprocessValue = (value: unknown) => unknown;
|
10 | export type IsCustomNode = (value: unknown) => boolean;
|
11 | export type SortObjectKeys = ((a: unknown, b: unknown) => number) | boolean;
|
12 | export type Styling = StylingFunction;
|
13 | export type CircularCache = unknown[];
|
14 | export interface CommonExternalProps {
|
15 | keyPath: KeyPath;
|
16 | labelRenderer: LabelRenderer;
|
17 | valueRenderer: ValueRenderer;
|
18 | shouldExpandNodeInitially: ShouldExpandNodeInitially;
|
19 | hideRoot: boolean;
|
20 | getItemString: GetItemString;
|
21 | postprocessValue: PostprocessValue;
|
22 | isCustomNode: IsCustomNode;
|
23 | collectionLimit: number;
|
24 | sortObjectKeys: SortObjectKeys;
|
25 | }
|
26 | export interface CommonInternalProps extends CommonExternalProps {
|
27 | styling: StylingFunction;
|
28 | circularCache?: CircularCache;
|
29 | level?: number;
|
30 | isCircular?: boolean;
|
31 | }
|
32 |
|
\ | No newline at end of file |