test-jsonforms-react-spectrum-renderers
Version:
React Spectrum Renderer Set for JSONForms
34 lines (33 loc) • 1.62 kB
TypeScript
import React from 'react';
import { ControlElement, JsonFormsRendererRegistryEntry, JsonFormsState, JsonSchema, UISchemaElement, UISchemaTester } from '@jsonforms/core';
import { JsonFormsStateContext } from '@jsonforms/react';
import './SpectrumArrayModalItem.css';
export interface OwnPropsOfSpectrumArrayModalItem {
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 StatePropsOfSpectrumArrayModalItem extends OwnPropsOfSpectrumArrayModalItem {
childLabel: string;
childData: any;
}
/**
* Map state to control props.No indexOfFittingSchema found
* @param state the store's state
* @param ownProps any own props
* @returns {StatePropsOfControl} state props for a control
*/
export declare const mapStateToSpectrumArrayModalItemProps: (state: JsonFormsState, ownProps: OwnPropsOfSpectrumArrayModalItem) => StatePropsOfSpectrumArrayModalItem;
export declare const ctxToSpectrumArrayModalItemProps: (ctx: JsonFormsStateContext, ownProps: OwnPropsOfSpectrumArrayModalItem) => StatePropsOfSpectrumArrayModalItem;
export declare const withJsonFormsSpectrumArrayModalItemProps: (Component: React.ComponentType<StatePropsOfSpectrumArrayModalItem>) => React.ComponentType<any>;
declare const _default: React.ComponentType<any>;
export default _default;