How to use the @jsonforms/core.findUISchema 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 / complex / array / ArrayControl.tsx View on Github external
range(0, data.length).map(index => {
              const foundUISchema = findUISchema(uischemas, schema, uischema.scope, path);
              const childPath = composePaths(path, `${index}`);

              return (
                
              );
            })
          ) : (
github eclipsesource / jsonforms / packages / material / src / additional / MaterialListWithDetailRenderer.tsx View on Github external
setSelectedIndex(undefined);
      } else if (selectedIndex > value) {
        setSelectedIndex(selectedIndex - 1);
      }
    },
    [removeItems, setSelectedIndex]
  );
  const handleListItemClick = useCallback(
    (index: number) => () => setSelectedIndex(index),
    [setSelectedIndex]
  );
  const handleCreateDefaultValue = useCallback(
    () => createDefaultValue(schema),
    [createDefaultValue]
  );
  const foundUISchema = findUISchema(
    uischemas,
    schema,
    uischema.scope,
    path,
    undefined,
    uischema
  );
  const appliedUiSchemaOptions = merge({}, config, uischema.options);

  return (
github eclipsesource / jsonforms / packages / ionic / src / controls / object / object.control.ts View on Github external
mapAdditionalProps(props: ControlWithDetailProps) {
    this.propsPath = props.path;
    this.detailUiSchema = findUISchema(
      props.uischemas,
      props.schema,
      undefined,
      props.path
    );
  }
}
github eclipsesource / jsonforms / packages / material / src / complex / MaterialObjectRenderer.tsx View on Github external
const MaterialObjectRenderer = ({
  renderers,
  uischemas,
  schema,
  label,
  path,
  visible,
  enabled,
  uischema,
  rootSchema
}: StatePropsOfControlWithDetail) => {
  const detailUiSchema = findUISchema(
    uischemas,
    schema,
    uischema.scope,
    path,
    'Group',
    uischema,
    rootSchema
  );
  if (isEmpty(path)) {
    detailUiSchema.type = 'VerticalLayout';
  } else {
    (detailUiSchema as GroupLayout).label = startCase(
      isPlainLabel(label) ? label : label.default
    );
  }
  return (
github eclipsesource / jsonforms / packages / material / src / layouts / ExpandPanelRenderer.tsx View on Github external
moveDown,
    moveUp,
    enableMoveDown,
    enableMoveUp,
    handleExpansion,
    removeItems,
    path,
    rootSchema,
    schema,
    uischema,
    uischemas,
    renderers,
    config
  } = props;

  const foundUISchema = findUISchema(
    uischemas,
    schema,
    uischema.scope,
    path,
    undefined,
    uischema,
    rootSchema
  );

  const appliedUiSchemaOptions = merge({}, config, uischema.options);

  return (
github eclipsesource / jsonforms / packages / angular-material / src / other / master-detail / master.ts View on Github external
mapAdditionalProps(props: ArrayControlProps) {
    const { data, path, schema, uischema } = props;
    const controlElement = uischema as ControlElement;
    this.propsPath = props.path;
    const detailUISchema =
      controlElement.options.detail ||
      findUISchema(
        props.uischemas,
        schema,
        `${controlElement.scope}/items`,
        props.path,
        'VerticalLayout'
      );
    if (!this.isEnabled()) {
      setReadonly(detailUISchema);
    }

    const masterItems = (data || []).map((d: any, index: number) => {
      const labelRefInstancePath = removeSchemaKeywords(
        controlElement.options.labelRef
      );
      const masterItem = {
        label: get(d, labelRefInstancePath),
github eclipsesource / jsonforms / packages / angular-material / src / other / object.renderer.ts View on Github external
mapAdditionalProps(props: ControlWithDetailProps) {
    this.detailUiSchema = findUISchema(
      props.uischemas,
      props.schema,
      undefined,
      props.path,
      'Group'
    );
    if (isEmpty(props.path)) {
      this.detailUiSchema.type = 'VerticalLayout';
    } else {
      (this.detailUiSchema as GroupLayout).label = startCase(props.path);
    }
    if (!this.isEnabled()) {
      setReadonly(this.detailUiSchema);
    }
  }
}
github eclipsesource / jsonforms / packages / material-tree-renderer / src / tree / TreeWithDetailRenderer.tsx View on Github external
data[0],
        Paths.compose(
          path,
          '0'
        )
      );
    } else {
      resetSelection = this.setSelection(schema, data, path);
    }
    const handlers = {
      onSelect: this.setSelection,
      onAdd: this.openDialog,
      resetSelection: resetSelection
    };

    const detailUiSchema = findUISchema(
      uischemas,
      this.state.selected.schema,
      undefined,
      path
    );

    return (
      <div hidden="{!visible}">
        <div>
          <label>
            {typeof controlElement.label === 'string'
              ? controlElement.label
              : ''}
          </label>
          {Array.isArray(data) &amp;&amp; (
            <button>Add to root</button></div></div>