Variables
Const GroupLayoutRendererComponent
Group
LayoutRendererComponent: FunctionComponent<LayoutProps & VanillaRendererProps> = React.memo(function GroupLayoutRendererComponent({schema,uischema,path,enabled,visible,label,getStyle,getStyleAsClassName,}: LayoutProps & VanillaRendererProps) {const group = uischema as GroupLayout;const elementsSize = group.elements ? group.elements.length : 0;const classNames = getStyleAsClassName('group.layout');const childClassNames = ['group-layout-item'].concat(getStyle('group.layout.item', elementsSize)).join(' ');return (<fieldsetclassName={classNames}hidden={visible === undefined || visible === null ? false : !visible}>{!isEmpty(label) ? (<legend className={getStyleAsClassName('group.label')}>{label}</legend>) : ('')}{renderChildren(group, schema, childClassNames, path, enabled)}</fieldset>);})
Const HorizontalLayoutRendererComponent
Horizontal
LayoutRendererComponent: FunctionComponent<RendererProps & VanillaRendererProps> = React.memo(function HorizontalLayoutRendererComponent({schema,uischema,getStyle,getStyleAsClassName,enabled,visible,path,}: RendererProps & VanillaRendererProps) {const horizontalLayout = uischema as HorizontalLayout;const elementsSize = horizontalLayout.elements? horizontalLayout.elements.length: 0;const layoutClassName = getStyleAsClassName('horizontal.layout');const childClassNames = ['horizontal-layout-item'].concat(getStyle('horizontal.layout.item', elementsSize)).join(' ');return (<JsonFormsLayoutclassName={layoutClassName}visible={visible}enabled={enabled}path={path}uischema={uischema}schema={schema}getStyle={getStyle}getStyleAsClassName={getStyleAsClassName}>{renderChildren(horizontalLayout, schema, childClassNames, path, enabled)}</JsonFormsLayout>);})
Const JsonFormsStyleContext
Json
FormsStyleContext: Context<StyleContext> = React.createContext(defaultContext)
Const REGISTER_STYLE
REGISTER_STYLE: "REGISTER_STYLE" = "REGISTER_STYLE"
Const REGISTER_STYLES
REGISTER_STYLES: "REGISTER_STYLES" = "REGISTER_STYLES"
Const UNREGISTER_STYLE
UNREGISTER_STYLE: "UNREGISTER_STYLE" = "UNREGISTER_STYLE"
Const VerticalLayoutRendererComponent
Vertical
LayoutRendererComponent: FunctionComponent<RendererProps & VanillaRendererProps> = React.memo(function VerticalLayoutRendererComponent({schema,uischema,path,visible,enabled,getStyle,getStyleAsClassName,}: RendererProps & VanillaRendererProps) {const verticalLayout = uischema as VerticalLayout;const elementsSize = verticalLayout.elements? verticalLayout.elements.length: 0;const layoutClassName = getStyleAsClassName('vertical.layout');const childClassNames = ['vertical-layout-item'].concat(getStyle('vertical.layout.item', elementsSize)).join(' ');return (<JsonFormsLayoutclassName={layoutClassName}uischema={uischema}schema={schema}visible={visible}enabled={enabled}path={path}getStyle={getStyle}getStyleAsClassName={getStyleAsClassName}>{renderChildren(verticalLayout, schema, childClassNames, path, enabled)}</JsonFormsLayout>);})
Const arrayControlTester
arrayControlTester: RankedTester = rankWith(4,isObjectArrayWithNesting)
Const booleanCellTester
booleanCellTester: RankedTester = rankWith(2, isBooleanControl)
Const categorizationTester
categorizationTester: RankedTester = rankWith(1,and(uiTypeIs('Categorization'), (uischema) => {const hasCategory = (element: Categorization): boolean => {if (isEmpty(element.elements)) {return false;}return element.elements.map((elem) =>isCategorization(elem) ? hasCategory(elem) : elem.type === 'Category').reduce((prev, curr) => prev && curr, true);};return hasCategory(uischema as Categorization);}))
convertToValidClassName
convertToValidClassName: convertToValidClassName
Const dateCellTester
dateCellTester: RankedTester = rankWith(2, isDateControl)
Const dateTimeCellTester
dateTimeCellTester: RankedTester = rankWith(2, isDateTimeControl)
Const enumCellTester
enumCellTester: RankedTester = rankWith(2, isEnumControl)
Const groupTester
groupTester: RankedTester = rankWith(1, uiTypeIs('Group'))
Const horizontalLayoutTester
horizontalLayoutTester: RankedTester = rankWith(1,uiTypeIs('HorizontalLayout'))
Const inputControlTester
inputControlTester: RankedTester = rankWith(1, isControl)
Const integerCellTester
integerCellTester: RankedTester = rankWith(2, isIntegerControl)
isObjectArrayControl
isObjectArrayControl: Tester
isPrimitiveArrayControl
isPrimitiveArrayControl: Tester
Const labelRendererTester
labelRendererTester: RankedTester = rankWith(1, uiTypeIs('Label'))
Const numberCellTester
numberCellTester: RankedTester = rankWith(2, isNumberControl)
Const numberFormatCellTester
numberFormatCellTester: RankedTester = rankWith(4,isNumberFormatControl)
Const oneOfRadioGroupControlTester
oneOfRadioGroupControlTester: RankedTester = rankWith(3,and(isOneOfEnumControl, optionIs('format', 'radio')))
or
or: (...testers: Tester[]) => Tester
Type declaration
-
- (...testers: Tester[]): Tester
-
Parameters
-
Rest ...testers: Tester[]
Returns Tester
Const radioGroupControlTester
radioGroupControlTester: RankedTester = rankWith(3,and(isEnumControl, optionIs('format', 'radio')))
rankWith
rankWith: (rank: number, tester: Tester) => (uischema: UISchemaElement, schema: JsonSchema, context: TesterContext) => number
Type declaration
-
- (rank: number, tester: Tester): (uischema: UISchemaElement, schema: JsonSchema, context: TesterContext) => number
-
Parameters
-
rank: number
-
tester: Tester
Returns (uischema: UISchemaElement, schema: JsonSchema, context: TesterContext) => number
-
- (uischema: UISchemaElement, schema: JsonSchema, context: TesterContext): number
-
Parameters
-
uischema: UISchemaElement
-
schema: JsonSchema
-
context: TesterContext
Returns number
Const sliderCellTester
sliderCellTester: RankedTester = rankWith(4, isRangeControl)
Const tableArrayControlTester
tableArrayControlTester: RankedTester = rankWith(3,or(isObjectArrayControl, isPrimitiveArrayControl))
Const textAreaCellTester
textAreaCellTester: RankedTester = rankWith(2, isMultiLineControl)
Const textCellTester
textCellTester: RankedTester = rankWith(1, isStringControl)
Const timeCellTester
timeCellTester: RankedTester = rankWith(2, isTimeControl)
Const vanillaCells
vanillaCells: { cell: any; tester: RankedTester }[] = [{ tester: booleanCellTester, cell: BooleanCell },{ tester: dateCellTester, cell: DateCell },{ tester: dateTimeCellTester, cell: DateTimeCell },{ tester: enumCellTester, cell: EnumCell },{ tester: integerCellTester, cell: IntegerCell },{ tester: numberCellTester, cell: NumberCell },{ tester: sliderCellTester, cell: SliderCell },{ tester: textAreaCellTester, cell: TextAreaCell },{ tester: textCellTester, cell: TextCell },{ tester: timeCellTester, cell: TimeCell },]
Const vanillaRenderers
vanillaRenderers: { renderer: any; tester: RankedTester }[] = [{ tester: inputControlTester, renderer: InputControl },{ tester: radioGroupControlTester, renderer: RadioGroupControl },{ tester: oneOfRadioGroupControlTester, renderer: OneOfRadioGroupControl },{ tester: arrayControlTester, renderer: ArrayControl },{ tester: labelRendererTester, renderer: LabelRenderer },{ tester: categorizationTester, renderer: Categorization },{ tester: tableArrayControlTester, renderer: TableArrayControl },{ tester: groupTester, renderer: GroupLayout },{ tester: verticalLayoutTester, renderer: VerticalLayout },{ tester: horizontalLayoutTester, renderer: HorizontalLayout },]
Const vanillaStyles
vanilla
Styles: StyleDef[] = [{name: 'control',classNames: ['control'],},{name: 'control.trim',classNames: ['trim'],},{name: 'control.input',classNames: ['input'],},{name: 'control.select',classNames: ['select'],},{name: 'control.checkbox',classNames: ['checkbox'],},{name: 'control.radio',classNames: ['radio'],},{name: 'control.radio.option',classNames: ['radio-option'],},{name: 'control.radio.input',classNames: ['radio-input'],},{name: 'control.radio.label',classNames: ['radio-label'],},{name: 'control.validation.error',classNames: ['validation_error'],},{name: 'control.validation',classNames: ['validation'],},{name: 'categorization',classNames: ['categorization'],},{name: 'categorization.master',classNames: ['categorization-master'],},{name: 'categorization.detail',classNames: ['categorization-detail'],},{name: 'category.group',classNames: ['category-group'],},{name: 'category.subcategories',classNames: ['category-subcategories'],},{name: 'array.layout',classNames: ['array-layout'],},{name: 'array.children',classNames: ['children'],},{name: 'group.layout',classNames: ['group-layout'],},{name: 'horizontal.layout',classNames: ['horizontal-layout'],},{name: 'horizontal.layout.item',classNames: ([size]: number[]) => [`horizontal-layout-${size}`],},{name: 'vertical.layout',classNames: ['vertical-layout'],},{name: 'array.table.validation.error',classNames: ['validation_error'],},{name: 'array.table.validation',classNames: ['validation'],},{name: 'array.table',classNames: ['array-table-layout', 'control'],},{name: 'array.control.validation.error',classNames: ['validation_error'],},{name: 'array.control.validation',classNames: ['validation'],},{name: 'array.control.add',classNames: ['button-add'],},{name: 'array.child.controls',classNames: ['child-controls'],},{name: 'array.child.controls.up',classNames: ['button-up'],},{name: 'array.child.controls.down',classNames: ['button-down'],},{name: 'array.child.controls.delete',classNames: ['button-delete'],},{name: 'array.control',classNames: ['array-control-layout', 'control'],},{name: 'input.description',classNames: ['input-description'],},]
Const verticalLayoutTester
verticalLayoutTester: RankedTester = rankWith(1,uiTypeIs('VerticalLayout'))
Const withVanillaBooleanCellProps
withVanillaBooleanCellProps: (Anonymous function) = withVanillaCellPropsForType('control.checkbox')
Const withVanillaCellProps
withVanillaCellProps: (Anonymous function) = withVanillaCellPropsForType('control.input')
Const withVanillaEnumCellProps
withVanillaEnumCellProps: (Anonymous function) = withVanillaCellPropsForType('control.select')
Default tester for boolean controls.