How to use the @jsonforms/react.withJsonFormsControlProps 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 / controls / MaterialRadioGroupControl.tsx View on Github external
))}
          
          
            {!isValid ? errors : showDescription ? description : null}
          
        
      
    );
  }
}

export const materialRadioGroupControlTester: RankedTester = rankWith(
  2,
  optionIs('format', 'radio')
);
export default withJsonFormsControlProps(MaterialRadioGroupControl);
github eclipsesource / jsonforms / packages / material / src / controls / MaterialDateControl.tsx View on Github external
);
  }
}

export interface StatePropsOfDateControl extends StatePropsOfControl {
  defaultLabel: string;
  cancelLabel: string;
  clearLabel: string;
}

export const materialDateControlTester: RankedTester = rankWith(
  4,
  isDateControl
);

export default withJsonFormsControlProps(MaterialDateControl);
github eclipsesource / jsonforms / packages / material / src / controls / MaterialDateTimeControl.tsx View on Github external
keyboardIcon={}
            timeIcon={}
            InputProps={inputProps}
          />
        
      
    );
  }
}

export const materialDateTimeControlTester: RankedTester = rankWith(
  2,
  isDateTimeControl
);

export default withJsonFormsControlProps(MaterialDateTimeControl);
github eclipsesource / jsonforms / packages / material / src / controls / MaterialTextControl.tsx View on Github external
RankedTester,
  rankWith
} from '@jsonforms/core';
import { withJsonFormsControlProps } from '@jsonforms/react';
import { MuiInputText } from '../mui-controls/MuiInputText';
import { MaterialInputControl } from './MaterialInputControl';

export const MaterialTextControl = (props: ControlProps) => (
  
);

export const materialTextControlTester: RankedTester = rankWith(
  1,
  isStringControl
);
export default withJsonFormsControlProps(MaterialTextControl);
github eclipsesource / jsonforms / packages / vanilla / src / controls / InputControl.tsx View on Github external
schema={schema}
            path={path}
            id={id + '-input'}
          />
          <div>
            {!isValid ? errors : showDescription ? description : null}
          </div>
        
      );
    }
  }
}

export const inputControlTester: RankedTester = rankWith(1, isControl);

export default withVanillaControlProps(withJsonFormsControlProps(InputControl));
github eclipsesource / jsonforms / packages / material / src / controls / MaterialSliderControl.tsx View on Github external
step={schema.multipleOf || 1}
          /&gt;
          
            {!isValid ? errors : showDescription ? description : null}
          
        
      
    );
  }
}
export const materialSliderControlTester: RankedTester = rankWith(
  4,
  isRangeControl
);

export default withJsonFormsControlProps(MaterialSliderControl);
github eclipsesource / jsonforms / packages / material / src / controls / MaterialAnyOfStringOrEnumControl.tsx View on Github external
s => s !== enumSchema || s !== stringSchema
  );
  const wrongType = remainingSchemas.find(s => s.type && s.type !== 'string');
  return enumSchema && stringSchema && !wrongType;
};
const simpleAnyOf = and(
  uiTypeIs('Control'),
  schemaMatches(
    schema => schema.hasOwnProperty('anyOf') && hasEnumAndText(schema.anyOf)
  )
);
export const materialAnyOfStringOrEnumControlTester: RankedTester = rankWith(
  5,
  simpleAnyOf
);
export default withJsonFormsControlProps(MaterialAnyOfStringOrEnumControl);
github eclipsesource / jsonforms / packages / vanilla / src / controls / RadioGroupControl.tsx View on Github external
onChange={ev =&gt; this.handleChange(ev.currentTarget.value)}
              /&gt;
              <label>{optionValue}</label>
            
          ))}
        
        <div>
          {!isValid ? errors : showDescription ? description : null}
        </div>
      
    );
  }
}

export default withVanillaControlProps(
  withJsonFormsControlProps(RadioGroupControl)
);
github eclipsesource / jsonforms / packages / material / src / controls / MaterialBooleanControl.tsx View on Github external
rootSchema={rootSchema}
            handleChange={handleChange}
            errors={errors}
            config={config}
          /&gt;
        }
      /&gt;
    
  );
};

export const materialBooleanControlTester: RankedTester = rankWith(
  2,
  isBooleanControl
);
export default withJsonFormsControlProps(MaterialBooleanControl);
github eclipsesource / jsonforms / packages / material / src / controls / MaterialNativeControl.tsx View on Github external
helperText={!isValid ? errors : showDescription ? description : null}
          InputLabelProps={{ shrink: true }}
          value={data}
          onChange={onChange}
        /&gt;
      
    );
  }
}

export const materialNativeControlTester: RankedTester = rankWith(
  2,
  or(isDateControl, isTimeControl)
);

export default withJsonFormsControlProps(MaterialNativeControl);