import { VNodeChild, Component } from 'vue'; import { ErrorItem } from './ApiResult'; export interface SelectOption { value: string | number | undefined; label: string | VNodeChild; } export interface ColumnValueSource { type: "object" | "remote"; key?: string; label?: string; subLabel?: string; renderLabel?: (data: any) => VNodeChild; labelTemplate?: string; prefix?: string; suffix?: string; i18n?: boolean; source: Array | string; searchModal?: SearchModalConfig; filterable?: boolean; } export declare function instanceOfColumnValueSource(obj: unknown): obj is ColumnValueSource; export type Action = () => void; export type ActionT = (arg0: T) => void; export type Action2 = (arg0: T1, arg1: T2) => void; export type Func = () => T; export type Func1 = (arg0: Ta) => Tr; export type RenderFunction = () => VNodeChild; export type Predicate = () => boolean; export type Predicate2 = (obj1: T, obj2: T) => boolean; export type ArgumentsBuilder = (args: Record) => Record; export type ListKeyPicker = (source: Array>) => Array; export type Translator = (value: string) => string; export type Formatter = (value: any) => string | undefined; export type CellFormatter = (value: any, row: Record | null) => string | undefined; export type HrefPicker = (value: any) => string | undefined; export declare type HaloItemRole = "code" | "code-u" | "code-l" | "link" | "button" | "router-link" | "status" | "tag" | "qr" | "percent" | "list"; export declare type FormGroupLayout = "tab" | "column"; export declare type TextOverflow = "clip" | "ellipsis" | "wrap"; export interface ColumnSearchOptions { method: boolean | string; editor?: string | RenderFunction; default: any | Array; required?: boolean; role?: HaloItemRole | Array; field?: string; } export interface HaloColumn { name: string; title?: string; grid?: "none" | "normal" | "link" | "button" | "router-link"; gridFixed?: "left" | "right" | false; role?: HaloItemRole | Array; editing?: "hidden" | "readonly" | "edit" | "create" | "full"; readonly?: boolean | Array<"edit" | "create" | "view">; editor?: string | RenderFunction; editorConfig?: Record; dataType?: "string" | "number" | "boolean" | "bool" | "date" | "datetime" | "time" | "timespan" | "password"; size?: "x-large" | "large" | "medium" | "small" | "x-small" | number; minWidth?: number | string; textOverflow?: TextOverflow; align?: "left" | "right" | "center"; required?: boolean; minValue?: number; maxValue?: number; href?: string | HrefPicker; i18n?: boolean; template?: string; prefix?: string; suffix?: string; formatter?: CellFormatter; display?: string; sortable?: boolean; search?: boolean | string | ColumnSearchOptions; group?: string; className?: string | Array; render?(rowData: Record, rowIndex: number): VNodeChild; click?(rowData: Record, rowIndex: number): void; values?: ColumnValueSource | Array; visible?: boolean | Predicate; referencePage?: string; tagSource?: string; description?: string; children?: Array; } export declare function instanceOfHaloColumn(obj: unknown): obj is HaloColumn; export interface ItemValueSource { type: "static" | "function" | "remote"; sourceUrl?: string; isLoading?: boolean; key?: string; label?: string; subLabel?: string; renderLabel?: (data: any) => VNodeChild; labelTemplate?: string; prefix?: string; suffix?: string; i18n?: boolean; filterable?: boolean; values?: Array; func?: () => Array<{ label: string; value: string; }>; } export interface FormItem { name: string; label?: string; role?: Array; dataType?: string | undefined; visibility?: boolean | Array<"edit" | "create" | "view">; readonly?: boolean | Array<"edit" | "create" | "view">; nullable?: boolean; minValue?: number; maxValue?: number; group?: string; editor?: string | RenderFunction; editorConfig?: Record; sortable?: boolean; template?: string; prefix?: string; suffix?: string; values?: Array; valueSource?: ItemValueSource; validationStatus?: "error" | "success" | "warning"; errorMessage?: string; tagSource?: string; description?: string; defaultValue?: any; } export interface SearchItem extends FormItem { searchMethod?: "normal" | "range"; searchField?: string; } export interface SaveResult { isSuccess: boolean; errorMessage?: string; modalErrors?: Array; } export interface SaveEventArgs { data: Record; original: any; method: "create" | "edit"; } export interface SearchArgs { pageSize: number; pageIndex: number; sortBy?: string; sortDirection?: string; groupBy?: string; timestamp?: string; } export interface GridColumn { name: string; title?: string; align?: "left" | "center" | "right"; fixed?: "left" | "right" | false; behavior?: "none" | "normal" | "link" | "button" | "router-link"; role?: HaloItemRole | Array; dataType?: string; display?: string; template?: string | ((rowData: any, rowIndex: number) => VNodeChild); formatter?: CellFormatter; prefix?: string; suffix?: string; i18n?: boolean; href?: string | HrefPicker; width?: number | string; minWidth?: number | string; textOverflow?: TextOverflow; values?: Array; visible?: boolean; sortIndex?: number; sortable?: boolean; referencePage?: string; tagSource?: string; className?: string | Array; render?(rowData: Record, rowIndex: number): VNodeChild; click?(rowData: Record, rowIndex: number): void; children?: Array; } export interface SearchModalConfig { title?: string; searchAction: string; searchFields: Array; gridColumns: Array; pageSize?: number; } export interface PropertyModal { show(data?: Record, method?: "create" | "edit"): void; close(): void; } export interface EntityEditor { Commit(): Promise; } export interface ExtendedAction { label: string | RenderFunction; key?: string | number; icon?: Component; group?: string; renderIcon?: RenderFunction; click?(args: any): void; } export type BatchAddDataBuilder = (rows: Array>) => Record | undefined; export interface BatchAddConfig { id?: string; label?: string; icon?: Component; singleOne?: boolean; searchTitle?: string; searchConfig: SearchModalConfig; keyPicker?: ListKeyPicker; actionUrl: string; keyName?: string; additionQuery?: Record | Func>; dataBuilder?: BatchAddDataBuilder; } export type BeforeSaveFunction = (data: any, method: string) => boolean; export interface UI { message(message: string, type?: "create" | "error" | "loading" | "success" | "warning" | "info"): void; confirm(title: string | undefined, message: string, callback: Action): void; t(text: string): string; } export interface PropertyItem { label: string; value: string; span?: number; dataType?: string; role?: string | Array; } export interface PropertyGridItem { name: string; label?: string; i18n?: boolean; span?: number; dataType?: string; role?: string | Array; } export interface PrintModalArgs { action: string; collate: "Collated" | "Uncollated"; copies: number; additionParams?: Record; } export interface DataGridConfigColumn { columnId: string; title: string; customTitle?: string; visible: boolean; sortIndex: number; } export interface DataGridConfig { dataGridId: string; columns: Array; pageSize: number; }