/** Core */ import { CoreComponent } from "cmf.core/src/core"; import Cmf from "cmf.lbos"; /** Angular2 */ import * as ng from "@angular/core"; /** Nested components */ import * as TransactionWizardPackage from "../../directives/transactionWizard/transactionWizard"; import { PageBag } from "cmf.core.controls/src/components/page/pageBag"; import { Wizard as WizardComponent } from "cmf.core.controls/src/components/wizard/wizardBase"; import { ChangeSetSelectedArgs } from "../changeSetSelector/changeSetSelector"; /** * @whatItDoes * * This wizard will enable user to clone entities. * It receives an instance, and show to user the properties that are able to be modified on Clone. * It also validates if the instance belongs to an entityType that is able to be cloned. * If the passed instance is versionated, shows a changeSet selector step to User. * * @howToUse * * Generic.Clone * * ### Inputs: * * ### Outputs: * * ### Example * To use the wizard one can invoke via action * * ```javascript * this.framework.sandbox.navigation.navigateByAction(this._router, "Generic.Clone", { * entities: [this.instance], * }, this._elementRef); * ``` * * * @description * * ## WizardCloneEntity Component * * ### Dependencies * * #### Components * * PropertyEditor : `cmf.core.business.controls` * * ColumnView : `cmf.core.controls` * * PropertyContainer : `cmf.core.business.controls` * * DetailsStepModule : `cmf.core.business.controls` * * ChangeSetSelector : `cmf.core.business.controls` * * #### Services * * _This component does not depend on any service_ * * #### Directives * * TransactionWizard : `cmf.core.business.controls` * * Validator : `cmf.core.controls` */ export declare class WizardCloneEntity extends CoreComponent implements TransactionWizardPackage.TransactionWizardInterface, ng.OnInit { private element; private _pageBag; /** * Instance that will be cloned */ entity: Cmf.Foundation.BusinessObjects.Entity; /** * EntityType. Useful to check metadata */ entityType: Cmf.Foundation.BusinessObjects.EntityType; /** * Instances that will be created from Clone operation */ clones: Cmf.Foundation.BusinessObjects.Entity[]; /** * Set Clone Step visibility */ cloneStepIsVisible: boolean; /** * Wizard component. */ wizard: WizardComponent; private _changeSetArgs; /** * Constructor. */ constructor(element: ng.ElementRef, _pageBag: PageBag); /** * Prepares CloneObjectInput before Transaction */ prepareTransactionInput(args: TransactionWizardPackage.TransactionWizardArgs): Promise; /** * Deals with transaction output. On success shows a feedback message with the created instances */ handleTransactionOutput(output: Cmf.Foundation.BusinessOrchestration.GenericServiceManagement.OutputObjects.CloneObjectOutput): Promise; /** * Updates clones when they are updated by DetailsStepComponent */ onClonesUpdated(clones: Cmf.Foundation.BusinessObjects.Entity[]): void; /** * Update changeSet related information */ onChangeSetUpdated(changes: ChangeSetSelectedArgs): void; /** * On the beginning of the wizard, extracts the EntityType from the instance and validates if it a valid EntityType to be cloned */ ngOnInit(): void; /** * Calculates if Clone Step is Visible. * It may be visible in two situations: * - EntityType is versioned * - EntityType is referenced by a versioned control context (flag DisplayChangeSetOnClone is true) */ private calculatesCloneStepVisibility; /** * If the entityType is not valid to be cloned, shows a error message and completes wizard with error */ private validateEntity; } export declare class WizardCloneEntityModule { }