/** Core */ import { CoreComponent } from "cmf.core/src/core"; /** Nested modules */ import { ListViewItem } from "cmf.core.controls/src/components/listView/listView"; /** Angular */ import * as ng from "@angular/core"; /** * Representation of an operation */ export interface OperationItemModel { operationName: string; operationId: string; operationHistorySequence: string; subOperationSequence: string; startDateTime: string; endDateTime: string; entityTypeName: string; entityId: string; entityName: string; isExpandable: boolean; hasChanges: boolean; isEntity: boolean; instance?: any; } /** * Representation of an operation to be presented in ListView */ export interface OperationListViewItem extends ListViewItem { disabled: boolean; checked: boolean; data: OperationItemModel; } /** * @whatItDoes * * This component presents a list of history operations. * It presents the operation name and the related entity associated. * For each row (operation), there is also a button to show the changes corresponding to the operation, * the operation start/end times in a popover and an expand button to show inner operations. * * @howToUse * * This component is used with the inputs and outputs mentioned below. * * Besides the description above, please complement it with a meaningful description of this component that answer these questions: * * * ### Inputs * `ListViewItem[]` : **data** - Contains the data needed to populate the list. Each element (ListViewItem) should have the following properties: * operationName: **string** - the name of the operation * entityTypeName: **string** - name of the associated entity type (or action in cases where it's not an entity type, e.g. "Resolve Name Generator") * instance: **any** (optional) - if present, a navigation control to the entity instance is created * startDateTime **string** - start datetime of the operation * endDateTime **string** - end datetime of the operation * isExpandable **boolean** - indicates wether the operation is expandable (has inner operations) * `boolean` : **isFull** - Controls wether the load more button appears * `(currentData: OperationListViewItem[]) => Promise` : **loadMoreCallback** - Callback to be called to append data when the * user clicks load more * * ### Outputs * `ListViewItem` : **changesClicked** - Triggered on click of changes button. Contains the clicked ListViewItem. * `ListViewItem` : **expandClicked** - Triggered on click of expand button. Contains the clicked ListViewItem. * * ### Example * To use the component, assume this HTML Template as an example: * * ```HTML * * * ``` * * @description * * ## OperationListView Component * * ### Dependencies * * #### Components * * ListView : `cmf.core.controls` * * PopUp : `cmf.core.controls` * * Navigation: `cmf.core.business.controls` * * #### Services * _This component does not depend on any service_ * * #### Directives * _This component does not depend on any directive_ * */ export declare class OperationListView extends CoreComponent implements ng.OnChanges { /** * Data to populate the listview */ data: OperationListViewItem[]; /** * If all items are displayed and there is no need to load more items */ isFull: boolean; /** * Callback to load more data */ loadMoreCallback: (currentData: OperationListViewItem[]) => Promise; /** * Event on expand click */ expandClicked: ng.EventEmitter; /** * Event on changes click */ changesClicked: ng.EventEmitter; /** * Currently visible popup start time */ _popupStartTime: string; /** * Currently visible popup end time */ _popupEndTime: string; /** * Popup visible */ _popupVisible: { open: boolean; }; /** * Constructor * * @param viewContainerRef the reference to the component view container */ constructor(viewContainerRef: ng.ViewContainerRef); /** * On changes method * * @param changes the changes made to the component properties */ ngOnChanges(changes: ng.SimpleChanges): void; /** * Updates the instances for each element of the data array */ private updateDataInstances; /** * On expand click * * @param item: clicked item from the listview */ onExpandClick(item: ListViewItem): void; /** * On changes click * * @param item: clicked item from the listview */ onChangesClick(item: ListViewItem): void; /** * Load more content */ loadMore(): void; /** * Shows the popup with the operation times */ showPopup(startTime: string, endTime: string): void; /** * Hide the popup with the operation times */ hidePopup(): void; } export declare class OperationListViewModule { }