import { BaseActionButton } from "cmf.core/src/domain/metadata/action"; /** Angular */ import * as ng from "@angular/core"; /** Nested modules */ import { ActionButtonGroupButton } from "./actionButtonGroupButton"; import { BaseAction } from "./baseAction"; import { DropdownState } from "../dropdown/dropdown"; import { ActionTreeService } from "./actionTreeService"; /** * @whatItDoes * Group other actions (is composed by ActionButtonGroupButton) * * @howToUse * This component is used with the inputs and outputs mentioned below. * * ### Inputs * `any` : **icon-class** - The icon-class of this component ; * `any` : **alt** - The alt of this component ; * `string` : **mainTitle** - Set title ; * `any` : **button-id** - Identifier for the button ; * `any` : **isDisabledCodeBehind** - Flag for disable the code behind ; * `any` : **buttonSize** - Button size . * `boolean` : **showLabel** - If show button label * * ### Example * To use the component, assume this HTML Template as an example: * * ```HTML * * * ``` * */ export declare class ActionButtonGroup extends BaseAction implements ng.AfterContentInit, ng.AfterViewInit, ng.OnDestroy, ng.OnChanges, ng.OnInit { private _renderer; private _viewContainerRef; actionTreeService: ActionTreeService; /** * Stores the dropDown element attached to body to destroy later */ private _dropdownElementAppendedToMain; /** * Open handler */ private _openHandler; /** Dropdown element identifier */ _uniqueId: string; /** Current Dropdown state */ state: DropdownState; /** * Toggle element */ _toggleElement: ng.ElementRef; /** * Stores the top position of the dropDown to optimize calculation */ _dropDownTop: number; /** * Stores the left position of the dropDown to optimize calculation */ _dropDownLeft: number; actionButtonGroupButtons: ng.QueryList; /** * Deprecated title input */ title: string; /** * Action button group title */ mainTitle: string; /** * True if dropdown is left aligned with actionButton (In order to avoid to be cut when is to closed to the right side of screen) */ isLeftAligned: boolean; /** * Is Disabled */ isDisabled: boolean; /** * No item */ noItems: boolean; /** * No title */ noTitle: boolean; constructor(elementRef: ng.ElementRef, changeDetector: ng.ChangeDetectorRef, _renderer: ng.Renderer, _viewContainerRef: ng.ViewContainerRef, actionTreeService: ActionTreeService); protected onActionButtonMetadata(button: BaseActionButton): Promise; protected onIsDisableCheck(button: BaseActionButton): Promise; /** * Update children action buttons */ updateChildrenActionButtons(buttons: ActionButtonGroupButton[]): void; /** * Register toogle on open dropdown */ private setupOpenHandler; /** * Angular Lifecycle hook that is called after a component's view has been fully initialized */ ngAfterViewInit(): void; /** * Triggers the discoverParent event in the action tree service. */ discoverParent(): void; /** * On Changes */ ngOnChanges(changes: ng.SimpleChanges): void; /** * Sets the child buttons parent action tree service to the current action tree service * in order to maintain coherence. * * Currently, the ActionButtonGroupButtons are instantiated in a dropdown menu outside of current template which invalidates * the normal behaviour of the action tree service (dom event that bubbles). In order to keep track of the correct tree, when the action button group * content is inited, each child is told its parent. */ private setChildrenParentTreeService; /** * Subscribe to child buttons disable check */ private subscribeChildrenButtonsDisableCheck; /** * ngAfterContentInit - evaluate element and children isDisabled property, calculate dropDown-menu position */ ngAfterContentInit(): void; /** * Toggle event. * Calculates where to show the dropdown and deal with events. */ toggle: (event?: Event) => void; /** * ngOnDestroy */ ngOnDestroy(): void; /** * This method is supposed to be invoked by a parent component. In a normal scenario, this would be an Action Bar. */ destroy(): void; } export declare class ActionButtonGroupModule { }