@adobe/cq-angular-editable-components
Version:
* [API](#api) * [Documentation](#documentation) * [Changelog](#changelog)
61 lines (60 loc) • 1.78 kB
TypeScript
import { Renderer2, NgZone, ViewContainerRef, ComponentFactoryResolver } from '@angular/core';
export declare class AEMComponentDirective {
private renderer;
private viewContainer;
private factoryResolver;
private ngZone;
private _component;
private _oldClasses;
cqModel: any;
path: string;
pagePath: string;
modelName: string;
aemComponent: any;
constructor(renderer: Renderer2, viewContainer: ViewContainerRef, factoryResolver: ComponentFactoryResolver, ngZone: NgZone);
ngOnInit(): void;
/**
* Returns the type of the cqModel if exists.
*/
readonly type: any;
/**
* Returns the column classes of the cqModel
*/
readonly columnClasses: any;
/**
* Updates the cqModel
*/
private updateCqModel();
/**
* Returns the Cq Model
*
*/
private getCqModel();
/**
* Renders a component dynamically based on the component definition
*
* @param componentDefinition The component definition to render
*/
private renderComponent(componentDefinition);
/**
* Updates the data of the component based the data of the directive
*/
private updateComponentData();
/**
* Setups the DOM element, setting the classes and attributes needed for the AEM editor.
*/
private setupElement();
/**
* Setups the placeholder of needed for the AEM editor
*
* @param editConfig - the editConfig, which will dictate the classes to be added on.
*/
private setupPlaceholder(editConfig);
/**
* Determines if the placeholder should e displayed.
*
* @param editConfig - the edit config of the directive
*/
private usePlaceholder(editConfig);
ngOnDestroy(): void;
}