import { KeyValue } from '@angular/common'; import { ChangeDetectorRef, ComponentRef, TemplateRef, Type } from '@angular/core'; import { AsyncValidatorFn, FormControl, ValidatorFn } from '@angular/forms'; import { SelectItem } from 'primeng/api'; /** * Shorthand for a record of string keys and values of type T. */ export type TypedRecord = Record; /** * A string indexed object. */ export type WeakObject = TypedRecord; /** * Function that generates a union type of string literals. */ export declare function stringLiterals(...args: T[]): T[]; export declare function literalTypeUnion(...args: unknown[]): unknown[]; /** * Union type built from a list of string literals. */ export type UnionTypeOf> = T extends ReadonlyArray ? ElementType : never; /** * Modifies type T with properties from type M. */ export type ModdableType = Omit> & M; export type WSParams = TypedRecord; export type GenericFunction = (...args: any[]) => T; export type MouseEventHandler = (event: MouseEvent) => void; export type ChangeHandler = (event: Event) => void; export type KeyHandler = (event: KeyboardEvent) => void; export type ValueChangeHandler = (value: T) => void; export type TouchEventHandler = (event: TouchEvent) => void; export interface SelectButtonItem { label: string; value: string; } export interface LocalObject { readonly LOCAL_ID: string; } export type ElementSelector = string | TemplateRef | HTMLElement; export type ComponentType = Type | TemplateRef; export type DialogComponentType = ComponentType | string; export interface ComponentDef { component: ComponentType; config?: Partial; } export interface BaseComponentClass extends Record { LOCAL_ID: string; localLogLevel?: number; canLog?: boolean; cd: ChangeDetectorRef; } export type FunctionMap = Record>; export type KeyOf = Extract; export type ValueOf = T[KeyOf]; export type Nullable = T | null | undefined; export type ObjectOf = Partial, ValueOf>>; export type ButtonIconPosition = 'left' | 'right' | 'top' | 'bottom'; export interface ButtonAction { name: string; data?: WeakObject; } export type HTMLRef = HTMLElement | TemplateRef | string; export interface NgComponentOutletRef { _componentRef: ComponentRef; [key: string]: unknown; } export type StrKeyValue = KeyValue; export type DictionaryType = 'string' | 'number' | 'boolean' | 'string[]' | 'number[]'; export declare const DictionaryTypes: SelectItem[]; export declare const DictionaryDefaults: Record; export interface DictionaryItem { key: string; value: unknown; type?: DictionaryType; keyControl: FormControl; tooltip: string; valueControl: FormControl; } export type FormValidator = ValidatorFn | AsyncValidatorFn; export interface FormValidatorConfig { validator: FormValidator; message?: string; id?: string; }