@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
40 lines (39 loc) • 2.34 kB
TypeScript
import { CdkDragDrop, CdkDragStart } from "@angular/cdk/drag-drop";
import { ChangeDetectorRef, EventEmitter, OnDestroy, OnInit } from "@angular/core";
import { FormArray, FormBuilder, FormGroup } from "@angular/forms";
import { IEvent, LoggerService } from "@nova-ui/bits";
import { BaseLayout } from "../../../components/layouts/base-layout";
import { PizzagnaService } from "../../../pizzagna/services/pizzagna.service";
import { IComponentConfiguration, IHasChangeDetector, IHasForm } from "../../../types";
import { IItemConfiguration } from "../types";
import * as i0 from "@angular/core";
/** @ignore */
export declare class ItemsDynamicComponent extends BaseLayout implements IHasChangeDetector, IHasForm<FormArray>, OnInit, OnDestroy {
private formBuilder;
static lateLoadKey: string;
items: IItemConfiguration[];
moveButtons: boolean;
nodes: string[];
headerPrefix: string;
formReady: EventEmitter<FormArray<any>>;
itemsChange: EventEmitter<any>;
form: FormArray;
height: number;
headerMap: Map<string, string>;
constructor(changeDetector: ChangeDetectorRef, pizzagnaService: PizzagnaService, logger: LoggerService, formBuilder: FormBuilder);
getItemForNode(node: IComponentConfiguration): IItemConfiguration | undefined;
getNodes(): string[];
ngOnInit(): void;
onEvent(componentId: string, event: IEvent): void;
onFormReady(item: IItemConfiguration, form: FormGroup, index: number): void;
onFormDestroy(form: FormGroup): void;
trackBy(index: number, item: IItemConfiguration): string;
removeItem(item: IItemConfiguration | undefined, index: number): void;
moveItem(index: number, toIndex: number): void;
drop(event: CdkDragDrop<string[]>): void;
cdkDragStarted(event: CdkDragStart): void;
private moveFormValues;
ngOnDestroy(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<ItemsDynamicComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<ItemsDynamicComponent, "nui-items-dynamic", never, { "items": { "alias": "items"; "required": false; }; "moveButtons": { "alias": "moveButtons"; "required": false; }; "nodes": { "alias": "nodes"; "required": false; }; "headerPrefix": { "alias": "headerPrefix"; "required": false; }; }, { "formReady": "formReady"; "itemsChange": "itemsChange"; }, never, never, false, never>;
}