declare module "hoctable/utils/dom" { export function addClass(element: HTMLElement, class_name: string): void; export function removeClass(element: HTMLElement, class_name: string): void; const _default: { classes: { add: (element: HTMLElement, class_name: string) => void; remove: (element: HTMLElement, class_name: string) => void; }; create: (tag: string, style?: any, classes?: string[]) => HTMLElement; remove: (element: Node) => Node; contains: (target: Node, child: Node) => boolean; stylize: (node: HTMLElement, style: CSSStyleDeclaration) => HTMLElement; }; export default _default; } declare module "hoctable/utils/uuid" { export default function uuid(): string; } declare module "hoctable/utils" { const _default: { dom: { classes: { add: (element: HTMLElement, class_name: string) => void; remove: (element: HTMLElement, class_name: string) => void; }; create: (tag: string, style?: any, classes?: string[]) => HTMLElement; remove: (element: Node) => Node; contains: (target: Node, child: Node) => boolean; stylize: (node: HTMLElement, style: CSSStyleDeclaration) => HTMLElement; }; replace: (target: T[], source: T[]) => T[]; uuid: () => string; extend: (a: Object, b: Object) => Object; }; export default _default; } declare module "hoctable/hoc/table" { import * as React from "react"; export interface PaginationState { current: number; total: number; size: number; } export type UpdateCallback = () => void; export type DataLoadedCallback = (result: DataResult) => void; export interface PaginationProps { move: (new_page: number, callback: UpdateCallback) => void; pagination: PaginationState; } export interface ButtonProps { label: string; handler: () => void; } export interface ColumnDefinition { rel: string; name: string; sortable?: boolean; style?: any; classes?: Array; } export interface ColumnFlags { active: boolean; } export interface ColumnProps { sort: (column: ColumnDefinition, callback: UpdateCallback) => void; column: ColumnDefinition; flags: ColumnFlags; } export interface DataResult { rows: Array; total: number; } export interface TableDelegate { rows: (pagination: PaginationState, sorting: ColumnDefinition, callback: DataLoadedCallback) => void; columns: () => Array; } export interface TableProps { delegate: TableDelegate; pagination: PaginationState | null; sorting: ColumnDefinition | null; } export type RowTransclusion = React.ComponentClass; export type ColumnTransclusion = React.ComponentClass; export type ComposedTable = React.ComponentClass; export type ComposedPager = React.ComponentClass; export const CLASSES: { PAGINATION: string; PAGINATION_EMPTY: string; PAGINATION_CONTAINER: string; PAGINATION_CONTROLS: string; PAGINATION_NEXT: string; PAGINATION_PREVIOUS: string; PAGINATION_TOTAL: string; PAGINATION_INFO: string; TABLE: string; TABLE_TBODY: string; TABLE_HEAD: string; TABLE_CONTAINER: string; TABLE_HEADER_CELL: string; TABLE_HEADER_CELL_ACTIVE: string; TABLE_HEADER_CELL_SORTABLE: string; }; export class Pagination extends React.Component { constructor(props: any); render(): React.ReactElement; } function TableFactory(Row: RowTransclusion, Column?: ColumnTransclusion): ComposedTable; export default TableFactory; } declare module "hoctable/services/window" { export interface Dimensions { width: number; height: number; } export interface Position { x: number; y: number; } export interface WindowListener { handler: EventListener; id: string; event_name: string; context?: any; } const _default: { on: (event_name: string, handler: EventListener, context?: any) => string; off: (id: string) => string | number; bind: () => void; dimensions: () => Dimensions; scroll: () => Position; fullscreen: { open(el: Node): boolean; readonly current: Node; }; unbind: () => void; }; export default _default; } declare module "hoctable/services/popups" { export interface PopupPlacement { left: number; right?: number; top: number; } export interface PopupHandle { id: string; node: HTMLElement; } export type PopupHandleReference = string | number; export const GUTTER_WIDTH = 10; export const SYNC_WAIT_TIME = 3; const _default: { open: (component: React.ReactElement, placement: PopupPlacement) => string | number; close: (popup_id: string | number) => number; mount: (target: any) => void; unmount: () => void; }; export default _default; } declare module "hoctable/hoc/menu" { import * as React from "react"; export type PopupCloseCallback = () => void; export interface MenuOpenEvent { currentTarget: HTMLElement; } export interface MenuState { popup: string | number; updated?: number; } export const CLASSES: { MENU: string; MENU_DEFAULT_BUTTON: string; MENU_BUTTON_CONTAINER: string; }; export function DefaultButton(props: any): React.ReactElement; function Factory

(Popup: React.ComponentClass, Button?: typeof DefaultButton): React.ComponentClass

; export default Factory; } declare module "hoctable/hoc/select" { import { PopupCloseCallback } from "hoctable/hoc/menu"; import * as React from "react"; export interface SelectionFlags { remain_open: boolean; } export type SelectCallback = (remain_open?: SelectionFlags) => void; export type OptionsCallback = (options: Array) => void; export interface SingleSelectDelegate { translate: (item: any) => string; select: (item: any, callback: SelectCallback) => void; options: (callback: OptionsCallback) => void; } export interface ItemSignals { selection: (remain_open: boolean) => void; } export interface SingleSelectProps { delegate: SingleSelectDelegate; close: PopupCloseCallback; redraw: PopupCloseCallback; } export interface ItemProps { option: any; delegate: DelegateType; signals: ItemSignals; } export type SingleSelectItemProps = ItemProps; export type ItemComponent = React.StatelessComponent; export type ComposedSelect = React.ComponentClass; export const CLASSES: { SELECT: string; SELECT_OPTION: string; SELECT_LOADING: string; SELECT_OPTION_CONTAINER: string; SELECT_BUTTON: string; }; export function DefaultButton({delegate}: { delegate: any; }): React.ReactElement; export function DefaultLoading(): React.ReactElement; function Factory(ItemType: ItemComponent, ButtonComponent?: typeof DefaultButton, Loading?: typeof DefaultLoading): ComposedSelect; export default Factory; } declare module "hoctable/hoc/search" { import * as React from "react"; export type DataLoadCallback = (results: Array) => void; export type ItemSelectedCallback = (selected_item: any) => void; export interface SearchDelegate { translate: (identifier: string, item?: any) => string; search: (query: string, callback: DataLoadCallback) => void; select: (item: any, callback: ItemSelectedCallback) => void; } export interface ItemContainerSignals { select: (item: any) => void; } export interface ItemContainerProps { signals: ItemContainerSignals; item: any; children?: any; } export interface SearchProps { delegate: SearchDelegate; } export interface RenderedItemMapping { uuid: string; node: React.ReactNode; } export const CLASSES: { SEARCH: string; SEARCH_FILLED: string; SEARCH_POPUP: string; INPUT_CONTAINER: string; RESULTS_PLACEHOLDER: string; SELECTION_CONTROLS: string; SELECTION_CLEAR_CONTROL: string; CLEAR_CONTROL_ICON: string; ITEM_CONTAINER: string; CONTROLS: string; }; export interface SearchItemProps { option: any; delegate?: SearchDelegate; } export const DEBOUNCE_TIME = 300; export function DefaultItem(props: SearchItemProps): React.ReactElement; function Factory(ItemComponent?: React.ComponentClass): React.ComponentClass; export default Factory; } declare module "hoctable/hoc/wall" { import * as React from "react"; export type DataLoadedCallback = (items: Array) => void; export type HighlightAction = (rendered_id: string | null) => void; export type TransitionAction = () => void; export interface WallDelegate { items: (callback: DataLoadedCallback) => void; interval?: () => number; delay?: () => number; } export interface WallProps { delegate: WallDelegate; } export interface WallItemProps { item: any; } export class ItemDelegate { item: any; private actions; constructor(item: any, highlight: HighlightAction); highlight(rendered_id: string): void; } export interface ViewportAxis { list: HTMLElement; left: HTMLElement; right: HTMLElement; } export interface RenderedItem { delegate: ItemDelegate; container: Element; uuid: string; } export interface GridItemProps { delegate: ItemDelegate; uuid: string; } export const CLASSES: { WALL: string; WALL_CONTROLS: string; WALL_CONTROL_IN: string; WALL_CONTROL_OUT: string; WALL_VIEWPORT: string; WALL_ITEM: string; WALL_CLEARFIX: string; WALL_ITEM_EVENTS: string; WALL_HIGHLIGHT: string; WALL_HIGHLIGHT_ITEM: string; WALL_ACTIVE_MODIFIER: string; }; export interface WallTimings { interval: number | null; debounce: number | null; } export type TransitionInstruction = TransitionAction | null; export type ComposedWall = React.ComponentClass; export type PreviewClass = React.ComponentClass; export type CardClass = React.ComponentClass; export const MAX_COLUMNS = 12; export const CYCLE_INTERVAL = 5000; export const DEBOUNCEMENT = 300; export const FULLSCREEN_DELAY = 300; export class TransitionTimings { private current; private interval_id; constructor(); enqueue(handler: TransitionInstruction, context: any, delay?: number): void; interval(handler: TransitionInstruction, context: any, delay?: number): void; stop(): void; } export function GridItemFactory(Transclusion: PreviewClass): React.ComponentClass; function WallFactory(Preview: PreviewClass, Card: CardClass): ComposedWall; export default WallFactory; } declare module "hoctable/hoc/grid" { import { RowTransclusion, ColumnTransclusion, ComposedTable } from "hoctable/hoc/table"; export const CLASSES: { GRID: string; GRID_BODY: string; GRID_HEAD: string; GRID_HEAD_ROW: string; GRID_CONTAINER: string; GRID_ROW_CONTAINER: string; GRID_COLUMN_HEAD: string; GRID_COLUMN_HEAD_SORTABLE: string; GRID_COLUMN_HEAD_ACTIVE: string; GRID_COLUMN_HEAD_CONTENT: string; PAGINATION_CONTAINER: string; }; function GridFactory(Row: RowTransclusion, Column?: ColumnTransclusion): ComposedTable; export default GridFactory; } declare module "hoctable/hoc/multi_select" { import { PopupCloseCallback } from "hoctable/hoc/menu"; import { ItemProps, DefaultButton } from "hoctable/hoc/select"; import * as React from "react"; export type OptionsCallback = (results: Array) => void; export type ToggledCallback = () => void; export type OptionsDataLoader = (params: OptionsDataLoaderParams, callback: OptionsCallback) => void; export interface OptionsDataLoaderParams { query: string; } export interface MultiSelectDelegate { options: OptionsDataLoader; toggle: (item: any, callback: ToggledCallback) => void; translate?: (identifier: string, item?: any) => string; isSelected: (item: any) => boolean; } export interface MultiSelectProps { delegate: MultiSelectDelegate; close: PopupCloseCallback; } export interface MultiSelectSearchProps { value: string; search: (value: React.ChangeEvent) => void; delegate: MultiSelectDelegate; } export type MultiSelectItemProps = ItemProps; export type ItemTransclusion = React.ComponentClass; export type ComposedSelect = React.ComponentClass; export const DEBOUNCE_TIME = 30; export const CLASSES: { MULTISELECT_ITEM: string; MULTISELECT_ITEM_LIST: string; MULTISELECT_ITEM_TOGGLE: string; MULTISELECT_ITEM_TEXT: string; MULTISELECT_SEARCH: string; MULTISELECT_SEARCH_CONTAINER: string; MULTISELECT: string; }; export function DefaultSearch(props: MultiSelectSearchProps): React.ReactElement; function Factory(Item: ItemTransclusion, ButtonComponent?: typeof DefaultButton, Search?: typeof DefaultSearch): ComposedSelect; export default Factory; } declare module "hoctable" { import { ColumnProps, TableProps } from "hoctable/hoc/table"; import { SingleSelectDelegate, ItemProps, SingleSelectProps } from "hoctable/hoc/select"; import { SearchDelegate, SearchProps, SearchItemProps } from "hoctable/hoc/search"; import { WallProps, WallItemProps, WallDelegate } from "hoctable/hoc/wall"; import { MultiSelectSearchProps, MultiSelectProps, MultiSelectDelegate } from "hoctable/hoc/multi_select"; import { PopupPlacement } from "hoctable/services/popups"; import { Position, Dimensions } from "hoctable/services/window"; import utils from "hoctable/utils"; const hoc: { Grid: (Row: React.ComponentClass, Column?: React.ComponentClass) => React.ComponentClass; Menu:

(Popup: React.ComponentClass, Button?: (props: any) => React.ReactElement) => React.ComponentClass

; MultiSelect: (Item: React.ComponentClass>, ButtonComponent?: ({delegate}: { delegate: any; }) => React.ReactElement, Search?: (props: MultiSelectSearchProps) => React.ReactElement) => React.ComponentClass; Select: (ItemType: React.StatelessComponent>, ButtonComponent?: ({delegate}: { delegate: any; }) => React.ReactElement, Loading?: () => React.ReactElement) => React.ComponentClass; Search: (ItemComponent?: React.ComponentClass) => React.ComponentClass; Table: (Row: React.ComponentClass, Column?: React.ComponentClass) => React.ComponentClass; Wall: (Preview: React.ComponentClass, Card: React.ComponentClass) => React.ComponentClass; }; const services: { Popups: { open: (component: React.ReactElement, placement: PopupPlacement) => string | number; close: (popup_id: string | number) => number; mount: (target: any) => void; unmount: () => void; }; Viewport: { on: (event_name: string, handler: EventListener, context?: any) => string; off: (id: string) => string | number; bind: () => void; dimensions: () => Dimensions; scroll: () => Position; fullscreen: { open(el: Node): boolean; readonly current: Node; }; unbind: () => void; }; }; export { Position, Dimensions, PopupPlacement, WallProps, WallItemProps, WallDelegate, MultiSelectProps, MultiSelectSearchProps, MultiSelectDelegate, SearchDelegate, SearchProps, SearchItemProps, SingleSelectProps, ItemProps, SingleSelectDelegate, ColumnProps, TableProps }; export { hoc, services, utils }; }