/** Angular */
import * as ng from "@angular/core";
/** Core */
import { CoreComponent } from "cmf.core/src/core";
import { Cmf } from "cmf.lbos";
import { BasePropertyEditorOptions } from "cmf.core/src/domain/extensions/caches/entityType";
import { MetadataTableType } from "cmf.core/src/domain/metadata/table";
/** cmf.core.controls */
import { PageBag } from "cmf.core.controls/src/components/page/pageBag";
import { Wizard } from "cmf.core.controls/src/components/wizard/wizardBase";
import { ColumnViewSelectedArgs, ColumnViewAddArgs, ColumnViewRemoveArgs } from "cmf.core.controls/src/components/columnView/columnView";
import { ColumnViewModel, ColumnViewItem } from "cmf.core.controls/src/components/columnView/columnViewStructure";
/** cmf.core.business.controls */
import { PropertyChangeArgs } from "../propertiesEditor/propertiesEditor";
/** cmf.core.business.controls */
import { TransactionWizardInterface, TransactionWizardArgs } from "../../directives/transactionWizard/transactionWizard";
/**
* @whatItDoes
* The WizardAddEditTableData component is used to Add or Edit one or more rows from a given Smart or Generic Table.
*
* @howToUse
* This component is used with the inputs and outputs mentioned below.
* Keep in mind that the inputs are passed in the page bag.
*
*
* ### Inputs
* `string` : **id** - The Table Id.
* `string` : **name** - The Table name.
* `MetadataTableType | string` : **tableType** - The Table type.
* `Cmf.Foundation.BusinessObjects.Entity` : **instance** - The Table type.
* `any[]` : **selectedItems** - The table rows to be removed.
*
* ### Outputs
* There are no outputs on this component.
*
* ### Example
* To use the component, assume this HTML Template as an example:
*
* ```HTML
*
* ```
*
* @description
*
* ## WizardAddEditTableData Component
*
* ### Dependencies
*
* #### Components
* * BaseWidgetModule : `cmf.core.controls`
* * ColumnViewModule : `cmf.core.controls`
* * PropertiesEditorModule : `cmf.core.business.controls`
*
* #### Services
* * TableService : `cmf.core.business.controls`
*
* #### Directives
* * ValidatorModule : `cmf.core.controls`
* * TransactionWizardModule : `cmf.core.business.controls`
*
*/
export declare class WizardAddEditTableData extends CoreComponent implements ng.OnInit, TransactionWizardInterface {
private _pageBag;
/**
* Wizard instance.
*/
protected _nestedWizard: Wizard;
/**
* Column view instance.
*/
private _columnView;
/**
* ElementRef to be used as anchor for the progress indicator.
*/
private _contentElemRef;
/**
* Smart or Generic Table instance.
*/
private _table;
/**
* Table's Type passed as input.
*/
private _tableType;
/**
* Metadata Table.
*/
private _metadataTable;
/**
* Table Properties.
*/
private tableProperties;
/**
* Main Column to be used.
*/
private _mainColToUse;
/**
* Sub Column to be used.
*/
private _subColToUse;
/**
* Kendo's compatible template to be used.
*/
private _template;
/**
* Action name.
*/
actionName: string;
/**
* Step Id.
*/
stepId: string;
/**
* Entity instance.
*/
instance: Cmf.Foundation.BusinessObjects.Entity;
/**
* Table's name.
*/
name: string;
/**
* Table's Id.
*/
id: string;
/**
* Table Type property getter/setter
*/
tableType: MetadataTableType | string;
/**
* Wizard/Step title.
*/
title: string;
/**
* Column View title.
*/
columnViewTitle: string;
/**
* Leaf Content title.
*/
leafTitle: string;
/**
* Determines if the user can add and remove rows from the column view.
*/
canAddRemove: boolean;
/**
* Properties to be displayed in the leaf content.
*/
properties: {
[key: string]: BasePropertyEditorOptions;
};
/**
* Column view model.
*/
columnViewModel: ColumnViewModel;
/**
* Currently selected leaf.
*/
selectedLeaf: ColumnViewItem;
/**
* Selected items passed on the page bag context.
*/
selectedItems: any[];
/**
* Constructor.
* @param viewContainerRef the reference to the component view container.
* @param _pageBag page bag.
*/
constructor(viewContainerRef: ng.ViewContainerRef, _pageBag: PageBag);
/**
* Sets the Wizard/Step, ColumnView and ContentLeaf titles.
*/
private buildTitles;
/**
* Build column view model.
*/
private buildColumnViewModel;
/**
* Selects the first row in the column view.
*/
private selectFirstRow;
/**
* Builds and returns an object with the Table's Properties and all its values set to undefined.
* This is needed for a correct use of the Kendo's template system.
*/
private getDefaultPropertyValues;
/**
* Builds a new leaf for the column view.
*/
private buildColumnViewItem;
/**
* Returns the MainColumn to be used, taking the metadata settings into account.
* @param metadataTable metadata Table.
*/
private getMainColumnToUse;
/**
* Returns the SubColumn to be used, taking the metadata settings into account.
* @param metadataTable metadata Table.
*/
private getSubColumnToUse;
/**
* Determines if the metadata Table settings sets a template to be used on the column view.
* @param metadataTable metadata Table.
*/
private useTemplate;
/**
* Transforms and returns the value to use if it's table's property reference type is an Entity or Enum.
* @param columnToUse Column to use.
* @param valueToUse Value to use.
*/
private getValueToUse;
/**
* Builds the HTML markup for the column view row.
* @param columnToUse Column to use.
* @param valueToUse Value to use.
* @param classToUse Class to use.
*/
private buildHtmlMarkupForColumn;
/**
* Builds the column view item name to be used on the ColumnView row.
* @param tag content leaf instance.
*/
private buildColumnViewItemName;
/**
* Change the content leaf properties, according to the precedence keys of the table.
*/
private dealWithKeysAndPrecedenceKeys;
/**
* Update the Column View selected leaf's name.
*/
private updateColumnViewName;
/**
* Find and execute any custom logic defined on the metadata that concerns the properties of this table.
*/
private resolveMetadataCustomLogic;
/**
* Builds the ExecuteQuery for the current instance set, if applicable.
*/
private buildExecuteQueryForInstance;
/**
* Handles OnInit angular component life cycle.
* Builds the column view model.
*/
ngOnInit(): void;
/**
* Returns the data inputs to be used by the data grid.
*/
prepareDataInput(): Promise;
/**
* Callback to handle all the outputs from data grid set inputs.
* @param outputs BaseOutput array.
*/
handleDataOutput(outputs: Cmf.Foundation.BusinessOrchestration.BaseOutput[]): Promise;
/**
* Processes the data to be sent in the service call, on wizard's action.
* @param args TransactionWizardArgs.
*/
prepareTransactionInput(args: TransactionWizardArgs): Promise;
/**
* On Select callback from the ColumnView.
* @param args ColumnViewSelectedArgs.
*/
onSelect(args: ColumnViewSelectedArgs): void;
/**
* On Add callback from the ColumnView.
* @param args ColumnViewAddArgs.
*/
onAdd(args: ColumnViewAddArgs): void;
/**
* On Remove callback from the ColumnView.
* @param args ColumnViewRemoveArgs.
*/
onRemove(args: ColumnViewRemoveArgs): void;
/**
* On Property Change callback from any property editor on the leaf content.
* @param event PropertyChangeArgs.
*/
onPropertyChange(event: PropertyChangeArgs): void;
}
export declare class WizardAddEditTableDataModule {
}