uicore-ts
Version:
UICore is a library to build native-like user interfaces using pure Typescript. No HTML is needed at all. Components are described as TS classes and all user interactions are handled explicitly. This library is strongly inspired by the UIKit framework tha
66 lines (65 loc) • 2.79 kB
TypeScript
import { UINativeScrollView } from "./UINativeScrollView";
import { UIPoint } from "./UIPoint";
import { UIRectangle } from "./UIRectangle";
import { UIView, UIViewBroadcastEvent } from "./UIView";
interface UITableViewRowView extends UIView {
_UITableViewRowIndex?: number;
}
export interface UITableViewReusableViewsContainerObject {
[key: string]: UIView[];
}
export interface UITableViewReusableViewPositionObject {
bottomY: number;
topY: number;
isValid: boolean;
}
export declare class UITableView extends UINativeScrollView {
allRowsHaveEqualHeight: boolean;
_visibleRows: UITableViewRowView[];
_firstLayoutVisibleRows: UITableViewRowView[];
_rowPositions: UITableViewReusableViewPositionObject[];
_highestValidRowPositionIndex: number;
_reusableViews: UITableViewReusableViewsContainerObject;
_removedReusableViews: UITableViewReusableViewsContainerObject;
_fullHeightView: UIView;
_rowIDIndex: number;
reloadsOnLanguageChange: boolean;
sidePadding: number;
cellWeights?: number[];
_persistedData: any[];
_needsDrawingOfVisibleRowsBeforeLayout: boolean;
_isDrawVisibleRowsScheduled: boolean;
_shouldAnimateNextLayout?: boolean;
animationDuration: number;
constructor(elementID?: string);
loadData(): void;
reloadData(): void;
highlightChanges(previousData: any[], newData: any[]): void;
highlightRowAsNew(row: UIView): void;
invalidateSizeOfRowWithIndex(index: number, animateChange?: boolean): void;
_calculateAllPositions(): void;
_calculatePositionsUntilIndex(maxIndex: number): void;
indexesForVisibleRows(paddingRatio?: number): number[];
_removeVisibleRows(): void;
_removeAllReusableRows(): void;
_markReusableViewAsUnused(row: UIView): void;
_drawVisibleRows(): void;
visibleRowWithIndex(rowIndex: number | undefined): UIView;
isRowWithIndexVisible(rowIndex: number): boolean;
reusableViewForIdentifier(identifier: string, rowIndex: number): UITableViewRowView;
newReusableViewForIdentifier(identifier: string, rowIDIndex: number): UIView;
heightForRowWithIndex(index: number): number;
numberOfRows(): number;
defaultRowPersistenceDataItem(): any;
persistenceDataItemForRowWithIndex(rowIndex: number, row: UIView): any;
viewForRowWithIndex(rowIndex: number): UITableViewRowView;
didScrollToPosition(offsetPosition: UIPoint): void;
wasAddedToViewTree(): void;
setFrame(rectangle: UIRectangle, zIndex?: number, performUncheckedLayout?: boolean): void;
didReceiveBroadcastEvent(event: UIViewBroadcastEvent): void;
private _layoutAllRows;
private _animateLayoutAllRows;
layoutSubviews(): void;
intrinsicContentHeight(constrainingWidth?: number): number;
}
export {};