/** Angular2 */
import * as ng from "@angular/core";
/** Core */
import { CoreComponent } from "cmf.core/src/core";
import { GenericDiagramModel, GenericDiagramNode } from "cmf.core.controls/src/components/genericDiagram/genericDiagram";
/** Lbos */
import Cmf from "cmf.lbos";
import { InfoBadge } from "./stateModelDiagramNode/stateModelDiagramNode";
import { GenericDiagramNodeThumbnail } from "cmf.core.controls/src/components/genericDiagram/genericDiagramModel";
/**
* StateModelDiagramNodeType
*/
export declare enum StateModelDiagramNodeType {
Start = 0,
End = 1,
State = 2,
Note = 3
}
/**
* StateModelDiagramState
*/
export declare class StateModelDiagramState extends Cmf.Foundation.BusinessObjects.StateModelState {
StateDetails: Cmf.Foundation.BusinessObjects.StateModelFlowStateDetail;
isExecuted?: boolean;
executedBy?: string;
executedWhen?: string;
}
/**
* @whatItDoes
*
* This component is used to edit StateModels using a diagram to edit the layout and the connections
*
* @howToUse
*
* Just include the component in a template and use with the inputs and outputs below:
*
* ### Inputs:
* * `Cmf.Foundation.BusinessObjects.StateModel` : **stateModel** - The StateModel to edit
* * `boolean` : **showDescription** - If show description of States
* * `function` : **infoBadgesBuilder** - A function that acts as a constructor for the informative badges that are shown in the state boxes
* * `string` : **stateSettingsAction** - The action to call when the 'settings' menu button is pressed
* * `function` : **stateDetailsConstructor** - Constructor for state details (As different entities required different implementation of state details)
* * `function` : **onSaveStateSettings** - Action to perform on save a State Settings
* * `Cmf.Foundation.BusinessObjects.StateModelFlowPath[]` : **stateModelExecutedPaths** - State model executed paths
* * `Cmf.Foundation.BusinessObjects.StateModelFlowPath` : **currentStateModelPath** - Current model path
* * `boolean` : **isInExecutionMode** - If State Model is in execution mode
* * `boolean` : **allowStateOptions** - Allow state more options menu
*
* ### Outputs:
* * `Cmf.Foundation.BusinessObjects.StateModel` : **onStateModelChange** - When StateModel changes
* * `Cmf.Foundation.BusinessObjects.StateModelState` : **onSelectedStateChange** - When selected State changes
* * `boolean` : **onCanAddBeginPointChange** - If can add begin point to StateModel
* * `boolean` : **onCanAddEndPointChange** - If can add end point to StateModel
*
*
* ## Example
*
* Assume this HTML Template
*
* ```html
*
*
*
*
* ```
*
* @class ListView
*/
export declare class StateModelDiagram extends CoreComponent implements ng.OnChanges, ng.AfterViewInit, ng.OnDestroy {
private _elementRef;
private _ngZone;
/**
* Generic Diagram
*/
private _diagram;
/**
* If is in fullscreen
*/
_isInFullScreen: boolean;
/**
* Fullscreen component
*/
private _fullscreenComponent;
/**
* Diagram model
*/
_diagramModel: GenericDiagramModel;
/**
* Selected node
*/
_selectedNode: GenericDiagramNode;
/**
* State model
*/
private newStateModel;
/**
* State model
*/
stateModel: Cmf.Foundation.BusinessObjects.StateModel;
/**
* State model executed paths
*/
stateModelExecutedPaths: Cmf.Foundation.BusinessObjects.StateModelFlowPath[];
/**
* Current model path
*/
currentStateModelPath: Cmf.Foundation.BusinessObjects.StateModelFlowPath;
/**
* Is in execution mode
*/
isInExecutionMode: boolean;
/**
* If show description of states
*/
showDescription: boolean;
/**
* Allow state options
*/
allowStateOptions: boolean;
/**
* State settings action
*/
stateSettingsAction: string;
/**
* Info badges list builder for each state
*/
infoBadgesBuilder: (object: any) => InfoBadge[];
/**
* On save state settings
*/
onSaveStateSettings: () => Promise;
/**
* On state model
* @event onStateModelChange
*/
onStateModelChange: ng.EventEmitter;
/**
* On selected state change
*/
onSelectedStateChange: ng.EventEmitter;
/**
* Can add begin point change
*/
onCanAddBeginPointChange: ng.EventEmitter;
/**
* Can add end point change
*/
onCanAddEndPointChange: ng.EventEmitter;
/**
* State details constructor
*/
stateDetailsConstructor: () => Cmf.Foundation.BusinessObjects.StateModelFlowStateDetail;
/**
* Constructor
*/
constructor(_elementRef: ng.ElementRef, _ngZone: ng.NgZone);
/**
* Setup execution flow
*/
private setupExecutionFlow;
/**
* Find name for new state
*/
private findNameForNewState;
/**
* On node selected
*/
onNodeSelected(node: GenericDiagramNode): void;
/**
* On drag over
*/
onDragOver: (event: any) => void;
/**
* On drop
*/
onDrop: (event: any) => void;
/**
* Add note
*/
addNote(): void;
/**
* Diagram model change
*/
diagramModelChange(model: GenericDiagramModel): void;
/**
* Retrieve node thumbnail
*/
retrieveNodeThumbnail: (node: GenericDiagramNode) => GenericDiagramNodeThumbnail;
/**
* Validate link callback
*/
validateLink: (newLinkId: string, source: any, target: any) => boolean;
/**
* Enter/Exit fullscreen
*/
fullscreen(action: any): void;
/**
* Expand all nodes
*/
expandAll(): void;
/**
* Collapse all nodes
*/
collapseAll(): void;
/**
* Fit to viewport
*/
fitToViewport(): void;
/**
* Zoom in
*/
zoomIn(): void;
/**
* Zoom out
*/
zoomOut(): void;
/**
* After view init
*/
ngAfterViewInit(): void;
/**
* On destroy
*/
ngOnDestroy(): void;
/**
* On changes - update list view
*/
ngOnChanges(changes: any): void;
}
export declare class StateModelDiagramModule {
}