/** * Registry Integration * * Cung cấp các hàm để tích hợp với component registry của lowcoder */ import { ComponentSchema, RegistryIntegrationOptions } from '../types'; import { UICompBuilder } from '../adapters/uiCompBuilderAdapter'; /** * Interface cho UICompManifest */ export interface UICompManifest { name: string; enName: string; description?: any; categories: readonly string[]; keywords: string; icon: any; comp?: any; layoutInfo?: UICompLayoutInfo; withoutLoading?: boolean; lazyLoad?: boolean; compName?: string; compPath?: string; isContainer?: boolean; defaultDataFn?: any; defaultDataFnName?: string; defaultDataFnPath?: string; } /** * Interface cho UICompLayoutInfo */ export interface UICompLayoutInfo { w: number; h: number; static?: boolean; delayCollision?: boolean; } /** * Interface cho registerComp function */ export interface RegisterCompFunction { (compType: string, manifest: UICompManifest): void; } /** * Tích hợp component với registry * * @param componentType Loại component * @param builder UICompBuilder instance * @param options Các tùy chọn cho tích hợp * @param registerComp Hàm đăng ký component * @returns Promise */ export declare function integrateWithRegistry(componentType: string, builder: UICompBuilder, options: RegistryIntegrationOptions, registerComp: RegisterCompFunction): Promise; /** * Đăng ký component được tạo từ schema * * @param schema Component schema * @param options Các tùy chọn cho registry * @param uiCompBuilder UICompBuilder constructor * @param nameConfig NameConfig constructor * @param registerComp Hàm đăng ký component * @returns Promise */ export declare function registerComponentFromSchema(schema: ComponentSchema, options: RegistryIntegrationOptions, uiCompBuilder: any, nameConfig: any, registerComp: RegisterCompFunction): Promise; /** * Cập nhật component registry * * @param componentType Loại component * @param manifest UICompManifest * @param registerComp Hàm đăng ký component * @returns Promise */ export declare function updateComponentRegistry(componentType: string, manifest: UICompManifest, registerComp: RegisterCompFunction): Promise; /** * Lưu file component * * @param componentType Loại component * @param code Mã của component * @param fs FileSystem * @param path Path * @returns Promise */ export declare function saveComponentFile(componentType: string, code: string, fs: any, path: any): Promise; /** * Tạo một component mới và đăng ký vào registry * * @param schema Component schema * @param options Các tùy chọn cho registry * @param code Mã của component * @param uiCompBuilder UICompBuilder constructor * @param nameConfig NameConfig constructor * @param registerComp Hàm đăng ký component * @param fs FileSystem * @param path Path * @returns Promise */ export declare function createAndRegisterComponent(schema: ComponentSchema, options: RegistryIntegrationOptions, code: string, uiCompBuilder: any, nameConfig: any, registerComp: RegisterCompFunction, fs: any, path: any): Promise;