@o3r/components
Version:
This module contains component-related features (Component replacement, CMS compatibility, helpers, pipes, debugging developer tools...) It comes with an integrated ng builder to help you generate components compatible with Otter features (CMS integration
52 lines • 2.2 kB
TypeScript
import { ModuleWithProviders, type Type } from '@angular/core';
import type { Context } from '@o3r/core';
import { C11nService } from './c11n.service';
import * as i0 from "@angular/core";
import * as i1 from "./c11n.directive";
/**
* Customization service factory
* @param config -> registerCompFunc - a function which returns the map of custom components which will be injected in c11n service
* @param config.registerCompFunc
*/
export declare function createC11nService(config: {
registerCompFunc: () => Map<string, any>;
}): C11nService;
/**
* @deprecated Will be removed in v14.
*/
export declare class C11nModule {
/**
* Get the module with providers for the root component
* @param config -> registerCompFunc - a function which returns the map of custom components which will be injected in c11n service
* @param config.registerCompFunc
* @deprecated Please use {@link provideCustomComponents} instead. Will be removed in v14.
*/
static forRoot(config: {
registerCompFunc: () => Map<string, any>;
}): ModuleWithProviders<C11nModule>;
static ɵfac: i0.ɵɵFactoryDeclaration<C11nModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<C11nModule, never, [typeof i1.C11nDirective], [typeof i1.C11nDirective]>;
static ɵinj: i0.ɵɵInjectorDeclaration<C11nModule>;
}
/**
* Returns a tuple of the key and the component
* @note should be used with {@link provideCustomComponents}
* @example
* ```typescript
* provideCustomComponents(
* new Map(),
* withComponent('example1', MyFirstComponent),
* withComponent('example2', MySecondComponent),
* )
* ```
* @param customComponentKey
* @param customComponent
*/
export declare function withComponent<T extends Context>(customComponentKey: string, customComponent: Type<T>): [string, Type<T>];
/**
* Provide custom components which will be injected in c11n service
* @param customComponents
* @param additionalComponents
*/
export declare function provideCustomComponents(customComponents?: Map<string, any>, ...additionalComponents: (ReturnType<typeof withComponent>)[]): import("@angular/core").EnvironmentProviders;
//# sourceMappingURL=c11n.module.d.ts.map