How to use the @jsonforms/core.computeLabel function in @jsonforms/core

To help you get started, we’ve selected a few @jsonforms/core 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 / vanilla / src / controls / InputControl.tsx View on Github external
cell === undefined ||
      cell.tester(uischema, schema) === NOT_APPLICABLE
    ) {
      console.warn('No applicable cell found.', uischema, schema);
      return null;
    } else {
      return (
        <div id="{id}" hidden="{!visible}">
          <label>
            {computeLabel(
              labelText,
              required,
              appliedUiSchemaOptions.hideRequiredAsterisk
            )}
          </label>
          
          <div>
            {!isValid ? errors : showDescription ? description : null}
          </div>
        </div>
      );
github eclipsesource / jsonforms / packages / material / src / controls / MaterialNativeControl.tsx View on Github external
this.props.uischema.options
    );
    const onChange = (ev: any) =&gt; handleChange(path, ev.target.value);
    const fieldType = schema.format;
    const showDescription = !isDescriptionHidden(
      visible,
      description,
      this.state.isFocused,
      appliedUiSchemaOptions.showUnfocusedDescription
    );

    return (
github eclipsesource / jsonforms / packages / material / src / controls / MaterialSliderControl.tsx View on Github external
const showDescription = !isDescriptionHidden(
      visible,
      description,
      this.state.isFocused,
      appliedUiSchemaOptions.showUnfocusedDescription
    );
    return (
      
        
          
            {computeLabel(
              isPlainLabel(label) ? label : label.default,
              required,
              appliedUiSchemaOptions.hideRequiredAsterisk
            )}
          
          <div style="{rangeContainerStyle}">
            
              {schema.minimum}
            
            
              {schema.maximum}
            
          </div>
github eclipsesource / jsonforms / packages / vanilla / src / controls / RadioGroupControl.tsx View on Github external
description,
      this.state.isFocused,
      appliedUiSchemaOptions.showUnfocusedDescription
    );

    const options = schema.enum;

    return (
      <div hidden="{!visible}">
        <label>
          {computeLabel(
            isPlainLabel(label) ? label : label.default,
            required,
            appliedUiSchemaOptions.hideRequiredAsterisk
          )}
        </label>

        <div style="{groupStyle}">
          {options.map(optionValue =&gt; (
            <div>
              <input checked="{data" name="{id}" id="{optionValue}" value="{optionValue}" type="radio"> this.handleChange(ev.currentTarget.value)}</div></div></div>
github eclipsesource / jsonforms / packages / material / src / controls / MaterialDateTimeControl.tsx View on Github external
required,
      path,
      handleChange,
      data,
      config
    } = this.props;
    const appliedUiSchemaOptions = merge({}, config, uischema.options);
    const isValid = errors.length === 0;
    const inputProps = {};

    return (
      
        
          
              handleChange(path, datetime ? moment(datetime).format() : '')
            }
            format='MM/DD/YYYY h:mm a'
            clearable={true}
github eclipsesource / jsonforms / packages / material / src / layouts / MaterialArrayLayout.tsx View on Github external
renderers,
      label,
      required,
      rootSchema,
      config
    } = this.props;
    const appliedUiSchemaOptions = merge(
      {},
      config,
      this.props.uischema.options
    );

    return (
      <div>
        
        <div>
          {data &gt; 0 ? (
            map(range(data), index =&gt; {
              return (
                </div></div>
github eclipsesource / jsonforms / packages / material / src / controls / MaterialRadioGroupControl.tsx View on Github external
);

    const options = schema.enum;

    return (
      
        
          
            {computeLabel(
              isPlainLabel(label) ? label : label.default,
              required,
              appliedUiSchemaOptions.hideRequiredAsterisk
            )}
          

           this.handleChange(value)}
            row={true}
          &gt;
            {options.map(optionValue =&gt; (
              }
github eclipsesource / jsonforms / packages / material / src / controls / MaterialInputControl.tsx View on Github external
const InnerComponent = input;
    return (
      
        
          
            {computeLabel(
              isPlainLabel(label) ? label : label.default,
              required,
              appliedUiSchemaOptions.hideRequiredAsterisk
            )}
          
          
          
            {firstFormHelperText}
          
          
            {secondFormHelperText}
github eclipsesource / jsonforms / packages / material / src / controls / MaterialDateControl.tsx View on Github external
if (isPlainLabel(label)) {
      labelText = label;
      labelCancel = 'Cancel';
      labelClear = 'Clear';
    } else {
      labelText = defaultLabel;
      labelCancel = startsWith(cancelLabel, '%') ? 'Cancel' : cancelLabel;
      labelClear = startsWith(clearLabel, '%') ? 'Clear' : clearLabel;
    }

    return (
      
        
          
              handleChange(
                path,
                datetime ? moment(datetime).format('YYYY-MM-DD') : ''
              )
            }
            format={localeDateTimeFormat}
github eclipsesource / jsonforms / packages / material / src / additional / MaterialListWithDetailRenderer.tsx View on Github external
[createDefaultValue]
  );
  const foundUISchema = findUISchema(
    uischemas,
    schema,
    uischema.scope,
    path,
    undefined,
    uischema
  );
  const appliedUiSchemaOptions = merge({}, config, uischema.options);

  return (
    
      
      
        
          
            {data &gt; 0 ? (
              map(range(data), index =&gt; (