@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
52 lines (51 loc) • 3.08 kB
TypeScript
import { ChangeDetectorRef, EventEmitter, Injector, OnChanges, OnInit, SimpleChanges } from "@angular/core";
import { FormBuilder, FormGroup } from "@angular/forms";
import { Subject } from "rxjs";
import { EventBus, IDataSource, IEvent, LoggerService } from "@nova-ui/bits";
import { ProviderRegistryService } from "../../../../../services/provider-registry.service";
import { IHasChangeDetector, IHasForm, IProperties } from "../../../../../types";
import { ConfiguratorHeadingService } from "../../../../services/configurator-heading.service";
import * as i0 from "@angular/core";
/**
* This is a basic implementation of a data source configuration component. In the real world scenario, this component will most likely be replaced by a
* custom one, but still can be used as a template for developing a custom specific solution.
*/
export declare class DataSourceConfigurationComponent implements IHasChangeDetector, IHasForm, OnInit, OnChanges {
changeDetector: ChangeDetectorRef;
configuratorHeading: ConfiguratorHeadingService;
private formBuilder;
private providerRegistryService;
private eventBus;
private injector;
private logger;
static lateLoadKey: string;
/**
* This component shows a dropdown with options for selecting a data source, this input represents these options.
*/
dataSourceProviders: string[];
errorComponent: string;
properties: IProperties;
providerId: string;
formReady: EventEmitter<FormGroup<any>>;
form: FormGroup;
hasDataSourceError: boolean;
dataSource: IDataSource;
dsOutput: Subject<any>;
dataFieldIds: Subject<any>;
constructor(changeDetector: ChangeDetectorRef, configuratorHeading: ConfiguratorHeadingService, formBuilder: FormBuilder, providerRegistryService: ProviderRegistryService, eventBus: EventBus<IEvent>, injector: Injector, logger: LoggerService);
ngOnInit(): void;
ngOnChanges(changes: SimpleChanges): void;
onDataSourceChange(providerId: string): void;
/**
* The data source is invoked here to notify the rest of the form about changes in the data source output.
* DATA_SOURCE_OUTPUT event is emitted through the event bus carrying the data source result as the payload.
* This might not be necessary in every situation. If the important information is already stored in the
* data source properties, this step can be omitted.
*
* @param providerId
*/
invokeDataSource(providerId: string): void;
onErrorState(isError: boolean): void;
static ɵfac: i0.ɵɵFactoryDeclaration<DataSourceConfigurationComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<DataSourceConfigurationComponent, "nui-data-source-configuration", never, { "dataSourceProviders": { "alias": "dataSourceProviders"; "required": false; }; "errorComponent": { "alias": "errorComponent"; "required": false; }; "properties": { "alias": "properties"; "required": false; }; "providerId": { "alias": "providerId"; "required": false; }; }, { "formReady": "formReady"; }, never, never, false, never>;
}