/** Core */
import { CoreComponent } from "cmf.core/src/core";
import { OnValidate, OnValidateArgs } from "cmf.core.controls/src/directives/validator/validator";
import { DatagridType, ItemTypes, UnionItemTypes } from "./datagridWrapper";
import { ColumnViewRemoveArgs } from "cmf.core.controls/src/components/columnView/columnView";
import { ColumnViewColumnModel } from "cmf.core.controls/src/components/columnView/columnViewStructure";
/** Angular */
import * as ng from "@angular/core";
export { DatagridType, ItemTypes, UnionItemTypes };
/**
* @whatItDoes
*
* Implements the Select Item step of the Export Wizard.
*
* This step allows the user to select the list of items to be
* epxorted from the Export Wizard.
*
* Depending on the context that made the Export Wizard open, it's
* possible for the Export Wizard to skip this step. This happens when
* the Export Wizard is open from inside a entity page or query page
* where the object being displayed on that page is automatically
* selected for exporting.
*
* @howToUse
*
* ### Inputs
* `DatagridType` : **datagridType** - The type of datagrid that should
* be displayed by the DatagridWrapper component used in this template.
* `itemType` : **itemType** - The type of item to show in the datagrid.
* The exact behaviour of this field is dependent on the type of datagrid
* that is shown. For example, if the DatagridWrapper component is showing
* a DatagridEntity component, then this field contains the entity type of
* the rows being displayed.
*
* ### Outputs
* `UnionItemTypes[]` : **selectedItemsChanged** - Indicates when the
* selection status of one or more rows has been changed on the datagrid.
* The payload of the event is a list containing the currently selected
* rows that are currently being shown on the datagrid.
*
* ### Example
* To use the component assume this HTML Template as an example:
* ```HTML
*
*
* ```
*
* ## StepSelectItems component
*
* ### Dependencies
*
* #### Components
* * BaseWidget : `cmf.core.controls`
* * DatagridWrapper : `cmf.core.business.controls`
* * SearchBox : `cmf.core.controls`
* * ColumnView : `cmf.core.controls`
*
* #### Services
* * _This component does not depend on any service_
*
* #### Directives
* * ValidatorModule : `cmf.core.controls`
*/
export declare class StepSelectItems extends CoreComponent implements ng.OnInit, ng.AfterViewInit, OnValidate {
/**
* Current datagrid type.
*/
datagridType: DatagridType;
/**
* Type of the object to show in the datagrid.
*/
itemType: ItemTypes;
/**
* String currently being searched in the search box.
*/
nameFragment: string;
/**
* Items currently selected on this step.
*/
selectedItems: UnionItemTypes[];
/**
* Output that is triggered whenever an item is selected or deselected.
*
* The payload is the list of currently selected items.
*/
selectedItemsChanged: ng.EventEmitter;
/**
* Model for the column view shown in the template.
*
* The column view is used to display the list of currently selected items.
*/
columnViewModel: ColumnViewColumnModel;
/**
* Title of the column view.
*/
columnViewTitle: string;
/**
* A flag that is used to indicate that the next "Selection" event
* that will be emitted by the DatagridWrapper component used in
* the template should be ignored.
*
* This is used to workaround a behaviour in the datagrid used by
* the DatagridWrapper component where it always sends an empty
* "Selection" event when ever a page changes on the datagrid.
*
* If that empty "selection" event reached this StepSelectItems
* component then the wizard would lose the selection that was
* made in the previous page of datagrid. Setting this flag to
* true makes it so that the empty "selection" event is ignored.
*/
private ignoreNextDatagridSelectedChangeEvent;
/**
* Update the title of the column view component with the number
* of currently selected items.
*
* @returns Nothing.
*/
private updateColumnViewTitle;
/**
* Helper method that checks if a item is an EntityType.
*
* This method is used as a type-guard for Typescript.
*
* @param item The object to check.
*
* @returns "true" if the object is an EntityType, "false" otherwise.
*/
private isItemTypeEntityType;
/**
* Callback that is called when a new item is added to the
* datagrid selection.
*
* @param event An array containing the newly added items.
*
* @returns Nothing.
*/
onAddItemsSelection(event: UnionItemTypes[]): void;
/**
* Callback that is called when a item is removed from the
* datagrid selection.
*
* @param event An array containing the items that were removed
* from the datagrid.
*
* @returns Nothing.
*/
onRemoveItemsSelection(event: UnionItemTypes[]): void;
/**
* Callback that is called when the user changes the contents of the search box that is shown on the template.
*
* @param str The new content of the search box component.
*
* @returns Nothing.
*/
onSearchBoxValueChanged(str: string): void;
/**
* Angular on init method.
*/
ngOnInit(): void;
/**
* Angular after view init method.
*/
ngAfterViewInit(): void;
/**
* On remove leaf update the columns, emit the event and unselect
* the group in the action group column view.
*
* @param args Column view remove args
*
* @returns Nothing.
*/
onRemove(args: ColumnViewRemoveArgs): void;
/**
* On validate callback.
*/
onValidate(args: OnValidateArgs): Promise;
}
export declare class StepSelectItemsModule {
}