UNPKG

@jsonforms/material-tree-renderer

Version:

Material-based tree renderer for JSON Forms

47 lines (46 loc) 2.17 kB
import React from 'react'; import { Property } from '../services/property.util'; export interface ExpandArrayProps { rootData: any; containmentProps?: Property[]; path: string; selection: any; handlers: any; filterPredicate: any; labelProvider: any; imageProvider: any; } /** * Expands the given data array by expanding every element. * If the parent data containing the array is provided, * a suitable delete function for the expanded elements is created. * * @param data the array to expand * @param {@link Property} property It describes a single property. * It is used to match a given data element with a schema by searching * a list of properties. * * @param parentPath the instance path where data can be obtained from */ export declare const ExpandArray: ({ rootData, containmentProps, path, selection, handlers, filterPredicate, labelProvider, imageProvider }: ExpandArrayProps) => any; export interface ExpandArrayContainerProps extends ExpandArrayProps { connectDropTarget?: any; /** True if drag and drop is currently in progress. */ isDragging?: boolean; /** The dragged element is over this expanded array excluding nested arrays. */ isOver?: boolean; /** Whether this list is a valid drop target for the currently dragged element. */ validDropTarget?: boolean; classes?: any; moveListItem(data: any, oldPath: string, newPath: string): boolean; } export interface ExandArrayContainerState { /** * Defines whether CSS to highlight the list being a valid or invalid drop target should be shown. * This is necessary to prevent a Chrome bug that may cancel drag and drop prematurely * if the DOM is changed during the 'begin drag' event of HTML5. */ setCss: boolean; } declare const _default: import("react-redux").ConnectedComponent<React.ComponentClass<ExpandArrayContainerProps, any>, Pick<ExpandArrayContainerProps, "path" | "classes" | "filterPredicate" | "imageProvider" | "selection" | "handlers" | "labelProvider" | "connectDropTarget" | "isDragging" | "isOver" | "validDropTarget" | "containmentProps">>; export default _default;