@aventis-innovations/form-generator
v0.1.1
Published
Angular Material reactive form generator from JSON sections with template-based export.
Maintainers
Readme
@aventis-innovations/form-generator
Angular reactive form generator for Angular Material. Author forms with JSON (sections) and export client‑shaped JSON via a plain template using metadata hints.
Install
npm i @aventis-innovations/form-generator @angular/material @angular/cdkPeer dependencies: @angular/core, @angular/common, @angular/forms, rxjs (Angular 17).
Quickstart
Provide a Material theme in your app (light/dark). The library reads CSS variables for section chrome and text colors.
Drop the generator component with your sections JSON:
<lib-angular-reactive-form-generator [json]="sections"></lib-angular-reactive-form-generator>- Or adapt flat JSON using the adapter:
import { convertJsonToFormMeta } from '@aventis-innovations/form-generator';
const { formMetaData } = convertJsonToFormMeta(flatJson);- Export client JSON using a plain template and metadata output hints:
import { evaluateTemplateFromIntake, extractOutputContext } from '@aventis-innovations/form-generator';
const ctx = extractOutputContext(sectionsJson);
const out = evaluateTemplateFromIntake(template, intake, ctx);Theming
The library exposes CSS variables for section chrome and field polish (e.g., --fg-section-title-color, --fg-section-body-background). Override them globally or within a container.
License
Source-available: Aventis Innovations LLC Form Generator Source-Available License v1.0 (see LICENSE).
Commercial licensing is available for use cases outside the scope of the source-available terms.
