npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@graviola/edb-layout-renderer

v1.2.0

Published

Advanced layout renderers for JSON Forms in the Graviola framework, providing structured and navigable form layouts.

Downloads

9

Readme

@graviola/edb-layout-renderer

Advanced layout renderers for JSON Forms in the Graviola framework, providing structured and navigable form layouts.

Environment: Client

Overview

This package provides specialized layout renderers for JSON Forms that enhance the user experience when working with complex form structures. It includes renderers for handling anyOf schemas with tabs, categorization layouts with step-by-step navigation, and utilities for working with combinator properties.

Ecosystem Integration

Position in the Graviola Framework

The layout-renderer package is a core UI component in the Graviola framework's form rendering system. It provides higher-level layout components that organize form content in a structured and navigable way, making complex forms more manageable. It works alongside other form renderer packages to create rich, interactive forms for editing linked data.

Dependency Graph

flowchart TD
    A[graviola/edb-layout-renderer]
    A --> C[next-i18next]
    A --> D[lodash-es]
    E[apps/exhibition-live] --> A

    style A fill:#f9f,stroke:#333,stroke-width:2px

Package Relationships

  • Dependencies:

    • next-i18next: Used for internationalization of labels and messages
    • lodash-es: Provides utility functions for object manipulation
  • Peer Dependencies:

    • @mui/material, @mui/icons-material: Material UI components
    • @jsonforms/material-renderers, @jsonforms/core, @jsonforms/react: JSON Forms library
    • react: React library
  • Used By:

    • apps/exhibition-live: Uses the layout renderers in its form configuration and TypedForm component

Installation

bun add @graviola/edb-layout-renderer
# or
npm install @graviola/edb-layout-renderer
# or
yarn add @graviola/edb-layout-renderer

Features

  • MaterialCustomAnyOfRenderer: Renders anyOf schemas as tabs, allowing users to switch between different schema options
  • MaterialCategorizationStepperLayout: Renders categorization layouts as a step-by-step form with navigation buttons
  • CombinatorProperties: Utility component for rendering properties of combinator schemas

Usage

MaterialCustomAnyOfRenderer

The MaterialCustomAnyOfRenderer displays anyOf schemas as tabs, making it easy for users to switch between different schema options:

import {
  materialCustomAnyOfControlTester,
  MaterialCustomAnyOfRenderer
} from '@graviola/edb-layout-renderer';
import { JsonFormsRendererRegistryEntry } from '@jsonforms/core';

// Create a renderer registry
const renderers: JsonFormsRendererRegistryEntry[] = [
  // Register the custom anyOf renderer
  {
    tester: materialCustomAnyOfControlTester,
    renderer: MaterialCustomAnyOfRenderer
  }
];

// Use the renderers with JsonForms
import { JsonForms } from '@jsonforms/react';

const MyForm = ({ data, schema, uischema, onChange }) => (
  <JsonForms
    data={data}
    schema={schema}
    uischema={uischema}
    renderers={renderers}
    onChange={onChange}
  />
);

MaterialCategorizationStepperLayout

The MaterialCategorizationStepperLayout renders categorization layouts as a step-by-step form with navigation buttons:

import {
  MaterialCategorizationStepperLayoutRegistryEntry
} from '@graviola/edb-layout-renderer';
import { JsonFormsRendererRegistryEntry } from '@jsonforms/core';

// Create a renderer registry with the categorization stepper layout
const renderers: JsonFormsRendererRegistryEntry[] = [
  // Register the categorization stepper layout
  MaterialCategorizationStepperLayoutRegistryEntry
];

// Use the renderers with JsonForms
import { JsonForms } from '@jsonforms/react';

const MyForm = ({ data, schema, uischema, onChange }) => (
  <JsonForms
    data={data}
    schema={schema}
    uischema={uischema}
    renderers={renderers}
    onChange={onChange}
  />
);

Categorization UI Schema Example

To use the categorization stepper layout, you need to define a UI schema with a Categorization element:

{
  "type": "Categorization",
  "options": {
    "variant": "stepper",
    "showNavButtons": true
  },
  "elements": [
    {
      "type": "Category",
      "label": "Basic Information",
      "elements": [
        {
          "type": "Control",
          "scope": "#/properties/name"
        },
        {
          "type": "Control",
          "scope": "#/properties/description"
        }
      ]
    },
    {
      "type": "Category",
      "label": "Additional Details",
      "elements": [
        {
          "type": "Control",
          "scope": "#/properties/startDate"
        },
        {
          "type": "Control",
          "scope": "#/properties/endDate"
        }
      ]
    }
  ]
}

Internal Usage

This package is used in the Graviola framework to render complex form layouts in applications like the exhibition-live app. Here's an example from the TypedForm.tsx file:

// From apps/exhibition-live/components/content/main/TypedForm.tsx
import { MaterialCategorizationStepperLayoutRegistryEntry } from "@graviola/edb-layout-renderer";

// ...

const mainFormRenderers = useMemo(() => {
  return [
    MaterialCategorizationStepperLayoutRegistryEntry,
  ];
}, []);

// ...

return (
  <SemanticJsonForm
    // other props...
    jsonFormsProps={{
      uischema,
      renderers: mainFormRenderers,
      config: {
        useCRUDHook: useCRUDWithQueryClient,
        debug: enableDebug,
      },
    }}
  />
);

And in the renderer registry:

// From apps/exhibition-live/components/config/rendererRegistry.ts
import {
  materialCustomAnyOfControlTester,
  MaterialCustomAnyOfRenderer,
} from "@graviola/edb-layout-renderer";

export const rendererRegistry: JsonFormsRendererRegistryEntry[] = [
  ...materialRenderers,
  {
    tester: materialCustomAnyOfControlTester,
    renderer: MaterialCustomAnyOfRenderer,
  },
  // other renderers...
];

API Reference

MaterialCustomAnyOfRenderer

A renderer for anyOf schema constructs, displaying them as tabs.

materialCustomAnyOfControlTester

A tester function that determines if the MaterialCustomAnyOfRenderer should be used for a given UI schema element.

MaterialCategorizationStepperLayout

A renderer for categorization layouts with a stepper UI, providing step-by-step navigation through form categories.

CombinatorProperties

A utility component for rendering properties of combinator schemas.

License

This package is part of the Graviola project.