import { Observable } from 'rxjs'; import { Type } from '@angular/core'; import { IOption } from "../cui-control/select/cui-select-control.component"; import { SimpleDataTableCellConfig } from "./cell/table-simple/cui-data-table-simple-cell.component"; import { ComponentForDynamicInsert } from "./dynamic-container/dynamic-container.component"; import { CoordinateReferenceSystem } from "../cui-control/ol/line/cui-ol-line-control.component"; export * from './table-async/cui-data-table-async.component'; export declare type TEXT_ELEMENT = 'text'; export declare type TEXTAREA_ELEMENT = 'textarea'; export declare type DECIMAL_ELEMENT = 'decimal'; export declare type SWITCH_ELEMENT = 'switch'; export declare type SELECT_ELEMENT = 'select'; export declare type SELECT_TYPEAHEAD = 'typeahead'; export declare type SELECT_TYPEAHEAD_NEW = 'typeahead_new'; export declare type PROGRESSBAR = 'progressbar'; export declare type DATE_PICKER_ELEMENT = 'date_picker'; export declare type COMPLEX_ELEMENT = 'complex'; export declare type TIME_PICKER_ELEMENT = 'time_picker'; export declare type DATETIME_PICKER_ELEMENT = 'datetime_picker'; export declare type POINT_ELEMENT = 'ol_point'; export declare type POINT_SPECIAL_ELEMENT = 'ol_point_special'; export declare type LINE_ELEMENT = 'ol_line'; export declare type POLYGON_ELEMENT = 'ol_polygon'; export declare type POLYGON_SPECIAL_ELEMENT = 'ol_polygon_special'; export declare type RECTANGLE_ELEMENT = 'ol_rectangle'; export declare type TELEPHONE = 'telephone'; export declare type TABLE = 'table'; export declare type Coordinate = [number, number, number | undefined]; export declare type INPUT_TYPE = TEXT_ELEMENT | TEXTAREA_ELEMENT | DECIMAL_ELEMENT | SWITCH_ELEMENT | SELECT_ELEMENT | SELECT_TYPEAHEAD | SELECT_TYPEAHEAD_NEW | PROGRESSBAR | COMPLEX_ELEMENT | DATE_PICKER_ELEMENT | TIME_PICKER_ELEMENT | DATETIME_PICKER_ELEMENT | POINT_ELEMENT | POINT_SPECIAL_ELEMENT | LINE_ELEMENT | POLYGON_ELEMENT | POLYGON_SPECIAL_ELEMENT | RECTANGLE_ELEMENT | TELEPHONE | TABLE; export declare type colValues = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11; export interface DataTable { UpdateDataOnPage(): any; ExpandRow(index: number): any; } export interface Button { title: string; action: ((item: TYPE, list: TYPE[], dataTable: DataTable) => any); class?: string; isDisabled?: (item: TYPE) => boolean; } export interface UnderTableButton { title: string; action: () => any; class?: string; } export interface BaseProperty { label: string; width?: number; enableSort?: boolean; inputConfig?: { isDisabled?: (item: TYPE) => boolean; unitName?: string; labelCol?: colValues; inputCol?: colValues; select?: { options?: (item: TYPE, context?: any) => Observable; componentForOptions?: ComponentForDynamicInsert; componentForOptionGroups?: ComponentForDynamicInsert; componentForLabel?: ComponentForDynamicInsert; isMultiple?: boolean; isHideSelectedOptions?: boolean; isShowAll?: boolean; }; typeahead?: { dataSource: ((searchString: string) => Observable); itemKey: string; searchKey: string; initSearchValue: (item: TYPE) => Observable; onSelect?: (itemFromSearch: any, item: TYPE) => void; }; typeahead_new?: { dataSource?: ((searchString: string) => Observable); setupStartValueFunction?: ((value: number) => Observable); componentForOptions?: ComponentForDynamicInsert; componentForOptionGroups?: ComponentForDynamicInsert; componentForLabel?: ComponentForDynamicInsert; }; progressbar?: { barLabel: (item: TYPE) => string; type?: (item: TYPE) => string; max?: (item: TYPE) => number; isShowBarLabel?: boolean; isStriped?: boolean; isAnimate?: boolean; }; complex?: { buttonLabel?: string; innerProperties: (item: TYPE) => Property[]; labelCol?: colValues; inputCol?: colValues; componentView?: Type; inTable?: boolean; isNeedUnitInHeader?: boolean; isChangedByUsedOnModalHide?: boolean; }; mapData?: { CRS: (item: TYPE) => CoordinateReferenceSystem; viewCenter?: (item: TYPE) => [number, number]; }; table?: { config: SimpleDataTableCellConfig; isWithoutLabel?: boolean; isEditable?: boolean; isNeedUnitLabelForHeaders?: boolean; }; olSpecialData?: (item: TYPE) => { modalComponent: ComponentForDynamicInsert; data?: any; }; }; } export interface ReadOnlyProperty extends BaseProperty { is_editable?: false; value: ((item: TYPE) => any); is_html?: boolean; key?: string; } export interface EditableProperty extends BaseProperty { is_editable: true; key: string; inputType: INPUT_TYPE; validations?: any; onUserChange?: (item: TYPE, context?: any, value?: any) => void; modifyValue?: (item: TYPE, value?: any) => any; } export declare type Property = EditableProperty | ReadOnlyProperty;