How to use the jsonforms-core.JsonForms.schemaService 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 / default / src / additional / tree-renderer.tsx View on Github external
{'\u274C'}
              
            }
        
        
        {
          // render contained children of this element
          JsonForms.schemaService.getContainmentProperties(schema)
            .filter(prop => this.propHasData(prop, data))
            .map(prop =&gt; <ul>{ this.renderChildren(prop, path, schema) }</ul>)
        }
      
    );

    // add a separate list for each containment property
    JsonForms.schemaService.getContainmentProperties(schema).forEach(p =&gt; {
      const id = p.schema.id;
      if (id === undefined || id === null) {
        // TODO proper logging
        console.warn(`The property's schema with label '${p.label}' has no id. DnD not possible.`);

        return;
      }
      // FIXME: DND support
      // FIXME: create child list and activate drag and drop
      // registerDnDWithGroupId(this.treeNodeMapping, ul, id);
    });

    return vnode;
  }
github eclipsesource / jsonforms / packages / default / src / additional / tree-renderer.tsx View on Github external
parentPath,
                    array =&gt; {
                      const copy = array.slice();
                      return _.filter(copy, el =&gt; !_.isEqual(el, data))
                    }
                  )
                )
              }}&gt;
                {'\u274C'}
              
            }
        
        
        {
          // render contained children of this element
          JsonForms.schemaService.getContainmentProperties(schema)
            .filter(prop =&gt; this.propHasData(prop, data))
            .map(prop =&gt; <ul>{ this.renderChildren(prop, path, schema) }</ul>)
        }
      
    );

    // add a separate list for each containment property
    JsonForms.schemaService.getContainmentProperties(schema).forEach(p =&gt; {
      const id = p.schema.id;
      if (id === undefined || id === null) {
        // TODO proper logging
        console.warn(`The property's schema with label '${p.label}' has no id. DnD not possible.`);

        return;
      }
      // FIXME: DND support
github eclipsesource / jsonforms / packages / default / src / additional / tree-renderer.tsx View on Github external
className='label'
            onClick={ev =&gt;
              this.setState({
                selected: {
                  schema,
                  data,
                  path: path
                }
              })
            }
          &gt;
          <span>
            {this.getNamingFunction(schema)(data)}
          </span>
            {
              JsonForms.schemaService.hasContainmentProperties(schema) ?
                (<span>) =&gt;
                    this.setState({
                      dialog: {
                        open: true,
                        schema,
                        path: path
                      }
                    })
                  }
                &gt;
                {'\u2795'}
              </span>) : ''
            }
            {