/** Core */ import { CoreComponent } from "cmf.core/src/core"; import Cmf from "cmf.lbos"; /** Angular2 */ import * as ng from "@angular/core"; import { ColumnViewSelectedArgs } from "cmf.core.controls/src/components/columnView/columnView"; import { ColumnViewColumnModel } from "cmf.core.controls/src/components/columnView/columnViewStructure"; import { DataGridBusinessColumn } from "../../components/dataGrid/dataGrid"; import { EntityRelationsService } from "./entityRelationsService"; export declare class EntityRelations extends CoreComponent implements ng.OnChanges { private _entityRelationsService; /** * Selected columnView leaf */ private _selectedLeaf; /** * Collection of Relations */ private _columnViewRelations; /** * The instance's EntityType */ private _entityType; /** * Whether the entity type of the instance is source or target in the selected relation */ private _isSourceEntity; /** * Current definition entityTypes collection */ private _definitionEntities; /** * Current versioned entityTypes collection */ private _versionedEntities; /** * The relations ColumnView */ private _columnView; /** * The relations DataGrid */ private _dataGridRef; /** * The column view Title */ _listTitle: string; /** * The entity type active relations */ objectRelations: Map; /** * Relation columns */ relationColumns: Array; /** * Types of filter available */ relationFilters: { text: string; }[]; /** * Selected view mode */ selectedViewMode: { text: string; }; /** * Current selected object */ selectedObj: Cmf.Foundation.BusinessObjects.EntityType; /** * Column View model used for Column View */ columnViewModel: ColumnViewColumnModel; /** * Entity instance */ instance: Cmf.Foundation.BusinessObjects.Entity; /** * Data to be displayed in the dataGrid */ dataGridRelations: Cmf.Foundation.BusinessObjects.EntityRelationCollection; /** * Whether or not we want to hide the column view */ hideColumnView: boolean; /** * Whether or not we want to show the column view header */ isToShowColumnHeader: boolean; /** * Whether or not we show the system relations */ showSystemRelations: boolean; /** * Collection of relations to ignore */ relationsToIgnore: Array; /** * @method constructor * @param element Component's ElementRef * @param _entityRelationsService EntityRelationsService */ constructor(element: ng.ElementRef, _entityRelationsService: EntityRelationsService); /** * Build column view model according to given Map * * @param relations Array used to create the model */ private buildColumnViewModel; /** * Loads all relations related to the current instance's EntityType */ private loadColumnViewContent; /** * Update selected obj and leaf with column view selection * * @param leaf New selected leaf */ private updateSelectedLeaf; /** * Updates the DataGrid Data according to the selected entity type */ private updateRelationsData; /** * Updates the DataGrid Columns according to the EntityType's specific properties */ private updateGridColumns; /** * Calculates the entity type related to the current instance's */ private calculateRelatedEntityType; /** * Builds the DataGrid Columns according to the EntityType */ private buildEntityTypeColumns; /** * Checks if a given property has to be included */ private isToIncludeProperty; /** * Checks if user has access to property */ private hasAccessLevel; /** * Calculates the column value template */ private calculateTemplate; /** * Calculates the column value type */ private calculateType; /** * Calculates the property label based on the system's localized messages */ private calculateColumnHeader; /** * Gather all definition entity types */ private calculateDefinitionVersionEntities; /** * Select event handler of column view * * @param [args] arguments from selection */ onSelect(args: ColumnViewSelectedArgs): void; /** * Function called when user switches the selected list * @param relationsFilter */ onViewTypeChange(viewMode: { text: string; }): void; /** * On Changes */ ngOnChanges(changes: any): void; } export declare class EntityRelationsModule { }