/** Core */ import { CoreComponent } from "cmf.core/src/core"; /** Angular2 */ import * as ng from "@angular/core"; import { PropertyContainerService, LayoutType } from "./propertyContainerService"; /** * The aligment classes to be applied to property editors and property viewers */ export declare type PropertyAligmentClasses = "top-left-aligned" | "side-by-side"; /** * property label position enum (only Top and Left supported for now) */ export declare enum LabelPosition { Top = 0, Left = 1 } export { LayoutType }; /** * @whatItDoes * Aggregates PropertyViewer and PropertyEditor components, so that their display are aligned. * * @howToUse * This component is used with the inputs and outputs mentioned below. * * ### Inputs * `LayoutType` : **layout** - Defines the type of layout to use. If none is provided, use automatic calculation to determine layout. * * ### Outputs * No output available. * * ### Example * To use the component, assume this HTML Template as an example: * * ```html * * * * * ``` */ export declare class PropertyContainer extends CoreComponent implements ng.OnInit, ng.OnDestroy, ng.AfterViewInit { private _elementRef; private parentService; private currentService; /** * Subscription ref of the sibling editor change */ private _siblingEditorChangeSubscription; /** * Subscription ref of the sibling viewer change */ private _siblingViewerChangeSubscription; /** * event resize subscription */ private _propertyContainerSizeSubscription; /** * Debounced version of changeInnerPropertiesLayout. */ private _changeInnerPropertiesLayoutDebounced; /** * Current active css text aligment */ private _activeAligment; /** * Gets the ElementQuery element. */ private elementQuery; /** * Inner content property viewers */ private _innerPropertyViewers; /** * Inner content property editors */ private _innerPropertyEditors; /** * Layout to apply. By default uses available space calculations to decided which layout to use. */ layout: LayoutType; constructor(_elementRef: ng.ElementRef, parentService: PropertyContainerService, currentService: PropertyContainerService); /** * On init */ ngOnInit(): void; /** * After view init */ ngAfterViewInit(): void; /** * On component destruction - unsubscribe events. */ ngOnDestroy(): void; /** * Handle the property editor resize event. * Property container resize strategy has been changed! * Now, instead of using element query to subscribe to size change events and emitting that change to the inner * property editors and viewers so they change themselves (resulting in a lot of scripting and rendering one by one), * now the element query is used totally outside the Angular zone and the container calculates the correct aligment for * the property editors, viewers and labels, and automatically changes their css aligment properties through jquery. * Only non forced layouts are changed and in order to now have the correct aligment in a form, a property container MUST * be placed around all viewers/editors */ private onPropertyContainerResize; /** * Changes the inner property editors and viewers layout alignment through jquery as explained in @see onPropertyContainerResize */ private changeInnerPropertiesLayout; /** * Callback used when the number of inner property editors or viewers change. * Used to set the correct spacing between these property editors and viewers in the same container context. */ private adaptFormPropertiesSpacing; } export declare class PropertyContainerModule { }