View Engine
The View Engine is the core of the@repo/view
package, responsible for rendering views based on schemas and handling interactions.
Overview
The View Engine provides the following functionality:- Schema validation and normalization
- View rendering based on schema type
- Integration with CRUD components
- Error handling and fallbacks
- Internationalization support
API Reference
createViewEngine
Creates a new instance of the View Engine with the specified options.
renderView
Renders a view based on the provided schema and options.
validateViewSchema
Validates a view schema and returns a validation result.
safeValidateViewSchema
Safely validates a view schema without throwing errors.
Schema Types
The View Engine supports the following schema types:Form Schema
Table Schema
Detail Schema
Audit Log Schema
Import Schema
Export Schema
Integration with CRUD Components
The View Engine integrates with CRUD components from the@repo/crud
package: