UNPKG

@spartacus/storefront

Version:

Spartacus Storefront is a package that you can include in your application, which allows you to add default storefront features.

33 lines (32 loc) 1.33 kB
import { ComponentRef, ElementRef, Injector, NgModuleRef, ViewContainerRef } from '@angular/core'; import { CmsComponentMapping } from '@spartacus/core'; import { Observable } from 'rxjs'; import { ComponentHandler } from '../handlers/component-handler'; import * as i0 from "@angular/core"; /** * Responsible for obtaining component handler for specified component mapping */ export declare class ComponentHandlerService { protected handlers: ComponentHandler[]; constructor(handlers: ComponentHandler[]); protected invalidMappings: Set<CmsComponentMapping<any>>; /** * Get best matching component handler * * @param componentMapping */ protected resolve(componentMapping: CmsComponentMapping): ComponentHandler; /** * Get launcher for specified component mapping * * @param componentMapping * @param viewContainerRef * @param elementInjector */ getLauncher(componentMapping: CmsComponentMapping, viewContainerRef: ViewContainerRef, elementInjector?: Injector, module?: NgModuleRef<any>): Observable<{ elementRef: ElementRef; componentRef?: ComponentRef<any>; }>; static ɵfac: i0.ɵɵFactoryDeclaration<ComponentHandlerService, [{ optional: true; }]>; static ɵprov: i0.ɵɵInjectableDeclaration<ComponentHandlerService>; }