@nova-ui/dashboards
Version:
Nova Dashboards is a framework designed to provide feature developers with a common solution for presenting data coming from various sources within a single view, as well as a set of predefined widget visualizations that are 100% configuration-driven and
29 lines (28 loc) • 1.37 kB
TypeScript
import { AfterViewInit } from "@angular/core";
import { FormGroup } from "@angular/forms";
import { EventBus, IEvent } from "@nova-ui/bits";
import { PizzagnaService } from "../../../../pizzagna/services/pizzagna.service";
import { PreviewService } from "../../preview.service";
import { BaseConverter } from "../base-converter";
export declare class TableColumnsConverterService extends BaseConverter implements AfterViewInit {
constructor(eventBus: EventBus<IEvent>, previewService: PreviewService, pizzagnaService: PizzagnaService);
ngAfterViewInit(): void;
buildForm(): void;
toPreview(form: FormGroup): void;
private subscribeToColumnsValueChange;
/**
* Filters columns which are active (visible) and don't have specified width
* @param columns
*/
private filterColumnsWithoutSpecifiedWidth;
/**
* Receives columns which are active and don't have specified width and returns:
* - if all columns have specified width, reset width of the last column and return its id
* - if there are only one column, set this columns id as last without specified width
* - if there are more than one column that don't have specified width, do nothing
* @param activeColumnsWithoutWidth
*/
private handleColumnsWithoutSpecifiedWidth;
private handleWidthValidation;
private setWidthMessages;
}