test-jsonforms-react-spectrum-renderers
Version:
React Spectrum Renderer Set for JSONForms
33 lines (32 loc) • 1.51 kB
TypeScript
import React from 'react';
import { ControlElement, JsonFormsRendererRegistryEntry, JsonFormsState, JsonSchema, UISchemaElement, UISchemaTester } from '@jsonforms/core';
import { JsonFormsStateContext } from '@jsonforms/react';
import './SpectrumArrayItem.css';
export interface OwnPropsOfSpectrumArrayItem {
index: number;
expanded: boolean;
path: string;
schema: JsonSchema;
handleExpand(index: number): () => void;
removeItem(path: string, value: number): () => void;
uischema: ControlElement;
renderers?: JsonFormsRendererRegistryEntry[];
uischemas?: {
tester: UISchemaTester;
uischema: UISchemaElement;
}[];
}
export interface StatePropsOfSpectrumArrayItem extends OwnPropsOfSpectrumArrayItem {
childLabel: string;
}
/**
* Map state to control props.
* @param state the store's state
* @param ownProps any own props
* @returns {StatePropsOfControl} state props for a control
*/
export declare const mapStateToSpectrumArrayItemProps: (state: JsonFormsState, ownProps: OwnPropsOfSpectrumArrayItem) => StatePropsOfSpectrumArrayItem;
export declare const ctxToSpectrumArrayItemProps: (ctx: JsonFormsStateContext, ownProps: OwnPropsOfSpectrumArrayItem) => StatePropsOfSpectrumArrayItem;
export declare const withJsonFormsSpectrumArrayItemProps: (Component: React.ComponentType<StatePropsOfSpectrumArrayItem>) => React.ComponentType<any>;
declare const _default: React.ComponentType<any>;
export default _default;