import { InjectionToken } from '@angular/core'; import { FormGroup } from '@angular/forms'; import { Observable } from 'rxjs'; import { MenuItem, DatabaseData } from '@lamnhan/ngx-useful'; import { DashboardService } from '../dashboard/dashboard.service'; import * as i0 from "@angular/core"; export declare const DASHBOARD_CONFIG: InjectionToken; export declare function dashboardConfig(config: DashboardConfig): DashboardConfig; export interface DashboardConfig { parts: string[]; plugins?: DashboardPlugin[]; allowDirectContent?: boolean; uploadRetrieval?: 'path' | 'url'; viewPerPage?: number; serverUrl?: string; } export declare type DashboardPlugin = (dashboardService: DashboardService) => any; export interface DashboardPart { name: string; menuItem: MenuItem; noI18n?: boolean; contentTypes?: ContentType[]; dataService?: DatabaseData; formSchema?: FormSchemaItem[]; formHandler?: (result: FormResult, formGroup: FormGroup) => void; } export interface FormResult { mode: 'create' | 'update'; data: Record; context: any; } export declare type DatabaseItem = Record; export declare type GetAllResult = Observable; export declare type GetItemResult = Observable; export interface ListingGrouping { title: string; value: string; count: number; } export interface FormSchemaItem { label: string; name: string; type: SchemaType; required?: boolean; disabled?: boolean; hidden?: boolean; defaultValue?: any; placeholder?: string; description?: string; note?: string; validators?: any[]; children?: CheckboxAlikeChild[]; selections?: RadioAlikeChild[]; meta?: Record; } export declare type SchemaType = string; export interface CheckboxAlikeChild { text: string; value: string; checked?: boolean; } export interface RadioAlikeChild { text: string; value: string; selected?: boolean; } export interface ContentType { text: string; value: string; icon?: string; } export interface ContentSchemaMeta { allowDirect?: boolean; isDirect?: boolean; contentHtml?: string; } export interface UploadSchemaMeta { imageCropping?: ImageCropping; } export interface HtmlSchemaMeta { htmlContent?: string; } export interface JsonSchemaMeta { type: 'record' | 'array'; recordKey?: string; schema: Array; defaultData?: any[] | Record; currentData?: Record | any[]; } export interface JsonSchemaMetaSchemaItem { name: string; type: string; required?: boolean; defaultValue?: any; width?: number; itemMetas?: Record>; } export interface LinkingSchemaMeta { source: string; preload?: number; typeFilter?: Record; part?: DashboardPart; currentData?: Record; } export interface ImageCropping { width: number; height: number; unenforced?: boolean; } export declare class ConfigService { private config; constructor(config: DashboardConfig); getConfig(): DashboardConfig; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }