/** Core */ import { CoreComponent } from "cmf.core/src/core"; /** Angular2 */ import * as ng from "@angular/core"; import { DeferInstantiationHost } from "../../directives/deferInstantiation/deferInstantiation"; /** * Placeholder types supported by the Page Section component */ export declare enum PlaceholderType { PropertyViewer = "propertyViewer", Table = "table", Tiles = "tiles", None = "" } /** * Default section default expand mode */ export declare const DEFAULT_EXPAND_MODE: string; /** * Token to be provided for section page size. * Controls that allow paging should adjust the page size * to a value provided by the token */ export declare const SECTION_PAGE_SIZE: ng.InjectionToken; /** * @whatItDoes * * Used inside component cmf-core-controls-page-sections. * It supports defer instantiation for its template. * * @howToUse * * ### Inputs * `string` : **name** - The name of this section * `string` : **section-id** - Id of the section * `boolean` : **wrap** - Toggle wrapping * `boolean` : **fullHeight** - If set to true, this toggles the section to occupy the full visible height of the viewport. Defaults to false. * `boolean` : **expanded** - It set to true, display open on start * `boolean` : **autoLoad** - Loads this section if it is visible on start * `PlaceholderType` : **placeholder** - Placeholders for lazy loaded content can be the type: 'propertyViewer' (default), 'table' or 'tiles' * `boolean` : **customIndicator** - If set to true, it will use a default indicator while loading; otherwise, the progress indicator will be used * * ### Outputs * `boolean` : **expandedChange** - Emits the value of expanded when it changes * * ### Example * This component can be used by the following example: * * ```HTML * * <-- Your content here --> * * ``` * * It also supports deffer instantiation. * In that case, it will only load when the section is activated. * The Module exports the DeferInstantiation Module. * * ```HTML * * <-- Your content here --> * * ``` * * @description * * ## PageSection Component * * ### Dependencies * * #### Directives * * ProgressIndicator : `cmf.core.controls` * * ### Exports * * DeferInstantiationModule : `cmf.core.controls` */ export declare class PageSection extends CoreComponent implements ng.AfterViewInit, ng.OnChanges, DeferInstantiationHost { _elementRef: ng.ElementRef; _defaultExpandMode: any; /** * Indicates if this AfterViewInit was initialized */ private _componentInitialized; /** * Content element reference */ private _contentElementRef; /** * ProgressIndicator element reference */ private _sectionElementRef; /** * Flag to indicate if the section is loaded (true after the first expanded) */ private _loaded; /** * Flag to indicate if loaded was set (via input) but loaded was not called (because _componentInitialized is still false) */ private _isLoadedRequested; /** * Flag to indicate if the section is expanded */ private _expanded; /** * Section Title */ title: string; /** * Section Title element */ titleElement: ng.ElementRef; /** * Section Id */ sectionId: string; /** * Should the section wrap inner base widgets? */ wrap: boolean; /** * Full height input that resizes the page section to the visible height */ fullHeight: boolean; /** * Flag to indicate if the section is expanded */ expanded: boolean; /** * Loading flag */ loading: boolean; /** * Flag to indicate if the section is loaded. * Once true, it remains always true. */ loaded: boolean; /** * Indicates if this section should auto load if visible */ autoLoad: boolean; /** * Expression to be used in the defer instantiation directive */ deferInstantiationExpression: string; /** * Placeholder load type */ placeholder: PlaceholderType; /** * Indicates if the content is ready to be shown */ isContentReady: boolean; /** * Emits the expanded value when it changes */ expandedChange: ng.EventEmitter; constructor(_elementRef: ng.ElementRef, _defaultExpandMode: any); private waitForComponentToLoad; /** * Checks if this section is in the viewPort * If the autoLoad is true, loads and expands. */ private checkAutoLoad; /** * Checks if this section is in the viewPort * If the autoLoad is true, loads and expands. */ private checkExpanded; /** * Loads the section * Also expands if this is the first time the page is loaded */ load(expand?: boolean): void; /** * Toggles the state of the section. * Expand or collapse the section. */ toggle(): void; /** * Expands the section */ expand(): void; /** * Collapses the section */ collapse(): void; /** * Handles the progress indicator start. * Saves a flag to indicate that */ onProgressIndicatorStart(): void; /** * Handles the progress indicator end. * If the content wasn't loaded, disable the loading and mark it as loaded */ onProgressIndicatorEnd(): void; /** * On After Init event handler */ ngAfterViewInit(): void; /** * Handles inputs changes * @param changes Changes */ ngOnChanges(changes: ng.SimpleChanges): void; } export declare class PageSectionModule { }