UNPKG

@adobe/cq-angular-editable-components

Version:

* [API](#api) * [Documentation](#documentation) * [Changelog](#changelog)

67 lines (66 loc) 2.15 kB
import { Renderer2, ViewContainerRef, ComponentFactoryResolver, AfterViewInit, OnInit, OnDestroy, ChangeDetectorRef, OnChanges } from '@angular/core'; export declare class AEMComponentDirective implements AfterViewInit, OnInit, OnDestroy, OnChanges { private renderer; private viewContainer; private factoryResolver; private _changeDetectorRef; /** * Dynamically created component */ private _component; /** * Model item that corresponds to the current component */ private _cqItem; get cqItem(): object; set cqItem(value: object); get changeDetectorRef(): ChangeDetectorRef; /** * Path to the model structure associated with the current component */ cqPath: string; /** * Name of the current instance of the component */ itemName: string; /** * HtmlElement attributes for the current instance of the component */ itemAttrs: object; aemComponent: any; constructor(renderer: Renderer2, viewContainer: ViewContainerRef, factoryResolver: ComponentFactoryResolver, _changeDetectorRef: ChangeDetectorRef); ngOnInit(): void; ngOnChanges(changes: import("@angular/core").SimpleChanges): void; /** * Returns the type of the cqItem if exists. */ get type(): any; /** * Renders a component dynamically based on the component definition * * @param componentDefinition The component definition to render */ private renderComponent; /** * Updates the data of the component based the data of the directive */ private updateComponentData; /** * Adds the specified item attributes to the element */ private setupItemAttrs; /** * Determines if the placeholder should e displayed. * * @param editConfig - the edit config of the directive */ private usePlaceholder; /** * Setups the placeholder of needed for the AEM editor * * @param editConfig - the editConfig, which will dictate the classes to be added on. */ private setupPlaceholder; ngAfterViewInit(): void; ngOnDestroy(): void; }