@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
76 lines (75 loc) • 3.74 kB
TypeScript
import { ChangeDetectorRef, DoCheck, OnChanges, OnDestroy, OnInit, SimpleChanges } from "@angular/core";
import { AbstractControl, ControlValueAccessor, FormBuilder, FormControl, FormGroup, ValidationErrors } from "@angular/forms";
import { EventBus, IDataField, IEvent } from "@nova-ui/bits";
import { IFormatter, IFormatterConfigurator, IFormatterDefinition } from "../../../../../../../components/types";
import { FormatterRegistryService, TableFormatterRegistryService } from "../../../../../../../services/table-formatter-registry.service";
import { IHasChangeDetector } from "../../../../../../../types";
import { ConfiguratorHeadingService } from "../../../../../../services/configurator-heading.service";
import * as i0 from "@angular/core";
export declare class PresentationConfigurationV2Component implements IHasChangeDetector, OnInit, OnDestroy, OnChanges, DoCheck, ControlValueAccessor {
private formBuilder;
changeDetector: ChangeDetectorRef;
configuratorHeading: ConfiguratorHeadingService;
private eventBus;
private formattersRegistryCommon;
/**
* @deprecated will be removed in the scope of NUI-5839
*/
private tableFormattersRegistryService;
static lateLoadKey: string;
set formatters(formatters: Array<IFormatterDefinition>);
get formatters(): IFormatterDefinition[];
dataFieldIds: string[];
formControl: AbstractControl;
set dataFields(dataFields: Array<IDataField>);
get dataFields(): IDataField[];
get formatter(): IFormatter;
form: FormGroup;
propertiesForm: FormGroup;
formatterConfigurator: string | null;
formatterConfiguratorProps: IFormatterConfigurator;
subtitleText: string;
private _dataFields;
private onDestroy$;
private providedFormatters;
private _formatters;
private changeFn;
private touchFn;
private propertiesFormReady;
private input;
constructor(formBuilder: FormBuilder, changeDetector: ChangeDetectorRef, configuratorHeading: ConfiguratorHeadingService, eventBus: EventBus<IEvent>, formattersRegistryCommon: FormatterRegistryService,
/**
* @deprecated will be removed in the scope of NUI-5839
*/
tableFormattersRegistryService: TableFormatterRegistryService);
ngOnInit(): void;
ngOnDestroy(): void;
ngOnChanges(changes: SimpleChanges): void;
registerOnChange(fn: any): void;
registerOnTouched(fn: any): void;
setDisabledState(isDisabled: boolean): void;
writeValue(obj: IFormatter): void;
validate(c: FormControl): ValidationErrors | null;
getSelectedFormatterDefinition(): IFormatterDefinition | null;
getSelectedDataField(): IDataField | null;
ngDoCheck(): void;
onFormReady(form: FormGroup): void;
onValueChange(): void;
private updateSubtitle;
/**
* Creates portal for dynamic configuration of formatter value.
* @returns ComponentPortal
*/
private createFormatterConfigurator;
private updateAvailableFormatters;
private subscribeToFormattersRegistry;
private handleFormattersUpdate;
/**
* Fallback for table,
*
* nothing should go wrong, but in case "FORMATTERS_REGISTRY" is lost, get table registry
*/
private get formattersRegistry();
static ɵfac: i0.ɵɵFactoryDeclaration<PresentationConfigurationV2Component, [null, null, null, null, { optional: true; }, null]>;
static ɵcmp: i0.ɵɵComponentDeclaration<PresentationConfigurationV2Component, "nui-presentation-configuration-v2", never, { "formatters": { "alias": "formatters"; "required": false; }; "dataFieldIds": { "alias": "dataFieldIds"; "required": false; }; "formControl": { "alias": "formControl"; "required": false; }; }, {}, never, never, false, never>;
}