ngx-json-ui
Version:
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.2.0.
41 lines (40 loc) • 2.34 kB
TypeScript
import { ViewContainerRef } from '@angular/core';
import { FormGroup, FormArray, FormBuilder } from '@angular/forms';
import { ComponentMappingService } from '../../features/components-mapping/services/component-mapping.service';
import { ComponentModel } from '../models/component.model';
import { NgxOverlayService } from './ngx-overlay.service';
import { JoiValidatorFactoryService } from '../../features/validator/services/joi-validator-factory.service';
import * as i0 from "@angular/core";
export declare class ComponentFactoryService {
private mappingService;
private overlayService;
private fb;
private joiValidatorFactoryService;
constructor(mappingService: ComponentMappingService, overlayService: NgxOverlayService, fb: FormBuilder, joiValidatorFactoryService: JoiValidatorFactoryService);
/**
* Loads one or more components based on the provided configuration.
* @param config A single ComponentModel or an array of ComponentModel objects.
* @param container The container (ViewContainerRef) where components should be added.
* @param form (Optional) The parent FormGroup/FormArray for form components.
* @param validationSchema (Optional) Validation configuration used for form controls.
*/
loadComponents(config: ComponentModel | ComponentModel[], container: ViewContainerRef, form?: FormGroup | FormArray, validationSchema?: any): void;
/**
* Loads a single component based on its configuration.
* For 'formGroup' types, it recursively loads child components into the corresponding sub-form.
* @param componentConfig The configuration for the component.
* @param container The ViewContainerRef to create the component in.
* @param form (Optional) The parent FormGroup/FormArray.
* @param validationSchema (Optional) Validation configuration for form controls.
*/
private loadSingleComponent;
/**
* Recursively searches a validation schema for a specific key.
* @param schema The validation schema object.
* @param key The key to search for.
* @returns The matching schema section or null if not found.
*/
private findValidationSchema;
static ɵfac: i0.ɵɵFactoryDeclaration<ComponentFactoryService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<ComponentFactoryService>;
}