How to use the @jsonforms/react.withJsonFormsLayoutProps function in @jsonforms/react

To help you get started, we’ve selected a few @jsonforms/react examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github eclipsesource / jsonforms / packages / material / src / layouts / MaterialCategorizationLayout.tsx View on Github external
hasOwnState = () => {
    return this.props.ownState !== undefined ? this.props.ownState : true;
  };

  private handleChange = (_event: any, value: any) => {
    if (this.props.onChange) {
      this.props.onChange(value, this.state.activeCategory);
    }
    const hasOwnState = this.hasOwnState();
    if (hasOwnState) {
      this.setState({ activeCategory: value });
    }
  };
}

export default withJsonFormsLayoutProps(MaterialCategorizationLayoutRenderer);
github eclipsesource / jsonforms / packages / material / src / additional / MaterialLabelRenderer.tsx View on Github external
/**
 * Default renderer for a label.
 */
export const MaterialLabelRenderer = ({ uischema, visible }: OwnPropsOfRenderer) => {
  const labelElement: LabelElement = uischema as LabelElement;
  return (
    
      
        {labelElement.text !== undefined && labelElement.text !== null && labelElement.text}
      
    
  );
};

export default withJsonFormsLayoutProps(MaterialLabelRenderer);
github eclipsesource / jsonforms / packages / vanilla / src / layouts / GroupLayout.tsx View on Github external
<fieldset hidden="{visible">
      {
        !isEmpty(group.label) ?
          <legend>
            {group.label}
          </legend> : ''
      }
      {renderChildren(group, schema, childClassNames, path)}
    </fieldset>
  );
};

export default withVanillaControlProps(withJsonFormsLayoutProps(GroupLayoutRenderer));
github eclipsesource / jsonforms / packages / material / src / layouts / MaterialCategorizationStepperLayout.tsx View on Github external
this.handleStep(idx)}&gt;
                  {e.label}
                
              
            ))
          }
        
        <div>
          
        </div>
      
    );
  }
}

export default withJsonFormsLayoutProps(MaterialCategorizationStepperLayoutRenderer);
github eclipsesource / jsonforms / packages / vanilla / src / layouts / HorizontalLayout.tsx View on Github external
{renderChildren(horizontalLayout, schema, childClassNames, path)}
    
  );
};

export default withVanillaControlProps(withJsonFormsLayoutProps(HorizontalLayoutRenderer));
github eclipsesource / jsonforms / packages / material / src / layouts / MaterialHorizontalLayout.tsx View on Github external
export const MaterialHorizontalLayoutRenderer = ({ uischema, renderers, schema, path, enabled, visible }: LayoutProps) =&gt; {
  const layout = uischema as HorizontalLayout;
  const childProps: MaterialLayoutRendererProps = {
    elements: layout.elements,
    schema,
    path,
    enabled,
    direction: 'row',
    visible
  };

  return ;
};

export default withJsonFormsLayoutProps(MaterialHorizontalLayoutRenderer);
github eclipsesource / jsonforms / packages / vanilla / src / complex / categorization / CategorizationRenderer.tsx View on Github external
private findCategory(categorization: Categorization): Category {
    const category = categorization.elements[0];

    if (this.state && this.state.selectedCategory) {
      return this.state.selectedCategory;
    }

    if (isCategorization(category)) {
      return this.findCategory(category);
    }

    return category;
  }
}

export default withVanillaControlProps(withJsonFormsLayoutProps(CategorizationRenderer));
github eclipsesource / jsonforms / packages / material / src / layouts / MaterialGroupLayout.tsx View on Github external
return (
    
  );
};

export default withJsonFormsLayoutProps(MaterializedGroupLayoutRenderer);

export const materialGroupTester: RankedTester = withIncreasedRank(
  1,
  groupTester
);
github eclipsesource / jsonforms / packages / material / src / layouts / MaterialVerticalLayout.tsx View on Github external
export const MaterialVerticalLayoutRenderer = ({ uischema, schema, path, enabled, visible, renderers }: LayoutProps) =&gt; {
  const verticalLayout = uischema as VerticalLayout;
  const childProps: MaterialLayoutRendererProps = {
    elements: verticalLayout.elements,
    schema,
    path,
    enabled,
    direction: 'column',
    visible
  };

  return ;
};

export default withJsonFormsLayoutProps(MaterialVerticalLayoutRenderer);
github eclipsesource / jsonforms / packages / vanilla / src / complex / LabelRenderer.tsx View on Github external
({ uischema, visible, getStyleAsClassName }) =&gt; {
    const labelElement: LabelElement = uischema as LabelElement;
    const classNames = getStyleAsClassName('label-control');
    const isHidden = !visible;

    return (
      <label hidden="{isHidden}">
        {labelElement.text !== undefined &amp;&amp; labelElement.text !== null &amp;&amp; labelElement.text}
      </label>
    );
  };

export default withVanillaControlProps(withJsonFormsLayoutProps(LabelRenderer));