diff --git a/ui-grid/ui-grid-tests.ts b/ui-grid/ui-grid-tests.ts index 065bb1a52..151d0436f 100644 --- a/ui-grid/ui-grid-tests.ts +++ b/ui-grid/ui-grid-tests.ts @@ -87,16 +87,16 @@ columnDef.width = 100; columnDef.width = '*'; -var gridInstance: uiGrid.IGridInstance; -var menuItem: uiGrid.IMenuItem - var gridApi: uiGrid.IGridApi +var gridInstance: uiGrid.IGridInstance; +var menuItem: uiGrid.IMenuItem; +var colProcessor: uiGrid.IColumnProcessor; + gridApi.core.clearAllFilters(true); gridApi.core.addToGridMenu(gridInstance, [menuItem]); gridApi.core.getVisibleRows(gridInstance); gridApi.core.handleWindowResize(); gridApi.core.queueGridRefresh() gridApi.core.queueRefresh(); -var colProcessor: uiGrid.IColumnProcessor; gridApi.core.registerColumnsProcessor(colProcessor, 100); diff --git a/ui-grid/ui-grid.d.ts b/ui-grid/ui-grid.d.ts index 30a2b2037..42f8e7e0f 100644 --- a/ui-grid/ui-grid.d.ts +++ b/ui-grid/ui-grid.d.ts @@ -102,7 +102,7 @@ declare module uiGrid { min: number; max: number; }; - CURRENCY_SYMBOLS: string[]; + CURRENCY_SYMBOLS: Array; dataChange: { ALL: string; EDIT: string; @@ -112,10 +112,8 @@ declare module uiGrid { } scrollbars: { NEVER: number; - ALWAYS: number; - //WHEN_NEEDED: number + ALWAYS: number; } - } @@ -242,17 +240,16 @@ declare module uiGrid { rowEquality?(entityA: IGridRow, entityB: IGridRow): boolean; rowIdentity? (): any; totalItems?: number; - paginationPageSize?: number; - + paginationPageSize?: number; + paginationCurrentPage?: number; } - export interface IGridCoreApi { addRowHeaderColumn(column: IColumnDef): void; - addToGridMenu(grid: IGridInstance, items: IMenuItem[]): void; - clearAllFilters(refreshRows?: boolean, clearConditions?: boolean, clearFlags?: boolean): ng.IPromise; + addToGridMenu(grid: IGridInstance, items: Array): void; + clearAllFilters(refreshRows?: boolean, clearConditions?: boolean, clearFlags?: boolean): ng.IPromise>; clearRowInvisible(rowEntity: IGridRow): void; - getVisibleRows(grid: IGridInstance): IGridRow[]; + getVisibleRows(grid: IGridInstance): Array; handleWindowResize(): void; notifiyDataChange(type): void; refreshRows(): ng.IPromise; @@ -266,20 +263,17 @@ declare module uiGrid { queueGridRefresh(): void; queueRefresh(); on: { - sortChanged: (scope: ng.IScope, handler: (grid: IGridInstance, sortColumns: IColumnDef[]) => void) => void; + sortChanged: (scope: ng.IScope, handler: (grid: IGridInstance, sortColumns: Array) => void) => void; columnVisiblityChanged: (scope: ng.IScope, handler: (grid: IGridColumn) => void) => void; canvasHeightChanged: (scope: ng.IScope, handler: (oldHeight: number, newHeight: number) => void) => void; - /* filterChangedis raised after the filter is changed. The nature of the watch expression doesn't allow notification - of what changed, so the receiver of this event will need to re-extract the filter conditions from the columns. - http://ui-grid.info/docs/#/api/ui.grid.core.api:PublicApi*/ + + /** + * filterChangedis raised after the filter is changed. The nature of the watch expression doesn't allow notification + * of what changed, so the receiver of this event will need to re-extract the filter conditions from the columns. + * http://ui-grid.info/docs/#/api/ui.grid.core.api:PublicApi + */ filterChanged: (scope: ng.IScope, handler: () => void) => void; - rowsRendered: (scope: ng.IScope, handler: () => void) => void; - /* rowsVisibleChanged - is raised after the rows that are visible change. The filtering is zero-based, - so it isn't possible to say which rows changed (unlike in the selection feature). - We can plausibly know which row was changed when setRowInvisible is called, but in - that situation the user already knows which row they changed. - When a filter runs we don't know what changed, and that is the one that would have been useful. */ + rowsRendered: (scope: ng.IScope, handler: () => void) => void; rowsVisibleChanged: (scope: ng.IScope, handler: () => void) => void; scrollBegin: (scope: ng.IScope, handler: () => void) => void; scrollEnd: (scope: ng.IScope, handler: () => void) => void; @@ -294,14 +288,14 @@ declare module uiGrid { selectAllRows: (event?: Event) => void; selectAllVisibleRows: (event?: Event) => void; clearSelectedRows: (event?: Event) => void; - getSelectedRows: () => IGridRow[]; - getSelectedGridRows: () => IGridRow[]; + getSelectedRows: () => Array; + getSelectedGridRows: () => Array; setMultiSelect: (multiSelect: boolean) => void; setModifierKeysToMultiSelect: (multiSelect: boolean) => void; getSelectAllState: () => boolean; on: { rowSelectionChanged: (scope: ng.IScope, handler: (row: IGridRow, event?: Event) => void) => void; - rowSelectionChangedBatch: (scope: ng.IScope, handler: (row: IGridRow[], event?: Event) => void) => void; + rowSelectionChangedBatch: (scope: ng.IScope, handler: (row: Array, event?: Event) => void) => void; } } @@ -318,21 +312,21 @@ declare module uiGrid { export interface IGridRowEditApi { flushDirtyRows(grid?: IGridInstance): ng.IPromise; - getDirtyRows(grid?: IGridInstance): IGridRow[]; - getErrorRows(grid?: IGridInstance): IGridRow[]; + getDirtyRows(grid?: IGridInstance): Array; + getErrorRows(grid?: IGridInstance): Array; /** * NOTE: The items below expect the entities not the grid row instance * http://ui-grid.info/docs/#/api/ui.grid.rowEdit.api:PublicApi */ - setRowsClean(dataRows: any[]): any[]; - setRowsDirty(dataRows: any[]): any[]; + setRowsClean(dataRows: Array): Array; + setRowsDirty(dataRows: Array): Array; /** * Sets the promise associated with the row save, * mandatory that the saveRow event handler calls this method somewhere before returning. */ - setSavePromise(rowEntity: any, saveProvies: ng.IPromise): void; + setSavePromise(rowEntity: Object, savePromise: ng.IPromise): void; on: { - saveRow: (scope: ng.IScope, handler: (rowEntity: any) => void) => void + saveRow: (scope: ng.IScope, handler: (rowEntity: Array) => void) => void } }